Contents in 1999-06-04-13 of release-21-2.
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 1998, 1999 J. Kean Johnston.
11
12 ### Don't edit this script!
13 ### This script was automatically generated by the `autoconf' program
14 ### from the file `./configure.in'.
15 ### To rebuild it, execute the command
16 ###     autoconf
17 ### in the this directory.  You must have autoconf version 2.12 or later.
18
19 ### This file is part of XEmacs.
20
21 ### XEmacs is free software; you can redistribute it and/or modify it
22 ### under the terms of the GNU General Public License as published by
23 ### the Free Software Foundation; either version 2, or (at your
24 ### option) any later version.
25
26 ### XEmacs is distributed in the hope that it will be useful, but
27 ### WITHOUT ANY WARRANTY; without even the implied warranty of
28 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29 ### General Public License for more details.
30
31 ### You should have received a copy of the GNU General Public License
32 ### along with XEmacs; see the file COPYING.  If not, write to the Free
33 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34 ### 02111-1307, USA.
35
36 ### For usage, run `./configure --help'
37 ### For more detailed information on building and installing XEmacs,
38 ### read the file `INSTALL'.
39 ###
40 ### If configure succeeds, it leaves its status in config.status.
41 ### A log of configuration tests can be found in config.log.
42 ### If configure fails after disturbing the status quo,
43 ###     config.status is removed.
44
45 ac_help="$ac_help
46   --with-x                use the X Window System"
47
48
49
50 if test -n "$ZSH_VERSION"; then
51     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
52   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
53   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
54   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
55       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
56 elif test -n "$BASH_VERSION"; then
57     set -o posix
58   unset CDPATH
59 else
60   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
61 fi
62
63 exec_prefix=NONE
64 host=NONE
65 no_create=
66 nonopt=NONE
67 no_recursion=
68 prefix=NONE
69 program_prefix=NONE
70 program_suffix=NONE
71 program_transform_name=s,x,x,
72 silent=
73 site=
74 srcdir=
75 target=NONE
76 verbose=
77 x_includes=NONE
78 x_libraries=NONE
79
80 bindir='${exec_prefix}/bin'
81 sbindir='${exec_prefix}/sbin'
82 libexecdir='${exec_prefix}/libexec'
83 datadir='${prefix}/share'
84 sysconfdir='${prefix}/etc'
85 sharedstatedir='${prefix}/com'
86 localstatedir='${prefix}/var'
87 libdir='${{exec_prefix}}/lib'
88 includedir='${prefix}/include'
89 oldincludedir='/usr/include'
90 infodir='${prefix}/info'
91 mandir='${prefix}/man'
92
93 subdirs=
94 MFLAGS= MAKEFLAGS=
95 ac_max_here_lines=12
96
97 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
98
99 # File descriptor usage:
100 # 0 standard input
101 # 1 file creation
102 # 2 errors and warnings
103 # 3 some systems may open it to /dev/tty
104 # 4 used on the Kubota Titan
105 # 6 checking for... messages and results
106 # 5 compiler messages saved in config.log
107 if test "$silent" = yes; then
108   exec 6>/dev/null
109 else
110   exec 6>&1
111 fi
112 exec 5>./config.log
113
114 echo "\
115 This file contains any messages produced by compilers while
116 running configure, to aid debugging if configure makes a mistake.
117 " 1>&5
118
119 # Strip out --no-create and --no-recursion so they do not pile up.
120 # Also quote any args containing shell metacharacters.
121 ac_configure_args=
122 for ac_arg
123 do
124   case "$ac_arg" in
125   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
126   | --no-cr | --no-c) ;;
127   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
128   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
129   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
130   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
131   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
132   esac
133 done
134
135 # NLS nuisances.
136 # Only set these to C if already set.  These must not be set unconditionally
137 # because not all systems understand e.g. LANG=C (notably SCO).
138 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
139 # Non-C LC_CTYPE values break the ctype check.
140 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
141 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
142 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
143 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
144
145 # confdefs.h avoids OS command line length limits that DEFS can exceed.
146 rm -rf conftest* confdefs.h
147 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
148 echo > confdefs.h
149
150 # A filename unique to this package, relative to the directory that
151 # configure is in, which we can look for to find out if srcdir is correct.
152 ac_unique_file=src/lisp.h
153
154 # Find the source files, if location was not specified.
155 if test -z "$srcdir"; then
156   ac_srcdir_defaulted=yes
157   # Try the directory containing this script, then its parent.
158   ac_prog=$0
159   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
160   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
161   srcdir=$ac_confdir
162   if test ! -r $srcdir/$ac_unique_file; then
163     srcdir=..
164   fi
165 else
166   ac_srcdir_defaulted=no
167 fi
168 if test ! -r $srcdir/$ac_unique_file; then
169   if test "$ac_srcdir_defaulted" = yes; then
170     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
171   else
172     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
173   fi
174 fi
175 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
176
177 # Prefer explicitly selected file to automatically selected ones.
178 if test -z "$CONFIG_SITE"; then
179   if test "x$prefix" != xNONE; then
180     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
181   else
182     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
183   fi
184 fi
185 for ac_site_file in $CONFIG_SITE; do
186   if test -r "$ac_site_file"; then
187     echo "loading site script $ac_site_file"
188     . "$ac_site_file"
189   fi
190 done
191
192
193 ac_ext=c
194 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
195 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
196 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
197 ac_cpp='$CPP '"$xe_cppflags"
198 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
199 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
200 cross_compiling=no
201
202 ac_exeext=
203 ac_objext=o
204 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
205   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
206   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
207     ac_n= ac_c='
208 ' ac_t='        '
209   else
210     ac_n=-n ac_c= ac_t=
211   fi
212 else
213   ac_n= ac_c='\c' ac_t=
214 fi
215
216
217 progname="`echo $0 | sed 's:^\./\./:\./:'`"
218
219
220 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
221 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
222
223 prefix='/usr/local'
224 exec_prefix='${prefix}'
225 bindir='${exec_prefix}/bin'
226 datadir='${prefix}/lib'
227 statedir='${prefix}/lib'
228 libdir='${exec_prefix}/lib'
229 mandir='${prefix}/man/man1'
230 infodir='${datadir}/${PROGNAME}-${version}/info'
231 infopath=''
232 install_pp=''
233 lispdir='${datadir}/${PROGNAME}-${version}/lisp'
234 moduledir='${datadir}/${PROGNAME}-${version}/${configuration}/modules'
235 sitelispdir='${datadir}/xemacs/site-lisp'
236 sitemoduledir='${datadir}/xemacs/site-modules'
237 pkgdir='${datadir}/${PROGNAME}-${version}/lisp'
238 package_path=''
239 etcdir='${datadir}/${PROGNAME}-${version}/etc'
240 lockdir='${statedir}/${PROGNAME}/lock'
241 archlibdir='${datadir}/${PROGNAME}-${version}/${configuration}'
242 with_site_lisp='no'
243 with_site_modules='yes'
244 with_menubars=''
245 with_scrollbars=''
246 with_dialogs=''
247 with_file_coding=''
248 cpp='' cppflags='' libs='' ldflags=''
249 dynamic=''
250 with_x11=''
251 with_msw=''
252 rel_alloc='default'
253 with_system_malloc='default'
254 with_dlmalloc='default'
255 native_sound_lib=''
256 use_assertions="yes"
257 with_toolbars=""
258 with_tty=""
259 use_union_type="no"
260 with_dnet=""
261
262
263
264
265 arguments="$@"
266
267 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
268 quoted_arguments=
269 for i in "$@"; do
270    case "$i" in
271    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
272    | --no-cr | --no-c) ;;
273    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
274    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
275    *)
276    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
277    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
278    esac
279 done
280
281 while test $# != 0; do
282   arg="$1"; shift
283   case "$arg" in
284     --no-create|--no-recursion) ;;
285         -* )
286             case "$arg" in
287         -*=*)
288           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
289           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
290           valomitted=no
291         ;;
292                                                                           -*)
293                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
294           val="yes" valomitted=yes
295         ;;
296       esac
297
298             optname="$opt"
299       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
300
301             case "${valomitted}-${opt}" in yes-without_* )
302         opt=`echo $opt | sed 's/without/with/'`
303         valomitted="no" val="no" ;;
304       esac
305
306             case "$opt" in
307
308         with_site_lisp  | \
309     with_site_modules | \
310         with_x          | \
311         with_x11        | \
312         with_msw        | \
313         with_gcc        | \
314         dynamic         | \
315         with_ncurses    | \
316         with_dnet       | \
317         with_socks      | \
318         with_dragndrop  | \
319         with_cde        | \
320         with_offix      | \
321         with_gpm        | \
322         with_xpm        | \
323         with_xface      | \
324         with_gif        | \
325         with_jpeg       | \
326         with_png        | \
327         with_tiff       | \
328         with_wmcommand  | \
329         with_xmu        | \
330         with_purify     | \
331         with_quantify   | \
332         with_toolbars   | \
333         with_tty        | \
334         with_xfs        | \
335         with_i18n3      | \
336         with_mule       | \
337         with_file_coding| \
338         with_canna      | \
339         with_wnn        | \
340         with_wnn6       | \
341         with_workshop   | \
342         with_sparcworks | \
343         with_tooltalk   | \
344         with_ldap       | \
345         with_pop        | \
346         with_kerberos   | \
347         with_hesiod     | \
348         with_dnet       | \
349         with_infodock   | \
350         external_widget | \
351         verbose         | \
352         extra_verbose   | \
353         const_is_losing | \
354         usage_tracking  | \
355         use_union_type  | \
356         debug           | \
357         use_assertions  | \
358         memory_usage_stats | \
359         with_clash_detection | \
360         with_shlib | \
361         no_doc_file )
362                   case "$val" in
363             y | ye | yes )      val=yes ;;
364             n | no )            val=no  ;;
365             * ) (echo "$progname: Usage error:"
366 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
367 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
368           esac
369           eval "$opt=\"$val\"" ;;
370
371
372                         srcdir          | \
373         compiler        | \
374         cflags          | \
375         cpp             | \
376         cppflags        | \
377         libs            | \
378         ldflags         | \
379         cache_file      | \
380         native_sound_lib| \
381         site_lisp       | \
382         x_includes      | \
383         x_libraries     | \
384         site_includes   | \
385         site_libraries  | \
386         site_prefixes   | \
387         site_runtime_libraries )
388                   if test "$valomitted" = "yes" ; then
389                     if test "$#" = 0 ; then
390               (echo "$progname: Usage error:"
391 echo " " "The \`--$optname' option requires a value."
392 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
393             fi
394             val="$1"; shift
395           fi
396           eval "$opt=\"$val\""
397         ;;
398
399                 rel_alloc | \
400         with_dlmalloc | \
401         with_debug_malloc  | use_debug_malloc | \
402         with_system_malloc | use_system_malloc )
403           case "$val" in
404             y | ye | yes )      val=yes ;;
405             n | no )            val=no  ;;
406             d | de | def | defa | defau | defaul | default ) val=default ;;
407             * ) (echo "$progname: Usage error:"
408 echo " " "The \`--$optname' option requires one of these values:
409   \`yes', \`no', or \`default'."
410 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
411           esac
412           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
413           eval "$opt=\"$val\""
414         ;;
415
416                 "with_database" )
417           with_database_berkdb=no
418           with_database_dbm=no
419           with_database_gnudbm=no
420           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
421             case "$x" in
422                 no ) ;;
423                 b | be | ber | berk | berkd | berkdb )  with_database_berkdb=yes ;;
424                 d | db | dbm )                          with_database_dbm=yes    ;;
425                 g | gn | gnu | gnud | gnudb | gnudbm )  with_database_gnudbm=yes ;;
426                 * ) (echo "$progname: Usage error:"
427 echo " " "The \`--$optname' option value
428   must be either \`no' or a comma-separated list
429   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
430 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
431             esac
432           done
433           if test "$with_database_dbm"    = "yes" -a \
434                   "$with_database_gnudbm" = "yes"; then
435           (echo "$progname: Usage error:"
436 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
437   with the \`--$optname' option."
438 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
439           fi
440         ;;
441
442                 "with_sound" )
443                           case "$val" in
444             y | ye | yes )                      val=native ;;
445             n | no | non | none )               val=no;;
446             na | nat | nati | nativ | native )  val=native  ;;
447             ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas  ;;
448             b | bo | bot | both )               val=both;;
449             * ) (echo "$progname: Usage error:"
450 echo " " "The \`--$optname' option must have one of these values:
451   \`native', \`nas', \`both', or \`none'."
452 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
453           esac
454           eval "$opt=\"$val\""
455         ;;
456
457                 "with_xim" )
458           case "$val" in
459             y | ye | yes )                val=yes   ;;
460             n | no | non | none )         val=no    ;;
461             x | xl | xli | xlib )         val=xlib  ;;
462             m | mo | mot | moti | motif ) val=motif ;;
463             * ) (echo "$progname: Usage error:"
464 echo " " "The \`--$optname' option must have one of these values:
465   \`motif', \`xlib', \`yes', or \`no'."
466 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
467           esac
468           eval "$opt=\"$val\""
469         ;;
470
471                 "mail_locking" )
472           case "$val" in
473             lockf )     val=lockf ;;
474             flock )     val=flock ;;
475             file )      val=file  ;;
476             * ) (echo "$progname: Usage error:"
477 echo " " "The \`--$optname' option must have one of these values:
478   \`lockf', \`flock', or \`file'."
479 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
480           esac
481           eval "$opt=\"$val\""
482         ;;
483
484                 "error_checking" )
485                           
486           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
487             case "$x" in
488                       n | no | non | none ) new_default=no ;;
489               a | al | all )        new_default=yes ;;
490
491               extents )       error_check_extents=yes ;;
492               noextents )     error_check_extents=no ;;
493
494               typecheck )     error_check_typecheck=yes ;;
495               notypecheck )   error_check_typecheck=no ;;
496
497               bufpos )        error_check_bufpos=yes ;;
498               nobufpos )      error_check_bufpos=no ;;
499
500               gc )            error_check_gc=yes ;;
501               nogc )          error_check_gc=no ;;
502
503               malloc )        error_check_malloc=yes ;;
504               nomalloc )      error_check_malloc=no ;;
505
506               byte_code )     error_check_byte_code=yes ;;
507               nobyte_code )   error_check_byte_code=no ;;
508
509               * ) bogus_error_check=yes ;;
510             esac
511             if test "$bogus_error_check" -o \
512                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
513                 if test "$error_check_default" = yes ; then
514                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
515                 else
516                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
517                 fi
518                 (echo "$progname: Usage error:"
519 echo " " "Valid types for the \`--$optname' option are:
520   $types."
521 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
522             elif test -n "$new_default" ; then
523                 error_check_extents=$new_default
524                 error_check_typecheck=$new_default
525                 error_check_bufpos=$new_default
526                 error_check_gc=$new_default
527                 error_check_malloc=$new_default
528                 error_check_byte_code=$new_default
529                 new_default=    # reset this
530             fi
531             echeck_notfirst=true
532           done
533         ;;
534
535                                 
536                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
537         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
538         archlibdir | docdir | package_path )
539                    if test "$valomitted" = "yes"; then
540              if test "$#" = 0; then
541                  (echo "$progname: Usage error:"
542 echo " " "The \`--$optname' option requires a value."
543 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
544              fi
545              val="$1"; shift
546            fi
547            eval "$opt=\"$val\""
548
549                            case "$opt" in
550              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
551     Defining LISPDIR_USER_DEFINED
552 EOF
553 cat >> confdefs.h <<\EOF
554 #define LISPDIR_USER_DEFINED 1
555 EOF
556 }
557  ;;
558              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
559     Defining SITELISPDIR_USER_DEFINED
560 EOF
561 cat >> confdefs.h <<\EOF
562 #define SITELISPDIR_USER_DEFINED 1
563 EOF
564 }
565  ;;
566              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
567     Defining MODULEDIR_USER_DEFINED
568 EOF
569 cat >> confdefs.h <<\EOF
570 #define MODULEDIR_USER_DEFINED 1
571 EOF
572 }
573  ;;
574              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
575     Defining ETCDIR_USER_DEFINED
576 EOF
577 cat >> confdefs.h <<\EOF
578 #define ETCDIR_USER_DEFINED 1
579 EOF
580 }
581  ;;
582              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
583     Defining INFODIR_USER_DEFINED
584 EOF
585 cat >> confdefs.h <<\EOF
586 #define INFODIR_USER_DEFINED 1
587 EOF
588 }
589  ;;
590              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
591     Defining INFOPATH_USER_DEFINED
592 EOF
593 cat >> confdefs.h <<\EOF
594 #define INFOPATH_USER_DEFINED 1
595 EOF
596 }
597  ;;
598              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
599     Defining PACKAGE_PATH_USER_DEFINED
600 EOF
601 cat >> confdefs.h <<\EOF
602 #define PACKAGE_PATH_USER_DEFINED 1
603 EOF
604 }
605  ;;
606              datadir )
607                 { test "$extra_verbose" = "yes" && cat << \EOF
608     Defining INFODIR_USER_DEFINED
609 EOF
610 cat >> confdefs.h <<\EOF
611 #define INFODIR_USER_DEFINED 1
612 EOF
613 }
614
615                 { test "$extra_verbose" = "yes" && cat << \EOF
616     Defining LISPDIR_USER_DEFINED
617 EOF
618 cat >> confdefs.h <<\EOF
619 #define LISPDIR_USER_DEFINED 1
620 EOF
621 }
622
623             { test "$extra_verbose" = "yes" && cat << \EOF
624     Defining MODULEDIR_USER_DEFINED
625 EOF
626 cat >> confdefs.h <<\EOF
627 #define MODULEDIR_USER_DEFINED 1
628 EOF
629 }
630
631                 { test "$extra_verbose" = "yes" && cat << \EOF
632     Defining ETCDIR_USER_DEFINED
633 EOF
634 cat >> confdefs.h <<\EOF
635 #define ETCDIR_USER_DEFINED 1
636 EOF
637 }
638  ;;
639              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
640     Defining LOCKDIR_USER_DEFINED
641 EOF
642 cat >> confdefs.h <<\EOF
643 #define LOCKDIR_USER_DEFINED 1
644 EOF
645 }
646  ;;
647              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
648     Defining ARCHLIBDIR_USER_DEFINED
649 EOF
650 cat >> confdefs.h <<\EOF
651 #define ARCHLIBDIR_USER_DEFINED 1
652 EOF
653 }
654  ;;
655            esac
656         ;;
657
658                 "no_create" ) ;;
659
660                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
661
662                 "with_menubars"   | \
663         "with_scrollbars" | \
664         "with_dialogs" )
665           case "$val" in
666             l | lu | luc | luci | lucid )               val=lucid  ;;
667             m | mo | mot | moti | motif )               val=motif  ;;
668             athena3d | athena-3d )                      val=athena3d ;;
669             a | at | ath | athe | athen | athena )      val=athena ;;
670             n | no | non | none )                       val=no ;;
671             * ) (echo "$progname: Usage error:"
672 echo " " "The \`--$optname' option must have one of these values:
673   \`lucid', \`motif', \`athena', \`athena3d', or \`no'."
674 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
675           esac
676           eval "$opt=\"$val\""
677         ;;
678
679                 "run_in_place"  | \
680         "with_gnu_make" )
681           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
682         ;;
683
684                 * ) (echo "$progname: Usage error:"
685 echo " " "Unrecognized option: $arg"
686 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
687
688       esac
689     ;;
690
691         *-*-*) configuration="$arg" ;;
692
693         *) (echo "$progname: Usage error:"
694 echo " " "Unrecognized argument: $arg"
695 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
696
697   esac
698 done
699
700
701 test -n "$cpp"      && CPP="$cpp"
702 test -n "$cppflags" && CPPFLAGS="$cppflags"
703 test -n "$libs"     && LIBS="$libs"
704 test -n "$ldflags"  && LDFLAGS="$ldflags"
705
706 eval set x "$quoted_arguments"; shift
707
708 test "$extra_verbose" = "yes" && verbose=yes
709
710 test -n "$with_x" && with_x11="$with_x"
711
712 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
713   test "$with_system_malloc" = "default" && with_system_malloc=yes
714 fi
715
716
717
718 if test "$with_cde $with_tooltalk" = "yes no"; then
719   (echo "$progname: Usage error:"
720 echo " " "--with-cde requires --with-tooltalk"
721 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
722 elif test "$with_tooltalk" = "no" ; then with_cde=no
723 elif test "$with_cde" = "yes"; then with_tooltalk=yes
724 fi
725
726
727 case "$srcdir" in
728
729     "" )
730     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
731       if test -f "$dir/src/lisp.h" -a \
732               -f "$dir/lisp/version.el" ; then
733         srcdir="$dir"
734         break
735       fi
736     done
737     if test -z "$srcdir" ; then
738       (echo "$progname: Usage error:"
739 echo " " "Neither the current directory nor its parent seem to
740   contain the XEmacs sources.  If you do not want to build XEmacs in its
741   source tree, you should run \`$progname' in the directory in which
742   you wish to build XEmacs, using the \`--srcdir' option to say where the
743   sources may be found."
744 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
745     fi
746   ;;
747
748     * )
749     if test ! -f "$srcdir/src/lisp.h" -o \
750             ! -f "$srcdir/lisp/version.el" ; then
751       (echo "$progname: Usage error:"
752 echo " " "The directory specified with the \`--srcdir' option,
753   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
754   either run the \`$progname' script at the top of the XEmacs source
755   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
756 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
757     fi
758   ;;
759 esac
760
761 if test -z "$configuration"; then
762     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
763   if test -z "$configuration"; then
764     (echo "$progname: Usage error:"
765 echo " " "XEmacs has not been ported to this host type.
766 Try explicitly specifying the CONFIGURATION when rerunning configure."
767 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
768   fi
769 fi
770
771 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
772 echo "configure:773: checking whether ln -s works" >&5
773
774 rm -f conftestdata
775 if ln -s X conftestdata 2>/dev/null
776 then
777   rm -f conftestdata
778   ac_cv_prog_LN_S="ln -s"
779 else
780   ac_cv_prog_LN_S=ln
781 fi
782 LN_S="$ac_cv_prog_LN_S"
783 if test "$ac_cv_prog_LN_S" = "ln -s"; then
784   echo "$ac_t""yes" 1>&6
785 else
786   echo "$ac_t""no" 1>&6
787 fi
788
789
790 for dir in lisp etc man info; do
791   if test ! -d "$dir" ; then
792     echo Making symbolic link to "$srcdir/$dir"
793     ${LN_S} "$srcdir/$dir" "$dir"
794   fi
795 done
796
797
798 absolute_pwd="`pwd`";
799 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
800 then blddir="$PWD"
801 else blddir="$absolute_pwd"; if test -d "/net"; then
802   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
803   blddir=`echo "$blddir" | \
804    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
805 fi
806 fi
807
808
809 case "$srcdir" in
810   /* ) ;;
811   .  ) srcdir="$blddir" ;;
812   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
813   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
814   srcdir=`echo "$srcdir" | \
815    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
816 fi ;;
817 esac
818
819 if test `pwd` != `sh -c cd $srcdir && pwd`  \
820    && test -f "$srcdir/src/config.h"; then
821   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
822    echo "   as a build directory right now; it has been configured in its own"
823    echo "   right.  To configure in another directory as well, you MUST"
824    echo "   use GNU make.  If you do not have GNU make, then you must"
825    echo "   now do \`make distclean' in $srcdir,"
826    echo "   and then run $progname again.") >&2
827   extrasub='/^VPATH[     ]*=/c\
828 vpath %.c $(srcdir)\
829 vpath %.h $(srcdir)\
830 vpath %.y $(srcdir)\
831 vpath %.l $(srcdir)\
832 vpath %.s $(srcdir)\
833 vpath %.in $(srcdir)'
834 fi
835
836 . "$srcdir/version.sh" || exit 1;
837 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
838 : "${extra_verbose=$beta}"
839 version="${emacs_major_version}.${emacs_minor_version}"
840 { test "$extra_verbose" = "yes" && cat << EOF
841     Defining EMACS_MAJOR_VERSION = $emacs_major_version
842 EOF
843 cat >> confdefs.h <<EOF
844 #define EMACS_MAJOR_VERSION $emacs_major_version
845 EOF
846 }
847
848 { test "$extra_verbose" = "yes" && cat << EOF
849     Defining EMACS_MINOR_VERSION = $emacs_minor_version
850 EOF
851 cat >> confdefs.h <<EOF
852 #define EMACS_MINOR_VERSION $emacs_minor_version
853 EOF
854 }
855
856 if test -n "$emacs_beta_version" ; then
857   if test "$beta" = "yes"; then
858         version="${version}-b${emacs_beta_version}"
859         { test "$extra_verbose" = "yes" && cat << EOF
860     Defining EMACS_BETA_VERSION = $emacs_beta_version
861 EOF
862 cat >> confdefs.h <<EOF
863 #define EMACS_BETA_VERSION $emacs_beta_version
864 EOF
865 }
866
867   else
868         version="${version}.${emacs_beta_version}"
869         { test "$extra_verbose" = "yes" && cat << EOF
870     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
871 EOF
872 cat >> confdefs.h <<EOF
873 #define EMACS_PATCH_LEVEL $emacs_beta_version
874 EOF
875 }
876
877   fi
878 fi
879 { test "$extra_verbose" = "yes" && cat << EOF
880     Defining XEMACS_CODENAME = "$xemacs_codename"
881 EOF
882 cat >> confdefs.h <<EOF
883 #define XEMACS_CODENAME "$xemacs_codename"
884 EOF
885 }
886
887 { test "$extra_verbose" = "yes" && cat << EOF
888     Defining EMACS_VERSION = "$version"
889 EOF
890 cat >> confdefs.h <<EOF
891 #define EMACS_VERSION "$version"
892 EOF
893 }
894
895
896 if test "$with_infodock" = "yes"; then
897   if test ! -f ../ID-INSTALL; then
898     echo "Cannot build InfoDock without InfoDock sources"
899     with_infodock=no
900   fi
901 fi
902
903 if test "$with_infodock" = "yes"; then
904       { test "$extra_verbose" = "yes" && cat << EOF
905     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
906 EOF
907 cat >> confdefs.h <<EOF
908 #define INFODOCK_MAJOR_VERSION $infodock_major_version
909 EOF
910 }
911
912   { test "$extra_verbose" = "yes" && cat << EOF
913     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
914 EOF
915 cat >> confdefs.h <<EOF
916 #define INFODOCK_MINOR_VERSION $infodock_minor_version
917 EOF
918 }
919
920   { test "$extra_verbose" = "yes" && cat << EOF
921     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
922 EOF
923 cat >> confdefs.h <<EOF
924 #define INFODOCK_BUILD_VERSION $infodock_build_version
925 EOF
926 }
927
928   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
929   PROGNAME=infodock
930   CPPFLAGS="$CPPFLAGS -DINFODOCK"
931 else
932   PROGNAME=xemacs
933 fi
934
935 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
936 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
937     Defining ERROR_CHECK_EXTENTS
938 EOF
939 cat >> confdefs.h <<\EOF
940 #define ERROR_CHECK_EXTENTS 1
941 EOF
942 }
943
944 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
945     Defining ERROR_CHECK_TYPECHECK
946 EOF
947 cat >> confdefs.h <<\EOF
948 #define ERROR_CHECK_TYPECHECK 1
949 EOF
950 }
951
952 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
953     Defining ERROR_CHECK_BUFPOS
954 EOF
955 cat >> confdefs.h <<\EOF
956 #define ERROR_CHECK_BUFPOS 1
957 EOF
958 }
959
960 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
961     Defining ERROR_CHECK_GC
962 EOF
963 cat >> confdefs.h <<\EOF
964 #define ERROR_CHECK_GC 1
965 EOF
966 }
967
968 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
969     Defining ERROR_CHECK_MALLOC
970 EOF
971 cat >> confdefs.h <<\EOF
972 #define ERROR_CHECK_MALLOC 1
973 EOF
974 }
975
976 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
977     Defining ERROR_CHECK_BYTE_CODE
978 EOF
979 cat >> confdefs.h <<\EOF
980 #define ERROR_CHECK_BYTE_CODE 1
981 EOF
982 }
983
984 if test "${debug:=$beta}" = "yes"; then
985   use_assertions=yes memory_usage_stats=yes
986   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
987    echo "    xemacs will be linked with \"debug.o\""
988  fi
989   { test "$extra_verbose" = "yes" && cat << \EOF
990     Defining DEBUG_XEMACS
991 EOF
992 cat >> confdefs.h <<\EOF
993 #define DEBUG_XEMACS 1
994 EOF
995 }
996
997 fi
998 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
999     Defining USE_ASSERTIONS
1000 EOF
1001 cat >> confdefs.h <<\EOF
1002 #define USE_ASSERTIONS 1
1003 EOF
1004 }
1005
1006 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1007     Defining MEMORY_USAGE_STATS
1008 EOF
1009 cat >> confdefs.h <<\EOF
1010 #define MEMORY_USAGE_STATS 1
1011 EOF
1012 }
1013
1014
1015
1016 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1017 echo "configure:1018: checking "host system type"" >&5
1018 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1019 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1020 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1021 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1022 echo "$ac_t""$configuration" 1>&6
1023
1024
1025
1026
1027
1028 machine='' opsys=''
1029
1030 case "$canonical" in
1031   sparc-*-*        ) machine=sparc ;;
1032   alpha*-*-*       ) machine=alpha ;;
1033   vax-*-*          ) machine=vax ;;
1034   mips-dec-*       ) machine=pmax ;;
1035   mips-sgi-*       ) machine=iris4d ;;
1036   romp-ibm-*       ) machine=ibmrt ;;
1037   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1038   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1039   powerpc*-*       ) machine=powerpc ;;
1040   hppa-*-*         ) machine=hp800 ;;
1041   m88k-dg-*        ) machine=aviion ;;
1042   m68*-sony-*      ) machine=news ;;
1043   mips-sony-*      ) machine=news-risc ;;
1044   clipper-*        ) machine=clipper ;;
1045   arm-*            ) machine=arm ;;
1046   ns32k-*          ) machine=ns32000 ;;
1047 esac
1048
1049 case "$canonical" in
1050   *-*-linux*    ) opsys=linux ;;
1051   *-*-netbsd*   ) opsys=netbsd ;;
1052   *-*-openbsd*  ) opsys=openbsd ;;
1053   *-*-nextstep* ) opsys=nextstep ;;
1054   *-*-vms       ) opsys=vms ;;
1055
1056     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1057   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1058   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1059   *-dec-osf3*                ) opsys=decosf3-1 ;;
1060   *-dec-osf4*                ) opsys=decosf4-0 ;;
1061
1062     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1063   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1064   *-*-ultrix* )         opsys=ultrix4-3 ;;
1065
1066     *-*-aix3.1*  ) opsys=aix3-1 ;;
1067   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1068   *-*-aix3*    ) opsys=aix3-2   ;;
1069   *-*-aix4.0*  ) opsys=aix4     ;;
1070   *-*-aix4.1*  ) opsys=aix4-1   ;;
1071   *-*-aix4*    ) opsys=aix4-2   ;;
1072
1073     *-gnu* )                    opsys=gnu    ;;
1074   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1075   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1076   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1077   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1078   *-*-aos*   )                  opsys=bsd4-3 ;;
1079   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1080   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1081   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1082   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1083   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1084   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1085         if test -z "$NON_GNU_CPP" ; then
1086           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1087             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1088           done
1089         fi
1090         opsys=usg5-4-2 ;;
1091     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1092     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1093 esac
1094
1095 case "$canonical" in
1096
1097     *-*-netbsd* )
1098     case "$canonical" in
1099       i[3-9]86-*-netbsd*) machine=intel386 ;;
1100       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1101                                             machine=hp9000s300 ;;
1102       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1103       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1104     esac
1105   ;;
1106
1107     *-*-openbsd* )
1108     case "${canonical}" in
1109       i386-*-openbsd*)          machine=intel386 ;;
1110       m68k-*-openbsd*)          machine=hp9000s300 ;;
1111       mipsel-*-openbsd*)        machine=pmax ;;
1112      esac
1113    ;;
1114
1115     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1116   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1117
1118     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1119   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1120
1121     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1122
1123     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1124
1125     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1126
1127     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1128
1129     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1130
1131     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1132   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1133   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1134
1135   
1136     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1137
1138     *-convex-bsd* | *-convex-convexos* )
1139     machine=convex opsys=bsd4-3
1140     NON_GNU_CPP="cc -E -P"
1141   ;;
1142
1143     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1144
1145     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1146   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1147   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1148   m88k-dg-dgux*                           ) opsys=dgux     ;;
1149
1150     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1151   m88k-motorola-sysv4* )
1152                     machine=delta88k opsys=usg5-4-2
1153   ;;
1154   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1155
1156     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1157   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1158
1159     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1160
1161     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1162   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1163   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1164
1165       m88k-harris-cxux* )
1166         case "`uname -r`" in
1167        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1168        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1169     esac
1170     NON_GNU_CPP="/lib/cpp"
1171   ;;
1172     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1173     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1174
1175     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1176
1177     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1178
1179     *-hp-hpux* )
1180         case "$canonical" in
1181       m68*  ) machine=hp9000s300 ;;
1182       hppa* ) machine=hp800      ;;
1183     esac
1184
1185     case "$canonical" in
1186       *-hp-hpux7*  )  opsys=hpux   ;;
1187       *-hp-hpux8*  )  opsys=hpux8  ;;
1188       *-hp-hpux9*  )  opsys=hpux9  ;;
1189       *-hp-hpux10* )  opsys=hpux10 ;;
1190       *-hp-hpux11* )  opsys=hpux11 ;;
1191       *            )  opsys=hpux   ;;
1192     esac
1193
1194         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1195    echo "    xemacs will be linked with \"strcat.o\""
1196  fi ;; esac
1197
1198     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1199         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1200     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1201
1202     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1203   ;;
1204
1205     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1206   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1207
1208     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1209   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1210   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1211   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1212   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1213   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1214
1215     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1216   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1217
1218     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1219
1220     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1221
1222     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1223
1224     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1225
1226       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1227
1228     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1229
1230     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1231
1232     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1233
1234     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1235
1236         mips-mips-usg* ) machine=mips4 ;;
1237   mips-mips-riscos4 )
1238     machine=mips4
1239     NON_GNU_CC="cc -systype bsd43"
1240     NON_GNU_CPP="cc -systype bsd43 -E"
1241     case "$canonical" in
1242       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1243       mips-mips-riscos5* ) opsys=riscos5 ;;
1244     esac
1245   ;;
1246   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1247   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1248
1249     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1250
1251     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1252
1253     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1254   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1255
1256     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1257
1258     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1259
1260     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1261
1262     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1263
1264     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1265   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1266
1267     mips-siemens-sysv* | mips-sni-sysv*)
1268     machine=mips-siemens opsys=usg5-4
1269     NON_GNU_CC=/usr/ccs/bin/cc
1270     NON_GNU_CPP=/usr/ccs/lib/cpp
1271   ;;
1272
1273     mips-nec-sysv*)
1274     machine=mips-nec
1275     NON_GNU_CC=/usr/ccs/bin/cc
1276     NON_GNU_CPP=/usr/ccs/lib/cpp
1277   ;;
1278
1279       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1280   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1281     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1282   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1283   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1284   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1285   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1286   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1287   mips-sgi-irix*      ) opsys=irix5-0 ;;
1288
1289     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1290   *-sony-news* ) opsys=newsos5 ;;
1291
1292     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1293
1294     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1295         case "$canonical" in
1296       m68*-sunos1* )             machine=sun1     ;;
1297       m68*-sunos2* )             machine=sun2     ;;
1298       m68* )                     machine=sun3     ;;
1299       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1300       i*86-*-* )                 machine=intel386 ;;
1301       rs6000* )                  machine=rs6000   ;;
1302     esac
1303
1304         case "$canonical" in *-sunos5*)
1305       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1306     esac
1307
1308                     case "$canonical" in
1309       *-sunos4* )
1310         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1311         : ;;
1312       *-solaris2* )
1313         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1314         RANLIB=':' ;;
1315     esac
1316
1317     case "$canonical" in
1318       *-solaris*          )
1319         opsys=sol2
1320         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1321         { test "$extra_verbose" = "yes" && cat << EOF
1322     Defining OS_RELEASE = $os_release
1323 EOF
1324 cat >> confdefs.h <<EOF
1325 #define OS_RELEASE $os_release
1326 EOF
1327 }
1328  ;;
1329
1330             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1331       *-sunos4.0*         ) opsys=sunos4-0      ;;
1332       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1333       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1334       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1335       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1336       *-mach*             ) opsys=mach-bsd4-3   ;;
1337       *                   ) opsys=bsd4-2        ;;
1338     esac
1339
1340     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1341
1342         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1343   ;;
1344
1345     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1346
1347     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1348   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1349
1350     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1351
1352     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1353
1354     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1355       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1356
1357     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1358
1359     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1360
1361     vax-dec-* )
1362     case "$canonical" in
1363       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1364       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1365       *-mach* )                         opsys=mach-bsd4-3 ;;
1366     esac
1367   ;;
1368
1369     ns16k-whitechapel-* ) machine=mg1 ;;
1370
1371     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1372
1373     i[3-9]86-*-* )
1374     machine=intel386
1375     case "$canonical" in
1376       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1377       *-isc2.2* )               opsys=isc2-2 ;;
1378       *-isc4.0* )               opsys=isc4-0 ;;
1379       *-isc4.* )                opsys=isc4-1
1380                                 GCC_TEST_OPTIONS=-posix
1381                                 NON_GCC_TEST_OPTIONS=-Xp
1382                                 ;;
1383       *-isc* )                  opsys=isc3-0 ;;
1384       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1385       *-esix* )                 opsys=esix ;;
1386       *-mach* )                 opsys=mach-bsd4-3 ;;
1387       *-xenix* )                opsys=xenix ;;
1388       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1389       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1390       *-bsdi4* )                opsys=bsdos4 ;;
1391       *-bsdi3* )                opsys=bsdos3 ;;
1392       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1393       *-bsdi2* )                opsys=bsdos2 ;;
1394       *-sco3.2v5* )             opsys=sco5 ;
1395                                                         if test "$dynamic" = "yes" ; then
1396                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1397         else
1398                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1399         fi ;;
1400       *-386bsd* )               opsys=386bsd ;;
1401       *-freebsd* )              opsys=freebsd ;;
1402       *-nextstep* )             opsys=nextstep ;;
1403       *-pc-cygwin* )            opsys=cygwin32 ;;
1404       *-pc-mingw* )             opsys=mingw32 ;
1405                                 test -z "$with_tty" && with_tty="no";;
1406           esac
1407   ;;
1408
1409     m68k-*-linux* ) machine=m68k opsys=linux ;;
1410
1411 esac
1412
1413 if test -z "$machine" -o -z "$opsys"; then
1414   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1415    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1416   ) >&2
1417   exit 1
1418 fi
1419
1420 if test -z "$dynamic"; then
1421   case "$opsys" in
1422     hpux* | sunos4* ) dynamic=no ;;
1423     *) dynamic=yes ;;
1424   esac
1425 fi
1426 if test "$dynamic" = "yes"; then
1427   case "$opsys" in
1428     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1429     decosf* ) ld_call_shared="-call_shared" ;;
1430   esac
1431 else   case "$opsys" in
1432     sol2 )
1433       echo "Static linking is not supported on Solaris 2."
1434       echo "Rerun configure without specifying --dynamic=no."
1435       exit 1 ;;
1436     linux   ) ld_call_shared="-Bstatic" ;;
1437     decosf* ) ld_call_shared="-non_shared" ;;
1438   esac
1439 fi
1440
1441 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1442
1443 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1444 { test "$extra_verbose" = "yes" && cat << EOF
1445     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1446 EOF
1447 cat >> confdefs.h <<EOF
1448 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1449 EOF
1450 }
1451
1452
1453 machfile="m/${machine}.h"
1454 opsysfile="s/${opsys}.h"
1455
1456
1457 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1458 if test "$with_workshop $with_tooltalk" = "yes no"; then
1459   (echo "$progname: Usage error:"
1460 echo " " "--with-workshop requires --with-tooltalk"
1461 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1462 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1463 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1464 fi
1465
1466 if test "$with_workshop" = "yes"; then
1467   { test "$extra_verbose" = "yes" && cat << \EOF
1468     Defining SUNPRO
1469 EOF
1470 cat >> confdefs.h <<\EOF
1471 #define SUNPRO 1
1472 EOF
1473 }
1474
1475   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1476    echo "    xemacs will be linked with \"sunpro.o\""
1477  fi
1478 fi
1479
1480 if test "$with_clash_detection" = "yes"; then
1481   { test "$extra_verbose" = "yes" && cat << \EOF
1482     Defining CLASH_DETECTION
1483 EOF
1484 cat >> confdefs.h <<\EOF
1485 #define CLASH_DETECTION 1
1486 EOF
1487 }
1488
1489   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1490    echo "    xemacs will be linked with \"filelock.o\""
1491  fi
1492 fi
1493
1494 test -n "$compiler" && CC="$compiler"
1495 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1496 fi
1497
1498 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1499 if test "${CFLAGS-unset}" != unset
1500   then cflags_specified=yes;
1501   else cflags_specified=no;
1502 fi
1503
1504 xe_save_CFLAGS="$CFLAGS"
1505
1506 # Extract the first word of "gcc", so it can be a program name with args.
1507 set dummy gcc; ac_word=$2
1508 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1509 echo "configure:1510: checking for $ac_word" >&5
1510
1511 if test -n "$CC"; then
1512   ac_cv_prog_CC="$CC" # Let the user override the test.
1513 else
1514   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1515   ac_dummy="$PATH"
1516   for ac_dir in $ac_dummy; do
1517     test -z "$ac_dir" && ac_dir=.
1518     if test -f $ac_dir/$ac_word; then
1519       ac_cv_prog_CC="gcc"
1520       break
1521     fi
1522   done
1523   IFS="$ac_save_ifs"
1524 fi
1525 CC="$ac_cv_prog_CC"
1526 if test -n "$CC"; then
1527   echo "$ac_t""$CC" 1>&6
1528 else
1529   echo "$ac_t""no" 1>&6
1530 fi
1531
1532 if test -z "$CC"; then
1533   # Extract the first word of "cc", so it can be a program name with args.
1534 set dummy cc; ac_word=$2
1535 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1536 echo "configure:1537: checking for $ac_word" >&5
1537
1538 if test -n "$CC"; then
1539   ac_cv_prog_CC="$CC" # Let the user override the test.
1540 else
1541   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1542   ac_prog_rejected=no
1543   ac_dummy="$PATH"
1544   for ac_dir in $ac_dummy; do
1545     test -z "$ac_dir" && ac_dir=.
1546     if test -f $ac_dir/$ac_word; then
1547       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1548         ac_prog_rejected=yes
1549         continue
1550       fi
1551       ac_cv_prog_CC="cc"
1552       break
1553     fi
1554   done
1555   IFS="$ac_save_ifs"
1556 if test $ac_prog_rejected = yes; then
1557   # We found a bogon in the path, so make sure we never use it.
1558   set dummy $ac_cv_prog_CC
1559   shift
1560   if test $# -gt 0; then
1561     # We chose a different compiler from the bogus one.
1562     # However, it has the same basename, so the bogon will be chosen
1563     # first if we set CC to just the basename; use the full file name.
1564     shift
1565     set dummy "$ac_dir/$ac_word" "$@"
1566     shift
1567     ac_cv_prog_CC="$@"
1568   fi
1569 fi
1570 fi
1571 CC="$ac_cv_prog_CC"
1572 if test -n "$CC"; then
1573   echo "$ac_t""$CC" 1>&6
1574 else
1575   echo "$ac_t""no" 1>&6
1576 fi
1577
1578   if test -z "$CC"; then
1579     case "`uname -s`" in
1580     *win32* | *WIN32*)
1581       # Extract the first word of "cl", so it can be a program name with args.
1582 set dummy cl; ac_word=$2
1583 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1584 echo "configure:1585: checking for $ac_word" >&5
1585
1586 if test -n "$CC"; then
1587   ac_cv_prog_CC="$CC" # Let the user override the test.
1588 else
1589   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1590   ac_dummy="$PATH"
1591   for ac_dir in $ac_dummy; do
1592     test -z "$ac_dir" && ac_dir=.
1593     if test -f $ac_dir/$ac_word; then
1594       ac_cv_prog_CC="cl"
1595       break
1596     fi
1597   done
1598   IFS="$ac_save_ifs"
1599 fi
1600 CC="$ac_cv_prog_CC"
1601 if test -n "$CC"; then
1602   echo "$ac_t""$CC" 1>&6
1603 else
1604   echo "$ac_t""no" 1>&6
1605 fi
1606  ;;
1607     esac
1608   fi
1609   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1610 fi
1611
1612 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1613 echo "configure:1614: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1614
1615 ac_ext=c
1616 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1617 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1618 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1619 ac_cpp='$CPP '"$xe_cppflags"
1620 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1621 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1622 cross_compiling=no
1623
1624 cat > conftest.$ac_ext << EOF
1625
1626 #line 1627 "configure"
1627 #include "confdefs.h"
1628
1629 main(){return(0);}
1630 EOF
1631 if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1632   ac_cv_prog_cc_works=yes
1633   # If we can't run a trivial program, we are probably using a cross compiler.
1634   if (./conftest; exit) 2>/dev/null; then
1635     ac_cv_prog_cc_cross=no
1636   else
1637     ac_cv_prog_cc_cross=yes
1638   fi
1639 else
1640   echo "configure: failed program was:" >&5
1641   cat conftest.$ac_ext >&5
1642   ac_cv_prog_cc_works=no
1643 fi
1644 rm -fr conftest*
1645 ac_ext=c
1646 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1647 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1648 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1649 ac_cpp='$CPP '"$xe_cppflags"
1650 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1651 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1652 cross_compiling=no
1653
1654 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1655 if test $ac_cv_prog_cc_works = no; then
1656   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1657 fi
1658 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1659 echo "configure:1660: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1660 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1661 cross_compiling=$ac_cv_prog_cc_cross
1662
1663 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1664 echo "configure:1665: checking whether we are using GNU C" >&5
1665
1666 cat > conftest.c <<EOF
1667 #ifdef __GNUC__
1668   yes;
1669 #endif
1670 EOF
1671 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1672   ac_cv_prog_gcc=yes
1673 else
1674   ac_cv_prog_gcc=no
1675 fi
1676
1677 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1678
1679 if test $ac_cv_prog_gcc = yes; then
1680   GCC=yes
1681 else
1682   GCC=
1683 fi
1684
1685 ac_test_CFLAGS="${CFLAGS+set}"
1686 ac_save_CFLAGS="$CFLAGS"
1687 CFLAGS=
1688 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1689 echo "configure:1690: checking whether ${CC-cc} accepts -g" >&5
1690
1691 echo 'void f(){}' > conftest.c
1692 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1693   ac_cv_prog_cc_g=yes
1694 else
1695   ac_cv_prog_cc_g=no
1696 fi
1697 rm -f conftest*
1698
1699
1700 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1701 if test "$ac_test_CFLAGS" = set; then
1702   CFLAGS="$ac_save_CFLAGS"
1703 elif test $ac_cv_prog_cc_g = yes; then
1704   if test "$GCC" = yes; then
1705     CFLAGS="-g -O2"
1706   else
1707     CFLAGS="-g"
1708   fi
1709 else
1710   if test "$GCC" = yes; then
1711     CFLAGS="-O2"
1712   else
1713     CFLAGS=
1714   fi
1715 fi
1716  
1717 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1718   CC=${NON_GNU_CC-cc}
1719   # Extract the first word of "gcc", so it can be a program name with args.
1720 set dummy gcc; ac_word=$2
1721 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1722 echo "configure:1723: checking for $ac_word" >&5
1723
1724 if test -n "$CC"; then
1725   ac_cv_prog_CC="$CC" # Let the user override the test.
1726 else
1727   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1728   ac_dummy="$PATH"
1729   for ac_dir in $ac_dummy; do
1730     test -z "$ac_dir" && ac_dir=.
1731     if test -f $ac_dir/$ac_word; then
1732       ac_cv_prog_CC="gcc"
1733       break
1734     fi
1735   done
1736   IFS="$ac_save_ifs"
1737 fi
1738 CC="$ac_cv_prog_CC"
1739 if test -n "$CC"; then
1740   echo "$ac_t""$CC" 1>&6
1741 else
1742   echo "$ac_t""no" 1>&6
1743 fi
1744
1745 if test -z "$CC"; then
1746   # Extract the first word of "cc", so it can be a program name with args.
1747 set dummy cc; ac_word=$2
1748 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1749 echo "configure:1750: checking for $ac_word" >&5
1750
1751 if test -n "$CC"; then
1752   ac_cv_prog_CC="$CC" # Let the user override the test.
1753 else
1754   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1755   ac_prog_rejected=no
1756   ac_dummy="$PATH"
1757   for ac_dir in $ac_dummy; do
1758     test -z "$ac_dir" && ac_dir=.
1759     if test -f $ac_dir/$ac_word; then
1760       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1761         ac_prog_rejected=yes
1762         continue
1763       fi
1764       ac_cv_prog_CC="cc"
1765       break
1766     fi
1767   done
1768   IFS="$ac_save_ifs"
1769 if test $ac_prog_rejected = yes; then
1770   # We found a bogon in the path, so make sure we never use it.
1771   set dummy $ac_cv_prog_CC
1772   shift
1773   if test $# -gt 0; then
1774     # We chose a different compiler from the bogus one.
1775     # However, it has the same basename, so the bogon will be chosen
1776     # first if we set CC to just the basename; use the full file name.
1777     shift
1778     set dummy "$ac_dir/$ac_word" "$@"
1779     shift
1780     ac_cv_prog_CC="$@"
1781   fi
1782 fi
1783 fi
1784 CC="$ac_cv_prog_CC"
1785 if test -n "$CC"; then
1786   echo "$ac_t""$CC" 1>&6
1787 else
1788   echo "$ac_t""no" 1>&6
1789 fi
1790
1791   if test -z "$CC"; then
1792     case "`uname -s`" in
1793     *win32* | *WIN32*)
1794       # Extract the first word of "cl", so it can be a program name with args.
1795 set dummy cl; ac_word=$2
1796 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1797 echo "configure:1798: checking for $ac_word" >&5
1798
1799 if test -n "$CC"; then
1800   ac_cv_prog_CC="$CC" # Let the user override the test.
1801 else
1802   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1803   ac_dummy="$PATH"
1804   for ac_dir in $ac_dummy; do
1805     test -z "$ac_dir" && ac_dir=.
1806     if test -f $ac_dir/$ac_word; then
1807       ac_cv_prog_CC="cl"
1808       break
1809     fi
1810   done
1811   IFS="$ac_save_ifs"
1812 fi
1813 CC="$ac_cv_prog_CC"
1814 if test -n "$CC"; then
1815   echo "$ac_t""$CC" 1>&6
1816 else
1817   echo "$ac_t""no" 1>&6
1818 fi
1819  ;;
1820     esac
1821   fi
1822   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1823 fi
1824
1825 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1826 echo "configure:1827: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1827
1828 ac_ext=c
1829 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1830 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1831 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1832 ac_cpp='$CPP '"$xe_cppflags"
1833 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1834 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1835 cross_compiling=no
1836
1837 cat > conftest.$ac_ext << EOF
1838
1839 #line 1840 "configure"
1840 #include "confdefs.h"
1841
1842 main(){return(0);}
1843 EOF
1844 if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1845   ac_cv_prog_cc_works=yes
1846   # If we can't run a trivial program, we are probably using a cross compiler.
1847   if (./conftest; exit) 2>/dev/null; then
1848     ac_cv_prog_cc_cross=no
1849   else
1850     ac_cv_prog_cc_cross=yes
1851   fi
1852 else
1853   echo "configure: failed program was:" >&5
1854   cat conftest.$ac_ext >&5
1855   ac_cv_prog_cc_works=no
1856 fi
1857 rm -fr conftest*
1858 ac_ext=c
1859 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1860 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1861 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1862 ac_cpp='$CPP '"$xe_cppflags"
1863 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1864 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1865 cross_compiling=no
1866
1867 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1868 if test $ac_cv_prog_cc_works = no; then
1869   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1870 fi
1871 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1872 echo "configure:1873: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1873 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1874 cross_compiling=$ac_cv_prog_cc_cross
1875
1876 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1877 echo "configure:1878: checking whether we are using GNU C" >&5
1878
1879 cat > conftest.c <<EOF
1880 #ifdef __GNUC__
1881   yes;
1882 #endif
1883 EOF
1884 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1885   ac_cv_prog_gcc=yes
1886 else
1887   ac_cv_prog_gcc=no
1888 fi
1889
1890 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1891
1892 if test $ac_cv_prog_gcc = yes; then
1893   GCC=yes
1894 else
1895   GCC=
1896 fi
1897
1898 ac_test_CFLAGS="${CFLAGS+set}"
1899 ac_save_CFLAGS="$CFLAGS"
1900 CFLAGS=
1901 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1902 echo "configure:1903: checking whether ${CC-cc} accepts -g" >&5
1903
1904 echo 'void f(){}' > conftest.c
1905 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1906   ac_cv_prog_cc_g=yes
1907 else
1908   ac_cv_prog_cc_g=no
1909 fi
1910 rm -f conftest*
1911
1912
1913 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1914 if test "$ac_test_CFLAGS" = set; then
1915   CFLAGS="$ac_save_CFLAGS"
1916 elif test $ac_cv_prog_cc_g = yes; then
1917   if test "$GCC" = yes; then
1918     CFLAGS="-g -O2"
1919   else
1920     CFLAGS="-g"
1921   fi
1922 else
1923   if test "$GCC" = yes; then
1924     CFLAGS="-O2"
1925   else
1926     CFLAGS=
1927   fi
1928 fi
1929
1930 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1931   CC=gcc
1932   # Extract the first word of "gcc", so it can be a program name with args.
1933 set dummy gcc; ac_word=$2
1934 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1935 echo "configure:1936: checking for $ac_word" >&5
1936
1937 if test -n "$CC"; then
1938   ac_cv_prog_CC="$CC" # Let the user override the test.
1939 else
1940   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1941   ac_dummy="$PATH"
1942   for ac_dir in $ac_dummy; do
1943     test -z "$ac_dir" && ac_dir=.
1944     if test -f $ac_dir/$ac_word; then
1945       ac_cv_prog_CC="gcc"
1946       break
1947     fi
1948   done
1949   IFS="$ac_save_ifs"
1950 fi
1951 CC="$ac_cv_prog_CC"
1952 if test -n "$CC"; then
1953   echo "$ac_t""$CC" 1>&6
1954 else
1955   echo "$ac_t""no" 1>&6
1956 fi
1957
1958 if test -z "$CC"; then
1959   # Extract the first word of "cc", so it can be a program name with args.
1960 set dummy cc; ac_word=$2
1961 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1962 echo "configure:1963: checking for $ac_word" >&5
1963
1964 if test -n "$CC"; then
1965   ac_cv_prog_CC="$CC" # Let the user override the test.
1966 else
1967   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1968   ac_prog_rejected=no
1969   ac_dummy="$PATH"
1970   for ac_dir in $ac_dummy; do
1971     test -z "$ac_dir" && ac_dir=.
1972     if test -f $ac_dir/$ac_word; then
1973       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1974         ac_prog_rejected=yes
1975         continue
1976       fi
1977       ac_cv_prog_CC="cc"
1978       break
1979     fi
1980   done
1981   IFS="$ac_save_ifs"
1982 if test $ac_prog_rejected = yes; then
1983   # We found a bogon in the path, so make sure we never use it.
1984   set dummy $ac_cv_prog_CC
1985   shift
1986   if test $# -gt 0; then
1987     # We chose a different compiler from the bogus one.
1988     # However, it has the same basename, so the bogon will be chosen
1989     # first if we set CC to just the basename; use the full file name.
1990     shift
1991     set dummy "$ac_dir/$ac_word" "$@"
1992     shift
1993     ac_cv_prog_CC="$@"
1994   fi
1995 fi
1996 fi
1997 CC="$ac_cv_prog_CC"
1998 if test -n "$CC"; then
1999   echo "$ac_t""$CC" 1>&6
2000 else
2001   echo "$ac_t""no" 1>&6
2002 fi
2003
2004   if test -z "$CC"; then
2005     case "`uname -s`" in
2006     *win32* | *WIN32*)
2007       # Extract the first word of "cl", so it can be a program name with args.
2008 set dummy cl; ac_word=$2
2009 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2010 echo "configure:2011: checking for $ac_word" >&5
2011
2012 if test -n "$CC"; then
2013   ac_cv_prog_CC="$CC" # Let the user override the test.
2014 else
2015   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2016   ac_dummy="$PATH"
2017   for ac_dir in $ac_dummy; do
2018     test -z "$ac_dir" && ac_dir=.
2019     if test -f $ac_dir/$ac_word; then
2020       ac_cv_prog_CC="cl"
2021       break
2022     fi
2023   done
2024   IFS="$ac_save_ifs"
2025 fi
2026 CC="$ac_cv_prog_CC"
2027 if test -n "$CC"; then
2028   echo "$ac_t""$CC" 1>&6
2029 else
2030   echo "$ac_t""no" 1>&6
2031 fi
2032  ;;
2033     esac
2034   fi
2035   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2036 fi
2037
2038 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2039 echo "configure:2040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2040
2041 ac_ext=c
2042 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2043 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2044 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2045 ac_cpp='$CPP '"$xe_cppflags"
2046 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2047 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2048 cross_compiling=no
2049
2050 cat > conftest.$ac_ext << EOF
2051
2052 #line 2053 "configure"
2053 #include "confdefs.h"
2054
2055 main(){return(0);}
2056 EOF
2057 if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2058   ac_cv_prog_cc_works=yes
2059   # If we can't run a trivial program, we are probably using a cross compiler.
2060   if (./conftest; exit) 2>/dev/null; then
2061     ac_cv_prog_cc_cross=no
2062   else
2063     ac_cv_prog_cc_cross=yes
2064   fi
2065 else
2066   echo "configure: failed program was:" >&5
2067   cat conftest.$ac_ext >&5
2068   ac_cv_prog_cc_works=no
2069 fi
2070 rm -fr conftest*
2071 ac_ext=c
2072 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2073 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2074 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2075 ac_cpp='$CPP '"$xe_cppflags"
2076 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2077 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2078 cross_compiling=no
2079
2080 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2081 if test $ac_cv_prog_cc_works = no; then
2082   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2083 fi
2084 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2085 echo "configure:2086: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2086 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2087 cross_compiling=$ac_cv_prog_cc_cross
2088
2089 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2090 echo "configure:2091: checking whether we are using GNU C" >&5
2091
2092 cat > conftest.c <<EOF
2093 #ifdef __GNUC__
2094   yes;
2095 #endif
2096 EOF
2097 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2098   ac_cv_prog_gcc=yes
2099 else
2100   ac_cv_prog_gcc=no
2101 fi
2102
2103 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2104
2105 if test $ac_cv_prog_gcc = yes; then
2106   GCC=yes
2107 else
2108   GCC=
2109 fi
2110
2111 ac_test_CFLAGS="${CFLAGS+set}"
2112 ac_save_CFLAGS="$CFLAGS"
2113 CFLAGS=
2114 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2115 echo "configure:2116: checking whether ${CC-cc} accepts -g" >&5
2116
2117 echo 'void f(){}' > conftest.c
2118 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2119   ac_cv_prog_cc_g=yes
2120 else
2121   ac_cv_prog_cc_g=no
2122 fi
2123 rm -f conftest*
2124
2125
2126 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2127 if test "$ac_test_CFLAGS" = set; then
2128   CFLAGS="$ac_save_CFLAGS"
2129 elif test $ac_cv_prog_cc_g = yes; then
2130   if test "$GCC" = yes; then
2131     CFLAGS="-g -O2"
2132   else
2133     CFLAGS="-g"
2134   fi
2135 else
2136   if test "$GCC" = yes; then
2137     CFLAGS="-O2"
2138   else
2139     CFLAGS=
2140   fi
2141 fi
2142
2143 fi
2144 CFLAGS="$xe_save_CFLAGS"
2145
2146
2147 test -n "$CPP" -a -d "$CPP" && CPP=
2148
2149 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2150
2151 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2152 echo "configure:2153: checking how to run the C preprocessor" >&5
2153 # On Suns, sometimes $CPP names a directory.
2154 if test -n "$CPP" && test -d "$CPP"; then
2155   CPP=
2156 fi
2157 if test -z "$CPP"; then
2158
2159   # This must be in double quotes, not single quotes, because CPP may get
2160   # substituted into the Makefile and "${CC-cc}" will confuse make.
2161   CPP="${CC-cc} -E"
2162   # On the NeXT, cc -E runs the code through the compiler's parser,
2163   # not just through cpp.
2164   cat > conftest.$ac_ext <<EOF
2165 #line 2166 "configure"
2166 #include "confdefs.h"
2167 #include <assert.h>
2168 Syntax Error
2169 EOF
2170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2171 { (eval echo configure:2172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2173 if test -z "$ac_err"; then
2174   :
2175 else
2176   echo "$ac_err" >&5
2177   echo "configure: failed program was:" >&5
2178   cat conftest.$ac_ext >&5
2179   rm -rf conftest*
2180   CPP="${CC-cc} -E -traditional-cpp"
2181   cat > conftest.$ac_ext <<EOF
2182 #line 2183 "configure"
2183 #include "confdefs.h"
2184 #include <assert.h>
2185 Syntax Error
2186 EOF
2187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2188 { (eval echo configure:2189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2190 if test -z "$ac_err"; then
2191   :
2192 else
2193   echo "$ac_err" >&5
2194   echo "configure: failed program was:" >&5
2195   cat conftest.$ac_ext >&5
2196   rm -rf conftest*
2197   CPP="${CC-cc} -nologo -E"
2198   cat > conftest.$ac_ext <<EOF
2199 #line 2200 "configure"
2200 #include "confdefs.h"
2201 #include <assert.h>
2202 Syntax Error
2203 EOF
2204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2205 { (eval echo configure:2206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2207 if test -z "$ac_err"; then
2208   :
2209 else
2210   echo "$ac_err" >&5
2211   echo "configure: failed program was:" >&5
2212   cat conftest.$ac_ext >&5
2213   rm -rf conftest*
2214   CPP=/lib/cpp
2215 fi
2216 rm -f conftest*
2217 fi
2218 rm -f conftest*
2219 fi
2220 rm -f conftest*
2221   ac_cv_prog_CPP="$CPP"
2222   CPP="$ac_cv_prog_CPP"
2223 else
2224   ac_cv_prog_CPP="$CPP"
2225 fi
2226 echo "$ac_t""$CPP" 1>&6
2227
2228
2229 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2230 echo "configure:2231: checking for AIX" >&5
2231 cat > conftest.$ac_ext <<EOF
2232 #line 2233 "configure"
2233 #include "confdefs.h"
2234 #ifdef _AIX
2235   yes
2236 #endif
2237
2238 EOF
2239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2240   egrep "yes" >/dev/null 2>&1; then
2241   rm -rf conftest*
2242   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2243     Defining _ALL_SOURCE
2244 EOF
2245 cat >> confdefs.h <<\EOF
2246 #define _ALL_SOURCE 1
2247 EOF
2248 }
2249
2250 else
2251   rm -rf conftest*
2252   echo "$ac_t""no" 1>&6
2253 fi
2254 rm -f conftest*
2255
2256
2257
2258 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2259 echo "configure:2260: checking for GNU libc" >&5
2260 cat > conftest.$ac_ext <<EOF
2261 #line 2262 "configure"
2262 #include "confdefs.h"
2263 #include <features.h>
2264 int main() {
2265
2266 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2267 #error Not a GNU libc system :-(
2268 ******* ======= ******** &&&&&&&&
2269 #endif
2270
2271 ; return 0; }
2272 EOF
2273 if { (eval echo configure:2274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2274   rm -rf conftest*
2275   have_glibc=yes
2276 else
2277   echo "configure: failed program was:" >&5
2278   cat conftest.$ac_ext >&5
2279   rm -rf conftest*
2280   have_glibc=no
2281 fi
2282 rm -f conftest*
2283 echo "$ac_t""$have_glibc" 1>&6
2284 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2285     Defining _GNU_SOURCE
2286 EOF
2287 cat >> confdefs.h <<\EOF
2288 #define _GNU_SOURCE 1
2289 EOF
2290 }
2291
2292
2293
2294 cat > conftest.$ac_ext <<EOF
2295 #line 2296 "configure"
2296 #include "confdefs.h"
2297 int main () {
2298 #if defined __SUNPRO_C
2299 return 11;
2300 #elif defined __DECC
2301 return 12;
2302 #else
2303 return 0;
2304 #endif
2305 }
2306 EOF
2307 if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2308 then
2309   :
2310 else
2311   conftest_rc="$?"
2312   echo "configure: failed program was:" >&5
2313   cat conftest.$ac_ext >&5
2314   rm -fr conftest*
2315   case "$conftest_rc" in
2316   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2317   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2318 esac
2319 fi
2320 rm -fr conftest*
2321
2322
2323
2324
2325 echo "Extracting information from the machine- and system-dependent headers..."
2326
2327 tempcname="conftest.c"
2328
2329
2330
2331 cat > $tempcname <<EOF
2332 #define NOT_C_CODE
2333 #define C_SWITCH_SITE
2334 #define C_SWITCH_X_SITE
2335 #define LD_SWITCH_SITE
2336 #define LD_SWITCH_X_SITE
2337 #define LD_SWITCH_X_SITE_AUX
2338 #define OS_RELEASE $os_release
2339 #include "$srcdir/src/$opsysfile"
2340 #include "$srcdir/src/$machfile"
2341
2342 #ifndef LIBS_MACHINE
2343 #define LIBS_MACHINE
2344 #endif
2345 configure___ libs_machine=LIBS_MACHINE
2346
2347 #ifndef LIBS_SYSTEM
2348 #define LIBS_SYSTEM
2349 #endif
2350 configure___ libs_system=LIBS_SYSTEM
2351
2352 #ifndef LIBS_TERMCAP
2353 #define LIBS_TERMCAP
2354 #endif
2355 configure___ libs_termcap=LIBS_TERMCAP
2356
2357 #ifndef LIB_STANDARD
2358 #define LIB_STANDARD
2359 #endif
2360 configure___ libs_standard=LIB_STANDARD
2361
2362
2363 #ifndef OBJECTS_MACHINE
2364 #define OBJECTS_MACHINE
2365 #endif
2366 configure___ objects_machine=OBJECTS_MACHINE
2367
2368 #ifndef OBJECTS_SYSTEM
2369 #define OBJECTS_SYSTEM
2370 #endif
2371 configure___ objects_system=OBJECTS_SYSTEM
2372
2373
2374 #ifndef C_SWITCH_MACHINE
2375 #define C_SWITCH_MACHINE
2376 #endif
2377 configure___ c_switch_machine=C_SWITCH_MACHINE
2378
2379 #ifndef C_SWITCH_SYSTEM
2380 #define C_SWITCH_SYSTEM
2381 #endif
2382 configure___ c_switch_system=C_SWITCH_SYSTEM
2383
2384
2385 #ifndef LD_SWITCH_MACHINE
2386 #define LD_SWITCH_MACHINE
2387 #endif
2388 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2389
2390 #ifndef LD_SWITCH_SYSTEM
2391 #define LD_SWITCH_SYSTEM
2392 #endif
2393 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2394
2395
2396 #ifndef UNEXEC
2397 #define UNEXEC "unexec.o"
2398 #endif
2399 configure___ unexec=UNEXEC
2400
2401
2402 #ifndef LD_SWITCH_SHARED
2403 #define LD_SWITCH_SHARED "-c"
2404 #endif
2405 configure___ ld_switch_shared=LD_SWITCH_SHARED
2406
2407
2408 #ifdef ORDINARY_LINK
2409 #define LD "\$(CC) \$(CFLAGS)"
2410 #else /* no ORDINARY LINK */
2411 #ifdef COFF_ENCAPSULATE
2412 #define LD "\$(CC) -nostdlib"
2413 #else /* not COFF_ENCAPSULATE */
2414 #ifdef LINKER
2415 #define LD LINKER
2416 #else /* ! defined (LINKER) */
2417 #define LD "ld"
2418 #endif /* ! defined (LINKER) */
2419 #endif /* ! defined (COFF_ENCAPSULATE) */
2420 #endif /* not ORDINARY_LINK */
2421 configure___ ld=LD
2422
2423 #ifndef LIB_GCC
2424 #define LIB_GCC
2425 #endif
2426 configure___ lib_gcc=LIB_GCC
2427
2428 #ifndef LD_TEXT_START_ADDR
2429 #define LD_TEXT_START_ADDR
2430 #endif
2431 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2432
2433
2434 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2435 #ifdef NO_REMAP
2436 #ifdef COFF_ENCAPSULATE
2437 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2438 #else /* ! defined (COFF_ENCAPSULATE) */
2439 #define START_FILES "pre-crt0.o /lib/crt0.o"
2440 #endif /* ! defined (COFF_ENCAPSULATE) */
2441 #else /* ! defined (NO_REMAP) */
2442 #define START_FILES "ecrt0.o"
2443 #endif /* ! defined (NO_REMAP) */
2444 #endif /* no ORDINARY_LINK */
2445 #ifndef START_FILES
2446 #define START_FILES
2447 #endif
2448 configure___ start_files=START_FILES
2449
2450 #ifdef ORDINARY_LINK
2451 configure___ ordinary_link=yes
2452 #else
2453 configure___ ordinary_link=no
2454 #endif
2455
2456 #ifdef SYSTEM_MALLOC
2457 configure___ system_malloc=yes
2458 #else
2459 configure___ system_malloc=no
2460 #endif
2461
2462 #ifdef TERMINFO
2463 configure___ have_terminfo=yes
2464 #else
2465 configure___ have_terminfo=no
2466 #endif
2467
2468 #ifdef MAIL_USE_FLOCK
2469 configure___ mail_use_flock=yes
2470 #else
2471 configure___ mail_use_flock=no
2472 #endif
2473
2474 #ifdef MAIL_USE_LOCKF
2475 configure___ mail_use_lockf=yes
2476 #else
2477 configure___ mail_use_lockf=no
2478 #endif
2479
2480 #ifdef HAVE_WIN32_PROCESSES
2481 configure___ win32_processes=yes
2482 #else
2483 configure___ win32_processes=no
2484 #endif
2485
2486 EOF
2487
2488 CPP=`eval "echo $CPP $CPPFLAGS"`
2489 eval `$CPP -Isrc $tempcname \
2490         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2491
2492 rm $tempcname
2493
2494 test "$extra_verbose" = "yes" && \
2495   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 ""
2496
2497 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2498
2499 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2500
2501 if test "$cflags_specified" = "no"; then
2502       if   test "$GCC" = "yes"; then
2503     CFLAGS="-g -O3 -Wall -Wno-switch"
2504               elif test "$__SUNPRO_C" = "yes"; then
2505     case "$opsys" in
2506       sol2    ) CFLAGS="-v -xO4" ;;
2507       sunos4* ) CFLAGS="-xO2";;
2508     esac
2509   elif test "$__DECC" = "yes"; then
2510     CFLAGS="-O3"
2511   elif test "$CC" = "xlc"; then
2512     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2513     else
2514     CFLAGS="-O" ;  fi
2515 fi
2516
2517
2518 if test "$GCC" = "yes"; then
2519   set x $ld_switch_system; shift; ld_switch_system=""
2520   while test -n "$1"; do
2521     case $1 in
2522       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2523       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2524       -Xlinker* ) ;;
2525       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2526     esac
2527     shift
2528   done
2529 fi
2530
2531 if test "$GCC" = "yes"; then
2532   set x $ld_switch_machine; shift; ld_switch_machine=""
2533   while test -n "$1"; do
2534     case $1 in
2535       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2536       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2537       -Xlinker* ) ;;
2538       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2539     esac
2540     shift
2541   done
2542 fi
2543
2544 if test "$GCC" = "yes"; then
2545   set x $LDFLAGS; shift; LDFLAGS=""
2546   while test -n "$1"; do
2547     case $1 in
2548       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2549       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2550       -Xlinker* ) ;;
2551       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2552     esac
2553     shift
2554   done
2555 fi
2556
2557 if test "$GCC" = "yes"; then
2558   set x $ld_call_shared; shift; ld_call_shared=""
2559   while test -n "$1"; do
2560     case $1 in
2561       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2562       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2563       -Xlinker* ) ;;
2564       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2565     esac
2566     shift
2567   done
2568 fi
2569
2570 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2571    echo "    xemacs will be linked with \"$objects_machine\""
2572  fi
2573 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2574    echo "    xemacs will be linked with \"$objects_system\""
2575  fi
2576 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2577    echo "    xemacs will be linked with \"$unexec\""
2578  fi
2579
2580 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2581 echo "configure:2582: checking for dynodump" >&5
2582 if test "$unexec" != "unexsol2.o"; then
2583   echo "$ac_t""no" 1>&6
2584 else
2585   echo "$ac_t""yes" 1>&6
2586   { test "$extra_verbose" = "yes" && cat << \EOF
2587     Defining DYNODUMP
2588 EOF
2589 cat >> confdefs.h <<\EOF
2590 #define DYNODUMP 1
2591 EOF
2592 }
2593
2594   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2595   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2596   case "$machine" in
2597     sparc   ) dynodump_arch=sparc ;;
2598     *86*    ) dynodump_arch=i386  ;;
2599     powerpc ) dynodump_arch=ppc   ;;
2600   esac
2601     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
2602 fi
2603
2604
2605 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2606
2607 if test "$unexec" = "unexaix.o"; then
2608   if   test "$dynamic" = "no"; then
2609   start_flags="-Wl,-bnso,-bnodelcsect"
2610   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2611   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2612     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2613   done
2614   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2615     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2616   done
2617   
2618 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2619 echo "configure:2620: checking for terminateAndUnload in -lC" >&5
2620 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2621
2622 xe_check_libs=" -lC "
2623 cat > conftest.$ac_ext <<EOF
2624 #line 2625 "configure"
2625 #include "confdefs.h"
2626 /* Override any gcc2 internal prototype to avoid an error.  */
2627 /* We use char because int might match the return type of a gcc2
2628     builtin and then its argument prototype would still apply.  */
2629 char terminateAndUnload();
2630
2631 int main() {
2632 terminateAndUnload()
2633 ; return 0; }
2634 EOF
2635 if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2636   rm -rf conftest*
2637   eval "ac_cv_lib_$ac_lib_var=yes"
2638 else
2639   echo "configure: failed program was:" >&5
2640   cat conftest.$ac_ext >&5
2641   rm -rf conftest*
2642   eval "ac_cv_lib_$ac_lib_var=no"
2643 fi
2644 rm -f conftest*
2645 xe_check_libs=""
2646
2647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2648   echo "$ac_t""yes" 1>&6
2649   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2650 else
2651   echo "$ac_t""no" 1>&6
2652 fi
2653
2654
2655   fi
2656 elif test -n "$ld_text_start_addr"; then
2657   start_flags="-T $ld_text_start_addr -e __start"
2658 fi
2659
2660
2661
2662
2663 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2664  test -z "$linker" &&  linker='$(CC) -nostdlib'
2665  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2666 fi
2667 test "$GCC" != "yes" && lib_gcc=
2668
2669
2670
2671
2672
2673 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2674 if test -n "$site_libraries"; then
2675   for arg in $site_libraries; do
2676     case "$arg" in
2677      -* ) ;;
2678      * ) test -d "$arg" || \
2679            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2680        arg="-L${arg}" ;;
2681     esac
2682     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2683   done
2684 fi
2685
2686 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2687 if test -n "$site_includes"; then
2688   for arg in $site_includes; do
2689     case "$arg" in
2690       -* ) ;;
2691       * ) test -d "$arg" || \
2692            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2693       arg="-I${arg}" ;;
2694     esac
2695     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2696   done
2697 fi
2698
2699 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2700 if test -n "$site_prefixes"; then
2701   for dir in $site_prefixes; do
2702     lib_dir="${dir}/lib"
2703     if test ! -d "$dir"; then
2704       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2705     elif test ! -d "$lib_dir"; then
2706       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2707     else
2708       if test -d "$inc_dir"; then
2709         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
2710       fi
2711       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
2712     fi
2713   done
2714 fi
2715
2716
2717 for dir in "/usr/ccs/lib"; do
2718   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
2719 done
2720
2721 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2722 if test -n "$site_runtime_libraries"; then
2723   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2724   export LD_RUN_PATH
2725 fi
2726
2727
2728 if   test "$dynamic" = "no"; then add_runtime_path=no
2729 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2730 else case "$opsys" in
2731        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2732        * ) add_runtime_path=no ;;
2733      esac
2734 fi
2735
2736 if test "$add_runtime_path" = "yes"; then
2737       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2738 echo "configure:2739: checking "for runtime libraries flag"" >&5
2739   case "$opsys" in
2740     sol2 ) dash_r="-R" ;;
2741     decosf* | linux* | irix*) dash_r="-rpath " ;;
2742     *)
2743       dash_r=""
2744       for try_dash_r in "-R" "-R " "-rpath "; do
2745         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2746         
2747 if test "$GCC" = "yes"; then
2748   set x $xe_check_libs; shift; xe_check_libs=""
2749   while test -n "$1"; do
2750     case $1 in
2751       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2752       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2753       -Xlinker* ) ;;
2754       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2755     esac
2756     shift
2757   done
2758 fi
2759         cat > conftest.$ac_ext <<EOF
2760 #line 2761 "configure"
2761 #include "confdefs.h"
2762
2763 int main() {
2764
2765 ; return 0; }
2766 EOF
2767 if { (eval echo configure:2768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2768   rm -rf conftest*
2769   dash_r="$try_dash_r"
2770 else
2771   echo "configure: failed program was:" >&5
2772   cat conftest.$ac_ext >&5
2773 fi
2774 rm -f conftest*
2775         xe_check_libs=""
2776         test -n "$dash_r" && break
2777       done ;;
2778   esac
2779   if test -n "$dash_r";
2780     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2781     else echo "$ac_t""NONE" 1>&6
2782   fi
2783 fi
2784
2785 xe_add_unique_runpath_dir='
2786   xe_add_p=yes
2787   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2788   done
2789   if test "$xe_add_p" = "yes"; then
2790     test -n "$runpath" && runpath="${runpath}:"
2791     runpath="${runpath}${xe_runpath_dir}"
2792     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2793   fi'
2794
2795
2796
2797
2798 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2799     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2800   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2801   
2802         runpath="" runpath_dirs=""
2803   if test -n "$LD_RUN_PATH"; then
2804     runpath="$LD_RUN_PATH"
2805   elif test "$GCC" = "yes"; then
2806         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2807     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2808     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2809     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2810       case "$arg" in P,* | -L* | -R* )
2811         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2812           {
2813 xe_runpath_dir="$dir"
2814   test "$xe_runpath_dir" != "/lib"     -a \
2815         "$xe_runpath_dir" != "/usr/lib" -a \
2816         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2817   eval "$xe_add_unique_runpath_dir"
2818 }
2819         done ;;
2820       esac
2821     done
2822     ld_switch_run="$ld_switch_run_save"
2823     rm -f conftest*
2824   else
2825         for arg in $ld_switch_site $ld_switch_x_site; do
2826       case "$arg" in -L*) {
2827 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2828   test "$xe_runpath_dir" != "/lib"     -a \
2829         "$xe_runpath_dir" != "/usr/lib" -a \
2830         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2831   eval "$xe_add_unique_runpath_dir"
2832 };; esac
2833     done
2834         if test "$opsys $need_motif" = "sol2 yes"; then
2835       xe_runpath_dir="/opt/SUNWdt/lib";
2836       eval "$xe_add_unique_runpath_dir";
2837     fi
2838   fi 
2839   if test -n "$runpath"; then
2840     ld_switch_run="${dash_r}${runpath}"
2841     
2842 if test "$GCC" = "yes"; then
2843   set x $ld_switch_run; shift; ld_switch_run=""
2844   while test -n "$1"; do
2845     case $1 in
2846       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2847       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2848       -Xlinker* ) ;;
2849       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2850     esac
2851     shift
2852   done
2853 fi
2854     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2855   fi
2856 fi
2857
2858
2859
2860
2861 GNU_MALLOC=yes
2862 if test "$with_dlmalloc" != "no"; then
2863         doug_lea_malloc=yes
2864 else
2865         doug_lea_malloc=no
2866 fi
2867 after_morecore_hook_exists=yes
2868 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2869 echo "configure:2870: checking for malloc_get_state" >&5
2870
2871 cat > conftest.$ac_ext <<EOF
2872 #line 2873 "configure"
2873 #include "confdefs.h"
2874 /* System header to define __stub macros and hopefully few prototypes,
2875     which can conflict with char malloc_get_state(); below.  */
2876 #include <assert.h>
2877 /* Override any gcc2 internal prototype to avoid an error.  */
2878 /* We use char because int might match the return type of a gcc2
2879     builtin and then its argument prototype would still apply.  */
2880 char malloc_get_state();
2881
2882 int main() {
2883
2884 /* The GNU C library defines this for functions which it implements
2885     to always fail with ENOSYS.  Some functions are actually named
2886     something starting with __ and the normal name is an alias.  */
2887 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2888 choke me
2889 #else
2890 malloc_get_state();
2891 #endif
2892
2893 ; return 0; }
2894 EOF
2895 if { (eval echo configure:2896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2896   rm -rf conftest*
2897   eval "ac_cv_func_malloc_get_state=yes"
2898 else
2899   echo "configure: failed program was:" >&5
2900   cat conftest.$ac_ext >&5
2901   rm -rf conftest*
2902   eval "ac_cv_func_malloc_get_state=no"
2903 fi
2904 rm -f conftest*
2905
2906 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2907   echo "$ac_t""yes" 1>&6
2908   :
2909 else
2910   echo "$ac_t""no" 1>&6
2911 doug_lea_malloc=no
2912 fi
2913
2914 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2915 echo "configure:2916: checking for malloc_set_state" >&5
2916
2917 cat > conftest.$ac_ext <<EOF
2918 #line 2919 "configure"
2919 #include "confdefs.h"
2920 /* System header to define __stub macros and hopefully few prototypes,
2921     which can conflict with char malloc_set_state(); below.  */
2922 #include <assert.h>
2923 /* Override any gcc2 internal prototype to avoid an error.  */
2924 /* We use char because int might match the return type of a gcc2
2925     builtin and then its argument prototype would still apply.  */
2926 char malloc_set_state();
2927
2928 int main() {
2929
2930 /* The GNU C library defines this for functions which it implements
2931     to always fail with ENOSYS.  Some functions are actually named
2932     something starting with __ and the normal name is an alias.  */
2933 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
2934 choke me
2935 #else
2936 malloc_set_state();
2937 #endif
2938
2939 ; return 0; }
2940 EOF
2941 if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2942   rm -rf conftest*
2943   eval "ac_cv_func_malloc_set_state=yes"
2944 else
2945   echo "configure: failed program was:" >&5
2946   cat conftest.$ac_ext >&5
2947   rm -rf conftest*
2948   eval "ac_cv_func_malloc_set_state=no"
2949 fi
2950 rm -f conftest*
2951
2952 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
2953   echo "$ac_t""yes" 1>&6
2954   :
2955 else
2956   echo "$ac_t""no" 1>&6
2957 doug_lea_malloc=no
2958 fi
2959
2960 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
2961 echo "configure:2962: checking whether __after_morecore_hook exists" >&5
2962 cat > conftest.$ac_ext <<EOF
2963 #line 2964 "configure"
2964 #include "confdefs.h"
2965 extern void (* __after_morecore_hook)();
2966 int main() {
2967 __after_morecore_hook = 0
2968 ; return 0; }
2969 EOF
2970 if { (eval echo configure:2971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2971   rm -rf conftest*
2972   echo "$ac_t""yes" 1>&6
2973 else
2974   echo "configure: failed program was:" >&5
2975   cat conftest.$ac_ext >&5
2976   rm -rf conftest*
2977   echo "$ac_t""no" 1>&6
2978    after_morecore_hook_exists=no
2979 fi
2980 rm -f conftest*
2981 if test "$system_malloc" = "yes" ; then
2982   GNU_MALLOC=no
2983   GNU_MALLOC_reason="
2984   (The GNU allocators don't work with this system configuration)."
2985 elif test "$with_system_malloc" = "yes" ; then
2986   GNU_MALLOC=no
2987   GNU_MALLOC_reason="
2988   (User chose not to use GNU allocators)."
2989 elif test "$with_debug_malloc" = "yes" ; then
2990   GNU_MALLOC=no
2991   GNU_MALLOC_reason="
2992   (User chose to use Debugging Malloc)."
2993 fi
2994
2995 if test "$doug_lea_malloc" = "yes" ; then
2996   if test "$GNU_MALLOC" = yes ; then
2997     GNU_MALLOC_reason="
2998   (Using Doug Lea's new malloc from the GNU C Library.)"
2999   fi
3000   { test "$extra_verbose" = "yes" && cat << \EOF
3001     Defining DOUG_LEA_MALLOC
3002 EOF
3003 cat >> confdefs.h <<\EOF
3004 #define DOUG_LEA_MALLOC 1
3005 EOF
3006 }
3007
3008   if test "$after_morecore_hook_exists" = "no" ; then
3009     GNU_MALLOC_reason="
3010   (Using Doug Lea's new malloc from the Linux C Library.)"
3011     { test "$extra_verbose" = "yes" && cat << \EOF
3012     Defining _NO_MALLOC_WARNING_
3013 EOF
3014 cat >> confdefs.h <<\EOF
3015 #define _NO_MALLOC_WARNING_ 1
3016 EOF
3017 }
3018
3019   fi
3020   use_minimal_tagbits=yes
3021 fi
3022
3023
3024
3025
3026 # Extract the first word of "ranlib", so it can be a program name with args.
3027 set dummy ranlib; ac_word=$2
3028 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3029 echo "configure:3030: checking for $ac_word" >&5
3030
3031 if test -n "$RANLIB"; then
3032   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3033 else
3034   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3035   ac_dummy="$PATH"
3036   for ac_dir in $ac_dummy; do
3037     test -z "$ac_dir" && ac_dir=.
3038     if test -f $ac_dir/$ac_word; then
3039       ac_cv_prog_RANLIB="ranlib"
3040       break
3041     fi
3042   done
3043   IFS="$ac_save_ifs"
3044   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3045 fi
3046 RANLIB="$ac_cv_prog_RANLIB"
3047 if test -n "$RANLIB"; then
3048   echo "$ac_t""$RANLIB" 1>&6
3049 else
3050   echo "$ac_t""no" 1>&6
3051 fi
3052
3053 ac_aux_dir=
3054 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3055   if test -f $ac_dir/install-sh; then
3056     ac_aux_dir=$ac_dir
3057     ac_install_sh="$ac_aux_dir/install-sh -c"
3058     break
3059   elif test -f $ac_dir/install.sh; then
3060     ac_aux_dir=$ac_dir
3061     ac_install_sh="$ac_aux_dir/install.sh -c"
3062     break
3063   fi
3064 done
3065 if test -z "$ac_aux_dir"; then
3066   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3067 fi
3068 ac_config_guess=$ac_aux_dir/config.guess
3069 ac_config_sub=$ac_aux_dir/config.sub
3070 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3071
3072 # Find a good install program.  We prefer a C program (faster),
3073 # so one script is as good as another.  But avoid the broken or
3074 # incompatible versions:
3075 # SysV /etc/install, /usr/sbin/install
3076 # SunOS /usr/etc/install
3077 # IRIX /sbin/install
3078 # AIX /bin/install
3079 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3080 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3081 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3082 # ./install, which can be erroneously created by make from ./install.sh.
3083 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3084 echo "configure:3085: checking for a BSD compatible install" >&5
3085 if test -z "$INSTALL"; then
3086
3087   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3088   for ac_dir in $PATH; do
3089     # Account for people who put trailing slashes in PATH elements.
3090     case "$ac_dir/" in
3091     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3092     *)
3093       # OSF1 and SCO ODT 3.0 have their own names for install.
3094       # Don't use installbsd from OSF since it installs stuff as root
3095       # by default.
3096       for ac_prog in ginstall scoinst install; do
3097         if test -f $ac_dir/$ac_prog; then
3098           if test $ac_prog = install &&
3099             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3100             # AIX install.  It has an incompatible calling convention.
3101             :
3102           else
3103             ac_cv_path_install="$ac_dir/$ac_prog -c"
3104             break 2
3105           fi
3106         fi
3107       done
3108       ;;
3109     esac
3110   done
3111   IFS="$ac_save_IFS"
3112
3113   if test "${ac_cv_path_install+set}" = set; then
3114     INSTALL="$ac_cv_path_install"
3115   else
3116     # As a last resort, use the slow shell script.  We don't cache a
3117     # path for INSTALL within a source directory, because that will
3118     # break other packages using the cache if that directory is
3119     # removed, or if the path is relative.
3120     INSTALL="$ac_install_sh"
3121   fi
3122 fi
3123 echo "$ac_t""$INSTALL" 1>&6
3124
3125 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3126 # It thinks the first close brace ends the variable substitution.
3127 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3128
3129 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3130
3131 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3132
3133 for ac_prog in 'bison -y' byacc
3134 do
3135 # Extract the first word of "$ac_prog", so it can be a program name with args.
3136 set dummy $ac_prog; ac_word=$2
3137 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3138 echo "configure:3139: checking for $ac_word" >&5
3139
3140 if test -n "$YACC"; then
3141   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3142 else
3143   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3144   ac_dummy="$PATH"
3145   for ac_dir in $ac_dummy; do
3146     test -z "$ac_dir" && ac_dir=.
3147     if test -f $ac_dir/$ac_word; then
3148       ac_cv_prog_YACC="$ac_prog"
3149       break
3150     fi
3151   done
3152   IFS="$ac_save_ifs"
3153 fi
3154 YACC="$ac_cv_prog_YACC"
3155 if test -n "$YACC"; then
3156   echo "$ac_t""$YACC" 1>&6
3157 else
3158   echo "$ac_t""no" 1>&6
3159 fi
3160
3161 test -n "$YACC" && break
3162 done
3163 test -n "$YACC" || YACC="yacc"
3164
3165
3166 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3167 do
3168 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3169 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3170 echo "configure:3171: checking for $ac_hdr" >&5
3171
3172 cat > conftest.$ac_ext <<EOF
3173 #line 3174 "configure"
3174 #include "confdefs.h"
3175 #include <$ac_hdr>
3176 EOF
3177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3178 { (eval echo configure:3179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3180 if test -z "$ac_err"; then
3181   rm -rf conftest*
3182   eval "ac_cv_header_$ac_safe=yes"
3183 else
3184   echo "$ac_err" >&5
3185   echo "configure: failed program was:" >&5
3186   cat conftest.$ac_ext >&5
3187   rm -rf conftest*
3188   eval "ac_cv_header_$ac_safe=no"
3189 fi
3190 rm -f conftest*
3191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3192   echo "$ac_t""yes" 1>&6
3193     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3194   { test "$extra_verbose" = "yes" && cat << EOF
3195     Defining $ac_tr_hdr
3196 EOF
3197 cat >> confdefs.h <<EOF
3198 #define $ac_tr_hdr 1
3199 EOF
3200 }
3201  
3202 else
3203   echo "$ac_t""no" 1>&6
3204 fi
3205 done
3206
3207 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3208 do
3209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3211 echo "configure:3212: checking for $ac_hdr" >&5
3212
3213 cat > conftest.$ac_ext <<EOF
3214 #line 3215 "configure"
3215 #include "confdefs.h"
3216 #include <$ac_hdr>
3217 EOF
3218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3219 { (eval echo configure:3220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3221 if test -z "$ac_err"; then
3222   rm -rf conftest*
3223   eval "ac_cv_header_$ac_safe=yes"
3224 else
3225   echo "$ac_err" >&5
3226   echo "configure: failed program was:" >&5
3227   cat conftest.$ac_ext >&5
3228   rm -rf conftest*
3229   eval "ac_cv_header_$ac_safe=no"
3230 fi
3231 rm -f conftest*
3232 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3233   echo "$ac_t""yes" 1>&6
3234     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3235   { test "$extra_verbose" = "yes" && cat << EOF
3236     Defining $ac_tr_hdr
3237 EOF
3238 cat >> confdefs.h <<EOF
3239 #define $ac_tr_hdr 1
3240 EOF
3241 }
3242  
3243 else
3244   echo "$ac_t""no" 1>&6
3245 fi
3246 done
3247
3248 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3249 do
3250 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3251 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3252 echo "configure:3253: checking for $ac_hdr" >&5
3253
3254 cat > conftest.$ac_ext <<EOF
3255 #line 3256 "configure"
3256 #include "confdefs.h"
3257 #include <$ac_hdr>
3258 EOF
3259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3260 { (eval echo configure:3261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3262 if test -z "$ac_err"; then
3263   rm -rf conftest*
3264   eval "ac_cv_header_$ac_safe=yes"
3265 else
3266   echo "$ac_err" >&5
3267   echo "configure: failed program was:" >&5
3268   cat conftest.$ac_ext >&5
3269   rm -rf conftest*
3270   eval "ac_cv_header_$ac_safe=no"
3271 fi
3272 rm -f conftest*
3273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3274   echo "$ac_t""yes" 1>&6
3275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3276   { test "$extra_verbose" = "yes" && cat << EOF
3277     Defining $ac_tr_hdr
3278 EOF
3279 cat >> confdefs.h <<EOF
3280 #define $ac_tr_hdr 1
3281 EOF
3282 }
3283  
3284 else
3285   echo "$ac_t""no" 1>&6
3286 fi
3287 done
3288
3289 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3290 echo "configure:3291: checking for sys/wait.h that is POSIX.1 compatible" >&5
3291
3292 cat > conftest.$ac_ext <<EOF
3293 #line 3294 "configure"
3294 #include "confdefs.h"
3295 #include <sys/types.h>
3296 #include <sys/wait.h>
3297 #ifndef WEXITSTATUS
3298 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3299 #endif
3300 #ifndef WIFEXITED
3301 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3302 #endif
3303 int main() {
3304 int s;
3305 wait (&s);
3306 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3307 ; return 0; }
3308 EOF
3309 if { (eval echo configure:3310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3310   rm -rf conftest*
3311   ac_cv_header_sys_wait_h=yes
3312 else
3313   echo "configure: failed program was:" >&5
3314   cat conftest.$ac_ext >&5
3315   rm -rf conftest*
3316   ac_cv_header_sys_wait_h=no
3317 fi
3318 rm -f conftest*
3319
3320 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3321 if test $ac_cv_header_sys_wait_h = yes; then
3322   { test "$extra_verbose" = "yes" && cat << \EOF
3323     Defining HAVE_SYS_WAIT_H
3324 EOF
3325 cat >> confdefs.h <<\EOF
3326 #define HAVE_SYS_WAIT_H 1
3327 EOF
3328 }
3329
3330 fi
3331
3332 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3333 echo "configure:3334: checking for ANSI C header files" >&5
3334
3335 cat > conftest.$ac_ext <<EOF
3336 #line 3337 "configure"
3337 #include "confdefs.h"
3338 #include <stdlib.h>
3339 #include <stdarg.h>
3340 #include <string.h>
3341 #include <float.h>
3342 EOF
3343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3344 { (eval echo configure:3345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3346 if test -z "$ac_err"; then
3347   rm -rf conftest*
3348   ac_cv_header_stdc=yes
3349 else
3350   echo "$ac_err" >&5
3351   echo "configure: failed program was:" >&5
3352   cat conftest.$ac_ext >&5
3353   rm -rf conftest*
3354   ac_cv_header_stdc=no
3355 fi
3356 rm -f conftest*
3357
3358 if test $ac_cv_header_stdc = yes; then
3359   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3360 cat > conftest.$ac_ext <<EOF
3361 #line 3362 "configure"
3362 #include "confdefs.h"
3363 #include <string.h>
3364 EOF
3365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3366   egrep "memchr" >/dev/null 2>&1; then
3367   :
3368 else
3369   rm -rf conftest*
3370   ac_cv_header_stdc=no
3371 fi
3372 rm -f conftest*
3373
3374 fi
3375
3376 if test $ac_cv_header_stdc = yes; then
3377   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3378 cat > conftest.$ac_ext <<EOF
3379 #line 3380 "configure"
3380 #include "confdefs.h"
3381 #include <stdlib.h>
3382 EOF
3383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3384   egrep "free" >/dev/null 2>&1; then
3385   :
3386 else
3387   rm -rf conftest*
3388   ac_cv_header_stdc=no
3389 fi
3390 rm -f conftest*
3391
3392 fi
3393
3394 if test $ac_cv_header_stdc = yes; then
3395   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3396 cat > conftest.$ac_ext <<EOF
3397 #line 3398 "configure"
3398 #include "confdefs.h"
3399 #include <ctype.h>
3400 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3401 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3402 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3403 int main () { int i; for (i = 0; i < 256; i++)
3404 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3405 exit (0); }
3406
3407 EOF
3408 if { (eval echo configure:3409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3409 then
3410   :
3411 else
3412   conftest_rc="$?"
3413   echo "configure: failed program was:" >&5
3414   cat conftest.$ac_ext >&5
3415   rm -fr conftest*
3416   ac_cv_header_stdc=no
3417 fi
3418 rm -fr conftest*
3419 fi
3420
3421 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3422 if test $ac_cv_header_stdc = yes; then
3423   { test "$extra_verbose" = "yes" && cat << \EOF
3424     Defining STDC_HEADERS
3425 EOF
3426 cat >> confdefs.h <<\EOF
3427 #define STDC_HEADERS 1
3428 EOF
3429 }
3430
3431 fi
3432
3433 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3434 echo "configure:3435: checking whether time.h and sys/time.h may both be included" >&5
3435
3436 cat > conftest.$ac_ext <<EOF
3437 #line 3438 "configure"
3438 #include "confdefs.h"
3439 #include <sys/types.h>
3440 #include <sys/time.h>
3441 #include <time.h>
3442 int main() {
3443 struct tm *tp;
3444 ; return 0; }
3445 EOF
3446 if { (eval echo configure:3447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3447   rm -rf conftest*
3448   ac_cv_header_time=yes
3449 else
3450   echo "configure: failed program was:" >&5
3451   cat conftest.$ac_ext >&5
3452   rm -rf conftest*
3453   ac_cv_header_time=no
3454 fi
3455 rm -f conftest*
3456
3457 echo "$ac_t""$ac_cv_header_time" 1>&6
3458 if test $ac_cv_header_time = yes; then
3459   { test "$extra_verbose" = "yes" && cat << \EOF
3460     Defining TIME_WITH_SYS_TIME
3461 EOF
3462 cat >> confdefs.h <<\EOF
3463 #define TIME_WITH_SYS_TIME 1
3464 EOF
3465 }
3466
3467 fi
3468
3469 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3470 echo "configure:3471: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3471
3472 cat > conftest.$ac_ext <<EOF
3473 #line 3474 "configure"
3474 #include "confdefs.h"
3475 #include <sys/types.h>
3476 #include <signal.h>
3477 /* NetBSD declares sys_siglist in unistd.h.  */
3478 #ifdef HAVE_UNISTD_H
3479 #include <unistd.h>
3480 #endif
3481 int main() {
3482 char *msg = *(sys_siglist + 1);
3483 ; return 0; }
3484 EOF
3485 if { (eval echo configure:3486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3486   rm -rf conftest*
3487   ac_cv_decl_sys_siglist=yes
3488 else
3489   echo "configure: failed program was:" >&5
3490   cat conftest.$ac_ext >&5
3491   rm -rf conftest*
3492   ac_cv_decl_sys_siglist=no
3493 fi
3494 rm -f conftest*
3495
3496 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3497 if test $ac_cv_decl_sys_siglist = yes; then
3498   { test "$extra_verbose" = "yes" && cat << \EOF
3499     Defining SYS_SIGLIST_DECLARED
3500 EOF
3501 cat >> confdefs.h <<\EOF
3502 #define SYS_SIGLIST_DECLARED 1
3503 EOF
3504 }
3505
3506 fi
3507
3508
3509 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3510 echo "configure:3511: checking for struct utimbuf" >&5
3511 cat > conftest.$ac_ext <<EOF
3512 #line 3513 "configure"
3513 #include "confdefs.h"
3514 #ifdef TIME_WITH_SYS_TIME
3515 #include <sys/time.h>
3516 #include <time.h>
3517 #else
3518 #ifdef HAVE_SYS_TIME_H
3519 #include <sys/time.h>
3520 #else
3521 #include <time.h>
3522 #endif
3523 #endif
3524 #ifdef HAVE_UTIME_H
3525 #include <utime.h>
3526 #endif
3527 int main() {
3528 static struct utimbuf x; x.actime = x.modtime;
3529 ; return 0; }
3530 EOF
3531 if { (eval echo configure:3532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3532   rm -rf conftest*
3533   echo "$ac_t""yes" 1>&6
3534    { test "$extra_verbose" = "yes" && cat << \EOF
3535     Defining HAVE_STRUCT_UTIMBUF
3536 EOF
3537 cat >> confdefs.h <<\EOF
3538 #define HAVE_STRUCT_UTIMBUF 1
3539 EOF
3540 }
3541
3542 else
3543   echo "configure: failed program was:" >&5
3544   cat conftest.$ac_ext >&5
3545   rm -rf conftest*
3546   echo "$ac_t""no" 1>&6
3547 fi
3548 rm -f conftest*
3549
3550 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3551 echo "configure:3552: checking return type of signal handlers" >&5
3552
3553 cat > conftest.$ac_ext <<EOF
3554 #line 3555 "configure"
3555 #include "confdefs.h"
3556 #include <sys/types.h>
3557 #include <signal.h>
3558 #ifdef signal
3559 #undef signal
3560 #endif
3561 #ifdef __cplusplus
3562 extern "C" void (*signal (int, void (*)(int)))(int);
3563 #else
3564 void (*signal ()) ();
3565 #endif
3566
3567 int main() {
3568 int i;
3569 ; return 0; }
3570 EOF
3571 if { (eval echo configure:3572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3572   rm -rf conftest*
3573   ac_cv_type_signal=void
3574 else
3575   echo "configure: failed program was:" >&5
3576   cat conftest.$ac_ext >&5
3577   rm -rf conftest*
3578   ac_cv_type_signal=int
3579 fi
3580 rm -f conftest*
3581
3582 echo "$ac_t""$ac_cv_type_signal" 1>&6
3583 { test "$extra_verbose" = "yes" && cat << EOF
3584     Defining RETSIGTYPE = $ac_cv_type_signal
3585 EOF
3586 cat >> confdefs.h <<EOF
3587 #define RETSIGTYPE $ac_cv_type_signal
3588 EOF
3589 }
3590
3591
3592 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3593 echo "configure:3594: checking for size_t" >&5
3594
3595 cat > conftest.$ac_ext <<EOF
3596 #line 3597 "configure"
3597 #include "confdefs.h"
3598 #include <sys/types.h>
3599 #if STDC_HEADERS
3600 #include <stdlib.h>
3601 #include <stddef.h>
3602 #endif
3603 EOF
3604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3605   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3606   rm -rf conftest*
3607   ac_cv_type_size_t=yes
3608 else
3609   rm -rf conftest*
3610   ac_cv_type_size_t=no
3611 fi
3612 rm -f conftest*
3613
3614 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3615 if test $ac_cv_type_size_t = no; then
3616   { test "$extra_verbose" = "yes" && cat << \EOF
3617     Defining size_t = unsigned
3618 EOF
3619 cat >> confdefs.h <<\EOF
3620 #define size_t unsigned
3621 EOF
3622 }
3623
3624 fi
3625
3626 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3627 echo "configure:3628: checking for pid_t" >&5
3628
3629 cat > conftest.$ac_ext <<EOF
3630 #line 3631 "configure"
3631 #include "confdefs.h"
3632 #include <sys/types.h>
3633 #if STDC_HEADERS
3634 #include <stdlib.h>
3635 #include <stddef.h>
3636 #endif
3637 EOF
3638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3639   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3640   rm -rf conftest*
3641   ac_cv_type_pid_t=yes
3642 else
3643   rm -rf conftest*
3644   ac_cv_type_pid_t=no
3645 fi
3646 rm -f conftest*
3647
3648 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3649 if test $ac_cv_type_pid_t = no; then
3650   { test "$extra_verbose" = "yes" && cat << \EOF
3651     Defining pid_t = int
3652 EOF
3653 cat >> confdefs.h <<\EOF
3654 #define pid_t int
3655 EOF
3656 }
3657
3658 fi
3659
3660 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3661 echo "configure:3662: checking for uid_t in sys/types.h" >&5
3662
3663 cat > conftest.$ac_ext <<EOF
3664 #line 3665 "configure"
3665 #include "confdefs.h"
3666 #include <sys/types.h>
3667 EOF
3668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3669   egrep "uid_t" >/dev/null 2>&1; then
3670   rm -rf conftest*
3671   ac_cv_type_uid_t=yes
3672 else
3673   rm -rf conftest*
3674   ac_cv_type_uid_t=no
3675 fi
3676 rm -f conftest*
3677
3678
3679 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3680 if test $ac_cv_type_uid_t = no; then
3681   { test "$extra_verbose" = "yes" && cat << \EOF
3682     Defining uid_t = int
3683 EOF
3684 cat >> confdefs.h <<\EOF
3685 #define uid_t int
3686 EOF
3687 }
3688
3689   { test "$extra_verbose" = "yes" && cat << \EOF
3690     Defining gid_t = int
3691 EOF
3692 cat >> confdefs.h <<\EOF
3693 #define gid_t int
3694 EOF
3695 }
3696
3697 fi
3698
3699 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3700 echo "configure:3701: checking for mode_t" >&5
3701
3702 cat > conftest.$ac_ext <<EOF
3703 #line 3704 "configure"
3704 #include "confdefs.h"
3705 #include <sys/types.h>
3706 #if STDC_HEADERS
3707 #include <stdlib.h>
3708 #include <stddef.h>
3709 #endif
3710 EOF
3711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3712   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3713   rm -rf conftest*
3714   ac_cv_type_mode_t=yes
3715 else
3716   rm -rf conftest*
3717   ac_cv_type_mode_t=no
3718 fi
3719 rm -f conftest*
3720
3721 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3722 if test $ac_cv_type_mode_t = no; then
3723   { test "$extra_verbose" = "yes" && cat << \EOF
3724     Defining mode_t = int
3725 EOF
3726 cat >> confdefs.h <<\EOF
3727 #define mode_t int
3728 EOF
3729 }
3730
3731 fi
3732
3733 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3734 echo "configure:3735: checking for off_t" >&5
3735
3736 cat > conftest.$ac_ext <<EOF
3737 #line 3738 "configure"
3738 #include "confdefs.h"
3739 #include <sys/types.h>
3740 #if STDC_HEADERS
3741 #include <stdlib.h>
3742 #include <stddef.h>
3743 #endif
3744 EOF
3745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3746   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3747   rm -rf conftest*
3748   ac_cv_type_off_t=yes
3749 else
3750   rm -rf conftest*
3751   ac_cv_type_off_t=no
3752 fi
3753 rm -f conftest*
3754
3755 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3756 if test $ac_cv_type_off_t = no; then
3757   { test "$extra_verbose" = "yes" && cat << \EOF
3758     Defining off_t = long
3759 EOF
3760 cat >> confdefs.h <<\EOF
3761 #define off_t long
3762 EOF
3763 }
3764
3765 fi
3766
3767
3768 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3769 echo "configure:3770: checking for struct timeval" >&5
3770 cat > conftest.$ac_ext <<EOF
3771 #line 3772 "configure"
3772 #include "confdefs.h"
3773 #ifdef TIME_WITH_SYS_TIME
3774 #include <sys/time.h>
3775 #include <time.h>
3776 #else
3777 #ifdef HAVE_SYS_TIME_H
3778 #include <sys/time.h>
3779 #else
3780 #include <time.h>
3781 #endif
3782 #endif
3783 int main() {
3784 static struct timeval x; x.tv_sec = x.tv_usec;
3785 ; return 0; }
3786 EOF
3787 if { (eval echo configure:3788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3788   rm -rf conftest*
3789   echo "$ac_t""yes" 1>&6
3790   HAVE_TIMEVAL=yes
3791   { test "$extra_verbose" = "yes" && cat << \EOF
3792     Defining HAVE_TIMEVAL
3793 EOF
3794 cat >> confdefs.h <<\EOF
3795 #define HAVE_TIMEVAL 1
3796 EOF
3797 }
3798
3799 else
3800   echo "configure: failed program was:" >&5
3801   cat conftest.$ac_ext >&5
3802   rm -rf conftest*
3803   echo "$ac_t""no" 1>&6
3804    HAVE_TIMEVAL=no
3805 fi
3806 rm -f conftest*
3807
3808 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3809 echo "configure:3810: checking whether struct tm is in sys/time.h or time.h" >&5
3810
3811 cat > conftest.$ac_ext <<EOF
3812 #line 3813 "configure"
3813 #include "confdefs.h"
3814 #include <sys/types.h>
3815 #include <time.h>
3816 int main() {
3817 struct tm *tp; tp->tm_sec;
3818 ; return 0; }
3819 EOF
3820 if { (eval echo configure:3821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3821   rm -rf conftest*
3822   ac_cv_struct_tm=time.h
3823 else
3824   echo "configure: failed program was:" >&5
3825   cat conftest.$ac_ext >&5
3826   rm -rf conftest*
3827   ac_cv_struct_tm=sys/time.h
3828 fi
3829 rm -f conftest*
3830
3831 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3832 if test $ac_cv_struct_tm = sys/time.h; then
3833   { test "$extra_verbose" = "yes" && cat << \EOF
3834     Defining TM_IN_SYS_TIME
3835 EOF
3836 cat >> confdefs.h <<\EOF
3837 #define TM_IN_SYS_TIME 1
3838 EOF
3839 }
3840
3841 fi
3842
3843 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3844 echo "configure:3845: checking for tm_zone in struct tm" >&5
3845
3846 cat > conftest.$ac_ext <<EOF
3847 #line 3848 "configure"
3848 #include "confdefs.h"
3849 #include <sys/types.h>
3850 #include <$ac_cv_struct_tm>
3851 int main() {
3852 struct tm tm; tm.tm_zone;
3853 ; return 0; }
3854 EOF
3855 if { (eval echo configure:3856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3856   rm -rf conftest*
3857   ac_cv_struct_tm_zone=yes
3858 else
3859   echo "configure: failed program was:" >&5
3860   cat conftest.$ac_ext >&5
3861   rm -rf conftest*
3862   ac_cv_struct_tm_zone=no
3863 fi
3864 rm -f conftest*
3865
3866 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3867 if test "$ac_cv_struct_tm_zone" = yes; then
3868   { test "$extra_verbose" = "yes" && cat << \EOF
3869     Defining HAVE_TM_ZONE
3870 EOF
3871 cat >> confdefs.h <<\EOF
3872 #define HAVE_TM_ZONE 1
3873 EOF
3874 }
3875
3876 else
3877   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3878 echo "configure:3879: checking for tzname" >&5
3879
3880 cat > conftest.$ac_ext <<EOF
3881 #line 3882 "configure"
3882 #include "confdefs.h"
3883 #include <time.h>
3884 #ifndef tzname /* For SGI.  */
3885 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3886 #endif
3887 int main() {
3888 atoi(*tzname);
3889 ; return 0; }
3890 EOF
3891 if { (eval echo configure:3892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3892   rm -rf conftest*
3893   ac_cv_var_tzname=yes
3894 else
3895   echo "configure: failed program was:" >&5
3896   cat conftest.$ac_ext >&5
3897   rm -rf conftest*
3898   ac_cv_var_tzname=no
3899 fi
3900 rm -f conftest*
3901
3902 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3903   if test $ac_cv_var_tzname = yes; then
3904     { test "$extra_verbose" = "yes" && cat << \EOF
3905     Defining HAVE_TZNAME
3906 EOF
3907 cat >> confdefs.h <<\EOF
3908 #define HAVE_TZNAME 1
3909 EOF
3910 }
3911
3912   fi
3913 fi
3914
3915
3916 echo $ac_n "checking for working const""... $ac_c" 1>&6
3917 echo "configure:3918: checking for working const" >&5
3918
3919 cat > conftest.$ac_ext <<EOF
3920 #line 3921 "configure"
3921 #include "confdefs.h"
3922
3923 int main() {
3924
3925 /* Ultrix mips cc rejects this.  */
3926 typedef int charset[2]; const charset x;
3927 /* SunOS 4.1.1 cc rejects this.  */
3928 char const *const *ccp;
3929 char **p;
3930 /* NEC SVR4.0.2 mips cc rejects this.  */
3931 struct point {int x, y;};
3932 static struct point const zero = {0,0};
3933 /* AIX XL C 1.02.0.0 rejects this.
3934    It does not let you subtract one const X* pointer from another in an arm
3935    of an if-expression whose if-part is not a constant expression */
3936 const char *g = "string";
3937 ccp = &g + (g ? g-g : 0);
3938 /* HPUX 7.0 cc rejects these. */
3939 ++ccp;
3940 p = (char**) ccp;
3941 ccp = (char const *const *) p;
3942 { /* SCO 3.2v4 cc rejects this.  */
3943   char *t;
3944   char const *s = 0 ? (char *) 0 : (char const *) 0;
3945
3946   *t++ = 0;
3947 }
3948 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3949   int x[] = {25, 17};
3950   const int *foo = &x[0];
3951   ++foo;
3952 }
3953 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3954   typedef const int *iptr;
3955   iptr p = 0;
3956   ++p;
3957 }
3958 { /* AIX XL C 1.02.0.0 rejects this saying
3959      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3960   struct s { int j; const int *ap[3]; };
3961   struct s *b; b->j = 5;
3962 }
3963 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3964   const int foo = 10;
3965 }
3966
3967 ; return 0; }
3968 EOF
3969 if { (eval echo configure:3970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3970   rm -rf conftest*
3971   ac_cv_c_const=yes
3972 else
3973   echo "configure: failed program was:" >&5
3974   cat conftest.$ac_ext >&5
3975   rm -rf conftest*
3976   ac_cv_c_const=no
3977 fi
3978 rm -f conftest*
3979
3980 echo "$ac_t""$ac_cv_c_const" 1>&6
3981 if test $ac_cv_c_const = no; then
3982   { test "$extra_verbose" = "yes" && cat << \EOF
3983     Defining const = 
3984 EOF
3985 cat >> confdefs.h <<\EOF
3986 #define const 
3987 EOF
3988 }
3989
3990 fi
3991
3992
3993 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3994 echo "configure:3995: checking whether ${MAKE-make} sets \${MAKE}" >&5
3995 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3996
3997 cat > conftestmake <<\EOF
3998 all:
3999         @echo 'ac_maketemp="${MAKE}"'
4000 EOF
4001 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4002 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4003 if test -n "$ac_maketemp"; then
4004   eval ac_cv_prog_make_${ac_make}_set=yes
4005 else
4006   eval ac_cv_prog_make_${ac_make}_set=no
4007 fi
4008 rm -f conftestmake
4009 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4010   echo "$ac_t""yes" 1>&6
4011   SET_MAKE=
4012 else
4013   echo "$ac_t""no" 1>&6
4014   SET_MAKE="MAKE=${MAKE-make}"
4015 fi
4016
4017
4018 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4019 echo "configure:4020: checking whether byte ordering is bigendian" >&5
4020
4021 ac_cv_c_bigendian=unknown
4022 # See if sys/param.h defines the BYTE_ORDER macro.
4023 cat > conftest.$ac_ext <<EOF
4024 #line 4025 "configure"
4025 #include "confdefs.h"
4026 #include <sys/types.h>
4027 #include <sys/param.h>
4028 int main() {
4029
4030 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4031  bogus endian macros
4032 #endif
4033 ; return 0; }
4034 EOF
4035 if { (eval echo configure:4036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4036   rm -rf conftest*
4037   # It does; now see whether it defined to BIG_ENDIAN or not.
4038 cat > conftest.$ac_ext <<EOF
4039 #line 4040 "configure"
4040 #include "confdefs.h"
4041 #include <sys/types.h>
4042 #include <sys/param.h>
4043 int main() {
4044
4045 #if BYTE_ORDER != BIG_ENDIAN
4046  not big endian
4047 #endif
4048 ; return 0; }
4049 EOF
4050 if { (eval echo configure:4051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4051   rm -rf conftest*
4052   ac_cv_c_bigendian=yes
4053 else
4054   echo "configure: failed program was:" >&5
4055   cat conftest.$ac_ext >&5
4056   rm -rf conftest*
4057   ac_cv_c_bigendian=no
4058 fi
4059 rm -f conftest*
4060 else
4061   echo "configure: failed program was:" >&5
4062   cat conftest.$ac_ext >&5
4063 fi
4064 rm -f conftest*
4065 if test $ac_cv_c_bigendian = unknown; then
4066 cat > conftest.$ac_ext <<EOF
4067 #line 4068 "configure"
4068 #include "confdefs.h"
4069 main () {
4070   /* Are we little or big endian?  From Harbison&Steele.  */
4071   union
4072   {
4073     long l;
4074     char c[sizeof (long)];
4075   } u;
4076   u.l = 1;
4077   exit (u.c[sizeof (long) - 1] == 1);
4078 }
4079 EOF
4080 if { (eval echo configure:4081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4081 then
4082   ac_cv_c_bigendian=no
4083 else
4084   conftest_rc="$?"
4085   echo "configure: failed program was:" >&5
4086   cat conftest.$ac_ext >&5
4087   rm -fr conftest*
4088   ac_cv_c_bigendian=yes
4089 fi
4090 rm -fr conftest*
4091 fi
4092
4093 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4094 if test $ac_cv_c_bigendian = yes; then
4095   { test "$extra_verbose" = "yes" && cat << \EOF
4096     Defining WORDS_BIGENDIAN
4097 EOF
4098 cat >> confdefs.h <<\EOF
4099 #define WORDS_BIGENDIAN 1
4100 EOF
4101 }
4102
4103 fi
4104
4105
4106 echo $ac_n "checking size of short""... $ac_c" 1>&6
4107 echo "configure:4108: checking size of short" >&5
4108
4109 cat > conftest.$ac_ext <<EOF
4110 #line 4111 "configure"
4111 #include "confdefs.h"
4112 #include <stdio.h>
4113 main()
4114 {
4115   FILE *f=fopen("conftestval", "w");
4116   if (!f) exit(1);
4117   fprintf(f, "%d\n", sizeof(short));
4118   exit(0);
4119 }
4120 EOF
4121 if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4122 then
4123   ac_cv_sizeof_short=`cat conftestval`
4124 else
4125   conftest_rc="$?"
4126   echo "configure: failed program was:" >&5
4127   cat conftest.$ac_ext >&5
4128   rm -fr conftest*
4129   ac_cv_sizeof_short=0
4130 fi
4131 rm -fr conftest*
4132 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4133 { test "$extra_verbose" = "yes" && cat << EOF
4134     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4135 EOF
4136 cat >> confdefs.h <<EOF
4137 #define SIZEOF_SHORT $ac_cv_sizeof_short
4138 EOF
4139 }
4140
4141
4142 if test "$ac_cv_sizeof_short" = 0; then
4143   echo ""
4144   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4145   echo "*** PANIC *** Please examine config.log for compilation errors."
4146   exit 1
4147 fi
4148 echo $ac_n "checking size of int""... $ac_c" 1>&6
4149 echo "configure:4150: checking size of int" >&5
4150
4151 cat > conftest.$ac_ext <<EOF
4152 #line 4153 "configure"
4153 #include "confdefs.h"
4154 #include <stdio.h>
4155 main()
4156 {
4157   FILE *f=fopen("conftestval", "w");
4158   if (!f) exit(1);
4159   fprintf(f, "%d\n", sizeof(int));
4160   exit(0);
4161 }
4162 EOF
4163 if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4164 then
4165   ac_cv_sizeof_int=`cat conftestval`
4166 else
4167   conftest_rc="$?"
4168   echo "configure: failed program was:" >&5
4169   cat conftest.$ac_ext >&5
4170   rm -fr conftest*
4171   ac_cv_sizeof_int=0
4172 fi
4173 rm -fr conftest*
4174 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4175 { test "$extra_verbose" = "yes" && cat << EOF
4176     Defining SIZEOF_INT = $ac_cv_sizeof_int
4177 EOF
4178 cat >> confdefs.h <<EOF
4179 #define SIZEOF_INT $ac_cv_sizeof_int
4180 EOF
4181 }
4182
4183
4184 echo $ac_n "checking size of long""... $ac_c" 1>&6
4185 echo "configure:4186: checking size of long" >&5
4186
4187 cat > conftest.$ac_ext <<EOF
4188 #line 4189 "configure"
4189 #include "confdefs.h"
4190 #include <stdio.h>
4191 main()
4192 {
4193   FILE *f=fopen("conftestval", "w");
4194   if (!f) exit(1);
4195   fprintf(f, "%d\n", sizeof(long));
4196   exit(0);
4197 }
4198 EOF
4199 if { (eval echo configure:4200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4200 then
4201   ac_cv_sizeof_long=`cat conftestval`
4202 else
4203   conftest_rc="$?"
4204   echo "configure: failed program was:" >&5
4205   cat conftest.$ac_ext >&5
4206   rm -fr conftest*
4207   ac_cv_sizeof_long=0
4208 fi
4209 rm -fr conftest*
4210 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4211 { test "$extra_verbose" = "yes" && cat << EOF
4212     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4213 EOF
4214 cat >> confdefs.h <<EOF
4215 #define SIZEOF_LONG $ac_cv_sizeof_long
4216 EOF
4217 }
4218
4219
4220 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4221 echo "configure:4222: checking size of long long" >&5
4222
4223 cat > conftest.$ac_ext <<EOF
4224 #line 4225 "configure"
4225 #include "confdefs.h"
4226 #include <stdio.h>
4227 main()
4228 {
4229   FILE *f=fopen("conftestval", "w");
4230   if (!f) exit(1);
4231   fprintf(f, "%d\n", sizeof(long long));
4232   exit(0);
4233 }
4234 EOF
4235 if { (eval echo configure:4236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4236 then
4237   ac_cv_sizeof_long_long=`cat conftestval`
4238 else
4239   conftest_rc="$?"
4240   echo "configure: failed program was:" >&5
4241   cat conftest.$ac_ext >&5
4242   rm -fr conftest*
4243   ac_cv_sizeof_long_long=0
4244 fi
4245 rm -fr conftest*
4246 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4247 { test "$extra_verbose" = "yes" && cat << EOF
4248     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4249 EOF
4250 cat >> confdefs.h <<EOF
4251 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4252 EOF
4253 }
4254
4255
4256 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4257 echo "configure:4258: checking size of void *" >&5
4258
4259 cat > conftest.$ac_ext <<EOF
4260 #line 4261 "configure"
4261 #include "confdefs.h"
4262 #include <stdio.h>
4263 main()
4264 {
4265   FILE *f=fopen("conftestval", "w");
4266   if (!f) exit(1);
4267   fprintf(f, "%d\n", sizeof(void *));
4268   exit(0);
4269 }
4270 EOF
4271 if { (eval echo configure:4272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4272 then
4273   ac_cv_sizeof_void_p=`cat conftestval`
4274 else
4275   conftest_rc="$?"
4276   echo "configure: failed program was:" >&5
4277   cat conftest.$ac_ext >&5
4278   rm -fr conftest*
4279   ac_cv_sizeof_void_p=0
4280 fi
4281 rm -fr conftest*
4282 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4283 { test "$extra_verbose" = "yes" && cat << EOF
4284     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4285 EOF
4286 cat >> confdefs.h <<EOF
4287 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4288 EOF
4289 }
4290
4291
4292
4293 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4294 echo "configure:4295: checking for long file names" >&5
4295
4296 ac_cv_sys_long_file_names=yes
4297 # Test for long file names in all the places we know might matter:
4298 #      .                the current directory, where building will happen
4299 #      $prefix/lib      where we will be installing things
4300 #      $exec_prefix/lib likewise
4301 # eval it to expand exec_prefix.
4302 #      $TMPDIR          if set, where it might want to write temporary files
4303 # if $TMPDIR is not set:
4304 #      /tmp             where it might want to write temporary files
4305 #      /var/tmp         likewise
4306 #      /usr/tmp         likewise
4307 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4308   ac_tmpdirs="$TMPDIR"
4309 else
4310   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4311 fi
4312 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4313   test -d $ac_dir || continue
4314   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4315   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4316   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4317   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4318   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4319     ac_cv_sys_long_file_names=no
4320     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4321     break
4322   fi
4323   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4324 done
4325
4326 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4327 if test $ac_cv_sys_long_file_names = yes; then
4328   { test "$extra_verbose" = "yes" && cat << \EOF
4329     Defining HAVE_LONG_FILE_NAMES
4330 EOF
4331 cat >> confdefs.h <<\EOF
4332 #define HAVE_LONG_FILE_NAMES 1
4333 EOF
4334 }
4335
4336 fi
4337
4338
4339 echo $ac_n "checking for sin""... $ac_c" 1>&6
4340 echo "configure:4341: checking for sin" >&5
4341
4342 cat > conftest.$ac_ext <<EOF
4343 #line 4344 "configure"
4344 #include "confdefs.h"
4345 /* System header to define __stub macros and hopefully few prototypes,
4346     which can conflict with char sin(); below.  */
4347 #include <assert.h>
4348 /* Override any gcc2 internal prototype to avoid an error.  */
4349 /* We use char because int might match the return type of a gcc2
4350     builtin and then its argument prototype would still apply.  */
4351 char sin();
4352
4353 int main() {
4354
4355 /* The GNU C library defines this for functions which it implements
4356     to always fail with ENOSYS.  Some functions are actually named
4357     something starting with __ and the normal name is an alias.  */
4358 #if defined (__stub_sin) || defined (__stub___sin)
4359 choke me
4360 #else
4361 sin();
4362 #endif
4363
4364 ; return 0; }
4365 EOF
4366 if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4367   rm -rf conftest*
4368   eval "ac_cv_func_sin=yes"
4369 else
4370   echo "configure: failed program was:" >&5
4371   cat conftest.$ac_ext >&5
4372   rm -rf conftest*
4373   eval "ac_cv_func_sin=no"
4374 fi
4375 rm -f conftest*
4376
4377 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4378   echo "$ac_t""yes" 1>&6
4379   :
4380 else
4381   echo "$ac_t""no" 1>&6
4382
4383 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4384 echo "configure:4385: checking for sin in -lm" >&5
4385 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4386
4387 xe_check_libs=" -lm "
4388 cat > conftest.$ac_ext <<EOF
4389 #line 4390 "configure"
4390 #include "confdefs.h"
4391 /* Override any gcc2 internal prototype to avoid an error.  */
4392 /* We use char because int might match the return type of a gcc2
4393     builtin and then its argument prototype would still apply.  */
4394 char sin();
4395
4396 int main() {
4397 sin()
4398 ; return 0; }
4399 EOF
4400 if { (eval echo configure:4401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4401   rm -rf conftest*
4402   eval "ac_cv_lib_$ac_lib_var=yes"
4403 else
4404   echo "configure: failed program was:" >&5
4405   cat conftest.$ac_ext >&5
4406   rm -rf conftest*
4407   eval "ac_cv_lib_$ac_lib_var=no"
4408 fi
4409 rm -f conftest*
4410 xe_check_libs=""
4411
4412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4413   echo "$ac_t""yes" 1>&6
4414     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4415     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4416   { test "$extra_verbose" = "yes" && cat << EOF
4417     Defining $ac_tr_lib
4418 EOF
4419 cat >> confdefs.h <<EOF
4420 #define $ac_tr_lib 1
4421 EOF
4422 }
4423
4424   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4425
4426 else
4427   echo "$ac_t""no" 1>&6
4428 fi
4429
4430
4431 fi
4432
4433
4434 { test "$extra_verbose" = "yes" && cat << \EOF
4435     Defining LISP_FLOAT_TYPE
4436 EOF
4437 cat >> confdefs.h <<\EOF
4438 #define LISP_FLOAT_TYPE 1
4439 EOF
4440 }
4441
4442
4443 cat > conftest.$ac_ext <<EOF
4444 #line 4445 "configure"
4445 #include "confdefs.h"
4446 #include <math.h>
4447 int main() {
4448 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4449 ; return 0; }
4450 EOF
4451 if { (eval echo configure:4452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4452   rm -rf conftest*
4453   { test "$extra_verbose" = "yes" && cat << \EOF
4454     Defining HAVE_INVERSE_HYPERBOLIC
4455 EOF
4456 cat >> confdefs.h <<\EOF
4457 #define HAVE_INVERSE_HYPERBOLIC 1
4458 EOF
4459 }
4460
4461 else
4462   echo "configure: failed program was:" >&5
4463   cat conftest.$ac_ext >&5
4464 fi
4465 rm -f conftest*
4466
4467 echo "checking type of mail spool file locking" 1>&6
4468 echo "configure:4469: checking type of mail spool file locking" >&5
4469 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4470 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4471 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4472     Defining REAL_MAIL_USE_LOCKF
4473 EOF
4474 cat >> confdefs.h <<\EOF
4475 #define REAL_MAIL_USE_LOCKF 1
4476 EOF
4477 }
4478
4479 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4480     Defining REAL_MAIL_USE_FLOCK
4481 EOF
4482 cat >> confdefs.h <<\EOF
4483 #define REAL_MAIL_USE_FLOCK 1
4484 EOF
4485 }
4486
4487 else mail_locking="dot-locking"
4488 fi
4489
4490 case "$opsys" in decosf*)
4491   
4492 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4493 echo "configure:4494: checking for cma_open in -lpthreads" >&5
4494 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4495
4496 xe_check_libs=" -lpthreads "
4497 cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500 /* Override any gcc2 internal prototype to avoid an error.  */
4501 /* We use char because int might match the return type of a gcc2
4502     builtin and then its argument prototype would still apply.  */
4503 char cma_open();
4504
4505 int main() {
4506 cma_open()
4507 ; return 0; }
4508 EOF
4509 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4510   rm -rf conftest*
4511   eval "ac_cv_lib_$ac_lib_var=yes"
4512 else
4513   echo "configure: failed program was:" >&5
4514   cat conftest.$ac_ext >&5
4515   rm -rf conftest*
4516   eval "ac_cv_lib_$ac_lib_var=no"
4517 fi
4518 rm -f conftest*
4519 xe_check_libs=""
4520
4521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4522   echo "$ac_t""yes" 1>&6
4523     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4524     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4525   { test "$extra_verbose" = "yes" && cat << EOF
4526     Defining $ac_tr_lib
4527 EOF
4528 cat >> confdefs.h <<EOF
4529 #define $ac_tr_lib 1
4530 EOF
4531 }
4532
4533   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4534
4535 else
4536   echo "$ac_t""no" 1>&6
4537 fi
4538
4539
4540   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4541     c_switch_site="$c_switch_site -threads" ;;
4542 esac
4543
4544 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4545 echo "configure:4546: checking whether the -xildoff compiler flag is required" >&5
4546 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4547   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4548     then echo "$ac_t""no" 1>&6;
4549     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
4550   fi
4551   else echo "$ac_t""no" 1>&6
4552 fi
4553
4554 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4555   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4556 echo "configure:4557: checking for \"-z ignore\" linker flag" >&5
4557   case "`ld -h 2>&1`" in
4558     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4559       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4560     *) echo "$ac_t""no" 1>&6 ;;
4561   esac
4562 fi
4563
4564
4565 echo "checking "for specified window system"" 1>&6
4566 echo "configure:4567: checking "for specified window system"" >&5
4567
4568 if test "$with_x11" != "no"; then
4569     test "$x_includes $x_libraries" != "NONE NONE" && \
4570    window_system=x11 with_x11=yes
4571
4572         
4573       if test "$x_includes $x_libraries" = "NONE NONE" \
4574     -a -n "$OPENWINHOME" \
4575     -a "$OPENWINHOME" != "/usr/openwin" \
4576     -a -d "$OPENWINHOME"; then
4577       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4578       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4579       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4580   fi
4581
4582   if test "$x_includes" = "NONE"; then
4583                     for dir in "/usr/X11" "/usr/X11R6"; do
4584       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4585     done
4586   fi
4587
4588   if test "$x_libraries" = "NONE"; then
4589     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4590       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4591     done
4592   fi
4593
4594   # If we find X, set shell vars x_includes and x_libraries to the
4595 # paths, otherwise set no_x=yes.
4596 # Uses ac_ vars as temps to allow command line to override cache and checks.
4597 # --without-x overrides everything else, but does not touch the cache.
4598 echo $ac_n "checking for X""... $ac_c" 1>&6
4599 echo "configure:4600: checking for X" >&5
4600
4601 # Check whether --with-x or --without-x was given.
4602 if test "${with_x+set}" = set; then
4603   withval="$with_x"
4604   :
4605 fi
4606
4607 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4608 if test "x$with_x" = xno; then
4609   # The user explicitly disabled X.
4610   have_x=disabled
4611 else
4612   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4613     # Both variables are already set.
4614     have_x=yes
4615   else
4616
4617 # One or both of the vars are not set, and there is no cached value.
4618 ac_x_includes=NO ac_x_libraries=NO
4619 rm -fr conftestdir
4620 if mkdir conftestdir; then
4621   cd conftestdir
4622   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4623   cat > Imakefile <<'EOF'
4624 acfindx:
4625         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4626 EOF
4627   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4628     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4629     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4630     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4631     for ac_extension in a so sl; do
4632       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4633         test -f $ac_im_libdir/libX11.$ac_extension; then
4634         ac_im_usrlibdir=$ac_im_libdir; break
4635       fi
4636     done
4637     # Screen out bogus values from the imake configuration.  They are
4638     # bogus both because they are the default anyway, and because
4639     # using them would break gcc on systems where it needs fixed includes.
4640     case "$ac_im_incroot" in
4641         /usr/include) ;;
4642         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4643     esac
4644     case "$ac_im_usrlibdir" in
4645         /usr/lib | /lib) ;;
4646         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4647     esac
4648   fi
4649   cd ..
4650   rm -fr conftestdir
4651 fi
4652
4653 if test "$ac_x_includes" = NO; then
4654   # Guess where to find include files, by looking for this one X11 .h file.
4655   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4656
4657   # First, try using that file with no special directory specified.
4658 cat > conftest.$ac_ext <<EOF
4659 #line 4660 "configure"
4660 #include "confdefs.h"
4661 #include <$x_direct_test_include>
4662 EOF
4663 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4664 { (eval echo configure:4665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4665 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4666 if test -z "$ac_err"; then
4667   rm -rf conftest*
4668   # We can compile using X headers with no special include directory.
4669 ac_x_includes=
4670 else
4671   echo "$ac_err" >&5
4672   echo "configure: failed program was:" >&5
4673   cat conftest.$ac_ext >&5
4674   rm -rf conftest*
4675   # Look for the header file in a standard set of common directories.
4676 # Check X11 before X11Rn because it is often a symlink to the current release.
4677   for ac_dir in               \
4678     /usr/X11/include          \
4679     /usr/X11R6/include        \
4680     /usr/X11R5/include        \
4681     /usr/X11R4/include        \
4682                               \
4683     /usr/include/X11          \
4684     /usr/include/X11R6        \
4685     /usr/include/X11R5        \
4686     /usr/include/X11R4        \
4687                               \
4688     /usr/local/X11/include    \
4689     /usr/local/X11R6/include  \
4690     /usr/local/X11R5/include  \
4691     /usr/local/X11R4/include  \
4692                               \
4693     /usr/local/include/X11    \
4694     /usr/local/include/X11R6  \
4695     /usr/local/include/X11R5  \
4696     /usr/local/include/X11R4  \
4697                               \
4698     /usr/X386/include         \
4699     /usr/x386/include         \
4700     /usr/XFree86/include/X11  \
4701                               \
4702     /usr/include              \
4703     /usr/local/include        \
4704     /usr/unsupported/include  \
4705     /usr/athena/include       \
4706     /usr/local/x11r5/include  \
4707     /usr/lpp/Xamples/include  \
4708                               \
4709     /usr/openwin/include      \
4710     /usr/openwin/share/include \
4711     ; \
4712   do
4713     if test -r "$ac_dir/$x_direct_test_include"; then
4714       ac_x_includes=$ac_dir
4715       break
4716     fi
4717   done
4718 fi
4719 rm -f conftest*
4720 fi # $ac_x_includes = NO
4721
4722 if test "$ac_x_libraries" = NO; then
4723   # Check for the libraries.
4724
4725   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4726   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4727
4728   # See if we find them without any special options.
4729   # Don't add to $LIBS permanently.
4730   ac_save_LIBS="$LIBS"
4731   LIBS="-l$x_direct_test_library $LIBS"
4732 cat > conftest.$ac_ext <<EOF
4733 #line 4734 "configure"
4734 #include "confdefs.h"
4735
4736 int main() {
4737 ${x_direct_test_function}()
4738 ; return 0; }
4739 EOF
4740 if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4741   rm -rf conftest*
4742   LIBS="$ac_save_LIBS"
4743 # We can link X programs with no special library path.
4744 ac_x_libraries=
4745 else
4746   echo "configure: failed program was:" >&5
4747   cat conftest.$ac_ext >&5
4748   rm -rf conftest*
4749   LIBS="$ac_save_LIBS"
4750 # First see if replacing the include by lib works.
4751 # Check X11 before X11Rn because it is often a symlink to the current release.
4752 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4753     /usr/X11/lib          \
4754     /usr/X11R6/lib        \
4755     /usr/X11R5/lib        \
4756     /usr/X11R4/lib        \
4757                           \
4758     /usr/lib/X11          \
4759     /usr/lib/X11R6        \
4760     /usr/lib/X11R5        \
4761     /usr/lib/X11R4        \
4762                           \
4763     /usr/local/X11/lib    \
4764     /usr/local/X11R6/lib  \
4765     /usr/local/X11R5/lib  \
4766     /usr/local/X11R4/lib  \
4767                           \
4768     /usr/local/lib/X11    \
4769     /usr/local/lib/X11R6  \
4770     /usr/local/lib/X11R5  \
4771     /usr/local/lib/X11R4  \
4772                           \
4773     /usr/X386/lib         \
4774     /usr/x386/lib         \
4775     /usr/XFree86/lib/X11  \
4776                           \
4777     /usr/lib              \
4778     /usr/local/lib        \
4779     /usr/unsupported/lib  \
4780     /usr/athena/lib       \
4781     /usr/local/x11r5/lib  \
4782     /usr/lpp/Xamples/lib  \
4783     /lib/usr/lib/X11      \
4784                           \
4785     /usr/openwin/lib      \
4786     /usr/openwin/share/lib \
4787     ; \
4788 do
4789   for ac_extension in a so sl; do
4790     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4791       ac_x_libraries=$ac_dir
4792       break 2
4793     fi
4794   done
4795 done
4796 fi
4797 rm -f conftest*
4798 fi # $ac_x_libraries = NO
4799
4800 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4801   # Didn't find X anywhere.  Cache the known absence of X.
4802   ac_cv_have_x="have_x=no"
4803 else
4804   # Record where we found X for the cache.
4805   ac_cv_have_x="have_x=yes \
4806                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4807 fi
4808   fi
4809   eval "$ac_cv_have_x"
4810 fi # $with_x != no
4811
4812 if test "$have_x" != yes; then
4813   echo "$ac_t""$have_x" 1>&6
4814   no_x=yes
4815 else
4816   # If each of the values was on the command line, it overrides each guess.
4817   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4818   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4819   # Update the cache value to reflect the command line values.
4820   ac_cv_have_x="have_x=yes \
4821                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4822   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4823 fi
4824
4825 if test "$no_x" = yes; then
4826   # Not all programs may use this symbol, but it does not hurt to define it.
4827   { test "$extra_verbose" = "yes" && cat << \EOF
4828     Defining X_DISPLAY_MISSING
4829 EOF
4830 cat >> confdefs.h <<\EOF
4831 #define X_DISPLAY_MISSING 1
4832 EOF
4833 }
4834
4835   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4836 else
4837   if test -n "$x_includes"; then
4838     X_CFLAGS="$X_CFLAGS -I$x_includes"
4839   fi
4840
4841   # It would also be nice to do this for all -L options, not just this one.
4842   if test -n "$x_libraries"; then
4843     X_LIBS="$X_LIBS -L$x_libraries"
4844     # For Solaris; some versions of Sun CC require a space after -R and
4845     # others require no space.  Words are not sufficient . . . .
4846     case "`(uname -sr) 2>/dev/null`" in
4847     "SunOS 5"*)
4848       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4849 echo "configure:4850: checking whether -R must be followed by a space" >&5
4850       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4851       cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4854
4855 int main() {
4856
4857 ; return 0; }
4858 EOF
4859 if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4860   rm -rf conftest*
4861   ac_R_nospace=yes
4862 else
4863   echo "configure: failed program was:" >&5
4864   cat conftest.$ac_ext >&5
4865   rm -rf conftest*
4866   ac_R_nospace=no
4867 fi
4868 rm -f conftest*
4869       if test $ac_R_nospace = yes; then
4870         echo "$ac_t""no" 1>&6
4871         X_LIBS="$X_LIBS -R$x_libraries"
4872       else
4873         LIBS="$ac_xsave_LIBS -R $x_libraries"
4874         cat > conftest.$ac_ext <<EOF
4875 #line 4876 "configure"
4876 #include "confdefs.h"
4877
4878 int main() {
4879
4880 ; return 0; }
4881 EOF
4882 if { (eval echo configure:4883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4883   rm -rf conftest*
4884   ac_R_space=yes
4885 else
4886   echo "configure: failed program was:" >&5
4887   cat conftest.$ac_ext >&5
4888   rm -rf conftest*
4889   ac_R_space=no
4890 fi
4891 rm -f conftest*
4892         if test $ac_R_space = yes; then
4893           echo "$ac_t""yes" 1>&6
4894           X_LIBS="$X_LIBS -R $x_libraries"
4895         else
4896           echo "$ac_t""neither works" 1>&6
4897         fi
4898       fi
4899       LIBS="$ac_xsave_LIBS"
4900     esac
4901   fi
4902
4903   # Check for system-dependent libraries X programs must link with.
4904   # Do this before checking for the system-independent R6 libraries
4905   # (-lICE), since we may need -lsocket or whatever for X linking.
4906
4907   if test "$ISC" = yes; then
4908     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4909   else
4910     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4911     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4912     # the Alpha needs dnet_stub (dnet does not exist).
4913     if test "$with_dnet" = "no" ; then
4914 ac_cv_lib_dnet_dnet_ntoa=no
4915 else
4916
4917 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4918 echo "configure:4919: checking for dnet_ntoa in -ldnet" >&5
4919 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4920
4921 xe_check_libs=" -ldnet "
4922 cat > conftest.$ac_ext <<EOF
4923 #line 4924 "configure"
4924 #include "confdefs.h"
4925 /* Override any gcc2 internal prototype to avoid an error.  */
4926 /* We use char because int might match the return type of a gcc2
4927     builtin and then its argument prototype would still apply.  */
4928 char dnet_ntoa();
4929
4930 int main() {
4931 dnet_ntoa()
4932 ; return 0; }
4933 EOF
4934 if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4935   rm -rf conftest*
4936   eval "ac_cv_lib_$ac_lib_var=yes"
4937 else
4938   echo "configure: failed program was:" >&5
4939   cat conftest.$ac_ext >&5
4940   rm -rf conftest*
4941   eval "ac_cv_lib_$ac_lib_var=no"
4942 fi
4943 rm -f conftest*
4944 xe_check_libs=""
4945
4946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4947   echo "$ac_t""yes" 1>&6
4948   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4949 else
4950   echo "$ac_t""no" 1>&6
4951 fi
4952
4953 fi
4954
4955     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4956       
4957 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4958 echo "configure:4959: checking for dnet_ntoa in -ldnet_stub" >&5
4959 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4960
4961 xe_check_libs=" -ldnet_stub "
4962 cat > conftest.$ac_ext <<EOF
4963 #line 4964 "configure"
4964 #include "confdefs.h"
4965 /* Override any gcc2 internal prototype to avoid an error.  */
4966 /* We use char because int might match the return type of a gcc2
4967     builtin and then its argument prototype would still apply.  */
4968 char dnet_ntoa();
4969
4970 int main() {
4971 dnet_ntoa()
4972 ; return 0; }
4973 EOF
4974 if { (eval echo configure:4975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4975   rm -rf conftest*
4976   eval "ac_cv_lib_$ac_lib_var=yes"
4977 else
4978   echo "configure: failed program was:" >&5
4979   cat conftest.$ac_ext >&5
4980   rm -rf conftest*
4981   eval "ac_cv_lib_$ac_lib_var=no"
4982 fi
4983 rm -f conftest*
4984 xe_check_libs=""
4985
4986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4987   echo "$ac_t""yes" 1>&6
4988   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4989 else
4990   echo "$ac_t""no" 1>&6
4991 fi
4992
4993
4994     fi
4995
4996     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4997     # to get the SysV transport functions.
4998     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4999     # needs -lnsl.
5000     # The nsl library prevents programs from opening the X display
5001     # on Irix 5.2, according to dickey@clark.net.
5002     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5003 echo "configure:5004: checking for gethostbyname" >&5
5004
5005 cat > conftest.$ac_ext <<EOF
5006 #line 5007 "configure"
5007 #include "confdefs.h"
5008 /* System header to define __stub macros and hopefully few prototypes,
5009     which can conflict with char gethostbyname(); below.  */
5010 #include <assert.h>
5011 /* Override any gcc2 internal prototype to avoid an error.  */
5012 /* We use char because int might match the return type of a gcc2
5013     builtin and then its argument prototype would still apply.  */
5014 char gethostbyname();
5015
5016 int main() {
5017
5018 /* The GNU C library defines this for functions which it implements
5019     to always fail with ENOSYS.  Some functions are actually named
5020     something starting with __ and the normal name is an alias.  */
5021 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5022 choke me
5023 #else
5024 gethostbyname();
5025 #endif
5026
5027 ; return 0; }
5028 EOF
5029 if { (eval echo configure:5030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5030   rm -rf conftest*
5031   eval "ac_cv_func_gethostbyname=yes"
5032 else
5033   echo "configure: failed program was:" >&5
5034   cat conftest.$ac_ext >&5
5035   rm -rf conftest*
5036   eval "ac_cv_func_gethostbyname=no"
5037 fi
5038 rm -f conftest*
5039
5040 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5041   echo "$ac_t""yes" 1>&6
5042   :
5043 else
5044   echo "$ac_t""no" 1>&6
5045 fi
5046
5047     if test $ac_cv_func_gethostbyname = no; then
5048       
5049 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5050 echo "configure:5051: checking for gethostbyname in -lnsl" >&5
5051 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5052
5053 xe_check_libs=" -lnsl "
5054 cat > conftest.$ac_ext <<EOF
5055 #line 5056 "configure"
5056 #include "confdefs.h"
5057 /* Override any gcc2 internal prototype to avoid an error.  */
5058 /* We use char because int might match the return type of a gcc2
5059     builtin and then its argument prototype would still apply.  */
5060 char gethostbyname();
5061
5062 int main() {
5063 gethostbyname()
5064 ; return 0; }
5065 EOF
5066 if { (eval echo configure:5067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5067   rm -rf conftest*
5068   eval "ac_cv_lib_$ac_lib_var=yes"
5069 else
5070   echo "configure: failed program was:" >&5
5071   cat conftest.$ac_ext >&5
5072   rm -rf conftest*
5073   eval "ac_cv_lib_$ac_lib_var=no"
5074 fi
5075 rm -f conftest*
5076 xe_check_libs=""
5077
5078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5079   echo "$ac_t""yes" 1>&6
5080   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5081 else
5082   echo "$ac_t""no" 1>&6
5083 fi
5084
5085
5086     fi
5087
5088     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5089     # socket/setsockopt and other routines are undefined under SCO ODT
5090     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5091     # on later versions), says simon@lia.di.epfl.ch: it contains
5092     # gethostby* variants that don't use the nameserver (or something).
5093     # -lsocket must be given before -lnsl if both are needed.
5094     # We assume that if connect needs -lnsl, so does gethostbyname.
5095     echo $ac_n "checking for connect""... $ac_c" 1>&6
5096 echo "configure:5097: checking for connect" >&5
5097
5098 cat > conftest.$ac_ext <<EOF
5099 #line 5100 "configure"
5100 #include "confdefs.h"
5101 /* System header to define __stub macros and hopefully few prototypes,
5102     which can conflict with char connect(); below.  */
5103 #include <assert.h>
5104 /* Override any gcc2 internal prototype to avoid an error.  */
5105 /* We use char because int might match the return type of a gcc2
5106     builtin and then its argument prototype would still apply.  */
5107 char connect();
5108
5109 int main() {
5110
5111 /* The GNU C library defines this for functions which it implements
5112     to always fail with ENOSYS.  Some functions are actually named
5113     something starting with __ and the normal name is an alias.  */
5114 #if defined (__stub_connect) || defined (__stub___connect)
5115 choke me
5116 #else
5117 connect();
5118 #endif
5119
5120 ; return 0; }
5121 EOF
5122 if { (eval echo configure:5123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5123   rm -rf conftest*
5124   eval "ac_cv_func_connect=yes"
5125 else
5126   echo "configure: failed program was:" >&5
5127   cat conftest.$ac_ext >&5
5128   rm -rf conftest*
5129   eval "ac_cv_func_connect=no"
5130 fi
5131 rm -f conftest*
5132
5133 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5134   echo "$ac_t""yes" 1>&6
5135   :
5136 else
5137   echo "$ac_t""no" 1>&6
5138 fi
5139
5140     if test $ac_cv_func_connect = no; then
5141       
5142 xe_msg_checking="for connect in -lsocket"
5143 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5144 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5145 echo "configure:5146: checking "$xe_msg_checking"" >&5
5146 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5147
5148 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5149 cat > conftest.$ac_ext <<EOF
5150 #line 5151 "configure"
5151 #include "confdefs.h"
5152 /* Override any gcc2 internal prototype to avoid an error.  */
5153 /* We use char because int might match the return type of a gcc2
5154     builtin and then its argument prototype would still apply.  */
5155 char connect();
5156
5157 int main() {
5158 connect()
5159 ; return 0; }
5160 EOF
5161 if { (eval echo configure:5162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5162   rm -rf conftest*
5163   eval "ac_cv_lib_$ac_lib_var=yes"
5164 else
5165   echo "configure: failed program was:" >&5
5166   cat conftest.$ac_ext >&5
5167   rm -rf conftest*
5168   eval "ac_cv_lib_$ac_lib_var=no"
5169 fi
5170 rm -f conftest*
5171 xe_check_libs=""
5172
5173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5174   echo "$ac_t""yes" 1>&6
5175   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5176 else
5177   echo "$ac_t""no" 1>&6
5178 fi
5179
5180
5181     fi
5182
5183     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5184     echo $ac_n "checking for remove""... $ac_c" 1>&6
5185 echo "configure:5186: checking for remove" >&5
5186
5187 cat > conftest.$ac_ext <<EOF
5188 #line 5189 "configure"
5189 #include "confdefs.h"
5190 /* System header to define __stub macros and hopefully few prototypes,
5191     which can conflict with char remove(); below.  */
5192 #include <assert.h>
5193 /* Override any gcc2 internal prototype to avoid an error.  */
5194 /* We use char because int might match the return type of a gcc2
5195     builtin and then its argument prototype would still apply.  */
5196 char remove();
5197
5198 int main() {
5199
5200 /* The GNU C library defines this for functions which it implements
5201     to always fail with ENOSYS.  Some functions are actually named
5202     something starting with __ and the normal name is an alias.  */
5203 #if defined (__stub_remove) || defined (__stub___remove)
5204 choke me
5205 #else
5206 remove();
5207 #endif
5208
5209 ; return 0; }
5210 EOF
5211 if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5212   rm -rf conftest*
5213   eval "ac_cv_func_remove=yes"
5214 else
5215   echo "configure: failed program was:" >&5
5216   cat conftest.$ac_ext >&5
5217   rm -rf conftest*
5218   eval "ac_cv_func_remove=no"
5219 fi
5220 rm -f conftest*
5221
5222 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5223   echo "$ac_t""yes" 1>&6
5224   :
5225 else
5226   echo "$ac_t""no" 1>&6
5227 fi
5228
5229     if test $ac_cv_func_remove = no; then
5230       
5231 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5232 echo "configure:5233: checking for remove in -lposix" >&5
5233 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5234
5235 xe_check_libs=" -lposix "
5236 cat > conftest.$ac_ext <<EOF
5237 #line 5238 "configure"
5238 #include "confdefs.h"
5239 /* Override any gcc2 internal prototype to avoid an error.  */
5240 /* We use char because int might match the return type of a gcc2
5241     builtin and then its argument prototype would still apply.  */
5242 char remove();
5243
5244 int main() {
5245 remove()
5246 ; return 0; }
5247 EOF
5248 if { (eval echo configure:5249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5249   rm -rf conftest*
5250   eval "ac_cv_lib_$ac_lib_var=yes"
5251 else
5252   echo "configure: failed program was:" >&5
5253   cat conftest.$ac_ext >&5
5254   rm -rf conftest*
5255   eval "ac_cv_lib_$ac_lib_var=no"
5256 fi
5257 rm -f conftest*
5258 xe_check_libs=""
5259
5260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5261   echo "$ac_t""yes" 1>&6
5262   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5263 else
5264   echo "$ac_t""no" 1>&6
5265 fi
5266
5267
5268     fi
5269
5270     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5271     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5272 echo "configure:5273: checking for shmat" >&5
5273
5274 cat > conftest.$ac_ext <<EOF
5275 #line 5276 "configure"
5276 #include "confdefs.h"
5277 /* System header to define __stub macros and hopefully few prototypes,
5278     which can conflict with char shmat(); below.  */
5279 #include <assert.h>
5280 /* Override any gcc2 internal prototype to avoid an error.  */
5281 /* We use char because int might match the return type of a gcc2
5282     builtin and then its argument prototype would still apply.  */
5283 char shmat();
5284
5285 int main() {
5286
5287 /* The GNU C library defines this for functions which it implements
5288     to always fail with ENOSYS.  Some functions are actually named
5289     something starting with __ and the normal name is an alias.  */
5290 #if defined (__stub_shmat) || defined (__stub___shmat)
5291 choke me
5292 #else
5293 shmat();
5294 #endif
5295
5296 ; return 0; }
5297 EOF
5298 if { (eval echo configure:5299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5299   rm -rf conftest*
5300   eval "ac_cv_func_shmat=yes"
5301 else
5302   echo "configure: failed program was:" >&5
5303   cat conftest.$ac_ext >&5
5304   rm -rf conftest*
5305   eval "ac_cv_func_shmat=no"
5306 fi
5307 rm -f conftest*
5308
5309 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5310   echo "$ac_t""yes" 1>&6
5311   :
5312 else
5313   echo "$ac_t""no" 1>&6
5314 fi
5315
5316     if test $ac_cv_func_shmat = no; then
5317       
5318 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5319 echo "configure:5320: checking for shmat in -lipc" >&5
5320 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5321
5322 xe_check_libs=" -lipc "
5323 cat > conftest.$ac_ext <<EOF
5324 #line 5325 "configure"
5325 #include "confdefs.h"
5326 /* Override any gcc2 internal prototype to avoid an error.  */
5327 /* We use char because int might match the return type of a gcc2
5328     builtin and then its argument prototype would still apply.  */
5329 char shmat();
5330
5331 int main() {
5332 shmat()
5333 ; return 0; }
5334 EOF
5335 if { (eval echo configure:5336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5336   rm -rf conftest*
5337   eval "ac_cv_lib_$ac_lib_var=yes"
5338 else
5339   echo "configure: failed program was:" >&5
5340   cat conftest.$ac_ext >&5
5341   rm -rf conftest*
5342   eval "ac_cv_lib_$ac_lib_var=no"
5343 fi
5344 rm -f conftest*
5345 xe_check_libs=""
5346
5347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5348   echo "$ac_t""yes" 1>&6
5349   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5350 else
5351   echo "$ac_t""no" 1>&6
5352 fi
5353
5354
5355     fi
5356   fi
5357
5358   # Check for libraries that X11R6 Xt/Xaw programs need.
5359   ac_save_LDFLAGS="$LDFLAGS"
5360   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5361   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5362   # check for ICE first), but we must link in the order -lSM -lICE or
5363   # we get undefined symbols.  So assume we have SM if we have ICE.
5364   # These have to be linked with before -lX11, unlike the other
5365   # libraries we check for below, so use a different variable.
5366   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5367   
5368 xe_msg_checking="for IceConnectionNumber in -lICE"
5369 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5370 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5371 echo "configure:5372: checking "$xe_msg_checking"" >&5
5372 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5373
5374 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5375 cat > conftest.$ac_ext <<EOF
5376 #line 5377 "configure"
5377 #include "confdefs.h"
5378 /* Override any gcc2 internal prototype to avoid an error.  */
5379 /* We use char because int might match the return type of a gcc2
5380     builtin and then its argument prototype would still apply.  */
5381 char IceConnectionNumber();
5382
5383 int main() {
5384 IceConnectionNumber()
5385 ; return 0; }
5386 EOF
5387 if { (eval echo configure:5388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5388   rm -rf conftest*
5389   eval "ac_cv_lib_$ac_lib_var=yes"
5390 else
5391   echo "configure: failed program was:" >&5
5392   cat conftest.$ac_ext >&5
5393   rm -rf conftest*
5394   eval "ac_cv_lib_$ac_lib_var=no"
5395 fi
5396 rm -f conftest*
5397 xe_check_libs=""
5398
5399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5400   echo "$ac_t""yes" 1>&6
5401   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5402 else
5403   echo "$ac_t""no" 1>&6
5404 fi
5405
5406
5407   LDFLAGS="$ac_save_LDFLAGS"
5408
5409 fi
5410  # Autoconf claims to find X library and include dirs for us.
5411   if test "$no_x" = "yes"
5412   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5413   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5414   fi
5415 fi
5416
5417 case "$with_x11" in
5418   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5419   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5420 esac
5421
5422 if test "$with_x11" = "yes"; then
5423   { test "$extra_verbose" = "yes" && cat << \EOF
5424     Defining HAVE_X_WINDOWS
5425 EOF
5426 cat >> confdefs.h <<\EOF
5427 #define HAVE_X_WINDOWS 1
5428 EOF
5429 }
5430
5431   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5432   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5433
5434       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5435     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5436     if test -d "$lib_dir" -a -d "$inc_dir"; then
5437       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5438         x_libraries="$lib_dir $x_libraries"
5439         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5440       esac
5441       case "$x_includes" in "$inc_dir"* ) ;; *)
5442         x_includes="$inc_dir $x_includes"
5443         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5444       esac
5445       break;       fi
5446   done
5447
5448     for rel in "X11R6" "X11R5" "X11R4"; do
5449     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5450     if test -d "$lib_dir" -a -d "$inc_dir"; then
5451       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5452         x_libraries="$x_libraries $lib_dir"
5453         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5454       esac
5455       case "$x_includes" in "$inc_dir"* ) ;; *)
5456         x_includes="$x_includes $inc_dir"
5457         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5458       esac
5459       break;     fi
5460   done
5461
5462     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
5463
5464   ld_switch_x_site="$X_LIBS"
5465
5466   
5467 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5468     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5469   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5470   
5471         runpath="" runpath_dirs=""
5472   if test -n "$LD_RUN_PATH"; then
5473     runpath="$LD_RUN_PATH"
5474   elif test "$GCC" = "yes"; then
5475         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5476     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5477     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5478     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5479       case "$arg" in P,* | -L* | -R* )
5480         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5481           {
5482 xe_runpath_dir="$dir"
5483   test "$xe_runpath_dir" != "/lib"     -a \
5484         "$xe_runpath_dir" != "/usr/lib" -a \
5485         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5486   eval "$xe_add_unique_runpath_dir"
5487 }
5488         done ;;
5489       esac
5490     done
5491     ld_switch_run="$ld_switch_run_save"
5492     rm -f conftest*
5493   else
5494         for arg in $ld_switch_site $ld_switch_x_site; do
5495       case "$arg" in -L*) {
5496 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5497   test "$xe_runpath_dir" != "/lib"     -a \
5498         "$xe_runpath_dir" != "/usr/lib" -a \
5499         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5500   eval "$xe_add_unique_runpath_dir"
5501 };; esac
5502     done
5503         if test "$opsys $need_motif" = "sol2 yes"; then
5504       xe_runpath_dir="/opt/SUNWdt/lib";
5505       eval "$xe_add_unique_runpath_dir";
5506     fi
5507   fi 
5508   if test -n "$runpath"; then
5509     ld_switch_run="${dash_r}${runpath}"
5510     
5511 if test "$GCC" = "yes"; then
5512   set x $ld_switch_run; shift; ld_switch_run=""
5513   while test -n "$1"; do
5514     case $1 in
5515       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5516       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5517       -Xlinker* ) ;;
5518       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5519     esac
5520     shift
5521   done
5522 fi
5523     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5524   fi
5525 fi
5526
5527
5528   if test "$extra_verbose" = "yes"; then
5529     echo; echo "X11 compilation variables:"
5530     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5531     echo
5532   fi
5533
5534             bitmapdirs=
5535   if test "$x_includes" != NONE; then
5536     for i in $x_includes; do
5537       if test -d "$i/bitmaps"; then
5538         bitmapdirs="$i/bitmaps:$bitmapdirs"
5539       fi
5540       if test -d "$i/X11/bitmaps"; then
5541         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5542       fi
5543     done
5544     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5545   fi
5546   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5547     Defining BITMAPDIR = "$bitmapdirs"
5548 EOF
5549 cat >> confdefs.h <<EOF
5550 #define BITMAPDIR "$bitmapdirs"
5551 EOF
5552 }
5553
5554
5555     echo "checking for X defines extracted by xmkmf" 1>&6
5556 echo "configure:5557: checking for X defines extracted by xmkmf" >&5
5557   rm -fr conftestdir
5558   if mkdir conftestdir; then
5559     cd conftestdir
5560     cat > Imakefile <<'EOF'
5561 xetest:
5562         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5563 EOF
5564     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5565       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5566       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5567     fi
5568     cd ..
5569     rm -fr conftestdir
5570     for word in $xmkmf_defines; do
5571       case "$word" in
5572         -D*=* ) ;;
5573         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5574               { test "$extra_verbose" = "yes" && cat << EOF
5575     Defining $word
5576 EOF
5577 cat >> confdefs.h <<EOF
5578 #define $word 1
5579 EOF
5580 }
5581  ;;
5582       esac
5583     done
5584   fi
5585
5586     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5587 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5588 echo "configure:5589: checking for X11/Intrinsic.h" >&5
5589
5590 cat > conftest.$ac_ext <<EOF
5591 #line 5592 "configure"
5592 #include "confdefs.h"
5593 #include <X11/Intrinsic.h>
5594 EOF
5595 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5596 { (eval echo configure:5597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5597 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5598 if test -z "$ac_err"; then
5599   rm -rf conftest*
5600   eval "ac_cv_header_$ac_safe=yes"
5601 else
5602   echo "$ac_err" >&5
5603   echo "configure: failed program was:" >&5
5604   cat conftest.$ac_ext >&5
5605   rm -rf conftest*
5606   eval "ac_cv_header_$ac_safe=no"
5607 fi
5608 rm -f conftest*
5609 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5610   echo "$ac_t""yes" 1>&6
5611   :
5612 else
5613   echo "$ac_t""no" 1>&6
5614 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5615 fi
5616
5617
5618       
5619 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5620 echo "configure:5621: checking for XOpenDisplay in -lX11" >&5
5621 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5622
5623 xe_check_libs=" -lX11 "
5624 cat > conftest.$ac_ext <<EOF
5625 #line 5626 "configure"
5626 #include "confdefs.h"
5627 /* Override any gcc2 internal prototype to avoid an error.  */
5628 /* We use char because int might match the return type of a gcc2
5629     builtin and then its argument prototype would still apply.  */
5630 char XOpenDisplay();
5631
5632 int main() {
5633 XOpenDisplay()
5634 ; return 0; }
5635 EOF
5636 if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5637   rm -rf conftest*
5638   eval "ac_cv_lib_$ac_lib_var=yes"
5639 else
5640   echo "configure: failed program was:" >&5
5641   cat conftest.$ac_ext >&5
5642   rm -rf conftest*
5643   eval "ac_cv_lib_$ac_lib_var=no"
5644 fi
5645 rm -f conftest*
5646 xe_check_libs=""
5647
5648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5649   echo "$ac_t""yes" 1>&6
5650   have_lib_x11=yes
5651 else
5652   echo "$ac_t""no" 1>&6
5653 fi
5654
5655
5656   if test "$have_lib_x11" != "yes"; then
5657     
5658 xe_msg_checking="for XGetFontProperty in -lX11"
5659 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5660 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5661 echo "configure:5662: checking "$xe_msg_checking"" >&5
5662 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5663
5664 xe_check_libs=" -lX11 -b i486-linuxaout"
5665 cat > conftest.$ac_ext <<EOF
5666 #line 5667 "configure"
5667 #include "confdefs.h"
5668 /* Override any gcc2 internal prototype to avoid an error.  */
5669 /* We use char because int might match the return type of a gcc2
5670     builtin and then its argument prototype would still apply.  */
5671 char XGetFontProperty();
5672
5673 int main() {
5674 XGetFontProperty()
5675 ; return 0; }
5676 EOF
5677 if { (eval echo configure:5678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5678   rm -rf conftest*
5679   eval "ac_cv_lib_$ac_lib_var=yes"
5680 else
5681   echo "configure: failed program was:" >&5
5682   cat conftest.$ac_ext >&5
5683   rm -rf conftest*
5684   eval "ac_cv_lib_$ac_lib_var=no"
5685 fi
5686 rm -f conftest*
5687 xe_check_libs=""
5688
5689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5690   echo "$ac_t""yes" 1>&6
5691   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5692 else
5693   echo "$ac_t""no" 1>&6
5694 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5695 fi
5696
5697
5698   fi
5699   libs_x="-lX11"
5700   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5701
5702     
5703 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5704 echo "configure:5705: checking for XShapeSelectInput in -lXext" >&5
5705 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5706
5707 xe_check_libs=" -lXext "
5708 cat > conftest.$ac_ext <<EOF
5709 #line 5710 "configure"
5710 #include "confdefs.h"
5711 /* Override any gcc2 internal prototype to avoid an error.  */
5712 /* We use char because int might match the return type of a gcc2
5713     builtin and then its argument prototype would still apply.  */
5714 char XShapeSelectInput();
5715
5716 int main() {
5717 XShapeSelectInput()
5718 ; return 0; }
5719 EOF
5720 if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5721   rm -rf conftest*
5722   eval "ac_cv_lib_$ac_lib_var=yes"
5723 else
5724   echo "configure: failed program was:" >&5
5725   cat conftest.$ac_ext >&5
5726   rm -rf conftest*
5727   eval "ac_cv_lib_$ac_lib_var=no"
5728 fi
5729 rm -f conftest*
5730 xe_check_libs=""
5731
5732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5733   echo "$ac_t""yes" 1>&6
5734   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5735 else
5736   echo "$ac_t""no" 1>&6
5737 fi
5738
5739
5740
5741     
5742 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5743 echo "configure:5744: checking for XtOpenDisplay in -lXt" >&5
5744 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5745
5746 xe_check_libs=" -lXt "
5747 cat > conftest.$ac_ext <<EOF
5748 #line 5749 "configure"
5749 #include "confdefs.h"
5750 /* Override any gcc2 internal prototype to avoid an error.  */
5751 /* We use char because int might match the return type of a gcc2
5752     builtin and then its argument prototype would still apply.  */
5753 char XtOpenDisplay();
5754
5755 int main() {
5756 XtOpenDisplay()
5757 ; return 0; }
5758 EOF
5759 if { (eval echo configure:5760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5760   rm -rf conftest*
5761   eval "ac_cv_lib_$ac_lib_var=yes"
5762 else
5763   echo "configure: failed program was:" >&5
5764   cat conftest.$ac_ext >&5
5765   rm -rf conftest*
5766   eval "ac_cv_lib_$ac_lib_var=no"
5767 fi
5768 rm -f conftest*
5769 xe_check_libs=""
5770
5771 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5772   echo "$ac_t""yes" 1>&6
5773   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5774 else
5775   echo "$ac_t""no" 1>&6
5776 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5777 fi
5778
5779
5780
5781   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5782 echo "configure:5783: checking the version of X11 being used" >&5
5783   cat > conftest.$ac_ext <<EOF
5784 #line 5785 "configure"
5785 #include "confdefs.h"
5786 #include <X11/Intrinsic.h>
5787     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5788 EOF
5789 if { (eval echo configure:5790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5790 then
5791   ./conftest foobar; x11_release=$?
5792 else
5793   conftest_rc="$?"
5794   echo "configure: failed program was:" >&5
5795   cat conftest.$ac_ext >&5
5796   rm -fr conftest*
5797   x11_release=4
5798 fi
5799 rm -fr conftest*
5800   echo "$ac_t""R${x11_release}" 1>&6
5801   { test "$extra_verbose" = "yes" && cat << EOF
5802     Defining THIS_IS_X11R${x11_release}
5803 EOF
5804 cat >> confdefs.h <<EOF
5805 #define THIS_IS_X11R${x11_release} 1
5806 EOF
5807 }
5808
5809
5810   for ac_hdr in X11/Xlocale.h
5811 do
5812 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5813 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5814 echo "configure:5815: checking for $ac_hdr" >&5
5815
5816 cat > conftest.$ac_ext <<EOF
5817 #line 5818 "configure"
5818 #include "confdefs.h"
5819 #include <$ac_hdr>
5820 EOF
5821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5822 { (eval echo configure:5823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5824 if test -z "$ac_err"; then
5825   rm -rf conftest*
5826   eval "ac_cv_header_$ac_safe=yes"
5827 else
5828   echo "$ac_err" >&5
5829   echo "configure: failed program was:" >&5
5830   cat conftest.$ac_ext >&5
5831   rm -rf conftest*
5832   eval "ac_cv_header_$ac_safe=no"
5833 fi
5834 rm -f conftest*
5835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5836   echo "$ac_t""yes" 1>&6
5837     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5838   { test "$extra_verbose" = "yes" && cat << EOF
5839     Defining $ac_tr_hdr
5840 EOF
5841 cat >> confdefs.h <<EOF
5842 #define $ac_tr_hdr 1
5843 EOF
5844 }
5845  
5846 else
5847   echo "$ac_t""no" 1>&6
5848 fi
5849 done
5850
5851
5852     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5853 echo "configure:5854: checking for XFree86" >&5
5854   if test -d "/usr/X386/include" -o \
5855           -f "/etc/XF86Config"    -o \
5856           -f "/etc/X11/XF86Config" -o \
5857           -f "/usr/X11R6/lib/X11/XF86Config"; then
5858     echo "$ac_t""yes" 1>&6
5859     { test "$extra_verbose" = "yes" && cat << \EOF
5860     Defining HAVE_XFREE386
5861 EOF
5862 cat >> confdefs.h <<\EOF
5863 #define HAVE_XFREE386 1
5864 EOF
5865 }
5866
5867   else
5868     echo "$ac_t""no" 1>&6
5869   fi
5870
5871     test -z "$with_xmu" && { 
5872 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5873 echo "configure:5874: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5874 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5875
5876 xe_check_libs=" -lXmu "
5877 cat > conftest.$ac_ext <<EOF
5878 #line 5879 "configure"
5879 #include "confdefs.h"
5880 /* Override any gcc2 internal prototype to avoid an error.  */
5881 /* We use char because int might match the return type of a gcc2
5882     builtin and then its argument prototype would still apply.  */
5883 char XmuReadBitmapDataFromFile();
5884
5885 int main() {
5886 XmuReadBitmapDataFromFile()
5887 ; return 0; }
5888 EOF
5889 if { (eval echo configure:5890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5890   rm -rf conftest*
5891   eval "ac_cv_lib_$ac_lib_var=yes"
5892 else
5893   echo "configure: failed program was:" >&5
5894   cat conftest.$ac_ext >&5
5895   rm -rf conftest*
5896   eval "ac_cv_lib_$ac_lib_var=no"
5897 fi
5898 rm -f conftest*
5899 xe_check_libs=""
5900
5901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5902   echo "$ac_t""yes" 1>&6
5903   with_xmu=yes
5904 else
5905   echo "$ac_t""no" 1>&6
5906 with_xmu=no
5907 fi
5908
5909  }
5910   if test "$with_xmu" = "no"; then
5911     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
5912    echo "    xemacs will be linked with \"xmu.o\""
5913  fi
5914   else
5915     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
5916     { test "$extra_verbose" = "yes" && cat << \EOF
5917     Defining HAVE_XMU
5918 EOF
5919 cat >> confdefs.h <<\EOF
5920 #define HAVE_XMU 1
5921 EOF
5922 }
5923
5924   fi
5925
5926       
5927 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
5928 echo "configure:5929: checking for main in -lXbsd" >&5
5929 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
5930
5931 xe_check_libs=" -lXbsd "
5932 cat > conftest.$ac_ext <<EOF
5933 #line 5934 "configure"
5934 #include "confdefs.h"
5935
5936 int main() {
5937 main()
5938 ; return 0; }
5939 EOF
5940 if { (eval echo configure:5941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5941   rm -rf conftest*
5942   eval "ac_cv_lib_$ac_lib_var=yes"
5943 else
5944   echo "configure: failed program was:" >&5
5945   cat conftest.$ac_ext >&5
5946   rm -rf conftest*
5947   eval "ac_cv_lib_$ac_lib_var=no"
5948 fi
5949 rm -f conftest*
5950 xe_check_libs=""
5951
5952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5953   echo "$ac_t""yes" 1>&6
5954   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
5955 else
5956   echo "$ac_t""no" 1>&6
5957 fi
5958
5959
5960
5961     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
5962         if test "$GCC" = "yes"; then
5963       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
5964       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
5965     else
5966       case "$CC" in
5967         "xlc" ) CC="xlc_r" ;;
5968         "xlC" ) CC="xlC_r" ;;
5969         "cc"  ) CC="cc_r" ;;
5970       esac
5971     fi
5972   fi
5973
5974 fi 
5975 if test "$with_msw" != "no"; then
5976   echo "checking for MS-Windows" 1>&6
5977 echo "configure:5978: checking for MS-Windows" >&5
5978   
5979 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
5980 echo "configure:5981: checking for main in -lgdi32" >&5
5981 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
5982
5983 xe_check_libs=" -lgdi32 "
5984 cat > conftest.$ac_ext <<EOF
5985 #line 5986 "configure"
5986 #include "confdefs.h"
5987
5988 int main() {
5989 main()
5990 ; return 0; }
5991 EOF
5992 if { (eval echo configure:5993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5993   rm -rf conftest*
5994   eval "ac_cv_lib_$ac_lib_var=yes"
5995 else
5996   echo "configure: failed program was:" >&5
5997   cat conftest.$ac_ext >&5
5998   rm -rf conftest*
5999   eval "ac_cv_lib_$ac_lib_var=no"
6000 fi
6001 rm -f conftest*
6002 xe_check_libs=""
6003
6004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6005   echo "$ac_t""yes" 1>&6
6006   with_msw=yes
6007 else
6008   echo "$ac_t""no" 1>&6
6009 fi
6010
6011
6012   if test "$with_msw" = "yes"; then
6013     { test "$extra_verbose" = "yes" && cat << \EOF
6014     Defining HAVE_MS_WINDOWS
6015 EOF
6016 cat >> confdefs.h <<\EOF
6017 #define HAVE_MS_WINDOWS 1
6018 EOF
6019 }
6020
6021     install_pp="$blddir/lib-src/installexe.sh"
6022     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
6023     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6024     if test "$window_system" != x11; then
6025         window_system=msw
6026         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6027             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6028    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6029  fi
6030         test "$with_menubars"   != "no" && with_menubars=msw \
6031             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6032    echo "    xemacs will be linked with \"menubar-msw.o\""
6033  fi
6034         test "$with_toolbars"   != "no" && with_toolbars=msw \
6035             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6036    echo "    xemacs will be linked with \"toolbar-msw.o\""
6037  fi
6038         test "$with_dialogs"   != "no" && with_dialogs=msw \
6039             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6040    echo "    xemacs will be linked with \"dialog-msw.o\""
6041  fi
6042     else
6043         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6044    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6045  fi
6046         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6047    echo "    xemacs will be linked with \"menubar-msw.o\""
6048  fi
6049         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6050    echo "    xemacs will be linked with \"toolbar-msw.o\""
6051  fi
6052         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6053    echo "    xemacs will be linked with \"dialog-msw.o\""
6054  fi
6055     fi
6056         cat > conftest.$ac_ext <<EOF
6057 #line 6058 "configure"
6058 #include "confdefs.h"
6059 #include <fcntl.h>
6060     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6061 EOF
6062 if { (eval echo configure:6063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6063 then
6064   { test "$extra_verbose" = "yes" && cat << \EOF
6065     Defining HAVE_MSG_SELECT
6066 EOF
6067 cat >> confdefs.h <<\EOF
6068 #define HAVE_MSG_SELECT 1
6069 EOF
6070 }
6071
6072 else
6073   conftest_rc="$?"
6074   echo "configure: failed program was:" >&5
6075   cat conftest.$ac_ext >&5
6076 fi
6077 rm -fr conftest*
6078     const_is_losing=no
6079     with_file_coding=yes
6080     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
6081    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\""
6082  fi
6083   fi
6084 fi
6085
6086
6087
6088 test -z "$window_system" && window_system="none"
6089
6090 if test "$window_system" = "none"; then
6091   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6092   do
6093     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6094        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6095     fi
6096     eval "with_${feature}=no"
6097   done
6098 else
6099   test -z "$with_toolbars" && with_toolbars=yes
6100 fi
6101
6102 if test "$with_msw" != "yes"; then
6103   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6104   do
6105     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6106        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6107     fi
6108     eval "with_${feature}=no"
6109   done
6110 else
6111   :
6112 fi
6113
6114 if test "$with_x11" != "yes"; then
6115             for feature in tooltalk cde offix wmcommand xim xmu
6116   do
6117     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6118        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6119     fi
6120     eval "with_${feature}=no"
6121   done
6122 fi
6123
6124 bitmapdir=
6125
6126 case "$window_system" in
6127   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6128   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6129   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6130 esac
6131
6132 case "$x_libraries" in *X11R4* )
6133   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6134   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6135 esac
6136
6137 echo "checking for WM_COMMAND option" 1>&6
6138 echo "configure:6139: checking for WM_COMMAND option" >&5;
6139 if test "$with_wmcommand" != "no"; then
6140   { test "$extra_verbose" = "yes" && cat << \EOF
6141     Defining HAVE_WMCOMMAND
6142 EOF
6143 cat >> confdefs.h <<\EOF
6144 #define HAVE_WMCOMMAND 1
6145 EOF
6146 }
6147
6148 fi
6149
6150 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6151 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6152 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6153 echo "configure:6154: checking for X11/Xauth.h" >&5
6154
6155 cat > conftest.$ac_ext <<EOF
6156 #line 6157 "configure"
6157 #include "confdefs.h"
6158 #include <X11/Xauth.h>
6159 EOF
6160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6161 { (eval echo configure:6162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6163 if test -z "$ac_err"; then
6164   rm -rf conftest*
6165   eval "ac_cv_header_$ac_safe=yes"
6166 else
6167   echo "$ac_err" >&5
6168   echo "configure: failed program was:" >&5
6169   cat conftest.$ac_ext >&5
6170   rm -rf conftest*
6171   eval "ac_cv_header_$ac_safe=no"
6172 fi
6173 rm -f conftest*
6174 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6175   echo "$ac_t""yes" 1>&6
6176   :
6177 else
6178   echo "$ac_t""no" 1>&6
6179 with_xauth=no
6180 fi
6181  }
6182 test -z "$with_xauth" && { 
6183 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6184 echo "configure:6185: checking for XauGetAuthByAddr in -lXau" >&5
6185 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6186
6187 xe_check_libs=" -lXau "
6188 cat > conftest.$ac_ext <<EOF
6189 #line 6190 "configure"
6190 #include "confdefs.h"
6191 /* Override any gcc2 internal prototype to avoid an error.  */
6192 /* We use char because int might match the return type of a gcc2
6193     builtin and then its argument prototype would still apply.  */
6194 char XauGetAuthByAddr();
6195
6196 int main() {
6197 XauGetAuthByAddr()
6198 ; return 0; }
6199 EOF
6200 if { (eval echo configure:6201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6201   rm -rf conftest*
6202   eval "ac_cv_lib_$ac_lib_var=yes"
6203 else
6204   echo "configure: failed program was:" >&5
6205   cat conftest.$ac_ext >&5
6206   rm -rf conftest*
6207   eval "ac_cv_lib_$ac_lib_var=no"
6208 fi
6209 rm -f conftest*
6210 xe_check_libs=""
6211
6212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6213   echo "$ac_t""yes" 1>&6
6214   :
6215 else
6216   echo "$ac_t""no" 1>&6
6217 with_xauth=no
6218 fi
6219
6220  }
6221 test -z "$with_xauth" && with_xauth=yes
6222 if test "$with_xauth" = "yes"; then
6223   { test "$extra_verbose" = "yes" && cat << \EOF
6224     Defining HAVE_XAUTH
6225 EOF
6226 cat >> confdefs.h <<\EOF
6227 #define HAVE_XAUTH 1
6228 EOF
6229 }
6230
6231   
6232 T=""
6233 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
6234 libs_xauth="$T"
6235
6236 fi
6237
6238
6239
6240
6241 if test "$with_tooltalk" != "no" ; then
6242       for dir in "" "Tt/" "desktop/" ; do
6243     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6244 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6245 echo "configure:6246: checking for ${dir}tt_c.h" >&5
6246
6247 cat > conftest.$ac_ext <<EOF
6248 #line 6249 "configure"
6249 #include "confdefs.h"
6250 #include <${dir}tt_c.h>
6251 EOF
6252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6253 { (eval echo configure:6254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6255 if test -z "$ac_err"; then
6256   rm -rf conftest*
6257   eval "ac_cv_header_$ac_safe=yes"
6258 else
6259   echo "$ac_err" >&5
6260   echo "configure: failed program was:" >&5
6261   cat conftest.$ac_ext >&5
6262   rm -rf conftest*
6263   eval "ac_cv_header_$ac_safe=no"
6264 fi
6265 rm -f conftest*
6266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6267   echo "$ac_t""yes" 1>&6
6268   tt_c_h_path="${dir}tt_c.h"; break
6269 else
6270   echo "$ac_t""no" 1>&6
6271 fi
6272
6273   done
6274   if test -z "$tt_c_h_path"; then
6275     if test "$with_tooltalk" = "yes"; then
6276       (echo "$progname: Usage error:"
6277 echo " " "Unable to find required tooltalk header files."
6278 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6279     fi
6280     with_tooltalk=no
6281   fi
6282 fi
6283 if test "$with_tooltalk" != "no" ; then
6284   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6285     
6286 xe_msg_checking="for tt_message_create in -ltt"
6287 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6288 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6289 echo "configure:6290: checking "$xe_msg_checking"" >&5
6290 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6291
6292 xe_check_libs=" -ltt $extra_libs"
6293 cat > conftest.$ac_ext <<EOF
6294 #line 6295 "configure"
6295 #include "confdefs.h"
6296 /* Override any gcc2 internal prototype to avoid an error.  */
6297 /* We use char because int might match the return type of a gcc2
6298     builtin and then its argument prototype would still apply.  */
6299 char tt_message_create();
6300
6301 int main() {
6302 tt_message_create()
6303 ; return 0; }
6304 EOF
6305 if { (eval echo configure:6306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6306   rm -rf conftest*
6307   eval "ac_cv_lib_$ac_lib_var=yes"
6308 else
6309   echo "configure: failed program was:" >&5
6310   cat conftest.$ac_ext >&5
6311   rm -rf conftest*
6312   eval "ac_cv_lib_$ac_lib_var=no"
6313 fi
6314 rm -f conftest*
6315 xe_check_libs=""
6316
6317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6318   echo "$ac_t""yes" 1>&6
6319   tt_libs="-ltt $extra_libs"; break
6320 else
6321   echo "$ac_t""no" 1>&6
6322 :
6323 fi
6324
6325
6326   done
6327   if test -z "$tt_libs"; then
6328     if test "$with_tooltalk" = "yes"; then
6329       (echo "$progname: Usage error:"
6330 echo " " "Unable to find required tooltalk libraries."
6331 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6332     fi
6333     with_tooltalk=no
6334   fi
6335 fi
6336 test -z "$with_tooltalk" && with_tooltalk=yes
6337 if test "$with_tooltalk" = "yes"; then
6338   { test "$extra_verbose" = "yes" && cat << \EOF
6339     Defining TOOLTALK
6340 EOF
6341 cat >> confdefs.h <<\EOF
6342 #define TOOLTALK 1
6343 EOF
6344 }
6345
6346   { test "$extra_verbose" = "yes" && cat << EOF
6347     Defining TT_C_H_PATH = "$tt_c_h_path"
6348 EOF
6349 cat >> confdefs.h <<EOF
6350 #define TT_C_H_PATH "$tt_c_h_path"
6351 EOF
6352 }
6353
6354   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6355   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6356    echo "    xemacs will be linked with \"tooltalk.o\""
6357  fi
6358 fi
6359
6360 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6361 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6362 echo "configure:6363: checking for Dt/Dt.h" >&5
6363
6364 cat > conftest.$ac_ext <<EOF
6365 #line 6366 "configure"
6366 #include "confdefs.h"
6367 #include <Dt/Dt.h>
6368 EOF
6369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6370 { (eval echo configure:6371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6372 if test -z "$ac_err"; then
6373   rm -rf conftest*
6374   eval "ac_cv_header_$ac_safe=yes"
6375 else
6376   echo "$ac_err" >&5
6377   echo "configure: failed program was:" >&5
6378   cat conftest.$ac_ext >&5
6379   rm -rf conftest*
6380   eval "ac_cv_header_$ac_safe=no"
6381 fi
6382 rm -f conftest*
6383 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6384   echo "$ac_t""yes" 1>&6
6385   :
6386 else
6387   echo "$ac_t""no" 1>&6
6388 with_cde=no
6389 fi
6390  }
6391 test -z "$with_cde" && { 
6392 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6393 echo "configure:6394: checking for DtDndDragStart in -lDtSvc" >&5
6394 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6395
6396 xe_check_libs=" -lDtSvc "
6397 cat > conftest.$ac_ext <<EOF
6398 #line 6399 "configure"
6399 #include "confdefs.h"
6400 /* Override any gcc2 internal prototype to avoid an error.  */
6401 /* We use char because int might match the return type of a gcc2
6402     builtin and then its argument prototype would still apply.  */
6403 char DtDndDragStart();
6404
6405 int main() {
6406 DtDndDragStart()
6407 ; return 0; }
6408 EOF
6409 if { (eval echo configure:6410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6410   rm -rf conftest*
6411   eval "ac_cv_lib_$ac_lib_var=yes"
6412 else
6413   echo "configure: failed program was:" >&5
6414   cat conftest.$ac_ext >&5
6415   rm -rf conftest*
6416   eval "ac_cv_lib_$ac_lib_var=no"
6417 fi
6418 rm -f conftest*
6419 xe_check_libs=""
6420
6421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6422   echo "$ac_t""yes" 1>&6
6423   :
6424 else
6425   echo "$ac_t""no" 1>&6
6426 with_cde=no
6427 fi
6428
6429  }
6430 test -z "$with_cde" && with_cde=yes
6431 if test "$with_dragndrop" = no; then
6432   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6433   with_cde=no
6434 fi
6435 if test "$with_cde" = "yes" ; then
6436   { test "$extra_verbose" = "yes" && cat << \EOF
6437     Defining HAVE_CDE
6438 EOF
6439 cat >> confdefs.h <<\EOF
6440 #define HAVE_CDE 1
6441 EOF
6442 }
6443
6444   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6445   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6446   with_tooltalk=yes # CDE requires Tooltalk
6447   need_motif=yes    # CDE requires Motif
6448 fi
6449
6450 test "$window_system" != "x11" && with_offix=no
6451 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6452   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6453   with_offix=no
6454 fi
6455 if test "$with_dragndrop" = no; then
6456   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6457   with_offix=no
6458 fi
6459 if test "$with_cde" = yes; then
6460   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6461   with_offix=no
6462 fi
6463 test -z "$with_offix" && with_offix=no
6464 if test "$with_offix" = "yes"; then
6465   { test "$extra_verbose" = "yes" && cat << \EOF
6466     Defining HAVE_OFFIX_DND
6467 EOF
6468 cat >> confdefs.h <<\EOF
6469 #define HAVE_OFFIX_DND 1
6470 EOF
6471 }
6472
6473   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6474   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6475 fi
6476
6477 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6478 echo "configure:6479: checking if drag and drop API is needed" >&5
6479 if test "$with_dragndrop" != "no" ; then
6480   if test -n "$dragndrop_proto" ; then
6481     with_dragndrop=yes
6482     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6483     { test "$extra_verbose" = "yes" && cat << \EOF
6484     Defining HAVE_DRAGNDROP
6485 EOF
6486 cat >> confdefs.h <<\EOF
6487 #define HAVE_DRAGNDROP 1
6488 EOF
6489 }
6490
6491     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6492   else
6493     with_dragndrop=no
6494     echo "$ac_t""no" 1>&6
6495   fi
6496 fi
6497
6498 echo "checking for LDAP" 1>&6
6499 echo "configure:6500: checking for LDAP" >&5
6500 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6501 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6502 echo "configure:6503: checking for ldap.h" >&5
6503
6504 cat > conftest.$ac_ext <<EOF
6505 #line 6506 "configure"
6506 #include "confdefs.h"
6507 #include <ldap.h>
6508 EOF
6509 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6510 { (eval echo configure:6511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6511 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6512 if test -z "$ac_err"; then
6513   rm -rf conftest*
6514   eval "ac_cv_header_$ac_safe=yes"
6515 else
6516   echo "$ac_err" >&5
6517   echo "configure: failed program was:" >&5
6518   cat conftest.$ac_ext >&5
6519   rm -rf conftest*
6520   eval "ac_cv_header_$ac_safe=no"
6521 fi
6522 rm -f conftest*
6523 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6524   echo "$ac_t""yes" 1>&6
6525   :
6526 else
6527   echo "$ac_t""no" 1>&6
6528 with_ldap=no
6529 fi
6530  }
6531 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6532 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6533 echo "configure:6534: checking for lber.h" >&5
6534
6535 cat > conftest.$ac_ext <<EOF
6536 #line 6537 "configure"
6537 #include "confdefs.h"
6538 #include <lber.h>
6539 EOF
6540 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6541 { (eval echo configure:6542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6542 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6543 if test -z "$ac_err"; then
6544   rm -rf conftest*
6545   eval "ac_cv_header_$ac_safe=yes"
6546 else
6547   echo "$ac_err" >&5
6548   echo "configure: failed program was:" >&5
6549   cat conftest.$ac_ext >&5
6550   rm -rf conftest*
6551   eval "ac_cv_header_$ac_safe=no"
6552 fi
6553 rm -f conftest*
6554 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6555   echo "$ac_t""yes" 1>&6
6556   :
6557 else
6558   echo "$ac_t""no" 1>&6
6559 with_ldap=no
6560 fi
6561  }
6562 if test "$with_ldap" != "no"; then
6563   test -z "$with_umich_ldap" && { 
6564 xe_msg_checking="for ldap_open in -lldap"
6565 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6566 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6567 echo "configure:6568: checking "$xe_msg_checking"" >&5
6568 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6569
6570 xe_check_libs=" -lldap -llber"
6571 cat > conftest.$ac_ext <<EOF
6572 #line 6573 "configure"
6573 #include "confdefs.h"
6574 /* Override any gcc2 internal prototype to avoid an error.  */
6575 /* We use char because int might match the return type of a gcc2
6576     builtin and then its argument prototype would still apply.  */
6577 char ldap_open();
6578
6579 int main() {
6580 ldap_open()
6581 ; return 0; }
6582 EOF
6583 if { (eval echo configure:6584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6584   rm -rf conftest*
6585   eval "ac_cv_lib_$ac_lib_var=yes"
6586 else
6587   echo "configure: failed program was:" >&5
6588   cat conftest.$ac_ext >&5
6589   rm -rf conftest*
6590   eval "ac_cv_lib_$ac_lib_var=no"
6591 fi
6592 rm -f conftest*
6593 xe_check_libs=""
6594
6595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6596   echo "$ac_t""yes" 1>&6
6597   with_umich_ldap=yes
6598 else
6599   echo "$ac_t""no" 1>&6
6600 with_umich_ldap=no
6601 fi
6602
6603  }
6604   test "$with_umich_ldap" = "no" && { 
6605 echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6
6606 echo "configure:6607: checking for ldap_set_option in -lldap10" >&5
6607 ac_lib_var=`echo ldap10'_'ldap_set_option | sed 'y%./+-%__p_%'`
6608
6609 xe_check_libs=" -lldap10 "
6610 cat > conftest.$ac_ext <<EOF
6611 #line 6612 "configure"
6612 #include "confdefs.h"
6613 /* Override any gcc2 internal prototype to avoid an error.  */
6614 /* We use char because int might match the return type of a gcc2
6615     builtin and then its argument prototype would still apply.  */
6616 char ldap_set_option();
6617
6618 int main() {
6619 ldap_set_option()
6620 ; return 0; }
6621 EOF
6622 if { (eval echo configure:6623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6623   rm -rf conftest*
6624   eval "ac_cv_lib_$ac_lib_var=yes"
6625 else
6626   echo "configure: failed program was:" >&5
6627   cat conftest.$ac_ext >&5
6628   rm -rf conftest*
6629   eval "ac_cv_lib_$ac_lib_var=no"
6630 fi
6631 rm -f conftest*
6632 xe_check_libs=""
6633
6634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6635   echo "$ac_t""yes" 1>&6
6636   with_ns_ldap=yes
6637 else
6638   echo "$ac_t""no" 1>&6
6639 with_ns_ldap=no
6640 fi
6641
6642  }
6643   test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes
6644 fi
6645 if test "$with_ldap" = "yes"; then
6646   { test "$extra_verbose" = "yes" && cat << \EOF
6647     Defining HAVE_LDAP
6648 EOF
6649 cat >> confdefs.h <<\EOF
6650 #define HAVE_LDAP 1
6651 EOF
6652 }
6653
6654   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6655    echo "    xemacs will be linked with \"eldap.o\""
6656  fi
6657   if test "$with_umich_ldap" = "yes" ; then
6658     { test "$extra_verbose" = "yes" && cat << \EOF
6659     Defining HAVE_UMICH_LDAP
6660 EOF
6661 cat >> confdefs.h <<\EOF
6662 #define HAVE_UMICH_LDAP 1
6663 EOF
6664 }
6665
6666     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6667     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6668   elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then
6669     { test "$extra_verbose" = "yes" && cat << \EOF
6670     Defining HAVE_NS_LDAP
6671 EOF
6672 cat >> confdefs.h <<\EOF
6673 #define HAVE_NS_LDAP 1
6674 EOF
6675 }
6676
6677     LIBS="-lldap10 $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap10\" to \$LIBS"; fi
6678   elif test "$with_ldap" = "yes" ; then
6679     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6680   fi
6681 fi
6682
6683
6684 if test "$window_system" != "none"; then
6685   echo "checking for graphics libraries" 1>&6
6686 echo "configure:6687: checking for graphics libraries" >&5
6687
6688     xpm_problem=""
6689   if test -z "$with_xpm"; then
6690     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6691 echo "configure:6692: checking for Xpm - no older than 3.4f" >&5
6692     xe_check_libs=-lXpm
6693     cat > conftest.$ac_ext <<EOF
6694 #line 6695 "configure"
6695 #include "confdefs.h"
6696 #include <X11/xpm.h>
6697     int main(int c, char **v) {
6698     return c == 1 ? 0 :
6699       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6700       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6701 EOF
6702 if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6703 then
6704   ./conftest dummy_arg; xpm_status=$?;
6705       if test "$xpm_status" = "0"; then
6706         with_xpm=yes;
6707       else
6708         with_xpm=no;
6709         if test "$xpm_status" = "1"; then
6710           xpm_problem="Xpm library version and header file version don't match!"
6711         elif test "$xpm_status" = "2"; then
6712           xpm_problem="Xpm library version is too old!"
6713         else
6714           xpm_problem="Internal xpm detection logic error!"
6715         fi
6716         echo "
6717 *** WARNING *** $xpm_problem
6718   I'm not touching that with a 10-foot pole!
6719   If you really want to use the installed version of Xpm, rerun
6720   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
6721     fi
6722 else
6723   conftest_rc="$?"
6724   echo "configure: failed program was:" >&5
6725   cat conftest.$ac_ext >&5
6726   rm -fr conftest*
6727   with_xpm=no
6728 fi
6729 rm -fr conftest*
6730     xe_check_libs=
6731     echo "$ac_t""$with_xpm" 1>&6
6732   fi
6733   if test "$with_xpm" = "yes"; then
6734     { test "$extra_verbose" = "yes" && cat << \EOF
6735     Defining HAVE_XPM
6736 EOF
6737 cat >> confdefs.h <<\EOF
6738 #define HAVE_XPM 1
6739 EOF
6740 }
6741
6742     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6743     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6744 echo "configure:6745: checking for \"FOR_MSW\" xpm" >&5
6745     xe_check_libs=-lXpm
6746     cat > conftest.$ac_ext <<EOF
6747 #line 6748 "configure"
6748 #include "confdefs.h"
6749
6750 int main() {
6751 XpmCreatePixmapFromData()
6752 ; return 0; }
6753 EOF
6754 if { (eval echo configure:6755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6755   rm -rf conftest*
6756   xpm_for_msw=no
6757 else
6758   echo "configure: failed program was:" >&5
6759   cat conftest.$ac_ext >&5
6760   rm -rf conftest*
6761   xpm_for_msw=yes
6762 fi
6763 rm -f conftest*
6764     xe_check_libs=
6765     echo "$ac_t""$xpm_for_msw" 1>&6
6766     if test "$xpm_for_msw" = "yes"; then
6767       { test "$extra_verbose" = "yes" && cat << \EOF
6768     Defining FOR_MSW
6769 EOF
6770 cat >> confdefs.h <<\EOF
6771 #define FOR_MSW 1
6772 EOF
6773 }
6774
6775     fi
6776   fi
6777
6778     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
6779 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
6780 echo "configure:6781: checking for compface.h" >&5
6781
6782 cat > conftest.$ac_ext <<EOF
6783 #line 6784 "configure"
6784 #include "confdefs.h"
6785 #include <compface.h>
6786 EOF
6787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6788 { (eval echo configure:6789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6790 if test -z "$ac_err"; then
6791   rm -rf conftest*
6792   eval "ac_cv_header_$ac_safe=yes"
6793 else
6794   echo "$ac_err" >&5
6795   echo "configure: failed program was:" >&5
6796   cat conftest.$ac_ext >&5
6797   rm -rf conftest*
6798   eval "ac_cv_header_$ac_safe=no"
6799 fi
6800 rm -f conftest*
6801 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6802   echo "$ac_t""yes" 1>&6
6803   :
6804 else
6805   echo "$ac_t""no" 1>&6
6806 with_xface=no
6807 fi
6808  }
6809   test -z "$with_xface" && { 
6810 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
6811 echo "configure:6812: checking for UnGenFace in -lcompface" >&5
6812 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
6813
6814 xe_check_libs=" -lcompface "
6815 cat > conftest.$ac_ext <<EOF
6816 #line 6817 "configure"
6817 #include "confdefs.h"
6818 /* Override any gcc2 internal prototype to avoid an error.  */
6819 /* We use char because int might match the return type of a gcc2
6820     builtin and then its argument prototype would still apply.  */
6821 char UnGenFace();
6822
6823 int main() {
6824 UnGenFace()
6825 ; return 0; }
6826 EOF
6827 if { (eval echo configure:6828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6828   rm -rf conftest*
6829   eval "ac_cv_lib_$ac_lib_var=yes"
6830 else
6831   echo "configure: failed program was:" >&5
6832   cat conftest.$ac_ext >&5
6833   rm -rf conftest*
6834   eval "ac_cv_lib_$ac_lib_var=no"
6835 fi
6836 rm -f conftest*
6837 xe_check_libs=""
6838
6839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6840   echo "$ac_t""yes" 1>&6
6841   : 
6842 else
6843   echo "$ac_t""no" 1>&6
6844 with_xface=no
6845 fi
6846
6847  }
6848   test -z "$with_xface" && with_xface=yes
6849   if test "$with_xface" = "yes"; then
6850     { test "$extra_verbose" = "yes" && cat << \EOF
6851     Defining HAVE_XFACE
6852 EOF
6853 cat >> confdefs.h <<\EOF
6854 #define HAVE_XFACE 1
6855 EOF
6856 }
6857
6858     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
6859   fi
6860
6861         if test "$with_gif" != "no"; then
6862     with_gif="yes"
6863     { test "$extra_verbose" = "yes" && cat << \EOF
6864     Defining HAVE_GIF
6865 EOF
6866 cat >> confdefs.h <<\EOF
6867 #define HAVE_GIF 1
6868 EOF
6869 }
6870
6871     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
6872    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
6873  fi
6874   fi
6875
6876       if test "$with_png $with_tiff" != "no no"; then
6877     
6878 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
6879 echo "configure:6880: checking for inflate in -lc" >&5
6880 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
6881
6882 xe_check_libs=" -lc "
6883 cat > conftest.$ac_ext <<EOF
6884 #line 6885 "configure"
6885 #include "confdefs.h"
6886 /* Override any gcc2 internal prototype to avoid an error.  */
6887 /* We use char because int might match the return type of a gcc2
6888     builtin and then its argument prototype would still apply.  */
6889 char inflate();
6890
6891 int main() {
6892 inflate()
6893 ; return 0; }
6894 EOF
6895 if { (eval echo configure:6896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6896   rm -rf conftest*
6897   eval "ac_cv_lib_$ac_lib_var=yes"
6898 else
6899   echo "configure: failed program was:" >&5
6900   cat conftest.$ac_ext >&5
6901   rm -rf conftest*
6902   eval "ac_cv_lib_$ac_lib_var=no"
6903 fi
6904 rm -f conftest*
6905 xe_check_libs=""
6906
6907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6908   echo "$ac_t""yes" 1>&6
6909   :
6910 else
6911   echo "$ac_t""no" 1>&6
6912
6913 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
6914 echo "configure:6915: checking for inflate in -lz" >&5
6915 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
6916
6917 xe_check_libs=" -lz "
6918 cat > conftest.$ac_ext <<EOF
6919 #line 6920 "configure"
6920 #include "confdefs.h"
6921 /* Override any gcc2 internal prototype to avoid an error.  */
6922 /* We use char because int might match the return type of a gcc2
6923     builtin and then its argument prototype would still apply.  */
6924 char inflate();
6925
6926 int main() {
6927 inflate()
6928 ; return 0; }
6929 EOF
6930 if { (eval echo configure:6931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6931   rm -rf conftest*
6932   eval "ac_cv_lib_$ac_lib_var=yes"
6933 else
6934   echo "configure: failed program was:" >&5
6935   cat conftest.$ac_ext >&5
6936   rm -rf conftest*
6937   eval "ac_cv_lib_$ac_lib_var=no"
6938 fi
6939 rm -f conftest*
6940 xe_check_libs=""
6941
6942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6943   echo "$ac_t""yes" 1>&6
6944   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
6945 else
6946   echo "$ac_t""no" 1>&6
6947
6948 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
6949 echo "configure:6950: checking for inflate in -lgz" >&5
6950 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
6951
6952 xe_check_libs=" -lgz "
6953 cat > conftest.$ac_ext <<EOF
6954 #line 6955 "configure"
6955 #include "confdefs.h"
6956 /* Override any gcc2 internal prototype to avoid an error.  */
6957 /* We use char because int might match the return type of a gcc2
6958     builtin and then its argument prototype would still apply.  */
6959 char inflate();
6960
6961 int main() {
6962 inflate()
6963 ; return 0; }
6964 EOF
6965 if { (eval echo configure:6966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6966   rm -rf conftest*
6967   eval "ac_cv_lib_$ac_lib_var=yes"
6968 else
6969   echo "configure: failed program was:" >&5
6970   cat conftest.$ac_ext >&5
6971   rm -rf conftest*
6972   eval "ac_cv_lib_$ac_lib_var=no"
6973 fi
6974 rm -f conftest*
6975 xe_check_libs=""
6976
6977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6978   echo "$ac_t""yes" 1>&6
6979   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
6980 else
6981   echo "$ac_t""no" 1>&6
6982 fi
6983
6984
6985 fi
6986
6987
6988 fi
6989
6990
6991   fi
6992
6993     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
6994 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
6995 echo "configure:6996: checking for jpeglib.h" >&5
6996
6997 cat > conftest.$ac_ext <<EOF
6998 #line 6999 "configure"
6999 #include "confdefs.h"
7000 #include <jpeglib.h>
7001 EOF
7002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7003 { (eval echo configure:7004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7005 if test -z "$ac_err"; then
7006   rm -rf conftest*
7007   eval "ac_cv_header_$ac_safe=yes"
7008 else
7009   echo "$ac_err" >&5
7010   echo "configure: failed program was:" >&5
7011   cat conftest.$ac_ext >&5
7012   rm -rf conftest*
7013   eval "ac_cv_header_$ac_safe=no"
7014 fi
7015 rm -f conftest*
7016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7017   echo "$ac_t""yes" 1>&6
7018   :
7019 else
7020   echo "$ac_t""no" 1>&6
7021 with_jpeg=no
7022 fi
7023  }
7024   test -z "$with_jpeg" && { 
7025 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7026 echo "configure:7027: checking for jpeg_destroy_decompress in -ljpeg" >&5
7027 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7028
7029 xe_check_libs=" -ljpeg "
7030 cat > conftest.$ac_ext <<EOF
7031 #line 7032 "configure"
7032 #include "confdefs.h"
7033 /* Override any gcc2 internal prototype to avoid an error.  */
7034 /* We use char because int might match the return type of a gcc2
7035     builtin and then its argument prototype would still apply.  */
7036 char jpeg_destroy_decompress();
7037
7038 int main() {
7039 jpeg_destroy_decompress()
7040 ; return 0; }
7041 EOF
7042 if { (eval echo configure:7043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7043   rm -rf conftest*
7044   eval "ac_cv_lib_$ac_lib_var=yes"
7045 else
7046   echo "configure: failed program was:" >&5
7047   cat conftest.$ac_ext >&5
7048   rm -rf conftest*
7049   eval "ac_cv_lib_$ac_lib_var=no"
7050 fi
7051 rm -f conftest*
7052 xe_check_libs=""
7053
7054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7055   echo "$ac_t""yes" 1>&6
7056   :
7057 else
7058   echo "$ac_t""no" 1>&6
7059 with_jpeg=no
7060 fi
7061
7062  }
7063   test -z "$with_jpeg" && with_jpeg=yes
7064   if test "$with_jpeg" = "yes"; then
7065     { test "$extra_verbose" = "yes" && cat << \EOF
7066     Defining HAVE_JPEG
7067 EOF
7068 cat >> confdefs.h <<\EOF
7069 #define HAVE_JPEG 1
7070 EOF
7071 }
7072
7073     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7074   fi
7075
7076     png_problem=""
7077   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7078 echo "configure:7079: checking for pow" >&5
7079
7080 cat > conftest.$ac_ext <<EOF
7081 #line 7082 "configure"
7082 #include "confdefs.h"
7083 /* System header to define __stub macros and hopefully few prototypes,
7084     which can conflict with char pow(); below.  */
7085 #include <assert.h>
7086 /* Override any gcc2 internal prototype to avoid an error.  */
7087 /* We use char because int might match the return type of a gcc2
7088     builtin and then its argument prototype would still apply.  */
7089 char pow();
7090
7091 int main() {
7092
7093 /* The GNU C library defines this for functions which it implements
7094     to always fail with ENOSYS.  Some functions are actually named
7095     something starting with __ and the normal name is an alias.  */
7096 #if defined (__stub_pow) || defined (__stub___pow)
7097 choke me
7098 #else
7099 pow();
7100 #endif
7101
7102 ; return 0; }
7103 EOF
7104 if { (eval echo configure:7105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7105   rm -rf conftest*
7106   eval "ac_cv_func_pow=yes"
7107 else
7108   echo "configure: failed program was:" >&5
7109   cat conftest.$ac_ext >&5
7110   rm -rf conftest*
7111   eval "ac_cv_func_pow=no"
7112 fi
7113 rm -f conftest*
7114
7115 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7116   echo "$ac_t""yes" 1>&6
7117   :
7118 else
7119   echo "$ac_t""no" 1>&6
7120 with_png=no
7121 fi
7122  }
7123   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7124 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7125 echo "configure:7126: checking for png.h" >&5
7126
7127 cat > conftest.$ac_ext <<EOF
7128 #line 7129 "configure"
7129 #include "confdefs.h"
7130 #include <png.h>
7131 EOF
7132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7133 { (eval echo configure:7134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7135 if test -z "$ac_err"; then
7136   rm -rf conftest*
7137   eval "ac_cv_header_$ac_safe=yes"
7138 else
7139   echo "$ac_err" >&5
7140   echo "configure: failed program was:" >&5
7141   cat conftest.$ac_ext >&5
7142   rm -rf conftest*
7143   eval "ac_cv_header_$ac_safe=no"
7144 fi
7145 rm -f conftest*
7146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7147   echo "$ac_t""yes" 1>&6
7148   :
7149 else
7150   echo "$ac_t""no" 1>&6
7151 with_png=no
7152 fi
7153  }
7154   test -z "$with_png" && { 
7155 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7156 echo "configure:7157: checking for png_read_image in -lpng" >&5
7157 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7158
7159 xe_check_libs=" -lpng "
7160 cat > conftest.$ac_ext <<EOF
7161 #line 7162 "configure"
7162 #include "confdefs.h"
7163 /* Override any gcc2 internal prototype to avoid an error.  */
7164 /* We use char because int might match the return type of a gcc2
7165     builtin and then its argument prototype would still apply.  */
7166 char png_read_image();
7167
7168 int main() {
7169 png_read_image()
7170 ; return 0; }
7171 EOF
7172 if { (eval echo configure:7173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7173   rm -rf conftest*
7174   eval "ac_cv_lib_$ac_lib_var=yes"
7175 else
7176   echo "configure: failed program was:" >&5
7177   cat conftest.$ac_ext >&5
7178   rm -rf conftest*
7179   eval "ac_cv_lib_$ac_lib_var=no"
7180 fi
7181 rm -f conftest*
7182 xe_check_libs=""
7183
7184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7185   echo "$ac_t""yes" 1>&6
7186   :
7187 else
7188   echo "$ac_t""no" 1>&6
7189 with_png=no
7190 fi
7191
7192  }
7193   if test -z "$with_png"; then
7194     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7195 echo "configure:7196: checking for workable png version information" >&5
7196     xe_check_libs="-lpng -lz"
7197     cat > conftest.$ac_ext <<EOF
7198 #line 7199 "configure"
7199 #include "confdefs.h"
7200 #include <png.h>
7201     int main(int c, char **v) {
7202     if (c == 1) return 0;
7203     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7204     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7205 EOF
7206 if { (eval echo configure:7207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7207 then
7208   ./conftest dummy_arg; png_status=$?;
7209       if test "$png_status" = "0"; then
7210         with_png=yes;
7211       else
7212         with_png=no;
7213         if test "$png_status" = "1"; then
7214           png_problem="PNG library version and header file don't match!"
7215         elif test "$png_status" = "2"; then
7216           png_problem="PNG library version too old (pre 1.0.2)!"
7217         fi
7218         echo "
7219 *** WARNING *** $png_problem
7220   I'm not touching that with a 10-foot pole!
7221   If you really want to use the installed version of libPNG, rerun
7222   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7223     fi
7224 else
7225   conftest_rc="$?"
7226   echo "configure: failed program was:" >&5
7227   cat conftest.$ac_ext >&5
7228   rm -fr conftest*
7229   with_png=no
7230 fi
7231 rm -fr conftest*
7232     xe_check_libs=
7233     echo "$ac_t""$with_png" 1>&6
7234   fi
7235   if test "$with_png" = "yes"; then
7236     { test "$extra_verbose" = "yes" && cat << \EOF
7237     Defining HAVE_PNG
7238 EOF
7239 cat >> confdefs.h <<\EOF
7240 #define HAVE_PNG 1
7241 EOF
7242 }
7243
7244     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7245   fi
7246
7247     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7248 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7249 echo "configure:7250: checking for tiffio.h" >&5
7250
7251 cat > conftest.$ac_ext <<EOF
7252 #line 7253 "configure"
7253 #include "confdefs.h"
7254 #include <tiffio.h>
7255 EOF
7256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7257 { (eval echo configure:7258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7259 if test -z "$ac_err"; then
7260   rm -rf conftest*
7261   eval "ac_cv_header_$ac_safe=yes"
7262 else
7263   echo "$ac_err" >&5
7264   echo "configure: failed program was:" >&5
7265   cat conftest.$ac_ext >&5
7266   rm -rf conftest*
7267   eval "ac_cv_header_$ac_safe=no"
7268 fi
7269 rm -f conftest*
7270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7271   echo "$ac_t""yes" 1>&6
7272   :
7273 else
7274   echo "$ac_t""no" 1>&6
7275 with_tiff=no
7276 fi
7277  }
7278   test -z "$with_tiff" && { 
7279 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7280 echo "configure:7281: checking for TIFFClientOpen in -ltiff" >&5
7281 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7282
7283 xe_check_libs=" -ltiff "
7284 cat > conftest.$ac_ext <<EOF
7285 #line 7286 "configure"
7286 #include "confdefs.h"
7287 /* Override any gcc2 internal prototype to avoid an error.  */
7288 /* We use char because int might match the return type of a gcc2
7289     builtin and then its argument prototype would still apply.  */
7290 char TIFFClientOpen();
7291
7292 int main() {
7293 TIFFClientOpen()
7294 ; return 0; }
7295 EOF
7296 if { (eval echo configure:7297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7297   rm -rf conftest*
7298   eval "ac_cv_lib_$ac_lib_var=yes"
7299 else
7300   echo "configure: failed program was:" >&5
7301   cat conftest.$ac_ext >&5
7302   rm -rf conftest*
7303   eval "ac_cv_lib_$ac_lib_var=no"
7304 fi
7305 rm -f conftest*
7306 xe_check_libs=""
7307
7308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7309   echo "$ac_t""yes" 1>&6
7310   :
7311 else
7312   echo "$ac_t""no" 1>&6
7313 with_tiff=no
7314 fi
7315
7316  }
7317   test -z "$with_tiff" && with_tiff=yes
7318   if test "$with_tiff" = "yes"; then
7319     { test "$extra_verbose" = "yes" && cat << \EOF
7320     Defining HAVE_TIFF
7321 EOF
7322 cat >> confdefs.h <<\EOF
7323 #define HAVE_TIFF 1
7324 EOF
7325 }
7326
7327     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7328   fi
7329 fi
7330
7331
7332 if test "$with_x11" = "yes"; then
7333
7334   echo "checking for X11 graphics libraries" 1>&6
7335 echo "configure:7336: checking for X11 graphics libraries" >&5
7336
7337     
7338 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
7339 echo "configure:7340: checking for XawScrollbarSetThumb in -lXaw" >&5
7340 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7341
7342 xe_check_libs=" -lXaw "
7343 cat > conftest.$ac_ext <<EOF
7344 #line 7345 "configure"
7345 #include "confdefs.h"
7346 /* Override any gcc2 internal prototype to avoid an error.  */
7347 /* We use char because int might match the return type of a gcc2
7348     builtin and then its argument prototype would still apply.  */
7349 char XawScrollbarSetThumb();
7350
7351 int main() {
7352 XawScrollbarSetThumb()
7353 ; return 0; }
7354 EOF
7355 if { (eval echo configure:7356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7356   rm -rf conftest*
7357   eval "ac_cv_lib_$ac_lib_var=yes"
7358 else
7359   echo "configure: failed program was:" >&5
7360   cat conftest.$ac_ext >&5
7361   rm -rf conftest*
7362   eval "ac_cv_lib_$ac_lib_var=no"
7363 fi
7364 rm -f conftest*
7365 xe_check_libs=""
7366
7367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7368   echo "$ac_t""yes" 1>&6
7369   have_xaw=yes
7370 else
7371   echo "$ac_t""no" 1>&6
7372 have_xaw=no
7373 fi
7374
7375
7376                     
7377     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7378 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7379 echo "configure:7380: checking for Xm/Xm.h" >&5
7380
7381 cat > conftest.$ac_ext <<EOF
7382 #line 7383 "configure"
7383 #include "confdefs.h"
7384 #include <Xm/Xm.h>
7385 EOF
7386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7387 { (eval echo configure:7388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7389 if test -z "$ac_err"; then
7390   rm -rf conftest*
7391   eval "ac_cv_header_$ac_safe=yes"
7392 else
7393   echo "$ac_err" >&5
7394   echo "configure: failed program was:" >&5
7395   cat conftest.$ac_ext >&5
7396   rm -rf conftest*
7397   eval "ac_cv_header_$ac_safe=no"
7398 fi
7399 rm -f conftest*
7400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7401   echo "$ac_t""yes" 1>&6
7402   
7403 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7404 echo "configure:7405: checking for XmStringFree in -lXm" >&5
7405 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7406
7407 xe_check_libs=" -lXm "
7408 cat > conftest.$ac_ext <<EOF
7409 #line 7410 "configure"
7410 #include "confdefs.h"
7411 /* Override any gcc2 internal prototype to avoid an error.  */
7412 /* We use char because int might match the return type of a gcc2
7413     builtin and then its argument prototype would still apply.  */
7414 char XmStringFree();
7415
7416 int main() {
7417 XmStringFree()
7418 ; return 0; }
7419 EOF
7420 if { (eval echo configure:7421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7421   rm -rf conftest*
7422   eval "ac_cv_lib_$ac_lib_var=yes"
7423 else
7424   echo "configure: failed program was:" >&5
7425   cat conftest.$ac_ext >&5
7426   rm -rf conftest*
7427   eval "ac_cv_lib_$ac_lib_var=no"
7428 fi
7429 rm -f conftest*
7430 xe_check_libs=""
7431
7432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7433   echo "$ac_t""yes" 1>&6
7434   have_motif=yes
7435 else
7436   echo "$ac_t""no" 1>&6
7437 have_motif=no
7438 fi
7439
7440
7441 else
7442   echo "$ac_t""no" 1>&6
7443 have_motif=no
7444 fi
7445
7446
7447   if test "$have_motif" = "yes"; then
7448         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
7449 echo "configure:7450: checking for Lesstif" >&5
7450     cat > conftest.$ac_ext <<EOF
7451 #line 7452 "configure"
7452 #include "confdefs.h"
7453 #include <Xm/Xm.h>
7454 #ifdef LESSTIF_VERSION
7455 yes
7456 #endif
7457
7458 EOF
7459 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7460   egrep "yes" >/dev/null 2>&1; then
7461   rm -rf conftest*
7462   have_lesstif=yes
7463 else
7464   rm -rf conftest*
7465   have_lesstif=no
7466 fi
7467 rm -f conftest*
7468
7469   echo "$ac_t""$have_lesstif" 1>&6
7470   fi
7471
7472 fi 
7473
7474 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
7475   with_menubars="lucid" ;;
7476 esac
7477 case "$with_dialogs" in "" | "yes" | "lucid" )
7478   if   test "$have_motif" = "yes"; then with_dialogs="motif"
7479   elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
7480   else with_dialogs=no
7481   fi ;;
7482 esac
7483 case "$with_scrollbars" in "" | "yes" )
7484   with_scrollbars="lucid" ;;
7485 esac
7486
7487 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars"
7488
7489 case "$all_widgets" in *athena* )
7490   { test "$extra_verbose" = "yes" && cat << \EOF
7491     Defining LWLIB_USES_ATHENA
7492 EOF
7493 cat >> confdefs.h <<\EOF
7494 #define LWLIB_USES_ATHENA 1
7495 EOF
7496 }
7497
7498   { test "$extra_verbose" = "yes" && cat << \EOF
7499     Defining NEED_ATHENA
7500 EOF
7501 cat >> confdefs.h <<\EOF
7502 #define NEED_ATHENA 1
7503 EOF
7504 }
7505
7506   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7507   libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
7508 esac
7509
7510 case "$all_widgets" in *motif* )
7511   { test "$extra_verbose" = "yes" && cat << \EOF
7512     Defining LWLIB_USES_MOTIF
7513 EOF
7514 cat >> confdefs.h <<\EOF
7515 #define LWLIB_USES_MOTIF 1
7516 EOF
7517 }
7518
7519   { test "$extra_verbose" = "yes" && cat << \EOF
7520     Defining NEED_MOTIF
7521 EOF
7522 cat >> confdefs.h <<\EOF
7523 #define NEED_MOTIF 1
7524 EOF
7525 }
7526
7527   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
7528   need_motif=yes ;;
7529 esac
7530
7531 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7532 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7533 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
7534 case "$all_widgets" in *lucid* )
7535   { test "$extra_verbose" = "yes" && cat << \EOF
7536     Defining NEED_LUCID
7537 EOF
7538 cat >> confdefs.h <<\EOF
7539 #define NEED_LUCID 1
7540 EOF
7541 }
7542
7543   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
7544 esac
7545
7546
7547
7548 case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7549     Defining LWLIB_SCROLLBARS_ATHENA
7550 EOF
7551 cat >> confdefs.h <<\EOF
7552 #define LWLIB_SCROLLBARS_ATHENA 1
7553 EOF
7554 }
7555 ;; esac
7556 case "$with_dialogs"    in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7557     Defining LWLIB_DIALOGS_ATHENA
7558 EOF
7559 cat >> confdefs.h <<\EOF
7560 #define LWLIB_DIALOGS_ATHENA 1
7561 EOF
7562 }
7563    ;; esac
7564 test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7565     Defining LWLIB_SCROLLBARS_ATHENA3D
7566 EOF
7567 cat >> confdefs.h <<\EOF
7568 #define LWLIB_SCROLLBARS_ATHENA3D 1
7569 EOF
7570 }
7571
7572 test "$with_dialogs"    = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7573     Defining LWLIB_DIALOGS_ATHENA3D
7574 EOF
7575 cat >> confdefs.h <<\EOF
7576 #define LWLIB_DIALOGS_ATHENA3D 1
7577 EOF
7578 }
7579
7580
7581 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7582     Defining HAVE_MENUBARS
7583 EOF
7584 cat >> confdefs.h <<\EOF
7585 #define HAVE_MENUBARS 1
7586 EOF
7587 }
7588
7589 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7590     Defining HAVE_SCROLLBARS
7591 EOF
7592 cat >> confdefs.h <<\EOF
7593 #define HAVE_SCROLLBARS 1
7594 EOF
7595 }
7596
7597 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7598     Defining HAVE_DIALOGS
7599 EOF
7600 cat >> confdefs.h <<\EOF
7601 #define HAVE_DIALOGS 1
7602 EOF
7603 }
7604
7605 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7606     Defining HAVE_TOOLBARS
7607 EOF
7608 cat >> confdefs.h <<\EOF
7609 #define HAVE_TOOLBARS 1
7610 EOF
7611 }
7612
7613
7614 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7615     Defining LWLIB_MENUBARS_LUCID
7616 EOF
7617 cat >> confdefs.h <<\EOF
7618 #define LWLIB_MENUBARS_LUCID 1
7619 EOF
7620 }
7621
7622 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7623     Defining LWLIB_SCROLLBARS_LUCID
7624 EOF
7625 cat >> confdefs.h <<\EOF
7626 #define LWLIB_SCROLLBARS_LUCID 1
7627 EOF
7628 }
7629
7630
7631 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7632     Defining LWLIB_MENUBARS_MOTIF
7633 EOF
7634 cat >> confdefs.h <<\EOF
7635 #define LWLIB_MENUBARS_MOTIF 1
7636 EOF
7637 }
7638
7639 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7640     Defining LWLIB_SCROLLBARS_MOTIF
7641 EOF
7642 cat >> confdefs.h <<\EOF
7643 #define LWLIB_SCROLLBARS_MOTIF 1
7644 EOF
7645 }
7646
7647 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7648     Defining LWLIB_DIALOGS_MOTIF
7649 EOF
7650 cat >> confdefs.h <<\EOF
7651 #define LWLIB_DIALOGS_MOTIF 1
7652 EOF
7653 }
7654
7655
7656 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
7657    echo "    xemacs will be linked with \"menubar.o\""
7658  fi
7659 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
7660    echo "    xemacs will be linked with \"scrollbar.o\""
7661  fi
7662 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
7663    echo "    xemacs will be linked with \"dialog.o\""
7664  fi
7665 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
7666    echo "    xemacs will be linked with \"toolbar.o\""
7667  fi
7668
7669 if test "$with_x11" = "yes"; then
7670   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
7671    echo "    xemacs will be linked with \"menubar-x.o\""
7672  fi
7673   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7674    echo "    xemacs will be linked with \"scrollbar-x.o\""
7675  fi
7676   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
7677    echo "    xemacs will be linked with \"dialog-x.o\""
7678  fi
7679   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7680    echo "    xemacs will be linked with \"toolbar-x.o\""
7681  fi
7682   test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
7683    echo "    xemacs will be linked with \"gui-x.o\""
7684  fi
7685 else
7686   if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then
7687     echo "Attempt to Build NAS sound without X"
7688     echo "Please remove NAS configuration or build with X"
7689     exit 1
7690   fi
7691 fi
7692
7693
7694 test -z "$with_mule" && with_mule=no
7695 test -z "$with_file_coding" && with_file_coding=no
7696
7697
7698 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
7699   { test "$extra_verbose" = "yes" && cat << \EOF
7700     Defining FILE_CODING
7701 EOF
7702 cat >> confdefs.h <<\EOF
7703 #define FILE_CODING 1
7704 EOF
7705 }
7706
7707   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7708    echo "    xemacs will be linked with \"file-coding.o\""
7709  fi
7710 fi
7711
7712 if test "$with_mule" = "yes" ; then
7713   echo "checking for Mule-related features" 1>&6
7714 echo "configure:7715: checking for Mule-related features" >&5
7715   { test "$extra_verbose" = "yes" && cat << \EOF
7716     Defining MULE
7717 EOF
7718 cat >> confdefs.h <<\EOF
7719 #define MULE 1
7720 EOF
7721 }
7722
7723   { test "$extra_verbose" = "yes" && cat << \EOF
7724     Defining FILE_CODING
7725 EOF
7726 cat >> confdefs.h <<\EOF
7727 #define FILE_CODING 1
7728 EOF
7729 }
7730
7731   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7732    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
7733  fi
7734
7735     for ac_hdr in libintl.h
7736 do
7737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7739 echo "configure:7740: checking for $ac_hdr" >&5
7740
7741 cat > conftest.$ac_ext <<EOF
7742 #line 7743 "configure"
7743 #include "confdefs.h"
7744 #include <$ac_hdr>
7745 EOF
7746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7747 { (eval echo configure:7748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7749 if test -z "$ac_err"; then
7750   rm -rf conftest*
7751   eval "ac_cv_header_$ac_safe=yes"
7752 else
7753   echo "$ac_err" >&5
7754   echo "configure: failed program was:" >&5
7755   cat conftest.$ac_ext >&5
7756   rm -rf conftest*
7757   eval "ac_cv_header_$ac_safe=no"
7758 fi
7759 rm -f conftest*
7760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7761   echo "$ac_t""yes" 1>&6
7762     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7763   { test "$extra_verbose" = "yes" && cat << EOF
7764     Defining $ac_tr_hdr
7765 EOF
7766 cat >> confdefs.h <<EOF
7767 #define $ac_tr_hdr 1
7768 EOF
7769 }
7770  
7771 else
7772   echo "$ac_t""no" 1>&6
7773 fi
7774 done
7775
7776   
7777 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
7778 echo "configure:7779: checking for strerror in -lintl" >&5
7779 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
7780
7781 xe_check_libs=" -lintl "
7782 cat > conftest.$ac_ext <<EOF
7783 #line 7784 "configure"
7784 #include "confdefs.h"
7785 /* Override any gcc2 internal prototype to avoid an error.  */
7786 /* We use char because int might match the return type of a gcc2
7787     builtin and then its argument prototype would still apply.  */
7788 char strerror();
7789
7790 int main() {
7791 strerror()
7792 ; return 0; }
7793 EOF
7794 if { (eval echo configure:7795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7795   rm -rf conftest*
7796   eval "ac_cv_lib_$ac_lib_var=yes"
7797 else
7798   echo "configure: failed program was:" >&5
7799   cat conftest.$ac_ext >&5
7800   rm -rf conftest*
7801   eval "ac_cv_lib_$ac_lib_var=no"
7802 fi
7803 rm -f conftest*
7804 xe_check_libs=""
7805
7806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7807   echo "$ac_t""yes" 1>&6
7808     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7809     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7810   { test "$extra_verbose" = "yes" && cat << EOF
7811     Defining $ac_tr_lib
7812 EOF
7813 cat >> confdefs.h <<EOF
7814 #define $ac_tr_lib 1
7815 EOF
7816 }
7817
7818   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
7819
7820 else
7821   echo "$ac_t""no" 1>&6
7822 fi
7823
7824
7825
7826   echo "checking for Mule input methods" 1>&6
7827 echo "configure:7828: checking for Mule input methods" >&5
7828         case "$with_xim" in "" | "yes" )
7829     echo "checking for XIM" 1>&6
7830 echo "configure:7831: checking for XIM" >&5
7831     
7832 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
7833 echo "configure:7834: checking for XOpenIM in -lX11" >&5
7834 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
7835
7836 xe_check_libs=" -lX11 "
7837 cat > conftest.$ac_ext <<EOF
7838 #line 7839 "configure"
7839 #include "confdefs.h"
7840 /* Override any gcc2 internal prototype to avoid an error.  */
7841 /* We use char because int might match the return type of a gcc2
7842     builtin and then its argument prototype would still apply.  */
7843 char XOpenIM();
7844
7845 int main() {
7846 XOpenIM()
7847 ; return 0; }
7848 EOF
7849 if { (eval echo configure:7850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7850   rm -rf conftest*
7851   eval "ac_cv_lib_$ac_lib_var=yes"
7852 else
7853   echo "configure: failed program was:" >&5
7854   cat conftest.$ac_ext >&5
7855   rm -rf conftest*
7856   eval "ac_cv_lib_$ac_lib_var=no"
7857 fi
7858 rm -f conftest*
7859 xe_check_libs=""
7860
7861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7862   echo "$ac_t""yes" 1>&6
7863   with_xim=xlib
7864 else
7865   echo "$ac_t""no" 1>&6
7866 with_xim=no
7867 fi
7868
7869
7870         if test "$have_motif $have_lesstif" = "yes no"; then
7871       
7872 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
7873 echo "configure:7874: checking for XmImMbLookupString in -lXm" >&5
7874 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
7875
7876 xe_check_libs=" -lXm "
7877 cat > conftest.$ac_ext <<EOF
7878 #line 7879 "configure"
7879 #include "confdefs.h"
7880 /* Override any gcc2 internal prototype to avoid an error.  */
7881 /* We use char because int might match the return type of a gcc2
7882     builtin and then its argument prototype would still apply.  */
7883 char XmImMbLookupString();
7884
7885 int main() {
7886 XmImMbLookupString()
7887 ; return 0; }
7888 EOF
7889 if { (eval echo configure:7890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7890   rm -rf conftest*
7891   eval "ac_cv_lib_$ac_lib_var=yes"
7892 else
7893   echo "configure: failed program was:" >&5
7894   cat conftest.$ac_ext >&5
7895   rm -rf conftest*
7896   eval "ac_cv_lib_$ac_lib_var=no"
7897 fi
7898 rm -f conftest*
7899 xe_check_libs=""
7900
7901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7902   echo "$ac_t""yes" 1>&6
7903   with_xim=motif
7904 else
7905   echo "$ac_t""no" 1>&6
7906 fi
7907
7908
7909     fi ;;
7910   esac
7911   if test "$with_xim" != "no"; then
7912     { test "$extra_verbose" = "yes" && cat << \EOF
7913     Defining HAVE_XIM
7914 EOF
7915 cat >> confdefs.h <<\EOF
7916 #define HAVE_XIM 1
7917 EOF
7918 }
7919
7920     if test "$with_xim" = "xlib"; then
7921       { test "$extra_verbose" = "yes" && cat << \EOF
7922     Defining XIM_XLIB
7923 EOF
7924 cat >> confdefs.h <<\EOF
7925 #define XIM_XLIB 1
7926 EOF
7927 }
7928
7929       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
7930    echo "    xemacs will be linked with \"input-method-xlib.o\""
7931  fi
7932     fi
7933     if test "$with_xim" = "motif"; then
7934       { test "$extra_verbose" = "yes" && cat << \EOF
7935     Defining XIM_MOTIF
7936 EOF
7937 cat >> confdefs.h <<\EOF
7938 #define XIM_MOTIF 1
7939 EOF
7940 }
7941
7942       need_motif=yes
7943       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
7944    echo "    xemacs will be linked with \"input-method-motif.o\""
7945  fi
7946     fi
7947     if test "$with_xim" = "motif"; then
7948       with_xfs=no
7949     fi
7950   fi
7951
7952     if test "$with_xfs" = "yes" ; then
7953     echo "checking for XFontSet" 1>&6
7954 echo "configure:7955: checking for XFontSet" >&5
7955     
7956 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
7957 echo "configure:7958: checking for XmbDrawString in -lX11" >&5
7958 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
7959
7960 xe_check_libs=" -lX11 "
7961 cat > conftest.$ac_ext <<EOF
7962 #line 7963 "configure"
7963 #include "confdefs.h"
7964 /* Override any gcc2 internal prototype to avoid an error.  */
7965 /* We use char because int might match the return type of a gcc2
7966     builtin and then its argument prototype would still apply.  */
7967 char XmbDrawString();
7968
7969 int main() {
7970 XmbDrawString()
7971 ; return 0; }
7972 EOF
7973 if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7974   rm -rf conftest*
7975   eval "ac_cv_lib_$ac_lib_var=yes"
7976 else
7977   echo "configure: failed program was:" >&5
7978   cat conftest.$ac_ext >&5
7979   rm -rf conftest*
7980   eval "ac_cv_lib_$ac_lib_var=no"
7981 fi
7982 rm -f conftest*
7983 xe_check_libs=""
7984
7985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7986   echo "$ac_t""yes" 1>&6
7987   :
7988 else
7989   echo "$ac_t""no" 1>&6
7990 with_xfs=no
7991 fi
7992
7993
7994     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
7995       { test "$extra_verbose" = "yes" && cat << \EOF
7996     Defining USE_XFONTSET
7997 EOF
7998 cat >> confdefs.h <<\EOF
7999 #define USE_XFONTSET 1
8000 EOF
8001 }
8002
8003       if test "$with_xim" = "no" ; then
8004         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8005    echo "    xemacs will be linked with \"input-method-xfs.o\""
8006  fi
8007       fi
8008     fi
8009   fi 
8010     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8011   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8012 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8013 echo "configure:8014: checking for wnn/jllib.h" >&5
8014
8015 cat > conftest.$ac_ext <<EOF
8016 #line 8017 "configure"
8017 #include "confdefs.h"
8018 #include <wnn/jllib.h>
8019 EOF
8020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8021 { (eval echo configure:8022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8023 if test -z "$ac_err"; then
8024   rm -rf conftest*
8025   eval "ac_cv_header_$ac_safe=yes"
8026 else
8027   echo "$ac_err" >&5
8028   echo "configure: failed program was:" >&5
8029   cat conftest.$ac_ext >&5
8030   rm -rf conftest*
8031   eval "ac_cv_header_$ac_safe=no"
8032 fi
8033 rm -f conftest*
8034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8035   echo "$ac_t""yes" 1>&6
8036   :
8037 else
8038   echo "$ac_t""no" 1>&6
8039 with_wnn=no
8040 fi
8041  }
8042     if test "$with_wnn" != "no"; then
8043     for ac_func in crypt
8044 do
8045 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8046 echo "configure:8047: checking for $ac_func" >&5
8047
8048 cat > conftest.$ac_ext <<EOF
8049 #line 8050 "configure"
8050 #include "confdefs.h"
8051 /* System header to define __stub macros and hopefully few prototypes,
8052     which can conflict with char $ac_func(); below.  */
8053 #include <assert.h>
8054 /* Override any gcc2 internal prototype to avoid an error.  */
8055 /* We use char because int might match the return type of a gcc2
8056     builtin and then its argument prototype would still apply.  */
8057 char $ac_func();
8058
8059 int main() {
8060
8061 /* The GNU C library defines this for functions which it implements
8062     to always fail with ENOSYS.  Some functions are actually named
8063     something starting with __ and the normal name is an alias.  */
8064 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8065 choke me
8066 #else
8067 $ac_func();
8068 #endif
8069
8070 ; return 0; }
8071 EOF
8072 if { (eval echo configure:8073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8073   rm -rf conftest*
8074   eval "ac_cv_func_$ac_func=yes"
8075 else
8076   echo "configure: failed program was:" >&5
8077   cat conftest.$ac_ext >&5
8078   rm -rf conftest*
8079   eval "ac_cv_func_$ac_func=no"
8080 fi
8081 rm -f conftest*
8082
8083 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8084   echo "$ac_t""yes" 1>&6
8085     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8086   { test "$extra_verbose" = "yes" && cat << EOF
8087     Defining $ac_tr_func
8088 EOF
8089 cat >> confdefs.h <<EOF
8090 #define $ac_tr_func 1
8091 EOF
8092 }
8093  
8094 else
8095   echo "$ac_t""no" 1>&6
8096 fi
8097 done
8098
8099     test "$ac_cv_func_crypt" != "yes" && { 
8100 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8101 echo "configure:8102: checking for crypt in -lcrypt" >&5
8102 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8103
8104 xe_check_libs=" -lcrypt "
8105 cat > conftest.$ac_ext <<EOF
8106 #line 8107 "configure"
8107 #include "confdefs.h"
8108 /* Override any gcc2 internal prototype to avoid an error.  */
8109 /* We use char because int might match the return type of a gcc2
8110     builtin and then its argument prototype would still apply.  */
8111 char crypt();
8112
8113 int main() {
8114 crypt()
8115 ; return 0; }
8116 EOF
8117 if { (eval echo configure:8118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8118   rm -rf conftest*
8119   eval "ac_cv_lib_$ac_lib_var=yes"
8120 else
8121   echo "configure: failed program was:" >&5
8122   cat conftest.$ac_ext >&5
8123   rm -rf conftest*
8124   eval "ac_cv_lib_$ac_lib_var=no"
8125 fi
8126 rm -f conftest*
8127 xe_check_libs=""
8128
8129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8130   echo "$ac_t""yes" 1>&6
8131     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8132     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8133   { test "$extra_verbose" = "yes" && cat << EOF
8134     Defining $ac_tr_lib
8135 EOF
8136 cat >> confdefs.h <<EOF
8137 #define $ac_tr_lib 1
8138 EOF
8139 }
8140
8141   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
8142
8143 else
8144   echo "$ac_t""no" 1>&6
8145 fi
8146
8147  }
8148   fi
8149     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
8150     
8151 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
8152 echo "configure:8153: checking for jl_dic_list_e in -lwnn" >&5
8153 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8154
8155 xe_check_libs=" -lwnn "
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 jl_dic_list_e();
8163
8164 int main() {
8165 jl_dic_list_e()
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   libwnn=wnn
8183 else
8184   echo "$ac_t""no" 1>&6
8185 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
8186 echo "configure:8187: checking for jl_dic_list_e in -lwnn4" >&5
8187 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8188
8189 xe_check_libs=" -lwnn4 "
8190 cat > conftest.$ac_ext <<EOF
8191 #line 8192 "configure"
8192 #include "confdefs.h"
8193 /* Override any gcc2 internal prototype to avoid an error.  */
8194 /* We use char because int might match the return type of a gcc2
8195     builtin and then its argument prototype would still apply.  */
8196 char jl_dic_list_e();
8197
8198 int main() {
8199 jl_dic_list_e()
8200 ; return 0; }
8201 EOF
8202 if { (eval echo configure:8203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8203   rm -rf conftest*
8204   eval "ac_cv_lib_$ac_lib_var=yes"
8205 else
8206   echo "configure: failed program was:" >&5
8207   cat conftest.$ac_ext >&5
8208   rm -rf conftest*
8209   eval "ac_cv_lib_$ac_lib_var=no"
8210 fi
8211 rm -f conftest*
8212 xe_check_libs=""
8213
8214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8215   echo "$ac_t""yes" 1>&6
8216   libwnn=wnn4
8217 else
8218   echo "$ac_t""no" 1>&6
8219 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
8220 echo "configure:8221: checking for jl_dic_list_e in -lwnn6" >&5
8221 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8222
8223 xe_check_libs=" -lwnn6 "
8224 cat > conftest.$ac_ext <<EOF
8225 #line 8226 "configure"
8226 #include "confdefs.h"
8227 /* Override any gcc2 internal prototype to avoid an error.  */
8228 /* We use char because int might match the return type of a gcc2
8229     builtin and then its argument prototype would still apply.  */
8230 char jl_dic_list_e();
8231
8232 int main() {
8233 jl_dic_list_e()
8234 ; return 0; }
8235 EOF
8236 if { (eval echo configure:8237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8237   rm -rf conftest*
8238   eval "ac_cv_lib_$ac_lib_var=yes"
8239 else
8240   echo "configure: failed program was:" >&5
8241   cat conftest.$ac_ext >&5
8242   rm -rf conftest*
8243   eval "ac_cv_lib_$ac_lib_var=no"
8244 fi
8245 rm -f conftest*
8246 xe_check_libs=""
8247
8248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8249   echo "$ac_t""yes" 1>&6
8250   libwnn=wnn6
8251 else
8252   echo "$ac_t""no" 1>&6
8253 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
8254 echo "configure:8255: checking for dic_list_e in -lwnn6_fromsrc" >&5
8255 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
8256
8257 xe_check_libs=" -lwnn6_fromsrc "
8258 cat > conftest.$ac_ext <<EOF
8259 #line 8260 "configure"
8260 #include "confdefs.h"
8261 /* Override any gcc2 internal prototype to avoid an error.  */
8262 /* We use char because int might match the return type of a gcc2
8263     builtin and then its argument prototype would still apply.  */
8264 char dic_list_e();
8265
8266 int main() {
8267 dic_list_e()
8268 ; return 0; }
8269 EOF
8270 if { (eval echo configure:8271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8271   rm -rf conftest*
8272   eval "ac_cv_lib_$ac_lib_var=yes"
8273 else
8274   echo "configure: failed program was:" >&5
8275   cat conftest.$ac_ext >&5
8276   rm -rf conftest*
8277   eval "ac_cv_lib_$ac_lib_var=no"
8278 fi
8279 rm -f conftest*
8280 xe_check_libs=""
8281
8282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8283   echo "$ac_t""yes" 1>&6
8284   libwnn=wnn6_fromsrc
8285 else
8286   echo "$ac_t""no" 1>&6
8287 with_wnn=no
8288 fi
8289
8290
8291 fi
8292
8293
8294 fi
8295
8296
8297 fi
8298
8299
8300   fi
8301   test -z "$with_wnn" && with_wnn=yes
8302   if test "$with_wnn" = "yes"; then
8303     { test "$extra_verbose" = "yes" && cat << \EOF
8304     Defining HAVE_WNN
8305 EOF
8306 cat >> confdefs.h <<\EOF
8307 #define HAVE_WNN 1
8308 EOF
8309 }
8310
8311     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
8312     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
8313    echo "    xemacs will be linked with \"mule-wnnfns.o\""
8314  fi
8315     if test "$with_wnn6" != "no"; then
8316       
8317 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
8318 echo "configure:8319: checking for jl_fi_dic_list in -l$libwnn" >&5
8319 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
8320
8321 xe_check_libs=" -l$libwnn "
8322 cat > conftest.$ac_ext <<EOF
8323 #line 8324 "configure"
8324 #include "confdefs.h"
8325 /* Override any gcc2 internal prototype to avoid an error.  */
8326 /* We use char because int might match the return type of a gcc2
8327     builtin and then its argument prototype would still apply.  */
8328 char jl_fi_dic_list();
8329
8330 int main() {
8331 jl_fi_dic_list()
8332 ; return 0; }
8333 EOF
8334 if { (eval echo configure:8335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8335   rm -rf conftest*
8336   eval "ac_cv_lib_$ac_lib_var=yes"
8337 else
8338   echo "configure: failed program was:" >&5
8339   cat conftest.$ac_ext >&5
8340   rm -rf conftest*
8341   eval "ac_cv_lib_$ac_lib_var=no"
8342 fi
8343 rm -f conftest*
8344 xe_check_libs=""
8345
8346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8347   echo "$ac_t""yes" 1>&6
8348   with_wnn6=yes
8349 else
8350   echo "$ac_t""no" 1>&6
8351 fi
8352
8353
8354       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
8355     Defining WNN6
8356 EOF
8357 cat >> confdefs.h <<\EOF
8358 #define WNN6 1
8359 EOF
8360 }
8361
8362     fi
8363   fi
8364
8365     canna_includes_found=no
8366   if test "$with_canna" != "no"; then
8367     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8368 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8369 echo "configure:8370: checking for canna/jrkanji.h" >&5
8370
8371 cat > conftest.$ac_ext <<EOF
8372 #line 8373 "configure"
8373 #include "confdefs.h"
8374 #include <canna/jrkanji.h>
8375 EOF
8376 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8377 { (eval echo configure:8378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8378 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8379 if test -z "$ac_err"; then
8380   rm -rf conftest*
8381   eval "ac_cv_header_$ac_safe=yes"
8382 else
8383   echo "$ac_err" >&5
8384   echo "configure: failed program was:" >&5
8385   cat conftest.$ac_ext >&5
8386   rm -rf conftest*
8387   eval "ac_cv_header_$ac_safe=no"
8388 fi
8389 rm -f conftest*
8390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8391   echo "$ac_t""yes" 1>&6
8392   canna_includes_found=yes
8393 else
8394   echo "$ac_t""no" 1>&6
8395 fi
8396
8397   fi
8398   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
8399       -d "/usr/local/canna/include"; then
8400     save_c_switch_site="$c_switch_site"
8401     c_switch_site="$c_switch_site -I/usr/local/canna/include"
8402     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8403 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8404 echo "configure:8405: checking for canna/jrkanji.h" >&5
8405
8406 cat > conftest.$ac_ext <<EOF
8407 #line 8408 "configure"
8408 #include "confdefs.h"
8409 #include <canna/jrkanji.h>
8410 EOF
8411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8412 { (eval echo configure:8413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8414 if test -z "$ac_err"; then
8415   rm -rf conftest*
8416   eval "ac_cv_header_$ac_safe=yes"
8417 else
8418   echo "$ac_err" >&5
8419   echo "configure: failed program was:" >&5
8420   cat conftest.$ac_ext >&5
8421   rm -rf conftest*
8422   eval "ac_cv_header_$ac_safe=no"
8423 fi
8424 rm -f conftest*
8425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8426   echo "$ac_t""yes" 1>&6
8427   canna_includes_found=yes
8428 else
8429   echo "$ac_t""no" 1>&6
8430 fi
8431
8432     if test "$canna_includes_found" != "yes"; then
8433       c_switch_site="$save_c_switch_site"
8434       with_canna="no"
8435     fi
8436   fi
8437
8438   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
8439 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
8440 echo "configure:8441: checking for canna/RK.h" >&5
8441
8442 cat > conftest.$ac_ext <<EOF
8443 #line 8444 "configure"
8444 #include "confdefs.h"
8445 #include <canna/RK.h>
8446 EOF
8447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8448 { (eval echo configure:8449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8450 if test -z "$ac_err"; then
8451   rm -rf conftest*
8452   eval "ac_cv_header_$ac_safe=yes"
8453 else
8454   echo "$ac_err" >&5
8455   echo "configure: failed program was:" >&5
8456   cat conftest.$ac_ext >&5
8457   rm -rf conftest*
8458   eval "ac_cv_header_$ac_safe=no"
8459 fi
8460 rm -f conftest*
8461 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8462   echo "$ac_t""yes" 1>&6
8463   :
8464 else
8465   echo "$ac_t""no" 1>&6
8466 with_canna=no
8467 fi
8468  }
8469   test -z "$with_canna" && { 
8470 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
8471 echo "configure:8472: checking for RkBgnBun in -lRKC" >&5
8472 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
8473
8474 xe_check_libs=" -lRKC "
8475 cat > conftest.$ac_ext <<EOF
8476 #line 8477 "configure"
8477 #include "confdefs.h"
8478 /* Override any gcc2 internal prototype to avoid an error.  */
8479 /* We use char because int might match the return type of a gcc2
8480     builtin and then its argument prototype would still apply.  */
8481 char RkBgnBun();
8482
8483 int main() {
8484 RkBgnBun()
8485 ; return 0; }
8486 EOF
8487 if { (eval echo configure:8488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8488   rm -rf conftest*
8489   eval "ac_cv_lib_$ac_lib_var=yes"
8490 else
8491   echo "configure: failed program was:" >&5
8492   cat conftest.$ac_ext >&5
8493   rm -rf conftest*
8494   eval "ac_cv_lib_$ac_lib_var=no"
8495 fi
8496 rm -f conftest*
8497 xe_check_libs=""
8498
8499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8500   echo "$ac_t""yes" 1>&6
8501   :
8502 else
8503   echo "$ac_t""no" 1>&6
8504 with_canna=no
8505 fi
8506
8507  }
8508   test -z "$with_canna" && { 
8509 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
8510 echo "configure:8511: checking for jrKanjiControl in -lcanna" >&5
8511 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
8512
8513 xe_check_libs=" -lcanna "
8514 cat > conftest.$ac_ext <<EOF
8515 #line 8516 "configure"
8516 #include "confdefs.h"
8517 /* Override any gcc2 internal prototype to avoid an error.  */
8518 /* We use char because int might match the return type of a gcc2
8519     builtin and then its argument prototype would still apply.  */
8520 char jrKanjiControl();
8521
8522 int main() {
8523 jrKanjiControl()
8524 ; return 0; }
8525 EOF
8526 if { (eval echo configure:8527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8527   rm -rf conftest*
8528   eval "ac_cv_lib_$ac_lib_var=yes"
8529 else
8530   echo "configure: failed program was:" >&5
8531   cat conftest.$ac_ext >&5
8532   rm -rf conftest*
8533   eval "ac_cv_lib_$ac_lib_var=no"
8534 fi
8535 rm -f conftest*
8536 xe_check_libs=""
8537
8538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8539   echo "$ac_t""yes" 1>&6
8540   :
8541 else
8542   echo "$ac_t""no" 1>&6
8543 with_canna=no
8544 fi
8545
8546  }
8547   test -z "$with_canna" && with_canna=yes
8548   if test "$with_canna" = "yes"; then
8549     { test "$extra_verbose" = "yes" && cat << \EOF
8550     Defining HAVE_CANNA
8551 EOF
8552 cat >> confdefs.h <<\EOF
8553 #define HAVE_CANNA 1
8554 EOF
8555 }
8556
8557     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
8558     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
8559    echo "    xemacs will be linked with \"mule-canna.o\""
8560  fi
8561   fi
8562
8563 else   for feature in xim canna wnn; do
8564     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
8565       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
8566     fi
8567     eval "with_${feature}=no"
8568   done
8569 fi 
8570
8571 if test "$need_motif" = "yes" ; then
8572   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
8573     
8574 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
8575 echo "configure:8576: checking for layout_object_getvalue in -li18n" >&5
8576 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
8577
8578 xe_check_libs=" -li18n "
8579 cat > conftest.$ac_ext <<EOF
8580 #line 8581 "configure"
8581 #include "confdefs.h"
8582 /* Override any gcc2 internal prototype to avoid an error.  */
8583 /* We use char because int might match the return type of a gcc2
8584     builtin and then its argument prototype would still apply.  */
8585 char layout_object_getvalue();
8586
8587 int main() {
8588 layout_object_getvalue()
8589 ; return 0; }
8590 EOF
8591 if { (eval echo configure:8592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8592   rm -rf conftest*
8593   eval "ac_cv_lib_$ac_lib_var=yes"
8594 else
8595   echo "configure: failed program was:" >&5
8596   cat conftest.$ac_ext >&5
8597   rm -rf conftest*
8598   eval "ac_cv_lib_$ac_lib_var=no"
8599 fi
8600 rm -f conftest*
8601 xe_check_libs=""
8602
8603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8604   echo "$ac_t""yes" 1>&6
8605   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
8606 else
8607   echo "$ac_t""no" 1>&6
8608 fi
8609
8610
8611   
8612 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
8613     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8614   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8615   
8616         runpath="" runpath_dirs=""
8617   if test -n "$LD_RUN_PATH"; then
8618     runpath="$LD_RUN_PATH"
8619   elif test "$GCC" = "yes"; then
8620         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
8621     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
8622     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
8623     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
8624       case "$arg" in P,* | -L* | -R* )
8625         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
8626           {
8627 xe_runpath_dir="$dir"
8628   test "$xe_runpath_dir" != "/lib"     -a \
8629         "$xe_runpath_dir" != "/usr/lib" -a \
8630         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8631   eval "$xe_add_unique_runpath_dir"
8632 }
8633         done ;;
8634       esac
8635     done
8636     ld_switch_run="$ld_switch_run_save"
8637     rm -f conftest*
8638   else
8639         for arg in $ld_switch_site $ld_switch_x_site; do
8640       case "$arg" in -L*) {
8641 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
8642   test "$xe_runpath_dir" != "/lib"     -a \
8643         "$xe_runpath_dir" != "/usr/lib" -a \
8644         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8645   eval "$xe_add_unique_runpath_dir"
8646 };; esac
8647     done
8648         if test "$opsys $need_motif" = "sol2 yes"; then
8649       xe_runpath_dir="/opt/SUNWdt/lib";
8650       eval "$xe_add_unique_runpath_dir";
8651     fi
8652   fi 
8653   if test -n "$runpath"; then
8654     ld_switch_run="${dash_r}${runpath}"
8655     
8656 if test "$GCC" = "yes"; then
8657   set x $ld_switch_run; shift; ld_switch_run=""
8658   while test -n "$1"; do
8659     case $1 in
8660       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
8661       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
8662       -Xlinker* ) ;;
8663       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
8664     esac
8665     shift
8666   done
8667 fi
8668     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
8669   fi
8670 fi
8671
8672 fi
8673
8674 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
8675 do
8676 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8677 echo "configure:8678: checking for $ac_func" >&5
8678
8679 cat > conftest.$ac_ext <<EOF
8680 #line 8681 "configure"
8681 #include "confdefs.h"
8682 /* System header to define __stub macros and hopefully few prototypes,
8683     which can conflict with char $ac_func(); below.  */
8684 #include <assert.h>
8685 /* Override any gcc2 internal prototype to avoid an error.  */
8686 /* We use char because int might match the return type of a gcc2
8687     builtin and then its argument prototype would still apply.  */
8688 char $ac_func();
8689
8690 int main() {
8691
8692 /* The GNU C library defines this for functions which it implements
8693     to always fail with ENOSYS.  Some functions are actually named
8694     something starting with __ and the normal name is an alias.  */
8695 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8696 choke me
8697 #else
8698 $ac_func();
8699 #endif
8700
8701 ; return 0; }
8702 EOF
8703 if { (eval echo configure:8704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8704   rm -rf conftest*
8705   eval "ac_cv_func_$ac_func=yes"
8706 else
8707   echo "configure: failed program was:" >&5
8708   cat conftest.$ac_ext >&5
8709   rm -rf conftest*
8710   eval "ac_cv_func_$ac_func=no"
8711 fi
8712 rm -f conftest*
8713
8714 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8715   echo "$ac_t""yes" 1>&6
8716     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8717   { test "$extra_verbose" = "yes" && cat << EOF
8718     Defining $ac_tr_func
8719 EOF
8720 cat >> confdefs.h <<EOF
8721 #define $ac_tr_func 1
8722 EOF
8723 }
8724  
8725 else
8726   echo "$ac_t""no" 1>&6
8727 fi
8728 done
8729
8730
8731
8732 case "$opsys" in
8733   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8734    echo "    xemacs will be linked with \"realpath.o\""
8735  fi ;;
8736   * )
8737     case "$canonical" in
8738       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8739    echo "    xemacs will be linked with \"realpath.o\""
8740  fi ;;
8741       * ) for ac_func in realpath
8742 do
8743 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8744 echo "configure:8745: checking for $ac_func" >&5
8745
8746 cat > conftest.$ac_ext <<EOF
8747 #line 8748 "configure"
8748 #include "confdefs.h"
8749 /* System header to define __stub macros and hopefully few prototypes,
8750     which can conflict with char $ac_func(); below.  */
8751 #include <assert.h>
8752 /* Override any gcc2 internal prototype to avoid an error.  */
8753 /* We use char because int might match the return type of a gcc2
8754     builtin and then its argument prototype would still apply.  */
8755 char $ac_func();
8756
8757 int main() {
8758
8759 /* The GNU C library defines this for functions which it implements
8760     to always fail with ENOSYS.  Some functions are actually named
8761     something starting with __ and the normal name is an alias.  */
8762 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8763 choke me
8764 #else
8765 $ac_func();
8766 #endif
8767
8768 ; return 0; }
8769 EOF
8770 if { (eval echo configure:8771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8771   rm -rf conftest*
8772   eval "ac_cv_func_$ac_func=yes"
8773 else
8774   echo "configure: failed program was:" >&5
8775   cat conftest.$ac_ext >&5
8776   rm -rf conftest*
8777   eval "ac_cv_func_$ac_func=no"
8778 fi
8779 rm -f conftest*
8780
8781 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8782   echo "$ac_t""yes" 1>&6
8783     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8784   { test "$extra_verbose" = "yes" && cat << EOF
8785     Defining $ac_tr_func
8786 EOF
8787 cat >> confdefs.h <<EOF
8788 #define $ac_tr_func 1
8789 EOF
8790 }
8791  
8792 else
8793   echo "$ac_t""no" 1>&6
8794 fi
8795 done
8796
8797           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8798    echo "    xemacs will be linked with \"realpath.o\""
8799  fi ;;
8800     esac ;;
8801 esac
8802
8803 for ac_func in getloadavg
8804 do
8805 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8806 echo "configure:8807: checking for $ac_func" >&5
8807
8808 cat > conftest.$ac_ext <<EOF
8809 #line 8810 "configure"
8810 #include "confdefs.h"
8811 /* System header to define __stub macros and hopefully few prototypes,
8812     which can conflict with char $ac_func(); below.  */
8813 #include <assert.h>
8814 /* Override any gcc2 internal prototype to avoid an error.  */
8815 /* We use char because int might match the return type of a gcc2
8816     builtin and then its argument prototype would still apply.  */
8817 char $ac_func();
8818
8819 int main() {
8820
8821 /* The GNU C library defines this for functions which it implements
8822     to always fail with ENOSYS.  Some functions are actually named
8823     something starting with __ and the normal name is an alias.  */
8824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8825 choke me
8826 #else
8827 $ac_func();
8828 #endif
8829
8830 ; return 0; }
8831 EOF
8832 if { (eval echo configure:8833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8833   rm -rf conftest*
8834   eval "ac_cv_func_$ac_func=yes"
8835 else
8836   echo "configure: failed program was:" >&5
8837   cat conftest.$ac_ext >&5
8838   rm -rf conftest*
8839   eval "ac_cv_func_$ac_func=no"
8840 fi
8841 rm -f conftest*
8842
8843 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8844   echo "$ac_t""yes" 1>&6
8845     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8846   { test "$extra_verbose" = "yes" && cat << EOF
8847     Defining $ac_tr_func
8848 EOF
8849 cat >> confdefs.h <<EOF
8850 #define $ac_tr_func 1
8851 EOF
8852 }
8853  
8854 else
8855   echo "$ac_t""no" 1>&6
8856 fi
8857 done
8858
8859
8860 if test "$ac_cv_func_getloadavg" != "yes"
8861 then
8862   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
8863    echo "    xemacs will be linked with \"getloadavg.o\""
8864  fi
8865
8866     
8867 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
8868 echo "configure:8869: checking for kstat_open in -lkstat" >&5
8869 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
8870
8871 xe_check_libs=" -lkstat "
8872 cat > conftest.$ac_ext <<EOF
8873 #line 8874 "configure"
8874 #include "confdefs.h"
8875 /* Override any gcc2 internal prototype to avoid an error.  */
8876 /* We use char because int might match the return type of a gcc2
8877     builtin and then its argument prototype would still apply.  */
8878 char kstat_open();
8879
8880 int main() {
8881 kstat_open()
8882 ; return 0; }
8883 EOF
8884 if { (eval echo configure:8885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8885   rm -rf conftest*
8886   eval "ac_cv_lib_$ac_lib_var=yes"
8887 else
8888   echo "configure: failed program was:" >&5
8889   cat conftest.$ac_ext >&5
8890   rm -rf conftest*
8891   eval "ac_cv_lib_$ac_lib_var=no"
8892 fi
8893 rm -f conftest*
8894 xe_check_libs=""
8895
8896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8897   echo "$ac_t""yes" 1>&6
8898     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8899     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8900   { test "$extra_verbose" = "yes" && cat << EOF
8901     Defining $ac_tr_lib
8902 EOF
8903 cat >> confdefs.h <<EOF
8904 #define $ac_tr_lib 1
8905 EOF
8906 }
8907
8908   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
8909
8910 else
8911   echo "$ac_t""no" 1>&6
8912 fi
8913
8914
8915
8916     
8917 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
8918 echo "configure:8919: checking for kvm_read in -lkvm" >&5
8919 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
8920
8921 xe_check_libs=" -lkvm "
8922 cat > conftest.$ac_ext <<EOF
8923 #line 8924 "configure"
8924 #include "confdefs.h"
8925 /* Override any gcc2 internal prototype to avoid an error.  */
8926 /* We use char because int might match the return type of a gcc2
8927     builtin and then its argument prototype would still apply.  */
8928 char kvm_read();
8929
8930 int main() {
8931 kvm_read()
8932 ; return 0; }
8933 EOF
8934 if { (eval echo configure:8935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8935   rm -rf conftest*
8936   eval "ac_cv_lib_$ac_lib_var=yes"
8937 else
8938   echo "configure: failed program was:" >&5
8939   cat conftest.$ac_ext >&5
8940   rm -rf conftest*
8941   eval "ac_cv_lib_$ac_lib_var=no"
8942 fi
8943 rm -f conftest*
8944 xe_check_libs=""
8945
8946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8947   echo "$ac_t""yes" 1>&6
8948     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8949     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8950   { test "$extra_verbose" = "yes" && cat << EOF
8951     Defining $ac_tr_lib
8952 EOF
8953 cat >> confdefs.h <<EOF
8954 #define $ac_tr_lib 1
8955 EOF
8956 }
8957
8958   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
8959
8960 else
8961   echo "$ac_t""no" 1>&6
8962 fi
8963
8964
8965 fi
8966
8967 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
8968 echo "configure:8969: checking whether netdb declares h_errno" >&5
8969 cat > conftest.$ac_ext <<EOF
8970 #line 8971 "configure"
8971 #include "confdefs.h"
8972 #include <netdb.h>
8973 int main() {
8974 return h_errno;
8975 ; return 0; }
8976 EOF
8977 if { (eval echo configure:8978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8978   rm -rf conftest*
8979   echo "$ac_t""yes" 1>&6
8980    { test "$extra_verbose" = "yes" && cat << \EOF
8981     Defining HAVE_H_ERRNO
8982 EOF
8983 cat >> confdefs.h <<\EOF
8984 #define HAVE_H_ERRNO 1
8985 EOF
8986 }
8987
8988 else
8989   echo "configure: failed program was:" >&5
8990   cat conftest.$ac_ext >&5
8991   rm -rf conftest*
8992   echo "$ac_t""no" 1>&6
8993 fi
8994 rm -f conftest*
8995
8996 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
8997 echo "configure:8998: checking for sigsetjmp" >&5
8998 cat > conftest.$ac_ext <<EOF
8999 #line 9000 "configure"
9000 #include "confdefs.h"
9001 #include <setjmp.h>
9002 int main() {
9003 sigjmp_buf bar; sigsetjmp (bar, 0);
9004 ; return 0; }
9005 EOF
9006 if { (eval echo configure:9007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9007   rm -rf conftest*
9008   echo "$ac_t""yes" 1>&6
9009    { test "$extra_verbose" = "yes" && cat << \EOF
9010     Defining HAVE_SIGSETJMP
9011 EOF
9012 cat >> confdefs.h <<\EOF
9013 #define HAVE_SIGSETJMP 1
9014 EOF
9015 }
9016
9017 else
9018   echo "configure: failed program was:" >&5
9019   cat conftest.$ac_ext >&5
9020   rm -rf conftest*
9021   echo "$ac_t""no" 1>&6
9022 fi
9023 rm -f conftest*
9024
9025 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9026 echo "configure:9027: checking whether localtime caches TZ" >&5
9027
9028 if test "$ac_cv_func_tzset" = "yes"; then
9029 cat > conftest.$ac_ext <<EOF
9030 #line 9031 "configure"
9031 #include "confdefs.h"
9032 #include <time.h>
9033 #if STDC_HEADERS
9034 # include <stdlib.h>
9035 #endif
9036 extern char **environ;
9037 unset_TZ ()
9038 {
9039   char **from, **to;
9040   for (to = from = environ; (*to = *from); from++)
9041     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9042       to++;
9043 }
9044 char TZ_GMT0[] = "TZ=GMT0";
9045 char TZ_PST8[] = "TZ=PST8";
9046 main()
9047 {
9048   time_t now = time ((time_t *) 0);
9049   int hour_GMT0, hour_unset;
9050   if (putenv (TZ_GMT0) != 0)
9051     exit (1);
9052   hour_GMT0 = localtime (&now)->tm_hour;
9053   unset_TZ ();
9054   hour_unset = localtime (&now)->tm_hour;
9055   if (putenv (TZ_PST8) != 0)
9056     exit (1);
9057   if (localtime (&now)->tm_hour == hour_GMT0)
9058     exit (1);
9059   unset_TZ ();
9060   if (localtime (&now)->tm_hour != hour_unset)
9061     exit (1);
9062   exit (0);
9063 }
9064 EOF
9065 if { (eval echo configure:9066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9066 then
9067   emacs_cv_localtime_cache=no
9068 else
9069   conftest_rc="$?"
9070   echo "configure: failed program was:" >&5
9071   cat conftest.$ac_ext >&5
9072   rm -fr conftest*
9073   emacs_cv_localtime_cache=yes
9074 fi
9075 rm -fr conftest*
9076 else
9077         # If we lack tzset, report that localtime does not cache TZ,
9078         # since we can't invalidate the cache if we don't have tzset.
9079         emacs_cv_localtime_cache=no
9080 fi
9081 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9082 if test $emacs_cv_localtime_cache = yes; then
9083   { test "$extra_verbose" = "yes" && cat << \EOF
9084     Defining LOCALTIME_CACHE
9085 EOF
9086 cat >> confdefs.h <<\EOF
9087 #define LOCALTIME_CACHE 1
9088 EOF
9089 }
9090
9091 fi
9092
9093 if test "$HAVE_TIMEVAL" = "yes"; then
9094 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9095 echo "configure:9096: checking whether gettimeofday accepts one or two arguments" >&5
9096 cat > conftest.$ac_ext <<EOF
9097 #line 9098 "configure"
9098 #include "confdefs.h"
9099
9100 #ifdef TIME_WITH_SYS_TIME
9101 #include <sys/time.h>
9102 #include <time.h>
9103 #else
9104 #ifdef HAVE_SYS_TIME_H
9105 #include <sys/time.h>
9106 #else
9107 #include <time.h>
9108 #endif
9109 #endif
9110   
9111 int main() {
9112
9113   struct timeval time;
9114   struct timezone dummy;
9115   gettimeofday (&time, &dummy);
9116
9117 ; return 0; }
9118 EOF
9119 if { (eval echo configure:9120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9120   rm -rf conftest*
9121   echo "$ac_t""two" 1>&6
9122 else
9123   echo "configure: failed program was:" >&5
9124   cat conftest.$ac_ext >&5
9125   rm -rf conftest*
9126   echo "$ac_t""one" 1>&6
9127    { test "$extra_verbose" = "yes" && cat << \EOF
9128     Defining GETTIMEOFDAY_ONE_ARGUMENT
9129 EOF
9130 cat >> confdefs.h <<\EOF
9131 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9132 EOF
9133 }
9134
9135 fi
9136 rm -f conftest*
9137 fi
9138
9139
9140 echo $ac_n "checking for inline""... $ac_c" 1>&6
9141 echo "configure:9142: checking for inline" >&5
9142
9143 ac_cv_c_inline=no
9144 for ac_kw in inline __inline__ __inline; do
9145   cat > conftest.$ac_ext <<EOF
9146 #line 9147 "configure"
9147 #include "confdefs.h"
9148
9149 int main() {
9150 } $ac_kw foo() {
9151 ; return 0; }
9152 EOF
9153 if { (eval echo configure:9154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9154   rm -rf conftest*
9155   ac_cv_c_inline=$ac_kw; break
9156 else
9157   echo "configure: failed program was:" >&5
9158   cat conftest.$ac_ext >&5
9159 fi
9160 rm -f conftest*
9161 done
9162
9163
9164 echo "$ac_t""$ac_cv_c_inline" 1>&6
9165 case "$ac_cv_c_inline" in
9166   inline | yes) ;;
9167   no) { test "$extra_verbose" = "yes" && cat << \EOF
9168     Defining inline = 
9169 EOF
9170 cat >> confdefs.h <<\EOF
9171 #define inline 
9172 EOF
9173 }
9174  ;;
9175   *)  { test "$extra_verbose" = "yes" && cat << EOF
9176     Defining inline = $ac_cv_c_inline
9177 EOF
9178 cat >> confdefs.h <<EOF
9179 #define inline $ac_cv_c_inline
9180 EOF
9181 }
9182  ;;
9183 esac
9184
9185 if test "$ac_cv_c_inline" != "no"; then
9186   { test "$extra_verbose" = "yes" && cat << \EOF
9187     Defining HAVE_INLINE
9188 EOF
9189 cat >> confdefs.h <<\EOF
9190 #define HAVE_INLINE 1
9191 EOF
9192 }
9193
9194   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
9195    echo "    xemacs will be linked with \"inline.o\""
9196  fi
9197 fi
9198
9199
9200 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9201 # for constant arguments.  Useless!
9202 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9203 echo "configure:9204: checking for working alloca.h" >&5
9204
9205 cat > conftest.$ac_ext <<EOF
9206 #line 9207 "configure"
9207 #include "confdefs.h"
9208 #include <alloca.h>
9209 int main() {
9210 char *p = alloca(2 * sizeof(int));
9211 ; return 0; }
9212 EOF
9213 if { (eval echo configure:9214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9214   rm -rf conftest*
9215   ac_cv_header_alloca_h=yes
9216 else
9217   echo "configure: failed program was:" >&5
9218   cat conftest.$ac_ext >&5
9219   rm -rf conftest*
9220   ac_cv_header_alloca_h=no
9221 fi
9222 rm -f conftest*
9223
9224 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9225 if test $ac_cv_header_alloca_h = yes; then
9226   { test "$extra_verbose" = "yes" && cat << \EOF
9227     Defining HAVE_ALLOCA_H
9228 EOF
9229 cat >> confdefs.h <<\EOF
9230 #define HAVE_ALLOCA_H 1
9231 EOF
9232 }
9233
9234 fi
9235
9236 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9237 echo "configure:9238: checking for alloca" >&5
9238
9239 cat > conftest.$ac_ext <<EOF
9240 #line 9241 "configure"
9241 #include "confdefs.h"
9242
9243 #ifdef __GNUC__
9244 # define alloca __builtin_alloca
9245 #else
9246 # ifdef _MSC_VER
9247 #  include <malloc.h>
9248 #  define alloca _alloca
9249 # else
9250 #  if HAVE_ALLOCA_H
9251 #   include <alloca.h>
9252 #  else
9253 #   ifdef _AIX
9254  #pragma alloca
9255 #   else
9256 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9257 char *alloca ();
9258 #    endif
9259 #   endif
9260 #  endif
9261 # endif
9262 #endif
9263
9264 int main() {
9265 char *p = (char *) alloca(1);
9266 ; return 0; }
9267 EOF
9268 if { (eval echo configure:9269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9269   rm -rf conftest*
9270   ac_cv_func_alloca_works=yes
9271 else
9272   echo "configure: failed program was:" >&5
9273   cat conftest.$ac_ext >&5
9274   rm -rf conftest*
9275   ac_cv_func_alloca_works=no
9276 fi
9277 rm -f conftest*
9278
9279 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
9280 if test $ac_cv_func_alloca_works = yes; then
9281   { test "$extra_verbose" = "yes" && cat << \EOF
9282     Defining HAVE_ALLOCA
9283 EOF
9284 cat >> confdefs.h <<\EOF
9285 #define HAVE_ALLOCA 1
9286 EOF
9287 }
9288
9289 fi
9290
9291 if test $ac_cv_func_alloca_works = no; then
9292   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9293   # that cause trouble.  Some versions do not even contain alloca or
9294   # contain a buggy version.  If you still want to use their alloca,
9295   # use ar to extract alloca.o from them instead of compiling alloca.c.
9296   ALLOCA=alloca.${ac_objext}
9297   { test "$extra_verbose" = "yes" && cat << \EOF
9298     Defining C_ALLOCA
9299 EOF
9300 cat >> confdefs.h <<\EOF
9301 #define C_ALLOCA 1
9302 EOF
9303 }
9304
9305
9306 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9307 echo "configure:9308: checking whether alloca needs Cray hooks" >&5
9308
9309 cat > conftest.$ac_ext <<EOF
9310 #line 9311 "configure"
9311 #include "confdefs.h"
9312 #if defined(CRAY) && ! defined(CRAY2)
9313 webecray
9314 #else
9315 wenotbecray
9316 #endif
9317
9318 EOF
9319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9320   egrep "webecray" >/dev/null 2>&1; then
9321   rm -rf conftest*
9322   ac_cv_os_cray=yes
9323 else
9324   rm -rf conftest*
9325   ac_cv_os_cray=no
9326 fi
9327 rm -f conftest*
9328
9329
9330 echo "$ac_t""$ac_cv_os_cray" 1>&6
9331 if test $ac_cv_os_cray = yes; then
9332 for ac_func in _getb67 GETB67 getb67; do
9333   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9334 echo "configure:9335: checking for $ac_func" >&5
9335
9336 cat > conftest.$ac_ext <<EOF
9337 #line 9338 "configure"
9338 #include "confdefs.h"
9339 /* System header to define __stub macros and hopefully few prototypes,
9340     which can conflict with char $ac_func(); below.  */
9341 #include <assert.h>
9342 /* Override any gcc2 internal prototype to avoid an error.  */
9343 /* We use char because int might match the return type of a gcc2
9344     builtin and then its argument prototype would still apply.  */
9345 char $ac_func();
9346
9347 int main() {
9348
9349 /* The GNU C library defines this for functions which it implements
9350     to always fail with ENOSYS.  Some functions are actually named
9351     something starting with __ and the normal name is an alias.  */
9352 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9353 choke me
9354 #else
9355 $ac_func();
9356 #endif
9357
9358 ; return 0; }
9359 EOF
9360 if { (eval echo configure:9361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9361   rm -rf conftest*
9362   eval "ac_cv_func_$ac_func=yes"
9363 else
9364   echo "configure: failed program was:" >&5
9365   cat conftest.$ac_ext >&5
9366   rm -rf conftest*
9367   eval "ac_cv_func_$ac_func=no"
9368 fi
9369 rm -f conftest*
9370
9371 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9372   echo "$ac_t""yes" 1>&6
9373   { test "$extra_verbose" = "yes" && cat << EOF
9374     Defining CRAY_STACKSEG_END = $ac_func
9375 EOF
9376 cat >> confdefs.h <<EOF
9377 #define CRAY_STACKSEG_END $ac_func
9378 EOF
9379 }
9380
9381   break
9382 else
9383   echo "$ac_t""no" 1>&6
9384 fi
9385
9386 done
9387 fi
9388
9389 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9390 echo "configure:9391: checking stack direction for C alloca" >&5
9391
9392 cat > conftest.$ac_ext <<EOF
9393 #line 9394 "configure"
9394 #include "confdefs.h"
9395 find_stack_direction ()
9396 {
9397   static char *addr = 0;
9398   auto char dummy;
9399   if (addr == 0)
9400     {
9401       addr = &dummy;
9402       return find_stack_direction ();
9403     }
9404   else
9405     return (&dummy > addr) ? 1 : -1;
9406 }
9407 main ()
9408 {
9409   exit (find_stack_direction() < 0);
9410 }
9411 EOF
9412 if { (eval echo configure:9413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9413 then
9414   ac_cv_c_stack_direction=1
9415 else
9416   conftest_rc="$?"
9417   echo "configure: failed program was:" >&5
9418   cat conftest.$ac_ext >&5
9419   rm -fr conftest*
9420   ac_cv_c_stack_direction=-1
9421 fi
9422 rm -fr conftest*
9423
9424 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
9425 { test "$extra_verbose" = "yes" && cat << EOF
9426     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
9427 EOF
9428 cat >> confdefs.h <<EOF
9429 #define STACK_DIRECTION $ac_cv_c_stack_direction
9430 EOF
9431 }
9432
9433 fi
9434
9435 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
9436    echo "    xemacs will be linked with \"$ALLOCA\""
9437  fi
9438
9439 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
9440 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9441 echo "configure:9442: checking for vfork.h" >&5
9442
9443 cat > conftest.$ac_ext <<EOF
9444 #line 9445 "configure"
9445 #include "confdefs.h"
9446 #include <vfork.h>
9447 EOF
9448 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9449 { (eval echo configure:9450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9450 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9451 if test -z "$ac_err"; then
9452   rm -rf conftest*
9453   eval "ac_cv_header_$ac_safe=yes"
9454 else
9455   echo "$ac_err" >&5
9456   echo "configure: failed program was:" >&5
9457   cat conftest.$ac_ext >&5
9458   rm -rf conftest*
9459   eval "ac_cv_header_$ac_safe=no"
9460 fi
9461 rm -f conftest*
9462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9463   echo "$ac_t""yes" 1>&6
9464   { test "$extra_verbose" = "yes" && cat << \EOF
9465     Defining HAVE_VFORK_H
9466 EOF
9467 cat >> confdefs.h <<\EOF
9468 #define HAVE_VFORK_H 1
9469 EOF
9470 }
9471
9472 else
9473   echo "$ac_t""no" 1>&6
9474 fi
9475
9476 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9477 echo "configure:9478: checking for working vfork" >&5
9478
9479 cat > conftest.$ac_ext <<EOF
9480 #line 9481 "configure"
9481 #include "confdefs.h"
9482 /* Thanks to Paul Eggert for this test.  */
9483 #include <stdio.h>
9484 #include <sys/types.h>
9485 #include <sys/stat.h>
9486 #ifdef HAVE_UNISTD_H
9487 #include <unistd.h>
9488 #endif
9489 #ifdef HAVE_VFORK_H
9490 #include <vfork.h>
9491 #endif
9492 /* On some sparc systems, changes by the child to local and incoming
9493    argument registers are propagated back to the parent.
9494    The compiler is told about this with #include <vfork.h>,
9495    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9496    Test for this by using a static variable whose address
9497    is put into a register that is clobbered by the vfork.  */
9498 static
9499 #ifdef __cplusplus
9500 sparc_address_test (int arg)
9501 #else
9502 sparc_address_test (arg) int arg;
9503 #endif
9504 {
9505   static pid_t child;
9506   if (!child) {
9507     child = vfork ();
9508     if (child < 0) {
9509       perror ("vfork");
9510       _exit(2);
9511     }
9512     if (!child) {
9513       arg = getpid();
9514       write(-1, "", 0);
9515       _exit (arg);
9516     }
9517   }
9518 }
9519 main() {
9520   pid_t parent = getpid ();
9521   pid_t child;
9522
9523   sparc_address_test ();
9524
9525   child = vfork ();
9526
9527   if (child == 0) {
9528     /* Here is another test for sparc vfork register problems.
9529        This test uses lots of local variables, at least
9530        as many local variables as main has allocated so far
9531        including compiler temporaries.  4 locals are enough for
9532        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9533        A buggy compiler should reuse the register of parent
9534        for one of the local variables, since it will think that
9535        parent can't possibly be used any more in this routine.
9536        Assigning to the local variable will thus munge parent
9537        in the parent process.  */
9538     pid_t
9539       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9540       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9541     /* Convince the compiler that p..p7 are live; otherwise, it might
9542        use the same hardware register for all 8 local variables.  */
9543     if (p != p1 || p != p2 || p != p3 || p != p4
9544         || p != p5 || p != p6 || p != p7)
9545       _exit(1);
9546
9547     /* On some systems (e.g. IRIX 3.3),
9548        vfork doesn't separate parent from child file descriptors.
9549        If the child closes a descriptor before it execs or exits,
9550        this munges the parent's descriptor as well.
9551        Test for this by closing stdout in the child.  */
9552     _exit(close(fileno(stdout)) != 0);
9553   } else {
9554     int status;
9555     struct stat st;
9556
9557     while (wait(&status) != child)
9558       ;
9559     exit(
9560          /* Was there some problem with vforking?  */
9561          child < 0
9562
9563          /* Did the child fail?  (This shouldn't happen.)  */
9564          || status
9565
9566          /* Did the vfork/compiler bug occur?  */
9567          || parent != getpid()
9568
9569          /* Did the file descriptor bug occur?  */
9570          || fstat(fileno(stdout), &st) != 0
9571          );
9572   }
9573 }
9574 EOF
9575 if { (eval echo configure:9576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9576 then
9577   ac_cv_func_vfork_works=yes
9578 else
9579   conftest_rc="$?"
9580   echo "configure: failed program was:" >&5
9581   cat conftest.$ac_ext >&5
9582   rm -fr conftest*
9583   ac_cv_func_vfork_works=no
9584 fi
9585 rm -fr conftest*
9586
9587 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9588 if test $ac_cv_func_vfork_works = no; then
9589   { test "$extra_verbose" = "yes" && cat << \EOF
9590     Defining vfork = fork
9591 EOF
9592 cat >> confdefs.h <<\EOF
9593 #define vfork fork
9594 EOF
9595 }
9596
9597 fi
9598
9599
9600 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
9601 echo "configure:9602: checking for working strcoll" >&5
9602
9603 cat > conftest.$ac_ext <<EOF
9604 #line 9605 "configure"
9605 #include "confdefs.h"
9606 #include <string.h>
9607 main ()
9608 {
9609   exit (strcoll ("abc", "def") >= 0 ||
9610         strcoll ("ABC", "DEF") >= 0 ||
9611         strcoll ("123", "456") >= 0);
9612 }
9613 EOF
9614 if { (eval echo configure:9615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9615 then
9616   ac_cv_func_strcoll_works=yes
9617 else
9618   conftest_rc="$?"
9619   echo "configure: failed program was:" >&5
9620   cat conftest.$ac_ext >&5
9621   rm -fr conftest*
9622   ac_cv_func_strcoll_works=no
9623 fi
9624 rm -fr conftest*
9625
9626 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
9627 if test $ac_cv_func_strcoll_works = yes; then
9628   { test "$extra_verbose" = "yes" && cat << \EOF
9629     Defining HAVE_STRCOLL
9630 EOF
9631 cat >> confdefs.h <<\EOF
9632 #define HAVE_STRCOLL 1
9633 EOF
9634 }
9635
9636 fi
9637
9638
9639 for ac_func in getpgrp
9640 do
9641 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9642 echo "configure:9643: checking for $ac_func" >&5
9643
9644 cat > conftest.$ac_ext <<EOF
9645 #line 9646 "configure"
9646 #include "confdefs.h"
9647 /* System header to define __stub macros and hopefully few prototypes,
9648     which can conflict with char $ac_func(); below.  */
9649 #include <assert.h>
9650 /* Override any gcc2 internal prototype to avoid an error.  */
9651 /* We use char because int might match the return type of a gcc2
9652     builtin and then its argument prototype would still apply.  */
9653 char $ac_func();
9654
9655 int main() {
9656
9657 /* The GNU C library defines this for functions which it implements
9658     to always fail with ENOSYS.  Some functions are actually named
9659     something starting with __ and the normal name is an alias.  */
9660 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9661 choke me
9662 #else
9663 $ac_func();
9664 #endif
9665
9666 ; return 0; }
9667 EOF
9668 if { (eval echo configure:9669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9669   rm -rf conftest*
9670   eval "ac_cv_func_$ac_func=yes"
9671 else
9672   echo "configure: failed program was:" >&5
9673   cat conftest.$ac_ext >&5
9674   rm -rf conftest*
9675   eval "ac_cv_func_$ac_func=no"
9676 fi
9677 rm -f conftest*
9678
9679 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9680   echo "$ac_t""yes" 1>&6
9681     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9682   { test "$extra_verbose" = "yes" && cat << EOF
9683     Defining $ac_tr_func
9684 EOF
9685 cat >> confdefs.h <<EOF
9686 #define $ac_tr_func 1
9687 EOF
9688 }
9689  
9690 else
9691   echo "$ac_t""no" 1>&6
9692 fi
9693 done
9694
9695 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
9696 echo "configure:9697: checking whether getpgrp takes no argument" >&5
9697
9698 cat > conftest.$ac_ext <<EOF
9699 #line 9700 "configure"
9700 #include "confdefs.h"
9701
9702 /*
9703  * If this system has a BSD-style getpgrp(),
9704  * which takes a pid argument, exit unsuccessfully.
9705  *
9706  * Snarfed from Chet Ramey's bash pgrp.c test program
9707  */
9708 #include <stdio.h>
9709 #include <sys/types.h>
9710
9711 int     pid;
9712 int     pg1, pg2, pg3, pg4;
9713 int     ng, np, s, child;
9714
9715 main()
9716 {
9717         pid = getpid();
9718         pg1 = getpgrp(0);
9719         pg2 = getpgrp();
9720         pg3 = getpgrp(pid);
9721         pg4 = getpgrp(1);
9722
9723         /*
9724          * If all of these values are the same, it's pretty sure that
9725          * we're on a system that ignores getpgrp's first argument.
9726          */
9727         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
9728                 exit(0);
9729
9730         child = fork();
9731         if (child < 0)
9732                 exit(1);
9733         else if (child == 0) {
9734                 np = getpid();
9735                 /*
9736                  * If this is Sys V, this will not work; pgrp will be
9737                  * set to np because setpgrp just changes a pgrp to be
9738                  * the same as the pid.
9739                  */
9740                 setpgrp(np, pg1);
9741                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
9742                 if (ng == pg1) {
9743                         exit(1);
9744                 } else {
9745                         exit(0);
9746                 }
9747         } else {
9748                 wait(&s);
9749                 exit(s>>8);
9750         }
9751 }
9752
9753 EOF
9754 if { (eval echo configure:9755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9755 then
9756   ac_cv_func_getpgrp_void=yes
9757 else
9758   conftest_rc="$?"
9759   echo "configure: failed program was:" >&5
9760   cat conftest.$ac_ext >&5
9761   rm -fr conftest*
9762   ac_cv_func_getpgrp_void=no
9763 fi
9764 rm -fr conftest*
9765
9766
9767 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
9768 if test $ac_cv_func_getpgrp_void = yes; then
9769   { test "$extra_verbose" = "yes" && cat << \EOF
9770     Defining GETPGRP_VOID
9771 EOF
9772 cat >> confdefs.h <<\EOF
9773 #define GETPGRP_VOID 1
9774 EOF
9775 }
9776
9777 fi
9778
9779
9780 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9781 echo "configure:9782: checking for working mmap" >&5
9782 case "$opsys" in ultrix* ) have_mmap=no ;; *)
9783 cat > conftest.$ac_ext <<EOF
9784 #line 9785 "configure"
9785 #include "confdefs.h"
9786 #include <stdio.h>
9787 #include <unistd.h>
9788 #include <fcntl.h>
9789 #include <sys/mman.h>
9790
9791 #ifndef MAP_VARIABLE
9792 #define MAP_VARIABLE 0
9793 #endif
9794
9795 #ifndef MAP_FAILED
9796 #define MAP_FAILED -1
9797 #endif
9798
9799 int main (int argc, char *argv[])
9800 {
9801   int fd = -1;
9802   caddr_t p;
9803 #ifndef MAP_ANONYMOUS
9804   fd = open ("/dev/zero", O_RDWR);
9805   if (fd < 0)
9806     return 1;
9807 #define MAP_ANONYMOUS 0
9808 #endif
9809   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
9810            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
9811            fd, 0) != (void *) MAP_FAILED)
9812     return 0;
9813   perror ("conftest: mmap failed");
9814   return 1;
9815 }
9816 EOF
9817 if { (eval echo configure:9818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9818 then
9819   have_mmap=yes
9820 else
9821   conftest_rc="$?"
9822   echo "configure: failed program was:" >&5
9823   cat conftest.$ac_ext >&5
9824   rm -fr conftest*
9825   have_mmap=no
9826 fi
9827 rm -fr conftest* ;;
9828 esac
9829 echo "$ac_t""$have_mmap" 1>&6
9830 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9831     Defining HAVE_MMAP
9832 EOF
9833 cat >> confdefs.h <<\EOF
9834 #define HAVE_MMAP 1
9835 EOF
9836 }
9837
9838 for ac_hdr in unistd.h
9839 do
9840 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9841 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9842 echo "configure:9843: checking for $ac_hdr" >&5
9843
9844 cat > conftest.$ac_ext <<EOF
9845 #line 9846 "configure"
9846 #include "confdefs.h"
9847 #include <$ac_hdr>
9848 EOF
9849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9850 { (eval echo configure:9851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9852 if test -z "$ac_err"; then
9853   rm -rf conftest*
9854   eval "ac_cv_header_$ac_safe=yes"
9855 else
9856   echo "$ac_err" >&5
9857   echo "configure: failed program was:" >&5
9858   cat conftest.$ac_ext >&5
9859   rm -rf conftest*
9860   eval "ac_cv_header_$ac_safe=no"
9861 fi
9862 rm -f conftest*
9863 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9864   echo "$ac_t""yes" 1>&6
9865     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9866   { test "$extra_verbose" = "yes" && cat << EOF
9867     Defining $ac_tr_hdr
9868 EOF
9869 cat >> confdefs.h <<EOF
9870 #define $ac_tr_hdr 1
9871 EOF
9872 }
9873  
9874 else
9875   echo "$ac_t""no" 1>&6
9876 fi
9877 done
9878
9879 for ac_func in getpagesize
9880 do
9881 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9882 echo "configure:9883: checking for $ac_func" >&5
9883
9884 cat > conftest.$ac_ext <<EOF
9885 #line 9886 "configure"
9886 #include "confdefs.h"
9887 /* System header to define __stub macros and hopefully few prototypes,
9888     which can conflict with char $ac_func(); below.  */
9889 #include <assert.h>
9890 /* Override any gcc2 internal prototype to avoid an error.  */
9891 /* We use char because int might match the return type of a gcc2
9892     builtin and then its argument prototype would still apply.  */
9893 char $ac_func();
9894
9895 int main() {
9896
9897 /* The GNU C library defines this for functions which it implements
9898     to always fail with ENOSYS.  Some functions are actually named
9899     something starting with __ and the normal name is an alias.  */
9900 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9901 choke me
9902 #else
9903 $ac_func();
9904 #endif
9905
9906 ; return 0; }
9907 EOF
9908 if { (eval echo configure:9909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9909   rm -rf conftest*
9910   eval "ac_cv_func_$ac_func=yes"
9911 else
9912   echo "configure: failed program was:" >&5
9913   cat conftest.$ac_ext >&5
9914   rm -rf conftest*
9915   eval "ac_cv_func_$ac_func=no"
9916 fi
9917 rm -f conftest*
9918
9919 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9920   echo "$ac_t""yes" 1>&6
9921     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9922   { test "$extra_verbose" = "yes" && cat << EOF
9923     Defining $ac_tr_func
9924 EOF
9925 cat >> confdefs.h <<EOF
9926 #define $ac_tr_func 1
9927 EOF
9928 }
9929  
9930 else
9931   echo "$ac_t""no" 1>&6
9932 fi
9933 done
9934
9935 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9936 echo "configure:9937: checking for working mmap" >&5
9937
9938 cat > conftest.$ac_ext <<EOF
9939 #line 9940 "configure"
9940 #include "confdefs.h"
9941
9942 /* Thanks to Mike Haertel and Jim Avera for this test.
9943    Here is a matrix of mmap possibilities:
9944         mmap private not fixed
9945         mmap private fixed at somewhere currently unmapped
9946         mmap private fixed at somewhere already mapped
9947         mmap shared not fixed
9948         mmap shared fixed at somewhere currently unmapped
9949         mmap shared fixed at somewhere already mapped
9950    For private mappings, we should verify that changes cannot be read()
9951    back from the file, nor mmap's back from the file at a different
9952    address.  (There have been systems where private was not correctly
9953    implemented like the infamous i386 svr4.0, and systems where the
9954    VM page cache was not coherent with the filesystem buffer cache
9955    like early versions of FreeBSD and possibly contemporary NetBSD.)
9956    For shared mappings, we should conversely verify that changes get
9957    propogated back to all the places they're supposed to be.
9958
9959    Grep wants private fixed already mapped.
9960    The main things grep needs to know about mmap are:
9961    * does it exist and is it safe to write into the mmap'd area
9962    * how to use it (BSD variants)  */
9963 #include <sys/types.h>
9964 #include <fcntl.h>
9965 #include <sys/mman.h>
9966
9967 /* This mess was copied from the GNU getpagesize.h.  */
9968 #ifndef HAVE_GETPAGESIZE
9969 # ifdef HAVE_UNISTD_H
9970 #  include <unistd.h>
9971 # endif
9972
9973 /* Assume that all systems that can run configure have sys/param.h.  */
9974 # ifndef HAVE_SYS_PARAM_H
9975 #  define HAVE_SYS_PARAM_H 1
9976 # endif
9977
9978 # ifdef _SC_PAGESIZE
9979 #  define getpagesize() sysconf(_SC_PAGESIZE)
9980 # else /* no _SC_PAGESIZE */
9981 #  ifdef HAVE_SYS_PARAM_H
9982 #   include <sys/param.h>
9983 #   ifdef EXEC_PAGESIZE
9984 #    define getpagesize() EXEC_PAGESIZE
9985 #   else /* no EXEC_PAGESIZE */
9986 #    ifdef NBPG
9987 #     define getpagesize() NBPG * CLSIZE
9988 #     ifndef CLSIZE
9989 #      define CLSIZE 1
9990 #     endif /* no CLSIZE */
9991 #    else /* no NBPG */
9992 #     ifdef NBPC
9993 #      define getpagesize() NBPC
9994 #     else /* no NBPC */
9995 #      ifdef PAGESIZE
9996 #       define getpagesize() PAGESIZE
9997 #      endif /* PAGESIZE */
9998 #     endif /* no NBPC */
9999 #    endif /* no NBPG */
10000 #   endif /* no EXEC_PAGESIZE */
10001 #  else /* no HAVE_SYS_PARAM_H */
10002 #   define getpagesize() 8192   /* punt totally */
10003 #  endif /* no HAVE_SYS_PARAM_H */
10004 # endif /* no _SC_PAGESIZE */
10005
10006 #endif /* no HAVE_GETPAGESIZE */
10007
10008 #ifdef __cplusplus
10009 extern "C" { void *malloc(unsigned); }
10010 #else
10011 char *malloc();
10012 #endif
10013
10014 int
10015 main()
10016 {
10017         char *data, *data2, *data3;
10018         int i, pagesize;
10019         int fd;
10020
10021         pagesize = getpagesize();
10022
10023         /*
10024          * First, make a file with some known garbage in it.
10025          */
10026         data = malloc(pagesize);
10027         if (!data)
10028                 exit(1);
10029         for (i = 0; i < pagesize; ++i)
10030                 *(data + i) = rand();
10031         umask(0);
10032         fd = creat("conftestmmap", 0600);
10033         if (fd < 0)
10034                 exit(1);
10035         if (write(fd, data, pagesize) != pagesize)
10036                 exit(1);
10037         close(fd);
10038
10039         /*
10040          * Next, try to mmap the file at a fixed address which
10041          * already has something else allocated at it.  If we can,
10042          * also make sure that we see the same garbage.
10043          */
10044         fd = open("conftestmmap", O_RDWR);
10045         if (fd < 0)
10046                 exit(1);
10047         data2 = malloc(2 * pagesize);
10048         if (!data2)
10049                 exit(1);
10050         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
10051         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
10052             MAP_PRIVATE | MAP_FIXED, fd, 0L))
10053                 exit(1);
10054         for (i = 0; i < pagesize; ++i)
10055                 if (*(data + i) != *(data2 + i))
10056                         exit(1);
10057
10058         /*
10059          * Finally, make sure that changes to the mapped area
10060          * do not percolate back to the file as seen by read().
10061          * (This is a bug on some variants of i386 svr4.0.)
10062          */
10063         for (i = 0; i < pagesize; ++i)
10064                 *(data2 + i) = *(data2 + i) + 1;
10065         data3 = malloc(pagesize);
10066         if (!data3)
10067                 exit(1);
10068         if (read(fd, data3, pagesize) != pagesize)
10069                 exit(1);
10070         for (i = 0; i < pagesize; ++i)
10071                 if (*(data + i) != *(data3 + i))
10072                         exit(1);
10073         close(fd);
10074         unlink("conftestmmap");
10075         exit(0);
10076 }
10077
10078 EOF
10079 if { (eval echo configure:10080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10080 then
10081   ac_cv_func_mmap_fixed_mapped=yes
10082 else
10083   conftest_rc="$?"
10084   echo "configure: failed program was:" >&5
10085   cat conftest.$ac_ext >&5
10086   rm -fr conftest*
10087   ac_cv_func_mmap_fixed_mapped=no
10088 fi
10089 rm -fr conftest*
10090
10091 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
10092 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10093   { test "$extra_verbose" = "yes" && cat << \EOF
10094     Defining HAVE_MMAP
10095 EOF
10096 cat >> confdefs.h <<\EOF
10097 #define HAVE_MMAP 1
10098 EOF
10099 }
10100
10101 fi
10102
10103
10104 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10105 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10106 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10107     Defining REL_ALLOC
10108 EOF
10109 cat >> confdefs.h <<\EOF
10110 #define REL_ALLOC 1
10111 EOF
10112 }
10113
10114
10115 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10116 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10117 echo "configure:10118: checking for termios.h" >&5
10118
10119 cat > conftest.$ac_ext <<EOF
10120 #line 10121 "configure"
10121 #include "confdefs.h"
10122 #include <termios.h>
10123 EOF
10124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10125 { (eval echo configure:10126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10127 if test -z "$ac_err"; then
10128   rm -rf conftest*
10129   eval "ac_cv_header_$ac_safe=yes"
10130 else
10131   echo "$ac_err" >&5
10132   echo "configure: failed program was:" >&5
10133   cat conftest.$ac_ext >&5
10134   rm -rf conftest*
10135   eval "ac_cv_header_$ac_safe=no"
10136 fi
10137 rm -f conftest*
10138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10139   echo "$ac_t""yes" 1>&6
10140   { test "$extra_verbose" = "yes" && cat << \EOF
10141     Defining HAVE_TERMIOS
10142 EOF
10143 cat >> confdefs.h <<\EOF
10144 #define HAVE_TERMIOS 1
10145 EOF
10146 }
10147
10148   { test "$extra_verbose" = "yes" && cat << \EOF
10149     Defining SIGNALS_VIA_CHARACTERS
10150 EOF
10151 cat >> confdefs.h <<\EOF
10152 #define SIGNALS_VIA_CHARACTERS 1
10153 EOF
10154 }
10155
10156   { test "$extra_verbose" = "yes" && cat << \EOF
10157     Defining NO_TERMIO
10158 EOF
10159 cat >> confdefs.h <<\EOF
10160 #define NO_TERMIO 1
10161 EOF
10162 }
10163
10164 else
10165   echo "$ac_t""no" 1>&6
10166 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10167 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10168 echo "configure:10169: checking for termio.h" >&5
10169
10170 cat > conftest.$ac_ext <<EOF
10171 #line 10172 "configure"
10172 #include "confdefs.h"
10173 #include <termio.h>
10174 EOF
10175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10176 { (eval echo configure:10177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10178 if test -z "$ac_err"; then
10179   rm -rf conftest*
10180   eval "ac_cv_header_$ac_safe=yes"
10181 else
10182   echo "$ac_err" >&5
10183   echo "configure: failed program was:" >&5
10184   cat conftest.$ac_ext >&5
10185   rm -rf conftest*
10186   eval "ac_cv_header_$ac_safe=no"
10187 fi
10188 rm -f conftest*
10189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10190   echo "$ac_t""yes" 1>&6
10191   { test "$extra_verbose" = "yes" && cat << \EOF
10192     Defining HAVE_TERMIO
10193 EOF
10194 cat >> confdefs.h <<\EOF
10195 #define HAVE_TERMIO 1
10196 EOF
10197 }
10198
10199 else
10200   echo "$ac_t""no" 1>&6
10201 fi
10202
10203 fi
10204
10205
10206
10207 echo $ac_n "checking for socket""... $ac_c" 1>&6
10208 echo "configure:10209: checking for socket" >&5
10209
10210 cat > conftest.$ac_ext <<EOF
10211 #line 10212 "configure"
10212 #include "confdefs.h"
10213 /* System header to define __stub macros and hopefully few prototypes,
10214     which can conflict with char socket(); below.  */
10215 #include <assert.h>
10216 /* Override any gcc2 internal prototype to avoid an error.  */
10217 /* We use char because int might match the return type of a gcc2
10218     builtin and then its argument prototype would still apply.  */
10219 char socket();
10220
10221 int main() {
10222
10223 /* The GNU C library defines this for functions which it implements
10224     to always fail with ENOSYS.  Some functions are actually named
10225     something starting with __ and the normal name is an alias.  */
10226 #if defined (__stub_socket) || defined (__stub___socket)
10227 choke me
10228 #else
10229 socket();
10230 #endif
10231
10232 ; return 0; }
10233 EOF
10234 if { (eval echo configure:10235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10235   rm -rf conftest*
10236   eval "ac_cv_func_socket=yes"
10237 else
10238   echo "configure: failed program was:" >&5
10239   cat conftest.$ac_ext >&5
10240   rm -rf conftest*
10241   eval "ac_cv_func_socket=no"
10242 fi
10243 rm -f conftest*
10244
10245 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10246   echo "$ac_t""yes" 1>&6
10247   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10248 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10249 echo "configure:10250: checking for netinet/in.h" >&5
10250
10251 cat > conftest.$ac_ext <<EOF
10252 #line 10253 "configure"
10253 #include "confdefs.h"
10254 #include <netinet/in.h>
10255 EOF
10256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10257 { (eval echo configure:10258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10259 if test -z "$ac_err"; then
10260   rm -rf conftest*
10261   eval "ac_cv_header_$ac_safe=yes"
10262 else
10263   echo "$ac_err" >&5
10264   echo "configure: failed program was:" >&5
10265   cat conftest.$ac_ext >&5
10266   rm -rf conftest*
10267   eval "ac_cv_header_$ac_safe=no"
10268 fi
10269 rm -f conftest*
10270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10271   echo "$ac_t""yes" 1>&6
10272   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10273 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10274 echo "configure:10275: checking for arpa/inet.h" >&5
10275
10276 cat > conftest.$ac_ext <<EOF
10277 #line 10278 "configure"
10278 #include "confdefs.h"
10279 #include <arpa/inet.h>
10280 EOF
10281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10282 { (eval echo configure:10283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10284 if test -z "$ac_err"; then
10285   rm -rf conftest*
10286   eval "ac_cv_header_$ac_safe=yes"
10287 else
10288   echo "$ac_err" >&5
10289   echo "configure: failed program was:" >&5
10290   cat conftest.$ac_ext >&5
10291   rm -rf conftest*
10292   eval "ac_cv_header_$ac_safe=no"
10293 fi
10294 rm -f conftest*
10295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10296   echo "$ac_t""yes" 1>&6
10297   
10298   { test "$extra_verbose" = "yes" && cat << \EOF
10299     Defining HAVE_SOCKETS
10300 EOF
10301 cat >> confdefs.h <<\EOF
10302 #define HAVE_SOCKETS 1
10303 EOF
10304 }
10305
10306       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10307 echo "configure:10308: checking "for sun_len member in struct sockaddr_un"" >&5
10308       cat > conftest.$ac_ext <<EOF
10309 #line 10310 "configure"
10310 #include "confdefs.h"
10311
10312 #include <sys/types.h>
10313 #include <sys/socket.h>
10314 #include <sys/un.h>
10315       
10316 int main() {
10317 static struct sockaddr_un x; x.sun_len = 1;
10318 ; return 0; }
10319 EOF
10320 if { (eval echo configure:10321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10321   rm -rf conftest*
10322   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10323     Defining HAVE_SOCKADDR_SUN_LEN
10324 EOF
10325 cat >> confdefs.h <<\EOF
10326 #define HAVE_SOCKADDR_SUN_LEN 1
10327 EOF
10328 }
10329
10330 else
10331   echo "configure: failed program was:" >&5
10332   cat conftest.$ac_ext >&5
10333   rm -rf conftest*
10334   echo "$ac_t""no" 1>&6
10335 fi
10336 rm -f conftest*
10337       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10338 echo "configure:10339: checking "for ip_mreq struct in netinet/in.h"" >&5
10339       cat > conftest.$ac_ext <<EOF
10340 #line 10341 "configure"
10341 #include "confdefs.h"
10342
10343 #include <sys/types.h>
10344 #include <netinet/in.h>
10345       
10346 int main() {
10347 static struct ip_mreq x;
10348 ; return 0; }
10349 EOF
10350 if { (eval echo configure:10351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10351   rm -rf conftest*
10352   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10353     Defining HAVE_MULTICAST
10354 EOF
10355 cat >> confdefs.h <<\EOF
10356 #define HAVE_MULTICAST 1
10357 EOF
10358 }
10359
10360 else
10361   echo "configure: failed program was:" >&5
10362   cat conftest.$ac_ext >&5
10363   rm -rf conftest*
10364   echo "$ac_t""no" 1>&6
10365 fi
10366 rm -f conftest*
10367 else
10368   echo "$ac_t""no" 1>&6
10369 fi
10370
10371 else
10372   echo "$ac_t""no" 1>&6
10373 fi
10374
10375 else
10376   echo "$ac_t""no" 1>&6
10377 fi
10378
10379
10380 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10381 echo "configure:10382: checking for msgget" >&5
10382
10383 cat > conftest.$ac_ext <<EOF
10384 #line 10385 "configure"
10385 #include "confdefs.h"
10386 /* System header to define __stub macros and hopefully few prototypes,
10387     which can conflict with char msgget(); below.  */
10388 #include <assert.h>
10389 /* Override any gcc2 internal prototype to avoid an error.  */
10390 /* We use char because int might match the return type of a gcc2
10391     builtin and then its argument prototype would still apply.  */
10392 char msgget();
10393
10394 int main() {
10395
10396 /* The GNU C library defines this for functions which it implements
10397     to always fail with ENOSYS.  Some functions are actually named
10398     something starting with __ and the normal name is an alias.  */
10399 #if defined (__stub_msgget) || defined (__stub___msgget)
10400 choke me
10401 #else
10402 msgget();
10403 #endif
10404
10405 ; return 0; }
10406 EOF
10407 if { (eval echo configure:10408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10408   rm -rf conftest*
10409   eval "ac_cv_func_msgget=yes"
10410 else
10411   echo "configure: failed program was:" >&5
10412   cat conftest.$ac_ext >&5
10413   rm -rf conftest*
10414   eval "ac_cv_func_msgget=no"
10415 fi
10416 rm -f conftest*
10417
10418 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10419   echo "$ac_t""yes" 1>&6
10420   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10421 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10422 echo "configure:10423: checking for sys/ipc.h" >&5
10423
10424 cat > conftest.$ac_ext <<EOF
10425 #line 10426 "configure"
10426 #include "confdefs.h"
10427 #include <sys/ipc.h>
10428 EOF
10429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10430 { (eval echo configure:10431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10432 if test -z "$ac_err"; then
10433   rm -rf conftest*
10434   eval "ac_cv_header_$ac_safe=yes"
10435 else
10436   echo "$ac_err" >&5
10437   echo "configure: failed program was:" >&5
10438   cat conftest.$ac_ext >&5
10439   rm -rf conftest*
10440   eval "ac_cv_header_$ac_safe=no"
10441 fi
10442 rm -f conftest*
10443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10444   echo "$ac_t""yes" 1>&6
10445   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10446 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10447 echo "configure:10448: checking for sys/msg.h" >&5
10448
10449 cat > conftest.$ac_ext <<EOF
10450 #line 10451 "configure"
10451 #include "confdefs.h"
10452 #include <sys/msg.h>
10453 EOF
10454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10455 { (eval echo configure:10456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10457 if test -z "$ac_err"; then
10458   rm -rf conftest*
10459   eval "ac_cv_header_$ac_safe=yes"
10460 else
10461   echo "$ac_err" >&5
10462   echo "configure: failed program was:" >&5
10463   cat conftest.$ac_ext >&5
10464   rm -rf conftest*
10465   eval "ac_cv_header_$ac_safe=no"
10466 fi
10467 rm -f conftest*
10468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10469   echo "$ac_t""yes" 1>&6
10470   { test "$extra_verbose" = "yes" && cat << \EOF
10471     Defining HAVE_SYSVIPC
10472 EOF
10473 cat >> confdefs.h <<\EOF
10474 #define HAVE_SYSVIPC 1
10475 EOF
10476 }
10477
10478 else
10479   echo "$ac_t""no" 1>&6
10480 fi
10481
10482 else
10483   echo "$ac_t""no" 1>&6
10484 fi
10485
10486 else
10487   echo "$ac_t""no" 1>&6
10488 fi
10489
10490
10491 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10492 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10493 echo "configure:10494: checking for dirent.h" >&5
10494
10495 cat > conftest.$ac_ext <<EOF
10496 #line 10497 "configure"
10497 #include "confdefs.h"
10498 #include <dirent.h>
10499 EOF
10500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10501 { (eval echo configure:10502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10503 if test -z "$ac_err"; then
10504   rm -rf conftest*
10505   eval "ac_cv_header_$ac_safe=yes"
10506 else
10507   echo "$ac_err" >&5
10508   echo "configure: failed program was:" >&5
10509   cat conftest.$ac_ext >&5
10510   rm -rf conftest*
10511   eval "ac_cv_header_$ac_safe=no"
10512 fi
10513 rm -f conftest*
10514 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10515   echo "$ac_t""yes" 1>&6
10516   { test "$extra_verbose" = "yes" && cat << \EOF
10517     Defining SYSV_SYSTEM_DIR
10518 EOF
10519 cat >> confdefs.h <<\EOF
10520 #define SYSV_SYSTEM_DIR 1
10521 EOF
10522 }
10523
10524 else
10525   echo "$ac_t""no" 1>&6
10526 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
10527 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
10528 echo "configure:10529: checking for sys/dir.h" >&5
10529
10530 cat > conftest.$ac_ext <<EOF
10531 #line 10532 "configure"
10532 #include "confdefs.h"
10533 #include <sys/dir.h>
10534 EOF
10535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10536 { (eval echo configure:10537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10538 if test -z "$ac_err"; then
10539   rm -rf conftest*
10540   eval "ac_cv_header_$ac_safe=yes"
10541 else
10542   echo "$ac_err" >&5
10543   echo "configure: failed program was:" >&5
10544   cat conftest.$ac_ext >&5
10545   rm -rf conftest*
10546   eval "ac_cv_header_$ac_safe=no"
10547 fi
10548 rm -f conftest*
10549 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10550   echo "$ac_t""yes" 1>&6
10551   :
10552 else
10553   echo "$ac_t""no" 1>&6
10554 { test "$extra_verbose" = "yes" && cat << \EOF
10555     Defining NONSYSTEM_DIR_LIBRARY
10556 EOF
10557 cat >> confdefs.h <<\EOF
10558 #define NONSYSTEM_DIR_LIBRARY 1
10559 EOF
10560 }
10561
10562 fi
10563
10564 fi
10565
10566
10567 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
10568 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
10569 echo "configure:10570: checking for nlist.h" >&5
10570
10571 cat > conftest.$ac_ext <<EOF
10572 #line 10573 "configure"
10573 #include "confdefs.h"
10574 #include <nlist.h>
10575 EOF
10576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10577 { (eval echo configure:10578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10579 if test -z "$ac_err"; then
10580   rm -rf conftest*
10581   eval "ac_cv_header_$ac_safe=yes"
10582 else
10583   echo "$ac_err" >&5
10584   echo "configure: failed program was:" >&5
10585   cat conftest.$ac_ext >&5
10586   rm -rf conftest*
10587   eval "ac_cv_header_$ac_safe=no"
10588 fi
10589 rm -f conftest*
10590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10591   echo "$ac_t""yes" 1>&6
10592   { test "$extra_verbose" = "yes" && cat << \EOF
10593     Defining NLIST_STRUCT
10594 EOF
10595 cat >> confdefs.h <<\EOF
10596 #define NLIST_STRUCT 1
10597 EOF
10598 }
10599
10600 else
10601   echo "$ac_t""no" 1>&6
10602 fi
10603
10604
10605
10606 echo "checking "for sound support"" 1>&6
10607 echo "configure:10608: checking "for sound support"" >&5
10608 case "$with_sound" in
10609   native | both ) with_native_sound=yes;;
10610   nas    | no   ) with_native_sound=no;;
10611 esac
10612 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
10613
10614 if test "$with_native_sound" != "no"; then
10615     if test -n "$native_sound_lib"; then
10616     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
10617 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
10618 echo "configure:10619: checking for multimedia/audio_device.h" >&5
10619
10620 cat > conftest.$ac_ext <<EOF
10621 #line 10622 "configure"
10622 #include "confdefs.h"
10623 #include <multimedia/audio_device.h>
10624 EOF
10625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10626 { (eval echo configure:10627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10628 if test -z "$ac_err"; then
10629   rm -rf conftest*
10630   eval "ac_cv_header_$ac_safe=yes"
10631 else
10632   echo "$ac_err" >&5
10633   echo "configure: failed program was:" >&5
10634   cat conftest.$ac_ext >&5
10635   rm -rf conftest*
10636   eval "ac_cv_header_$ac_safe=no"
10637 fi
10638 rm -f conftest*
10639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10640   echo "$ac_t""yes" 1>&6
10641   sound_found=yes sound_cflags=""
10642       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10643    echo "    xemacs will be linked with \"sunplay.o\""
10644  fi
10645 else
10646   echo "$ac_t""no" 1>&6
10647 fi
10648
10649   fi
10650
10651     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
10652     sound_found=yes
10653     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10654    echo "    xemacs will be linked with \"sunplay.o\""
10655  fi
10656     if test -d "/usr/demo/SOUND/include"
10657       then sound_cflags="-I/usr/demo/SOUND/include"
10658       else sound_cflags="-I/usr/demo/SOUND"
10659     fi
10660     if test -z "$native_sound_lib" ; then
10661       if test -r "/usr/demo/SOUND/lib/libaudio.a"
10662         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
10663         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
10664       fi
10665     fi
10666   fi
10667
10668     if test -z "$sound_found"; then
10669     case "$canonical" in
10670     *-sgi-* )
10671       if test -z "$native_sound_lib"; then
10672         
10673 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
10674 echo "configure:10675: checking for ALopenport in -laudio" >&5
10675 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
10676
10677 xe_check_libs=" -laudio "
10678 cat > conftest.$ac_ext <<EOF
10679 #line 10680 "configure"
10680 #include "confdefs.h"
10681 /* Override any gcc2 internal prototype to avoid an error.  */
10682 /* We use char because int might match the return type of a gcc2
10683     builtin and then its argument prototype would still apply.  */
10684 char ALopenport();
10685
10686 int main() {
10687 ALopenport()
10688 ; return 0; }
10689 EOF
10690 if { (eval echo configure:10691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10691   rm -rf conftest*
10692   eval "ac_cv_lib_$ac_lib_var=yes"
10693 else
10694   echo "configure: failed program was:" >&5
10695   cat conftest.$ac_ext >&5
10696   rm -rf conftest*
10697   eval "ac_cv_lib_$ac_lib_var=no"
10698 fi
10699 rm -f conftest*
10700 xe_check_libs=""
10701
10702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10703   echo "$ac_t""yes" 1>&6
10704   native_sound_lib="-laudio"
10705 else
10706   echo "$ac_t""no" 1>&6
10707 fi
10708
10709
10710       fi
10711       if test -n "$native_sound_lib"; then
10712         sound_found=yes sound_cflags=""
10713         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
10714    echo "    xemacs will be linked with \"sgiplay.o\""
10715  fi
10716       fi ;;
10717     hppa*-hp-hpux* )
10718       if test -z "$native_sound_lib"; then
10719         
10720 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
10721 echo "configure:10722: checking for AOpenAudio in -lAlib" >&5
10722 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
10723
10724 xe_check_libs=" -lAlib "
10725 cat > conftest.$ac_ext <<EOF
10726 #line 10727 "configure"
10727 #include "confdefs.h"
10728 /* Override any gcc2 internal prototype to avoid an error.  */
10729 /* We use char because int might match the return type of a gcc2
10730     builtin and then its argument prototype would still apply.  */
10731 char AOpenAudio();
10732
10733 int main() {
10734 AOpenAudio()
10735 ; return 0; }
10736 EOF
10737 if { (eval echo configure:10738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10738   rm -rf conftest*
10739   eval "ac_cv_lib_$ac_lib_var=yes"
10740 else
10741   echo "configure: failed program was:" >&5
10742   cat conftest.$ac_ext >&5
10743   rm -rf conftest*
10744   eval "ac_cv_lib_$ac_lib_var=no"
10745 fi
10746 rm -f conftest*
10747 xe_check_libs=""
10748
10749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10750   echo "$ac_t""yes" 1>&6
10751   native_sound_lib="-lAlib"
10752 else
10753   echo "$ac_t""no" 1>&6
10754 fi
10755
10756
10757       fi
10758       if test -n "$native_sound_lib"; then
10759         sound_found=yes
10760         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
10761    echo "    xemacs will be linked with \"hpplay.o\""
10762  fi
10763         if test "$GCC" = "yes" # Kludge city
10764           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
10765           else sound_cflags="+e -I/usr/audio/examples"
10766         fi
10767       fi ;;
10768     esac
10769   fi
10770
10771     if test -z "$sound_found"; then
10772     for dir in "machine" "sys" "linux"; do
10773       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
10774 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
10775 echo "configure:10776: checking for ${dir}/soundcard.h" >&5
10776
10777 cat > conftest.$ac_ext <<EOF
10778 #line 10779 "configure"
10779 #include "confdefs.h"
10780 #include <${dir}/soundcard.h>
10781 EOF
10782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10783 { (eval echo configure:10784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10784 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10785 if test -z "$ac_err"; then
10786   rm -rf conftest*
10787   eval "ac_cv_header_$ac_safe=yes"
10788 else
10789   echo "$ac_err" >&5
10790   echo "configure: failed program was:" >&5
10791   cat conftest.$ac_ext >&5
10792   rm -rf conftest*
10793   eval "ac_cv_header_$ac_safe=no"
10794 fi
10795 rm -f conftest*
10796 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10797   echo "$ac_t""yes" 1>&6
10798   sound_found=yes
10799         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
10800    echo "    xemacs will be linked with \"linuxplay.o\""
10801  fi
10802         { test "$extra_verbose" = "yes" && cat << EOF
10803     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
10804 EOF
10805 cat >> confdefs.h <<EOF
10806 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
10807 EOF
10808 }
10809
10810         break
10811 else
10812   echo "$ac_t""no" 1>&6
10813 fi
10814
10815     done
10816   fi
10817
10818   test "$sound_found" = "yes" && with_native_sound=yes
10819 fi
10820
10821 if test -z "$with_sound"; then
10822   if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then
10823     with_sound=native
10824   fi
10825 fi
10826
10827 if test "$with_native_sound" = "yes"; then
10828   { test "$extra_verbose" = "yes" && cat << \EOF
10829     Defining HAVE_NATIVE_SOUND
10830 EOF
10831 cat >> confdefs.h <<\EOF
10832 #define HAVE_NATIVE_SOUND 1
10833 EOF
10834 }
10835
10836   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
10837 fi
10838
10839 case "$with_sound" in both | nas )
10840   { test "$extra_verbose" = "yes" && cat << \EOF
10841     Defining HAVE_NAS_SOUND
10842 EOF
10843 cat >> confdefs.h <<\EOF
10844 #define HAVE_NAS_SOUND 1
10845 EOF
10846 }
10847
10848   extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
10849    echo "    xemacs will be linked with \"nas.o\""
10850  fi
10851   libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
10852       cat > conftest.$ac_ext <<EOF
10853 #line 10854 "configure"
10854 #include "confdefs.h"
10855 #include <audio/Xtutil.h>
10856 EOF
10857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10858   egrep "AuXtErrorJump" >/dev/null 2>&1; then
10859   :
10860 else
10861   rm -rf conftest*
10862   { test "$extra_verbose" = "yes" && cat << \EOF
10863     Defining NAS_NO_ERROR_JUMP
10864 EOF
10865 cat >> confdefs.h <<\EOF
10866 #define NAS_NO_ERROR_JUMP 1
10867 EOF
10868 }
10869
10870 fi
10871 rm -f conftest*
10872
10873 esac
10874
10875
10876 test -z "$with_tty" && with_tty=yes
10877
10878 if test "$with_tty" = "yes"  ; then
10879   echo "checking for TTY-related features" 1>&6
10880 echo "configure:10881: checking for TTY-related features" >&5
10881   { test "$extra_verbose" = "yes" && cat << \EOF
10882     Defining HAVE_TTY
10883 EOF
10884 cat >> confdefs.h <<\EOF
10885 #define HAVE_TTY 1
10886 EOF
10887 }
10888
10889   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
10890    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\""
10891  fi
10892
10893     if test -z "$with_ncurses"; then
10894     
10895 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
10896 echo "configure:10897: checking for tgetent in -lncurses" >&5
10897 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
10898
10899 xe_check_libs=" -lncurses "
10900 cat > conftest.$ac_ext <<EOF
10901 #line 10902 "configure"
10902 #include "confdefs.h"
10903 /* Override any gcc2 internal prototype to avoid an error.  */
10904 /* We use char because int might match the return type of a gcc2
10905     builtin and then its argument prototype would still apply.  */
10906 char tgetent();
10907
10908 int main() {
10909 tgetent()
10910 ; return 0; }
10911 EOF
10912 if { (eval echo configure:10913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10913   rm -rf conftest*
10914   eval "ac_cv_lib_$ac_lib_var=yes"
10915 else
10916   echo "configure: failed program was:" >&5
10917   cat conftest.$ac_ext >&5
10918   rm -rf conftest*
10919   eval "ac_cv_lib_$ac_lib_var=no"
10920 fi
10921 rm -f conftest*
10922 xe_check_libs=""
10923
10924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10925   echo "$ac_t""yes" 1>&6
10926   with_ncurses=yes
10927 else
10928   echo "$ac_t""no" 1>&6
10929 with_ncurses=no
10930 fi
10931
10932
10933   fi
10934   if test "$with_ncurses" = "yes"; then
10935     { test "$extra_verbose" = "yes" && cat << \EOF
10936     Defining HAVE_NCURSES
10937 EOF
10938 cat >> confdefs.h <<\EOF
10939 #define HAVE_NCURSES 1
10940 EOF
10941 }
10942
10943     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
10944 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
10945 echo "configure:10946: checking for ncurses/curses.h" >&5
10946
10947 cat > conftest.$ac_ext <<EOF
10948 #line 10949 "configure"
10949 #include "confdefs.h"
10950 #include <ncurses/curses.h>
10951 EOF
10952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10953 { (eval echo configure:10954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10955 if test -z "$ac_err"; then
10956   rm -rf conftest*
10957   eval "ac_cv_header_$ac_safe=yes"
10958 else
10959   echo "$ac_err" >&5
10960   echo "configure: failed program was:" >&5
10961   cat conftest.$ac_ext >&5
10962   rm -rf conftest*
10963   eval "ac_cv_header_$ac_safe=no"
10964 fi
10965 rm -f conftest*
10966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10967   echo "$ac_t""yes" 1>&6
10968   curses_h_path=ncurses/curses.h
10969 else
10970   echo "$ac_t""no" 1>&6
10971 fi
10972
10973     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
10974 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
10975 echo "configure:10976: checking for ncurses/term.h" >&5
10976
10977 cat > conftest.$ac_ext <<EOF
10978 #line 10979 "configure"
10979 #include "confdefs.h"
10980 #include <ncurses/term.h>
10981 EOF
10982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10983 { (eval echo configure:10984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10985 if test -z "$ac_err"; then
10986   rm -rf conftest*
10987   eval "ac_cv_header_$ac_safe=yes"
10988 else
10989   echo "$ac_err" >&5
10990   echo "configure: failed program was:" >&5
10991   cat conftest.$ac_ext >&5
10992   rm -rf conftest*
10993   eval "ac_cv_header_$ac_safe=no"
10994 fi
10995 rm -f conftest*
10996 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10997   echo "$ac_t""yes" 1>&6
10998   term_h_path=ncurses/term.h
10999 else
11000   echo "$ac_t""no" 1>&6
11001 fi
11002
11003     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11004    echo "    xemacs will be linked with \"terminfo.o\""
11005  fi
11006     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11007
11008     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11009                         save_c_switch_site="$c_switch_site"
11010       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11011       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11012 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11013 echo "configure:11014: checking for ncurses/curses.h" >&5
11014
11015 cat > conftest.$ac_ext <<EOF
11016 #line 11017 "configure"
11017 #include "confdefs.h"
11018 #include <ncurses/curses.h>
11019 EOF
11020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11021 { (eval echo configure:11022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11023 if test -z "$ac_err"; then
11024   rm -rf conftest*
11025   eval "ac_cv_header_$ac_safe=yes"
11026 else
11027   echo "$ac_err" >&5
11028   echo "configure: failed program was:" >&5
11029   cat conftest.$ac_ext >&5
11030   rm -rf conftest*
11031   eval "ac_cv_header_$ac_safe=no"
11032 fi
11033 rm -f conftest*
11034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11035   echo "$ac_t""yes" 1>&6
11036   curses_h_path=ncurses/curses.h
11037 else
11038   echo "$ac_t""no" 1>&6
11039 fi
11040
11041       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11042         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11043         else c_switch_site="$save_c_switch_site"
11044       fi
11045     fi
11046   else         if test "$have_terminfo" = "yes"; then
11047       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11048    echo "    xemacs will be linked with \"terminfo.o\""
11049  fi
11050       if test -n "$libs_termcap"; then
11051         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11052       else
11053         for lib in curses termlib termcap; do
11054           
11055 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11056 echo "configure:11057: checking for tgetent in -l$lib" >&5
11057 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11058
11059 xe_check_libs=" -l$lib "
11060 cat > conftest.$ac_ext <<EOF
11061 #line 11062 "configure"
11062 #include "confdefs.h"
11063 /* Override any gcc2 internal prototype to avoid an error.  */
11064 /* We use char because int might match the return type of a gcc2
11065     builtin and then its argument prototype would still apply.  */
11066 char tgetent();
11067
11068 int main() {
11069 tgetent()
11070 ; return 0; }
11071 EOF
11072 if { (eval echo configure:11073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11073   rm -rf conftest*
11074   eval "ac_cv_lib_$ac_lib_var=yes"
11075 else
11076   echo "configure: failed program was:" >&5
11077   cat conftest.$ac_ext >&5
11078   rm -rf conftest*
11079   eval "ac_cv_lib_$ac_lib_var=no"
11080 fi
11081 rm -f conftest*
11082 xe_check_libs=""
11083
11084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11085   echo "$ac_t""yes" 1>&6
11086   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11087 else
11088   echo "$ac_t""no" 1>&6
11089 fi
11090
11091
11092         done
11093       fi
11094     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11095    echo "    xemacs will be linked with \"tparam.o\""
11096  fi
11097                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11098       if test -n "$libs_termcap"; then
11099         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11100       else
11101         
11102 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11103 echo "configure:11104: checking for tgetent in -lcurses" >&5
11104 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11105
11106 xe_check_libs=" -lcurses "
11107 cat > conftest.$ac_ext <<EOF
11108 #line 11109 "configure"
11109 #include "confdefs.h"
11110 /* Override any gcc2 internal prototype to avoid an error.  */
11111 /* We use char because int might match the return type of a gcc2
11112     builtin and then its argument prototype would still apply.  */
11113 char tgetent();
11114
11115 int main() {
11116 tgetent()
11117 ; return 0; }
11118 EOF
11119 if { (eval echo configure:11120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11120   rm -rf conftest*
11121   eval "ac_cv_lib_$ac_lib_var=yes"
11122 else
11123   echo "configure: failed program was:" >&5
11124   cat conftest.$ac_ext >&5
11125   rm -rf conftest*
11126   eval "ac_cv_lib_$ac_lib_var=no"
11127 fi
11128 rm -f conftest*
11129 xe_check_libs=""
11130
11131 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11132   echo "$ac_t""yes" 1>&6
11133   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11134 else
11135   echo "$ac_t""no" 1>&6
11136 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11137 echo "configure:11138: checking for tgetent in -ltermcap" >&5
11138 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11139
11140 xe_check_libs=" -ltermcap "
11141 cat > conftest.$ac_ext <<EOF
11142 #line 11143 "configure"
11143 #include "confdefs.h"
11144 /* Override any gcc2 internal prototype to avoid an error.  */
11145 /* We use char because int might match the return type of a gcc2
11146     builtin and then its argument prototype would still apply.  */
11147 char tgetent();
11148
11149 int main() {
11150 tgetent()
11151 ; return 0; }
11152 EOF
11153 if { (eval echo configure:11154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11154   rm -rf conftest*
11155   eval "ac_cv_lib_$ac_lib_var=yes"
11156 else
11157   echo "configure: failed program was:" >&5
11158   cat conftest.$ac_ext >&5
11159   rm -rf conftest*
11160   eval "ac_cv_lib_$ac_lib_var=no"
11161 fi
11162 rm -f conftest*
11163 xe_check_libs=""
11164
11165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11166   echo "$ac_t""yes" 1>&6
11167   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11168 else
11169   echo "$ac_t""no" 1>&6
11170 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11171    echo "    xemacs will be linked with \"termcap.o\""
11172  fi
11173 fi
11174
11175
11176 fi
11177
11178
11179       fi
11180     fi
11181   fi
11182   { test "$extra_verbose" = "yes" && cat << EOF
11183     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11184 EOF
11185 cat >> confdefs.h <<EOF
11186 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11187 EOF
11188 }
11189
11190   { test "$extra_verbose" = "yes" && cat << EOF
11191     Defining TERM_H_PATH = "${term_h_path-term.h}"
11192 EOF
11193 cat >> confdefs.h <<EOF
11194 #define TERM_H_PATH "${term_h_path-term.h}"
11195 EOF
11196 }
11197
11198
11199     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11200 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11201 echo "configure:11202: checking for gpm.h" >&5
11202
11203 cat > conftest.$ac_ext <<EOF
11204 #line 11205 "configure"
11205 #include "confdefs.h"
11206 #include <gpm.h>
11207 EOF
11208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11209 { (eval echo configure:11210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11211 if test -z "$ac_err"; then
11212   rm -rf conftest*
11213   eval "ac_cv_header_$ac_safe=yes"
11214 else
11215   echo "$ac_err" >&5
11216   echo "configure: failed program was:" >&5
11217   cat conftest.$ac_ext >&5
11218   rm -rf conftest*
11219   eval "ac_cv_header_$ac_safe=no"
11220 fi
11221 rm -f conftest*
11222 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11223   echo "$ac_t""yes" 1>&6
11224   :
11225 else
11226   echo "$ac_t""no" 1>&6
11227 with_gpm=no
11228 fi
11229  }
11230   test -z "$with_gpm" && { 
11231 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11232 echo "configure:11233: checking for Gpm_Open in -lgpm" >&5
11233 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11234
11235 xe_check_libs=" -lgpm "
11236 cat > conftest.$ac_ext <<EOF
11237 #line 11238 "configure"
11238 #include "confdefs.h"
11239 /* Override any gcc2 internal prototype to avoid an error.  */
11240 /* We use char because int might match the return type of a gcc2
11241     builtin and then its argument prototype would still apply.  */
11242 char Gpm_Open();
11243
11244 int main() {
11245 Gpm_Open()
11246 ; return 0; }
11247 EOF
11248 if { (eval echo configure:11249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11249   rm -rf conftest*
11250   eval "ac_cv_lib_$ac_lib_var=yes"
11251 else
11252   echo "configure: failed program was:" >&5
11253   cat conftest.$ac_ext >&5
11254   rm -rf conftest*
11255   eval "ac_cv_lib_$ac_lib_var=no"
11256 fi
11257 rm -f conftest*
11258 xe_check_libs=""
11259
11260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11261   echo "$ac_t""yes" 1>&6
11262   with_gpm=yes
11263 else
11264   echo "$ac_t""no" 1>&6
11265 with_gpm=no
11266 fi
11267
11268  }
11269   if test "$with_gpm" = "yes"; then
11270     { test "$extra_verbose" = "yes" && cat << \EOF
11271     Defining HAVE_GPM
11272 EOF
11273 cat >> confdefs.h <<\EOF
11274 #define HAVE_GPM 1
11275 EOF
11276 }
11277
11278     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
11279    echo "    xemacs will be linked with \"gpmevent.o\""
11280  fi
11281     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
11282   fi
11283
11284 else   for feature in ncurses gpm; do
11285     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11286       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
11287     fi
11288     eval "with_${feature}=no"
11289   done
11290 fi 
11291 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
11292    echo "    xemacs will be linked with \"event-unixoid.o\""
11293  fi
11294
11295
11296 test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
11297   != "no no no" && echo "checking for database support" 1>&6
11298 echo "configure:11299: checking for database support" >&5
11299
11300 if test "$with_database_gnudbm $with_database_dbm" != "no no"; then
11301   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
11302 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
11303 echo "configure:11304: checking for ndbm.h" >&5
11304
11305 cat > conftest.$ac_ext <<EOF
11306 #line 11307 "configure"
11307 #include "confdefs.h"
11308 #include <ndbm.h>
11309 EOF
11310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11311 { (eval echo configure:11312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11313 if test -z "$ac_err"; then
11314   rm -rf conftest*
11315   eval "ac_cv_header_$ac_safe=yes"
11316 else
11317   echo "$ac_err" >&5
11318   echo "configure: failed program was:" >&5
11319   cat conftest.$ac_ext >&5
11320   rm -rf conftest*
11321   eval "ac_cv_header_$ac_safe=no"
11322 fi
11323 rm -f conftest*
11324 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11325   echo "$ac_t""yes" 1>&6
11326   :
11327 else
11328   echo "$ac_t""no" 1>&6
11329
11330     test "$with_database_gnudbm" = "yes" -o \
11331          "$with_database_dbm"    = "yes" && \
11332       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11333     with_database_gnudbm=no with_database_dbm=no
11334 fi
11335
11336 fi
11337
11338 if test "$with_database_gnudbm" != "no"; then
11339   
11340 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
11341 echo "configure:11342: checking for dbm_open in -lgdbm" >&5
11342 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
11343
11344 xe_check_libs=" -lgdbm "
11345 cat > conftest.$ac_ext <<EOF
11346 #line 11347 "configure"
11347 #include "confdefs.h"
11348 /* Override any gcc2 internal prototype to avoid an error.  */
11349 /* We use char because int might match the return type of a gcc2
11350     builtin and then its argument prototype would still apply.  */
11351 char dbm_open();
11352
11353 int main() {
11354 dbm_open()
11355 ; return 0; }
11356 EOF
11357 if { (eval echo configure:11358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11358   rm -rf conftest*
11359   eval "ac_cv_lib_$ac_lib_var=yes"
11360 else
11361   echo "configure: failed program was:" >&5
11362   cat conftest.$ac_ext >&5
11363   rm -rf conftest*
11364   eval "ac_cv_lib_$ac_lib_var=no"
11365 fi
11366 rm -f conftest*
11367 xe_check_libs=""
11368
11369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11370   echo "$ac_t""yes" 1>&6
11371   with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm
11372 else
11373   echo "$ac_t""no" 1>&6
11374 if test "$with_database_gnudbm" = "yes"; then
11375      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
11376    fi
11377    with_database_gnudbm=no
11378 fi
11379
11380
11381 fi
11382
11383 if test "$with_database_dbm" != "no"; then
11384   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11385 echo "configure:11386: checking for dbm_open" >&5
11386
11387 cat > conftest.$ac_ext <<EOF
11388 #line 11389 "configure"
11389 #include "confdefs.h"
11390 /* System header to define __stub macros and hopefully few prototypes,
11391     which can conflict with char dbm_open(); below.  */
11392 #include <assert.h>
11393 /* Override any gcc2 internal prototype to avoid an error.  */
11394 /* We use char because int might match the return type of a gcc2
11395     builtin and then its argument prototype would still apply.  */
11396 char dbm_open();
11397
11398 int main() {
11399
11400 /* The GNU C library defines this for functions which it implements
11401     to always fail with ENOSYS.  Some functions are actually named
11402     something starting with __ and the normal name is an alias.  */
11403 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11404 choke me
11405 #else
11406 dbm_open();
11407 #endif
11408
11409 ; return 0; }
11410 EOF
11411 if { (eval echo configure:11412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11412   rm -rf conftest*
11413   eval "ac_cv_func_dbm_open=yes"
11414 else
11415   echo "configure: failed program was:" >&5
11416   cat conftest.$ac_ext >&5
11417   rm -rf conftest*
11418   eval "ac_cv_func_dbm_open=no"
11419 fi
11420 rm -f conftest*
11421
11422 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11423   echo "$ac_t""yes" 1>&6
11424   with_database_dbm=yes libdbm=
11425 else
11426   echo "$ac_t""no" 1>&6
11427
11428     
11429 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11430 echo "configure:11431: checking for dbm_open in -ldbm" >&5
11431 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
11432
11433 xe_check_libs=" -ldbm "
11434 cat > conftest.$ac_ext <<EOF
11435 #line 11436 "configure"
11436 #include "confdefs.h"
11437 /* Override any gcc2 internal prototype to avoid an error.  */
11438 /* We use char because int might match the return type of a gcc2
11439     builtin and then its argument prototype would still apply.  */
11440 char dbm_open();
11441
11442 int main() {
11443 dbm_open()
11444 ; return 0; }
11445 EOF
11446 if { (eval echo configure:11447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11447   rm -rf conftest*
11448   eval "ac_cv_lib_$ac_lib_var=yes"
11449 else
11450   echo "configure: failed program was:" >&5
11451   cat conftest.$ac_ext >&5
11452   rm -rf conftest*
11453   eval "ac_cv_lib_$ac_lib_var=no"
11454 fi
11455 rm -f conftest*
11456 xe_check_libs=""
11457
11458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11459   echo "$ac_t""yes" 1>&6
11460   with_database_dbm=yes libdbm=-ldbm
11461 else
11462   echo "$ac_t""no" 1>&6
11463 test "$with_database_dbm" = "yes" && \
11464         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11465       with_database_dbm=no
11466 fi
11467
11468
11469 fi
11470
11471 fi
11472
11473 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
11474 test "$with_database_gnudbm" = "yes" -o \
11475      "$with_database_dbm"    = "yes" && \
11476   { test "$extra_verbose" = "yes" && cat << \EOF
11477     Defining HAVE_DBM
11478 EOF
11479 cat >> confdefs.h <<\EOF
11480 #define HAVE_DBM 1
11481 EOF
11482 }
11483
11484
11485 if test "$with_database_berkdb" != "no"; then
11486   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
11487 echo "configure:11488: checking for Berkeley db.h" >&5
11488   for path in "db/db.h" "db.h"; do
11489     cat > conftest.$ac_ext <<EOF
11490 #line 11491 "configure"
11491 #include "confdefs.h"
11492 #ifdef HAVE_INTTYPES_H
11493 #define __BIT_TYPES_DEFINED__
11494 #include <inttypes.h>
11495 typedef uint8_t  u_int8_t;
11496 typedef uint16_t u_int16_t;
11497 typedef uint32_t u_int32_t;
11498 #ifdef WE_DONT_NEED_QUADS
11499 typedef uint64_t u_int64_t;
11500 #endif
11501 #endif
11502 #include <$path>
11503
11504 int main() {
11505
11506 ; return 0; }
11507 EOF
11508 if { (eval echo configure:11509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11509   rm -rf conftest*
11510   db_h_path="$path"; break
11511 else
11512   echo "configure: failed program was:" >&5
11513   cat conftest.$ac_ext >&5
11514 fi
11515 rm -f conftest*
11516   done
11517   if test -z "$db_h_path"
11518   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
11519   else echo "$ac_t""$db_h_path" 1>&6
11520   fi
11521
11522   if test "$with_database_berkdb" != "no"; then
11523     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
11524 echo "configure:11525: checking for Berkeley DB version" >&5
11525     cat > conftest.$ac_ext <<EOF
11526 #line 11527 "configure"
11527 #include "confdefs.h"
11528 #include <$db_h_path>
11529 #if DB_VERSION_MAJOR > 1
11530 yes
11531 #endif
11532
11533 EOF
11534 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11535   egrep "yes" >/dev/null 2>&1; then
11536   rm -rf conftest*
11537   echo "$ac_t""2" 1>&6; dbfunc=db_open
11538 else
11539   rm -rf conftest*
11540   echo "$ac_t""1" 1>&6; dbfunc=dbopen
11541 fi
11542 rm -f conftest*
11543
11544     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
11545 echo "configure:11546: checking for $dbfunc" >&5
11546
11547 cat > conftest.$ac_ext <<EOF
11548 #line 11549 "configure"
11549 #include "confdefs.h"
11550 /* System header to define __stub macros and hopefully few prototypes,
11551     which can conflict with char $dbfunc(); below.  */
11552 #include <assert.h>
11553 /* Override any gcc2 internal prototype to avoid an error.  */
11554 /* We use char because int might match the return type of a gcc2
11555     builtin and then its argument prototype would still apply.  */
11556 char $dbfunc();
11557
11558 int main() {
11559
11560 /* The GNU C library defines this for functions which it implements
11561     to always fail with ENOSYS.  Some functions are actually named
11562     something starting with __ and the normal name is an alias.  */
11563 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
11564 choke me
11565 #else
11566 $dbfunc();
11567 #endif
11568
11569 ; return 0; }
11570 EOF
11571 if { (eval echo configure:11572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11572   rm -rf conftest*
11573   eval "ac_cv_func_$dbfunc=yes"
11574 else
11575   echo "configure: failed program was:" >&5
11576   cat conftest.$ac_ext >&5
11577   rm -rf conftest*
11578   eval "ac_cv_func_$dbfunc=no"
11579 fi
11580 rm -f conftest*
11581
11582 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
11583   echo "$ac_t""yes" 1>&6
11584   with_database_berkdb=yes need_libdb=no
11585 else
11586   echo "$ac_t""no" 1>&6
11587
11588     
11589 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
11590 echo "configure:11591: checking for $dbfunc in -ldb" >&5
11591 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
11592
11593 xe_check_libs=" -ldb "
11594 cat > conftest.$ac_ext <<EOF
11595 #line 11596 "configure"
11596 #include "confdefs.h"
11597 /* Override any gcc2 internal prototype to avoid an error.  */
11598 /* We use char because int might match the return type of a gcc2
11599     builtin and then its argument prototype would still apply.  */
11600 char $dbfunc();
11601
11602 int main() {
11603 $dbfunc()
11604 ; return 0; }
11605 EOF
11606 if { (eval echo configure:11607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11607   rm -rf conftest*
11608   eval "ac_cv_lib_$ac_lib_var=yes"
11609 else
11610   echo "configure: failed program was:" >&5
11611   cat conftest.$ac_ext >&5
11612   rm -rf conftest*
11613   eval "ac_cv_lib_$ac_lib_var=no"
11614 fi
11615 rm -f conftest*
11616 xe_check_libs=""
11617
11618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11619   echo "$ac_t""yes" 1>&6
11620   with_database_berkdb=yes need_libdb=yes
11621 else
11622   echo "$ac_t""no" 1>&6
11623 fi
11624
11625
11626 fi
11627
11628   fi
11629
11630   if test "$with_database_berkdb" = "yes"; then
11631     { test "$extra_verbose" = "yes" && cat << EOF
11632     Defining DB_H_PATH = "$db_h_path"
11633 EOF
11634 cat >> confdefs.h <<EOF
11635 #define DB_H_PATH "$db_h_path"
11636 EOF
11637 }
11638
11639     { test "$extra_verbose" = "yes" && cat << \EOF
11640     Defining HAVE_BERKELEY_DB
11641 EOF
11642 cat >> confdefs.h <<\EOF
11643 #define HAVE_BERKELEY_DB 1
11644 EOF
11645 }
11646
11647     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
11648   else with_database_berkdb=no
11649   fi
11650 fi
11651
11652 if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
11653      != "no no no"; then
11654   { test "$extra_verbose" = "yes" && cat << \EOF
11655     Defining HAVE_DATABASE
11656 EOF
11657 cat >> confdefs.h <<\EOF
11658 #define HAVE_DATABASE 1
11659 EOF
11660 }
11661
11662   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
11663    echo "    xemacs will be linked with \"database.o\""
11664  fi
11665 fi
11666
11667 if test "$with_socks" = "yes"; then
11668   
11669 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
11670 echo "configure:11671: checking for SOCKSinit in -lsocks" >&5
11671 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
11672
11673 xe_check_libs=" -lsocks "
11674 cat > conftest.$ac_ext <<EOF
11675 #line 11676 "configure"
11676 #include "confdefs.h"
11677 /* Override any gcc2 internal prototype to avoid an error.  */
11678 /* We use char because int might match the return type of a gcc2
11679     builtin and then its argument prototype would still apply.  */
11680 char SOCKSinit();
11681
11682 int main() {
11683 SOCKSinit()
11684 ; return 0; }
11685 EOF
11686 if { (eval echo configure:11687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11687   rm -rf conftest*
11688   eval "ac_cv_lib_$ac_lib_var=yes"
11689 else
11690   echo "configure: failed program was:" >&5
11691   cat conftest.$ac_ext >&5
11692   rm -rf conftest*
11693   eval "ac_cv_lib_$ac_lib_var=no"
11694 fi
11695 rm -f conftest*
11696 xe_check_libs=""
11697
11698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11699   echo "$ac_t""yes" 1>&6
11700     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11701     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11702   { test "$extra_verbose" = "yes" && cat << EOF
11703     Defining $ac_tr_lib
11704 EOF
11705 cat >> confdefs.h <<EOF
11706 #define $ac_tr_lib 1
11707 EOF
11708 }
11709
11710   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
11711
11712 else
11713   echo "$ac_t""no" 1>&6
11714 fi
11715
11716
11717   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
11718     Defining HAVE_SOCKS
11719 EOF
11720 cat >> confdefs.h <<\EOF
11721 #define HAVE_SOCKS 1
11722 EOF
11723 }
11724
11725 fi
11726
11727 if test "$usage_tracking" = "yes"; then
11728   { test "$extra_verbose" = "yes" && cat << \EOF
11729     Defining USAGE_TRACKING
11730 EOF
11731 cat >> confdefs.h <<\EOF
11732 #define USAGE_TRACKING 1
11733 EOF
11734 }
11735
11736   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
11737 fi
11738
11739 for ac_hdr in dlfcn.h
11740 do
11741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11743 echo "configure:11744: checking for $ac_hdr" >&5
11744
11745 cat > conftest.$ac_ext <<EOF
11746 #line 11747 "configure"
11747 #include "confdefs.h"
11748 #include <$ac_hdr>
11749 EOF
11750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11751 { (eval echo configure:11752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11753 if test -z "$ac_err"; then
11754   rm -rf conftest*
11755   eval "ac_cv_header_$ac_safe=yes"
11756 else
11757   echo "$ac_err" >&5
11758   echo "configure: failed program was:" >&5
11759   cat conftest.$ac_ext >&5
11760   rm -rf conftest*
11761   eval "ac_cv_header_$ac_safe=no"
11762 fi
11763 rm -f conftest*
11764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11765   echo "$ac_t""yes" 1>&6
11766     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11767   { test "$extra_verbose" = "yes" && cat << EOF
11768     Defining $ac_tr_hdr
11769 EOF
11770 cat >> confdefs.h <<EOF
11771 #define $ac_tr_hdr 1
11772 EOF
11773 }
11774  have_dlfcn=yes
11775   { test "$extra_verbose" = "yes" && cat << \EOF
11776     Defining HAVE_DLFCN_H
11777 EOF
11778 cat >> confdefs.h <<\EOF
11779 #define HAVE_DLFCN_H 1
11780 EOF
11781 }
11782
11783 else
11784   echo "$ac_t""no" 1>&6
11785 fi
11786 done
11787
11788 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11789 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
11790 echo "configure:11791: checking for dlopen in -ldl" >&5
11791 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
11792
11793 xe_check_libs=" -ldl "
11794 cat > conftest.$ac_ext <<EOF
11795 #line 11796 "configure"
11796 #include "confdefs.h"
11797 /* Override any gcc2 internal prototype to avoid an error.  */
11798 /* We use char because int might match the return type of a gcc2
11799     builtin and then its argument prototype would still apply.  */
11800 char dlopen();
11801
11802 int main() {
11803 dlopen()
11804 ; return 0; }
11805 EOF
11806 if { (eval echo configure:11807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11807   rm -rf conftest*
11808   eval "ac_cv_lib_$ac_lib_var=yes"
11809 else
11810   echo "configure: failed program was:" >&5
11811   cat conftest.$ac_ext >&5
11812   rm -rf conftest*
11813   eval "ac_cv_lib_$ac_lib_var=no"
11814 fi
11815 rm -f conftest*
11816 xe_check_libs=""
11817
11818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11819   echo "$ac_t""yes" 1>&6
11820   { test "$extra_verbose" = "yes" && cat << \EOF
11821     Defining HAVE_DLOPEN
11822 EOF
11823 cat >> confdefs.h <<\EOF
11824 #define HAVE_DLOPEN 1
11825 EOF
11826 }
11827  DLL_LIB=dl;  with_shlib=yes
11828 else
11829   echo "$ac_t""no" 1>&6
11830 fi
11831
11832  }
11833 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11834 echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6
11835 echo "configure:11836: checking for _dlopen in -lc" >&5
11836 ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'`
11837
11838 xe_check_libs=" -lc "
11839 cat > conftest.$ac_ext <<EOF
11840 #line 11841 "configure"
11841 #include "confdefs.h"
11842 /* Override any gcc2 internal prototype to avoid an error.  */
11843 /* We use char because int might match the return type of a gcc2
11844     builtin and then its argument prototype would still apply.  */
11845 char _dlopen();
11846
11847 int main() {
11848 _dlopen()
11849 ; return 0; }
11850 EOF
11851 if { (eval echo configure:11852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11852   rm -rf conftest*
11853   eval "ac_cv_lib_$ac_lib_var=yes"
11854 else
11855   echo "configure: failed program was:" >&5
11856   cat conftest.$ac_ext >&5
11857   rm -rf conftest*
11858   eval "ac_cv_lib_$ac_lib_var=no"
11859 fi
11860 rm -f conftest*
11861 xe_check_libs=""
11862
11863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11864   echo "$ac_t""yes" 1>&6
11865   { test "$extra_verbose" = "yes" && cat << \EOF
11866     Defining HAVE_DLOPEN
11867 EOF
11868 cat >> confdefs.h <<\EOF
11869 #define HAVE_DLOPEN 1
11870 EOF
11871 }
11872  DLL_LIB=;   with_shlib=yes
11873 else
11874   echo "$ac_t""no" 1>&6
11875 fi
11876
11877  }
11878 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11879 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
11880 echo "configure:11881: checking for dlopen in -lc" >&5
11881 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
11882
11883 xe_check_libs=" -lc "
11884 cat > conftest.$ac_ext <<EOF
11885 #line 11886 "configure"
11886 #include "confdefs.h"
11887 /* Override any gcc2 internal prototype to avoid an error.  */
11888 /* We use char because int might match the return type of a gcc2
11889     builtin and then its argument prototype would still apply.  */
11890 char dlopen();
11891
11892 int main() {
11893 dlopen()
11894 ; return 0; }
11895 EOF
11896 if { (eval echo configure:11897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11897   rm -rf conftest*
11898   eval "ac_cv_lib_$ac_lib_var=yes"
11899 else
11900   echo "configure: failed program was:" >&5
11901   cat conftest.$ac_ext >&5
11902   rm -rf conftest*
11903   eval "ac_cv_lib_$ac_lib_var=no"
11904 fi
11905 rm -f conftest*
11906 xe_check_libs=""
11907
11908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11909   echo "$ac_t""yes" 1>&6
11910   { test "$extra_verbose" = "yes" && cat << \EOF
11911     Defining HAVE_DLOPEN
11912 EOF
11913 cat >> confdefs.h <<\EOF
11914 #define HAVE_DLOPEN 1
11915 EOF
11916 }
11917  DLL_LIB=;   with_shlib=yes
11918 else
11919   echo "$ac_t""no" 1>&6
11920 fi
11921
11922  }
11923 test -z "$with_shlib" && { 
11924 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
11925 echo "configure:11926: checking for shl_load in -ldld" >&5
11926 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
11927
11928 xe_check_libs=" -ldld "
11929 cat > conftest.$ac_ext <<EOF
11930 #line 11931 "configure"
11931 #include "confdefs.h"
11932 /* Override any gcc2 internal prototype to avoid an error.  */
11933 /* We use char because int might match the return type of a gcc2
11934     builtin and then its argument prototype would still apply.  */
11935 char shl_load();
11936
11937 int main() {
11938 shl_load()
11939 ; return 0; }
11940 EOF
11941 if { (eval echo configure:11942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11942   rm -rf conftest*
11943   eval "ac_cv_lib_$ac_lib_var=yes"
11944 else
11945   echo "configure: failed program was:" >&5
11946   cat conftest.$ac_ext >&5
11947   rm -rf conftest*
11948   eval "ac_cv_lib_$ac_lib_var=no"
11949 fi
11950 rm -f conftest*
11951 xe_check_libs=""
11952
11953 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11954   echo "$ac_t""yes" 1>&6
11955   { test "$extra_verbose" = "yes" && cat << \EOF
11956     Defining HAVE_SHL_LOAD
11957 EOF
11958 cat >> confdefs.h <<\EOF
11959 #define HAVE_SHL_LOAD 1
11960 EOF
11961 }
11962  DLL_LIB=dld; with_shlib=yes
11963 else
11964   echo "$ac_t""no" 1>&6
11965 fi
11966
11967  }
11968 test -z "$with_shlib" && { 
11969 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
11970 echo "configure:11971: checking for dld_init in -ldld" >&5
11971 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
11972
11973 xe_check_libs=" -ldld "
11974 cat > conftest.$ac_ext <<EOF
11975 #line 11976 "configure"
11976 #include "confdefs.h"
11977 /* Override any gcc2 internal prototype to avoid an error.  */
11978 /* We use char because int might match the return type of a gcc2
11979     builtin and then its argument prototype would still apply.  */
11980 char dld_init();
11981
11982 int main() {
11983 dld_init()
11984 ; return 0; }
11985 EOF
11986 if { (eval echo configure:11987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11987   rm -rf conftest*
11988   eval "ac_cv_lib_$ac_lib_var=yes"
11989 else
11990   echo "configure: failed program was:" >&5
11991   cat conftest.$ac_ext >&5
11992   rm -rf conftest*
11993   eval "ac_cv_lib_$ac_lib_var=no"
11994 fi
11995 rm -f conftest*
11996 xe_check_libs=""
11997
11998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11999   echo "$ac_t""yes" 1>&6
12000   { test "$extra_verbose" = "yes" && cat << \EOF
12001     Defining HAVE_DLD_INIT
12002 EOF
12003 cat >> confdefs.h <<\EOF
12004 #define HAVE_DLD_INIT 1
12005 EOF
12006 }
12007  DLL_LIB=dld; with_shlib=yes
12008 else
12009   echo "$ac_t""no" 1>&6
12010 fi
12011
12012  }
12013 if test "$with_shlib" = "yes"; then
12014   
12015 dll_ld=
12016 dll_ldflags=
12017 dll_cflags=
12018 dll_post=
12019 dll_ldo="-o"
12020 ld_dynamic_link_flags=
12021 xehost=$canonical
12022 xealias=$internal_configuration
12023
12024 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12025 echo "configure:12026: checking how to build dynamic libraries for ${xehost}" >&5
12026 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12027 case "$xehost" in
12028 *-*-linux-gnu*) ;;
12029 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12030 esac
12031
12032 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12033 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12034 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12035
12036 case "$xehost_os" in
12037 aix3*)
12038   # AIX sometimes has problems with the GCC collect2 program.  For some
12039   # reason, if we set the COLLECT_NAMES environment variable, the problems
12040   # vanish in a puff of smoke.
12041   if test "${COLLECT_NAMES+set}" != set; then
12042     COLLECT_NAMES=
12043     export COLLECT_NAMES
12044   fi
12045   ;;
12046 esac
12047
12048 # Now see if the compiler is really GCC.
12049 if test "$GCC" = "yes"; then
12050   XEGCC=yes
12051 else
12052   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12053 echo "configure:12054: checking checking whether we are using GNU C" >&5
12054   cat > conftest.$ac_ext <<EOF
12055 #line 12056 "configure"
12056 #include "confdefs.h"
12057
12058 #ifdef __GNUC__
12059   yes;
12060 #endif
12061
12062 EOF
12063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12064   egrep "yes" >/dev/null 2>&1; then
12065   rm -rf conftest*
12066   XEGCC=yes
12067 else
12068   rm -rf conftest*
12069   XEGCC=no
12070 fi
12071 rm -f conftest*
12072
12073   echo "$ac_t""${XEGCC}" 1>&6
12074 fi
12075
12076 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12077 echo "configure:12078: checking how to produce PIC code" >&5
12078 wl=
12079
12080 can_build_shared=yes
12081 if test "$XEGCC" = yes; then
12082   wl='-Wl,'
12083
12084   case "$xehost_os" in
12085   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12086     # PIC is the default for these OSes.
12087     ;;
12088
12089   os2*)
12090     # We can build DLLs from non-PIC.
12091     ;;
12092   amigaos*)
12093     # FIXME: we need at least 68020 code to build shared libraries, but
12094     # adding the `-m68020' flag to GCC prevents building anything better,
12095     # like `-m68040'.
12096     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12097     ;;
12098   *)
12099     dll_cflags='-fPIC'
12100     ;;
12101   esac
12102 else
12103   # PORTME Check for PIC flags for the system compiler.
12104   case "$xehost_os" in
12105   hpux9* | hpux10*)
12106     # Is there a better link_static_flag that works with the bundled CC?
12107     wl='-Wl,'
12108     dll_cflags='+Z'
12109     ;;
12110
12111   irix5* | irix6*)
12112     wl='-Wl,'
12113     # PIC (with -KPIC) is the default.
12114     ;;
12115
12116   os2*)
12117     # We can build DLLs from non-PIC.
12118     ;;
12119
12120   osf3* | osf4*)
12121     # All OSF/1 code is PIC.
12122     wl='-Wl,'
12123     ;;
12124
12125   sco3.2v5*)
12126     dll_cflags='-belf -Kpic'
12127     wl='-Wl,'
12128     ;;
12129
12130   unixware*)
12131     dll_cflags="-KPIC"
12132     wl="-Wl,"
12133     ;;
12134
12135   sysv4*)
12136     dll_cflags="-KPIC"
12137     wl="-Wl,"
12138     ;;
12139
12140   sysv5*)
12141     dll_cflags="-KPIC"
12142     wl="-Wl,"
12143     ;;
12144
12145   solaris2*)
12146     dll_cflags='-KPIC'
12147     wl='-Wl,'
12148     ;;
12149
12150   sunos4*)
12151     dll_cflags='-PIC'
12152     wl='-Qoption ld '
12153     ;;
12154
12155   uts4*)
12156     dll_cflags='-pic'
12157     ;;
12158
12159   *)
12160     can_build_shared=no
12161     ;;
12162   esac
12163 fi
12164
12165 if test -n "$dll_cflags"; then
12166   echo "$ac_t""${dll_cflags}" 1>&6
12167   
12168   # Check to make sure the dll_cflags actually works.
12169   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12170 echo "configure:12171: checking if PIC flag ${dll_cflags} really works" >&5
12171   save_CFLAGS="$CFLAGS"
12172   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12173   cat > conftest.$ac_ext <<EOF
12174 #line 12175 "configure"
12175 #include "confdefs.h"
12176
12177 int main() {
12178 int x=0;
12179 ; return 0; }
12180 EOF
12181 if { (eval echo configure:12182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12182   rm -rf conftest*
12183   
12184     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12185     # reports no error.  So, we need to grep stderr for (Bundled).
12186     if grep '(Bundled)' config.log >/dev/null; then
12187       echo "$ac_t""no" 1>&6
12188       can_build_shared=no
12189       dll_cflags=
12190     else
12191       echo "$ac_t""yes" 1>&6
12192     fi
12193 else
12194   echo "configure: failed program was:" >&5
12195   cat conftest.$ac_ext >&5
12196   rm -rf conftest*
12197   echo "$ac_t""no" 1>&6
12198     can_build_shared=no
12199     dll_cflags=
12200 fi
12201 rm -f conftest*
12202   CFLAGS="$save_CFLAGS"
12203 else
12204   echo "$ac_t""none" 1>&6
12205 fi
12206
12207 if test "$can_build_shared" = "yes"; then
12208 cc_produces_so=no
12209 xldf=
12210 xcldf=
12211 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12212 echo "configure:12213: checking if C compiler can produce shared libraries" >&5
12213 if test "$XEGCC" = yes; then
12214   xcldf="-shared"
12215   xldf="-shared"
12216 else # Not using GCC
12217   case "$xehost_os" in
12218     aix3* | aix4*)
12219       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12220       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12221       ;;
12222
12223     freebsd2* | netbsd* | openbsd*)
12224       xldf="-Bshareable"
12225       xcldf="${wl}-Bshareable"
12226       ;;
12227
12228     freebsd3*)
12229       xcldf="-shared"
12230       ;;
12231
12232     hpux*)
12233       xldf="-b +s"
12234       xcldf="${wl}-b ${wl}+s"
12235       ;;
12236
12237     irix5* | irix6* | osf3* | osf4*)
12238       xcldf="${wl}-shared"
12239       xldf="-shared"
12240       ;;
12241
12242     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12243       xcldf="-G"
12244       xldf="-G"
12245       ;;
12246
12247     sunos4*)
12248       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12249       xldf="-assert pure-text -Bstatic"
12250       ;;
12251   esac
12252 fi # End if if we are using gcc
12253
12254 if test -n "$xcldf"; then
12255   save_LDFLAGS=$LDFLAGS
12256   save_LIBS=$LIBS
12257   save_xe_libs=$xe_libs
12258   LDFLAGS="$xcldf $LDFLAGS"
12259   LIBS=
12260   xe_libs=
12261   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12262   cat > conftest.$ac_ext <<EOF
12263 #line 12264 "configure"
12264 #include "confdefs.h"
12265
12266 int main() {
12267 int x=0;
12268 ; return 0; }
12269 EOF
12270 if { (eval echo configure:12271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12271   rm -rf conftest*
12272   cc_produces_so=yes
12273 else
12274   echo "configure: failed program was:" >&5
12275   cat conftest.$ac_ext >&5
12276   rm -rf conftest*
12277   cc_produces_so=no
12278 fi
12279 rm -f conftest*
12280   LDFLAGS=$save_LDFLAGS
12281   LIBS=$save_LIBS
12282   xe_libs=$save_xe_libs
12283   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12284 else
12285   cc_produces_so=no
12286 fi
12287 echo "$ac_t""${cc_produces_so}" 1>&6
12288
12289 LTLD=$LD
12290 if test -z "$LTLD"; then
12291   ac_prog=ld
12292   if test "$XEGCC" = yes; then
12293     # Check if gcc -print-prog-name=ld gives a path.
12294     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12295 echo "configure:12296: checking for ld used by GCC" >&5
12296     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12297     case "$ac_prog" in
12298     # Accept absolute paths.
12299     /*)
12300       if test -z "$LTLD"; then
12301         case "$ac_prog" in
12302           *gcc-lib*) LTLD="$CC"
12303                      ;;
12304           *)         LTLD="$ac_prog"
12305                      ;;
12306         esac
12307       fi
12308       ;;
12309     "")
12310       # If it fails, then pretend we aren't using GCC.
12311       ac_prog=ld
12312       ;;
12313     *)
12314       # If it is relative, then search for the first ld in PATH.
12315       with_gnu_ld=unknown
12316       ;;
12317     esac
12318   else
12319     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12320 echo "configure:12321: checking for GNU ld" >&5
12321   fi
12322
12323   if test -z "$LTLD"; then
12324     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12325     for ac_dir in $PATH; do
12326       test -z "$ac_dir" && ac_dir=.
12327       if test -f "$ac_dir/$ac_prog"; then
12328         LTLD="$ac_dir/$ac_prog"
12329         # Check to see if the program is GNU ld.  I'd rather use --version,
12330         # but apparently some GNU ld's only accept -v.
12331         # Break only if it was the GNU/non-GNU ld that we prefer.
12332         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12333           xe_gnu_ld=yes
12334         else
12335           xe_gnu_ld=no
12336         fi
12337       fi
12338     done
12339     IFS="$ac_save_ifs"
12340   fi
12341
12342   if test -n "$LTLD"; then
12343     echo "$ac_t""${LTLD}" 1>&6
12344   else
12345     echo "$ac_t""no" 1>&6
12346   fi
12347
12348   if test -z "$LTLD" -a "$cc_produces_so" = no; then
12349     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
12350     exit 1
12351   fi
12352 fi
12353
12354 ld_dynamic_link_flags=
12355
12356 # Check to see if it really is or isn't GNU ld.
12357 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
12358 echo "configure:12359: checking if the linker is GNU ld" >&5
12359 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12360 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
12361   xe_gnu_ld=yes
12362 else
12363   xe_gnu_ld=no
12364 fi
12365 echo "$ac_t""${xe_gnu_ld}" 1>&6
12366
12367 case "$xehost_os" in
12368   amigaos* | sunos4*)
12369     # On these operating systems, we should treat GNU ld like the system ld.
12370     gnu_ld_acts_native=yes
12371     ;;
12372   *)
12373     gnu_ld_acts_native=no
12374     ;;
12375 esac
12376
12377 if test "$cc_produces_so" = "yes"; then
12378   dll_ld=$CC
12379   dll_ldflags=$xcldf
12380   can_build_shared=yes
12381 else
12382   # OK - only NOW do we futz about with ld.
12383   # See if the linker supports building shared libraries.
12384   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
12385 echo "configure:12386: checking whether the linker supports shared libraries" >&5
12386   dll_ld=$CC
12387   dll_ldflags=$LDFLAGS
12388   ld_shlibs=yes
12389   can_build_shared=yes
12390   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
12391     # See if GNU ld supports shared libraries.
12392     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12393       dll_ld=$CC
12394       dll_ldflags="-shared"
12395       ld_shlibs=yes
12396     else
12397       ld_shlibs=no
12398     fi
12399   else
12400     # PORTME fill in a description of your system's linker (not GNU ld)
12401     case "$xehost_os" in
12402     aix3*)
12403       dll_ld=$LTLD
12404       dll_ldflags=$xldf
12405       ;;
12406
12407     aix4*)
12408       dll_ldflags=$xcldf
12409       ;;
12410
12411     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12412     # support.  Future versions do this automatically, but an explicit c++rt0.o
12413     # doesn't break anything, and helps significantly (at the cost of a little
12414     # extra space).
12415     freebsd2.2*)
12416       dll_ld=$LTLD
12417       dll_ldflags=$xldf
12418       dll_post="/usr/lib/c++rt0.o"
12419       ;;
12420
12421     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
12422     freebsd2*)
12423       dll_ld=$LTLD
12424       dll_ldflags="-Bshareable"
12425       ;;
12426
12427     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
12428     freebsd3*)
12429       dll_ldflags="-shared"
12430       ;;
12431
12432     hpux*)
12433       dll_ld=$LTLD
12434       dll_ldflags=$xldf
12435       ;;
12436
12437     irix5* | irix6*)
12438       dll_ld=$LTLD
12439       dll_ldflags=$xldf
12440       ;;
12441
12442     netbsd*)
12443       # Tested with NetBSD 1.2 ld
12444       dll_ld=$LTLD
12445       dll_ldflags=$xldf
12446       ;;
12447
12448     openbsd*)
12449       dll_ld=$LTLD
12450       dll_ldflags=$xldf
12451       ;;
12452
12453     osf3* | osf4*)
12454       dll_ld=$LTLD
12455       dll_ldflags=$xldf
12456       ;;
12457
12458     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
12459     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
12460       dll_ld=$LTLD
12461       case "$dll_ld" in
12462         *gcc*) dll_ldflags="-shared"
12463                dll_ld=$CC
12464                ;;
12465         *)     dll_ldflags="-G"
12466                ;;
12467       esac
12468       ;;
12469
12470     sunos4*)
12471       if test "$XEGCC" = yes; then
12472         dll_ld=$CC
12473       else
12474         dll_ld=$LTLD
12475       fi
12476       dll_ldflags=$xldf
12477       ;;
12478
12479     uts4*)
12480       dll_ld=$LTLD
12481       dll_ldflags="-G"
12482       ;;
12483
12484     bsdi*)
12485       dll_ldflags="-r"
12486       dll_ld="shlicc2"
12487       ;;
12488
12489     *)
12490       ld_shlibs=no
12491       can_build_shared=no
12492       ;;
12493     esac
12494   fi
12495   echo "$ac_t""${ld_shlibs}" 1>&6
12496   if test "$ld_shlibs" = "no"; then
12497     can_build_shared=no
12498   fi
12499 fi # End of if cc_produces_so = no
12500
12501
12502 if test "$xe_gnu_ld" = yes; then
12503   if test "$ld_shlibs" = yes; then
12504     ld_dynamic_link_flags="${wl}-export-dynamic"
12505   fi
12506 fi
12507
12508 if test -z "$ld_dynamic_link_flags"; then
12509   case "$xehost_os" in
12510   aix3*)
12511     ld_dynamic_link_flags=
12512     ;;
12513
12514   aix4*)
12515     ld_dynamic_link_flags=
12516     ;;
12517
12518   freebsd2.2*)
12519     ld_dynamic_link_flags=
12520     ;;
12521
12522   freebsd2*)
12523     ld_dynamic_link_flags=
12524     ;;
12525
12526   freebsd3*)
12527     ld_dynamic_link_flags=
12528     ;;
12529
12530   hpux*)
12531     ld_dynamic_link_flags="${wl}-E"
12532     ;;
12533
12534   irix5* | irix6*)
12535     ld_dynamic_link_flags=
12536     ;;
12537
12538   netbsd*)
12539     ld_dynamic_link_flags=
12540     ;;
12541
12542   openbsd*)
12543     ld_dynamic_link_flags=
12544     ;;
12545
12546   osf3* | osf4*)
12547     ld_dynamic_link_flags=
12548     ;;
12549
12550   solaris2* | solaris7*)
12551     ld_dynamic_link_flags="${wl}-Bdynamic"
12552     ;;
12553
12554   sco3.2v5* | unixware* | sysv5* | sysv4*)
12555     ld_dynamic_link_flags="${wl}-Bexport"
12556     ;;
12557
12558   sunos4*)
12559     ld_dynamic_link_flags=
12560     ;;
12561
12562   uts4*)
12563     ld_dynamic_link_flags=
12564     ;;
12565
12566   bsdi*)
12567     ld_dynamic_link_flags=
12568     ;;
12569
12570   esac
12571 fi # End of if -z ld_dynamic_link_flags
12572 fi # End of if test "$can_build_shared" = "yes"
12573
12574
12575
12576
12577
12578
12579
12580
12581   if test "$can_build_shared" = "yes"; then
12582     { test "$extra_verbose" = "yes" && cat << \EOF
12583     Defining HAVE_SHLIB
12584 EOF
12585 cat >> confdefs.h <<\EOF
12586 #define HAVE_SHLIB 1
12587 EOF
12588 }
12589
12590     extra_objs="$extra_objs sysdll.o" &&  if test "$extra_verbose" = "yes"; then
12591    echo "    xemacs will be linked with \"sysdll.o\""
12592  fi
12593     extra_objs="$extra_objs emodules.o" &&  if test "$extra_verbose" = "yes"; then
12594    echo "    xemacs will be linked with \"emodules.o\""
12595  fi
12596     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
12597     test ! -z "$DLL_LIB" && LIBS="-l${DLL_LIB} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${DLL_LIB}\" to \$LIBS"; fi
12598     for ac_func in dlerror _dlerror
12599 do
12600 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12601 echo "configure:12602: checking for $ac_func" >&5
12602
12603 cat > conftest.$ac_ext <<EOF
12604 #line 12605 "configure"
12605 #include "confdefs.h"
12606 /* System header to define __stub macros and hopefully few prototypes,
12607     which can conflict with char $ac_func(); below.  */
12608 #include <assert.h>
12609 /* Override any gcc2 internal prototype to avoid an error.  */
12610 /* We use char because int might match the return type of a gcc2
12611     builtin and then its argument prototype would still apply.  */
12612 char $ac_func();
12613
12614 int main() {
12615
12616 /* The GNU C library defines this for functions which it implements
12617     to always fail with ENOSYS.  Some functions are actually named
12618     something starting with __ and the normal name is an alias.  */
12619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12620 choke me
12621 #else
12622 $ac_func();
12623 #endif
12624
12625 ; return 0; }
12626 EOF
12627 if { (eval echo configure:12628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12628   rm -rf conftest*
12629   eval "ac_cv_func_$ac_func=yes"
12630 else
12631   echo "configure: failed program was:" >&5
12632   cat conftest.$ac_ext >&5
12633   rm -rf conftest*
12634   eval "ac_cv_func_$ac_func=no"
12635 fi
12636 rm -f conftest*
12637
12638 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12639   echo "$ac_t""yes" 1>&6
12640     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12641   { test "$extra_verbose" = "yes" && cat << EOF
12642     Defining $ac_tr_func
12643 EOF
12644 cat >> confdefs.h <<EOF
12645 #define $ac_tr_func 1
12646 EOF
12647 }
12648  
12649 else
12650   echo "$ac_t""no" 1>&6
12651 fi
12652 done
12653
12654   else
12655     echo "configure: warning: disabling shared library support" 1>&2
12656     with_shlib=no
12657   fi
12658 fi
12659
12660 cat > conftest.$ac_ext <<EOF
12661 #line 12662 "configure"
12662 #include "confdefs.h"
12663 int main(int c,char *v[]){return 0;}
12664 EOF
12665 if { (eval echo configure:12666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12666 then
12667   :
12668 else
12669   conftest_rc="$?"
12670   echo "configure: failed program was:" >&5
12671   cat conftest.$ac_ext >&5
12672   rm -fr conftest*
12673   
12674   echo ""
12675   echo "*** PANIC *** The C compiler can no longer build working executables."
12676   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
12677   echo "*** PANIC *** The most likely reason for this problem is that configure"
12678   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
12679   echo "*** PANIC *** found at run time."
12680   echo "*** PANIC ***"
12681   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
12682   echo "*** PANIC *** On other systems, try telling configure where to find the"
12683   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
12684   echo "*** PANIC ***"
12685   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
12686   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
12687   echo "*** PANIC *** on your system.  Don't do that."
12688   exit 1
12689 fi
12690 rm -fr conftest*
12691
12692 if test "$win32_processes" = "yes"; then
12693   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
12694    echo "    xemacs will be linked with \"process-nt.o\""
12695  fi
12696 else
12697   { test "$extra_verbose" = "yes" && cat << \EOF
12698     Defining HAVE_UNIX_PROCESSES
12699 EOF
12700 cat >> confdefs.h <<\EOF
12701 #define HAVE_UNIX_PROCESSES 1
12702 EOF
12703 }
12704
12705   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
12706    echo "    xemacs will be linked with \"process-unix.o\""
12707  fi
12708 fi
12709
12710
12711
12712 T=""
12713 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12714 CFLAGS="$T"
12715
12716
12717 T=""
12718 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12719 extra_objs="$T"
12720
12721
12722 T=""
12723 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
12724 c_switch_general="$T"
12725
12726
12727 T=""
12728 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12729 c_switch_window_system="$T"
12730
12731
12732 T=""
12733 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12734 c_switch_all="$T"
12735
12736
12737 T=""
12738 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
12739 ld_switch_general="$T"
12740
12741
12742 T=""
12743 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12744 ld_switch_window_system="$T"
12745
12746
12747 T=""
12748 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12749 ld_switch_all="$T"
12750
12751
12752 T=""
12753 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12754 ld_libs_general="$T"
12755
12756
12757 T=""
12758 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
12759 ld_libs_window_system="$T"
12760
12761
12762 T=""
12763 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12764 ld_libs_all="$T"
12765
12766
12767
12768 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
12769 internal_makefile_list="Makefile.in"
12770 SUBDIR_MAKEFILES=''
12771 test -d lock || mkdir lock
12772 for dir in $MAKE_SUBDIR; do
12773   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
12774         test -d "$d" || mkdir "$d"; cd "$d"
12775       done ) ;;
12776    * ) test -d "$dir" || mkdir "$dir" ;;
12777   esac
12778   
12779 T=""
12780 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12781 SUBDIR_MAKEFILES="$T"
12782
12783   
12784 T=""
12785 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12786 internal_makefile_list="$T"
12787
12788 done
12789
12790
12791
12792
12793 for dir in src/s src/m; do
12794   if test ! -d "$dir" ; then
12795     echo Making symbolic link to "$srcdir/$dir"
12796     ${LN_S} "$srcdir/$dir" "$dir"
12797   fi
12798 done
12799
12800 if test "$extra_verbose" = "yes"; then
12801   echo ""
12802   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
12803   echo ""
12804 fi
12805
12806 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
12807   echo "creating src/gdbinit"; echo ""
12808   echo "source $srcdir/src/gdbinit" > src/gdbinit
12809 fi
12810
12811 if test "$__SUNPRO_C" = "yes"; then
12812   echo "creating .sbinit"; echo ""
12813   ( echo "# For use with Sun WorkShop's Source browser."
12814     echo "# See sbquery(1) and sbinit(4) for more information"
12815     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
12816   ) > .sbinit
12817 fi
12818
12819 rm -f core
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836 PREFIX=$prefix
12837 while true; do
12838   case "$PREFIX" in
12839     *\$* ) eval "PREFIX=$PREFIX" ;;
12840     *) break ;;
12841   esac
12842 done
12843
12844
12845
12846 EXEC_PREFIX=$exec_prefix
12847 while true; do
12848   case "$EXEC_PREFIX" in
12849     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
12850     *) break ;;
12851   esac
12852 done
12853
12854
12855
12856
12857 INFODIR=$infodir
12858 while true; do
12859   case "$INFODIR" in
12860     *\$* ) eval "INFODIR=$INFODIR" ;;
12861     *) break ;;
12862   esac
12863 done
12864
12865
12866
12867
12868 INFOPATH=$infopath
12869 while true; do
12870   case "$INFOPATH" in
12871     *\$* ) eval "INFOPATH=$INFOPATH" ;;
12872     *) break ;;
12873   esac
12874 done
12875
12876
12877
12878
12879 PACKAGE_PATH=$package_path
12880 while true; do
12881   case "$PACKAGE_PATH" in
12882     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
12883     *) break ;;
12884   esac
12885 done
12886
12887
12888
12889
12890 LISPDIR=$lispdir
12891 while true; do
12892   case "$LISPDIR" in
12893     *\$* ) eval "LISPDIR=$LISPDIR" ;;
12894     *) break ;;
12895   esac
12896 done
12897
12898
12899
12900
12901 MODULEDIR=$moduledir
12902 while true; do
12903   case "$MODULEDIR" in
12904     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
12905     *) break ;;
12906   esac
12907 done
12908
12909
12910
12911
12912 SITELISPDIR=$sitelispdir
12913 while true; do
12914   case "$SITELISPDIR" in
12915     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
12916     *) break ;;
12917   esac
12918 done
12919
12920
12921
12922
12923 SITEMODULEDIR=$sitemoduledir
12924 while true; do
12925   case "$SITEMODULEDIR" in
12926     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
12927     *) break ;;
12928   esac
12929 done
12930
12931
12932
12933
12934 ETCDIR=$etcdir
12935 while true; do
12936   case "$ETCDIR" in
12937     *\$* ) eval "ETCDIR=$ETCDIR" ;;
12938     *) break ;;
12939   esac
12940 done
12941
12942
12943
12944
12945 LOCKDIR=$lockdir
12946 while true; do
12947   case "$LOCKDIR" in
12948     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
12949     *) break ;;
12950   esac
12951 done
12952
12953
12954
12955
12956 ARCHLIBDIR=$archlibdir
12957 while true; do
12958   case "$ARCHLIBDIR" in
12959     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
12960     *) break ;;
12961   esac
12962 done
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
12984
12985
12986
12987
12988
12989
12990
12991 : ${XEMACS_CC:=$CC}
12992
12993
12994
12995 if test "$with_site_lisp" = "no"; then
12996   { test "$extra_verbose" = "yes" && cat << \EOF
12997     Defining INHIBIT_SITE_LISP
12998 EOF
12999 cat >> confdefs.h <<\EOF
13000 #define INHIBIT_SITE_LISP 1
13001 EOF
13002 }
13003
13004 fi
13005 if test "$with_site_modules" = "no"; then
13006   { test "$extra_verbose" = "yes" && cat << \EOF
13007     Defining INHIBIT_SITE_MODULES
13008 EOF
13009 cat >> confdefs.h <<\EOF
13010 #define INHIBIT_SITE_MODULES 1
13011 EOF
13012 }
13013
13014 fi
13015
13016
13017 T=""
13018 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13019 ac_configure_args="$T"
13020
13021 { test "$extra_verbose" = "yes" && cat << EOF
13022     Defining EMACS_CONFIGURATION = "$canonical"
13023 EOF
13024 cat >> confdefs.h <<EOF
13025 #define EMACS_CONFIGURATION "$canonical"
13026 EOF
13027 }
13028
13029 { test "$extra_verbose" = "yes" && cat << EOF
13030     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13031 EOF
13032 cat >> confdefs.h <<EOF
13033 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13034 EOF
13035 }
13036
13037 { test "$extra_verbose" = "yes" && cat << EOF
13038     Defining config_machfile = "$machfile"
13039 EOF
13040 cat >> confdefs.h <<EOF
13041 #define config_machfile "$machfile"
13042 EOF
13043 }
13044
13045 { test "$extra_verbose" = "yes" && cat << EOF
13046     Defining config_opsysfile = "$opsysfile"
13047 EOF
13048 cat >> confdefs.h <<EOF
13049 #define config_opsysfile "$opsysfile"
13050 EOF
13051 }
13052
13053
13054
13055 null_string=""
13056 { test "$extra_verbose" = "yes" && cat << EOF
13057     Defining LD_SWITCH_X_SITE = $null_string
13058 EOF
13059 cat >> confdefs.h <<EOF
13060 #define LD_SWITCH_X_SITE $null_string
13061 EOF
13062 }
13063
13064 { test "$extra_verbose" = "yes" && cat << EOF
13065     Defining LD_SWITCH_X_SITE_AUX = $null_string
13066 EOF
13067 cat >> confdefs.h <<EOF
13068 #define LD_SWITCH_X_SITE_AUX $null_string
13069 EOF
13070 }
13071
13072 { test "$extra_verbose" = "yes" && cat << EOF
13073     Defining C_SWITCH_X_SITE = $null_string
13074 EOF
13075 cat >> confdefs.h <<EOF
13076 #define C_SWITCH_X_SITE $null_string
13077 EOF
13078 }
13079
13080 { test "$extra_verbose" = "yes" && cat << EOF
13081     Defining LD_SWITCH_SITE = $null_string
13082 EOF
13083 cat >> confdefs.h <<EOF
13084 #define LD_SWITCH_SITE $null_string
13085 EOF
13086 }
13087
13088 { test "$extra_verbose" = "yes" && cat << EOF
13089     Defining C_SWITCH_SITE = $null_string
13090 EOF
13091 cat >> confdefs.h <<EOF
13092 #define C_SWITCH_SITE $null_string
13093 EOF
13094 }
13095
13096
13097
13098 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13099     Defining GNU_MALLOC
13100 EOF
13101 cat >> confdefs.h <<\EOF
13102 #define GNU_MALLOC 1
13103 EOF
13104 }
13105
13106 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13107     Defining USE_SYSTEM_MALLOC
13108 EOF
13109 cat >> confdefs.h <<\EOF
13110 #define USE_SYSTEM_MALLOC 1
13111 EOF
13112 }
13113
13114 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13115     Defining USE_DEBUG_MALLOC
13116 EOF
13117 cat >> confdefs.h <<\EOF
13118 #define USE_DEBUG_MALLOC 1
13119 EOF
13120 }
13121
13122                                               { test "$extra_verbose" = "yes" && cat << \EOF
13123     Defining USE_SYSTEM_MALLOC
13124 EOF
13125 cat >> confdefs.h <<\EOF
13126 #define USE_SYSTEM_MALLOC 1
13127 EOF
13128 }
13129
13130 fi
13131 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13132     Defining I18N3
13133 EOF
13134 cat >> confdefs.h <<\EOF
13135 #define I18N3 1
13136 EOF
13137 }
13138
13139 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13140     Defining USE_GCC
13141 EOF
13142 cat >> confdefs.h <<\EOF
13143 #define USE_GCC 1
13144 EOF
13145 }
13146
13147 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13148     Defining EXTERNAL_WIDGET
13149 EOF
13150 cat >> confdefs.h <<\EOF
13151 #define EXTERNAL_WIDGET 1
13152 EOF
13153 }
13154
13155 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13156     Defining NO_DOC_FILE
13157 EOF
13158 cat >> confdefs.h <<\EOF
13159 #define NO_DOC_FILE 1
13160 EOF
13161 }
13162
13163 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13164     Defining PURIFY
13165 EOF
13166 cat >> confdefs.h <<\EOF
13167 #define PURIFY 1
13168 EOF
13169 }
13170
13171 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13172     Defining QUANTIFY
13173 EOF
13174 cat >> confdefs.h <<\EOF
13175 #define QUANTIFY 1
13176 EOF
13177 }
13178
13179 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13180     Defining MAIL_USE_POP
13181 EOF
13182 cat >> confdefs.h <<\EOF
13183 #define MAIL_USE_POP 1
13184 EOF
13185 }
13186
13187 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13188     Defining KERBEROS
13189 EOF
13190 cat >> confdefs.h <<\EOF
13191 #define KERBEROS 1
13192 EOF
13193 }
13194
13195 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13196     Defining HESIOD
13197 EOF
13198 cat >> confdefs.h <<\EOF
13199 #define HESIOD 1
13200 EOF
13201 }
13202
13203 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13204     Defining USE_UNION_TYPE
13205 EOF
13206 cat >> confdefs.h <<\EOF
13207 #define USE_UNION_TYPE 1
13208 EOF
13209 }
13210
13211
13212
13213 (
13214 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13215 else
13216   echo "uname -a: `uname -a`"
13217 fi
13218 echo ""
13219 echo "$0 $quoted_arguments"
13220 ) > Installation
13221
13222 if test ! -z ${emacs_beta_version} ; then
13223   if test -z "${emacs_is_beta}" ; then
13224         xemacs_betaname=".${emacs_beta_version}"
13225   else
13226         xemacs_betaname="-b${emacs_beta_version}"
13227   fi
13228 else
13229   xemacs_betaname=""    
13230 fi
13231
13232 (
13233 echo "
13234
13235 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13236
13237   Where should the build process find the source code?    $srcdir
13238   What installation prefix should install use?            $prefix
13239   What operating system and machine description files should XEmacs use?
13240         \`$opsysfile' and \`$machfile'
13241   What compiler should XEmacs be built with?              $CC $CFLAGS
13242   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13243   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13244   What window system should XEmacs use?                   ${window_system}"
13245 if test "$with_x11" = "yes"; then
13246   echo "  Where do we find X Windows header files?                $x_includes"
13247   echo "  Where do we find X Windows libraries?                   $x_libraries"
13248 fi
13249 if test -n "$site_includes"; then
13250   echo "  Additional header files:                                $site_includes"
13251 fi
13252 if test -n "$site_libraries"; then
13253   echo "  Additional libraries:                                   $site_libraries"
13254 fi
13255 if test -n "$site_prefixes"; then
13256   echo "  Additional prefixes:                                    $site_prefixes"
13257 fi
13258 if test -n "$runpath"; then
13259   echo "  Runtime library search path:                            $runpath"
13260 fi
13261 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13262 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13263 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13264 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13265   echo "  No Xmu; substituting equivalent routines."
13266 fi
13267
13268 if test "$with_xpm" = yes; then
13269   echo "  Compiling in support for XPM images."
13270 elif test "$with_x11" = yes; then
13271   echo "  --------------------------------------------------------------------"
13272   echo "  WARNING: Compiling without XPM support."
13273   if test "$xpm_problem" != ""; then
13274     echo "  Reason: $xpm_problem"
13275   fi
13276   echo "  WARNING: You should strongly consider installing XPM."
13277   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13278   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13279   echo "  --------------------------------------------------------------------"
13280 fi
13281 if test "$with_png" = yes; then
13282   echo "  Compiling in support for PNG image handling."
13283 elif test "$window_system" != "none"; then
13284   echo "  --------------------------------------------------------------------"
13285   echo "  WARNING: Compiling without PNG image support."
13286   if test "$png_problem" != ""; then
13287     echo "  Reason: $png_problem"
13288   fi
13289   echo "  WARNING: You should strongly consider installing the PNG libraries."
13290   echo "  WARNING: Otherwise certain images and glyphs may not display."
13291   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13292   echo "  --------------------------------------------------------------------"
13293 fi
13294 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
13295 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
13296 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
13297 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
13298 case "$with_sound" in
13299   nas    ) echo "  Compiling in network sound (NAS) support." ;;
13300   native ) echo "  Compiling in native sound support." ;;
13301   both   ) echo "  Compiling in both network and native sound support." ;;
13302 esac
13303 test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously."
13304
13305 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
13306 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
13307 test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
13308
13309 test "$with_umich_ldap"      = yes && echo "  Compiling in support for LDAP (UMich libs)."
13310 test "$with_ns_ldap"         = yes && echo "  Compiling in support for LDAP (Netscape SDK)."
13311 test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo "  Compiling in support for LDAP (Generic)."
13312
13313 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
13314 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
13315
13316 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
13317 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
13318 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
13319 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
13320 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
13321 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
13322 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
13323 if test "$with_wnn" = yes; then
13324   echo "  Compiling in support for the WNN input method on Mule."
13325   test "$with_wnn6" = yes && echo "    Using WNN version 6."
13326 fi
13327 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
13328
13329 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
13330 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
13331 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
13332 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
13333 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
13334 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
13335 case "$with_menubars" in
13336   lucid ) echo "  Using Lucid menubars." ;;
13337   motif ) echo "  Using Motif menubars."
13338           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
13339           echo "             We recommend using the Lucid menubar instead."
13340           echo "             Re-run configure with --with-menubars='lucid'." ;;
13341 esac
13342 case "$with_scrollbars" in
13343   lucid    ) echo "  Using Lucid scrollbars."     ;;
13344   motif    ) echo "  Using Motif scrollbars."     ;;
13345   athena   ) echo "  Using Athena scrollbars."    ;;
13346   athena3d ) echo "  Using Athena-3d scrollbars." ;;
13347 esac
13348 case "$with_dialogs" in
13349   motif    )
13350     echo "  Using Motif dialog boxes."
13351     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
13352       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
13353       echo "             We recommend using the Athena dialog boxes instead."
13354       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
13355       echo "             Read the PROBLEMS file for more information."
13356     fi; fi
13357     ;;
13358   athena   ) echo "  Using Athena dialog boxes."    ;;
13359   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
13360 esac
13361 test "$with_shlib" = "yes" && echo "  Compiling in DLL support."
13362 test "$with_clash_detection" = yes && \
13363   echo "  Clash detection will use \"$lockdir\" for locking files."
13364 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
13365 test "$with_pop"        = yes && echo "  Using POP for mail access."
13366 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
13367 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
13368 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
13369 test "$debug"              = yes && echo "  Compiling in extra code for debugging."
13370 test "$usage_tracking"     = yes && echo "  Compiling with usage tracking active (Sun internal)."
13371 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
13372   != "no no no no no"; then
13373   echo "  WARNING: ---------------------------------------------------------"
13374   echo "  WARNING: Compiling in support for runtime error checking."
13375   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
13376   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
13377   echo "  WARNING: ---------------------------------------------------------"
13378 fi
13379 echo ""
13380 ) | tee -a Installation
13381 echo ""
13382
13383
13384 # Remove any trailing slashes in these variables.
13385 test -n "$prefix" &&
13386   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13387 test -n "$exec_prefix" &&
13388   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13389
13390
13391 for file in $internal_makefile_list; do
13392   test "$file" = src/Makefile.in && \
13393     file="src/Makefile.in:src/Makefile.in.in:src/depend"
13394   ac_output_files="${ac_output_files+$ac_output_files }$file"
13395 done
13396 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
13397 if test "$with_shlib" = "yes"; then
13398   ac_output_files="$ac_output_files lib-src/ellcc.h"
13399 fi
13400
13401 trap '' 1 2 15
13402
13403 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13404
13405 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13406 # Let make expand exec_prefix.
13407 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13408
13409 # Any assignment to VPATH causes Sun make to only execute
13410 # the first set of double-colon rules, so remove it if not needed.
13411 # If there is a colon in the path, we need to keep it.
13412 if test "x$srcdir" = x.; then
13413   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13414 fi
13415
13416 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13417
13418 DEFS=-DHAVE_CONFIG_H
13419
13420 # Without the "./", some shells look in PATH for config.status.
13421 : ${CONFIG_STATUS=./config.status}
13422
13423 echo creating $CONFIG_STATUS
13424 rm -f $CONFIG_STATUS
13425 cat > $CONFIG_STATUS <<EOF
13426 #! /bin/sh
13427 # Generated automatically by configure.
13428 # Run this file to recreate the current configuration.
13429 # This directory was configured as follows,
13430 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13431 #
13432 # $0 $ac_configure_args
13433 #
13434 # Compiler output produced by configure, useful for debugging
13435 # configure, is in ./config.log if it exists.
13436
13437 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13438 for ac_option
13439 do
13440   case "\$ac_option" in
13441   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13442     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13443     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13444   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13445     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13446     exit 0 ;;
13447   -help | --help | --hel | --he | --h)
13448     echo "\$ac_cs_usage"; exit 0 ;;
13449   *) echo "\$ac_cs_usage"; exit 1 ;;
13450   esac
13451 done
13452
13453 ac_given_srcdir=$srcdir
13454 ac_given_INSTALL="$INSTALL"
13455
13456 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13457 EOF
13458 cat >> $CONFIG_STATUS <<EOF
13459
13460 # Protect against being on the right side of a sed subst in config.status.
13461 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13462  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13463 $ac_vpsub
13464 $extrasub
13465 s%@SHELL@%$SHELL%g
13466 s%@CFLAGS@%$CFLAGS%g
13467 s%@CPPFLAGS@%$CPPFLAGS%g
13468 s%@CXXFLAGS@%$CXXFLAGS%g
13469 s%@FFLAGS@%$FFLAGS%g
13470 s%@DEFS@%$DEFS%g
13471 s%@LDFLAGS@%$LDFLAGS%g
13472 s%@LIBS@%$LIBS%g
13473 s%@exec_prefix@%$exec_prefix%g
13474 s%@prefix@%$prefix%g
13475 s%@program_transform_name@%$program_transform_name%g
13476 s%@bindir@%$bindir%g
13477 s%@sbindir@%$sbindir%g
13478 s%@libexecdir@%$libexecdir%g
13479 s%@datadir@%$datadir%g
13480 s%@sysconfdir@%$sysconfdir%g
13481 s%@sharedstatedir@%$sharedstatedir%g
13482 s%@localstatedir@%$localstatedir%g
13483 s%@libdir@%$libdir%g
13484 s%@includedir@%$includedir%g
13485 s%@oldincludedir@%$oldincludedir%g
13486 s%@infodir@%$infodir%g
13487 s%@mandir@%$mandir%g
13488 s%@LN_S@%$LN_S%g
13489 s%@blddir@%$blddir%g
13490 s%@CC@%$CC%g
13491 s%@CPP@%$CPP%g
13492 s%@start_flags@%$start_flags%g
13493 s%@ld_switch_shared@%$ld_switch_shared%g
13494 s%@start_files@%$start_files%g
13495 s%@ld@%$ld%g
13496 s%@lib_gcc@%$lib_gcc%g
13497 s%@RANLIB@%$RANLIB%g
13498 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13499 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13500 s%@INSTALL_DATA@%$INSTALL_DATA%g
13501 s%@YACC@%$YACC%g
13502 s%@SET_MAKE@%$SET_MAKE%g
13503 s%@X_CFLAGS@%$X_CFLAGS%g
13504 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
13505 s%@X_LIBS@%$X_LIBS%g
13506 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
13507 s%@install_pp@%$install_pp%g
13508 s%@libs_xauth@%$libs_xauth%g
13509 s%@dnd_objs@%$dnd_objs%g
13510 s%@lwlib_objs@%$lwlib_objs%g
13511 s%@ALLOCA@%$ALLOCA%g
13512 s%@dll_ld@%$dll_ld%g
13513 s%@dll_cflags@%$dll_cflags%g
13514 s%@dll_ldflags@%$dll_ldflags%g
13515 s%@dll_post@%$dll_post%g
13516 s%@dll_ldo@%$dll_ldo%g
13517 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
13518 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
13519 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
13520 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
13521 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
13522 s%@PROGNAME@%$PROGNAME%g
13523 s%@version@%$version%g
13524 s%@configuration@%$configuration%g
13525 s%@canonical@%$canonical%g
13526 s%@srcdir@%$srcdir%g
13527 s%@pkgdir@%$pkgdir%g
13528 s%@statedir@%$statedir%g
13529 s%@PREFIX@%$PREFIX%g
13530 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
13531 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
13532 s%@INFODIR@%$INFODIR%g
13533 s%@infopath@%$infopath%g
13534 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
13535 s%@INFOPATH@%$INFOPATH%g
13536 s%@package_path@%$package_path%g
13537 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
13538 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
13539 s%@lispdir@%$lispdir%g
13540 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
13541 s%@LISPDIR@%$LISPDIR%g
13542 s%@moduledir@%$moduledir%g
13543 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
13544 s%@MODULEDIR@%$MODULEDIR%g
13545 s%@sitelispdir@%$sitelispdir%g
13546 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
13547 s%@SITELISPDIR@%$SITELISPDIR%g
13548 s%@sitemoduledir@%$sitemoduledir%g
13549 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
13550 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
13551 s%@etcdir@%$etcdir%g
13552 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
13553 s%@ETCDIR@%$ETCDIR%g
13554 s%@lockdir@%$lockdir%g
13555 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
13556 s%@LOCKDIR@%$LOCKDIR%g
13557 s%@archlibdir@%$archlibdir%g
13558 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
13559 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
13560 s%@docdir@%$docdir%g
13561 s%@bitmapdir@%$bitmapdir%g
13562 s%@extra_objs@%$extra_objs%g
13563 s%@machfile@%$machfile%g
13564 s%@opsysfile@%$opsysfile%g
13565 s%@c_switch_general@%$c_switch_general%g
13566 s%@c_switch_window_system@%$c_switch_window_system%g
13567 s%@c_switch_all@%$c_switch_all%g
13568 s%@ld_switch_general@%$ld_switch_general%g
13569 s%@ld_switch_window_system@%$ld_switch_window_system%g
13570 s%@ld_switch_all@%$ld_switch_all%g
13571 s%@ld_libs_general@%$ld_libs_general%g
13572 s%@ld_libs_window_system@%$ld_libs_window_system%g
13573 s%@ld_libs_all@%$ld_libs_all%g
13574 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
13575 s%@native_sound_lib@%$native_sound_lib%g
13576 s%@sound_cflags@%$sound_cflags%g
13577 s%@dynodump_arch@%$dynodump_arch%g
13578 s%@XEMACS_CC@%$XEMACS_CC%g
13579 s%@internal_makefile_list@%$internal_makefile_list%g
13580
13581 CEOF
13582 EOF
13583
13584 cat >> $CONFIG_STATUS <<\EOF
13585
13586 # Split the substitutions into bite-sized pieces for seds with
13587 # small command number limits, like on Digital OSF/1 and HP-UX.
13588 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13589 ac_file=1 # Number of current file.
13590 ac_beg=1 # First line for current file.
13591 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13592 ac_more_lines=:
13593 ac_sed_cmds=""
13594 while $ac_more_lines; do
13595   if test $ac_beg -gt 1; then
13596     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13597   else
13598     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13599   fi
13600   if test ! -s conftest.s$ac_file; then
13601     ac_more_lines=false
13602     rm -f conftest.s$ac_file
13603   else
13604     if test -z "$ac_sed_cmds"; then
13605       ac_sed_cmds="sed -f conftest.s$ac_file"
13606     else
13607       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13608     fi
13609     ac_file=`expr $ac_file + 1`
13610     ac_beg=$ac_end
13611     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13612   fi
13613 done
13614 if test -z "$ac_sed_cmds"; then
13615   ac_sed_cmds=cat
13616 fi
13617 EOF
13618
13619 cat >> $CONFIG_STATUS <<EOF
13620
13621 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
13622 EOF
13623 cat >> $CONFIG_STATUS <<\EOF
13624 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13625   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13626   case "$ac_file" in
13627   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13628        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13629   *) ac_file_in="${ac_file}.in" ;;
13630   esac
13631
13632   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13633
13634   # Remove last slash and all that follows it.  Not all systems have dirname.
13635   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13636   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13637     # The file is in a subdirectory.
13638     test ! -d "$ac_dir" && mkdir "$ac_dir"
13639     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13640     # A "../" for each directory in $ac_dir_suffix.
13641     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13642   else
13643     ac_dir_suffix= ac_dots=
13644   fi
13645
13646   case "$ac_given_srcdir" in
13647   .)  srcdir=.
13648       if test -z "$ac_dots"; then top_srcdir=.
13649       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13650   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13651   *) # Relative path.
13652     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13653     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13654   esac
13655
13656   case "$ac_given_INSTALL" in
13657   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13658   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13659   esac
13660
13661   echo creating "$ac_file"
13662   rm -f "$ac_file"
13663   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13664   case "$ac_file" in
13665   *Makefile*) ac_comsub="1i\\
13666 # $configure_input" ;;
13667   *) ac_comsub= ;;
13668   esac
13669
13670   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13671   sed -e "$ac_comsub
13672 s%@configure_input@%$configure_input%g
13673 s%@srcdir@%$srcdir%g
13674 s%@top_srcdir@%$top_srcdir%g
13675 s%@INSTALL@%$INSTALL%g
13676 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13677 fi; done
13678 rm -f conftest.s*
13679
13680 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13681 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13682 #
13683 # ac_d sets the value in "#define NAME VALUE" lines.
13684 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13685 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13686 ac_dC='\3'
13687 ac_dD='%g'
13688 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13689 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13690 ac_uB='\([      ]\)%\1#\2define\3'
13691 ac_uC=' '
13692 ac_uD='\4%g'
13693 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13694 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13695 ac_eB='$%\1#\2define\3'
13696 ac_eC=' '
13697 ac_eD='%g'
13698
13699 if test "${CONFIG_HEADERS+set}" != set; then
13700 EOF
13701 cat >> $CONFIG_STATUS <<EOF
13702   CONFIG_HEADERS="src/config.h lwlib/config.h"
13703 EOF
13704 cat >> $CONFIG_STATUS <<\EOF
13705 fi
13706 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13707   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13708   case "$ac_file" in
13709   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13710        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13711   *) ac_file_in="${ac_file}.in" ;;
13712   esac
13713
13714   echo creating $ac_file
13715
13716   rm -f conftest.frag conftest.in conftest.out
13717   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13718   cat $ac_file_inputs > conftest.in
13719
13720 EOF
13721
13722 # Transform confdefs.h into a sed script conftest.vals that substitutes
13723 # the proper values into config.h.in to produce config.h.  And first:
13724 # Protect against being on the right side of a sed subst in config.status.
13725 # Protect against being in an unquoted here document in config.status.
13726 rm -f conftest.vals
13727 cat > conftest.hdr <<\EOF
13728 s/[\\&%]/\\&/g
13729 s%[\\$`]%\\&%g
13730 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13731 s%ac_d%ac_u%gp
13732 s%ac_u%ac_e%gp
13733 EOF
13734 sed -n -f conftest.hdr confdefs.h > conftest.vals
13735 rm -f conftest.hdr
13736
13737 # This sed command replaces #undef with comments.  This is necessary, for
13738 # example, in the case of _POSIX_SOURCE, which is predefined and required
13739 # on some systems where configure will not decide to define it.
13740 cat >> conftest.vals <<\EOF
13741 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13742 EOF
13743
13744 # Break up conftest.vals because some shells have a limit on
13745 # the size of here documents, and old seds have small limits too.
13746
13747 rm -f conftest.tail
13748 while :
13749 do
13750   ac_lines=`grep -c . conftest.vals`
13751   # grep -c gives empty output for an empty file on some AIX systems.
13752   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13753   # Write a limited-size here document to conftest.frag.
13754   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13755   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13756   echo 'CEOF
13757   sed -f conftest.frag conftest.in > conftest.out
13758   rm -f conftest.in
13759   mv conftest.out conftest.in
13760 ' >> $CONFIG_STATUS
13761   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13762   rm -f conftest.vals
13763   mv conftest.tail conftest.vals
13764 done
13765 rm -f conftest.vals
13766
13767 cat >> $CONFIG_STATUS <<\EOF
13768   rm -f conftest.frag conftest.h
13769   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13770   cat conftest.in >> conftest.h
13771   rm -f conftest.in
13772   if cmp -s $ac_file conftest.h 2>/dev/null; then
13773     echo "$ac_file is unchanged"
13774     rm -f conftest.h
13775   else
13776     # Remove last slash and all that follows it.  Not all systems have dirname.
13777       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13778       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13779       # The file is in a subdirectory.
13780       test ! -d "$ac_dir" && mkdir "$ac_dir"
13781     fi
13782     rm -f $ac_file
13783     mv conftest.h $ac_file
13784   fi
13785 fi; done
13786
13787 EOF
13788 cat >> $CONFIG_STATUS <<EOF
13789 CPP="$CPP"
13790  top_srcdir="$srcdir"
13791  MAKE_SUBDIR="$MAKE_SUBDIR"
13792
13793 EOF
13794 cat >> $CONFIG_STATUS <<\EOF
13795 for dir in . $MAKE_SUBDIR; do
13796   (
13797     cd $dir
13798     rm -f junk.c
13799     < Makefile.in \
13800       sed -e '/^# Generated/d' \
13801           -e 's%/\*\*/#.*%%' \
13802           -e 's/^ *# */#/' \
13803           -e '/^##/d' \
13804           -e '/^#/ {
13805 p
13806 d
13807 }'        \
13808           -e '/./ {
13809 s/\([\"]\)/\\\1/g
13810 s/^/"/
13811 s/$/"/
13812 }'  > junk.c;
13813
13814
13815
13816     echo creating $dir/Makefile
13817 $CPP -I. -I${top_srcdir}/src  junk.c \
13818   | sed -e 's/^\#.*//'          \
13819         -e 's/^[        ][      ]*$//'\
13820         -e 's/^ /       /'              \
13821   | sed -n -e '/^..*$/p'        \
13822   | sed '/^\"/ {
13823         s/\\\([\"]\)/\1/g
13824         s/^[    ]*\"//
13825         s/\"[   ]*$//
13826 }' > Makefile.new
13827     chmod 444 Makefile.new
13828     mv -f Makefile.new Makefile
13829
13830     echo creating $dir/GNUmakefile
13831 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
13832   | sed -e 's/^\#.*//'          \
13833         -e 's/^[        ][      ]*$//'\
13834         -e 's/^ /       /'              \
13835   | sed -n -e '/^..*$/p'        \
13836   | sed '/^\"/ {
13837         s/\\\([\"]\)/\1/g
13838         s/^[    ]*\"//
13839         s/\"[   ]*$//
13840 }' > Makefile.new
13841     chmod 444 Makefile.new
13842     mv -f Makefile.new GNUmakefile
13843
13844     rm -f junk.c
13845   )
13846 done
13847
13848 sed < config.status >> lib-src/config.values \
13849   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
13850   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
13851   -e 's/^\([^ ]*\) $/\1 ""/' \
13852   -e 's/ 1$/ t/'
13853
13854
13855 exit 0
13856 EOF
13857 chmod +x $CONFIG_STATUS
13858 rm -fr confdefs* $ac_clean_files
13859 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1