Merge r21-2-24-utf-2000-0_13-0.
[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_xim" )
488           case "$val" in
489             y | ye | yes )                val=yes   ;;
490             n | no | non | none )         val=no    ;;
491             x | xl | xli | xlib )         val=xlib  ;;
492             m | mo | mot | moti | motif ) val=motif ;;
493             * ) (echo "$progname: Usage error:"
494 echo " " "The \`--$optname' option must have one of these values:
495   \`motif', \`xlib', \`yes', or \`no'."
496 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
497           esac
498           eval "$opt=\"$val\""
499         ;;
500
501                 "mail_locking" )
502           case "$val" in
503             lockf )     val=lockf ;;
504             flock )     val=flock ;;
505             file )      val=file  ;;
506             * ) (echo "$progname: Usage error:"
507 echo " " "The \`--$optname' option must have one of these values:
508   \`lockf', \`flock', or \`file'."
509 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
510           esac
511           eval "$opt=\"$val\""
512         ;;
513
514                 "error_checking" )
515                           
516           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
517             case "$x" in
518                       n | no | non | none ) new_default=no ;;
519               a | al | all )        new_default=yes ;;
520
521               extents )       error_check_extents=yes ;;
522               noextents )     error_check_extents=no ;;
523
524               typecheck )     error_check_typecheck=yes ;;
525               notypecheck )   error_check_typecheck=no ;;
526
527               bufpos )        error_check_bufpos=yes ;;
528               nobufpos )      error_check_bufpos=no ;;
529
530               gc )            error_check_gc=yes ;;
531               nogc )          error_check_gc=no ;;
532
533               malloc )        error_check_malloc=yes ;;
534               nomalloc )      error_check_malloc=no ;;
535
536               byte_code )     error_check_byte_code=yes ;;
537               nobyte_code )   error_check_byte_code=no ;;
538
539               * ) bogus_error_check=yes ;;
540             esac
541             if test "$bogus_error_check" -o \
542                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
543                 if test "$error_check_default" = yes ; then
544                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
545                 else
546                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
547                 fi
548                 (echo "$progname: Usage error:"
549 echo " " "Valid types for the \`--$optname' option are:
550   $types."
551 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
552             elif test -n "$new_default" ; then
553                 error_check_extents=$new_default
554                 error_check_typecheck=$new_default
555                 error_check_bufpos=$new_default
556                 error_check_gc=$new_default
557                 error_check_malloc=$new_default
558                 error_check_byte_code=$new_default
559                 new_default=    # reset this
560             fi
561             echeck_notfirst=true
562           done
563         ;;
564
565                                 
566                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
567         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
568         archlibdir | docdir | package_path )
569                    if test "$valomitted" = "yes"; then
570              if test "$#" = 0; then
571                  (echo "$progname: Usage error:"
572 echo " " "The \`--$optname' option requires a value."
573 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
574              fi
575              val="$1"; shift
576            fi
577            eval "$opt=\"$val\""
578
579                            case "$opt" in
580                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
581     Defining EXEC_PREFIX_USER_DEFINED
582 EOF
583 cat >> confdefs.h <<\EOF
584 #define EXEC_PREFIX_USER_DEFINED 1
585 EOF
586 }
587  ;;
588              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
589     Defining LISPDIR_USER_DEFINED
590 EOF
591 cat >> confdefs.h <<\EOF
592 #define LISPDIR_USER_DEFINED 1
593 EOF
594 }
595  ;;
596              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
597     Defining SITELISPDIR_USER_DEFINED
598 EOF
599 cat >> confdefs.h <<\EOF
600 #define SITELISPDIR_USER_DEFINED 1
601 EOF
602 }
603  ;;
604              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
605     Defining MODULEDIR_USER_DEFINED
606 EOF
607 cat >> confdefs.h <<\EOF
608 #define MODULEDIR_USER_DEFINED 1
609 EOF
610 }
611  ;;
612              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
613     Defining ETCDIR_USER_DEFINED
614 EOF
615 cat >> confdefs.h <<\EOF
616 #define ETCDIR_USER_DEFINED 1
617 EOF
618 }
619  ;;
620              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
621     Defining INFODIR_USER_DEFINED
622 EOF
623 cat >> confdefs.h <<\EOF
624 #define INFODIR_USER_DEFINED 1
625 EOF
626 }
627  ;;
628              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
629     Defining INFOPATH_USER_DEFINED
630 EOF
631 cat >> confdefs.h <<\EOF
632 #define INFOPATH_USER_DEFINED 1
633 EOF
634 }
635  ;;
636              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
637     Defining PACKAGE_PATH_USER_DEFINED
638 EOF
639 cat >> confdefs.h <<\EOF
640 #define PACKAGE_PATH_USER_DEFINED 1
641 EOF
642 }
643  ;;
644              datadir )
645                 { test "$extra_verbose" = "yes" && cat << \EOF
646     Defining INFODIR_USER_DEFINED
647 EOF
648 cat >> confdefs.h <<\EOF
649 #define INFODIR_USER_DEFINED 1
650 EOF
651 }
652
653                 { test "$extra_verbose" = "yes" && cat << \EOF
654     Defining LISPDIR_USER_DEFINED
655 EOF
656 cat >> confdefs.h <<\EOF
657 #define LISPDIR_USER_DEFINED 1
658 EOF
659 }
660
661             { test "$extra_verbose" = "yes" && cat << \EOF
662     Defining MODULEDIR_USER_DEFINED
663 EOF
664 cat >> confdefs.h <<\EOF
665 #define MODULEDIR_USER_DEFINED 1
666 EOF
667 }
668
669                 { test "$extra_verbose" = "yes" && cat << \EOF
670     Defining ETCDIR_USER_DEFINED
671 EOF
672 cat >> confdefs.h <<\EOF
673 #define ETCDIR_USER_DEFINED 1
674 EOF
675 }
676  ;;
677              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
678     Defining LOCKDIR_USER_DEFINED
679 EOF
680 cat >> confdefs.h <<\EOF
681 #define LOCKDIR_USER_DEFINED 1
682 EOF
683 }
684  ;;
685              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
686     Defining DOCDIR_USER_DEFINED
687 EOF
688 cat >> confdefs.h <<\EOF
689 #define DOCDIR_USER_DEFINED 1
690 EOF
691 }
692  ;;
693              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
694     Defining ARCHLIBDIR_USER_DEFINED
695 EOF
696 cat >> confdefs.h <<\EOF
697 #define ARCHLIBDIR_USER_DEFINED 1
698 EOF
699 }
700  ;;
701            esac
702         ;;
703
704                 "no_create" ) ;;
705
706                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
707
708                 "with_menubars"   | \
709         "with_scrollbars" | \
710         "with_dialogs" | \
711         "with_widgets" )
712           case "$val" in
713             l | lu | luc | luci | lucid )               val=lucid  ;;
714             m | mo | mot | moti | motif )               val=motif  ;;
715             athena3d | athena-3d )                      val=athena3d ;;
716             a | at | ath | athe | athen | athena )      val=athena ;;
717             n | no | non | none )                       val=no ;;
718             * ) (echo "$progname: Usage error:"
719 echo " " "The \`--$optname' option must have one of these values:
720   \`lucid', \`motif', \`athena', \`athena3d', or \`no'."
721 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
722           esac
723           eval "$opt=\"$val\""
724         ;;
725
726                 "use_minimal_tagbits" | \
727         "use_indexed_lrecord_implementation" | \
728         "run_in_place"  | \
729         "with_gnu_make" )
730           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
731         ;;
732
733                 * ) (echo "$progname: Usage error:"
734 echo " " "Unrecognized option: $arg"
735 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
736
737       esac
738     ;;
739
740         *-*-*) configuration="$arg" ;;
741
742         *) (echo "$progname: Usage error:"
743 echo " " "Unrecognized argument: $arg"
744 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
745
746   esac
747 done
748
749
750 test -n "$cpp"      && CPP="$cpp"
751 test -n "$cppflags" && CPPFLAGS="$cppflags"
752 test -n "$libs"     && LIBS="$libs"
753 test -n "$ldflags"  && LDFLAGS="$ldflags"
754
755 eval set x "$quoted_arguments"; shift
756
757 test "$extra_verbose" = "yes" && verbose=yes
758
759 test -n "$with_x" && with_x11="$with_x"
760
761 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
762   test "$with_system_malloc" = "default" && with_system_malloc=yes
763 fi
764
765
766
767 if test "$with_cde $with_tooltalk" = "yes no"; then
768   (echo "$progname: Usage error:"
769 echo " " "--with-cde requires --with-tooltalk"
770 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
771 elif test "$with_tooltalk" = "no" ; then with_cde=no
772 elif test "$with_cde" = "yes"; then with_tooltalk=yes
773 fi
774
775
776 case "$srcdir" in
777
778     "" )
779     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
780       if test -f "$dir/src/lisp.h" -a \
781               -f "$dir/lisp/version.el" ; then
782         srcdir="$dir"
783         break
784       fi
785     done
786     if test -z "$srcdir" ; then
787       (echo "$progname: Usage error:"
788 echo " " "Neither the current directory nor its parent seem to
789   contain the XEmacs sources.  If you do not want to build XEmacs in its
790   source tree, you should run \`$progname' in the directory in which
791   you wish to build XEmacs, using the \`--srcdir' option to say where the
792   sources may be found."
793 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
794     fi
795   ;;
796
797     * )
798     if test ! -f "$srcdir/src/lisp.h" -o \
799             ! -f "$srcdir/lisp/version.el" ; then
800       (echo "$progname: Usage error:"
801 echo " " "The directory specified with the \`--srcdir' option,
802   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
803   either run the \`$progname' script at the top of the XEmacs source
804   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
805 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
806     fi
807   ;;
808 esac
809
810 if test -z "$configuration"; then
811     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
812   if test -z "$configuration"; then
813     (echo "$progname: Usage error:"
814 echo " " "XEmacs has not been ported to this host type.
815 Try explicitly specifying the CONFIGURATION when rerunning configure."
816 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
817   fi
818 fi
819
820 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
821 echo "configure:822: checking whether ln -s works" >&5
822
823 rm -f conftestdata
824 if ln -s X conftestdata 2>/dev/null
825 then
826   rm -f conftestdata
827   ac_cv_prog_LN_S="ln -s"
828 else
829   ac_cv_prog_LN_S=ln
830 fi
831 LN_S="$ac_cv_prog_LN_S"
832 if test "$ac_cv_prog_LN_S" = "ln -s"; then
833   echo "$ac_t""yes" 1>&6
834 else
835   echo "$ac_t""no" 1>&6
836 fi
837
838
839 for dir in lisp etc man info; do
840   if test ! -d "$dir" ; then
841     echo Making symbolic link to "$srcdir/$dir"
842     ${LN_S} "$srcdir/$dir" "$dir"
843   fi
844 done
845
846
847 absolute_pwd="`pwd`";
848 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
849 then blddir="$PWD"
850 else blddir="$absolute_pwd"; if test -d "/net"; then
851   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
852   blddir=`echo "$blddir" | \
853    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
854 fi
855 fi
856
857
858 case "$srcdir" in
859   /* ) ;;
860   .  ) srcdir="$blddir" ;;
861   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
862   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
863   srcdir=`echo "$srcdir" | \
864    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
865 fi ;;
866 esac
867
868 if test `pwd` != `sh -c cd $srcdir && pwd`  \
869    && test -f "$srcdir/src/config.h"; then
870   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
871    echo "   as a build directory right now; it has been configured in its own"
872    echo "   right.  To configure in another directory as well, you MUST"
873    echo "   use GNU make.  If you do not have GNU make, then you must"
874    echo "   now do \`make distclean' in $srcdir,"
875    echo "   and then run $progname again.") >&2
876   extrasub='/^VPATH[     ]*=/c\
877 vpath %.c $(srcdir)\
878 vpath %.h $(srcdir)\
879 vpath %.y $(srcdir)\
880 vpath %.l $(srcdir)\
881 vpath %.s $(srcdir)\
882 vpath %.in $(srcdir)'
883 fi
884
885 . "$srcdir/version.sh" || exit 1;
886 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
887 : "${extra_verbose=$beta}"
888 version="${emacs_major_version}.${emacs_minor_version}"
889 { test "$extra_verbose" = "yes" && cat << EOF
890     Defining EMACS_MAJOR_VERSION = $emacs_major_version
891 EOF
892 cat >> confdefs.h <<EOF
893 #define EMACS_MAJOR_VERSION $emacs_major_version
894 EOF
895 }
896
897 { test "$extra_verbose" = "yes" && cat << EOF
898     Defining EMACS_MINOR_VERSION = $emacs_minor_version
899 EOF
900 cat >> confdefs.h <<EOF
901 #define EMACS_MINOR_VERSION $emacs_minor_version
902 EOF
903 }
904
905 if test -n "$emacs_beta_version" ; then
906   if test "$beta" = "yes"; then
907         version="${version}-b${emacs_beta_version}"
908         { test "$extra_verbose" = "yes" && cat << EOF
909     Defining EMACS_BETA_VERSION = $emacs_beta_version
910 EOF
911 cat >> confdefs.h <<EOF
912 #define EMACS_BETA_VERSION $emacs_beta_version
913 EOF
914 }
915
916   else
917         version="${version}.${emacs_beta_version}"
918         { test "$extra_verbose" = "yes" && cat << EOF
919     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
920 EOF
921 cat >> confdefs.h <<EOF
922 #define EMACS_PATCH_LEVEL $emacs_beta_version
923 EOF
924 }
925
926   fi
927 fi
928 { test "$extra_verbose" = "yes" && cat << EOF
929     Defining XEMACS_CODENAME = "$xemacs_codename"
930 EOF
931 cat >> confdefs.h <<EOF
932 #define XEMACS_CODENAME "$xemacs_codename"
933 EOF
934 }
935
936 { test "$extra_verbose" = "yes" && cat << EOF
937     Defining EMACS_VERSION = "$version"
938 EOF
939 cat >> confdefs.h <<EOF
940 #define EMACS_VERSION "$version"
941 EOF
942 }
943
944
945 if test "$with_infodock" = "yes"; then
946   if test ! -f ../../ID-INSTALL; then
947     echo "Cannot build InfoDock without InfoDock sources"
948     with_infodock=no
949   fi
950 fi
951
952 if test "$with_infodock" = "yes"; then
953       { test "$extra_verbose" = "yes" && cat << EOF
954     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
955 EOF
956 cat >> confdefs.h <<EOF
957 #define INFODOCK_MAJOR_VERSION $infodock_major_version
958 EOF
959 }
960
961   { test "$extra_verbose" = "yes" && cat << EOF
962     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
963 EOF
964 cat >> confdefs.h <<EOF
965 #define INFODOCK_MINOR_VERSION $infodock_minor_version
966 EOF
967 }
968
969   { test "$extra_verbose" = "yes" && cat << EOF
970     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
971 EOF
972 cat >> confdefs.h <<EOF
973 #define INFODOCK_BUILD_VERSION $infodock_build_version
974 EOF
975 }
976
977   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
978   PROGNAME=infodock
979   CPPFLAGS="$CPPFLAGS -DINFODOCK"
980 else
981   PROGNAME=xemacs
982 fi
983
984 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
985 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
986     Defining ERROR_CHECK_EXTENTS
987 EOF
988 cat >> confdefs.h <<\EOF
989 #define ERROR_CHECK_EXTENTS 1
990 EOF
991 }
992
993 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
994     Defining ERROR_CHECK_TYPECHECK
995 EOF
996 cat >> confdefs.h <<\EOF
997 #define ERROR_CHECK_TYPECHECK 1
998 EOF
999 }
1000
1001 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1002     Defining ERROR_CHECK_BUFPOS
1003 EOF
1004 cat >> confdefs.h <<\EOF
1005 #define ERROR_CHECK_BUFPOS 1
1006 EOF
1007 }
1008
1009 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1010     Defining ERROR_CHECK_GC
1011 EOF
1012 cat >> confdefs.h <<\EOF
1013 #define ERROR_CHECK_GC 1
1014 EOF
1015 }
1016
1017 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1018     Defining ERROR_CHECK_MALLOC
1019 EOF
1020 cat >> confdefs.h <<\EOF
1021 #define ERROR_CHECK_MALLOC 1
1022 EOF
1023 }
1024
1025 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1026     Defining ERROR_CHECK_BYTE_CODE
1027 EOF
1028 cat >> confdefs.h <<\EOF
1029 #define ERROR_CHECK_BYTE_CODE 1
1030 EOF
1031 }
1032
1033 if test "${debug:=$beta}" = "yes"; then
1034   use_assertions=yes memory_usage_stats=yes
1035   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1036    echo "    xemacs will be linked with \"debug.o\""
1037  fi
1038   { test "$extra_verbose" = "yes" && cat << \EOF
1039     Defining DEBUG_XEMACS
1040 EOF
1041 cat >> confdefs.h <<\EOF
1042 #define DEBUG_XEMACS 1
1043 EOF
1044 }
1045
1046 fi
1047 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1048     Defining USE_ASSERTIONS
1049 EOF
1050 cat >> confdefs.h <<\EOF
1051 #define USE_ASSERTIONS 1
1052 EOF
1053 }
1054
1055 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1056     Defining MEMORY_USAGE_STATS
1057 EOF
1058 cat >> confdefs.h <<\EOF
1059 #define MEMORY_USAGE_STATS 1
1060 EOF
1061 }
1062
1063
1064
1065 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1066 echo "configure:1067: checking "host system type"" >&5
1067 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1068 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1069 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1070 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1071 echo "$ac_t""$configuration" 1>&6
1072
1073
1074
1075
1076
1077 machine='' opsys=''
1078
1079 case "$canonical" in
1080   sparc-*-*        ) machine=sparc ;;
1081   alpha*-*-*       ) machine=alpha ;;
1082   vax-*-*          ) machine=vax ;;
1083   mips-dec-*       ) machine=pmax ;;
1084   mips-sgi-*       ) machine=iris4d ;;
1085   mips*-linux      ) machine=mips ;;
1086   romp-ibm-*       ) machine=ibmrt ;;
1087   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1088   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1089   powerpc*-*       ) machine=powerpc ;;
1090   hppa-*-*         ) machine=hp800 ;;
1091   m88k-dg-*        ) machine=aviion ;;
1092   m68*-sony-*      ) machine=news ;;
1093   mips-sony-*      ) machine=news-risc ;;
1094   clipper-*        ) machine=clipper ;;
1095   arm-*            ) machine=arm ;;
1096   ns32k-*          ) machine=ns32000 ;;
1097 esac
1098
1099 case "$canonical" in
1100   *-*-linux*    ) opsys=linux ;;
1101   *-*-netbsd*   ) opsys=netbsd ;;
1102   *-*-openbsd*  ) opsys=openbsd ;;
1103   *-*-nextstep* ) opsys=nextstep ;;
1104   *-*-vms       ) opsys=vms ;;
1105
1106     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1107   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1108   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1109   *-dec-osf3*                ) opsys=decosf3-1 ;;
1110   *-dec-osf4*                ) opsys=decosf4-0 ;;
1111
1112     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1113   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1114   *-*-ultrix* )         opsys=ultrix4-3 ;;
1115
1116     *-*-aix3.1*  ) opsys=aix3-1 ;;
1117   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1118   *-*-aix3*    ) opsys=aix3-2   ;;
1119   *-*-aix4.0*  ) opsys=aix4     ;;
1120   *-*-aix4.1*  ) opsys=aix4-1   ;;
1121   *-*-aix4*    ) opsys=aix4-2   ;;
1122
1123     *-gnu* )                    opsys=gnu    ;;
1124   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1125   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1126   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1127   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1128   *-*-aos*   )                  opsys=bsd4-3 ;;
1129   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1130   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1131   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1132   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1133   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1134   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1135         if test -z "$NON_GNU_CPP" ; then
1136           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1137             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1138           done
1139         fi
1140         opsys=usg5-4-2 ;;
1141     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1142     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1143 esac
1144
1145 case "$canonical" in
1146
1147     *-*-netbsd* )
1148     case "$canonical" in
1149       i[3-9]86-*-netbsd*) machine=intel386 ;;
1150       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1151                                             machine=hp9000s300 ;;
1152       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1153       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1154     esac
1155   ;;
1156
1157     *-*-openbsd* )
1158     case "${canonical}" in
1159       i386-*-openbsd*)          machine=intel386 ;;
1160       m68k-*-openbsd*)          machine=hp9000s300 ;;
1161       mipsel-*-openbsd*)        machine=pmax ;;
1162      esac
1163    ;;
1164
1165     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1166   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1167
1168     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1169   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1170
1171     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1172
1173     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1174
1175     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1176
1177     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1178
1179     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1180
1181     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1182   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1183   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1184
1185   
1186     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1187
1188     *-convex-bsd* | *-convex-convexos* )
1189     machine=convex opsys=bsd4-3
1190     NON_GNU_CPP="cc -E -P"
1191   ;;
1192
1193     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1194
1195     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1196   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1197   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1198   m88k-dg-dgux*                           ) opsys=dgux     ;;
1199
1200     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1201   m88k-motorola-sysv4* )
1202                     machine=delta88k opsys=usg5-4-2
1203   ;;
1204   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1205
1206     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1207   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1208
1209     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1210
1211     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1212   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1213   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1214
1215       m88k-harris-cxux* )
1216         case "`uname -r`" in
1217        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1218        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1219     esac
1220     NON_GNU_CPP="/lib/cpp"
1221   ;;
1222     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1223     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1224
1225     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1226
1227     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1228
1229     *-hp-hpux* )
1230         case "$canonical" in
1231       m68*  ) machine=hp9000s300 ;;
1232       hppa* ) machine=hp800      ;;
1233     esac
1234
1235     case "$canonical" in
1236       *-hp-hpux7*  )  opsys=hpux   ;;
1237       *-hp-hpux8*  )  opsys=hpux8  ;;
1238       *-hp-hpux9*  )  opsys=hpux9  ;;
1239       *-hp-hpux10* )  opsys=hpux10 ;;
1240       *-hp-hpux11* )  opsys=hpux11 ;;
1241       *            )  opsys=hpux   ;;
1242     esac
1243
1244         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1245    echo "    xemacs will be linked with \"strcat.o\""
1246  fi ;; esac
1247
1248     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1249         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1250     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1251
1252     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1253   ;;
1254
1255     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1256   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1257
1258     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1259   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1260   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1261   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1262   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1263   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1264
1265     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1266   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1267
1268     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1269
1270     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1271
1272     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1273
1274     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1275
1276       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1277
1278     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1279
1280     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1281
1282     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1283
1284     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1285
1286         mips-mips-usg* ) machine=mips4 ;;
1287   mips-mips-riscos4 )
1288     machine=mips4
1289     NON_GNU_CC="cc -systype bsd43"
1290     NON_GNU_CPP="cc -systype bsd43 -E"
1291     case "$canonical" in
1292       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1293       mips-mips-riscos5* ) opsys=riscos5 ;;
1294     esac
1295   ;;
1296   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1297   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1298
1299     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1300
1301     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1302
1303     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1304   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1305
1306     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1307
1308     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1309
1310     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1311
1312     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1313
1314     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1315   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1316
1317     mips-siemens-sysv* | mips-sni-sysv*)
1318     machine=mips-siemens opsys=usg5-4
1319     NON_GNU_CC=/usr/ccs/bin/cc
1320     NON_GNU_CPP=/usr/ccs/lib/cpp
1321   ;;
1322
1323     mips-nec-sysv*)
1324     machine=mips-nec
1325     NON_GNU_CC=/usr/ccs/bin/cc
1326     NON_GNU_CPP=/usr/ccs/lib/cpp
1327   ;;
1328
1329       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1330   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1331     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1332   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1333   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1334   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1335   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1336   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1337   mips-sgi-irix*      ) opsys=irix5-0 ;;
1338
1339     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1340   *-sony-news* ) opsys=newsos5 ;;
1341
1342     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1343
1344     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1345         case "$canonical" in
1346       m68*-sunos1* )             machine=sun1     ;;
1347       m68*-sunos2* )             machine=sun2     ;;
1348       m68* )                     machine=sun3     ;;
1349       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1350       i*86-*-* )                 machine=intel386 ;;
1351       rs6000* )                  machine=rs6000   ;;
1352     esac
1353
1354         case "$canonical" in *-sunos5*)
1355       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1356     esac
1357
1358                     case "$canonical" in
1359       *-sunos4* )
1360         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1361         : ;;
1362       *-solaris2* )
1363         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1364         RANLIB=':' ;;
1365     esac
1366
1367     case "$canonical" in
1368       *-solaris*          )
1369         opsys=sol2
1370         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1371         { test "$extra_verbose" = "yes" && cat << EOF
1372     Defining OS_RELEASE = $os_release
1373 EOF
1374 cat >> confdefs.h <<EOF
1375 #define OS_RELEASE $os_release
1376 EOF
1377 }
1378  ;;
1379
1380             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1381       *-sunos4.0*         ) opsys=sunos4-0      ;;
1382       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1383       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1384       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1385       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1386       *-mach*             ) opsys=mach-bsd4-3   ;;
1387       *                   ) opsys=bsd4-2        ;;
1388     esac
1389
1390     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1391
1392         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1393   ;;
1394
1395     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1396
1397     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1398   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1399
1400     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1401
1402     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1403
1404     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1405       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1406
1407     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1408
1409     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1410
1411     vax-dec-* )
1412     case "$canonical" in
1413       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1414       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1415       *-mach* )                         opsys=mach-bsd4-3 ;;
1416     esac
1417   ;;
1418
1419     ns16k-whitechapel-* ) machine=mg1 ;;
1420
1421     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1422
1423     i[3-9]86-*-* )
1424     machine=intel386
1425     case "$canonical" in
1426       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1427       *-isc2.2* )               opsys=isc2-2 ;;
1428       *-isc4.0* )               opsys=isc4-0 ;;
1429       *-isc4.* )                opsys=isc4-1
1430                                 GCC_TEST_OPTIONS=-posix
1431                                 NON_GCC_TEST_OPTIONS=-Xp
1432                                 ;;
1433       *-isc* )                  opsys=isc3-0 ;;
1434       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1435       *-esix* )                 opsys=esix ;;
1436       *-mach* )                 opsys=mach-bsd4-3 ;;
1437       *-xenix* )                opsys=xenix ;;
1438       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1439       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1440       *-bsdi4* )                opsys=bsdos4 ;;
1441       *-bsdi3* )                opsys=bsdos3 ;;
1442       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1443       *-bsdi2* )                opsys=bsdos2 ;;
1444       *-sco3.2v5* )             opsys=sco5 ;
1445                                                         if test "$dynamic" = "yes" ; then
1446                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1447         else
1448                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1449         fi ;;
1450       *-sysv5* )                opsys=sco7 ;;
1451       *-386bsd* )               opsys=386bsd ;;
1452       *-freebsd* )              opsys=freebsd ;;
1453       *-nextstep* )             opsys=nextstep ;;
1454       *-pc-cygwin* )            opsys=cygwin32 ;;
1455       *-pc-mingw* )             opsys=mingw32 ;
1456                                 test -z "$with_tty" && with_tty="no";;
1457           esac
1458   ;;
1459
1460     m68k-*-linux* ) machine=m68k opsys=linux ;;
1461
1462 esac
1463
1464 if test -z "$machine" -o -z "$opsys"; then
1465   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1466    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1467   ) >&2
1468   exit 1
1469 fi
1470
1471 if test -z "$dynamic"; then
1472   case "$opsys" in
1473     hpux* | sunos4* ) dynamic=no ;;
1474     *) dynamic=yes ;;
1475   esac
1476 fi
1477 if test "$dynamic" = "yes"; then
1478   case "$opsys" in
1479     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1480     decosf* ) ld_call_shared="-call_shared" ;;
1481   esac
1482 else   case "$opsys" in
1483     sol2 )
1484       echo "Static linking is not supported on Solaris 2."
1485       echo "Rerun configure without specifying --dynamic=no."
1486       exit 1 ;;
1487     linux   ) ld_call_shared="-Bstatic" ;;
1488     decosf* ) ld_call_shared="-non_shared" ;;
1489   esac
1490 fi
1491
1492 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1493
1494 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1495 { test "$extra_verbose" = "yes" && cat << EOF
1496     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1497 EOF
1498 cat >> confdefs.h <<EOF
1499 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1500 EOF
1501 }
1502
1503
1504 machfile="m/${machine}.h"
1505 opsysfile="s/${opsys}.h"
1506
1507
1508 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1509 if test "$with_workshop $with_tooltalk" = "yes no"; then
1510   (echo "$progname: Usage error:"
1511 echo " " "--with-workshop requires --with-tooltalk"
1512 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1513 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1514 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1515 fi
1516
1517 if test "$with_workshop" = "yes"; then
1518   { test "$extra_verbose" = "yes" && cat << \EOF
1519     Defining SUNPRO
1520 EOF
1521 cat >> confdefs.h <<\EOF
1522 #define SUNPRO 1
1523 EOF
1524 }
1525
1526   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1527    echo "    xemacs will be linked with \"sunpro.o\""
1528  fi
1529 fi
1530
1531 if test "$with_clash_detection" = "yes"; then
1532   { test "$extra_verbose" = "yes" && cat << \EOF
1533     Defining CLASH_DETECTION
1534 EOF
1535 cat >> confdefs.h <<\EOF
1536 #define CLASH_DETECTION 1
1537 EOF
1538 }
1539
1540   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1541    echo "    xemacs will be linked with \"filelock.o\""
1542  fi
1543 fi
1544
1545 test -n "$compiler" && CC="$compiler"
1546 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1547 fi
1548
1549 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1550 if test "${CFLAGS-unset}" != unset
1551   then cflags_specified=yes;
1552   else cflags_specified=no;
1553 fi
1554
1555 xe_save_CFLAGS="$CFLAGS"
1556
1557 # Extract the first word of "gcc", so it can be a program name with args.
1558 set dummy gcc; ac_word=$2
1559 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1560 echo "configure:1561: checking for $ac_word" >&5
1561
1562 if test -n "$CC"; then
1563   ac_cv_prog_CC="$CC" # Let the user override the test.
1564 else
1565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1566   ac_dummy="$PATH"
1567   for ac_dir in $ac_dummy; do
1568     test -z "$ac_dir" && ac_dir=.
1569     if test -f $ac_dir/$ac_word; then
1570       ac_cv_prog_CC="gcc"
1571       break
1572     fi
1573   done
1574   IFS="$ac_save_ifs"
1575 fi
1576 CC="$ac_cv_prog_CC"
1577 if test -n "$CC"; then
1578   echo "$ac_t""$CC" 1>&6
1579 else
1580   echo "$ac_t""no" 1>&6
1581 fi
1582
1583 if test -z "$CC"; then
1584   # Extract the first word of "cc", so it can be a program name with args.
1585 set dummy cc; ac_word=$2
1586 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1587 echo "configure:1588: checking for $ac_word" >&5
1588
1589 if test -n "$CC"; then
1590   ac_cv_prog_CC="$CC" # Let the user override the test.
1591 else
1592   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1593   ac_prog_rejected=no
1594   ac_dummy="$PATH"
1595   for ac_dir in $ac_dummy; do
1596     test -z "$ac_dir" && ac_dir=.
1597     if test -f $ac_dir/$ac_word; then
1598       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1599         ac_prog_rejected=yes
1600         continue
1601       fi
1602       ac_cv_prog_CC="cc"
1603       break
1604     fi
1605   done
1606   IFS="$ac_save_ifs"
1607 if test $ac_prog_rejected = yes; then
1608   # We found a bogon in the path, so make sure we never use it.
1609   set dummy $ac_cv_prog_CC
1610   shift
1611   if test $# -gt 0; then
1612     # We chose a different compiler from the bogus one.
1613     # However, it has the same basename, so the bogon will be chosen
1614     # first if we set CC to just the basename; use the full file name.
1615     shift
1616     set dummy "$ac_dir/$ac_word" "$@"
1617     shift
1618     ac_cv_prog_CC="$@"
1619   fi
1620 fi
1621 fi
1622 CC="$ac_cv_prog_CC"
1623 if test -n "$CC"; then
1624   echo "$ac_t""$CC" 1>&6
1625 else
1626   echo "$ac_t""no" 1>&6
1627 fi
1628
1629   if test -z "$CC"; then
1630     case "`uname -s`" in
1631     *win32* | *WIN32*)
1632       # Extract the first word of "cl", so it can be a program name with args.
1633 set dummy cl; ac_word=$2
1634 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1635 echo "configure:1636: checking for $ac_word" >&5
1636
1637 if test -n "$CC"; then
1638   ac_cv_prog_CC="$CC" # Let the user override the test.
1639 else
1640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1641   ac_dummy="$PATH"
1642   for ac_dir in $ac_dummy; do
1643     test -z "$ac_dir" && ac_dir=.
1644     if test -f $ac_dir/$ac_word; then
1645       ac_cv_prog_CC="cl"
1646       break
1647     fi
1648   done
1649   IFS="$ac_save_ifs"
1650 fi
1651 CC="$ac_cv_prog_CC"
1652 if test -n "$CC"; then
1653   echo "$ac_t""$CC" 1>&6
1654 else
1655   echo "$ac_t""no" 1>&6
1656 fi
1657  ;;
1658     esac
1659   fi
1660   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1661 fi
1662
1663 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1664 echo "configure:1665: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1665
1666 ac_ext=c
1667 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1668 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1669 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1670 ac_cpp='$CPP '"$xe_cppflags"
1671 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1672 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1673 cross_compiling=no
1674
1675 cat > conftest.$ac_ext << EOF
1676
1677 #line 1678 "configure"
1678 #include "confdefs.h"
1679
1680 main(){return(0);}
1681 EOF
1682 if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1683   ac_cv_prog_cc_works=yes
1684   # If we can't run a trivial program, we are probably using a cross compiler.
1685   if (./conftest; exit) 2>/dev/null; then
1686     ac_cv_prog_cc_cross=no
1687   else
1688     ac_cv_prog_cc_cross=yes
1689   fi
1690 else
1691   echo "configure: failed program was:" >&5
1692   cat conftest.$ac_ext >&5
1693   ac_cv_prog_cc_works=no
1694 fi
1695 rm -fr conftest*
1696 ac_ext=c
1697 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1698 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1699 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1700 ac_cpp='$CPP '"$xe_cppflags"
1701 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1702 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1703 cross_compiling=no
1704
1705 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1706 if test $ac_cv_prog_cc_works = no; then
1707   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1708 fi
1709 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1710 echo "configure:1711: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1711 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1712 cross_compiling=$ac_cv_prog_cc_cross
1713
1714 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1715 echo "configure:1716: checking whether we are using GNU C" >&5
1716
1717 cat > conftest.c <<EOF
1718 #ifdef __GNUC__
1719   yes;
1720 #endif
1721 EOF
1722 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1723   ac_cv_prog_gcc=yes
1724 else
1725   ac_cv_prog_gcc=no
1726 fi
1727
1728 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1729
1730 if test $ac_cv_prog_gcc = yes; then
1731   GCC=yes
1732 else
1733   GCC=
1734 fi
1735
1736 ac_test_CFLAGS="${CFLAGS+set}"
1737 ac_save_CFLAGS="$CFLAGS"
1738 CFLAGS=
1739 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1740 echo "configure:1741: checking whether ${CC-cc} accepts -g" >&5
1741
1742 echo 'void f(){}' > conftest.c
1743 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1744   ac_cv_prog_cc_g=yes
1745 else
1746   ac_cv_prog_cc_g=no
1747 fi
1748 rm -f conftest*
1749
1750
1751 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1752 if test "$ac_test_CFLAGS" = set; then
1753   CFLAGS="$ac_save_CFLAGS"
1754 elif test $ac_cv_prog_cc_g = yes; then
1755   if test "$GCC" = yes; then
1756     CFLAGS="-g -O2"
1757   else
1758     CFLAGS="-g"
1759   fi
1760 else
1761   if test "$GCC" = yes; then
1762     CFLAGS="-O2"
1763   else
1764     CFLAGS=
1765   fi
1766 fi
1767  
1768 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1769   CC=${NON_GNU_CC-cc}
1770   # Extract the first word of "gcc", so it can be a program name with args.
1771 set dummy gcc; ac_word=$2
1772 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1773 echo "configure:1774: checking for $ac_word" >&5
1774
1775 if test -n "$CC"; then
1776   ac_cv_prog_CC="$CC" # Let the user override the test.
1777 else
1778   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1779   ac_dummy="$PATH"
1780   for ac_dir in $ac_dummy; do
1781     test -z "$ac_dir" && ac_dir=.
1782     if test -f $ac_dir/$ac_word; then
1783       ac_cv_prog_CC="gcc"
1784       break
1785     fi
1786   done
1787   IFS="$ac_save_ifs"
1788 fi
1789 CC="$ac_cv_prog_CC"
1790 if test -n "$CC"; then
1791   echo "$ac_t""$CC" 1>&6
1792 else
1793   echo "$ac_t""no" 1>&6
1794 fi
1795
1796 if test -z "$CC"; then
1797   # Extract the first word of "cc", so it can be a program name with args.
1798 set dummy cc; ac_word=$2
1799 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1800 echo "configure:1801: checking for $ac_word" >&5
1801
1802 if test -n "$CC"; then
1803   ac_cv_prog_CC="$CC" # Let the user override the test.
1804 else
1805   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1806   ac_prog_rejected=no
1807   ac_dummy="$PATH"
1808   for ac_dir in $ac_dummy; do
1809     test -z "$ac_dir" && ac_dir=.
1810     if test -f $ac_dir/$ac_word; then
1811       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1812         ac_prog_rejected=yes
1813         continue
1814       fi
1815       ac_cv_prog_CC="cc"
1816       break
1817     fi
1818   done
1819   IFS="$ac_save_ifs"
1820 if test $ac_prog_rejected = yes; then
1821   # We found a bogon in the path, so make sure we never use it.
1822   set dummy $ac_cv_prog_CC
1823   shift
1824   if test $# -gt 0; then
1825     # We chose a different compiler from the bogus one.
1826     # However, it has the same basename, so the bogon will be chosen
1827     # first if we set CC to just the basename; use the full file name.
1828     shift
1829     set dummy "$ac_dir/$ac_word" "$@"
1830     shift
1831     ac_cv_prog_CC="$@"
1832   fi
1833 fi
1834 fi
1835 CC="$ac_cv_prog_CC"
1836 if test -n "$CC"; then
1837   echo "$ac_t""$CC" 1>&6
1838 else
1839   echo "$ac_t""no" 1>&6
1840 fi
1841
1842   if test -z "$CC"; then
1843     case "`uname -s`" in
1844     *win32* | *WIN32*)
1845       # Extract the first word of "cl", so it can be a program name with args.
1846 set dummy cl; ac_word=$2
1847 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1848 echo "configure:1849: checking for $ac_word" >&5
1849
1850 if test -n "$CC"; then
1851   ac_cv_prog_CC="$CC" # Let the user override the test.
1852 else
1853   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1854   ac_dummy="$PATH"
1855   for ac_dir in $ac_dummy; do
1856     test -z "$ac_dir" && ac_dir=.
1857     if test -f $ac_dir/$ac_word; then
1858       ac_cv_prog_CC="cl"
1859       break
1860     fi
1861   done
1862   IFS="$ac_save_ifs"
1863 fi
1864 CC="$ac_cv_prog_CC"
1865 if test -n "$CC"; then
1866   echo "$ac_t""$CC" 1>&6
1867 else
1868   echo "$ac_t""no" 1>&6
1869 fi
1870  ;;
1871     esac
1872   fi
1873   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1874 fi
1875
1876 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1877 echo "configure:1878: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1878
1879 ac_ext=c
1880 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1881 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1882 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1883 ac_cpp='$CPP '"$xe_cppflags"
1884 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1885 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1886 cross_compiling=no
1887
1888 cat > conftest.$ac_ext << EOF
1889
1890 #line 1891 "configure"
1891 #include "confdefs.h"
1892
1893 main(){return(0);}
1894 EOF
1895 if { (eval echo configure:1896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1896   ac_cv_prog_cc_works=yes
1897   # If we can't run a trivial program, we are probably using a cross compiler.
1898   if (./conftest; exit) 2>/dev/null; then
1899     ac_cv_prog_cc_cross=no
1900   else
1901     ac_cv_prog_cc_cross=yes
1902   fi
1903 else
1904   echo "configure: failed program was:" >&5
1905   cat conftest.$ac_ext >&5
1906   ac_cv_prog_cc_works=no
1907 fi
1908 rm -fr conftest*
1909 ac_ext=c
1910 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1911 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1912 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1913 ac_cpp='$CPP '"$xe_cppflags"
1914 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1915 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1916 cross_compiling=no
1917
1918 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1919 if test $ac_cv_prog_cc_works = no; then
1920   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1921 fi
1922 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1923 echo "configure:1924: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1924 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1925 cross_compiling=$ac_cv_prog_cc_cross
1926
1927 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1928 echo "configure:1929: checking whether we are using GNU C" >&5
1929
1930 cat > conftest.c <<EOF
1931 #ifdef __GNUC__
1932   yes;
1933 #endif
1934 EOF
1935 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1936   ac_cv_prog_gcc=yes
1937 else
1938   ac_cv_prog_gcc=no
1939 fi
1940
1941 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1942
1943 if test $ac_cv_prog_gcc = yes; then
1944   GCC=yes
1945 else
1946   GCC=
1947 fi
1948
1949 ac_test_CFLAGS="${CFLAGS+set}"
1950 ac_save_CFLAGS="$CFLAGS"
1951 CFLAGS=
1952 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1953 echo "configure:1954: checking whether ${CC-cc} accepts -g" >&5
1954
1955 echo 'void f(){}' > conftest.c
1956 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1957   ac_cv_prog_cc_g=yes
1958 else
1959   ac_cv_prog_cc_g=no
1960 fi
1961 rm -f conftest*
1962
1963
1964 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1965 if test "$ac_test_CFLAGS" = set; then
1966   CFLAGS="$ac_save_CFLAGS"
1967 elif test $ac_cv_prog_cc_g = yes; then
1968   if test "$GCC" = yes; then
1969     CFLAGS="-g -O2"
1970   else
1971     CFLAGS="-g"
1972   fi
1973 else
1974   if test "$GCC" = yes; then
1975     CFLAGS="-O2"
1976   else
1977     CFLAGS=
1978   fi
1979 fi
1980
1981 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1982   CC=gcc
1983   # Extract the first word of "gcc", so it can be a program name with args.
1984 set dummy gcc; ac_word=$2
1985 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1986 echo "configure:1987: checking for $ac_word" >&5
1987
1988 if test -n "$CC"; then
1989   ac_cv_prog_CC="$CC" # Let the user override the test.
1990 else
1991   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1992   ac_dummy="$PATH"
1993   for ac_dir in $ac_dummy; do
1994     test -z "$ac_dir" && ac_dir=.
1995     if test -f $ac_dir/$ac_word; then
1996       ac_cv_prog_CC="gcc"
1997       break
1998     fi
1999   done
2000   IFS="$ac_save_ifs"
2001 fi
2002 CC="$ac_cv_prog_CC"
2003 if test -n "$CC"; then
2004   echo "$ac_t""$CC" 1>&6
2005 else
2006   echo "$ac_t""no" 1>&6
2007 fi
2008
2009 if test -z "$CC"; then
2010   # Extract the first word of "cc", so it can be a program name with args.
2011 set dummy cc; ac_word=$2
2012 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2013 echo "configure:2014: checking for $ac_word" >&5
2014
2015 if test -n "$CC"; then
2016   ac_cv_prog_CC="$CC" # Let the user override the test.
2017 else
2018   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2019   ac_prog_rejected=no
2020   ac_dummy="$PATH"
2021   for ac_dir in $ac_dummy; do
2022     test -z "$ac_dir" && ac_dir=.
2023     if test -f $ac_dir/$ac_word; then
2024       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2025         ac_prog_rejected=yes
2026         continue
2027       fi
2028       ac_cv_prog_CC="cc"
2029       break
2030     fi
2031   done
2032   IFS="$ac_save_ifs"
2033 if test $ac_prog_rejected = yes; then
2034   # We found a bogon in the path, so make sure we never use it.
2035   set dummy $ac_cv_prog_CC
2036   shift
2037   if test $# -gt 0; then
2038     # We chose a different compiler from the bogus one.
2039     # However, it has the same basename, so the bogon will be chosen
2040     # first if we set CC to just the basename; use the full file name.
2041     shift
2042     set dummy "$ac_dir/$ac_word" "$@"
2043     shift
2044     ac_cv_prog_CC="$@"
2045   fi
2046 fi
2047 fi
2048 CC="$ac_cv_prog_CC"
2049 if test -n "$CC"; then
2050   echo "$ac_t""$CC" 1>&6
2051 else
2052   echo "$ac_t""no" 1>&6
2053 fi
2054
2055   if test -z "$CC"; then
2056     case "`uname -s`" in
2057     *win32* | *WIN32*)
2058       # Extract the first word of "cl", so it can be a program name with args.
2059 set dummy cl; ac_word=$2
2060 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2061 echo "configure:2062: checking for $ac_word" >&5
2062
2063 if test -n "$CC"; then
2064   ac_cv_prog_CC="$CC" # Let the user override the test.
2065 else
2066   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2067   ac_dummy="$PATH"
2068   for ac_dir in $ac_dummy; do
2069     test -z "$ac_dir" && ac_dir=.
2070     if test -f $ac_dir/$ac_word; then
2071       ac_cv_prog_CC="cl"
2072       break
2073     fi
2074   done
2075   IFS="$ac_save_ifs"
2076 fi
2077 CC="$ac_cv_prog_CC"
2078 if test -n "$CC"; then
2079   echo "$ac_t""$CC" 1>&6
2080 else
2081   echo "$ac_t""no" 1>&6
2082 fi
2083  ;;
2084     esac
2085   fi
2086   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2087 fi
2088
2089 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2090 echo "configure:2091: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2091
2092 ac_ext=c
2093 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2094 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2095 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2096 ac_cpp='$CPP '"$xe_cppflags"
2097 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2098 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2099 cross_compiling=no
2100
2101 cat > conftest.$ac_ext << EOF
2102
2103 #line 2104 "configure"
2104 #include "confdefs.h"
2105
2106 main(){return(0);}
2107 EOF
2108 if { (eval echo configure:2109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2109   ac_cv_prog_cc_works=yes
2110   # If we can't run a trivial program, we are probably using a cross compiler.
2111   if (./conftest; exit) 2>/dev/null; then
2112     ac_cv_prog_cc_cross=no
2113   else
2114     ac_cv_prog_cc_cross=yes
2115   fi
2116 else
2117   echo "configure: failed program was:" >&5
2118   cat conftest.$ac_ext >&5
2119   ac_cv_prog_cc_works=no
2120 fi
2121 rm -fr conftest*
2122 ac_ext=c
2123 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2124 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2125 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2126 ac_cpp='$CPP '"$xe_cppflags"
2127 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2128 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2129 cross_compiling=no
2130
2131 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2132 if test $ac_cv_prog_cc_works = no; then
2133   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2134 fi
2135 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2136 echo "configure:2137: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2137 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2138 cross_compiling=$ac_cv_prog_cc_cross
2139
2140 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2141 echo "configure:2142: checking whether we are using GNU C" >&5
2142
2143 cat > conftest.c <<EOF
2144 #ifdef __GNUC__
2145   yes;
2146 #endif
2147 EOF
2148 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2149   ac_cv_prog_gcc=yes
2150 else
2151   ac_cv_prog_gcc=no
2152 fi
2153
2154 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2155
2156 if test $ac_cv_prog_gcc = yes; then
2157   GCC=yes
2158 else
2159   GCC=
2160 fi
2161
2162 ac_test_CFLAGS="${CFLAGS+set}"
2163 ac_save_CFLAGS="$CFLAGS"
2164 CFLAGS=
2165 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2166 echo "configure:2167: checking whether ${CC-cc} accepts -g" >&5
2167
2168 echo 'void f(){}' > conftest.c
2169 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2170   ac_cv_prog_cc_g=yes
2171 else
2172   ac_cv_prog_cc_g=no
2173 fi
2174 rm -f conftest*
2175
2176
2177 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2178 if test "$ac_test_CFLAGS" = set; then
2179   CFLAGS="$ac_save_CFLAGS"
2180 elif test $ac_cv_prog_cc_g = yes; then
2181   if test "$GCC" = yes; then
2182     CFLAGS="-g -O2"
2183   else
2184     CFLAGS="-g"
2185   fi
2186 else
2187   if test "$GCC" = yes; then
2188     CFLAGS="-O2"
2189   else
2190     CFLAGS=
2191   fi
2192 fi
2193
2194 fi
2195 CFLAGS="$xe_save_CFLAGS"
2196
2197
2198 test -n "$CPP" -a -d "$CPP" && CPP=
2199
2200 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2201
2202 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2203 echo "configure:2204: checking how to run the C preprocessor" >&5
2204 # On Suns, sometimes $CPP names a directory.
2205 if test -n "$CPP" && test -d "$CPP"; then
2206   CPP=
2207 fi
2208 if test -z "$CPP"; then
2209
2210   # This must be in double quotes, not single quotes, because CPP may get
2211   # substituted into the Makefile and "${CC-cc}" will confuse make.
2212   CPP="${CC-cc} -E"
2213   # On the NeXT, cc -E runs the code through the compiler's parser,
2214   # not just through cpp.
2215   cat > conftest.$ac_ext <<EOF
2216 #line 2217 "configure"
2217 #include "confdefs.h"
2218 #include <assert.h>
2219 Syntax Error
2220 EOF
2221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2222 { (eval echo configure:2223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2224 if test -z "$ac_err"; then
2225   :
2226 else
2227   echo "$ac_err" >&5
2228   echo "configure: failed program was:" >&5
2229   cat conftest.$ac_ext >&5
2230   rm -rf conftest*
2231   CPP="${CC-cc} -E -traditional-cpp"
2232   cat > conftest.$ac_ext <<EOF
2233 #line 2234 "configure"
2234 #include "confdefs.h"
2235 #include <assert.h>
2236 Syntax Error
2237 EOF
2238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2239 { (eval echo configure:2240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2241 if test -z "$ac_err"; then
2242   :
2243 else
2244   echo "$ac_err" >&5
2245   echo "configure: failed program was:" >&5
2246   cat conftest.$ac_ext >&5
2247   rm -rf conftest*
2248   CPP="${CC-cc} -nologo -E"
2249   cat > conftest.$ac_ext <<EOF
2250 #line 2251 "configure"
2251 #include "confdefs.h"
2252 #include <assert.h>
2253 Syntax Error
2254 EOF
2255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2256 { (eval echo configure:2257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2258 if test -z "$ac_err"; then
2259   :
2260 else
2261   echo "$ac_err" >&5
2262   echo "configure: failed program was:" >&5
2263   cat conftest.$ac_ext >&5
2264   rm -rf conftest*
2265   CPP=/lib/cpp
2266 fi
2267 rm -f conftest*
2268 fi
2269 rm -f conftest*
2270 fi
2271 rm -f conftest*
2272   ac_cv_prog_CPP="$CPP"
2273   CPP="$ac_cv_prog_CPP"
2274 else
2275   ac_cv_prog_CPP="$CPP"
2276 fi
2277 echo "$ac_t""$CPP" 1>&6
2278
2279
2280 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2281 echo "configure:2282: checking for AIX" >&5
2282 cat > conftest.$ac_ext <<EOF
2283 #line 2284 "configure"
2284 #include "confdefs.h"
2285 #ifdef _AIX
2286   yes
2287 #endif
2288
2289 EOF
2290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2291   egrep "yes" >/dev/null 2>&1; then
2292   rm -rf conftest*
2293   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2294     Defining _ALL_SOURCE
2295 EOF
2296 cat >> confdefs.h <<\EOF
2297 #define _ALL_SOURCE 1
2298 EOF
2299 }
2300
2301 else
2302   rm -rf conftest*
2303   echo "$ac_t""no" 1>&6
2304 fi
2305 rm -f conftest*
2306
2307
2308
2309 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2310 echo "configure:2311: checking for GNU libc" >&5
2311 cat > conftest.$ac_ext <<EOF
2312 #line 2313 "configure"
2313 #include "confdefs.h"
2314 #include <features.h>
2315 int main() {
2316
2317 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2318 #error Not a GNU libc system :-(
2319 ******* ======= ******** &&&&&&&&
2320 #endif
2321
2322 ; return 0; }
2323 EOF
2324 if { (eval echo configure:2325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2325   rm -rf conftest*
2326   have_glibc=yes
2327 else
2328   echo "configure: failed program was:" >&5
2329   cat conftest.$ac_ext >&5
2330   rm -rf conftest*
2331   have_glibc=no
2332 fi
2333 rm -f conftest*
2334 echo "$ac_t""$have_glibc" 1>&6
2335 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2336     Defining _GNU_SOURCE
2337 EOF
2338 cat >> confdefs.h <<\EOF
2339 #define _GNU_SOURCE 1
2340 EOF
2341 }
2342
2343
2344
2345 cat > conftest.$ac_ext <<EOF
2346 #line 2347 "configure"
2347 #include "confdefs.h"
2348 int main () {
2349 #if defined __SUNPRO_C
2350 return 11;
2351 #elif defined __DECC
2352 return 12;
2353 #else
2354 return 0;
2355 #endif
2356 }
2357 EOF
2358 if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2359 then
2360   :
2361 else
2362   conftest_rc="$?"
2363   echo "configure: failed program was:" >&5
2364   cat conftest.$ac_ext >&5
2365   rm -fr conftest*
2366   case "$conftest_rc" in
2367   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2368   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2369 esac
2370 fi
2371 rm -fr conftest*
2372
2373
2374
2375
2376 echo "Extracting information from the machine- and system-dependent headers..."
2377
2378 tempcname="conftest.c"
2379
2380
2381
2382 cat > $tempcname <<EOF
2383 #define NOT_C_CODE
2384 #define C_SWITCH_SITE
2385 #define C_SWITCH_X_SITE
2386 #define LD_SWITCH_SITE
2387 #define LD_SWITCH_X_SITE
2388 #define LD_SWITCH_X_SITE_AUX
2389 #define OS_RELEASE $os_release
2390 #include "$srcdir/src/$opsysfile"
2391 #include "$srcdir/src/$machfile"
2392
2393 #ifndef LIBS_MACHINE
2394 #define LIBS_MACHINE
2395 #endif
2396 configure___ libs_machine=LIBS_MACHINE
2397
2398 #ifndef LIBS_SYSTEM
2399 #define LIBS_SYSTEM
2400 #endif
2401 configure___ libs_system=LIBS_SYSTEM
2402
2403 #ifndef LIBS_TERMCAP
2404 #define LIBS_TERMCAP
2405 #endif
2406 configure___ libs_termcap=LIBS_TERMCAP
2407
2408 #ifndef LIB_STANDARD
2409 #define LIB_STANDARD
2410 #endif
2411 configure___ libs_standard=LIB_STANDARD
2412
2413
2414 #ifndef OBJECTS_MACHINE
2415 #define OBJECTS_MACHINE
2416 #endif
2417 configure___ objects_machine=OBJECTS_MACHINE
2418
2419 #ifndef OBJECTS_SYSTEM
2420 #define OBJECTS_SYSTEM
2421 #endif
2422 configure___ objects_system=OBJECTS_SYSTEM
2423
2424
2425 #ifndef C_SWITCH_MACHINE
2426 #define C_SWITCH_MACHINE
2427 #endif
2428 configure___ c_switch_machine=C_SWITCH_MACHINE
2429
2430 #ifndef C_SWITCH_SYSTEM
2431 #define C_SWITCH_SYSTEM
2432 #endif
2433 configure___ c_switch_system=C_SWITCH_SYSTEM
2434
2435
2436 #ifndef LD_SWITCH_MACHINE
2437 #define LD_SWITCH_MACHINE
2438 #endif
2439 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2440
2441 #ifndef LD_SWITCH_SYSTEM
2442 #define LD_SWITCH_SYSTEM
2443 #endif
2444 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2445
2446
2447 #ifndef UNEXEC
2448 #define UNEXEC "unexec.o"
2449 #endif
2450 configure___ unexec=UNEXEC
2451
2452
2453 #ifndef LD_SWITCH_SHARED
2454 #define LD_SWITCH_SHARED "-c"
2455 #endif
2456 configure___ ld_switch_shared=LD_SWITCH_SHARED
2457
2458
2459 #ifdef ORDINARY_LINK
2460 #define LD "\$(CC) \$(CFLAGS)"
2461 #else /* no ORDINARY LINK */
2462 #ifdef COFF_ENCAPSULATE
2463 #define LD "\$(CC) -nostdlib"
2464 #else /* not COFF_ENCAPSULATE */
2465 #ifdef LINKER
2466 #define LD LINKER
2467 #else /* ! defined (LINKER) */
2468 #define LD "ld"
2469 #endif /* ! defined (LINKER) */
2470 #endif /* ! defined (COFF_ENCAPSULATE) */
2471 #endif /* not ORDINARY_LINK */
2472 configure___ ld=LD
2473
2474 #ifndef LIB_GCC
2475 #define LIB_GCC
2476 #endif
2477 configure___ lib_gcc=LIB_GCC
2478
2479 #ifndef LD_TEXT_START_ADDR
2480 #define LD_TEXT_START_ADDR
2481 #endif
2482 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2483
2484
2485 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2486 #ifdef NO_REMAP
2487 #ifdef COFF_ENCAPSULATE
2488 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2489 #else /* ! defined (COFF_ENCAPSULATE) */
2490 #define START_FILES "pre-crt0.o /lib/crt0.o"
2491 #endif /* ! defined (COFF_ENCAPSULATE) */
2492 #else /* ! defined (NO_REMAP) */
2493 #define START_FILES "ecrt0.o"
2494 #endif /* ! defined (NO_REMAP) */
2495 #endif /* no ORDINARY_LINK */
2496 #ifndef START_FILES
2497 #define START_FILES
2498 #endif
2499 configure___ start_files=START_FILES
2500
2501 #ifdef ORDINARY_LINK
2502 configure___ ordinary_link=yes
2503 #else
2504 configure___ ordinary_link=no
2505 #endif
2506
2507 #ifdef SYSTEM_MALLOC
2508 configure___ system_malloc=yes
2509 #else
2510 configure___ system_malloc=no
2511 #endif
2512
2513 #ifdef TERMINFO
2514 configure___ have_terminfo=yes
2515 #else
2516 configure___ have_terminfo=no
2517 #endif
2518
2519 #ifdef MAIL_USE_FLOCK
2520 configure___ mail_use_flock=yes
2521 #else
2522 configure___ mail_use_flock=no
2523 #endif
2524
2525 #ifdef MAIL_USE_LOCKF
2526 configure___ mail_use_lockf=yes
2527 #else
2528 configure___ mail_use_lockf=no
2529 #endif
2530
2531 #ifdef HAVE_WIN32_PROCESSES
2532 configure___ win32_processes=yes
2533 #else
2534 configure___ win32_processes=no
2535 #endif
2536
2537 EOF
2538
2539 CPP=`eval "echo $CPP $CPPFLAGS"`
2540 eval `$CPP -Isrc $tempcname \
2541         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2542
2543 rm $tempcname
2544
2545 test "$extra_verbose" = "yes" && \
2546   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 ""
2547
2548 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2549
2550 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2551
2552 if test "$cflags_specified" = "no"; then
2553       if   test "$GCC" = "yes"; then
2554     CFLAGS="-g -O3 -Wall -Wno-switch"
2555               elif test "$__SUNPRO_C" = "yes"; then
2556     case "$opsys" in
2557       sol2    ) CFLAGS="-v -xO4" ;;
2558       sunos4* ) CFLAGS="-xO2";;
2559     esac
2560   elif test "$__DECC" = "yes"; then
2561     CFLAGS="-O3"
2562   elif test "$CC" = "xlc"; then
2563     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2564     else
2565     CFLAGS="-O" ;  fi
2566 fi
2567
2568
2569 if test "$GCC" = "yes"; then
2570   set x $ld_switch_system; shift; ld_switch_system=""
2571   while test -n "$1"; do
2572     case $1 in
2573       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2574       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2575       -Xlinker* ) ;;
2576       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2577     esac
2578     shift
2579   done
2580 fi
2581
2582 if test "$GCC" = "yes"; then
2583   set x $ld_switch_machine; shift; ld_switch_machine=""
2584   while test -n "$1"; do
2585     case $1 in
2586       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2587       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2588       -Xlinker* ) ;;
2589       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2590     esac
2591     shift
2592   done
2593 fi
2594
2595 if test "$GCC" = "yes"; then
2596   set x $LDFLAGS; shift; LDFLAGS=""
2597   while test -n "$1"; do
2598     case $1 in
2599       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2600       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2601       -Xlinker* ) ;;
2602       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2603     esac
2604     shift
2605   done
2606 fi
2607
2608 if test "$GCC" = "yes"; then
2609   set x $ld_call_shared; shift; ld_call_shared=""
2610   while test -n "$1"; do
2611     case $1 in
2612       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2613       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2614       -Xlinker* ) ;;
2615       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2616     esac
2617     shift
2618   done
2619 fi
2620
2621 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2622    echo "    xemacs will be linked with \"$objects_machine\""
2623  fi
2624 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2625    echo "    xemacs will be linked with \"$objects_system\""
2626  fi
2627 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2628    echo "    xemacs will be linked with \"$unexec\""
2629  fi
2630
2631 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2632 echo "configure:2633: checking for dynodump" >&5
2633 if test "$unexec" != "unexsol2.o"; then
2634   echo "$ac_t""no" 1>&6
2635 else
2636   echo "$ac_t""yes" 1>&6
2637   { test "$extra_verbose" = "yes" && cat << \EOF
2638     Defining DYNODUMP
2639 EOF
2640 cat >> confdefs.h <<\EOF
2641 #define DYNODUMP 1
2642 EOF
2643 }
2644
2645   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2646   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2647   case "$machine" in
2648     sparc   ) dynodump_arch=sparc ;;
2649     *86*    ) dynodump_arch=i386  ;;
2650     powerpc ) dynodump_arch=ppc   ;;
2651   esac
2652     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
2653 fi
2654
2655
2656 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2657
2658 if test "$unexec" = "unexaix.o"; then
2659   if   test "$dynamic" = "no"; then
2660   start_flags="-Wl,-bnso,-bnodelcsect"
2661   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2662   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2663     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2664   done
2665   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2666     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2667   done
2668   
2669 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2670 echo "configure:2671: checking for terminateAndUnload in -lC" >&5
2671 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2672
2673 xe_check_libs=" -lC "
2674 cat > conftest.$ac_ext <<EOF
2675 #line 2676 "configure"
2676 #include "confdefs.h"
2677 /* Override any gcc2 internal prototype to avoid an error.  */
2678 /* We use char because int might match the return type of a gcc2
2679     builtin and then its argument prototype would still apply.  */
2680 char terminateAndUnload();
2681
2682 int main() {
2683 terminateAndUnload()
2684 ; return 0; }
2685 EOF
2686 if { (eval echo configure:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2687   rm -rf conftest*
2688   eval "ac_cv_lib_$ac_lib_var=yes"
2689 else
2690   echo "configure: failed program was:" >&5
2691   cat conftest.$ac_ext >&5
2692   rm -rf conftest*
2693   eval "ac_cv_lib_$ac_lib_var=no"
2694 fi
2695 rm -f conftest*
2696 xe_check_libs=""
2697
2698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2699   echo "$ac_t""yes" 1>&6
2700   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2701 else
2702   echo "$ac_t""no" 1>&6
2703 fi
2704
2705
2706   fi
2707 elif test -n "$ld_text_start_addr"; then
2708   start_flags="-T $ld_text_start_addr -e __start"
2709 fi
2710
2711
2712
2713
2714 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2715  test -z "$linker" &&  linker='$(CC) -nostdlib'
2716  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2717 fi
2718 test "$GCC" != "yes" && lib_gcc=
2719
2720
2721
2722
2723
2724 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2725 if test -n "$site_libraries"; then
2726   for arg in $site_libraries; do
2727     case "$arg" in
2728      -* ) ;;
2729      * ) test -d "$arg" || \
2730            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2731        arg="-L${arg}" ;;
2732     esac
2733     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2734   done
2735 fi
2736
2737 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2738 if test -n "$site_includes"; then
2739   for arg in $site_includes; do
2740     case "$arg" in
2741       -* ) ;;
2742       * ) test -d "$arg" || \
2743            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2744       arg="-I${arg}" ;;
2745     esac
2746     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2747   done
2748 fi
2749
2750 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2751 if test -n "$site_prefixes"; then
2752   for dir in $site_prefixes; do
2753     lib_dir="${dir}/lib"
2754     inc_dir="${dir}/include"
2755     if test ! -d "$dir"; then
2756       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2757     elif test ! -d "$lib_dir"; then
2758       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2759     else
2760       if test -d "$inc_dir"; then
2761         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
2762       fi
2763       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
2764     fi
2765   done
2766 fi
2767
2768
2769 for dir in "/usr/ccs/lib"; do
2770   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
2771 done
2772
2773 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2774 if test -n "$site_runtime_libraries"; then
2775   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2776   export LD_RUN_PATH
2777 fi
2778
2779
2780 if   test "$dynamic" = "no"; then add_runtime_path=no
2781 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2782 else case "$opsys" in
2783        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2784        * ) add_runtime_path=no ;;
2785      esac
2786 fi
2787
2788 if test "$add_runtime_path" = "yes"; then
2789       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2790 echo "configure:2791: checking "for runtime libraries flag"" >&5
2791   case "$opsys" in
2792     sol2 ) dash_r="-R" ;;
2793     decosf* | linux* | irix*) dash_r="-rpath " ;;
2794     *)
2795       dash_r=""
2796       for try_dash_r in "-R" "-R " "-rpath "; do
2797         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2798         
2799 if test "$GCC" = "yes"; then
2800   set x $xe_check_libs; shift; xe_check_libs=""
2801   while test -n "$1"; do
2802     case $1 in
2803       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2804       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2805       -Xlinker* ) ;;
2806       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2807     esac
2808     shift
2809   done
2810 fi
2811         cat > conftest.$ac_ext <<EOF
2812 #line 2813 "configure"
2813 #include "confdefs.h"
2814
2815 int main() {
2816
2817 ; return 0; }
2818 EOF
2819 if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2820   rm -rf conftest*
2821   dash_r="$try_dash_r"
2822 else
2823   echo "configure: failed program was:" >&5
2824   cat conftest.$ac_ext >&5
2825 fi
2826 rm -f conftest*
2827         xe_check_libs=""
2828         test -n "$dash_r" && break
2829       done ;;
2830   esac
2831   if test -n "$dash_r";
2832     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2833     else echo "$ac_t""NONE" 1>&6
2834   fi
2835 fi
2836
2837 xe_add_unique_runpath_dir='
2838   xe_add_p=yes
2839   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2840   done
2841   if test "$xe_add_p" = "yes"; then
2842     test -n "$runpath" && runpath="${runpath}:"
2843     runpath="${runpath}${xe_runpath_dir}"
2844     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2845   fi'
2846
2847
2848
2849
2850 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2851     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2852   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2853   
2854         runpath="" runpath_dirs=""
2855   if test -n "$LD_RUN_PATH"; then
2856     runpath="$LD_RUN_PATH"
2857   elif test "$GCC" = "yes"; then
2858         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2859     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2860     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2861     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2862       case "$arg" in P,* | -L* | -R* )
2863         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2864           {
2865 xe_runpath_dir="$dir"
2866   test "$xe_runpath_dir" != "/lib"     -a \
2867         "$xe_runpath_dir" != "/usr/lib" -a \
2868         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2869   eval "$xe_add_unique_runpath_dir"
2870 }
2871         done ;;
2872       esac
2873     done
2874     ld_switch_run="$ld_switch_run_save"
2875     rm -f conftest*
2876   else
2877         for arg in $ld_switch_site $ld_switch_x_site; do
2878       case "$arg" in -L*) {
2879 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
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 };; esac
2885     done
2886         if test "$opsys $need_motif" = "sol2 yes"; then
2887       xe_runpath_dir="/opt/SUNWdt/lib";
2888       eval "$xe_add_unique_runpath_dir";
2889     fi
2890   fi 
2891   if test -n "$runpath"; then
2892     ld_switch_run="${dash_r}${runpath}"
2893     
2894 if test "$GCC" = "yes"; then
2895   set x $ld_switch_run; shift; ld_switch_run=""
2896   while test -n "$1"; do
2897     case $1 in
2898       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2899       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2900       -Xlinker* ) ;;
2901       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2902     esac
2903     shift
2904   done
2905 fi
2906     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2907   fi
2908 fi
2909
2910
2911
2912
2913 GNU_MALLOC=yes
2914 if test "$with_dlmalloc" != "no"; then
2915         doug_lea_malloc=yes
2916 else
2917         doug_lea_malloc=no
2918 fi
2919 after_morecore_hook_exists=yes
2920 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2921 echo "configure:2922: checking for malloc_get_state" >&5
2922
2923 cat > conftest.$ac_ext <<EOF
2924 #line 2925 "configure"
2925 #include "confdefs.h"
2926 /* System header to define __stub macros and hopefully few prototypes,
2927     which can conflict with char malloc_get_state(); below.  */
2928 #include <assert.h>
2929 /* Override any gcc2 internal prototype to avoid an error.  */
2930 /* We use char because int might match the return type of a gcc2
2931     builtin and then its argument prototype would still apply.  */
2932 char malloc_get_state();
2933
2934 int main() {
2935
2936 /* The GNU C library defines this for functions which it implements
2937     to always fail with ENOSYS.  Some functions are actually named
2938     something starting with __ and the normal name is an alias.  */
2939 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2940 choke me
2941 #else
2942 malloc_get_state();
2943 #endif
2944
2945 ; return 0; }
2946 EOF
2947 if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2948   rm -rf conftest*
2949   eval "ac_cv_func_malloc_get_state=yes"
2950 else
2951   echo "configure: failed program was:" >&5
2952   cat conftest.$ac_ext >&5
2953   rm -rf conftest*
2954   eval "ac_cv_func_malloc_get_state=no"
2955 fi
2956 rm -f conftest*
2957
2958 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2959   echo "$ac_t""yes" 1>&6
2960   :
2961 else
2962   echo "$ac_t""no" 1>&6
2963 doug_lea_malloc=no
2964 fi
2965
2966 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2967 echo "configure:2968: checking for malloc_set_state" >&5
2968
2969 cat > conftest.$ac_ext <<EOF
2970 #line 2971 "configure"
2971 #include "confdefs.h"
2972 /* System header to define __stub macros and hopefully few prototypes,
2973     which can conflict with char malloc_set_state(); below.  */
2974 #include <assert.h>
2975 /* Override any gcc2 internal prototype to avoid an error.  */
2976 /* We use char because int might match the return type of a gcc2
2977     builtin and then its argument prototype would still apply.  */
2978 char malloc_set_state();
2979
2980 int main() {
2981
2982 /* The GNU C library defines this for functions which it implements
2983     to always fail with ENOSYS.  Some functions are actually named
2984     something starting with __ and the normal name is an alias.  */
2985 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
2986 choke me
2987 #else
2988 malloc_set_state();
2989 #endif
2990
2991 ; return 0; }
2992 EOF
2993 if { (eval echo configure:2994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2994   rm -rf conftest*
2995   eval "ac_cv_func_malloc_set_state=yes"
2996 else
2997   echo "configure: failed program was:" >&5
2998   cat conftest.$ac_ext >&5
2999   rm -rf conftest*
3000   eval "ac_cv_func_malloc_set_state=no"
3001 fi
3002 rm -f conftest*
3003
3004 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3005   echo "$ac_t""yes" 1>&6
3006   :
3007 else
3008   echo "$ac_t""no" 1>&6
3009 doug_lea_malloc=no
3010 fi
3011
3012 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3013 echo "configure:3014: checking whether __after_morecore_hook exists" >&5
3014 cat > conftest.$ac_ext <<EOF
3015 #line 3016 "configure"
3016 #include "confdefs.h"
3017 extern void (* __after_morecore_hook)();
3018 int main() {
3019 __after_morecore_hook = 0
3020 ; return 0; }
3021 EOF
3022 if { (eval echo configure:3023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3023   rm -rf conftest*
3024   echo "$ac_t""yes" 1>&6
3025 else
3026   echo "configure: failed program was:" >&5
3027   cat conftest.$ac_ext >&5
3028   rm -rf conftest*
3029   echo "$ac_t""no" 1>&6
3030    after_morecore_hook_exists=no
3031 fi
3032 rm -f conftest*
3033 if test "$system_malloc" = "yes" ; then
3034   GNU_MALLOC=no
3035   GNU_MALLOC_reason="
3036   (The GNU allocators don't work with this system configuration)."
3037 elif test "$with_system_malloc" = "yes" ; then
3038   GNU_MALLOC=no
3039   GNU_MALLOC_reason="
3040   (User chose not to use GNU allocators)."
3041 elif test "$with_debug_malloc" = "yes" ; then
3042   GNU_MALLOC=no
3043   GNU_MALLOC_reason="
3044   (User chose to use Debugging Malloc)."
3045 fi
3046
3047 if test "$doug_lea_malloc" = "yes" ; then
3048   if test "$GNU_MALLOC" = yes ; then
3049     GNU_MALLOC_reason="
3050   (Using Doug Lea's new malloc from the GNU C Library.)"
3051   fi
3052   { test "$extra_verbose" = "yes" && cat << \EOF
3053     Defining DOUG_LEA_MALLOC
3054 EOF
3055 cat >> confdefs.h <<\EOF
3056 #define DOUG_LEA_MALLOC 1
3057 EOF
3058 }
3059
3060   if test "$after_morecore_hook_exists" = "no" ; then
3061     GNU_MALLOC_reason="
3062   (Using Doug Lea's new malloc from the Linux C Library.)"
3063     { test "$extra_verbose" = "yes" && cat << \EOF
3064     Defining _NO_MALLOC_WARNING_
3065 EOF
3066 cat >> confdefs.h <<\EOF
3067 #define _NO_MALLOC_WARNING_ 1
3068 EOF
3069 }
3070
3071   fi
3072   use_minimal_tagbits=yes
3073 fi
3074
3075
3076
3077
3078 # Extract the first word of "ranlib", so it can be a program name with args.
3079 set dummy ranlib; ac_word=$2
3080 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3081 echo "configure:3082: checking for $ac_word" >&5
3082
3083 if test -n "$RANLIB"; then
3084   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3085 else
3086   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3087   ac_dummy="$PATH"
3088   for ac_dir in $ac_dummy; do
3089     test -z "$ac_dir" && ac_dir=.
3090     if test -f $ac_dir/$ac_word; then
3091       ac_cv_prog_RANLIB="ranlib"
3092       break
3093     fi
3094   done
3095   IFS="$ac_save_ifs"
3096   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3097 fi
3098 RANLIB="$ac_cv_prog_RANLIB"
3099 if test -n "$RANLIB"; then
3100   echo "$ac_t""$RANLIB" 1>&6
3101 else
3102   echo "$ac_t""no" 1>&6
3103 fi
3104
3105 ac_aux_dir=
3106 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3107   if test -f $ac_dir/install-sh; then
3108     ac_aux_dir=$ac_dir
3109     ac_install_sh="$ac_aux_dir/install-sh -c"
3110     break
3111   elif test -f $ac_dir/install.sh; then
3112     ac_aux_dir=$ac_dir
3113     ac_install_sh="$ac_aux_dir/install.sh -c"
3114     break
3115   fi
3116 done
3117 if test -z "$ac_aux_dir"; then
3118   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3119 fi
3120 ac_config_guess=$ac_aux_dir/config.guess
3121 ac_config_sub=$ac_aux_dir/config.sub
3122 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3123
3124 # Find a good install program.  We prefer a C program (faster),
3125 # so one script is as good as another.  But avoid the broken or
3126 # incompatible versions:
3127 # SysV /etc/install, /usr/sbin/install
3128 # SunOS /usr/etc/install
3129 # IRIX /sbin/install
3130 # AIX /bin/install
3131 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3132 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3133 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3134 # ./install, which can be erroneously created by make from ./install.sh.
3135 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3136 echo "configure:3137: checking for a BSD compatible install" >&5
3137 if test -z "$INSTALL"; then
3138
3139   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3140   for ac_dir in $PATH; do
3141     # Account for people who put trailing slashes in PATH elements.
3142     case "$ac_dir/" in
3143     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3144     *)
3145       # OSF1 and SCO ODT 3.0 have their own names for install.
3146       # Don't use installbsd from OSF since it installs stuff as root
3147       # by default.
3148       for ac_prog in ginstall scoinst install; do
3149         if test -f $ac_dir/$ac_prog; then
3150           if test $ac_prog = install &&
3151             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3152             # AIX install.  It has an incompatible calling convention.
3153             :
3154           else
3155             ac_cv_path_install="$ac_dir/$ac_prog -c"
3156             break 2
3157           fi
3158         fi
3159       done
3160       ;;
3161     esac
3162   done
3163   IFS="$ac_save_IFS"
3164
3165   if test "${ac_cv_path_install+set}" = set; then
3166     INSTALL="$ac_cv_path_install"
3167   else
3168     # As a last resort, use the slow shell script.  We don't cache a
3169     # path for INSTALL within a source directory, because that will
3170     # break other packages using the cache if that directory is
3171     # removed, or if the path is relative.
3172     INSTALL="$ac_install_sh"
3173   fi
3174 fi
3175 echo "$ac_t""$INSTALL" 1>&6
3176
3177 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3178 # It thinks the first close brace ends the variable substitution.
3179 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3180
3181 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3182
3183 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3184
3185 for ac_prog in 'bison -y' byacc
3186 do
3187 # Extract the first word of "$ac_prog", so it can be a program name with args.
3188 set dummy $ac_prog; ac_word=$2
3189 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3190 echo "configure:3191: checking for $ac_word" >&5
3191
3192 if test -n "$YACC"; then
3193   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3194 else
3195   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3196   ac_dummy="$PATH"
3197   for ac_dir in $ac_dummy; do
3198     test -z "$ac_dir" && ac_dir=.
3199     if test -f $ac_dir/$ac_word; then
3200       ac_cv_prog_YACC="$ac_prog"
3201       break
3202     fi
3203   done
3204   IFS="$ac_save_ifs"
3205 fi
3206 YACC="$ac_cv_prog_YACC"
3207 if test -n "$YACC"; then
3208   echo "$ac_t""$YACC" 1>&6
3209 else
3210   echo "$ac_t""no" 1>&6
3211 fi
3212
3213 test -n "$YACC" && break
3214 done
3215 test -n "$YACC" || YACC="yacc"
3216
3217
3218 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3219 do
3220 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3221 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3222 echo "configure:3223: checking for $ac_hdr" >&5
3223
3224 cat > conftest.$ac_ext <<EOF
3225 #line 3226 "configure"
3226 #include "confdefs.h"
3227 #include <$ac_hdr>
3228 EOF
3229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3230 { (eval echo configure:3231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3232 if test -z "$ac_err"; then
3233   rm -rf conftest*
3234   eval "ac_cv_header_$ac_safe=yes"
3235 else
3236   echo "$ac_err" >&5
3237   echo "configure: failed program was:" >&5
3238   cat conftest.$ac_ext >&5
3239   rm -rf conftest*
3240   eval "ac_cv_header_$ac_safe=no"
3241 fi
3242 rm -f conftest*
3243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3244   echo "$ac_t""yes" 1>&6
3245     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3246   { test "$extra_verbose" = "yes" && cat << EOF
3247     Defining $ac_tr_hdr
3248 EOF
3249 cat >> confdefs.h <<EOF
3250 #define $ac_tr_hdr 1
3251 EOF
3252 }
3253  
3254 else
3255   echo "$ac_t""no" 1>&6
3256 fi
3257 done
3258
3259 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3260 do
3261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3263 echo "configure:3264: checking for $ac_hdr" >&5
3264
3265 cat > conftest.$ac_ext <<EOF
3266 #line 3267 "configure"
3267 #include "confdefs.h"
3268 #include <$ac_hdr>
3269 EOF
3270 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3271 { (eval echo configure:3272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3272 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3273 if test -z "$ac_err"; then
3274   rm -rf conftest*
3275   eval "ac_cv_header_$ac_safe=yes"
3276 else
3277   echo "$ac_err" >&5
3278   echo "configure: failed program was:" >&5
3279   cat conftest.$ac_ext >&5
3280   rm -rf conftest*
3281   eval "ac_cv_header_$ac_safe=no"
3282 fi
3283 rm -f conftest*
3284 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3285   echo "$ac_t""yes" 1>&6
3286     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3287   { test "$extra_verbose" = "yes" && cat << EOF
3288     Defining $ac_tr_hdr
3289 EOF
3290 cat >> confdefs.h <<EOF
3291 #define $ac_tr_hdr 1
3292 EOF
3293 }
3294  
3295 else
3296   echo "$ac_t""no" 1>&6
3297 fi
3298 done
3299
3300 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3301 do
3302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3304 echo "configure:3305: checking for $ac_hdr" >&5
3305
3306 cat > conftest.$ac_ext <<EOF
3307 #line 3308 "configure"
3308 #include "confdefs.h"
3309 #include <$ac_hdr>
3310 EOF
3311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3312 { (eval echo configure:3313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3314 if test -z "$ac_err"; then
3315   rm -rf conftest*
3316   eval "ac_cv_header_$ac_safe=yes"
3317 else
3318   echo "$ac_err" >&5
3319   echo "configure: failed program was:" >&5
3320   cat conftest.$ac_ext >&5
3321   rm -rf conftest*
3322   eval "ac_cv_header_$ac_safe=no"
3323 fi
3324 rm -f conftest*
3325 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3326   echo "$ac_t""yes" 1>&6
3327     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3328   { test "$extra_verbose" = "yes" && cat << EOF
3329     Defining $ac_tr_hdr
3330 EOF
3331 cat >> confdefs.h <<EOF
3332 #define $ac_tr_hdr 1
3333 EOF
3334 }
3335  
3336 else
3337   echo "$ac_t""no" 1>&6
3338 fi
3339 done
3340
3341 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3342 echo "configure:3343: checking for sys/wait.h that is POSIX.1 compatible" >&5
3343
3344 cat > conftest.$ac_ext <<EOF
3345 #line 3346 "configure"
3346 #include "confdefs.h"
3347 #include <sys/types.h>
3348 #include <sys/wait.h>
3349 #ifndef WEXITSTATUS
3350 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3351 #endif
3352 #ifndef WIFEXITED
3353 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3354 #endif
3355 int main() {
3356 int s;
3357 wait (&s);
3358 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3359 ; return 0; }
3360 EOF
3361 if { (eval echo configure:3362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3362   rm -rf conftest*
3363   ac_cv_header_sys_wait_h=yes
3364 else
3365   echo "configure: failed program was:" >&5
3366   cat conftest.$ac_ext >&5
3367   rm -rf conftest*
3368   ac_cv_header_sys_wait_h=no
3369 fi
3370 rm -f conftest*
3371
3372 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3373 if test $ac_cv_header_sys_wait_h = yes; then
3374   { test "$extra_verbose" = "yes" && cat << \EOF
3375     Defining HAVE_SYS_WAIT_H
3376 EOF
3377 cat >> confdefs.h <<\EOF
3378 #define HAVE_SYS_WAIT_H 1
3379 EOF
3380 }
3381
3382 fi
3383
3384 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3385 echo "configure:3386: checking for ANSI C header files" >&5
3386
3387 cat > conftest.$ac_ext <<EOF
3388 #line 3389 "configure"
3389 #include "confdefs.h"
3390 #include <stdlib.h>
3391 #include <stdarg.h>
3392 #include <string.h>
3393 #include <float.h>
3394 EOF
3395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3396 { (eval echo configure:3397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3397 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3398 if test -z "$ac_err"; then
3399   rm -rf conftest*
3400   ac_cv_header_stdc=yes
3401 else
3402   echo "$ac_err" >&5
3403   echo "configure: failed program was:" >&5
3404   cat conftest.$ac_ext >&5
3405   rm -rf conftest*
3406   ac_cv_header_stdc=no
3407 fi
3408 rm -f conftest*
3409
3410 if test $ac_cv_header_stdc = yes; then
3411   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3412 cat > conftest.$ac_ext <<EOF
3413 #line 3414 "configure"
3414 #include "confdefs.h"
3415 #include <string.h>
3416 EOF
3417 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3418   egrep "memchr" >/dev/null 2>&1; then
3419   :
3420 else
3421   rm -rf conftest*
3422   ac_cv_header_stdc=no
3423 fi
3424 rm -f conftest*
3425
3426 fi
3427
3428 if test $ac_cv_header_stdc = yes; then
3429   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3430 cat > conftest.$ac_ext <<EOF
3431 #line 3432 "configure"
3432 #include "confdefs.h"
3433 #include <stdlib.h>
3434 EOF
3435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3436   egrep "free" >/dev/null 2>&1; then
3437   :
3438 else
3439   rm -rf conftest*
3440   ac_cv_header_stdc=no
3441 fi
3442 rm -f conftest*
3443
3444 fi
3445
3446 if test $ac_cv_header_stdc = yes; then
3447   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3448 cat > conftest.$ac_ext <<EOF
3449 #line 3450 "configure"
3450 #include "confdefs.h"
3451 #include <ctype.h>
3452 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3453 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3454 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3455 int main () { int i; for (i = 0; i < 256; i++)
3456 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3457 exit (0); }
3458
3459 EOF
3460 if { (eval echo configure:3461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3461 then
3462   :
3463 else
3464   conftest_rc="$?"
3465   echo "configure: failed program was:" >&5
3466   cat conftest.$ac_ext >&5
3467   rm -fr conftest*
3468   ac_cv_header_stdc=no
3469 fi
3470 rm -fr conftest*
3471 fi
3472
3473 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3474 if test $ac_cv_header_stdc = yes; then
3475   { test "$extra_verbose" = "yes" && cat << \EOF
3476     Defining STDC_HEADERS
3477 EOF
3478 cat >> confdefs.h <<\EOF
3479 #define STDC_HEADERS 1
3480 EOF
3481 }
3482
3483 fi
3484
3485 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3486 echo "configure:3487: checking whether time.h and sys/time.h may both be included" >&5
3487
3488 cat > conftest.$ac_ext <<EOF
3489 #line 3490 "configure"
3490 #include "confdefs.h"
3491 #include <sys/types.h>
3492 #include <sys/time.h>
3493 #include <time.h>
3494 int main() {
3495 struct tm *tp;
3496 ; return 0; }
3497 EOF
3498 if { (eval echo configure:3499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3499   rm -rf conftest*
3500   ac_cv_header_time=yes
3501 else
3502   echo "configure: failed program was:" >&5
3503   cat conftest.$ac_ext >&5
3504   rm -rf conftest*
3505   ac_cv_header_time=no
3506 fi
3507 rm -f conftest*
3508
3509 echo "$ac_t""$ac_cv_header_time" 1>&6
3510 if test $ac_cv_header_time = yes; then
3511   { test "$extra_verbose" = "yes" && cat << \EOF
3512     Defining TIME_WITH_SYS_TIME
3513 EOF
3514 cat >> confdefs.h <<\EOF
3515 #define TIME_WITH_SYS_TIME 1
3516 EOF
3517 }
3518
3519 fi
3520
3521 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3522 echo "configure:3523: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3523
3524 cat > conftest.$ac_ext <<EOF
3525 #line 3526 "configure"
3526 #include "confdefs.h"
3527 #include <sys/types.h>
3528 #include <signal.h>
3529 /* NetBSD declares sys_siglist in unistd.h.  */
3530 #ifdef HAVE_UNISTD_H
3531 #include <unistd.h>
3532 #endif
3533 int main() {
3534 char *msg = *(sys_siglist + 1);
3535 ; return 0; }
3536 EOF
3537 if { (eval echo configure:3538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3538   rm -rf conftest*
3539   ac_cv_decl_sys_siglist=yes
3540 else
3541   echo "configure: failed program was:" >&5
3542   cat conftest.$ac_ext >&5
3543   rm -rf conftest*
3544   ac_cv_decl_sys_siglist=no
3545 fi
3546 rm -f conftest*
3547
3548 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3549 if test $ac_cv_decl_sys_siglist = yes; then
3550   { test "$extra_verbose" = "yes" && cat << \EOF
3551     Defining SYS_SIGLIST_DECLARED
3552 EOF
3553 cat >> confdefs.h <<\EOF
3554 #define SYS_SIGLIST_DECLARED 1
3555 EOF
3556 }
3557
3558 fi
3559
3560
3561 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3562 echo "configure:3563: checking for struct utimbuf" >&5
3563 cat > conftest.$ac_ext <<EOF
3564 #line 3565 "configure"
3565 #include "confdefs.h"
3566 #ifdef TIME_WITH_SYS_TIME
3567 #include <sys/time.h>
3568 #include <time.h>
3569 #else
3570 #ifdef HAVE_SYS_TIME_H
3571 #include <sys/time.h>
3572 #else
3573 #include <time.h>
3574 #endif
3575 #endif
3576 #ifdef HAVE_UTIME_H
3577 #include <utime.h>
3578 #endif
3579 int main() {
3580 static struct utimbuf x; x.actime = x.modtime;
3581 ; return 0; }
3582 EOF
3583 if { (eval echo configure:3584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3584   rm -rf conftest*
3585   echo "$ac_t""yes" 1>&6
3586    { test "$extra_verbose" = "yes" && cat << \EOF
3587     Defining HAVE_STRUCT_UTIMBUF
3588 EOF
3589 cat >> confdefs.h <<\EOF
3590 #define HAVE_STRUCT_UTIMBUF 1
3591 EOF
3592 }
3593
3594 else
3595   echo "configure: failed program was:" >&5
3596   cat conftest.$ac_ext >&5
3597   rm -rf conftest*
3598   echo "$ac_t""no" 1>&6
3599 fi
3600 rm -f conftest*
3601
3602 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3603 echo "configure:3604: checking return type of signal handlers" >&5
3604
3605 cat > conftest.$ac_ext <<EOF
3606 #line 3607 "configure"
3607 #include "confdefs.h"
3608 #include <sys/types.h>
3609 #include <signal.h>
3610 #ifdef signal
3611 #undef signal
3612 #endif
3613 #ifdef __cplusplus
3614 extern "C" void (*signal (int, void (*)(int)))(int);
3615 #else
3616 void (*signal ()) ();
3617 #endif
3618
3619 int main() {
3620 int i;
3621 ; return 0; }
3622 EOF
3623 if { (eval echo configure:3624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3624   rm -rf conftest*
3625   ac_cv_type_signal=void
3626 else
3627   echo "configure: failed program was:" >&5
3628   cat conftest.$ac_ext >&5
3629   rm -rf conftest*
3630   ac_cv_type_signal=int
3631 fi
3632 rm -f conftest*
3633
3634 echo "$ac_t""$ac_cv_type_signal" 1>&6
3635 { test "$extra_verbose" = "yes" && cat << EOF
3636     Defining RETSIGTYPE = $ac_cv_type_signal
3637 EOF
3638 cat >> confdefs.h <<EOF
3639 #define RETSIGTYPE $ac_cv_type_signal
3640 EOF
3641 }
3642
3643
3644 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3645 echo "configure:3646: checking for size_t" >&5
3646
3647 cat > conftest.$ac_ext <<EOF
3648 #line 3649 "configure"
3649 #include "confdefs.h"
3650 #include <sys/types.h>
3651 #if STDC_HEADERS
3652 #include <stdlib.h>
3653 #include <stddef.h>
3654 #endif
3655 EOF
3656 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3657   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3658   rm -rf conftest*
3659   ac_cv_type_size_t=yes
3660 else
3661   rm -rf conftest*
3662   ac_cv_type_size_t=no
3663 fi
3664 rm -f conftest*
3665
3666 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3667 if test $ac_cv_type_size_t = no; then
3668   { test "$extra_verbose" = "yes" && cat << \EOF
3669     Defining size_t = unsigned
3670 EOF
3671 cat >> confdefs.h <<\EOF
3672 #define size_t unsigned
3673 EOF
3674 }
3675
3676 fi
3677
3678 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3679 echo "configure:3680: checking for pid_t" >&5
3680
3681 cat > conftest.$ac_ext <<EOF
3682 #line 3683 "configure"
3683 #include "confdefs.h"
3684 #include <sys/types.h>
3685 #if STDC_HEADERS
3686 #include <stdlib.h>
3687 #include <stddef.h>
3688 #endif
3689 EOF
3690 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3691   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3692   rm -rf conftest*
3693   ac_cv_type_pid_t=yes
3694 else
3695   rm -rf conftest*
3696   ac_cv_type_pid_t=no
3697 fi
3698 rm -f conftest*
3699
3700 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3701 if test $ac_cv_type_pid_t = no; then
3702   { test "$extra_verbose" = "yes" && cat << \EOF
3703     Defining pid_t = int
3704 EOF
3705 cat >> confdefs.h <<\EOF
3706 #define pid_t int
3707 EOF
3708 }
3709
3710 fi
3711
3712 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3713 echo "configure:3714: checking for uid_t in sys/types.h" >&5
3714
3715 cat > conftest.$ac_ext <<EOF
3716 #line 3717 "configure"
3717 #include "confdefs.h"
3718 #include <sys/types.h>
3719 EOF
3720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3721   egrep "uid_t" >/dev/null 2>&1; then
3722   rm -rf conftest*
3723   ac_cv_type_uid_t=yes
3724 else
3725   rm -rf conftest*
3726   ac_cv_type_uid_t=no
3727 fi
3728 rm -f conftest*
3729
3730
3731 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3732 if test $ac_cv_type_uid_t = no; then
3733   { test "$extra_verbose" = "yes" && cat << \EOF
3734     Defining uid_t = int
3735 EOF
3736 cat >> confdefs.h <<\EOF
3737 #define uid_t int
3738 EOF
3739 }
3740
3741   { test "$extra_verbose" = "yes" && cat << \EOF
3742     Defining gid_t = int
3743 EOF
3744 cat >> confdefs.h <<\EOF
3745 #define gid_t int
3746 EOF
3747 }
3748
3749 fi
3750
3751 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3752 echo "configure:3753: checking for mode_t" >&5
3753
3754 cat > conftest.$ac_ext <<EOF
3755 #line 3756 "configure"
3756 #include "confdefs.h"
3757 #include <sys/types.h>
3758 #if STDC_HEADERS
3759 #include <stdlib.h>
3760 #include <stddef.h>
3761 #endif
3762 EOF
3763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3764   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3765   rm -rf conftest*
3766   ac_cv_type_mode_t=yes
3767 else
3768   rm -rf conftest*
3769   ac_cv_type_mode_t=no
3770 fi
3771 rm -f conftest*
3772
3773 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3774 if test $ac_cv_type_mode_t = no; then
3775   { test "$extra_verbose" = "yes" && cat << \EOF
3776     Defining mode_t = int
3777 EOF
3778 cat >> confdefs.h <<\EOF
3779 #define mode_t int
3780 EOF
3781 }
3782
3783 fi
3784
3785 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3786 echo "configure:3787: checking for off_t" >&5
3787
3788 cat > conftest.$ac_ext <<EOF
3789 #line 3790 "configure"
3790 #include "confdefs.h"
3791 #include <sys/types.h>
3792 #if STDC_HEADERS
3793 #include <stdlib.h>
3794 #include <stddef.h>
3795 #endif
3796 EOF
3797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3798   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3799   rm -rf conftest*
3800   ac_cv_type_off_t=yes
3801 else
3802   rm -rf conftest*
3803   ac_cv_type_off_t=no
3804 fi
3805 rm -f conftest*
3806
3807 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3808 if test $ac_cv_type_off_t = no; then
3809   { test "$extra_verbose" = "yes" && cat << \EOF
3810     Defining off_t = long
3811 EOF
3812 cat >> confdefs.h <<\EOF
3813 #define off_t long
3814 EOF
3815 }
3816
3817 fi
3818
3819 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3820 echo "configure:3821: checking for ssize_t" >&5
3821
3822 cat > conftest.$ac_ext <<EOF
3823 #line 3824 "configure"
3824 #include "confdefs.h"
3825 #include <sys/types.h>
3826 #if STDC_HEADERS
3827 #include <stdlib.h>
3828 #include <stddef.h>
3829 #endif
3830 EOF
3831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3832   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3833   rm -rf conftest*
3834   ac_cv_type_ssize_t=yes
3835 else
3836   rm -rf conftest*
3837   ac_cv_type_ssize_t=no
3838 fi
3839 rm -f conftest*
3840
3841 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3842 if test $ac_cv_type_ssize_t = no; then
3843   { test "$extra_verbose" = "yes" && cat << \EOF
3844     Defining ssize_t = int
3845 EOF
3846 cat >> confdefs.h <<\EOF
3847 #define ssize_t int
3848 EOF
3849 }
3850
3851 fi
3852
3853
3854 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3855 echo "configure:3856: checking for struct timeval" >&5
3856 cat > conftest.$ac_ext <<EOF
3857 #line 3858 "configure"
3858 #include "confdefs.h"
3859 #ifdef TIME_WITH_SYS_TIME
3860 #include <sys/time.h>
3861 #include <time.h>
3862 #else
3863 #ifdef HAVE_SYS_TIME_H
3864 #include <sys/time.h>
3865 #else
3866 #include <time.h>
3867 #endif
3868 #endif
3869 int main() {
3870 static struct timeval x; x.tv_sec = x.tv_usec;
3871 ; return 0; }
3872 EOF
3873 if { (eval echo configure:3874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3874   rm -rf conftest*
3875   echo "$ac_t""yes" 1>&6
3876   HAVE_TIMEVAL=yes
3877   { test "$extra_verbose" = "yes" && cat << \EOF
3878     Defining HAVE_TIMEVAL
3879 EOF
3880 cat >> confdefs.h <<\EOF
3881 #define HAVE_TIMEVAL 1
3882 EOF
3883 }
3884
3885 else
3886   echo "configure: failed program was:" >&5
3887   cat conftest.$ac_ext >&5
3888   rm -rf conftest*
3889   echo "$ac_t""no" 1>&6
3890    HAVE_TIMEVAL=no
3891 fi
3892 rm -f conftest*
3893
3894 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3895 echo "configure:3896: checking whether struct tm is in sys/time.h or time.h" >&5
3896
3897 cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3900 #include <sys/types.h>
3901 #include <time.h>
3902 int main() {
3903 struct tm *tp; tp->tm_sec;
3904 ; return 0; }
3905 EOF
3906 if { (eval echo configure:3907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3907   rm -rf conftest*
3908   ac_cv_struct_tm=time.h
3909 else
3910   echo "configure: failed program was:" >&5
3911   cat conftest.$ac_ext >&5
3912   rm -rf conftest*
3913   ac_cv_struct_tm=sys/time.h
3914 fi
3915 rm -f conftest*
3916
3917 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3918 if test $ac_cv_struct_tm = sys/time.h; then
3919   { test "$extra_verbose" = "yes" && cat << \EOF
3920     Defining TM_IN_SYS_TIME
3921 EOF
3922 cat >> confdefs.h <<\EOF
3923 #define TM_IN_SYS_TIME 1
3924 EOF
3925 }
3926
3927 fi
3928
3929 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3930 echo "configure:3931: checking for tm_zone in struct tm" >&5
3931
3932 cat > conftest.$ac_ext <<EOF
3933 #line 3934 "configure"
3934 #include "confdefs.h"
3935 #include <sys/types.h>
3936 #include <$ac_cv_struct_tm>
3937 int main() {
3938 struct tm tm; tm.tm_zone;
3939 ; return 0; }
3940 EOF
3941 if { (eval echo configure:3942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3942   rm -rf conftest*
3943   ac_cv_struct_tm_zone=yes
3944 else
3945   echo "configure: failed program was:" >&5
3946   cat conftest.$ac_ext >&5
3947   rm -rf conftest*
3948   ac_cv_struct_tm_zone=no
3949 fi
3950 rm -f conftest*
3951
3952 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3953 if test "$ac_cv_struct_tm_zone" = yes; then
3954   { test "$extra_verbose" = "yes" && cat << \EOF
3955     Defining HAVE_TM_ZONE
3956 EOF
3957 cat >> confdefs.h <<\EOF
3958 #define HAVE_TM_ZONE 1
3959 EOF
3960 }
3961
3962 else
3963   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3964 echo "configure:3965: checking for tzname" >&5
3965
3966 cat > conftest.$ac_ext <<EOF
3967 #line 3968 "configure"
3968 #include "confdefs.h"
3969 #include <time.h>
3970 #ifndef tzname /* For SGI.  */
3971 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3972 #endif
3973 int main() {
3974 atoi(*tzname);
3975 ; return 0; }
3976 EOF
3977 if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3978   rm -rf conftest*
3979   ac_cv_var_tzname=yes
3980 else
3981   echo "configure: failed program was:" >&5
3982   cat conftest.$ac_ext >&5
3983   rm -rf conftest*
3984   ac_cv_var_tzname=no
3985 fi
3986 rm -f conftest*
3987
3988 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3989   if test $ac_cv_var_tzname = yes; then
3990     { test "$extra_verbose" = "yes" && cat << \EOF
3991     Defining HAVE_TZNAME
3992 EOF
3993 cat >> confdefs.h <<\EOF
3994 #define HAVE_TZNAME 1
3995 EOF
3996 }
3997
3998   fi
3999 fi
4000
4001
4002 echo $ac_n "checking for working const""... $ac_c" 1>&6
4003 echo "configure:4004: checking for working const" >&5
4004
4005 cat > conftest.$ac_ext <<EOF
4006 #line 4007 "configure"
4007 #include "confdefs.h"
4008
4009 int main() {
4010
4011 /* Ultrix mips cc rejects this.  */
4012 typedef int charset[2]; const charset x;
4013 /* SunOS 4.1.1 cc rejects this.  */
4014 char const *const *ccp;
4015 char **p;
4016 /* NEC SVR4.0.2 mips cc rejects this.  */
4017 struct point {int x, y;};
4018 static struct point const zero = {0,0};
4019 /* AIX XL C 1.02.0.0 rejects this.
4020    It does not let you subtract one const X* pointer from another in an arm
4021    of an if-expression whose if-part is not a constant expression */
4022 const char *g = "string";
4023 ccp = &g + (g ? g-g : 0);
4024 /* HPUX 7.0 cc rejects these. */
4025 ++ccp;
4026 p = (char**) ccp;
4027 ccp = (char const *const *) p;
4028 { /* SCO 3.2v4 cc rejects this.  */
4029   char *t;
4030   char const *s = 0 ? (char *) 0 : (char const *) 0;
4031
4032   *t++ = 0;
4033 }
4034 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4035   int x[] = {25, 17};
4036   const int *foo = &x[0];
4037   ++foo;
4038 }
4039 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4040   typedef const int *iptr;
4041   iptr p = 0;
4042   ++p;
4043 }
4044 { /* AIX XL C 1.02.0.0 rejects this saying
4045      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4046   struct s { int j; const int *ap[3]; };
4047   struct s *b; b->j = 5;
4048 }
4049 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4050   const int foo = 10;
4051 }
4052
4053 ; return 0; }
4054 EOF
4055 if { (eval echo configure:4056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4056   rm -rf conftest*
4057   ac_cv_c_const=yes
4058 else
4059   echo "configure: failed program was:" >&5
4060   cat conftest.$ac_ext >&5
4061   rm -rf conftest*
4062   ac_cv_c_const=no
4063 fi
4064 rm -f conftest*
4065
4066 echo "$ac_t""$ac_cv_c_const" 1>&6
4067 if test $ac_cv_c_const = no; then
4068   { test "$extra_verbose" = "yes" && cat << \EOF
4069     Defining const = 
4070 EOF
4071 cat >> confdefs.h <<\EOF
4072 #define const 
4073 EOF
4074 }
4075
4076 fi
4077
4078
4079 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4080 echo "configure:4081: checking whether ${MAKE-make} sets \${MAKE}" >&5
4081 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4082
4083 cat > conftestmake <<\EOF
4084 all:
4085         @echo 'ac_maketemp="${MAKE}"'
4086 EOF
4087 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4088 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4089 if test -n "$ac_maketemp"; then
4090   eval ac_cv_prog_make_${ac_make}_set=yes
4091 else
4092   eval ac_cv_prog_make_${ac_make}_set=no
4093 fi
4094 rm -f conftestmake
4095 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4096   echo "$ac_t""yes" 1>&6
4097   SET_MAKE=
4098 else
4099   echo "$ac_t""no" 1>&6
4100   SET_MAKE="MAKE=${MAKE-make}"
4101 fi
4102
4103
4104 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4105 echo "configure:4106: checking whether byte ordering is bigendian" >&5
4106
4107 ac_cv_c_bigendian=unknown
4108 # See if sys/param.h defines the BYTE_ORDER macro.
4109 cat > conftest.$ac_ext <<EOF
4110 #line 4111 "configure"
4111 #include "confdefs.h"
4112 #include <sys/types.h>
4113 #include <sys/param.h>
4114 int main() {
4115
4116 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4117  bogus endian macros
4118 #endif
4119 ; return 0; }
4120 EOF
4121 if { (eval echo configure:4122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4122   rm -rf conftest*
4123   # It does; now see whether it defined to BIG_ENDIAN or not.
4124 cat > conftest.$ac_ext <<EOF
4125 #line 4126 "configure"
4126 #include "confdefs.h"
4127 #include <sys/types.h>
4128 #include <sys/param.h>
4129 int main() {
4130
4131 #if BYTE_ORDER != BIG_ENDIAN
4132  not big endian
4133 #endif
4134 ; return 0; }
4135 EOF
4136 if { (eval echo configure:4137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4137   rm -rf conftest*
4138   ac_cv_c_bigendian=yes
4139 else
4140   echo "configure: failed program was:" >&5
4141   cat conftest.$ac_ext >&5
4142   rm -rf conftest*
4143   ac_cv_c_bigendian=no
4144 fi
4145 rm -f conftest*
4146 else
4147   echo "configure: failed program was:" >&5
4148   cat conftest.$ac_ext >&5
4149 fi
4150 rm -f conftest*
4151 if test $ac_cv_c_bigendian = unknown; then
4152 cat > conftest.$ac_ext <<EOF
4153 #line 4154 "configure"
4154 #include "confdefs.h"
4155 main () {
4156   /* Are we little or big endian?  From Harbison&Steele.  */
4157   union
4158   {
4159     long l;
4160     char c[sizeof (long)];
4161   } u;
4162   u.l = 1;
4163   exit (u.c[sizeof (long) - 1] == 1);
4164 }
4165 EOF
4166 if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4167 then
4168   ac_cv_c_bigendian=no
4169 else
4170   conftest_rc="$?"
4171   echo "configure: failed program was:" >&5
4172   cat conftest.$ac_ext >&5
4173   rm -fr conftest*
4174   ac_cv_c_bigendian=yes
4175 fi
4176 rm -fr conftest*
4177 fi
4178
4179 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4180 if test $ac_cv_c_bigendian = yes; then
4181   { test "$extra_verbose" = "yes" && cat << \EOF
4182     Defining WORDS_BIGENDIAN
4183 EOF
4184 cat >> confdefs.h <<\EOF
4185 #define WORDS_BIGENDIAN 1
4186 EOF
4187 }
4188
4189 fi
4190
4191
4192 echo $ac_n "checking size of short""... $ac_c" 1>&6
4193 echo "configure:4194: checking size of short" >&5
4194
4195 cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198 #include <stdio.h>
4199 main()
4200 {
4201   FILE *f=fopen("conftestval", "w");
4202   if (!f) exit(1);
4203   fprintf(f, "%d\n", sizeof(short));
4204   exit(0);
4205 }
4206 EOF
4207 if { (eval echo configure:4208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4208 then
4209   ac_cv_sizeof_short=`cat conftestval`
4210 else
4211   conftest_rc="$?"
4212   echo "configure: failed program was:" >&5
4213   cat conftest.$ac_ext >&5
4214   rm -fr conftest*
4215   ac_cv_sizeof_short=0
4216 fi
4217 rm -fr conftest*
4218 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4219 { test "$extra_verbose" = "yes" && cat << EOF
4220     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4221 EOF
4222 cat >> confdefs.h <<EOF
4223 #define SIZEOF_SHORT $ac_cv_sizeof_short
4224 EOF
4225 }
4226
4227
4228 if test "$ac_cv_sizeof_short" = 0; then
4229   echo ""
4230   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4231   echo "*** PANIC *** Please examine config.log for compilation errors."
4232   exit 1
4233 fi
4234 echo $ac_n "checking size of int""... $ac_c" 1>&6
4235 echo "configure:4236: checking size of int" >&5
4236
4237 cat > conftest.$ac_ext <<EOF
4238 #line 4239 "configure"
4239 #include "confdefs.h"
4240 #include <stdio.h>
4241 main()
4242 {
4243   FILE *f=fopen("conftestval", "w");
4244   if (!f) exit(1);
4245   fprintf(f, "%d\n", sizeof(int));
4246   exit(0);
4247 }
4248 EOF
4249 if { (eval echo configure:4250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4250 then
4251   ac_cv_sizeof_int=`cat conftestval`
4252 else
4253   conftest_rc="$?"
4254   echo "configure: failed program was:" >&5
4255   cat conftest.$ac_ext >&5
4256   rm -fr conftest*
4257   ac_cv_sizeof_int=0
4258 fi
4259 rm -fr conftest*
4260 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4261 { test "$extra_verbose" = "yes" && cat << EOF
4262     Defining SIZEOF_INT = $ac_cv_sizeof_int
4263 EOF
4264 cat >> confdefs.h <<EOF
4265 #define SIZEOF_INT $ac_cv_sizeof_int
4266 EOF
4267 }
4268
4269
4270 echo $ac_n "checking size of long""... $ac_c" 1>&6
4271 echo "configure:4272: checking size of long" >&5
4272
4273 cat > conftest.$ac_ext <<EOF
4274 #line 4275 "configure"
4275 #include "confdefs.h"
4276 #include <stdio.h>
4277 main()
4278 {
4279   FILE *f=fopen("conftestval", "w");
4280   if (!f) exit(1);
4281   fprintf(f, "%d\n", sizeof(long));
4282   exit(0);
4283 }
4284 EOF
4285 if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4286 then
4287   ac_cv_sizeof_long=`cat conftestval`
4288 else
4289   conftest_rc="$?"
4290   echo "configure: failed program was:" >&5
4291   cat conftest.$ac_ext >&5
4292   rm -fr conftest*
4293   ac_cv_sizeof_long=0
4294 fi
4295 rm -fr conftest*
4296 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4297 { test "$extra_verbose" = "yes" && cat << EOF
4298     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4299 EOF
4300 cat >> confdefs.h <<EOF
4301 #define SIZEOF_LONG $ac_cv_sizeof_long
4302 EOF
4303 }
4304
4305
4306 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4307 echo "configure:4308: checking size of long long" >&5
4308
4309 cat > conftest.$ac_ext <<EOF
4310 #line 4311 "configure"
4311 #include "confdefs.h"
4312 #include <stdio.h>
4313 main()
4314 {
4315   FILE *f=fopen("conftestval", "w");
4316   if (!f) exit(1);
4317   fprintf(f, "%d\n", sizeof(long long));
4318   exit(0);
4319 }
4320 EOF
4321 if { (eval echo configure:4322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4322 then
4323   ac_cv_sizeof_long_long=`cat conftestval`
4324 else
4325   conftest_rc="$?"
4326   echo "configure: failed program was:" >&5
4327   cat conftest.$ac_ext >&5
4328   rm -fr conftest*
4329   ac_cv_sizeof_long_long=0
4330 fi
4331 rm -fr conftest*
4332 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4333 { test "$extra_verbose" = "yes" && cat << EOF
4334     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4335 EOF
4336 cat >> confdefs.h <<EOF
4337 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4338 EOF
4339 }
4340
4341
4342 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4343 echo "configure:4344: checking size of void *" >&5
4344
4345 cat > conftest.$ac_ext <<EOF
4346 #line 4347 "configure"
4347 #include "confdefs.h"
4348 #include <stdio.h>
4349 main()
4350 {
4351   FILE *f=fopen("conftestval", "w");
4352   if (!f) exit(1);
4353   fprintf(f, "%d\n", sizeof(void *));
4354   exit(0);
4355 }
4356 EOF
4357 if { (eval echo configure:4358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4358 then
4359   ac_cv_sizeof_void_p=`cat conftestval`
4360 else
4361   conftest_rc="$?"
4362   echo "configure: failed program was:" >&5
4363   cat conftest.$ac_ext >&5
4364   rm -fr conftest*
4365   ac_cv_sizeof_void_p=0
4366 fi
4367 rm -fr conftest*
4368 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4369 { test "$extra_verbose" = "yes" && cat << EOF
4370     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4371 EOF
4372 cat >> confdefs.h <<EOF
4373 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4374 EOF
4375 }
4376
4377
4378
4379 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4380 echo "configure:4381: checking for long file names" >&5
4381
4382 ac_cv_sys_long_file_names=yes
4383 # Test for long file names in all the places we know might matter:
4384 #      .                the current directory, where building will happen
4385 #      $prefix/lib      where we will be installing things
4386 #      $exec_prefix/lib likewise
4387 # eval it to expand exec_prefix.
4388 #      $TMPDIR          if set, where it might want to write temporary files
4389 # if $TMPDIR is not set:
4390 #      /tmp             where it might want to write temporary files
4391 #      /var/tmp         likewise
4392 #      /usr/tmp         likewise
4393 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4394   ac_tmpdirs="$TMPDIR"
4395 else
4396   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4397 fi
4398 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4399   test -d $ac_dir || continue
4400   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4401   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4402   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4403   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4404   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4405     ac_cv_sys_long_file_names=no
4406     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4407     break
4408   fi
4409   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4410 done
4411
4412 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4413 if test $ac_cv_sys_long_file_names = yes; then
4414   { test "$extra_verbose" = "yes" && cat << \EOF
4415     Defining HAVE_LONG_FILE_NAMES
4416 EOF
4417 cat >> confdefs.h <<\EOF
4418 #define HAVE_LONG_FILE_NAMES 1
4419 EOF
4420 }
4421
4422 fi
4423
4424
4425 echo $ac_n "checking for sin""... $ac_c" 1>&6
4426 echo "configure:4427: checking for sin" >&5
4427
4428 cat > conftest.$ac_ext <<EOF
4429 #line 4430 "configure"
4430 #include "confdefs.h"
4431 /* System header to define __stub macros and hopefully few prototypes,
4432     which can conflict with char sin(); below.  */
4433 #include <assert.h>
4434 /* Override any gcc2 internal prototype to avoid an error.  */
4435 /* We use char because int might match the return type of a gcc2
4436     builtin and then its argument prototype would still apply.  */
4437 char sin();
4438
4439 int main() {
4440
4441 /* The GNU C library defines this for functions which it implements
4442     to always fail with ENOSYS.  Some functions are actually named
4443     something starting with __ and the normal name is an alias.  */
4444 #if defined (__stub_sin) || defined (__stub___sin)
4445 choke me
4446 #else
4447 sin();
4448 #endif
4449
4450 ; return 0; }
4451 EOF
4452 if { (eval echo configure:4453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4453   rm -rf conftest*
4454   eval "ac_cv_func_sin=yes"
4455 else
4456   echo "configure: failed program was:" >&5
4457   cat conftest.$ac_ext >&5
4458   rm -rf conftest*
4459   eval "ac_cv_func_sin=no"
4460 fi
4461 rm -f conftest*
4462
4463 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4464   echo "$ac_t""yes" 1>&6
4465   :
4466 else
4467   echo "$ac_t""no" 1>&6
4468
4469 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4470 echo "configure:4471: checking for sin in -lm" >&5
4471 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4472
4473 xe_check_libs=" -lm "
4474 cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477 /* Override any gcc2 internal prototype to avoid an error.  */
4478 /* We use char because int might match the return type of a gcc2
4479     builtin and then its argument prototype would still apply.  */
4480 char sin();
4481
4482 int main() {
4483 sin()
4484 ; return 0; }
4485 EOF
4486 if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4487   rm -rf conftest*
4488   eval "ac_cv_lib_$ac_lib_var=yes"
4489 else
4490   echo "configure: failed program was:" >&5
4491   cat conftest.$ac_ext >&5
4492   rm -rf conftest*
4493   eval "ac_cv_lib_$ac_lib_var=no"
4494 fi
4495 rm -f conftest*
4496 xe_check_libs=""
4497
4498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4499   echo "$ac_t""yes" 1>&6
4500     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4501     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4502   { test "$extra_verbose" = "yes" && cat << EOF
4503     Defining $ac_tr_lib
4504 EOF
4505 cat >> confdefs.h <<EOF
4506 #define $ac_tr_lib 1
4507 EOF
4508 }
4509
4510   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4511
4512 else
4513   echo "$ac_t""no" 1>&6
4514 fi
4515
4516
4517 fi
4518
4519
4520 { test "$extra_verbose" = "yes" && cat << \EOF
4521     Defining LISP_FLOAT_TYPE
4522 EOF
4523 cat >> confdefs.h <<\EOF
4524 #define LISP_FLOAT_TYPE 1
4525 EOF
4526 }
4527
4528
4529 cat > conftest.$ac_ext <<EOF
4530 #line 4531 "configure"
4531 #include "confdefs.h"
4532 #include <math.h>
4533 int main() {
4534 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4535 ; return 0; }
4536 EOF
4537 if { (eval echo configure:4538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4538   rm -rf conftest*
4539   { test "$extra_verbose" = "yes" && cat << \EOF
4540     Defining HAVE_INVERSE_HYPERBOLIC
4541 EOF
4542 cat >> confdefs.h <<\EOF
4543 #define HAVE_INVERSE_HYPERBOLIC 1
4544 EOF
4545 }
4546
4547 else
4548   echo "configure: failed program was:" >&5
4549   cat conftest.$ac_ext >&5
4550 fi
4551 rm -f conftest*
4552
4553 echo "checking type of mail spool file locking" 1>&6
4554 echo "configure:4555: checking type of mail spool file locking" >&5
4555 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4556 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4557 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4558     Defining REAL_MAIL_USE_LOCKF
4559 EOF
4560 cat >> confdefs.h <<\EOF
4561 #define REAL_MAIL_USE_LOCKF 1
4562 EOF
4563 }
4564
4565 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4566     Defining REAL_MAIL_USE_FLOCK
4567 EOF
4568 cat >> confdefs.h <<\EOF
4569 #define REAL_MAIL_USE_FLOCK 1
4570 EOF
4571 }
4572
4573 else mail_locking="dot-locking"
4574 fi
4575
4576 case "$opsys" in decosf*)
4577   
4578 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4579 echo "configure:4580: checking for cma_open in -lpthreads" >&5
4580 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4581
4582 xe_check_libs=" -lpthreads "
4583 cat > conftest.$ac_ext <<EOF
4584 #line 4585 "configure"
4585 #include "confdefs.h"
4586 /* Override any gcc2 internal prototype to avoid an error.  */
4587 /* We use char because int might match the return type of a gcc2
4588     builtin and then its argument prototype would still apply.  */
4589 char cma_open();
4590
4591 int main() {
4592 cma_open()
4593 ; return 0; }
4594 EOF
4595 if { (eval echo configure:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4596   rm -rf conftest*
4597   eval "ac_cv_lib_$ac_lib_var=yes"
4598 else
4599   echo "configure: failed program was:" >&5
4600   cat conftest.$ac_ext >&5
4601   rm -rf conftest*
4602   eval "ac_cv_lib_$ac_lib_var=no"
4603 fi
4604 rm -f conftest*
4605 xe_check_libs=""
4606
4607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4608   echo "$ac_t""yes" 1>&6
4609     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4610     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4611   { test "$extra_verbose" = "yes" && cat << EOF
4612     Defining $ac_tr_lib
4613 EOF
4614 cat >> confdefs.h <<EOF
4615 #define $ac_tr_lib 1
4616 EOF
4617 }
4618
4619   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4620
4621 else
4622   echo "$ac_t""no" 1>&6
4623 fi
4624
4625
4626   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4627     c_switch_site="$c_switch_site -threads" ;;
4628 esac
4629
4630 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4631 echo "configure:4632: checking whether the -xildoff compiler flag is required" >&5
4632 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4633   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4634     then echo "$ac_t""no" 1>&6;
4635     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
4636   fi
4637   else echo "$ac_t""no" 1>&6
4638 fi
4639
4640 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4641   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4642 echo "configure:4643: checking for \"-z ignore\" linker flag" >&5
4643   case "`ld -h 2>&1`" in
4644     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4645       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4646     *) echo "$ac_t""no" 1>&6 ;;
4647   esac
4648 fi
4649
4650
4651 echo "checking "for specified window system"" 1>&6
4652 echo "configure:4653: checking "for specified window system"" >&5
4653
4654 if test "$with_x11" != "no"; then
4655     test "$x_includes $x_libraries" != "NONE NONE" && \
4656    window_system=x11 with_x11=yes
4657
4658         
4659       if test "$x_includes $x_libraries" = "NONE NONE" \
4660     -a -n "$OPENWINHOME" \
4661     -a "$OPENWINHOME" != "/usr/openwin" \
4662     -a -d "$OPENWINHOME"; then
4663       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4664       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4665       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4666   fi
4667
4668   if test "$x_includes" = "NONE"; then
4669                     for dir in "/usr/X11" "/usr/X11R6"; do
4670       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4671     done
4672   fi
4673
4674   if test "$x_libraries" = "NONE"; then
4675     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4676       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4677     done
4678   fi
4679
4680   # If we find X, set shell vars x_includes and x_libraries to the
4681 # paths, otherwise set no_x=yes.
4682 # Uses ac_ vars as temps to allow command line to override cache and checks.
4683 # --without-x overrides everything else, but does not touch the cache.
4684 echo $ac_n "checking for X""... $ac_c" 1>&6
4685 echo "configure:4686: checking for X" >&5
4686
4687 # Check whether --with-x or --without-x was given.
4688 if test "${with_x+set}" = set; then
4689   withval="$with_x"
4690   :
4691 fi
4692
4693 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4694 if test "x$with_x" = xno; then
4695   # The user explicitly disabled X.
4696   have_x=disabled
4697 else
4698   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4699     # Both variables are already set.
4700     have_x=yes
4701   else
4702
4703 # One or both of the vars are not set, and there is no cached value.
4704 ac_x_includes=NO ac_x_libraries=NO
4705 rm -fr conftestdir
4706 if mkdir conftestdir; then
4707   cd conftestdir
4708   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4709   cat > Imakefile <<'EOF'
4710 acfindx:
4711         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4712 EOF
4713   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4714     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4715     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4716     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4717     for ac_extension in a so sl; do
4718       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4719         test -f $ac_im_libdir/libX11.$ac_extension; then
4720         ac_im_usrlibdir=$ac_im_libdir; break
4721       fi
4722     done
4723     # Screen out bogus values from the imake configuration.  They are
4724     # bogus both because they are the default anyway, and because
4725     # using them would break gcc on systems where it needs fixed includes.
4726     case "$ac_im_incroot" in
4727         /usr/include) ;;
4728         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4729     esac
4730     case "$ac_im_usrlibdir" in
4731         /usr/lib | /lib) ;;
4732         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4733     esac
4734   fi
4735   cd ..
4736   rm -fr conftestdir
4737 fi
4738
4739 if test "$ac_x_includes" = NO; then
4740   # Guess where to find include files, by looking for this one X11 .h file.
4741   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4742
4743   # First, try using that file with no special directory specified.
4744 cat > conftest.$ac_ext <<EOF
4745 #line 4746 "configure"
4746 #include "confdefs.h"
4747 #include <$x_direct_test_include>
4748 EOF
4749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4750 { (eval echo configure:4751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4752 if test -z "$ac_err"; then
4753   rm -rf conftest*
4754   # We can compile using X headers with no special include directory.
4755 ac_x_includes=
4756 else
4757   echo "$ac_err" >&5
4758   echo "configure: failed program was:" >&5
4759   cat conftest.$ac_ext >&5
4760   rm -rf conftest*
4761   # Look for the header file in a standard set of common directories.
4762 # Check X11 before X11Rn because it is often a symlink to the current release.
4763   for ac_dir in               \
4764     /usr/X11/include          \
4765     /usr/X11R6/include        \
4766     /usr/X11R5/include        \
4767     /usr/X11R4/include        \
4768                               \
4769     /usr/include/X11          \
4770     /usr/include/X11R6        \
4771     /usr/include/X11R5        \
4772     /usr/include/X11R4        \
4773                               \
4774     /usr/local/X11/include    \
4775     /usr/local/X11R6/include  \
4776     /usr/local/X11R5/include  \
4777     /usr/local/X11R4/include  \
4778                               \
4779     /usr/local/include/X11    \
4780     /usr/local/include/X11R6  \
4781     /usr/local/include/X11R5  \
4782     /usr/local/include/X11R4  \
4783                               \
4784     /usr/X386/include         \
4785     /usr/x386/include         \
4786     /usr/XFree86/include/X11  \
4787                               \
4788     /usr/include              \
4789     /usr/local/include        \
4790     /usr/unsupported/include  \
4791     /usr/athena/include       \
4792     /usr/local/x11r5/include  \
4793     /usr/lpp/Xamples/include  \
4794                               \
4795     /usr/openwin/include      \
4796     /usr/openwin/share/include \
4797     ; \
4798   do
4799     if test -r "$ac_dir/$x_direct_test_include"; then
4800       ac_x_includes=$ac_dir
4801       break
4802     fi
4803   done
4804 fi
4805 rm -f conftest*
4806 fi # $ac_x_includes = NO
4807
4808 if test "$ac_x_libraries" = NO; then
4809   # Check for the libraries.
4810
4811   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4812   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4813
4814   # See if we find them without any special options.
4815   # Don't add to $LIBS permanently.
4816   ac_save_LIBS="$LIBS"
4817   LIBS="-l$x_direct_test_library $LIBS"
4818 cat > conftest.$ac_ext <<EOF
4819 #line 4820 "configure"
4820 #include "confdefs.h"
4821
4822 int main() {
4823 ${x_direct_test_function}()
4824 ; return 0; }
4825 EOF
4826 if { (eval echo configure:4827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4827   rm -rf conftest*
4828   LIBS="$ac_save_LIBS"
4829 # We can link X programs with no special library path.
4830 ac_x_libraries=
4831 else
4832   echo "configure: failed program was:" >&5
4833   cat conftest.$ac_ext >&5
4834   rm -rf conftest*
4835   LIBS="$ac_save_LIBS"
4836 # First see if replacing the include by lib works.
4837 # Check X11 before X11Rn because it is often a symlink to the current release.
4838 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4839     /usr/X11/lib          \
4840     /usr/X11R6/lib        \
4841     /usr/X11R5/lib        \
4842     /usr/X11R4/lib        \
4843                           \
4844     /usr/lib/X11          \
4845     /usr/lib/X11R6        \
4846     /usr/lib/X11R5        \
4847     /usr/lib/X11R4        \
4848                           \
4849     /usr/local/X11/lib    \
4850     /usr/local/X11R6/lib  \
4851     /usr/local/X11R5/lib  \
4852     /usr/local/X11R4/lib  \
4853                           \
4854     /usr/local/lib/X11    \
4855     /usr/local/lib/X11R6  \
4856     /usr/local/lib/X11R5  \
4857     /usr/local/lib/X11R4  \
4858                           \
4859     /usr/X386/lib         \
4860     /usr/x386/lib         \
4861     /usr/XFree86/lib/X11  \
4862                           \
4863     /usr/lib              \
4864     /usr/local/lib        \
4865     /usr/unsupported/lib  \
4866     /usr/athena/lib       \
4867     /usr/local/x11r5/lib  \
4868     /usr/lpp/Xamples/lib  \
4869     /lib/usr/lib/X11      \
4870                           \
4871     /usr/openwin/lib      \
4872     /usr/openwin/share/lib \
4873     ; \
4874 do
4875   for ac_extension in a so sl; do
4876     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4877       ac_x_libraries=$ac_dir
4878       break 2
4879     fi
4880   done
4881 done
4882 fi
4883 rm -f conftest*
4884 fi # $ac_x_libraries = NO
4885
4886 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4887   # Didn't find X anywhere.  Cache the known absence of X.
4888   ac_cv_have_x="have_x=no"
4889 else
4890   # Record where we found X for the cache.
4891   ac_cv_have_x="have_x=yes \
4892                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4893 fi
4894   fi
4895   eval "$ac_cv_have_x"
4896 fi # $with_x != no
4897
4898 if test "$have_x" != yes; then
4899   echo "$ac_t""$have_x" 1>&6
4900   no_x=yes
4901 else
4902   # If each of the values was on the command line, it overrides each guess.
4903   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4904   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4905   # Update the cache value to reflect the command line values.
4906   ac_cv_have_x="have_x=yes \
4907                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4908   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4909 fi
4910
4911 if test "$no_x" = yes; then
4912   # Not all programs may use this symbol, but it does not hurt to define it.
4913   { test "$extra_verbose" = "yes" && cat << \EOF
4914     Defining X_DISPLAY_MISSING
4915 EOF
4916 cat >> confdefs.h <<\EOF
4917 #define X_DISPLAY_MISSING 1
4918 EOF
4919 }
4920
4921   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4922 else
4923   if test -n "$x_includes"; then
4924     X_CFLAGS="$X_CFLAGS -I$x_includes"
4925   fi
4926
4927   # It would also be nice to do this for all -L options, not just this one.
4928   if test -n "$x_libraries"; then
4929     X_LIBS="$X_LIBS -L$x_libraries"
4930     # For Solaris; some versions of Sun CC require a space after -R and
4931     # others require no space.  Words are not sufficient . . . .
4932     case "`(uname -sr) 2>/dev/null`" in
4933     "SunOS 5"*)
4934       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4935 echo "configure:4936: checking whether -R must be followed by a space" >&5
4936       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4937       cat > conftest.$ac_ext <<EOF
4938 #line 4939 "configure"
4939 #include "confdefs.h"
4940
4941 int main() {
4942
4943 ; return 0; }
4944 EOF
4945 if { (eval echo configure:4946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4946   rm -rf conftest*
4947   ac_R_nospace=yes
4948 else
4949   echo "configure: failed program was:" >&5
4950   cat conftest.$ac_ext >&5
4951   rm -rf conftest*
4952   ac_R_nospace=no
4953 fi
4954 rm -f conftest*
4955       if test $ac_R_nospace = yes; then
4956         echo "$ac_t""no" 1>&6
4957         X_LIBS="$X_LIBS -R$x_libraries"
4958       else
4959         LIBS="$ac_xsave_LIBS -R $x_libraries"
4960         cat > conftest.$ac_ext <<EOF
4961 #line 4962 "configure"
4962 #include "confdefs.h"
4963
4964 int main() {
4965
4966 ; return 0; }
4967 EOF
4968 if { (eval echo configure:4969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4969   rm -rf conftest*
4970   ac_R_space=yes
4971 else
4972   echo "configure: failed program was:" >&5
4973   cat conftest.$ac_ext >&5
4974   rm -rf conftest*
4975   ac_R_space=no
4976 fi
4977 rm -f conftest*
4978         if test $ac_R_space = yes; then
4979           echo "$ac_t""yes" 1>&6
4980           X_LIBS="$X_LIBS -R $x_libraries"
4981         else
4982           echo "$ac_t""neither works" 1>&6
4983         fi
4984       fi
4985       LIBS="$ac_xsave_LIBS"
4986     esac
4987   fi
4988
4989   # Check for system-dependent libraries X programs must link with.
4990   # Do this before checking for the system-independent R6 libraries
4991   # (-lICE), since we may need -lsocket or whatever for X linking.
4992
4993   if test "$ISC" = yes; then
4994     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4995   else
4996     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4997     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4998     # the Alpha needs dnet_stub (dnet does not exist).
4999     if test "$with_dnet" = "no" ; then
5000 ac_cv_lib_dnet_dnet_ntoa=no
5001 else
5002
5003 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5004 echo "configure:5005: checking for dnet_ntoa in -ldnet" >&5
5005 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5006
5007 xe_check_libs=" -ldnet "
5008 cat > conftest.$ac_ext <<EOF
5009 #line 5010 "configure"
5010 #include "confdefs.h"
5011 /* Override any gcc2 internal prototype to avoid an error.  */
5012 /* We use char because int might match the return type of a gcc2
5013     builtin and then its argument prototype would still apply.  */
5014 char dnet_ntoa();
5015
5016 int main() {
5017 dnet_ntoa()
5018 ; return 0; }
5019 EOF
5020 if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5021   rm -rf conftest*
5022   eval "ac_cv_lib_$ac_lib_var=yes"
5023 else
5024   echo "configure: failed program was:" >&5
5025   cat conftest.$ac_ext >&5
5026   rm -rf conftest*
5027   eval "ac_cv_lib_$ac_lib_var=no"
5028 fi
5029 rm -f conftest*
5030 xe_check_libs=""
5031
5032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5033   echo "$ac_t""yes" 1>&6
5034   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5035 else
5036   echo "$ac_t""no" 1>&6
5037 fi
5038
5039 fi
5040
5041     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5042       
5043 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5044 echo "configure:5045: checking for dnet_ntoa in -ldnet_stub" >&5
5045 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5046
5047 xe_check_libs=" -ldnet_stub "
5048 cat > conftest.$ac_ext <<EOF
5049 #line 5050 "configure"
5050 #include "confdefs.h"
5051 /* Override any gcc2 internal prototype to avoid an error.  */
5052 /* We use char because int might match the return type of a gcc2
5053     builtin and then its argument prototype would still apply.  */
5054 char dnet_ntoa();
5055
5056 int main() {
5057 dnet_ntoa()
5058 ; return 0; }
5059 EOF
5060 if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5061   rm -rf conftest*
5062   eval "ac_cv_lib_$ac_lib_var=yes"
5063 else
5064   echo "configure: failed program was:" >&5
5065   cat conftest.$ac_ext >&5
5066   rm -rf conftest*
5067   eval "ac_cv_lib_$ac_lib_var=no"
5068 fi
5069 rm -f conftest*
5070 xe_check_libs=""
5071
5072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5073   echo "$ac_t""yes" 1>&6
5074   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5075 else
5076   echo "$ac_t""no" 1>&6
5077 fi
5078
5079
5080     fi
5081
5082     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5083     # to get the SysV transport functions.
5084     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5085     # needs -lnsl.
5086     # The nsl library prevents programs from opening the X display
5087     # on Irix 5.2, according to dickey@clark.net.
5088     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5089 echo "configure:5090: checking for gethostbyname" >&5
5090
5091 cat > conftest.$ac_ext <<EOF
5092 #line 5093 "configure"
5093 #include "confdefs.h"
5094 /* System header to define __stub macros and hopefully few prototypes,
5095     which can conflict with char gethostbyname(); below.  */
5096 #include <assert.h>
5097 /* Override any gcc2 internal prototype to avoid an error.  */
5098 /* We use char because int might match the return type of a gcc2
5099     builtin and then its argument prototype would still apply.  */
5100 char gethostbyname();
5101
5102 int main() {
5103
5104 /* The GNU C library defines this for functions which it implements
5105     to always fail with ENOSYS.  Some functions are actually named
5106     something starting with __ and the normal name is an alias.  */
5107 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5108 choke me
5109 #else
5110 gethostbyname();
5111 #endif
5112
5113 ; return 0; }
5114 EOF
5115 if { (eval echo configure:5116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5116   rm -rf conftest*
5117   eval "ac_cv_func_gethostbyname=yes"
5118 else
5119   echo "configure: failed program was:" >&5
5120   cat conftest.$ac_ext >&5
5121   rm -rf conftest*
5122   eval "ac_cv_func_gethostbyname=no"
5123 fi
5124 rm -f conftest*
5125
5126 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5127   echo "$ac_t""yes" 1>&6
5128   :
5129 else
5130   echo "$ac_t""no" 1>&6
5131 fi
5132
5133     if test $ac_cv_func_gethostbyname = no; then
5134       
5135 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5136 echo "configure:5137: checking for gethostbyname in -lnsl" >&5
5137 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5138
5139 xe_check_libs=" -lnsl "
5140 cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5143 /* Override any gcc2 internal prototype to avoid an error.  */
5144 /* We use char because int might match the return type of a gcc2
5145     builtin and then its argument prototype would still apply.  */
5146 char gethostbyname();
5147
5148 int main() {
5149 gethostbyname()
5150 ; return 0; }
5151 EOF
5152 if { (eval echo configure:5153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5153   rm -rf conftest*
5154   eval "ac_cv_lib_$ac_lib_var=yes"
5155 else
5156   echo "configure: failed program was:" >&5
5157   cat conftest.$ac_ext >&5
5158   rm -rf conftest*
5159   eval "ac_cv_lib_$ac_lib_var=no"
5160 fi
5161 rm -f conftest*
5162 xe_check_libs=""
5163
5164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5165   echo "$ac_t""yes" 1>&6
5166   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5167 else
5168   echo "$ac_t""no" 1>&6
5169 fi
5170
5171
5172     fi
5173
5174     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5175     # socket/setsockopt and other routines are undefined under SCO ODT
5176     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5177     # on later versions), says simon@lia.di.epfl.ch: it contains
5178     # gethostby* variants that don't use the nameserver (or something).
5179     # -lsocket must be given before -lnsl if both are needed.
5180     # We assume that if connect needs -lnsl, so does gethostbyname.
5181     echo $ac_n "checking for connect""... $ac_c" 1>&6
5182 echo "configure:5183: checking for connect" >&5
5183
5184 cat > conftest.$ac_ext <<EOF
5185 #line 5186 "configure"
5186 #include "confdefs.h"
5187 /* System header to define __stub macros and hopefully few prototypes,
5188     which can conflict with char connect(); below.  */
5189 #include <assert.h>
5190 /* Override any gcc2 internal prototype to avoid an error.  */
5191 /* We use char because int might match the return type of a gcc2
5192     builtin and then its argument prototype would still apply.  */
5193 char connect();
5194
5195 int main() {
5196
5197 /* The GNU C library defines this for functions which it implements
5198     to always fail with ENOSYS.  Some functions are actually named
5199     something starting with __ and the normal name is an alias.  */
5200 #if defined (__stub_connect) || defined (__stub___connect)
5201 choke me
5202 #else
5203 connect();
5204 #endif
5205
5206 ; return 0; }
5207 EOF
5208 if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5209   rm -rf conftest*
5210   eval "ac_cv_func_connect=yes"
5211 else
5212   echo "configure: failed program was:" >&5
5213   cat conftest.$ac_ext >&5
5214   rm -rf conftest*
5215   eval "ac_cv_func_connect=no"
5216 fi
5217 rm -f conftest*
5218
5219 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5220   echo "$ac_t""yes" 1>&6
5221   :
5222 else
5223   echo "$ac_t""no" 1>&6
5224 fi
5225
5226     if test $ac_cv_func_connect = no; then
5227       
5228 xe_msg_checking="for connect in -lsocket"
5229 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5230 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5231 echo "configure:5232: checking "$xe_msg_checking"" >&5
5232 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5233
5234 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5235 cat > conftest.$ac_ext <<EOF
5236 #line 5237 "configure"
5237 #include "confdefs.h"
5238 /* Override any gcc2 internal prototype to avoid an error.  */
5239 /* We use char because int might match the return type of a gcc2
5240     builtin and then its argument prototype would still apply.  */
5241 char connect();
5242
5243 int main() {
5244 connect()
5245 ; return 0; }
5246 EOF
5247 if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5248   rm -rf conftest*
5249   eval "ac_cv_lib_$ac_lib_var=yes"
5250 else
5251   echo "configure: failed program was:" >&5
5252   cat conftest.$ac_ext >&5
5253   rm -rf conftest*
5254   eval "ac_cv_lib_$ac_lib_var=no"
5255 fi
5256 rm -f conftest*
5257 xe_check_libs=""
5258
5259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5260   echo "$ac_t""yes" 1>&6
5261   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5262 else
5263   echo "$ac_t""no" 1>&6
5264 fi
5265
5266
5267     fi
5268
5269     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5270     echo $ac_n "checking for remove""... $ac_c" 1>&6
5271 echo "configure:5272: checking for remove" >&5
5272
5273 cat > conftest.$ac_ext <<EOF
5274 #line 5275 "configure"
5275 #include "confdefs.h"
5276 /* System header to define __stub macros and hopefully few prototypes,
5277     which can conflict with char remove(); below.  */
5278 #include <assert.h>
5279 /* Override any gcc2 internal prototype to avoid an error.  */
5280 /* We use char because int might match the return type of a gcc2
5281     builtin and then its argument prototype would still apply.  */
5282 char remove();
5283
5284 int main() {
5285
5286 /* The GNU C library defines this for functions which it implements
5287     to always fail with ENOSYS.  Some functions are actually named
5288     something starting with __ and the normal name is an alias.  */
5289 #if defined (__stub_remove) || defined (__stub___remove)
5290 choke me
5291 #else
5292 remove();
5293 #endif
5294
5295 ; return 0; }
5296 EOF
5297 if { (eval echo configure:5298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5298   rm -rf conftest*
5299   eval "ac_cv_func_remove=yes"
5300 else
5301   echo "configure: failed program was:" >&5
5302   cat conftest.$ac_ext >&5
5303   rm -rf conftest*
5304   eval "ac_cv_func_remove=no"
5305 fi
5306 rm -f conftest*
5307
5308 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5309   echo "$ac_t""yes" 1>&6
5310   :
5311 else
5312   echo "$ac_t""no" 1>&6
5313 fi
5314
5315     if test $ac_cv_func_remove = no; then
5316       
5317 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5318 echo "configure:5319: checking for remove in -lposix" >&5
5319 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5320
5321 xe_check_libs=" -lposix "
5322 cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325 /* Override any gcc2 internal prototype to avoid an error.  */
5326 /* We use char because int might match the return type of a gcc2
5327     builtin and then its argument prototype would still apply.  */
5328 char remove();
5329
5330 int main() {
5331 remove()
5332 ; return 0; }
5333 EOF
5334 if { (eval echo configure:5335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5335   rm -rf conftest*
5336   eval "ac_cv_lib_$ac_lib_var=yes"
5337 else
5338   echo "configure: failed program was:" >&5
5339   cat conftest.$ac_ext >&5
5340   rm -rf conftest*
5341   eval "ac_cv_lib_$ac_lib_var=no"
5342 fi
5343 rm -f conftest*
5344 xe_check_libs=""
5345
5346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5347   echo "$ac_t""yes" 1>&6
5348   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5349 else
5350   echo "$ac_t""no" 1>&6
5351 fi
5352
5353
5354     fi
5355
5356     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5357     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5358 echo "configure:5359: checking for shmat" >&5
5359
5360 cat > conftest.$ac_ext <<EOF
5361 #line 5362 "configure"
5362 #include "confdefs.h"
5363 /* System header to define __stub macros and hopefully few prototypes,
5364     which can conflict with char shmat(); below.  */
5365 #include <assert.h>
5366 /* Override any gcc2 internal prototype to avoid an error.  */
5367 /* We use char because int might match the return type of a gcc2
5368     builtin and then its argument prototype would still apply.  */
5369 char shmat();
5370
5371 int main() {
5372
5373 /* The GNU C library defines this for functions which it implements
5374     to always fail with ENOSYS.  Some functions are actually named
5375     something starting with __ and the normal name is an alias.  */
5376 #if defined (__stub_shmat) || defined (__stub___shmat)
5377 choke me
5378 #else
5379 shmat();
5380 #endif
5381
5382 ; return 0; }
5383 EOF
5384 if { (eval echo configure:5385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5385   rm -rf conftest*
5386   eval "ac_cv_func_shmat=yes"
5387 else
5388   echo "configure: failed program was:" >&5
5389   cat conftest.$ac_ext >&5
5390   rm -rf conftest*
5391   eval "ac_cv_func_shmat=no"
5392 fi
5393 rm -f conftest*
5394
5395 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5396   echo "$ac_t""yes" 1>&6
5397   :
5398 else
5399   echo "$ac_t""no" 1>&6
5400 fi
5401
5402     if test $ac_cv_func_shmat = no; then
5403       
5404 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5405 echo "configure:5406: checking for shmat in -lipc" >&5
5406 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5407
5408 xe_check_libs=" -lipc "
5409 cat > conftest.$ac_ext <<EOF
5410 #line 5411 "configure"
5411 #include "confdefs.h"
5412 /* Override any gcc2 internal prototype to avoid an error.  */
5413 /* We use char because int might match the return type of a gcc2
5414     builtin and then its argument prototype would still apply.  */
5415 char shmat();
5416
5417 int main() {
5418 shmat()
5419 ; return 0; }
5420 EOF
5421 if { (eval echo configure:5422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5422   rm -rf conftest*
5423   eval "ac_cv_lib_$ac_lib_var=yes"
5424 else
5425   echo "configure: failed program was:" >&5
5426   cat conftest.$ac_ext >&5
5427   rm -rf conftest*
5428   eval "ac_cv_lib_$ac_lib_var=no"
5429 fi
5430 rm -f conftest*
5431 xe_check_libs=""
5432
5433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5434   echo "$ac_t""yes" 1>&6
5435   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5436 else
5437   echo "$ac_t""no" 1>&6
5438 fi
5439
5440
5441     fi
5442   fi
5443
5444   # Check for libraries that X11R6 Xt/Xaw programs need.
5445   ac_save_LDFLAGS="$LDFLAGS"
5446   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5447   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5448   # check for ICE first), but we must link in the order -lSM -lICE or
5449   # we get undefined symbols.  So assume we have SM if we have ICE.
5450   # These have to be linked with before -lX11, unlike the other
5451   # libraries we check for below, so use a different variable.
5452   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5453   
5454 xe_msg_checking="for IceConnectionNumber in -lICE"
5455 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5456 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5457 echo "configure:5458: checking "$xe_msg_checking"" >&5
5458 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5459
5460 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5461 cat > conftest.$ac_ext <<EOF
5462 #line 5463 "configure"
5463 #include "confdefs.h"
5464 /* Override any gcc2 internal prototype to avoid an error.  */
5465 /* We use char because int might match the return type of a gcc2
5466     builtin and then its argument prototype would still apply.  */
5467 char IceConnectionNumber();
5468
5469 int main() {
5470 IceConnectionNumber()
5471 ; return 0; }
5472 EOF
5473 if { (eval echo configure:5474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5474   rm -rf conftest*
5475   eval "ac_cv_lib_$ac_lib_var=yes"
5476 else
5477   echo "configure: failed program was:" >&5
5478   cat conftest.$ac_ext >&5
5479   rm -rf conftest*
5480   eval "ac_cv_lib_$ac_lib_var=no"
5481 fi
5482 rm -f conftest*
5483 xe_check_libs=""
5484
5485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5486   echo "$ac_t""yes" 1>&6
5487   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5488 else
5489   echo "$ac_t""no" 1>&6
5490 fi
5491
5492
5493   LDFLAGS="$ac_save_LDFLAGS"
5494
5495 fi
5496  # Autoconf claims to find X library and include dirs for us.
5497   if test "$no_x" = "yes"
5498   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5499   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5500   fi
5501 fi
5502
5503 case "$with_x11" in
5504   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5505   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5506 esac
5507
5508 if test "$with_x11" = "yes"; then
5509   { test "$extra_verbose" = "yes" && cat << \EOF
5510     Defining HAVE_X_WINDOWS
5511 EOF
5512 cat >> confdefs.h <<\EOF
5513 #define HAVE_X_WINDOWS 1
5514 EOF
5515 }
5516
5517   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5518   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5519
5520       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5521     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5522     if test -d "$lib_dir" -a -d "$inc_dir"; then
5523       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5524         x_libraries="$lib_dir $x_libraries"
5525         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5526       esac
5527       case "$x_includes" in "$inc_dir"* ) ;; *)
5528         x_includes="$inc_dir $x_includes"
5529         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5530       esac
5531       break;       fi
5532   done
5533
5534     for rel in "X11R6" "X11R5" "X11R4"; do
5535     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5536     if test -d "$lib_dir" -a -d "$inc_dir"; then
5537       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5538         x_libraries="$x_libraries $lib_dir"
5539         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5540       esac
5541       case "$x_includes" in "$inc_dir"* ) ;; *)
5542         x_includes="$x_includes $inc_dir"
5543         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5544       esac
5545       break;     fi
5546   done
5547
5548     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
5549
5550   ld_switch_x_site="$X_LIBS"
5551
5552   
5553 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5554     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5555   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5556   
5557         runpath="" runpath_dirs=""
5558   if test -n "$LD_RUN_PATH"; then
5559     runpath="$LD_RUN_PATH"
5560   elif test "$GCC" = "yes"; then
5561         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5562     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5563     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5564     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5565       case "$arg" in P,* | -L* | -R* )
5566         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5567           {
5568 xe_runpath_dir="$dir"
5569   test "$xe_runpath_dir" != "/lib"     -a \
5570         "$xe_runpath_dir" != "/usr/lib" -a \
5571         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5572   eval "$xe_add_unique_runpath_dir"
5573 }
5574         done ;;
5575       esac
5576     done
5577     ld_switch_run="$ld_switch_run_save"
5578     rm -f conftest*
5579   else
5580         for arg in $ld_switch_site $ld_switch_x_site; do
5581       case "$arg" in -L*) {
5582 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
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 };; esac
5588     done
5589         if test "$opsys $need_motif" = "sol2 yes"; then
5590       xe_runpath_dir="/opt/SUNWdt/lib";
5591       eval "$xe_add_unique_runpath_dir";
5592     fi
5593   fi 
5594   if test -n "$runpath"; then
5595     ld_switch_run="${dash_r}${runpath}"
5596     
5597 if test "$GCC" = "yes"; then
5598   set x $ld_switch_run; shift; ld_switch_run=""
5599   while test -n "$1"; do
5600     case $1 in
5601       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5602       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5603       -Xlinker* ) ;;
5604       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5605     esac
5606     shift
5607   done
5608 fi
5609     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5610   fi
5611 fi
5612
5613
5614   if test "$extra_verbose" = "yes"; then
5615     echo; echo "X11 compilation variables:"
5616     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5617     echo
5618   fi
5619
5620             bitmapdirs=
5621   if test "$x_includes" != NONE; then
5622     for i in $x_includes; do
5623       if test -d "$i/bitmaps"; then
5624         bitmapdirs="$i/bitmaps:$bitmapdirs"
5625       fi
5626       if test -d "$i/X11/bitmaps"; then
5627         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5628       fi
5629     done
5630     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5631   fi
5632   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5633     Defining BITMAPDIR = "$bitmapdirs"
5634 EOF
5635 cat >> confdefs.h <<EOF
5636 #define BITMAPDIR "$bitmapdirs"
5637 EOF
5638 }
5639
5640
5641     echo "checking for X defines extracted by xmkmf" 1>&6
5642 echo "configure:5643: checking for X defines extracted by xmkmf" >&5
5643   rm -fr conftestdir
5644   if mkdir conftestdir; then
5645     cd conftestdir
5646     cat > Imakefile <<'EOF'
5647 xetest:
5648         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5649 EOF
5650     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5651       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5652       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5653     fi
5654     cd ..
5655     rm -fr conftestdir
5656     for word in $xmkmf_defines; do
5657       case "$word" in
5658         -D*=* ) ;;
5659         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5660               { test "$extra_verbose" = "yes" && cat << EOF
5661     Defining $word
5662 EOF
5663 cat >> confdefs.h <<EOF
5664 #define $word 1
5665 EOF
5666 }
5667  ;;
5668       esac
5669     done
5670   fi
5671
5672     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5673 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5674 echo "configure:5675: checking for X11/Intrinsic.h" >&5
5675
5676 cat > conftest.$ac_ext <<EOF
5677 #line 5678 "configure"
5678 #include "confdefs.h"
5679 #include <X11/Intrinsic.h>
5680 EOF
5681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5682 { (eval echo configure:5683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5684 if test -z "$ac_err"; then
5685   rm -rf conftest*
5686   eval "ac_cv_header_$ac_safe=yes"
5687 else
5688   echo "$ac_err" >&5
5689   echo "configure: failed program was:" >&5
5690   cat conftest.$ac_ext >&5
5691   rm -rf conftest*
5692   eval "ac_cv_header_$ac_safe=no"
5693 fi
5694 rm -f conftest*
5695 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5696   echo "$ac_t""yes" 1>&6
5697   :
5698 else
5699   echo "$ac_t""no" 1>&6
5700 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5701 fi
5702
5703
5704       
5705 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5706 echo "configure:5707: checking for XOpenDisplay in -lX11" >&5
5707 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5708
5709 xe_check_libs=" -lX11 "
5710 cat > conftest.$ac_ext <<EOF
5711 #line 5712 "configure"
5712 #include "confdefs.h"
5713 /* Override any gcc2 internal prototype to avoid an error.  */
5714 /* We use char because int might match the return type of a gcc2
5715     builtin and then its argument prototype would still apply.  */
5716 char XOpenDisplay();
5717
5718 int main() {
5719 XOpenDisplay()
5720 ; return 0; }
5721 EOF
5722 if { (eval echo configure:5723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5723   rm -rf conftest*
5724   eval "ac_cv_lib_$ac_lib_var=yes"
5725 else
5726   echo "configure: failed program was:" >&5
5727   cat conftest.$ac_ext >&5
5728   rm -rf conftest*
5729   eval "ac_cv_lib_$ac_lib_var=no"
5730 fi
5731 rm -f conftest*
5732 xe_check_libs=""
5733
5734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5735   echo "$ac_t""yes" 1>&6
5736   have_lib_x11=yes
5737 else
5738   echo "$ac_t""no" 1>&6
5739 fi
5740
5741
5742   if test "$have_lib_x11" != "yes"; then
5743     
5744 xe_msg_checking="for XGetFontProperty in -lX11"
5745 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5746 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5747 echo "configure:5748: checking "$xe_msg_checking"" >&5
5748 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5749
5750 xe_check_libs=" -lX11 -b i486-linuxaout"
5751 cat > conftest.$ac_ext <<EOF
5752 #line 5753 "configure"
5753 #include "confdefs.h"
5754 /* Override any gcc2 internal prototype to avoid an error.  */
5755 /* We use char because int might match the return type of a gcc2
5756     builtin and then its argument prototype would still apply.  */
5757 char XGetFontProperty();
5758
5759 int main() {
5760 XGetFontProperty()
5761 ; return 0; }
5762 EOF
5763 if { (eval echo configure:5764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5764   rm -rf conftest*
5765   eval "ac_cv_lib_$ac_lib_var=yes"
5766 else
5767   echo "configure: failed program was:" >&5
5768   cat conftest.$ac_ext >&5
5769   rm -rf conftest*
5770   eval "ac_cv_lib_$ac_lib_var=no"
5771 fi
5772 rm -f conftest*
5773 xe_check_libs=""
5774
5775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5776   echo "$ac_t""yes" 1>&6
5777   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5778 else
5779   echo "$ac_t""no" 1>&6
5780 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5781 fi
5782
5783
5784   fi
5785   libs_x="-lX11"
5786   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5787
5788     
5789 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5790 echo "configure:5791: checking for XShapeSelectInput in -lXext" >&5
5791 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5792
5793 xe_check_libs=" -lXext "
5794 cat > conftest.$ac_ext <<EOF
5795 #line 5796 "configure"
5796 #include "confdefs.h"
5797 /* Override any gcc2 internal prototype to avoid an error.  */
5798 /* We use char because int might match the return type of a gcc2
5799     builtin and then its argument prototype would still apply.  */
5800 char XShapeSelectInput();
5801
5802 int main() {
5803 XShapeSelectInput()
5804 ; return 0; }
5805 EOF
5806 if { (eval echo configure:5807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5807   rm -rf conftest*
5808   eval "ac_cv_lib_$ac_lib_var=yes"
5809 else
5810   echo "configure: failed program was:" >&5
5811   cat conftest.$ac_ext >&5
5812   rm -rf conftest*
5813   eval "ac_cv_lib_$ac_lib_var=no"
5814 fi
5815 rm -f conftest*
5816 xe_check_libs=""
5817
5818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5819   echo "$ac_t""yes" 1>&6
5820   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5821 else
5822   echo "$ac_t""no" 1>&6
5823 fi
5824
5825
5826
5827     
5828 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5829 echo "configure:5830: checking for XtOpenDisplay in -lXt" >&5
5830 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5831
5832 xe_check_libs=" -lXt "
5833 cat > conftest.$ac_ext <<EOF
5834 #line 5835 "configure"
5835 #include "confdefs.h"
5836 /* Override any gcc2 internal prototype to avoid an error.  */
5837 /* We use char because int might match the return type of a gcc2
5838     builtin and then its argument prototype would still apply.  */
5839 char XtOpenDisplay();
5840
5841 int main() {
5842 XtOpenDisplay()
5843 ; return 0; }
5844 EOF
5845 if { (eval echo configure:5846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5846   rm -rf conftest*
5847   eval "ac_cv_lib_$ac_lib_var=yes"
5848 else
5849   echo "configure: failed program was:" >&5
5850   cat conftest.$ac_ext >&5
5851   rm -rf conftest*
5852   eval "ac_cv_lib_$ac_lib_var=no"
5853 fi
5854 rm -f conftest*
5855 xe_check_libs=""
5856
5857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5858   echo "$ac_t""yes" 1>&6
5859   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5860 else
5861   echo "$ac_t""no" 1>&6
5862 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5863 fi
5864
5865
5866
5867   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5868 echo "configure:5869: checking the version of X11 being used" >&5
5869   cat > conftest.$ac_ext <<EOF
5870 #line 5871 "configure"
5871 #include "confdefs.h"
5872 #include <X11/Intrinsic.h>
5873     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5874 EOF
5875 if { (eval echo configure:5876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5876 then
5877   ./conftest foobar; x11_release=$?
5878 else
5879   conftest_rc="$?"
5880   echo "configure: failed program was:" >&5
5881   cat conftest.$ac_ext >&5
5882   rm -fr conftest*
5883   x11_release=4
5884 fi
5885 rm -fr conftest*
5886   echo "$ac_t""R${x11_release}" 1>&6
5887   { test "$extra_verbose" = "yes" && cat << EOF
5888     Defining THIS_IS_X11R${x11_release}
5889 EOF
5890 cat >> confdefs.h <<EOF
5891 #define THIS_IS_X11R${x11_release} 1
5892 EOF
5893 }
5894
5895
5896   for ac_hdr in X11/Xlocale.h
5897 do
5898 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5899 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5900 echo "configure:5901: checking for $ac_hdr" >&5
5901
5902 cat > conftest.$ac_ext <<EOF
5903 #line 5904 "configure"
5904 #include "confdefs.h"
5905 #include <$ac_hdr>
5906 EOF
5907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5908 { (eval echo configure:5909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5910 if test -z "$ac_err"; then
5911   rm -rf conftest*
5912   eval "ac_cv_header_$ac_safe=yes"
5913 else
5914   echo "$ac_err" >&5
5915   echo "configure: failed program was:" >&5
5916   cat conftest.$ac_ext >&5
5917   rm -rf conftest*
5918   eval "ac_cv_header_$ac_safe=no"
5919 fi
5920 rm -f conftest*
5921 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5922   echo "$ac_t""yes" 1>&6
5923     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5924   { test "$extra_verbose" = "yes" && cat << EOF
5925     Defining $ac_tr_hdr
5926 EOF
5927 cat >> confdefs.h <<EOF
5928 #define $ac_tr_hdr 1
5929 EOF
5930 }
5931  
5932 else
5933   echo "$ac_t""no" 1>&6
5934 fi
5935 done
5936
5937
5938     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5939 echo "configure:5940: checking for XFree86" >&5
5940   if test -d "/usr/X386/include" -o \
5941           -f "/etc/XF86Config"    -o \
5942           -f "/etc/X11/XF86Config" -o \
5943           -f "/usr/X11R6/lib/X11/XF86Config"; then
5944     echo "$ac_t""yes" 1>&6
5945     { test "$extra_verbose" = "yes" && cat << \EOF
5946     Defining HAVE_XFREE386
5947 EOF
5948 cat >> confdefs.h <<\EOF
5949 #define HAVE_XFREE386 1
5950 EOF
5951 }
5952
5953   else
5954     echo "$ac_t""no" 1>&6
5955   fi
5956
5957     test -z "$with_xmu" && { 
5958 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5959 echo "configure:5960: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5960 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5961
5962 xe_check_libs=" -lXmu "
5963 cat > conftest.$ac_ext <<EOF
5964 #line 5965 "configure"
5965 #include "confdefs.h"
5966 /* Override any gcc2 internal prototype to avoid an error.  */
5967 /* We use char because int might match the return type of a gcc2
5968     builtin and then its argument prototype would still apply.  */
5969 char XmuReadBitmapDataFromFile();
5970
5971 int main() {
5972 XmuReadBitmapDataFromFile()
5973 ; return 0; }
5974 EOF
5975 if { (eval echo configure:5976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5976   rm -rf conftest*
5977   eval "ac_cv_lib_$ac_lib_var=yes"
5978 else
5979   echo "configure: failed program was:" >&5
5980   cat conftest.$ac_ext >&5
5981   rm -rf conftest*
5982   eval "ac_cv_lib_$ac_lib_var=no"
5983 fi
5984 rm -f conftest*
5985 xe_check_libs=""
5986
5987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5988   echo "$ac_t""yes" 1>&6
5989   with_xmu=yes
5990 else
5991   echo "$ac_t""no" 1>&6
5992 with_xmu=no
5993 fi
5994
5995  }
5996   if test "$with_xmu" = "no"; then
5997     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
5998    echo "    xemacs will be linked with \"xmu.o\""
5999  fi
6000   else
6001     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6002     { test "$extra_verbose" = "yes" && cat << \EOF
6003     Defining HAVE_XMU
6004 EOF
6005 cat >> confdefs.h <<\EOF
6006 #define HAVE_XMU 1
6007 EOF
6008 }
6009
6010   fi
6011
6012       
6013 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6014 echo "configure:6015: checking for main in -lXbsd" >&5
6015 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6016
6017 xe_check_libs=" -lXbsd "
6018 cat > conftest.$ac_ext <<EOF
6019 #line 6020 "configure"
6020 #include "confdefs.h"
6021
6022 int main() {
6023 main()
6024 ; return 0; }
6025 EOF
6026 if { (eval echo configure:6027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6027   rm -rf conftest*
6028   eval "ac_cv_lib_$ac_lib_var=yes"
6029 else
6030   echo "configure: failed program was:" >&5
6031   cat conftest.$ac_ext >&5
6032   rm -rf conftest*
6033   eval "ac_cv_lib_$ac_lib_var=no"
6034 fi
6035 rm -f conftest*
6036 xe_check_libs=""
6037
6038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6039   echo "$ac_t""yes" 1>&6
6040   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6041 else
6042   echo "$ac_t""no" 1>&6
6043 fi
6044
6045
6046
6047     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6048         if test "$GCC" = "yes"; then
6049       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6050       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6051     else
6052       case "$CC" in
6053         "xlc" ) CC="xlc_r" ;;
6054         "xlC" ) CC="xlC_r" ;;
6055         "cc"  ) CC="cc_r" ;;
6056       esac
6057     fi
6058   fi
6059
6060 fi 
6061 if test "$with_msw" != "no"; then
6062   echo "checking for MS-Windows" 1>&6
6063 echo "configure:6064: checking for MS-Windows" >&5
6064   
6065 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6066 echo "configure:6067: checking for main in -lgdi32" >&5
6067 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6068
6069 xe_check_libs=" -lgdi32 "
6070 cat > conftest.$ac_ext <<EOF
6071 #line 6072 "configure"
6072 #include "confdefs.h"
6073
6074 int main() {
6075 main()
6076 ; return 0; }
6077 EOF
6078 if { (eval echo configure:6079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6079   rm -rf conftest*
6080   eval "ac_cv_lib_$ac_lib_var=yes"
6081 else
6082   echo "configure: failed program was:" >&5
6083   cat conftest.$ac_ext >&5
6084   rm -rf conftest*
6085   eval "ac_cv_lib_$ac_lib_var=no"
6086 fi
6087 rm -f conftest*
6088 xe_check_libs=""
6089
6090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6091   echo "$ac_t""yes" 1>&6
6092   with_msw=yes
6093 else
6094   echo "$ac_t""no" 1>&6
6095 fi
6096
6097
6098   if test "$with_msw" = "yes"; then
6099     { test "$extra_verbose" = "yes" && cat << \EOF
6100     Defining HAVE_MS_WINDOWS
6101 EOF
6102 cat >> confdefs.h <<\EOF
6103 #define HAVE_MS_WINDOWS 1
6104 EOF
6105 }
6106
6107     install_pp="$blddir/lib-src/installexe.sh"
6108     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
6109     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6110     if test "$window_system" != x11; then
6111         window_system=msw
6112         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6113             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6114    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6115  fi
6116         test "$with_menubars"   != "no" && with_menubars=msw \
6117             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6118    echo "    xemacs will be linked with \"menubar-msw.o\""
6119  fi
6120         test "$with_toolbars"   != "no" && with_toolbars=msw \
6121             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6122    echo "    xemacs will be linked with \"toolbar-msw.o\""
6123  fi
6124         test "$with_dialogs"   != "no" && with_dialogs=msw \
6125             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6126    echo "    xemacs will be linked with \"dialog-msw.o\""
6127  fi
6128         test "$with_widgets"   != "no" && with_widgets=msw
6129     else
6130         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6131    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6132  fi
6133         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6134    echo "    xemacs will be linked with \"menubar-msw.o\""
6135  fi
6136         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6137    echo "    xemacs will be linked with \"toolbar-msw.o\""
6138  fi
6139         test "$with_dialogs"    != "no" && 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     fi
6143         cat > conftest.$ac_ext <<EOF
6144 #line 6145 "configure"
6145 #include "confdefs.h"
6146 #include <fcntl.h>
6147     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6148 EOF
6149 if { (eval echo configure:6150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6150 then
6151   { test "$extra_verbose" = "yes" && cat << \EOF
6152     Defining HAVE_MSG_SELECT
6153 EOF
6154 cat >> confdefs.h <<\EOF
6155 #define HAVE_MSG_SELECT 1
6156 EOF
6157 }
6158
6159 else
6160   conftest_rc="$?"
6161   echo "configure: failed program was:" >&5
6162   cat conftest.$ac_ext >&5
6163 fi
6164 rm -fr conftest*
6165     const_is_losing=no
6166     with_file_coding=yes
6167     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
6168    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\""
6169  fi
6170   fi
6171 fi
6172
6173
6174
6175 test -z "$window_system" && window_system="none"
6176
6177 if test "$window_system" = "none"; then
6178   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6179   do
6180     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6181        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6182     fi
6183     eval "with_${feature}=no"
6184   done
6185 else
6186   test -z "$with_toolbars" && with_toolbars=yes
6187 fi
6188
6189 if test "$with_msw" != "yes"; then
6190   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6191   do
6192     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6193        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6194     fi
6195     eval "with_${feature}=no"
6196   done
6197 else
6198   :
6199 fi
6200
6201 if test "$with_x11" != "yes"; then
6202             for feature in tooltalk cde offix wmcommand xim xmu xpm nas_sound
6203   do
6204     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6205        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6206     fi
6207     eval "with_${feature}=no"
6208   done
6209 fi
6210
6211 bitmapdir=
6212
6213 case "$window_system" in
6214   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6215   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6216   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6217 esac
6218
6219 case "$x_libraries" in *X11R4* )
6220   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6221   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6222 esac
6223
6224 echo "checking for WM_COMMAND option" 1>&6
6225 echo "configure:6226: checking for WM_COMMAND option" >&5;
6226 if test "$with_wmcommand" != "no"; then
6227   { test "$extra_verbose" = "yes" && cat << \EOF
6228     Defining HAVE_WMCOMMAND
6229 EOF
6230 cat >> confdefs.h <<\EOF
6231 #define HAVE_WMCOMMAND 1
6232 EOF
6233 }
6234
6235 fi
6236
6237 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6238 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6239 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6240 echo "configure:6241: checking for X11/Xauth.h" >&5
6241
6242 cat > conftest.$ac_ext <<EOF
6243 #line 6244 "configure"
6244 #include "confdefs.h"
6245 #include <X11/Xauth.h>
6246 EOF
6247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6248 { (eval echo configure:6249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6250 if test -z "$ac_err"; then
6251   rm -rf conftest*
6252   eval "ac_cv_header_$ac_safe=yes"
6253 else
6254   echo "$ac_err" >&5
6255   echo "configure: failed program was:" >&5
6256   cat conftest.$ac_ext >&5
6257   rm -rf conftest*
6258   eval "ac_cv_header_$ac_safe=no"
6259 fi
6260 rm -f conftest*
6261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6262   echo "$ac_t""yes" 1>&6
6263   :
6264 else
6265   echo "$ac_t""no" 1>&6
6266 with_xauth=no
6267 fi
6268  }
6269 test -z "$with_xauth" && { 
6270 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6271 echo "configure:6272: checking for XauGetAuthByAddr in -lXau" >&5
6272 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6273
6274 xe_check_libs=" -lXau "
6275 cat > conftest.$ac_ext <<EOF
6276 #line 6277 "configure"
6277 #include "confdefs.h"
6278 /* Override any gcc2 internal prototype to avoid an error.  */
6279 /* We use char because int might match the return type of a gcc2
6280     builtin and then its argument prototype would still apply.  */
6281 char XauGetAuthByAddr();
6282
6283 int main() {
6284 XauGetAuthByAddr()
6285 ; return 0; }
6286 EOF
6287 if { (eval echo configure:6288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6288   rm -rf conftest*
6289   eval "ac_cv_lib_$ac_lib_var=yes"
6290 else
6291   echo "configure: failed program was:" >&5
6292   cat conftest.$ac_ext >&5
6293   rm -rf conftest*
6294   eval "ac_cv_lib_$ac_lib_var=no"
6295 fi
6296 rm -f conftest*
6297 xe_check_libs=""
6298
6299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6300   echo "$ac_t""yes" 1>&6
6301   :
6302 else
6303   echo "$ac_t""no" 1>&6
6304 with_xauth=no
6305 fi
6306
6307  }
6308 test -z "$with_xauth" && with_xauth=yes
6309 if test "$with_xauth" = "yes"; then
6310   { test "$extra_verbose" = "yes" && cat << \EOF
6311     Defining HAVE_XAUTH
6312 EOF
6313 cat >> confdefs.h <<\EOF
6314 #define HAVE_XAUTH 1
6315 EOF
6316 }
6317
6318   
6319 T=""
6320 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
6321 libs_xauth="$T"
6322
6323 fi
6324
6325
6326
6327
6328 if test "$with_tooltalk" != "no" ; then
6329       for dir in "" "Tt/" "desktop/" ; do
6330     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6331 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6332 echo "configure:6333: checking for ${dir}tt_c.h" >&5
6333
6334 cat > conftest.$ac_ext <<EOF
6335 #line 6336 "configure"
6336 #include "confdefs.h"
6337 #include <${dir}tt_c.h>
6338 EOF
6339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6340 { (eval echo configure:6341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6342 if test -z "$ac_err"; then
6343   rm -rf conftest*
6344   eval "ac_cv_header_$ac_safe=yes"
6345 else
6346   echo "$ac_err" >&5
6347   echo "configure: failed program was:" >&5
6348   cat conftest.$ac_ext >&5
6349   rm -rf conftest*
6350   eval "ac_cv_header_$ac_safe=no"
6351 fi
6352 rm -f conftest*
6353 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6354   echo "$ac_t""yes" 1>&6
6355   tt_c_h_path="${dir}tt_c.h"; break
6356 else
6357   echo "$ac_t""no" 1>&6
6358 fi
6359
6360   done
6361   if test -z "$tt_c_h_path"; then
6362     if test "$with_tooltalk" = "yes"; then
6363       (echo "$progname: Usage error:"
6364 echo " " "Unable to find required tooltalk header files."
6365 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6366     fi
6367     with_tooltalk=no
6368   fi
6369 fi
6370 if test "$with_tooltalk" != "no" ; then
6371   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6372     
6373 xe_msg_checking="for tt_message_create in -ltt"
6374 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6375 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6376 echo "configure:6377: checking "$xe_msg_checking"" >&5
6377 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6378
6379 xe_check_libs=" -ltt $extra_libs"
6380 cat > conftest.$ac_ext <<EOF
6381 #line 6382 "configure"
6382 #include "confdefs.h"
6383 /* Override any gcc2 internal prototype to avoid an error.  */
6384 /* We use char because int might match the return type of a gcc2
6385     builtin and then its argument prototype would still apply.  */
6386 char tt_message_create();
6387
6388 int main() {
6389 tt_message_create()
6390 ; return 0; }
6391 EOF
6392 if { (eval echo configure:6393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6393   rm -rf conftest*
6394   eval "ac_cv_lib_$ac_lib_var=yes"
6395 else
6396   echo "configure: failed program was:" >&5
6397   cat conftest.$ac_ext >&5
6398   rm -rf conftest*
6399   eval "ac_cv_lib_$ac_lib_var=no"
6400 fi
6401 rm -f conftest*
6402 xe_check_libs=""
6403
6404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6405   echo "$ac_t""yes" 1>&6
6406   tt_libs="-ltt $extra_libs"; break
6407 else
6408   echo "$ac_t""no" 1>&6
6409 :
6410 fi
6411
6412
6413   done
6414   if test -z "$tt_libs"; then
6415     if test "$with_tooltalk" = "yes"; then
6416       (echo "$progname: Usage error:"
6417 echo " " "Unable to find required tooltalk libraries."
6418 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6419     fi
6420     with_tooltalk=no
6421   fi
6422 fi
6423 test -z "$with_tooltalk" && with_tooltalk=yes
6424 if test "$with_tooltalk" = "yes"; then
6425   { test "$extra_verbose" = "yes" && cat << \EOF
6426     Defining TOOLTALK
6427 EOF
6428 cat >> confdefs.h <<\EOF
6429 #define TOOLTALK 1
6430 EOF
6431 }
6432
6433   { test "$extra_verbose" = "yes" && cat << EOF
6434     Defining TT_C_H_PATH = "$tt_c_h_path"
6435 EOF
6436 cat >> confdefs.h <<EOF
6437 #define TT_C_H_PATH "$tt_c_h_path"
6438 EOF
6439 }
6440
6441   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6442   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6443    echo "    xemacs will be linked with \"tooltalk.o\""
6444  fi
6445 fi
6446
6447 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6448 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6449 echo "configure:6450: checking for Dt/Dt.h" >&5
6450
6451 cat > conftest.$ac_ext <<EOF
6452 #line 6453 "configure"
6453 #include "confdefs.h"
6454 #include <Dt/Dt.h>
6455 EOF
6456 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6457 { (eval echo configure:6458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6458 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6459 if test -z "$ac_err"; then
6460   rm -rf conftest*
6461   eval "ac_cv_header_$ac_safe=yes"
6462 else
6463   echo "$ac_err" >&5
6464   echo "configure: failed program was:" >&5
6465   cat conftest.$ac_ext >&5
6466   rm -rf conftest*
6467   eval "ac_cv_header_$ac_safe=no"
6468 fi
6469 rm -f conftest*
6470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6471   echo "$ac_t""yes" 1>&6
6472   :
6473 else
6474   echo "$ac_t""no" 1>&6
6475 with_cde=no
6476 fi
6477  }
6478 test -z "$with_cde" && { 
6479 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6480 echo "configure:6481: checking for DtDndDragStart in -lDtSvc" >&5
6481 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6482
6483 xe_check_libs=" -lDtSvc "
6484 cat > conftest.$ac_ext <<EOF
6485 #line 6486 "configure"
6486 #include "confdefs.h"
6487 /* Override any gcc2 internal prototype to avoid an error.  */
6488 /* We use char because int might match the return type of a gcc2
6489     builtin and then its argument prototype would still apply.  */
6490 char DtDndDragStart();
6491
6492 int main() {
6493 DtDndDragStart()
6494 ; return 0; }
6495 EOF
6496 if { (eval echo configure:6497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6497   rm -rf conftest*
6498   eval "ac_cv_lib_$ac_lib_var=yes"
6499 else
6500   echo "configure: failed program was:" >&5
6501   cat conftest.$ac_ext >&5
6502   rm -rf conftest*
6503   eval "ac_cv_lib_$ac_lib_var=no"
6504 fi
6505 rm -f conftest*
6506 xe_check_libs=""
6507
6508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6509   echo "$ac_t""yes" 1>&6
6510   :
6511 else
6512   echo "$ac_t""no" 1>&6
6513 with_cde=no
6514 fi
6515
6516  }
6517 test -z "$with_cde" && with_cde=yes
6518 if test "$with_dragndrop" = no; then
6519   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6520   with_cde=no
6521 fi
6522 if test "$with_cde" = "yes" ; then
6523   { test "$extra_verbose" = "yes" && cat << \EOF
6524     Defining HAVE_CDE
6525 EOF
6526 cat >> confdefs.h <<\EOF
6527 #define HAVE_CDE 1
6528 EOF
6529 }
6530
6531   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6532   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6533   with_tooltalk=yes # CDE requires Tooltalk
6534   need_motif=yes    # CDE requires Motif
6535 fi
6536
6537 test "$window_system" != "x11" && with_offix=no
6538 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6539   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6540   with_offix=no
6541 fi
6542 if test "$with_dragndrop" = no; then
6543   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6544   with_offix=no
6545 fi
6546 if test "$with_cde" = yes; then
6547   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6548   with_offix=no
6549 fi
6550 test -z "$with_offix" && with_offix=no
6551 if test "$with_offix" = "yes"; then
6552   { test "$extra_verbose" = "yes" && cat << \EOF
6553     Defining HAVE_OFFIX_DND
6554 EOF
6555 cat >> confdefs.h <<\EOF
6556 #define HAVE_OFFIX_DND 1
6557 EOF
6558 }
6559
6560   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6561   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6562 fi
6563
6564 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6565 echo "configure:6566: checking if drag and drop API is needed" >&5
6566 if test "$with_dragndrop" != "no" ; then
6567   if test -n "$dragndrop_proto" ; then
6568     with_dragndrop=yes
6569     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6570     { test "$extra_verbose" = "yes" && cat << \EOF
6571     Defining HAVE_DRAGNDROP
6572 EOF
6573 cat >> confdefs.h <<\EOF
6574 #define HAVE_DRAGNDROP 1
6575 EOF
6576 }
6577
6578     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6579   else
6580     with_dragndrop=no
6581     echo "$ac_t""no" 1>&6
6582   fi
6583 fi
6584
6585 echo "checking for LDAP" 1>&6
6586 echo "configure:6587: checking for LDAP" >&5
6587 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6588 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6589 echo "configure:6590: checking for ldap.h" >&5
6590
6591 cat > conftest.$ac_ext <<EOF
6592 #line 6593 "configure"
6593 #include "confdefs.h"
6594 #include <ldap.h>
6595 EOF
6596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6597 { (eval echo configure:6598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6599 if test -z "$ac_err"; then
6600   rm -rf conftest*
6601   eval "ac_cv_header_$ac_safe=yes"
6602 else
6603   echo "$ac_err" >&5
6604   echo "configure: failed program was:" >&5
6605   cat conftest.$ac_ext >&5
6606   rm -rf conftest*
6607   eval "ac_cv_header_$ac_safe=no"
6608 fi
6609 rm -f conftest*
6610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6611   echo "$ac_t""yes" 1>&6
6612   :
6613 else
6614   echo "$ac_t""no" 1>&6
6615 with_ldap=no
6616 fi
6617  }
6618 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6619 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6620 echo "configure:6621: checking for lber.h" >&5
6621
6622 cat > conftest.$ac_ext <<EOF
6623 #line 6624 "configure"
6624 #include "confdefs.h"
6625 #include <lber.h>
6626 EOF
6627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6628 { (eval echo configure:6629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6630 if test -z "$ac_err"; then
6631   rm -rf conftest*
6632   eval "ac_cv_header_$ac_safe=yes"
6633 else
6634   echo "$ac_err" >&5
6635   echo "configure: failed program was:" >&5
6636   cat conftest.$ac_ext >&5
6637   rm -rf conftest*
6638   eval "ac_cv_header_$ac_safe=no"
6639 fi
6640 rm -f conftest*
6641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6642   echo "$ac_t""yes" 1>&6
6643   :
6644 else
6645   echo "$ac_t""no" 1>&6
6646 with_ldap=no
6647 fi
6648  }
6649 if test "$with_ldap" != "no"; then
6650   
6651 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6652 echo "configure:6653: checking for ldap_search in -lldap" >&5
6653 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6654
6655 xe_check_libs=" -lldap "
6656 cat > conftest.$ac_ext <<EOF
6657 #line 6658 "configure"
6658 #include "confdefs.h"
6659 /* Override any gcc2 internal prototype to avoid an error.  */
6660 /* We use char because int might match the return type of a gcc2
6661     builtin and then its argument prototype would still apply.  */
6662 char ldap_search();
6663
6664 int main() {
6665 ldap_search()
6666 ; return 0; }
6667 EOF
6668 if { (eval echo configure:6669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6669   rm -rf conftest*
6670   eval "ac_cv_lib_$ac_lib_var=yes"
6671 else
6672   echo "configure: failed program was:" >&5
6673   cat conftest.$ac_ext >&5
6674   rm -rf conftest*
6675   eval "ac_cv_lib_$ac_lib_var=no"
6676 fi
6677 rm -f conftest*
6678 xe_check_libs=""
6679
6680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6681   echo "$ac_t""yes" 1>&6
6682   with_ldap_nolber=yes
6683 else
6684   echo "$ac_t""no" 1>&6
6685 with_ldap_nolber=no
6686 fi
6687
6688
6689   test "$with_ldap_nolber" = "no" && { 
6690 xe_msg_checking="for ldap_open in -lldap"
6691 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6692 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6693 echo "configure:6694: checking "$xe_msg_checking"" >&5
6694 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6695
6696 xe_check_libs=" -lldap -llber"
6697 cat > conftest.$ac_ext <<EOF
6698 #line 6699 "configure"
6699 #include "confdefs.h"
6700 /* Override any gcc2 internal prototype to avoid an error.  */
6701 /* We use char because int might match the return type of a gcc2
6702     builtin and then its argument prototype would still apply.  */
6703 char ldap_open();
6704
6705 int main() {
6706 ldap_open()
6707 ; return 0; }
6708 EOF
6709 if { (eval echo configure:6710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6710   rm -rf conftest*
6711   eval "ac_cv_lib_$ac_lib_var=yes"
6712 else
6713   echo "configure: failed program was:" >&5
6714   cat conftest.$ac_ext >&5
6715   rm -rf conftest*
6716   eval "ac_cv_lib_$ac_lib_var=no"
6717 fi
6718 rm -f conftest*
6719 xe_check_libs=""
6720
6721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6722   echo "$ac_t""yes" 1>&6
6723   with_ldap_lber=yes
6724 else
6725   echo "$ac_t""no" 1>&6
6726 with_ldap_lber=no
6727 fi
6728
6729  }
6730   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6731 xe_msg_checking="for ldap_open in -lldap"
6732 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6733 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6734 echo "configure:6735: checking "$xe_msg_checking"" >&5
6735 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6736
6737 xe_check_libs=" -lldap -llber -lkrb"
6738 cat > conftest.$ac_ext <<EOF
6739 #line 6740 "configure"
6740 #include "confdefs.h"
6741 /* Override any gcc2 internal prototype to avoid an error.  */
6742 /* We use char because int might match the return type of a gcc2
6743     builtin and then its argument prototype would still apply.  */
6744 char ldap_open();
6745
6746 int main() {
6747 ldap_open()
6748 ; return 0; }
6749 EOF
6750 if { (eval echo configure:6751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6751   rm -rf conftest*
6752   eval "ac_cv_lib_$ac_lib_var=yes"
6753 else
6754   echo "configure: failed program was:" >&5
6755   cat conftest.$ac_ext >&5
6756   rm -rf conftest*
6757   eval "ac_cv_lib_$ac_lib_var=no"
6758 fi
6759 rm -f conftest*
6760 xe_check_libs=""
6761
6762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6763   echo "$ac_t""yes" 1>&6
6764   with_ldap_krb=yes
6765 else
6766   echo "$ac_t""no" 1>&6
6767 with_ldap_krb=no
6768 fi
6769
6770  }
6771   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6772 xe_msg_checking="for ldap_open in -lldap"
6773 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6774 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6775 echo "configure:6776: checking "$xe_msg_checking"" >&5
6776 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6777
6778 xe_check_libs=" -lldap -llber -lkrb -ldes"
6779 cat > conftest.$ac_ext <<EOF
6780 #line 6781 "configure"
6781 #include "confdefs.h"
6782 /* Override any gcc2 internal prototype to avoid an error.  */
6783 /* We use char because int might match the return type of a gcc2
6784     builtin and then its argument prototype would still apply.  */
6785 char ldap_open();
6786
6787 int main() {
6788 ldap_open()
6789 ; return 0; }
6790 EOF
6791 if { (eval echo configure:6792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6792   rm -rf conftest*
6793   eval "ac_cv_lib_$ac_lib_var=yes"
6794 else
6795   echo "configure: failed program was:" >&5
6796   cat conftest.$ac_ext >&5
6797   rm -rf conftest*
6798   eval "ac_cv_lib_$ac_lib_var=no"
6799 fi
6800 rm -f conftest*
6801 xe_check_libs=""
6802
6803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6804   echo "$ac_t""yes" 1>&6
6805   with_ldap_krbdes=yes
6806 else
6807   echo "$ac_t""no" 1>&6
6808 with_ldap_krbdes=no
6809 fi
6810
6811  }
6812   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
6813 fi
6814 if test "$with_ldap" = "yes"; then
6815   { test "$extra_verbose" = "yes" && cat << \EOF
6816     Defining HAVE_LDAP
6817 EOF
6818 cat >> confdefs.h <<\EOF
6819 #define HAVE_LDAP 1
6820 EOF
6821 }
6822
6823   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6824    echo "    xemacs will be linked with \"eldap.o\""
6825  fi
6826   if test "$with_ldap_nolber" = "yes" ; then
6827     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6828   else
6829     if test "$with_ldap_krb" = "yes" ; then
6830       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6831     fi
6832     if test "$with_ldap_krbdes" = "yes" ; then
6833       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
6834       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6835     fi
6836     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6837     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6838   fi
6839   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
6840 do
6841 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6842 echo "configure:6843: checking for $ac_func" >&5
6843
6844 cat > conftest.$ac_ext <<EOF
6845 #line 6846 "configure"
6846 #include "confdefs.h"
6847 /* System header to define __stub macros and hopefully few prototypes,
6848     which can conflict with char $ac_func(); below.  */
6849 #include <assert.h>
6850 /* Override any gcc2 internal prototype to avoid an error.  */
6851 /* We use char because int might match the return type of a gcc2
6852     builtin and then its argument prototype would still apply.  */
6853 char $ac_func();
6854
6855 int main() {
6856
6857 /* The GNU C library defines this for functions which it implements
6858     to always fail with ENOSYS.  Some functions are actually named
6859     something starting with __ and the normal name is an alias.  */
6860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6861 choke me
6862 #else
6863 $ac_func();
6864 #endif
6865
6866 ; return 0; }
6867 EOF
6868 if { (eval echo configure:6869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6869   rm -rf conftest*
6870   eval "ac_cv_func_$ac_func=yes"
6871 else
6872   echo "configure: failed program was:" >&5
6873   cat conftest.$ac_ext >&5
6874   rm -rf conftest*
6875   eval "ac_cv_func_$ac_func=no"
6876 fi
6877 rm -f conftest*
6878
6879 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6880   echo "$ac_t""yes" 1>&6
6881     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6882   { test "$extra_verbose" = "yes" && cat << EOF
6883     Defining $ac_tr_func
6884 EOF
6885 cat >> confdefs.h <<EOF
6886 #define $ac_tr_func 1
6887 EOF
6888 }
6889  
6890 else
6891   echo "$ac_t""no" 1>&6
6892 fi
6893 done
6894
6895 fi
6896
6897
6898 if test "$window_system" != "none"; then
6899   echo "checking for graphics libraries" 1>&6
6900 echo "configure:6901: checking for graphics libraries" >&5
6901
6902     xpm_problem=""
6903   if test -z "$with_xpm"; then
6904     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6905 echo "configure:6906: checking for Xpm - no older than 3.4f" >&5
6906     xe_check_libs=-lXpm
6907     cat > conftest.$ac_ext <<EOF
6908 #line 6909 "configure"
6909 #include "confdefs.h"
6910 #include <X11/xpm.h>
6911     int main(int c, char **v) {
6912     return c == 1 ? 0 :
6913       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6914       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6915 EOF
6916 if { (eval echo configure:6917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6917 then
6918   ./conftest dummy_arg; xpm_status=$?;
6919       if test "$xpm_status" = "0"; then
6920         with_xpm=yes;
6921       else
6922         with_xpm=no;
6923         if test "$xpm_status" = "1"; then
6924           xpm_problem="Xpm library version and header file version don't match!"
6925         elif test "$xpm_status" = "2"; then
6926           xpm_problem="Xpm library version is too old!"
6927         else
6928           xpm_problem="Internal xpm detection logic error!"
6929         fi
6930         echo "
6931 *** WARNING *** $xpm_problem
6932   I'm not touching that with a 10-foot pole!
6933   If you really want to use the installed version of Xpm, rerun
6934   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
6935     fi
6936 else
6937   conftest_rc="$?"
6938   echo "configure: failed program was:" >&5
6939   cat conftest.$ac_ext >&5
6940   rm -fr conftest*
6941   with_xpm=no
6942 fi
6943 rm -fr conftest*
6944     xe_check_libs=
6945     echo "$ac_t""$with_xpm" 1>&6
6946   fi
6947   if test "$with_xpm" = "yes"; then
6948     { test "$extra_verbose" = "yes" && cat << \EOF
6949     Defining HAVE_XPM
6950 EOF
6951 cat >> confdefs.h <<\EOF
6952 #define HAVE_XPM 1
6953 EOF
6954 }
6955
6956     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6957     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6958 echo "configure:6959: checking for \"FOR_MSW\" xpm" >&5
6959     xe_check_libs=-lXpm
6960     cat > conftest.$ac_ext <<EOF
6961 #line 6962 "configure"
6962 #include "confdefs.h"
6963
6964 int main() {
6965 XpmCreatePixmapFromData()
6966 ; return 0; }
6967 EOF
6968 if { (eval echo configure:6969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6969   rm -rf conftest*
6970   xpm_for_msw=no
6971 else
6972   echo "configure: failed program was:" >&5
6973   cat conftest.$ac_ext >&5
6974   rm -rf conftest*
6975   xpm_for_msw=yes
6976 fi
6977 rm -f conftest*
6978     xe_check_libs=
6979     echo "$ac_t""$xpm_for_msw" 1>&6
6980     if test "$xpm_for_msw" = "yes"; then
6981       { test "$extra_verbose" = "yes" && cat << \EOF
6982     Defining FOR_MSW
6983 EOF
6984 cat >> confdefs.h <<\EOF
6985 #define FOR_MSW 1
6986 EOF
6987 }
6988
6989     fi
6990   fi
6991
6992     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
6993 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
6994 echo "configure:6995: checking for compface.h" >&5
6995
6996 cat > conftest.$ac_ext <<EOF
6997 #line 6998 "configure"
6998 #include "confdefs.h"
6999 #include <compface.h>
7000 EOF
7001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7002 { (eval echo configure:7003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7004 if test -z "$ac_err"; then
7005   rm -rf conftest*
7006   eval "ac_cv_header_$ac_safe=yes"
7007 else
7008   echo "$ac_err" >&5
7009   echo "configure: failed program was:" >&5
7010   cat conftest.$ac_ext >&5
7011   rm -rf conftest*
7012   eval "ac_cv_header_$ac_safe=no"
7013 fi
7014 rm -f conftest*
7015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7016   echo "$ac_t""yes" 1>&6
7017   :
7018 else
7019   echo "$ac_t""no" 1>&6
7020 with_xface=no
7021 fi
7022  }
7023   test -z "$with_xface" && { 
7024 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7025 echo "configure:7026: checking for UnGenFace in -lcompface" >&5
7026 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7027
7028 xe_check_libs=" -lcompface "
7029 cat > conftest.$ac_ext <<EOF
7030 #line 7031 "configure"
7031 #include "confdefs.h"
7032 /* Override any gcc2 internal prototype to avoid an error.  */
7033 /* We use char because int might match the return type of a gcc2
7034     builtin and then its argument prototype would still apply.  */
7035 char UnGenFace();
7036
7037 int main() {
7038 UnGenFace()
7039 ; return 0; }
7040 EOF
7041 if { (eval echo configure:7042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7042   rm -rf conftest*
7043   eval "ac_cv_lib_$ac_lib_var=yes"
7044 else
7045   echo "configure: failed program was:" >&5
7046   cat conftest.$ac_ext >&5
7047   rm -rf conftest*
7048   eval "ac_cv_lib_$ac_lib_var=no"
7049 fi
7050 rm -f conftest*
7051 xe_check_libs=""
7052
7053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7054   echo "$ac_t""yes" 1>&6
7055   : 
7056 else
7057   echo "$ac_t""no" 1>&6
7058 with_xface=no
7059 fi
7060
7061  }
7062   test -z "$with_xface" && with_xface=yes
7063   if test "$with_xface" = "yes"; then
7064     { test "$extra_verbose" = "yes" && cat << \EOF
7065     Defining HAVE_XFACE
7066 EOF
7067 cat >> confdefs.h <<\EOF
7068 #define HAVE_XFACE 1
7069 EOF
7070 }
7071
7072     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7073   fi
7074
7075         if test "$with_gif" != "no"; then
7076     with_gif="yes"
7077     { test "$extra_verbose" = "yes" && cat << \EOF
7078     Defining HAVE_GIF
7079 EOF
7080 cat >> confdefs.h <<\EOF
7081 #define HAVE_GIF 1
7082 EOF
7083 }
7084
7085     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7086    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7087  fi
7088   fi
7089
7090       if test "$with_png $with_tiff" != "no no"; then
7091     
7092 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7093 echo "configure:7094: checking for inflate in -lc" >&5
7094 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7095
7096 xe_check_libs=" -lc "
7097 cat > conftest.$ac_ext <<EOF
7098 #line 7099 "configure"
7099 #include "confdefs.h"
7100 /* Override any gcc2 internal prototype to avoid an error.  */
7101 /* We use char because int might match the return type of a gcc2
7102     builtin and then its argument prototype would still apply.  */
7103 char inflate();
7104
7105 int main() {
7106 inflate()
7107 ; return 0; }
7108 EOF
7109 if { (eval echo configure:7110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7110   rm -rf conftest*
7111   eval "ac_cv_lib_$ac_lib_var=yes"
7112 else
7113   echo "configure: failed program was:" >&5
7114   cat conftest.$ac_ext >&5
7115   rm -rf conftest*
7116   eval "ac_cv_lib_$ac_lib_var=no"
7117 fi
7118 rm -f conftest*
7119 xe_check_libs=""
7120
7121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7122   echo "$ac_t""yes" 1>&6
7123   :
7124 else
7125   echo "$ac_t""no" 1>&6
7126
7127 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7128 echo "configure:7129: checking for inflate in -lz" >&5
7129 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7130
7131 xe_check_libs=" -lz "
7132 cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135 /* Override any gcc2 internal prototype to avoid an error.  */
7136 /* We use char because int might match the return type of a gcc2
7137     builtin and then its argument prototype would still apply.  */
7138 char inflate();
7139
7140 int main() {
7141 inflate()
7142 ; return 0; }
7143 EOF
7144 if { (eval echo configure:7145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7145   rm -rf conftest*
7146   eval "ac_cv_lib_$ac_lib_var=yes"
7147 else
7148   echo "configure: failed program was:" >&5
7149   cat conftest.$ac_ext >&5
7150   rm -rf conftest*
7151   eval "ac_cv_lib_$ac_lib_var=no"
7152 fi
7153 rm -f conftest*
7154 xe_check_libs=""
7155
7156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7157   echo "$ac_t""yes" 1>&6
7158   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7159 else
7160   echo "$ac_t""no" 1>&6
7161
7162 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7163 echo "configure:7164: checking for inflate in -lgz" >&5
7164 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7165
7166 xe_check_libs=" -lgz "
7167 cat > conftest.$ac_ext <<EOF
7168 #line 7169 "configure"
7169 #include "confdefs.h"
7170 /* Override any gcc2 internal prototype to avoid an error.  */
7171 /* We use char because int might match the return type of a gcc2
7172     builtin and then its argument prototype would still apply.  */
7173 char inflate();
7174
7175 int main() {
7176 inflate()
7177 ; return 0; }
7178 EOF
7179 if { (eval echo configure:7180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7180   rm -rf conftest*
7181   eval "ac_cv_lib_$ac_lib_var=yes"
7182 else
7183   echo "configure: failed program was:" >&5
7184   cat conftest.$ac_ext >&5
7185   rm -rf conftest*
7186   eval "ac_cv_lib_$ac_lib_var=no"
7187 fi
7188 rm -f conftest*
7189 xe_check_libs=""
7190
7191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7192   echo "$ac_t""yes" 1>&6
7193   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7194 else
7195   echo "$ac_t""no" 1>&6
7196 fi
7197
7198
7199 fi
7200
7201
7202 fi
7203
7204
7205   fi
7206
7207     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7208 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7209 echo "configure:7210: checking for jpeglib.h" >&5
7210
7211 cat > conftest.$ac_ext <<EOF
7212 #line 7213 "configure"
7213 #include "confdefs.h"
7214 #include <jpeglib.h>
7215 EOF
7216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7217 { (eval echo configure:7218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7219 if test -z "$ac_err"; then
7220   rm -rf conftest*
7221   eval "ac_cv_header_$ac_safe=yes"
7222 else
7223   echo "$ac_err" >&5
7224   echo "configure: failed program was:" >&5
7225   cat conftest.$ac_ext >&5
7226   rm -rf conftest*
7227   eval "ac_cv_header_$ac_safe=no"
7228 fi
7229 rm -f conftest*
7230 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7231   echo "$ac_t""yes" 1>&6
7232   :
7233 else
7234   echo "$ac_t""no" 1>&6
7235 with_jpeg=no
7236 fi
7237  }
7238   test -z "$with_jpeg" && { 
7239 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7240 echo "configure:7241: checking for jpeg_destroy_decompress in -ljpeg" >&5
7241 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7242
7243 xe_check_libs=" -ljpeg "
7244 cat > conftest.$ac_ext <<EOF
7245 #line 7246 "configure"
7246 #include "confdefs.h"
7247 /* Override any gcc2 internal prototype to avoid an error.  */
7248 /* We use char because int might match the return type of a gcc2
7249     builtin and then its argument prototype would still apply.  */
7250 char jpeg_destroy_decompress();
7251
7252 int main() {
7253 jpeg_destroy_decompress()
7254 ; return 0; }
7255 EOF
7256 if { (eval echo configure:7257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7257   rm -rf conftest*
7258   eval "ac_cv_lib_$ac_lib_var=yes"
7259 else
7260   echo "configure: failed program was:" >&5
7261   cat conftest.$ac_ext >&5
7262   rm -rf conftest*
7263   eval "ac_cv_lib_$ac_lib_var=no"
7264 fi
7265 rm -f conftest*
7266 xe_check_libs=""
7267
7268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7269   echo "$ac_t""yes" 1>&6
7270   :
7271 else
7272   echo "$ac_t""no" 1>&6
7273 with_jpeg=no
7274 fi
7275
7276  }
7277   test -z "$with_jpeg" && with_jpeg=yes
7278   if test "$with_jpeg" = "yes"; then
7279     { test "$extra_verbose" = "yes" && cat << \EOF
7280     Defining HAVE_JPEG
7281 EOF
7282 cat >> confdefs.h <<\EOF
7283 #define HAVE_JPEG 1
7284 EOF
7285 }
7286
7287     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7288   fi
7289
7290     png_problem=""
7291   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7292 echo "configure:7293: checking for pow" >&5
7293
7294 cat > conftest.$ac_ext <<EOF
7295 #line 7296 "configure"
7296 #include "confdefs.h"
7297 /* System header to define __stub macros and hopefully few prototypes,
7298     which can conflict with char pow(); below.  */
7299 #include <assert.h>
7300 /* Override any gcc2 internal prototype to avoid an error.  */
7301 /* We use char because int might match the return type of a gcc2
7302     builtin and then its argument prototype would still apply.  */
7303 char pow();
7304
7305 int main() {
7306
7307 /* The GNU C library defines this for functions which it implements
7308     to always fail with ENOSYS.  Some functions are actually named
7309     something starting with __ and the normal name is an alias.  */
7310 #if defined (__stub_pow) || defined (__stub___pow)
7311 choke me
7312 #else
7313 pow();
7314 #endif
7315
7316 ; return 0; }
7317 EOF
7318 if { (eval echo configure:7319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7319   rm -rf conftest*
7320   eval "ac_cv_func_pow=yes"
7321 else
7322   echo "configure: failed program was:" >&5
7323   cat conftest.$ac_ext >&5
7324   rm -rf conftest*
7325   eval "ac_cv_func_pow=no"
7326 fi
7327 rm -f conftest*
7328
7329 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7330   echo "$ac_t""yes" 1>&6
7331   :
7332 else
7333   echo "$ac_t""no" 1>&6
7334 with_png=no
7335 fi
7336  }
7337   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7338 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7339 echo "configure:7340: checking for png.h" >&5
7340
7341 cat > conftest.$ac_ext <<EOF
7342 #line 7343 "configure"
7343 #include "confdefs.h"
7344 #include <png.h>
7345 EOF
7346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7347 { (eval echo configure:7348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7349 if test -z "$ac_err"; then
7350   rm -rf conftest*
7351   eval "ac_cv_header_$ac_safe=yes"
7352 else
7353   echo "$ac_err" >&5
7354   echo "configure: failed program was:" >&5
7355   cat conftest.$ac_ext >&5
7356   rm -rf conftest*
7357   eval "ac_cv_header_$ac_safe=no"
7358 fi
7359 rm -f conftest*
7360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7361   echo "$ac_t""yes" 1>&6
7362   :
7363 else
7364   echo "$ac_t""no" 1>&6
7365 with_png=no
7366 fi
7367  }
7368   test -z "$with_png" && { 
7369 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7370 echo "configure:7371: checking for png_read_image in -lpng" >&5
7371 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7372
7373 xe_check_libs=" -lpng "
7374 cat > conftest.$ac_ext <<EOF
7375 #line 7376 "configure"
7376 #include "confdefs.h"
7377 /* Override any gcc2 internal prototype to avoid an error.  */
7378 /* We use char because int might match the return type of a gcc2
7379     builtin and then its argument prototype would still apply.  */
7380 char png_read_image();
7381
7382 int main() {
7383 png_read_image()
7384 ; return 0; }
7385 EOF
7386 if { (eval echo configure:7387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7387   rm -rf conftest*
7388   eval "ac_cv_lib_$ac_lib_var=yes"
7389 else
7390   echo "configure: failed program was:" >&5
7391   cat conftest.$ac_ext >&5
7392   rm -rf conftest*
7393   eval "ac_cv_lib_$ac_lib_var=no"
7394 fi
7395 rm -f conftest*
7396 xe_check_libs=""
7397
7398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7399   echo "$ac_t""yes" 1>&6
7400   :
7401 else
7402   echo "$ac_t""no" 1>&6
7403 with_png=no
7404 fi
7405
7406  }
7407   if test -z "$with_png"; then
7408     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7409 echo "configure:7410: checking for workable png version information" >&5
7410     xe_check_libs="-lpng -lz"
7411     cat > conftest.$ac_ext <<EOF
7412 #line 7413 "configure"
7413 #include "confdefs.h"
7414 #include <png.h>
7415     int main(int c, char **v) {
7416     if (c == 1) return 0;
7417     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7418     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7419 EOF
7420 if { (eval echo configure:7421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7421 then
7422   ./conftest dummy_arg; png_status=$?;
7423       if test "$png_status" = "0"; then
7424         with_png=yes;
7425       else
7426         with_png=no;
7427         if test "$png_status" = "1"; then
7428           png_problem="PNG library version and header file don't match!"
7429         elif test "$png_status" = "2"; then
7430           png_problem="PNG library version too old (pre 1.0.2)!"
7431         fi
7432         echo "
7433 *** WARNING *** $png_problem
7434   I'm not touching that with a 10-foot pole!
7435   If you really want to use the installed version of libPNG, rerun
7436   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7437     fi
7438 else
7439   conftest_rc="$?"
7440   echo "configure: failed program was:" >&5
7441   cat conftest.$ac_ext >&5
7442   rm -fr conftest*
7443   with_png=no
7444 fi
7445 rm -fr conftest*
7446     xe_check_libs=
7447     echo "$ac_t""$with_png" 1>&6
7448   fi
7449   if test "$with_png" = "yes"; then
7450     { test "$extra_verbose" = "yes" && cat << \EOF
7451     Defining HAVE_PNG
7452 EOF
7453 cat >> confdefs.h <<\EOF
7454 #define HAVE_PNG 1
7455 EOF
7456 }
7457
7458     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7459   fi
7460
7461     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7462 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7463 echo "configure:7464: checking for tiffio.h" >&5
7464
7465 cat > conftest.$ac_ext <<EOF
7466 #line 7467 "configure"
7467 #include "confdefs.h"
7468 #include <tiffio.h>
7469 EOF
7470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7471 { (eval echo configure:7472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7473 if test -z "$ac_err"; then
7474   rm -rf conftest*
7475   eval "ac_cv_header_$ac_safe=yes"
7476 else
7477   echo "$ac_err" >&5
7478   echo "configure: failed program was:" >&5
7479   cat conftest.$ac_ext >&5
7480   rm -rf conftest*
7481   eval "ac_cv_header_$ac_safe=no"
7482 fi
7483 rm -f conftest*
7484 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7485   echo "$ac_t""yes" 1>&6
7486   :
7487 else
7488   echo "$ac_t""no" 1>&6
7489 with_tiff=no
7490 fi
7491  }
7492   test -z "$with_tiff" && { 
7493 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7494 echo "configure:7495: checking for TIFFClientOpen in -ltiff" >&5
7495 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7496
7497 xe_check_libs=" -ltiff "
7498 cat > conftest.$ac_ext <<EOF
7499 #line 7500 "configure"
7500 #include "confdefs.h"
7501 /* Override any gcc2 internal prototype to avoid an error.  */
7502 /* We use char because int might match the return type of a gcc2
7503     builtin and then its argument prototype would still apply.  */
7504 char TIFFClientOpen();
7505
7506 int main() {
7507 TIFFClientOpen()
7508 ; return 0; }
7509 EOF
7510 if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7511   rm -rf conftest*
7512   eval "ac_cv_lib_$ac_lib_var=yes"
7513 else
7514   echo "configure: failed program was:" >&5
7515   cat conftest.$ac_ext >&5
7516   rm -rf conftest*
7517   eval "ac_cv_lib_$ac_lib_var=no"
7518 fi
7519 rm -f conftest*
7520 xe_check_libs=""
7521
7522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7523   echo "$ac_t""yes" 1>&6
7524   :
7525 else
7526   echo "$ac_t""no" 1>&6
7527 with_tiff=no
7528 fi
7529
7530  }
7531   test -z "$with_tiff" && with_tiff=yes
7532   if test "$with_tiff" = "yes"; then
7533     { test "$extra_verbose" = "yes" && cat << \EOF
7534     Defining HAVE_TIFF
7535 EOF
7536 cat >> confdefs.h <<\EOF
7537 #define HAVE_TIFF 1
7538 EOF
7539 }
7540
7541     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7542   fi
7543 fi
7544
7545
7546 if test "$with_x11" = "yes"; then
7547
7548   echo "checking for X11 graphics libraries" 1>&6
7549 echo "configure:7550: checking for X11 graphics libraries" >&5
7550
7551     
7552 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
7553 echo "configure:7554: checking for XawScrollbarSetThumb in -lXaw" >&5
7554 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7555
7556 xe_check_libs=" -lXaw "
7557 cat > conftest.$ac_ext <<EOF
7558 #line 7559 "configure"
7559 #include "confdefs.h"
7560 /* Override any gcc2 internal prototype to avoid an error.  */
7561 /* We use char because int might match the return type of a gcc2
7562     builtin and then its argument prototype would still apply.  */
7563 char XawScrollbarSetThumb();
7564
7565 int main() {
7566 XawScrollbarSetThumb()
7567 ; return 0; }
7568 EOF
7569 if { (eval echo configure:7570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7570   rm -rf conftest*
7571   eval "ac_cv_lib_$ac_lib_var=yes"
7572 else
7573   echo "configure: failed program was:" >&5
7574   cat conftest.$ac_ext >&5
7575   rm -rf conftest*
7576   eval "ac_cv_lib_$ac_lib_var=no"
7577 fi
7578 rm -f conftest*
7579 xe_check_libs=""
7580
7581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7582   echo "$ac_t""yes" 1>&6
7583   have_xaw=yes
7584 else
7585   echo "$ac_t""no" 1>&6
7586 have_xaw=no
7587 fi
7588
7589
7590                     
7591     
7592 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
7593 echo "configure:7594: checking for XawScrollbarSetThumb in -lXaw3d" >&5
7594 ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7595
7596 xe_check_libs=" -lXaw3d "
7597 cat > conftest.$ac_ext <<EOF
7598 #line 7599 "configure"
7599 #include "confdefs.h"
7600 /* Override any gcc2 internal prototype to avoid an error.  */
7601 /* We use char because int might match the return type of a gcc2
7602     builtin and then its argument prototype would still apply.  */
7603 char XawScrollbarSetThumb();
7604
7605 int main() {
7606 XawScrollbarSetThumb()
7607 ; return 0; }
7608 EOF
7609 if { (eval echo configure:7610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7610   rm -rf conftest*
7611   eval "ac_cv_lib_$ac_lib_var=yes"
7612 else
7613   echo "configure: failed program was:" >&5
7614   cat conftest.$ac_ext >&5
7615   rm -rf conftest*
7616   eval "ac_cv_lib_$ac_lib_var=no"
7617 fi
7618 rm -f conftest*
7619 xe_check_libs=""
7620
7621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7622   echo "$ac_t""yes" 1>&6
7623   have_xaw3d=yes
7624 else
7625   echo "$ac_t""no" 1>&6
7626 have_xaw3d=no
7627 fi
7628
7629
7630
7631     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7632 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7633 echo "configure:7634: checking for Xm/Xm.h" >&5
7634
7635 cat > conftest.$ac_ext <<EOF
7636 #line 7637 "configure"
7637 #include "confdefs.h"
7638 #include <Xm/Xm.h>
7639 EOF
7640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7641 { (eval echo configure:7642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7643 if test -z "$ac_err"; then
7644   rm -rf conftest*
7645   eval "ac_cv_header_$ac_safe=yes"
7646 else
7647   echo "$ac_err" >&5
7648   echo "configure: failed program was:" >&5
7649   cat conftest.$ac_ext >&5
7650   rm -rf conftest*
7651   eval "ac_cv_header_$ac_safe=no"
7652 fi
7653 rm -f conftest*
7654 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7655   echo "$ac_t""yes" 1>&6
7656   
7657 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7658 echo "configure:7659: checking for XmStringFree in -lXm" >&5
7659 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7660
7661 xe_check_libs=" -lXm "
7662 cat > conftest.$ac_ext <<EOF
7663 #line 7664 "configure"
7664 #include "confdefs.h"
7665 /* Override any gcc2 internal prototype to avoid an error.  */
7666 /* We use char because int might match the return type of a gcc2
7667     builtin and then its argument prototype would still apply.  */
7668 char XmStringFree();
7669
7670 int main() {
7671 XmStringFree()
7672 ; return 0; }
7673 EOF
7674 if { (eval echo configure:7675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7675   rm -rf conftest*
7676   eval "ac_cv_lib_$ac_lib_var=yes"
7677 else
7678   echo "configure: failed program was:" >&5
7679   cat conftest.$ac_ext >&5
7680   rm -rf conftest*
7681   eval "ac_cv_lib_$ac_lib_var=no"
7682 fi
7683 rm -f conftest*
7684 xe_check_libs=""
7685
7686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7687   echo "$ac_t""yes" 1>&6
7688   have_motif=yes
7689 else
7690   echo "$ac_t""no" 1>&6
7691 have_motif=no
7692 fi
7693
7694
7695 else
7696   echo "$ac_t""no" 1>&6
7697 have_motif=no
7698 fi
7699
7700
7701   if test "$have_motif" = "yes"; then
7702         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
7703 echo "configure:7704: checking for Lesstif" >&5
7704     cat > conftest.$ac_ext <<EOF
7705 #line 7706 "configure"
7706 #include "confdefs.h"
7707 #include <Xm/Xm.h>
7708 #ifdef LESSTIF_VERSION
7709 yes
7710 #endif
7711
7712 EOF
7713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7714   egrep "yes" >/dev/null 2>&1; then
7715   rm -rf conftest*
7716   have_lesstif=yes
7717 else
7718   rm -rf conftest*
7719   have_lesstif=no
7720 fi
7721 rm -f conftest*
7722
7723   echo "$ac_t""$have_lesstif" 1>&6
7724   fi
7725
7726 fi 
7727
7728 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
7729   with_menubars="lucid" ;;
7730 esac
7731 case "$with_dialogs" in "" | "yes" | "lucid" )
7732   if   test "$have_motif" = "yes"; then with_dialogs="motif"
7733   elif test "$have_xaw3d" = "yes"; then with_dialogs="athena3d"
7734   elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
7735   else with_dialogs=no
7736   fi ;;
7737 esac
7738 case "$with_scrollbars" in "" | "yes" )
7739   with_scrollbars="lucid" ;;
7740 esac
7741 case "$with_widgets" in "" | "yes" | "lucid")
7742   if   test "$have_motif" = "yes"; then with_widgets="motif"
7743   elif test "$have_xaw3d" = "yes"; then with_widgets="athena3d"
7744   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
7745   else with_widgets=no
7746   fi ;;
7747 esac
7748
7749 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
7750
7751 case "$all_widgets" in
7752  *athena*3d )
7753   { test "$extra_verbose" = "yes" && cat << \EOF
7754     Defining LWLIB_USES_ATHENA
7755 EOF
7756 cat >> confdefs.h <<\EOF
7757 #define LWLIB_USES_ATHENA 1
7758 EOF
7759 }
7760
7761   { test "$extra_verbose" = "yes" && cat << \EOF
7762     Defining NEED_ATHENA
7763 EOF
7764 cat >> confdefs.h <<\EOF
7765 #define NEED_ATHENA 1
7766 EOF
7767 }
7768
7769   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7770   if test "$have_xaw3d"; then
7771     libs_x="-lXaw3d $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw3d\" to \$libs_x"; fi
7772   else
7773     libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi
7774   fi ;;
7775  *athena* )
7776   { test "$extra_verbose" = "yes" && cat << \EOF
7777     Defining LWLIB_USES_ATHENA
7778 EOF
7779 cat >> confdefs.h <<\EOF
7780 #define LWLIB_USES_ATHENA 1
7781 EOF
7782 }
7783
7784   { test "$extra_verbose" = "yes" && cat << \EOF
7785     Defining NEED_ATHENA
7786 EOF
7787 cat >> confdefs.h <<\EOF
7788 #define NEED_ATHENA 1
7789 EOF
7790 }
7791
7792   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7793   libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
7794 esac
7795
7796 case "$all_widgets" in *motif* )
7797   { test "$extra_verbose" = "yes" && cat << \EOF
7798     Defining LWLIB_USES_MOTIF
7799 EOF
7800 cat >> confdefs.h <<\EOF
7801 #define LWLIB_USES_MOTIF 1
7802 EOF
7803 }
7804
7805   { test "$extra_verbose" = "yes" && cat << \EOF
7806     Defining NEED_MOTIF
7807 EOF
7808 cat >> confdefs.h <<\EOF
7809 #define NEED_MOTIF 1
7810 EOF
7811 }
7812
7813   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
7814   need_motif=yes ;;
7815 esac
7816
7817 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7818 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7819 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
7820 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
7821         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
7822 case "$with_widgets" in athena* )
7823         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;;
7824 esac
7825 case "$all_widgets" in *lucid* )
7826   { test "$extra_verbose" = "yes" && cat << \EOF
7827     Defining NEED_LUCID
7828 EOF
7829 cat >> confdefs.h <<\EOF
7830 #define NEED_LUCID 1
7831 EOF
7832 }
7833
7834   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
7835 esac
7836
7837
7838
7839 case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7840     Defining LWLIB_SCROLLBARS_ATHENA
7841 EOF
7842 cat >> confdefs.h <<\EOF
7843 #define LWLIB_SCROLLBARS_ATHENA 1
7844 EOF
7845 }
7846 ;; esac
7847 case "$with_dialogs"    in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7848     Defining LWLIB_DIALOGS_ATHENA
7849 EOF
7850 cat >> confdefs.h <<\EOF
7851 #define LWLIB_DIALOGS_ATHENA 1
7852 EOF
7853 }
7854    ;; esac
7855 test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7856     Defining LWLIB_SCROLLBARS_ATHENA3D
7857 EOF
7858 cat >> confdefs.h <<\EOF
7859 #define LWLIB_SCROLLBARS_ATHENA3D 1
7860 EOF
7861 }
7862
7863 test "$with_dialogs"    = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7864     Defining LWLIB_DIALOGS_ATHENA3D
7865 EOF
7866 cat >> confdefs.h <<\EOF
7867 #define LWLIB_DIALOGS_ATHENA3D 1
7868 EOF
7869 }
7870
7871 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7872     Defining LWLIB_WIDGETS_ATHENA
7873 EOF
7874 cat >> confdefs.h <<\EOF
7875 #define LWLIB_WIDGETS_ATHENA 1
7876 EOF
7877 }
7878 ;; esac
7879 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
7880         { test "$extra_verbose" = "yes" && cat << \EOF
7881     Defining LWLIB_TABS_LUCID
7882 EOF
7883 cat >> confdefs.h <<\EOF
7884 #define LWLIB_TABS_LUCID 1
7885 EOF
7886 }
7887
7888
7889 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7890     Defining HAVE_MENUBARS
7891 EOF
7892 cat >> confdefs.h <<\EOF
7893 #define HAVE_MENUBARS 1
7894 EOF
7895 }
7896
7897 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7898     Defining HAVE_SCROLLBARS
7899 EOF
7900 cat >> confdefs.h <<\EOF
7901 #define HAVE_SCROLLBARS 1
7902 EOF
7903 }
7904
7905 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7906     Defining HAVE_DIALOGS
7907 EOF
7908 cat >> confdefs.h <<\EOF
7909 #define HAVE_DIALOGS 1
7910 EOF
7911 }
7912
7913 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7914     Defining HAVE_TOOLBARS
7915 EOF
7916 cat >> confdefs.h <<\EOF
7917 #define HAVE_TOOLBARS 1
7918 EOF
7919 }
7920
7921 test "$with_widgets"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7922     Defining HAVE_WIDGETS
7923 EOF
7924 cat >> confdefs.h <<\EOF
7925 #define HAVE_WIDGETS 1
7926 EOF
7927 }
7928
7929
7930 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7931     Defining LWLIB_MENUBARS_LUCID
7932 EOF
7933 cat >> confdefs.h <<\EOF
7934 #define LWLIB_MENUBARS_LUCID 1
7935 EOF
7936 }
7937
7938 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7939     Defining LWLIB_SCROLLBARS_LUCID
7940 EOF
7941 cat >> confdefs.h <<\EOF
7942 #define LWLIB_SCROLLBARS_LUCID 1
7943 EOF
7944 }
7945
7946
7947 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7948     Defining LWLIB_MENUBARS_MOTIF
7949 EOF
7950 cat >> confdefs.h <<\EOF
7951 #define LWLIB_MENUBARS_MOTIF 1
7952 EOF
7953 }
7954
7955 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7956     Defining LWLIB_SCROLLBARS_MOTIF
7957 EOF
7958 cat >> confdefs.h <<\EOF
7959 #define LWLIB_SCROLLBARS_MOTIF 1
7960 EOF
7961 }
7962
7963 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7964     Defining LWLIB_DIALOGS_MOTIF
7965 EOF
7966 cat >> confdefs.h <<\EOF
7967 #define LWLIB_DIALOGS_MOTIF 1
7968 EOF
7969 }
7970
7971 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7972     Defining LWLIB_WIDGETS_MOTIF
7973 EOF
7974 cat >> confdefs.h <<\EOF
7975 #define LWLIB_WIDGETS_MOTIF 1
7976 EOF
7977 }
7978
7979
7980 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
7981    echo "    xemacs will be linked with \"menubar.o\""
7982  fi
7983 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
7984    echo "    xemacs will be linked with \"scrollbar.o\""
7985  fi
7986 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
7987    echo "    xemacs will be linked with \"dialog.o\""
7988  fi
7989 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
7990    echo "    xemacs will be linked with \"toolbar.o\""
7991  fi
7992
7993 if test "$with_x11" = "yes"; then
7994   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
7995    echo "    xemacs will be linked with \"menubar-x.o\""
7996  fi
7997   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7998    echo "    xemacs will be linked with \"scrollbar-x.o\""
7999  fi
8000   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
8001    echo "    xemacs will be linked with \"dialog-x.o\""
8002  fi
8003   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8004    echo "    xemacs will be linked with \"toolbar-x.o\""
8005  fi
8006   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8007    echo "    xemacs will be linked with \"gui-x.o\""
8008  fi
8009 fi
8010
8011
8012 test -z "$with_mule" && with_mule=no
8013 test -z "$with_file_coding" && with_file_coding=no
8014
8015
8016 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8017   { test "$extra_verbose" = "yes" && cat << \EOF
8018     Defining FILE_CODING
8019 EOF
8020 cat >> confdefs.h <<\EOF
8021 #define FILE_CODING 1
8022 EOF
8023 }
8024
8025   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8026    echo "    xemacs will be linked with \"file-coding.o\""
8027  fi
8028 fi
8029
8030 if test "$with_mule" = "yes" ; then
8031   echo "checking for Mule-related features" 1>&6
8032 echo "configure:8033: checking for Mule-related features" >&5
8033   { test "$extra_verbose" = "yes" && cat << \EOF
8034     Defining MULE
8035 EOF
8036 cat >> confdefs.h <<\EOF
8037 #define MULE 1
8038 EOF
8039 }
8040
8041   { test "$extra_verbose" = "yes" && cat << \EOF
8042     Defining FILE_CODING
8043 EOF
8044 cat >> confdefs.h <<\EOF
8045 #define FILE_CODING 1
8046 EOF
8047 }
8048
8049   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
8050    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
8051  fi
8052   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
8053     { test "$extra_verbose" = "yes" && cat << \EOF
8054     Defining TEXT_CODING
8055 EOF
8056 cat >> confdefs.h <<\EOF
8057 #define TEXT_CODING 1
8058 EOF
8059 }
8060
8061     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
8062    echo "    xemacs will be linked with \"text-coding.o\""
8063  fi
8064   else
8065     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8066    echo "    xemacs will be linked with \"file-coding.o\""
8067  fi
8068   fi
8069     for ac_hdr in libintl.h
8070 do
8071 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8072 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8073 echo "configure:8074: checking for $ac_hdr" >&5
8074
8075 cat > conftest.$ac_ext <<EOF
8076 #line 8077 "configure"
8077 #include "confdefs.h"
8078 #include <$ac_hdr>
8079 EOF
8080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8081 { (eval echo configure:8082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8083 if test -z "$ac_err"; then
8084   rm -rf conftest*
8085   eval "ac_cv_header_$ac_safe=yes"
8086 else
8087   echo "$ac_err" >&5
8088   echo "configure: failed program was:" >&5
8089   cat conftest.$ac_ext >&5
8090   rm -rf conftest*
8091   eval "ac_cv_header_$ac_safe=no"
8092 fi
8093 rm -f conftest*
8094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8095   echo "$ac_t""yes" 1>&6
8096     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8097   { test "$extra_verbose" = "yes" && cat << EOF
8098     Defining $ac_tr_hdr
8099 EOF
8100 cat >> confdefs.h <<EOF
8101 #define $ac_tr_hdr 1
8102 EOF
8103 }
8104  
8105 else
8106   echo "$ac_t""no" 1>&6
8107 fi
8108 done
8109
8110   
8111 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
8112 echo "configure:8113: checking for strerror in -lintl" >&5
8113 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
8114
8115 xe_check_libs=" -lintl "
8116 cat > conftest.$ac_ext <<EOF
8117 #line 8118 "configure"
8118 #include "confdefs.h"
8119 /* Override any gcc2 internal prototype to avoid an error.  */
8120 /* We use char because int might match the return type of a gcc2
8121     builtin and then its argument prototype would still apply.  */
8122 char strerror();
8123
8124 int main() {
8125 strerror()
8126 ; return 0; }
8127 EOF
8128 if { (eval echo configure:8129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8129   rm -rf conftest*
8130   eval "ac_cv_lib_$ac_lib_var=yes"
8131 else
8132   echo "configure: failed program was:" >&5
8133   cat conftest.$ac_ext >&5
8134   rm -rf conftest*
8135   eval "ac_cv_lib_$ac_lib_var=no"
8136 fi
8137 rm -f conftest*
8138 xe_check_libs=""
8139
8140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8141   echo "$ac_t""yes" 1>&6
8142     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8143     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8144   { test "$extra_verbose" = "yes" && cat << EOF
8145     Defining $ac_tr_lib
8146 EOF
8147 cat >> confdefs.h <<EOF
8148 #define $ac_tr_lib 1
8149 EOF
8150 }
8151
8152   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
8153
8154 else
8155   echo "$ac_t""no" 1>&6
8156 fi
8157
8158
8159
8160   if test "$with_utf_2000" = "yes" ; then
8161     { test "$extra_verbose" = "yes" && cat << \EOF
8162     Defining CHAR_IS_UCS4
8163 EOF
8164 cat >> confdefs.h <<\EOF
8165 #define CHAR_IS_UCS4 1
8166 EOF
8167 }
8168
8169     { test "$extra_verbose" = "yes" && cat << \EOF
8170     Defining UTF2000
8171 EOF
8172 cat >> confdefs.h <<\EOF
8173 #define UTF2000 1
8174 EOF
8175 }
8176
8177   fi
8178
8179   echo "checking for Mule input methods" 1>&6
8180 echo "configure:8181: checking for Mule input methods" >&5
8181         case "$with_xim" in "" | "yes" )
8182     echo "checking for XIM" 1>&6
8183 echo "configure:8184: checking for XIM" >&5
8184     
8185 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
8186 echo "configure:8187: checking for XOpenIM in -lX11" >&5
8187 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
8188
8189 xe_check_libs=" -lX11 "
8190 cat > conftest.$ac_ext <<EOF
8191 #line 8192 "configure"
8192 #include "confdefs.h"
8193 /* Override any gcc2 internal prototype to avoid an error.  */
8194 /* We use char because int might match the return type of a gcc2
8195     builtin and then its argument prototype would still apply.  */
8196 char XOpenIM();
8197
8198 int main() {
8199 XOpenIM()
8200 ; return 0; }
8201 EOF
8202 if { (eval echo configure:8203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8203   rm -rf conftest*
8204   eval "ac_cv_lib_$ac_lib_var=yes"
8205 else
8206   echo "configure: failed program was:" >&5
8207   cat conftest.$ac_ext >&5
8208   rm -rf conftest*
8209   eval "ac_cv_lib_$ac_lib_var=no"
8210 fi
8211 rm -f conftest*
8212 xe_check_libs=""
8213
8214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8215   echo "$ac_t""yes" 1>&6
8216   with_xim=xlib
8217 else
8218   echo "$ac_t""no" 1>&6
8219 with_xim=no
8220 fi
8221
8222
8223         if test "$have_motif $have_lesstif" = "yes no"; then
8224       
8225 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
8226 echo "configure:8227: checking for XmImMbLookupString in -lXm" >&5
8227 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
8228
8229 xe_check_libs=" -lXm "
8230 cat > conftest.$ac_ext <<EOF
8231 #line 8232 "configure"
8232 #include "confdefs.h"
8233 /* Override any gcc2 internal prototype to avoid an error.  */
8234 /* We use char because int might match the return type of a gcc2
8235     builtin and then its argument prototype would still apply.  */
8236 char XmImMbLookupString();
8237
8238 int main() {
8239 XmImMbLookupString()
8240 ; return 0; }
8241 EOF
8242 if { (eval echo configure:8243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8243   rm -rf conftest*
8244   eval "ac_cv_lib_$ac_lib_var=yes"
8245 else
8246   echo "configure: failed program was:" >&5
8247   cat conftest.$ac_ext >&5
8248   rm -rf conftest*
8249   eval "ac_cv_lib_$ac_lib_var=no"
8250 fi
8251 rm -f conftest*
8252 xe_check_libs=""
8253
8254 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8255   echo "$ac_t""yes" 1>&6
8256   with_xim=motif
8257 else
8258   echo "$ac_t""no" 1>&6
8259 fi
8260
8261
8262     fi ;;
8263   esac
8264   if test "$with_xim" != "no"; then
8265     { test "$extra_verbose" = "yes" && cat << \EOF
8266     Defining HAVE_XIM
8267 EOF
8268 cat >> confdefs.h <<\EOF
8269 #define HAVE_XIM 1
8270 EOF
8271 }
8272
8273     if test "$with_xim" = "xlib"; then
8274       { test "$extra_verbose" = "yes" && cat << \EOF
8275     Defining XIM_XLIB
8276 EOF
8277 cat >> confdefs.h <<\EOF
8278 #define XIM_XLIB 1
8279 EOF
8280 }
8281
8282       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
8283    echo "    xemacs will be linked with \"input-method-xlib.o\""
8284  fi
8285     fi
8286     if test "$with_xim" = "motif"; then
8287       { test "$extra_verbose" = "yes" && cat << \EOF
8288     Defining XIM_MOTIF
8289 EOF
8290 cat >> confdefs.h <<\EOF
8291 #define XIM_MOTIF 1
8292 EOF
8293 }
8294
8295       need_motif=yes
8296       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8297    echo "    xemacs will be linked with \"input-method-motif.o\""
8298  fi
8299     fi
8300     if test "$with_xim" = "motif"; then
8301       with_xfs=no
8302     fi
8303   fi
8304
8305     if test "$with_xfs" = "yes" ; then
8306     echo "checking for XFontSet" 1>&6
8307 echo "configure:8308: checking for XFontSet" >&5
8308     
8309 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8310 echo "configure:8311: checking for XmbDrawString in -lX11" >&5
8311 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8312
8313 xe_check_libs=" -lX11 "
8314 cat > conftest.$ac_ext <<EOF
8315 #line 8316 "configure"
8316 #include "confdefs.h"
8317 /* Override any gcc2 internal prototype to avoid an error.  */
8318 /* We use char because int might match the return type of a gcc2
8319     builtin and then its argument prototype would still apply.  */
8320 char XmbDrawString();
8321
8322 int main() {
8323 XmbDrawString()
8324 ; return 0; }
8325 EOF
8326 if { (eval echo configure:8327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8327   rm -rf conftest*
8328   eval "ac_cv_lib_$ac_lib_var=yes"
8329 else
8330   echo "configure: failed program was:" >&5
8331   cat conftest.$ac_ext >&5
8332   rm -rf conftest*
8333   eval "ac_cv_lib_$ac_lib_var=no"
8334 fi
8335 rm -f conftest*
8336 xe_check_libs=""
8337
8338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8339   echo "$ac_t""yes" 1>&6
8340   :
8341 else
8342   echo "$ac_t""no" 1>&6
8343 with_xfs=no
8344 fi
8345
8346
8347     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8348       { test "$extra_verbose" = "yes" && cat << \EOF
8349     Defining USE_XFONTSET
8350 EOF
8351 cat >> confdefs.h <<\EOF
8352 #define USE_XFONTSET 1
8353 EOF
8354 }
8355
8356       if test "$with_xim" = "no" ; then
8357         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8358    echo "    xemacs will be linked with \"input-method-xfs.o\""
8359  fi
8360       fi
8361     fi
8362   fi 
8363     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8364   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8365 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8366 echo "configure:8367: checking for wnn/jllib.h" >&5
8367
8368 cat > conftest.$ac_ext <<EOF
8369 #line 8370 "configure"
8370 #include "confdefs.h"
8371 #include <wnn/jllib.h>
8372 EOF
8373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8374 { (eval echo configure:8375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8376 if test -z "$ac_err"; then
8377   rm -rf conftest*
8378   eval "ac_cv_header_$ac_safe=yes"
8379 else
8380   echo "$ac_err" >&5
8381   echo "configure: failed program was:" >&5
8382   cat conftest.$ac_ext >&5
8383   rm -rf conftest*
8384   eval "ac_cv_header_$ac_safe=no"
8385 fi
8386 rm -f conftest*
8387 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8388   echo "$ac_t""yes" 1>&6
8389   :
8390 else
8391   echo "$ac_t""no" 1>&6
8392 with_wnn=no
8393 fi
8394  }
8395     if test "$with_wnn" != "no"; then
8396     for ac_func in crypt
8397 do
8398 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8399 echo "configure:8400: checking for $ac_func" >&5
8400
8401 cat > conftest.$ac_ext <<EOF
8402 #line 8403 "configure"
8403 #include "confdefs.h"
8404 /* System header to define __stub macros and hopefully few prototypes,
8405     which can conflict with char $ac_func(); below.  */
8406 #include <assert.h>
8407 /* Override any gcc2 internal prototype to avoid an error.  */
8408 /* We use char because int might match the return type of a gcc2
8409     builtin and then its argument prototype would still apply.  */
8410 char $ac_func();
8411
8412 int main() {
8413
8414 /* The GNU C library defines this for functions which it implements
8415     to always fail with ENOSYS.  Some functions are actually named
8416     something starting with __ and the normal name is an alias.  */
8417 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8418 choke me
8419 #else
8420 $ac_func();
8421 #endif
8422
8423 ; return 0; }
8424 EOF
8425 if { (eval echo configure:8426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8426   rm -rf conftest*
8427   eval "ac_cv_func_$ac_func=yes"
8428 else
8429   echo "configure: failed program was:" >&5
8430   cat conftest.$ac_ext >&5
8431   rm -rf conftest*
8432   eval "ac_cv_func_$ac_func=no"
8433 fi
8434 rm -f conftest*
8435
8436 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8437   echo "$ac_t""yes" 1>&6
8438     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8439   { test "$extra_verbose" = "yes" && cat << EOF
8440     Defining $ac_tr_func
8441 EOF
8442 cat >> confdefs.h <<EOF
8443 #define $ac_tr_func 1
8444 EOF
8445 }
8446  
8447 else
8448   echo "$ac_t""no" 1>&6
8449 fi
8450 done
8451
8452     test "$ac_cv_func_crypt" != "yes" && { 
8453 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8454 echo "configure:8455: checking for crypt in -lcrypt" >&5
8455 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8456
8457 xe_check_libs=" -lcrypt "
8458 cat > conftest.$ac_ext <<EOF
8459 #line 8460 "configure"
8460 #include "confdefs.h"
8461 /* Override any gcc2 internal prototype to avoid an error.  */
8462 /* We use char because int might match the return type of a gcc2
8463     builtin and then its argument prototype would still apply.  */
8464 char crypt();
8465
8466 int main() {
8467 crypt()
8468 ; return 0; }
8469 EOF
8470 if { (eval echo configure:8471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8471   rm -rf conftest*
8472   eval "ac_cv_lib_$ac_lib_var=yes"
8473 else
8474   echo "configure: failed program was:" >&5
8475   cat conftest.$ac_ext >&5
8476   rm -rf conftest*
8477   eval "ac_cv_lib_$ac_lib_var=no"
8478 fi
8479 rm -f conftest*
8480 xe_check_libs=""
8481
8482 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8483   echo "$ac_t""yes" 1>&6
8484     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8485     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8486   { test "$extra_verbose" = "yes" && cat << EOF
8487     Defining $ac_tr_lib
8488 EOF
8489 cat >> confdefs.h <<EOF
8490 #define $ac_tr_lib 1
8491 EOF
8492 }
8493
8494   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
8495
8496 else
8497   echo "$ac_t""no" 1>&6
8498 fi
8499
8500  }
8501   fi
8502     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
8503     
8504 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
8505 echo "configure:8506: checking for jl_dic_list_e in -lwnn" >&5
8506 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8507
8508 xe_check_libs=" -lwnn "
8509 cat > conftest.$ac_ext <<EOF
8510 #line 8511 "configure"
8511 #include "confdefs.h"
8512 /* Override any gcc2 internal prototype to avoid an error.  */
8513 /* We use char because int might match the return type of a gcc2
8514     builtin and then its argument prototype would still apply.  */
8515 char jl_dic_list_e();
8516
8517 int main() {
8518 jl_dic_list_e()
8519 ; return 0; }
8520 EOF
8521 if { (eval echo configure:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8522   rm -rf conftest*
8523   eval "ac_cv_lib_$ac_lib_var=yes"
8524 else
8525   echo "configure: failed program was:" >&5
8526   cat conftest.$ac_ext >&5
8527   rm -rf conftest*
8528   eval "ac_cv_lib_$ac_lib_var=no"
8529 fi
8530 rm -f conftest*
8531 xe_check_libs=""
8532
8533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8534   echo "$ac_t""yes" 1>&6
8535   libwnn=wnn
8536 else
8537   echo "$ac_t""no" 1>&6
8538 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
8539 echo "configure:8540: checking for jl_dic_list_e in -lwnn4" >&5
8540 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8541
8542 xe_check_libs=" -lwnn4 "
8543 cat > conftest.$ac_ext <<EOF
8544 #line 8545 "configure"
8545 #include "confdefs.h"
8546 /* Override any gcc2 internal prototype to avoid an error.  */
8547 /* We use char because int might match the return type of a gcc2
8548     builtin and then its argument prototype would still apply.  */
8549 char jl_dic_list_e();
8550
8551 int main() {
8552 jl_dic_list_e()
8553 ; return 0; }
8554 EOF
8555 if { (eval echo configure:8556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8556   rm -rf conftest*
8557   eval "ac_cv_lib_$ac_lib_var=yes"
8558 else
8559   echo "configure: failed program was:" >&5
8560   cat conftest.$ac_ext >&5
8561   rm -rf conftest*
8562   eval "ac_cv_lib_$ac_lib_var=no"
8563 fi
8564 rm -f conftest*
8565 xe_check_libs=""
8566
8567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8568   echo "$ac_t""yes" 1>&6
8569   libwnn=wnn4
8570 else
8571   echo "$ac_t""no" 1>&6
8572 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
8573 echo "configure:8574: checking for jl_dic_list_e in -lwnn6" >&5
8574 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8575
8576 xe_check_libs=" -lwnn6 "
8577 cat > conftest.$ac_ext <<EOF
8578 #line 8579 "configure"
8579 #include "confdefs.h"
8580 /* Override any gcc2 internal prototype to avoid an error.  */
8581 /* We use char because int might match the return type of a gcc2
8582     builtin and then its argument prototype would still apply.  */
8583 char jl_dic_list_e();
8584
8585 int main() {
8586 jl_dic_list_e()
8587 ; return 0; }
8588 EOF
8589 if { (eval echo configure:8590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8590   rm -rf conftest*
8591   eval "ac_cv_lib_$ac_lib_var=yes"
8592 else
8593   echo "configure: failed program was:" >&5
8594   cat conftest.$ac_ext >&5
8595   rm -rf conftest*
8596   eval "ac_cv_lib_$ac_lib_var=no"
8597 fi
8598 rm -f conftest*
8599 xe_check_libs=""
8600
8601 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8602   echo "$ac_t""yes" 1>&6
8603   libwnn=wnn6
8604 else
8605   echo "$ac_t""no" 1>&6
8606 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
8607 echo "configure:8608: checking for dic_list_e in -lwnn6_fromsrc" >&5
8608 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
8609
8610 xe_check_libs=" -lwnn6_fromsrc "
8611 cat > conftest.$ac_ext <<EOF
8612 #line 8613 "configure"
8613 #include "confdefs.h"
8614 /* Override any gcc2 internal prototype to avoid an error.  */
8615 /* We use char because int might match the return type of a gcc2
8616     builtin and then its argument prototype would still apply.  */
8617 char dic_list_e();
8618
8619 int main() {
8620 dic_list_e()
8621 ; return 0; }
8622 EOF
8623 if { (eval echo configure:8624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8624   rm -rf conftest*
8625   eval "ac_cv_lib_$ac_lib_var=yes"
8626 else
8627   echo "configure: failed program was:" >&5
8628   cat conftest.$ac_ext >&5
8629   rm -rf conftest*
8630   eval "ac_cv_lib_$ac_lib_var=no"
8631 fi
8632 rm -f conftest*
8633 xe_check_libs=""
8634
8635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8636   echo "$ac_t""yes" 1>&6
8637   libwnn=wnn6_fromsrc
8638 else
8639   echo "$ac_t""no" 1>&6
8640 with_wnn=no
8641 fi
8642
8643
8644 fi
8645
8646
8647 fi
8648
8649
8650 fi
8651
8652
8653   fi
8654   test -z "$with_wnn" && with_wnn=yes
8655   if test "$with_wnn" = "yes"; then
8656     { test "$extra_verbose" = "yes" && cat << \EOF
8657     Defining HAVE_WNN
8658 EOF
8659 cat >> confdefs.h <<\EOF
8660 #define HAVE_WNN 1
8661 EOF
8662 }
8663
8664     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
8665     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
8666    echo "    xemacs will be linked with \"mule-wnnfns.o\""
8667  fi
8668     if test "$with_wnn6" != "no"; then
8669       
8670 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
8671 echo "configure:8672: checking for jl_fi_dic_list in -l$libwnn" >&5
8672 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
8673
8674 xe_check_libs=" -l$libwnn "
8675 cat > conftest.$ac_ext <<EOF
8676 #line 8677 "configure"
8677 #include "confdefs.h"
8678 /* Override any gcc2 internal prototype to avoid an error.  */
8679 /* We use char because int might match the return type of a gcc2
8680     builtin and then its argument prototype would still apply.  */
8681 char jl_fi_dic_list();
8682
8683 int main() {
8684 jl_fi_dic_list()
8685 ; return 0; }
8686 EOF
8687 if { (eval echo configure:8688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8688   rm -rf conftest*
8689   eval "ac_cv_lib_$ac_lib_var=yes"
8690 else
8691   echo "configure: failed program was:" >&5
8692   cat conftest.$ac_ext >&5
8693   rm -rf conftest*
8694   eval "ac_cv_lib_$ac_lib_var=no"
8695 fi
8696 rm -f conftest*
8697 xe_check_libs=""
8698
8699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8700   echo "$ac_t""yes" 1>&6
8701   with_wnn6=yes
8702 else
8703   echo "$ac_t""no" 1>&6
8704 fi
8705
8706
8707       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
8708     Defining WNN6
8709 EOF
8710 cat >> confdefs.h <<\EOF
8711 #define WNN6 1
8712 EOF
8713 }
8714
8715     fi
8716   fi
8717
8718     canna_includes_found=no
8719   if test "$with_canna" != "no"; then
8720     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8721 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8722 echo "configure:8723: checking for canna/jrkanji.h" >&5
8723
8724 cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727 #include <canna/jrkanji.h>
8728 EOF
8729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8730 { (eval echo configure:8731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8732 if test -z "$ac_err"; then
8733   rm -rf conftest*
8734   eval "ac_cv_header_$ac_safe=yes"
8735 else
8736   echo "$ac_err" >&5
8737   echo "configure: failed program was:" >&5
8738   cat conftest.$ac_ext >&5
8739   rm -rf conftest*
8740   eval "ac_cv_header_$ac_safe=no"
8741 fi
8742 rm -f conftest*
8743 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8744   echo "$ac_t""yes" 1>&6
8745   canna_includes_found=yes
8746 else
8747   echo "$ac_t""no" 1>&6
8748 fi
8749
8750   fi
8751   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
8752       -d "/usr/local/canna/include"; then
8753     save_c_switch_site="$c_switch_site"
8754     c_switch_site="$c_switch_site -I/usr/local/canna/include"
8755     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8756 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8757 echo "configure:8758: checking for canna/jrkanji.h" >&5
8758
8759 cat > conftest.$ac_ext <<EOF
8760 #line 8761 "configure"
8761 #include "confdefs.h"
8762 #include <canna/jrkanji.h>
8763 EOF
8764 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8765 { (eval echo configure:8766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8766 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8767 if test -z "$ac_err"; then
8768   rm -rf conftest*
8769   eval "ac_cv_header_$ac_safe=yes"
8770 else
8771   echo "$ac_err" >&5
8772   echo "configure: failed program was:" >&5
8773   cat conftest.$ac_ext >&5
8774   rm -rf conftest*
8775   eval "ac_cv_header_$ac_safe=no"
8776 fi
8777 rm -f conftest*
8778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8779   echo "$ac_t""yes" 1>&6
8780   canna_includes_found=yes
8781 else
8782   echo "$ac_t""no" 1>&6
8783 fi
8784
8785     if test "$canna_includes_found" != "yes"; then
8786       c_switch_site="$save_c_switch_site"
8787       with_canna="no"
8788     fi
8789   fi
8790
8791   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
8792 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
8793 echo "configure:8794: checking for canna/RK.h" >&5
8794
8795 cat > conftest.$ac_ext <<EOF
8796 #line 8797 "configure"
8797 #include "confdefs.h"
8798 #include <canna/RK.h>
8799 EOF
8800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8801 { (eval echo configure:8802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8803 if test -z "$ac_err"; then
8804   rm -rf conftest*
8805   eval "ac_cv_header_$ac_safe=yes"
8806 else
8807   echo "$ac_err" >&5
8808   echo "configure: failed program was:" >&5
8809   cat conftest.$ac_ext >&5
8810   rm -rf conftest*
8811   eval "ac_cv_header_$ac_safe=no"
8812 fi
8813 rm -f conftest*
8814 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8815   echo "$ac_t""yes" 1>&6
8816   :
8817 else
8818   echo "$ac_t""no" 1>&6
8819 with_canna=no
8820 fi
8821  }
8822   test -z "$with_canna" && { 
8823 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
8824 echo "configure:8825: checking for RkBgnBun in -lRKC" >&5
8825 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
8826
8827 xe_check_libs=" -lRKC "
8828 cat > conftest.$ac_ext <<EOF
8829 #line 8830 "configure"
8830 #include "confdefs.h"
8831 /* Override any gcc2 internal prototype to avoid an error.  */
8832 /* We use char because int might match the return type of a gcc2
8833     builtin and then its argument prototype would still apply.  */
8834 char RkBgnBun();
8835
8836 int main() {
8837 RkBgnBun()
8838 ; return 0; }
8839 EOF
8840 if { (eval echo configure:8841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8841   rm -rf conftest*
8842   eval "ac_cv_lib_$ac_lib_var=yes"
8843 else
8844   echo "configure: failed program was:" >&5
8845   cat conftest.$ac_ext >&5
8846   rm -rf conftest*
8847   eval "ac_cv_lib_$ac_lib_var=no"
8848 fi
8849 rm -f conftest*
8850 xe_check_libs=""
8851
8852 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8853   echo "$ac_t""yes" 1>&6
8854   :
8855 else
8856   echo "$ac_t""no" 1>&6
8857 with_canna=no
8858 fi
8859
8860  }
8861   test -z "$with_canna" && { 
8862 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
8863 echo "configure:8864: checking for jrKanjiControl in -lcanna" >&5
8864 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
8865
8866 xe_check_libs=" -lcanna "
8867 cat > conftest.$ac_ext <<EOF
8868 #line 8869 "configure"
8869 #include "confdefs.h"
8870 /* Override any gcc2 internal prototype to avoid an error.  */
8871 /* We use char because int might match the return type of a gcc2
8872     builtin and then its argument prototype would still apply.  */
8873 char jrKanjiControl();
8874
8875 int main() {
8876 jrKanjiControl()
8877 ; return 0; }
8878 EOF
8879 if { (eval echo configure:8880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8880   rm -rf conftest*
8881   eval "ac_cv_lib_$ac_lib_var=yes"
8882 else
8883   echo "configure: failed program was:" >&5
8884   cat conftest.$ac_ext >&5
8885   rm -rf conftest*
8886   eval "ac_cv_lib_$ac_lib_var=no"
8887 fi
8888 rm -f conftest*
8889 xe_check_libs=""
8890
8891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8892   echo "$ac_t""yes" 1>&6
8893   :
8894 else
8895   echo "$ac_t""no" 1>&6
8896 with_canna=no
8897 fi
8898
8899  }
8900   test -z "$with_canna" && with_canna=yes
8901   if test "$with_canna" = "yes"; then
8902     { test "$extra_verbose" = "yes" && cat << \EOF
8903     Defining HAVE_CANNA
8904 EOF
8905 cat >> confdefs.h <<\EOF
8906 #define HAVE_CANNA 1
8907 EOF
8908 }
8909
8910     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
8911     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
8912    echo "    xemacs will be linked with \"mule-canna.o\""
8913  fi
8914   fi
8915
8916 else   for feature in xim canna wnn; do
8917     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
8918       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
8919     fi
8920     eval "with_${feature}=no"
8921   done
8922 fi 
8923
8924 if test "$need_motif" = "yes" ; then
8925   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
8926     
8927 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
8928 echo "configure:8929: checking for layout_object_getvalue in -li18n" >&5
8929 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
8930
8931 xe_check_libs=" -li18n "
8932 cat > conftest.$ac_ext <<EOF
8933 #line 8934 "configure"
8934 #include "confdefs.h"
8935 /* Override any gcc2 internal prototype to avoid an error.  */
8936 /* We use char because int might match the return type of a gcc2
8937     builtin and then its argument prototype would still apply.  */
8938 char layout_object_getvalue();
8939
8940 int main() {
8941 layout_object_getvalue()
8942 ; return 0; }
8943 EOF
8944 if { (eval echo configure:8945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8945   rm -rf conftest*
8946   eval "ac_cv_lib_$ac_lib_var=yes"
8947 else
8948   echo "configure: failed program was:" >&5
8949   cat conftest.$ac_ext >&5
8950   rm -rf conftest*
8951   eval "ac_cv_lib_$ac_lib_var=no"
8952 fi
8953 rm -f conftest*
8954 xe_check_libs=""
8955
8956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8957   echo "$ac_t""yes" 1>&6
8958   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
8959 else
8960   echo "$ac_t""no" 1>&6
8961 fi
8962
8963
8964   
8965 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
8966     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8967   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8968   
8969         runpath="" runpath_dirs=""
8970   if test -n "$LD_RUN_PATH"; then
8971     runpath="$LD_RUN_PATH"
8972   elif test "$GCC" = "yes"; then
8973         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
8974     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
8975     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
8976     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
8977       case "$arg" in P,* | -L* | -R* )
8978         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
8979           {
8980 xe_runpath_dir="$dir"
8981   test "$xe_runpath_dir" != "/lib"     -a \
8982         "$xe_runpath_dir" != "/usr/lib" -a \
8983         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8984   eval "$xe_add_unique_runpath_dir"
8985 }
8986         done ;;
8987       esac
8988     done
8989     ld_switch_run="$ld_switch_run_save"
8990     rm -f conftest*
8991   else
8992         for arg in $ld_switch_site $ld_switch_x_site; do
8993       case "$arg" in -L*) {
8994 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
8995   test "$xe_runpath_dir" != "/lib"     -a \
8996         "$xe_runpath_dir" != "/usr/lib" -a \
8997         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8998   eval "$xe_add_unique_runpath_dir"
8999 };; esac
9000     done
9001         if test "$opsys $need_motif" = "sol2 yes"; then
9002       xe_runpath_dir="/opt/SUNWdt/lib";
9003       eval "$xe_add_unique_runpath_dir";
9004     fi
9005   fi 
9006   if test -n "$runpath"; then
9007     ld_switch_run="${dash_r}${runpath}"
9008     
9009 if test "$GCC" = "yes"; then
9010   set x $ld_switch_run; shift; ld_switch_run=""
9011   while test -n "$1"; do
9012     case $1 in
9013       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9014       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9015       -Xlinker* ) ;;
9016       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9017     esac
9018     shift
9019   done
9020 fi
9021     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9022   fi
9023 fi
9024
9025 fi
9026
9027 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
9028 do
9029 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9030 echo "configure:9031: checking for $ac_func" >&5
9031
9032 cat > conftest.$ac_ext <<EOF
9033 #line 9034 "configure"
9034 #include "confdefs.h"
9035 /* System header to define __stub macros and hopefully few prototypes,
9036     which can conflict with char $ac_func(); below.  */
9037 #include <assert.h>
9038 /* Override any gcc2 internal prototype to avoid an error.  */
9039 /* We use char because int might match the return type of a gcc2
9040     builtin and then its argument prototype would still apply.  */
9041 char $ac_func();
9042
9043 int main() {
9044
9045 /* The GNU C library defines this for functions which it implements
9046     to always fail with ENOSYS.  Some functions are actually named
9047     something starting with __ and the normal name is an alias.  */
9048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9049 choke me
9050 #else
9051 $ac_func();
9052 #endif
9053
9054 ; return 0; }
9055 EOF
9056 if { (eval echo configure:9057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9057   rm -rf conftest*
9058   eval "ac_cv_func_$ac_func=yes"
9059 else
9060   echo "configure: failed program was:" >&5
9061   cat conftest.$ac_ext >&5
9062   rm -rf conftest*
9063   eval "ac_cv_func_$ac_func=no"
9064 fi
9065 rm -f conftest*
9066
9067 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9068   echo "$ac_t""yes" 1>&6
9069     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9070   { test "$extra_verbose" = "yes" && cat << EOF
9071     Defining $ac_tr_func
9072 EOF
9073 cat >> confdefs.h <<EOF
9074 #define $ac_tr_func 1
9075 EOF
9076 }
9077  
9078 else
9079   echo "$ac_t""no" 1>&6
9080 fi
9081 done
9082
9083
9084
9085 case "$opsys" in
9086   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9087    echo "    xemacs will be linked with \"realpath.o\""
9088  fi ;;
9089   * )
9090     case "$canonical" in
9091       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9092    echo "    xemacs will be linked with \"realpath.o\""
9093  fi ;;
9094       * ) for ac_func in realpath
9095 do
9096 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9097 echo "configure:9098: checking for $ac_func" >&5
9098
9099 cat > conftest.$ac_ext <<EOF
9100 #line 9101 "configure"
9101 #include "confdefs.h"
9102 /* System header to define __stub macros and hopefully few prototypes,
9103     which can conflict with char $ac_func(); below.  */
9104 #include <assert.h>
9105 /* Override any gcc2 internal prototype to avoid an error.  */
9106 /* We use char because int might match the return type of a gcc2
9107     builtin and then its argument prototype would still apply.  */
9108 char $ac_func();
9109
9110 int main() {
9111
9112 /* The GNU C library defines this for functions which it implements
9113     to always fail with ENOSYS.  Some functions are actually named
9114     something starting with __ and the normal name is an alias.  */
9115 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9116 choke me
9117 #else
9118 $ac_func();
9119 #endif
9120
9121 ; return 0; }
9122 EOF
9123 if { (eval echo configure:9124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9124   rm -rf conftest*
9125   eval "ac_cv_func_$ac_func=yes"
9126 else
9127   echo "configure: failed program was:" >&5
9128   cat conftest.$ac_ext >&5
9129   rm -rf conftest*
9130   eval "ac_cv_func_$ac_func=no"
9131 fi
9132 rm -f conftest*
9133
9134 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9135   echo "$ac_t""yes" 1>&6
9136     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9137   { test "$extra_verbose" = "yes" && cat << EOF
9138     Defining $ac_tr_func
9139 EOF
9140 cat >> confdefs.h <<EOF
9141 #define $ac_tr_func 1
9142 EOF
9143 }
9144  
9145 else
9146   echo "$ac_t""no" 1>&6
9147 fi
9148 done
9149
9150           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9151    echo "    xemacs will be linked with \"realpath.o\""
9152  fi ;;
9153     esac ;;
9154 esac
9155
9156 for ac_func in getloadavg
9157 do
9158 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9159 echo "configure:9160: checking for $ac_func" >&5
9160
9161 cat > conftest.$ac_ext <<EOF
9162 #line 9163 "configure"
9163 #include "confdefs.h"
9164 /* System header to define __stub macros and hopefully few prototypes,
9165     which can conflict with char $ac_func(); below.  */
9166 #include <assert.h>
9167 /* Override any gcc2 internal prototype to avoid an error.  */
9168 /* We use char because int might match the return type of a gcc2
9169     builtin and then its argument prototype would still apply.  */
9170 char $ac_func();
9171
9172 int main() {
9173
9174 /* The GNU C library defines this for functions which it implements
9175     to always fail with ENOSYS.  Some functions are actually named
9176     something starting with __ and the normal name is an alias.  */
9177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9178 choke me
9179 #else
9180 $ac_func();
9181 #endif
9182
9183 ; return 0; }
9184 EOF
9185 if { (eval echo configure:9186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9186   rm -rf conftest*
9187   eval "ac_cv_func_$ac_func=yes"
9188 else
9189   echo "configure: failed program was:" >&5
9190   cat conftest.$ac_ext >&5
9191   rm -rf conftest*
9192   eval "ac_cv_func_$ac_func=no"
9193 fi
9194 rm -f conftest*
9195
9196 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9197   echo "$ac_t""yes" 1>&6
9198     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9199   { test "$extra_verbose" = "yes" && cat << EOF
9200     Defining $ac_tr_func
9201 EOF
9202 cat >> confdefs.h <<EOF
9203 #define $ac_tr_func 1
9204 EOF
9205 }
9206  
9207 else
9208   echo "$ac_t""no" 1>&6
9209 fi
9210 done
9211
9212
9213 if test "$ac_cv_func_getloadavg" != "yes"
9214 then
9215   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
9216    echo "    xemacs will be linked with \"getloadavg.o\""
9217  fi
9218
9219     
9220 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
9221 echo "configure:9222: checking for kstat_open in -lkstat" >&5
9222 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
9223
9224 xe_check_libs=" -lkstat "
9225 cat > conftest.$ac_ext <<EOF
9226 #line 9227 "configure"
9227 #include "confdefs.h"
9228 /* Override any gcc2 internal prototype to avoid an error.  */
9229 /* We use char because int might match the return type of a gcc2
9230     builtin and then its argument prototype would still apply.  */
9231 char kstat_open();
9232
9233 int main() {
9234 kstat_open()
9235 ; return 0; }
9236 EOF
9237 if { (eval echo configure:9238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9238   rm -rf conftest*
9239   eval "ac_cv_lib_$ac_lib_var=yes"
9240 else
9241   echo "configure: failed program was:" >&5
9242   cat conftest.$ac_ext >&5
9243   rm -rf conftest*
9244   eval "ac_cv_lib_$ac_lib_var=no"
9245 fi
9246 rm -f conftest*
9247 xe_check_libs=""
9248
9249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9250   echo "$ac_t""yes" 1>&6
9251     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9252     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9253   { test "$extra_verbose" = "yes" && cat << EOF
9254     Defining $ac_tr_lib
9255 EOF
9256 cat >> confdefs.h <<EOF
9257 #define $ac_tr_lib 1
9258 EOF
9259 }
9260
9261   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
9262
9263 else
9264   echo "$ac_t""no" 1>&6
9265 fi
9266
9267
9268
9269     
9270 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
9271 echo "configure:9272: checking for kvm_read in -lkvm" >&5
9272 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
9273
9274 xe_check_libs=" -lkvm "
9275 cat > conftest.$ac_ext <<EOF
9276 #line 9277 "configure"
9277 #include "confdefs.h"
9278 /* Override any gcc2 internal prototype to avoid an error.  */
9279 /* We use char because int might match the return type of a gcc2
9280     builtin and then its argument prototype would still apply.  */
9281 char kvm_read();
9282
9283 int main() {
9284 kvm_read()
9285 ; return 0; }
9286 EOF
9287 if { (eval echo configure:9288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9288   rm -rf conftest*
9289   eval "ac_cv_lib_$ac_lib_var=yes"
9290 else
9291   echo "configure: failed program was:" >&5
9292   cat conftest.$ac_ext >&5
9293   rm -rf conftest*
9294   eval "ac_cv_lib_$ac_lib_var=no"
9295 fi
9296 rm -f conftest*
9297 xe_check_libs=""
9298
9299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9300   echo "$ac_t""yes" 1>&6
9301     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9302     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9303   { test "$extra_verbose" = "yes" && cat << EOF
9304     Defining $ac_tr_lib
9305 EOF
9306 cat >> confdefs.h <<EOF
9307 #define $ac_tr_lib 1
9308 EOF
9309 }
9310
9311   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9312
9313 else
9314   echo "$ac_t""no" 1>&6
9315 fi
9316
9317
9318 fi
9319
9320 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9321 echo "configure:9322: checking whether netdb declares h_errno" >&5
9322 cat > conftest.$ac_ext <<EOF
9323 #line 9324 "configure"
9324 #include "confdefs.h"
9325 #include <netdb.h>
9326 int main() {
9327 return h_errno;
9328 ; return 0; }
9329 EOF
9330 if { (eval echo configure:9331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9331   rm -rf conftest*
9332   echo "$ac_t""yes" 1>&6
9333    { test "$extra_verbose" = "yes" && cat << \EOF
9334     Defining HAVE_H_ERRNO
9335 EOF
9336 cat >> confdefs.h <<\EOF
9337 #define HAVE_H_ERRNO 1
9338 EOF
9339 }
9340
9341 else
9342   echo "configure: failed program was:" >&5
9343   cat conftest.$ac_ext >&5
9344   rm -rf conftest*
9345   echo "$ac_t""no" 1>&6
9346 fi
9347 rm -f conftest*
9348
9349 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9350 echo "configure:9351: checking for sigsetjmp" >&5
9351 cat > conftest.$ac_ext <<EOF
9352 #line 9353 "configure"
9353 #include "confdefs.h"
9354 #include <setjmp.h>
9355 int main() {
9356 sigjmp_buf bar; sigsetjmp (bar, 0);
9357 ; return 0; }
9358 EOF
9359 if { (eval echo configure:9360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9360   rm -rf conftest*
9361   echo "$ac_t""yes" 1>&6
9362    { test "$extra_verbose" = "yes" && cat << \EOF
9363     Defining HAVE_SIGSETJMP
9364 EOF
9365 cat >> confdefs.h <<\EOF
9366 #define HAVE_SIGSETJMP 1
9367 EOF
9368 }
9369
9370 else
9371   echo "configure: failed program was:" >&5
9372   cat conftest.$ac_ext >&5
9373   rm -rf conftest*
9374   echo "$ac_t""no" 1>&6
9375 fi
9376 rm -f conftest*
9377
9378 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9379 echo "configure:9380: checking whether localtime caches TZ" >&5
9380
9381 if test "$ac_cv_func_tzset" = "yes"; then
9382 cat > conftest.$ac_ext <<EOF
9383 #line 9384 "configure"
9384 #include "confdefs.h"
9385 #include <time.h>
9386 #if STDC_HEADERS
9387 # include <stdlib.h>
9388 #endif
9389 extern char **environ;
9390 unset_TZ ()
9391 {
9392   char **from, **to;
9393   for (to = from = environ; (*to = *from); from++)
9394     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9395       to++;
9396 }
9397 char TZ_GMT0[] = "TZ=GMT0";
9398 char TZ_PST8[] = "TZ=PST8";
9399 main()
9400 {
9401   time_t now = time ((time_t *) 0);
9402   int hour_GMT0, hour_unset;
9403   if (putenv (TZ_GMT0) != 0)
9404     exit (1);
9405   hour_GMT0 = localtime (&now)->tm_hour;
9406   unset_TZ ();
9407   hour_unset = localtime (&now)->tm_hour;
9408   if (putenv (TZ_PST8) != 0)
9409     exit (1);
9410   if (localtime (&now)->tm_hour == hour_GMT0)
9411     exit (1);
9412   unset_TZ ();
9413   if (localtime (&now)->tm_hour != hour_unset)
9414     exit (1);
9415   exit (0);
9416 }
9417 EOF
9418 if { (eval echo configure:9419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9419 then
9420   emacs_cv_localtime_cache=no
9421 else
9422   conftest_rc="$?"
9423   echo "configure: failed program was:" >&5
9424   cat conftest.$ac_ext >&5
9425   rm -fr conftest*
9426   emacs_cv_localtime_cache=yes
9427 fi
9428 rm -fr conftest*
9429 else
9430         # If we lack tzset, report that localtime does not cache TZ,
9431         # since we can't invalidate the cache if we don't have tzset.
9432         emacs_cv_localtime_cache=no
9433 fi
9434 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9435 if test $emacs_cv_localtime_cache = yes; then
9436   { test "$extra_verbose" = "yes" && cat << \EOF
9437     Defining LOCALTIME_CACHE
9438 EOF
9439 cat >> confdefs.h <<\EOF
9440 #define LOCALTIME_CACHE 1
9441 EOF
9442 }
9443
9444 fi
9445
9446 if test "$HAVE_TIMEVAL" = "yes"; then
9447 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9448 echo "configure:9449: checking whether gettimeofday accepts one or two arguments" >&5
9449 cat > conftest.$ac_ext <<EOF
9450 #line 9451 "configure"
9451 #include "confdefs.h"
9452
9453 #ifdef TIME_WITH_SYS_TIME
9454 #include <sys/time.h>
9455 #include <time.h>
9456 #else
9457 #ifdef HAVE_SYS_TIME_H
9458 #include <sys/time.h>
9459 #else
9460 #include <time.h>
9461 #endif
9462 #endif
9463   
9464 int main() {
9465
9466   struct timeval time;
9467   struct timezone dummy;
9468   gettimeofday (&time, &dummy);
9469
9470 ; return 0; }
9471 EOF
9472 if { (eval echo configure:9473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9473   rm -rf conftest*
9474   echo "$ac_t""two" 1>&6
9475 else
9476   echo "configure: failed program was:" >&5
9477   cat conftest.$ac_ext >&5
9478   rm -rf conftest*
9479   echo "$ac_t""one" 1>&6
9480    { test "$extra_verbose" = "yes" && cat << \EOF
9481     Defining GETTIMEOFDAY_ONE_ARGUMENT
9482 EOF
9483 cat >> confdefs.h <<\EOF
9484 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9485 EOF
9486 }
9487
9488 fi
9489 rm -f conftest*
9490 fi
9491
9492
9493 echo $ac_n "checking for inline""... $ac_c" 1>&6
9494 echo "configure:9495: checking for inline" >&5
9495
9496 ac_cv_c_inline=no
9497 for ac_kw in inline __inline__ __inline; do
9498   cat > conftest.$ac_ext <<EOF
9499 #line 9500 "configure"
9500 #include "confdefs.h"
9501
9502 int main() {
9503 } $ac_kw foo() {
9504 ; return 0; }
9505 EOF
9506 if { (eval echo configure:9507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9507   rm -rf conftest*
9508   ac_cv_c_inline=$ac_kw; break
9509 else
9510   echo "configure: failed program was:" >&5
9511   cat conftest.$ac_ext >&5
9512 fi
9513 rm -f conftest*
9514 done
9515
9516
9517 echo "$ac_t""$ac_cv_c_inline" 1>&6
9518 case "$ac_cv_c_inline" in
9519   inline | yes) ;;
9520   no) { test "$extra_verbose" = "yes" && cat << \EOF
9521     Defining inline = 
9522 EOF
9523 cat >> confdefs.h <<\EOF
9524 #define inline 
9525 EOF
9526 }
9527  ;;
9528   *)  { test "$extra_verbose" = "yes" && cat << EOF
9529     Defining inline = $ac_cv_c_inline
9530 EOF
9531 cat >> confdefs.h <<EOF
9532 #define inline $ac_cv_c_inline
9533 EOF
9534 }
9535  ;;
9536 esac
9537
9538 if test "$ac_cv_c_inline" != "no"; then
9539   { test "$extra_verbose" = "yes" && cat << \EOF
9540     Defining HAVE_INLINE
9541 EOF
9542 cat >> confdefs.h <<\EOF
9543 #define HAVE_INLINE 1
9544 EOF
9545 }
9546
9547   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
9548    echo "    xemacs will be linked with \"inline.o\""
9549  fi
9550 fi
9551
9552
9553 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9554 # for constant arguments.  Useless!
9555 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9556 echo "configure:9557: checking for working alloca.h" >&5
9557
9558 cat > conftest.$ac_ext <<EOF
9559 #line 9560 "configure"
9560 #include "confdefs.h"
9561 #include <alloca.h>
9562 int main() {
9563 char *p = alloca(2 * sizeof(int));
9564 ; return 0; }
9565 EOF
9566 if { (eval echo configure:9567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9567   rm -rf conftest*
9568   ac_cv_header_alloca_h=yes
9569 else
9570   echo "configure: failed program was:" >&5
9571   cat conftest.$ac_ext >&5
9572   rm -rf conftest*
9573   ac_cv_header_alloca_h=no
9574 fi
9575 rm -f conftest*
9576
9577 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9578 if test $ac_cv_header_alloca_h = yes; then
9579   { test "$extra_verbose" = "yes" && cat << \EOF
9580     Defining HAVE_ALLOCA_H
9581 EOF
9582 cat >> confdefs.h <<\EOF
9583 #define HAVE_ALLOCA_H 1
9584 EOF
9585 }
9586
9587 fi
9588
9589 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9590 echo "configure:9591: checking for alloca" >&5
9591
9592 cat > conftest.$ac_ext <<EOF
9593 #line 9594 "configure"
9594 #include "confdefs.h"
9595
9596 #ifdef __GNUC__
9597 # define alloca __builtin_alloca
9598 #else
9599 # ifdef _MSC_VER
9600 #  include <malloc.h>
9601 #  define alloca _alloca
9602 # else
9603 #  if HAVE_ALLOCA_H
9604 #   include <alloca.h>
9605 #  else
9606 #   ifdef _AIX
9607  #pragma alloca
9608 #   else
9609 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9610 char *alloca ();
9611 #    endif
9612 #   endif
9613 #  endif
9614 # endif
9615 #endif
9616
9617 int main() {
9618 char *p = (char *) alloca(1);
9619 ; return 0; }
9620 EOF
9621 if { (eval echo configure:9622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9622   rm -rf conftest*
9623   ac_cv_func_alloca_works=yes
9624 else
9625   echo "configure: failed program was:" >&5
9626   cat conftest.$ac_ext >&5
9627   rm -rf conftest*
9628   ac_cv_func_alloca_works=no
9629 fi
9630 rm -f conftest*
9631
9632 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
9633 if test $ac_cv_func_alloca_works = yes; then
9634   { test "$extra_verbose" = "yes" && cat << \EOF
9635     Defining HAVE_ALLOCA
9636 EOF
9637 cat >> confdefs.h <<\EOF
9638 #define HAVE_ALLOCA 1
9639 EOF
9640 }
9641
9642 fi
9643
9644 if test $ac_cv_func_alloca_works = no; then
9645   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9646   # that cause trouble.  Some versions do not even contain alloca or
9647   # contain a buggy version.  If you still want to use their alloca,
9648   # use ar to extract alloca.o from them instead of compiling alloca.c.
9649   ALLOCA=alloca.${ac_objext}
9650   { test "$extra_verbose" = "yes" && cat << \EOF
9651     Defining C_ALLOCA
9652 EOF
9653 cat >> confdefs.h <<\EOF
9654 #define C_ALLOCA 1
9655 EOF
9656 }
9657
9658
9659 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9660 echo "configure:9661: checking whether alloca needs Cray hooks" >&5
9661
9662 cat > conftest.$ac_ext <<EOF
9663 #line 9664 "configure"
9664 #include "confdefs.h"
9665 #if defined(CRAY) && ! defined(CRAY2)
9666 webecray
9667 #else
9668 wenotbecray
9669 #endif
9670
9671 EOF
9672 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9673   egrep "webecray" >/dev/null 2>&1; then
9674   rm -rf conftest*
9675   ac_cv_os_cray=yes
9676 else
9677   rm -rf conftest*
9678   ac_cv_os_cray=no
9679 fi
9680 rm -f conftest*
9681
9682
9683 echo "$ac_t""$ac_cv_os_cray" 1>&6
9684 if test $ac_cv_os_cray = yes; then
9685 for ac_func in _getb67 GETB67 getb67; do
9686   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9687 echo "configure:9688: checking for $ac_func" >&5
9688
9689 cat > conftest.$ac_ext <<EOF
9690 #line 9691 "configure"
9691 #include "confdefs.h"
9692 /* System header to define __stub macros and hopefully few prototypes,
9693     which can conflict with char $ac_func(); below.  */
9694 #include <assert.h>
9695 /* Override any gcc2 internal prototype to avoid an error.  */
9696 /* We use char because int might match the return type of a gcc2
9697     builtin and then its argument prototype would still apply.  */
9698 char $ac_func();
9699
9700 int main() {
9701
9702 /* The GNU C library defines this for functions which it implements
9703     to always fail with ENOSYS.  Some functions are actually named
9704     something starting with __ and the normal name is an alias.  */
9705 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9706 choke me
9707 #else
9708 $ac_func();
9709 #endif
9710
9711 ; return 0; }
9712 EOF
9713 if { (eval echo configure:9714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9714   rm -rf conftest*
9715   eval "ac_cv_func_$ac_func=yes"
9716 else
9717   echo "configure: failed program was:" >&5
9718   cat conftest.$ac_ext >&5
9719   rm -rf conftest*
9720   eval "ac_cv_func_$ac_func=no"
9721 fi
9722 rm -f conftest*
9723
9724 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9725   echo "$ac_t""yes" 1>&6
9726   { test "$extra_verbose" = "yes" && cat << EOF
9727     Defining CRAY_STACKSEG_END = $ac_func
9728 EOF
9729 cat >> confdefs.h <<EOF
9730 #define CRAY_STACKSEG_END $ac_func
9731 EOF
9732 }
9733
9734   break
9735 else
9736   echo "$ac_t""no" 1>&6
9737 fi
9738
9739 done
9740 fi
9741
9742 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9743 echo "configure:9744: checking stack direction for C alloca" >&5
9744
9745 cat > conftest.$ac_ext <<EOF
9746 #line 9747 "configure"
9747 #include "confdefs.h"
9748 find_stack_direction ()
9749 {
9750   static char *addr = 0;
9751   auto char dummy;
9752   if (addr == 0)
9753     {
9754       addr = &dummy;
9755       return find_stack_direction ();
9756     }
9757   else
9758     return (&dummy > addr) ? 1 : -1;
9759 }
9760 main ()
9761 {
9762   exit (find_stack_direction() < 0);
9763 }
9764 EOF
9765 if { (eval echo configure:9766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9766 then
9767   ac_cv_c_stack_direction=1
9768 else
9769   conftest_rc="$?"
9770   echo "configure: failed program was:" >&5
9771   cat conftest.$ac_ext >&5
9772   rm -fr conftest*
9773   ac_cv_c_stack_direction=-1
9774 fi
9775 rm -fr conftest*
9776
9777 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
9778 { test "$extra_verbose" = "yes" && cat << EOF
9779     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
9780 EOF
9781 cat >> confdefs.h <<EOF
9782 #define STACK_DIRECTION $ac_cv_c_stack_direction
9783 EOF
9784 }
9785
9786 fi
9787
9788 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
9789    echo "    xemacs will be linked with \"$ALLOCA\""
9790  fi
9791
9792 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
9793 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9794 echo "configure:9795: checking for vfork.h" >&5
9795
9796 cat > conftest.$ac_ext <<EOF
9797 #line 9798 "configure"
9798 #include "confdefs.h"
9799 #include <vfork.h>
9800 EOF
9801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9802 { (eval echo configure:9803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9804 if test -z "$ac_err"; then
9805   rm -rf conftest*
9806   eval "ac_cv_header_$ac_safe=yes"
9807 else
9808   echo "$ac_err" >&5
9809   echo "configure: failed program was:" >&5
9810   cat conftest.$ac_ext >&5
9811   rm -rf conftest*
9812   eval "ac_cv_header_$ac_safe=no"
9813 fi
9814 rm -f conftest*
9815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9816   echo "$ac_t""yes" 1>&6
9817   { test "$extra_verbose" = "yes" && cat << \EOF
9818     Defining HAVE_VFORK_H
9819 EOF
9820 cat >> confdefs.h <<\EOF
9821 #define HAVE_VFORK_H 1
9822 EOF
9823 }
9824
9825 else
9826   echo "$ac_t""no" 1>&6
9827 fi
9828
9829 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9830 echo "configure:9831: checking for working vfork" >&5
9831
9832 cat > conftest.$ac_ext <<EOF
9833 #line 9834 "configure"
9834 #include "confdefs.h"
9835 /* Thanks to Paul Eggert for this test.  */
9836 #include <stdio.h>
9837 #include <sys/types.h>
9838 #include <sys/stat.h>
9839 #ifdef HAVE_UNISTD_H
9840 #include <unistd.h>
9841 #endif
9842 #ifdef HAVE_VFORK_H
9843 #include <vfork.h>
9844 #endif
9845 /* On some sparc systems, changes by the child to local and incoming
9846    argument registers are propagated back to the parent.
9847    The compiler is told about this with #include <vfork.h>,
9848    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9849    Test for this by using a static variable whose address
9850    is put into a register that is clobbered by the vfork.  */
9851 static
9852 #ifdef __cplusplus
9853 sparc_address_test (int arg)
9854 #else
9855 sparc_address_test (arg) int arg;
9856 #endif
9857 {
9858   static pid_t child;
9859   if (!child) {
9860     child = vfork ();
9861     if (child < 0) {
9862       perror ("vfork");
9863       _exit(2);
9864     }
9865     if (!child) {
9866       arg = getpid();
9867       write(-1, "", 0);
9868       _exit (arg);
9869     }
9870   }
9871 }
9872 main() {
9873   pid_t parent = getpid ();
9874   pid_t child;
9875
9876   sparc_address_test ();
9877
9878   child = vfork ();
9879
9880   if (child == 0) {
9881     /* Here is another test for sparc vfork register problems.
9882        This test uses lots of local variables, at least
9883        as many local variables as main has allocated so far
9884        including compiler temporaries.  4 locals are enough for
9885        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9886        A buggy compiler should reuse the register of parent
9887        for one of the local variables, since it will think that
9888        parent can't possibly be used any more in this routine.
9889        Assigning to the local variable will thus munge parent
9890        in the parent process.  */
9891     pid_t
9892       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9893       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9894     /* Convince the compiler that p..p7 are live; otherwise, it might
9895        use the same hardware register for all 8 local variables.  */
9896     if (p != p1 || p != p2 || p != p3 || p != p4
9897         || p != p5 || p != p6 || p != p7)
9898       _exit(1);
9899
9900     /* On some systems (e.g. IRIX 3.3),
9901        vfork doesn't separate parent from child file descriptors.
9902        If the child closes a descriptor before it execs or exits,
9903        this munges the parent's descriptor as well.
9904        Test for this by closing stdout in the child.  */
9905     _exit(close(fileno(stdout)) != 0);
9906   } else {
9907     int status;
9908     struct stat st;
9909
9910     while (wait(&status) != child)
9911       ;
9912     exit(
9913          /* Was there some problem with vforking?  */
9914          child < 0
9915
9916          /* Did the child fail?  (This shouldn't happen.)  */
9917          || status
9918
9919          /* Did the vfork/compiler bug occur?  */
9920          || parent != getpid()
9921
9922          /* Did the file descriptor bug occur?  */
9923          || fstat(fileno(stdout), &st) != 0
9924          );
9925   }
9926 }
9927 EOF
9928 if { (eval echo configure:9929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9929 then
9930   ac_cv_func_vfork_works=yes
9931 else
9932   conftest_rc="$?"
9933   echo "configure: failed program was:" >&5
9934   cat conftest.$ac_ext >&5
9935   rm -fr conftest*
9936   ac_cv_func_vfork_works=no
9937 fi
9938 rm -fr conftest*
9939
9940 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9941 if test $ac_cv_func_vfork_works = no; then
9942   { test "$extra_verbose" = "yes" && cat << \EOF
9943     Defining vfork = fork
9944 EOF
9945 cat >> confdefs.h <<\EOF
9946 #define vfork fork
9947 EOF
9948 }
9949
9950 fi
9951
9952
9953 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
9954 echo "configure:9955: checking for working strcoll" >&5
9955
9956 cat > conftest.$ac_ext <<EOF
9957 #line 9958 "configure"
9958 #include "confdefs.h"
9959 #include <string.h>
9960 main ()
9961 {
9962   exit (strcoll ("abc", "def") >= 0 ||
9963         strcoll ("ABC", "DEF") >= 0 ||
9964         strcoll ("123", "456") >= 0);
9965 }
9966 EOF
9967 if { (eval echo configure:9968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9968 then
9969   ac_cv_func_strcoll_works=yes
9970 else
9971   conftest_rc="$?"
9972   echo "configure: failed program was:" >&5
9973   cat conftest.$ac_ext >&5
9974   rm -fr conftest*
9975   ac_cv_func_strcoll_works=no
9976 fi
9977 rm -fr conftest*
9978
9979 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
9980 if test $ac_cv_func_strcoll_works = yes; then
9981   { test "$extra_verbose" = "yes" && cat << \EOF
9982     Defining HAVE_STRCOLL
9983 EOF
9984 cat >> confdefs.h <<\EOF
9985 #define HAVE_STRCOLL 1
9986 EOF
9987 }
9988
9989 fi
9990
9991
9992 for ac_func in getpgrp
9993 do
9994 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9995 echo "configure:9996: checking for $ac_func" >&5
9996
9997 cat > conftest.$ac_ext <<EOF
9998 #line 9999 "configure"
9999 #include "confdefs.h"
10000 /* System header to define __stub macros and hopefully few prototypes,
10001     which can conflict with char $ac_func(); below.  */
10002 #include <assert.h>
10003 /* Override any gcc2 internal prototype to avoid an error.  */
10004 /* We use char because int might match the return type of a gcc2
10005     builtin and then its argument prototype would still apply.  */
10006 char $ac_func();
10007
10008 int main() {
10009
10010 /* The GNU C library defines this for functions which it implements
10011     to always fail with ENOSYS.  Some functions are actually named
10012     something starting with __ and the normal name is an alias.  */
10013 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10014 choke me
10015 #else
10016 $ac_func();
10017 #endif
10018
10019 ; return 0; }
10020 EOF
10021 if { (eval echo configure:10022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10022   rm -rf conftest*
10023   eval "ac_cv_func_$ac_func=yes"
10024 else
10025   echo "configure: failed program was:" >&5
10026   cat conftest.$ac_ext >&5
10027   rm -rf conftest*
10028   eval "ac_cv_func_$ac_func=no"
10029 fi
10030 rm -f conftest*
10031
10032 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10033   echo "$ac_t""yes" 1>&6
10034     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10035   { test "$extra_verbose" = "yes" && cat << EOF
10036     Defining $ac_tr_func
10037 EOF
10038 cat >> confdefs.h <<EOF
10039 #define $ac_tr_func 1
10040 EOF
10041 }
10042  
10043 else
10044   echo "$ac_t""no" 1>&6
10045 fi
10046 done
10047
10048 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10049 echo "configure:10050: checking whether getpgrp takes no argument" >&5
10050
10051 cat > conftest.$ac_ext <<EOF
10052 #line 10053 "configure"
10053 #include "confdefs.h"
10054
10055 /*
10056  * If this system has a BSD-style getpgrp(),
10057  * which takes a pid argument, exit unsuccessfully.
10058  *
10059  * Snarfed from Chet Ramey's bash pgrp.c test program
10060  */
10061 #include <stdio.h>
10062 #include <sys/types.h>
10063
10064 int     pid;
10065 int     pg1, pg2, pg3, pg4;
10066 int     ng, np, s, child;
10067
10068 main()
10069 {
10070         pid = getpid();
10071         pg1 = getpgrp(0);
10072         pg2 = getpgrp();
10073         pg3 = getpgrp(pid);
10074         pg4 = getpgrp(1);
10075
10076         /*
10077          * If all of these values are the same, it's pretty sure that
10078          * we're on a system that ignores getpgrp's first argument.
10079          */
10080         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10081                 exit(0);
10082
10083         child = fork();
10084         if (child < 0)
10085                 exit(1);
10086         else if (child == 0) {
10087                 np = getpid();
10088                 /*
10089                  * If this is Sys V, this will not work; pgrp will be
10090                  * set to np because setpgrp just changes a pgrp to be
10091                  * the same as the pid.
10092                  */
10093                 setpgrp(np, pg1);
10094                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10095                 if (ng == pg1) {
10096                         exit(1);
10097                 } else {
10098                         exit(0);
10099                 }
10100         } else {
10101                 wait(&s);
10102                 exit(s>>8);
10103         }
10104 }
10105
10106 EOF
10107 if { (eval echo configure:10108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10108 then
10109   ac_cv_func_getpgrp_void=yes
10110 else
10111   conftest_rc="$?"
10112   echo "configure: failed program was:" >&5
10113   cat conftest.$ac_ext >&5
10114   rm -fr conftest*
10115   ac_cv_func_getpgrp_void=no
10116 fi
10117 rm -fr conftest*
10118
10119
10120 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10121 if test $ac_cv_func_getpgrp_void = yes; then
10122   { test "$extra_verbose" = "yes" && cat << \EOF
10123     Defining GETPGRP_VOID
10124 EOF
10125 cat >> confdefs.h <<\EOF
10126 #define GETPGRP_VOID 1
10127 EOF
10128 }
10129
10130 fi
10131
10132
10133 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10134 echo "configure:10135: checking for working mmap" >&5
10135 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10136 cat > conftest.$ac_ext <<EOF
10137 #line 10138 "configure"
10138 #include "confdefs.h"
10139 #include <stdio.h>
10140 #include <unistd.h>
10141 #include <fcntl.h>
10142 #include <sys/mman.h>
10143
10144 #ifndef MAP_VARIABLE
10145 #define MAP_VARIABLE 0
10146 #endif
10147
10148 #ifndef MAP_FAILED
10149 #define MAP_FAILED -1
10150 #endif
10151
10152 int main (int argc, char *argv[])
10153 {
10154   int fd = -1;
10155   caddr_t p;
10156 #ifndef MAP_ANONYMOUS
10157   fd = open ("/dev/zero", O_RDWR);
10158   if (fd < 0)
10159     return 1;
10160 #define MAP_ANONYMOUS 0
10161 #endif
10162   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10163            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10164            fd, 0) != (void *) MAP_FAILED)
10165     return 0;
10166   perror ("conftest: mmap failed");
10167   return 1;
10168 }
10169 EOF
10170 if { (eval echo configure:10171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10171 then
10172   have_mmap=yes
10173 else
10174   conftest_rc="$?"
10175   echo "configure: failed program was:" >&5
10176   cat conftest.$ac_ext >&5
10177   rm -fr conftest*
10178   have_mmap=no
10179 fi
10180 rm -fr conftest* ;;
10181 esac
10182 echo "$ac_t""$have_mmap" 1>&6
10183 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10184     Defining HAVE_MMAP
10185 EOF
10186 cat >> confdefs.h <<\EOF
10187 #define HAVE_MMAP 1
10188 EOF
10189 }
10190
10191
10192 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10193 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10194 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10195     Defining REL_ALLOC
10196 EOF
10197 cat >> confdefs.h <<\EOF
10198 #define REL_ALLOC 1
10199 EOF
10200 }
10201
10202
10203 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10204 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10205 echo "configure:10206: checking for termios.h" >&5
10206
10207 cat > conftest.$ac_ext <<EOF
10208 #line 10209 "configure"
10209 #include "confdefs.h"
10210 #include <termios.h>
10211 EOF
10212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10213 { (eval echo configure:10214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10215 if test -z "$ac_err"; then
10216   rm -rf conftest*
10217   eval "ac_cv_header_$ac_safe=yes"
10218 else
10219   echo "$ac_err" >&5
10220   echo "configure: failed program was:" >&5
10221   cat conftest.$ac_ext >&5
10222   rm -rf conftest*
10223   eval "ac_cv_header_$ac_safe=no"
10224 fi
10225 rm -f conftest*
10226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10227   echo "$ac_t""yes" 1>&6
10228   { test "$extra_verbose" = "yes" && cat << \EOF
10229     Defining HAVE_TERMIOS
10230 EOF
10231 cat >> confdefs.h <<\EOF
10232 #define HAVE_TERMIOS 1
10233 EOF
10234 }
10235
10236   { test "$extra_verbose" = "yes" && cat << \EOF
10237     Defining SIGNALS_VIA_CHARACTERS
10238 EOF
10239 cat >> confdefs.h <<\EOF
10240 #define SIGNALS_VIA_CHARACTERS 1
10241 EOF
10242 }
10243
10244   { test "$extra_verbose" = "yes" && cat << \EOF
10245     Defining NO_TERMIO
10246 EOF
10247 cat >> confdefs.h <<\EOF
10248 #define NO_TERMIO 1
10249 EOF
10250 }
10251
10252 else
10253   echo "$ac_t""no" 1>&6
10254 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10255 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10256 echo "configure:10257: checking for termio.h" >&5
10257
10258 cat > conftest.$ac_ext <<EOF
10259 #line 10260 "configure"
10260 #include "confdefs.h"
10261 #include <termio.h>
10262 EOF
10263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10264 { (eval echo configure:10265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10266 if test -z "$ac_err"; then
10267   rm -rf conftest*
10268   eval "ac_cv_header_$ac_safe=yes"
10269 else
10270   echo "$ac_err" >&5
10271   echo "configure: failed program was:" >&5
10272   cat conftest.$ac_ext >&5
10273   rm -rf conftest*
10274   eval "ac_cv_header_$ac_safe=no"
10275 fi
10276 rm -f conftest*
10277 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10278   echo "$ac_t""yes" 1>&6
10279   { test "$extra_verbose" = "yes" && cat << \EOF
10280     Defining HAVE_TERMIO
10281 EOF
10282 cat >> confdefs.h <<\EOF
10283 #define HAVE_TERMIO 1
10284 EOF
10285 }
10286
10287 else
10288   echo "$ac_t""no" 1>&6
10289 fi
10290
10291 fi
10292
10293
10294
10295 echo $ac_n "checking for socket""... $ac_c" 1>&6
10296 echo "configure:10297: checking for socket" >&5
10297
10298 cat > conftest.$ac_ext <<EOF
10299 #line 10300 "configure"
10300 #include "confdefs.h"
10301 /* System header to define __stub macros and hopefully few prototypes,
10302     which can conflict with char socket(); below.  */
10303 #include <assert.h>
10304 /* Override any gcc2 internal prototype to avoid an error.  */
10305 /* We use char because int might match the return type of a gcc2
10306     builtin and then its argument prototype would still apply.  */
10307 char socket();
10308
10309 int main() {
10310
10311 /* The GNU C library defines this for functions which it implements
10312     to always fail with ENOSYS.  Some functions are actually named
10313     something starting with __ and the normal name is an alias.  */
10314 #if defined (__stub_socket) || defined (__stub___socket)
10315 choke me
10316 #else
10317 socket();
10318 #endif
10319
10320 ; return 0; }
10321 EOF
10322 if { (eval echo configure:10323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10323   rm -rf conftest*
10324   eval "ac_cv_func_socket=yes"
10325 else
10326   echo "configure: failed program was:" >&5
10327   cat conftest.$ac_ext >&5
10328   rm -rf conftest*
10329   eval "ac_cv_func_socket=no"
10330 fi
10331 rm -f conftest*
10332
10333 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10334   echo "$ac_t""yes" 1>&6
10335   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10336 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10337 echo "configure:10338: checking for netinet/in.h" >&5
10338
10339 cat > conftest.$ac_ext <<EOF
10340 #line 10341 "configure"
10341 #include "confdefs.h"
10342 #include <netinet/in.h>
10343 EOF
10344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10345 { (eval echo configure:10346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10347 if test -z "$ac_err"; then
10348   rm -rf conftest*
10349   eval "ac_cv_header_$ac_safe=yes"
10350 else
10351   echo "$ac_err" >&5
10352   echo "configure: failed program was:" >&5
10353   cat conftest.$ac_ext >&5
10354   rm -rf conftest*
10355   eval "ac_cv_header_$ac_safe=no"
10356 fi
10357 rm -f conftest*
10358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10359   echo "$ac_t""yes" 1>&6
10360   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10361 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10362 echo "configure:10363: checking for arpa/inet.h" >&5
10363
10364 cat > conftest.$ac_ext <<EOF
10365 #line 10366 "configure"
10366 #include "confdefs.h"
10367 #include <arpa/inet.h>
10368 EOF
10369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10370 { (eval echo configure:10371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10372 if test -z "$ac_err"; then
10373   rm -rf conftest*
10374   eval "ac_cv_header_$ac_safe=yes"
10375 else
10376   echo "$ac_err" >&5
10377   echo "configure: failed program was:" >&5
10378   cat conftest.$ac_ext >&5
10379   rm -rf conftest*
10380   eval "ac_cv_header_$ac_safe=no"
10381 fi
10382 rm -f conftest*
10383 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10384   echo "$ac_t""yes" 1>&6
10385   
10386   { test "$extra_verbose" = "yes" && cat << \EOF
10387     Defining HAVE_SOCKETS
10388 EOF
10389 cat >> confdefs.h <<\EOF
10390 #define HAVE_SOCKETS 1
10391 EOF
10392 }
10393
10394       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10395 echo "configure:10396: checking "for sun_len member in struct sockaddr_un"" >&5
10396       cat > conftest.$ac_ext <<EOF
10397 #line 10398 "configure"
10398 #include "confdefs.h"
10399
10400 #include <sys/types.h>
10401 #include <sys/socket.h>
10402 #include <sys/un.h>
10403       
10404 int main() {
10405 static struct sockaddr_un x; x.sun_len = 1;
10406 ; return 0; }
10407 EOF
10408 if { (eval echo configure:10409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10409   rm -rf conftest*
10410   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10411     Defining HAVE_SOCKADDR_SUN_LEN
10412 EOF
10413 cat >> confdefs.h <<\EOF
10414 #define HAVE_SOCKADDR_SUN_LEN 1
10415 EOF
10416 }
10417
10418 else
10419   echo "configure: failed program was:" >&5
10420   cat conftest.$ac_ext >&5
10421   rm -rf conftest*
10422   echo "$ac_t""no" 1>&6
10423 fi
10424 rm -f conftest*
10425       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10426 echo "configure:10427: checking "for ip_mreq struct in netinet/in.h"" >&5
10427       cat > conftest.$ac_ext <<EOF
10428 #line 10429 "configure"
10429 #include "confdefs.h"
10430
10431 #include <sys/types.h>
10432 #include <netinet/in.h>
10433       
10434 int main() {
10435 static struct ip_mreq x;
10436 ; return 0; }
10437 EOF
10438 if { (eval echo configure:10439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10439   rm -rf conftest*
10440   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10441     Defining HAVE_MULTICAST
10442 EOF
10443 cat >> confdefs.h <<\EOF
10444 #define HAVE_MULTICAST 1
10445 EOF
10446 }
10447
10448 else
10449   echo "configure: failed program was:" >&5
10450   cat conftest.$ac_ext >&5
10451   rm -rf conftest*
10452   echo "$ac_t""no" 1>&6
10453 fi
10454 rm -f conftest*
10455 else
10456   echo "$ac_t""no" 1>&6
10457 fi
10458
10459 else
10460   echo "$ac_t""no" 1>&6
10461 fi
10462
10463 else
10464   echo "$ac_t""no" 1>&6
10465 fi
10466
10467
10468 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10469 echo "configure:10470: checking for msgget" >&5
10470
10471 cat > conftest.$ac_ext <<EOF
10472 #line 10473 "configure"
10473 #include "confdefs.h"
10474 /* System header to define __stub macros and hopefully few prototypes,
10475     which can conflict with char msgget(); below.  */
10476 #include <assert.h>
10477 /* Override any gcc2 internal prototype to avoid an error.  */
10478 /* We use char because int might match the return type of a gcc2
10479     builtin and then its argument prototype would still apply.  */
10480 char msgget();
10481
10482 int main() {
10483
10484 /* The GNU C library defines this for functions which it implements
10485     to always fail with ENOSYS.  Some functions are actually named
10486     something starting with __ and the normal name is an alias.  */
10487 #if defined (__stub_msgget) || defined (__stub___msgget)
10488 choke me
10489 #else
10490 msgget();
10491 #endif
10492
10493 ; return 0; }
10494 EOF
10495 if { (eval echo configure:10496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10496   rm -rf conftest*
10497   eval "ac_cv_func_msgget=yes"
10498 else
10499   echo "configure: failed program was:" >&5
10500   cat conftest.$ac_ext >&5
10501   rm -rf conftest*
10502   eval "ac_cv_func_msgget=no"
10503 fi
10504 rm -f conftest*
10505
10506 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10507   echo "$ac_t""yes" 1>&6
10508   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10509 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10510 echo "configure:10511: checking for sys/ipc.h" >&5
10511
10512 cat > conftest.$ac_ext <<EOF
10513 #line 10514 "configure"
10514 #include "confdefs.h"
10515 #include <sys/ipc.h>
10516 EOF
10517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10518 { (eval echo configure:10519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10520 if test -z "$ac_err"; then
10521   rm -rf conftest*
10522   eval "ac_cv_header_$ac_safe=yes"
10523 else
10524   echo "$ac_err" >&5
10525   echo "configure: failed program was:" >&5
10526   cat conftest.$ac_ext >&5
10527   rm -rf conftest*
10528   eval "ac_cv_header_$ac_safe=no"
10529 fi
10530 rm -f conftest*
10531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10532   echo "$ac_t""yes" 1>&6
10533   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10534 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10535 echo "configure:10536: checking for sys/msg.h" >&5
10536
10537 cat > conftest.$ac_ext <<EOF
10538 #line 10539 "configure"
10539 #include "confdefs.h"
10540 #include <sys/msg.h>
10541 EOF
10542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10543 { (eval echo configure:10544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10545 if test -z "$ac_err"; then
10546   rm -rf conftest*
10547   eval "ac_cv_header_$ac_safe=yes"
10548 else
10549   echo "$ac_err" >&5
10550   echo "configure: failed program was:" >&5
10551   cat conftest.$ac_ext >&5
10552   rm -rf conftest*
10553   eval "ac_cv_header_$ac_safe=no"
10554 fi
10555 rm -f conftest*
10556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10557   echo "$ac_t""yes" 1>&6
10558   { test "$extra_verbose" = "yes" && cat << \EOF
10559     Defining HAVE_SYSVIPC
10560 EOF
10561 cat >> confdefs.h <<\EOF
10562 #define HAVE_SYSVIPC 1
10563 EOF
10564 }
10565
10566 else
10567   echo "$ac_t""no" 1>&6
10568 fi
10569
10570 else
10571   echo "$ac_t""no" 1>&6
10572 fi
10573
10574 else
10575   echo "$ac_t""no" 1>&6
10576 fi
10577
10578
10579 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10580 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10581 echo "configure:10582: checking for dirent.h" >&5
10582
10583 cat > conftest.$ac_ext <<EOF
10584 #line 10585 "configure"
10585 #include "confdefs.h"
10586 #include <dirent.h>
10587 EOF
10588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10589 { (eval echo configure:10590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10591 if test -z "$ac_err"; then
10592   rm -rf conftest*
10593   eval "ac_cv_header_$ac_safe=yes"
10594 else
10595   echo "$ac_err" >&5
10596   echo "configure: failed program was:" >&5
10597   cat conftest.$ac_ext >&5
10598   rm -rf conftest*
10599   eval "ac_cv_header_$ac_safe=no"
10600 fi
10601 rm -f conftest*
10602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10603   echo "$ac_t""yes" 1>&6
10604   { test "$extra_verbose" = "yes" && cat << \EOF
10605     Defining SYSV_SYSTEM_DIR
10606 EOF
10607 cat >> confdefs.h <<\EOF
10608 #define SYSV_SYSTEM_DIR 1
10609 EOF
10610 }
10611
10612 else
10613   echo "$ac_t""no" 1>&6
10614 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
10615 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
10616 echo "configure:10617: checking for sys/dir.h" >&5
10617
10618 cat > conftest.$ac_ext <<EOF
10619 #line 10620 "configure"
10620 #include "confdefs.h"
10621 #include <sys/dir.h>
10622 EOF
10623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10624 { (eval echo configure:10625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10626 if test -z "$ac_err"; then
10627   rm -rf conftest*
10628   eval "ac_cv_header_$ac_safe=yes"
10629 else
10630   echo "$ac_err" >&5
10631   echo "configure: failed program was:" >&5
10632   cat conftest.$ac_ext >&5
10633   rm -rf conftest*
10634   eval "ac_cv_header_$ac_safe=no"
10635 fi
10636 rm -f conftest*
10637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10638   echo "$ac_t""yes" 1>&6
10639   :
10640 else
10641   echo "$ac_t""no" 1>&6
10642 { test "$extra_verbose" = "yes" && cat << \EOF
10643     Defining NONSYSTEM_DIR_LIBRARY
10644 EOF
10645 cat >> confdefs.h <<\EOF
10646 #define NONSYSTEM_DIR_LIBRARY 1
10647 EOF
10648 }
10649
10650 fi
10651
10652 fi
10653
10654
10655 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
10656 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
10657 echo "configure:10658: checking for nlist.h" >&5
10658
10659 cat > conftest.$ac_ext <<EOF
10660 #line 10661 "configure"
10661 #include "confdefs.h"
10662 #include <nlist.h>
10663 EOF
10664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10665 { (eval echo configure:10666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10667 if test -z "$ac_err"; then
10668   rm -rf conftest*
10669   eval "ac_cv_header_$ac_safe=yes"
10670 else
10671   echo "$ac_err" >&5
10672   echo "configure: failed program was:" >&5
10673   cat conftest.$ac_ext >&5
10674   rm -rf conftest*
10675   eval "ac_cv_header_$ac_safe=no"
10676 fi
10677 rm -f conftest*
10678 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10679   echo "$ac_t""yes" 1>&6
10680   { test "$extra_verbose" = "yes" && cat << \EOF
10681     Defining NLIST_STRUCT
10682 EOF
10683 cat >> confdefs.h <<\EOF
10684 #define NLIST_STRUCT 1
10685 EOF
10686 }
10687
10688 else
10689   echo "$ac_t""no" 1>&6
10690 fi
10691
10692
10693
10694 echo "checking "for sound support"" 1>&6
10695 echo "configure:10696: checking "for sound support"" >&5
10696 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
10697
10698 if test "$with_native_sound" != "no"; then
10699     if test -n "$native_sound_lib"; then
10700     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
10701 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
10702 echo "configure:10703: checking for multimedia/audio_device.h" >&5
10703
10704 cat > conftest.$ac_ext <<EOF
10705 #line 10706 "configure"
10706 #include "confdefs.h"
10707 #include <multimedia/audio_device.h>
10708 EOF
10709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10710 { (eval echo configure:10711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10712 if test -z "$ac_err"; then
10713   rm -rf conftest*
10714   eval "ac_cv_header_$ac_safe=yes"
10715 else
10716   echo "$ac_err" >&5
10717   echo "configure: failed program was:" >&5
10718   cat conftest.$ac_ext >&5
10719   rm -rf conftest*
10720   eval "ac_cv_header_$ac_safe=no"
10721 fi
10722 rm -f conftest*
10723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10724   echo "$ac_t""yes" 1>&6
10725   sound_found=yes sound_cflags=""
10726       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10727    echo "    xemacs will be linked with \"sunplay.o\""
10728  fi
10729 else
10730   echo "$ac_t""no" 1>&6
10731 fi
10732
10733   fi
10734
10735     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
10736     sound_found=yes
10737     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10738    echo "    xemacs will be linked with \"sunplay.o\""
10739  fi
10740     if test -d "/usr/demo/SOUND/include"
10741       then sound_cflags="-I/usr/demo/SOUND/include"
10742       else sound_cflags="-I/usr/demo/SOUND"
10743     fi
10744     if test -z "$native_sound_lib" ; then
10745       if test -r "/usr/demo/SOUND/lib/libaudio.a"
10746         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
10747         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
10748       fi
10749     fi
10750   fi
10751
10752     if test -z "$sound_found"; then
10753     case "$canonical" in
10754     *-sgi-* )
10755       if test -z "$native_sound_lib"; then
10756         
10757 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
10758 echo "configure:10759: checking for ALopenport in -laudio" >&5
10759 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
10760
10761 xe_check_libs=" -laudio "
10762 cat > conftest.$ac_ext <<EOF
10763 #line 10764 "configure"
10764 #include "confdefs.h"
10765 /* Override any gcc2 internal prototype to avoid an error.  */
10766 /* We use char because int might match the return type of a gcc2
10767     builtin and then its argument prototype would still apply.  */
10768 char ALopenport();
10769
10770 int main() {
10771 ALopenport()
10772 ; return 0; }
10773 EOF
10774 if { (eval echo configure:10775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10775   rm -rf conftest*
10776   eval "ac_cv_lib_$ac_lib_var=yes"
10777 else
10778   echo "configure: failed program was:" >&5
10779   cat conftest.$ac_ext >&5
10780   rm -rf conftest*
10781   eval "ac_cv_lib_$ac_lib_var=no"
10782 fi
10783 rm -f conftest*
10784 xe_check_libs=""
10785
10786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10787   echo "$ac_t""yes" 1>&6
10788   native_sound_lib="-laudio"
10789 else
10790   echo "$ac_t""no" 1>&6
10791 fi
10792
10793
10794       fi
10795       if test -n "$native_sound_lib"; then
10796         sound_found=yes sound_cflags=""
10797         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
10798    echo "    xemacs will be linked with \"sgiplay.o\""
10799  fi
10800       fi ;;
10801     hppa*-hp-hpux* )
10802       if test -z "$native_sound_lib"; then
10803         
10804 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
10805 echo "configure:10806: checking for AOpenAudio in -lAlib" >&5
10806 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
10807
10808 xe_check_libs=" -lAlib "
10809 cat > conftest.$ac_ext <<EOF
10810 #line 10811 "configure"
10811 #include "confdefs.h"
10812 /* Override any gcc2 internal prototype to avoid an error.  */
10813 /* We use char because int might match the return type of a gcc2
10814     builtin and then its argument prototype would still apply.  */
10815 char AOpenAudio();
10816
10817 int main() {
10818 AOpenAudio()
10819 ; return 0; }
10820 EOF
10821 if { (eval echo configure:10822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10822   rm -rf conftest*
10823   eval "ac_cv_lib_$ac_lib_var=yes"
10824 else
10825   echo "configure: failed program was:" >&5
10826   cat conftest.$ac_ext >&5
10827   rm -rf conftest*
10828   eval "ac_cv_lib_$ac_lib_var=no"
10829 fi
10830 rm -f conftest*
10831 xe_check_libs=""
10832
10833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10834   echo "$ac_t""yes" 1>&6
10835   native_sound_lib="-lAlib"
10836 else
10837   echo "$ac_t""no" 1>&6
10838 fi
10839
10840
10841       fi
10842       if test -n "$native_sound_lib"; then
10843         sound_found=yes
10844         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
10845    echo "    xemacs will be linked with \"hpplay.o\""
10846  fi
10847         if test "$GCC" = "yes" # Kludge city
10848           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
10849           else sound_cflags="+e -I/usr/audio/examples"
10850         fi
10851       fi ;;
10852     esac
10853   fi
10854
10855     if test -z "$sound_found"; then
10856     for dir in "machine" "sys" "linux"; do
10857       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
10858 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
10859 echo "configure:10860: checking for ${dir}/soundcard.h" >&5
10860
10861 cat > conftest.$ac_ext <<EOF
10862 #line 10863 "configure"
10863 #include "confdefs.h"
10864 #include <${dir}/soundcard.h>
10865 EOF
10866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10867 { (eval echo configure:10868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10869 if test -z "$ac_err"; then
10870   rm -rf conftest*
10871   eval "ac_cv_header_$ac_safe=yes"
10872 else
10873   echo "$ac_err" >&5
10874   echo "configure: failed program was:" >&5
10875   cat conftest.$ac_ext >&5
10876   rm -rf conftest*
10877   eval "ac_cv_header_$ac_safe=no"
10878 fi
10879 rm -f conftest*
10880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10881   echo "$ac_t""yes" 1>&6
10882   sound_found=yes
10883        need_miscplay=yes
10884         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
10885    echo "    xemacs will be linked with \"linuxplay.o\""
10886  fi
10887         { test "$extra_verbose" = "yes" && cat << EOF
10888     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
10889 EOF
10890 cat >> confdefs.h <<EOF
10891 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
10892 EOF
10893 }
10894
10895         break
10896 else
10897   echo "$ac_t""no" 1>&6
10898 fi
10899
10900     done
10901   fi
10902
10903   test "$sound_found" = "yes" && with_native_sound=yes
10904 fi
10905
10906 if test "$with_native_sound" = "yes"; then
10907   { test "$extra_verbose" = "yes" && cat << \EOF
10908     Defining HAVE_NATIVE_SOUND
10909 EOF
10910 cat >> confdefs.h <<\EOF
10911 #define HAVE_NATIVE_SOUND 1
10912 EOF
10913 }
10914
10915   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
10916 fi
10917
10918 if test "$with_nas_sound" != "no"; then
10919   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
10920 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
10921 echo "configure:10922: checking for audio/audiolib.h" >&5
10922
10923 cat > conftest.$ac_ext <<EOF
10924 #line 10925 "configure"
10925 #include "confdefs.h"
10926 #include <audio/audiolib.h>
10927 EOF
10928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10929 { (eval echo configure:10930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10931 if test -z "$ac_err"; then
10932   rm -rf conftest*
10933   eval "ac_cv_header_$ac_safe=yes"
10934 else
10935   echo "$ac_err" >&5
10936   echo "configure: failed program was:" >&5
10937   cat conftest.$ac_ext >&5
10938   rm -rf conftest*
10939   eval "ac_cv_header_$ac_safe=no"
10940 fi
10941 rm -f conftest*
10942 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10943   echo "$ac_t""yes" 1>&6
10944   
10945     
10946 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
10947 echo "configure:10948: checking for AuOpenServer in -laudio" >&5
10948 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
10949
10950 xe_check_libs=" -laudio "
10951 cat > conftest.$ac_ext <<EOF
10952 #line 10953 "configure"
10953 #include "confdefs.h"
10954 /* Override any gcc2 internal prototype to avoid an error.  */
10955 /* We use char because int might match the return type of a gcc2
10956     builtin and then its argument prototype would still apply.  */
10957 char AuOpenServer();
10958
10959 int main() {
10960 AuOpenServer()
10961 ; return 0; }
10962 EOF
10963 if { (eval echo configure:10964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10964   rm -rf conftest*
10965   eval "ac_cv_lib_$ac_lib_var=yes"
10966 else
10967   echo "configure: failed program was:" >&5
10968   cat conftest.$ac_ext >&5
10969   rm -rf conftest*
10970   eval "ac_cv_lib_$ac_lib_var=no"
10971 fi
10972 rm -f conftest*
10973 xe_check_libs=""
10974
10975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10976   echo "$ac_t""yes" 1>&6
10977   have_nas_sound=yes
10978 else
10979   echo "$ac_t""no" 1>&6
10980 fi
10981
10982
10983 else
10984   echo "$ac_t""no" 1>&6
10985 fi
10986
10987   if test "$have_nas_sound" = "yes"; then
10988     with_nas_sound=yes
10989     { test "$extra_verbose" = "yes" && cat << \EOF
10990     Defining HAVE_NAS_SOUND
10991 EOF
10992 cat >> confdefs.h <<\EOF
10993 #define HAVE_NAS_SOUND 1
10994 EOF
10995 }
10996
10997     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
10998    echo "    xemacs will be linked with \"nas.o\""
10999  fi
11000     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11001             cat > conftest.$ac_ext <<EOF
11002 #line 11003 "configure"
11003 #include "confdefs.h"
11004 #include <audio/Xtutil.h>
11005 EOF
11006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11007   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11008   :
11009 else
11010   rm -rf conftest*
11011   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11012     Defining NAS_NO_ERROR_JUMP
11013 EOF
11014 cat >> confdefs.h <<\EOF
11015 #define NAS_NO_ERROR_JUMP 1
11016 EOF
11017 }
11018
11019 fi
11020 rm -f conftest*
11021
11022   else
11023     test "$with_nas_sound" = "yes" && \
11024       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11025     with_nas_sound=no
11026   fi
11027 fi
11028
11029 if test "$with_esd_sound" != "no"; then
11030   # Extract the first word of "esd-config", so it can be a program name with args.
11031 set dummy esd-config; ac_word=$2
11032 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11033 echo "configure:11034: checking for $ac_word" >&5
11034
11035 if test -n "$have_esd_config"; then
11036   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11037 else
11038   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11039   ac_dummy="$PATH"
11040   for ac_dir in $ac_dummy; do
11041     test -z "$ac_dir" && ac_dir=.
11042     if test -f $ac_dir/$ac_word; then
11043       ac_cv_prog_have_esd_config="yes"
11044       break
11045     fi
11046   done
11047   IFS="$ac_save_ifs"
11048   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11049 fi
11050 have_esd_config="$ac_cv_prog_have_esd_config"
11051 if test -n "$have_esd_config"; then
11052   echo "$ac_t""$have_esd_config" 1>&6
11053 else
11054   echo "$ac_t""no" 1>&6
11055 fi
11056
11057   if test "$have_esd_config" = "yes"; then
11058     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11059     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
11060     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11061     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11062 echo "configure:11063: checking for esd_play_stream" >&5
11063
11064 cat > conftest.$ac_ext <<EOF
11065 #line 11066 "configure"
11066 #include "confdefs.h"
11067 /* System header to define __stub macros and hopefully few prototypes,
11068     which can conflict with char esd_play_stream(); below.  */
11069 #include <assert.h>
11070 /* Override any gcc2 internal prototype to avoid an error.  */
11071 /* We use char because int might match the return type of a gcc2
11072     builtin and then its argument prototype would still apply.  */
11073 char esd_play_stream();
11074
11075 int main() {
11076
11077 /* The GNU C library defines this for functions which it implements
11078     to always fail with ENOSYS.  Some functions are actually named
11079     something starting with __ and the normal name is an alias.  */
11080 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11081 choke me
11082 #else
11083 esd_play_stream();
11084 #endif
11085
11086 ; return 0; }
11087 EOF
11088 if { (eval echo configure:11089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11089   rm -rf conftest*
11090   eval "ac_cv_func_esd_play_stream=yes"
11091 else
11092   echo "configure: failed program was:" >&5
11093   cat conftest.$ac_ext >&5
11094   rm -rf conftest*
11095   eval "ac_cv_func_esd_play_stream=no"
11096 fi
11097 rm -f conftest*
11098
11099 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
11100   echo "$ac_t""yes" 1>&6
11101   have_esd_sound=yes
11102 else
11103   echo "$ac_t""no" 1>&6
11104 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
11105 fi
11106
11107   fi
11108
11109   if test "$have_esd_sound" = "yes"; then
11110     with_esd_sound=yes
11111     need_miscplay=yes
11112     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
11113    echo "    xemacs will be linked with \"esd.o\""
11114  fi
11115     { test "$extra_verbose" = "yes" && cat << \EOF
11116     Defining HAVE_ESD_SOUND
11117 EOF
11118 cat >> confdefs.h <<\EOF
11119 #define HAVE_ESD_SOUND 1
11120 EOF
11121 }
11122
11123   else
11124     test "$with_esd_sound" = "yes" && \
11125       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
11126     with_esd_sound=no
11127   fi
11128 fi
11129
11130 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
11131    echo "    xemacs will be linked with \"miscplay.o\""
11132  fi
11133
11134
11135 test -z "$with_tty" && with_tty=yes
11136
11137 if test "$with_tty" = "yes"  ; then
11138   echo "checking for TTY-related features" 1>&6
11139 echo "configure:11140: checking for TTY-related features" >&5
11140   { test "$extra_verbose" = "yes" && cat << \EOF
11141     Defining HAVE_TTY
11142 EOF
11143 cat >> confdefs.h <<\EOF
11144 #define HAVE_TTY 1
11145 EOF
11146 }
11147
11148   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
11149    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\""
11150  fi
11151
11152     if test -z "$with_ncurses"; then
11153     
11154 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
11155 echo "configure:11156: checking for tgetent in -lncurses" >&5
11156 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
11157
11158 xe_check_libs=" -lncurses "
11159 cat > conftest.$ac_ext <<EOF
11160 #line 11161 "configure"
11161 #include "confdefs.h"
11162 /* Override any gcc2 internal prototype to avoid an error.  */
11163 /* We use char because int might match the return type of a gcc2
11164     builtin and then its argument prototype would still apply.  */
11165 char tgetent();
11166
11167 int main() {
11168 tgetent()
11169 ; return 0; }
11170 EOF
11171 if { (eval echo configure:11172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11172   rm -rf conftest*
11173   eval "ac_cv_lib_$ac_lib_var=yes"
11174 else
11175   echo "configure: failed program was:" >&5
11176   cat conftest.$ac_ext >&5
11177   rm -rf conftest*
11178   eval "ac_cv_lib_$ac_lib_var=no"
11179 fi
11180 rm -f conftest*
11181 xe_check_libs=""
11182
11183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11184   echo "$ac_t""yes" 1>&6
11185   with_ncurses=yes
11186 else
11187   echo "$ac_t""no" 1>&6
11188 with_ncurses=no
11189 fi
11190
11191
11192   fi
11193   if test "$with_ncurses" = "yes"; then
11194     { test "$extra_verbose" = "yes" && cat << \EOF
11195     Defining HAVE_NCURSES
11196 EOF
11197 cat >> confdefs.h <<\EOF
11198 #define HAVE_NCURSES 1
11199 EOF
11200 }
11201
11202     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11203 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11204 echo "configure:11205: checking for ncurses/curses.h" >&5
11205
11206 cat > conftest.$ac_ext <<EOF
11207 #line 11208 "configure"
11208 #include "confdefs.h"
11209 #include <ncurses/curses.h>
11210 EOF
11211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11212 { (eval echo configure:11213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11214 if test -z "$ac_err"; then
11215   rm -rf conftest*
11216   eval "ac_cv_header_$ac_safe=yes"
11217 else
11218   echo "$ac_err" >&5
11219   echo "configure: failed program was:" >&5
11220   cat conftest.$ac_ext >&5
11221   rm -rf conftest*
11222   eval "ac_cv_header_$ac_safe=no"
11223 fi
11224 rm -f conftest*
11225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11226   echo "$ac_t""yes" 1>&6
11227   curses_h_path=ncurses/curses.h
11228 else
11229   echo "$ac_t""no" 1>&6
11230 fi
11231
11232     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11233 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11234 echo "configure:11235: checking for ncurses/term.h" >&5
11235
11236 cat > conftest.$ac_ext <<EOF
11237 #line 11238 "configure"
11238 #include "confdefs.h"
11239 #include <ncurses/term.h>
11240 EOF
11241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11242 { (eval echo configure:11243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11244 if test -z "$ac_err"; then
11245   rm -rf conftest*
11246   eval "ac_cv_header_$ac_safe=yes"
11247 else
11248   echo "$ac_err" >&5
11249   echo "configure: failed program was:" >&5
11250   cat conftest.$ac_ext >&5
11251   rm -rf conftest*
11252   eval "ac_cv_header_$ac_safe=no"
11253 fi
11254 rm -f conftest*
11255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11256   echo "$ac_t""yes" 1>&6
11257   term_h_path=ncurses/term.h
11258 else
11259   echo "$ac_t""no" 1>&6
11260 fi
11261
11262     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11263    echo "    xemacs will be linked with \"terminfo.o\""
11264  fi
11265     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11266
11267     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11268                         save_c_switch_site="$c_switch_site"
11269       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11270       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11271 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11272 echo "configure:11273: checking for ncurses/curses.h" >&5
11273
11274 cat > conftest.$ac_ext <<EOF
11275 #line 11276 "configure"
11276 #include "confdefs.h"
11277 #include <ncurses/curses.h>
11278 EOF
11279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11280 { (eval echo configure:11281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11282 if test -z "$ac_err"; then
11283   rm -rf conftest*
11284   eval "ac_cv_header_$ac_safe=yes"
11285 else
11286   echo "$ac_err" >&5
11287   echo "configure: failed program was:" >&5
11288   cat conftest.$ac_ext >&5
11289   rm -rf conftest*
11290   eval "ac_cv_header_$ac_safe=no"
11291 fi
11292 rm -f conftest*
11293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11294   echo "$ac_t""yes" 1>&6
11295   curses_h_path=ncurses/curses.h
11296 else
11297   echo "$ac_t""no" 1>&6
11298 fi
11299
11300       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11301         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11302         else c_switch_site="$save_c_switch_site"
11303       fi
11304     fi
11305   else         if test "$have_terminfo" = "yes"; then
11306       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11307    echo "    xemacs will be linked with \"terminfo.o\""
11308  fi
11309       if test -n "$libs_termcap"; then
11310         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11311       else
11312         for lib in curses termlib termcap; do
11313           
11314 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11315 echo "configure:11316: checking for tgetent in -l$lib" >&5
11316 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11317
11318 xe_check_libs=" -l$lib "
11319 cat > conftest.$ac_ext <<EOF
11320 #line 11321 "configure"
11321 #include "confdefs.h"
11322 /* Override any gcc2 internal prototype to avoid an error.  */
11323 /* We use char because int might match the return type of a gcc2
11324     builtin and then its argument prototype would still apply.  */
11325 char tgetent();
11326
11327 int main() {
11328 tgetent()
11329 ; return 0; }
11330 EOF
11331 if { (eval echo configure:11332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11332   rm -rf conftest*
11333   eval "ac_cv_lib_$ac_lib_var=yes"
11334 else
11335   echo "configure: failed program was:" >&5
11336   cat conftest.$ac_ext >&5
11337   rm -rf conftest*
11338   eval "ac_cv_lib_$ac_lib_var=no"
11339 fi
11340 rm -f conftest*
11341 xe_check_libs=""
11342
11343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11344   echo "$ac_t""yes" 1>&6
11345   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11346 else
11347   echo "$ac_t""no" 1>&6
11348 fi
11349
11350
11351         done
11352       fi
11353     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11354    echo "    xemacs will be linked with \"tparam.o\""
11355  fi
11356                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11357       if test -n "$libs_termcap"; then
11358         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11359       else
11360         
11361 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11362 echo "configure:11363: checking for tgetent in -lcurses" >&5
11363 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11364
11365 xe_check_libs=" -lcurses "
11366 cat > conftest.$ac_ext <<EOF
11367 #line 11368 "configure"
11368 #include "confdefs.h"
11369 /* Override any gcc2 internal prototype to avoid an error.  */
11370 /* We use char because int might match the return type of a gcc2
11371     builtin and then its argument prototype would still apply.  */
11372 char tgetent();
11373
11374 int main() {
11375 tgetent()
11376 ; return 0; }
11377 EOF
11378 if { (eval echo configure:11379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11379   rm -rf conftest*
11380   eval "ac_cv_lib_$ac_lib_var=yes"
11381 else
11382   echo "configure: failed program was:" >&5
11383   cat conftest.$ac_ext >&5
11384   rm -rf conftest*
11385   eval "ac_cv_lib_$ac_lib_var=no"
11386 fi
11387 rm -f conftest*
11388 xe_check_libs=""
11389
11390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11391   echo "$ac_t""yes" 1>&6
11392   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11393 else
11394   echo "$ac_t""no" 1>&6
11395 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11396 echo "configure:11397: checking for tgetent in -ltermcap" >&5
11397 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11398
11399 xe_check_libs=" -ltermcap "
11400 cat > conftest.$ac_ext <<EOF
11401 #line 11402 "configure"
11402 #include "confdefs.h"
11403 /* Override any gcc2 internal prototype to avoid an error.  */
11404 /* We use char because int might match the return type of a gcc2
11405     builtin and then its argument prototype would still apply.  */
11406 char tgetent();
11407
11408 int main() {
11409 tgetent()
11410 ; return 0; }
11411 EOF
11412 if { (eval echo configure:11413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11413   rm -rf conftest*
11414   eval "ac_cv_lib_$ac_lib_var=yes"
11415 else
11416   echo "configure: failed program was:" >&5
11417   cat conftest.$ac_ext >&5
11418   rm -rf conftest*
11419   eval "ac_cv_lib_$ac_lib_var=no"
11420 fi
11421 rm -f conftest*
11422 xe_check_libs=""
11423
11424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11425   echo "$ac_t""yes" 1>&6
11426   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11427 else
11428   echo "$ac_t""no" 1>&6
11429 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11430    echo "    xemacs will be linked with \"termcap.o\""
11431  fi
11432 fi
11433
11434
11435 fi
11436
11437
11438       fi
11439     fi
11440   fi
11441   { test "$extra_verbose" = "yes" && cat << EOF
11442     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11443 EOF
11444 cat >> confdefs.h <<EOF
11445 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11446 EOF
11447 }
11448
11449   { test "$extra_verbose" = "yes" && cat << EOF
11450     Defining TERM_H_PATH = "${term_h_path-term.h}"
11451 EOF
11452 cat >> confdefs.h <<EOF
11453 #define TERM_H_PATH "${term_h_path-term.h}"
11454 EOF
11455 }
11456
11457
11458     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11459 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11460 echo "configure:11461: checking for gpm.h" >&5
11461
11462 cat > conftest.$ac_ext <<EOF
11463 #line 11464 "configure"
11464 #include "confdefs.h"
11465 #include <gpm.h>
11466 EOF
11467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11468 { (eval echo configure:11469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11470 if test -z "$ac_err"; then
11471   rm -rf conftest*
11472   eval "ac_cv_header_$ac_safe=yes"
11473 else
11474   echo "$ac_err" >&5
11475   echo "configure: failed program was:" >&5
11476   cat conftest.$ac_ext >&5
11477   rm -rf conftest*
11478   eval "ac_cv_header_$ac_safe=no"
11479 fi
11480 rm -f conftest*
11481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11482   echo "$ac_t""yes" 1>&6
11483   :
11484 else
11485   echo "$ac_t""no" 1>&6
11486 with_gpm=no
11487 fi
11488  }
11489   test -z "$with_gpm" && { 
11490 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11491 echo "configure:11492: checking for Gpm_Open in -lgpm" >&5
11492 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11493
11494 xe_check_libs=" -lgpm "
11495 cat > conftest.$ac_ext <<EOF
11496 #line 11497 "configure"
11497 #include "confdefs.h"
11498 /* Override any gcc2 internal prototype to avoid an error.  */
11499 /* We use char because int might match the return type of a gcc2
11500     builtin and then its argument prototype would still apply.  */
11501 char Gpm_Open();
11502
11503 int main() {
11504 Gpm_Open()
11505 ; return 0; }
11506 EOF
11507 if { (eval echo configure:11508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11508   rm -rf conftest*
11509   eval "ac_cv_lib_$ac_lib_var=yes"
11510 else
11511   echo "configure: failed program was:" >&5
11512   cat conftest.$ac_ext >&5
11513   rm -rf conftest*
11514   eval "ac_cv_lib_$ac_lib_var=no"
11515 fi
11516 rm -f conftest*
11517 xe_check_libs=""
11518
11519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11520   echo "$ac_t""yes" 1>&6
11521   with_gpm=yes
11522 else
11523   echo "$ac_t""no" 1>&6
11524 with_gpm=no
11525 fi
11526
11527  }
11528   if test "$with_gpm" = "yes"; then
11529     { test "$extra_verbose" = "yes" && cat << \EOF
11530     Defining HAVE_GPM
11531 EOF
11532 cat >> confdefs.h <<\EOF
11533 #define HAVE_GPM 1
11534 EOF
11535 }
11536
11537     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
11538    echo "    xemacs will be linked with \"gpmevent.o\""
11539  fi
11540     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
11541   fi
11542
11543 else   for feature in ncurses gpm; do
11544     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11545       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
11546     fi
11547     eval "with_${feature}=no"
11548   done
11549 fi 
11550 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
11551    echo "    xemacs will be linked with \"event-unixoid.o\""
11552  fi
11553
11554
11555 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
11556   != "no no no" && echo "checking for database support" 1>&6
11557 echo "configure:11558: checking for database support" >&5
11558
11559 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
11560   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
11561 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
11562 echo "configure:11563: checking for ndbm.h" >&5
11563
11564 cat > conftest.$ac_ext <<EOF
11565 #line 11566 "configure"
11566 #include "confdefs.h"
11567 #include <ndbm.h>
11568 EOF
11569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11570 { (eval echo configure:11571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11572 if test -z "$ac_err"; then
11573   rm -rf conftest*
11574   eval "ac_cv_header_$ac_safe=yes"
11575 else
11576   echo "$ac_err" >&5
11577   echo "configure: failed program was:" >&5
11578   cat conftest.$ac_ext >&5
11579   rm -rf conftest*
11580   eval "ac_cv_header_$ac_safe=no"
11581 fi
11582 rm -f conftest*
11583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11584   echo "$ac_t""yes" 1>&6
11585   :
11586 else
11587   echo "$ac_t""no" 1>&6
11588
11589     test "$with_database_gdbm" = "yes" -o \
11590          "$with_database_dbm"  = "yes" && \
11591       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11592     with_database_gdbm=no with_database_dbm=no
11593 fi
11594
11595 fi
11596
11597 if test "$with_database_gdbm" != "no"; then
11598   
11599 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
11600 echo "configure:11601: checking for dbm_open in -lgdbm" >&5
11601 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
11602
11603 xe_check_libs=" -lgdbm "
11604 cat > conftest.$ac_ext <<EOF
11605 #line 11606 "configure"
11606 #include "confdefs.h"
11607 /* Override any gcc2 internal prototype to avoid an error.  */
11608 /* We use char because int might match the return type of a gcc2
11609     builtin and then its argument prototype would still apply.  */
11610 char dbm_open();
11611
11612 int main() {
11613 dbm_open()
11614 ; return 0; }
11615 EOF
11616 if { (eval echo configure:11617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11617   rm -rf conftest*
11618   eval "ac_cv_lib_$ac_lib_var=yes"
11619 else
11620   echo "configure: failed program was:" >&5
11621   cat conftest.$ac_ext >&5
11622   rm -rf conftest*
11623   eval "ac_cv_lib_$ac_lib_var=no"
11624 fi
11625 rm -f conftest*
11626 xe_check_libs=""
11627
11628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11629   echo "$ac_t""yes" 1>&6
11630   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
11631 else
11632   echo "$ac_t""no" 1>&6
11633 if test "$with_database_gdbm" = "yes"; then
11634      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
11635    fi
11636    with_database_gdbm=no
11637 fi
11638
11639
11640 fi
11641
11642 if test "$with_database_dbm" != "no"; then
11643   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11644 echo "configure:11645: checking for dbm_open" >&5
11645
11646 cat > conftest.$ac_ext <<EOF
11647 #line 11648 "configure"
11648 #include "confdefs.h"
11649 /* System header to define __stub macros and hopefully few prototypes,
11650     which can conflict with char dbm_open(); below.  */
11651 #include <assert.h>
11652 /* Override any gcc2 internal prototype to avoid an error.  */
11653 /* We use char because int might match the return type of a gcc2
11654     builtin and then its argument prototype would still apply.  */
11655 char dbm_open();
11656
11657 int main() {
11658
11659 /* The GNU C library defines this for functions which it implements
11660     to always fail with ENOSYS.  Some functions are actually named
11661     something starting with __ and the normal name is an alias.  */
11662 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11663 choke me
11664 #else
11665 dbm_open();
11666 #endif
11667
11668 ; return 0; }
11669 EOF
11670 if { (eval echo configure:11671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11671   rm -rf conftest*
11672   eval "ac_cv_func_dbm_open=yes"
11673 else
11674   echo "configure: failed program was:" >&5
11675   cat conftest.$ac_ext >&5
11676   rm -rf conftest*
11677   eval "ac_cv_func_dbm_open=no"
11678 fi
11679 rm -f conftest*
11680
11681 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11682   echo "$ac_t""yes" 1>&6
11683   with_database_dbm=yes libdbm=
11684 else
11685   echo "$ac_t""no" 1>&6
11686
11687     
11688 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11689 echo "configure:11690: checking for dbm_open in -ldbm" >&5
11690 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
11691
11692 xe_check_libs=" -ldbm "
11693 cat > conftest.$ac_ext <<EOF
11694 #line 11695 "configure"
11695 #include "confdefs.h"
11696 /* Override any gcc2 internal prototype to avoid an error.  */
11697 /* We use char because int might match the return type of a gcc2
11698     builtin and then its argument prototype would still apply.  */
11699 char dbm_open();
11700
11701 int main() {
11702 dbm_open()
11703 ; return 0; }
11704 EOF
11705 if { (eval echo configure:11706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11706   rm -rf conftest*
11707   eval "ac_cv_lib_$ac_lib_var=yes"
11708 else
11709   echo "configure: failed program was:" >&5
11710   cat conftest.$ac_ext >&5
11711   rm -rf conftest*
11712   eval "ac_cv_lib_$ac_lib_var=no"
11713 fi
11714 rm -f conftest*
11715 xe_check_libs=""
11716
11717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11718   echo "$ac_t""yes" 1>&6
11719   with_database_dbm=yes libdbm=-ldbm
11720 else
11721   echo "$ac_t""no" 1>&6
11722 test "$with_database_dbm" = "yes" && \
11723         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11724       with_database_dbm=no
11725 fi
11726
11727
11728 fi
11729
11730 fi
11731
11732 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
11733 test "$with_database_gdbm" = "yes" -o \
11734      "$with_database_dbm"  = "yes" && \
11735   { test "$extra_verbose" = "yes" && cat << \EOF
11736     Defining HAVE_DBM
11737 EOF
11738 cat >> confdefs.h <<\EOF
11739 #define HAVE_DBM 1
11740 EOF
11741 }
11742
11743
11744 if test "$with_database_berkdb" != "no"; then
11745   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
11746 echo "configure:11747: checking for Berkeley db.h" >&5
11747   for path in "db/db.h" "db.h"; do
11748     cat > conftest.$ac_ext <<EOF
11749 #line 11750 "configure"
11750 #include "confdefs.h"
11751 #ifdef HAVE_INTTYPES_H
11752 #define __BIT_TYPES_DEFINED__
11753 #include <inttypes.h>
11754 typedef uint8_t  u_int8_t;
11755 typedef uint16_t u_int16_t;
11756 typedef uint32_t u_int32_t;
11757 #ifdef WE_DONT_NEED_QUADS
11758 typedef uint64_t u_int64_t;
11759 #endif
11760 #endif
11761 #include <$path>
11762
11763 int main() {
11764
11765 ; return 0; }
11766 EOF
11767 if { (eval echo configure:11768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11768   rm -rf conftest*
11769   db_h_path="$path"; break
11770 else
11771   echo "configure: failed program was:" >&5
11772   cat conftest.$ac_ext >&5
11773 fi
11774 rm -f conftest*
11775   done
11776   if test -z "$db_h_path"
11777   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
11778   else echo "$ac_t""$db_h_path" 1>&6
11779   fi
11780
11781   if test "$with_database_berkdb" != "no"; then
11782     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
11783 echo "configure:11784: checking for Berkeley DB version" >&5
11784     cat > conftest.$ac_ext <<EOF
11785 #line 11786 "configure"
11786 #include "confdefs.h"
11787 #include <$db_h_path>
11788 #if DB_VERSION_MAJOR > 1
11789 yes
11790 #endif
11791
11792 EOF
11793 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11794   egrep "yes" >/dev/null 2>&1; then
11795   rm -rf conftest*
11796   echo "$ac_t""2" 1>&6; dbfunc=db_open
11797 else
11798   rm -rf conftest*
11799   echo "$ac_t""1" 1>&6; dbfunc=dbopen
11800 fi
11801 rm -f conftest*
11802
11803     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
11804 echo "configure:11805: checking for $dbfunc" >&5
11805
11806 cat > conftest.$ac_ext <<EOF
11807 #line 11808 "configure"
11808 #include "confdefs.h"
11809 /* System header to define __stub macros and hopefully few prototypes,
11810     which can conflict with char $dbfunc(); below.  */
11811 #include <assert.h>
11812 /* Override any gcc2 internal prototype to avoid an error.  */
11813 /* We use char because int might match the return type of a gcc2
11814     builtin and then its argument prototype would still apply.  */
11815 char $dbfunc();
11816
11817 int main() {
11818
11819 /* The GNU C library defines this for functions which it implements
11820     to always fail with ENOSYS.  Some functions are actually named
11821     something starting with __ and the normal name is an alias.  */
11822 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
11823 choke me
11824 #else
11825 $dbfunc();
11826 #endif
11827
11828 ; return 0; }
11829 EOF
11830 if { (eval echo configure:11831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11831   rm -rf conftest*
11832   eval "ac_cv_func_$dbfunc=yes"
11833 else
11834   echo "configure: failed program was:" >&5
11835   cat conftest.$ac_ext >&5
11836   rm -rf conftest*
11837   eval "ac_cv_func_$dbfunc=no"
11838 fi
11839 rm -f conftest*
11840
11841 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
11842   echo "$ac_t""yes" 1>&6
11843   with_database_berkdb=yes need_libdb=no
11844 else
11845   echo "$ac_t""no" 1>&6
11846
11847     
11848 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
11849 echo "configure:11850: checking for $dbfunc in -ldb" >&5
11850 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
11851
11852 xe_check_libs=" -ldb "
11853 cat > conftest.$ac_ext <<EOF
11854 #line 11855 "configure"
11855 #include "confdefs.h"
11856 /* Override any gcc2 internal prototype to avoid an error.  */
11857 /* We use char because int might match the return type of a gcc2
11858     builtin and then its argument prototype would still apply.  */
11859 char $dbfunc();
11860
11861 int main() {
11862 $dbfunc()
11863 ; return 0; }
11864 EOF
11865 if { (eval echo configure:11866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11866   rm -rf conftest*
11867   eval "ac_cv_lib_$ac_lib_var=yes"
11868 else
11869   echo "configure: failed program was:" >&5
11870   cat conftest.$ac_ext >&5
11871   rm -rf conftest*
11872   eval "ac_cv_lib_$ac_lib_var=no"
11873 fi
11874 rm -f conftest*
11875 xe_check_libs=""
11876
11877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11878   echo "$ac_t""yes" 1>&6
11879   with_database_berkdb=yes need_libdb=yes
11880 else
11881   echo "$ac_t""no" 1>&6
11882 fi
11883
11884
11885 fi
11886
11887   fi
11888
11889   if test "$with_database_berkdb" = "yes"; then
11890     { test "$extra_verbose" = "yes" && cat << EOF
11891     Defining DB_H_PATH = "$db_h_path"
11892 EOF
11893 cat >> confdefs.h <<EOF
11894 #define DB_H_PATH "$db_h_path"
11895 EOF
11896 }
11897
11898     { test "$extra_verbose" = "yes" && cat << \EOF
11899     Defining HAVE_BERKELEY_DB
11900 EOF
11901 cat >> confdefs.h <<\EOF
11902 #define HAVE_BERKELEY_DB 1
11903 EOF
11904 }
11905
11906     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
11907   else with_database_berkdb=no
11908   fi
11909 fi
11910
11911 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
11912      != "no no no"; then
11913   { test "$extra_verbose" = "yes" && cat << \EOF
11914     Defining HAVE_DATABASE
11915 EOF
11916 cat >> confdefs.h <<\EOF
11917 #define HAVE_DATABASE 1
11918 EOF
11919 }
11920
11921   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
11922    echo "    xemacs will be linked with \"database.o\""
11923  fi
11924 fi
11925
11926 if test "$with_socks" = "yes"; then
11927   
11928 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
11929 echo "configure:11930: checking for SOCKSinit in -lsocks" >&5
11930 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
11931
11932 xe_check_libs=" -lsocks "
11933 cat > conftest.$ac_ext <<EOF
11934 #line 11935 "configure"
11935 #include "confdefs.h"
11936 /* Override any gcc2 internal prototype to avoid an error.  */
11937 /* We use char because int might match the return type of a gcc2
11938     builtin and then its argument prototype would still apply.  */
11939 char SOCKSinit();
11940
11941 int main() {
11942 SOCKSinit()
11943 ; return 0; }
11944 EOF
11945 if { (eval echo configure:11946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11946   rm -rf conftest*
11947   eval "ac_cv_lib_$ac_lib_var=yes"
11948 else
11949   echo "configure: failed program was:" >&5
11950   cat conftest.$ac_ext >&5
11951   rm -rf conftest*
11952   eval "ac_cv_lib_$ac_lib_var=no"
11953 fi
11954 rm -f conftest*
11955 xe_check_libs=""
11956
11957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11958   echo "$ac_t""yes" 1>&6
11959     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11960     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11961   { test "$extra_verbose" = "yes" && cat << EOF
11962     Defining $ac_tr_lib
11963 EOF
11964 cat >> confdefs.h <<EOF
11965 #define $ac_tr_lib 1
11966 EOF
11967 }
11968
11969   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
11970
11971 else
11972   echo "$ac_t""no" 1>&6
11973 fi
11974
11975
11976   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
11977     Defining HAVE_SOCKS
11978 EOF
11979 cat >> confdefs.h <<\EOF
11980 #define HAVE_SOCKS 1
11981 EOF
11982 }
11983
11984 fi
11985
11986 if test "$usage_tracking" = "yes"; then
11987   { test "$extra_verbose" = "yes" && cat << \EOF
11988     Defining USAGE_TRACKING
11989 EOF
11990 cat >> confdefs.h <<\EOF
11991 #define USAGE_TRACKING 1
11992 EOF
11993 }
11994
11995   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
11996 fi
11997
11998 if test "$with_modules" != "no"; then
11999   echo "checking for module support" 1>&6
12000 echo "configure:12001: checking for module support" >&5
12001
12002     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12003 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12004 echo "configure:12005: checking for dlfcn.h" >&5
12005
12006 cat > conftest.$ac_ext <<EOF
12007 #line 12008 "configure"
12008 #include "confdefs.h"
12009 #include <dlfcn.h>
12010 EOF
12011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12012 { (eval echo configure:12013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12014 if test -z "$ac_err"; then
12015   rm -rf conftest*
12016   eval "ac_cv_header_$ac_safe=yes"
12017 else
12018   echo "$ac_err" >&5
12019   echo "configure: failed program was:" >&5
12020   cat conftest.$ac_ext >&5
12021   rm -rf conftest*
12022   eval "ac_cv_header_$ac_safe=no"
12023 fi
12024 rm -f conftest*
12025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12026   echo "$ac_t""yes" 1>&6
12027   
12028     
12029 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12030 echo "configure:12031: checking for dlopen in -ldl" >&5
12031 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12032
12033 xe_check_libs=" -ldl "
12034 cat > conftest.$ac_ext <<EOF
12035 #line 12036 "configure"
12036 #include "confdefs.h"
12037 /* Override any gcc2 internal prototype to avoid an error.  */
12038 /* We use char because int might match the return type of a gcc2
12039     builtin and then its argument prototype would still apply.  */
12040 char dlopen();
12041
12042 int main() {
12043 dlopen()
12044 ; return 0; }
12045 EOF
12046 if { (eval echo configure:12047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12047   rm -rf conftest*
12048   eval "ac_cv_lib_$ac_lib_var=yes"
12049 else
12050   echo "configure: failed program was:" >&5
12051   cat conftest.$ac_ext >&5
12052   rm -rf conftest*
12053   eval "ac_cv_lib_$ac_lib_var=no"
12054 fi
12055 rm -f conftest*
12056 xe_check_libs=""
12057
12058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12059   echo "$ac_t""yes" 1>&6
12060   have_dl=yes libdl=dl
12061 else
12062   echo "$ac_t""no" 1>&6
12063
12064 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12065 echo "configure:12066: checking for dlopen in -lc" >&5
12066 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12067
12068 xe_check_libs=" -lc "
12069 cat > conftest.$ac_ext <<EOF
12070 #line 12071 "configure"
12071 #include "confdefs.h"
12072 /* Override any gcc2 internal prototype to avoid an error.  */
12073 /* We use char because int might match the return type of a gcc2
12074     builtin and then its argument prototype would still apply.  */
12075 char dlopen();
12076
12077 int main() {
12078 dlopen()
12079 ; return 0; }
12080 EOF
12081 if { (eval echo configure:12082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12082   rm -rf conftest*
12083   eval "ac_cv_lib_$ac_lib_var=yes"
12084 else
12085   echo "configure: failed program was:" >&5
12086   cat conftest.$ac_ext >&5
12087   rm -rf conftest*
12088   eval "ac_cv_lib_$ac_lib_var=no"
12089 fi
12090 rm -f conftest*
12091 xe_check_libs=""
12092
12093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12094   echo "$ac_t""yes" 1>&6
12095   have_dl=yes 
12096 else
12097   echo "$ac_t""no" 1>&6
12098 fi
12099
12100
12101 fi
12102
12103
12104 else
12105   echo "$ac_t""no" 1>&6
12106 fi
12107
12108   if test -n "$have_dl"; then
12109     { test "$extra_verbose" = "yes" && cat << \EOF
12110     Defining HAVE_DLOPEN
12111 EOF
12112 cat >> confdefs.h <<\EOF
12113 #define HAVE_DLOPEN 1
12114 EOF
12115 }
12116
12117   else
12118     
12119 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
12120 echo "configure:12121: checking for shl_load in -ldld" >&5
12121 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
12122
12123 xe_check_libs=" -ldld "
12124 cat > conftest.$ac_ext <<EOF
12125 #line 12126 "configure"
12126 #include "confdefs.h"
12127 /* Override any gcc2 internal prototype to avoid an error.  */
12128 /* We use char because int might match the return type of a gcc2
12129     builtin and then its argument prototype would still apply.  */
12130 char shl_load();
12131
12132 int main() {
12133 shl_load()
12134 ; return 0; }
12135 EOF
12136 if { (eval echo configure:12137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12137   rm -rf conftest*
12138   eval "ac_cv_lib_$ac_lib_var=yes"
12139 else
12140   echo "configure: failed program was:" >&5
12141   cat conftest.$ac_ext >&5
12142   rm -rf conftest*
12143   eval "ac_cv_lib_$ac_lib_var=no"
12144 fi
12145 rm -f conftest*
12146 xe_check_libs=""
12147
12148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12149   echo "$ac_t""yes" 1>&6
12150   libdl=dld have_dl=yes;
12151       { test "$extra_verbose" = "yes" && cat << \EOF
12152     Defining HAVE_SHL_LOAD
12153 EOF
12154 cat >> confdefs.h <<\EOF
12155 #define HAVE_SHL_LOAD 1
12156 EOF
12157 }
12158
12159 else
12160   echo "$ac_t""no" 1>&6
12161
12162 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12163 echo "configure:12164: checking for dld_init in -ldld" >&5
12164 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12165
12166 xe_check_libs=" -ldld "
12167 cat > conftest.$ac_ext <<EOF
12168 #line 12169 "configure"
12169 #include "confdefs.h"
12170 /* Override any gcc2 internal prototype to avoid an error.  */
12171 /* We use char because int might match the return type of a gcc2
12172     builtin and then its argument prototype would still apply.  */
12173 char dld_init();
12174
12175 int main() {
12176 dld_init()
12177 ; return 0; }
12178 EOF
12179 if { (eval echo configure:12180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12180   rm -rf conftest*
12181   eval "ac_cv_lib_$ac_lib_var=yes"
12182 else
12183   echo "configure: failed program was:" >&5
12184   cat conftest.$ac_ext >&5
12185   rm -rf conftest*
12186   eval "ac_cv_lib_$ac_lib_var=no"
12187 fi
12188 rm -f conftest*
12189 xe_check_libs=""
12190
12191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12192   echo "$ac_t""yes" 1>&6
12193   libdl=dld have_dl=yes;
12194       { test "$extra_verbose" = "yes" && cat << \EOF
12195     Defining HAVE_DLD_INIT
12196 EOF
12197 cat >> confdefs.h <<\EOF
12198 #define HAVE_DLD_INIT 1
12199 EOF
12200 }
12201
12202 else
12203   echo "$ac_t""no" 1>&6
12204 fi
12205
12206
12207 fi
12208
12209
12210   fi
12211
12212   if test -n "$have_dl"; then
12213         
12214 dll_ld=
12215 dll_ldflags=
12216 dll_cflags=
12217 dll_post=
12218 dll_ldo="-o"
12219 ld_dynamic_link_flags=
12220 xehost=$canonical
12221 xealias=$internal_configuration
12222
12223 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12224 echo "configure:12225: checking how to build dynamic libraries for ${xehost}" >&5
12225 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12226 case "$xehost" in
12227 *-*-linux-gnu*) ;;
12228 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12229 esac
12230
12231 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12232 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12233 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12234
12235 case "$xehost_os" in
12236 aix3*)
12237   # AIX sometimes has problems with the GCC collect2 program.  For some
12238   # reason, if we set the COLLECT_NAMES environment variable, the problems
12239   # vanish in a puff of smoke.
12240   if test "${COLLECT_NAMES+set}" != set; then
12241     COLLECT_NAMES=
12242     export COLLECT_NAMES
12243   fi
12244   ;;
12245 esac
12246
12247 # Now see if the compiler is really GCC.
12248 if test "$GCC" = "yes"; then
12249   XEGCC=yes
12250 else
12251   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12252 echo "configure:12253: checking checking whether we are using GNU C" >&5
12253   cat > conftest.$ac_ext <<EOF
12254 #line 12255 "configure"
12255 #include "confdefs.h"
12256
12257 #ifdef __GNUC__
12258   yes;
12259 #endif
12260
12261 EOF
12262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12263   egrep "yes" >/dev/null 2>&1; then
12264   rm -rf conftest*
12265   XEGCC=yes
12266 else
12267   rm -rf conftest*
12268   XEGCC=no
12269 fi
12270 rm -f conftest*
12271
12272   echo "$ac_t""${XEGCC}" 1>&6
12273 fi
12274
12275 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12276 echo "configure:12277: checking how to produce PIC code" >&5
12277 wl=
12278
12279 can_build_shared=yes
12280 if test "$XEGCC" = yes; then
12281   wl='-Wl,'
12282
12283   case "$xehost_os" in
12284   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12285     # PIC is the default for these OSes.
12286     ;;
12287
12288   os2*)
12289     # We can build DLLs from non-PIC.
12290     ;;
12291   amigaos*)
12292     # FIXME: we need at least 68020 code to build shared libraries, but
12293     # adding the `-m68020' flag to GCC prevents building anything better,
12294     # like `-m68040'.
12295     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12296     ;;
12297   *)
12298     dll_cflags='-fPIC'
12299     ;;
12300   esac
12301 else
12302   # PORTME Check for PIC flags for the system compiler.
12303   case "$xehost_os" in
12304   hpux9* | hpux1[0-9]*)
12305     # Is there a better link_static_flag that works with the bundled CC?
12306     wl='-Wl,'
12307     dll_cflags='+Z'
12308     ;;
12309
12310   irix5* | irix6*)
12311     wl='-Wl,'
12312     # PIC (with -KPIC) is the default.
12313     ;;
12314
12315   os2*)
12316     # We can build DLLs from non-PIC.
12317     ;;
12318
12319   osf3* | osf4*)
12320     # All OSF/1 code is PIC.
12321     wl='-Wl,'
12322     ;;
12323
12324   sco3.2v5*)
12325     dll_cflags='-belf -Kpic'
12326     wl='-Wl,'
12327     ;;
12328
12329   unixware*)
12330     dll_cflags="-KPIC"
12331     wl="-Wl,"
12332     ;;
12333
12334   sysv4*)
12335     dll_cflags="-KPIC"
12336     wl="-Wl,"
12337     ;;
12338
12339   sysv5*)
12340     dll_cflags="-KPIC"
12341     wl="-Wl,"
12342     ;;
12343
12344   solaris2*)
12345     dll_cflags='-KPIC'
12346     wl='-Wl,'
12347     ;;
12348
12349   sunos4*)
12350     dll_cflags='-PIC'
12351     wl='-Qoption ld '
12352     ;;
12353
12354   uts4*)
12355     dll_cflags='-pic'
12356     ;;
12357
12358   *)
12359     can_build_shared=no
12360     ;;
12361   esac
12362 fi
12363
12364 if test -n "$dll_cflags"; then
12365   echo "$ac_t""${dll_cflags}" 1>&6
12366   
12367   # Check to make sure the dll_cflags actually works.
12368   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12369 echo "configure:12370: checking if PIC flag ${dll_cflags} really works" >&5
12370   save_CFLAGS="$CFLAGS"
12371   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12372   cat > conftest.$ac_ext <<EOF
12373 #line 12374 "configure"
12374 #include "confdefs.h"
12375
12376 int main() {
12377 int x=0;
12378 ; return 0; }
12379 EOF
12380 if { (eval echo configure:12381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12381   rm -rf conftest*
12382   
12383     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12384     # reports no error.  So, we need to grep stderr for (Bundled).
12385     if grep '(Bundled)' config.log >/dev/null; then
12386       echo "$ac_t""no" 1>&6
12387       can_build_shared=no
12388       dll_cflags=
12389     else
12390       echo "$ac_t""yes" 1>&6
12391     fi
12392 else
12393   echo "configure: failed program was:" >&5
12394   cat conftest.$ac_ext >&5
12395   rm -rf conftest*
12396   echo "$ac_t""no" 1>&6
12397     can_build_shared=no
12398     dll_cflags=
12399 fi
12400 rm -f conftest*
12401   CFLAGS="$save_CFLAGS"
12402 else
12403   echo "$ac_t""none" 1>&6
12404 fi
12405
12406 if test "$can_build_shared" = "yes"; then
12407 cc_produces_so=no
12408 xldf=
12409 xcldf=
12410 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12411 echo "configure:12412: checking if C compiler can produce shared libraries" >&5
12412 if test "$XEGCC" = yes; then
12413   xcldf="-shared"
12414   xldf="-shared"
12415 else # Not using GCC
12416   case "$xehost_os" in
12417     aix3* | aix4*)
12418       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12419       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12420       ;;
12421
12422     freebsd2* | netbsd* | openbsd*)
12423       xldf="-Bshareable"
12424       xcldf="${wl}-Bshareable"
12425       ;;
12426
12427     freebsd3*)
12428       xcldf="-shared"
12429       ;;
12430
12431     hpux*)
12432       xldf="-b +s"
12433       xcldf="${wl}-b ${wl}+s"
12434       ;;
12435
12436     irix5* | irix6* | osf3* | osf4*)
12437       xcldf="${wl}-shared"
12438       xldf="-shared"
12439       ;;
12440
12441     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12442       xcldf="-G"
12443       xldf="-G"
12444       ;;
12445
12446     sunos4*)
12447       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12448       xldf="-assert pure-text -Bstatic"
12449       ;;
12450   esac
12451 fi # End if if we are using gcc
12452
12453 if test -n "$xcldf"; then
12454   save_LDFLAGS=$LDFLAGS
12455   save_LIBS=$LIBS
12456   save_xe_libs=$xe_libs
12457   LDFLAGS="$xcldf $LDFLAGS"
12458   LIBS=
12459   xe_libs=
12460   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12461   cat > conftest.$ac_ext <<EOF
12462 #line 12463 "configure"
12463 #include "confdefs.h"
12464
12465 int main() {
12466 int x=0;
12467 ; return 0; }
12468 EOF
12469 if { (eval echo configure:12470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12470   rm -rf conftest*
12471   cc_produces_so=yes
12472 else
12473   echo "configure: failed program was:" >&5
12474   cat conftest.$ac_ext >&5
12475   rm -rf conftest*
12476   cc_produces_so=no
12477 fi
12478 rm -f conftest*
12479   LDFLAGS=$save_LDFLAGS
12480   LIBS=$save_LIBS
12481   xe_libs=$save_xe_libs
12482   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12483 else
12484   cc_produces_so=no
12485 fi
12486 echo "$ac_t""${cc_produces_so}" 1>&6
12487
12488 LTLD=$LD
12489 if test -z "$LTLD"; then
12490   ac_prog=ld
12491   if test "$XEGCC" = yes; then
12492     # Check if gcc -print-prog-name=ld gives a path.
12493     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12494 echo "configure:12495: checking for ld used by GCC" >&5
12495     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12496     case "$ac_prog" in
12497     # Accept absolute paths.
12498     /*)
12499       if test -z "$LTLD"; then
12500         case "$ac_prog" in
12501           *gcc-lib*) LTLD="$CC"
12502                      ;;
12503           *)         LTLD="$ac_prog"
12504                      ;;
12505         esac
12506       fi
12507       ;;
12508     "")
12509       # If it fails, then pretend we aren't using GCC.
12510       ac_prog=ld
12511       ;;
12512     *)
12513       # If it is relative, then search for the first ld in PATH.
12514       with_gnu_ld=unknown
12515       ;;
12516     esac
12517   else
12518     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12519 echo "configure:12520: checking for GNU ld" >&5
12520   fi
12521
12522   if test -z "$LTLD"; then
12523     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12524     for ac_dir in $PATH; do
12525       test -z "$ac_dir" && ac_dir=.
12526       if test -f "$ac_dir/$ac_prog"; then
12527         LTLD="$ac_dir/$ac_prog"
12528         # Check to see if the program is GNU ld.  I'd rather use --version,
12529         # but apparently some GNU ld's only accept -v.
12530         # Break only if it was the GNU/non-GNU ld that we prefer.
12531         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12532           xe_gnu_ld=yes
12533         else
12534           xe_gnu_ld=no
12535         fi
12536       fi
12537     done
12538     IFS="$ac_save_ifs"
12539   fi
12540
12541   if test -n "$LTLD"; then
12542     echo "$ac_t""${LTLD}" 1>&6
12543   else
12544     echo "$ac_t""no" 1>&6
12545   fi
12546
12547   if test -z "$LTLD" -a "$cc_produces_so" = no; then
12548     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
12549     exit 1
12550   fi
12551 fi
12552
12553 ld_dynamic_link_flags=
12554
12555 # Check to see if it really is or isn't GNU ld.
12556 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
12557 echo "configure:12558: checking if the linker is GNU ld" >&5
12558 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12559 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
12560   xe_gnu_ld=yes
12561 else
12562   xe_gnu_ld=no
12563 fi
12564 echo "$ac_t""${xe_gnu_ld}" 1>&6
12565
12566 case "$xehost_os" in
12567   amigaos* | sunos4*)
12568     # On these operating systems, we should treat GNU ld like the system ld.
12569     gnu_ld_acts_native=yes
12570     ;;
12571   *)
12572     gnu_ld_acts_native=no
12573     ;;
12574 esac
12575
12576 if test "$cc_produces_so" = "yes"; then
12577   dll_ld=$CC
12578   dll_ldflags=$xcldf
12579   can_build_shared=yes
12580 else
12581   # OK - only NOW do we futz about with ld.
12582   # See if the linker supports building shared libraries.
12583   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
12584 echo "configure:12585: checking whether the linker supports shared libraries" >&5
12585   dll_ld=$CC
12586   dll_ldflags=$LDFLAGS
12587   ld_shlibs=yes
12588   can_build_shared=yes
12589   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
12590     # See if GNU ld supports shared libraries.
12591     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12592       dll_ld=$CC
12593       dll_ldflags="-shared"
12594       ld_shlibs=yes
12595     else
12596       ld_shlibs=no
12597     fi
12598   else
12599     # PORTME fill in a description of your system's linker (not GNU ld)
12600     case "$xehost_os" in
12601     aix3*)
12602       dll_ld=$LTLD
12603       dll_ldflags=$xldf
12604       ;;
12605
12606     aix4*)
12607       dll_ldflags=$xcldf
12608       ;;
12609
12610     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12611     # support.  Future versions do this automatically, but an explicit c++rt0.o
12612     # doesn't break anything, and helps significantly (at the cost of a little
12613     # extra space).
12614     freebsd2.2*)
12615       dll_ld=$LTLD
12616       dll_ldflags=$xldf
12617       dll_post="/usr/lib/c++rt0.o"
12618       ;;
12619
12620     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
12621     freebsd2*)
12622       dll_ld=$LTLD
12623       dll_ldflags="-Bshareable"
12624       ;;
12625
12626     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
12627     freebsd3*)
12628       dll_ldflags="-shared"
12629       ;;
12630
12631     hpux*)
12632       dll_ld=$LTLD
12633       dll_ldflags=$xldf
12634       ;;
12635
12636     irix5* | irix6*)
12637       dll_ld=$LTLD
12638       dll_ldflags=$xldf
12639       ;;
12640
12641     netbsd*)
12642       # Tested with NetBSD 1.2 ld
12643       dll_ld=$LTLD
12644       dll_ldflags=$xldf
12645       ;;
12646
12647     openbsd*)
12648       dll_ld=$LTLD
12649       dll_ldflags=$xldf
12650       ;;
12651
12652     osf3* | osf4*)
12653       dll_ld=$LTLD
12654       dll_ldflags=$xldf
12655       ;;
12656
12657     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
12658     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
12659       dll_ld=$LTLD
12660       case "$dll_ld" in
12661         *gcc*) dll_ldflags="-shared"
12662                dll_ld=$CC
12663                ;;
12664         *)     dll_ldflags="-G"
12665                ;;
12666       esac
12667       ;;
12668
12669     sunos4*)
12670       if test "$XEGCC" = yes; then
12671         dll_ld=$CC
12672       else
12673         dll_ld=$LTLD
12674       fi
12675       dll_ldflags=$xldf
12676       ;;
12677
12678     uts4*)
12679       dll_ld=$LTLD
12680       dll_ldflags="-G"
12681       ;;
12682
12683     bsdi*)
12684       dll_ldflags="-r"
12685       dll_ld="shlicc2"
12686       ;;
12687
12688     *)
12689       ld_shlibs=no
12690       can_build_shared=no
12691       ;;
12692     esac
12693   fi
12694   echo "$ac_t""${ld_shlibs}" 1>&6
12695   if test "$ld_shlibs" = "no"; then
12696     can_build_shared=no
12697   fi
12698 fi # End of if cc_produces_so = no
12699
12700
12701 if test "$xe_gnu_ld" = yes; then
12702   if test "$ld_shlibs" = yes; then
12703     ld_dynamic_link_flags="${wl}-export-dynamic"
12704   fi
12705 fi
12706
12707 if test -z "$ld_dynamic_link_flags"; then
12708   case "$xehost_os" in
12709   aix3*)
12710     ld_dynamic_link_flags=
12711     ;;
12712
12713   aix4*)
12714     ld_dynamic_link_flags=
12715     ;;
12716
12717   freebsd2.2*)
12718     ld_dynamic_link_flags=
12719     ;;
12720
12721   freebsd2*)
12722     ld_dynamic_link_flags=
12723     ;;
12724
12725   freebsd3*)
12726     ld_dynamic_link_flags=
12727     ;;
12728
12729   hpux*)
12730     ld_dynamic_link_flags="${wl}-E"
12731     ;;
12732
12733   irix5* | irix6*)
12734     ld_dynamic_link_flags=
12735     ;;
12736
12737   netbsd*)
12738     ld_dynamic_link_flags=
12739     ;;
12740
12741   openbsd*)
12742     ld_dynamic_link_flags=
12743     ;;
12744
12745   osf3* | osf4*)
12746     ld_dynamic_link_flags=
12747     ;;
12748
12749   solaris2* | solaris7*)
12750     ld_dynamic_link_flags=
12751     ;;
12752
12753   sco3.2v5* | unixware* | sysv5* | sysv4*)
12754     ld_dynamic_link_flags="${wl}-Bexport"
12755     ;;
12756
12757   sunos4*)
12758     ld_dynamic_link_flags=
12759     ;;
12760
12761   uts4*)
12762     ld_dynamic_link_flags=
12763     ;;
12764
12765   bsdi*)
12766     ld_dynamic_link_flags=
12767     ;;
12768
12769   esac
12770 fi # End of if -z ld_dynamic_link_flags
12771 fi # End of if test "$can_build_shared" = "yes"
12772
12773
12774
12775
12776
12777
12778
12779
12780   fi
12781
12782   if test "$can_build_shared" = "yes"; then
12783     { test "$extra_verbose" = "yes" && cat << \EOF
12784     Defining HAVE_SHLIB
12785 EOF
12786 cat >> confdefs.h <<\EOF
12787 #define HAVE_SHLIB 1
12788 EOF
12789 }
12790
12791     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
12792    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
12793  fi
12794     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
12795     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
12796     for ac_func in dlerror _dlerror
12797 do
12798 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12799 echo "configure:12800: checking for $ac_func" >&5
12800
12801 cat > conftest.$ac_ext <<EOF
12802 #line 12803 "configure"
12803 #include "confdefs.h"
12804 /* System header to define __stub macros and hopefully few prototypes,
12805     which can conflict with char $ac_func(); below.  */
12806 #include <assert.h>
12807 /* Override any gcc2 internal prototype to avoid an error.  */
12808 /* We use char because int might match the return type of a gcc2
12809     builtin and then its argument prototype would still apply.  */
12810 char $ac_func();
12811
12812 int main() {
12813
12814 /* The GNU C library defines this for functions which it implements
12815     to always fail with ENOSYS.  Some functions are actually named
12816     something starting with __ and the normal name is an alias.  */
12817 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12818 choke me
12819 #else
12820 $ac_func();
12821 #endif
12822
12823 ; return 0; }
12824 EOF
12825 if { (eval echo configure:12826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12826   rm -rf conftest*
12827   eval "ac_cv_func_$ac_func=yes"
12828 else
12829   echo "configure: failed program was:" >&5
12830   cat conftest.$ac_ext >&5
12831   rm -rf conftest*
12832   eval "ac_cv_func_$ac_func=no"
12833 fi
12834 rm -f conftest*
12835
12836 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12837   echo "$ac_t""yes" 1>&6
12838     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12839   { test "$extra_verbose" = "yes" && cat << EOF
12840     Defining $ac_tr_func
12841 EOF
12842 cat >> confdefs.h <<EOF
12843 #define $ac_tr_func 1
12844 EOF
12845 }
12846  
12847 else
12848   echo "$ac_t""no" 1>&6
12849 fi
12850 done
12851
12852     with_modules=yes
12853   else
12854     if test "$with_modules" = "yes"; then
12855       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
12856     else
12857       echo "configure: warning: "Module support cannot be provided."" 1>&2
12858     fi
12859     with_modules=no
12860   fi
12861 fi
12862
12863 cat > conftest.$ac_ext <<EOF
12864 #line 12865 "configure"
12865 #include "confdefs.h"
12866 int main(int c,char *v[]){return 0;}
12867 EOF
12868 if { (eval echo configure:12869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12869 then
12870   :
12871 else
12872   conftest_rc="$?"
12873   echo "configure: failed program was:" >&5
12874   cat conftest.$ac_ext >&5
12875   rm -fr conftest*
12876   
12877   echo ""
12878   echo "*** PANIC *** The C compiler can no longer build working executables."
12879   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
12880   echo "*** PANIC *** The most likely reason for this problem is that configure"
12881   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
12882   echo "*** PANIC *** found at run time."
12883   echo "*** PANIC ***"
12884   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
12885   echo "*** PANIC *** On other systems, try telling configure where to find the"
12886   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
12887   echo "*** PANIC ***"
12888   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
12889   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
12890   echo "*** PANIC *** on your system.  Don't do that."
12891   exit 1
12892 fi
12893 rm -fr conftest*
12894
12895 if test "$win32_processes" = "yes"; then
12896   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
12897    echo "    xemacs will be linked with \"process-nt.o\""
12898  fi
12899 else
12900   { test "$extra_verbose" = "yes" && cat << \EOF
12901     Defining HAVE_UNIX_PROCESSES
12902 EOF
12903 cat >> confdefs.h <<\EOF
12904 #define HAVE_UNIX_PROCESSES 1
12905 EOF
12906 }
12907
12908   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
12909    echo "    xemacs will be linked with \"process-unix.o\""
12910  fi
12911 fi
12912
12913
12914
12915 T=""
12916 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12917 CFLAGS="$T"
12918
12919
12920 T=""
12921 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12922 extra_objs="$T"
12923
12924
12925 T=""
12926 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
12927 c_switch_general="$T"
12928
12929
12930 T=""
12931 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12932 c_switch_window_system="$T"
12933
12934
12935 T=""
12936 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12937 c_switch_all="$T"
12938
12939
12940 T=""
12941 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
12942 ld_switch_general="$T"
12943
12944
12945 T=""
12946 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12947 ld_switch_window_system="$T"
12948
12949
12950 T=""
12951 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12952 ld_switch_all="$T"
12953
12954
12955 T=""
12956 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12957 ld_libs_general="$T"
12958
12959
12960 T=""
12961 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
12962 ld_libs_window_system="$T"
12963
12964
12965 T=""
12966 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12967 ld_libs_all="$T"
12968
12969
12970
12971 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
12972 internal_makefile_list="Makefile.in"
12973 SUBDIR_MAKEFILES=''
12974 test -d lock || mkdir lock
12975 for dir in $MAKE_SUBDIR; do
12976   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
12977         test -d "$d" || mkdir "$d"; cd "$d"
12978       done ) ;;
12979    * ) test -d "$dir" || mkdir "$dir" ;;
12980   esac
12981   
12982 T=""
12983 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12984 SUBDIR_MAKEFILES="$T"
12985
12986   
12987 T=""
12988 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12989 internal_makefile_list="$T"
12990
12991 done
12992
12993
12994
12995
12996 for dir in src/s src/m; do
12997   if test ! -d "$dir" ; then
12998     echo Making symbolic link to "$srcdir/$dir"
12999     ${LN_S} "$srcdir/$dir" "$dir"
13000   fi
13001 done
13002
13003 if test "$extra_verbose" = "yes"; then
13004   echo ""
13005   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
13006   echo ""
13007 fi
13008
13009 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
13010   echo "creating src/gdbinit"; echo ""
13011   echo "source $srcdir/src/gdbinit" > src/gdbinit
13012 fi
13013
13014 if test "$__SUNPRO_C" = "yes"; then
13015   echo "creating .sbinit"; echo ""
13016   ( echo "# For use with Sun WorkShop's Source browser."
13017     echo "# See sbquery(1) and sbinit(4) for more information"
13018     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13019   ) > .sbinit
13020 fi
13021
13022 rm -f core
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042 PREFIX=$prefix
13043 while true; do
13044   case "$PREFIX" in
13045     *\$* ) eval "PREFIX=$PREFIX" ;;
13046     *) break ;;
13047   esac
13048 done
13049
13050
13051
13052
13053 EXEC_PREFIX=$exec_prefix
13054 while true; do
13055   case "$EXEC_PREFIX" in
13056     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13057     *) break ;;
13058   esac
13059 done
13060
13061
13062
13063
13064 INFODIR=$infodir
13065 while true; do
13066   case "$INFODIR" in
13067     *\$* ) eval "INFODIR=$INFODIR" ;;
13068     *) break ;;
13069   esac
13070 done
13071
13072
13073
13074
13075 INFOPATH=$infopath
13076 while true; do
13077   case "$INFOPATH" in
13078     *\$* ) eval "INFOPATH=$INFOPATH" ;;
13079     *) break ;;
13080   esac
13081 done
13082
13083
13084
13085
13086 PACKAGE_PATH=$package_path
13087 while true; do
13088   case "$PACKAGE_PATH" in
13089     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
13090     *) break ;;
13091   esac
13092 done
13093
13094
13095
13096
13097 LISPDIR=$lispdir
13098 while true; do
13099   case "$LISPDIR" in
13100     *\$* ) eval "LISPDIR=$LISPDIR" ;;
13101     *) break ;;
13102   esac
13103 done
13104
13105
13106
13107
13108 MODULEDIR=$moduledir
13109 while true; do
13110   case "$MODULEDIR" in
13111     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
13112     *) break ;;
13113   esac
13114 done
13115
13116
13117
13118
13119 SITELISPDIR=$sitelispdir
13120 while true; do
13121   case "$SITELISPDIR" in
13122     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
13123     *) break ;;
13124   esac
13125 done
13126
13127
13128
13129
13130 SITEMODULEDIR=$sitemoduledir
13131 while true; do
13132   case "$SITEMODULEDIR" in
13133     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
13134     *) break ;;
13135   esac
13136 done
13137
13138
13139
13140
13141 ETCDIR=$etcdir
13142 while true; do
13143   case "$ETCDIR" in
13144     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13145     *) break ;;
13146   esac
13147 done
13148
13149
13150
13151
13152 LOCKDIR=$lockdir
13153 while true; do
13154   case "$LOCKDIR" in
13155     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13156     *) break ;;
13157   esac
13158 done
13159
13160
13161
13162
13163 DOCDIR=$docdir
13164 while true; do
13165   case "$DOCDIR" in
13166     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13167     *) break ;;
13168   esac
13169 done
13170
13171
13172
13173
13174 ARCHLIBDIR=$archlibdir
13175 while true; do
13176   case "$ARCHLIBDIR" in
13177     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13178     *) break ;;
13179   esac
13180 done
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13202
13203
13204
13205
13206
13207
13208
13209 : ${XEMACS_CC:=$CC}
13210
13211
13212 if test "$with_prefix" = "yes"; then
13213   { test "$extra_verbose" = "yes" && cat << \EOF
13214     Defining PREFIX_USER_DEFINED
13215 EOF
13216 cat >> confdefs.h <<\EOF
13217 #define PREFIX_USER_DEFINED 1
13218 EOF
13219 }
13220
13221 fi
13222
13223 if test "$with_site_lisp" = "no"; then
13224   { test "$extra_verbose" = "yes" && cat << \EOF
13225     Defining INHIBIT_SITE_LISP
13226 EOF
13227 cat >> confdefs.h <<\EOF
13228 #define INHIBIT_SITE_LISP 1
13229 EOF
13230 }
13231
13232 fi
13233 if test "$with_site_modules" = "no"; then
13234   { test "$extra_verbose" = "yes" && cat << \EOF
13235     Defining INHIBIT_SITE_MODULES
13236 EOF
13237 cat >> confdefs.h <<\EOF
13238 #define INHIBIT_SITE_MODULES 1
13239 EOF
13240 }
13241
13242 fi
13243
13244
13245 T=""
13246 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13247 ac_configure_args="$T"
13248
13249 { test "$extra_verbose" = "yes" && cat << EOF
13250     Defining EMACS_CONFIGURATION = "$configuration"
13251 EOF
13252 cat >> confdefs.h <<EOF
13253 #define EMACS_CONFIGURATION "$configuration"
13254 EOF
13255 }
13256
13257 { test "$extra_verbose" = "yes" && cat << EOF
13258     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13259 EOF
13260 cat >> confdefs.h <<EOF
13261 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13262 EOF
13263 }
13264
13265 { test "$extra_verbose" = "yes" && cat << EOF
13266     Defining config_machfile = "$machfile"
13267 EOF
13268 cat >> confdefs.h <<EOF
13269 #define config_machfile "$machfile"
13270 EOF
13271 }
13272
13273 { test "$extra_verbose" = "yes" && cat << EOF
13274     Defining config_opsysfile = "$opsysfile"
13275 EOF
13276 cat >> confdefs.h <<EOF
13277 #define config_opsysfile "$opsysfile"
13278 EOF
13279 }
13280
13281
13282
13283 null_string=""
13284 { test "$extra_verbose" = "yes" && cat << EOF
13285     Defining LD_SWITCH_X_SITE = $null_string
13286 EOF
13287 cat >> confdefs.h <<EOF
13288 #define LD_SWITCH_X_SITE $null_string
13289 EOF
13290 }
13291
13292 { test "$extra_verbose" = "yes" && cat << EOF
13293     Defining LD_SWITCH_X_SITE_AUX = $null_string
13294 EOF
13295 cat >> confdefs.h <<EOF
13296 #define LD_SWITCH_X_SITE_AUX $null_string
13297 EOF
13298 }
13299
13300 { test "$extra_verbose" = "yes" && cat << EOF
13301     Defining C_SWITCH_X_SITE = $null_string
13302 EOF
13303 cat >> confdefs.h <<EOF
13304 #define C_SWITCH_X_SITE $null_string
13305 EOF
13306 }
13307
13308 { test "$extra_verbose" = "yes" && cat << EOF
13309     Defining LD_SWITCH_SITE = $null_string
13310 EOF
13311 cat >> confdefs.h <<EOF
13312 #define LD_SWITCH_SITE $null_string
13313 EOF
13314 }
13315
13316 { test "$extra_verbose" = "yes" && cat << EOF
13317     Defining C_SWITCH_SITE = $null_string
13318 EOF
13319 cat >> confdefs.h <<EOF
13320 #define C_SWITCH_SITE $null_string
13321 EOF
13322 }
13323
13324
13325
13326 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13327     Defining GNU_MALLOC
13328 EOF
13329 cat >> confdefs.h <<\EOF
13330 #define GNU_MALLOC 1
13331 EOF
13332 }
13333
13334 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13335     Defining USE_SYSTEM_MALLOC
13336 EOF
13337 cat >> confdefs.h <<\EOF
13338 #define USE_SYSTEM_MALLOC 1
13339 EOF
13340 }
13341
13342 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13343     Defining USE_DEBUG_MALLOC
13344 EOF
13345 cat >> confdefs.h <<\EOF
13346 #define USE_DEBUG_MALLOC 1
13347 EOF
13348 }
13349
13350                                               { test "$extra_verbose" = "yes" && cat << \EOF
13351     Defining USE_SYSTEM_MALLOC
13352 EOF
13353 cat >> confdefs.h <<\EOF
13354 #define USE_SYSTEM_MALLOC 1
13355 EOF
13356 }
13357
13358 fi
13359 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13360     Defining I18N3
13361 EOF
13362 cat >> confdefs.h <<\EOF
13363 #define I18N3 1
13364 EOF
13365 }
13366
13367 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13368     Defining USE_GCC
13369 EOF
13370 cat >> confdefs.h <<\EOF
13371 #define USE_GCC 1
13372 EOF
13373 }
13374
13375 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13376     Defining EXTERNAL_WIDGET
13377 EOF
13378 cat >> confdefs.h <<\EOF
13379 #define EXTERNAL_WIDGET 1
13380 EOF
13381 }
13382
13383 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13384     Defining NO_DOC_FILE
13385 EOF
13386 cat >> confdefs.h <<\EOF
13387 #define NO_DOC_FILE 1
13388 EOF
13389 }
13390
13391 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13392     Defining PURIFY
13393 EOF
13394 cat >> confdefs.h <<\EOF
13395 #define PURIFY 1
13396 EOF
13397 }
13398
13399 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13400     Defining QUANTIFY
13401 EOF
13402 cat >> confdefs.h <<\EOF
13403 #define QUANTIFY 1
13404 EOF
13405 }
13406
13407 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13408     Defining MAIL_USE_POP
13409 EOF
13410 cat >> confdefs.h <<\EOF
13411 #define MAIL_USE_POP 1
13412 EOF
13413 }
13414
13415 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13416     Defining KERBEROS
13417 EOF
13418 cat >> confdefs.h <<\EOF
13419 #define KERBEROS 1
13420 EOF
13421 }
13422
13423 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13424     Defining HESIOD
13425 EOF
13426 cat >> confdefs.h <<\EOF
13427 #define HESIOD 1
13428 EOF
13429 }
13430
13431 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13432     Defining USE_UNION_TYPE
13433 EOF
13434 cat >> confdefs.h <<\EOF
13435 #define USE_UNION_TYPE 1
13436 EOF
13437 }
13438
13439 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13440     Defining PDUMP
13441 EOF
13442 cat >> confdefs.h <<\EOF
13443 #define PDUMP 1
13444 EOF
13445 }
13446
13447
13448
13449 (
13450 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13451 else
13452   echo "uname -a: `uname -a`"
13453 fi
13454 echo ""
13455 echo "$0 $quoted_arguments"
13456 ) > Installation
13457
13458 if test ! -z ${emacs_beta_version} ; then
13459   if test -z "${emacs_is_beta}" ; then
13460         xemacs_betaname=".${emacs_beta_version}"
13461   else
13462         xemacs_betaname="-b${emacs_beta_version}"
13463   fi
13464 else
13465   xemacs_betaname=""
13466 fi
13467
13468 (
13469 echo "
13470
13471 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13472
13473   Where should the build process find the source code?    $srcdir
13474   What installation prefix should install use?            $prefix
13475   What operating system and machine description files should XEmacs use?
13476         \`$opsysfile' and \`$machfile'
13477   What compiler should XEmacs be built with?              $CC $CFLAGS
13478   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13479   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13480   What window system should XEmacs use?                   ${window_system}"
13481 if test "$with_x11" = "yes"; then
13482   echo "  Where do we find X Windows header files?                $x_includes"
13483   echo "  Where do we find X Windows libraries?                   $x_libraries"
13484 fi
13485 if test -n "$site_includes"; then
13486   echo "  Additional header files:                                $site_includes"
13487 fi
13488 if test -n "$site_libraries"; then
13489   echo "  Additional libraries:                                   $site_libraries"
13490 fi
13491 if test -n "$site_prefixes"; then
13492   echo "  Additional prefixes:                                    $site_prefixes"
13493 fi
13494 if test -n "$runpath"; then
13495   echo "  Runtime library search path:                            $runpath"
13496 fi
13497 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13498 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13499 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13500 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13501   echo "  No Xmu; substituting equivalent routines."
13502 fi
13503
13504 if test "$with_xpm" = yes; then
13505   echo "  Compiling in support for XPM images."
13506 elif test "$with_x11" = yes; then
13507   echo "  --------------------------------------------------------------------"
13508   echo "  WARNING: Compiling without XPM support."
13509   if test "$xpm_problem" != ""; then
13510     echo "  Reason: $xpm_problem"
13511   fi
13512   echo "  WARNING: You should strongly consider installing XPM."
13513   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13514   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13515   echo "  --------------------------------------------------------------------"
13516 fi
13517 if test "$with_png" = yes; then
13518   echo "  Compiling in support for PNG image handling."
13519 elif test "$window_system" != "none"; then
13520   echo "  --------------------------------------------------------------------"
13521   echo "  WARNING: Compiling without PNG image support."
13522   if test "$png_problem" != ""; then
13523     echo "  Reason: $png_problem"
13524   fi
13525   echo "  WARNING: You should strongly consider installing the PNG libraries."
13526   echo "  WARNING: Otherwise certain images and glyphs may not display."
13527   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13528   echo "  --------------------------------------------------------------------"
13529 fi
13530 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
13531 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
13532 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
13533 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
13534
13535 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
13536 test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
13537 test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
13538 test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
13539
13540 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
13541 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
13542 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
13543
13544 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
13545
13546 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
13547 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
13548
13549 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
13550 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
13551 test "$with_text_coding"     = yes && echo "  Compiling in Text coding support."
13552 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
13553 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
13554 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
13555 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
13556 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
13557 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
13558 if test "$with_wnn" = yes; then
13559   echo "  Compiling in support for the WNN input method on Mule."
13560   test "$with_wnn6" = yes && echo "    Using WNN version 6."
13561 fi
13562 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
13563
13564 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
13565 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
13566 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
13567 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
13568 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
13569 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
13570 case "$with_menubars" in
13571   lucid ) echo "  Using Lucid menubars." ;;
13572   motif ) echo "  Using Motif menubars."
13573           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
13574           echo "             We recommend using the Lucid menubar instead."
13575           echo "             Re-run configure with --with-menubars='lucid'." ;;
13576   msw ) echo "  Using MS-Windows menubars." ;;
13577 esac
13578 case "$with_scrollbars" in
13579   lucid    ) echo "  Using Lucid scrollbars."     ;;
13580   motif    ) echo "  Using Motif scrollbars."     ;;
13581   athena   ) echo "  Using Athena scrollbars."    ;;
13582   athena3d ) echo "  Using Athena-3d scrollbars." ;;
13583   msw ) echo "  Using MS-Windows scrollbars." ;;
13584 esac
13585 case "$with_widgets" in
13586   motif    ) echo "  Using Motif native widgets."     ;;
13587   athena   ) echo "  Using Athena native widgets."    ;;
13588   athena3d ) echo "  Using Athena-3d native widgets." ;;
13589   msw ) echo "  Using MS-Windows native widgets." ;;
13590 esac
13591 case "$with_dialogs" in
13592   motif    )
13593     echo "  Using Motif dialog boxes."
13594     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
13595       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
13596       echo "             We recommend using the Athena dialog boxes instead."
13597       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
13598       echo "             Read the PROBLEMS file for more information."
13599     fi; fi
13600     ;;
13601   athena   ) echo "  Using Athena dialog boxes."    ;;
13602   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
13603   msw ) echo "  Using MS-Windows dialog boxes." ;;
13604 esac
13605 test "$with_modules" = "yes" && echo "  Compiling in dynamic shared object module support."
13606 test "$with_clash_detection" = yes && \
13607   echo "  Clash detection will use \"$lockdir\" for locking files."
13608 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
13609 test "$with_pop"        = yes && echo "  Using POP for mail access."
13610 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
13611 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
13612 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
13613 test "$pdump"           = yes && echo "  Using the new portable dumper (wishful thinking)."
13614 test "$debug"           = yes && echo "  Compiling in extra code for debugging."
13615 test "$usage_tracking"  = yes && echo "  Compiling with usage tracking active (Sun internal)."
13616 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
13617   != "no no no no no"; then
13618   echo "  WARNING: ---------------------------------------------------------"
13619   echo "  WARNING: Compiling in support for runtime error checking."
13620   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
13621   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
13622   echo "  WARNING: ---------------------------------------------------------"
13623 fi
13624 echo ""
13625 ) | tee -a Installation
13626 echo ""
13627
13628
13629 # Remove any trailing slashes in these variables.
13630 test -n "$prefix" &&
13631   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13632 test -n "$exec_prefix" &&
13633   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13634
13635
13636 for file in $internal_makefile_list; do
13637   test "$file" = src/Makefile.in && \
13638     file="src/Makefile.in:src/Makefile.in.in:src/depend"
13639   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
13640 done
13641 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
13642 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
13643
13644 trap '' 1 2 15
13645
13646 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13647
13648 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13649 # Let make expand exec_prefix.
13650 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13651
13652 # Any assignment to VPATH causes Sun make to only execute
13653 # the first set of double-colon rules, so remove it if not needed.
13654 # If there is a colon in the path, we need to keep it.
13655 if test "x$srcdir" = x.; then
13656   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13657 fi
13658
13659 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13660
13661 DEFS=-DHAVE_CONFIG_H
13662
13663 # Without the "./", some shells look in PATH for config.status.
13664 : ${CONFIG_STATUS=./config.status}
13665
13666 echo creating $CONFIG_STATUS
13667 rm -f $CONFIG_STATUS
13668 cat > $CONFIG_STATUS <<EOF
13669 #! /bin/sh
13670 # Generated automatically by configure.
13671 # Run this file to recreate the current configuration.
13672 # This directory was configured as follows,
13673 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13674 #
13675 # $0 $ac_configure_args
13676 #
13677 # Compiler output produced by configure, useful for debugging
13678 # configure, is in ./config.log if it exists.
13679
13680 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13681 for ac_option
13682 do
13683   case "\$ac_option" in
13684   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13685     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13686     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13687   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13688     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13689     exit 0 ;;
13690   -help | --help | --hel | --he | --h)
13691     echo "\$ac_cs_usage"; exit 0 ;;
13692   *) echo "\$ac_cs_usage"; exit 1 ;;
13693   esac
13694 done
13695
13696 ac_given_srcdir=$srcdir
13697 ac_given_INSTALL="$INSTALL"
13698
13699 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13700 EOF
13701 cat >> $CONFIG_STATUS <<EOF
13702
13703 # Protect against being on the right side of a sed subst in config.status.
13704 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13705  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13706 $ac_vpsub
13707 $extrasub
13708 s%@SHELL@%$SHELL%g
13709 s%@CFLAGS@%$CFLAGS%g
13710 s%@CPPFLAGS@%$CPPFLAGS%g
13711 s%@CXXFLAGS@%$CXXFLAGS%g
13712 s%@FFLAGS@%$FFLAGS%g
13713 s%@DEFS@%$DEFS%g
13714 s%@LDFLAGS@%$LDFLAGS%g
13715 s%@LIBS@%$LIBS%g
13716 s%@exec_prefix@%$exec_prefix%g
13717 s%@prefix@%$prefix%g
13718 s%@program_transform_name@%$program_transform_name%g
13719 s%@bindir@%$bindir%g
13720 s%@sbindir@%$sbindir%g
13721 s%@libexecdir@%$libexecdir%g
13722 s%@datadir@%$datadir%g
13723 s%@sysconfdir@%$sysconfdir%g
13724 s%@sharedstatedir@%$sharedstatedir%g
13725 s%@localstatedir@%$localstatedir%g
13726 s%@libdir@%$libdir%g
13727 s%@includedir@%$includedir%g
13728 s%@oldincludedir@%$oldincludedir%g
13729 s%@infodir@%$infodir%g
13730 s%@mandir@%$mandir%g
13731 s%@LN_S@%$LN_S%g
13732 s%@blddir@%$blddir%g
13733 s%@CC@%$CC%g
13734 s%@CPP@%$CPP%g
13735 s%@start_flags@%$start_flags%g
13736 s%@ld_switch_shared@%$ld_switch_shared%g
13737 s%@start_files@%$start_files%g
13738 s%@ld@%$ld%g
13739 s%@lib_gcc@%$lib_gcc%g
13740 s%@RANLIB@%$RANLIB%g
13741 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13742 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13743 s%@INSTALL_DATA@%$INSTALL_DATA%g
13744 s%@YACC@%$YACC%g
13745 s%@SET_MAKE@%$SET_MAKE%g
13746 s%@X_CFLAGS@%$X_CFLAGS%g
13747 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
13748 s%@X_LIBS@%$X_LIBS%g
13749 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
13750 s%@install_pp@%$install_pp%g
13751 s%@libs_xauth@%$libs_xauth%g
13752 s%@dnd_objs@%$dnd_objs%g
13753 s%@lwlib_objs@%$lwlib_objs%g
13754 s%@ALLOCA@%$ALLOCA%g
13755 s%@have_esd_config@%$have_esd_config%g
13756 s%@dll_ld@%$dll_ld%g
13757 s%@dll_cflags@%$dll_cflags%g
13758 s%@dll_ldflags@%$dll_ldflags%g
13759 s%@dll_post@%$dll_post%g
13760 s%@dll_ldo@%$dll_ldo%g
13761 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
13762 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
13763 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
13764 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
13765 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
13766 s%@PROGNAME@%$PROGNAME%g
13767 s%@version@%$version%g
13768 s%@configuration@%$configuration%g
13769 s%@canonical@%$canonical%g
13770 s%@inststaticdir@%$inststaticdir%g
13771 s%@instvardir@%$instvardir%g
13772 s%@srcdir@%$srcdir%g
13773 s%@pkgdir@%$pkgdir%g
13774 s%@statedir@%$statedir%g
13775 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
13776 s%@PREFIX@%$PREFIX%g
13777 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
13778 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
13779 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
13780 s%@INFODIR@%$INFODIR%g
13781 s%@infopath@%$infopath%g
13782 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
13783 s%@INFOPATH@%$INFOPATH%g
13784 s%@package_path@%$package_path%g
13785 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
13786 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
13787 s%@lispdir@%$lispdir%g
13788 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
13789 s%@LISPDIR@%$LISPDIR%g
13790 s%@moduledir@%$moduledir%g
13791 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
13792 s%@MODULEDIR@%$MODULEDIR%g
13793 s%@sitelispdir@%$sitelispdir%g
13794 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
13795 s%@SITELISPDIR@%$SITELISPDIR%g
13796 s%@sitemoduledir@%$sitemoduledir%g
13797 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
13798 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
13799 s%@etcdir@%$etcdir%g
13800 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
13801 s%@ETCDIR@%$ETCDIR%g
13802 s%@lockdir@%$lockdir%g
13803 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
13804 s%@LOCKDIR@%$LOCKDIR%g
13805 s%@docdir@%$docdir%g
13806 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
13807 s%@DOCDIR@%$DOCDIR%g
13808 s%@archlibdir@%$archlibdir%g
13809 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
13810 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
13811 s%@bitmapdir@%$bitmapdir%g
13812 s%@extra_objs@%$extra_objs%g
13813 s%@machfile@%$machfile%g
13814 s%@opsysfile@%$opsysfile%g
13815 s%@c_switch_general@%$c_switch_general%g
13816 s%@c_switch_window_system@%$c_switch_window_system%g
13817 s%@c_switch_all@%$c_switch_all%g
13818 s%@ld_switch_general@%$ld_switch_general%g
13819 s%@ld_switch_window_system@%$ld_switch_window_system%g
13820 s%@ld_switch_all@%$ld_switch_all%g
13821 s%@ld_libs_general@%$ld_libs_general%g
13822 s%@ld_libs_window_system@%$ld_libs_window_system%g
13823 s%@ld_libs_all@%$ld_libs_all%g
13824 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
13825 s%@native_sound_lib@%$native_sound_lib%g
13826 s%@sound_cflags@%$sound_cflags%g
13827 s%@dynodump_arch@%$dynodump_arch%g
13828 s%@XEMACS_CC@%$XEMACS_CC%g
13829 s%@internal_makefile_list@%$internal_makefile_list%g
13830
13831 CEOF
13832 EOF
13833
13834 cat >> $CONFIG_STATUS <<\EOF
13835
13836 # Split the substitutions into bite-sized pieces for seds with
13837 # small command number limits, like on Digital OSF/1 and HP-UX.
13838 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13839 ac_file=1 # Number of current file.
13840 ac_beg=1 # First line for current file.
13841 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13842 ac_more_lines=:
13843 ac_sed_cmds=""
13844 while $ac_more_lines; do
13845   if test $ac_beg -gt 1; then
13846     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13847   else
13848     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13849   fi
13850   if test ! -s conftest.s$ac_file; then
13851     ac_more_lines=false
13852     rm -f conftest.s$ac_file
13853   else
13854     if test -z "$ac_sed_cmds"; then
13855       ac_sed_cmds="sed -f conftest.s$ac_file"
13856     else
13857       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13858     fi
13859     ac_file=`expr $ac_file + 1`
13860     ac_beg=$ac_end
13861     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13862   fi
13863 done
13864 if test -z "$ac_sed_cmds"; then
13865   ac_sed_cmds=cat
13866 fi
13867 EOF
13868
13869 cat >> $CONFIG_STATUS <<EOF
13870
13871 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
13872 EOF
13873 cat >> $CONFIG_STATUS <<\EOF
13874 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13875   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13876   case "$ac_file" in
13877   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13878        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13879   *) ac_file_in="${ac_file}.in" ;;
13880   esac
13881
13882   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13883
13884   # Remove last slash and all that follows it.  Not all systems have dirname.
13885   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13886   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13887     # The file is in a subdirectory.
13888     test ! -d "$ac_dir" && mkdir "$ac_dir"
13889     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13890     # A "../" for each directory in $ac_dir_suffix.
13891     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13892   else
13893     ac_dir_suffix= ac_dots=
13894   fi
13895
13896   case "$ac_given_srcdir" in
13897   .)  srcdir=.
13898       if test -z "$ac_dots"; then top_srcdir=.
13899       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13900   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13901   *) # Relative path.
13902     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13903     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13904   esac
13905
13906   case "$ac_given_INSTALL" in
13907   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13908   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13909   esac
13910
13911   echo creating "$ac_file"
13912   rm -f "$ac_file"
13913   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13914   case "$ac_file" in
13915   *Makefile*) ac_comsub="1i\\
13916 # $configure_input" ;;
13917   *) ac_comsub= ;;
13918   esac
13919
13920   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13921   sed -e "$ac_comsub
13922 s%@configure_input@%$configure_input%g
13923 s%@srcdir@%$srcdir%g
13924 s%@top_srcdir@%$top_srcdir%g
13925 s%@INSTALL@%$INSTALL%g
13926 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13927 fi; done
13928 rm -f conftest.s*
13929
13930 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13931 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13932 #
13933 # ac_d sets the value in "#define NAME VALUE" lines.
13934 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13935 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13936 ac_dC='\3'
13937 ac_dD='%g'
13938 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13939 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13940 ac_uB='\([      ]\)%\1#\2define\3'
13941 ac_uC=' '
13942 ac_uD='\4%g'
13943 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13944 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13945 ac_eB='$%\1#\2define\3'
13946 ac_eC=' '
13947 ac_eD='%g'
13948
13949 if test "${CONFIG_HEADERS+set}" != set; then
13950 EOF
13951 cat >> $CONFIG_STATUS <<EOF
13952   CONFIG_HEADERS="src/config.h lwlib/config.h"
13953 EOF
13954 cat >> $CONFIG_STATUS <<\EOF
13955 fi
13956 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13957   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13958   case "$ac_file" in
13959   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13960        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13961   *) ac_file_in="${ac_file}.in" ;;
13962   esac
13963
13964   echo creating $ac_file
13965
13966   rm -f conftest.frag conftest.in conftest.out
13967   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13968   cat $ac_file_inputs > conftest.in
13969
13970 EOF
13971
13972 # Transform confdefs.h into a sed script conftest.vals that substitutes
13973 # the proper values into config.h.in to produce config.h.  And first:
13974 # Protect against being on the right side of a sed subst in config.status.
13975 # Protect against being in an unquoted here document in config.status.
13976 rm -f conftest.vals
13977 cat > conftest.hdr <<\EOF
13978 s/[\\&%]/\\&/g
13979 s%[\\$`]%\\&%g
13980 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13981 s%ac_d%ac_u%gp
13982 s%ac_u%ac_e%gp
13983 EOF
13984 sed -n -f conftest.hdr confdefs.h > conftest.vals
13985 rm -f conftest.hdr
13986
13987 # This sed command replaces #undef with comments.  This is necessary, for
13988 # example, in the case of _POSIX_SOURCE, which is predefined and required
13989 # on some systems where configure will not decide to define it.
13990 cat >> conftest.vals <<\EOF
13991 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13992 EOF
13993
13994 # Break up conftest.vals because some shells have a limit on
13995 # the size of here documents, and old seds have small limits too.
13996
13997 rm -f conftest.tail
13998 while :
13999 do
14000   ac_lines=`grep -c . conftest.vals`
14001   # grep -c gives empty output for an empty file on some AIX systems.
14002   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14003   # Write a limited-size here document to conftest.frag.
14004   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14005   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14006   echo 'CEOF
14007   sed -f conftest.frag conftest.in > conftest.out
14008   rm -f conftest.in
14009   mv conftest.out conftest.in
14010 ' >> $CONFIG_STATUS
14011   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14012   rm -f conftest.vals
14013   mv conftest.tail conftest.vals
14014 done
14015 rm -f conftest.vals
14016
14017 cat >> $CONFIG_STATUS <<\EOF
14018   rm -f conftest.frag conftest.h
14019   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14020   cat conftest.in >> conftest.h
14021   rm -f conftest.in
14022   if cmp -s $ac_file conftest.h 2>/dev/null; then
14023     echo "$ac_file is unchanged"
14024     rm -f conftest.h
14025   else
14026     # Remove last slash and all that follows it.  Not all systems have dirname.
14027       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14028       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14029       # The file is in a subdirectory.
14030       test ! -d "$ac_dir" && mkdir "$ac_dir"
14031     fi
14032     rm -f $ac_file
14033     mv conftest.h $ac_file
14034   fi
14035 fi; done
14036
14037 EOF
14038 cat >> $CONFIG_STATUS <<EOF
14039 CPP="$CPP"
14040  top_srcdir="$srcdir"
14041  MAKE_SUBDIR="$MAKE_SUBDIR"
14042
14043 EOF
14044 cat >> $CONFIG_STATUS <<\EOF
14045 for dir in . $MAKE_SUBDIR; do
14046   (
14047     cd $dir
14048     rm -f junk.c
14049     < Makefile.in \
14050       sed -e '/^# Generated/d' \
14051           -e 's%/\*\*/#.*%%' \
14052           -e 's/^ *# */#/' \
14053           -e '/^##/d' \
14054           -e '/^#/ {
14055 p
14056 d
14057 }'        \
14058           -e '/./ {
14059 s/\([\"]\)/\\\1/g
14060 s/^/"/
14061 s/$/"/
14062 }'  > junk.c;
14063
14064
14065
14066     echo creating $dir/Makefile
14067 $CPP -I. -I${top_srcdir}/src  junk.c \
14068   | sed -e 's/^\#.*//'          \
14069         -e 's/^[        ][      ]*$//'\
14070         -e 's/^ /       /'              \
14071   | sed -n -e '/^..*$/p'        \
14072   | sed '/^\"/ {
14073         s/\\\([\"]\)/\1/g
14074         s/^[    ]*\"//
14075         s/\"[   ]*$//
14076 }' > Makefile.new
14077     chmod 444 Makefile.new
14078     mv -f Makefile.new Makefile
14079
14080     echo creating $dir/GNUmakefile
14081 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
14082   | sed -e 's/^\#.*//'          \
14083         -e 's/^[        ][      ]*$//'\
14084         -e 's/^ /       /'              \
14085   | sed -n -e '/^..*$/p'        \
14086   | sed '/^\"/ {
14087         s/\\\([\"]\)/\1/g
14088         s/^[    ]*\"//
14089         s/\"[   ]*$//
14090 }' > Makefile.new
14091     chmod 444 Makefile.new
14092     mv -f Makefile.new GNUmakefile
14093
14094     rm -f junk.c
14095   )
14096 done
14097
14098 sed < config.status >> lib-src/config.values \
14099   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
14100   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
14101   -e 's/^\([^ ]*\) $/\1 ""/' \
14102   -e 's/ 1$/ t/'
14103
14104
14105 exit 0
14106 EOF
14107 chmod +x $CONFIG_STATUS
14108 rm -fr confdefs* $ac_clean_files
14109 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1