Sync with r21-2-26.
[chise/xemacs-chise.git] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 1998, 1999 J. Kean Johnston.
11
12 ### Don't edit this script!
13 ### This script was automatically generated by the `autoconf' program
14 ### from the file `./configure.in'.
15 ### To rebuild it, execute the command
16 ###     autoconf
17 ### in the this directory.  You must have autoconf version 2.12 or later.
18
19 ### This file is part of XEmacs.
20
21 ### XEmacs is free software; you can redistribute it and/or modify it
22 ### under the terms of the GNU General Public License as published by
23 ### the Free Software Foundation; either version 2, or (at your
24 ### option) any later version.
25
26 ### XEmacs is distributed in the hope that it will be useful, but
27 ### WITHOUT ANY WARRANTY; without even the implied warranty of
28 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29 ### General Public License for more details.
30
31 ### You should have received a copy of the GNU General Public License
32 ### along with XEmacs; see the file COPYING.  If not, write to the Free
33 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34 ### 02111-1307, USA.
35
36 ### For usage, run `./configure --help'
37 ### For more detailed information on building and installing XEmacs,
38 ### read the file `INSTALL'.
39 ###
40 ### If configure succeeds, it leaves its status in config.status.
41 ### A log of configuration tests can be found in config.log.
42 ### If configure fails after disturbing the status quo,
43 ###     config.status is removed.
44
45 ac_help="$ac_help
46   --with-x                use the X Window System"
47
48
49
50 if test -n "$ZSH_VERSION"; then
51     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
52   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
53   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
54   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
55       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
56 elif test -n "$BASH_VERSION"; then
57     set -o posix
58   unset CDPATH
59 else
60   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
61 fi
62
63 exec_prefix=NONE
64 host=NONE
65 no_create=
66 nonopt=NONE
67 no_recursion=
68 prefix=NONE
69 program_prefix=NONE
70 program_suffix=NONE
71 program_transform_name=s,x,x,
72 silent=
73 site=
74 srcdir=
75 target=NONE
76 verbose=
77 x_includes=NONE
78 x_libraries=NONE
79
80 bindir='${exec_prefix}/bin'
81 sbindir='${exec_prefix}/sbin'
82 libexecdir='${exec_prefix}/libexec'
83 datadir='${prefix}/share'
84 sysconfdir='${prefix}/etc'
85 sharedstatedir='${prefix}/com'
86 localstatedir='${prefix}/var'
87 libdir='${{exec_prefix}}/lib'
88 includedir='${prefix}/include'
89 oldincludedir='/usr/include'
90 infodir='${prefix}/info'
91 mandir='${prefix}/man'
92
93 subdirs=
94 MFLAGS= MAKEFLAGS=
95 ac_max_here_lines=12
96
97 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
98
99 # File descriptor usage:
100 # 0 standard input
101 # 1 file creation
102 # 2 errors and warnings
103 # 3 some systems may open it to /dev/tty
104 # 4 used on the Kubota Titan
105 # 6 checking for... messages and results
106 # 5 compiler messages saved in config.log
107 if test "$silent" = yes; then
108   exec 6>/dev/null
109 else
110   exec 6>&1
111 fi
112 exec 5>./config.log
113
114 echo "\
115 This file contains any messages produced by compilers while
116 running configure, to aid debugging if configure makes a mistake.
117 " 1>&5
118
119 # Strip out --no-create and --no-recursion so they do not pile up.
120 # Also quote any args containing shell metacharacters.
121 ac_configure_args=
122 for ac_arg
123 do
124   case "$ac_arg" in
125   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
126   | --no-cr | --no-c) ;;
127   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
128   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
129   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
130   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
131   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
132   esac
133 done
134
135 # NLS nuisances.
136 # Only set these to C if already set.  These must not be set unconditionally
137 # because not all systems understand e.g. LANG=C (notably SCO).
138 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
139 # Non-C LC_CTYPE values break the ctype check.
140 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
141 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
142 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
143 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
144
145 # confdefs.h avoids OS command line length limits that DEFS can exceed.
146 rm -rf conftest* confdefs.h
147 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
148 echo > confdefs.h
149
150 # A filename unique to this package, relative to the directory that
151 # configure is in, which we can look for to find out if srcdir is correct.
152 ac_unique_file=src/lisp.h
153
154 # Find the source files, if location was not specified.
155 if test -z "$srcdir"; then
156   ac_srcdir_defaulted=yes
157   # Try the directory containing this script, then its parent.
158   ac_prog=$0
159   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
160   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
161   srcdir=$ac_confdir
162   if test ! -r $srcdir/$ac_unique_file; then
163     srcdir=..
164   fi
165 else
166   ac_srcdir_defaulted=no
167 fi
168 if test ! -r $srcdir/$ac_unique_file; then
169   if test "$ac_srcdir_defaulted" = yes; then
170     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
171   else
172     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
173   fi
174 fi
175 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
176
177 # Prefer explicitly selected file to automatically selected ones.
178 if test -z "$CONFIG_SITE"; then
179   if test "x$prefix" != xNONE; then
180     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
181   else
182     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
183   fi
184 fi
185 for ac_site_file in $CONFIG_SITE; do
186   if test -r "$ac_site_file"; then
187     echo "loading site script $ac_site_file"
188     . "$ac_site_file"
189   fi
190 done
191
192
193 ac_ext=c
194 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
195 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
196 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
197 ac_cpp='$CPP '"$xe_cppflags"
198 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
199 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
200 cross_compiling=no
201
202 ac_exeext=
203 ac_objext=o
204 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
205   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
206   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
207     ac_n= ac_c='
208 ' ac_t='        '
209   else
210     ac_n=-n ac_c= ac_t=
211   fi
212 else
213   ac_n= ac_c='\c' ac_t=
214 fi
215
216
217 progname="`echo $0 | sed 's:^\./\./:\./:'`"
218
219
220 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
221 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
222
223 prefix='/usr/local'
224 exec_prefix='${prefix}'
225 bindir='${exec_prefix}/bin'
226 datadir='${prefix}/lib'
227 statedir='${prefix}/lib'
228 libdir='${exec_prefix}/lib'
229 mandir='${prefix}/man/man1'
230 inststaticdir='${PROGNAME}'
231 instvardir='${PROGNAME}-${version}'
232 infodir='${datadir}/${instvardir}/info'
233 infopath=''
234 install_pp=''
235 lispdir='${datadir}/${instvardir}/lisp'
236 moduledir='${datadir}/${instvardir}/${configuration}/modules'
237 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
238 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
239 pkgdir='${datadir}/${instvardir}/lisp'
240 package_path=''
241 etcdir='${datadir}/${instvardir}/etc'
242 lockdir='${statedir}/${inststaticdir}/lock'
243 archlibdir='${datadir}/${instvardir}/${configuration}'
244 docdir='${archlibdir}'
245 with_prefix='yes'
246 with_site_lisp='no'
247 with_site_modules='yes'
248 with_menubars=''
249 with_scrollbars=''
250 with_widgets=''
251 with_dialogs=''
252 with_file_coding=''
253 cpp='' cppflags='' libs='' ldflags=''
254 dynamic=''
255 with_x11=''
256 with_msw=''
257 rel_alloc='default'
258 with_system_malloc='default'
259 with_dlmalloc='default'
260 native_sound_lib=''
261 use_assertions="yes"
262 with_toolbars=""
263 with_tty=""
264 use_union_type="no"
265 with_dnet=""
266 pdump="no"
267
268
269
270
271 arguments="$@"
272
273 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
274 quoted_arguments=
275 for i in "$@"; do
276    case "$i" in
277    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
278    | --no-cr | --no-c) ;;
279    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
280    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
281    *)
282    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
283    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
284    esac
285 done
286
287 while test $# != 0; do
288   arg="$1"; shift
289   case "$arg" in
290     --no-create|--no-recursion) ;;
291         -* )
292             case "$arg" in
293         -*=*)
294           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
295           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
296           valomitted=no
297         ;;
298                                                                           -*)
299                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
300           val="yes" valomitted=yes
301         ;;
302       esac
303
304             optname="$opt"
305       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
306
307             case "${valomitted}-${opt}" in yes-without_* )
308         opt=`echo $opt | sed 's/without/with/'`
309         valomitted="no" val="no" ;;
310       esac
311
312             case "$opt" in
313
314         with_site_lisp  | \
315         with_prefix     | \
316         with_site_modules | \
317         with_x          | \
318         with_x11        | \
319         with_msw        | \
320         with_gcc        | \
321         dynamic         | \
322         with_ncurses    | \
323         with_dnet       | \
324         with_socks      | \
325         with_dragndrop  | \
326         with_cde        | \
327         with_offix      | \
328         with_gpm        | \
329         with_xpm        | \
330         with_xface      | \
331         with_gif        | \
332         with_jpeg       | \
333         with_png        | \
334         with_tiff       | \
335         with_wmcommand  | \
336         with_xmu        | \
337         with_purify     | \
338         with_quantify   | \
339         with_toolbars   | \
340         with_tty        | \
341         with_xfs        | \
342         with_i18n3      | \
343         with_mule       | \
344         with_utf_2000   | \
345         with_text_coding| \
346         with_file_coding| \
347         with_canna      | \
348         with_wnn        | \
349         with_wnn6       | \
350         with_workshop   | \
351         with_sparcworks | \
352         with_tooltalk   | \
353         with_ldap       | \
354         with_pop        | \
355         with_kerberos   | \
356         with_hesiod     | \
357         with_dnet       | \
358         with_infodock   | \
359         external_widget | \
360         verbose         | \
361         extra_verbose   | \
362         const_is_losing | \
363         usage_tracking  | \
364         use_union_type  | \
365         pdump           | \
366         debug           | \
367         use_assertions  | \
368         memory_usage_stats | \
369         with_clash_detection | \
370         with_modules | \
371         no_doc_file )
372                   case "$val" in
373             y | ye | yes )      val=yes ;;
374             n | no )            val=no  ;;
375             * ) (echo "$progname: Usage error:"
376 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
377 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
378           esac
379           eval "$opt=\"$val\"" ;;
380
381
382                         srcdir          | \
383         compiler        | \
384         cflags          | \
385         cpp             | \
386         cppflags        | \
387         libs            | \
388         ldflags         | \
389         cache_file      | \
390         native_sound_lib| \
391         site_lisp       | \
392         x_includes      | \
393         x_libraries     | \
394         site_includes   | \
395         site_libraries  | \
396         site_prefixes   | \
397         site_runtime_libraries )
398                   if test "$valomitted" = "yes" ; then
399                     if test "$#" = 0 ; then
400               (echo "$progname: Usage error:"
401 echo " " "The \`--$optname' option requires a value."
402 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
403             fi
404             val="$1"; shift
405           fi
406           eval "$opt=\"$val\""
407         ;;
408
409                 rel_alloc | \
410         with_dlmalloc | \
411         with_debug_malloc  | use_debug_malloc | \
412         with_system_malloc | use_system_malloc )
413           case "$val" in
414             y | ye | yes )      val=yes ;;
415             n | no )            val=no  ;;
416             d | de | def | defa | defau | defaul | default ) val=default ;;
417             * ) (echo "$progname: Usage error:"
418 echo " " "The \`--$optname' option requires one of these values:
419   \`yes', \`no', or \`default'."
420 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
421           esac
422           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
423           eval "$opt=\"$val\""
424         ;;
425
426                 "with_database" )
427           with_database_berkdb=no
428           with_database_dbm=no
429           with_database_gdbm=no
430           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
431             case "$x" in
432               no ) ;;
433               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
434               d | db | dbm )                               with_database_dbm=yes    ;;
435               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
436               * ) (echo "$progname: Usage error:"
437 echo " " "The \`--$optname' option value
438   must be either \`no' or a comma-separated list
439   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
440 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
441             esac
442           done
443           if test "$with_database_dbm"  = "yes" -a \
444                   "$with_database_gdbm" = "yes"; then
445           (echo "$progname: Usage error:"
446 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
447   with the \`--$optname' option."
448 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
449           fi
450         ;;
451
452                 "with_sound" )
453                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
454             case "$x" in
455                       n | no | non | none ) new_sdefault=no ;;
456               a | al | all | both ) new_sdefault=yes ;;
457
458               native )       with_native_sound=yes ;;
459               nonative )     with_native_sound=no ;;
460
461               nas )          with_nas_sound=yes ;;
462               nonas )        with_nas_sound=no ;;
463
464               esd )          with_esd_sound=yes ;;
465               noesd )        with_esd_sound=no ;;
466
467               * ) bogus_sound=yes ;;
468             esac
469             if test "$bogus_sound" -o \
470                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
471                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
472                 (echo "$progname: Usage error:"
473 echo " " "Valid types for the \`--$optname' option are:
474   $types.
475 The default is to autodetect all sound support."
476 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
477             elif test -n "$new_sdefault" ; then
478                 with_native_sound=$new_sdefault
479                 with_nas_sound=$new_sdefault
480                 with_esd_sound=$new_sdefault
481                 new_sdefault=   # reset this
482             fi
483             sound_notfirst=true
484           done
485         ;;
486
487                         "with_athena" )
488           case "$val" in
489             xa | xaw )                    val=xaw    ;;
490             3 | 3d | xaw3d )              val=3d     ;;
491                         ne | nex | next | naxtaw)     val=next   ;;
492                         9 | 95 | xaw95 )              val=95     ;;
493             xp | xpm | xawxpm )           val=xpm    ;;
494             * ) (echo "$progname: Usage error:"
495 echo " " "The \`--$optname' option must have one of these values:
496   \`xaw', \`3d', \`next', \`95', or \`xpm'."
497 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
498           esac
499           eval "$opt=\"$val\""
500         ;;
501
502                 "with_xim" )
503           case "$val" in
504             y | ye | yes )                val=yes   ;;
505             n | no | non | none )         val=no    ;;
506             x | xl | xli | xlib )         val=xlib  ;;
507             m | mo | mot | moti | motif ) val=motif ;;
508             * ) (echo "$progname: Usage error:"
509 echo " " "The \`--$optname' option must have one of these values:
510   \`motif', \`xlib', \`yes', or \`no'."
511 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
512           esac
513           eval "$opt=\"$val\""
514         ;;
515
516                 "mail_locking" )
517           case "$val" in
518             lockf )     val=lockf ;;
519             flock )     val=flock ;;
520             file )      val=file  ;;
521             * ) (echo "$progname: Usage error:"
522 echo " " "The \`--$optname' option must have one of these values:
523   \`lockf', \`flock', or \`file'."
524 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
525           esac
526           eval "$opt=\"$val\""
527         ;;
528
529                 "error_checking" )
530                           
531           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
532             case "$x" in
533                       n | no | non | none ) new_default=no ;;
534               a | al | all )        new_default=yes ;;
535
536               extents )       error_check_extents=yes ;;
537               noextents )     error_check_extents=no ;;
538
539               typecheck )     error_check_typecheck=yes ;;
540               notypecheck )   error_check_typecheck=no ;;
541
542               bufpos )        error_check_bufpos=yes ;;
543               nobufpos )      error_check_bufpos=no ;;
544
545               gc )            error_check_gc=yes ;;
546               nogc )          error_check_gc=no ;;
547
548               malloc )        error_check_malloc=yes ;;
549               nomalloc )      error_check_malloc=no ;;
550
551               byte_code )     error_check_byte_code=yes ;;
552               nobyte_code )   error_check_byte_code=no ;;
553
554               * ) bogus_error_check=yes ;;
555             esac
556             if test "$bogus_error_check" -o \
557                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
558                 if test "$error_check_default" = yes ; then
559                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
560                 else
561                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
562                 fi
563                 (echo "$progname: Usage error:"
564 echo " " "Valid types for the \`--$optname' option are:
565   $types."
566 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
567             elif test -n "$new_default" ; then
568                 error_check_extents=$new_default
569                 error_check_typecheck=$new_default
570                 error_check_bufpos=$new_default
571                 error_check_gc=$new_default
572                 error_check_malloc=$new_default
573                 error_check_byte_code=$new_default
574                 new_default=    # reset this
575             fi
576             echeck_notfirst=true
577           done
578         ;;
579
580                                 
581                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
582         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
583         archlibdir | docdir | package_path )
584                    if test "$valomitted" = "yes"; then
585              if test "$#" = 0; then
586                  (echo "$progname: Usage error:"
587 echo " " "The \`--$optname' option requires a value."
588 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
589              fi
590              val="$1"; shift
591            fi
592            eval "$opt=\"$val\""
593
594                            case "$opt" in
595                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
596     Defining EXEC_PREFIX_USER_DEFINED
597 EOF
598 cat >> confdefs.h <<\EOF
599 #define EXEC_PREFIX_USER_DEFINED 1
600 EOF
601 }
602  ;;
603              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
604     Defining LISPDIR_USER_DEFINED
605 EOF
606 cat >> confdefs.h <<\EOF
607 #define LISPDIR_USER_DEFINED 1
608 EOF
609 }
610  ;;
611              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
612     Defining SITELISPDIR_USER_DEFINED
613 EOF
614 cat >> confdefs.h <<\EOF
615 #define SITELISPDIR_USER_DEFINED 1
616 EOF
617 }
618  ;;
619              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
620     Defining MODULEDIR_USER_DEFINED
621 EOF
622 cat >> confdefs.h <<\EOF
623 #define MODULEDIR_USER_DEFINED 1
624 EOF
625 }
626  ;;
627              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
628     Defining ETCDIR_USER_DEFINED
629 EOF
630 cat >> confdefs.h <<\EOF
631 #define ETCDIR_USER_DEFINED 1
632 EOF
633 }
634  ;;
635              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
636     Defining INFODIR_USER_DEFINED
637 EOF
638 cat >> confdefs.h <<\EOF
639 #define INFODIR_USER_DEFINED 1
640 EOF
641 }
642  ;;
643              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
644     Defining INFOPATH_USER_DEFINED
645 EOF
646 cat >> confdefs.h <<\EOF
647 #define INFOPATH_USER_DEFINED 1
648 EOF
649 }
650  ;;
651              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
652     Defining PACKAGE_PATH_USER_DEFINED
653 EOF
654 cat >> confdefs.h <<\EOF
655 #define PACKAGE_PATH_USER_DEFINED 1
656 EOF
657 }
658  ;;
659              datadir )
660                 { test "$extra_verbose" = "yes" && cat << \EOF
661     Defining INFODIR_USER_DEFINED
662 EOF
663 cat >> confdefs.h <<\EOF
664 #define INFODIR_USER_DEFINED 1
665 EOF
666 }
667
668                 { test "$extra_verbose" = "yes" && cat << \EOF
669     Defining LISPDIR_USER_DEFINED
670 EOF
671 cat >> confdefs.h <<\EOF
672 #define LISPDIR_USER_DEFINED 1
673 EOF
674 }
675
676             { test "$extra_verbose" = "yes" && cat << \EOF
677     Defining MODULEDIR_USER_DEFINED
678 EOF
679 cat >> confdefs.h <<\EOF
680 #define MODULEDIR_USER_DEFINED 1
681 EOF
682 }
683
684                 { test "$extra_verbose" = "yes" && cat << \EOF
685     Defining ETCDIR_USER_DEFINED
686 EOF
687 cat >> confdefs.h <<\EOF
688 #define ETCDIR_USER_DEFINED 1
689 EOF
690 }
691  ;;
692              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
693     Defining LOCKDIR_USER_DEFINED
694 EOF
695 cat >> confdefs.h <<\EOF
696 #define LOCKDIR_USER_DEFINED 1
697 EOF
698 }
699  ;;
700              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
701     Defining DOCDIR_USER_DEFINED
702 EOF
703 cat >> confdefs.h <<\EOF
704 #define DOCDIR_USER_DEFINED 1
705 EOF
706 }
707  ;;
708              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
709     Defining ARCHLIBDIR_USER_DEFINED
710 EOF
711 cat >> confdefs.h <<\EOF
712 #define ARCHLIBDIR_USER_DEFINED 1
713 EOF
714 }
715  ;;
716            esac
717         ;;
718
719                 "no_create" ) ;;
720
721                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
722
723                 "with_menubars"   | \
724         "with_scrollbars" | \
725         "with_dialogs" | \
726         "with_widgets" )
727           case "$val" in
728             l | lu | luc | luci | lucid )               val=lucid  ;;
729             m | mo | mot | moti | motif )               val=motif  ;;
730             a | at | ath | athe | athen | athena )      val=athena ;;
731             n | no | non | none )                       val=no ;;
732             * ) (echo "$progname: Usage error:"
733 echo " " "The \`--$optname' option must have one of these values:
734   \`lucid', \`motif', \`athena', or \`no'."
735 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
736           esac
737           eval "$opt=\"$val\""
738         ;;
739
740                 "use_minimal_tagbits" | \
741         "use_indexed_lrecord_implementation" | \
742         "run_in_place"  | \
743         "with_gnu_make" )
744           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
745         ;;
746
747                 * ) (echo "$progname: Usage error:"
748 echo " " "Unrecognized option: $arg"
749 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
750
751       esac
752     ;;
753
754         *-*-*) configuration="$arg" ;;
755
756         *) (echo "$progname: Usage error:"
757 echo " " "Unrecognized argument: $arg"
758 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
759
760   esac
761 done
762
763
764 test -n "$cpp"      && CPP="$cpp"
765 test -n "$cppflags" && CPPFLAGS="$cppflags"
766 test -n "$libs"     && LIBS="$libs"
767 test -n "$ldflags"  && LDFLAGS="$ldflags"
768
769 eval set x "$quoted_arguments"; shift
770
771 test "$extra_verbose" = "yes" && verbose=yes
772
773 test -n "$with_x" && with_x11="$with_x"
774
775 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
776   test "$with_system_malloc" = "default" && with_system_malloc=yes
777 fi
778
779
780
781 if test "$with_cde $with_tooltalk" = "yes no"; then
782   (echo "$progname: Usage error:"
783 echo " " "--with-cde requires --with-tooltalk"
784 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
785 elif test "$with_tooltalk" = "no" ; then with_cde=no
786 elif test "$with_cde" = "yes"; then with_tooltalk=yes
787 fi
788
789
790 case "$srcdir" in
791
792     "" )
793     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
794       if test -f "$dir/src/lisp.h" -a \
795               -f "$dir/lisp/version.el" ; then
796         srcdir="$dir"
797         break
798       fi
799     done
800     if test -z "$srcdir" ; then
801       (echo "$progname: Usage error:"
802 echo " " "Neither the current directory nor its parent seem to
803   contain the XEmacs sources.  If you do not want to build XEmacs in its
804   source tree, you should run \`$progname' in the directory in which
805   you wish to build XEmacs, using the \`--srcdir' option to say where the
806   sources may be found."
807 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
808     fi
809   ;;
810
811     * )
812     if test ! -f "$srcdir/src/lisp.h" -o \
813             ! -f "$srcdir/lisp/version.el" ; then
814       (echo "$progname: Usage error:"
815 echo " " "The directory specified with the \`--srcdir' option,
816   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
817   either run the \`$progname' script at the top of the XEmacs source
818   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
819 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
820     fi
821   ;;
822 esac
823
824 if test -z "$configuration"; then
825     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
826   if test -z "$configuration"; then
827     (echo "$progname: Usage error:"
828 echo " " "XEmacs has not been ported to this host type.
829 Try explicitly specifying the CONFIGURATION when rerunning configure."
830 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
831   fi
832 fi
833
834 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
835 echo "configure:836: checking whether ln -s works" >&5
836
837 rm -f conftestdata
838 if ln -s X conftestdata 2>/dev/null
839 then
840   rm -f conftestdata
841   ac_cv_prog_LN_S="ln -s"
842 else
843   ac_cv_prog_LN_S=ln
844 fi
845 LN_S="$ac_cv_prog_LN_S"
846 if test "$ac_cv_prog_LN_S" = "ln -s"; then
847   echo "$ac_t""yes" 1>&6
848 else
849   echo "$ac_t""no" 1>&6
850 fi
851
852
853 for dir in lisp etc man info; do
854   if test ! -d "$dir" ; then
855     echo Making symbolic link to "$srcdir/$dir"
856     ${LN_S} "$srcdir/$dir" "$dir"
857   fi
858 done
859
860
861 absolute_pwd="`pwd`";
862 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
863 then blddir="$PWD"
864 else blddir="$absolute_pwd"; if test -d "/net"; then
865   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
866   blddir=`echo "$blddir" | \
867    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
868 fi
869 fi
870
871
872 case "$srcdir" in
873   /* ) ;;
874   .  ) srcdir="$blddir" ;;
875   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
876   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
877   srcdir=`echo "$srcdir" | \
878    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
879 fi ;;
880 esac
881
882 if test `pwd` != `sh -c cd $srcdir && pwd`  \
883    && test -f "$srcdir/src/config.h"; then
884   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
885    echo "   as a build directory right now; it has been configured in its own"
886    echo "   right.  To configure in another directory as well, you MUST"
887    echo "   use GNU make.  If you do not have GNU make, then you must"
888    echo "   now do \`make distclean' in $srcdir,"
889    echo "   and then run $progname again.") >&2
890   extrasub='/^VPATH[     ]*=/c\
891 vpath %.c $(srcdir)\
892 vpath %.h $(srcdir)\
893 vpath %.y $(srcdir)\
894 vpath %.l $(srcdir)\
895 vpath %.s $(srcdir)\
896 vpath %.in $(srcdir)'
897 fi
898
899 . "$srcdir/version.sh" || exit 1;
900 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
901 : "${extra_verbose=$beta}"
902 version="${emacs_major_version}.${emacs_minor_version}"
903 { test "$extra_verbose" = "yes" && cat << EOF
904     Defining EMACS_MAJOR_VERSION = $emacs_major_version
905 EOF
906 cat >> confdefs.h <<EOF
907 #define EMACS_MAJOR_VERSION $emacs_major_version
908 EOF
909 }
910
911 { test "$extra_verbose" = "yes" && cat << EOF
912     Defining EMACS_MINOR_VERSION = $emacs_minor_version
913 EOF
914 cat >> confdefs.h <<EOF
915 #define EMACS_MINOR_VERSION $emacs_minor_version
916 EOF
917 }
918
919 if test -n "$emacs_beta_version" ; then
920   if test "$beta" = "yes"; then
921         version="${version}-b${emacs_beta_version}"
922         { test "$extra_verbose" = "yes" && cat << EOF
923     Defining EMACS_BETA_VERSION = $emacs_beta_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define EMACS_BETA_VERSION $emacs_beta_version
927 EOF
928 }
929
930   else
931         version="${version}.${emacs_beta_version}"
932         { test "$extra_verbose" = "yes" && cat << EOF
933     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
934 EOF
935 cat >> confdefs.h <<EOF
936 #define EMACS_PATCH_LEVEL $emacs_beta_version
937 EOF
938 }
939
940   fi
941 fi
942 { test "$extra_verbose" = "yes" && cat << EOF
943     Defining XEMACS_CODENAME = "$xemacs_codename"
944 EOF
945 cat >> confdefs.h <<EOF
946 #define XEMACS_CODENAME "$xemacs_codename"
947 EOF
948 }
949
950 { test "$extra_verbose" = "yes" && cat << EOF
951     Defining EMACS_VERSION = "$version"
952 EOF
953 cat >> confdefs.h <<EOF
954 #define EMACS_VERSION "$version"
955 EOF
956 }
957
958
959 if test "$with_infodock" = "yes"; then
960   if test ! -f ../../ID-INSTALL; then
961     echo "Cannot build InfoDock without InfoDock sources"
962     with_infodock=no
963   fi
964 fi
965
966 if test "$with_infodock" = "yes"; then
967       { test "$extra_verbose" = "yes" && cat << EOF
968     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
969 EOF
970 cat >> confdefs.h <<EOF
971 #define INFODOCK_MAJOR_VERSION $infodock_major_version
972 EOF
973 }
974
975   { test "$extra_verbose" = "yes" && cat << EOF
976     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
977 EOF
978 cat >> confdefs.h <<EOF
979 #define INFODOCK_MINOR_VERSION $infodock_minor_version
980 EOF
981 }
982
983   { test "$extra_verbose" = "yes" && cat << EOF
984     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
985 EOF
986 cat >> confdefs.h <<EOF
987 #define INFODOCK_BUILD_VERSION $infodock_build_version
988 EOF
989 }
990
991   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
992   PROGNAME=infodock
993   CPPFLAGS="$CPPFLAGS -DINFODOCK"
994 else
995   PROGNAME=xemacs
996 fi
997
998 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
999 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1000     Defining ERROR_CHECK_EXTENTS
1001 EOF
1002 cat >> confdefs.h <<\EOF
1003 #define ERROR_CHECK_EXTENTS 1
1004 EOF
1005 }
1006
1007 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1008     Defining ERROR_CHECK_TYPECHECK
1009 EOF
1010 cat >> confdefs.h <<\EOF
1011 #define ERROR_CHECK_TYPECHECK 1
1012 EOF
1013 }
1014
1015 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1016     Defining ERROR_CHECK_BUFPOS
1017 EOF
1018 cat >> confdefs.h <<\EOF
1019 #define ERROR_CHECK_BUFPOS 1
1020 EOF
1021 }
1022
1023 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1024     Defining ERROR_CHECK_GC
1025 EOF
1026 cat >> confdefs.h <<\EOF
1027 #define ERROR_CHECK_GC 1
1028 EOF
1029 }
1030
1031 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1032     Defining ERROR_CHECK_MALLOC
1033 EOF
1034 cat >> confdefs.h <<\EOF
1035 #define ERROR_CHECK_MALLOC 1
1036 EOF
1037 }
1038
1039 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1040     Defining ERROR_CHECK_BYTE_CODE
1041 EOF
1042 cat >> confdefs.h <<\EOF
1043 #define ERROR_CHECK_BYTE_CODE 1
1044 EOF
1045 }
1046
1047 if test "${debug:=$beta}" = "yes"; then
1048   use_assertions=yes memory_usage_stats=yes
1049   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1050    echo "    xemacs will be linked with \"debug.o\""
1051  fi
1052   { test "$extra_verbose" = "yes" && cat << \EOF
1053     Defining DEBUG_XEMACS
1054 EOF
1055 cat >> confdefs.h <<\EOF
1056 #define DEBUG_XEMACS 1
1057 EOF
1058 }
1059
1060 fi
1061 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1062     Defining USE_ASSERTIONS
1063 EOF
1064 cat >> confdefs.h <<\EOF
1065 #define USE_ASSERTIONS 1
1066 EOF
1067 }
1068
1069 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1070     Defining MEMORY_USAGE_STATS
1071 EOF
1072 cat >> confdefs.h <<\EOF
1073 #define MEMORY_USAGE_STATS 1
1074 EOF
1075 }
1076
1077
1078
1079 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1080 echo "configure:1081: checking "host system type"" >&5
1081 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1082 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1083 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1084 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1085 echo "$ac_t""$configuration" 1>&6
1086
1087
1088
1089
1090
1091 machine='' opsys=''
1092
1093 case "$canonical" in
1094   sparc-*-*        ) machine=sparc ;;
1095   alpha*-*-*       ) machine=alpha ;;
1096   vax-*-*          ) machine=vax ;;
1097   mips-dec-*       ) machine=pmax ;;
1098   mips-sgi-*       ) machine=iris4d ;;
1099   mips*-linux      ) machine=mips ;;
1100   romp-ibm-*       ) machine=ibmrt ;;
1101   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1102   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1103   powerpc*-*       ) machine=powerpc ;;
1104   hppa-*-*         ) machine=hp800 ;;
1105   m88k-dg-*        ) machine=aviion ;;
1106   m68*-sony-*      ) machine=news ;;
1107   mips-sony-*      ) machine=news-risc ;;
1108   clipper-*        ) machine=clipper ;;
1109   arm-*            ) machine=arm ;;
1110   ns32k-*          ) machine=ns32000 ;;
1111 esac
1112
1113 case "$canonical" in
1114   *-*-linux*    ) opsys=linux ;;
1115   *-*-netbsd*   ) opsys=netbsd ;;
1116   *-*-openbsd*  ) opsys=openbsd ;;
1117   *-*-nextstep* ) opsys=nextstep ;;
1118   *-*-vms       ) opsys=vms ;;
1119
1120     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1121   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1122   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1123   *-dec-osf3*                ) opsys=decosf3-1 ;;
1124   *-dec-osf4*                ) opsys=decosf4-0 ;;
1125
1126     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1127   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1128   *-*-ultrix* )         opsys=ultrix4-3 ;;
1129
1130     *-*-aix3.1*  ) opsys=aix3-1 ;;
1131   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1132   *-*-aix3*    ) opsys=aix3-2   ;;
1133   *-*-aix4.0*  ) opsys=aix4     ;;
1134   *-*-aix4.1*  ) opsys=aix4-1   ;;
1135   *-*-aix4*    ) opsys=aix4-2   ;;
1136
1137     *-gnu* )                    opsys=gnu    ;;
1138   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1139   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1140   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1141   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1142   *-*-aos*   )                  opsys=bsd4-3 ;;
1143   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1144   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1145   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1146   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1147   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1148   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1149         if test -z "$NON_GNU_CPP" ; then
1150           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1151             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1152           done
1153         fi
1154         opsys=usg5-4-2 ;;
1155     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1156     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1157 esac
1158
1159 case "$canonical" in
1160
1161     *-*-netbsd* )
1162     case "$canonical" in
1163       i[3-9]86-*-netbsd*) machine=intel386 ;;
1164       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1165                                             machine=hp9000s300 ;;
1166       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1167       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1168     esac
1169   ;;
1170
1171     *-*-openbsd* )
1172     case "${canonical}" in
1173       i386-*-openbsd*)          machine=intel386 ;;
1174       m68k-*-openbsd*)          machine=hp9000s300 ;;
1175       mipsel-*-openbsd*)        machine=pmax ;;
1176      esac
1177    ;;
1178
1179     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1180   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1181
1182     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1183   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1184
1185     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1186
1187     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1188
1189     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1190
1191     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1192
1193     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1194
1195     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1196   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1197   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1198
1199   
1200     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1201
1202     *-convex-bsd* | *-convex-convexos* )
1203     machine=convex opsys=bsd4-3
1204     NON_GNU_CPP="cc -E -P"
1205   ;;
1206
1207     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1208
1209     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1210   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1211   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1212   m88k-dg-dgux*                           ) opsys=dgux     ;;
1213
1214     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1215   m88k-motorola-sysv4* )
1216                     machine=delta88k opsys=usg5-4-2
1217   ;;
1218   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1219
1220     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1221   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1222
1223     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1224
1225     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1226   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1227   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1228
1229       m88k-harris-cxux* )
1230         case "`uname -r`" in
1231        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1232        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1233     esac
1234     NON_GNU_CPP="/lib/cpp"
1235   ;;
1236     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1237     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1238
1239     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1240
1241     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1242
1243     *-hp-hpux* )
1244         case "$canonical" in
1245       m68*  ) machine=hp9000s300 ;;
1246       hppa* ) machine=hp800      ;;
1247     esac
1248
1249     case "$canonical" in
1250       *-hp-hpux7*  )  opsys=hpux   ;;
1251       *-hp-hpux8*  )  opsys=hpux8  ;;
1252       *-hp-hpux9*  )  opsys=hpux9  ;;
1253       *-hp-hpux10* )  opsys=hpux10 ;;
1254       *-hp-hpux11* )  opsys=hpux11 ;;
1255       *            )  opsys=hpux   ;;
1256     esac
1257
1258         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1259    echo "    xemacs will be linked with \"strcat.o\""
1260  fi ;; esac
1261
1262     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1263         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1264     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1265
1266     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1267   ;;
1268
1269     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1270   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1271
1272     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1273   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1274   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1275   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1276   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1277   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1278
1279     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1280   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1281
1282     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1283
1284     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1285
1286     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1287
1288     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1289
1290       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1291
1292     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1293
1294     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1295
1296     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1297
1298     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1299
1300         mips-mips-usg* ) machine=mips4 ;;
1301   mips-mips-riscos4 )
1302     machine=mips4
1303     NON_GNU_CC="cc -systype bsd43"
1304     NON_GNU_CPP="cc -systype bsd43 -E"
1305     case "$canonical" in
1306       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1307       mips-mips-riscos5* ) opsys=riscos5 ;;
1308     esac
1309   ;;
1310   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1311   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1312
1313     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1314
1315     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1316
1317     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1318   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1319
1320     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1321
1322     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1323
1324     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1325
1326     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1327
1328     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1329   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1330
1331     mips-siemens-sysv* | mips-sni-sysv*)
1332     machine=mips-siemens opsys=usg5-4
1333     NON_GNU_CC=/usr/ccs/bin/cc
1334     NON_GNU_CPP=/usr/ccs/lib/cpp
1335   ;;
1336
1337     mips-nec-sysv*)
1338     machine=mips-nec
1339     NON_GNU_CC=/usr/ccs/bin/cc
1340     NON_GNU_CPP=/usr/ccs/lib/cpp
1341   ;;
1342
1343       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1344   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1345     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1346   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1347   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1348   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1349   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1350   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1351   mips-sgi-irix*      ) opsys=irix5-0 ;;
1352
1353     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1354   *-sony-news* ) opsys=newsos5 ;;
1355
1356     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1357
1358     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1359         case "$canonical" in
1360       m68*-sunos1* )             machine=sun1     ;;
1361       m68*-sunos2* )             machine=sun2     ;;
1362       m68* )                     machine=sun3     ;;
1363       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1364       i*86-*-* )                 machine=intel386 ;;
1365       rs6000* )                  machine=rs6000   ;;
1366     esac
1367
1368         case "$canonical" in *-sunos5*)
1369       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1370     esac
1371
1372                     case "$canonical" in
1373       *-sunos4* )
1374         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1375         : ;;
1376       *-solaris2* )
1377         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1378         RANLIB=':' ;;
1379     esac
1380
1381     case "$canonical" in
1382       *-solaris*          )
1383         opsys=sol2
1384         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1385         { test "$extra_verbose" = "yes" && cat << EOF
1386     Defining OS_RELEASE = $os_release
1387 EOF
1388 cat >> confdefs.h <<EOF
1389 #define OS_RELEASE $os_release
1390 EOF
1391 }
1392  ;;
1393
1394             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1395       *-sunos4.0*         ) opsys=sunos4-0      ;;
1396       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1397       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1398       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1399       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1400       *-mach*             ) opsys=mach-bsd4-3   ;;
1401       *                   ) opsys=bsd4-2        ;;
1402     esac
1403
1404     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1405
1406         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1407   ;;
1408
1409     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1410
1411     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1412   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1413
1414     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1415
1416     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1417
1418     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1419       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1420
1421     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1422
1423     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1424
1425     vax-dec-* )
1426     case "$canonical" in
1427       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1428       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1429       *-mach* )                         opsys=mach-bsd4-3 ;;
1430     esac
1431   ;;
1432
1433     ns16k-whitechapel-* ) machine=mg1 ;;
1434
1435     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1436
1437     i[3-9]86-*-* )
1438     machine=intel386
1439     case "$canonical" in
1440       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1441       *-isc2.2* )               opsys=isc2-2 ;;
1442       *-isc4.0* )               opsys=isc4-0 ;;
1443       *-isc4.* )                opsys=isc4-1
1444                                 GCC_TEST_OPTIONS=-posix
1445                                 NON_GCC_TEST_OPTIONS=-Xp
1446                                 ;;
1447       *-isc* )                  opsys=isc3-0 ;;
1448       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1449       *-esix* )                 opsys=esix ;;
1450       *-mach* )                 opsys=mach-bsd4-3 ;;
1451       *-xenix* )                opsys=xenix ;;
1452       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1453       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1454       *-bsdi4* )                opsys=bsdos4 ;;
1455       *-bsdi3* )                opsys=bsdos3 ;;
1456       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1457       *-bsdi2* )                opsys=bsdos2 ;;
1458       *-sco3.2v5* )             opsys=sco5 ;
1459                                                         if test "$dynamic" = "yes" ; then
1460                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1461         else
1462                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1463         fi ;;
1464       *-sysv5* )                opsys=sco7 ;;
1465       *-386bsd* )               opsys=386bsd ;;
1466       *-freebsd* )              opsys=freebsd ;;
1467       *-nextstep* )             opsys=nextstep ;;
1468       *-pc-cygwin* )            opsys=cygwin32 ;;
1469       *-pc-mingw* )             opsys=mingw32 ;
1470                                 test -z "$with_tty" && with_tty="no";;
1471           esac
1472   ;;
1473
1474     m68k-*-linux* ) machine=m68k opsys=linux ;;
1475
1476 esac
1477
1478 if test -z "$machine" -o -z "$opsys"; then
1479   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1480    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1481   ) >&2
1482   exit 1
1483 fi
1484
1485 if test -z "$dynamic"; then
1486   case "$opsys" in
1487     hpux* | sunos4* ) dynamic=no ;;
1488     *) dynamic=yes ;;
1489   esac
1490 fi
1491 if test "$dynamic" = "yes"; then
1492   case "$opsys" in
1493     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1494     decosf* ) ld_call_shared="-call_shared" ;;
1495   esac
1496 else   case "$opsys" in
1497     sol2 )
1498       echo "Static linking is not supported on Solaris 2."
1499       echo "Rerun configure without specifying --dynamic=no."
1500       exit 1 ;;
1501     linux   ) ld_call_shared="-Bstatic" ;;
1502     decosf* ) ld_call_shared="-non_shared" ;;
1503   esac
1504 fi
1505
1506 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1507
1508 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1509 { test "$extra_verbose" = "yes" && cat << EOF
1510     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1511 EOF
1512 cat >> confdefs.h <<EOF
1513 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1514 EOF
1515 }
1516
1517
1518 machfile="m/${machine}.h"
1519 opsysfile="s/${opsys}.h"
1520
1521
1522 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1523 if test "$with_workshop $with_tooltalk" = "yes no"; then
1524   (echo "$progname: Usage error:"
1525 echo " " "--with-workshop requires --with-tooltalk"
1526 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1527 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1528 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1529 fi
1530
1531 if test "$with_workshop" = "yes"; then
1532   { test "$extra_verbose" = "yes" && cat << \EOF
1533     Defining SUNPRO
1534 EOF
1535 cat >> confdefs.h <<\EOF
1536 #define SUNPRO 1
1537 EOF
1538 }
1539
1540   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1541    echo "    xemacs will be linked with \"sunpro.o\""
1542  fi
1543 fi
1544
1545 if test "$with_clash_detection" = "yes"; then
1546   { test "$extra_verbose" = "yes" && cat << \EOF
1547     Defining CLASH_DETECTION
1548 EOF
1549 cat >> confdefs.h <<\EOF
1550 #define CLASH_DETECTION 1
1551 EOF
1552 }
1553
1554   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1555    echo "    xemacs will be linked with \"filelock.o\""
1556  fi
1557 fi
1558
1559 test -n "$compiler" && CC="$compiler"
1560 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1561 fi
1562
1563 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1564 if test "${CFLAGS-unset}" != unset
1565   then cflags_specified=yes;
1566   else cflags_specified=no;
1567 fi
1568
1569 xe_save_CFLAGS="$CFLAGS"
1570
1571 # Extract the first word of "gcc", so it can be a program name with args.
1572 set dummy gcc; ac_word=$2
1573 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1574 echo "configure:1575: checking for $ac_word" >&5
1575
1576 if test -n "$CC"; then
1577   ac_cv_prog_CC="$CC" # Let the user override the test.
1578 else
1579   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1580   ac_dummy="$PATH"
1581   for ac_dir in $ac_dummy; do
1582     test -z "$ac_dir" && ac_dir=.
1583     if test -f $ac_dir/$ac_word; then
1584       ac_cv_prog_CC="gcc"
1585       break
1586     fi
1587   done
1588   IFS="$ac_save_ifs"
1589 fi
1590 CC="$ac_cv_prog_CC"
1591 if test -n "$CC"; then
1592   echo "$ac_t""$CC" 1>&6
1593 else
1594   echo "$ac_t""no" 1>&6
1595 fi
1596
1597 if test -z "$CC"; then
1598   # Extract the first word of "cc", so it can be a program name with args.
1599 set dummy cc; ac_word=$2
1600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1601 echo "configure:1602: checking for $ac_word" >&5
1602
1603 if test -n "$CC"; then
1604   ac_cv_prog_CC="$CC" # Let the user override the test.
1605 else
1606   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1607   ac_prog_rejected=no
1608   ac_dummy="$PATH"
1609   for ac_dir in $ac_dummy; do
1610     test -z "$ac_dir" && ac_dir=.
1611     if test -f $ac_dir/$ac_word; then
1612       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1613         ac_prog_rejected=yes
1614         continue
1615       fi
1616       ac_cv_prog_CC="cc"
1617       break
1618     fi
1619   done
1620   IFS="$ac_save_ifs"
1621 if test $ac_prog_rejected = yes; then
1622   # We found a bogon in the path, so make sure we never use it.
1623   set dummy $ac_cv_prog_CC
1624   shift
1625   if test $# -gt 0; then
1626     # We chose a different compiler from the bogus one.
1627     # However, it has the same basename, so the bogon will be chosen
1628     # first if we set CC to just the basename; use the full file name.
1629     shift
1630     set dummy "$ac_dir/$ac_word" "$@"
1631     shift
1632     ac_cv_prog_CC="$@"
1633   fi
1634 fi
1635 fi
1636 CC="$ac_cv_prog_CC"
1637 if test -n "$CC"; then
1638   echo "$ac_t""$CC" 1>&6
1639 else
1640   echo "$ac_t""no" 1>&6
1641 fi
1642
1643   if test -z "$CC"; then
1644     case "`uname -s`" in
1645     *win32* | *WIN32*)
1646       # Extract the first word of "cl", so it can be a program name with args.
1647 set dummy cl; ac_word=$2
1648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1649 echo "configure:1650: checking for $ac_word" >&5
1650
1651 if test -n "$CC"; then
1652   ac_cv_prog_CC="$CC" # Let the user override the test.
1653 else
1654   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1655   ac_dummy="$PATH"
1656   for ac_dir in $ac_dummy; do
1657     test -z "$ac_dir" && ac_dir=.
1658     if test -f $ac_dir/$ac_word; then
1659       ac_cv_prog_CC="cl"
1660       break
1661     fi
1662   done
1663   IFS="$ac_save_ifs"
1664 fi
1665 CC="$ac_cv_prog_CC"
1666 if test -n "$CC"; then
1667   echo "$ac_t""$CC" 1>&6
1668 else
1669   echo "$ac_t""no" 1>&6
1670 fi
1671  ;;
1672     esac
1673   fi
1674   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1675 fi
1676
1677 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1678 echo "configure:1679: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1679
1680 ac_ext=c
1681 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1682 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1683 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1684 ac_cpp='$CPP '"$xe_cppflags"
1685 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1686 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1687 cross_compiling=no
1688
1689 cat > conftest.$ac_ext << EOF
1690
1691 #line 1692 "configure"
1692 #include "confdefs.h"
1693
1694 main(){return(0);}
1695 EOF
1696 if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1697   ac_cv_prog_cc_works=yes
1698   # If we can't run a trivial program, we are probably using a cross compiler.
1699   if (./conftest; exit) 2>/dev/null; then
1700     ac_cv_prog_cc_cross=no
1701   else
1702     ac_cv_prog_cc_cross=yes
1703   fi
1704 else
1705   echo "configure: failed program was:" >&5
1706   cat conftest.$ac_ext >&5
1707   ac_cv_prog_cc_works=no
1708 fi
1709 rm -fr conftest*
1710 ac_ext=c
1711 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1712 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1713 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1714 ac_cpp='$CPP '"$xe_cppflags"
1715 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1716 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1717 cross_compiling=no
1718
1719 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1720 if test $ac_cv_prog_cc_works = no; then
1721   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1722 fi
1723 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1724 echo "configure:1725: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1725 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1726 cross_compiling=$ac_cv_prog_cc_cross
1727
1728 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1729 echo "configure:1730: checking whether we are using GNU C" >&5
1730
1731 cat > conftest.c <<EOF
1732 #ifdef __GNUC__
1733   yes;
1734 #endif
1735 EOF
1736 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1737   ac_cv_prog_gcc=yes
1738 else
1739   ac_cv_prog_gcc=no
1740 fi
1741
1742 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1743
1744 if test $ac_cv_prog_gcc = yes; then
1745   GCC=yes
1746 else
1747   GCC=
1748 fi
1749
1750 ac_test_CFLAGS="${CFLAGS+set}"
1751 ac_save_CFLAGS="$CFLAGS"
1752 CFLAGS=
1753 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1754 echo "configure:1755: checking whether ${CC-cc} accepts -g" >&5
1755
1756 echo 'void f(){}' > conftest.c
1757 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1758   ac_cv_prog_cc_g=yes
1759 else
1760   ac_cv_prog_cc_g=no
1761 fi
1762 rm -f conftest*
1763
1764
1765 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1766 if test "$ac_test_CFLAGS" = set; then
1767   CFLAGS="$ac_save_CFLAGS"
1768 elif test $ac_cv_prog_cc_g = yes; then
1769   if test "$GCC" = yes; then
1770     CFLAGS="-g -O2"
1771   else
1772     CFLAGS="-g"
1773   fi
1774 else
1775   if test "$GCC" = yes; then
1776     CFLAGS="-O2"
1777   else
1778     CFLAGS=
1779   fi
1780 fi
1781  
1782 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1783   CC=${NON_GNU_CC-cc}
1784   # Extract the first word of "gcc", so it can be a program name with args.
1785 set dummy gcc; ac_word=$2
1786 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1787 echo "configure:1788: checking for $ac_word" >&5
1788
1789 if test -n "$CC"; then
1790   ac_cv_prog_CC="$CC" # Let the user override the test.
1791 else
1792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1793   ac_dummy="$PATH"
1794   for ac_dir in $ac_dummy; do
1795     test -z "$ac_dir" && ac_dir=.
1796     if test -f $ac_dir/$ac_word; then
1797       ac_cv_prog_CC="gcc"
1798       break
1799     fi
1800   done
1801   IFS="$ac_save_ifs"
1802 fi
1803 CC="$ac_cv_prog_CC"
1804 if test -n "$CC"; then
1805   echo "$ac_t""$CC" 1>&6
1806 else
1807   echo "$ac_t""no" 1>&6
1808 fi
1809
1810 if test -z "$CC"; then
1811   # Extract the first word of "cc", so it can be a program name with args.
1812 set dummy cc; ac_word=$2
1813 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1814 echo "configure:1815: checking for $ac_word" >&5
1815
1816 if test -n "$CC"; then
1817   ac_cv_prog_CC="$CC" # Let the user override the test.
1818 else
1819   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1820   ac_prog_rejected=no
1821   ac_dummy="$PATH"
1822   for ac_dir in $ac_dummy; do
1823     test -z "$ac_dir" && ac_dir=.
1824     if test -f $ac_dir/$ac_word; then
1825       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1826         ac_prog_rejected=yes
1827         continue
1828       fi
1829       ac_cv_prog_CC="cc"
1830       break
1831     fi
1832   done
1833   IFS="$ac_save_ifs"
1834 if test $ac_prog_rejected = yes; then
1835   # We found a bogon in the path, so make sure we never use it.
1836   set dummy $ac_cv_prog_CC
1837   shift
1838   if test $# -gt 0; then
1839     # We chose a different compiler from the bogus one.
1840     # However, it has the same basename, so the bogon will be chosen
1841     # first if we set CC to just the basename; use the full file name.
1842     shift
1843     set dummy "$ac_dir/$ac_word" "$@"
1844     shift
1845     ac_cv_prog_CC="$@"
1846   fi
1847 fi
1848 fi
1849 CC="$ac_cv_prog_CC"
1850 if test -n "$CC"; then
1851   echo "$ac_t""$CC" 1>&6
1852 else
1853   echo "$ac_t""no" 1>&6
1854 fi
1855
1856   if test -z "$CC"; then
1857     case "`uname -s`" in
1858     *win32* | *WIN32*)
1859       # Extract the first word of "cl", so it can be a program name with args.
1860 set dummy cl; ac_word=$2
1861 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1862 echo "configure:1863: checking for $ac_word" >&5
1863
1864 if test -n "$CC"; then
1865   ac_cv_prog_CC="$CC" # Let the user override the test.
1866 else
1867   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1868   ac_dummy="$PATH"
1869   for ac_dir in $ac_dummy; do
1870     test -z "$ac_dir" && ac_dir=.
1871     if test -f $ac_dir/$ac_word; then
1872       ac_cv_prog_CC="cl"
1873       break
1874     fi
1875   done
1876   IFS="$ac_save_ifs"
1877 fi
1878 CC="$ac_cv_prog_CC"
1879 if test -n "$CC"; then
1880   echo "$ac_t""$CC" 1>&6
1881 else
1882   echo "$ac_t""no" 1>&6
1883 fi
1884  ;;
1885     esac
1886   fi
1887   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1888 fi
1889
1890 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1891 echo "configure:1892: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1892
1893 ac_ext=c
1894 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1895 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1896 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1897 ac_cpp='$CPP '"$xe_cppflags"
1898 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1899 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1900 cross_compiling=no
1901
1902 cat > conftest.$ac_ext << EOF
1903
1904 #line 1905 "configure"
1905 #include "confdefs.h"
1906
1907 main(){return(0);}
1908 EOF
1909 if { (eval echo configure:1910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1910   ac_cv_prog_cc_works=yes
1911   # If we can't run a trivial program, we are probably using a cross compiler.
1912   if (./conftest; exit) 2>/dev/null; then
1913     ac_cv_prog_cc_cross=no
1914   else
1915     ac_cv_prog_cc_cross=yes
1916   fi
1917 else
1918   echo "configure: failed program was:" >&5
1919   cat conftest.$ac_ext >&5
1920   ac_cv_prog_cc_works=no
1921 fi
1922 rm -fr conftest*
1923 ac_ext=c
1924 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1925 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1926 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1927 ac_cpp='$CPP '"$xe_cppflags"
1928 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1929 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1930 cross_compiling=no
1931
1932 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1933 if test $ac_cv_prog_cc_works = no; then
1934   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1935 fi
1936 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1937 echo "configure:1938: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1938 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1939 cross_compiling=$ac_cv_prog_cc_cross
1940
1941 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1942 echo "configure:1943: checking whether we are using GNU C" >&5
1943
1944 cat > conftest.c <<EOF
1945 #ifdef __GNUC__
1946   yes;
1947 #endif
1948 EOF
1949 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1950   ac_cv_prog_gcc=yes
1951 else
1952   ac_cv_prog_gcc=no
1953 fi
1954
1955 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1956
1957 if test $ac_cv_prog_gcc = yes; then
1958   GCC=yes
1959 else
1960   GCC=
1961 fi
1962
1963 ac_test_CFLAGS="${CFLAGS+set}"
1964 ac_save_CFLAGS="$CFLAGS"
1965 CFLAGS=
1966 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1967 echo "configure:1968: checking whether ${CC-cc} accepts -g" >&5
1968
1969 echo 'void f(){}' > conftest.c
1970 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1971   ac_cv_prog_cc_g=yes
1972 else
1973   ac_cv_prog_cc_g=no
1974 fi
1975 rm -f conftest*
1976
1977
1978 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1979 if test "$ac_test_CFLAGS" = set; then
1980   CFLAGS="$ac_save_CFLAGS"
1981 elif test $ac_cv_prog_cc_g = yes; then
1982   if test "$GCC" = yes; then
1983     CFLAGS="-g -O2"
1984   else
1985     CFLAGS="-g"
1986   fi
1987 else
1988   if test "$GCC" = yes; then
1989     CFLAGS="-O2"
1990   else
1991     CFLAGS=
1992   fi
1993 fi
1994
1995 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1996   CC=gcc
1997   # Extract the first word of "gcc", so it can be a program name with args.
1998 set dummy gcc; ac_word=$2
1999 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2000 echo "configure:2001: checking for $ac_word" >&5
2001
2002 if test -n "$CC"; then
2003   ac_cv_prog_CC="$CC" # Let the user override the test.
2004 else
2005   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2006   ac_dummy="$PATH"
2007   for ac_dir in $ac_dummy; do
2008     test -z "$ac_dir" && ac_dir=.
2009     if test -f $ac_dir/$ac_word; then
2010       ac_cv_prog_CC="gcc"
2011       break
2012     fi
2013   done
2014   IFS="$ac_save_ifs"
2015 fi
2016 CC="$ac_cv_prog_CC"
2017 if test -n "$CC"; then
2018   echo "$ac_t""$CC" 1>&6
2019 else
2020   echo "$ac_t""no" 1>&6
2021 fi
2022
2023 if test -z "$CC"; then
2024   # Extract the first word of "cc", so it can be a program name with args.
2025 set dummy cc; ac_word=$2
2026 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2027 echo "configure:2028: checking for $ac_word" >&5
2028
2029 if test -n "$CC"; then
2030   ac_cv_prog_CC="$CC" # Let the user override the test.
2031 else
2032   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2033   ac_prog_rejected=no
2034   ac_dummy="$PATH"
2035   for ac_dir in $ac_dummy; do
2036     test -z "$ac_dir" && ac_dir=.
2037     if test -f $ac_dir/$ac_word; then
2038       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2039         ac_prog_rejected=yes
2040         continue
2041       fi
2042       ac_cv_prog_CC="cc"
2043       break
2044     fi
2045   done
2046   IFS="$ac_save_ifs"
2047 if test $ac_prog_rejected = yes; then
2048   # We found a bogon in the path, so make sure we never use it.
2049   set dummy $ac_cv_prog_CC
2050   shift
2051   if test $# -gt 0; then
2052     # We chose a different compiler from the bogus one.
2053     # However, it has the same basename, so the bogon will be chosen
2054     # first if we set CC to just the basename; use the full file name.
2055     shift
2056     set dummy "$ac_dir/$ac_word" "$@"
2057     shift
2058     ac_cv_prog_CC="$@"
2059   fi
2060 fi
2061 fi
2062 CC="$ac_cv_prog_CC"
2063 if test -n "$CC"; then
2064   echo "$ac_t""$CC" 1>&6
2065 else
2066   echo "$ac_t""no" 1>&6
2067 fi
2068
2069   if test -z "$CC"; then
2070     case "`uname -s`" in
2071     *win32* | *WIN32*)
2072       # Extract the first word of "cl", so it can be a program name with args.
2073 set dummy cl; ac_word=$2
2074 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2075 echo "configure:2076: checking for $ac_word" >&5
2076
2077 if test -n "$CC"; then
2078   ac_cv_prog_CC="$CC" # Let the user override the test.
2079 else
2080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2081   ac_dummy="$PATH"
2082   for ac_dir in $ac_dummy; do
2083     test -z "$ac_dir" && ac_dir=.
2084     if test -f $ac_dir/$ac_word; then
2085       ac_cv_prog_CC="cl"
2086       break
2087     fi
2088   done
2089   IFS="$ac_save_ifs"
2090 fi
2091 CC="$ac_cv_prog_CC"
2092 if test -n "$CC"; then
2093   echo "$ac_t""$CC" 1>&6
2094 else
2095   echo "$ac_t""no" 1>&6
2096 fi
2097  ;;
2098     esac
2099   fi
2100   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2101 fi
2102
2103 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2104 echo "configure:2105: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2105
2106 ac_ext=c
2107 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2108 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2109 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2110 ac_cpp='$CPP '"$xe_cppflags"
2111 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2112 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2113 cross_compiling=no
2114
2115 cat > conftest.$ac_ext << EOF
2116
2117 #line 2118 "configure"
2118 #include "confdefs.h"
2119
2120 main(){return(0);}
2121 EOF
2122 if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2123   ac_cv_prog_cc_works=yes
2124   # If we can't run a trivial program, we are probably using a cross compiler.
2125   if (./conftest; exit) 2>/dev/null; then
2126     ac_cv_prog_cc_cross=no
2127   else
2128     ac_cv_prog_cc_cross=yes
2129   fi
2130 else
2131   echo "configure: failed program was:" >&5
2132   cat conftest.$ac_ext >&5
2133   ac_cv_prog_cc_works=no
2134 fi
2135 rm -fr conftest*
2136 ac_ext=c
2137 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2138 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2139 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2140 ac_cpp='$CPP '"$xe_cppflags"
2141 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2142 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2143 cross_compiling=no
2144
2145 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2146 if test $ac_cv_prog_cc_works = no; then
2147   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2148 fi
2149 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2150 echo "configure:2151: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2151 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2152 cross_compiling=$ac_cv_prog_cc_cross
2153
2154 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2155 echo "configure:2156: checking whether we are using GNU C" >&5
2156
2157 cat > conftest.c <<EOF
2158 #ifdef __GNUC__
2159   yes;
2160 #endif
2161 EOF
2162 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2163   ac_cv_prog_gcc=yes
2164 else
2165   ac_cv_prog_gcc=no
2166 fi
2167
2168 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2169
2170 if test $ac_cv_prog_gcc = yes; then
2171   GCC=yes
2172 else
2173   GCC=
2174 fi
2175
2176 ac_test_CFLAGS="${CFLAGS+set}"
2177 ac_save_CFLAGS="$CFLAGS"
2178 CFLAGS=
2179 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2180 echo "configure:2181: checking whether ${CC-cc} accepts -g" >&5
2181
2182 echo 'void f(){}' > conftest.c
2183 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2184   ac_cv_prog_cc_g=yes
2185 else
2186   ac_cv_prog_cc_g=no
2187 fi
2188 rm -f conftest*
2189
2190
2191 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2192 if test "$ac_test_CFLAGS" = set; then
2193   CFLAGS="$ac_save_CFLAGS"
2194 elif test $ac_cv_prog_cc_g = yes; then
2195   if test "$GCC" = yes; then
2196     CFLAGS="-g -O2"
2197   else
2198     CFLAGS="-g"
2199   fi
2200 else
2201   if test "$GCC" = yes; then
2202     CFLAGS="-O2"
2203   else
2204     CFLAGS=
2205   fi
2206 fi
2207
2208 fi
2209 CFLAGS="$xe_save_CFLAGS"
2210
2211
2212 test -n "$CPP" -a -d "$CPP" && CPP=
2213
2214 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2215
2216 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2217 echo "configure:2218: checking how to run the C preprocessor" >&5
2218 # On Suns, sometimes $CPP names a directory.
2219 if test -n "$CPP" && test -d "$CPP"; then
2220   CPP=
2221 fi
2222 if test -z "$CPP"; then
2223
2224   # This must be in double quotes, not single quotes, because CPP may get
2225   # substituted into the Makefile and "${CC-cc}" will confuse make.
2226   CPP="${CC-cc} -E"
2227   # On the NeXT, cc -E runs the code through the compiler's parser,
2228   # not just through cpp.
2229   cat > conftest.$ac_ext <<EOF
2230 #line 2231 "configure"
2231 #include "confdefs.h"
2232 #include <assert.h>
2233 Syntax Error
2234 EOF
2235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2236 { (eval echo configure:2237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2238 if test -z "$ac_err"; then
2239   :
2240 else
2241   echo "$ac_err" >&5
2242   echo "configure: failed program was:" >&5
2243   cat conftest.$ac_ext >&5
2244   rm -rf conftest*
2245   CPP="${CC-cc} -E -traditional-cpp"
2246   cat > conftest.$ac_ext <<EOF
2247 #line 2248 "configure"
2248 #include "confdefs.h"
2249 #include <assert.h>
2250 Syntax Error
2251 EOF
2252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2253 { (eval echo configure:2254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2255 if test -z "$ac_err"; then
2256   :
2257 else
2258   echo "$ac_err" >&5
2259   echo "configure: failed program was:" >&5
2260   cat conftest.$ac_ext >&5
2261   rm -rf conftest*
2262   CPP="${CC-cc} -nologo -E"
2263   cat > conftest.$ac_ext <<EOF
2264 #line 2265 "configure"
2265 #include "confdefs.h"
2266 #include <assert.h>
2267 Syntax Error
2268 EOF
2269 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2270 { (eval echo configure:2271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2271 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2272 if test -z "$ac_err"; then
2273   :
2274 else
2275   echo "$ac_err" >&5
2276   echo "configure: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   rm -rf conftest*
2279   CPP=/lib/cpp
2280 fi
2281 rm -f conftest*
2282 fi
2283 rm -f conftest*
2284 fi
2285 rm -f conftest*
2286   ac_cv_prog_CPP="$CPP"
2287   CPP="$ac_cv_prog_CPP"
2288 else
2289   ac_cv_prog_CPP="$CPP"
2290 fi
2291 echo "$ac_t""$CPP" 1>&6
2292
2293
2294 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2295 echo "configure:2296: checking for AIX" >&5
2296 cat > conftest.$ac_ext <<EOF
2297 #line 2298 "configure"
2298 #include "confdefs.h"
2299 #ifdef _AIX
2300   yes
2301 #endif
2302
2303 EOF
2304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2305   egrep "yes" >/dev/null 2>&1; then
2306   rm -rf conftest*
2307   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2308     Defining _ALL_SOURCE
2309 EOF
2310 cat >> confdefs.h <<\EOF
2311 #define _ALL_SOURCE 1
2312 EOF
2313 }
2314
2315 else
2316   rm -rf conftest*
2317   echo "$ac_t""no" 1>&6
2318 fi
2319 rm -f conftest*
2320
2321
2322
2323 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2324 echo "configure:2325: checking for GNU libc" >&5
2325 cat > conftest.$ac_ext <<EOF
2326 #line 2327 "configure"
2327 #include "confdefs.h"
2328 #include <features.h>
2329 int main() {
2330
2331 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2332 #error Not a GNU libc system :-(
2333 ******* ======= ******** &&&&&&&&
2334 #endif
2335
2336 ; return 0; }
2337 EOF
2338 if { (eval echo configure:2339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2339   rm -rf conftest*
2340   have_glibc=yes
2341 else
2342   echo "configure: failed program was:" >&5
2343   cat conftest.$ac_ext >&5
2344   rm -rf conftest*
2345   have_glibc=no
2346 fi
2347 rm -f conftest*
2348 echo "$ac_t""$have_glibc" 1>&6
2349 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2350     Defining _GNU_SOURCE
2351 EOF
2352 cat >> confdefs.h <<\EOF
2353 #define _GNU_SOURCE 1
2354 EOF
2355 }
2356
2357
2358
2359 cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 int main () {
2363 #if defined __SUNPRO_C
2364 return 11;
2365 #elif defined __DECC
2366 return 12;
2367 #else
2368 return 0;
2369 #endif
2370 }
2371 EOF
2372 if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2373 then
2374   :
2375 else
2376   conftest_rc="$?"
2377   echo "configure: failed program was:" >&5
2378   cat conftest.$ac_ext >&5
2379   rm -fr conftest*
2380   case "$conftest_rc" in
2381   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2382   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2383 esac
2384 fi
2385 rm -fr conftest*
2386
2387
2388
2389
2390 echo "Extracting information from the machine- and system-dependent headers..."
2391
2392 tempcname="conftest.c"
2393
2394
2395
2396 cat > $tempcname <<EOF
2397 #define NOT_C_CODE
2398 #define C_SWITCH_SITE
2399 #define C_SWITCH_X_SITE
2400 #define LD_SWITCH_SITE
2401 #define LD_SWITCH_X_SITE
2402 #define LD_SWITCH_X_SITE_AUX
2403 #define OS_RELEASE $os_release
2404 #include "$srcdir/src/$opsysfile"
2405 #include "$srcdir/src/$machfile"
2406
2407 #ifndef LIBS_MACHINE
2408 #define LIBS_MACHINE
2409 #endif
2410 configure___ libs_machine=LIBS_MACHINE
2411
2412 #ifndef LIBS_SYSTEM
2413 #define LIBS_SYSTEM
2414 #endif
2415 configure___ libs_system=LIBS_SYSTEM
2416
2417 #ifndef LIBS_TERMCAP
2418 #define LIBS_TERMCAP
2419 #endif
2420 configure___ libs_termcap=LIBS_TERMCAP
2421
2422 #ifndef LIB_STANDARD
2423 #define LIB_STANDARD
2424 #endif
2425 configure___ libs_standard=LIB_STANDARD
2426
2427
2428 #ifndef OBJECTS_MACHINE
2429 #define OBJECTS_MACHINE
2430 #endif
2431 configure___ objects_machine=OBJECTS_MACHINE
2432
2433 #ifndef OBJECTS_SYSTEM
2434 #define OBJECTS_SYSTEM
2435 #endif
2436 configure___ objects_system=OBJECTS_SYSTEM
2437
2438
2439 #ifndef C_SWITCH_MACHINE
2440 #define C_SWITCH_MACHINE
2441 #endif
2442 configure___ c_switch_machine=C_SWITCH_MACHINE
2443
2444 #ifndef C_SWITCH_SYSTEM
2445 #define C_SWITCH_SYSTEM
2446 #endif
2447 configure___ c_switch_system=C_SWITCH_SYSTEM
2448
2449
2450 #ifndef LD_SWITCH_MACHINE
2451 #define LD_SWITCH_MACHINE
2452 #endif
2453 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2454
2455 #ifndef LD_SWITCH_SYSTEM
2456 #define LD_SWITCH_SYSTEM
2457 #endif
2458 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2459
2460
2461 #ifndef UNEXEC
2462 #define UNEXEC "unexec.o"
2463 #endif
2464 configure___ unexec=UNEXEC
2465
2466
2467 #ifndef LD_SWITCH_SHARED
2468 #define LD_SWITCH_SHARED "-c"
2469 #endif
2470 configure___ ld_switch_shared=LD_SWITCH_SHARED
2471
2472
2473 #ifdef ORDINARY_LINK
2474 #define LD "\$(CC) \$(CFLAGS)"
2475 #else /* no ORDINARY LINK */
2476 #ifdef COFF_ENCAPSULATE
2477 #define LD "\$(CC) -nostdlib"
2478 #else /* not COFF_ENCAPSULATE */
2479 #ifdef LINKER
2480 #define LD LINKER
2481 #else /* ! defined (LINKER) */
2482 #define LD "ld"
2483 #endif /* ! defined (LINKER) */
2484 #endif /* ! defined (COFF_ENCAPSULATE) */
2485 #endif /* not ORDINARY_LINK */
2486 configure___ ld=LD
2487
2488 #ifndef LIB_GCC
2489 #define LIB_GCC
2490 #endif
2491 configure___ lib_gcc=LIB_GCC
2492
2493 #ifndef LD_TEXT_START_ADDR
2494 #define LD_TEXT_START_ADDR
2495 #endif
2496 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2497
2498
2499 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2500 #ifdef NO_REMAP
2501 #ifdef COFF_ENCAPSULATE
2502 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2503 #else /* ! defined (COFF_ENCAPSULATE) */
2504 #define START_FILES "pre-crt0.o /lib/crt0.o"
2505 #endif /* ! defined (COFF_ENCAPSULATE) */
2506 #else /* ! defined (NO_REMAP) */
2507 #define START_FILES "ecrt0.o"
2508 #endif /* ! defined (NO_REMAP) */
2509 #endif /* no ORDINARY_LINK */
2510 #ifndef START_FILES
2511 #define START_FILES
2512 #endif
2513 configure___ start_files=START_FILES
2514
2515 #ifdef ORDINARY_LINK
2516 configure___ ordinary_link=yes
2517 #else
2518 configure___ ordinary_link=no
2519 #endif
2520
2521 #ifdef SYSTEM_MALLOC
2522 configure___ system_malloc=yes
2523 #else
2524 configure___ system_malloc=no
2525 #endif
2526
2527 #ifdef TERMINFO
2528 configure___ have_terminfo=yes
2529 #else
2530 configure___ have_terminfo=no
2531 #endif
2532
2533 #ifdef MAIL_USE_FLOCK
2534 configure___ mail_use_flock=yes
2535 #else
2536 configure___ mail_use_flock=no
2537 #endif
2538
2539 #ifdef MAIL_USE_LOCKF
2540 configure___ mail_use_lockf=yes
2541 #else
2542 configure___ mail_use_lockf=no
2543 #endif
2544
2545 #ifdef HAVE_WIN32_PROCESSES
2546 configure___ win32_processes=yes
2547 #else
2548 configure___ win32_processes=no
2549 #endif
2550
2551 EOF
2552
2553 CPP=`eval "echo $CPP $CPPFLAGS"`
2554 eval `$CPP -Isrc $tempcname \
2555         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2556
2557 rm $tempcname
2558
2559 test "$extra_verbose" = "yes" && \
2560   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 ""
2561
2562 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2563
2564 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2565
2566 if test "$cflags_specified" = "no"; then
2567       if   test "$GCC" = "yes"; then
2568     CFLAGS="-g -O3 -Wall -Wno-switch"
2569               elif test "$__SUNPRO_C" = "yes"; then
2570     case "$opsys" in
2571       sol2    ) CFLAGS="-v -xO4" ;;
2572       sunos4* ) CFLAGS="-xO2";;
2573     esac
2574   elif test "$__DECC" = "yes"; then
2575     CFLAGS="-O3"
2576   elif test "$CC" = "xlc"; then
2577     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2578     else
2579     CFLAGS="-O" ;  fi
2580 fi
2581
2582
2583 if test "$GCC" = "yes"; then
2584   set x $ld_switch_system; shift; ld_switch_system=""
2585   while test -n "$1"; do
2586     case $1 in
2587       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2588       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2589       -Xlinker* ) ;;
2590       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2591     esac
2592     shift
2593   done
2594 fi
2595
2596 if test "$GCC" = "yes"; then
2597   set x $ld_switch_machine; shift; ld_switch_machine=""
2598   while test -n "$1"; do
2599     case $1 in
2600       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2601       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2602       -Xlinker* ) ;;
2603       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2604     esac
2605     shift
2606   done
2607 fi
2608
2609 if test "$GCC" = "yes"; then
2610   set x $LDFLAGS; shift; LDFLAGS=""
2611   while test -n "$1"; do
2612     case $1 in
2613       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2614       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2615       -Xlinker* ) ;;
2616       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2617     esac
2618     shift
2619   done
2620 fi
2621
2622 if test "$GCC" = "yes"; then
2623   set x $ld_call_shared; shift; ld_call_shared=""
2624   while test -n "$1"; do
2625     case $1 in
2626       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2627       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2628       -Xlinker* ) ;;
2629       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2630     esac
2631     shift
2632   done
2633 fi
2634
2635 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2636    echo "    xemacs will be linked with \"$objects_machine\""
2637  fi
2638 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2639    echo "    xemacs will be linked with \"$objects_system\""
2640  fi
2641 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2642    echo "    xemacs will be linked with \"$unexec\""
2643  fi
2644
2645 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2646 echo "configure:2647: checking for dynodump" >&5
2647 if test "$unexec" != "unexsol2.o"; then
2648   echo "$ac_t""no" 1>&6
2649 else
2650   echo "$ac_t""yes" 1>&6
2651   { test "$extra_verbose" = "yes" && cat << \EOF
2652     Defining DYNODUMP
2653 EOF
2654 cat >> confdefs.h <<\EOF
2655 #define DYNODUMP 1
2656 EOF
2657 }
2658
2659   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2660   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2661   case "$machine" in
2662     sparc   ) dynodump_arch=sparc ;;
2663     *86*    ) dynodump_arch=i386  ;;
2664     powerpc ) dynodump_arch=ppc   ;;
2665   esac
2666     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
2667 fi
2668
2669
2670 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2671
2672 if test "$unexec" = "unexaix.o"; then
2673   if   test "$dynamic" = "no"; then
2674   start_flags="-Wl,-bnso,-bnodelcsect"
2675   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2676   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2677     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2678   done
2679   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2680     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2681   done
2682   
2683 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2684 echo "configure:2685: checking for terminateAndUnload in -lC" >&5
2685 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2686
2687 xe_check_libs=" -lC "
2688 cat > conftest.$ac_ext <<EOF
2689 #line 2690 "configure"
2690 #include "confdefs.h"
2691 /* Override any gcc2 internal prototype to avoid an error.  */
2692 /* We use char because int might match the return type of a gcc2
2693     builtin and then its argument prototype would still apply.  */
2694 char terminateAndUnload();
2695
2696 int main() {
2697 terminateAndUnload()
2698 ; return 0; }
2699 EOF
2700 if { (eval echo configure:2701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2701   rm -rf conftest*
2702   eval "ac_cv_lib_$ac_lib_var=yes"
2703 else
2704   echo "configure: failed program was:" >&5
2705   cat conftest.$ac_ext >&5
2706   rm -rf conftest*
2707   eval "ac_cv_lib_$ac_lib_var=no"
2708 fi
2709 rm -f conftest*
2710 xe_check_libs=""
2711
2712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2713   echo "$ac_t""yes" 1>&6
2714   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2715 else
2716   echo "$ac_t""no" 1>&6
2717 fi
2718
2719
2720   fi
2721 elif test -n "$ld_text_start_addr"; then
2722   start_flags="-T $ld_text_start_addr -e __start"
2723 fi
2724
2725
2726
2727
2728 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2729  test -z "$linker" &&  linker='$(CC) -nostdlib'
2730  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2731 fi
2732 test "$GCC" != "yes" && lib_gcc=
2733
2734
2735
2736
2737
2738 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2739 if test -n "$site_libraries"; then
2740   for arg in $site_libraries; do
2741     case "$arg" in
2742      -* ) ;;
2743      * ) test -d "$arg" || \
2744            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2745        arg="-L${arg}" ;;
2746     esac
2747     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2748   done
2749 fi
2750
2751 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2752 if test -n "$site_includes"; then
2753   for arg in $site_includes; do
2754     case "$arg" in
2755       -* ) ;;
2756       * ) test -d "$arg" || \
2757            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2758       arg="-I${arg}" ;;
2759     esac
2760     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2761   done
2762 fi
2763
2764 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2765 if test -n "$site_prefixes"; then
2766   for dir in $site_prefixes; do
2767     lib_dir="${dir}/lib"
2768     inc_dir="${dir}/include"
2769     if test ! -d "$dir"; then
2770       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2771     elif test ! -d "$lib_dir"; then
2772       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2773     else
2774       if test -d "$inc_dir"; then
2775         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
2776       fi
2777       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
2778     fi
2779   done
2780 fi
2781
2782
2783 for dir in "/usr/ccs/lib"; do
2784   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
2785 done
2786
2787 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2788 if test -n "$site_runtime_libraries"; then
2789   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2790   export LD_RUN_PATH
2791 fi
2792
2793
2794 if   test "$dynamic" = "no"; then add_runtime_path=no
2795 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2796 else case "$opsys" in
2797        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2798        * ) add_runtime_path=no ;;
2799      esac
2800 fi
2801
2802 if test "$add_runtime_path" = "yes"; then
2803       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2804 echo "configure:2805: checking "for runtime libraries flag"" >&5
2805   case "$opsys" in
2806     sol2 ) dash_r="-R" ;;
2807     decosf* | linux* | irix*) dash_r="-rpath " ;;
2808     *)
2809       dash_r=""
2810       for try_dash_r in "-R" "-R " "-rpath "; do
2811         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2812         
2813 if test "$GCC" = "yes"; then
2814   set x $xe_check_libs; shift; xe_check_libs=""
2815   while test -n "$1"; do
2816     case $1 in
2817       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2818       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2819       -Xlinker* ) ;;
2820       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2821     esac
2822     shift
2823   done
2824 fi
2825         cat > conftest.$ac_ext <<EOF
2826 #line 2827 "configure"
2827 #include "confdefs.h"
2828
2829 int main() {
2830
2831 ; return 0; }
2832 EOF
2833 if { (eval echo configure:2834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2834   rm -rf conftest*
2835   dash_r="$try_dash_r"
2836 else
2837   echo "configure: failed program was:" >&5
2838   cat conftest.$ac_ext >&5
2839 fi
2840 rm -f conftest*
2841         xe_check_libs=""
2842         test -n "$dash_r" && break
2843       done ;;
2844   esac
2845   if test -n "$dash_r";
2846     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2847     else echo "$ac_t""NONE" 1>&6
2848   fi
2849 fi
2850
2851 xe_add_unique_runpath_dir='
2852   xe_add_p=yes
2853   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2854   done
2855   if test "$xe_add_p" = "yes"; then
2856     test -n "$runpath" && runpath="${runpath}:"
2857     runpath="${runpath}${xe_runpath_dir}"
2858     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2859   fi'
2860
2861
2862
2863
2864 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2865     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2866   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2867   
2868         runpath="" runpath_dirs=""
2869   if test -n "$LD_RUN_PATH"; then
2870     runpath="$LD_RUN_PATH"
2871   elif test "$GCC" = "yes"; then
2872         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2873     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2874     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2875     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2876       case "$arg" in P,* | -L* | -R* )
2877         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2878           {
2879 xe_runpath_dir="$dir"
2880   test "$xe_runpath_dir" != "/lib"     -a \
2881         "$xe_runpath_dir" != "/usr/lib" -a \
2882         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2883   eval "$xe_add_unique_runpath_dir"
2884 }
2885         done ;;
2886       esac
2887     done
2888     ld_switch_run="$ld_switch_run_save"
2889     rm -f conftest*
2890   else
2891         for arg in $ld_switch_site $ld_switch_x_site; do
2892       case "$arg" in -L*) {
2893 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2894   test "$xe_runpath_dir" != "/lib"     -a \
2895         "$xe_runpath_dir" != "/usr/lib" -a \
2896         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2897   eval "$xe_add_unique_runpath_dir"
2898 };; esac
2899     done
2900         if test "$opsys $need_motif" = "sol2 yes"; then
2901       xe_runpath_dir="/opt/SUNWdt/lib";
2902       eval "$xe_add_unique_runpath_dir";
2903     fi
2904   fi 
2905   if test -n "$runpath"; then
2906     ld_switch_run="${dash_r}${runpath}"
2907     
2908 if test "$GCC" = "yes"; then
2909   set x $ld_switch_run; shift; ld_switch_run=""
2910   while test -n "$1"; do
2911     case $1 in
2912       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2913       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2914       -Xlinker* ) ;;
2915       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2916     esac
2917     shift
2918   done
2919 fi
2920     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2921   fi
2922 fi
2923
2924
2925
2926
2927 GNU_MALLOC=yes
2928 if test "$with_dlmalloc" != "no"; then
2929         doug_lea_malloc=yes
2930 else
2931         doug_lea_malloc=no
2932 fi
2933 after_morecore_hook_exists=yes
2934 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2935 echo "configure:2936: checking for malloc_get_state" >&5
2936
2937 cat > conftest.$ac_ext <<EOF
2938 #line 2939 "configure"
2939 #include "confdefs.h"
2940 /* System header to define __stub macros and hopefully few prototypes,
2941     which can conflict with char malloc_get_state(); below.  */
2942 #include <assert.h>
2943 /* Override any gcc2 internal prototype to avoid an error.  */
2944 /* We use char because int might match the return type of a gcc2
2945     builtin and then its argument prototype would still apply.  */
2946 char malloc_get_state();
2947
2948 int main() {
2949
2950 /* The GNU C library defines this for functions which it implements
2951     to always fail with ENOSYS.  Some functions are actually named
2952     something starting with __ and the normal name is an alias.  */
2953 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2954 choke me
2955 #else
2956 malloc_get_state();
2957 #endif
2958
2959 ; return 0; }
2960 EOF
2961 if { (eval echo configure:2962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2962   rm -rf conftest*
2963   eval "ac_cv_func_malloc_get_state=yes"
2964 else
2965   echo "configure: failed program was:" >&5
2966   cat conftest.$ac_ext >&5
2967   rm -rf conftest*
2968   eval "ac_cv_func_malloc_get_state=no"
2969 fi
2970 rm -f conftest*
2971
2972 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2973   echo "$ac_t""yes" 1>&6
2974   :
2975 else
2976   echo "$ac_t""no" 1>&6
2977 doug_lea_malloc=no
2978 fi
2979
2980 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2981 echo "configure:2982: checking for malloc_set_state" >&5
2982
2983 cat > conftest.$ac_ext <<EOF
2984 #line 2985 "configure"
2985 #include "confdefs.h"
2986 /* System header to define __stub macros and hopefully few prototypes,
2987     which can conflict with char malloc_set_state(); below.  */
2988 #include <assert.h>
2989 /* Override any gcc2 internal prototype to avoid an error.  */
2990 /* We use char because int might match the return type of a gcc2
2991     builtin and then its argument prototype would still apply.  */
2992 char malloc_set_state();
2993
2994 int main() {
2995
2996 /* The GNU C library defines this for functions which it implements
2997     to always fail with ENOSYS.  Some functions are actually named
2998     something starting with __ and the normal name is an alias.  */
2999 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3000 choke me
3001 #else
3002 malloc_set_state();
3003 #endif
3004
3005 ; return 0; }
3006 EOF
3007 if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3008   rm -rf conftest*
3009   eval "ac_cv_func_malloc_set_state=yes"
3010 else
3011   echo "configure: failed program was:" >&5
3012   cat conftest.$ac_ext >&5
3013   rm -rf conftest*
3014   eval "ac_cv_func_malloc_set_state=no"
3015 fi
3016 rm -f conftest*
3017
3018 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3019   echo "$ac_t""yes" 1>&6
3020   :
3021 else
3022   echo "$ac_t""no" 1>&6
3023 doug_lea_malloc=no
3024 fi
3025
3026 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3027 echo "configure:3028: checking whether __after_morecore_hook exists" >&5
3028 cat > conftest.$ac_ext <<EOF
3029 #line 3030 "configure"
3030 #include "confdefs.h"
3031 extern void (* __after_morecore_hook)();
3032 int main() {
3033 __after_morecore_hook = 0
3034 ; return 0; }
3035 EOF
3036 if { (eval echo configure:3037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3037   rm -rf conftest*
3038   echo "$ac_t""yes" 1>&6
3039 else
3040   echo "configure: failed program was:" >&5
3041   cat conftest.$ac_ext >&5
3042   rm -rf conftest*
3043   echo "$ac_t""no" 1>&6
3044    after_morecore_hook_exists=no
3045 fi
3046 rm -f conftest*
3047 if test "$system_malloc" = "yes" ; then
3048   GNU_MALLOC=no
3049   GNU_MALLOC_reason="
3050   (The GNU allocators don't work with this system configuration)."
3051 elif test "$with_system_malloc" = "yes" ; then
3052   GNU_MALLOC=no
3053   GNU_MALLOC_reason="
3054   (User chose not to use GNU allocators)."
3055 elif test "$with_debug_malloc" = "yes" ; then
3056   GNU_MALLOC=no
3057   GNU_MALLOC_reason="
3058   (User chose to use Debugging Malloc)."
3059 fi
3060
3061 if test "$doug_lea_malloc" = "yes" ; then
3062   if test "$GNU_MALLOC" = yes ; then
3063     GNU_MALLOC_reason="
3064   (Using Doug Lea's new malloc from the GNU C Library.)"
3065   fi
3066   { test "$extra_verbose" = "yes" && cat << \EOF
3067     Defining DOUG_LEA_MALLOC
3068 EOF
3069 cat >> confdefs.h <<\EOF
3070 #define DOUG_LEA_MALLOC 1
3071 EOF
3072 }
3073
3074   if test "$after_morecore_hook_exists" = "no" ; then
3075     GNU_MALLOC_reason="
3076   (Using Doug Lea's new malloc from the Linux C Library.)"
3077     { test "$extra_verbose" = "yes" && cat << \EOF
3078     Defining _NO_MALLOC_WARNING_
3079 EOF
3080 cat >> confdefs.h <<\EOF
3081 #define _NO_MALLOC_WARNING_ 1
3082 EOF
3083 }
3084
3085   fi
3086   use_minimal_tagbits=yes
3087 fi
3088
3089
3090
3091
3092 # Extract the first word of "ranlib", so it can be a program name with args.
3093 set dummy ranlib; ac_word=$2
3094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3095 echo "configure:3096: checking for $ac_word" >&5
3096
3097 if test -n "$RANLIB"; then
3098   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3099 else
3100   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3101   ac_dummy="$PATH"
3102   for ac_dir in $ac_dummy; do
3103     test -z "$ac_dir" && ac_dir=.
3104     if test -f $ac_dir/$ac_word; then
3105       ac_cv_prog_RANLIB="ranlib"
3106       break
3107     fi
3108   done
3109   IFS="$ac_save_ifs"
3110   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3111 fi
3112 RANLIB="$ac_cv_prog_RANLIB"
3113 if test -n "$RANLIB"; then
3114   echo "$ac_t""$RANLIB" 1>&6
3115 else
3116   echo "$ac_t""no" 1>&6
3117 fi
3118
3119 ac_aux_dir=
3120 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3121   if test -f $ac_dir/install-sh; then
3122     ac_aux_dir=$ac_dir
3123     ac_install_sh="$ac_aux_dir/install-sh -c"
3124     break
3125   elif test -f $ac_dir/install.sh; then
3126     ac_aux_dir=$ac_dir
3127     ac_install_sh="$ac_aux_dir/install.sh -c"
3128     break
3129   fi
3130 done
3131 if test -z "$ac_aux_dir"; then
3132   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3133 fi
3134 ac_config_guess=$ac_aux_dir/config.guess
3135 ac_config_sub=$ac_aux_dir/config.sub
3136 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3137
3138 # Find a good install program.  We prefer a C program (faster),
3139 # so one script is as good as another.  But avoid the broken or
3140 # incompatible versions:
3141 # SysV /etc/install, /usr/sbin/install
3142 # SunOS /usr/etc/install
3143 # IRIX /sbin/install
3144 # AIX /bin/install
3145 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3146 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3147 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3148 # ./install, which can be erroneously created by make from ./install.sh.
3149 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3150 echo "configure:3151: checking for a BSD compatible install" >&5
3151 if test -z "$INSTALL"; then
3152
3153   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3154   for ac_dir in $PATH; do
3155     # Account for people who put trailing slashes in PATH elements.
3156     case "$ac_dir/" in
3157     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3158     *)
3159       # OSF1 and SCO ODT 3.0 have their own names for install.
3160       # Don't use installbsd from OSF since it installs stuff as root
3161       # by default.
3162       for ac_prog in ginstall scoinst install; do
3163         if test -f $ac_dir/$ac_prog; then
3164           if test $ac_prog = install &&
3165             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3166             # AIX install.  It has an incompatible calling convention.
3167             :
3168           else
3169             ac_cv_path_install="$ac_dir/$ac_prog -c"
3170             break 2
3171           fi
3172         fi
3173       done
3174       ;;
3175     esac
3176   done
3177   IFS="$ac_save_IFS"
3178
3179   if test "${ac_cv_path_install+set}" = set; then
3180     INSTALL="$ac_cv_path_install"
3181   else
3182     # As a last resort, use the slow shell script.  We don't cache a
3183     # path for INSTALL within a source directory, because that will
3184     # break other packages using the cache if that directory is
3185     # removed, or if the path is relative.
3186     INSTALL="$ac_install_sh"
3187   fi
3188 fi
3189 echo "$ac_t""$INSTALL" 1>&6
3190
3191 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3192 # It thinks the first close brace ends the variable substitution.
3193 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3194
3195 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3196
3197 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3198
3199 for ac_prog in 'bison -y' byacc
3200 do
3201 # Extract the first word of "$ac_prog", so it can be a program name with args.
3202 set dummy $ac_prog; ac_word=$2
3203 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3204 echo "configure:3205: checking for $ac_word" >&5
3205
3206 if test -n "$YACC"; then
3207   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3208 else
3209   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3210   ac_dummy="$PATH"
3211   for ac_dir in $ac_dummy; do
3212     test -z "$ac_dir" && ac_dir=.
3213     if test -f $ac_dir/$ac_word; then
3214       ac_cv_prog_YACC="$ac_prog"
3215       break
3216     fi
3217   done
3218   IFS="$ac_save_ifs"
3219 fi
3220 YACC="$ac_cv_prog_YACC"
3221 if test -n "$YACC"; then
3222   echo "$ac_t""$YACC" 1>&6
3223 else
3224   echo "$ac_t""no" 1>&6
3225 fi
3226
3227 test -n "$YACC" && break
3228 done
3229 test -n "$YACC" || YACC="yacc"
3230
3231
3232 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3233 do
3234 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3235 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3236 echo "configure:3237: checking for $ac_hdr" >&5
3237
3238 cat > conftest.$ac_ext <<EOF
3239 #line 3240 "configure"
3240 #include "confdefs.h"
3241 #include <$ac_hdr>
3242 EOF
3243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3244 { (eval echo configure:3245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3246 if test -z "$ac_err"; then
3247   rm -rf conftest*
3248   eval "ac_cv_header_$ac_safe=yes"
3249 else
3250   echo "$ac_err" >&5
3251   echo "configure: failed program was:" >&5
3252   cat conftest.$ac_ext >&5
3253   rm -rf conftest*
3254   eval "ac_cv_header_$ac_safe=no"
3255 fi
3256 rm -f conftest*
3257 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3258   echo "$ac_t""yes" 1>&6
3259     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3260   { test "$extra_verbose" = "yes" && cat << EOF
3261     Defining $ac_tr_hdr
3262 EOF
3263 cat >> confdefs.h <<EOF
3264 #define $ac_tr_hdr 1
3265 EOF
3266 }
3267  
3268 else
3269   echo "$ac_t""no" 1>&6
3270 fi
3271 done
3272
3273 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3274 do
3275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3276 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3277 echo "configure:3278: checking for $ac_hdr" >&5
3278
3279 cat > conftest.$ac_ext <<EOF
3280 #line 3281 "configure"
3281 #include "confdefs.h"
3282 #include <$ac_hdr>
3283 EOF
3284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3285 { (eval echo configure:3286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3287 if test -z "$ac_err"; then
3288   rm -rf conftest*
3289   eval "ac_cv_header_$ac_safe=yes"
3290 else
3291   echo "$ac_err" >&5
3292   echo "configure: failed program was:" >&5
3293   cat conftest.$ac_ext >&5
3294   rm -rf conftest*
3295   eval "ac_cv_header_$ac_safe=no"
3296 fi
3297 rm -f conftest*
3298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3299   echo "$ac_t""yes" 1>&6
3300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3301   { test "$extra_verbose" = "yes" && cat << EOF
3302     Defining $ac_tr_hdr
3303 EOF
3304 cat >> confdefs.h <<EOF
3305 #define $ac_tr_hdr 1
3306 EOF
3307 }
3308  
3309 else
3310   echo "$ac_t""no" 1>&6
3311 fi
3312 done
3313
3314 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3315 do
3316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3318 echo "configure:3319: checking for $ac_hdr" >&5
3319
3320 cat > conftest.$ac_ext <<EOF
3321 #line 3322 "configure"
3322 #include "confdefs.h"
3323 #include <$ac_hdr>
3324 EOF
3325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3326 { (eval echo configure:3327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3328 if test -z "$ac_err"; then
3329   rm -rf conftest*
3330   eval "ac_cv_header_$ac_safe=yes"
3331 else
3332   echo "$ac_err" >&5
3333   echo "configure: failed program was:" >&5
3334   cat conftest.$ac_ext >&5
3335   rm -rf conftest*
3336   eval "ac_cv_header_$ac_safe=no"
3337 fi
3338 rm -f conftest*
3339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3340   echo "$ac_t""yes" 1>&6
3341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3342   { test "$extra_verbose" = "yes" && cat << EOF
3343     Defining $ac_tr_hdr
3344 EOF
3345 cat >> confdefs.h <<EOF
3346 #define $ac_tr_hdr 1
3347 EOF
3348 }
3349  
3350 else
3351   echo "$ac_t""no" 1>&6
3352 fi
3353 done
3354
3355 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3356 echo "configure:3357: checking for sys/wait.h that is POSIX.1 compatible" >&5
3357
3358 cat > conftest.$ac_ext <<EOF
3359 #line 3360 "configure"
3360 #include "confdefs.h"
3361 #include <sys/types.h>
3362 #include <sys/wait.h>
3363 #ifndef WEXITSTATUS
3364 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3365 #endif
3366 #ifndef WIFEXITED
3367 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3368 #endif
3369 int main() {
3370 int s;
3371 wait (&s);
3372 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3373 ; return 0; }
3374 EOF
3375 if { (eval echo configure:3376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3376   rm -rf conftest*
3377   ac_cv_header_sys_wait_h=yes
3378 else
3379   echo "configure: failed program was:" >&5
3380   cat conftest.$ac_ext >&5
3381   rm -rf conftest*
3382   ac_cv_header_sys_wait_h=no
3383 fi
3384 rm -f conftest*
3385
3386 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3387 if test $ac_cv_header_sys_wait_h = yes; then
3388   { test "$extra_verbose" = "yes" && cat << \EOF
3389     Defining HAVE_SYS_WAIT_H
3390 EOF
3391 cat >> confdefs.h <<\EOF
3392 #define HAVE_SYS_WAIT_H 1
3393 EOF
3394 }
3395
3396 fi
3397
3398 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3399 echo "configure:3400: checking for ANSI C header files" >&5
3400
3401 cat > conftest.$ac_ext <<EOF
3402 #line 3403 "configure"
3403 #include "confdefs.h"
3404 #include <stdlib.h>
3405 #include <stdarg.h>
3406 #include <string.h>
3407 #include <float.h>
3408 EOF
3409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3410 { (eval echo configure:3411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3412 if test -z "$ac_err"; then
3413   rm -rf conftest*
3414   ac_cv_header_stdc=yes
3415 else
3416   echo "$ac_err" >&5
3417   echo "configure: failed program was:" >&5
3418   cat conftest.$ac_ext >&5
3419   rm -rf conftest*
3420   ac_cv_header_stdc=no
3421 fi
3422 rm -f conftest*
3423
3424 if test $ac_cv_header_stdc = yes; then
3425   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3426 cat > conftest.$ac_ext <<EOF
3427 #line 3428 "configure"
3428 #include "confdefs.h"
3429 #include <string.h>
3430 EOF
3431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3432   egrep "memchr" >/dev/null 2>&1; then
3433   :
3434 else
3435   rm -rf conftest*
3436   ac_cv_header_stdc=no
3437 fi
3438 rm -f conftest*
3439
3440 fi
3441
3442 if test $ac_cv_header_stdc = yes; then
3443   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3444 cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3447 #include <stdlib.h>
3448 EOF
3449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3450   egrep "free" >/dev/null 2>&1; then
3451   :
3452 else
3453   rm -rf conftest*
3454   ac_cv_header_stdc=no
3455 fi
3456 rm -f conftest*
3457
3458 fi
3459
3460 if test $ac_cv_header_stdc = yes; then
3461   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3462 cat > conftest.$ac_ext <<EOF
3463 #line 3464 "configure"
3464 #include "confdefs.h"
3465 #include <ctype.h>
3466 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3467 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3468 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3469 int main () { int i; for (i = 0; i < 256; i++)
3470 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3471 exit (0); }
3472
3473 EOF
3474 if { (eval echo configure:3475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3475 then
3476   :
3477 else
3478   conftest_rc="$?"
3479   echo "configure: failed program was:" >&5
3480   cat conftest.$ac_ext >&5
3481   rm -fr conftest*
3482   ac_cv_header_stdc=no
3483 fi
3484 rm -fr conftest*
3485 fi
3486
3487 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3488 if test $ac_cv_header_stdc = yes; then
3489   { test "$extra_verbose" = "yes" && cat << \EOF
3490     Defining STDC_HEADERS
3491 EOF
3492 cat >> confdefs.h <<\EOF
3493 #define STDC_HEADERS 1
3494 EOF
3495 }
3496
3497 fi
3498
3499 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3500 echo "configure:3501: checking whether time.h and sys/time.h may both be included" >&5
3501
3502 cat > conftest.$ac_ext <<EOF
3503 #line 3504 "configure"
3504 #include "confdefs.h"
3505 #include <sys/types.h>
3506 #include <sys/time.h>
3507 #include <time.h>
3508 int main() {
3509 struct tm *tp;
3510 ; return 0; }
3511 EOF
3512 if { (eval echo configure:3513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3513   rm -rf conftest*
3514   ac_cv_header_time=yes
3515 else
3516   echo "configure: failed program was:" >&5
3517   cat conftest.$ac_ext >&5
3518   rm -rf conftest*
3519   ac_cv_header_time=no
3520 fi
3521 rm -f conftest*
3522
3523 echo "$ac_t""$ac_cv_header_time" 1>&6
3524 if test $ac_cv_header_time = yes; then
3525   { test "$extra_verbose" = "yes" && cat << \EOF
3526     Defining TIME_WITH_SYS_TIME
3527 EOF
3528 cat >> confdefs.h <<\EOF
3529 #define TIME_WITH_SYS_TIME 1
3530 EOF
3531 }
3532
3533 fi
3534
3535 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3536 echo "configure:3537: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3537
3538 cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541 #include <sys/types.h>
3542 #include <signal.h>
3543 /* NetBSD declares sys_siglist in unistd.h.  */
3544 #ifdef HAVE_UNISTD_H
3545 #include <unistd.h>
3546 #endif
3547 int main() {
3548 char *msg = *(sys_siglist + 1);
3549 ; return 0; }
3550 EOF
3551 if { (eval echo configure:3552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3552   rm -rf conftest*
3553   ac_cv_decl_sys_siglist=yes
3554 else
3555   echo "configure: failed program was:" >&5
3556   cat conftest.$ac_ext >&5
3557   rm -rf conftest*
3558   ac_cv_decl_sys_siglist=no
3559 fi
3560 rm -f conftest*
3561
3562 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3563 if test $ac_cv_decl_sys_siglist = yes; then
3564   { test "$extra_verbose" = "yes" && cat << \EOF
3565     Defining SYS_SIGLIST_DECLARED
3566 EOF
3567 cat >> confdefs.h <<\EOF
3568 #define SYS_SIGLIST_DECLARED 1
3569 EOF
3570 }
3571
3572 fi
3573
3574
3575 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3576 echo "configure:3577: checking for struct utimbuf" >&5
3577 cat > conftest.$ac_ext <<EOF
3578 #line 3579 "configure"
3579 #include "confdefs.h"
3580 #ifdef TIME_WITH_SYS_TIME
3581 #include <sys/time.h>
3582 #include <time.h>
3583 #else
3584 #ifdef HAVE_SYS_TIME_H
3585 #include <sys/time.h>
3586 #else
3587 #include <time.h>
3588 #endif
3589 #endif
3590 #ifdef HAVE_UTIME_H
3591 #include <utime.h>
3592 #endif
3593 int main() {
3594 static struct utimbuf x; x.actime = x.modtime;
3595 ; return 0; }
3596 EOF
3597 if { (eval echo configure:3598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3598   rm -rf conftest*
3599   echo "$ac_t""yes" 1>&6
3600    { test "$extra_verbose" = "yes" && cat << \EOF
3601     Defining HAVE_STRUCT_UTIMBUF
3602 EOF
3603 cat >> confdefs.h <<\EOF
3604 #define HAVE_STRUCT_UTIMBUF 1
3605 EOF
3606 }
3607
3608 else
3609   echo "configure: failed program was:" >&5
3610   cat conftest.$ac_ext >&5
3611   rm -rf conftest*
3612   echo "$ac_t""no" 1>&6
3613 fi
3614 rm -f conftest*
3615
3616 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3617 echo "configure:3618: checking return type of signal handlers" >&5
3618
3619 cat > conftest.$ac_ext <<EOF
3620 #line 3621 "configure"
3621 #include "confdefs.h"
3622 #include <sys/types.h>
3623 #include <signal.h>
3624 #ifdef signal
3625 #undef signal
3626 #endif
3627 #ifdef __cplusplus
3628 extern "C" void (*signal (int, void (*)(int)))(int);
3629 #else
3630 void (*signal ()) ();
3631 #endif
3632
3633 int main() {
3634 int i;
3635 ; return 0; }
3636 EOF
3637 if { (eval echo configure:3638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3638   rm -rf conftest*
3639   ac_cv_type_signal=void
3640 else
3641   echo "configure: failed program was:" >&5
3642   cat conftest.$ac_ext >&5
3643   rm -rf conftest*
3644   ac_cv_type_signal=int
3645 fi
3646 rm -f conftest*
3647
3648 echo "$ac_t""$ac_cv_type_signal" 1>&6
3649 { test "$extra_verbose" = "yes" && cat << EOF
3650     Defining RETSIGTYPE = $ac_cv_type_signal
3651 EOF
3652 cat >> confdefs.h <<EOF
3653 #define RETSIGTYPE $ac_cv_type_signal
3654 EOF
3655 }
3656
3657
3658 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3659 echo "configure:3660: checking for size_t" >&5
3660
3661 cat > conftest.$ac_ext <<EOF
3662 #line 3663 "configure"
3663 #include "confdefs.h"
3664 #include <sys/types.h>
3665 #if STDC_HEADERS
3666 #include <stdlib.h>
3667 #include <stddef.h>
3668 #endif
3669 EOF
3670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3671   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3672   rm -rf conftest*
3673   ac_cv_type_size_t=yes
3674 else
3675   rm -rf conftest*
3676   ac_cv_type_size_t=no
3677 fi
3678 rm -f conftest*
3679
3680 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3681 if test $ac_cv_type_size_t = no; then
3682   { test "$extra_verbose" = "yes" && cat << \EOF
3683     Defining size_t = unsigned
3684 EOF
3685 cat >> confdefs.h <<\EOF
3686 #define size_t unsigned
3687 EOF
3688 }
3689
3690 fi
3691
3692 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3693 echo "configure:3694: checking for pid_t" >&5
3694
3695 cat > conftest.$ac_ext <<EOF
3696 #line 3697 "configure"
3697 #include "confdefs.h"
3698 #include <sys/types.h>
3699 #if STDC_HEADERS
3700 #include <stdlib.h>
3701 #include <stddef.h>
3702 #endif
3703 EOF
3704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3705   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3706   rm -rf conftest*
3707   ac_cv_type_pid_t=yes
3708 else
3709   rm -rf conftest*
3710   ac_cv_type_pid_t=no
3711 fi
3712 rm -f conftest*
3713
3714 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3715 if test $ac_cv_type_pid_t = no; then
3716   { test "$extra_verbose" = "yes" && cat << \EOF
3717     Defining pid_t = int
3718 EOF
3719 cat >> confdefs.h <<\EOF
3720 #define pid_t int
3721 EOF
3722 }
3723
3724 fi
3725
3726 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3727 echo "configure:3728: checking for uid_t in sys/types.h" >&5
3728
3729 cat > conftest.$ac_ext <<EOF
3730 #line 3731 "configure"
3731 #include "confdefs.h"
3732 #include <sys/types.h>
3733 EOF
3734 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3735   egrep "uid_t" >/dev/null 2>&1; then
3736   rm -rf conftest*
3737   ac_cv_type_uid_t=yes
3738 else
3739   rm -rf conftest*
3740   ac_cv_type_uid_t=no
3741 fi
3742 rm -f conftest*
3743
3744
3745 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3746 if test $ac_cv_type_uid_t = no; then
3747   { test "$extra_verbose" = "yes" && cat << \EOF
3748     Defining uid_t = int
3749 EOF
3750 cat >> confdefs.h <<\EOF
3751 #define uid_t int
3752 EOF
3753 }
3754
3755   { test "$extra_verbose" = "yes" && cat << \EOF
3756     Defining gid_t = int
3757 EOF
3758 cat >> confdefs.h <<\EOF
3759 #define gid_t int
3760 EOF
3761 }
3762
3763 fi
3764
3765 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3766 echo "configure:3767: checking for mode_t" >&5
3767
3768 cat > conftest.$ac_ext <<EOF
3769 #line 3770 "configure"
3770 #include "confdefs.h"
3771 #include <sys/types.h>
3772 #if STDC_HEADERS
3773 #include <stdlib.h>
3774 #include <stddef.h>
3775 #endif
3776 EOF
3777 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3778   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3779   rm -rf conftest*
3780   ac_cv_type_mode_t=yes
3781 else
3782   rm -rf conftest*
3783   ac_cv_type_mode_t=no
3784 fi
3785 rm -f conftest*
3786
3787 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3788 if test $ac_cv_type_mode_t = no; then
3789   { test "$extra_verbose" = "yes" && cat << \EOF
3790     Defining mode_t = int
3791 EOF
3792 cat >> confdefs.h <<\EOF
3793 #define mode_t int
3794 EOF
3795 }
3796
3797 fi
3798
3799 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3800 echo "configure:3801: checking for off_t" >&5
3801
3802 cat > conftest.$ac_ext <<EOF
3803 #line 3804 "configure"
3804 #include "confdefs.h"
3805 #include <sys/types.h>
3806 #if STDC_HEADERS
3807 #include <stdlib.h>
3808 #include <stddef.h>
3809 #endif
3810 EOF
3811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3812   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3813   rm -rf conftest*
3814   ac_cv_type_off_t=yes
3815 else
3816   rm -rf conftest*
3817   ac_cv_type_off_t=no
3818 fi
3819 rm -f conftest*
3820
3821 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3822 if test $ac_cv_type_off_t = no; then
3823   { test "$extra_verbose" = "yes" && cat << \EOF
3824     Defining off_t = long
3825 EOF
3826 cat >> confdefs.h <<\EOF
3827 #define off_t long
3828 EOF
3829 }
3830
3831 fi
3832
3833 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3834 echo "configure:3835: checking for ssize_t" >&5
3835
3836 cat > conftest.$ac_ext <<EOF
3837 #line 3838 "configure"
3838 #include "confdefs.h"
3839 #include <sys/types.h>
3840 #if STDC_HEADERS
3841 #include <stdlib.h>
3842 #include <stddef.h>
3843 #endif
3844 EOF
3845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3846   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3847   rm -rf conftest*
3848   ac_cv_type_ssize_t=yes
3849 else
3850   rm -rf conftest*
3851   ac_cv_type_ssize_t=no
3852 fi
3853 rm -f conftest*
3854
3855 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3856 if test $ac_cv_type_ssize_t = no; then
3857   { test "$extra_verbose" = "yes" && cat << \EOF
3858     Defining ssize_t = int
3859 EOF
3860 cat >> confdefs.h <<\EOF
3861 #define ssize_t int
3862 EOF
3863 }
3864
3865 fi
3866
3867
3868 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3869 echo "configure:3870: checking for struct timeval" >&5
3870 cat > conftest.$ac_ext <<EOF
3871 #line 3872 "configure"
3872 #include "confdefs.h"
3873 #ifdef TIME_WITH_SYS_TIME
3874 #include <sys/time.h>
3875 #include <time.h>
3876 #else
3877 #ifdef HAVE_SYS_TIME_H
3878 #include <sys/time.h>
3879 #else
3880 #include <time.h>
3881 #endif
3882 #endif
3883 int main() {
3884 static struct timeval x; x.tv_sec = x.tv_usec;
3885 ; return 0; }
3886 EOF
3887 if { (eval echo configure:3888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3888   rm -rf conftest*
3889   echo "$ac_t""yes" 1>&6
3890   HAVE_TIMEVAL=yes
3891   { test "$extra_verbose" = "yes" && cat << \EOF
3892     Defining HAVE_TIMEVAL
3893 EOF
3894 cat >> confdefs.h <<\EOF
3895 #define HAVE_TIMEVAL 1
3896 EOF
3897 }
3898
3899 else
3900   echo "configure: failed program was:" >&5
3901   cat conftest.$ac_ext >&5
3902   rm -rf conftest*
3903   echo "$ac_t""no" 1>&6
3904    HAVE_TIMEVAL=no
3905 fi
3906 rm -f conftest*
3907
3908 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3909 echo "configure:3910: checking whether struct tm is in sys/time.h or time.h" >&5
3910
3911 cat > conftest.$ac_ext <<EOF
3912 #line 3913 "configure"
3913 #include "confdefs.h"
3914 #include <sys/types.h>
3915 #include <time.h>
3916 int main() {
3917 struct tm *tp; tp->tm_sec;
3918 ; return 0; }
3919 EOF
3920 if { (eval echo configure:3921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3921   rm -rf conftest*
3922   ac_cv_struct_tm=time.h
3923 else
3924   echo "configure: failed program was:" >&5
3925   cat conftest.$ac_ext >&5
3926   rm -rf conftest*
3927   ac_cv_struct_tm=sys/time.h
3928 fi
3929 rm -f conftest*
3930
3931 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3932 if test $ac_cv_struct_tm = sys/time.h; then
3933   { test "$extra_verbose" = "yes" && cat << \EOF
3934     Defining TM_IN_SYS_TIME
3935 EOF
3936 cat >> confdefs.h <<\EOF
3937 #define TM_IN_SYS_TIME 1
3938 EOF
3939 }
3940
3941 fi
3942
3943 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3944 echo "configure:3945: checking for tm_zone in struct tm" >&5
3945
3946 cat > conftest.$ac_ext <<EOF
3947 #line 3948 "configure"
3948 #include "confdefs.h"
3949 #include <sys/types.h>
3950 #include <$ac_cv_struct_tm>
3951 int main() {
3952 struct tm tm; tm.tm_zone;
3953 ; return 0; }
3954 EOF
3955 if { (eval echo configure:3956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3956   rm -rf conftest*
3957   ac_cv_struct_tm_zone=yes
3958 else
3959   echo "configure: failed program was:" >&5
3960   cat conftest.$ac_ext >&5
3961   rm -rf conftest*
3962   ac_cv_struct_tm_zone=no
3963 fi
3964 rm -f conftest*
3965
3966 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3967 if test "$ac_cv_struct_tm_zone" = yes; then
3968   { test "$extra_verbose" = "yes" && cat << \EOF
3969     Defining HAVE_TM_ZONE
3970 EOF
3971 cat >> confdefs.h <<\EOF
3972 #define HAVE_TM_ZONE 1
3973 EOF
3974 }
3975
3976 else
3977   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3978 echo "configure:3979: checking for tzname" >&5
3979
3980 cat > conftest.$ac_ext <<EOF
3981 #line 3982 "configure"
3982 #include "confdefs.h"
3983 #include <time.h>
3984 #ifndef tzname /* For SGI.  */
3985 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3986 #endif
3987 int main() {
3988 atoi(*tzname);
3989 ; return 0; }
3990 EOF
3991 if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3992   rm -rf conftest*
3993   ac_cv_var_tzname=yes
3994 else
3995   echo "configure: failed program was:" >&5
3996   cat conftest.$ac_ext >&5
3997   rm -rf conftest*
3998   ac_cv_var_tzname=no
3999 fi
4000 rm -f conftest*
4001
4002 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4003   if test $ac_cv_var_tzname = yes; then
4004     { test "$extra_verbose" = "yes" && cat << \EOF
4005     Defining HAVE_TZNAME
4006 EOF
4007 cat >> confdefs.h <<\EOF
4008 #define HAVE_TZNAME 1
4009 EOF
4010 }
4011
4012   fi
4013 fi
4014
4015
4016 echo $ac_n "checking for working const""... $ac_c" 1>&6
4017 echo "configure:4018: checking for working const" >&5
4018
4019 cat > conftest.$ac_ext <<EOF
4020 #line 4021 "configure"
4021 #include "confdefs.h"
4022
4023 int main() {
4024
4025 /* Ultrix mips cc rejects this.  */
4026 typedef int charset[2]; const charset x;
4027 /* SunOS 4.1.1 cc rejects this.  */
4028 char const *const *ccp;
4029 char **p;
4030 /* NEC SVR4.0.2 mips cc rejects this.  */
4031 struct point {int x, y;};
4032 static struct point const zero = {0,0};
4033 /* AIX XL C 1.02.0.0 rejects this.
4034    It does not let you subtract one const X* pointer from another in an arm
4035    of an if-expression whose if-part is not a constant expression */
4036 const char *g = "string";
4037 ccp = &g + (g ? g-g : 0);
4038 /* HPUX 7.0 cc rejects these. */
4039 ++ccp;
4040 p = (char**) ccp;
4041 ccp = (char const *const *) p;
4042 { /* SCO 3.2v4 cc rejects this.  */
4043   char *t;
4044   char const *s = 0 ? (char *) 0 : (char const *) 0;
4045
4046   *t++ = 0;
4047 }
4048 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4049   int x[] = {25, 17};
4050   const int *foo = &x[0];
4051   ++foo;
4052 }
4053 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4054   typedef const int *iptr;
4055   iptr p = 0;
4056   ++p;
4057 }
4058 { /* AIX XL C 1.02.0.0 rejects this saying
4059      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4060   struct s { int j; const int *ap[3]; };
4061   struct s *b; b->j = 5;
4062 }
4063 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4064   const int foo = 10;
4065 }
4066
4067 ; return 0; }
4068 EOF
4069 if { (eval echo configure:4070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4070   rm -rf conftest*
4071   ac_cv_c_const=yes
4072 else
4073   echo "configure: failed program was:" >&5
4074   cat conftest.$ac_ext >&5
4075   rm -rf conftest*
4076   ac_cv_c_const=no
4077 fi
4078 rm -f conftest*
4079
4080 echo "$ac_t""$ac_cv_c_const" 1>&6
4081 if test $ac_cv_c_const = no; then
4082   { test "$extra_verbose" = "yes" && cat << \EOF
4083     Defining const = 
4084 EOF
4085 cat >> confdefs.h <<\EOF
4086 #define const 
4087 EOF
4088 }
4089
4090 fi
4091
4092
4093 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4094 echo "configure:4095: checking whether ${MAKE-make} sets \${MAKE}" >&5
4095 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4096
4097 cat > conftestmake <<\EOF
4098 all:
4099         @echo 'ac_maketemp="${MAKE}"'
4100 EOF
4101 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4102 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4103 if test -n "$ac_maketemp"; then
4104   eval ac_cv_prog_make_${ac_make}_set=yes
4105 else
4106   eval ac_cv_prog_make_${ac_make}_set=no
4107 fi
4108 rm -f conftestmake
4109 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4110   echo "$ac_t""yes" 1>&6
4111   SET_MAKE=
4112 else
4113   echo "$ac_t""no" 1>&6
4114   SET_MAKE="MAKE=${MAKE-make}"
4115 fi
4116
4117
4118 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4119 echo "configure:4120: checking whether byte ordering is bigendian" >&5
4120
4121 ac_cv_c_bigendian=unknown
4122 # See if sys/param.h defines the BYTE_ORDER macro.
4123 cat > conftest.$ac_ext <<EOF
4124 #line 4125 "configure"
4125 #include "confdefs.h"
4126 #include <sys/types.h>
4127 #include <sys/param.h>
4128 int main() {
4129
4130 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4131  bogus endian macros
4132 #endif
4133 ; return 0; }
4134 EOF
4135 if { (eval echo configure:4136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4136   rm -rf conftest*
4137   # It does; now see whether it defined to BIG_ENDIAN or not.
4138 cat > conftest.$ac_ext <<EOF
4139 #line 4140 "configure"
4140 #include "confdefs.h"
4141 #include <sys/types.h>
4142 #include <sys/param.h>
4143 int main() {
4144
4145 #if BYTE_ORDER != BIG_ENDIAN
4146  not big endian
4147 #endif
4148 ; return 0; }
4149 EOF
4150 if { (eval echo configure:4151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4151   rm -rf conftest*
4152   ac_cv_c_bigendian=yes
4153 else
4154   echo "configure: failed program was:" >&5
4155   cat conftest.$ac_ext >&5
4156   rm -rf conftest*
4157   ac_cv_c_bigendian=no
4158 fi
4159 rm -f conftest*
4160 else
4161   echo "configure: failed program was:" >&5
4162   cat conftest.$ac_ext >&5
4163 fi
4164 rm -f conftest*
4165 if test $ac_cv_c_bigendian = unknown; then
4166 cat > conftest.$ac_ext <<EOF
4167 #line 4168 "configure"
4168 #include "confdefs.h"
4169 main () {
4170   /* Are we little or big endian?  From Harbison&Steele.  */
4171   union
4172   {
4173     long l;
4174     char c[sizeof (long)];
4175   } u;
4176   u.l = 1;
4177   exit (u.c[sizeof (long) - 1] == 1);
4178 }
4179 EOF
4180 if { (eval echo configure:4181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4181 then
4182   ac_cv_c_bigendian=no
4183 else
4184   conftest_rc="$?"
4185   echo "configure: failed program was:" >&5
4186   cat conftest.$ac_ext >&5
4187   rm -fr conftest*
4188   ac_cv_c_bigendian=yes
4189 fi
4190 rm -fr conftest*
4191 fi
4192
4193 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4194 if test $ac_cv_c_bigendian = yes; then
4195   { test "$extra_verbose" = "yes" && cat << \EOF
4196     Defining WORDS_BIGENDIAN
4197 EOF
4198 cat >> confdefs.h <<\EOF
4199 #define WORDS_BIGENDIAN 1
4200 EOF
4201 }
4202
4203 fi
4204
4205
4206 echo $ac_n "checking size of short""... $ac_c" 1>&6
4207 echo "configure:4208: checking size of short" >&5
4208
4209 cat > conftest.$ac_ext <<EOF
4210 #line 4211 "configure"
4211 #include "confdefs.h"
4212 #include <stdio.h>
4213 main()
4214 {
4215   FILE *f=fopen("conftestval", "w");
4216   if (!f) exit(1);
4217   fprintf(f, "%d\n", sizeof(short));
4218   exit(0);
4219 }
4220 EOF
4221 if { (eval echo configure:4222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4222 then
4223   ac_cv_sizeof_short=`cat conftestval`
4224 else
4225   conftest_rc="$?"
4226   echo "configure: failed program was:" >&5
4227   cat conftest.$ac_ext >&5
4228   rm -fr conftest*
4229   ac_cv_sizeof_short=0
4230 fi
4231 rm -fr conftest*
4232 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4233 { test "$extra_verbose" = "yes" && cat << EOF
4234     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4235 EOF
4236 cat >> confdefs.h <<EOF
4237 #define SIZEOF_SHORT $ac_cv_sizeof_short
4238 EOF
4239 }
4240
4241
4242 if test "$ac_cv_sizeof_short" = 0; then
4243   echo ""
4244   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4245   echo "*** PANIC *** Please examine config.log for compilation errors."
4246   exit 1
4247 fi
4248 echo $ac_n "checking size of int""... $ac_c" 1>&6
4249 echo "configure:4250: checking size of int" >&5
4250
4251 cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254 #include <stdio.h>
4255 main()
4256 {
4257   FILE *f=fopen("conftestval", "w");
4258   if (!f) exit(1);
4259   fprintf(f, "%d\n", sizeof(int));
4260   exit(0);
4261 }
4262 EOF
4263 if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4264 then
4265   ac_cv_sizeof_int=`cat conftestval`
4266 else
4267   conftest_rc="$?"
4268   echo "configure: failed program was:" >&5
4269   cat conftest.$ac_ext >&5
4270   rm -fr conftest*
4271   ac_cv_sizeof_int=0
4272 fi
4273 rm -fr conftest*
4274 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4275 { test "$extra_verbose" = "yes" && cat << EOF
4276     Defining SIZEOF_INT = $ac_cv_sizeof_int
4277 EOF
4278 cat >> confdefs.h <<EOF
4279 #define SIZEOF_INT $ac_cv_sizeof_int
4280 EOF
4281 }
4282
4283
4284 echo $ac_n "checking size of long""... $ac_c" 1>&6
4285 echo "configure:4286: checking size of long" >&5
4286
4287 cat > conftest.$ac_ext <<EOF
4288 #line 4289 "configure"
4289 #include "confdefs.h"
4290 #include <stdio.h>
4291 main()
4292 {
4293   FILE *f=fopen("conftestval", "w");
4294   if (!f) exit(1);
4295   fprintf(f, "%d\n", sizeof(long));
4296   exit(0);
4297 }
4298 EOF
4299 if { (eval echo configure:4300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4300 then
4301   ac_cv_sizeof_long=`cat conftestval`
4302 else
4303   conftest_rc="$?"
4304   echo "configure: failed program was:" >&5
4305   cat conftest.$ac_ext >&5
4306   rm -fr conftest*
4307   ac_cv_sizeof_long=0
4308 fi
4309 rm -fr conftest*
4310 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4311 { test "$extra_verbose" = "yes" && cat << EOF
4312     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4313 EOF
4314 cat >> confdefs.h <<EOF
4315 #define SIZEOF_LONG $ac_cv_sizeof_long
4316 EOF
4317 }
4318
4319
4320 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4321 echo "configure:4322: checking size of long long" >&5
4322
4323 cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 #include <stdio.h>
4327 main()
4328 {
4329   FILE *f=fopen("conftestval", "w");
4330   if (!f) exit(1);
4331   fprintf(f, "%d\n", sizeof(long long));
4332   exit(0);
4333 }
4334 EOF
4335 if { (eval echo configure:4336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4336 then
4337   ac_cv_sizeof_long_long=`cat conftestval`
4338 else
4339   conftest_rc="$?"
4340   echo "configure: failed program was:" >&5
4341   cat conftest.$ac_ext >&5
4342   rm -fr conftest*
4343   ac_cv_sizeof_long_long=0
4344 fi
4345 rm -fr conftest*
4346 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4347 { test "$extra_verbose" = "yes" && cat << EOF
4348     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4349 EOF
4350 cat >> confdefs.h <<EOF
4351 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4352 EOF
4353 }
4354
4355
4356 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4357 echo "configure:4358: checking size of void *" >&5
4358
4359 cat > conftest.$ac_ext <<EOF
4360 #line 4361 "configure"
4361 #include "confdefs.h"
4362 #include <stdio.h>
4363 main()
4364 {
4365   FILE *f=fopen("conftestval", "w");
4366   if (!f) exit(1);
4367   fprintf(f, "%d\n", sizeof(void *));
4368   exit(0);
4369 }
4370 EOF
4371 if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4372 then
4373   ac_cv_sizeof_void_p=`cat conftestval`
4374 else
4375   conftest_rc="$?"
4376   echo "configure: failed program was:" >&5
4377   cat conftest.$ac_ext >&5
4378   rm -fr conftest*
4379   ac_cv_sizeof_void_p=0
4380 fi
4381 rm -fr conftest*
4382 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4383 { test "$extra_verbose" = "yes" && cat << EOF
4384     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4385 EOF
4386 cat >> confdefs.h <<EOF
4387 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4388 EOF
4389 }
4390
4391
4392
4393 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4394 echo "configure:4395: checking for long file names" >&5
4395
4396 ac_cv_sys_long_file_names=yes
4397 # Test for long file names in all the places we know might matter:
4398 #      .                the current directory, where building will happen
4399 #      $prefix/lib      where we will be installing things
4400 #      $exec_prefix/lib likewise
4401 # eval it to expand exec_prefix.
4402 #      $TMPDIR          if set, where it might want to write temporary files
4403 # if $TMPDIR is not set:
4404 #      /tmp             where it might want to write temporary files
4405 #      /var/tmp         likewise
4406 #      /usr/tmp         likewise
4407 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4408   ac_tmpdirs="$TMPDIR"
4409 else
4410   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4411 fi
4412 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4413   test -d $ac_dir || continue
4414   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4415   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4416   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4417   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4418   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4419     ac_cv_sys_long_file_names=no
4420     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4421     break
4422   fi
4423   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4424 done
4425
4426 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4427 if test $ac_cv_sys_long_file_names = yes; then
4428   { test "$extra_verbose" = "yes" && cat << \EOF
4429     Defining HAVE_LONG_FILE_NAMES
4430 EOF
4431 cat >> confdefs.h <<\EOF
4432 #define HAVE_LONG_FILE_NAMES 1
4433 EOF
4434 }
4435
4436 fi
4437
4438
4439 echo $ac_n "checking for sin""... $ac_c" 1>&6
4440 echo "configure:4441: checking for sin" >&5
4441
4442 cat > conftest.$ac_ext <<EOF
4443 #line 4444 "configure"
4444 #include "confdefs.h"
4445 /* System header to define __stub macros and hopefully few prototypes,
4446     which can conflict with char sin(); below.  */
4447 #include <assert.h>
4448 /* Override any gcc2 internal prototype to avoid an error.  */
4449 /* We use char because int might match the return type of a gcc2
4450     builtin and then its argument prototype would still apply.  */
4451 char sin();
4452
4453 int main() {
4454
4455 /* The GNU C library defines this for functions which it implements
4456     to always fail with ENOSYS.  Some functions are actually named
4457     something starting with __ and the normal name is an alias.  */
4458 #if defined (__stub_sin) || defined (__stub___sin)
4459 choke me
4460 #else
4461 sin();
4462 #endif
4463
4464 ; return 0; }
4465 EOF
4466 if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4467   rm -rf conftest*
4468   eval "ac_cv_func_sin=yes"
4469 else
4470   echo "configure: failed program was:" >&5
4471   cat conftest.$ac_ext >&5
4472   rm -rf conftest*
4473   eval "ac_cv_func_sin=no"
4474 fi
4475 rm -f conftest*
4476
4477 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4478   echo "$ac_t""yes" 1>&6
4479   :
4480 else
4481   echo "$ac_t""no" 1>&6
4482
4483 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4484 echo "configure:4485: checking for sin in -lm" >&5
4485 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4486
4487 xe_check_libs=" -lm "
4488 cat > conftest.$ac_ext <<EOF
4489 #line 4490 "configure"
4490 #include "confdefs.h"
4491 /* Override any gcc2 internal prototype to avoid an error.  */
4492 /* We use char because int might match the return type of a gcc2
4493     builtin and then its argument prototype would still apply.  */
4494 char sin();
4495
4496 int main() {
4497 sin()
4498 ; return 0; }
4499 EOF
4500 if { (eval echo configure:4501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4501   rm -rf conftest*
4502   eval "ac_cv_lib_$ac_lib_var=yes"
4503 else
4504   echo "configure: failed program was:" >&5
4505   cat conftest.$ac_ext >&5
4506   rm -rf conftest*
4507   eval "ac_cv_lib_$ac_lib_var=no"
4508 fi
4509 rm -f conftest*
4510 xe_check_libs=""
4511
4512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4513   echo "$ac_t""yes" 1>&6
4514     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4515     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4516   { test "$extra_verbose" = "yes" && cat << EOF
4517     Defining $ac_tr_lib
4518 EOF
4519 cat >> confdefs.h <<EOF
4520 #define $ac_tr_lib 1
4521 EOF
4522 }
4523
4524   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4525
4526 else
4527   echo "$ac_t""no" 1>&6
4528 fi
4529
4530
4531 fi
4532
4533
4534 { test "$extra_verbose" = "yes" && cat << \EOF
4535     Defining LISP_FLOAT_TYPE
4536 EOF
4537 cat >> confdefs.h <<\EOF
4538 #define LISP_FLOAT_TYPE 1
4539 EOF
4540 }
4541
4542
4543 cat > conftest.$ac_ext <<EOF
4544 #line 4545 "configure"
4545 #include "confdefs.h"
4546 #include <math.h>
4547 int main() {
4548 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4549 ; return 0; }
4550 EOF
4551 if { (eval echo configure:4552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4552   rm -rf conftest*
4553   { test "$extra_verbose" = "yes" && cat << \EOF
4554     Defining HAVE_INVERSE_HYPERBOLIC
4555 EOF
4556 cat >> confdefs.h <<\EOF
4557 #define HAVE_INVERSE_HYPERBOLIC 1
4558 EOF
4559 }
4560
4561 else
4562   echo "configure: failed program was:" >&5
4563   cat conftest.$ac_ext >&5
4564 fi
4565 rm -f conftest*
4566
4567 echo "checking type of mail spool file locking" 1>&6
4568 echo "configure:4569: checking type of mail spool file locking" >&5
4569 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4570 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4571 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4572     Defining REAL_MAIL_USE_LOCKF
4573 EOF
4574 cat >> confdefs.h <<\EOF
4575 #define REAL_MAIL_USE_LOCKF 1
4576 EOF
4577 }
4578
4579 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4580     Defining REAL_MAIL_USE_FLOCK
4581 EOF
4582 cat >> confdefs.h <<\EOF
4583 #define REAL_MAIL_USE_FLOCK 1
4584 EOF
4585 }
4586
4587 else mail_locking="dot-locking"
4588 fi
4589
4590 case "$opsys" in decosf*)
4591   
4592 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4593 echo "configure:4594: checking for cma_open in -lpthreads" >&5
4594 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4595
4596 xe_check_libs=" -lpthreads "
4597 cat > conftest.$ac_ext <<EOF
4598 #line 4599 "configure"
4599 #include "confdefs.h"
4600 /* Override any gcc2 internal prototype to avoid an error.  */
4601 /* We use char because int might match the return type of a gcc2
4602     builtin and then its argument prototype would still apply.  */
4603 char cma_open();
4604
4605 int main() {
4606 cma_open()
4607 ; return 0; }
4608 EOF
4609 if { (eval echo configure:4610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4610   rm -rf conftest*
4611   eval "ac_cv_lib_$ac_lib_var=yes"
4612 else
4613   echo "configure: failed program was:" >&5
4614   cat conftest.$ac_ext >&5
4615   rm -rf conftest*
4616   eval "ac_cv_lib_$ac_lib_var=no"
4617 fi
4618 rm -f conftest*
4619 xe_check_libs=""
4620
4621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4622   echo "$ac_t""yes" 1>&6
4623     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4624     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4625   { test "$extra_verbose" = "yes" && cat << EOF
4626     Defining $ac_tr_lib
4627 EOF
4628 cat >> confdefs.h <<EOF
4629 #define $ac_tr_lib 1
4630 EOF
4631 }
4632
4633   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4634
4635 else
4636   echo "$ac_t""no" 1>&6
4637 fi
4638
4639
4640   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4641     c_switch_site="$c_switch_site -threads" ;;
4642 esac
4643
4644 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4645 echo "configure:4646: checking whether the -xildoff compiler flag is required" >&5
4646 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4647   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4648     then echo "$ac_t""no" 1>&6;
4649     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
4650   fi
4651   else echo "$ac_t""no" 1>&6
4652 fi
4653
4654 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4655   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4656 echo "configure:4657: checking for \"-z ignore\" linker flag" >&5
4657   case "`ld -h 2>&1`" in
4658     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4659       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4660     *) echo "$ac_t""no" 1>&6 ;;
4661   esac
4662 fi
4663
4664
4665 echo "checking "for specified window system"" 1>&6
4666 echo "configure:4667: checking "for specified window system"" >&5
4667
4668 if test "$with_x11" != "no"; then
4669     test "$x_includes $x_libraries" != "NONE NONE" && \
4670    window_system=x11 with_x11=yes
4671
4672         
4673       if test "$x_includes $x_libraries" = "NONE NONE" \
4674     -a -n "$OPENWINHOME" \
4675     -a "$OPENWINHOME" != "/usr/openwin" \
4676     -a -d "$OPENWINHOME"; then
4677       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4678       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4679       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4680   fi
4681
4682   if test "$x_includes" = "NONE"; then
4683                     for dir in "/usr/X11" "/usr/X11R6"; do
4684       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4685     done
4686   fi
4687
4688   if test "$x_libraries" = "NONE"; then
4689     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4690       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4691     done
4692   fi
4693
4694   # If we find X, set shell vars x_includes and x_libraries to the
4695 # paths, otherwise set no_x=yes.
4696 # Uses ac_ vars as temps to allow command line to override cache and checks.
4697 # --without-x overrides everything else, but does not touch the cache.
4698 echo $ac_n "checking for X""... $ac_c" 1>&6
4699 echo "configure:4700: checking for X" >&5
4700
4701 # Check whether --with-x or --without-x was given.
4702 if test "${with_x+set}" = set; then
4703   withval="$with_x"
4704   :
4705 fi
4706
4707 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4708 if test "x$with_x" = xno; then
4709   # The user explicitly disabled X.
4710   have_x=disabled
4711 else
4712   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4713     # Both variables are already set.
4714     have_x=yes
4715   else
4716
4717 # One or both of the vars are not set, and there is no cached value.
4718 ac_x_includes=NO ac_x_libraries=NO
4719 rm -fr conftestdir
4720 if mkdir conftestdir; then
4721   cd conftestdir
4722   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4723   cat > Imakefile <<'EOF'
4724 acfindx:
4725         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4726 EOF
4727   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4728     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4729     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4730     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4731     for ac_extension in a so sl; do
4732       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4733         test -f $ac_im_libdir/libX11.$ac_extension; then
4734         ac_im_usrlibdir=$ac_im_libdir; break
4735       fi
4736     done
4737     # Screen out bogus values from the imake configuration.  They are
4738     # bogus both because they are the default anyway, and because
4739     # using them would break gcc on systems where it needs fixed includes.
4740     case "$ac_im_incroot" in
4741         /usr/include) ;;
4742         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4743     esac
4744     case "$ac_im_usrlibdir" in
4745         /usr/lib | /lib) ;;
4746         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4747     esac
4748   fi
4749   cd ..
4750   rm -fr conftestdir
4751 fi
4752
4753 if test "$ac_x_includes" = NO; then
4754   # Guess where to find include files, by looking for this one X11 .h file.
4755   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4756
4757   # First, try using that file with no special directory specified.
4758 cat > conftest.$ac_ext <<EOF
4759 #line 4760 "configure"
4760 #include "confdefs.h"
4761 #include <$x_direct_test_include>
4762 EOF
4763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4764 { (eval echo configure:4765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4766 if test -z "$ac_err"; then
4767   rm -rf conftest*
4768   # We can compile using X headers with no special include directory.
4769 ac_x_includes=
4770 else
4771   echo "$ac_err" >&5
4772   echo "configure: failed program was:" >&5
4773   cat conftest.$ac_ext >&5
4774   rm -rf conftest*
4775   # Look for the header file in a standard set of common directories.
4776 # Check X11 before X11Rn because it is often a symlink to the current release.
4777   for ac_dir in               \
4778     /usr/X11/include          \
4779     /usr/X11R6/include        \
4780     /usr/X11R5/include        \
4781     /usr/X11R4/include        \
4782                               \
4783     /usr/include/X11          \
4784     /usr/include/X11R6        \
4785     /usr/include/X11R5        \
4786     /usr/include/X11R4        \
4787                               \
4788     /usr/local/X11/include    \
4789     /usr/local/X11R6/include  \
4790     /usr/local/X11R5/include  \
4791     /usr/local/X11R4/include  \
4792                               \
4793     /usr/local/include/X11    \
4794     /usr/local/include/X11R6  \
4795     /usr/local/include/X11R5  \
4796     /usr/local/include/X11R4  \
4797                               \
4798     /usr/X386/include         \
4799     /usr/x386/include         \
4800     /usr/XFree86/include/X11  \
4801                               \
4802     /usr/include              \
4803     /usr/local/include        \
4804     /usr/unsupported/include  \
4805     /usr/athena/include       \
4806     /usr/local/x11r5/include  \
4807     /usr/lpp/Xamples/include  \
4808                               \
4809     /usr/openwin/include      \
4810     /usr/openwin/share/include \
4811     ; \
4812   do
4813     if test -r "$ac_dir/$x_direct_test_include"; then
4814       ac_x_includes=$ac_dir
4815       break
4816     fi
4817   done
4818 fi
4819 rm -f conftest*
4820 fi # $ac_x_includes = NO
4821
4822 if test "$ac_x_libraries" = NO; then
4823   # Check for the libraries.
4824
4825   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4826   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4827
4828   # See if we find them without any special options.
4829   # Don't add to $LIBS permanently.
4830   ac_save_LIBS="$LIBS"
4831   LIBS="-l$x_direct_test_library $LIBS"
4832 cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835
4836 int main() {
4837 ${x_direct_test_function}()
4838 ; return 0; }
4839 EOF
4840 if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4841   rm -rf conftest*
4842   LIBS="$ac_save_LIBS"
4843 # We can link X programs with no special library path.
4844 ac_x_libraries=
4845 else
4846   echo "configure: failed program was:" >&5
4847   cat conftest.$ac_ext >&5
4848   rm -rf conftest*
4849   LIBS="$ac_save_LIBS"
4850 # First see if replacing the include by lib works.
4851 # Check X11 before X11Rn because it is often a symlink to the current release.
4852 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4853     /usr/X11/lib          \
4854     /usr/X11R6/lib        \
4855     /usr/X11R5/lib        \
4856     /usr/X11R4/lib        \
4857                           \
4858     /usr/lib/X11          \
4859     /usr/lib/X11R6        \
4860     /usr/lib/X11R5        \
4861     /usr/lib/X11R4        \
4862                           \
4863     /usr/local/X11/lib    \
4864     /usr/local/X11R6/lib  \
4865     /usr/local/X11R5/lib  \
4866     /usr/local/X11R4/lib  \
4867                           \
4868     /usr/local/lib/X11    \
4869     /usr/local/lib/X11R6  \
4870     /usr/local/lib/X11R5  \
4871     /usr/local/lib/X11R4  \
4872                           \
4873     /usr/X386/lib         \
4874     /usr/x386/lib         \
4875     /usr/XFree86/lib/X11  \
4876                           \
4877     /usr/lib              \
4878     /usr/local/lib        \
4879     /usr/unsupported/lib  \
4880     /usr/athena/lib       \
4881     /usr/local/x11r5/lib  \
4882     /usr/lpp/Xamples/lib  \
4883     /lib/usr/lib/X11      \
4884                           \
4885     /usr/openwin/lib      \
4886     /usr/openwin/share/lib \
4887     ; \
4888 do
4889   for ac_extension in a so sl; do
4890     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4891       ac_x_libraries=$ac_dir
4892       break 2
4893     fi
4894   done
4895 done
4896 fi
4897 rm -f conftest*
4898 fi # $ac_x_libraries = NO
4899
4900 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4901   # Didn't find X anywhere.  Cache the known absence of X.
4902   ac_cv_have_x="have_x=no"
4903 else
4904   # Record where we found X for the cache.
4905   ac_cv_have_x="have_x=yes \
4906                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4907 fi
4908   fi
4909   eval "$ac_cv_have_x"
4910 fi # $with_x != no
4911
4912 if test "$have_x" != yes; then
4913   echo "$ac_t""$have_x" 1>&6
4914   no_x=yes
4915 else
4916   # If each of the values was on the command line, it overrides each guess.
4917   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4918   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4919   # Update the cache value to reflect the command line values.
4920   ac_cv_have_x="have_x=yes \
4921                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4922   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4923 fi
4924
4925 if test "$no_x" = yes; then
4926   # Not all programs may use this symbol, but it does not hurt to define it.
4927   { test "$extra_verbose" = "yes" && cat << \EOF
4928     Defining X_DISPLAY_MISSING
4929 EOF
4930 cat >> confdefs.h <<\EOF
4931 #define X_DISPLAY_MISSING 1
4932 EOF
4933 }
4934
4935   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4936 else
4937   if test -n "$x_includes"; then
4938     X_CFLAGS="$X_CFLAGS -I$x_includes"
4939   fi
4940
4941   # It would also be nice to do this for all -L options, not just this one.
4942   if test -n "$x_libraries"; then
4943     X_LIBS="$X_LIBS -L$x_libraries"
4944     # For Solaris; some versions of Sun CC require a space after -R and
4945     # others require no space.  Words are not sufficient . . . .
4946     case "`(uname -sr) 2>/dev/null`" in
4947     "SunOS 5"*)
4948       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4949 echo "configure:4950: checking whether -R must be followed by a space" >&5
4950       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4951       cat > conftest.$ac_ext <<EOF
4952 #line 4953 "configure"
4953 #include "confdefs.h"
4954
4955 int main() {
4956
4957 ; return 0; }
4958 EOF
4959 if { (eval echo configure:4960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4960   rm -rf conftest*
4961   ac_R_nospace=yes
4962 else
4963   echo "configure: failed program was:" >&5
4964   cat conftest.$ac_ext >&5
4965   rm -rf conftest*
4966   ac_R_nospace=no
4967 fi
4968 rm -f conftest*
4969       if test $ac_R_nospace = yes; then
4970         echo "$ac_t""no" 1>&6
4971         X_LIBS="$X_LIBS -R$x_libraries"
4972       else
4973         LIBS="$ac_xsave_LIBS -R $x_libraries"
4974         cat > conftest.$ac_ext <<EOF
4975 #line 4976 "configure"
4976 #include "confdefs.h"
4977
4978 int main() {
4979
4980 ; return 0; }
4981 EOF
4982 if { (eval echo configure:4983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4983   rm -rf conftest*
4984   ac_R_space=yes
4985 else
4986   echo "configure: failed program was:" >&5
4987   cat conftest.$ac_ext >&5
4988   rm -rf conftest*
4989   ac_R_space=no
4990 fi
4991 rm -f conftest*
4992         if test $ac_R_space = yes; then
4993           echo "$ac_t""yes" 1>&6
4994           X_LIBS="$X_LIBS -R $x_libraries"
4995         else
4996           echo "$ac_t""neither works" 1>&6
4997         fi
4998       fi
4999       LIBS="$ac_xsave_LIBS"
5000     esac
5001   fi
5002
5003   # Check for system-dependent libraries X programs must link with.
5004   # Do this before checking for the system-independent R6 libraries
5005   # (-lICE), since we may need -lsocket or whatever for X linking.
5006
5007   if test "$ISC" = yes; then
5008     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5009   else
5010     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5011     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5012     # the Alpha needs dnet_stub (dnet does not exist).
5013     if test "$with_dnet" = "no" ; then
5014 ac_cv_lib_dnet_dnet_ntoa=no
5015 else
5016
5017 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5018 echo "configure:5019: checking for dnet_ntoa in -ldnet" >&5
5019 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5020
5021 xe_check_libs=" -ldnet "
5022 cat > conftest.$ac_ext <<EOF
5023 #line 5024 "configure"
5024 #include "confdefs.h"
5025 /* Override any gcc2 internal prototype to avoid an error.  */
5026 /* We use char because int might match the return type of a gcc2
5027     builtin and then its argument prototype would still apply.  */
5028 char dnet_ntoa();
5029
5030 int main() {
5031 dnet_ntoa()
5032 ; return 0; }
5033 EOF
5034 if { (eval echo configure:5035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5035   rm -rf conftest*
5036   eval "ac_cv_lib_$ac_lib_var=yes"
5037 else
5038   echo "configure: failed program was:" >&5
5039   cat conftest.$ac_ext >&5
5040   rm -rf conftest*
5041   eval "ac_cv_lib_$ac_lib_var=no"
5042 fi
5043 rm -f conftest*
5044 xe_check_libs=""
5045
5046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5047   echo "$ac_t""yes" 1>&6
5048   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5049 else
5050   echo "$ac_t""no" 1>&6
5051 fi
5052
5053 fi
5054
5055     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5056       
5057 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5058 echo "configure:5059: checking for dnet_ntoa in -ldnet_stub" >&5
5059 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5060
5061 xe_check_libs=" -ldnet_stub "
5062 cat > conftest.$ac_ext <<EOF
5063 #line 5064 "configure"
5064 #include "confdefs.h"
5065 /* Override any gcc2 internal prototype to avoid an error.  */
5066 /* We use char because int might match the return type of a gcc2
5067     builtin and then its argument prototype would still apply.  */
5068 char dnet_ntoa();
5069
5070 int main() {
5071 dnet_ntoa()
5072 ; return 0; }
5073 EOF
5074 if { (eval echo configure:5075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5075   rm -rf conftest*
5076   eval "ac_cv_lib_$ac_lib_var=yes"
5077 else
5078   echo "configure: failed program was:" >&5
5079   cat conftest.$ac_ext >&5
5080   rm -rf conftest*
5081   eval "ac_cv_lib_$ac_lib_var=no"
5082 fi
5083 rm -f conftest*
5084 xe_check_libs=""
5085
5086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5087   echo "$ac_t""yes" 1>&6
5088   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5089 else
5090   echo "$ac_t""no" 1>&6
5091 fi
5092
5093
5094     fi
5095
5096     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5097     # to get the SysV transport functions.
5098     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5099     # needs -lnsl.
5100     # The nsl library prevents programs from opening the X display
5101     # on Irix 5.2, according to dickey@clark.net.
5102     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5103 echo "configure:5104: checking for gethostbyname" >&5
5104
5105 cat > conftest.$ac_ext <<EOF
5106 #line 5107 "configure"
5107 #include "confdefs.h"
5108 /* System header to define __stub macros and hopefully few prototypes,
5109     which can conflict with char gethostbyname(); below.  */
5110 #include <assert.h>
5111 /* Override any gcc2 internal prototype to avoid an error.  */
5112 /* We use char because int might match the return type of a gcc2
5113     builtin and then its argument prototype would still apply.  */
5114 char gethostbyname();
5115
5116 int main() {
5117
5118 /* The GNU C library defines this for functions which it implements
5119     to always fail with ENOSYS.  Some functions are actually named
5120     something starting with __ and the normal name is an alias.  */
5121 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5122 choke me
5123 #else
5124 gethostbyname();
5125 #endif
5126
5127 ; return 0; }
5128 EOF
5129 if { (eval echo configure:5130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5130   rm -rf conftest*
5131   eval "ac_cv_func_gethostbyname=yes"
5132 else
5133   echo "configure: failed program was:" >&5
5134   cat conftest.$ac_ext >&5
5135   rm -rf conftest*
5136   eval "ac_cv_func_gethostbyname=no"
5137 fi
5138 rm -f conftest*
5139
5140 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5141   echo "$ac_t""yes" 1>&6
5142   :
5143 else
5144   echo "$ac_t""no" 1>&6
5145 fi
5146
5147     if test $ac_cv_func_gethostbyname = no; then
5148       
5149 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5150 echo "configure:5151: checking for gethostbyname in -lnsl" >&5
5151 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5152
5153 xe_check_libs=" -lnsl "
5154 cat > conftest.$ac_ext <<EOF
5155 #line 5156 "configure"
5156 #include "confdefs.h"
5157 /* Override any gcc2 internal prototype to avoid an error.  */
5158 /* We use char because int might match the return type of a gcc2
5159     builtin and then its argument prototype would still apply.  */
5160 char gethostbyname();
5161
5162 int main() {
5163 gethostbyname()
5164 ; return 0; }
5165 EOF
5166 if { (eval echo configure:5167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5167   rm -rf conftest*
5168   eval "ac_cv_lib_$ac_lib_var=yes"
5169 else
5170   echo "configure: failed program was:" >&5
5171   cat conftest.$ac_ext >&5
5172   rm -rf conftest*
5173   eval "ac_cv_lib_$ac_lib_var=no"
5174 fi
5175 rm -f conftest*
5176 xe_check_libs=""
5177
5178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5179   echo "$ac_t""yes" 1>&6
5180   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5181 else
5182   echo "$ac_t""no" 1>&6
5183 fi
5184
5185
5186     fi
5187
5188     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5189     # socket/setsockopt and other routines are undefined under SCO ODT
5190     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5191     # on later versions), says simon@lia.di.epfl.ch: it contains
5192     # gethostby* variants that don't use the nameserver (or something).
5193     # -lsocket must be given before -lnsl if both are needed.
5194     # We assume that if connect needs -lnsl, so does gethostbyname.
5195     echo $ac_n "checking for connect""... $ac_c" 1>&6
5196 echo "configure:5197: checking for connect" >&5
5197
5198 cat > conftest.$ac_ext <<EOF
5199 #line 5200 "configure"
5200 #include "confdefs.h"
5201 /* System header to define __stub macros and hopefully few prototypes,
5202     which can conflict with char connect(); below.  */
5203 #include <assert.h>
5204 /* Override any gcc2 internal prototype to avoid an error.  */
5205 /* We use char because int might match the return type of a gcc2
5206     builtin and then its argument prototype would still apply.  */
5207 char connect();
5208
5209 int main() {
5210
5211 /* The GNU C library defines this for functions which it implements
5212     to always fail with ENOSYS.  Some functions are actually named
5213     something starting with __ and the normal name is an alias.  */
5214 #if defined (__stub_connect) || defined (__stub___connect)
5215 choke me
5216 #else
5217 connect();
5218 #endif
5219
5220 ; return 0; }
5221 EOF
5222 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5223   rm -rf conftest*
5224   eval "ac_cv_func_connect=yes"
5225 else
5226   echo "configure: failed program was:" >&5
5227   cat conftest.$ac_ext >&5
5228   rm -rf conftest*
5229   eval "ac_cv_func_connect=no"
5230 fi
5231 rm -f conftest*
5232
5233 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5234   echo "$ac_t""yes" 1>&6
5235   :
5236 else
5237   echo "$ac_t""no" 1>&6
5238 fi
5239
5240     if test $ac_cv_func_connect = no; then
5241       
5242 xe_msg_checking="for connect in -lsocket"
5243 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5244 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5245 echo "configure:5246: checking "$xe_msg_checking"" >&5
5246 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5247
5248 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5249 cat > conftest.$ac_ext <<EOF
5250 #line 5251 "configure"
5251 #include "confdefs.h"
5252 /* Override any gcc2 internal prototype to avoid an error.  */
5253 /* We use char because int might match the return type of a gcc2
5254     builtin and then its argument prototype would still apply.  */
5255 char connect();
5256
5257 int main() {
5258 connect()
5259 ; return 0; }
5260 EOF
5261 if { (eval echo configure:5262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5262   rm -rf conftest*
5263   eval "ac_cv_lib_$ac_lib_var=yes"
5264 else
5265   echo "configure: failed program was:" >&5
5266   cat conftest.$ac_ext >&5
5267   rm -rf conftest*
5268   eval "ac_cv_lib_$ac_lib_var=no"
5269 fi
5270 rm -f conftest*
5271 xe_check_libs=""
5272
5273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5274   echo "$ac_t""yes" 1>&6
5275   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5276 else
5277   echo "$ac_t""no" 1>&6
5278 fi
5279
5280
5281     fi
5282
5283     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5284     echo $ac_n "checking for remove""... $ac_c" 1>&6
5285 echo "configure:5286: checking for remove" >&5
5286
5287 cat > conftest.$ac_ext <<EOF
5288 #line 5289 "configure"
5289 #include "confdefs.h"
5290 /* System header to define __stub macros and hopefully few prototypes,
5291     which can conflict with char remove(); below.  */
5292 #include <assert.h>
5293 /* Override any gcc2 internal prototype to avoid an error.  */
5294 /* We use char because int might match the return type of a gcc2
5295     builtin and then its argument prototype would still apply.  */
5296 char remove();
5297
5298 int main() {
5299
5300 /* The GNU C library defines this for functions which it implements
5301     to always fail with ENOSYS.  Some functions are actually named
5302     something starting with __ and the normal name is an alias.  */
5303 #if defined (__stub_remove) || defined (__stub___remove)
5304 choke me
5305 #else
5306 remove();
5307 #endif
5308
5309 ; return 0; }
5310 EOF
5311 if { (eval echo configure:5312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5312   rm -rf conftest*
5313   eval "ac_cv_func_remove=yes"
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317   rm -rf conftest*
5318   eval "ac_cv_func_remove=no"
5319 fi
5320 rm -f conftest*
5321
5322 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5323   echo "$ac_t""yes" 1>&6
5324   :
5325 else
5326   echo "$ac_t""no" 1>&6
5327 fi
5328
5329     if test $ac_cv_func_remove = no; then
5330       
5331 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5332 echo "configure:5333: checking for remove in -lposix" >&5
5333 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5334
5335 xe_check_libs=" -lposix "
5336 cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339 /* Override any gcc2 internal prototype to avoid an error.  */
5340 /* We use char because int might match the return type of a gcc2
5341     builtin and then its argument prototype would still apply.  */
5342 char remove();
5343
5344 int main() {
5345 remove()
5346 ; return 0; }
5347 EOF
5348 if { (eval echo configure:5349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5349   rm -rf conftest*
5350   eval "ac_cv_lib_$ac_lib_var=yes"
5351 else
5352   echo "configure: failed program was:" >&5
5353   cat conftest.$ac_ext >&5
5354   rm -rf conftest*
5355   eval "ac_cv_lib_$ac_lib_var=no"
5356 fi
5357 rm -f conftest*
5358 xe_check_libs=""
5359
5360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5361   echo "$ac_t""yes" 1>&6
5362   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5363 else
5364   echo "$ac_t""no" 1>&6
5365 fi
5366
5367
5368     fi
5369
5370     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5371     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5372 echo "configure:5373: checking for shmat" >&5
5373
5374 cat > conftest.$ac_ext <<EOF
5375 #line 5376 "configure"
5376 #include "confdefs.h"
5377 /* System header to define __stub macros and hopefully few prototypes,
5378     which can conflict with char shmat(); below.  */
5379 #include <assert.h>
5380 /* Override any gcc2 internal prototype to avoid an error.  */
5381 /* We use char because int might match the return type of a gcc2
5382     builtin and then its argument prototype would still apply.  */
5383 char shmat();
5384
5385 int main() {
5386
5387 /* The GNU C library defines this for functions which it implements
5388     to always fail with ENOSYS.  Some functions are actually named
5389     something starting with __ and the normal name is an alias.  */
5390 #if defined (__stub_shmat) || defined (__stub___shmat)
5391 choke me
5392 #else
5393 shmat();
5394 #endif
5395
5396 ; return 0; }
5397 EOF
5398 if { (eval echo configure:5399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5399   rm -rf conftest*
5400   eval "ac_cv_func_shmat=yes"
5401 else
5402   echo "configure: failed program was:" >&5
5403   cat conftest.$ac_ext >&5
5404   rm -rf conftest*
5405   eval "ac_cv_func_shmat=no"
5406 fi
5407 rm -f conftest*
5408
5409 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5410   echo "$ac_t""yes" 1>&6
5411   :
5412 else
5413   echo "$ac_t""no" 1>&6
5414 fi
5415
5416     if test $ac_cv_func_shmat = no; then
5417       
5418 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5419 echo "configure:5420: checking for shmat in -lipc" >&5
5420 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5421
5422 xe_check_libs=" -lipc "
5423 cat > conftest.$ac_ext <<EOF
5424 #line 5425 "configure"
5425 #include "confdefs.h"
5426 /* Override any gcc2 internal prototype to avoid an error.  */
5427 /* We use char because int might match the return type of a gcc2
5428     builtin and then its argument prototype would still apply.  */
5429 char shmat();
5430
5431 int main() {
5432 shmat()
5433 ; return 0; }
5434 EOF
5435 if { (eval echo configure:5436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5436   rm -rf conftest*
5437   eval "ac_cv_lib_$ac_lib_var=yes"
5438 else
5439   echo "configure: failed program was:" >&5
5440   cat conftest.$ac_ext >&5
5441   rm -rf conftest*
5442   eval "ac_cv_lib_$ac_lib_var=no"
5443 fi
5444 rm -f conftest*
5445 xe_check_libs=""
5446
5447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5448   echo "$ac_t""yes" 1>&6
5449   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5450 else
5451   echo "$ac_t""no" 1>&6
5452 fi
5453
5454
5455     fi
5456   fi
5457
5458   # Check for libraries that X11R6 Xt/Xaw programs need.
5459   ac_save_LDFLAGS="$LDFLAGS"
5460   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5461   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5462   # check for ICE first), but we must link in the order -lSM -lICE or
5463   # we get undefined symbols.  So assume we have SM if we have ICE.
5464   # These have to be linked with before -lX11, unlike the other
5465   # libraries we check for below, so use a different variable.
5466   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5467   
5468 xe_msg_checking="for IceConnectionNumber in -lICE"
5469 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5470 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5471 echo "configure:5472: checking "$xe_msg_checking"" >&5
5472 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5473
5474 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5475 cat > conftest.$ac_ext <<EOF
5476 #line 5477 "configure"
5477 #include "confdefs.h"
5478 /* Override any gcc2 internal prototype to avoid an error.  */
5479 /* We use char because int might match the return type of a gcc2
5480     builtin and then its argument prototype would still apply.  */
5481 char IceConnectionNumber();
5482
5483 int main() {
5484 IceConnectionNumber()
5485 ; return 0; }
5486 EOF
5487 if { (eval echo configure:5488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5488   rm -rf conftest*
5489   eval "ac_cv_lib_$ac_lib_var=yes"
5490 else
5491   echo "configure: failed program was:" >&5
5492   cat conftest.$ac_ext >&5
5493   rm -rf conftest*
5494   eval "ac_cv_lib_$ac_lib_var=no"
5495 fi
5496 rm -f conftest*
5497 xe_check_libs=""
5498
5499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5500   echo "$ac_t""yes" 1>&6
5501   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5502 else
5503   echo "$ac_t""no" 1>&6
5504 fi
5505
5506
5507   LDFLAGS="$ac_save_LDFLAGS"
5508
5509 fi
5510  # Autoconf claims to find X library and include dirs for us.
5511   if test "$no_x" = "yes"
5512   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5513   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5514   fi
5515 fi
5516
5517 case "$with_x11" in
5518   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5519   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5520 esac
5521
5522 if test "$with_x11" = "yes"; then
5523   { test "$extra_verbose" = "yes" && cat << \EOF
5524     Defining HAVE_X_WINDOWS
5525 EOF
5526 cat >> confdefs.h <<\EOF
5527 #define HAVE_X_WINDOWS 1
5528 EOF
5529 }
5530
5531   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5532   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5533
5534       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5535     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5536     if test -d "$lib_dir" -a -d "$inc_dir"; then
5537       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5538         x_libraries="$lib_dir $x_libraries"
5539         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5540       esac
5541       case "$x_includes" in "$inc_dir"* ) ;; *)
5542         x_includes="$inc_dir $x_includes"
5543         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5544       esac
5545       break;       fi
5546   done
5547
5548     for rel in "X11R6" "X11R5" "X11R4"; do
5549     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5550     if test -d "$lib_dir" -a -d "$inc_dir"; then
5551       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5552         x_libraries="$x_libraries $lib_dir"
5553         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5554       esac
5555       case "$x_includes" in "$inc_dir"* ) ;; *)
5556         x_includes="$x_includes $inc_dir"
5557         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5558       esac
5559       break;     fi
5560   done
5561
5562     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
5563
5564   ld_switch_x_site="$X_LIBS"
5565
5566   
5567 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5568     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5569   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5570   
5571         runpath="" runpath_dirs=""
5572   if test -n "$LD_RUN_PATH"; then
5573     runpath="$LD_RUN_PATH"
5574   elif test "$GCC" = "yes"; then
5575         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5576     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5577     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5578     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5579       case "$arg" in P,* | -L* | -R* )
5580         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5581           {
5582 xe_runpath_dir="$dir"
5583   test "$xe_runpath_dir" != "/lib"     -a \
5584         "$xe_runpath_dir" != "/usr/lib" -a \
5585         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5586   eval "$xe_add_unique_runpath_dir"
5587 }
5588         done ;;
5589       esac
5590     done
5591     ld_switch_run="$ld_switch_run_save"
5592     rm -f conftest*
5593   else
5594         for arg in $ld_switch_site $ld_switch_x_site; do
5595       case "$arg" in -L*) {
5596 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5597   test "$xe_runpath_dir" != "/lib"     -a \
5598         "$xe_runpath_dir" != "/usr/lib" -a \
5599         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5600   eval "$xe_add_unique_runpath_dir"
5601 };; esac
5602     done
5603         if test "$opsys $need_motif" = "sol2 yes"; then
5604       xe_runpath_dir="/opt/SUNWdt/lib";
5605       eval "$xe_add_unique_runpath_dir";
5606     fi
5607   fi 
5608   if test -n "$runpath"; then
5609     ld_switch_run="${dash_r}${runpath}"
5610     
5611 if test "$GCC" = "yes"; then
5612   set x $ld_switch_run; shift; ld_switch_run=""
5613   while test -n "$1"; do
5614     case $1 in
5615       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5616       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5617       -Xlinker* ) ;;
5618       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5619     esac
5620     shift
5621   done
5622 fi
5623     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5624   fi
5625 fi
5626
5627
5628   if test "$extra_verbose" = "yes"; then
5629     echo; echo "X11 compilation variables:"
5630     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5631     echo
5632   fi
5633
5634             bitmapdirs=
5635   if test "$x_includes" != NONE; then
5636     for i in $x_includes; do
5637       if test -d "$i/bitmaps"; then
5638         bitmapdirs="$i/bitmaps:$bitmapdirs"
5639       fi
5640       if test -d "$i/X11/bitmaps"; then
5641         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5642       fi
5643     done
5644     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5645   fi
5646   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5647     Defining BITMAPDIR = "$bitmapdirs"
5648 EOF
5649 cat >> confdefs.h <<EOF
5650 #define BITMAPDIR "$bitmapdirs"
5651 EOF
5652 }
5653
5654
5655     echo "checking for X defines extracted by xmkmf" 1>&6
5656 echo "configure:5657: checking for X defines extracted by xmkmf" >&5
5657   rm -fr conftestdir
5658   if mkdir conftestdir; then
5659     cd conftestdir
5660     cat > Imakefile <<'EOF'
5661 xetest:
5662         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5663 EOF
5664     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5665       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5666       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5667     fi
5668     cd ..
5669     rm -fr conftestdir
5670     for word in $xmkmf_defines; do
5671       case "$word" in
5672         -D*=* ) ;;
5673         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5674               { test "$extra_verbose" = "yes" && cat << EOF
5675     Defining $word
5676 EOF
5677 cat >> confdefs.h <<EOF
5678 #define $word 1
5679 EOF
5680 }
5681  ;;
5682       esac
5683     done
5684   fi
5685
5686     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5687 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5688 echo "configure:5689: checking for X11/Intrinsic.h" >&5
5689
5690 cat > conftest.$ac_ext <<EOF
5691 #line 5692 "configure"
5692 #include "confdefs.h"
5693 #include <X11/Intrinsic.h>
5694 EOF
5695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5696 { (eval echo configure:5697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5698 if test -z "$ac_err"; then
5699   rm -rf conftest*
5700   eval "ac_cv_header_$ac_safe=yes"
5701 else
5702   echo "$ac_err" >&5
5703   echo "configure: failed program was:" >&5
5704   cat conftest.$ac_ext >&5
5705   rm -rf conftest*
5706   eval "ac_cv_header_$ac_safe=no"
5707 fi
5708 rm -f conftest*
5709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5710   echo "$ac_t""yes" 1>&6
5711   :
5712 else
5713   echo "$ac_t""no" 1>&6
5714 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5715 fi
5716
5717
5718       
5719 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5720 echo "configure:5721: checking for XOpenDisplay in -lX11" >&5
5721 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5722
5723 xe_check_libs=" -lX11 "
5724 cat > conftest.$ac_ext <<EOF
5725 #line 5726 "configure"
5726 #include "confdefs.h"
5727 /* Override any gcc2 internal prototype to avoid an error.  */
5728 /* We use char because int might match the return type of a gcc2
5729     builtin and then its argument prototype would still apply.  */
5730 char XOpenDisplay();
5731
5732 int main() {
5733 XOpenDisplay()
5734 ; return 0; }
5735 EOF
5736 if { (eval echo configure:5737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5737   rm -rf conftest*
5738   eval "ac_cv_lib_$ac_lib_var=yes"
5739 else
5740   echo "configure: failed program was:" >&5
5741   cat conftest.$ac_ext >&5
5742   rm -rf conftest*
5743   eval "ac_cv_lib_$ac_lib_var=no"
5744 fi
5745 rm -f conftest*
5746 xe_check_libs=""
5747
5748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5749   echo "$ac_t""yes" 1>&6
5750   have_lib_x11=yes
5751 else
5752   echo "$ac_t""no" 1>&6
5753 fi
5754
5755
5756   if test "$have_lib_x11" != "yes"; then
5757     
5758 xe_msg_checking="for XGetFontProperty in -lX11"
5759 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5760 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5761 echo "configure:5762: checking "$xe_msg_checking"" >&5
5762 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5763
5764 xe_check_libs=" -lX11 -b i486-linuxaout"
5765 cat > conftest.$ac_ext <<EOF
5766 #line 5767 "configure"
5767 #include "confdefs.h"
5768 /* Override any gcc2 internal prototype to avoid an error.  */
5769 /* We use char because int might match the return type of a gcc2
5770     builtin and then its argument prototype would still apply.  */
5771 char XGetFontProperty();
5772
5773 int main() {
5774 XGetFontProperty()
5775 ; return 0; }
5776 EOF
5777 if { (eval echo configure:5778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5778   rm -rf conftest*
5779   eval "ac_cv_lib_$ac_lib_var=yes"
5780 else
5781   echo "configure: failed program was:" >&5
5782   cat conftest.$ac_ext >&5
5783   rm -rf conftest*
5784   eval "ac_cv_lib_$ac_lib_var=no"
5785 fi
5786 rm -f conftest*
5787 xe_check_libs=""
5788
5789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5790   echo "$ac_t""yes" 1>&6
5791   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5792 else
5793   echo "$ac_t""no" 1>&6
5794 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5795 fi
5796
5797
5798   fi
5799   libs_x="-lX11"
5800   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5801
5802     
5803 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5804 echo "configure:5805: checking for XShapeSelectInput in -lXext" >&5
5805 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5806
5807 xe_check_libs=" -lXext "
5808 cat > conftest.$ac_ext <<EOF
5809 #line 5810 "configure"
5810 #include "confdefs.h"
5811 /* Override any gcc2 internal prototype to avoid an error.  */
5812 /* We use char because int might match the return type of a gcc2
5813     builtin and then its argument prototype would still apply.  */
5814 char XShapeSelectInput();
5815
5816 int main() {
5817 XShapeSelectInput()
5818 ; return 0; }
5819 EOF
5820 if { (eval echo configure:5821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5821   rm -rf conftest*
5822   eval "ac_cv_lib_$ac_lib_var=yes"
5823 else
5824   echo "configure: failed program was:" >&5
5825   cat conftest.$ac_ext >&5
5826   rm -rf conftest*
5827   eval "ac_cv_lib_$ac_lib_var=no"
5828 fi
5829 rm -f conftest*
5830 xe_check_libs=""
5831
5832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5833   echo "$ac_t""yes" 1>&6
5834   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5835 else
5836   echo "$ac_t""no" 1>&6
5837 fi
5838
5839
5840
5841     
5842 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5843 echo "configure:5844: checking for XtOpenDisplay in -lXt" >&5
5844 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5845
5846 xe_check_libs=" -lXt "
5847 cat > conftest.$ac_ext <<EOF
5848 #line 5849 "configure"
5849 #include "confdefs.h"
5850 /* Override any gcc2 internal prototype to avoid an error.  */
5851 /* We use char because int might match the return type of a gcc2
5852     builtin and then its argument prototype would still apply.  */
5853 char XtOpenDisplay();
5854
5855 int main() {
5856 XtOpenDisplay()
5857 ; return 0; }
5858 EOF
5859 if { (eval echo configure:5860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5860   rm -rf conftest*
5861   eval "ac_cv_lib_$ac_lib_var=yes"
5862 else
5863   echo "configure: failed program was:" >&5
5864   cat conftest.$ac_ext >&5
5865   rm -rf conftest*
5866   eval "ac_cv_lib_$ac_lib_var=no"
5867 fi
5868 rm -f conftest*
5869 xe_check_libs=""
5870
5871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5872   echo "$ac_t""yes" 1>&6
5873   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5874 else
5875   echo "$ac_t""no" 1>&6
5876 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5877 fi
5878
5879
5880
5881   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5882 echo "configure:5883: checking the version of X11 being used" >&5
5883   cat > conftest.$ac_ext <<EOF
5884 #line 5885 "configure"
5885 #include "confdefs.h"
5886 #include <X11/Intrinsic.h>
5887     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5888 EOF
5889 if { (eval echo configure:5890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5890 then
5891   ./conftest foobar; x11_release=$?
5892 else
5893   conftest_rc="$?"
5894   echo "configure: failed program was:" >&5
5895   cat conftest.$ac_ext >&5
5896   rm -fr conftest*
5897   x11_release=4
5898 fi
5899 rm -fr conftest*
5900   echo "$ac_t""R${x11_release}" 1>&6
5901   { test "$extra_verbose" = "yes" && cat << EOF
5902     Defining THIS_IS_X11R${x11_release}
5903 EOF
5904 cat >> confdefs.h <<EOF
5905 #define THIS_IS_X11R${x11_release} 1
5906 EOF
5907 }
5908
5909
5910   for ac_hdr in X11/Xlocale.h
5911 do
5912 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5913 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5914 echo "configure:5915: checking for $ac_hdr" >&5
5915
5916 cat > conftest.$ac_ext <<EOF
5917 #line 5918 "configure"
5918 #include "confdefs.h"
5919 #include <$ac_hdr>
5920 EOF
5921 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5922 { (eval echo configure:5923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5923 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5924 if test -z "$ac_err"; then
5925   rm -rf conftest*
5926   eval "ac_cv_header_$ac_safe=yes"
5927 else
5928   echo "$ac_err" >&5
5929   echo "configure: failed program was:" >&5
5930   cat conftest.$ac_ext >&5
5931   rm -rf conftest*
5932   eval "ac_cv_header_$ac_safe=no"
5933 fi
5934 rm -f conftest*
5935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5936   echo "$ac_t""yes" 1>&6
5937     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5938   { test "$extra_verbose" = "yes" && cat << EOF
5939     Defining $ac_tr_hdr
5940 EOF
5941 cat >> confdefs.h <<EOF
5942 #define $ac_tr_hdr 1
5943 EOF
5944 }
5945  
5946 else
5947   echo "$ac_t""no" 1>&6
5948 fi
5949 done
5950
5951
5952     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5953 echo "configure:5954: checking for XFree86" >&5
5954   if test -d "/usr/X386/include" -o \
5955           -f "/etc/XF86Config"    -o \
5956           -f "/etc/X11/XF86Config" -o \
5957           -f "/usr/X11R6/lib/X11/XF86Config"; then
5958     echo "$ac_t""yes" 1>&6
5959     { test "$extra_verbose" = "yes" && cat << \EOF
5960     Defining HAVE_XFREE386
5961 EOF
5962 cat >> confdefs.h <<\EOF
5963 #define HAVE_XFREE386 1
5964 EOF
5965 }
5966
5967   else
5968     echo "$ac_t""no" 1>&6
5969   fi
5970
5971     test -z "$with_xmu" && { 
5972 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5973 echo "configure:5974: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5974 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5975
5976 xe_check_libs=" -lXmu "
5977 cat > conftest.$ac_ext <<EOF
5978 #line 5979 "configure"
5979 #include "confdefs.h"
5980 /* Override any gcc2 internal prototype to avoid an error.  */
5981 /* We use char because int might match the return type of a gcc2
5982     builtin and then its argument prototype would still apply.  */
5983 char XmuReadBitmapDataFromFile();
5984
5985 int main() {
5986 XmuReadBitmapDataFromFile()
5987 ; return 0; }
5988 EOF
5989 if { (eval echo configure:5990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5990   rm -rf conftest*
5991   eval "ac_cv_lib_$ac_lib_var=yes"
5992 else
5993   echo "configure: failed program was:" >&5
5994   cat conftest.$ac_ext >&5
5995   rm -rf conftest*
5996   eval "ac_cv_lib_$ac_lib_var=no"
5997 fi
5998 rm -f conftest*
5999 xe_check_libs=""
6000
6001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6002   echo "$ac_t""yes" 1>&6
6003   with_xmu=yes
6004 else
6005   echo "$ac_t""no" 1>&6
6006 with_xmu=no
6007 fi
6008
6009  }
6010   if test "$with_xmu" = "no"; then
6011     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6012    echo "    xemacs will be linked with \"xmu.o\""
6013  fi
6014   else
6015     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6016     { test "$extra_verbose" = "yes" && cat << \EOF
6017     Defining HAVE_XMU
6018 EOF
6019 cat >> confdefs.h <<\EOF
6020 #define HAVE_XMU 1
6021 EOF
6022 }
6023
6024   fi
6025
6026       
6027 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6028 echo "configure:6029: checking for main in -lXbsd" >&5
6029 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6030
6031 xe_check_libs=" -lXbsd "
6032 cat > conftest.$ac_ext <<EOF
6033 #line 6034 "configure"
6034 #include "confdefs.h"
6035
6036 int main() {
6037 main()
6038 ; return 0; }
6039 EOF
6040 if { (eval echo configure:6041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6041   rm -rf conftest*
6042   eval "ac_cv_lib_$ac_lib_var=yes"
6043 else
6044   echo "configure: failed program was:" >&5
6045   cat conftest.$ac_ext >&5
6046   rm -rf conftest*
6047   eval "ac_cv_lib_$ac_lib_var=no"
6048 fi
6049 rm -f conftest*
6050 xe_check_libs=""
6051
6052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6053   echo "$ac_t""yes" 1>&6
6054   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6055 else
6056   echo "$ac_t""no" 1>&6
6057 fi
6058
6059
6060
6061     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6062         if test "$GCC" = "yes"; then
6063       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6064       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6065     else
6066       case "$CC" in
6067         "xlc" ) CC="xlc_r" ;;
6068         "xlC" ) CC="xlC_r" ;;
6069         "cc"  ) CC="cc_r" ;;
6070       esac
6071     fi
6072   fi
6073
6074 fi 
6075 if test "$with_msw" != "no"; then
6076   echo "checking for MS-Windows" 1>&6
6077 echo "configure:6078: checking for MS-Windows" >&5
6078   
6079 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6080 echo "configure:6081: checking for main in -lgdi32" >&5
6081 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6082
6083 xe_check_libs=" -lgdi32 "
6084 cat > conftest.$ac_ext <<EOF
6085 #line 6086 "configure"
6086 #include "confdefs.h"
6087
6088 int main() {
6089 main()
6090 ; return 0; }
6091 EOF
6092 if { (eval echo configure:6093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6093   rm -rf conftest*
6094   eval "ac_cv_lib_$ac_lib_var=yes"
6095 else
6096   echo "configure: failed program was:" >&5
6097   cat conftest.$ac_ext >&5
6098   rm -rf conftest*
6099   eval "ac_cv_lib_$ac_lib_var=no"
6100 fi
6101 rm -f conftest*
6102 xe_check_libs=""
6103
6104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6105   echo "$ac_t""yes" 1>&6
6106   with_msw=yes
6107 else
6108   echo "$ac_t""no" 1>&6
6109 fi
6110
6111
6112   if test "$with_msw" = "yes"; then
6113     { test "$extra_verbose" = "yes" && cat << \EOF
6114     Defining HAVE_MS_WINDOWS
6115 EOF
6116 cat >> confdefs.h <<\EOF
6117 #define HAVE_MS_WINDOWS 1
6118 EOF
6119 }
6120
6121     install_pp="$blddir/lib-src/installexe.sh"
6122     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
6123     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6124     if test "$window_system" != x11; then
6125         window_system=msw
6126         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6127             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6128    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6129  fi
6130         test "$with_menubars"   != "no" && with_menubars=msw \
6131             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6132    echo "    xemacs will be linked with \"menubar-msw.o\""
6133  fi
6134         test "$with_toolbars"   != "no" && with_toolbars=msw \
6135             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6136    echo "    xemacs will be linked with \"toolbar-msw.o\""
6137  fi
6138         test "$with_dialogs"   != "no" && with_dialogs=msw \
6139             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6140    echo "    xemacs will be linked with \"dialog-msw.o\""
6141  fi
6142         test "$with_widgets"   != "no" && with_widgets=msw
6143     else
6144         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6145    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6146  fi
6147         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6148    echo "    xemacs will be linked with \"menubar-msw.o\""
6149  fi
6150         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6151    echo "    xemacs will be linked with \"toolbar-msw.o\""
6152  fi
6153         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6154    echo "    xemacs will be linked with \"dialog-msw.o\""
6155  fi
6156     fi
6157         cat > conftest.$ac_ext <<EOF
6158 #line 6159 "configure"
6159 #include "confdefs.h"
6160 #include <fcntl.h>
6161     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6162 EOF
6163 if { (eval echo configure:6164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6164 then
6165   { test "$extra_verbose" = "yes" && cat << \EOF
6166     Defining HAVE_MSG_SELECT
6167 EOF
6168 cat >> confdefs.h <<\EOF
6169 #define HAVE_MSG_SELECT 1
6170 EOF
6171 }
6172
6173 else
6174   conftest_rc="$?"
6175   echo "configure: failed program was:" >&5
6176   cat conftest.$ac_ext >&5
6177 fi
6178 rm -fr conftest*
6179     const_is_losing=no
6180     with_file_coding=yes
6181     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
6182    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\""
6183  fi
6184   fi
6185 fi
6186
6187
6188
6189 test -z "$window_system" && window_system="none"
6190
6191 if test "$window_system" = "none"; then
6192   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6193   do
6194     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6195        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6196     fi
6197     eval "with_${feature}=no"
6198   done
6199 else
6200   test -z "$with_toolbars" && with_toolbars=yes
6201 fi
6202
6203 if test "$with_msw" != "yes"; then
6204   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6205   do
6206     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6207        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6208     fi
6209     eval "with_${feature}=no"
6210   done
6211 else
6212   :
6213 fi
6214
6215 if test "$with_x11" != "yes"; then
6216             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6217   do
6218     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6219        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6220     fi
6221     eval "with_${feature}=no"
6222   done
6223 fi
6224
6225 bitmapdir=
6226
6227 case "$window_system" in
6228   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6229   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6230   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6231 esac
6232
6233 case "$x_libraries" in *X11R4* )
6234   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6235   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6236 esac
6237
6238 echo "checking for WM_COMMAND option" 1>&6
6239 echo "configure:6240: checking for WM_COMMAND option" >&5;
6240 if test "$with_wmcommand" != "no"; then
6241   { test "$extra_verbose" = "yes" && cat << \EOF
6242     Defining HAVE_WMCOMMAND
6243 EOF
6244 cat >> confdefs.h <<\EOF
6245 #define HAVE_WMCOMMAND 1
6246 EOF
6247 }
6248
6249 fi
6250
6251 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6252 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6253 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6254 echo "configure:6255: checking for X11/Xauth.h" >&5
6255
6256 cat > conftest.$ac_ext <<EOF
6257 #line 6258 "configure"
6258 #include "confdefs.h"
6259 #include <X11/Xauth.h>
6260 EOF
6261 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6262 { (eval echo configure:6263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6264 if test -z "$ac_err"; then
6265   rm -rf conftest*
6266   eval "ac_cv_header_$ac_safe=yes"
6267 else
6268   echo "$ac_err" >&5
6269   echo "configure: failed program was:" >&5
6270   cat conftest.$ac_ext >&5
6271   rm -rf conftest*
6272   eval "ac_cv_header_$ac_safe=no"
6273 fi
6274 rm -f conftest*
6275 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6276   echo "$ac_t""yes" 1>&6
6277   :
6278 else
6279   echo "$ac_t""no" 1>&6
6280 with_xauth=no
6281 fi
6282  }
6283 test -z "$with_xauth" && { 
6284 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6285 echo "configure:6286: checking for XauGetAuthByAddr in -lXau" >&5
6286 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6287
6288 xe_check_libs=" -lXau "
6289 cat > conftest.$ac_ext <<EOF
6290 #line 6291 "configure"
6291 #include "confdefs.h"
6292 /* Override any gcc2 internal prototype to avoid an error.  */
6293 /* We use char because int might match the return type of a gcc2
6294     builtin and then its argument prototype would still apply.  */
6295 char XauGetAuthByAddr();
6296
6297 int main() {
6298 XauGetAuthByAddr()
6299 ; return 0; }
6300 EOF
6301 if { (eval echo configure:6302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6302   rm -rf conftest*
6303   eval "ac_cv_lib_$ac_lib_var=yes"
6304 else
6305   echo "configure: failed program was:" >&5
6306   cat conftest.$ac_ext >&5
6307   rm -rf conftest*
6308   eval "ac_cv_lib_$ac_lib_var=no"
6309 fi
6310 rm -f conftest*
6311 xe_check_libs=""
6312
6313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6314   echo "$ac_t""yes" 1>&6
6315   :
6316 else
6317   echo "$ac_t""no" 1>&6
6318 with_xauth=no
6319 fi
6320
6321  }
6322 test -z "$with_xauth" && with_xauth=yes
6323 if test "$with_xauth" = "yes"; then
6324   { test "$extra_verbose" = "yes" && cat << \EOF
6325     Defining HAVE_XAUTH
6326 EOF
6327 cat >> confdefs.h <<\EOF
6328 #define HAVE_XAUTH 1
6329 EOF
6330 }
6331
6332   
6333 T=""
6334 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
6335 libs_xauth="$T"
6336
6337 fi
6338
6339
6340
6341
6342 if test "$with_tooltalk" != "no" ; then
6343       for dir in "" "Tt/" "desktop/" ; do
6344     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6345 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6346 echo "configure:6347: checking for ${dir}tt_c.h" >&5
6347
6348 cat > conftest.$ac_ext <<EOF
6349 #line 6350 "configure"
6350 #include "confdefs.h"
6351 #include <${dir}tt_c.h>
6352 EOF
6353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6354 { (eval echo configure:6355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6356 if test -z "$ac_err"; then
6357   rm -rf conftest*
6358   eval "ac_cv_header_$ac_safe=yes"
6359 else
6360   echo "$ac_err" >&5
6361   echo "configure: failed program was:" >&5
6362   cat conftest.$ac_ext >&5
6363   rm -rf conftest*
6364   eval "ac_cv_header_$ac_safe=no"
6365 fi
6366 rm -f conftest*
6367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6368   echo "$ac_t""yes" 1>&6
6369   tt_c_h_path="${dir}tt_c.h"; break
6370 else
6371   echo "$ac_t""no" 1>&6
6372 fi
6373
6374   done
6375   if test -z "$tt_c_h_path"; then
6376     if test "$with_tooltalk" = "yes"; then
6377       (echo "$progname: Usage error:"
6378 echo " " "Unable to find required tooltalk header files."
6379 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6380     fi
6381     with_tooltalk=no
6382   fi
6383 fi
6384 if test "$with_tooltalk" != "no" ; then
6385   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6386     
6387 xe_msg_checking="for tt_message_create in -ltt"
6388 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6389 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6390 echo "configure:6391: checking "$xe_msg_checking"" >&5
6391 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6392
6393 xe_check_libs=" -ltt $extra_libs"
6394 cat > conftest.$ac_ext <<EOF
6395 #line 6396 "configure"
6396 #include "confdefs.h"
6397 /* Override any gcc2 internal prototype to avoid an error.  */
6398 /* We use char because int might match the return type of a gcc2
6399     builtin and then its argument prototype would still apply.  */
6400 char tt_message_create();
6401
6402 int main() {
6403 tt_message_create()
6404 ; return 0; }
6405 EOF
6406 if { (eval echo configure:6407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6407   rm -rf conftest*
6408   eval "ac_cv_lib_$ac_lib_var=yes"
6409 else
6410   echo "configure: failed program was:" >&5
6411   cat conftest.$ac_ext >&5
6412   rm -rf conftest*
6413   eval "ac_cv_lib_$ac_lib_var=no"
6414 fi
6415 rm -f conftest*
6416 xe_check_libs=""
6417
6418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6419   echo "$ac_t""yes" 1>&6
6420   tt_libs="-ltt $extra_libs"; break
6421 else
6422   echo "$ac_t""no" 1>&6
6423 :
6424 fi
6425
6426
6427   done
6428   if test -z "$tt_libs"; then
6429     if test "$with_tooltalk" = "yes"; then
6430       (echo "$progname: Usage error:"
6431 echo " " "Unable to find required tooltalk libraries."
6432 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6433     fi
6434     with_tooltalk=no
6435   fi
6436 fi
6437 test -z "$with_tooltalk" && with_tooltalk=yes
6438 if test "$with_tooltalk" = "yes"; then
6439   { test "$extra_verbose" = "yes" && cat << \EOF
6440     Defining TOOLTALK
6441 EOF
6442 cat >> confdefs.h <<\EOF
6443 #define TOOLTALK 1
6444 EOF
6445 }
6446
6447   { test "$extra_verbose" = "yes" && cat << EOF
6448     Defining TT_C_H_PATH = "$tt_c_h_path"
6449 EOF
6450 cat >> confdefs.h <<EOF
6451 #define TT_C_H_PATH "$tt_c_h_path"
6452 EOF
6453 }
6454
6455   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6456   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6457    echo "    xemacs will be linked with \"tooltalk.o\""
6458  fi
6459 fi
6460
6461 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6462 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6463 echo "configure:6464: checking for Dt/Dt.h" >&5
6464
6465 cat > conftest.$ac_ext <<EOF
6466 #line 6467 "configure"
6467 #include "confdefs.h"
6468 #include <Dt/Dt.h>
6469 EOF
6470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6471 { (eval echo configure:6472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6473 if test -z "$ac_err"; then
6474   rm -rf conftest*
6475   eval "ac_cv_header_$ac_safe=yes"
6476 else
6477   echo "$ac_err" >&5
6478   echo "configure: failed program was:" >&5
6479   cat conftest.$ac_ext >&5
6480   rm -rf conftest*
6481   eval "ac_cv_header_$ac_safe=no"
6482 fi
6483 rm -f conftest*
6484 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6485   echo "$ac_t""yes" 1>&6
6486   :
6487 else
6488   echo "$ac_t""no" 1>&6
6489 with_cde=no
6490 fi
6491  }
6492 test -z "$with_cde" && { 
6493 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6494 echo "configure:6495: checking for DtDndDragStart in -lDtSvc" >&5
6495 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6496
6497 xe_check_libs=" -lDtSvc "
6498 cat > conftest.$ac_ext <<EOF
6499 #line 6500 "configure"
6500 #include "confdefs.h"
6501 /* Override any gcc2 internal prototype to avoid an error.  */
6502 /* We use char because int might match the return type of a gcc2
6503     builtin and then its argument prototype would still apply.  */
6504 char DtDndDragStart();
6505
6506 int main() {
6507 DtDndDragStart()
6508 ; return 0; }
6509 EOF
6510 if { (eval echo configure:6511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6511   rm -rf conftest*
6512   eval "ac_cv_lib_$ac_lib_var=yes"
6513 else
6514   echo "configure: failed program was:" >&5
6515   cat conftest.$ac_ext >&5
6516   rm -rf conftest*
6517   eval "ac_cv_lib_$ac_lib_var=no"
6518 fi
6519 rm -f conftest*
6520 xe_check_libs=""
6521
6522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6523   echo "$ac_t""yes" 1>&6
6524   :
6525 else
6526   echo "$ac_t""no" 1>&6
6527 with_cde=no
6528 fi
6529
6530  }
6531 test -z "$with_cde" && with_cde=yes
6532 if test "$with_dragndrop" = no; then
6533   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6534   with_cde=no
6535 fi
6536 if test "$with_cde" = "yes" ; then
6537   { test "$extra_verbose" = "yes" && cat << \EOF
6538     Defining HAVE_CDE
6539 EOF
6540 cat >> confdefs.h <<\EOF
6541 #define HAVE_CDE 1
6542 EOF
6543 }
6544
6545   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6546   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6547   with_tooltalk=yes # CDE requires Tooltalk
6548   need_motif=yes    # CDE requires Motif
6549 fi
6550
6551 test "$window_system" != "x11" && with_offix=no
6552 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6553   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6554   with_offix=no
6555 fi
6556 if test "$with_dragndrop" = no; then
6557   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6558   with_offix=no
6559 fi
6560 if test "$with_cde" = yes; then
6561   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6562   with_offix=no
6563 fi
6564 test -z "$with_offix" && with_offix=no
6565 if test "$with_offix" = "yes"; then
6566   { test "$extra_verbose" = "yes" && cat << \EOF
6567     Defining HAVE_OFFIX_DND
6568 EOF
6569 cat >> confdefs.h <<\EOF
6570 #define HAVE_OFFIX_DND 1
6571 EOF
6572 }
6573
6574   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6575   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6576 fi
6577
6578 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6579 echo "configure:6580: checking if drag and drop API is needed" >&5
6580 if test "$with_dragndrop" != "no" ; then
6581   if test -n "$dragndrop_proto" ; then
6582     with_dragndrop=yes
6583     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6584     { test "$extra_verbose" = "yes" && cat << \EOF
6585     Defining HAVE_DRAGNDROP
6586 EOF
6587 cat >> confdefs.h <<\EOF
6588 #define HAVE_DRAGNDROP 1
6589 EOF
6590 }
6591
6592     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6593   else
6594     with_dragndrop=no
6595     echo "$ac_t""no" 1>&6
6596   fi
6597 fi
6598
6599 echo "checking for LDAP" 1>&6
6600 echo "configure:6601: checking for LDAP" >&5
6601 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6602 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6603 echo "configure:6604: checking for ldap.h" >&5
6604
6605 cat > conftest.$ac_ext <<EOF
6606 #line 6607 "configure"
6607 #include "confdefs.h"
6608 #include <ldap.h>
6609 EOF
6610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6611 { (eval echo configure:6612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6613 if test -z "$ac_err"; then
6614   rm -rf conftest*
6615   eval "ac_cv_header_$ac_safe=yes"
6616 else
6617   echo "$ac_err" >&5
6618   echo "configure: failed program was:" >&5
6619   cat conftest.$ac_ext >&5
6620   rm -rf conftest*
6621   eval "ac_cv_header_$ac_safe=no"
6622 fi
6623 rm -f conftest*
6624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6625   echo "$ac_t""yes" 1>&6
6626   :
6627 else
6628   echo "$ac_t""no" 1>&6
6629 with_ldap=no
6630 fi
6631  }
6632 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6633 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6634 echo "configure:6635: checking for lber.h" >&5
6635
6636 cat > conftest.$ac_ext <<EOF
6637 #line 6638 "configure"
6638 #include "confdefs.h"
6639 #include <lber.h>
6640 EOF
6641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6642 { (eval echo configure:6643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6644 if test -z "$ac_err"; then
6645   rm -rf conftest*
6646   eval "ac_cv_header_$ac_safe=yes"
6647 else
6648   echo "$ac_err" >&5
6649   echo "configure: failed program was:" >&5
6650   cat conftest.$ac_ext >&5
6651   rm -rf conftest*
6652   eval "ac_cv_header_$ac_safe=no"
6653 fi
6654 rm -f conftest*
6655 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6656   echo "$ac_t""yes" 1>&6
6657   :
6658 else
6659   echo "$ac_t""no" 1>&6
6660 with_ldap=no
6661 fi
6662  }
6663 if test "$with_ldap" != "no"; then
6664   
6665 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6666 echo "configure:6667: checking for ldap_search in -lldap" >&5
6667 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6668
6669 xe_check_libs=" -lldap "
6670 cat > conftest.$ac_ext <<EOF
6671 #line 6672 "configure"
6672 #include "confdefs.h"
6673 /* Override any gcc2 internal prototype to avoid an error.  */
6674 /* We use char because int might match the return type of a gcc2
6675     builtin and then its argument prototype would still apply.  */
6676 char ldap_search();
6677
6678 int main() {
6679 ldap_search()
6680 ; return 0; }
6681 EOF
6682 if { (eval echo configure:6683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6683   rm -rf conftest*
6684   eval "ac_cv_lib_$ac_lib_var=yes"
6685 else
6686   echo "configure: failed program was:" >&5
6687   cat conftest.$ac_ext >&5
6688   rm -rf conftest*
6689   eval "ac_cv_lib_$ac_lib_var=no"
6690 fi
6691 rm -f conftest*
6692 xe_check_libs=""
6693
6694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6695   echo "$ac_t""yes" 1>&6
6696   with_ldap_nolber=yes
6697 else
6698   echo "$ac_t""no" 1>&6
6699 with_ldap_nolber=no
6700 fi
6701
6702
6703   test "$with_ldap_nolber" = "no" && { 
6704 xe_msg_checking="for ldap_open in -lldap"
6705 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6706 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6707 echo "configure:6708: checking "$xe_msg_checking"" >&5
6708 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6709
6710 xe_check_libs=" -lldap -llber"
6711 cat > conftest.$ac_ext <<EOF
6712 #line 6713 "configure"
6713 #include "confdefs.h"
6714 /* Override any gcc2 internal prototype to avoid an error.  */
6715 /* We use char because int might match the return type of a gcc2
6716     builtin and then its argument prototype would still apply.  */
6717 char ldap_open();
6718
6719 int main() {
6720 ldap_open()
6721 ; return 0; }
6722 EOF
6723 if { (eval echo configure:6724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6724   rm -rf conftest*
6725   eval "ac_cv_lib_$ac_lib_var=yes"
6726 else
6727   echo "configure: failed program was:" >&5
6728   cat conftest.$ac_ext >&5
6729   rm -rf conftest*
6730   eval "ac_cv_lib_$ac_lib_var=no"
6731 fi
6732 rm -f conftest*
6733 xe_check_libs=""
6734
6735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6736   echo "$ac_t""yes" 1>&6
6737   with_ldap_lber=yes
6738 else
6739   echo "$ac_t""no" 1>&6
6740 with_ldap_lber=no
6741 fi
6742
6743  }
6744   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6745 xe_msg_checking="for ldap_open in -lldap"
6746 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6747 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6748 echo "configure:6749: checking "$xe_msg_checking"" >&5
6749 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6750
6751 xe_check_libs=" -lldap -llber -lkrb"
6752 cat > conftest.$ac_ext <<EOF
6753 #line 6754 "configure"
6754 #include "confdefs.h"
6755 /* Override any gcc2 internal prototype to avoid an error.  */
6756 /* We use char because int might match the return type of a gcc2
6757     builtin and then its argument prototype would still apply.  */
6758 char ldap_open();
6759
6760 int main() {
6761 ldap_open()
6762 ; return 0; }
6763 EOF
6764 if { (eval echo configure:6765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6765   rm -rf conftest*
6766   eval "ac_cv_lib_$ac_lib_var=yes"
6767 else
6768   echo "configure: failed program was:" >&5
6769   cat conftest.$ac_ext >&5
6770   rm -rf conftest*
6771   eval "ac_cv_lib_$ac_lib_var=no"
6772 fi
6773 rm -f conftest*
6774 xe_check_libs=""
6775
6776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6777   echo "$ac_t""yes" 1>&6
6778   with_ldap_krb=yes
6779 else
6780   echo "$ac_t""no" 1>&6
6781 with_ldap_krb=no
6782 fi
6783
6784  }
6785   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6786 xe_msg_checking="for ldap_open in -lldap"
6787 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6788 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6789 echo "configure:6790: checking "$xe_msg_checking"" >&5
6790 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6791
6792 xe_check_libs=" -lldap -llber -lkrb -ldes"
6793 cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796 /* Override any gcc2 internal prototype to avoid an error.  */
6797 /* We use char because int might match the return type of a gcc2
6798     builtin and then its argument prototype would still apply.  */
6799 char ldap_open();
6800
6801 int main() {
6802 ldap_open()
6803 ; return 0; }
6804 EOF
6805 if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6806   rm -rf conftest*
6807   eval "ac_cv_lib_$ac_lib_var=yes"
6808 else
6809   echo "configure: failed program was:" >&5
6810   cat conftest.$ac_ext >&5
6811   rm -rf conftest*
6812   eval "ac_cv_lib_$ac_lib_var=no"
6813 fi
6814 rm -f conftest*
6815 xe_check_libs=""
6816
6817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6818   echo "$ac_t""yes" 1>&6
6819   with_ldap_krbdes=yes
6820 else
6821   echo "$ac_t""no" 1>&6
6822 with_ldap_krbdes=no
6823 fi
6824
6825  }
6826   test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes
6827 fi
6828 if test "$with_ldap" = "yes"; then
6829   { test "$extra_verbose" = "yes" && cat << \EOF
6830     Defining HAVE_LDAP
6831 EOF
6832 cat >> confdefs.h <<\EOF
6833 #define HAVE_LDAP 1
6834 EOF
6835 }
6836
6837   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6838    echo "    xemacs will be linked with \"eldap.o\""
6839  fi
6840   if test "$with_ldap_nolber" = "yes" ; then
6841     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6842   else
6843     if test "$with_ldap_krb" = "yes" ; then
6844       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6845     fi
6846     if test "$with_ldap_krbdes" = "yes" ; then
6847       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
6848       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6849     fi
6850     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6851     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6852   fi
6853   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
6854 do
6855 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6856 echo "configure:6857: checking for $ac_func" >&5
6857
6858 cat > conftest.$ac_ext <<EOF
6859 #line 6860 "configure"
6860 #include "confdefs.h"
6861 /* System header to define __stub macros and hopefully few prototypes,
6862     which can conflict with char $ac_func(); below.  */
6863 #include <assert.h>
6864 /* Override any gcc2 internal prototype to avoid an error.  */
6865 /* We use char because int might match the return type of a gcc2
6866     builtin and then its argument prototype would still apply.  */
6867 char $ac_func();
6868
6869 int main() {
6870
6871 /* The GNU C library defines this for functions which it implements
6872     to always fail with ENOSYS.  Some functions are actually named
6873     something starting with __ and the normal name is an alias.  */
6874 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6875 choke me
6876 #else
6877 $ac_func();
6878 #endif
6879
6880 ; return 0; }
6881 EOF
6882 if { (eval echo configure:6883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6883   rm -rf conftest*
6884   eval "ac_cv_func_$ac_func=yes"
6885 else
6886   echo "configure: failed program was:" >&5
6887   cat conftest.$ac_ext >&5
6888   rm -rf conftest*
6889   eval "ac_cv_func_$ac_func=no"
6890 fi
6891 rm -f conftest*
6892
6893 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6894   echo "$ac_t""yes" 1>&6
6895     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6896   { test "$extra_verbose" = "yes" && cat << EOF
6897     Defining $ac_tr_func
6898 EOF
6899 cat >> confdefs.h <<EOF
6900 #define $ac_tr_func 1
6901 EOF
6902 }
6903  
6904 else
6905   echo "$ac_t""no" 1>&6
6906 fi
6907 done
6908
6909 fi
6910
6911
6912 if test "$window_system" != "none"; then
6913   echo "checking for graphics libraries" 1>&6
6914 echo "configure:6915: checking for graphics libraries" >&5
6915
6916     xpm_problem=""
6917   if test -z "$with_xpm"; then
6918     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6919 echo "configure:6920: checking for Xpm - no older than 3.4f" >&5
6920     xe_check_libs=-lXpm
6921     cat > conftest.$ac_ext <<EOF
6922 #line 6923 "configure"
6923 #include "confdefs.h"
6924 #include <X11/xpm.h>
6925     int main(int c, char **v) {
6926     return c == 1 ? 0 :
6927       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6928       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6929 EOF
6930 if { (eval echo configure:6931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6931 then
6932   ./conftest dummy_arg; xpm_status=$?;
6933       if test "$xpm_status" = "0"; then
6934         with_xpm=yes;
6935       else
6936         with_xpm=no;
6937         if test "$xpm_status" = "1"; then
6938           xpm_problem="Xpm library version and header file version don't match!"
6939         elif test "$xpm_status" = "2"; then
6940           xpm_problem="Xpm library version is too old!"
6941         else
6942           xpm_problem="Internal xpm detection logic error!"
6943         fi
6944         echo "
6945 *** WARNING *** $xpm_problem
6946   I'm not touching that with a 10-foot pole!
6947   If you really want to use the installed version of Xpm, rerun
6948   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
6949     fi
6950 else
6951   conftest_rc="$?"
6952   echo "configure: failed program was:" >&5
6953   cat conftest.$ac_ext >&5
6954   rm -fr conftest*
6955   with_xpm=no
6956 fi
6957 rm -fr conftest*
6958     xe_check_libs=
6959     echo "$ac_t""$with_xpm" 1>&6
6960   fi
6961   if test "$with_xpm" = "yes"; then
6962     { test "$extra_verbose" = "yes" && cat << \EOF
6963     Defining HAVE_XPM
6964 EOF
6965 cat >> confdefs.h <<\EOF
6966 #define HAVE_XPM 1
6967 EOF
6968 }
6969
6970     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6971     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6972 echo "configure:6973: checking for \"FOR_MSW\" xpm" >&5
6973     xe_check_libs=-lXpm
6974     cat > conftest.$ac_ext <<EOF
6975 #line 6976 "configure"
6976 #include "confdefs.h"
6977
6978 int main() {
6979 XpmCreatePixmapFromData()
6980 ; return 0; }
6981 EOF
6982 if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6983   rm -rf conftest*
6984   xpm_for_msw=no
6985 else
6986   echo "configure: failed program was:" >&5
6987   cat conftest.$ac_ext >&5
6988   rm -rf conftest*
6989   xpm_for_msw=yes
6990 fi
6991 rm -f conftest*
6992     xe_check_libs=
6993     echo "$ac_t""$xpm_for_msw" 1>&6
6994     if test "$xpm_for_msw" = "yes"; then
6995       { test "$extra_verbose" = "yes" && cat << \EOF
6996     Defining FOR_MSW
6997 EOF
6998 cat >> confdefs.h <<\EOF
6999 #define FOR_MSW 1
7000 EOF
7001 }
7002
7003     fi
7004   fi
7005
7006     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7007 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7008 echo "configure:7009: checking for compface.h" >&5
7009
7010 cat > conftest.$ac_ext <<EOF
7011 #line 7012 "configure"
7012 #include "confdefs.h"
7013 #include <compface.h>
7014 EOF
7015 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7016 { (eval echo configure:7017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7017 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7018 if test -z "$ac_err"; then
7019   rm -rf conftest*
7020   eval "ac_cv_header_$ac_safe=yes"
7021 else
7022   echo "$ac_err" >&5
7023   echo "configure: failed program was:" >&5
7024   cat conftest.$ac_ext >&5
7025   rm -rf conftest*
7026   eval "ac_cv_header_$ac_safe=no"
7027 fi
7028 rm -f conftest*
7029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7030   echo "$ac_t""yes" 1>&6
7031   :
7032 else
7033   echo "$ac_t""no" 1>&6
7034 with_xface=no
7035 fi
7036  }
7037   test -z "$with_xface" && { 
7038 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7039 echo "configure:7040: checking for UnGenFace in -lcompface" >&5
7040 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7041
7042 xe_check_libs=" -lcompface "
7043 cat > conftest.$ac_ext <<EOF
7044 #line 7045 "configure"
7045 #include "confdefs.h"
7046 /* Override any gcc2 internal prototype to avoid an error.  */
7047 /* We use char because int might match the return type of a gcc2
7048     builtin and then its argument prototype would still apply.  */
7049 char UnGenFace();
7050
7051 int main() {
7052 UnGenFace()
7053 ; return 0; }
7054 EOF
7055 if { (eval echo configure:7056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7056   rm -rf conftest*
7057   eval "ac_cv_lib_$ac_lib_var=yes"
7058 else
7059   echo "configure: failed program was:" >&5
7060   cat conftest.$ac_ext >&5
7061   rm -rf conftest*
7062   eval "ac_cv_lib_$ac_lib_var=no"
7063 fi
7064 rm -f conftest*
7065 xe_check_libs=""
7066
7067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7068   echo "$ac_t""yes" 1>&6
7069   : 
7070 else
7071   echo "$ac_t""no" 1>&6
7072 with_xface=no
7073 fi
7074
7075  }
7076   test -z "$with_xface" && with_xface=yes
7077   if test "$with_xface" = "yes"; then
7078     { test "$extra_verbose" = "yes" && cat << \EOF
7079     Defining HAVE_XFACE
7080 EOF
7081 cat >> confdefs.h <<\EOF
7082 #define HAVE_XFACE 1
7083 EOF
7084 }
7085
7086     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7087   fi
7088
7089         if test "$with_gif" != "no"; then
7090     with_gif="yes"
7091     { test "$extra_verbose" = "yes" && cat << \EOF
7092     Defining HAVE_GIF
7093 EOF
7094 cat >> confdefs.h <<\EOF
7095 #define HAVE_GIF 1
7096 EOF
7097 }
7098
7099     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7100    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7101  fi
7102   fi
7103
7104       if test "$with_png $with_tiff" != "no no"; then
7105     
7106 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7107 echo "configure:7108: checking for inflate in -lc" >&5
7108 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7109
7110 xe_check_libs=" -lc "
7111 cat > conftest.$ac_ext <<EOF
7112 #line 7113 "configure"
7113 #include "confdefs.h"
7114 /* Override any gcc2 internal prototype to avoid an error.  */
7115 /* We use char because int might match the return type of a gcc2
7116     builtin and then its argument prototype would still apply.  */
7117 char inflate();
7118
7119 int main() {
7120 inflate()
7121 ; return 0; }
7122 EOF
7123 if { (eval echo configure:7124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7124   rm -rf conftest*
7125   eval "ac_cv_lib_$ac_lib_var=yes"
7126 else
7127   echo "configure: failed program was:" >&5
7128   cat conftest.$ac_ext >&5
7129   rm -rf conftest*
7130   eval "ac_cv_lib_$ac_lib_var=no"
7131 fi
7132 rm -f conftest*
7133 xe_check_libs=""
7134
7135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7136   echo "$ac_t""yes" 1>&6
7137   :
7138 else
7139   echo "$ac_t""no" 1>&6
7140
7141 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7142 echo "configure:7143: checking for inflate in -lz" >&5
7143 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7144
7145 xe_check_libs=" -lz "
7146 cat > conftest.$ac_ext <<EOF
7147 #line 7148 "configure"
7148 #include "confdefs.h"
7149 /* Override any gcc2 internal prototype to avoid an error.  */
7150 /* We use char because int might match the return type of a gcc2
7151     builtin and then its argument prototype would still apply.  */
7152 char inflate();
7153
7154 int main() {
7155 inflate()
7156 ; return 0; }
7157 EOF
7158 if { (eval echo configure:7159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7159   rm -rf conftest*
7160   eval "ac_cv_lib_$ac_lib_var=yes"
7161 else
7162   echo "configure: failed program was:" >&5
7163   cat conftest.$ac_ext >&5
7164   rm -rf conftest*
7165   eval "ac_cv_lib_$ac_lib_var=no"
7166 fi
7167 rm -f conftest*
7168 xe_check_libs=""
7169
7170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7171   echo "$ac_t""yes" 1>&6
7172   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7173 else
7174   echo "$ac_t""no" 1>&6
7175
7176 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7177 echo "configure:7178: checking for inflate in -lgz" >&5
7178 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7179
7180 xe_check_libs=" -lgz "
7181 cat > conftest.$ac_ext <<EOF
7182 #line 7183 "configure"
7183 #include "confdefs.h"
7184 /* Override any gcc2 internal prototype to avoid an error.  */
7185 /* We use char because int might match the return type of a gcc2
7186     builtin and then its argument prototype would still apply.  */
7187 char inflate();
7188
7189 int main() {
7190 inflate()
7191 ; return 0; }
7192 EOF
7193 if { (eval echo configure:7194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7194   rm -rf conftest*
7195   eval "ac_cv_lib_$ac_lib_var=yes"
7196 else
7197   echo "configure: failed program was:" >&5
7198   cat conftest.$ac_ext >&5
7199   rm -rf conftest*
7200   eval "ac_cv_lib_$ac_lib_var=no"
7201 fi
7202 rm -f conftest*
7203 xe_check_libs=""
7204
7205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7206   echo "$ac_t""yes" 1>&6
7207   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7208 else
7209   echo "$ac_t""no" 1>&6
7210 fi
7211
7212
7213 fi
7214
7215
7216 fi
7217
7218
7219   fi
7220
7221     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7222 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7223 echo "configure:7224: checking for jpeglib.h" >&5
7224
7225 cat > conftest.$ac_ext <<EOF
7226 #line 7227 "configure"
7227 #include "confdefs.h"
7228 #include <jpeglib.h>
7229 EOF
7230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7231 { (eval echo configure:7232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7233 if test -z "$ac_err"; then
7234   rm -rf conftest*
7235   eval "ac_cv_header_$ac_safe=yes"
7236 else
7237   echo "$ac_err" >&5
7238   echo "configure: failed program was:" >&5
7239   cat conftest.$ac_ext >&5
7240   rm -rf conftest*
7241   eval "ac_cv_header_$ac_safe=no"
7242 fi
7243 rm -f conftest*
7244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7245   echo "$ac_t""yes" 1>&6
7246   :
7247 else
7248   echo "$ac_t""no" 1>&6
7249 with_jpeg=no
7250 fi
7251  }
7252   test -z "$with_jpeg" && { 
7253 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7254 echo "configure:7255: checking for jpeg_destroy_decompress in -ljpeg" >&5
7255 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7256
7257 xe_check_libs=" -ljpeg "
7258 cat > conftest.$ac_ext <<EOF
7259 #line 7260 "configure"
7260 #include "confdefs.h"
7261 /* Override any gcc2 internal prototype to avoid an error.  */
7262 /* We use char because int might match the return type of a gcc2
7263     builtin and then its argument prototype would still apply.  */
7264 char jpeg_destroy_decompress();
7265
7266 int main() {
7267 jpeg_destroy_decompress()
7268 ; return 0; }
7269 EOF
7270 if { (eval echo configure:7271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7271   rm -rf conftest*
7272   eval "ac_cv_lib_$ac_lib_var=yes"
7273 else
7274   echo "configure: failed program was:" >&5
7275   cat conftest.$ac_ext >&5
7276   rm -rf conftest*
7277   eval "ac_cv_lib_$ac_lib_var=no"
7278 fi
7279 rm -f conftest*
7280 xe_check_libs=""
7281
7282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7283   echo "$ac_t""yes" 1>&6
7284   :
7285 else
7286   echo "$ac_t""no" 1>&6
7287 with_jpeg=no
7288 fi
7289
7290  }
7291   test -z "$with_jpeg" && with_jpeg=yes
7292   if test "$with_jpeg" = "yes"; then
7293     { test "$extra_verbose" = "yes" && cat << \EOF
7294     Defining HAVE_JPEG
7295 EOF
7296 cat >> confdefs.h <<\EOF
7297 #define HAVE_JPEG 1
7298 EOF
7299 }
7300
7301     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7302   fi
7303
7304     png_problem=""
7305   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7306 echo "configure:7307: checking for pow" >&5
7307
7308 cat > conftest.$ac_ext <<EOF
7309 #line 7310 "configure"
7310 #include "confdefs.h"
7311 /* System header to define __stub macros and hopefully few prototypes,
7312     which can conflict with char pow(); below.  */
7313 #include <assert.h>
7314 /* Override any gcc2 internal prototype to avoid an error.  */
7315 /* We use char because int might match the return type of a gcc2
7316     builtin and then its argument prototype would still apply.  */
7317 char pow();
7318
7319 int main() {
7320
7321 /* The GNU C library defines this for functions which it implements
7322     to always fail with ENOSYS.  Some functions are actually named
7323     something starting with __ and the normal name is an alias.  */
7324 #if defined (__stub_pow) || defined (__stub___pow)
7325 choke me
7326 #else
7327 pow();
7328 #endif
7329
7330 ; return 0; }
7331 EOF
7332 if { (eval echo configure:7333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7333   rm -rf conftest*
7334   eval "ac_cv_func_pow=yes"
7335 else
7336   echo "configure: failed program was:" >&5
7337   cat conftest.$ac_ext >&5
7338   rm -rf conftest*
7339   eval "ac_cv_func_pow=no"
7340 fi
7341 rm -f conftest*
7342
7343 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7344   echo "$ac_t""yes" 1>&6
7345   :
7346 else
7347   echo "$ac_t""no" 1>&6
7348 with_png=no
7349 fi
7350  }
7351   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7352 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7353 echo "configure:7354: checking for png.h" >&5
7354
7355 cat > conftest.$ac_ext <<EOF
7356 #line 7357 "configure"
7357 #include "confdefs.h"
7358 #include <png.h>
7359 EOF
7360 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7361 { (eval echo configure:7362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7362 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7363 if test -z "$ac_err"; then
7364   rm -rf conftest*
7365   eval "ac_cv_header_$ac_safe=yes"
7366 else
7367   echo "$ac_err" >&5
7368   echo "configure: failed program was:" >&5
7369   cat conftest.$ac_ext >&5
7370   rm -rf conftest*
7371   eval "ac_cv_header_$ac_safe=no"
7372 fi
7373 rm -f conftest*
7374 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7375   echo "$ac_t""yes" 1>&6
7376   :
7377 else
7378   echo "$ac_t""no" 1>&6
7379 with_png=no
7380 fi
7381  }
7382   test -z "$with_png" && { 
7383 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7384 echo "configure:7385: checking for png_read_image in -lpng" >&5
7385 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7386
7387 xe_check_libs=" -lpng "
7388 cat > conftest.$ac_ext <<EOF
7389 #line 7390 "configure"
7390 #include "confdefs.h"
7391 /* Override any gcc2 internal prototype to avoid an error.  */
7392 /* We use char because int might match the return type of a gcc2
7393     builtin and then its argument prototype would still apply.  */
7394 char png_read_image();
7395
7396 int main() {
7397 png_read_image()
7398 ; return 0; }
7399 EOF
7400 if { (eval echo configure:7401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7401   rm -rf conftest*
7402   eval "ac_cv_lib_$ac_lib_var=yes"
7403 else
7404   echo "configure: failed program was:" >&5
7405   cat conftest.$ac_ext >&5
7406   rm -rf conftest*
7407   eval "ac_cv_lib_$ac_lib_var=no"
7408 fi
7409 rm -f conftest*
7410 xe_check_libs=""
7411
7412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7413   echo "$ac_t""yes" 1>&6
7414   :
7415 else
7416   echo "$ac_t""no" 1>&6
7417 with_png=no
7418 fi
7419
7420  }
7421   if test -z "$with_png"; then
7422     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7423 echo "configure:7424: checking for workable png version information" >&5
7424     xe_check_libs="-lpng -lz"
7425     cat > conftest.$ac_ext <<EOF
7426 #line 7427 "configure"
7427 #include "confdefs.h"
7428 #include <png.h>
7429     int main(int c, char **v) {
7430     if (c == 1) return 0;
7431     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7432     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7433 EOF
7434 if { (eval echo configure:7435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7435 then
7436   ./conftest dummy_arg; png_status=$?;
7437       if test "$png_status" = "0"; then
7438         with_png=yes;
7439       else
7440         with_png=no;
7441         if test "$png_status" = "1"; then
7442           png_problem="PNG library version and header file don't match!"
7443         elif test "$png_status" = "2"; then
7444           png_problem="PNG library version too old (pre 1.0.2)!"
7445         fi
7446         echo "
7447 *** WARNING *** $png_problem
7448   I'm not touching that with a 10-foot pole!
7449   If you really want to use the installed version of libPNG, rerun
7450   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7451     fi
7452 else
7453   conftest_rc="$?"
7454   echo "configure: failed program was:" >&5
7455   cat conftest.$ac_ext >&5
7456   rm -fr conftest*
7457   with_png=no
7458 fi
7459 rm -fr conftest*
7460     xe_check_libs=
7461     echo "$ac_t""$with_png" 1>&6
7462   fi
7463   if test "$with_png" = "yes"; then
7464     { test "$extra_verbose" = "yes" && cat << \EOF
7465     Defining HAVE_PNG
7466 EOF
7467 cat >> confdefs.h <<\EOF
7468 #define HAVE_PNG 1
7469 EOF
7470 }
7471
7472     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7473   fi
7474
7475     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7476 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7477 echo "configure:7478: checking for tiffio.h" >&5
7478
7479 cat > conftest.$ac_ext <<EOF
7480 #line 7481 "configure"
7481 #include "confdefs.h"
7482 #include <tiffio.h>
7483 EOF
7484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7485 { (eval echo configure:7486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7487 if test -z "$ac_err"; then
7488   rm -rf conftest*
7489   eval "ac_cv_header_$ac_safe=yes"
7490 else
7491   echo "$ac_err" >&5
7492   echo "configure: failed program was:" >&5
7493   cat conftest.$ac_ext >&5
7494   rm -rf conftest*
7495   eval "ac_cv_header_$ac_safe=no"
7496 fi
7497 rm -f conftest*
7498 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7499   echo "$ac_t""yes" 1>&6
7500   :
7501 else
7502   echo "$ac_t""no" 1>&6
7503 with_tiff=no
7504 fi
7505  }
7506   test -z "$with_tiff" && { 
7507 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7508 echo "configure:7509: checking for TIFFClientOpen in -ltiff" >&5
7509 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7510
7511 xe_check_libs=" -ltiff "
7512 cat > conftest.$ac_ext <<EOF
7513 #line 7514 "configure"
7514 #include "confdefs.h"
7515 /* Override any gcc2 internal prototype to avoid an error.  */
7516 /* We use char because int might match the return type of a gcc2
7517     builtin and then its argument prototype would still apply.  */
7518 char TIFFClientOpen();
7519
7520 int main() {
7521 TIFFClientOpen()
7522 ; return 0; }
7523 EOF
7524 if { (eval echo configure:7525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7525   rm -rf conftest*
7526   eval "ac_cv_lib_$ac_lib_var=yes"
7527 else
7528   echo "configure: failed program was:" >&5
7529   cat conftest.$ac_ext >&5
7530   rm -rf conftest*
7531   eval "ac_cv_lib_$ac_lib_var=no"
7532 fi
7533 rm -f conftest*
7534 xe_check_libs=""
7535
7536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7537   echo "$ac_t""yes" 1>&6
7538   :
7539 else
7540   echo "$ac_t""no" 1>&6
7541 with_tiff=no
7542 fi
7543
7544  }
7545   test -z "$with_tiff" && with_tiff=yes
7546   if test "$with_tiff" = "yes"; then
7547     { test "$extra_verbose" = "yes" && cat << \EOF
7548     Defining HAVE_TIFF
7549 EOF
7550 cat >> confdefs.h <<\EOF
7551 #define HAVE_TIFF 1
7552 EOF
7553 }
7554
7555     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7556   fi
7557 fi
7558
7559
7560 if test "$with_x11" = "yes"; then
7561
7562   echo "checking for X11 graphics libraries" 1>&6
7563 echo "configure:7564: checking for X11 graphics libraries" >&5
7564
7565   echo "checking for the Athena widgets" 1>&6
7566 echo "configure:7567: checking for the Athena widgets" >&5
7567
7568     case "$with_athena" in
7569         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
7570     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
7571     "next")     athena_variant=neXtaw   athena_3d=yes ;;
7572     "95")       athena_variant=Xaw95    athena_3d=yes ;;
7573     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
7574     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
7575   esac
7576
7577     if test "$athena_3d" = "no"; then
7578     
7579 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
7580 echo "configure:7581: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
7581 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7582
7583 xe_check_libs=" -l$athena_variant "
7584 cat > conftest.$ac_ext <<EOF
7585 #line 7586 "configure"
7586 #include "confdefs.h"
7587 /* Override any gcc2 internal prototype to avoid an error.  */
7588 /* We use char because int might match the return type of a gcc2
7589     builtin and then its argument prototype would still apply.  */
7590 char XawScrollbarSetThumb();
7591
7592 int main() {
7593 XawScrollbarSetThumb()
7594 ; return 0; }
7595 EOF
7596 if { (eval echo configure:7597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7597   rm -rf conftest*
7598   eval "ac_cv_lib_$ac_lib_var=yes"
7599 else
7600   echo "configure: failed program was:" >&5
7601   cat conftest.$ac_ext >&5
7602   rm -rf conftest*
7603   eval "ac_cv_lib_$ac_lib_var=no"
7604 fi
7605 rm -f conftest*
7606 xe_check_libs=""
7607
7608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7609   echo "$ac_t""yes" 1>&6
7610           
7611 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7612 echo "configure:7613: checking for threeDClassRec in -l$athena_variant" >&5
7613 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7614
7615 xe_check_libs=" -l$athena_variant "
7616 cat > conftest.$ac_ext <<EOF
7617 #line 7618 "configure"
7618 #include "confdefs.h"
7619 /* Override any gcc2 internal prototype to avoid an error.  */
7620 /* We use char because int might match the return type of a gcc2
7621     builtin and then its argument prototype would still apply.  */
7622 char threeDClassRec();
7623
7624 int main() {
7625 threeDClassRec()
7626 ; return 0; }
7627 EOF
7628 if { (eval echo configure:7629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7629   rm -rf conftest*
7630   eval "ac_cv_lib_$ac_lib_var=yes"
7631 else
7632   echo "configure: failed program was:" >&5
7633   cat conftest.$ac_ext >&5
7634   rm -rf conftest*
7635   eval "ac_cv_lib_$ac_lib_var=no"
7636 fi
7637 rm -f conftest*
7638 xe_check_libs=""
7639
7640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7641   echo "$ac_t""yes" 1>&6
7642   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
7643 else
7644   echo "$ac_t""no" 1>&6
7645 athena_lib=$athena_variant
7646 fi
7647
7648
7649       
7650 else
7651   echo "$ac_t""no" 1>&6
7652 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
7653 fi
7654
7655
7656   else
7657         
7658 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7659 echo "configure:7660: checking for threeDClassRec in -l$athena_variant" >&5
7660 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7661
7662 xe_check_libs=" -l$athena_variant "
7663 cat > conftest.$ac_ext <<EOF
7664 #line 7665 "configure"
7665 #include "confdefs.h"
7666 /* Override any gcc2 internal prototype to avoid an error.  */
7667 /* We use char because int might match the return type of a gcc2
7668     builtin and then its argument prototype would still apply.  */
7669 char threeDClassRec();
7670
7671 int main() {
7672 threeDClassRec()
7673 ; return 0; }
7674 EOF
7675 if { (eval echo configure:7676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7676   rm -rf conftest*
7677   eval "ac_cv_lib_$ac_lib_var=yes"
7678 else
7679   echo "configure: failed program was:" >&5
7680   cat conftest.$ac_ext >&5
7681   rm -rf conftest*
7682   eval "ac_cv_lib_$ac_lib_var=no"
7683 fi
7684 rm -f conftest*
7685 xe_check_libs=""
7686
7687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7688   echo "$ac_t""yes" 1>&6
7689   athena_lib=$athena_variant
7690 else
7691   echo "$ac_t""no" 1>&6
7692 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
7693 echo "configure:7694: checking for threeDClassRec in -lXaw" >&5
7694 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
7695
7696 xe_check_libs=" -lXaw "
7697 cat > conftest.$ac_ext <<EOF
7698 #line 7699 "configure"
7699 #include "confdefs.h"
7700 /* Override any gcc2 internal prototype to avoid an error.  */
7701 /* We use char because int might match the return type of a gcc2
7702     builtin and then its argument prototype would still apply.  */
7703 char threeDClassRec();
7704
7705 int main() {
7706 threeDClassRec()
7707 ; return 0; }
7708 EOF
7709 if { (eval echo configure:7710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7710   rm -rf conftest*
7711   eval "ac_cv_lib_$ac_lib_var=yes"
7712 else
7713   echo "configure: failed program was:" >&5
7714   cat conftest.$ac_ext >&5
7715   rm -rf conftest*
7716   eval "ac_cv_lib_$ac_lib_var=no"
7717 fi
7718 rm -f conftest*
7719 xe_check_libs=""
7720
7721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7722   echo "$ac_t""yes" 1>&6
7723   athena_lib=Xaw; 
7724           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
7725         
7726 else
7727   echo "$ac_t""no" 1>&6
7728 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
7729 fi
7730
7731
7732 fi
7733
7734
7735   fi
7736
7737     if test "$athena_3d" = "no"; then
7738     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
7739 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
7740 echo "configure:7741: checking for X11/Xaw/ThreeD.h" >&5
7741
7742 cat > conftest.$ac_ext <<EOF
7743 #line 7744 "configure"
7744 #include "confdefs.h"
7745 #include <X11/Xaw/ThreeD.h>
7746 EOF
7747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7748 { (eval echo configure:7749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7750 if test -z "$ac_err"; then
7751   rm -rf conftest*
7752   eval "ac_cv_header_$ac_safe=yes"
7753 else
7754   echo "$ac_err" >&5
7755   echo "configure: failed program was:" >&5
7756   cat conftest.$ac_ext >&5
7757   rm -rf conftest*
7758   eval "ac_cv_header_$ac_safe=no"
7759 fi
7760 rm -f conftest*
7761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7762   echo "$ac_t""yes" 1>&6
7763   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7764 else
7765   echo "$ac_t""no" 1>&6
7766 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
7767 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
7768 echo "configure:7769: checking for X11/Xaw/XawInit.h" >&5
7769
7770 cat > conftest.$ac_ext <<EOF
7771 #line 7772 "configure"
7772 #include "confdefs.h"
7773 #include <X11/Xaw/XawInit.h>
7774 EOF
7775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7776 { (eval echo configure:7777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7778 if test -z "$ac_err"; then
7779   rm -rf conftest*
7780   eval "ac_cv_header_$ac_safe=yes"
7781 else
7782   echo "$ac_err" >&5
7783   echo "configure: failed program was:" >&5
7784   cat conftest.$ac_ext >&5
7785   rm -rf conftest*
7786   eval "ac_cv_header_$ac_safe=no"
7787 fi
7788 rm -f conftest*
7789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7790   echo "$ac_t""yes" 1>&6
7791   athena_h_path=X11/Xaw
7792 else
7793   echo "$ac_t""no" 1>&6
7794 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7795 fi
7796
7797 fi
7798
7799   else
7800             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
7801 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
7802 echo "configure:7803: checking for X11/$athena_variant/XawInit.h" >&5
7803
7804 cat > conftest.$ac_ext <<EOF
7805 #line 7806 "configure"
7806 #include "confdefs.h"
7807 #include <X11/$athena_variant/XawInit.h>
7808 EOF
7809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7810 { (eval echo configure:7811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7812 if test -z "$ac_err"; then
7813   rm -rf conftest*
7814   eval "ac_cv_header_$ac_safe=yes"
7815 else
7816   echo "$ac_err" >&5
7817   echo "configure: failed program was:" >&5
7818   cat conftest.$ac_ext >&5
7819   rm -rf conftest*
7820   eval "ac_cv_header_$ac_safe=no"
7821 fi
7822 rm -f conftest*
7823 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7824   echo "$ac_t""yes" 1>&6
7825   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
7826 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
7827 echo "configure:7828: checking for X11/$athena_variant/ThreeD.h" >&5
7828
7829 cat > conftest.$ac_ext <<EOF
7830 #line 7831 "configure"
7831 #include "confdefs.h"
7832 #include <X11/$athena_variant/ThreeD.h>
7833 EOF
7834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7835 { (eval echo configure:7836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7837 if test -z "$ac_err"; then
7838   rm -rf conftest*
7839   eval "ac_cv_header_$ac_safe=yes"
7840 else
7841   echo "$ac_err" >&5
7842   echo "configure: failed program was:" >&5
7843   cat conftest.$ac_ext >&5
7844   rm -rf conftest*
7845   eval "ac_cv_header_$ac_safe=no"
7846 fi
7847 rm -f conftest*
7848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7849   echo "$ac_t""yes" 1>&6
7850   athena_h_path=X11/$athena_variant
7851 else
7852   echo "$ac_t""no" 1>&6
7853 fi
7854
7855 else
7856   echo "$ac_t""no" 1>&6
7857 fi
7858
7859
7860         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
7861       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
7862 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
7863 echo "configure:7864: checking for X11/Xaw3d/XawInit.h" >&5
7864
7865 cat > conftest.$ac_ext <<EOF
7866 #line 7867 "configure"
7867 #include "confdefs.h"
7868 #include <X11/Xaw3d/XawInit.h>
7869 EOF
7870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7871 { (eval echo configure:7872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7873 if test -z "$ac_err"; then
7874   rm -rf conftest*
7875   eval "ac_cv_header_$ac_safe=yes"
7876 else
7877   echo "$ac_err" >&5
7878   echo "configure: failed program was:" >&5
7879   cat conftest.$ac_ext >&5
7880   rm -rf conftest*
7881   eval "ac_cv_header_$ac_safe=no"
7882 fi
7883 rm -f conftest*
7884 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7885   echo "$ac_t""yes" 1>&6
7886   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
7887 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
7888 echo "configure:7889: checking for X11/Xaw3d/ThreeD.h" >&5
7889
7890 cat > conftest.$ac_ext <<EOF
7891 #line 7892 "configure"
7892 #include "confdefs.h"
7893 #include <X11/Xaw3d/ThreeD.h>
7894 EOF
7895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7896 { (eval echo configure:7897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7898 if test -z "$ac_err"; then
7899   rm -rf conftest*
7900   eval "ac_cv_header_$ac_safe=yes"
7901 else
7902   echo "$ac_err" >&5
7903   echo "configure: failed program was:" >&5
7904   cat conftest.$ac_ext >&5
7905   rm -rf conftest*
7906   eval "ac_cv_header_$ac_safe=no"
7907 fi
7908 rm -f conftest*
7909 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7910   echo "$ac_t""yes" 1>&6
7911   
7912             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
7913             athena_h_path=X11/Xaw3d
7914           
7915 else
7916   echo "$ac_t""no" 1>&6
7917 fi
7918
7919 else
7920   echo "$ac_t""no" 1>&6
7921 fi
7922
7923     fi
7924
7925             if test -z "$athena_h_path"; then
7926       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
7927 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
7928 echo "configure:7929: checking for X11/Xaw/ThreeD.h" >&5
7929
7930 cat > conftest.$ac_ext <<EOF
7931 #line 7932 "configure"
7932 #include "confdefs.h"
7933 #include <X11/Xaw/ThreeD.h>
7934 EOF
7935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7936 { (eval echo configure:7937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7938 if test -z "$ac_err"; then
7939   rm -rf conftest*
7940   eval "ac_cv_header_$ac_safe=yes"
7941 else
7942   echo "$ac_err" >&5
7943   echo "configure: failed program was:" >&5
7944   cat conftest.$ac_ext >&5
7945   rm -rf conftest*
7946   eval "ac_cv_header_$ac_safe=no"
7947 fi
7948 rm -f conftest*
7949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7950   echo "$ac_t""yes" 1>&6
7951   
7952           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
7953           athena_h_path=X11/Xaw
7954         
7955 else
7956   echo "$ac_t""no" 1>&6
7957 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
7958 fi
7959
7960     fi
7961   fi
7962
7963     if test -n "$athena_lib" -a -n "$athena_h_path"; then
7964     have_xaw=yes
7965   else
7966     have_xaw=no
7967   fi
7968
7969     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7970 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7971 echo "configure:7972: checking for Xm/Xm.h" >&5
7972
7973 cat > conftest.$ac_ext <<EOF
7974 #line 7975 "configure"
7975 #include "confdefs.h"
7976 #include <Xm/Xm.h>
7977 EOF
7978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7979 { (eval echo configure:7980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7981 if test -z "$ac_err"; then
7982   rm -rf conftest*
7983   eval "ac_cv_header_$ac_safe=yes"
7984 else
7985   echo "$ac_err" >&5
7986   echo "configure: failed program was:" >&5
7987   cat conftest.$ac_ext >&5
7988   rm -rf conftest*
7989   eval "ac_cv_header_$ac_safe=no"
7990 fi
7991 rm -f conftest*
7992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7993   echo "$ac_t""yes" 1>&6
7994   
7995 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7996 echo "configure:7997: checking for XmStringFree in -lXm" >&5
7997 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7998
7999 xe_check_libs=" -lXm "
8000 cat > conftest.$ac_ext <<EOF
8001 #line 8002 "configure"
8002 #include "confdefs.h"
8003 /* Override any gcc2 internal prototype to avoid an error.  */
8004 /* We use char because int might match the return type of a gcc2
8005     builtin and then its argument prototype would still apply.  */
8006 char XmStringFree();
8007
8008 int main() {
8009 XmStringFree()
8010 ; return 0; }
8011 EOF
8012 if { (eval echo configure:8013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8013   rm -rf conftest*
8014   eval "ac_cv_lib_$ac_lib_var=yes"
8015 else
8016   echo "configure: failed program was:" >&5
8017   cat conftest.$ac_ext >&5
8018   rm -rf conftest*
8019   eval "ac_cv_lib_$ac_lib_var=no"
8020 fi
8021 rm -f conftest*
8022 xe_check_libs=""
8023
8024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8025   echo "$ac_t""yes" 1>&6
8026   have_motif=yes
8027 else
8028   echo "$ac_t""no" 1>&6
8029 have_motif=no
8030 fi
8031
8032
8033 else
8034   echo "$ac_t""no" 1>&6
8035 have_motif=no
8036 fi
8037
8038
8039   if test "$have_motif" = "yes"; then
8040         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8041 echo "configure:8042: checking for Lesstif" >&5
8042     cat > conftest.$ac_ext <<EOF
8043 #line 8044 "configure"
8044 #include "confdefs.h"
8045 #include <Xm/Xm.h>
8046 #ifdef LESSTIF_VERSION
8047 yes
8048 #endif
8049
8050 EOF
8051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8052   egrep "yes" >/dev/null 2>&1; then
8053   rm -rf conftest*
8054   have_lesstif=yes
8055 else
8056   rm -rf conftest*
8057   have_lesstif=no
8058 fi
8059 rm -f conftest*
8060
8061   echo "$ac_t""$have_lesstif" 1>&6
8062   fi
8063
8064 fi 
8065
8066 case "$with_menubars" in "" | "yes" | "athena" )
8067   with_menubars="lucid" ;;
8068 esac
8069 case "$with_dialogs" in "" | "yes" | "lucid" )
8070   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8071   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8072   else with_dialogs=no
8073   fi ;;
8074 esac
8075 case "$with_scrollbars" in "" | "yes" )
8076   with_scrollbars="lucid" ;;
8077 esac
8078 case "$with_widgets" in "" | "yes" | "lucid")
8079   if   test "$have_motif" = "yes"; then with_widgets="motif"
8080   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8081   else with_widgets=no
8082   fi ;;
8083 esac
8084
8085 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8086
8087 case "$all_widgets" in
8088   *athena* )
8089     if test "$have_xaw" != "yes"; then
8090       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8091     fi
8092
8093         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8094
8095         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8096
8097             { test "$extra_verbose" = "yes" && cat << EOF
8098     Defining ATHENA_H_PATH = $athena_h_path
8099 EOF
8100 cat >> confdefs.h <<EOF
8101 #define ATHENA_H_PATH $athena_h_path
8102 EOF
8103 }
8104
8105
8106     { test "$extra_verbose" = "yes" && cat << \EOF
8107     Defining LWLIB_USES_ATHENA
8108 EOF
8109 cat >> confdefs.h <<\EOF
8110 #define LWLIB_USES_ATHENA 1
8111 EOF
8112 }
8113
8114     { test "$extra_verbose" = "yes" && cat << \EOF
8115     Defining NEED_ATHENA
8116 EOF
8117 cat >> confdefs.h <<\EOF
8118 #define NEED_ATHENA 1
8119 EOF
8120 }
8121
8122
8123     if test "$athena_3d" = "yes"; then
8124       { test "$extra_verbose" = "yes" && cat << \EOF
8125     Defining HAVE_ATHENA_3D
8126 EOF
8127 cat >> confdefs.h <<\EOF
8128 #define HAVE_ATHENA_3D 1
8129 EOF
8130 }
8131
8132     fi
8133   ;;
8134 esac
8135
8136 case "$all_widgets" in *motif* )
8137   { test "$extra_verbose" = "yes" && cat << \EOF
8138     Defining LWLIB_USES_MOTIF
8139 EOF
8140 cat >> confdefs.h <<\EOF
8141 #define LWLIB_USES_MOTIF 1
8142 EOF
8143 }
8144
8145   { test "$extra_verbose" = "yes" && cat << \EOF
8146     Defining NEED_MOTIF
8147 EOF
8148 cat >> confdefs.h <<\EOF
8149 #define NEED_MOTIF 1
8150 EOF
8151 }
8152
8153   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8154   need_motif=yes ;;
8155 esac
8156
8157 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8158 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8159 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8160 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8161         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8162 case "$with_widgets" in athena* )
8163         lwlib_objs="$lwlib_objs xlwradio.o xlwcheckbox.o xlwgauge.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwradio.o xlwcheckbox.o xlwgauge.o\" to \$lwlib_objs"; fi;;
8164 esac
8165 case "$all_widgets" in *lucid* )
8166   { test "$extra_verbose" = "yes" && cat << \EOF
8167     Defining NEED_LUCID
8168 EOF
8169 cat >> confdefs.h <<\EOF
8170 #define NEED_LUCID 1
8171 EOF
8172 }
8173
8174   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8175 esac
8176
8177
8178
8179 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8180     Defining LWLIB_SCROLLBARS_ATHENA
8181 EOF
8182 cat >> confdefs.h <<\EOF
8183 #define LWLIB_SCROLLBARS_ATHENA 1
8184 EOF
8185 }
8186
8187 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8188     Defining LWLIB_DIALOGS_ATHENA
8189 EOF
8190 cat >> confdefs.h <<\EOF
8191 #define LWLIB_DIALOGS_ATHENA 1
8192 EOF
8193 }
8194
8195
8196 if test "$athena_3d" = "yes"; then
8197   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8198     Defining LWLIB_SCROLLBARS_ATHENA3D
8199 EOF
8200 cat >> confdefs.h <<\EOF
8201 #define LWLIB_SCROLLBARS_ATHENA3D 1
8202 EOF
8203 }
8204
8205   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8206     Defining LWLIB_DIALOGS_ATHENA3D
8207 EOF
8208 cat >> confdefs.h <<\EOF
8209 #define LWLIB_DIALOGS_ATHENA3D 1
8210 EOF
8211 }
8212
8213 fi
8214
8215 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8216     Defining LWLIB_WIDGETS_ATHENA
8217 EOF
8218 cat >> confdefs.h <<\EOF
8219 #define LWLIB_WIDGETS_ATHENA 1
8220 EOF
8221 }
8222 ;; esac
8223 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8224         { test "$extra_verbose" = "yes" && cat << \EOF
8225     Defining LWLIB_TABS_LUCID
8226 EOF
8227 cat >> confdefs.h <<\EOF
8228 #define LWLIB_TABS_LUCID 1
8229 EOF
8230 }
8231
8232
8233 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8234     Defining HAVE_MENUBARS
8235 EOF
8236 cat >> confdefs.h <<\EOF
8237 #define HAVE_MENUBARS 1
8238 EOF
8239 }
8240
8241 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8242     Defining HAVE_SCROLLBARS
8243 EOF
8244 cat >> confdefs.h <<\EOF
8245 #define HAVE_SCROLLBARS 1
8246 EOF
8247 }
8248
8249 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8250     Defining HAVE_DIALOGS
8251 EOF
8252 cat >> confdefs.h <<\EOF
8253 #define HAVE_DIALOGS 1
8254 EOF
8255 }
8256
8257 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8258     Defining HAVE_TOOLBARS
8259 EOF
8260 cat >> confdefs.h <<\EOF
8261 #define HAVE_TOOLBARS 1
8262 EOF
8263 }
8264
8265 test "$with_widgets"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8266     Defining HAVE_WIDGETS
8267 EOF
8268 cat >> confdefs.h <<\EOF
8269 #define HAVE_WIDGETS 1
8270 EOF
8271 }
8272
8273
8274 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8275     Defining LWLIB_MENUBARS_LUCID
8276 EOF
8277 cat >> confdefs.h <<\EOF
8278 #define LWLIB_MENUBARS_LUCID 1
8279 EOF
8280 }
8281
8282 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8283     Defining LWLIB_SCROLLBARS_LUCID
8284 EOF
8285 cat >> confdefs.h <<\EOF
8286 #define LWLIB_SCROLLBARS_LUCID 1
8287 EOF
8288 }
8289
8290
8291 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8292     Defining LWLIB_MENUBARS_MOTIF
8293 EOF
8294 cat >> confdefs.h <<\EOF
8295 #define LWLIB_MENUBARS_MOTIF 1
8296 EOF
8297 }
8298
8299 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8300     Defining LWLIB_SCROLLBARS_MOTIF
8301 EOF
8302 cat >> confdefs.h <<\EOF
8303 #define LWLIB_SCROLLBARS_MOTIF 1
8304 EOF
8305 }
8306
8307 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8308     Defining LWLIB_DIALOGS_MOTIF
8309 EOF
8310 cat >> confdefs.h <<\EOF
8311 #define LWLIB_DIALOGS_MOTIF 1
8312 EOF
8313 }
8314
8315 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8316     Defining LWLIB_WIDGETS_MOTIF
8317 EOF
8318 cat >> confdefs.h <<\EOF
8319 #define LWLIB_WIDGETS_MOTIF 1
8320 EOF
8321 }
8322
8323
8324 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
8325    echo "    xemacs will be linked with \"menubar.o\""
8326  fi
8327 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
8328    echo "    xemacs will be linked with \"scrollbar.o\""
8329  fi
8330 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
8331    echo "    xemacs will be linked with \"dialog.o\""
8332  fi
8333 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
8334    echo "    xemacs will be linked with \"toolbar.o\""
8335  fi
8336
8337 if test "$with_x11" = "yes"; then
8338   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
8339    echo "    xemacs will be linked with \"menubar-x.o\""
8340  fi
8341   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8342    echo "    xemacs will be linked with \"scrollbar-x.o\""
8343  fi
8344   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
8345    echo "    xemacs will be linked with \"dialog-x.o\""
8346  fi
8347   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8348    echo "    xemacs will be linked with \"toolbar-x.o\""
8349  fi
8350   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8351    echo "    xemacs will be linked with \"gui-x.o\""
8352  fi
8353 fi
8354
8355
8356 test -z "$with_mule" && with_mule=no
8357 test -z "$with_file_coding" && with_file_coding=no
8358
8359
8360 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8361   { test "$extra_verbose" = "yes" && cat << \EOF
8362     Defining FILE_CODING
8363 EOF
8364 cat >> confdefs.h <<\EOF
8365 #define FILE_CODING 1
8366 EOF
8367 }
8368
8369   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8370    echo "    xemacs will be linked with \"file-coding.o\""
8371  fi
8372 fi
8373
8374 if test "$with_mule" = "yes" ; then
8375   echo "checking for Mule-related features" 1>&6
8376 echo "configure:8377: checking for Mule-related features" >&5
8377   { test "$extra_verbose" = "yes" && cat << \EOF
8378     Defining MULE
8379 EOF
8380 cat >> confdefs.h <<\EOF
8381 #define MULE 1
8382 EOF
8383 }
8384
8385   { test "$extra_verbose" = "yes" && cat << \EOF
8386     Defining FILE_CODING
8387 EOF
8388 cat >> confdefs.h <<\EOF
8389 #define FILE_CODING 1
8390 EOF
8391 }
8392
8393   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
8394    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
8395  fi
8396   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
8397     { test "$extra_verbose" = "yes" && cat << \EOF
8398     Defining TEXT_CODING
8399 EOF
8400 cat >> confdefs.h <<\EOF
8401 #define TEXT_CODING 1
8402 EOF
8403 }
8404
8405     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
8406    echo "    xemacs will be linked with \"text-coding.o\""
8407  fi
8408   else
8409     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8410    echo "    xemacs will be linked with \"file-coding.o\""
8411  fi
8412   fi
8413     for ac_hdr in libintl.h
8414 do
8415 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8416 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8417 echo "configure:8418: checking for $ac_hdr" >&5
8418
8419 cat > conftest.$ac_ext <<EOF
8420 #line 8421 "configure"
8421 #include "confdefs.h"
8422 #include <$ac_hdr>
8423 EOF
8424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8425 { (eval echo configure:8426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8427 if test -z "$ac_err"; then
8428   rm -rf conftest*
8429   eval "ac_cv_header_$ac_safe=yes"
8430 else
8431   echo "$ac_err" >&5
8432   echo "configure: failed program was:" >&5
8433   cat conftest.$ac_ext >&5
8434   rm -rf conftest*
8435   eval "ac_cv_header_$ac_safe=no"
8436 fi
8437 rm -f conftest*
8438 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8439   echo "$ac_t""yes" 1>&6
8440     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8441   { test "$extra_verbose" = "yes" && cat << EOF
8442     Defining $ac_tr_hdr
8443 EOF
8444 cat >> confdefs.h <<EOF
8445 #define $ac_tr_hdr 1
8446 EOF
8447 }
8448  
8449 else
8450   echo "$ac_t""no" 1>&6
8451 fi
8452 done
8453
8454   
8455 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
8456 echo "configure:8457: checking for strerror in -lintl" >&5
8457 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
8458
8459 xe_check_libs=" -lintl "
8460 cat > conftest.$ac_ext <<EOF
8461 #line 8462 "configure"
8462 #include "confdefs.h"
8463 /* Override any gcc2 internal prototype to avoid an error.  */
8464 /* We use char because int might match the return type of a gcc2
8465     builtin and then its argument prototype would still apply.  */
8466 char strerror();
8467
8468 int main() {
8469 strerror()
8470 ; return 0; }
8471 EOF
8472 if { (eval echo configure:8473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8473   rm -rf conftest*
8474   eval "ac_cv_lib_$ac_lib_var=yes"
8475 else
8476   echo "configure: failed program was:" >&5
8477   cat conftest.$ac_ext >&5
8478   rm -rf conftest*
8479   eval "ac_cv_lib_$ac_lib_var=no"
8480 fi
8481 rm -f conftest*
8482 xe_check_libs=""
8483
8484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8485   echo "$ac_t""yes" 1>&6
8486     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8487     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8488   { test "$extra_verbose" = "yes" && cat << EOF
8489     Defining $ac_tr_lib
8490 EOF
8491 cat >> confdefs.h <<EOF
8492 #define $ac_tr_lib 1
8493 EOF
8494 }
8495
8496   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
8497
8498 else
8499   echo "$ac_t""no" 1>&6
8500 fi
8501
8502
8503
8504   if test "$with_utf_2000" = "yes" ; then
8505     { test "$extra_verbose" = "yes" && cat << \EOF
8506     Defining CHAR_IS_UCS4
8507 EOF
8508 cat >> confdefs.h <<\EOF
8509 #define CHAR_IS_UCS4 1
8510 EOF
8511 }
8512
8513     { test "$extra_verbose" = "yes" && cat << \EOF
8514     Defining UTF2000
8515 EOF
8516 cat >> confdefs.h <<\EOF
8517 #define UTF2000 1
8518 EOF
8519 }
8520
8521   fi
8522
8523   echo "checking for Mule input methods" 1>&6
8524 echo "configure:8525: checking for Mule input methods" >&5
8525         case "$with_xim" in "" | "yes" )
8526     echo "checking for XIM" 1>&6
8527 echo "configure:8528: checking for XIM" >&5
8528     
8529 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
8530 echo "configure:8531: checking for XOpenIM in -lX11" >&5
8531 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
8532
8533 xe_check_libs=" -lX11 "
8534 cat > conftest.$ac_ext <<EOF
8535 #line 8536 "configure"
8536 #include "confdefs.h"
8537 /* Override any gcc2 internal prototype to avoid an error.  */
8538 /* We use char because int might match the return type of a gcc2
8539     builtin and then its argument prototype would still apply.  */
8540 char XOpenIM();
8541
8542 int main() {
8543 XOpenIM()
8544 ; return 0; }
8545 EOF
8546 if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8547   rm -rf conftest*
8548   eval "ac_cv_lib_$ac_lib_var=yes"
8549 else
8550   echo "configure: failed program was:" >&5
8551   cat conftest.$ac_ext >&5
8552   rm -rf conftest*
8553   eval "ac_cv_lib_$ac_lib_var=no"
8554 fi
8555 rm -f conftest*
8556 xe_check_libs=""
8557
8558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8559   echo "$ac_t""yes" 1>&6
8560   with_xim=xlib
8561 else
8562   echo "$ac_t""no" 1>&6
8563 with_xim=no
8564 fi
8565
8566
8567         if test "$have_motif $have_lesstif" = "yes no"; then
8568       
8569 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
8570 echo "configure:8571: checking for XmImMbLookupString in -lXm" >&5
8571 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
8572
8573 xe_check_libs=" -lXm "
8574 cat > conftest.$ac_ext <<EOF
8575 #line 8576 "configure"
8576 #include "confdefs.h"
8577 /* Override any gcc2 internal prototype to avoid an error.  */
8578 /* We use char because int might match the return type of a gcc2
8579     builtin and then its argument prototype would still apply.  */
8580 char XmImMbLookupString();
8581
8582 int main() {
8583 XmImMbLookupString()
8584 ; return 0; }
8585 EOF
8586 if { (eval echo configure:8587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8587   rm -rf conftest*
8588   eval "ac_cv_lib_$ac_lib_var=yes"
8589 else
8590   echo "configure: failed program was:" >&5
8591   cat conftest.$ac_ext >&5
8592   rm -rf conftest*
8593   eval "ac_cv_lib_$ac_lib_var=no"
8594 fi
8595 rm -f conftest*
8596 xe_check_libs=""
8597
8598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8599   echo "$ac_t""yes" 1>&6
8600   with_xim=motif
8601 else
8602   echo "$ac_t""no" 1>&6
8603 fi
8604
8605
8606     fi ;;
8607   esac
8608   if test "$with_xim" != "no"; then
8609     { test "$extra_verbose" = "yes" && cat << \EOF
8610     Defining HAVE_XIM
8611 EOF
8612 cat >> confdefs.h <<\EOF
8613 #define HAVE_XIM 1
8614 EOF
8615 }
8616
8617     if test "$with_xim" = "xlib"; then
8618       { test "$extra_verbose" = "yes" && cat << \EOF
8619     Defining XIM_XLIB
8620 EOF
8621 cat >> confdefs.h <<\EOF
8622 #define XIM_XLIB 1
8623 EOF
8624 }
8625
8626       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
8627    echo "    xemacs will be linked with \"input-method-xlib.o\""
8628  fi
8629     fi
8630     if test "$with_xim" = "motif"; then
8631       { test "$extra_verbose" = "yes" && cat << \EOF
8632     Defining XIM_MOTIF
8633 EOF
8634 cat >> confdefs.h <<\EOF
8635 #define XIM_MOTIF 1
8636 EOF
8637 }
8638
8639       need_motif=yes
8640       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8641    echo "    xemacs will be linked with \"input-method-motif.o\""
8642  fi
8643     fi
8644     if test "$with_xim" = "motif"; then
8645       with_xfs=no
8646     fi
8647   fi
8648
8649     if test "$with_xfs" = "yes" ; then
8650     echo "checking for XFontSet" 1>&6
8651 echo "configure:8652: checking for XFontSet" >&5
8652     
8653 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8654 echo "configure:8655: checking for XmbDrawString in -lX11" >&5
8655 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8656
8657 xe_check_libs=" -lX11 "
8658 cat > conftest.$ac_ext <<EOF
8659 #line 8660 "configure"
8660 #include "confdefs.h"
8661 /* Override any gcc2 internal prototype to avoid an error.  */
8662 /* We use char because int might match the return type of a gcc2
8663     builtin and then its argument prototype would still apply.  */
8664 char XmbDrawString();
8665
8666 int main() {
8667 XmbDrawString()
8668 ; return 0; }
8669 EOF
8670 if { (eval echo configure:8671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8671   rm -rf conftest*
8672   eval "ac_cv_lib_$ac_lib_var=yes"
8673 else
8674   echo "configure: failed program was:" >&5
8675   cat conftest.$ac_ext >&5
8676   rm -rf conftest*
8677   eval "ac_cv_lib_$ac_lib_var=no"
8678 fi
8679 rm -f conftest*
8680 xe_check_libs=""
8681
8682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8683   echo "$ac_t""yes" 1>&6
8684   :
8685 else
8686   echo "$ac_t""no" 1>&6
8687 with_xfs=no
8688 fi
8689
8690
8691     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8692       { test "$extra_verbose" = "yes" && cat << \EOF
8693     Defining USE_XFONTSET
8694 EOF
8695 cat >> confdefs.h <<\EOF
8696 #define USE_XFONTSET 1
8697 EOF
8698 }
8699
8700       if test "$with_xim" = "no" ; then
8701         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8702    echo "    xemacs will be linked with \"input-method-xfs.o\""
8703  fi
8704       fi
8705     fi
8706   fi 
8707     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8708   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8709 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8710 echo "configure:8711: checking for wnn/jllib.h" >&5
8711
8712 cat > conftest.$ac_ext <<EOF
8713 #line 8714 "configure"
8714 #include "confdefs.h"
8715 #include <wnn/jllib.h>
8716 EOF
8717 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8718 { (eval echo configure:8719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8719 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8720 if test -z "$ac_err"; then
8721   rm -rf conftest*
8722   eval "ac_cv_header_$ac_safe=yes"
8723 else
8724   echo "$ac_err" >&5
8725   echo "configure: failed program was:" >&5
8726   cat conftest.$ac_ext >&5
8727   rm -rf conftest*
8728   eval "ac_cv_header_$ac_safe=no"
8729 fi
8730 rm -f conftest*
8731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8732   echo "$ac_t""yes" 1>&6
8733   :
8734 else
8735   echo "$ac_t""no" 1>&6
8736 with_wnn=no
8737 fi
8738  }
8739     if test "$with_wnn" != "no"; then
8740     for ac_func in crypt
8741 do
8742 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8743 echo "configure:8744: checking for $ac_func" >&5
8744
8745 cat > conftest.$ac_ext <<EOF
8746 #line 8747 "configure"
8747 #include "confdefs.h"
8748 /* System header to define __stub macros and hopefully few prototypes,
8749     which can conflict with char $ac_func(); below.  */
8750 #include <assert.h>
8751 /* Override any gcc2 internal prototype to avoid an error.  */
8752 /* We use char because int might match the return type of a gcc2
8753     builtin and then its argument prototype would still apply.  */
8754 char $ac_func();
8755
8756 int main() {
8757
8758 /* The GNU C library defines this for functions which it implements
8759     to always fail with ENOSYS.  Some functions are actually named
8760     something starting with __ and the normal name is an alias.  */
8761 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8762 choke me
8763 #else
8764 $ac_func();
8765 #endif
8766
8767 ; return 0; }
8768 EOF
8769 if { (eval echo configure:8770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8770   rm -rf conftest*
8771   eval "ac_cv_func_$ac_func=yes"
8772 else
8773   echo "configure: failed program was:" >&5
8774   cat conftest.$ac_ext >&5
8775   rm -rf conftest*
8776   eval "ac_cv_func_$ac_func=no"
8777 fi
8778 rm -f conftest*
8779
8780 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8781   echo "$ac_t""yes" 1>&6
8782     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8783   { test "$extra_verbose" = "yes" && cat << EOF
8784     Defining $ac_tr_func
8785 EOF
8786 cat >> confdefs.h <<EOF
8787 #define $ac_tr_func 1
8788 EOF
8789 }
8790  
8791 else
8792   echo "$ac_t""no" 1>&6
8793 fi
8794 done
8795
8796     test "$ac_cv_func_crypt" != "yes" && { 
8797 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8798 echo "configure:8799: checking for crypt in -lcrypt" >&5
8799 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8800
8801 xe_check_libs=" -lcrypt "
8802 cat > conftest.$ac_ext <<EOF
8803 #line 8804 "configure"
8804 #include "confdefs.h"
8805 /* Override any gcc2 internal prototype to avoid an error.  */
8806 /* We use char because int might match the return type of a gcc2
8807     builtin and then its argument prototype would still apply.  */
8808 char crypt();
8809
8810 int main() {
8811 crypt()
8812 ; return 0; }
8813 EOF
8814 if { (eval echo configure:8815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8815   rm -rf conftest*
8816   eval "ac_cv_lib_$ac_lib_var=yes"
8817 else
8818   echo "configure: failed program was:" >&5
8819   cat conftest.$ac_ext >&5
8820   rm -rf conftest*
8821   eval "ac_cv_lib_$ac_lib_var=no"
8822 fi
8823 rm -f conftest*
8824 xe_check_libs=""
8825
8826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8827   echo "$ac_t""yes" 1>&6
8828     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8829     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8830   { test "$extra_verbose" = "yes" && cat << EOF
8831     Defining $ac_tr_lib
8832 EOF
8833 cat >> confdefs.h <<EOF
8834 #define $ac_tr_lib 1
8835 EOF
8836 }
8837
8838   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
8839
8840 else
8841   echo "$ac_t""no" 1>&6
8842 fi
8843
8844  }
8845   fi
8846     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
8847     
8848 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
8849 echo "configure:8850: checking for jl_dic_list_e in -lwnn" >&5
8850 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8851
8852 xe_check_libs=" -lwnn "
8853 cat > conftest.$ac_ext <<EOF
8854 #line 8855 "configure"
8855 #include "confdefs.h"
8856 /* Override any gcc2 internal prototype to avoid an error.  */
8857 /* We use char because int might match the return type of a gcc2
8858     builtin and then its argument prototype would still apply.  */
8859 char jl_dic_list_e();
8860
8861 int main() {
8862 jl_dic_list_e()
8863 ; return 0; }
8864 EOF
8865 if { (eval echo configure:8866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8866   rm -rf conftest*
8867   eval "ac_cv_lib_$ac_lib_var=yes"
8868 else
8869   echo "configure: failed program was:" >&5
8870   cat conftest.$ac_ext >&5
8871   rm -rf conftest*
8872   eval "ac_cv_lib_$ac_lib_var=no"
8873 fi
8874 rm -f conftest*
8875 xe_check_libs=""
8876
8877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8878   echo "$ac_t""yes" 1>&6
8879   libwnn=wnn
8880 else
8881   echo "$ac_t""no" 1>&6
8882 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
8883 echo "configure:8884: checking for jl_dic_list_e in -lwnn4" >&5
8884 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8885
8886 xe_check_libs=" -lwnn4 "
8887 cat > conftest.$ac_ext <<EOF
8888 #line 8889 "configure"
8889 #include "confdefs.h"
8890 /* Override any gcc2 internal prototype to avoid an error.  */
8891 /* We use char because int might match the return type of a gcc2
8892     builtin and then its argument prototype would still apply.  */
8893 char jl_dic_list_e();
8894
8895 int main() {
8896 jl_dic_list_e()
8897 ; return 0; }
8898 EOF
8899 if { (eval echo configure:8900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8900   rm -rf conftest*
8901   eval "ac_cv_lib_$ac_lib_var=yes"
8902 else
8903   echo "configure: failed program was:" >&5
8904   cat conftest.$ac_ext >&5
8905   rm -rf conftest*
8906   eval "ac_cv_lib_$ac_lib_var=no"
8907 fi
8908 rm -f conftest*
8909 xe_check_libs=""
8910
8911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8912   echo "$ac_t""yes" 1>&6
8913   libwnn=wnn4
8914 else
8915   echo "$ac_t""no" 1>&6
8916 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
8917 echo "configure:8918: checking for jl_dic_list_e in -lwnn6" >&5
8918 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8919
8920 xe_check_libs=" -lwnn6 "
8921 cat > conftest.$ac_ext <<EOF
8922 #line 8923 "configure"
8923 #include "confdefs.h"
8924 /* Override any gcc2 internal prototype to avoid an error.  */
8925 /* We use char because int might match the return type of a gcc2
8926     builtin and then its argument prototype would still apply.  */
8927 char jl_dic_list_e();
8928
8929 int main() {
8930 jl_dic_list_e()
8931 ; return 0; }
8932 EOF
8933 if { (eval echo configure:8934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8934   rm -rf conftest*
8935   eval "ac_cv_lib_$ac_lib_var=yes"
8936 else
8937   echo "configure: failed program was:" >&5
8938   cat conftest.$ac_ext >&5
8939   rm -rf conftest*
8940   eval "ac_cv_lib_$ac_lib_var=no"
8941 fi
8942 rm -f conftest*
8943 xe_check_libs=""
8944
8945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8946   echo "$ac_t""yes" 1>&6
8947   libwnn=wnn6
8948 else
8949   echo "$ac_t""no" 1>&6
8950 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
8951 echo "configure:8952: checking for dic_list_e in -lwnn6_fromsrc" >&5
8952 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
8953
8954 xe_check_libs=" -lwnn6_fromsrc "
8955 cat > conftest.$ac_ext <<EOF
8956 #line 8957 "configure"
8957 #include "confdefs.h"
8958 /* Override any gcc2 internal prototype to avoid an error.  */
8959 /* We use char because int might match the return type of a gcc2
8960     builtin and then its argument prototype would still apply.  */
8961 char dic_list_e();
8962
8963 int main() {
8964 dic_list_e()
8965 ; return 0; }
8966 EOF
8967 if { (eval echo configure:8968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8968   rm -rf conftest*
8969   eval "ac_cv_lib_$ac_lib_var=yes"
8970 else
8971   echo "configure: failed program was:" >&5
8972   cat conftest.$ac_ext >&5
8973   rm -rf conftest*
8974   eval "ac_cv_lib_$ac_lib_var=no"
8975 fi
8976 rm -f conftest*
8977 xe_check_libs=""
8978
8979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8980   echo "$ac_t""yes" 1>&6
8981   libwnn=wnn6_fromsrc
8982 else
8983   echo "$ac_t""no" 1>&6
8984 with_wnn=no
8985 fi
8986
8987
8988 fi
8989
8990
8991 fi
8992
8993
8994 fi
8995
8996
8997   fi
8998   test -z "$with_wnn" && with_wnn=yes
8999   if test "$with_wnn" = "yes"; then
9000     { test "$extra_verbose" = "yes" && cat << \EOF
9001     Defining HAVE_WNN
9002 EOF
9003 cat >> confdefs.h <<\EOF
9004 #define HAVE_WNN 1
9005 EOF
9006 }
9007
9008     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9009     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9010    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9011  fi
9012     if test "$with_wnn6" != "no"; then
9013       
9014 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9015 echo "configure:9016: checking for jl_fi_dic_list in -l$libwnn" >&5
9016 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9017
9018 xe_check_libs=" -l$libwnn "
9019 cat > conftest.$ac_ext <<EOF
9020 #line 9021 "configure"
9021 #include "confdefs.h"
9022 /* Override any gcc2 internal prototype to avoid an error.  */
9023 /* We use char because int might match the return type of a gcc2
9024     builtin and then its argument prototype would still apply.  */
9025 char jl_fi_dic_list();
9026
9027 int main() {
9028 jl_fi_dic_list()
9029 ; return 0; }
9030 EOF
9031 if { (eval echo configure:9032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9032   rm -rf conftest*
9033   eval "ac_cv_lib_$ac_lib_var=yes"
9034 else
9035   echo "configure: failed program was:" >&5
9036   cat conftest.$ac_ext >&5
9037   rm -rf conftest*
9038   eval "ac_cv_lib_$ac_lib_var=no"
9039 fi
9040 rm -f conftest*
9041 xe_check_libs=""
9042
9043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9044   echo "$ac_t""yes" 1>&6
9045   with_wnn6=yes
9046 else
9047   echo "$ac_t""no" 1>&6
9048 fi
9049
9050
9051       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9052     Defining WNN6
9053 EOF
9054 cat >> confdefs.h <<\EOF
9055 #define WNN6 1
9056 EOF
9057 }
9058
9059     fi
9060   fi
9061
9062     canna_includes_found=no
9063   if test "$with_canna" != "no"; then
9064     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9065 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9066 echo "configure:9067: checking for canna/jrkanji.h" >&5
9067
9068 cat > conftest.$ac_ext <<EOF
9069 #line 9070 "configure"
9070 #include "confdefs.h"
9071 #include <canna/jrkanji.h>
9072 EOF
9073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9074 { (eval echo configure:9075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9076 if test -z "$ac_err"; then
9077   rm -rf conftest*
9078   eval "ac_cv_header_$ac_safe=yes"
9079 else
9080   echo "$ac_err" >&5
9081   echo "configure: failed program was:" >&5
9082   cat conftest.$ac_ext >&5
9083   rm -rf conftest*
9084   eval "ac_cv_header_$ac_safe=no"
9085 fi
9086 rm -f conftest*
9087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9088   echo "$ac_t""yes" 1>&6
9089   canna_includes_found=yes
9090 else
9091   echo "$ac_t""no" 1>&6
9092 fi
9093
9094   fi
9095   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9096       -d "/usr/local/canna/include"; then
9097     save_c_switch_site="$c_switch_site"
9098     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9099     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9100 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9101 echo "configure:9102: checking for canna/jrkanji.h" >&5
9102
9103 cat > conftest.$ac_ext <<EOF
9104 #line 9105 "configure"
9105 #include "confdefs.h"
9106 #include <canna/jrkanji.h>
9107 EOF
9108 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9109 { (eval echo configure:9110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9110 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9111 if test -z "$ac_err"; then
9112   rm -rf conftest*
9113   eval "ac_cv_header_$ac_safe=yes"
9114 else
9115   echo "$ac_err" >&5
9116   echo "configure: failed program was:" >&5
9117   cat conftest.$ac_ext >&5
9118   rm -rf conftest*
9119   eval "ac_cv_header_$ac_safe=no"
9120 fi
9121 rm -f conftest*
9122 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9123   echo "$ac_t""yes" 1>&6
9124   canna_includes_found=yes
9125 else
9126   echo "$ac_t""no" 1>&6
9127 fi
9128
9129     if test "$canna_includes_found" != "yes"; then
9130       c_switch_site="$save_c_switch_site"
9131       with_canna="no"
9132     fi
9133   fi
9134
9135   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9136 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9137 echo "configure:9138: checking for canna/RK.h" >&5
9138
9139 cat > conftest.$ac_ext <<EOF
9140 #line 9141 "configure"
9141 #include "confdefs.h"
9142 #include <canna/RK.h>
9143 EOF
9144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9145 { (eval echo configure:9146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9147 if test -z "$ac_err"; then
9148   rm -rf conftest*
9149   eval "ac_cv_header_$ac_safe=yes"
9150 else
9151   echo "$ac_err" >&5
9152   echo "configure: failed program was:" >&5
9153   cat conftest.$ac_ext >&5
9154   rm -rf conftest*
9155   eval "ac_cv_header_$ac_safe=no"
9156 fi
9157 rm -f conftest*
9158 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9159   echo "$ac_t""yes" 1>&6
9160   :
9161 else
9162   echo "$ac_t""no" 1>&6
9163 with_canna=no
9164 fi
9165  }
9166   test -z "$with_canna" && { 
9167 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9168 echo "configure:9169: checking for RkBgnBun in -lRKC" >&5
9169 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9170
9171 xe_check_libs=" -lRKC "
9172 cat > conftest.$ac_ext <<EOF
9173 #line 9174 "configure"
9174 #include "confdefs.h"
9175 /* Override any gcc2 internal prototype to avoid an error.  */
9176 /* We use char because int might match the return type of a gcc2
9177     builtin and then its argument prototype would still apply.  */
9178 char RkBgnBun();
9179
9180 int main() {
9181 RkBgnBun()
9182 ; return 0; }
9183 EOF
9184 if { (eval echo configure:9185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9185   rm -rf conftest*
9186   eval "ac_cv_lib_$ac_lib_var=yes"
9187 else
9188   echo "configure: failed program was:" >&5
9189   cat conftest.$ac_ext >&5
9190   rm -rf conftest*
9191   eval "ac_cv_lib_$ac_lib_var=no"
9192 fi
9193 rm -f conftest*
9194 xe_check_libs=""
9195
9196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9197   echo "$ac_t""yes" 1>&6
9198   :
9199 else
9200   echo "$ac_t""no" 1>&6
9201 with_canna=no
9202 fi
9203
9204  }
9205   test -z "$with_canna" && { 
9206 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9207 echo "configure:9208: checking for jrKanjiControl in -lcanna" >&5
9208 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9209
9210 xe_check_libs=" -lcanna "
9211 cat > conftest.$ac_ext <<EOF
9212 #line 9213 "configure"
9213 #include "confdefs.h"
9214 /* Override any gcc2 internal prototype to avoid an error.  */
9215 /* We use char because int might match the return type of a gcc2
9216     builtin and then its argument prototype would still apply.  */
9217 char jrKanjiControl();
9218
9219 int main() {
9220 jrKanjiControl()
9221 ; return 0; }
9222 EOF
9223 if { (eval echo configure:9224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9224   rm -rf conftest*
9225   eval "ac_cv_lib_$ac_lib_var=yes"
9226 else
9227   echo "configure: failed program was:" >&5
9228   cat conftest.$ac_ext >&5
9229   rm -rf conftest*
9230   eval "ac_cv_lib_$ac_lib_var=no"
9231 fi
9232 rm -f conftest*
9233 xe_check_libs=""
9234
9235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9236   echo "$ac_t""yes" 1>&6
9237   :
9238 else
9239   echo "$ac_t""no" 1>&6
9240 with_canna=no
9241 fi
9242
9243  }
9244   test -z "$with_canna" && with_canna=yes
9245   if test "$with_canna" = "yes"; then
9246     { test "$extra_verbose" = "yes" && cat << \EOF
9247     Defining HAVE_CANNA
9248 EOF
9249 cat >> confdefs.h <<\EOF
9250 #define HAVE_CANNA 1
9251 EOF
9252 }
9253
9254     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9255     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9256    echo "    xemacs will be linked with \"mule-canna.o\""
9257  fi
9258   fi
9259
9260 else   for feature in xim canna wnn; do
9261     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9262       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9263     fi
9264     eval "with_${feature}=no"
9265   done
9266 fi 
9267
9268 if test "$need_motif" = "yes" ; then
9269   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9270     
9271 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9272 echo "configure:9273: checking for layout_object_getvalue in -li18n" >&5
9273 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9274
9275 xe_check_libs=" -li18n "
9276 cat > conftest.$ac_ext <<EOF
9277 #line 9278 "configure"
9278 #include "confdefs.h"
9279 /* Override any gcc2 internal prototype to avoid an error.  */
9280 /* We use char because int might match the return type of a gcc2
9281     builtin and then its argument prototype would still apply.  */
9282 char layout_object_getvalue();
9283
9284 int main() {
9285 layout_object_getvalue()
9286 ; return 0; }
9287 EOF
9288 if { (eval echo configure:9289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9289   rm -rf conftest*
9290   eval "ac_cv_lib_$ac_lib_var=yes"
9291 else
9292   echo "configure: failed program was:" >&5
9293   cat conftest.$ac_ext >&5
9294   rm -rf conftest*
9295   eval "ac_cv_lib_$ac_lib_var=no"
9296 fi
9297 rm -f conftest*
9298 xe_check_libs=""
9299
9300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9301   echo "$ac_t""yes" 1>&6
9302   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9303 else
9304   echo "$ac_t""no" 1>&6
9305 fi
9306
9307
9308   
9309 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9310     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9311   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9312   
9313         runpath="" runpath_dirs=""
9314   if test -n "$LD_RUN_PATH"; then
9315     runpath="$LD_RUN_PATH"
9316   elif test "$GCC" = "yes"; then
9317         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
9318     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
9319     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
9320     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
9321       case "$arg" in P,* | -L* | -R* )
9322         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
9323           {
9324 xe_runpath_dir="$dir"
9325   test "$xe_runpath_dir" != "/lib"     -a \
9326         "$xe_runpath_dir" != "/usr/lib" -a \
9327         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9328   eval "$xe_add_unique_runpath_dir"
9329 }
9330         done ;;
9331       esac
9332     done
9333     ld_switch_run="$ld_switch_run_save"
9334     rm -f conftest*
9335   else
9336         for arg in $ld_switch_site $ld_switch_x_site; do
9337       case "$arg" in -L*) {
9338 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
9339   test "$xe_runpath_dir" != "/lib"     -a \
9340         "$xe_runpath_dir" != "/usr/lib" -a \
9341         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9342   eval "$xe_add_unique_runpath_dir"
9343 };; esac
9344     done
9345         if test "$opsys $need_motif" = "sol2 yes"; then
9346       xe_runpath_dir="/opt/SUNWdt/lib";
9347       eval "$xe_add_unique_runpath_dir";
9348     fi
9349   fi 
9350   if test -n "$runpath"; then
9351     ld_switch_run="${dash_r}${runpath}"
9352     
9353 if test "$GCC" = "yes"; then
9354   set x $ld_switch_run; shift; ld_switch_run=""
9355   while test -n "$1"; do
9356     case $1 in
9357       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9358       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9359       -Xlinker* ) ;;
9360       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9361     esac
9362     shift
9363   done
9364 fi
9365     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9366   fi
9367 fi
9368
9369 fi
9370
9371 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf
9372 do
9373 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9374 echo "configure:9375: checking for $ac_func" >&5
9375
9376 cat > conftest.$ac_ext <<EOF
9377 #line 9378 "configure"
9378 #include "confdefs.h"
9379 /* System header to define __stub macros and hopefully few prototypes,
9380     which can conflict with char $ac_func(); below.  */
9381 #include <assert.h>
9382 /* Override any gcc2 internal prototype to avoid an error.  */
9383 /* We use char because int might match the return type of a gcc2
9384     builtin and then its argument prototype would still apply.  */
9385 char $ac_func();
9386
9387 int main() {
9388
9389 /* The GNU C library defines this for functions which it implements
9390     to always fail with ENOSYS.  Some functions are actually named
9391     something starting with __ and the normal name is an alias.  */
9392 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9393 choke me
9394 #else
9395 $ac_func();
9396 #endif
9397
9398 ; return 0; }
9399 EOF
9400 if { (eval echo configure:9401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9401   rm -rf conftest*
9402   eval "ac_cv_func_$ac_func=yes"
9403 else
9404   echo "configure: failed program was:" >&5
9405   cat conftest.$ac_ext >&5
9406   rm -rf conftest*
9407   eval "ac_cv_func_$ac_func=no"
9408 fi
9409 rm -f conftest*
9410
9411 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9412   echo "$ac_t""yes" 1>&6
9413     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9414   { test "$extra_verbose" = "yes" && cat << EOF
9415     Defining $ac_tr_func
9416 EOF
9417 cat >> confdefs.h <<EOF
9418 #define $ac_tr_func 1
9419 EOF
9420 }
9421  
9422 else
9423   echo "$ac_t""no" 1>&6
9424 fi
9425 done
9426
9427
9428
9429 case "$opsys" in
9430   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9431    echo "    xemacs will be linked with \"realpath.o\""
9432  fi ;;
9433   * )
9434     case "$canonical" in
9435       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9436    echo "    xemacs will be linked with \"realpath.o\""
9437  fi ;;
9438       * ) for ac_func in realpath
9439 do
9440 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9441 echo "configure:9442: checking for $ac_func" >&5
9442
9443 cat > conftest.$ac_ext <<EOF
9444 #line 9445 "configure"
9445 #include "confdefs.h"
9446 /* System header to define __stub macros and hopefully few prototypes,
9447     which can conflict with char $ac_func(); below.  */
9448 #include <assert.h>
9449 /* Override any gcc2 internal prototype to avoid an error.  */
9450 /* We use char because int might match the return type of a gcc2
9451     builtin and then its argument prototype would still apply.  */
9452 char $ac_func();
9453
9454 int main() {
9455
9456 /* The GNU C library defines this for functions which it implements
9457     to always fail with ENOSYS.  Some functions are actually named
9458     something starting with __ and the normal name is an alias.  */
9459 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9460 choke me
9461 #else
9462 $ac_func();
9463 #endif
9464
9465 ; return 0; }
9466 EOF
9467 if { (eval echo configure:9468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9468   rm -rf conftest*
9469   eval "ac_cv_func_$ac_func=yes"
9470 else
9471   echo "configure: failed program was:" >&5
9472   cat conftest.$ac_ext >&5
9473   rm -rf conftest*
9474   eval "ac_cv_func_$ac_func=no"
9475 fi
9476 rm -f conftest*
9477
9478 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9479   echo "$ac_t""yes" 1>&6
9480     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9481   { test "$extra_verbose" = "yes" && cat << EOF
9482     Defining $ac_tr_func
9483 EOF
9484 cat >> confdefs.h <<EOF
9485 #define $ac_tr_func 1
9486 EOF
9487 }
9488  
9489 else
9490   echo "$ac_t""no" 1>&6
9491 fi
9492 done
9493
9494           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9495    echo "    xemacs will be linked with \"realpath.o\""
9496  fi ;;
9497     esac ;;
9498 esac
9499
9500 for ac_func in getloadavg
9501 do
9502 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9503 echo "configure:9504: checking for $ac_func" >&5
9504
9505 cat > conftest.$ac_ext <<EOF
9506 #line 9507 "configure"
9507 #include "confdefs.h"
9508 /* System header to define __stub macros and hopefully few prototypes,
9509     which can conflict with char $ac_func(); below.  */
9510 #include <assert.h>
9511 /* Override any gcc2 internal prototype to avoid an error.  */
9512 /* We use char because int might match the return type of a gcc2
9513     builtin and then its argument prototype would still apply.  */
9514 char $ac_func();
9515
9516 int main() {
9517
9518 /* The GNU C library defines this for functions which it implements
9519     to always fail with ENOSYS.  Some functions are actually named
9520     something starting with __ and the normal name is an alias.  */
9521 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9522 choke me
9523 #else
9524 $ac_func();
9525 #endif
9526
9527 ; return 0; }
9528 EOF
9529 if { (eval echo configure:9530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9530   rm -rf conftest*
9531   eval "ac_cv_func_$ac_func=yes"
9532 else
9533   echo "configure: failed program was:" >&5
9534   cat conftest.$ac_ext >&5
9535   rm -rf conftest*
9536   eval "ac_cv_func_$ac_func=no"
9537 fi
9538 rm -f conftest*
9539
9540 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9541   echo "$ac_t""yes" 1>&6
9542     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9543   { test "$extra_verbose" = "yes" && cat << EOF
9544     Defining $ac_tr_func
9545 EOF
9546 cat >> confdefs.h <<EOF
9547 #define $ac_tr_func 1
9548 EOF
9549 }
9550  
9551 else
9552   echo "$ac_t""no" 1>&6
9553 fi
9554 done
9555
9556
9557 if test "$ac_cv_func_getloadavg" != "yes"
9558 then
9559   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
9560    echo "    xemacs will be linked with \"getloadavg.o\""
9561  fi
9562
9563     
9564 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
9565 echo "configure:9566: checking for kstat_open in -lkstat" >&5
9566 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
9567
9568 xe_check_libs=" -lkstat "
9569 cat > conftest.$ac_ext <<EOF
9570 #line 9571 "configure"
9571 #include "confdefs.h"
9572 /* Override any gcc2 internal prototype to avoid an error.  */
9573 /* We use char because int might match the return type of a gcc2
9574     builtin and then its argument prototype would still apply.  */
9575 char kstat_open();
9576
9577 int main() {
9578 kstat_open()
9579 ; return 0; }
9580 EOF
9581 if { (eval echo configure:9582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9582   rm -rf conftest*
9583   eval "ac_cv_lib_$ac_lib_var=yes"
9584 else
9585   echo "configure: failed program was:" >&5
9586   cat conftest.$ac_ext >&5
9587   rm -rf conftest*
9588   eval "ac_cv_lib_$ac_lib_var=no"
9589 fi
9590 rm -f conftest*
9591 xe_check_libs=""
9592
9593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9594   echo "$ac_t""yes" 1>&6
9595     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9596     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9597   { test "$extra_verbose" = "yes" && cat << EOF
9598     Defining $ac_tr_lib
9599 EOF
9600 cat >> confdefs.h <<EOF
9601 #define $ac_tr_lib 1
9602 EOF
9603 }
9604
9605   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
9606
9607 else
9608   echo "$ac_t""no" 1>&6
9609 fi
9610
9611
9612
9613     
9614 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
9615 echo "configure:9616: checking for kvm_read in -lkvm" >&5
9616 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
9617
9618 xe_check_libs=" -lkvm "
9619 cat > conftest.$ac_ext <<EOF
9620 #line 9621 "configure"
9621 #include "confdefs.h"
9622 /* Override any gcc2 internal prototype to avoid an error.  */
9623 /* We use char because int might match the return type of a gcc2
9624     builtin and then its argument prototype would still apply.  */
9625 char kvm_read();
9626
9627 int main() {
9628 kvm_read()
9629 ; return 0; }
9630 EOF
9631 if { (eval echo configure:9632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9632   rm -rf conftest*
9633   eval "ac_cv_lib_$ac_lib_var=yes"
9634 else
9635   echo "configure: failed program was:" >&5
9636   cat conftest.$ac_ext >&5
9637   rm -rf conftest*
9638   eval "ac_cv_lib_$ac_lib_var=no"
9639 fi
9640 rm -f conftest*
9641 xe_check_libs=""
9642
9643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9644   echo "$ac_t""yes" 1>&6
9645     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9646     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9647   { test "$extra_verbose" = "yes" && cat << EOF
9648     Defining $ac_tr_lib
9649 EOF
9650 cat >> confdefs.h <<EOF
9651 #define $ac_tr_lib 1
9652 EOF
9653 }
9654
9655   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9656
9657 else
9658   echo "$ac_t""no" 1>&6
9659 fi
9660
9661
9662 fi
9663
9664 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9665 echo "configure:9666: checking whether netdb declares h_errno" >&5
9666 cat > conftest.$ac_ext <<EOF
9667 #line 9668 "configure"
9668 #include "confdefs.h"
9669 #include <netdb.h>
9670 int main() {
9671 return h_errno;
9672 ; return 0; }
9673 EOF
9674 if { (eval echo configure:9675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9675   rm -rf conftest*
9676   echo "$ac_t""yes" 1>&6
9677    { test "$extra_verbose" = "yes" && cat << \EOF
9678     Defining HAVE_H_ERRNO
9679 EOF
9680 cat >> confdefs.h <<\EOF
9681 #define HAVE_H_ERRNO 1
9682 EOF
9683 }
9684
9685 else
9686   echo "configure: failed program was:" >&5
9687   cat conftest.$ac_ext >&5
9688   rm -rf conftest*
9689   echo "$ac_t""no" 1>&6
9690 fi
9691 rm -f conftest*
9692
9693 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9694 echo "configure:9695: checking for sigsetjmp" >&5
9695 cat > conftest.$ac_ext <<EOF
9696 #line 9697 "configure"
9697 #include "confdefs.h"
9698 #include <setjmp.h>
9699 int main() {
9700 sigjmp_buf bar; sigsetjmp (bar, 0);
9701 ; return 0; }
9702 EOF
9703 if { (eval echo configure:9704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9704   rm -rf conftest*
9705   echo "$ac_t""yes" 1>&6
9706    { test "$extra_verbose" = "yes" && cat << \EOF
9707     Defining HAVE_SIGSETJMP
9708 EOF
9709 cat >> confdefs.h <<\EOF
9710 #define HAVE_SIGSETJMP 1
9711 EOF
9712 }
9713
9714 else
9715   echo "configure: failed program was:" >&5
9716   cat conftest.$ac_ext >&5
9717   rm -rf conftest*
9718   echo "$ac_t""no" 1>&6
9719 fi
9720 rm -f conftest*
9721
9722 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9723 echo "configure:9724: checking whether localtime caches TZ" >&5
9724
9725 if test "$ac_cv_func_tzset" = "yes"; then
9726 cat > conftest.$ac_ext <<EOF
9727 #line 9728 "configure"
9728 #include "confdefs.h"
9729 #include <time.h>
9730 #if STDC_HEADERS
9731 # include <stdlib.h>
9732 #endif
9733 extern char **environ;
9734 unset_TZ ()
9735 {
9736   char **from, **to;
9737   for (to = from = environ; (*to = *from); from++)
9738     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9739       to++;
9740 }
9741 char TZ_GMT0[] = "TZ=GMT0";
9742 char TZ_PST8[] = "TZ=PST8";
9743 main()
9744 {
9745   time_t now = time ((time_t *) 0);
9746   int hour_GMT0, hour_unset;
9747   if (putenv (TZ_GMT0) != 0)
9748     exit (1);
9749   hour_GMT0 = localtime (&now)->tm_hour;
9750   unset_TZ ();
9751   hour_unset = localtime (&now)->tm_hour;
9752   if (putenv (TZ_PST8) != 0)
9753     exit (1);
9754   if (localtime (&now)->tm_hour == hour_GMT0)
9755     exit (1);
9756   unset_TZ ();
9757   if (localtime (&now)->tm_hour != hour_unset)
9758     exit (1);
9759   exit (0);
9760 }
9761 EOF
9762 if { (eval echo configure:9763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9763 then
9764   emacs_cv_localtime_cache=no
9765 else
9766   conftest_rc="$?"
9767   echo "configure: failed program was:" >&5
9768   cat conftest.$ac_ext >&5
9769   rm -fr conftest*
9770   emacs_cv_localtime_cache=yes
9771 fi
9772 rm -fr conftest*
9773 else
9774         # If we lack tzset, report that localtime does not cache TZ,
9775         # since we can't invalidate the cache if we don't have tzset.
9776         emacs_cv_localtime_cache=no
9777 fi
9778 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9779 if test $emacs_cv_localtime_cache = yes; then
9780   { test "$extra_verbose" = "yes" && cat << \EOF
9781     Defining LOCALTIME_CACHE
9782 EOF
9783 cat >> confdefs.h <<\EOF
9784 #define LOCALTIME_CACHE 1
9785 EOF
9786 }
9787
9788 fi
9789
9790 if test "$HAVE_TIMEVAL" = "yes"; then
9791 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9792 echo "configure:9793: checking whether gettimeofday accepts one or two arguments" >&5
9793 cat > conftest.$ac_ext <<EOF
9794 #line 9795 "configure"
9795 #include "confdefs.h"
9796
9797 #ifdef TIME_WITH_SYS_TIME
9798 #include <sys/time.h>
9799 #include <time.h>
9800 #else
9801 #ifdef HAVE_SYS_TIME_H
9802 #include <sys/time.h>
9803 #else
9804 #include <time.h>
9805 #endif
9806 #endif
9807   
9808 int main() {
9809
9810   struct timeval time;
9811   struct timezone dummy;
9812   gettimeofday (&time, &dummy);
9813
9814 ; return 0; }
9815 EOF
9816 if { (eval echo configure:9817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9817   rm -rf conftest*
9818   echo "$ac_t""two" 1>&6
9819 else
9820   echo "configure: failed program was:" >&5
9821   cat conftest.$ac_ext >&5
9822   rm -rf conftest*
9823   echo "$ac_t""one" 1>&6
9824    { test "$extra_verbose" = "yes" && cat << \EOF
9825     Defining GETTIMEOFDAY_ONE_ARGUMENT
9826 EOF
9827 cat >> confdefs.h <<\EOF
9828 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9829 EOF
9830 }
9831
9832 fi
9833 rm -f conftest*
9834 fi
9835
9836
9837 echo $ac_n "checking for inline""... $ac_c" 1>&6
9838 echo "configure:9839: checking for inline" >&5
9839
9840 ac_cv_c_inline=no
9841 for ac_kw in inline __inline__ __inline; do
9842   cat > conftest.$ac_ext <<EOF
9843 #line 9844 "configure"
9844 #include "confdefs.h"
9845
9846 int main() {
9847 } $ac_kw foo() {
9848 ; return 0; }
9849 EOF
9850 if { (eval echo configure:9851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9851   rm -rf conftest*
9852   ac_cv_c_inline=$ac_kw; break
9853 else
9854   echo "configure: failed program was:" >&5
9855   cat conftest.$ac_ext >&5
9856 fi
9857 rm -f conftest*
9858 done
9859
9860
9861 echo "$ac_t""$ac_cv_c_inline" 1>&6
9862 case "$ac_cv_c_inline" in
9863   inline | yes) ;;
9864   no) { test "$extra_verbose" = "yes" && cat << \EOF
9865     Defining inline = 
9866 EOF
9867 cat >> confdefs.h <<\EOF
9868 #define inline 
9869 EOF
9870 }
9871  ;;
9872   *)  { test "$extra_verbose" = "yes" && cat << EOF
9873     Defining inline = $ac_cv_c_inline
9874 EOF
9875 cat >> confdefs.h <<EOF
9876 #define inline $ac_cv_c_inline
9877 EOF
9878 }
9879  ;;
9880 esac
9881
9882 if test "$ac_cv_c_inline" != "no"; then
9883   { test "$extra_verbose" = "yes" && cat << \EOF
9884     Defining HAVE_INLINE
9885 EOF
9886 cat >> confdefs.h <<\EOF
9887 #define HAVE_INLINE 1
9888 EOF
9889 }
9890
9891   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
9892    echo "    xemacs will be linked with \"inline.o\""
9893  fi
9894 fi
9895
9896
9897 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9898 # for constant arguments.  Useless!
9899 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9900 echo "configure:9901: checking for working alloca.h" >&5
9901
9902 cat > conftest.$ac_ext <<EOF
9903 #line 9904 "configure"
9904 #include "confdefs.h"
9905 #include <alloca.h>
9906 int main() {
9907 char *p = alloca(2 * sizeof(int));
9908 ; return 0; }
9909 EOF
9910 if { (eval echo configure:9911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9911   rm -rf conftest*
9912   ac_cv_header_alloca_h=yes
9913 else
9914   echo "configure: failed program was:" >&5
9915   cat conftest.$ac_ext >&5
9916   rm -rf conftest*
9917   ac_cv_header_alloca_h=no
9918 fi
9919 rm -f conftest*
9920
9921 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9922 if test $ac_cv_header_alloca_h = yes; then
9923   { test "$extra_verbose" = "yes" && cat << \EOF
9924     Defining HAVE_ALLOCA_H
9925 EOF
9926 cat >> confdefs.h <<\EOF
9927 #define HAVE_ALLOCA_H 1
9928 EOF
9929 }
9930
9931 fi
9932
9933 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9934 echo "configure:9935: checking for alloca" >&5
9935
9936 cat > conftest.$ac_ext <<EOF
9937 #line 9938 "configure"
9938 #include "confdefs.h"
9939
9940 #ifdef __GNUC__
9941 # define alloca __builtin_alloca
9942 #else
9943 # ifdef _MSC_VER
9944 #  include <malloc.h>
9945 #  define alloca _alloca
9946 # else
9947 #  if HAVE_ALLOCA_H
9948 #   include <alloca.h>
9949 #  else
9950 #   ifdef _AIX
9951  #pragma alloca
9952 #   else
9953 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9954 char *alloca ();
9955 #    endif
9956 #   endif
9957 #  endif
9958 # endif
9959 #endif
9960
9961 int main() {
9962 char *p = (char *) alloca(1);
9963 ; return 0; }
9964 EOF
9965 if { (eval echo configure:9966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9966   rm -rf conftest*
9967   ac_cv_func_alloca_works=yes
9968 else
9969   echo "configure: failed program was:" >&5
9970   cat conftest.$ac_ext >&5
9971   rm -rf conftest*
9972   ac_cv_func_alloca_works=no
9973 fi
9974 rm -f conftest*
9975
9976 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
9977 if test $ac_cv_func_alloca_works = yes; then
9978   { test "$extra_verbose" = "yes" && cat << \EOF
9979     Defining HAVE_ALLOCA
9980 EOF
9981 cat >> confdefs.h <<\EOF
9982 #define HAVE_ALLOCA 1
9983 EOF
9984 }
9985
9986 fi
9987
9988 if test $ac_cv_func_alloca_works = no; then
9989   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9990   # that cause trouble.  Some versions do not even contain alloca or
9991   # contain a buggy version.  If you still want to use their alloca,
9992   # use ar to extract alloca.o from them instead of compiling alloca.c.
9993   ALLOCA=alloca.${ac_objext}
9994   { test "$extra_verbose" = "yes" && cat << \EOF
9995     Defining C_ALLOCA
9996 EOF
9997 cat >> confdefs.h <<\EOF
9998 #define C_ALLOCA 1
9999 EOF
10000 }
10001
10002
10003 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10004 echo "configure:10005: checking whether alloca needs Cray hooks" >&5
10005
10006 cat > conftest.$ac_ext <<EOF
10007 #line 10008 "configure"
10008 #include "confdefs.h"
10009 #if defined(CRAY) && ! defined(CRAY2)
10010 webecray
10011 #else
10012 wenotbecray
10013 #endif
10014
10015 EOF
10016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10017   egrep "webecray" >/dev/null 2>&1; then
10018   rm -rf conftest*
10019   ac_cv_os_cray=yes
10020 else
10021   rm -rf conftest*
10022   ac_cv_os_cray=no
10023 fi
10024 rm -f conftest*
10025
10026
10027 echo "$ac_t""$ac_cv_os_cray" 1>&6
10028 if test $ac_cv_os_cray = yes; then
10029 for ac_func in _getb67 GETB67 getb67; do
10030   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10031 echo "configure:10032: checking for $ac_func" >&5
10032
10033 cat > conftest.$ac_ext <<EOF
10034 #line 10035 "configure"
10035 #include "confdefs.h"
10036 /* System header to define __stub macros and hopefully few prototypes,
10037     which can conflict with char $ac_func(); below.  */
10038 #include <assert.h>
10039 /* Override any gcc2 internal prototype to avoid an error.  */
10040 /* We use char because int might match the return type of a gcc2
10041     builtin and then its argument prototype would still apply.  */
10042 char $ac_func();
10043
10044 int main() {
10045
10046 /* The GNU C library defines this for functions which it implements
10047     to always fail with ENOSYS.  Some functions are actually named
10048     something starting with __ and the normal name is an alias.  */
10049 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10050 choke me
10051 #else
10052 $ac_func();
10053 #endif
10054
10055 ; return 0; }
10056 EOF
10057 if { (eval echo configure:10058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10058   rm -rf conftest*
10059   eval "ac_cv_func_$ac_func=yes"
10060 else
10061   echo "configure: failed program was:" >&5
10062   cat conftest.$ac_ext >&5
10063   rm -rf conftest*
10064   eval "ac_cv_func_$ac_func=no"
10065 fi
10066 rm -f conftest*
10067
10068 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10069   echo "$ac_t""yes" 1>&6
10070   { test "$extra_verbose" = "yes" && cat << EOF
10071     Defining CRAY_STACKSEG_END = $ac_func
10072 EOF
10073 cat >> confdefs.h <<EOF
10074 #define CRAY_STACKSEG_END $ac_func
10075 EOF
10076 }
10077
10078   break
10079 else
10080   echo "$ac_t""no" 1>&6
10081 fi
10082
10083 done
10084 fi
10085
10086 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10087 echo "configure:10088: checking stack direction for C alloca" >&5
10088
10089 cat > conftest.$ac_ext <<EOF
10090 #line 10091 "configure"
10091 #include "confdefs.h"
10092 find_stack_direction ()
10093 {
10094   static char *addr = 0;
10095   auto char dummy;
10096   if (addr == 0)
10097     {
10098       addr = &dummy;
10099       return find_stack_direction ();
10100     }
10101   else
10102     return (&dummy > addr) ? 1 : -1;
10103 }
10104 main ()
10105 {
10106   exit (find_stack_direction() < 0);
10107 }
10108 EOF
10109 if { (eval echo configure:10110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10110 then
10111   ac_cv_c_stack_direction=1
10112 else
10113   conftest_rc="$?"
10114   echo "configure: failed program was:" >&5
10115   cat conftest.$ac_ext >&5
10116   rm -fr conftest*
10117   ac_cv_c_stack_direction=-1
10118 fi
10119 rm -fr conftest*
10120
10121 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10122 { test "$extra_verbose" = "yes" && cat << EOF
10123     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10124 EOF
10125 cat >> confdefs.h <<EOF
10126 #define STACK_DIRECTION $ac_cv_c_stack_direction
10127 EOF
10128 }
10129
10130 fi
10131
10132 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10133    echo "    xemacs will be linked with \"$ALLOCA\""
10134  fi
10135
10136 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10137 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10138 echo "configure:10139: checking for vfork.h" >&5
10139
10140 cat > conftest.$ac_ext <<EOF
10141 #line 10142 "configure"
10142 #include "confdefs.h"
10143 #include <vfork.h>
10144 EOF
10145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10146 { (eval echo configure:10147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10148 if test -z "$ac_err"; then
10149   rm -rf conftest*
10150   eval "ac_cv_header_$ac_safe=yes"
10151 else
10152   echo "$ac_err" >&5
10153   echo "configure: failed program was:" >&5
10154   cat conftest.$ac_ext >&5
10155   rm -rf conftest*
10156   eval "ac_cv_header_$ac_safe=no"
10157 fi
10158 rm -f conftest*
10159 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10160   echo "$ac_t""yes" 1>&6
10161   { test "$extra_verbose" = "yes" && cat << \EOF
10162     Defining HAVE_VFORK_H
10163 EOF
10164 cat >> confdefs.h <<\EOF
10165 #define HAVE_VFORK_H 1
10166 EOF
10167 }
10168
10169 else
10170   echo "$ac_t""no" 1>&6
10171 fi
10172
10173 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10174 echo "configure:10175: checking for working vfork" >&5
10175
10176 cat > conftest.$ac_ext <<EOF
10177 #line 10178 "configure"
10178 #include "confdefs.h"
10179 /* Thanks to Paul Eggert for this test.  */
10180 #include <stdio.h>
10181 #include <sys/types.h>
10182 #include <sys/stat.h>
10183 #ifdef HAVE_UNISTD_H
10184 #include <unistd.h>
10185 #endif
10186 #ifdef HAVE_VFORK_H
10187 #include <vfork.h>
10188 #endif
10189 /* On some sparc systems, changes by the child to local and incoming
10190    argument registers are propagated back to the parent.
10191    The compiler is told about this with #include <vfork.h>,
10192    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10193    Test for this by using a static variable whose address
10194    is put into a register that is clobbered by the vfork.  */
10195 static
10196 #ifdef __cplusplus
10197 sparc_address_test (int arg)
10198 #else
10199 sparc_address_test (arg) int arg;
10200 #endif
10201 {
10202   static pid_t child;
10203   if (!child) {
10204     child = vfork ();
10205     if (child < 0) {
10206       perror ("vfork");
10207       _exit(2);
10208     }
10209     if (!child) {
10210       arg = getpid();
10211       write(-1, "", 0);
10212       _exit (arg);
10213     }
10214   }
10215 }
10216 main() {
10217   pid_t parent = getpid ();
10218   pid_t child;
10219
10220   sparc_address_test ();
10221
10222   child = vfork ();
10223
10224   if (child == 0) {
10225     /* Here is another test for sparc vfork register problems.
10226        This test uses lots of local variables, at least
10227        as many local variables as main has allocated so far
10228        including compiler temporaries.  4 locals are enough for
10229        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10230        A buggy compiler should reuse the register of parent
10231        for one of the local variables, since it will think that
10232        parent can't possibly be used any more in this routine.
10233        Assigning to the local variable will thus munge parent
10234        in the parent process.  */
10235     pid_t
10236       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10237       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10238     /* Convince the compiler that p..p7 are live; otherwise, it might
10239        use the same hardware register for all 8 local variables.  */
10240     if (p != p1 || p != p2 || p != p3 || p != p4
10241         || p != p5 || p != p6 || p != p7)
10242       _exit(1);
10243
10244     /* On some systems (e.g. IRIX 3.3),
10245        vfork doesn't separate parent from child file descriptors.
10246        If the child closes a descriptor before it execs or exits,
10247        this munges the parent's descriptor as well.
10248        Test for this by closing stdout in the child.  */
10249     _exit(close(fileno(stdout)) != 0);
10250   } else {
10251     int status;
10252     struct stat st;
10253
10254     while (wait(&status) != child)
10255       ;
10256     exit(
10257          /* Was there some problem with vforking?  */
10258          child < 0
10259
10260          /* Did the child fail?  (This shouldn't happen.)  */
10261          || status
10262
10263          /* Did the vfork/compiler bug occur?  */
10264          || parent != getpid()
10265
10266          /* Did the file descriptor bug occur?  */
10267          || fstat(fileno(stdout), &st) != 0
10268          );
10269   }
10270 }
10271 EOF
10272 if { (eval echo configure:10273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10273 then
10274   ac_cv_func_vfork_works=yes
10275 else
10276   conftest_rc="$?"
10277   echo "configure: failed program was:" >&5
10278   cat conftest.$ac_ext >&5
10279   rm -fr conftest*
10280   ac_cv_func_vfork_works=no
10281 fi
10282 rm -fr conftest*
10283
10284 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10285 if test $ac_cv_func_vfork_works = no; then
10286   { test "$extra_verbose" = "yes" && cat << \EOF
10287     Defining vfork = fork
10288 EOF
10289 cat >> confdefs.h <<\EOF
10290 #define vfork fork
10291 EOF
10292 }
10293
10294 fi
10295
10296
10297 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10298 echo "configure:10299: checking for working strcoll" >&5
10299
10300 cat > conftest.$ac_ext <<EOF
10301 #line 10302 "configure"
10302 #include "confdefs.h"
10303 #include <string.h>
10304 main ()
10305 {
10306   exit (strcoll ("abc", "def") >= 0 ||
10307         strcoll ("ABC", "DEF") >= 0 ||
10308         strcoll ("123", "456") >= 0);
10309 }
10310 EOF
10311 if { (eval echo configure:10312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10312 then
10313   ac_cv_func_strcoll_works=yes
10314 else
10315   conftest_rc="$?"
10316   echo "configure: failed program was:" >&5
10317   cat conftest.$ac_ext >&5
10318   rm -fr conftest*
10319   ac_cv_func_strcoll_works=no
10320 fi
10321 rm -fr conftest*
10322
10323 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10324 if test $ac_cv_func_strcoll_works = yes; then
10325   { test "$extra_verbose" = "yes" && cat << \EOF
10326     Defining HAVE_STRCOLL
10327 EOF
10328 cat >> confdefs.h <<\EOF
10329 #define HAVE_STRCOLL 1
10330 EOF
10331 }
10332
10333 fi
10334
10335
10336 for ac_func in getpgrp
10337 do
10338 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10339 echo "configure:10340: checking for $ac_func" >&5
10340
10341 cat > conftest.$ac_ext <<EOF
10342 #line 10343 "configure"
10343 #include "confdefs.h"
10344 /* System header to define __stub macros and hopefully few prototypes,
10345     which can conflict with char $ac_func(); below.  */
10346 #include <assert.h>
10347 /* Override any gcc2 internal prototype to avoid an error.  */
10348 /* We use char because int might match the return type of a gcc2
10349     builtin and then its argument prototype would still apply.  */
10350 char $ac_func();
10351
10352 int main() {
10353
10354 /* The GNU C library defines this for functions which it implements
10355     to always fail with ENOSYS.  Some functions are actually named
10356     something starting with __ and the normal name is an alias.  */
10357 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10358 choke me
10359 #else
10360 $ac_func();
10361 #endif
10362
10363 ; return 0; }
10364 EOF
10365 if { (eval echo configure:10366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10366   rm -rf conftest*
10367   eval "ac_cv_func_$ac_func=yes"
10368 else
10369   echo "configure: failed program was:" >&5
10370   cat conftest.$ac_ext >&5
10371   rm -rf conftest*
10372   eval "ac_cv_func_$ac_func=no"
10373 fi
10374 rm -f conftest*
10375
10376 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10377   echo "$ac_t""yes" 1>&6
10378     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10379   { test "$extra_verbose" = "yes" && cat << EOF
10380     Defining $ac_tr_func
10381 EOF
10382 cat >> confdefs.h <<EOF
10383 #define $ac_tr_func 1
10384 EOF
10385 }
10386  
10387 else
10388   echo "$ac_t""no" 1>&6
10389 fi
10390 done
10391
10392 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10393 echo "configure:10394: checking whether getpgrp takes no argument" >&5
10394
10395 cat > conftest.$ac_ext <<EOF
10396 #line 10397 "configure"
10397 #include "confdefs.h"
10398
10399 /*
10400  * If this system has a BSD-style getpgrp(),
10401  * which takes a pid argument, exit unsuccessfully.
10402  *
10403  * Snarfed from Chet Ramey's bash pgrp.c test program
10404  */
10405 #include <stdio.h>
10406 #include <sys/types.h>
10407
10408 int     pid;
10409 int     pg1, pg2, pg3, pg4;
10410 int     ng, np, s, child;
10411
10412 main()
10413 {
10414         pid = getpid();
10415         pg1 = getpgrp(0);
10416         pg2 = getpgrp();
10417         pg3 = getpgrp(pid);
10418         pg4 = getpgrp(1);
10419
10420         /*
10421          * If all of these values are the same, it's pretty sure that
10422          * we're on a system that ignores getpgrp's first argument.
10423          */
10424         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10425                 exit(0);
10426
10427         child = fork();
10428         if (child < 0)
10429                 exit(1);
10430         else if (child == 0) {
10431                 np = getpid();
10432                 /*
10433                  * If this is Sys V, this will not work; pgrp will be
10434                  * set to np because setpgrp just changes a pgrp to be
10435                  * the same as the pid.
10436                  */
10437                 setpgrp(np, pg1);
10438                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10439                 if (ng == pg1) {
10440                         exit(1);
10441                 } else {
10442                         exit(0);
10443                 }
10444         } else {
10445                 wait(&s);
10446                 exit(s>>8);
10447         }
10448 }
10449
10450 EOF
10451 if { (eval echo configure:10452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10452 then
10453   ac_cv_func_getpgrp_void=yes
10454 else
10455   conftest_rc="$?"
10456   echo "configure: failed program was:" >&5
10457   cat conftest.$ac_ext >&5
10458   rm -fr conftest*
10459   ac_cv_func_getpgrp_void=no
10460 fi
10461 rm -fr conftest*
10462
10463
10464 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10465 if test $ac_cv_func_getpgrp_void = yes; then
10466   { test "$extra_verbose" = "yes" && cat << \EOF
10467     Defining GETPGRP_VOID
10468 EOF
10469 cat >> confdefs.h <<\EOF
10470 #define GETPGRP_VOID 1
10471 EOF
10472 }
10473
10474 fi
10475
10476
10477 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10478 echo "configure:10479: checking for working mmap" >&5
10479 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10480 cat > conftest.$ac_ext <<EOF
10481 #line 10482 "configure"
10482 #include "confdefs.h"
10483 #include <stdio.h>
10484 #include <unistd.h>
10485 #include <fcntl.h>
10486 #include <sys/mman.h>
10487
10488 #ifndef MAP_VARIABLE
10489 #define MAP_VARIABLE 0
10490 #endif
10491
10492 #ifndef MAP_FAILED
10493 #define MAP_FAILED -1
10494 #endif
10495
10496 int main (int argc, char *argv[])
10497 {
10498   int fd = -1;
10499   caddr_t p;
10500 #ifndef MAP_ANONYMOUS
10501   fd = open ("/dev/zero", O_RDWR);
10502   if (fd < 0)
10503     return 1;
10504 #define MAP_ANONYMOUS 0
10505 #endif
10506   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10507            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10508            fd, 0) != (void *) MAP_FAILED)
10509     return 0;
10510   perror ("conftest: mmap failed");
10511   return 1;
10512 }
10513 EOF
10514 if { (eval echo configure:10515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10515 then
10516   have_mmap=yes
10517 else
10518   conftest_rc="$?"
10519   echo "configure: failed program was:" >&5
10520   cat conftest.$ac_ext >&5
10521   rm -fr conftest*
10522   have_mmap=no
10523 fi
10524 rm -fr conftest* ;;
10525 esac
10526 echo "$ac_t""$have_mmap" 1>&6
10527 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10528     Defining HAVE_MMAP
10529 EOF
10530 cat >> confdefs.h <<\EOF
10531 #define HAVE_MMAP 1
10532 EOF
10533 }
10534
10535
10536 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10537 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10538 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10539     Defining REL_ALLOC
10540 EOF
10541 cat >> confdefs.h <<\EOF
10542 #define REL_ALLOC 1
10543 EOF
10544 }
10545
10546
10547 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10548 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10549 echo "configure:10550: checking for termios.h" >&5
10550
10551 cat > conftest.$ac_ext <<EOF
10552 #line 10553 "configure"
10553 #include "confdefs.h"
10554 #include <termios.h>
10555 EOF
10556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10557 { (eval echo configure:10558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10559 if test -z "$ac_err"; then
10560   rm -rf conftest*
10561   eval "ac_cv_header_$ac_safe=yes"
10562 else
10563   echo "$ac_err" >&5
10564   echo "configure: failed program was:" >&5
10565   cat conftest.$ac_ext >&5
10566   rm -rf conftest*
10567   eval "ac_cv_header_$ac_safe=no"
10568 fi
10569 rm -f conftest*
10570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10571   echo "$ac_t""yes" 1>&6
10572   { test "$extra_verbose" = "yes" && cat << \EOF
10573     Defining HAVE_TERMIOS
10574 EOF
10575 cat >> confdefs.h <<\EOF
10576 #define HAVE_TERMIOS 1
10577 EOF
10578 }
10579
10580   { test "$extra_verbose" = "yes" && cat << \EOF
10581     Defining SIGNALS_VIA_CHARACTERS
10582 EOF
10583 cat >> confdefs.h <<\EOF
10584 #define SIGNALS_VIA_CHARACTERS 1
10585 EOF
10586 }
10587
10588   { test "$extra_verbose" = "yes" && cat << \EOF
10589     Defining NO_TERMIO
10590 EOF
10591 cat >> confdefs.h <<\EOF
10592 #define NO_TERMIO 1
10593 EOF
10594 }
10595
10596 else
10597   echo "$ac_t""no" 1>&6
10598 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10599 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10600 echo "configure:10601: checking for termio.h" >&5
10601
10602 cat > conftest.$ac_ext <<EOF
10603 #line 10604 "configure"
10604 #include "confdefs.h"
10605 #include <termio.h>
10606 EOF
10607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10608 { (eval echo configure:10609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10610 if test -z "$ac_err"; then
10611   rm -rf conftest*
10612   eval "ac_cv_header_$ac_safe=yes"
10613 else
10614   echo "$ac_err" >&5
10615   echo "configure: failed program was:" >&5
10616   cat conftest.$ac_ext >&5
10617   rm -rf conftest*
10618   eval "ac_cv_header_$ac_safe=no"
10619 fi
10620 rm -f conftest*
10621 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10622   echo "$ac_t""yes" 1>&6
10623   { test "$extra_verbose" = "yes" && cat << \EOF
10624     Defining HAVE_TERMIO
10625 EOF
10626 cat >> confdefs.h <<\EOF
10627 #define HAVE_TERMIO 1
10628 EOF
10629 }
10630
10631 else
10632   echo "$ac_t""no" 1>&6
10633 fi
10634
10635 fi
10636
10637
10638
10639 echo $ac_n "checking for socket""... $ac_c" 1>&6
10640 echo "configure:10641: checking for socket" >&5
10641
10642 cat > conftest.$ac_ext <<EOF
10643 #line 10644 "configure"
10644 #include "confdefs.h"
10645 /* System header to define __stub macros and hopefully few prototypes,
10646     which can conflict with char socket(); below.  */
10647 #include <assert.h>
10648 /* Override any gcc2 internal prototype to avoid an error.  */
10649 /* We use char because int might match the return type of a gcc2
10650     builtin and then its argument prototype would still apply.  */
10651 char socket();
10652
10653 int main() {
10654
10655 /* The GNU C library defines this for functions which it implements
10656     to always fail with ENOSYS.  Some functions are actually named
10657     something starting with __ and the normal name is an alias.  */
10658 #if defined (__stub_socket) || defined (__stub___socket)
10659 choke me
10660 #else
10661 socket();
10662 #endif
10663
10664 ; return 0; }
10665 EOF
10666 if { (eval echo configure:10667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10667   rm -rf conftest*
10668   eval "ac_cv_func_socket=yes"
10669 else
10670   echo "configure: failed program was:" >&5
10671   cat conftest.$ac_ext >&5
10672   rm -rf conftest*
10673   eval "ac_cv_func_socket=no"
10674 fi
10675 rm -f conftest*
10676
10677 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10678   echo "$ac_t""yes" 1>&6
10679   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10680 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10681 echo "configure:10682: checking for netinet/in.h" >&5
10682
10683 cat > conftest.$ac_ext <<EOF
10684 #line 10685 "configure"
10685 #include "confdefs.h"
10686 #include <netinet/in.h>
10687 EOF
10688 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10689 { (eval echo configure:10690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10690 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10691 if test -z "$ac_err"; then
10692   rm -rf conftest*
10693   eval "ac_cv_header_$ac_safe=yes"
10694 else
10695   echo "$ac_err" >&5
10696   echo "configure: failed program was:" >&5
10697   cat conftest.$ac_ext >&5
10698   rm -rf conftest*
10699   eval "ac_cv_header_$ac_safe=no"
10700 fi
10701 rm -f conftest*
10702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10703   echo "$ac_t""yes" 1>&6
10704   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10705 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10706 echo "configure:10707: checking for arpa/inet.h" >&5
10707
10708 cat > conftest.$ac_ext <<EOF
10709 #line 10710 "configure"
10710 #include "confdefs.h"
10711 #include <arpa/inet.h>
10712 EOF
10713 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10714 { (eval echo configure:10715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10715 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10716 if test -z "$ac_err"; then
10717   rm -rf conftest*
10718   eval "ac_cv_header_$ac_safe=yes"
10719 else
10720   echo "$ac_err" >&5
10721   echo "configure: failed program was:" >&5
10722   cat conftest.$ac_ext >&5
10723   rm -rf conftest*
10724   eval "ac_cv_header_$ac_safe=no"
10725 fi
10726 rm -f conftest*
10727 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10728   echo "$ac_t""yes" 1>&6
10729   
10730   { test "$extra_verbose" = "yes" && cat << \EOF
10731     Defining HAVE_SOCKETS
10732 EOF
10733 cat >> confdefs.h <<\EOF
10734 #define HAVE_SOCKETS 1
10735 EOF
10736 }
10737
10738       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10739 echo "configure:10740: checking "for sun_len member in struct sockaddr_un"" >&5
10740       cat > conftest.$ac_ext <<EOF
10741 #line 10742 "configure"
10742 #include "confdefs.h"
10743
10744 #include <sys/types.h>
10745 #include <sys/socket.h>
10746 #include <sys/un.h>
10747       
10748 int main() {
10749 static struct sockaddr_un x; x.sun_len = 1;
10750 ; return 0; }
10751 EOF
10752 if { (eval echo configure:10753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10753   rm -rf conftest*
10754   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10755     Defining HAVE_SOCKADDR_SUN_LEN
10756 EOF
10757 cat >> confdefs.h <<\EOF
10758 #define HAVE_SOCKADDR_SUN_LEN 1
10759 EOF
10760 }
10761
10762 else
10763   echo "configure: failed program was:" >&5
10764   cat conftest.$ac_ext >&5
10765   rm -rf conftest*
10766   echo "$ac_t""no" 1>&6
10767 fi
10768 rm -f conftest*
10769       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10770 echo "configure:10771: checking "for ip_mreq struct in netinet/in.h"" >&5
10771       cat > conftest.$ac_ext <<EOF
10772 #line 10773 "configure"
10773 #include "confdefs.h"
10774
10775 #include <sys/types.h>
10776 #include <netinet/in.h>
10777       
10778 int main() {
10779 static struct ip_mreq x;
10780 ; return 0; }
10781 EOF
10782 if { (eval echo configure:10783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10783   rm -rf conftest*
10784   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10785     Defining HAVE_MULTICAST
10786 EOF
10787 cat >> confdefs.h <<\EOF
10788 #define HAVE_MULTICAST 1
10789 EOF
10790 }
10791
10792 else
10793   echo "configure: failed program was:" >&5
10794   cat conftest.$ac_ext >&5
10795   rm -rf conftest*
10796   echo "$ac_t""no" 1>&6
10797 fi
10798 rm -f conftest*
10799 else
10800   echo "$ac_t""no" 1>&6
10801 fi
10802
10803 else
10804   echo "$ac_t""no" 1>&6
10805 fi
10806
10807 else
10808   echo "$ac_t""no" 1>&6
10809 fi
10810
10811
10812 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10813 echo "configure:10814: checking for msgget" >&5
10814
10815 cat > conftest.$ac_ext <<EOF
10816 #line 10817 "configure"
10817 #include "confdefs.h"
10818 /* System header to define __stub macros and hopefully few prototypes,
10819     which can conflict with char msgget(); below.  */
10820 #include <assert.h>
10821 /* Override any gcc2 internal prototype to avoid an error.  */
10822 /* We use char because int might match the return type of a gcc2
10823     builtin and then its argument prototype would still apply.  */
10824 char msgget();
10825
10826 int main() {
10827
10828 /* The GNU C library defines this for functions which it implements
10829     to always fail with ENOSYS.  Some functions are actually named
10830     something starting with __ and the normal name is an alias.  */
10831 #if defined (__stub_msgget) || defined (__stub___msgget)
10832 choke me
10833 #else
10834 msgget();
10835 #endif
10836
10837 ; return 0; }
10838 EOF
10839 if { (eval echo configure:10840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10840   rm -rf conftest*
10841   eval "ac_cv_func_msgget=yes"
10842 else
10843   echo "configure: failed program was:" >&5
10844   cat conftest.$ac_ext >&5
10845   rm -rf conftest*
10846   eval "ac_cv_func_msgget=no"
10847 fi
10848 rm -f conftest*
10849
10850 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10851   echo "$ac_t""yes" 1>&6
10852   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10853 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10854 echo "configure:10855: checking for sys/ipc.h" >&5
10855
10856 cat > conftest.$ac_ext <<EOF
10857 #line 10858 "configure"
10858 #include "confdefs.h"
10859 #include <sys/ipc.h>
10860 EOF
10861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10862 { (eval echo configure:10863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10864 if test -z "$ac_err"; then
10865   rm -rf conftest*
10866   eval "ac_cv_header_$ac_safe=yes"
10867 else
10868   echo "$ac_err" >&5
10869   echo "configure: failed program was:" >&5
10870   cat conftest.$ac_ext >&5
10871   rm -rf conftest*
10872   eval "ac_cv_header_$ac_safe=no"
10873 fi
10874 rm -f conftest*
10875 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10876   echo "$ac_t""yes" 1>&6
10877   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10878 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10879 echo "configure:10880: checking for sys/msg.h" >&5
10880
10881 cat > conftest.$ac_ext <<EOF
10882 #line 10883 "configure"
10883 #include "confdefs.h"
10884 #include <sys/msg.h>
10885 EOF
10886 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10887 { (eval echo configure:10888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10888 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10889 if test -z "$ac_err"; then
10890   rm -rf conftest*
10891   eval "ac_cv_header_$ac_safe=yes"
10892 else
10893   echo "$ac_err" >&5
10894   echo "configure: failed program was:" >&5
10895   cat conftest.$ac_ext >&5
10896   rm -rf conftest*
10897   eval "ac_cv_header_$ac_safe=no"
10898 fi
10899 rm -f conftest*
10900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10901   echo "$ac_t""yes" 1>&6
10902   { test "$extra_verbose" = "yes" && cat << \EOF
10903     Defining HAVE_SYSVIPC
10904 EOF
10905 cat >> confdefs.h <<\EOF
10906 #define HAVE_SYSVIPC 1
10907 EOF
10908 }
10909
10910 else
10911   echo "$ac_t""no" 1>&6
10912 fi
10913
10914 else
10915   echo "$ac_t""no" 1>&6
10916 fi
10917
10918 else
10919   echo "$ac_t""no" 1>&6
10920 fi
10921
10922
10923 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10924 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10925 echo "configure:10926: checking for dirent.h" >&5
10926
10927 cat > conftest.$ac_ext <<EOF
10928 #line 10929 "configure"
10929 #include "confdefs.h"
10930 #include <dirent.h>
10931 EOF
10932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10933 { (eval echo configure:10934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10935 if test -z "$ac_err"; then
10936   rm -rf conftest*
10937   eval "ac_cv_header_$ac_safe=yes"
10938 else
10939   echo "$ac_err" >&5
10940   echo "configure: failed program was:" >&5
10941   cat conftest.$ac_ext >&5
10942   rm -rf conftest*
10943   eval "ac_cv_header_$ac_safe=no"
10944 fi
10945 rm -f conftest*
10946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10947   echo "$ac_t""yes" 1>&6
10948   { test "$extra_verbose" = "yes" && cat << \EOF
10949     Defining SYSV_SYSTEM_DIR
10950 EOF
10951 cat >> confdefs.h <<\EOF
10952 #define SYSV_SYSTEM_DIR 1
10953 EOF
10954 }
10955
10956 else
10957   echo "$ac_t""no" 1>&6
10958 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
10959 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
10960 echo "configure:10961: checking for sys/dir.h" >&5
10961
10962 cat > conftest.$ac_ext <<EOF
10963 #line 10964 "configure"
10964 #include "confdefs.h"
10965 #include <sys/dir.h>
10966 EOF
10967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10968 { (eval echo configure:10969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10970 if test -z "$ac_err"; then
10971   rm -rf conftest*
10972   eval "ac_cv_header_$ac_safe=yes"
10973 else
10974   echo "$ac_err" >&5
10975   echo "configure: failed program was:" >&5
10976   cat conftest.$ac_ext >&5
10977   rm -rf conftest*
10978   eval "ac_cv_header_$ac_safe=no"
10979 fi
10980 rm -f conftest*
10981 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10982   echo "$ac_t""yes" 1>&6
10983   :
10984 else
10985   echo "$ac_t""no" 1>&6
10986 { test "$extra_verbose" = "yes" && cat << \EOF
10987     Defining NONSYSTEM_DIR_LIBRARY
10988 EOF
10989 cat >> confdefs.h <<\EOF
10990 #define NONSYSTEM_DIR_LIBRARY 1
10991 EOF
10992 }
10993
10994 fi
10995
10996 fi
10997
10998
10999 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11000 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11001 echo "configure:11002: checking for nlist.h" >&5
11002
11003 cat > conftest.$ac_ext <<EOF
11004 #line 11005 "configure"
11005 #include "confdefs.h"
11006 #include <nlist.h>
11007 EOF
11008 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11009 { (eval echo configure:11010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11010 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11011 if test -z "$ac_err"; then
11012   rm -rf conftest*
11013   eval "ac_cv_header_$ac_safe=yes"
11014 else
11015   echo "$ac_err" >&5
11016   echo "configure: failed program was:" >&5
11017   cat conftest.$ac_ext >&5
11018   rm -rf conftest*
11019   eval "ac_cv_header_$ac_safe=no"
11020 fi
11021 rm -f conftest*
11022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11023   echo "$ac_t""yes" 1>&6
11024   { test "$extra_verbose" = "yes" && cat << \EOF
11025     Defining NLIST_STRUCT
11026 EOF
11027 cat >> confdefs.h <<\EOF
11028 #define NLIST_STRUCT 1
11029 EOF
11030 }
11031
11032 else
11033   echo "$ac_t""no" 1>&6
11034 fi
11035
11036
11037
11038 echo "checking "for sound support"" 1>&6
11039 echo "configure:11040: checking "for sound support"" >&5
11040 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11041
11042 if test "$with_native_sound" != "no"; then
11043     if test -n "$native_sound_lib"; then
11044     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11045 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11046 echo "configure:11047: checking for multimedia/audio_device.h" >&5
11047
11048 cat > conftest.$ac_ext <<EOF
11049 #line 11050 "configure"
11050 #include "confdefs.h"
11051 #include <multimedia/audio_device.h>
11052 EOF
11053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11054 { (eval echo configure:11055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11056 if test -z "$ac_err"; then
11057   rm -rf conftest*
11058   eval "ac_cv_header_$ac_safe=yes"
11059 else
11060   echo "$ac_err" >&5
11061   echo "configure: failed program was:" >&5
11062   cat conftest.$ac_ext >&5
11063   rm -rf conftest*
11064   eval "ac_cv_header_$ac_safe=no"
11065 fi
11066 rm -f conftest*
11067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11068   echo "$ac_t""yes" 1>&6
11069   sound_found=yes sound_cflags=""
11070       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11071    echo "    xemacs will be linked with \"sunplay.o\""
11072  fi
11073 else
11074   echo "$ac_t""no" 1>&6
11075 fi
11076
11077   fi
11078
11079     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11080     sound_found=yes
11081     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11082    echo "    xemacs will be linked with \"sunplay.o\""
11083  fi
11084     if test -d "/usr/demo/SOUND/include"
11085       then sound_cflags="-I/usr/demo/SOUND/include"
11086       else sound_cflags="-I/usr/demo/SOUND"
11087     fi
11088     if test -z "$native_sound_lib" ; then
11089       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11090         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11091         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11092       fi
11093     fi
11094   fi
11095
11096     if test -z "$sound_found"; then
11097     case "$canonical" in
11098     *-sgi-* )
11099       if test -z "$native_sound_lib"; then
11100         
11101 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11102 echo "configure:11103: checking for ALopenport in -laudio" >&5
11103 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11104
11105 xe_check_libs=" -laudio "
11106 cat > conftest.$ac_ext <<EOF
11107 #line 11108 "configure"
11108 #include "confdefs.h"
11109 /* Override any gcc2 internal prototype to avoid an error.  */
11110 /* We use char because int might match the return type of a gcc2
11111     builtin and then its argument prototype would still apply.  */
11112 char ALopenport();
11113
11114 int main() {
11115 ALopenport()
11116 ; return 0; }
11117 EOF
11118 if { (eval echo configure:11119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11119   rm -rf conftest*
11120   eval "ac_cv_lib_$ac_lib_var=yes"
11121 else
11122   echo "configure: failed program was:" >&5
11123   cat conftest.$ac_ext >&5
11124   rm -rf conftest*
11125   eval "ac_cv_lib_$ac_lib_var=no"
11126 fi
11127 rm -f conftest*
11128 xe_check_libs=""
11129
11130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11131   echo "$ac_t""yes" 1>&6
11132   native_sound_lib="-laudio"
11133 else
11134   echo "$ac_t""no" 1>&6
11135 fi
11136
11137
11138       fi
11139       if test -n "$native_sound_lib"; then
11140         sound_found=yes sound_cflags=""
11141         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11142    echo "    xemacs will be linked with \"sgiplay.o\""
11143  fi
11144       fi ;;
11145     hppa*-hp-hpux* )
11146       if test -z "$native_sound_lib"; then
11147         
11148 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11149 echo "configure:11150: checking for AOpenAudio in -lAlib" >&5
11150 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11151
11152 xe_check_libs=" -lAlib "
11153 cat > conftest.$ac_ext <<EOF
11154 #line 11155 "configure"
11155 #include "confdefs.h"
11156 /* Override any gcc2 internal prototype to avoid an error.  */
11157 /* We use char because int might match the return type of a gcc2
11158     builtin and then its argument prototype would still apply.  */
11159 char AOpenAudio();
11160
11161 int main() {
11162 AOpenAudio()
11163 ; return 0; }
11164 EOF
11165 if { (eval echo configure:11166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11166   rm -rf conftest*
11167   eval "ac_cv_lib_$ac_lib_var=yes"
11168 else
11169   echo "configure: failed program was:" >&5
11170   cat conftest.$ac_ext >&5
11171   rm -rf conftest*
11172   eval "ac_cv_lib_$ac_lib_var=no"
11173 fi
11174 rm -f conftest*
11175 xe_check_libs=""
11176
11177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11178   echo "$ac_t""yes" 1>&6
11179   native_sound_lib="-lAlib"
11180 else
11181   echo "$ac_t""no" 1>&6
11182 fi
11183
11184
11185       fi
11186       if test -n "$native_sound_lib"; then
11187         sound_found=yes
11188         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11189    echo "    xemacs will be linked with \"hpplay.o\""
11190  fi
11191         if test "$GCC" = "yes" # Kludge city
11192           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11193           else sound_cflags="+e -I/usr/audio/examples"
11194         fi
11195       fi ;;
11196     esac
11197   fi
11198
11199     if test -z "$sound_found"; then
11200     for dir in "machine" "sys" "linux"; do
11201       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11202 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11203 echo "configure:11204: checking for ${dir}/soundcard.h" >&5
11204
11205 cat > conftest.$ac_ext <<EOF
11206 #line 11207 "configure"
11207 #include "confdefs.h"
11208 #include <${dir}/soundcard.h>
11209 EOF
11210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11211 { (eval echo configure:11212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11213 if test -z "$ac_err"; then
11214   rm -rf conftest*
11215   eval "ac_cv_header_$ac_safe=yes"
11216 else
11217   echo "$ac_err" >&5
11218   echo "configure: failed program was:" >&5
11219   cat conftest.$ac_ext >&5
11220   rm -rf conftest*
11221   eval "ac_cv_header_$ac_safe=no"
11222 fi
11223 rm -f conftest*
11224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11225   echo "$ac_t""yes" 1>&6
11226   sound_found=yes
11227        need_miscplay=yes
11228         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11229    echo "    xemacs will be linked with \"linuxplay.o\""
11230  fi
11231         { test "$extra_verbose" = "yes" && cat << EOF
11232     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
11233 EOF
11234 cat >> confdefs.h <<EOF
11235 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
11236 EOF
11237 }
11238
11239         break
11240 else
11241   echo "$ac_t""no" 1>&6
11242 fi
11243
11244     done
11245   fi
11246
11247   test "$sound_found" = "yes" && with_native_sound=yes
11248 fi
11249
11250 if test "$with_native_sound" = "yes"; then
11251   { test "$extra_verbose" = "yes" && cat << \EOF
11252     Defining HAVE_NATIVE_SOUND
11253 EOF
11254 cat >> confdefs.h <<\EOF
11255 #define HAVE_NATIVE_SOUND 1
11256 EOF
11257 }
11258
11259   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11260 fi
11261
11262 if test "$with_nas_sound" != "no"; then
11263   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11264 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11265 echo "configure:11266: checking for audio/audiolib.h" >&5
11266
11267 cat > conftest.$ac_ext <<EOF
11268 #line 11269 "configure"
11269 #include "confdefs.h"
11270 #include <audio/audiolib.h>
11271 EOF
11272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11273 { (eval echo configure:11274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11275 if test -z "$ac_err"; then
11276   rm -rf conftest*
11277   eval "ac_cv_header_$ac_safe=yes"
11278 else
11279   echo "$ac_err" >&5
11280   echo "configure: failed program was:" >&5
11281   cat conftest.$ac_ext >&5
11282   rm -rf conftest*
11283   eval "ac_cv_header_$ac_safe=no"
11284 fi
11285 rm -f conftest*
11286 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11287   echo "$ac_t""yes" 1>&6
11288   
11289     
11290 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11291 echo "configure:11292: checking for AuOpenServer in -laudio" >&5
11292 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11293
11294 xe_check_libs=" -laudio "
11295 cat > conftest.$ac_ext <<EOF
11296 #line 11297 "configure"
11297 #include "confdefs.h"
11298 /* Override any gcc2 internal prototype to avoid an error.  */
11299 /* We use char because int might match the return type of a gcc2
11300     builtin and then its argument prototype would still apply.  */
11301 char AuOpenServer();
11302
11303 int main() {
11304 AuOpenServer()
11305 ; return 0; }
11306 EOF
11307 if { (eval echo configure:11308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11308   rm -rf conftest*
11309   eval "ac_cv_lib_$ac_lib_var=yes"
11310 else
11311   echo "configure: failed program was:" >&5
11312   cat conftest.$ac_ext >&5
11313   rm -rf conftest*
11314   eval "ac_cv_lib_$ac_lib_var=no"
11315 fi
11316 rm -f conftest*
11317 xe_check_libs=""
11318
11319 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11320   echo "$ac_t""yes" 1>&6
11321   have_nas_sound=yes
11322 else
11323   echo "$ac_t""no" 1>&6
11324 fi
11325
11326
11327 else
11328   echo "$ac_t""no" 1>&6
11329 fi
11330
11331   if test "$have_nas_sound" = "yes"; then
11332     with_nas_sound=yes
11333     { test "$extra_verbose" = "yes" && cat << \EOF
11334     Defining HAVE_NAS_SOUND
11335 EOF
11336 cat >> confdefs.h <<\EOF
11337 #define HAVE_NAS_SOUND 1
11338 EOF
11339 }
11340
11341     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11342    echo "    xemacs will be linked with \"nas.o\""
11343  fi
11344     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11345             cat > conftest.$ac_ext <<EOF
11346 #line 11347 "configure"
11347 #include "confdefs.h"
11348 #include <audio/Xtutil.h>
11349 EOF
11350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11351   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11352   :
11353 else
11354   rm -rf conftest*
11355   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11356     Defining NAS_NO_ERROR_JUMP
11357 EOF
11358 cat >> confdefs.h <<\EOF
11359 #define NAS_NO_ERROR_JUMP 1
11360 EOF
11361 }
11362
11363 fi
11364 rm -f conftest*
11365
11366   else
11367     test "$with_nas_sound" = "yes" && \
11368       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11369     with_nas_sound=no
11370   fi
11371 fi
11372
11373 if test "$with_esd_sound" != "no"; then
11374   # Extract the first word of "esd-config", so it can be a program name with args.
11375 set dummy esd-config; ac_word=$2
11376 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11377 echo "configure:11378: checking for $ac_word" >&5
11378
11379 if test -n "$have_esd_config"; then
11380   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11381 else
11382   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11383   ac_dummy="$PATH"
11384   for ac_dir in $ac_dummy; do
11385     test -z "$ac_dir" && ac_dir=.
11386     if test -f $ac_dir/$ac_word; then
11387       ac_cv_prog_have_esd_config="yes"
11388       break
11389     fi
11390   done
11391   IFS="$ac_save_ifs"
11392   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11393 fi
11394 have_esd_config="$ac_cv_prog_have_esd_config"
11395 if test -n "$have_esd_config"; then
11396   echo "$ac_t""$have_esd_config" 1>&6
11397 else
11398   echo "$ac_t""no" 1>&6
11399 fi
11400
11401   if test "$have_esd_config" = "yes"; then
11402     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11403     c_switch_site="$c_switch_site `esd-config --cflags`" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi
11404     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11405     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11406 echo "configure:11407: checking for esd_play_stream" >&5
11407
11408 cat > conftest.$ac_ext <<EOF
11409 #line 11410 "configure"
11410 #include "confdefs.h"
11411 /* System header to define __stub macros and hopefully few prototypes,
11412     which can conflict with char esd_play_stream(); below.  */
11413 #include <assert.h>
11414 /* Override any gcc2 internal prototype to avoid an error.  */
11415 /* We use char because int might match the return type of a gcc2
11416     builtin and then its argument prototype would still apply.  */
11417 char esd_play_stream();
11418
11419 int main() {
11420
11421 /* The GNU C library defines this for functions which it implements
11422     to always fail with ENOSYS.  Some functions are actually named
11423     something starting with __ and the normal name is an alias.  */
11424 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11425 choke me
11426 #else
11427 esd_play_stream();
11428 #endif
11429
11430 ; return 0; }
11431 EOF
11432 if { (eval echo configure:11433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11433   rm -rf conftest*
11434   eval "ac_cv_func_esd_play_stream=yes"
11435 else
11436   echo "configure: failed program was:" >&5
11437   cat conftest.$ac_ext >&5
11438   rm -rf conftest*
11439   eval "ac_cv_func_esd_play_stream=no"
11440 fi
11441 rm -f conftest*
11442
11443 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
11444   echo "$ac_t""yes" 1>&6
11445   have_esd_sound=yes
11446 else
11447   echo "$ac_t""no" 1>&6
11448 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
11449 fi
11450
11451   fi
11452
11453   if test "$have_esd_sound" = "yes"; then
11454     with_esd_sound=yes
11455     need_miscplay=yes
11456     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
11457    echo "    xemacs will be linked with \"esd.o\""
11458  fi
11459     { test "$extra_verbose" = "yes" && cat << \EOF
11460     Defining HAVE_ESD_SOUND
11461 EOF
11462 cat >> confdefs.h <<\EOF
11463 #define HAVE_ESD_SOUND 1
11464 EOF
11465 }
11466
11467   else
11468     test "$with_esd_sound" = "yes" && \
11469       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
11470     with_esd_sound=no
11471   fi
11472 fi
11473
11474 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
11475    echo "    xemacs will be linked with \"miscplay.o\""
11476  fi
11477
11478
11479 test -z "$with_tty" && with_tty=yes
11480
11481 if test "$with_tty" = "yes"  ; then
11482   echo "checking for TTY-related features" 1>&6
11483 echo "configure:11484: checking for TTY-related features" >&5
11484   { test "$extra_verbose" = "yes" && cat << \EOF
11485     Defining HAVE_TTY
11486 EOF
11487 cat >> confdefs.h <<\EOF
11488 #define HAVE_TTY 1
11489 EOF
11490 }
11491
11492   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
11493    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\""
11494  fi
11495
11496     if test -z "$with_ncurses"; then
11497     
11498 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
11499 echo "configure:11500: checking for tgetent in -lncurses" >&5
11500 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
11501
11502 xe_check_libs=" -lncurses "
11503 cat > conftest.$ac_ext <<EOF
11504 #line 11505 "configure"
11505 #include "confdefs.h"
11506 /* Override any gcc2 internal prototype to avoid an error.  */
11507 /* We use char because int might match the return type of a gcc2
11508     builtin and then its argument prototype would still apply.  */
11509 char tgetent();
11510
11511 int main() {
11512 tgetent()
11513 ; return 0; }
11514 EOF
11515 if { (eval echo configure:11516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11516   rm -rf conftest*
11517   eval "ac_cv_lib_$ac_lib_var=yes"
11518 else
11519   echo "configure: failed program was:" >&5
11520   cat conftest.$ac_ext >&5
11521   rm -rf conftest*
11522   eval "ac_cv_lib_$ac_lib_var=no"
11523 fi
11524 rm -f conftest*
11525 xe_check_libs=""
11526
11527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11528   echo "$ac_t""yes" 1>&6
11529   with_ncurses=yes
11530 else
11531   echo "$ac_t""no" 1>&6
11532 with_ncurses=no
11533 fi
11534
11535
11536   fi
11537   if test "$with_ncurses" = "yes"; then
11538     { test "$extra_verbose" = "yes" && cat << \EOF
11539     Defining HAVE_NCURSES
11540 EOF
11541 cat >> confdefs.h <<\EOF
11542 #define HAVE_NCURSES 1
11543 EOF
11544 }
11545
11546     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11547 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11548 echo "configure:11549: checking for ncurses/curses.h" >&5
11549
11550 cat > conftest.$ac_ext <<EOF
11551 #line 11552 "configure"
11552 #include "confdefs.h"
11553 #include <ncurses/curses.h>
11554 EOF
11555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11556 { (eval echo configure:11557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11558 if test -z "$ac_err"; then
11559   rm -rf conftest*
11560   eval "ac_cv_header_$ac_safe=yes"
11561 else
11562   echo "$ac_err" >&5
11563   echo "configure: failed program was:" >&5
11564   cat conftest.$ac_ext >&5
11565   rm -rf conftest*
11566   eval "ac_cv_header_$ac_safe=no"
11567 fi
11568 rm -f conftest*
11569 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11570   echo "$ac_t""yes" 1>&6
11571   curses_h_path=ncurses/curses.h
11572 else
11573   echo "$ac_t""no" 1>&6
11574 fi
11575
11576     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11577 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11578 echo "configure:11579: checking for ncurses/term.h" >&5
11579
11580 cat > conftest.$ac_ext <<EOF
11581 #line 11582 "configure"
11582 #include "confdefs.h"
11583 #include <ncurses/term.h>
11584 EOF
11585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11586 { (eval echo configure:11587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11588 if test -z "$ac_err"; then
11589   rm -rf conftest*
11590   eval "ac_cv_header_$ac_safe=yes"
11591 else
11592   echo "$ac_err" >&5
11593   echo "configure: failed program was:" >&5
11594   cat conftest.$ac_ext >&5
11595   rm -rf conftest*
11596   eval "ac_cv_header_$ac_safe=no"
11597 fi
11598 rm -f conftest*
11599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11600   echo "$ac_t""yes" 1>&6
11601   term_h_path=ncurses/term.h
11602 else
11603   echo "$ac_t""no" 1>&6
11604 fi
11605
11606     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11607    echo "    xemacs will be linked with \"terminfo.o\""
11608  fi
11609     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11610
11611     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11612                         save_c_switch_site="$c_switch_site"
11613       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11614       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11615 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11616 echo "configure:11617: checking for ncurses/curses.h" >&5
11617
11618 cat > conftest.$ac_ext <<EOF
11619 #line 11620 "configure"
11620 #include "confdefs.h"
11621 #include <ncurses/curses.h>
11622 EOF
11623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11624 { (eval echo configure:11625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11626 if test -z "$ac_err"; then
11627   rm -rf conftest*
11628   eval "ac_cv_header_$ac_safe=yes"
11629 else
11630   echo "$ac_err" >&5
11631   echo "configure: failed program was:" >&5
11632   cat conftest.$ac_ext >&5
11633   rm -rf conftest*
11634   eval "ac_cv_header_$ac_safe=no"
11635 fi
11636 rm -f conftest*
11637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11638   echo "$ac_t""yes" 1>&6
11639   curses_h_path=ncurses/curses.h
11640 else
11641   echo "$ac_t""no" 1>&6
11642 fi
11643
11644       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11645         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11646         else c_switch_site="$save_c_switch_site"
11647       fi
11648     fi
11649   else         if test "$have_terminfo" = "yes"; then
11650       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11651    echo "    xemacs will be linked with \"terminfo.o\""
11652  fi
11653       if test -n "$libs_termcap"; then
11654         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11655       else
11656         for lib in curses termlib termcap; do
11657           
11658 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11659 echo "configure:11660: checking for tgetent in -l$lib" >&5
11660 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11661
11662 xe_check_libs=" -l$lib "
11663 cat > conftest.$ac_ext <<EOF
11664 #line 11665 "configure"
11665 #include "confdefs.h"
11666 /* Override any gcc2 internal prototype to avoid an error.  */
11667 /* We use char because int might match the return type of a gcc2
11668     builtin and then its argument prototype would still apply.  */
11669 char tgetent();
11670
11671 int main() {
11672 tgetent()
11673 ; return 0; }
11674 EOF
11675 if { (eval echo configure:11676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11676   rm -rf conftest*
11677   eval "ac_cv_lib_$ac_lib_var=yes"
11678 else
11679   echo "configure: failed program was:" >&5
11680   cat conftest.$ac_ext >&5
11681   rm -rf conftest*
11682   eval "ac_cv_lib_$ac_lib_var=no"
11683 fi
11684 rm -f conftest*
11685 xe_check_libs=""
11686
11687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11688   echo "$ac_t""yes" 1>&6
11689   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11690 else
11691   echo "$ac_t""no" 1>&6
11692 fi
11693
11694
11695         done
11696       fi
11697     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11698    echo "    xemacs will be linked with \"tparam.o\""
11699  fi
11700                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11701       if test -n "$libs_termcap"; then
11702         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11703       else
11704         
11705 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11706 echo "configure:11707: checking for tgetent in -lcurses" >&5
11707 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11708
11709 xe_check_libs=" -lcurses "
11710 cat > conftest.$ac_ext <<EOF
11711 #line 11712 "configure"
11712 #include "confdefs.h"
11713 /* Override any gcc2 internal prototype to avoid an error.  */
11714 /* We use char because int might match the return type of a gcc2
11715     builtin and then its argument prototype would still apply.  */
11716 char tgetent();
11717
11718 int main() {
11719 tgetent()
11720 ; return 0; }
11721 EOF
11722 if { (eval echo configure:11723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11723   rm -rf conftest*
11724   eval "ac_cv_lib_$ac_lib_var=yes"
11725 else
11726   echo "configure: failed program was:" >&5
11727   cat conftest.$ac_ext >&5
11728   rm -rf conftest*
11729   eval "ac_cv_lib_$ac_lib_var=no"
11730 fi
11731 rm -f conftest*
11732 xe_check_libs=""
11733
11734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11735   echo "$ac_t""yes" 1>&6
11736   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11737 else
11738   echo "$ac_t""no" 1>&6
11739 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11740 echo "configure:11741: checking for tgetent in -ltermcap" >&5
11741 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11742
11743 xe_check_libs=" -ltermcap "
11744 cat > conftest.$ac_ext <<EOF
11745 #line 11746 "configure"
11746 #include "confdefs.h"
11747 /* Override any gcc2 internal prototype to avoid an error.  */
11748 /* We use char because int might match the return type of a gcc2
11749     builtin and then its argument prototype would still apply.  */
11750 char tgetent();
11751
11752 int main() {
11753 tgetent()
11754 ; return 0; }
11755 EOF
11756 if { (eval echo configure:11757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11757   rm -rf conftest*
11758   eval "ac_cv_lib_$ac_lib_var=yes"
11759 else
11760   echo "configure: failed program was:" >&5
11761   cat conftest.$ac_ext >&5
11762   rm -rf conftest*
11763   eval "ac_cv_lib_$ac_lib_var=no"
11764 fi
11765 rm -f conftest*
11766 xe_check_libs=""
11767
11768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11769   echo "$ac_t""yes" 1>&6
11770   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11771 else
11772   echo "$ac_t""no" 1>&6
11773 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11774    echo "    xemacs will be linked with \"termcap.o\""
11775  fi
11776 fi
11777
11778
11779 fi
11780
11781
11782       fi
11783     fi
11784   fi
11785   { test "$extra_verbose" = "yes" && cat << EOF
11786     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11787 EOF
11788 cat >> confdefs.h <<EOF
11789 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11790 EOF
11791 }
11792
11793   { test "$extra_verbose" = "yes" && cat << EOF
11794     Defining TERM_H_PATH = "${term_h_path-term.h}"
11795 EOF
11796 cat >> confdefs.h <<EOF
11797 #define TERM_H_PATH "${term_h_path-term.h}"
11798 EOF
11799 }
11800
11801
11802     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11803 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11804 echo "configure:11805: checking for gpm.h" >&5
11805
11806 cat > conftest.$ac_ext <<EOF
11807 #line 11808 "configure"
11808 #include "confdefs.h"
11809 #include <gpm.h>
11810 EOF
11811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11812 { (eval echo configure:11813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11814 if test -z "$ac_err"; then
11815   rm -rf conftest*
11816   eval "ac_cv_header_$ac_safe=yes"
11817 else
11818   echo "$ac_err" >&5
11819   echo "configure: failed program was:" >&5
11820   cat conftest.$ac_ext >&5
11821   rm -rf conftest*
11822   eval "ac_cv_header_$ac_safe=no"
11823 fi
11824 rm -f conftest*
11825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11826   echo "$ac_t""yes" 1>&6
11827   :
11828 else
11829   echo "$ac_t""no" 1>&6
11830 with_gpm=no
11831 fi
11832  }
11833   test -z "$with_gpm" && { 
11834 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11835 echo "configure:11836: checking for Gpm_Open in -lgpm" >&5
11836 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11837
11838 xe_check_libs=" -lgpm "
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 Gpm_Open();
11846
11847 int main() {
11848 Gpm_Open()
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   with_gpm=yes
11866 else
11867   echo "$ac_t""no" 1>&6
11868 with_gpm=no
11869 fi
11870
11871  }
11872   if test "$with_gpm" = "yes"; then
11873     { test "$extra_verbose" = "yes" && cat << \EOF
11874     Defining HAVE_GPM
11875 EOF
11876 cat >> confdefs.h <<\EOF
11877 #define HAVE_GPM 1
11878 EOF
11879 }
11880
11881     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
11882    echo "    xemacs will be linked with \"gpmevent.o\""
11883  fi
11884     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
11885   fi
11886
11887 else   for feature in ncurses gpm; do
11888     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11889       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
11890     fi
11891     eval "with_${feature}=no"
11892   done
11893 fi 
11894 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
11895    echo "    xemacs will be linked with \"event-unixoid.o\""
11896  fi
11897
11898
11899 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
11900   != "no no no" && echo "checking for database support" 1>&6
11901 echo "configure:11902: checking for database support" >&5
11902
11903 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
11904   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
11905 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
11906 echo "configure:11907: checking for ndbm.h" >&5
11907
11908 cat > conftest.$ac_ext <<EOF
11909 #line 11910 "configure"
11910 #include "confdefs.h"
11911 #include <ndbm.h>
11912 EOF
11913 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11914 { (eval echo configure:11915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11915 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11916 if test -z "$ac_err"; then
11917   rm -rf conftest*
11918   eval "ac_cv_header_$ac_safe=yes"
11919 else
11920   echo "$ac_err" >&5
11921   echo "configure: failed program was:" >&5
11922   cat conftest.$ac_ext >&5
11923   rm -rf conftest*
11924   eval "ac_cv_header_$ac_safe=no"
11925 fi
11926 rm -f conftest*
11927 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11928   echo "$ac_t""yes" 1>&6
11929   :
11930 else
11931   echo "$ac_t""no" 1>&6
11932
11933     test "$with_database_gdbm" = "yes" -o \
11934          "$with_database_dbm"  = "yes" && \
11935       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11936     with_database_gdbm=no with_database_dbm=no
11937 fi
11938
11939 fi
11940
11941 if test "$with_database_gdbm" != "no"; then
11942   
11943 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
11944 echo "configure:11945: checking for dbm_open in -lgdbm" >&5
11945 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
11946
11947 xe_check_libs=" -lgdbm "
11948 cat > conftest.$ac_ext <<EOF
11949 #line 11950 "configure"
11950 #include "confdefs.h"
11951 /* Override any gcc2 internal prototype to avoid an error.  */
11952 /* We use char because int might match the return type of a gcc2
11953     builtin and then its argument prototype would still apply.  */
11954 char dbm_open();
11955
11956 int main() {
11957 dbm_open()
11958 ; return 0; }
11959 EOF
11960 if { (eval echo configure:11961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11961   rm -rf conftest*
11962   eval "ac_cv_lib_$ac_lib_var=yes"
11963 else
11964   echo "configure: failed program was:" >&5
11965   cat conftest.$ac_ext >&5
11966   rm -rf conftest*
11967   eval "ac_cv_lib_$ac_lib_var=no"
11968 fi
11969 rm -f conftest*
11970 xe_check_libs=""
11971
11972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11973   echo "$ac_t""yes" 1>&6
11974   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
11975 else
11976   echo "$ac_t""no" 1>&6
11977 if test "$with_database_gdbm" = "yes"; then
11978      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
11979    fi
11980    with_database_gdbm=no
11981 fi
11982
11983
11984 fi
11985
11986 if test "$with_database_dbm" != "no"; then
11987   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11988 echo "configure:11989: checking for dbm_open" >&5
11989
11990 cat > conftest.$ac_ext <<EOF
11991 #line 11992 "configure"
11992 #include "confdefs.h"
11993 /* System header to define __stub macros and hopefully few prototypes,
11994     which can conflict with char dbm_open(); below.  */
11995 #include <assert.h>
11996 /* Override any gcc2 internal prototype to avoid an error.  */
11997 /* We use char because int might match the return type of a gcc2
11998     builtin and then its argument prototype would still apply.  */
11999 char dbm_open();
12000
12001 int main() {
12002
12003 /* The GNU C library defines this for functions which it implements
12004     to always fail with ENOSYS.  Some functions are actually named
12005     something starting with __ and the normal name is an alias.  */
12006 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12007 choke me
12008 #else
12009 dbm_open();
12010 #endif
12011
12012 ; return 0; }
12013 EOF
12014 if { (eval echo configure:12015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12015   rm -rf conftest*
12016   eval "ac_cv_func_dbm_open=yes"
12017 else
12018   echo "configure: failed program was:" >&5
12019   cat conftest.$ac_ext >&5
12020   rm -rf conftest*
12021   eval "ac_cv_func_dbm_open=no"
12022 fi
12023 rm -f conftest*
12024
12025 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12026   echo "$ac_t""yes" 1>&6
12027   with_database_dbm=yes libdbm=
12028 else
12029   echo "$ac_t""no" 1>&6
12030
12031     
12032 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12033 echo "configure:12034: checking for dbm_open in -ldbm" >&5
12034 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12035
12036 xe_check_libs=" -ldbm "
12037 cat > conftest.$ac_ext <<EOF
12038 #line 12039 "configure"
12039 #include "confdefs.h"
12040 /* Override any gcc2 internal prototype to avoid an error.  */
12041 /* We use char because int might match the return type of a gcc2
12042     builtin and then its argument prototype would still apply.  */
12043 char dbm_open();
12044
12045 int main() {
12046 dbm_open()
12047 ; return 0; }
12048 EOF
12049 if { (eval echo configure:12050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12050   rm -rf conftest*
12051   eval "ac_cv_lib_$ac_lib_var=yes"
12052 else
12053   echo "configure: failed program was:" >&5
12054   cat conftest.$ac_ext >&5
12055   rm -rf conftest*
12056   eval "ac_cv_lib_$ac_lib_var=no"
12057 fi
12058 rm -f conftest*
12059 xe_check_libs=""
12060
12061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12062   echo "$ac_t""yes" 1>&6
12063   with_database_dbm=yes libdbm=-ldbm
12064 else
12065   echo "$ac_t""no" 1>&6
12066 test "$with_database_dbm" = "yes" && \
12067         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12068       with_database_dbm=no
12069 fi
12070
12071
12072 fi
12073
12074 fi
12075
12076 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12077 test "$with_database_gdbm" = "yes" -o \
12078      "$with_database_dbm"  = "yes" && \
12079   { test "$extra_verbose" = "yes" && cat << \EOF
12080     Defining HAVE_DBM
12081 EOF
12082 cat >> confdefs.h <<\EOF
12083 #define HAVE_DBM 1
12084 EOF
12085 }
12086
12087
12088 if test "$with_database_berkdb" != "no"; then
12089   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12090 echo "configure:12091: checking for Berkeley db.h" >&5
12091   for path in "db/db.h" "db.h"; do
12092     cat > conftest.$ac_ext <<EOF
12093 #line 12094 "configure"
12094 #include "confdefs.h"
12095 #ifdef HAVE_INTTYPES_H
12096 #define __BIT_TYPES_DEFINED__
12097 #include <inttypes.h>
12098 typedef uint8_t  u_int8_t;
12099 typedef uint16_t u_int16_t;
12100 typedef uint32_t u_int32_t;
12101 #ifdef WE_DONT_NEED_QUADS
12102 typedef uint64_t u_int64_t;
12103 #endif
12104 #endif
12105 #include <$path>
12106
12107 int main() {
12108
12109 ; return 0; }
12110 EOF
12111 if { (eval echo configure:12112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12112   rm -rf conftest*
12113   db_h_path="$path"; break
12114 else
12115   echo "configure: failed program was:" >&5
12116   cat conftest.$ac_ext >&5
12117 fi
12118 rm -f conftest*
12119   done
12120   if test -z "$db_h_path"
12121   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12122   else echo "$ac_t""$db_h_path" 1>&6
12123   fi
12124
12125   if test "$with_database_berkdb" != "no"; then
12126     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12127 echo "configure:12128: checking for Berkeley DB version" >&5
12128     cat > conftest.$ac_ext <<EOF
12129 #line 12130 "configure"
12130 #include "confdefs.h"
12131 #include <$db_h_path>
12132 #if DB_VERSION_MAJOR > 1
12133 yes
12134 #endif
12135
12136 EOF
12137 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12138   egrep "yes" >/dev/null 2>&1; then
12139   rm -rf conftest*
12140   echo "$ac_t""2" 1>&6; dbfunc=db_open
12141 else
12142   rm -rf conftest*
12143   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12144 fi
12145 rm -f conftest*
12146
12147     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12148 echo "configure:12149: checking for $dbfunc" >&5
12149
12150 cat > conftest.$ac_ext <<EOF
12151 #line 12152 "configure"
12152 #include "confdefs.h"
12153 /* System header to define __stub macros and hopefully few prototypes,
12154     which can conflict with char $dbfunc(); below.  */
12155 #include <assert.h>
12156 /* Override any gcc2 internal prototype to avoid an error.  */
12157 /* We use char because int might match the return type of a gcc2
12158     builtin and then its argument prototype would still apply.  */
12159 char $dbfunc();
12160
12161 int main() {
12162
12163 /* The GNU C library defines this for functions which it implements
12164     to always fail with ENOSYS.  Some functions are actually named
12165     something starting with __ and the normal name is an alias.  */
12166 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12167 choke me
12168 #else
12169 $dbfunc();
12170 #endif
12171
12172 ; return 0; }
12173 EOF
12174 if { (eval echo configure:12175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12175   rm -rf conftest*
12176   eval "ac_cv_func_$dbfunc=yes"
12177 else
12178   echo "configure: failed program was:" >&5
12179   cat conftest.$ac_ext >&5
12180   rm -rf conftest*
12181   eval "ac_cv_func_$dbfunc=no"
12182 fi
12183 rm -f conftest*
12184
12185 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12186   echo "$ac_t""yes" 1>&6
12187   with_database_berkdb=yes need_libdb=no
12188 else
12189   echo "$ac_t""no" 1>&6
12190
12191     
12192 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12193 echo "configure:12194: checking for $dbfunc in -ldb" >&5
12194 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12195
12196 xe_check_libs=" -ldb "
12197 cat > conftest.$ac_ext <<EOF
12198 #line 12199 "configure"
12199 #include "confdefs.h"
12200 /* Override any gcc2 internal prototype to avoid an error.  */
12201 /* We use char because int might match the return type of a gcc2
12202     builtin and then its argument prototype would still apply.  */
12203 char $dbfunc();
12204
12205 int main() {
12206 $dbfunc()
12207 ; return 0; }
12208 EOF
12209 if { (eval echo configure:12210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12210   rm -rf conftest*
12211   eval "ac_cv_lib_$ac_lib_var=yes"
12212 else
12213   echo "configure: failed program was:" >&5
12214   cat conftest.$ac_ext >&5
12215   rm -rf conftest*
12216   eval "ac_cv_lib_$ac_lib_var=no"
12217 fi
12218 rm -f conftest*
12219 xe_check_libs=""
12220
12221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12222   echo "$ac_t""yes" 1>&6
12223   with_database_berkdb=yes need_libdb=yes
12224 else
12225   echo "$ac_t""no" 1>&6
12226 fi
12227
12228
12229 fi
12230
12231   fi
12232
12233   if test "$with_database_berkdb" = "yes"; then
12234     { test "$extra_verbose" = "yes" && cat << EOF
12235     Defining DB_H_PATH = "$db_h_path"
12236 EOF
12237 cat >> confdefs.h <<EOF
12238 #define DB_H_PATH "$db_h_path"
12239 EOF
12240 }
12241
12242     { test "$extra_verbose" = "yes" && cat << \EOF
12243     Defining HAVE_BERKELEY_DB
12244 EOF
12245 cat >> confdefs.h <<\EOF
12246 #define HAVE_BERKELEY_DB 1
12247 EOF
12248 }
12249
12250     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12251   else with_database_berkdb=no
12252   fi
12253 fi
12254
12255 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12256      != "no no no"; then
12257   { test "$extra_verbose" = "yes" && cat << \EOF
12258     Defining HAVE_DATABASE
12259 EOF
12260 cat >> confdefs.h <<\EOF
12261 #define HAVE_DATABASE 1
12262 EOF
12263 }
12264
12265   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12266    echo "    xemacs will be linked with \"database.o\""
12267  fi
12268 fi
12269
12270 if test "$with_socks" = "yes"; then
12271   
12272 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12273 echo "configure:12274: checking for SOCKSinit in -lsocks" >&5
12274 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12275
12276 xe_check_libs=" -lsocks "
12277 cat > conftest.$ac_ext <<EOF
12278 #line 12279 "configure"
12279 #include "confdefs.h"
12280 /* Override any gcc2 internal prototype to avoid an error.  */
12281 /* We use char because int might match the return type of a gcc2
12282     builtin and then its argument prototype would still apply.  */
12283 char SOCKSinit();
12284
12285 int main() {
12286 SOCKSinit()
12287 ; return 0; }
12288 EOF
12289 if { (eval echo configure:12290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12290   rm -rf conftest*
12291   eval "ac_cv_lib_$ac_lib_var=yes"
12292 else
12293   echo "configure: failed program was:" >&5
12294   cat conftest.$ac_ext >&5
12295   rm -rf conftest*
12296   eval "ac_cv_lib_$ac_lib_var=no"
12297 fi
12298 rm -f conftest*
12299 xe_check_libs=""
12300
12301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12302   echo "$ac_t""yes" 1>&6
12303     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12304     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12305   { test "$extra_verbose" = "yes" && cat << EOF
12306     Defining $ac_tr_lib
12307 EOF
12308 cat >> confdefs.h <<EOF
12309 #define $ac_tr_lib 1
12310 EOF
12311 }
12312
12313   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12314
12315 else
12316   echo "$ac_t""no" 1>&6
12317 fi
12318
12319
12320   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12321     Defining HAVE_SOCKS
12322 EOF
12323 cat >> confdefs.h <<\EOF
12324 #define HAVE_SOCKS 1
12325 EOF
12326 }
12327
12328 fi
12329
12330 if test "$usage_tracking" = "yes"; then
12331   { test "$extra_verbose" = "yes" && cat << \EOF
12332     Defining USAGE_TRACKING
12333 EOF
12334 cat >> confdefs.h <<\EOF
12335 #define USAGE_TRACKING 1
12336 EOF
12337 }
12338
12339   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12340 fi
12341
12342 if test "$with_modules" != "no"; then
12343   echo "checking for module support" 1>&6
12344 echo "configure:12345: checking for module support" >&5
12345
12346     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12347 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12348 echo "configure:12349: checking for dlfcn.h" >&5
12349
12350 cat > conftest.$ac_ext <<EOF
12351 #line 12352 "configure"
12352 #include "confdefs.h"
12353 #include <dlfcn.h>
12354 EOF
12355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12356 { (eval echo configure:12357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12358 if test -z "$ac_err"; then
12359   rm -rf conftest*
12360   eval "ac_cv_header_$ac_safe=yes"
12361 else
12362   echo "$ac_err" >&5
12363   echo "configure: failed program was:" >&5
12364   cat conftest.$ac_ext >&5
12365   rm -rf conftest*
12366   eval "ac_cv_header_$ac_safe=no"
12367 fi
12368 rm -f conftest*
12369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12370   echo "$ac_t""yes" 1>&6
12371   
12372     
12373 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12374 echo "configure:12375: checking for dlopen in -ldl" >&5
12375 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12376
12377 xe_check_libs=" -ldl "
12378 cat > conftest.$ac_ext <<EOF
12379 #line 12380 "configure"
12380 #include "confdefs.h"
12381 /* Override any gcc2 internal prototype to avoid an error.  */
12382 /* We use char because int might match the return type of a gcc2
12383     builtin and then its argument prototype would still apply.  */
12384 char dlopen();
12385
12386 int main() {
12387 dlopen()
12388 ; return 0; }
12389 EOF
12390 if { (eval echo configure:12391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12391   rm -rf conftest*
12392   eval "ac_cv_lib_$ac_lib_var=yes"
12393 else
12394   echo "configure: failed program was:" >&5
12395   cat conftest.$ac_ext >&5
12396   rm -rf conftest*
12397   eval "ac_cv_lib_$ac_lib_var=no"
12398 fi
12399 rm -f conftest*
12400 xe_check_libs=""
12401
12402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12403   echo "$ac_t""yes" 1>&6
12404   have_dl=yes libdl=dl
12405 else
12406   echo "$ac_t""no" 1>&6
12407
12408 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12409 echo "configure:12410: checking for dlopen in -lc" >&5
12410 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12411
12412 xe_check_libs=" -lc "
12413 cat > conftest.$ac_ext <<EOF
12414 #line 12415 "configure"
12415 #include "confdefs.h"
12416 /* Override any gcc2 internal prototype to avoid an error.  */
12417 /* We use char because int might match the return type of a gcc2
12418     builtin and then its argument prototype would still apply.  */
12419 char dlopen();
12420
12421 int main() {
12422 dlopen()
12423 ; return 0; }
12424 EOF
12425 if { (eval echo configure:12426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12426   rm -rf conftest*
12427   eval "ac_cv_lib_$ac_lib_var=yes"
12428 else
12429   echo "configure: failed program was:" >&5
12430   cat conftest.$ac_ext >&5
12431   rm -rf conftest*
12432   eval "ac_cv_lib_$ac_lib_var=no"
12433 fi
12434 rm -f conftest*
12435 xe_check_libs=""
12436
12437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12438   echo "$ac_t""yes" 1>&6
12439   have_dl=yes 
12440 else
12441   echo "$ac_t""no" 1>&6
12442 fi
12443
12444
12445 fi
12446
12447
12448 else
12449   echo "$ac_t""no" 1>&6
12450 fi
12451
12452   if test -n "$have_dl"; then
12453     { test "$extra_verbose" = "yes" && cat << \EOF
12454     Defining HAVE_DLOPEN
12455 EOF
12456 cat >> confdefs.h <<\EOF
12457 #define HAVE_DLOPEN 1
12458 EOF
12459 }
12460
12461   else
12462     
12463 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
12464 echo "configure:12465: checking for shl_load in -ldld" >&5
12465 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
12466
12467 xe_check_libs=" -ldld "
12468 cat > conftest.$ac_ext <<EOF
12469 #line 12470 "configure"
12470 #include "confdefs.h"
12471 /* Override any gcc2 internal prototype to avoid an error.  */
12472 /* We use char because int might match the return type of a gcc2
12473     builtin and then its argument prototype would still apply.  */
12474 char shl_load();
12475
12476 int main() {
12477 shl_load()
12478 ; return 0; }
12479 EOF
12480 if { (eval echo configure:12481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12481   rm -rf conftest*
12482   eval "ac_cv_lib_$ac_lib_var=yes"
12483 else
12484   echo "configure: failed program was:" >&5
12485   cat conftest.$ac_ext >&5
12486   rm -rf conftest*
12487   eval "ac_cv_lib_$ac_lib_var=no"
12488 fi
12489 rm -f conftest*
12490 xe_check_libs=""
12491
12492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12493   echo "$ac_t""yes" 1>&6
12494   libdl=dld have_dl=yes;
12495       { test "$extra_verbose" = "yes" && cat << \EOF
12496     Defining HAVE_SHL_LOAD
12497 EOF
12498 cat >> confdefs.h <<\EOF
12499 #define HAVE_SHL_LOAD 1
12500 EOF
12501 }
12502
12503 else
12504   echo "$ac_t""no" 1>&6
12505
12506 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12507 echo "configure:12508: checking for dld_init in -ldld" >&5
12508 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12509
12510 xe_check_libs=" -ldld "
12511 cat > conftest.$ac_ext <<EOF
12512 #line 12513 "configure"
12513 #include "confdefs.h"
12514 /* Override any gcc2 internal prototype to avoid an error.  */
12515 /* We use char because int might match the return type of a gcc2
12516     builtin and then its argument prototype would still apply.  */
12517 char dld_init();
12518
12519 int main() {
12520 dld_init()
12521 ; return 0; }
12522 EOF
12523 if { (eval echo configure:12524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12524   rm -rf conftest*
12525   eval "ac_cv_lib_$ac_lib_var=yes"
12526 else
12527   echo "configure: failed program was:" >&5
12528   cat conftest.$ac_ext >&5
12529   rm -rf conftest*
12530   eval "ac_cv_lib_$ac_lib_var=no"
12531 fi
12532 rm -f conftest*
12533 xe_check_libs=""
12534
12535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12536   echo "$ac_t""yes" 1>&6
12537   libdl=dld have_dl=yes;
12538       { test "$extra_verbose" = "yes" && cat << \EOF
12539     Defining HAVE_DLD_INIT
12540 EOF
12541 cat >> confdefs.h <<\EOF
12542 #define HAVE_DLD_INIT 1
12543 EOF
12544 }
12545
12546 else
12547   echo "$ac_t""no" 1>&6
12548 fi
12549
12550
12551 fi
12552
12553
12554   fi
12555
12556   if test -n "$have_dl"; then
12557         
12558 dll_ld=
12559 dll_ldflags=
12560 dll_cflags=
12561 dll_post=
12562 dll_ldo="-o"
12563 ld_dynamic_link_flags=
12564 xehost=$canonical
12565 xealias=$internal_configuration
12566
12567 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12568 echo "configure:12569: checking how to build dynamic libraries for ${xehost}" >&5
12569 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12570 case "$xehost" in
12571 *-*-linux-gnu*) ;;
12572 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12573 esac
12574
12575 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12576 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12577 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12578
12579 case "$xehost_os" in
12580 aix3*)
12581   # AIX sometimes has problems with the GCC collect2 program.  For some
12582   # reason, if we set the COLLECT_NAMES environment variable, the problems
12583   # vanish in a puff of smoke.
12584   if test "${COLLECT_NAMES+set}" != set; then
12585     COLLECT_NAMES=
12586     export COLLECT_NAMES
12587   fi
12588   ;;
12589 esac
12590
12591 # Now see if the compiler is really GCC.
12592 if test "$GCC" = "yes"; then
12593   XEGCC=yes
12594 else
12595   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12596 echo "configure:12597: checking checking whether we are using GNU C" >&5
12597   cat > conftest.$ac_ext <<EOF
12598 #line 12599 "configure"
12599 #include "confdefs.h"
12600
12601 #ifdef __GNUC__
12602   yes;
12603 #endif
12604
12605 EOF
12606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12607   egrep "yes" >/dev/null 2>&1; then
12608   rm -rf conftest*
12609   XEGCC=yes
12610 else
12611   rm -rf conftest*
12612   XEGCC=no
12613 fi
12614 rm -f conftest*
12615
12616   echo "$ac_t""${XEGCC}" 1>&6
12617 fi
12618
12619 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12620 echo "configure:12621: checking how to produce PIC code" >&5
12621 wl=
12622
12623 can_build_shared=yes
12624 if test "$XEGCC" = yes; then
12625   wl='-Wl,'
12626
12627   case "$xehost_os" in
12628   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12629     # PIC is the default for these OSes.
12630     ;;
12631
12632   os2*)
12633     # We can build DLLs from non-PIC.
12634     ;;
12635   amigaos*)
12636     # FIXME: we need at least 68020 code to build shared libraries, but
12637     # adding the `-m68020' flag to GCC prevents building anything better,
12638     # like `-m68040'.
12639     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12640     ;;
12641   *)
12642     dll_cflags='-fPIC'
12643     ;;
12644   esac
12645 else
12646   # PORTME Check for PIC flags for the system compiler.
12647   case "$xehost_os" in
12648   hpux9* | hpux1[0-9]*)
12649     # Is there a better link_static_flag that works with the bundled CC?
12650     wl='-Wl,'
12651     dll_cflags='+Z'
12652     ;;
12653
12654   irix5* | irix6*)
12655     wl='-Wl,'
12656     # PIC (with -KPIC) is the default.
12657     ;;
12658
12659   os2*)
12660     # We can build DLLs from non-PIC.
12661     ;;
12662
12663   osf3* | osf4*)
12664     # All OSF/1 code is PIC.
12665     wl='-Wl,'
12666     ;;
12667
12668   sco3.2v5*)
12669     dll_cflags='-belf -Kpic'
12670     wl='-Wl,'
12671     ;;
12672
12673   unixware*)
12674     dll_cflags="-KPIC"
12675     wl="-Wl,"
12676     ;;
12677
12678   sysv4*)
12679     dll_cflags="-KPIC"
12680     wl="-Wl,"
12681     ;;
12682
12683   sysv5*)
12684     dll_cflags="-KPIC"
12685     wl="-Wl,"
12686     ;;
12687
12688   solaris2*)
12689     dll_cflags='-KPIC'
12690     wl='-Wl,'
12691     ;;
12692
12693   sunos4*)
12694     dll_cflags='-PIC'
12695     wl='-Qoption ld '
12696     ;;
12697
12698   uts4*)
12699     dll_cflags='-pic'
12700     ;;
12701
12702   *)
12703     can_build_shared=no
12704     ;;
12705   esac
12706 fi
12707
12708 if test -n "$dll_cflags"; then
12709   echo "$ac_t""${dll_cflags}" 1>&6
12710   
12711   # Check to make sure the dll_cflags actually works.
12712   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12713 echo "configure:12714: checking if PIC flag ${dll_cflags} really works" >&5
12714   save_CFLAGS="$CFLAGS"
12715   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12716   cat > conftest.$ac_ext <<EOF
12717 #line 12718 "configure"
12718 #include "confdefs.h"
12719
12720 int main() {
12721 int x=0;
12722 ; return 0; }
12723 EOF
12724 if { (eval echo configure:12725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12725   rm -rf conftest*
12726   
12727     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12728     # reports no error.  So, we need to grep stderr for (Bundled).
12729     if grep '(Bundled)' config.log >/dev/null; then
12730       echo "$ac_t""no" 1>&6
12731       can_build_shared=no
12732       dll_cflags=
12733     else
12734       echo "$ac_t""yes" 1>&6
12735     fi
12736 else
12737   echo "configure: failed program was:" >&5
12738   cat conftest.$ac_ext >&5
12739   rm -rf conftest*
12740   echo "$ac_t""no" 1>&6
12741     can_build_shared=no
12742     dll_cflags=
12743 fi
12744 rm -f conftest*
12745   CFLAGS="$save_CFLAGS"
12746 else
12747   echo "$ac_t""none" 1>&6
12748 fi
12749
12750 if test "$can_build_shared" = "yes"; then
12751 cc_produces_so=no
12752 xldf=
12753 xcldf=
12754 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12755 echo "configure:12756: checking if C compiler can produce shared libraries" >&5
12756 if test "$XEGCC" = yes; then
12757   xcldf="-shared"
12758   xldf="-shared"
12759 else # Not using GCC
12760   case "$xehost_os" in
12761     aix3* | aix4*)
12762       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12763       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12764       ;;
12765
12766     freebsd2* | netbsd* | openbsd*)
12767       xldf="-Bshareable"
12768       xcldf="${wl}-Bshareable"
12769       ;;
12770
12771     freebsd3*)
12772       xcldf="-shared"
12773       ;;
12774
12775     hpux*)
12776       xldf="-b +s"
12777       xcldf="${wl}-b ${wl}+s"
12778       ;;
12779
12780     irix5* | irix6* | osf3* | osf4*)
12781       xcldf="${wl}-shared"
12782       xldf="-shared"
12783       ;;
12784
12785     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12786       xcldf="-G"
12787       xldf="-G"
12788       ;;
12789
12790     sunos4*)
12791       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12792       xldf="-assert pure-text -Bstatic"
12793       ;;
12794   esac
12795 fi # End if if we are using gcc
12796
12797 if test -n "$xcldf"; then
12798   save_LDFLAGS=$LDFLAGS
12799   save_LIBS=$LIBS
12800   save_xe_libs=$xe_libs
12801   LDFLAGS="$xcldf $LDFLAGS"
12802   LIBS=
12803   xe_libs=
12804   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12805   cat > conftest.$ac_ext <<EOF
12806 #line 12807 "configure"
12807 #include "confdefs.h"
12808
12809 int main() {
12810 int x=0;
12811 ; return 0; }
12812 EOF
12813 if { (eval echo configure:12814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12814   rm -rf conftest*
12815   cc_produces_so=yes
12816 else
12817   echo "configure: failed program was:" >&5
12818   cat conftest.$ac_ext >&5
12819   rm -rf conftest*
12820   cc_produces_so=no
12821 fi
12822 rm -f conftest*
12823   LDFLAGS=$save_LDFLAGS
12824   LIBS=$save_LIBS
12825   xe_libs=$save_xe_libs
12826   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12827 else
12828   cc_produces_so=no
12829 fi
12830 echo "$ac_t""${cc_produces_so}" 1>&6
12831
12832 LTLD=$LD
12833 if test -z "$LTLD"; then
12834   ac_prog=ld
12835   if test "$XEGCC" = yes; then
12836     # Check if gcc -print-prog-name=ld gives a path.
12837     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12838 echo "configure:12839: checking for ld used by GCC" >&5
12839     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12840     case "$ac_prog" in
12841     # Accept absolute paths.
12842     /*)
12843       if test -z "$LTLD"; then
12844         case "$ac_prog" in
12845           *gcc-lib*) LTLD="$CC"
12846                      ;;
12847           *)         LTLD="$ac_prog"
12848                      ;;
12849         esac
12850       fi
12851       ;;
12852     "")
12853       # If it fails, then pretend we aren't using GCC.
12854       ac_prog=ld
12855       ;;
12856     *)
12857       # If it is relative, then search for the first ld in PATH.
12858       with_gnu_ld=unknown
12859       ;;
12860     esac
12861   else
12862     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12863 echo "configure:12864: checking for GNU ld" >&5
12864   fi
12865
12866   if test -z "$LTLD"; then
12867     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12868     for ac_dir in $PATH; do
12869       test -z "$ac_dir" && ac_dir=.
12870       if test -f "$ac_dir/$ac_prog"; then
12871         LTLD="$ac_dir/$ac_prog"
12872         # Check to see if the program is GNU ld.  I'd rather use --version,
12873         # but apparently some GNU ld's only accept -v.
12874         # Break only if it was the GNU/non-GNU ld that we prefer.
12875         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12876           xe_gnu_ld=yes
12877         else
12878           xe_gnu_ld=no
12879         fi
12880       fi
12881     done
12882     IFS="$ac_save_ifs"
12883   fi
12884
12885   if test -n "$LTLD"; then
12886     echo "$ac_t""${LTLD}" 1>&6
12887   else
12888     echo "$ac_t""no" 1>&6
12889   fi
12890
12891   if test -z "$LTLD" -a "$cc_produces_so" = no; then
12892     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
12893     exit 1
12894   fi
12895 fi
12896
12897 ld_dynamic_link_flags=
12898
12899 # Check to see if it really is or isn't GNU ld.
12900 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
12901 echo "configure:12902: checking if the linker is GNU ld" >&5
12902 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12903 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
12904   xe_gnu_ld=yes
12905 else
12906   xe_gnu_ld=no
12907 fi
12908 echo "$ac_t""${xe_gnu_ld}" 1>&6
12909
12910 case "$xehost_os" in
12911   amigaos* | sunos4*)
12912     # On these operating systems, we should treat GNU ld like the system ld.
12913     gnu_ld_acts_native=yes
12914     ;;
12915   *)
12916     gnu_ld_acts_native=no
12917     ;;
12918 esac
12919
12920 if test "$cc_produces_so" = "yes"; then
12921   dll_ld=$CC
12922   dll_ldflags=$xcldf
12923   can_build_shared=yes
12924 else
12925   # OK - only NOW do we futz about with ld.
12926   # See if the linker supports building shared libraries.
12927   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
12928 echo "configure:12929: checking whether the linker supports shared libraries" >&5
12929   dll_ld=$CC
12930   dll_ldflags=$LDFLAGS
12931   ld_shlibs=yes
12932   can_build_shared=yes
12933   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
12934     # See if GNU ld supports shared libraries.
12935     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12936       dll_ld=$CC
12937       dll_ldflags="-shared"
12938       ld_shlibs=yes
12939     else
12940       ld_shlibs=no
12941     fi
12942   else
12943     # PORTME fill in a description of your system's linker (not GNU ld)
12944     case "$xehost_os" in
12945     aix3*)
12946       dll_ld=$LTLD
12947       dll_ldflags=$xldf
12948       ;;
12949
12950     aix4*)
12951       dll_ldflags=$xcldf
12952       ;;
12953
12954     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12955     # support.  Future versions do this automatically, but an explicit c++rt0.o
12956     # doesn't break anything, and helps significantly (at the cost of a little
12957     # extra space).
12958     freebsd2.2*)
12959       dll_ld=$LTLD
12960       dll_ldflags=$xldf
12961       dll_post="/usr/lib/c++rt0.o"
12962       ;;
12963
12964     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
12965     freebsd2*)
12966       dll_ld=$LTLD
12967       dll_ldflags="-Bshareable"
12968       ;;
12969
12970     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
12971     freebsd3*)
12972       dll_ldflags="-shared"
12973       ;;
12974
12975     hpux*)
12976       dll_ld=$LTLD
12977       dll_ldflags=$xldf
12978       ;;
12979
12980     irix5* | irix6*)
12981       dll_ld=$LTLD
12982       dll_ldflags=$xldf
12983       ;;
12984
12985     netbsd*)
12986       # Tested with NetBSD 1.2 ld
12987       dll_ld=$LTLD
12988       dll_ldflags=$xldf
12989       ;;
12990
12991     openbsd*)
12992       dll_ld=$LTLD
12993       dll_ldflags=$xldf
12994       ;;
12995
12996     osf3* | osf4*)
12997       dll_ld=$LTLD
12998       dll_ldflags=$xldf
12999       ;;
13000
13001     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13002     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13003       dll_ld=$LTLD
13004       case "$dll_ld" in
13005         *gcc*) dll_ldflags="-shared"
13006                dll_ld=$CC
13007                ;;
13008         *)     dll_ldflags="-G"
13009                ;;
13010       esac
13011       ;;
13012
13013     sunos4*)
13014       if test "$XEGCC" = yes; then
13015         dll_ld=$CC
13016       else
13017         dll_ld=$LTLD
13018       fi
13019       dll_ldflags=$xldf
13020       ;;
13021
13022     uts4*)
13023       dll_ld=$LTLD
13024       dll_ldflags="-G"
13025       ;;
13026
13027     bsdi*)
13028       dll_ldflags="-r"
13029       dll_ld="shlicc2"
13030       ;;
13031
13032     *)
13033       ld_shlibs=no
13034       can_build_shared=no
13035       ;;
13036     esac
13037   fi
13038   echo "$ac_t""${ld_shlibs}" 1>&6
13039   if test "$ld_shlibs" = "no"; then
13040     can_build_shared=no
13041   fi
13042 fi # End of if cc_produces_so = no
13043
13044
13045 if test "$xe_gnu_ld" = yes; then
13046   if test "$ld_shlibs" = yes; then
13047     ld_dynamic_link_flags="${wl}-export-dynamic"
13048   fi
13049 fi
13050
13051 if test -z "$ld_dynamic_link_flags"; then
13052   case "$xehost_os" in
13053   aix3*)
13054     ld_dynamic_link_flags=
13055     ;;
13056
13057   aix4*)
13058     ld_dynamic_link_flags=
13059     ;;
13060
13061   freebsd2.2*)
13062     ld_dynamic_link_flags=
13063     ;;
13064
13065   freebsd2*)
13066     ld_dynamic_link_flags=
13067     ;;
13068
13069   freebsd3*)
13070     ld_dynamic_link_flags=
13071     ;;
13072
13073   hpux*)
13074     ld_dynamic_link_flags="${wl}-E"
13075     ;;
13076
13077   irix5* | irix6*)
13078     ld_dynamic_link_flags=
13079     ;;
13080
13081   netbsd*)
13082     ld_dynamic_link_flags=
13083     ;;
13084
13085   openbsd*)
13086     ld_dynamic_link_flags=
13087     ;;
13088
13089   osf3* | osf4*)
13090     ld_dynamic_link_flags=
13091     ;;
13092
13093   solaris2* | solaris7*)
13094     ld_dynamic_link_flags=
13095     ;;
13096
13097   sco3.2v5* | unixware* | sysv5* | sysv4*)
13098     ld_dynamic_link_flags="${wl}-Bexport"
13099     ;;
13100
13101   sunos4*)
13102     ld_dynamic_link_flags=
13103     ;;
13104
13105   uts4*)
13106     ld_dynamic_link_flags=
13107     ;;
13108
13109   bsdi*)
13110     ld_dynamic_link_flags=
13111     ;;
13112
13113   esac
13114 fi # End of if -z ld_dynamic_link_flags
13115 fi # End of if test "$can_build_shared" = "yes"
13116
13117
13118
13119
13120
13121
13122
13123
13124   fi
13125
13126   if test "$can_build_shared" = "yes"; then
13127     { test "$extra_verbose" = "yes" && cat << \EOF
13128     Defining HAVE_SHLIB
13129 EOF
13130 cat >> confdefs.h <<\EOF
13131 #define HAVE_SHLIB 1
13132 EOF
13133 }
13134
13135     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13136    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13137  fi
13138     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13139     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13140     for ac_func in dlerror _dlerror
13141 do
13142 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13143 echo "configure:13144: checking for $ac_func" >&5
13144
13145 cat > conftest.$ac_ext <<EOF
13146 #line 13147 "configure"
13147 #include "confdefs.h"
13148 /* System header to define __stub macros and hopefully few prototypes,
13149     which can conflict with char $ac_func(); below.  */
13150 #include <assert.h>
13151 /* Override any gcc2 internal prototype to avoid an error.  */
13152 /* We use char because int might match the return type of a gcc2
13153     builtin and then its argument prototype would still apply.  */
13154 char $ac_func();
13155
13156 int main() {
13157
13158 /* The GNU C library defines this for functions which it implements
13159     to always fail with ENOSYS.  Some functions are actually named
13160     something starting with __ and the normal name is an alias.  */
13161 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13162 choke me
13163 #else
13164 $ac_func();
13165 #endif
13166
13167 ; return 0; }
13168 EOF
13169 if { (eval echo configure:13170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13170   rm -rf conftest*
13171   eval "ac_cv_func_$ac_func=yes"
13172 else
13173   echo "configure: failed program was:" >&5
13174   cat conftest.$ac_ext >&5
13175   rm -rf conftest*
13176   eval "ac_cv_func_$ac_func=no"
13177 fi
13178 rm -f conftest*
13179
13180 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13181   echo "$ac_t""yes" 1>&6
13182     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13183   { test "$extra_verbose" = "yes" && cat << EOF
13184     Defining $ac_tr_func
13185 EOF
13186 cat >> confdefs.h <<EOF
13187 #define $ac_tr_func 1
13188 EOF
13189 }
13190  
13191 else
13192   echo "$ac_t""no" 1>&6
13193 fi
13194 done
13195
13196     with_modules=yes
13197   else
13198     if test "$with_modules" = "yes"; then
13199       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13200     else
13201       echo "configure: warning: "Module support cannot be provided."" 1>&2
13202     fi
13203     with_modules=no
13204   fi
13205 fi
13206
13207 cat > conftest.$ac_ext <<EOF
13208 #line 13209 "configure"
13209 #include "confdefs.h"
13210 int main(int c,char *v[]){return 0;}
13211 EOF
13212 if { (eval echo configure:13213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13213 then
13214   :
13215 else
13216   conftest_rc="$?"
13217   echo "configure: failed program was:" >&5
13218   cat conftest.$ac_ext >&5
13219   rm -fr conftest*
13220   
13221   echo ""
13222   echo "*** PANIC *** The C compiler can no longer build working executables."
13223   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13224   echo "*** PANIC *** The most likely reason for this problem is that configure"
13225   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13226   echo "*** PANIC *** found at run time."
13227   echo "*** PANIC ***"
13228   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13229   echo "*** PANIC *** On other systems, try telling configure where to find the"
13230   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13231   echo "*** PANIC ***"
13232   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13233   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13234   echo "*** PANIC *** on your system.  Don't do that."
13235   exit 1
13236 fi
13237 rm -fr conftest*
13238
13239 if test "$win32_processes" = "yes"; then
13240   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13241    echo "    xemacs will be linked with \"process-nt.o\""
13242  fi
13243 else
13244   { test "$extra_verbose" = "yes" && cat << \EOF
13245     Defining HAVE_UNIX_PROCESSES
13246 EOF
13247 cat >> confdefs.h <<\EOF
13248 #define HAVE_UNIX_PROCESSES 1
13249 EOF
13250 }
13251
13252   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13253    echo "    xemacs will be linked with \"process-unix.o\""
13254  fi
13255 fi
13256
13257
13258
13259 T=""
13260 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13261 CFLAGS="$T"
13262
13263
13264 T=""
13265 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13266 extra_objs="$T"
13267
13268
13269 T=""
13270 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
13271 c_switch_general="$T"
13272
13273
13274 T=""
13275 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13276 c_switch_window_system="$T"
13277
13278
13279 T=""
13280 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13281 c_switch_all="$T"
13282
13283
13284 T=""
13285 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
13286 ld_switch_general="$T"
13287
13288
13289 T=""
13290 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13291 ld_switch_window_system="$T"
13292
13293
13294 T=""
13295 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13296 ld_switch_all="$T"
13297
13298
13299 T=""
13300 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13301 ld_libs_general="$T"
13302
13303
13304 T=""
13305 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
13306 ld_libs_window_system="$T"
13307
13308
13309 T=""
13310 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13311 ld_libs_all="$T"
13312
13313
13314
13315 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13316 internal_makefile_list="Makefile.in"
13317 SUBDIR_MAKEFILES=''
13318 test -d lock || mkdir lock
13319 for dir in $MAKE_SUBDIR; do
13320   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13321         test -d "$d" || mkdir "$d"; cd "$d"
13322       done ) ;;
13323    * ) test -d "$dir" || mkdir "$dir" ;;
13324   esac
13325   
13326 T=""
13327 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13328 SUBDIR_MAKEFILES="$T"
13329
13330   
13331 T=""
13332 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13333 internal_makefile_list="$T"
13334
13335 done
13336
13337
13338
13339
13340 for dir in src/s src/m; do
13341   if test ! -d "$dir" ; then
13342     echo Making symbolic link to "$srcdir/$dir"
13343     ${LN_S} "$srcdir/$dir" "$dir"
13344   fi
13345 done
13346
13347 if test "$extra_verbose" = "yes"; then
13348   echo ""
13349   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
13350   echo ""
13351 fi
13352
13353 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
13354   echo "creating src/gdbinit"; echo ""
13355   echo "source $srcdir/src/gdbinit" > src/gdbinit
13356 fi
13357
13358 if test "$__SUNPRO_C" = "yes"; then
13359   echo "creating .sbinit"; echo ""
13360   ( echo "# For use with Sun WorkShop's Source browser."
13361     echo "# See sbquery(1) and sbinit(4) for more information"
13362     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13363   ) > .sbinit
13364 fi
13365
13366 rm -f core
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386 PREFIX=$prefix
13387 while true; do
13388   case "$PREFIX" in
13389     *\$* ) eval "PREFIX=$PREFIX" ;;
13390     *) break ;;
13391   esac
13392 done
13393
13394
13395
13396
13397 EXEC_PREFIX=$exec_prefix
13398 while true; do
13399   case "$EXEC_PREFIX" in
13400     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13401     *) break ;;
13402   esac
13403 done
13404
13405
13406
13407
13408 INFODIR=$infodir
13409 while true; do
13410   case "$INFODIR" in
13411     *\$* ) eval "INFODIR=$INFODIR" ;;
13412     *) break ;;
13413   esac
13414 done
13415
13416
13417
13418
13419 INFOPATH=$infopath
13420 while true; do
13421   case "$INFOPATH" in
13422     *\$* ) eval "INFOPATH=$INFOPATH" ;;
13423     *) break ;;
13424   esac
13425 done
13426
13427
13428
13429
13430 PACKAGE_PATH=$package_path
13431 while true; do
13432   case "$PACKAGE_PATH" in
13433     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
13434     *) break ;;
13435   esac
13436 done
13437
13438
13439
13440
13441 LISPDIR=$lispdir
13442 while true; do
13443   case "$LISPDIR" in
13444     *\$* ) eval "LISPDIR=$LISPDIR" ;;
13445     *) break ;;
13446   esac
13447 done
13448
13449
13450
13451
13452 MODULEDIR=$moduledir
13453 while true; do
13454   case "$MODULEDIR" in
13455     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
13456     *) break ;;
13457   esac
13458 done
13459
13460
13461
13462
13463 SITELISPDIR=$sitelispdir
13464 while true; do
13465   case "$SITELISPDIR" in
13466     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
13467     *) break ;;
13468   esac
13469 done
13470
13471
13472
13473
13474 SITEMODULEDIR=$sitemoduledir
13475 while true; do
13476   case "$SITEMODULEDIR" in
13477     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
13478     *) break ;;
13479   esac
13480 done
13481
13482
13483
13484
13485 ETCDIR=$etcdir
13486 while true; do
13487   case "$ETCDIR" in
13488     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13489     *) break ;;
13490   esac
13491 done
13492
13493
13494
13495
13496 LOCKDIR=$lockdir
13497 while true; do
13498   case "$LOCKDIR" in
13499     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13500     *) break ;;
13501   esac
13502 done
13503
13504
13505
13506
13507 DOCDIR=$docdir
13508 while true; do
13509   case "$DOCDIR" in
13510     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13511     *) break ;;
13512   esac
13513 done
13514
13515
13516
13517
13518 ARCHLIBDIR=$archlibdir
13519 while true; do
13520   case "$ARCHLIBDIR" in
13521     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13522     *) break ;;
13523   esac
13524 done
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13546
13547
13548
13549
13550
13551
13552
13553 : ${XEMACS_CC:=$CC}
13554
13555
13556 if test "$with_prefix" = "yes"; then
13557   { test "$extra_verbose" = "yes" && cat << \EOF
13558     Defining PREFIX_USER_DEFINED
13559 EOF
13560 cat >> confdefs.h <<\EOF
13561 #define PREFIX_USER_DEFINED 1
13562 EOF
13563 }
13564
13565 fi
13566
13567 if test "$with_site_lisp" = "no"; then
13568   { test "$extra_verbose" = "yes" && cat << \EOF
13569     Defining INHIBIT_SITE_LISP
13570 EOF
13571 cat >> confdefs.h <<\EOF
13572 #define INHIBIT_SITE_LISP 1
13573 EOF
13574 }
13575
13576 fi
13577 if test "$with_site_modules" = "no"; then
13578   { test "$extra_verbose" = "yes" && cat << \EOF
13579     Defining INHIBIT_SITE_MODULES
13580 EOF
13581 cat >> confdefs.h <<\EOF
13582 #define INHIBIT_SITE_MODULES 1
13583 EOF
13584 }
13585
13586 fi
13587
13588
13589 T=""
13590 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13591 ac_configure_args="$T"
13592
13593 { test "$extra_verbose" = "yes" && cat << EOF
13594     Defining EMACS_CONFIGURATION = "$configuration"
13595 EOF
13596 cat >> confdefs.h <<EOF
13597 #define EMACS_CONFIGURATION "$configuration"
13598 EOF
13599 }
13600
13601 { test "$extra_verbose" = "yes" && cat << EOF
13602     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13603 EOF
13604 cat >> confdefs.h <<EOF
13605 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13606 EOF
13607 }
13608
13609 { test "$extra_verbose" = "yes" && cat << EOF
13610     Defining config_machfile = "$machfile"
13611 EOF
13612 cat >> confdefs.h <<EOF
13613 #define config_machfile "$machfile"
13614 EOF
13615 }
13616
13617 { test "$extra_verbose" = "yes" && cat << EOF
13618     Defining config_opsysfile = "$opsysfile"
13619 EOF
13620 cat >> confdefs.h <<EOF
13621 #define config_opsysfile "$opsysfile"
13622 EOF
13623 }
13624
13625
13626
13627 null_string=""
13628 { test "$extra_verbose" = "yes" && cat << EOF
13629     Defining LD_SWITCH_X_SITE = $null_string
13630 EOF
13631 cat >> confdefs.h <<EOF
13632 #define LD_SWITCH_X_SITE $null_string
13633 EOF
13634 }
13635
13636 { test "$extra_verbose" = "yes" && cat << EOF
13637     Defining LD_SWITCH_X_SITE_AUX = $null_string
13638 EOF
13639 cat >> confdefs.h <<EOF
13640 #define LD_SWITCH_X_SITE_AUX $null_string
13641 EOF
13642 }
13643
13644 { test "$extra_verbose" = "yes" && cat << EOF
13645     Defining C_SWITCH_X_SITE = $null_string
13646 EOF
13647 cat >> confdefs.h <<EOF
13648 #define C_SWITCH_X_SITE $null_string
13649 EOF
13650 }
13651
13652 { test "$extra_verbose" = "yes" && cat << EOF
13653     Defining LD_SWITCH_SITE = $null_string
13654 EOF
13655 cat >> confdefs.h <<EOF
13656 #define LD_SWITCH_SITE $null_string
13657 EOF
13658 }
13659
13660 { test "$extra_verbose" = "yes" && cat << EOF
13661     Defining C_SWITCH_SITE = $null_string
13662 EOF
13663 cat >> confdefs.h <<EOF
13664 #define C_SWITCH_SITE $null_string
13665 EOF
13666 }
13667
13668
13669
13670 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13671     Defining GNU_MALLOC
13672 EOF
13673 cat >> confdefs.h <<\EOF
13674 #define GNU_MALLOC 1
13675 EOF
13676 }
13677
13678 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13679     Defining USE_SYSTEM_MALLOC
13680 EOF
13681 cat >> confdefs.h <<\EOF
13682 #define USE_SYSTEM_MALLOC 1
13683 EOF
13684 }
13685
13686 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13687     Defining USE_DEBUG_MALLOC
13688 EOF
13689 cat >> confdefs.h <<\EOF
13690 #define USE_DEBUG_MALLOC 1
13691 EOF
13692 }
13693
13694                                               { test "$extra_verbose" = "yes" && cat << \EOF
13695     Defining USE_SYSTEM_MALLOC
13696 EOF
13697 cat >> confdefs.h <<\EOF
13698 #define USE_SYSTEM_MALLOC 1
13699 EOF
13700 }
13701
13702 fi
13703 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13704     Defining I18N3
13705 EOF
13706 cat >> confdefs.h <<\EOF
13707 #define I18N3 1
13708 EOF
13709 }
13710
13711 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13712     Defining USE_GCC
13713 EOF
13714 cat >> confdefs.h <<\EOF
13715 #define USE_GCC 1
13716 EOF
13717 }
13718
13719 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13720     Defining EXTERNAL_WIDGET
13721 EOF
13722 cat >> confdefs.h <<\EOF
13723 #define EXTERNAL_WIDGET 1
13724 EOF
13725 }
13726
13727 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13728     Defining NO_DOC_FILE
13729 EOF
13730 cat >> confdefs.h <<\EOF
13731 #define NO_DOC_FILE 1
13732 EOF
13733 }
13734
13735 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13736     Defining PURIFY
13737 EOF
13738 cat >> confdefs.h <<\EOF
13739 #define PURIFY 1
13740 EOF
13741 }
13742
13743 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13744     Defining QUANTIFY
13745 EOF
13746 cat >> confdefs.h <<\EOF
13747 #define QUANTIFY 1
13748 EOF
13749 }
13750
13751 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13752     Defining MAIL_USE_POP
13753 EOF
13754 cat >> confdefs.h <<\EOF
13755 #define MAIL_USE_POP 1
13756 EOF
13757 }
13758
13759 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13760     Defining KERBEROS
13761 EOF
13762 cat >> confdefs.h <<\EOF
13763 #define KERBEROS 1
13764 EOF
13765 }
13766
13767 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13768     Defining HESIOD
13769 EOF
13770 cat >> confdefs.h <<\EOF
13771 #define HESIOD 1
13772 EOF
13773 }
13774
13775 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13776     Defining USE_UNION_TYPE
13777 EOF
13778 cat >> confdefs.h <<\EOF
13779 #define USE_UNION_TYPE 1
13780 EOF
13781 }
13782
13783 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13784     Defining PDUMP
13785 EOF
13786 cat >> confdefs.h <<\EOF
13787 #define PDUMP 1
13788 EOF
13789 }
13790
13791
13792
13793 (
13794 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13795 else
13796   echo "uname -a: `uname -a`"
13797 fi
13798 echo ""
13799 echo "$0 $quoted_arguments"
13800 ) > Installation
13801
13802 if test ! -z ${emacs_beta_version} ; then
13803   if test -z "${emacs_is_beta}" ; then
13804         xemacs_betaname=".${emacs_beta_version}"
13805   else
13806         xemacs_betaname="-b${emacs_beta_version}"
13807   fi
13808 else
13809   xemacs_betaname=""
13810 fi
13811
13812 (
13813 echo "
13814
13815 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13816
13817   Where should the build process find the source code?    $srcdir
13818   What installation prefix should install use?            $prefix
13819   What operating system and machine description files should XEmacs use?
13820         \`$opsysfile' and \`$machfile'
13821   What compiler should XEmacs be built with?              $CC $CFLAGS
13822   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13823   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13824   What window system should XEmacs use?                   ${window_system}"
13825 if test "$with_x11" = "yes"; then
13826   echo "  Where do we find X Windows header files?                $x_includes"
13827   echo "  Where do we find X Windows libraries?                   $x_libraries"
13828 fi
13829 if test -n "$site_includes"; then
13830   echo "  Additional header files:                                $site_includes"
13831 fi
13832 if test -n "$site_libraries"; then
13833   echo "  Additional libraries:                                   $site_libraries"
13834 fi
13835 if test -n "$site_prefixes"; then
13836   echo "  Additional prefixes:                                    $site_prefixes"
13837 fi
13838 if test -n "$runpath"; then
13839   echo "  Runtime library search path:                            $runpath"
13840 fi
13841 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13842 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13843 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13844 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13845   echo "  No Xmu; substituting equivalent routines."
13846 fi
13847
13848 if test "$with_xpm" = yes; then
13849   echo "  Compiling in support for XPM images."
13850 elif test "$with_x11" = yes; then
13851   echo "  --------------------------------------------------------------------"
13852   echo "  WARNING: Compiling without XPM support."
13853   if test "$xpm_problem" != ""; then
13854     echo "  Reason: $xpm_problem"
13855   fi
13856   echo "  WARNING: You should strongly consider installing XPM."
13857   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13858   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13859   echo "  --------------------------------------------------------------------"
13860 fi
13861 if test "$with_png" = yes; then
13862   echo "  Compiling in support for PNG image handling."
13863 elif test "$window_system" != "none"; then
13864   echo "  --------------------------------------------------------------------"
13865   echo "  WARNING: Compiling without PNG image support."
13866   if test "$png_problem" != ""; then
13867     echo "  Reason: $png_problem"
13868   fi
13869   echo "  WARNING: You should strongly consider installing the PNG libraries."
13870   echo "  WARNING: Otherwise certain images and glyphs may not display."
13871   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13872   echo "  --------------------------------------------------------------------"
13873 fi
13874 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
13875 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
13876 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
13877 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
13878
13879 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
13880 test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
13881 test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
13882 test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
13883
13884 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
13885 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
13886 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
13887
13888 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
13889
13890 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
13891 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
13892
13893 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
13894 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
13895 test "$with_text_coding"     = yes && echo "  Compiling in Text coding support."
13896 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
13897 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
13898 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
13899 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
13900 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
13901 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
13902 if test "$with_wnn" = yes; then
13903   echo "  Compiling in support for the WNN input method on Mule."
13904   test "$with_wnn6" = yes && echo "    Using WNN version 6."
13905 fi
13906 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
13907
13908 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
13909 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
13910 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
13911 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
13912 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
13913 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
13914 case "$with_menubars" in
13915   lucid ) echo "  Using Lucid menubars." ;;
13916   motif ) echo "  Using Motif menubars."
13917           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
13918           echo "             We recommend using the Lucid menubar instead."
13919           echo "             Re-run configure with --with-menubars='lucid'." ;;
13920   msw ) echo "  Using MS-Windows menubars." ;;
13921 esac
13922 case "$with_scrollbars" in
13923   lucid    ) echo "  Using Lucid scrollbars."     ;;
13924   motif    ) echo "  Using Motif scrollbars."     ;;
13925   athena   ) echo "  Using Athena scrollbars."    ;;
13926   athena3d ) echo "  Using Athena-3d scrollbars." ;;
13927   msw ) echo "  Using MS-Windows scrollbars." ;;
13928 esac
13929 case "$with_widgets" in
13930   motif    ) echo "  Using Motif native widgets."     ;;
13931   athena   ) echo "  Using Athena native widgets."    ;;
13932   athena3d ) echo "  Using Athena-3d native widgets." ;;
13933   msw ) echo "  Using MS-Windows native widgets." ;;
13934 esac
13935 case "$with_dialogs" in
13936   motif    )
13937     echo "  Using Motif dialog boxes."
13938     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
13939       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
13940       echo "             We recommend using the Athena dialog boxes instead."
13941       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
13942       echo "             Read the PROBLEMS file for more information."
13943     fi; fi
13944     ;;
13945   athena   ) echo "  Using Athena dialog boxes."    ;;
13946   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
13947   msw ) echo "  Using MS-Windows dialog boxes." ;;
13948 esac
13949 test "$with_modules" = "yes" && echo "  Compiling in dynamic shared object module support."
13950 test "$with_clash_detection" = yes && \
13951   echo "  Clash detection will use \"$lockdir\" for locking files."
13952 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
13953 test "$with_pop"        = yes && echo "  Using POP for mail access."
13954 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
13955 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
13956 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
13957 test "$pdump"           = yes && echo "  Using the new portable dumper (wishful thinking)."
13958 test "$debug"           = yes && echo "  Compiling in extra code for debugging."
13959 test "$usage_tracking"  = yes && echo "  Compiling with usage tracking active (Sun internal)."
13960 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
13961   != "no no no no no"; then
13962   echo "  WARNING: ---------------------------------------------------------"
13963   echo "  WARNING: Compiling in support for runtime error checking."
13964   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
13965   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
13966   echo "  WARNING: ---------------------------------------------------------"
13967 fi
13968 echo ""
13969 ) | tee -a Installation
13970 echo ""
13971
13972
13973 # Remove any trailing slashes in these variables.
13974 test -n "$prefix" &&
13975   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13976 test -n "$exec_prefix" &&
13977   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13978
13979
13980 for file in $internal_makefile_list; do
13981   test "$file" = src/Makefile.in && \
13982     file="src/Makefile.in:src/Makefile.in.in:src/depend"
13983   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
13984 done
13985 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
13986 test "$with_modules" = "yes" && ac_output_files="$ac_output_files lib-src/ellcc.h" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src/ellcc.h\" to \$ac_output_files"; fi
13987
13988 trap '' 1 2 15
13989
13990 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13991
13992 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13993 # Let make expand exec_prefix.
13994 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13995
13996 # Any assignment to VPATH causes Sun make to only execute
13997 # the first set of double-colon rules, so remove it if not needed.
13998 # If there is a colon in the path, we need to keep it.
13999 if test "x$srcdir" = x.; then
14000   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14001 fi
14002
14003 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14004
14005 DEFS=-DHAVE_CONFIG_H
14006
14007 # Without the "./", some shells look in PATH for config.status.
14008 : ${CONFIG_STATUS=./config.status}
14009
14010 echo creating $CONFIG_STATUS
14011 rm -f $CONFIG_STATUS
14012 cat > $CONFIG_STATUS <<EOF
14013 #! /bin/sh
14014 # Generated automatically by configure.
14015 # Run this file to recreate the current configuration.
14016 # This directory was configured as follows,
14017 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14018 #
14019 # $0 $ac_configure_args
14020 #
14021 # Compiler output produced by configure, useful for debugging
14022 # configure, is in ./config.log if it exists.
14023
14024 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14025 for ac_option
14026 do
14027   case "\$ac_option" in
14028   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14029     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14030     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14031   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14032     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14033     exit 0 ;;
14034   -help | --help | --hel | --he | --h)
14035     echo "\$ac_cs_usage"; exit 0 ;;
14036   *) echo "\$ac_cs_usage"; exit 1 ;;
14037   esac
14038 done
14039
14040 ac_given_srcdir=$srcdir
14041 ac_given_INSTALL="$INSTALL"
14042
14043 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14044 EOF
14045 cat >> $CONFIG_STATUS <<EOF
14046
14047 # Protect against being on the right side of a sed subst in config.status.
14048 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14049  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14050 $ac_vpsub
14051 $extrasub
14052 s%@SHELL@%$SHELL%g
14053 s%@CFLAGS@%$CFLAGS%g
14054 s%@CPPFLAGS@%$CPPFLAGS%g
14055 s%@CXXFLAGS@%$CXXFLAGS%g
14056 s%@FFLAGS@%$FFLAGS%g
14057 s%@DEFS@%$DEFS%g
14058 s%@LDFLAGS@%$LDFLAGS%g
14059 s%@LIBS@%$LIBS%g
14060 s%@exec_prefix@%$exec_prefix%g
14061 s%@prefix@%$prefix%g
14062 s%@program_transform_name@%$program_transform_name%g
14063 s%@bindir@%$bindir%g
14064 s%@sbindir@%$sbindir%g
14065 s%@libexecdir@%$libexecdir%g
14066 s%@datadir@%$datadir%g
14067 s%@sysconfdir@%$sysconfdir%g
14068 s%@sharedstatedir@%$sharedstatedir%g
14069 s%@localstatedir@%$localstatedir%g
14070 s%@libdir@%$libdir%g
14071 s%@includedir@%$includedir%g
14072 s%@oldincludedir@%$oldincludedir%g
14073 s%@infodir@%$infodir%g
14074 s%@mandir@%$mandir%g
14075 s%@LN_S@%$LN_S%g
14076 s%@blddir@%$blddir%g
14077 s%@CC@%$CC%g
14078 s%@CPP@%$CPP%g
14079 s%@start_flags@%$start_flags%g
14080 s%@ld_switch_shared@%$ld_switch_shared%g
14081 s%@start_files@%$start_files%g
14082 s%@ld@%$ld%g
14083 s%@lib_gcc@%$lib_gcc%g
14084 s%@RANLIB@%$RANLIB%g
14085 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14086 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14087 s%@INSTALL_DATA@%$INSTALL_DATA%g
14088 s%@YACC@%$YACC%g
14089 s%@SET_MAKE@%$SET_MAKE%g
14090 s%@X_CFLAGS@%$X_CFLAGS%g
14091 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14092 s%@X_LIBS@%$X_LIBS%g
14093 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14094 s%@install_pp@%$install_pp%g
14095 s%@libs_xauth@%$libs_xauth%g
14096 s%@dnd_objs@%$dnd_objs%g
14097 s%@lwlib_objs@%$lwlib_objs%g
14098 s%@ALLOCA@%$ALLOCA%g
14099 s%@have_esd_config@%$have_esd_config%g
14100 s%@dll_ld@%$dll_ld%g
14101 s%@dll_cflags@%$dll_cflags%g
14102 s%@dll_ldflags@%$dll_ldflags%g
14103 s%@dll_post@%$dll_post%g
14104 s%@dll_ldo@%$dll_ldo%g
14105 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14106 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14107 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14108 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14109 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14110 s%@PROGNAME@%$PROGNAME%g
14111 s%@version@%$version%g
14112 s%@configuration@%$configuration%g
14113 s%@canonical@%$canonical%g
14114 s%@inststaticdir@%$inststaticdir%g
14115 s%@instvardir@%$instvardir%g
14116 s%@srcdir@%$srcdir%g
14117 s%@pkgdir@%$pkgdir%g
14118 s%@statedir@%$statedir%g
14119 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14120 s%@PREFIX@%$PREFIX%g
14121 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14122 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14123 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14124 s%@INFODIR@%$INFODIR%g
14125 s%@infopath@%$infopath%g
14126 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14127 s%@INFOPATH@%$INFOPATH%g
14128 s%@package_path@%$package_path%g
14129 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14130 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14131 s%@lispdir@%$lispdir%g
14132 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14133 s%@LISPDIR@%$LISPDIR%g
14134 s%@moduledir@%$moduledir%g
14135 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14136 s%@MODULEDIR@%$MODULEDIR%g
14137 s%@sitelispdir@%$sitelispdir%g
14138 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14139 s%@SITELISPDIR@%$SITELISPDIR%g
14140 s%@sitemoduledir@%$sitemoduledir%g
14141 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14142 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14143 s%@etcdir@%$etcdir%g
14144 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14145 s%@ETCDIR@%$ETCDIR%g
14146 s%@lockdir@%$lockdir%g
14147 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
14148 s%@LOCKDIR@%$LOCKDIR%g
14149 s%@docdir@%$docdir%g
14150 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14151 s%@DOCDIR@%$DOCDIR%g
14152 s%@archlibdir@%$archlibdir%g
14153 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14154 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14155 s%@bitmapdir@%$bitmapdir%g
14156 s%@extra_objs@%$extra_objs%g
14157 s%@machfile@%$machfile%g
14158 s%@opsysfile@%$opsysfile%g
14159 s%@c_switch_general@%$c_switch_general%g
14160 s%@c_switch_window_system@%$c_switch_window_system%g
14161 s%@c_switch_all@%$c_switch_all%g
14162 s%@ld_switch_general@%$ld_switch_general%g
14163 s%@ld_switch_window_system@%$ld_switch_window_system%g
14164 s%@ld_switch_all@%$ld_switch_all%g
14165 s%@ld_libs_general@%$ld_libs_general%g
14166 s%@ld_libs_window_system@%$ld_libs_window_system%g
14167 s%@ld_libs_all@%$ld_libs_all%g
14168 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14169 s%@native_sound_lib@%$native_sound_lib%g
14170 s%@sound_cflags@%$sound_cflags%g
14171 s%@dynodump_arch@%$dynodump_arch%g
14172 s%@XEMACS_CC@%$XEMACS_CC%g
14173 s%@internal_makefile_list@%$internal_makefile_list%g
14174
14175 CEOF
14176 EOF
14177
14178 cat >> $CONFIG_STATUS <<\EOF
14179
14180 # Split the substitutions into bite-sized pieces for seds with
14181 # small command number limits, like on Digital OSF/1 and HP-UX.
14182 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14183 ac_file=1 # Number of current file.
14184 ac_beg=1 # First line for current file.
14185 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14186 ac_more_lines=:
14187 ac_sed_cmds=""
14188 while $ac_more_lines; do
14189   if test $ac_beg -gt 1; then
14190     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14191   else
14192     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14193   fi
14194   if test ! -s conftest.s$ac_file; then
14195     ac_more_lines=false
14196     rm -f conftest.s$ac_file
14197   else
14198     if test -z "$ac_sed_cmds"; then
14199       ac_sed_cmds="sed -f conftest.s$ac_file"
14200     else
14201       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14202     fi
14203     ac_file=`expr $ac_file + 1`
14204     ac_beg=$ac_end
14205     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14206   fi
14207 done
14208 if test -z "$ac_sed_cmds"; then
14209   ac_sed_cmds=cat
14210 fi
14211 EOF
14212
14213 cat >> $CONFIG_STATUS <<EOF
14214
14215 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14216 EOF
14217 cat >> $CONFIG_STATUS <<\EOF
14218 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14219   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14220   case "$ac_file" in
14221   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14222        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14223   *) ac_file_in="${ac_file}.in" ;;
14224   esac
14225
14226   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14227
14228   # Remove last slash and all that follows it.  Not all systems have dirname.
14229   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14230   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14231     # The file is in a subdirectory.
14232     test ! -d "$ac_dir" && mkdir "$ac_dir"
14233     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14234     # A "../" for each directory in $ac_dir_suffix.
14235     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14236   else
14237     ac_dir_suffix= ac_dots=
14238   fi
14239
14240   case "$ac_given_srcdir" in
14241   .)  srcdir=.
14242       if test -z "$ac_dots"; then top_srcdir=.
14243       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14244   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14245   *) # Relative path.
14246     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14247     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14248   esac
14249
14250   case "$ac_given_INSTALL" in
14251   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14252   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14253   esac
14254
14255   echo creating "$ac_file"
14256   rm -f "$ac_file"
14257   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14258   case "$ac_file" in
14259   *Makefile*) ac_comsub="1i\\
14260 # $configure_input" ;;
14261   *) ac_comsub= ;;
14262   esac
14263
14264   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14265   sed -e "$ac_comsub
14266 s%@configure_input@%$configure_input%g
14267 s%@srcdir@%$srcdir%g
14268 s%@top_srcdir@%$top_srcdir%g
14269 s%@INSTALL@%$INSTALL%g
14270 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14271 fi; done
14272 rm -f conftest.s*
14273
14274 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14275 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14276 #
14277 # ac_d sets the value in "#define NAME VALUE" lines.
14278 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14279 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14280 ac_dC='\3'
14281 ac_dD='%g'
14282 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14283 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14284 ac_uB='\([      ]\)%\1#\2define\3'
14285 ac_uC=' '
14286 ac_uD='\4%g'
14287 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14288 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14289 ac_eB='$%\1#\2define\3'
14290 ac_eC=' '
14291 ac_eD='%g'
14292
14293 if test "${CONFIG_HEADERS+set}" != set; then
14294 EOF
14295 cat >> $CONFIG_STATUS <<EOF
14296   CONFIG_HEADERS="src/config.h lwlib/config.h"
14297 EOF
14298 cat >> $CONFIG_STATUS <<\EOF
14299 fi
14300 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14301   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14302   case "$ac_file" in
14303   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14304        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14305   *) ac_file_in="${ac_file}.in" ;;
14306   esac
14307
14308   echo creating $ac_file
14309
14310   rm -f conftest.frag conftest.in conftest.out
14311   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14312   cat $ac_file_inputs > conftest.in
14313
14314 EOF
14315
14316 # Transform confdefs.h into a sed script conftest.vals that substitutes
14317 # the proper values into config.h.in to produce config.h.  And first:
14318 # Protect against being on the right side of a sed subst in config.status.
14319 # Protect against being in an unquoted here document in config.status.
14320 rm -f conftest.vals
14321 cat > conftest.hdr <<\EOF
14322 s/[\\&%]/\\&/g
14323 s%[\\$`]%\\&%g
14324 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14325 s%ac_d%ac_u%gp
14326 s%ac_u%ac_e%gp
14327 EOF
14328 sed -n -f conftest.hdr confdefs.h > conftest.vals
14329 rm -f conftest.hdr
14330
14331 # This sed command replaces #undef with comments.  This is necessary, for
14332 # example, in the case of _POSIX_SOURCE, which is predefined and required
14333 # on some systems where configure will not decide to define it.
14334 cat >> conftest.vals <<\EOF
14335 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14336 EOF
14337
14338 # Break up conftest.vals because some shells have a limit on
14339 # the size of here documents, and old seds have small limits too.
14340
14341 rm -f conftest.tail
14342 while :
14343 do
14344   ac_lines=`grep -c . conftest.vals`
14345   # grep -c gives empty output for an empty file on some AIX systems.
14346   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14347   # Write a limited-size here document to conftest.frag.
14348   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14349   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14350   echo 'CEOF
14351   sed -f conftest.frag conftest.in > conftest.out
14352   rm -f conftest.in
14353   mv conftest.out conftest.in
14354 ' >> $CONFIG_STATUS
14355   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14356   rm -f conftest.vals
14357   mv conftest.tail conftest.vals
14358 done
14359 rm -f conftest.vals
14360
14361 cat >> $CONFIG_STATUS <<\EOF
14362   rm -f conftest.frag conftest.h
14363   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14364   cat conftest.in >> conftest.h
14365   rm -f conftest.in
14366   if cmp -s $ac_file conftest.h 2>/dev/null; then
14367     echo "$ac_file is unchanged"
14368     rm -f conftest.h
14369   else
14370     # Remove last slash and all that follows it.  Not all systems have dirname.
14371       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14372       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14373       # The file is in a subdirectory.
14374       test ! -d "$ac_dir" && mkdir "$ac_dir"
14375     fi
14376     rm -f $ac_file
14377     mv conftest.h $ac_file
14378   fi
14379 fi; done
14380
14381 EOF
14382 cat >> $CONFIG_STATUS <<EOF
14383 CPP="$CPP"
14384  top_srcdir="$srcdir"
14385  MAKE_SUBDIR="$MAKE_SUBDIR"
14386
14387 EOF
14388 cat >> $CONFIG_STATUS <<\EOF
14389 for dir in . $MAKE_SUBDIR; do
14390   (
14391     cd $dir
14392     rm -f junk.c
14393     < Makefile.in \
14394       sed -e '/^# Generated/d' \
14395           -e 's%/\*\*/#.*%%' \
14396           -e 's/^ *# */#/' \
14397           -e '/^##/d' \
14398           -e '/^#/ {
14399 p
14400 d
14401 }'        \
14402           -e '/./ {
14403 s/\([\"]\)/\\\1/g
14404 s/^/"/
14405 s/$/"/
14406 }'  > junk.c;
14407
14408
14409
14410     echo creating $dir/Makefile
14411 $CPP -I. -I${top_srcdir}/src  junk.c \
14412   | sed -e 's/^\#.*//'          \
14413         -e 's/^[        ][      ]*$//'\
14414         -e 's/^ /       /'              \
14415   | sed -n -e '/^..*$/p'        \
14416   | sed '/^\"/ {
14417         s/\\\([\"]\)/\1/g
14418         s/^[    ]*\"//
14419         s/\"[   ]*$//
14420 }' > Makefile.new
14421     chmod 444 Makefile.new
14422     mv -f Makefile.new Makefile
14423
14424     echo creating $dir/GNUmakefile
14425 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
14426   | sed -e 's/^\#.*//'          \
14427         -e 's/^[        ][      ]*$//'\
14428         -e 's/^ /       /'              \
14429   | sed -n -e '/^..*$/p'        \
14430   | sed '/^\"/ {
14431         s/\\\([\"]\)/\1/g
14432         s/^[    ]*\"//
14433         s/\"[   ]*$//
14434 }' > Makefile.new
14435     chmod 444 Makefile.new
14436     mv -f Makefile.new GNUmakefile
14437
14438     rm -f junk.c
14439   )
14440 done
14441
14442 sed < config.status >> lib-src/config.values \
14443   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
14444   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
14445   -e 's/^\([^ ]*\) $/\1 ""/' \
14446   -e 's/ 1$/ t/'
14447
14448
14449 exit 0
14450 EOF
14451 chmod +x $CONFIG_STATUS
14452 rm -fr confdefs* $ac_clean_files
14453 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1