(put_char_id_table): Use `XCHAR_TABLE' instead of `XCHAR_ID_TABLE'.
[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.13 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 SHELL=${CONFIG_SHELL-/bin/sh}
96 ac_max_here_lines=12
97
98 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
99
100 # File descriptor usage:
101 # 0 standard input
102 # 1 file creation
103 # 2 errors and warnings
104 # 3 some systems may open it to /dev/tty
105 # 4 used on the Kubota Titan
106 # 6 checking for... messages and results
107 # 5 compiler messages saved in config.log
108 if test "$silent" = yes; then
109   exec 6>/dev/null
110 else
111   exec 6>&1
112 fi
113 exec 5>./config.log
114
115 echo "\
116 This file contains any messages produced by compilers while
117 running configure, to aid debugging if configure makes a mistake.
118 " 1>&5
119
120 # Strip out --no-create and --no-recursion so they do not pile up.
121 # Also quote any args containing shell metacharacters.
122 ac_configure_args=
123 for ac_arg
124 do
125   case "$ac_arg" in
126   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
127   | --no-cr | --no-c) ;;
128   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
129   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
130   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
131   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
132   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
133   esac
134 done
135
136 # NLS nuisances.
137 # Only set these to C if already set.  These must not be set unconditionally
138 # because not all systems understand e.g. LANG=C (notably SCO).
139 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
140 # Non-C LC_CTYPE values break the ctype check.
141 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
142 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
143 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
144 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
145
146 # confdefs.h avoids OS command line length limits that DEFS can exceed.
147 rm -rf conftest* confdefs.h
148 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
149 echo > confdefs.h
150
151 # A filename unique to this package, relative to the directory that
152 # configure is in, which we can look for to find out if srcdir is correct.
153 ac_unique_file=src/lisp.h
154
155 # Find the source files, if location was not specified.
156 if test -z "$srcdir"; then
157   ac_srcdir_defaulted=yes
158   # Try the directory containing this script, then its parent.
159   ac_prog=$0
160   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
161   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
162   srcdir=$ac_confdir
163   if test ! -r $srcdir/$ac_unique_file; then
164     srcdir=..
165   fi
166 else
167   ac_srcdir_defaulted=no
168 fi
169 if test ! -r $srcdir/$ac_unique_file; then
170   if test "$ac_srcdir_defaulted" = yes; then
171     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
172   else
173     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
174   fi
175 fi
176 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
177
178 # Prefer explicitly selected file to automatically selected ones.
179 if test -z "$CONFIG_SITE"; then
180   if test "x$prefix" != xNONE; then
181     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
182   else
183     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
184   fi
185 fi
186 for ac_site_file in $CONFIG_SITE; do
187   if test -r "$ac_site_file"; then
188     echo "loading site script $ac_site_file"
189     . "$ac_site_file"
190   fi
191 done
192
193
194 ac_ext=c
195 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
196 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
197 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
198 ac_cpp='$CPP '"$xe_cppflags"
199 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
200 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
201 cross_compiling=no
202
203 ac_exeext=
204 ac_objext=o
205 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
206   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
207   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
208     ac_n= ac_c='
209 ' ac_t='        '
210   else
211     ac_n=-n ac_c= ac_t=
212   fi
213 else
214   ac_n= ac_c='\c' ac_t=
215 fi
216
217
218 progname="`echo $0 | sed 's:^\./\./:\./:'`"
219
220
221 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
222 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
223
224 prefix='/usr/local'
225 exec_prefix='${prefix}'
226 bindir='${exec_prefix}/bin'
227 datadir='${prefix}/lib'
228 statedir='${prefix}/lib'
229 libdir='${exec_prefix}/lib'
230 mandir='${prefix}/man/man1'
231 inststaticdir='${PROGNAME}'
232 instvardir='${PROGNAME}-${version}'
233 infodir='${datadir}/${instvardir}/info'
234 infopath=''
235 install_pp=''
236 lispdir='${datadir}/${instvardir}/lisp'
237 moduledir='${datadir}/${instvardir}/${configuration}/modules'
238 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
239 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
240 pkgdir='${datadir}/${instvardir}/lisp'
241 package_path=''
242 etcdir='${datadir}/${instvardir}/etc'
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 extra_includes=''
255 dynamic=''
256 with_x11=''
257 with_msw=''
258 rel_alloc='default'
259 with_system_malloc='default'
260 with_dlmalloc='default'
261 native_sound_lib=''
262 use_assertions="yes"
263 with_toolbars=""
264 with_tty=""
265 use_union_type="no"
266 with_dnet=""
267 pdump="no"
268 with_dragndrop="no"
269
270
271
272
273 arguments="$@"
274
275 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
276 quoted_arguments=
277 for i in "$@"; do
278    case "$i" in
279    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
280    | --no-cr | --no-c) ;;
281    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
282    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
283    *)
284    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
285    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
286    esac
287 done
288
289 while test $# != 0; do
290   arg="$1"; shift
291   case "$arg" in
292     --no-create|--no-recursion) ;;
293         -* )
294             case "$arg" in
295         -*=*)
296           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
297           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
298           valomitted=no
299         ;;
300                                                                           -*)
301                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
302           val="yes" valomitted=yes
303         ;;
304       esac
305
306             optname="$opt"
307       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
308
309             case "${valomitted}-${opt}" in yes-without_* )
310         opt=`echo $opt | sed 's/without/with/'`
311         valomitted="no" val="no" ;;
312       esac
313
314             case "$opt" in
315
316         with_site_lisp  | \
317         with_prefix     | \
318         with_site_modules | \
319         with_x          | \
320         with_x11        | \
321         with_msw        | \
322         with_gcc        | \
323         dynamic         | \
324         with_ncurses    | \
325         with_dnet       | \
326         with_socks      | \
327         with_dragndrop  | \
328         with_cde        | \
329         with_offix      | \
330         with_gpm        | \
331         with_xpm        | \
332         with_xface      | \
333         with_gif        | \
334         with_jpeg       | \
335         with_png        | \
336         with_tiff       | \
337         with_wmcommand  | \
338         with_xmu        | \
339         with_purify     | \
340         with_quantify   | \
341         with_toolbars   | \
342         with_tty        | \
343         with_xfs        | \
344         with_i18n3      | \
345         with_mule       | \
346         with_utf_2000   | \
347         with_text_coding| \
348         with_file_coding| \
349         with_canna      | \
350         with_wnn        | \
351         with_wnn6       | \
352         with_workshop   | \
353         with_sparcworks | \
354         with_tooltalk   | \
355         with_ldap       | \
356         with_postgresql | \
357         with_pop        | \
358         with_kerberos   | \
359         with_hesiod     | \
360         with_dnet       | \
361         with_infodock   | \
362         external_widget | \
363         verbose         | \
364         extra_verbose   | \
365         usage_tracking  | \
366         use_union_type  | \
367         pdump           | \
368         debug           | \
369         use_assertions  | \
370         memory_usage_stats | \
371         with_clash_detection | \
372         with_modules | \
373         quick_build )
374                   case "$val" in
375             y | ye | yes )      val=yes ;;
376             n | no )            val=no  ;;
377             * ) (echo "$progname: Usage error:"
378 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
379 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
380           esac
381           eval "$opt=\"$val\"" ;;
382
383
384                         srcdir          | \
385         compiler        | \
386         cflags          | \
387         cpp             | \
388         cppflags        | \
389         libs            | \
390         ldflags         | \
391         cache_file      | \
392         native_sound_lib| \
393         site_lisp       | \
394         x_includes      | \
395         x_libraries     | \
396         site_includes   | \
397         site_libraries  | \
398         site_prefixes   | \
399         site_runtime_libraries )
400                   if test "$valomitted" = "yes" ; then
401                     if test "$#" = 0 ; then
402               (echo "$progname: Usage error:"
403 echo " " "The \`--$optname' option requires a value."
404 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
405             fi
406             val="$1"; shift
407           fi
408           eval "$opt=\"$val\""
409         ;;
410
411                 rel_alloc | \
412         with_dlmalloc | \
413         with_debug_malloc  | use_debug_malloc | \
414         with_system_malloc | use_system_malloc )
415           case "$val" in
416             y | ye | yes )      val=yes ;;
417             n | no )            val=no  ;;
418             d | de | def | defa | defau | defaul | default ) val=default ;;
419             * ) (echo "$progname: Usage error:"
420 echo " " "The \`--$optname' option requires one of these values:
421   \`yes', \`no', or \`default'."
422 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
423           esac
424           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
425           eval "$opt=\"$val\""
426         ;;
427
428                 "with_database" )
429           with_database_berkdb=no
430           with_database_dbm=no
431           with_database_gdbm=no
432           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
433             case "$x" in
434               no ) ;;
435               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
436               d | db | dbm )                               with_database_dbm=yes    ;;
437               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
438               * ) (echo "$progname: Usage error:"
439 echo " " "The \`--$optname' option value
440   must be either \`no' or a comma-separated list
441   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
442 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
443             esac
444           done
445           if test "$with_database_dbm"  = "yes" -a \
446                   "$with_database_gdbm" = "yes"; then
447           (echo "$progname: Usage error:"
448 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
449   with the \`--$optname' option."
450 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
451           fi
452         ;;
453
454                 "with_sound" )
455                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
456             case "$x" in
457                       n | no | non | none ) new_sdefault=no ;;
458               a | al | all | both ) new_sdefault=yes ;;
459
460               native )       with_native_sound=yes ;;
461               nonative )     with_native_sound=no ;;
462
463               nas )          with_nas_sound=yes ;;
464               nonas )        with_nas_sound=no ;;
465
466               esd )          with_esd_sound=yes ;;
467               noesd )        with_esd_sound=no ;;
468
469               * ) bogus_sound=yes ;;
470             esac
471             if test "$bogus_sound" -o \
472                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
473                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
474                 (echo "$progname: Usage error:"
475 echo " " "Valid types for the \`--$optname' option are:
476   $types.
477 The default is to autodetect all sound support."
478 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
479             elif test -n "$new_sdefault" ; then
480                 with_native_sound=$new_sdefault
481                 with_nas_sound=$new_sdefault
482                 with_esd_sound=$new_sdefault
483                 new_sdefault=   # reset this
484             fi
485             sound_notfirst=true
486           done
487         ;;
488
489                         "with_athena" )
490           case "$val" in
491             xa | xaw )                    val=xaw    ;;
492             3 | 3d | xaw3d )              val=3d     ;;
493                         ne | nex | next | naxtaw)     val=next   ;;
494                         9 | 95 | xaw95 )              val=95     ;;
495             xp | xpm | xawxpm )           val=xpm    ;;
496             * ) (echo "$progname: Usage error:"
497 echo " " "The \`--$optname' option must have one of these values:
498   \`xaw', \`3d', \`next', \`95', or \`xpm'."
499 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
500           esac
501           eval "$opt=\"$val\""
502         ;;
503
504                 "with_xim" )
505           case "$val" in
506             y | ye | yes )                val=yes   ;;
507             n | no | non | none )         val=no    ;;
508             x | xl | xli | xlib )         val=xlib  ;;
509             m | mo | mot | moti | motif ) val=motif ;;
510             * ) (echo "$progname: Usage error:"
511 echo " " "The \`--$optname' option must have one of these values:
512   \`motif', \`xlib', \`yes', or \`no'."
513 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
514           esac
515           eval "$opt=\"$val\""
516         ;;
517
518                 "mail_locking" )
519           case "$val" in
520             lockf )     val=lockf ;;
521             flock )     val=flock ;;
522             file | dot ) val=file  ;;
523             locking )   val=locking  ;;
524             * ) (echo "$progname: Usage error:"
525 echo " " "The \`--$optname' option must have one of these values:
526   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
527 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
528           esac
529           eval "$opt=\"$val\""
530         ;;
531
532                 "error_checking" )
533                           
534           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
535             case "$x" in
536                       n | no | non | none ) new_default=no ;;
537               a | al | all )        new_default=yes ;;
538
539               extents )       error_check_extents=yes ;;
540               noextents )     error_check_extents=no ;;
541
542               typecheck )     error_check_typecheck=yes ;;
543               notypecheck )   error_check_typecheck=no ;;
544
545               bufpos )        error_check_bufpos=yes ;;
546               nobufpos )      error_check_bufpos=no ;;
547
548               gc )            error_check_gc=yes ;;
549               nogc )          error_check_gc=no ;;
550
551               malloc )        error_check_malloc=yes ;;
552               nomalloc )      error_check_malloc=no ;;
553
554               byte_code )     error_check_byte_code=yes ;;
555               nobyte_code )   error_check_byte_code=no ;;
556
557               glyphs )     error_check_glyphs=yes ;;
558               noglyphs )   error_check_glyphs=no ;;
559
560               * ) bogus_error_check=yes ;;
561             esac
562             if test "$bogus_error_check" -o \
563                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
564                 if test "$error_check_default" = yes ; then
565                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
566                 else
567                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
568                 fi
569                 (echo "$progname: Usage error:"
570 echo " " "Valid types for the \`--$optname' option are:
571   $types."
572 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
573             elif test -n "$new_default" ; then
574                 error_check_extents=$new_default
575                 error_check_typecheck=$new_default
576                 error_check_bufpos=$new_default
577                 error_check_gc=$new_default
578                 error_check_malloc=$new_default
579                 error_check_byte_code=$new_default
580                 error_check_glyphs=$new_default
581                 new_default=    # reset this
582             fi
583             echeck_notfirst=true
584           done
585         ;;
586
587                                 
588                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
589         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
590         archlibdir | docdir | package_path )
591                    if test "$valomitted" = "yes"; then
592              if test "$#" = 0; then
593                  (echo "$progname: Usage error:"
594 echo " " "The \`--$optname' option requires a value."
595 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
596              fi
597              val="$1"; shift
598            fi
599            eval "$opt=\"$val\""
600
601                            case "$opt" in
602                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
603     Defining EXEC_PREFIX_USER_DEFINED
604 EOF
605 cat >> confdefs.h <<\EOF
606 #define EXEC_PREFIX_USER_DEFINED 1
607 EOF
608 }
609  ;;
610              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
611     Defining LISPDIR_USER_DEFINED
612 EOF
613 cat >> confdefs.h <<\EOF
614 #define LISPDIR_USER_DEFINED 1
615 EOF
616 }
617  ;;
618              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
619     Defining SITELISPDIR_USER_DEFINED
620 EOF
621 cat >> confdefs.h <<\EOF
622 #define SITELISPDIR_USER_DEFINED 1
623 EOF
624 }
625  ;;
626              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
627     Defining MODULEDIR_USER_DEFINED
628 EOF
629 cat >> confdefs.h <<\EOF
630 #define MODULEDIR_USER_DEFINED 1
631 EOF
632 }
633  ;;
634              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
635     Defining ETCDIR_USER_DEFINED
636 EOF
637 cat >> confdefs.h <<\EOF
638 #define ETCDIR_USER_DEFINED 1
639 EOF
640 }
641  ;;
642              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
643     Defining INFODIR_USER_DEFINED
644 EOF
645 cat >> confdefs.h <<\EOF
646 #define INFODIR_USER_DEFINED 1
647 EOF
648 }
649  ;;
650              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
651     Defining INFOPATH_USER_DEFINED
652 EOF
653 cat >> confdefs.h <<\EOF
654 #define INFOPATH_USER_DEFINED 1
655 EOF
656 }
657  ;;
658              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
659     Defining PACKAGE_PATH_USER_DEFINED
660 EOF
661 cat >> confdefs.h <<\EOF
662 #define PACKAGE_PATH_USER_DEFINED 1
663 EOF
664 }
665  ;;
666              datadir )
667                 { test "$extra_verbose" = "yes" && cat << \EOF
668     Defining INFODIR_USER_DEFINED
669 EOF
670 cat >> confdefs.h <<\EOF
671 #define INFODIR_USER_DEFINED 1
672 EOF
673 }
674
675                 { test "$extra_verbose" = "yes" && cat << \EOF
676     Defining LISPDIR_USER_DEFINED
677 EOF
678 cat >> confdefs.h <<\EOF
679 #define LISPDIR_USER_DEFINED 1
680 EOF
681 }
682
683             { test "$extra_verbose" = "yes" && cat << \EOF
684     Defining MODULEDIR_USER_DEFINED
685 EOF
686 cat >> confdefs.h <<\EOF
687 #define MODULEDIR_USER_DEFINED 1
688 EOF
689 }
690
691                 { test "$extra_verbose" = "yes" && cat << \EOF
692     Defining ETCDIR_USER_DEFINED
693 EOF
694 cat >> confdefs.h <<\EOF
695 #define ETCDIR_USER_DEFINED 1
696 EOF
697 }
698  ;;
699              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
700     Defining DOCDIR_USER_DEFINED
701 EOF
702 cat >> confdefs.h <<\EOF
703 #define DOCDIR_USER_DEFINED 1
704 EOF
705 }
706  ;;
707              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
708     Defining ARCHLIBDIR_USER_DEFINED
709 EOF
710 cat >> confdefs.h <<\EOF
711 #define ARCHLIBDIR_USER_DEFINED 1
712 EOF
713 }
714  ;;
715            esac
716         ;;
717
718                 "no_create" ) ;;
719
720                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
721
722                 "with_menubars"   | \
723         "with_scrollbars" | \
724         "with_dialogs"    | \
725         "with_widgets" )
726           case "$val" in
727             l | lu | luc | luci | lucid )               val=lucid  ;;
728             m | mo | mot | moti | motif )               val=motif  ;;
729             a | at | ath | athe | athen | athena )      val=athena ;;
730             n | no | non | none )                       val=no     ;;
731             y | ye | yes )                              val=yes    ;;
732             m | ms | msw )                      val=msw    ;;
733             * ) (echo "$progname: Usage error:"
734 echo " " "The \`--$optname' option must have one of these values:
735   \`lucid', \`motif', \`athena', \`yes', or \`no'."
736 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
737           esac
738           eval "$opt=\"$val\""
739         ;;
740
741                 "use_minimal_tagbits" | \
742         "use_indexed_lrecord_implementation" | \
743         "run_in_place"  | \
744         "const_is_losing" | \
745         "with_gnu_make" )
746           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
747         ;;
748
749                 * ) (echo "$progname: Usage error:"
750 echo " " "Unrecognized option: $arg"
751 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
752
753       esac
754     ;;
755
756         *-*-*) configuration="$arg" ;;
757
758         *) (echo "$progname: Usage error:"
759 echo " " "Unrecognized argument: $arg"
760 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
761
762   esac
763 done
764
765
766 test -n "$cpp"      && CPP="$cpp"
767 test -n "$cppflags" && CPPFLAGS="$cppflags"
768 test -n "$libs"     && LIBS="$libs"
769 test -n "$ldflags"  && LDFLAGS="$ldflags"
770
771 eval set x "$quoted_arguments"; shift
772
773 test "$extra_verbose" = "yes" && verbose=yes
774
775 test -n "$with_x" && with_x11="$with_x"
776
777 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
778   test "$with_system_malloc" = "default" && with_system_malloc=yes
779 fi
780
781
782
783 if test "$with_cde $with_tooltalk" = "yes no"; then
784   (echo "$progname: Usage error:"
785 echo " " "--with-cde requires --with-tooltalk"
786 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
787 elif test "$with_tooltalk" = "no" ; then with_cde=no
788 elif test "$with_cde" = "yes"; then with_tooltalk=yes
789 fi
790
791
792 case "$srcdir" in
793
794     "" )
795     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
796       if test -f "$dir/src/lisp.h" -a \
797               -f "$dir/lisp/version.el" ; then
798         srcdir="$dir"
799         break
800       fi
801     done
802     if test -z "$srcdir" ; then
803       (echo "$progname: Usage error:"
804 echo " " "Neither the current directory nor its parent seem to
805   contain the XEmacs sources.  If you do not want to build XEmacs in its
806   source tree, you should run \`$progname' in the directory in which
807   you wish to build XEmacs, using the \`--srcdir' option to say where the
808   sources may be found."
809 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
810     fi
811   ;;
812
813     * )
814     if test ! -f "$srcdir/src/lisp.h" -o \
815             ! -f "$srcdir/lisp/version.el" ; then
816       (echo "$progname: Usage error:"
817 echo " " "The directory specified with the \`--srcdir' option,
818   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
819   either run the \`$progname' script at the top of the XEmacs source
820   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
821 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
822     fi
823   ;;
824 esac
825
826 if test -z "$configuration"; then
827     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
828   if test -z "$configuration"; then
829     (echo "$progname: Usage error:"
830 echo " " "XEmacs has not been ported to this host type.
831 Try explicitly specifying the CONFIGURATION when rerunning configure."
832 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
833   fi
834 fi
835
836 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
837 echo "configure:838: checking whether ln -s works" >&5
838
839 rm -f conftestdata
840 if ln -s X conftestdata 2>/dev/null
841 then
842   rm -f conftestdata
843   ac_cv_prog_LN_S="ln -s"
844 else
845   ac_cv_prog_LN_S=ln
846 fi
847 LN_S="$ac_cv_prog_LN_S"
848 if test "$ac_cv_prog_LN_S" = "ln -s"; then
849   echo "$ac_t""yes" 1>&6
850 else
851   echo "$ac_t""no" 1>&6
852 fi
853
854
855 for dir in lisp etc man info tests; do
856   if test ! -d "$dir" ; then
857     echo Making symbolic link to "$srcdir/$dir"
858     ${LN_S} "$srcdir/$dir" "$dir"
859   fi
860 done
861
862
863 absolute_pwd="`pwd`";
864 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
865 then blddir="$PWD"
866 else blddir="$absolute_pwd"; if test -d "/net"; then
867   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
868   blddir=`echo "$blddir" | \
869    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
870 fi
871 fi
872
873
874 case "$srcdir" in
875   /* ) ;;
876   .  ) srcdir="$blddir" ;;
877   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
878   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
879   srcdir=`echo "$srcdir" | \
880    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
881 fi ;;
882 esac
883
884 if test `pwd` != `sh -c cd $srcdir && pwd`  \
885    && test -f "$srcdir/src/config.h"; then
886   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
887    echo "   as a build directory right now; it has been configured in its own"
888    echo "   right.  To configure in another directory as well, you MUST"
889    echo "   use GNU make.  If you do not have GNU make, then you must"
890    echo "   now do \`make distclean' in $srcdir,"
891    echo "   and then run $progname again.") >&2
892   extrasub='/^VPATH[     ]*=/c\
893 vpath %.c $(srcdir)\
894 vpath %.h $(srcdir)\
895 vpath %.y $(srcdir)\
896 vpath %.l $(srcdir)\
897 vpath %.s $(srcdir)\
898 vpath %.in $(srcdir)'
899 fi
900
901 . "$srcdir/version.sh" || exit 1;
902 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
903 : "${extra_verbose=$beta}"
904 version="${emacs_major_version}.${emacs_minor_version}"
905 { test "$extra_verbose" = "yes" && cat << EOF
906     Defining EMACS_MAJOR_VERSION = $emacs_major_version
907 EOF
908 cat >> confdefs.h <<EOF
909 #define EMACS_MAJOR_VERSION $emacs_major_version
910 EOF
911 }
912
913 { test "$extra_verbose" = "yes" && cat << EOF
914     Defining EMACS_MINOR_VERSION = $emacs_minor_version
915 EOF
916 cat >> confdefs.h <<EOF
917 #define EMACS_MINOR_VERSION $emacs_minor_version
918 EOF
919 }
920
921 if test -n "$emacs_beta_version" ; then
922   if test "$beta" = "yes"; then
923         version="${version}-b${emacs_beta_version}"
924         { test "$extra_verbose" = "yes" && cat << EOF
925     Defining EMACS_BETA_VERSION = $emacs_beta_version
926 EOF
927 cat >> confdefs.h <<EOF
928 #define EMACS_BETA_VERSION $emacs_beta_version
929 EOF
930 }
931
932   else
933         version="${version}.${emacs_beta_version}"
934         { test "$extra_verbose" = "yes" && cat << EOF
935     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
936 EOF
937 cat >> confdefs.h <<EOF
938 #define EMACS_PATCH_LEVEL $emacs_beta_version
939 EOF
940 }
941
942   fi
943 fi
944 { test "$extra_verbose" = "yes" && cat << EOF
945     Defining XEMACS_CODENAME = "$xemacs_codename"
946 EOF
947 cat >> confdefs.h <<EOF
948 #define XEMACS_CODENAME "$xemacs_codename"
949 EOF
950 }
951
952 { test "$extra_verbose" = "yes" && cat << EOF
953     Defining EMACS_VERSION = "$version"
954 EOF
955 cat >> confdefs.h <<EOF
956 #define EMACS_VERSION "$version"
957 EOF
958 }
959
960
961 if test "$with_infodock" = "yes"; then
962   if test ! -f ../../ID-INSTALL; then
963     echo "Cannot build InfoDock without InfoDock sources"
964     with_infodock=no
965   fi
966 fi
967
968 if test "$with_infodock" = "yes"; then
969       { test "$extra_verbose" = "yes" && cat << EOF
970     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
971 EOF
972 cat >> confdefs.h <<EOF
973 #define INFODOCK_MAJOR_VERSION $infodock_major_version
974 EOF
975 }
976
977   { test "$extra_verbose" = "yes" && cat << EOF
978     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
979 EOF
980 cat >> confdefs.h <<EOF
981 #define INFODOCK_MINOR_VERSION $infodock_minor_version
982 EOF
983 }
984
985   { test "$extra_verbose" = "yes" && cat << EOF
986     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
987 EOF
988 cat >> confdefs.h <<EOF
989 #define INFODOCK_BUILD_VERSION $infodock_build_version
990 EOF
991 }
992
993   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
994   PROGNAME=infodock
995   CPPFLAGS="$CPPFLAGS -DINFODOCK"
996 else
997   PROGNAME=xemacs
998 fi
999
1000 { test "$extra_verbose" = "yes" && cat << EOF
1001     Defining EMACS_PROGNAME = "$PROGNAME"
1002 EOF
1003 cat >> confdefs.h <<EOF
1004 #define EMACS_PROGNAME "$PROGNAME"
1005 EOF
1006 }
1007
1008
1009 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1010 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1011     Defining ERROR_CHECK_EXTENTS
1012 EOF
1013 cat >> confdefs.h <<\EOF
1014 #define ERROR_CHECK_EXTENTS 1
1015 EOF
1016 }
1017
1018 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1019     Defining ERROR_CHECK_TYPECHECK
1020 EOF
1021 cat >> confdefs.h <<\EOF
1022 #define ERROR_CHECK_TYPECHECK 1
1023 EOF
1024 }
1025
1026 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1027     Defining ERROR_CHECK_BUFPOS
1028 EOF
1029 cat >> confdefs.h <<\EOF
1030 #define ERROR_CHECK_BUFPOS 1
1031 EOF
1032 }
1033
1034 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1035     Defining ERROR_CHECK_GC
1036 EOF
1037 cat >> confdefs.h <<\EOF
1038 #define ERROR_CHECK_GC 1
1039 EOF
1040 }
1041
1042 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1043     Defining ERROR_CHECK_MALLOC
1044 EOF
1045 cat >> confdefs.h <<\EOF
1046 #define ERROR_CHECK_MALLOC 1
1047 EOF
1048 }
1049
1050 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1051     Defining ERROR_CHECK_BYTE_CODE
1052 EOF
1053 cat >> confdefs.h <<\EOF
1054 #define ERROR_CHECK_BYTE_CODE 1
1055 EOF
1056 }
1057
1058 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1059     Defining ERROR_CHECK_GLYPHS
1060 EOF
1061 cat >> confdefs.h <<\EOF
1062 #define ERROR_CHECK_GLYPHS 1
1063 EOF
1064 }
1065
1066 if test "${debug:=$beta}" = "yes"; then
1067   use_assertions=yes memory_usage_stats=yes
1068   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1069    echo "    xemacs will be linked with \"debug.o\""
1070  fi
1071   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1072    echo "    xemacs will be linked with \"tests.o\""
1073  fi
1074   { test "$extra_verbose" = "yes" && cat << \EOF
1075     Defining DEBUG_XEMACS
1076 EOF
1077 cat >> confdefs.h <<\EOF
1078 #define DEBUG_XEMACS 1
1079 EOF
1080 }
1081
1082 fi
1083 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1084     Defining USE_ASSERTIONS
1085 EOF
1086 cat >> confdefs.h <<\EOF
1087 #define USE_ASSERTIONS 1
1088 EOF
1089 }
1090
1091 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1092     Defining MEMORY_USAGE_STATS
1093 EOF
1094 cat >> confdefs.h <<\EOF
1095 #define MEMORY_USAGE_STATS 1
1096 EOF
1097 }
1098
1099
1100
1101 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1102 echo "configure:1103: checking "host system type"" >&5
1103 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1104 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1105 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1106 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1107 echo "$ac_t""$configuration" 1>&6
1108
1109
1110
1111
1112
1113 machine='' opsys=''
1114
1115 case "$canonical" in
1116   sparc-*-*        ) machine=sparc ;;
1117   alpha*-*-*       ) machine=alpha ;;
1118   vax-*-*          ) machine=vax ;;
1119   mips-dec-*       ) machine=pmax ;;
1120   mips-sgi-irix6*  ) machine=iris6d ;;
1121   mips-sgi-*       ) machine=iris4d ;;
1122   mips*-linux      ) machine=mips ;;
1123   romp-ibm-*       ) machine=ibmrt ;;
1124   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1125   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1126   powerpc*-*       ) machine=powerpc ;;
1127   hppa-*-*         ) machine=hp800 ;;
1128   m88k-dg-*        ) machine=aviion ;;
1129   m68*-sony-*      ) machine=news ;;
1130   mips-sony-*      ) machine=news-risc ;;
1131   clipper-*        ) machine=clipper ;;
1132   arm*             ) machine=arm ;;
1133   ns32k-*          ) machine=ns32000 ;;
1134 esac
1135
1136 case "$canonical" in
1137   *-*-linux*    ) opsys=linux ;;
1138   *-*-netbsd*   ) opsys=netbsd ;;
1139   *-*-openbsd*  ) opsys=openbsd ;;
1140   *-*-nextstep* ) opsys=nextstep ;;
1141   *-*-vms       ) opsys=vms ;;
1142
1143     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1144   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1145   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1146   *-dec-osf3*                ) opsys=decosf3-1 ;;
1147   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1148
1149     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1150   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1151   *-*-ultrix* )         opsys=ultrix4-3 ;;
1152
1153     *-*-aix3.1*  ) opsys=aix3-1 ;;
1154   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1155   *-*-aix3*    ) opsys=aix3-2   ;;
1156   *-*-aix4.0*  ) opsys=aix4     ;;
1157   *-*-aix4.1*  ) opsys=aix4-1   ;;
1158   *-*-aix4*    ) opsys=aix4-2   ;;
1159
1160     *-gnu* )                    opsys=gnu    ;;
1161   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1162   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1163   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1164   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1165   *-*-aos*   )                  opsys=bsd4-3 ;;
1166   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1167   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1168   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1169   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1170   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1171   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1172         if test -z "$NON_GNU_CPP" ; then
1173           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1174             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1175           done
1176         fi
1177         opsys=usg5-4-2 ;;
1178     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1179     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1180 esac
1181
1182 case "$canonical" in
1183
1184     *-*-netbsd* )
1185     case "$canonical" in
1186       i[3-9]86-*-netbsd*) machine=intel386 ;;
1187       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1188                                             machine=hp9000s300 ;;
1189       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1190       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1191     esac
1192   ;;
1193
1194     *-*-openbsd* )
1195     case "${canonical}" in
1196       i386-*-openbsd*)          machine=intel386 ;;
1197       m68k-*-openbsd*)          machine=hp9000s300 ;;
1198       mipsel-*-openbsd*)        machine=pmax ;;
1199      esac
1200    ;;
1201
1202     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1203   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1204
1205     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1206   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1207
1208     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1209
1210     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1211
1212     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1213
1214     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1215
1216     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1217
1218     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1219   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1220   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1221
1222   
1223     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1224
1225     *-convex-bsd* | *-convex-convexos* )
1226     machine=convex opsys=bsd4-3
1227     NON_GNU_CPP="cc -E -P"
1228   ;;
1229
1230     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1231
1232     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1233   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1234   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1235   m88k-dg-dgux*                           ) opsys=dgux     ;;
1236
1237     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1238   m88k-motorola-sysv4* )
1239                     machine=delta88k opsys=usg5-4-2
1240   ;;
1241   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1242
1243     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1244   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1245
1246     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1247
1248     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1249   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1250   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1251
1252       m88k-harris-cxux* )
1253         case "`uname -r`" in
1254        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1255        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1256     esac
1257     NON_GNU_CPP="/lib/cpp"
1258   ;;
1259     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1260     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1261
1262     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1263
1264     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1265
1266     *-hp-hpux* )
1267         case "$canonical" in
1268       m68*  ) machine=hp9000s300 ;;
1269       hppa* ) machine=hp800      ;;
1270     esac
1271
1272     case "$canonical" in
1273       *-hp-hpux7*  )  opsys=hpux   ;;
1274       *-hp-hpux8*  )  opsys=hpux8  ;;
1275       *-hp-hpux9*  )  opsys=hpux9  ;;
1276       *-hp-hpux10* )  opsys=hpux10 ;;
1277       *-hp-hpux11* )  opsys=hpux11 ;;
1278       *            )  opsys=hpux   ;;
1279     esac
1280
1281         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1282    echo "    xemacs will be linked with \"strcat.o\""
1283  fi ;; esac
1284
1285     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1286         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1287     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1288
1289     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1290   ;;
1291
1292     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1293   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1294
1295     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1296   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1297   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1298   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1299   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1300   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1301
1302     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1303   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1304
1305     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1306
1307     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1308
1309     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1310
1311     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1312
1313       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1314
1315     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1316
1317     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1318
1319     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1320
1321     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1322
1323         mips-mips-usg* ) machine=mips4 ;;
1324   mips-mips-riscos4 )
1325     machine=mips4
1326     NON_GNU_CC="cc -systype bsd43"
1327     NON_GNU_CPP="cc -systype bsd43 -E"
1328     case "$canonical" in
1329       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1330       mips-mips-riscos5* ) opsys=riscos5 ;;
1331     esac
1332   ;;
1333   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1334   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1335
1336     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1337
1338     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1339
1340     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1341   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1342
1343     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1344
1345     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1346
1347     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1348
1349     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1350
1351     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1352   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1353
1354     mips-siemens-sysv* | mips-sni-sysv*)
1355     machine=mips-siemens opsys=usg5-4
1356     NON_GNU_CC=/usr/ccs/bin/cc
1357     NON_GNU_CPP=/usr/ccs/lib/cpp
1358   ;;
1359
1360     mips-nec-sysv*)
1361     machine=mips-nec
1362     NON_GNU_CC=/usr/ccs/bin/cc
1363     NON_GNU_CPP=/usr/ccs/lib/cpp
1364   ;;
1365
1366       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1367   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1368     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1369   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1370   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1371   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1372   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1373   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1374   mips-sgi-irix*      ) opsys=irix5-0 ;;
1375
1376     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1377   *-sony-news* ) opsys=newsos5 ;;
1378
1379     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1380
1381     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1382         case "$canonical" in
1383       m68*-sunos1* )             machine=sun1     ;;
1384       m68*-sunos2* )             machine=sun2     ;;
1385       m68* )                     machine=sun3     ;;
1386       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1387       i*86-*-* )                 machine=intel386 ;;
1388       rs6000* )                  machine=rs6000   ;;
1389     esac
1390
1391         case "$canonical" in *-sunos5*)
1392       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1393     esac
1394
1395                     case "$canonical" in
1396       *-sunos4* )
1397         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1398         : ;;
1399       *-solaris2* )
1400         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1401         RANLIB=':' ;;
1402     esac
1403
1404     case "$canonical" in
1405       *-solaris*          )
1406         opsys=sol2
1407         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1408         { test "$extra_verbose" = "yes" && cat << EOF
1409     Defining OS_RELEASE = $os_release
1410 EOF
1411 cat >> confdefs.h <<EOF
1412 #define OS_RELEASE $os_release
1413 EOF
1414 }
1415  ;;
1416
1417             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1418       *-sunos4.0*         ) opsys=sunos4-0      ;;
1419       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1420       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1421       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1422       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1423       *-mach*             ) opsys=mach-bsd4-3   ;;
1424       *                   ) opsys=bsd4-2        ;;
1425     esac
1426
1427     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1428
1429         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1430   ;;
1431
1432     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1433
1434     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1435   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1436
1437     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1438
1439     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1440
1441     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1442       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1443
1444     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1445
1446     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1447
1448     vax-dec-* )
1449     case "$canonical" in
1450       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1451       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1452       *-mach* )                         opsys=mach-bsd4-3 ;;
1453     esac
1454   ;;
1455
1456     ns16k-whitechapel-* ) machine=mg1 ;;
1457
1458     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1459
1460     i[3-9]86-*-* )
1461     machine=intel386
1462     case "$canonical" in
1463       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1464       *-isc2.2* )               opsys=isc2-2 ;;
1465       *-isc4.0* )               opsys=isc4-0 ;;
1466       *-isc4.* )                opsys=isc4-1
1467                                 GCC_TEST_OPTIONS=-posix
1468                                 NON_GCC_TEST_OPTIONS=-Xp
1469                                 ;;
1470       *-isc* )                  opsys=isc3-0 ;;
1471       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1472       *-esix* )                 opsys=esix ;;
1473       *-mach* )                 opsys=mach-bsd4-3 ;;
1474       *-xenix* )                opsys=xenix ;;
1475       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1476       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1477       *-bsdi4* )                opsys=bsdos4 ;;
1478       *-bsdi3* )                opsys=bsdos3 ;;
1479       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1480       *-bsdi2* )                opsys=bsdos2 ;;
1481       *-sco3.2v5* )             opsys=sco5 ;
1482                                                         if test "$dynamic" = "yes" ; then
1483                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1484         else
1485                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1486         fi ;;
1487       *-sysv5* )                opsys=sco7 ;;
1488       *-386bsd* )               opsys=386bsd ;;
1489       *-freebsd* )              opsys=freebsd ;;
1490       *-nextstep* )             opsys=nextstep ;;
1491       *-pc-cygwin* )            opsys=cygwin32 ;;
1492       *-pc-mingw* )             opsys=mingw32 ;
1493                                 test -z "$with_tty" && with_tty="no";;
1494           esac
1495   ;;
1496
1497     m68k-*-linux* ) machine=m68k opsys=linux ;;
1498
1499 esac
1500
1501 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1502 test -z "$opsys"   && opsys=`echo $canonical | sed 's/^^-*-^-*-//'`
1503
1504 if test -r "${srcdir}/src/m/${machine}.h"; then
1505   machfile="m/${machine}.h"
1506   { test "$extra_verbose" = "yes" && cat << EOF
1507     Defining config_machfile = "$machfile"
1508 EOF
1509 cat >> confdefs.h <<EOF
1510 #define config_machfile "$machfile"
1511 EOF
1512 }
1513
1514 else
1515   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1516   echo "Using configure-time autodetection only."
1517 fi
1518
1519 if test -r "${srcdir}/src/s/${opsys}.h"; then
1520   opsysfile="s/${opsys}.h"
1521   { test "$extra_verbose" = "yes" && cat << EOF
1522     Defining config_opsysfile = "$opsysfile"
1523 EOF
1524 cat >> confdefs.h <<EOF
1525 #define config_opsysfile "$opsysfile"
1526 EOF
1527 }
1528
1529 else
1530   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1531   echo "Using configure-time autodetection only."
1532 fi
1533
1534
1535 if test -z "$dynamic"; then
1536   case "$opsys" in
1537     hpux* | sunos4* ) dynamic=no ;;
1538     *) dynamic=yes ;;
1539   esac
1540 fi
1541 if test "$dynamic" = "yes"; then
1542   case "$opsys" in
1543     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1544     decosf* ) ld_call_shared="-call_shared" ;;
1545   esac
1546 else   case "$opsys" in
1547     sol2 )
1548       echo "Static linking is not supported on Solaris 2."
1549       echo "Rerun configure without specifying --dynamic=no."
1550       exit 1 ;;
1551     linux   ) ld_call_shared="-Bstatic" ;;
1552     decosf* ) ld_call_shared="-non_shared" ;;
1553   esac
1554 fi
1555
1556 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1557
1558 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1559 { test "$extra_verbose" = "yes" && cat << EOF
1560     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1561 EOF
1562 cat >> confdefs.h <<EOF
1563 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1564 EOF
1565 }
1566
1567
1568
1569 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1570 if test "$with_workshop $with_tooltalk" = "yes no"; then
1571   (echo "$progname: Usage error:"
1572 echo " " "--with-workshop requires --with-tooltalk"
1573 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1574 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1575 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1576 fi
1577
1578 if test "$with_workshop" = "yes"; then
1579   { test "$extra_verbose" = "yes" && cat << \EOF
1580     Defining SUNPRO
1581 EOF
1582 cat >> confdefs.h <<\EOF
1583 #define SUNPRO 1
1584 EOF
1585 }
1586
1587   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1588    echo "    xemacs will be linked with \"sunpro.o\""
1589  fi
1590 fi
1591
1592 if test "$with_clash_detection" != "no"; then
1593   { test "$extra_verbose" = "yes" && cat << \EOF
1594     Defining CLASH_DETECTION
1595 EOF
1596 cat >> confdefs.h <<\EOF
1597 #define CLASH_DETECTION 1
1598 EOF
1599 }
1600
1601   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1602    echo "    xemacs will be linked with \"filelock.o\""
1603  fi
1604 fi
1605
1606 test -n "$compiler" && CC="$compiler"
1607 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1608 fi
1609
1610 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1611 if test "${CFLAGS-unset}" != unset
1612   then cflags_specified=yes;
1613   else cflags_specified=no;
1614 fi
1615
1616 xe_save_CFLAGS="$CFLAGS"
1617
1618 # Extract the first word of "gcc", so it can be a program name with args.
1619 set dummy gcc; ac_word=$2
1620 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1621 echo "configure:1622: checking for $ac_word" >&5
1622
1623 if test -n "$CC"; then
1624   ac_cv_prog_CC="$CC" # Let the user override the test.
1625 else
1626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1627   ac_dummy="$PATH"
1628   for ac_dir in $ac_dummy; do
1629     test -z "$ac_dir" && ac_dir=.
1630     if test -f $ac_dir/$ac_word; then
1631       ac_cv_prog_CC="gcc"
1632       break
1633     fi
1634   done
1635   IFS="$ac_save_ifs"
1636 fi
1637 CC="$ac_cv_prog_CC"
1638 if test -n "$CC"; then
1639   echo "$ac_t""$CC" 1>&6
1640 else
1641   echo "$ac_t""no" 1>&6
1642 fi
1643
1644 if test -z "$CC"; then
1645   # Extract the first word of "cc", so it can be a program name with args.
1646 set dummy cc; ac_word=$2
1647 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1648 echo "configure:1649: checking for $ac_word" >&5
1649
1650 if test -n "$CC"; then
1651   ac_cv_prog_CC="$CC" # Let the user override the test.
1652 else
1653   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1654   ac_prog_rejected=no
1655   ac_dummy="$PATH"
1656   for ac_dir in $ac_dummy; do
1657     test -z "$ac_dir" && ac_dir=.
1658     if test -f $ac_dir/$ac_word; then
1659       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1660         ac_prog_rejected=yes
1661         continue
1662       fi
1663       ac_cv_prog_CC="cc"
1664       break
1665     fi
1666   done
1667   IFS="$ac_save_ifs"
1668 if test $ac_prog_rejected = yes; then
1669   # We found a bogon in the path, so make sure we never use it.
1670   set dummy $ac_cv_prog_CC
1671   shift
1672   if test $# -gt 0; then
1673     # We chose a different compiler from the bogus one.
1674     # However, it has the same basename, so the bogon will be chosen
1675     # first if we set CC to just the basename; use the full file name.
1676     shift
1677     set dummy "$ac_dir/$ac_word" "$@"
1678     shift
1679     ac_cv_prog_CC="$@"
1680   fi
1681 fi
1682 fi
1683 CC="$ac_cv_prog_CC"
1684 if test -n "$CC"; then
1685   echo "$ac_t""$CC" 1>&6
1686 else
1687   echo "$ac_t""no" 1>&6
1688 fi
1689
1690   if test -z "$CC"; then
1691     case "`uname -s`" in
1692     *win32* | *WIN32*)
1693       # Extract the first word of "cl", so it can be a program name with args.
1694 set dummy cl; ac_word=$2
1695 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1696 echo "configure:1697: checking for $ac_word" >&5
1697
1698 if test -n "$CC"; then
1699   ac_cv_prog_CC="$CC" # Let the user override the test.
1700 else
1701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1702   ac_dummy="$PATH"
1703   for ac_dir in $ac_dummy; do
1704     test -z "$ac_dir" && ac_dir=.
1705     if test -f $ac_dir/$ac_word; then
1706       ac_cv_prog_CC="cl"
1707       break
1708     fi
1709   done
1710   IFS="$ac_save_ifs"
1711 fi
1712 CC="$ac_cv_prog_CC"
1713 if test -n "$CC"; then
1714   echo "$ac_t""$CC" 1>&6
1715 else
1716   echo "$ac_t""no" 1>&6
1717 fi
1718  ;;
1719     esac
1720   fi
1721   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1722 fi
1723
1724 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1725 echo "configure:1726: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1726
1727 ac_ext=c
1728 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1729 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1730 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1731 ac_cpp='$CPP '"$xe_cppflags"
1732 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1733 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1734 cross_compiling=no
1735
1736 cat > conftest.$ac_ext << EOF
1737
1738 #line 1739 "configure"
1739 #include "confdefs.h"
1740
1741 main(){return(0);}
1742 EOF
1743 if { (eval echo configure:1744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1744   ac_cv_prog_cc_works=yes
1745   # If we can't run a trivial program, we are probably using a cross compiler.
1746   if (./conftest; exit) 2>/dev/null; then
1747     ac_cv_prog_cc_cross=no
1748   else
1749     ac_cv_prog_cc_cross=yes
1750   fi
1751 else
1752   echo "configure: failed program was:" >&5
1753   cat conftest.$ac_ext >&5
1754   ac_cv_prog_cc_works=no
1755 fi
1756 rm -fr conftest*
1757 ac_ext=c
1758 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1759 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1760 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1761 ac_cpp='$CPP '"$xe_cppflags"
1762 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1763 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1764 cross_compiling=no
1765
1766 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1767 if test $ac_cv_prog_cc_works = no; then
1768   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1769 fi
1770 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1771 echo "configure:1772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1772 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1773 cross_compiling=$ac_cv_prog_cc_cross
1774
1775 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1776 echo "configure:1777: checking whether we are using GNU C" >&5
1777
1778 cat > conftest.c <<EOF
1779 #ifdef __GNUC__
1780   yes;
1781 #endif
1782 EOF
1783 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1784   ac_cv_prog_gcc=yes
1785 else
1786   ac_cv_prog_gcc=no
1787 fi
1788
1789 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1790
1791 if test $ac_cv_prog_gcc = yes; then
1792   GCC=yes
1793 else
1794   GCC=
1795 fi
1796
1797 ac_test_CFLAGS="${CFLAGS+set}"
1798 ac_save_CFLAGS="$CFLAGS"
1799 CFLAGS=
1800 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1801 echo "configure:1802: checking whether ${CC-cc} accepts -g" >&5
1802
1803 echo 'void f(){}' > conftest.c
1804 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1805   ac_cv_prog_cc_g=yes
1806 else
1807   ac_cv_prog_cc_g=no
1808 fi
1809 rm -f conftest*
1810
1811
1812 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1813 if test "$ac_test_CFLAGS" = set; then
1814   CFLAGS="$ac_save_CFLAGS"
1815 elif test $ac_cv_prog_cc_g = yes; then
1816   if test "$GCC" = yes; then
1817     CFLAGS="-g -O2"
1818   else
1819     CFLAGS="-g"
1820   fi
1821 else
1822   if test "$GCC" = yes; then
1823     CFLAGS="-O2"
1824   else
1825     CFLAGS=
1826   fi
1827 fi
1828  
1829 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1830   CC=${NON_GNU_CC-cc}
1831   # Extract the first word of "gcc", so it can be a program name with args.
1832 set dummy gcc; ac_word=$2
1833 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1834 echo "configure:1835: checking for $ac_word" >&5
1835
1836 if test -n "$CC"; then
1837   ac_cv_prog_CC="$CC" # Let the user override the test.
1838 else
1839   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1840   ac_dummy="$PATH"
1841   for ac_dir in $ac_dummy; do
1842     test -z "$ac_dir" && ac_dir=.
1843     if test -f $ac_dir/$ac_word; then
1844       ac_cv_prog_CC="gcc"
1845       break
1846     fi
1847   done
1848   IFS="$ac_save_ifs"
1849 fi
1850 CC="$ac_cv_prog_CC"
1851 if test -n "$CC"; then
1852   echo "$ac_t""$CC" 1>&6
1853 else
1854   echo "$ac_t""no" 1>&6
1855 fi
1856
1857 if test -z "$CC"; then
1858   # Extract the first word of "cc", so it can be a program name with args.
1859 set dummy cc; ac_word=$2
1860 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1861 echo "configure:1862: checking for $ac_word" >&5
1862
1863 if test -n "$CC"; then
1864   ac_cv_prog_CC="$CC" # Let the user override the test.
1865 else
1866   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1867   ac_prog_rejected=no
1868   ac_dummy="$PATH"
1869   for ac_dir in $ac_dummy; do
1870     test -z "$ac_dir" && ac_dir=.
1871     if test -f $ac_dir/$ac_word; then
1872       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1873         ac_prog_rejected=yes
1874         continue
1875       fi
1876       ac_cv_prog_CC="cc"
1877       break
1878     fi
1879   done
1880   IFS="$ac_save_ifs"
1881 if test $ac_prog_rejected = yes; then
1882   # We found a bogon in the path, so make sure we never use it.
1883   set dummy $ac_cv_prog_CC
1884   shift
1885   if test $# -gt 0; then
1886     # We chose a different compiler from the bogus one.
1887     # However, it has the same basename, so the bogon will be chosen
1888     # first if we set CC to just the basename; use the full file name.
1889     shift
1890     set dummy "$ac_dir/$ac_word" "$@"
1891     shift
1892     ac_cv_prog_CC="$@"
1893   fi
1894 fi
1895 fi
1896 CC="$ac_cv_prog_CC"
1897 if test -n "$CC"; then
1898   echo "$ac_t""$CC" 1>&6
1899 else
1900   echo "$ac_t""no" 1>&6
1901 fi
1902
1903   if test -z "$CC"; then
1904     case "`uname -s`" in
1905     *win32* | *WIN32*)
1906       # Extract the first word of "cl", so it can be a program name with args.
1907 set dummy cl; ac_word=$2
1908 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1909 echo "configure:1910: checking for $ac_word" >&5
1910
1911 if test -n "$CC"; then
1912   ac_cv_prog_CC="$CC" # Let the user override the test.
1913 else
1914   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1915   ac_dummy="$PATH"
1916   for ac_dir in $ac_dummy; do
1917     test -z "$ac_dir" && ac_dir=.
1918     if test -f $ac_dir/$ac_word; then
1919       ac_cv_prog_CC="cl"
1920       break
1921     fi
1922   done
1923   IFS="$ac_save_ifs"
1924 fi
1925 CC="$ac_cv_prog_CC"
1926 if test -n "$CC"; then
1927   echo "$ac_t""$CC" 1>&6
1928 else
1929   echo "$ac_t""no" 1>&6
1930 fi
1931  ;;
1932     esac
1933   fi
1934   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1935 fi
1936
1937 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1938 echo "configure:1939: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1939
1940 ac_ext=c
1941 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1942 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1943 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1944 ac_cpp='$CPP '"$xe_cppflags"
1945 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1946 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1947 cross_compiling=no
1948
1949 cat > conftest.$ac_ext << EOF
1950
1951 #line 1952 "configure"
1952 #include "confdefs.h"
1953
1954 main(){return(0);}
1955 EOF
1956 if { (eval echo configure:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1957   ac_cv_prog_cc_works=yes
1958   # If we can't run a trivial program, we are probably using a cross compiler.
1959   if (./conftest; exit) 2>/dev/null; then
1960     ac_cv_prog_cc_cross=no
1961   else
1962     ac_cv_prog_cc_cross=yes
1963   fi
1964 else
1965   echo "configure: failed program was:" >&5
1966   cat conftest.$ac_ext >&5
1967   ac_cv_prog_cc_works=no
1968 fi
1969 rm -fr conftest*
1970 ac_ext=c
1971 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1972 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1973 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1974 ac_cpp='$CPP '"$xe_cppflags"
1975 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1976 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1977 cross_compiling=no
1978
1979 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1980 if test $ac_cv_prog_cc_works = no; then
1981   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1982 fi
1983 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1984 echo "configure:1985: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1985 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1986 cross_compiling=$ac_cv_prog_cc_cross
1987
1988 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1989 echo "configure:1990: checking whether we are using GNU C" >&5
1990
1991 cat > conftest.c <<EOF
1992 #ifdef __GNUC__
1993   yes;
1994 #endif
1995 EOF
1996 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1997   ac_cv_prog_gcc=yes
1998 else
1999   ac_cv_prog_gcc=no
2000 fi
2001
2002 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2003
2004 if test $ac_cv_prog_gcc = yes; then
2005   GCC=yes
2006 else
2007   GCC=
2008 fi
2009
2010 ac_test_CFLAGS="${CFLAGS+set}"
2011 ac_save_CFLAGS="$CFLAGS"
2012 CFLAGS=
2013 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2014 echo "configure:2015: checking whether ${CC-cc} accepts -g" >&5
2015
2016 echo 'void f(){}' > conftest.c
2017 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2018   ac_cv_prog_cc_g=yes
2019 else
2020   ac_cv_prog_cc_g=no
2021 fi
2022 rm -f conftest*
2023
2024
2025 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2026 if test "$ac_test_CFLAGS" = set; then
2027   CFLAGS="$ac_save_CFLAGS"
2028 elif test $ac_cv_prog_cc_g = yes; then
2029   if test "$GCC" = yes; then
2030     CFLAGS="-g -O2"
2031   else
2032     CFLAGS="-g"
2033   fi
2034 else
2035   if test "$GCC" = yes; then
2036     CFLAGS="-O2"
2037   else
2038     CFLAGS=
2039   fi
2040 fi
2041
2042 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2043   CC=gcc
2044   # Extract the first word of "gcc", so it can be a program name with args.
2045 set dummy gcc; ac_word=$2
2046 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2047 echo "configure:2048: checking for $ac_word" >&5
2048
2049 if test -n "$CC"; then
2050   ac_cv_prog_CC="$CC" # Let the user override the test.
2051 else
2052   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2053   ac_dummy="$PATH"
2054   for ac_dir in $ac_dummy; do
2055     test -z "$ac_dir" && ac_dir=.
2056     if test -f $ac_dir/$ac_word; then
2057       ac_cv_prog_CC="gcc"
2058       break
2059     fi
2060   done
2061   IFS="$ac_save_ifs"
2062 fi
2063 CC="$ac_cv_prog_CC"
2064 if test -n "$CC"; then
2065   echo "$ac_t""$CC" 1>&6
2066 else
2067   echo "$ac_t""no" 1>&6
2068 fi
2069
2070 if test -z "$CC"; then
2071   # Extract the first word of "cc", so it can be a program name with args.
2072 set dummy cc; ac_word=$2
2073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2074 echo "configure:2075: checking for $ac_word" >&5
2075
2076 if test -n "$CC"; then
2077   ac_cv_prog_CC="$CC" # Let the user override the test.
2078 else
2079   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2080   ac_prog_rejected=no
2081   ac_dummy="$PATH"
2082   for ac_dir in $ac_dummy; do
2083     test -z "$ac_dir" && ac_dir=.
2084     if test -f $ac_dir/$ac_word; then
2085       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2086         ac_prog_rejected=yes
2087         continue
2088       fi
2089       ac_cv_prog_CC="cc"
2090       break
2091     fi
2092   done
2093   IFS="$ac_save_ifs"
2094 if test $ac_prog_rejected = yes; then
2095   # We found a bogon in the path, so make sure we never use it.
2096   set dummy $ac_cv_prog_CC
2097   shift
2098   if test $# -gt 0; then
2099     # We chose a different compiler from the bogus one.
2100     # However, it has the same basename, so the bogon will be chosen
2101     # first if we set CC to just the basename; use the full file name.
2102     shift
2103     set dummy "$ac_dir/$ac_word" "$@"
2104     shift
2105     ac_cv_prog_CC="$@"
2106   fi
2107 fi
2108 fi
2109 CC="$ac_cv_prog_CC"
2110 if test -n "$CC"; then
2111   echo "$ac_t""$CC" 1>&6
2112 else
2113   echo "$ac_t""no" 1>&6
2114 fi
2115
2116   if test -z "$CC"; then
2117     case "`uname -s`" in
2118     *win32* | *WIN32*)
2119       # Extract the first word of "cl", so it can be a program name with args.
2120 set dummy cl; ac_word=$2
2121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2122 echo "configure:2123: checking for $ac_word" >&5
2123
2124 if test -n "$CC"; then
2125   ac_cv_prog_CC="$CC" # Let the user override the test.
2126 else
2127   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2128   ac_dummy="$PATH"
2129   for ac_dir in $ac_dummy; do
2130     test -z "$ac_dir" && ac_dir=.
2131     if test -f $ac_dir/$ac_word; then
2132       ac_cv_prog_CC="cl"
2133       break
2134     fi
2135   done
2136   IFS="$ac_save_ifs"
2137 fi
2138 CC="$ac_cv_prog_CC"
2139 if test -n "$CC"; then
2140   echo "$ac_t""$CC" 1>&6
2141 else
2142   echo "$ac_t""no" 1>&6
2143 fi
2144  ;;
2145     esac
2146   fi
2147   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2148 fi
2149
2150 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2151 echo "configure:2152: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2152
2153 ac_ext=c
2154 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2155 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2156 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2157 ac_cpp='$CPP '"$xe_cppflags"
2158 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2159 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2160 cross_compiling=no
2161
2162 cat > conftest.$ac_ext << EOF
2163
2164 #line 2165 "configure"
2165 #include "confdefs.h"
2166
2167 main(){return(0);}
2168 EOF
2169 if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2170   ac_cv_prog_cc_works=yes
2171   # If we can't run a trivial program, we are probably using a cross compiler.
2172   if (./conftest; exit) 2>/dev/null; then
2173     ac_cv_prog_cc_cross=no
2174   else
2175     ac_cv_prog_cc_cross=yes
2176   fi
2177 else
2178   echo "configure: failed program was:" >&5
2179   cat conftest.$ac_ext >&5
2180   ac_cv_prog_cc_works=no
2181 fi
2182 rm -fr conftest*
2183 ac_ext=c
2184 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2185 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2186 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2187 ac_cpp='$CPP '"$xe_cppflags"
2188 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2189 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2190 cross_compiling=no
2191
2192 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2193 if test $ac_cv_prog_cc_works = no; then
2194   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2195 fi
2196 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2197 echo "configure:2198: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2198 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2199 cross_compiling=$ac_cv_prog_cc_cross
2200
2201 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2202 echo "configure:2203: checking whether we are using GNU C" >&5
2203
2204 cat > conftest.c <<EOF
2205 #ifdef __GNUC__
2206   yes;
2207 #endif
2208 EOF
2209 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2210   ac_cv_prog_gcc=yes
2211 else
2212   ac_cv_prog_gcc=no
2213 fi
2214
2215 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2216
2217 if test $ac_cv_prog_gcc = yes; then
2218   GCC=yes
2219 else
2220   GCC=
2221 fi
2222
2223 ac_test_CFLAGS="${CFLAGS+set}"
2224 ac_save_CFLAGS="$CFLAGS"
2225 CFLAGS=
2226 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2227 echo "configure:2228: checking whether ${CC-cc} accepts -g" >&5
2228
2229 echo 'void f(){}' > conftest.c
2230 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2231   ac_cv_prog_cc_g=yes
2232 else
2233   ac_cv_prog_cc_g=no
2234 fi
2235 rm -f conftest*
2236
2237
2238 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2239 if test "$ac_test_CFLAGS" = set; then
2240   CFLAGS="$ac_save_CFLAGS"
2241 elif test $ac_cv_prog_cc_g = yes; then
2242   if test "$GCC" = yes; then
2243     CFLAGS="-g -O2"
2244   else
2245     CFLAGS="-g"
2246   fi
2247 else
2248   if test "$GCC" = yes; then
2249     CFLAGS="-O2"
2250   else
2251     CFLAGS=
2252   fi
2253 fi
2254
2255 fi
2256 CFLAGS="$xe_save_CFLAGS"
2257
2258
2259 test -n "$CPP" -a -d "$CPP" && CPP=
2260
2261 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2262
2263 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2264 echo "configure:2265: checking how to run the C preprocessor" >&5
2265 # On Suns, sometimes $CPP names a directory.
2266 if test -n "$CPP" && test -d "$CPP"; then
2267   CPP=
2268 fi
2269 if test -z "$CPP"; then
2270
2271   # This must be in double quotes, not single quotes, because CPP may get
2272   # substituted into the Makefile and "${CC-cc}" will confuse make.
2273   CPP="${CC-cc} -E"
2274   # On the NeXT, cc -E runs the code through the compiler's parser,
2275   # not just through cpp.
2276   cat > conftest.$ac_ext <<EOF
2277 #line 2278 "configure"
2278 #include "confdefs.h"
2279 #include <assert.h>
2280 Syntax Error
2281 EOF
2282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2283 { (eval echo configure:2284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2285 if test -z "$ac_err"; then
2286   :
2287 else
2288   echo "$ac_err" >&5
2289   echo "configure: failed program was:" >&5
2290   cat conftest.$ac_ext >&5
2291   rm -rf conftest*
2292   CPP="${CC-cc} -E -traditional-cpp"
2293   cat > conftest.$ac_ext <<EOF
2294 #line 2295 "configure"
2295 #include "confdefs.h"
2296 #include <assert.h>
2297 Syntax Error
2298 EOF
2299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2300 { (eval echo configure:2301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2302 if test -z "$ac_err"; then
2303   :
2304 else
2305   echo "$ac_err" >&5
2306   echo "configure: failed program was:" >&5
2307   cat conftest.$ac_ext >&5
2308   rm -rf conftest*
2309   CPP="${CC-cc} -nologo -E"
2310   cat > conftest.$ac_ext <<EOF
2311 #line 2312 "configure"
2312 #include "confdefs.h"
2313 #include <assert.h>
2314 Syntax Error
2315 EOF
2316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2317 { (eval echo configure:2318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2319 if test -z "$ac_err"; then
2320   :
2321 else
2322   echo "$ac_err" >&5
2323   echo "configure: failed program was:" >&5
2324   cat conftest.$ac_ext >&5
2325   rm -rf conftest*
2326   CPP=/lib/cpp
2327 fi
2328 rm -f conftest*
2329 fi
2330 rm -f conftest*
2331 fi
2332 rm -f conftest*
2333   ac_cv_prog_CPP="$CPP"
2334   CPP="$ac_cv_prog_CPP"
2335 else
2336   ac_cv_prog_CPP="$CPP"
2337 fi
2338 echo "$ac_t""$CPP" 1>&6
2339
2340
2341
2342 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2343 echo "configure:2344: checking for AIX" >&5
2344 cat > conftest.$ac_ext <<EOF
2345 #line 2346 "configure"
2346 #include "confdefs.h"
2347 #ifdef _AIX
2348   yes
2349 #endif
2350
2351 EOF
2352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2353   egrep "yes" >/dev/null 2>&1; then
2354   rm -rf conftest*
2355   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2356     Defining _ALL_SOURCE
2357 EOF
2358 cat >> confdefs.h <<\EOF
2359 #define _ALL_SOURCE 1
2360 EOF
2361 }
2362
2363 else
2364   rm -rf conftest*
2365   echo "$ac_t""no" 1>&6
2366 fi
2367 rm -f conftest*
2368
2369  
2370
2371 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2372 echo "configure:2373: checking for GNU libc" >&5
2373 cat > conftest.$ac_ext <<EOF
2374 #line 2375 "configure"
2375 #include "confdefs.h"
2376 #include <features.h>
2377 int main() {
2378
2379 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2380 #error Not a GNU libc system :-(
2381 ******* ======= ******** &&&&&&&&
2382 #endif
2383
2384 ; return 0; }
2385 EOF
2386 if { (eval echo configure:2387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2387   rm -rf conftest*
2388   have_glibc=yes
2389 else
2390   echo "configure: failed program was:" >&5
2391   cat conftest.$ac_ext >&5
2392   rm -rf conftest*
2393   have_glibc=no
2394 fi
2395 rm -f conftest*
2396 echo "$ac_t""$have_glibc" 1>&6
2397 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2398     Defining _GNU_SOURCE
2399 EOF
2400 cat >> confdefs.h <<\EOF
2401 #define _GNU_SOURCE 1
2402 EOF
2403 }
2404
2405
2406 case "$opsys" in
2407   sol2)
2408    { test "$extra_verbose" = "yes" && cat << \EOF
2409     Defining __EXTENSIONS__
2410 EOF
2411 cat >> confdefs.h <<\EOF
2412 #define __EXTENSIONS__ 1
2413 EOF
2414 }
2415
2416       if test "$os_release" -ge 55; then
2417      { test "$extra_verbose" = "yes" && cat << \EOF
2418     Defining _XOPEN_SOURCE = 500
2419 EOF
2420 cat >> confdefs.h <<\EOF
2421 #define _XOPEN_SOURCE 500
2422 EOF
2423 }
2424
2425      { test "$extra_verbose" = "yes" && cat << \EOF
2426     Defining _XOPEN_SOURCE_EXTENDED
2427 EOF
2428 cat >> confdefs.h <<\EOF
2429 #define _XOPEN_SOURCE_EXTENDED 1
2430 EOF
2431 }
2432
2433    fi ;;
2434   linux)
2435     { test "$extra_verbose" = "yes" && cat << \EOF
2436     Defining _POSIX_C_SOURCE = 199506L
2437 EOF
2438 cat >> confdefs.h <<\EOF
2439 #define _POSIX_C_SOURCE 199506L
2440 EOF
2441 }
2442
2443     { test "$extra_verbose" = "yes" && cat << \EOF
2444     Defining _XOPEN_SOURCE = 500
2445 EOF
2446 cat >> confdefs.h <<\EOF
2447 #define _XOPEN_SOURCE 500
2448 EOF
2449 }
2450
2451     { test "$extra_verbose" = "yes" && cat << \EOF
2452     Defining _XOPEN_SOURCE_EXTENDED
2453 EOF
2454 cat >> confdefs.h <<\EOF
2455 #define _XOPEN_SOURCE_EXTENDED 1
2456 EOF
2457 }
2458
2459     ;;
2460 esac
2461
2462 cat > conftest.$ac_ext <<EOF
2463 #line 2464 "configure"
2464 #include "confdefs.h"
2465 int main () {
2466 #if defined __SUNPRO_C
2467 return 11;
2468 #elif defined __DECC
2469 return 12;
2470 #elif defined __USLC__ && defined __SCO_VERSION__
2471 return 13;
2472 #else
2473 return 0;
2474 #endif
2475 }
2476 EOF
2477 if { (eval echo configure:2478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2478 then
2479   :
2480 else
2481   conftest_rc="$?"
2482   echo "configure: failed program was:" >&5
2483   cat conftest.$ac_ext >&5
2484   rm -fr conftest*
2485   case "$conftest_rc" in
2486   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2487   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2488   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2489 esac
2490 fi
2491 rm -fr conftest*
2492
2493
2494
2495
2496 echo "Extracting information from the machine- and system-dependent headers..."
2497
2498 tempcname="conftest.c"
2499
2500
2501
2502 cat > $tempcname < confdefs.h
2503 cat >> $tempcname <<EOF
2504 #define NOT_C_CODE
2505 #define C_SWITCH_SITE
2506 #define C_SWITCH_X_SITE
2507 #define LD_SWITCH_SITE
2508 #define LD_SWITCH_X_SITE
2509 #define LD_SWITCH_X_SITE_AUX
2510 #define OS_RELEASE $os_release
2511
2512 #ifdef config_opsysfile
2513 #include "$srcdir/src/$opsysfile"
2514 #endif
2515
2516 #ifdef config_machfile
2517 #include "$srcdir/src/$machfile"
2518 #endif
2519
2520 #ifndef LIBS_MACHINE
2521 #define LIBS_MACHINE
2522 #endif
2523 configure___ libs_machine=LIBS_MACHINE
2524
2525 #ifndef LIBS_SYSTEM
2526 #define LIBS_SYSTEM
2527 #endif
2528 configure___ libs_system=LIBS_SYSTEM
2529
2530 #ifndef LIBS_TERMCAP
2531 #define LIBS_TERMCAP
2532 #endif
2533 configure___ libs_termcap=LIBS_TERMCAP
2534
2535 #ifndef LIB_STANDARD
2536 #define LIB_STANDARD
2537 #endif
2538 configure___ libs_standard=LIB_STANDARD
2539
2540
2541 #ifndef OBJECTS_MACHINE
2542 #define OBJECTS_MACHINE
2543 #endif
2544 configure___ objects_machine=OBJECTS_MACHINE
2545
2546 #ifndef OBJECTS_SYSTEM
2547 #define OBJECTS_SYSTEM
2548 #endif
2549 configure___ objects_system=OBJECTS_SYSTEM
2550
2551
2552 #ifndef C_SWITCH_MACHINE
2553 #define C_SWITCH_MACHINE
2554 #endif
2555 configure___ c_switch_machine=C_SWITCH_MACHINE
2556
2557 #ifndef C_SWITCH_SYSTEM
2558 #define C_SWITCH_SYSTEM
2559 #endif
2560 configure___ c_switch_system=C_SWITCH_SYSTEM
2561
2562
2563 #ifndef LD_SWITCH_MACHINE
2564 #define LD_SWITCH_MACHINE
2565 #endif
2566 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2567
2568 #ifndef LD_SWITCH_SYSTEM
2569 #define LD_SWITCH_SYSTEM
2570 #endif
2571 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2572
2573
2574 #ifndef UNEXEC
2575 #define UNEXEC "unexec.o"
2576 #endif
2577 configure___ unexec=UNEXEC
2578
2579
2580 #ifndef LD_SWITCH_SHARED
2581 #define LD_SWITCH_SHARED "-c"
2582 #endif
2583 configure___ ld_switch_shared=LD_SWITCH_SHARED
2584
2585
2586 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2587 configure___ ordinary_ld=ORDINARY_LD
2588
2589 #ifdef ORDINARY_LINK
2590 #define LD ORDINARY_LD
2591 #else /* no ORDINARY LINK */
2592 #ifdef COFF_ENCAPSULATE
2593 #define LD "\$(CC) -nostdlib"
2594 #else /* not COFF_ENCAPSULATE */
2595 #ifdef LINKER
2596 #define LD LINKER
2597 #else /* ! defined (LINKER) */
2598 #define LD "ld"
2599 #endif /* ! defined (LINKER) */
2600 #endif /* ! defined (COFF_ENCAPSULATE) */
2601 #endif /* not ORDINARY_LINK */
2602 configure___ ld=LD
2603
2604 #ifndef LIB_GCC
2605 #define LIB_GCC
2606 #endif
2607 configure___ lib_gcc=LIB_GCC
2608
2609 #ifndef LD_TEXT_START_ADDR
2610 #define LD_TEXT_START_ADDR
2611 #endif
2612 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2613
2614
2615 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2616 #ifdef NO_REMAP
2617 #ifdef COFF_ENCAPSULATE
2618 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2619 #else /* ! defined (COFF_ENCAPSULATE) */
2620 #define START_FILES "pre-crt0.o /lib/crt0.o"
2621 #endif /* ! defined (COFF_ENCAPSULATE) */
2622 #else /* ! defined (NO_REMAP) */
2623 #define START_FILES "ecrt0.o"
2624 #endif /* ! defined (NO_REMAP) */
2625 #endif /* no ORDINARY_LINK */
2626 #ifndef START_FILES
2627 #define START_FILES
2628 #endif
2629 configure___ start_files=START_FILES
2630
2631 #ifdef ORDINARY_LINK
2632 configure___ ordinary_link=yes
2633 #else
2634 configure___ ordinary_link=no
2635 #endif
2636
2637 #ifdef SYSTEM_MALLOC
2638 configure___ system_malloc=yes
2639 #else
2640 configure___ system_malloc=no
2641 #endif
2642
2643 #ifdef TERMINFO
2644 configure___ have_terminfo=yes
2645 #else
2646 configure___ have_terminfo=no
2647 #endif
2648
2649 #ifdef MAIL_USE_FLOCK
2650 configure___ mail_use_flock=yes
2651 #else
2652 configure___ mail_use_flock=no
2653 #endif
2654
2655 #ifdef MAIL_USE_LOCKF
2656 configure___ mail_use_lockf=yes
2657 #else
2658 configure___ mail_use_lockf=no
2659 #endif
2660
2661 #ifdef MAIL_USE_LOCKING
2662 configure___ mail_use_locking=yes
2663 #else
2664 configure___ mail_use_locking=no
2665 #endif
2666
2667 #ifdef HAVE_WIN32_PROCESSES
2668 configure___ win32_processes=yes
2669 #else
2670 configure___ win32_processes=no
2671 #endif
2672
2673 EOF
2674
2675 CPP=`eval "echo $CPP $CPPFLAGS"`
2676 eval `$CPP -Isrc $tempcname \
2677         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2678
2679 rm $tempcname
2680
2681 if test "$pdump" = "yes"; then
2682   ordinary_link="yes"
2683   ld="${ordinary_ld}"
2684   start_files=
2685   libs_standard=
2686   unexec=
2687   lib_gcc=
2688 fi
2689
2690 test "$extra_verbose" = "yes" && \
2691   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 ""
2692
2693 case "$opsys" in mingw* | cygwin*) 
2694   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2695   cygwin_include=`eval "dirname $cygwin_include"` ;
2696   cygwin_include="-I$cygwin_include/../include" ;
2697   extra_includes="$cygwin_include/mingw32 $cygwin_include/mingw $cygwin_include" ;
2698   case "$opsys" in mingw*) 
2699     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2700   esac
2701   ;;    
2702 esac
2703
2704 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2705
2706
2707 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2708
2709 if test "$__USLC__" = yes; then
2710   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2711 echo "configure:2712: checking for whether the -Kalloca compiler flag is needed" >&5
2712   need_kalloca=no
2713   cat > conftest.$ac_ext <<EOF
2714 #line 2715 "configure"
2715 #include "confdefs.h"
2716
2717 int main() {
2718 void *x = alloca(4);
2719 ; return 0; }
2720 EOF
2721 if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2722   rm -rf conftest*
2723   :
2724 else
2725   echo "configure: failed program was:" >&5
2726   cat conftest.$ac_ext >&5
2727   rm -rf conftest*
2728   
2729     xe_save_c_switch_system="$c_switch_system"
2730     c_switch_system="$c_switch_system -Kalloca"
2731     cat > conftest.$ac_ext <<EOF
2732 #line 2733 "configure"
2733 #include "confdefs.h"
2734
2735 int main() {
2736 void *x = alloca(4);
2737 ; return 0; }
2738 EOF
2739 if { (eval echo configure:2740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2740   rm -rf conftest*
2741    need_kalloca=yes 
2742 else
2743   echo "configure: failed program was:" >&5
2744   cat conftest.$ac_ext >&5
2745 fi
2746 rm -f conftest*
2747     c_switch_system="$xe_save_c_switch_system"
2748 fi
2749 rm -f conftest*
2750   echo "$ac_t""$need_kalloca" 1>&6
2751   test "$need_kalloca" = "yes" && c_switch_system="$c_switch_system -Kalloca" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-Kalloca\" to \$c_switch_system"; fi
2752 fi
2753
2754 if test "$cflags_specified" = "no"; then
2755       if   test "$GCC" = "yes"; then
2756     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2757               elif test "$__SUNPRO_C" = "yes"; then
2758     case "$opsys" in
2759       sol2    ) CFLAGS="-v -xO4" ;;
2760       sunos4* ) CFLAGS="-xO2";;
2761     esac
2762   elif test "$__DECC" = "yes"; then
2763     CFLAGS="-O3"
2764   elif test "$CC" = "xlc"; then
2765     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2766     else
2767     CFLAGS="-O" ;  fi
2768 fi
2769
2770 if test "$GCC" = "yes"; then
2771 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2772 echo "configure:2773: checking for buggy gcc versions" >&5
2773 GCC_VERSION=`$CC --version`
2774 case `uname -s`:`uname -m`:$GCC_VERSION in
2775                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2776                         case "$CFLAGS" in
2777             *-O2*|*-O3*)
2778                 case "$CFLAGS" in
2779                     *-fno-schedule-insns*) ;;
2780                     *)
2781                         echo "$ac_t""yes" 1>&6
2782                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2783                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2784                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2785                         ;;
2786                 esac
2787                 ;;
2788         esac
2789         ;;
2790                     Linux:alpha:egcs-2.91.*)
2791         echo "$ac_t""yes" 1>&6
2792         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2793         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2794         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2795         ;;
2796     *:i*86*:2.7.2*)
2797         case "$CFLAGS" in
2798             *-O2*|*-O3*)
2799                 case "$GCC_VERSION" in
2800                     2.7.2)
2801                         case "$CFLAGS" in
2802                             *-fno-strength-reduce*) ;;
2803                             *)
2804                                 echo "$ac_t""yes" 1>&6
2805                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2806                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2807                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2808                                 ;;
2809                         esac
2810                         ;;
2811                 esac
2812                 case "$CFLAGS" in
2813                  *-fno-caller-saves*) ;;
2814                  *)
2815                     echo "$ac_t""yes" 1>&6
2816                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2817                     echo "configure: warning: -fno-caller-saves." 1>&2
2818                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2819                     ;;
2820                 esac
2821                 ;;
2822         esac
2823         ;;
2824 esac
2825 echo "$ac_t""no" 1>&6
2826 fi
2827
2828
2829 if test "$GCC" = "yes"; then
2830   set x $ld_switch_system; shift; ld_switch_system=""
2831   while test -n "$1"; do
2832     case $1 in
2833       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2834       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2835       -Xlinker* ) ;;
2836       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2837     esac
2838     shift
2839   done
2840 fi
2841
2842 if test "$GCC" = "yes"; then
2843   set x $ld_switch_machine; shift; ld_switch_machine=""
2844   while test -n "$1"; do
2845     case $1 in
2846       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2847       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2848       -Xlinker* ) ;;
2849       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2850     esac
2851     shift
2852   done
2853 fi
2854
2855 if test "$GCC" = "yes"; then
2856   set x $LDFLAGS; shift; LDFLAGS=""
2857   while test -n "$1"; do
2858     case $1 in
2859       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2860       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2861       -Xlinker* ) ;;
2862       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2863     esac
2864     shift
2865   done
2866 fi
2867
2868 if test "$GCC" = "yes"; then
2869   set x $ld_call_shared; shift; ld_call_shared=""
2870   while test -n "$1"; do
2871     case $1 in
2872       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2873       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2874       -Xlinker* ) ;;
2875       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2876     esac
2877     shift
2878   done
2879 fi
2880
2881 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2882    echo "    xemacs will be linked with \"$objects_machine\""
2883  fi
2884 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2885    echo "    xemacs will be linked with \"$objects_system\""
2886  fi
2887 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2888    echo "    xemacs will be linked with \"$unexec\""
2889  fi
2890 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2891    echo "    xemacs will be linked with \"dumper.o\""
2892  fi
2893
2894 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2895 echo "configure:2896: checking for dynodump" >&5
2896 if test "$unexec" != "unexsol2.o"; then
2897   echo "$ac_t""no" 1>&6
2898 else
2899   echo "$ac_t""yes" 1>&6
2900   { test "$extra_verbose" = "yes" && cat << \EOF
2901     Defining DYNODUMP
2902 EOF
2903 cat >> confdefs.h <<\EOF
2904 #define DYNODUMP 1
2905 EOF
2906 }
2907
2908   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2909   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2910   case "$machine" in
2911     sparc   ) dynodump_arch=sparc ;;
2912     *86*    ) dynodump_arch=i386  ;;
2913     powerpc ) dynodump_arch=ppc   ;;
2914   esac
2915     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
2916 fi
2917
2918
2919 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2920
2921 if test "$unexec" = "unexaix.o"; then
2922   if   test "$dynamic" = "no"; then
2923   start_flags="-Wl,-bnso,-bnodelcsect"
2924   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2925   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2926     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2927   done
2928   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2929     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2930   done
2931   
2932 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2933 echo "configure:2934: checking for terminateAndUnload in -lC" >&5
2934 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2935
2936 xe_check_libs=" -lC "
2937 cat > conftest.$ac_ext <<EOF
2938 #line 2939 "configure"
2939 #include "confdefs.h"
2940 /* Override any gcc2 internal prototype to avoid an error.  */
2941 /* We use char because int might match the return type of a gcc2
2942     builtin and then its argument prototype would still apply.  */
2943 char terminateAndUnload();
2944
2945 int main() {
2946 terminateAndUnload()
2947 ; return 0; }
2948 EOF
2949 if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2950   rm -rf conftest*
2951   eval "ac_cv_lib_$ac_lib_var=yes"
2952 else
2953   echo "configure: failed program was:" >&5
2954   cat conftest.$ac_ext >&5
2955   rm -rf conftest*
2956   eval "ac_cv_lib_$ac_lib_var=no"
2957 fi
2958 rm -f conftest*
2959 xe_check_libs=""
2960
2961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2962   echo "$ac_t""yes" 1>&6
2963   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2964 else
2965   echo "$ac_t""no" 1>&6
2966 fi
2967
2968
2969   fi
2970 elif test -n "$ld_text_start_addr"; then
2971   start_flags="-T $ld_text_start_addr -e __start"
2972 fi
2973
2974
2975
2976
2977 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2978  test -z "$linker" &&  linker='$(CC) -nostdlib'
2979  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2980 fi
2981 test "$GCC" != "yes" && lib_gcc=
2982
2983
2984
2985
2986
2987 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2988 if test -n "$site_libraries"; then
2989   for arg in $site_libraries; do
2990     case "$arg" in
2991      -* ) ;;
2992      * ) test -d "$arg" || \
2993            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2994        arg="-L${arg}" ;;
2995     esac
2996     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2997   done
2998 fi
2999
3000 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3001 if test -n "$site_includes"; then
3002   for arg in $site_includes; do
3003     case "$arg" in
3004       -* ) ;;
3005       * ) test -d "$arg" || \
3006            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3007       arg="-I${arg}" ;;
3008     esac
3009     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3010   done
3011 fi
3012
3013 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3014 if test -n "$site_prefixes"; then
3015   for dir in $site_prefixes; do
3016     lib_dir="${dir}/lib"
3017     inc_dir="${dir}/include"
3018     if test ! -d "$dir"; then
3019       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3020     elif test ! -d "$lib_dir"; then
3021       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3022     else
3023       if test -d "$inc_dir"; then
3024         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
3025       fi
3026       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
3027     fi
3028   done
3029 fi
3030
3031
3032 for dir in "/usr/ccs/lib"; do
3033   test -d "$dir" && ld_switch_system="$ld_switch_system -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_system"; fi
3034 done
3035
3036 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3037 if test -n "$site_runtime_libraries"; then
3038   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3039   export LD_RUN_PATH
3040 fi
3041
3042
3043
3044
3045
3046 if test -n "$add_runtime_path"; then :;
3047 elif test "$dynamic" = "no"; then add_runtime_path=no
3048 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3049 else case "$opsys" in
3050        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3051        * ) add_runtime_path=no ;;
3052      esac
3053 fi
3054
3055 if test "$add_runtime_path" = "yes"; then
3056       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3057 echo "configure:3058: checking "for runtime libraries flag"" >&5
3058   case "$opsys" in
3059     sol2 ) dash_r="-R" ;;
3060     decosf* | linux* | irix*) dash_r="-rpath " ;;
3061     *)
3062       dash_r=""
3063       for try_dash_r in "-R" "-R " "-rpath "; do
3064         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3065         
3066 if test "$GCC" = "yes"; then
3067   set x $xe_check_libs; shift; xe_check_libs=""
3068   while test -n "$1"; do
3069     case $1 in
3070       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3071       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3072       -Xlinker* ) ;;
3073       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3074     esac
3075     shift
3076   done
3077 fi
3078         cat > conftest.$ac_ext <<EOF
3079 #line 3080 "configure"
3080 #include "confdefs.h"
3081
3082 int main() {
3083
3084 ; return 0; }
3085 EOF
3086 if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3087   rm -rf conftest*
3088   dash_r="$try_dash_r"
3089 else
3090   echo "configure: failed program was:" >&5
3091   cat conftest.$ac_ext >&5
3092 fi
3093 rm -f conftest*
3094         xe_check_libs=""
3095         test -n "$dash_r" && break
3096       done ;;
3097   esac
3098   if test -n "$dash_r";
3099     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3100     else echo "$ac_t""NONE" 1>&6
3101   fi
3102 fi
3103
3104 xe_add_unique_runpath_dir='
3105   xe_add_p=yes
3106   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3107   done
3108   if test "$xe_add_p" = "yes"; then
3109     test -n "$runpath" && runpath="${runpath}:"
3110     runpath="${runpath}${xe_runpath_dir}"
3111     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3112   fi'
3113
3114
3115
3116
3117 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3118     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3119   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3120   
3121         runpath="" runpath_dirs=""
3122   if test -n "$LD_RUN_PATH"; then
3123     runpath="$LD_RUN_PATH"
3124   elif test "$GCC" = "yes"; then
3125         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3126     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3127     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3128     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3129       case "$arg" in P,* | -L* | -R* )
3130         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3131           {
3132 xe_runpath_dir="$dir"
3133   test "$xe_runpath_dir" != "/lib"     -a \
3134         "$xe_runpath_dir" != "/usr/lib" -a \
3135         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3136   eval "$xe_add_unique_runpath_dir"
3137 }
3138         done ;;
3139       esac
3140     done
3141     ld_switch_run="$ld_switch_run_save"
3142     rm -f conftest*
3143   else
3144         for arg in $ld_switch_site $ld_switch_x_site; do
3145       case "$arg" in -L*) {
3146 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3147   test "$xe_runpath_dir" != "/lib"     -a \
3148         "$xe_runpath_dir" != "/usr/lib" -a \
3149         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3150   eval "$xe_add_unique_runpath_dir"
3151 };; esac
3152     done
3153         if test "$opsys $need_motif" = "sol2 yes"; then
3154       xe_runpath_dir="/opt/SUNWdt/lib";
3155       eval "$xe_add_unique_runpath_dir";
3156     fi
3157   fi 
3158   if test -n "$runpath"; then
3159     ld_switch_run="${dash_r}${runpath}"
3160     
3161 if test "$GCC" = "yes"; then
3162   set x $ld_switch_run; shift; ld_switch_run=""
3163   while test -n "$1"; do
3164     case $1 in
3165       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3166       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3167       -Xlinker* ) ;;
3168       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3169     esac
3170     shift
3171   done
3172 fi
3173     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3174   fi
3175 fi
3176
3177
3178
3179
3180 GNU_MALLOC=yes
3181 if test "$with_dlmalloc" != "no"; then
3182         doug_lea_malloc=yes
3183 else
3184         doug_lea_malloc=no
3185 fi
3186 after_morecore_hook_exists=yes
3187 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3188 echo "configure:3189: checking for malloc_set_state" >&5
3189
3190 cat > conftest.$ac_ext <<EOF
3191 #line 3192 "configure"
3192 #include "confdefs.h"
3193 /* System header to define __stub macros and hopefully few prototypes,
3194     which can conflict with char malloc_set_state(); below.  */
3195 #include <assert.h>
3196 /* Override any gcc2 internal prototype to avoid an error.  */
3197 /* We use char because int might match the return type of a gcc2
3198     builtin and then its argument prototype would still apply.  */
3199 char malloc_set_state();
3200
3201 int main() {
3202
3203 /* The GNU C library defines this for functions which it implements
3204     to always fail with ENOSYS.  Some functions are actually named
3205     something starting with __ and the normal name is an alias.  */
3206 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3207 choke me
3208 #else
3209 malloc_set_state();
3210 #endif
3211
3212 ; return 0; }
3213 EOF
3214 if { (eval echo configure:3215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3215   rm -rf conftest*
3216   eval "ac_cv_func_malloc_set_state=yes"
3217 else
3218   echo "configure: failed program was:" >&5
3219   cat conftest.$ac_ext >&5
3220   rm -rf conftest*
3221   eval "ac_cv_func_malloc_set_state=no"
3222 fi
3223 rm -f conftest*
3224
3225 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3226   echo "$ac_t""yes" 1>&6
3227   :
3228 else
3229   echo "$ac_t""no" 1>&6
3230 doug_lea_malloc=no
3231 fi
3232
3233 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3234 echo "configure:3235: checking whether __after_morecore_hook exists" >&5
3235 cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238 extern void (* __after_morecore_hook)();
3239 int main() {
3240 __after_morecore_hook = 0
3241 ; return 0; }
3242 EOF
3243 if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3244   rm -rf conftest*
3245   echo "$ac_t""yes" 1>&6
3246 else
3247   echo "configure: failed program was:" >&5
3248   cat conftest.$ac_ext >&5
3249   rm -rf conftest*
3250   echo "$ac_t""no" 1>&6
3251    after_morecore_hook_exists=no
3252 fi
3253 rm -f conftest*
3254 if test "$system_malloc" = "yes" ; then
3255   GNU_MALLOC=no
3256   GNU_MALLOC_reason="
3257     - The GNU allocators don't work with this system configuration."
3258 elif test "$with_system_malloc" = "yes" ; then
3259   GNU_MALLOC=no
3260   GNU_MALLOC_reason="
3261     - User chose not to use GNU allocators."
3262 elif test "$with_debug_malloc" = "yes" ; then
3263   GNU_MALLOC=no
3264   GNU_MALLOC_reason="
3265     - User chose to use Debugging Malloc."
3266 fi
3267
3268 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3269   GNU_MALLOC_reason="
3270     - Using Doug Lea's new malloc from the GNU C Library."
3271   { test "$extra_verbose" = "yes" && cat << \EOF
3272     Defining DOUG_LEA_MALLOC
3273 EOF
3274 cat >> confdefs.h <<\EOF
3275 #define DOUG_LEA_MALLOC 1
3276 EOF
3277 }
3278
3279   if test "$after_morecore_hook_exists" = "no" ; then
3280     GNU_MALLOC_reason="
3281     - Using Doug Lea's new malloc from the Linux C Library."
3282     { test "$extra_verbose" = "yes" && cat << \EOF
3283     Defining _NO_MALLOC_WARNING_
3284 EOF
3285 cat >> confdefs.h <<\EOF
3286 #define _NO_MALLOC_WARNING_ 1
3287 EOF
3288 }
3289
3290   fi
3291 fi
3292
3293
3294
3295
3296 # Extract the first word of "ranlib", so it can be a program name with args.
3297 set dummy ranlib; ac_word=$2
3298 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3299 echo "configure:3300: checking for $ac_word" >&5
3300
3301 if test -n "$RANLIB"; then
3302   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3303 else
3304   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3305   ac_dummy="$PATH"
3306   for ac_dir in $ac_dummy; do
3307     test -z "$ac_dir" && ac_dir=.
3308     if test -f $ac_dir/$ac_word; then
3309       ac_cv_prog_RANLIB="ranlib"
3310       break
3311     fi
3312   done
3313   IFS="$ac_save_ifs"
3314   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3315 fi
3316 RANLIB="$ac_cv_prog_RANLIB"
3317 if test -n "$RANLIB"; then
3318   echo "$ac_t""$RANLIB" 1>&6
3319 else
3320   echo "$ac_t""no" 1>&6
3321 fi
3322
3323 ac_aux_dir=
3324 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3325   if test -f $ac_dir/install-sh; then
3326     ac_aux_dir=$ac_dir
3327     ac_install_sh="$ac_aux_dir/install-sh -c"
3328     break
3329   elif test -f $ac_dir/install.sh; then
3330     ac_aux_dir=$ac_dir
3331     ac_install_sh="$ac_aux_dir/install.sh -c"
3332     break
3333   fi
3334 done
3335 if test -z "$ac_aux_dir"; then
3336   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3337 fi
3338 ac_config_guess=$ac_aux_dir/config.guess
3339 ac_config_sub=$ac_aux_dir/config.sub
3340 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3341
3342 # Find a good install program.  We prefer a C program (faster),
3343 # so one script is as good as another.  But avoid the broken or
3344 # incompatible versions:
3345 # SysV /etc/install, /usr/sbin/install
3346 # SunOS /usr/etc/install
3347 # IRIX /sbin/install
3348 # AIX /bin/install
3349 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3350 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3351 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3352 # ./install, which can be erroneously created by make from ./install.sh.
3353 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3354 echo "configure:3355: checking for a BSD compatible install" >&5
3355 if test -z "$INSTALL"; then
3356
3357   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3358   for ac_dir in $PATH; do
3359     # Account for people who put trailing slashes in PATH elements.
3360     case "$ac_dir/" in
3361     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3362     *)
3363       # OSF1 and SCO ODT 3.0 have their own names for install.
3364       # Don't use installbsd from OSF since it installs stuff as root
3365       # by default.
3366       for ac_prog in ginstall scoinst install; do
3367         if test -f $ac_dir/$ac_prog; then
3368           if test $ac_prog = install &&
3369             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3370             # AIX install.  It has an incompatible calling convention.
3371             :
3372           else
3373             ac_cv_path_install="$ac_dir/$ac_prog -c"
3374             break 2
3375           fi
3376         fi
3377       done
3378       ;;
3379     esac
3380   done
3381   IFS="$ac_save_IFS"
3382
3383   if test "${ac_cv_path_install+set}" = set; then
3384     INSTALL="$ac_cv_path_install"
3385   else
3386     # As a last resort, use the slow shell script.  We don't cache a
3387     # path for INSTALL within a source directory, because that will
3388     # break other packages using the cache if that directory is
3389     # removed, or if the path is relative.
3390     INSTALL="$ac_install_sh"
3391   fi
3392 fi
3393 echo "$ac_t""$INSTALL" 1>&6
3394
3395 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3396 # It thinks the first close brace ends the variable substitution.
3397 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3398
3399 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3400
3401 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3402
3403 for ac_prog in 'bison -y' byacc
3404 do
3405 # Extract the first word of "$ac_prog", so it can be a program name with args.
3406 set dummy $ac_prog; ac_word=$2
3407 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3408 echo "configure:3409: checking for $ac_word" >&5
3409
3410 if test -n "$YACC"; then
3411   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3412 else
3413   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3414   ac_dummy="$PATH"
3415   for ac_dir in $ac_dummy; do
3416     test -z "$ac_dir" && ac_dir=.
3417     if test -f $ac_dir/$ac_word; then
3418       ac_cv_prog_YACC="$ac_prog"
3419       break
3420     fi
3421   done
3422   IFS="$ac_save_ifs"
3423 fi
3424 YACC="$ac_cv_prog_YACC"
3425 if test -n "$YACC"; then
3426   echo "$ac_t""$YACC" 1>&6
3427 else
3428   echo "$ac_t""no" 1>&6
3429 fi
3430
3431 test -n "$YACC" && break
3432 done
3433 test -n "$YACC" || YACC="yacc"
3434
3435
3436 for ac_hdr in   a.out.h   elf.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/time.h   sys/timeb.h   sys/un.h   ulimit.h   unistd.h   utime.h 
3437 do
3438 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3439 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3440 echo "configure:3441: checking for $ac_hdr" >&5
3441
3442 cat > conftest.$ac_ext <<EOF
3443 #line 3444 "configure"
3444 #include "confdefs.h"
3445 #include <$ac_hdr>
3446 EOF
3447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3448 { (eval echo configure:3449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3450 if test -z "$ac_err"; then
3451   rm -rf conftest*
3452   eval "ac_cv_header_$ac_safe=yes"
3453 else
3454   echo "$ac_err" >&5
3455   echo "configure: failed program was:" >&5
3456   cat conftest.$ac_ext >&5
3457   rm -rf conftest*
3458   eval "ac_cv_header_$ac_safe=no"
3459 fi
3460 rm -f conftest*
3461 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3462   echo "$ac_t""yes" 1>&6
3463     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3464   { test "$extra_verbose" = "yes" && cat << EOF
3465     Defining $ac_tr_hdr
3466 EOF
3467 cat >> confdefs.h <<EOF
3468 #define $ac_tr_hdr 1
3469 EOF
3470 }
3471  
3472 else
3473   echo "$ac_t""no" 1>&6
3474 fi
3475 done
3476
3477 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3478 echo "configure:3479: checking for sys/wait.h that is POSIX.1 compatible" >&5
3479
3480 cat > conftest.$ac_ext <<EOF
3481 #line 3482 "configure"
3482 #include "confdefs.h"
3483 #include <sys/types.h>
3484 #include <sys/wait.h>
3485 #ifndef WEXITSTATUS
3486 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3487 #endif
3488 #ifndef WIFEXITED
3489 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3490 #endif
3491 int main() {
3492 int s;
3493 wait (&s);
3494 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3495 ; return 0; }
3496 EOF
3497 if { (eval echo configure:3498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3498   rm -rf conftest*
3499   ac_cv_header_sys_wait_h=yes
3500 else
3501   echo "configure: failed program was:" >&5
3502   cat conftest.$ac_ext >&5
3503   rm -rf conftest*
3504   ac_cv_header_sys_wait_h=no
3505 fi
3506 rm -f conftest*
3507
3508 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3509 if test $ac_cv_header_sys_wait_h = yes; then
3510   { test "$extra_verbose" = "yes" && cat << \EOF
3511     Defining HAVE_SYS_WAIT_H
3512 EOF
3513 cat >> confdefs.h <<\EOF
3514 #define HAVE_SYS_WAIT_H 1
3515 EOF
3516 }
3517
3518 fi
3519
3520 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3521 echo "configure:3522: checking for ANSI C header files" >&5
3522
3523 cat > conftest.$ac_ext <<EOF
3524 #line 3525 "configure"
3525 #include "confdefs.h"
3526 #include <stdlib.h>
3527 #include <stdarg.h>
3528 #include <string.h>
3529 #include <float.h>
3530 EOF
3531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3532 { (eval echo configure:3533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3534 if test -z "$ac_err"; then
3535   rm -rf conftest*
3536   ac_cv_header_stdc=yes
3537 else
3538   echo "$ac_err" >&5
3539   echo "configure: failed program was:" >&5
3540   cat conftest.$ac_ext >&5
3541   rm -rf conftest*
3542   ac_cv_header_stdc=no
3543 fi
3544 rm -f conftest*
3545
3546 if test $ac_cv_header_stdc = yes; then
3547   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3548 cat > conftest.$ac_ext <<EOF
3549 #line 3550 "configure"
3550 #include "confdefs.h"
3551 #include <string.h>
3552 EOF
3553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3554   egrep "memchr" >/dev/null 2>&1; then
3555   :
3556 else
3557   rm -rf conftest*
3558   ac_cv_header_stdc=no
3559 fi
3560 rm -f conftest*
3561
3562 fi
3563
3564 if test $ac_cv_header_stdc = yes; then
3565   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3566 cat > conftest.$ac_ext <<EOF
3567 #line 3568 "configure"
3568 #include "confdefs.h"
3569 #include <stdlib.h>
3570 EOF
3571 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3572   egrep "free" >/dev/null 2>&1; then
3573   :
3574 else
3575   rm -rf conftest*
3576   ac_cv_header_stdc=no
3577 fi
3578 rm -f conftest*
3579
3580 fi
3581
3582 if test $ac_cv_header_stdc = yes; then
3583   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3584 cat > conftest.$ac_ext <<EOF
3585 #line 3586 "configure"
3586 #include "confdefs.h"
3587 #include <ctype.h>
3588 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3589 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3590 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3591 int main () { int i; for (i = 0; i < 256; i++)
3592 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3593 exit (0); }
3594
3595 EOF
3596 if { (eval echo configure:3597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3597 then
3598   :
3599 else
3600   conftest_rc="$?"
3601   echo "configure: failed program was:" >&5
3602   cat conftest.$ac_ext >&5
3603   rm -fr conftest*
3604   ac_cv_header_stdc=no
3605 fi
3606 rm -fr conftest*
3607 fi
3608
3609 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3610 if test $ac_cv_header_stdc = yes; then
3611   { test "$extra_verbose" = "yes" && cat << \EOF
3612     Defining STDC_HEADERS
3613 EOF
3614 cat >> confdefs.h <<\EOF
3615 #define STDC_HEADERS 1
3616 EOF
3617 }
3618
3619 fi
3620
3621 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3622 echo "configure:3623: checking whether time.h and sys/time.h may both be included" >&5
3623
3624 cat > conftest.$ac_ext <<EOF
3625 #line 3626 "configure"
3626 #include "confdefs.h"
3627 #include <sys/types.h>
3628 #include <sys/time.h>
3629 #include <time.h>
3630 int main() {
3631 struct tm *tp;
3632 ; return 0; }
3633 EOF
3634 if { (eval echo configure:3635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3635   rm -rf conftest*
3636   ac_cv_header_time=yes
3637 else
3638   echo "configure: failed program was:" >&5
3639   cat conftest.$ac_ext >&5
3640   rm -rf conftest*
3641   ac_cv_header_time=no
3642 fi
3643 rm -f conftest*
3644
3645 echo "$ac_t""$ac_cv_header_time" 1>&6
3646 if test $ac_cv_header_time = yes; then
3647   { test "$extra_verbose" = "yes" && cat << \EOF
3648     Defining TIME_WITH_SYS_TIME
3649 EOF
3650 cat >> confdefs.h <<\EOF
3651 #define TIME_WITH_SYS_TIME 1
3652 EOF
3653 }
3654
3655 fi
3656
3657 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3658 echo "configure:3659: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3659
3660 cat > conftest.$ac_ext <<EOF
3661 #line 3662 "configure"
3662 #include "confdefs.h"
3663 #include <sys/types.h>
3664 #include <signal.h>
3665 /* NetBSD declares sys_siglist in unistd.h.  */
3666 #ifdef HAVE_UNISTD_H
3667 #include <unistd.h>
3668 #endif
3669 int main() {
3670 char *msg = *(sys_siglist + 1);
3671 ; return 0; }
3672 EOF
3673 if { (eval echo configure:3674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3674   rm -rf conftest*
3675   ac_cv_decl_sys_siglist=yes
3676 else
3677   echo "configure: failed program was:" >&5
3678   cat conftest.$ac_ext >&5
3679   rm -rf conftest*
3680   ac_cv_decl_sys_siglist=no
3681 fi
3682 rm -f conftest*
3683
3684 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3685 if test $ac_cv_decl_sys_siglist = yes; then
3686   { test "$extra_verbose" = "yes" && cat << \EOF
3687     Defining SYS_SIGLIST_DECLARED
3688 EOF
3689 cat >> confdefs.h <<\EOF
3690 #define SYS_SIGLIST_DECLARED 1
3691 EOF
3692 }
3693
3694 fi
3695
3696
3697 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3698 echo "configure:3699: checking for struct utimbuf" >&5
3699 cat > conftest.$ac_ext <<EOF
3700 #line 3701 "configure"
3701 #include "confdefs.h"
3702 #ifdef TIME_WITH_SYS_TIME
3703 #include <sys/time.h>
3704 #include <time.h>
3705 #else
3706 #ifdef HAVE_SYS_TIME_H
3707 #include <sys/time.h>
3708 #else
3709 #include <time.h>
3710 #endif
3711 #endif
3712 #ifdef HAVE_UTIME_H
3713 #include <utime.h>
3714 #endif
3715 int main() {
3716 static struct utimbuf x; x.actime = x.modtime;
3717 ; return 0; }
3718 EOF
3719 if { (eval echo configure:3720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3720   rm -rf conftest*
3721   echo "$ac_t""yes" 1>&6
3722    { test "$extra_verbose" = "yes" && cat << \EOF
3723     Defining HAVE_STRUCT_UTIMBUF
3724 EOF
3725 cat >> confdefs.h <<\EOF
3726 #define HAVE_STRUCT_UTIMBUF 1
3727 EOF
3728 }
3729
3730 else
3731   echo "configure: failed program was:" >&5
3732   cat conftest.$ac_ext >&5
3733   rm -rf conftest*
3734   echo "$ac_t""no" 1>&6
3735 fi
3736 rm -f conftest*
3737
3738 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3739 echo "configure:3740: checking return type of signal handlers" >&5
3740
3741 cat > conftest.$ac_ext <<EOF
3742 #line 3743 "configure"
3743 #include "confdefs.h"
3744 #include <sys/types.h>
3745 #include <signal.h>
3746 #ifdef signal
3747 #undef signal
3748 #endif
3749 #ifdef __cplusplus
3750 extern "C" void (*signal (int, void (*)(int)))(int);
3751 #else
3752 void (*signal ()) ();
3753 #endif
3754
3755 int main() {
3756 int i;
3757 ; return 0; }
3758 EOF
3759 if { (eval echo configure:3760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3760   rm -rf conftest*
3761   ac_cv_type_signal=void
3762 else
3763   echo "configure: failed program was:" >&5
3764   cat conftest.$ac_ext >&5
3765   rm -rf conftest*
3766   ac_cv_type_signal=int
3767 fi
3768 rm -f conftest*
3769
3770 echo "$ac_t""$ac_cv_type_signal" 1>&6
3771 { test "$extra_verbose" = "yes" && cat << EOF
3772     Defining RETSIGTYPE = $ac_cv_type_signal
3773 EOF
3774 cat >> confdefs.h <<EOF
3775 #define RETSIGTYPE $ac_cv_type_signal
3776 EOF
3777 }
3778
3779
3780 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3781 echo "configure:3782: checking for size_t" >&5
3782
3783 cat > conftest.$ac_ext <<EOF
3784 #line 3785 "configure"
3785 #include "confdefs.h"
3786 #include <sys/types.h>
3787 #if STDC_HEADERS
3788 #include <stdlib.h>
3789 #include <stddef.h>
3790 #endif
3791 EOF
3792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3793   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3794   rm -rf conftest*
3795   ac_cv_type_size_t=yes
3796 else
3797   rm -rf conftest*
3798   ac_cv_type_size_t=no
3799 fi
3800 rm -f conftest*
3801
3802 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3803 if test $ac_cv_type_size_t = no; then
3804   { test "$extra_verbose" = "yes" && cat << \EOF
3805     Defining size_t = unsigned
3806 EOF
3807 cat >> confdefs.h <<\EOF
3808 #define size_t unsigned
3809 EOF
3810 }
3811
3812 fi
3813
3814 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3815 echo "configure:3816: checking for pid_t" >&5
3816
3817 cat > conftest.$ac_ext <<EOF
3818 #line 3819 "configure"
3819 #include "confdefs.h"
3820 #include <sys/types.h>
3821 #if STDC_HEADERS
3822 #include <stdlib.h>
3823 #include <stddef.h>
3824 #endif
3825 EOF
3826 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3827   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3828   rm -rf conftest*
3829   ac_cv_type_pid_t=yes
3830 else
3831   rm -rf conftest*
3832   ac_cv_type_pid_t=no
3833 fi
3834 rm -f conftest*
3835
3836 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3837 if test $ac_cv_type_pid_t = no; then
3838   { test "$extra_verbose" = "yes" && cat << \EOF
3839     Defining pid_t = int
3840 EOF
3841 cat >> confdefs.h <<\EOF
3842 #define pid_t int
3843 EOF
3844 }
3845
3846 fi
3847
3848 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3849 echo "configure:3850: checking for uid_t in sys/types.h" >&5
3850
3851 cat > conftest.$ac_ext <<EOF
3852 #line 3853 "configure"
3853 #include "confdefs.h"
3854 #include <sys/types.h>
3855 EOF
3856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3857   egrep "uid_t" >/dev/null 2>&1; then
3858   rm -rf conftest*
3859   ac_cv_type_uid_t=yes
3860 else
3861   rm -rf conftest*
3862   ac_cv_type_uid_t=no
3863 fi
3864 rm -f conftest*
3865
3866
3867 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3868 if test $ac_cv_type_uid_t = no; then
3869   { test "$extra_verbose" = "yes" && cat << \EOF
3870     Defining uid_t = int
3871 EOF
3872 cat >> confdefs.h <<\EOF
3873 #define uid_t int
3874 EOF
3875 }
3876
3877   { test "$extra_verbose" = "yes" && cat << \EOF
3878     Defining gid_t = int
3879 EOF
3880 cat >> confdefs.h <<\EOF
3881 #define gid_t int
3882 EOF
3883 }
3884
3885 fi
3886
3887 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3888 echo "configure:3889: checking for mode_t" >&5
3889
3890 cat > conftest.$ac_ext <<EOF
3891 #line 3892 "configure"
3892 #include "confdefs.h"
3893 #include <sys/types.h>
3894 #if STDC_HEADERS
3895 #include <stdlib.h>
3896 #include <stddef.h>
3897 #endif
3898 EOF
3899 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3900   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3901   rm -rf conftest*
3902   ac_cv_type_mode_t=yes
3903 else
3904   rm -rf conftest*
3905   ac_cv_type_mode_t=no
3906 fi
3907 rm -f conftest*
3908
3909 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3910 if test $ac_cv_type_mode_t = no; then
3911   { test "$extra_verbose" = "yes" && cat << \EOF
3912     Defining mode_t = int
3913 EOF
3914 cat >> confdefs.h <<\EOF
3915 #define mode_t int
3916 EOF
3917 }
3918
3919 fi
3920
3921 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3922 echo "configure:3923: checking for off_t" >&5
3923
3924 cat > conftest.$ac_ext <<EOF
3925 #line 3926 "configure"
3926 #include "confdefs.h"
3927 #include <sys/types.h>
3928 #if STDC_HEADERS
3929 #include <stdlib.h>
3930 #include <stddef.h>
3931 #endif
3932 EOF
3933 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3934   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3935   rm -rf conftest*
3936   ac_cv_type_off_t=yes
3937 else
3938   rm -rf conftest*
3939   ac_cv_type_off_t=no
3940 fi
3941 rm -f conftest*
3942
3943 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3944 if test $ac_cv_type_off_t = no; then
3945   { test "$extra_verbose" = "yes" && cat << \EOF
3946     Defining off_t = long
3947 EOF
3948 cat >> confdefs.h <<\EOF
3949 #define off_t long
3950 EOF
3951 }
3952
3953 fi
3954
3955 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3956 echo "configure:3957: checking for ssize_t" >&5
3957
3958 cat > conftest.$ac_ext <<EOF
3959 #line 3960 "configure"
3960 #include "confdefs.h"
3961 #include <sys/types.h>
3962 #if STDC_HEADERS
3963 #include <stdlib.h>
3964 #include <stddef.h>
3965 #endif
3966 EOF
3967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3968   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3969   rm -rf conftest*
3970   ac_cv_type_ssize_t=yes
3971 else
3972   rm -rf conftest*
3973   ac_cv_type_ssize_t=no
3974 fi
3975 rm -f conftest*
3976
3977 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3978 if test $ac_cv_type_ssize_t = no; then
3979   { test "$extra_verbose" = "yes" && cat << \EOF
3980     Defining ssize_t = int
3981 EOF
3982 cat >> confdefs.h <<\EOF
3983 #define ssize_t int
3984 EOF
3985 }
3986
3987 fi
3988
3989
3990 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
3991 echo "configure:3992: checking for socklen_t" >&5
3992 cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995 #include <sys/socket.h>
3996 socklen_t x;
3997
3998 int main() {
3999
4000 ; return 0; }
4001 EOF
4002 if { (eval echo configure:4003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4003   rm -rf conftest*
4004   echo "$ac_t""yes" 1>&6
4005 else
4006   echo "configure: failed program was:" >&5
4007   cat conftest.$ac_ext >&5
4008   rm -rf conftest*
4009   
4010 cat > conftest.$ac_ext <<EOF
4011 #line 4012 "configure"
4012 #include "confdefs.h"
4013 #include <sys/socket.h>
4014 int accept (int, struct sockaddr *, size_t *);
4015
4016 int main() {
4017
4018 ; return 0; }
4019 EOF
4020 if { (eval echo configure:4021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4021   rm -rf conftest*
4022   
4023 echo "$ac_t""size_t" 1>&6
4024 { test "$extra_verbose" = "yes" && cat << \EOF
4025     Defining socklen_t = size_t
4026 EOF
4027 cat >> confdefs.h <<\EOF
4028 #define socklen_t size_t
4029 EOF
4030 }
4031
4032 else
4033   echo "configure: failed program was:" >&5
4034   cat conftest.$ac_ext >&5
4035   rm -rf conftest*
4036   
4037 echo "$ac_t""int" 1>&6
4038 { test "$extra_verbose" = "yes" && cat << \EOF
4039     Defining socklen_t = int
4040 EOF
4041 cat >> confdefs.h <<\EOF
4042 #define socklen_t int
4043 EOF
4044 }
4045
4046 fi
4047 rm -f conftest*
4048 fi
4049 rm -f conftest*
4050
4051 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4052 echo "configure:4053: checking for struct timeval" >&5
4053 cat > conftest.$ac_ext <<EOF
4054 #line 4055 "configure"
4055 #include "confdefs.h"
4056 #ifdef TIME_WITH_SYS_TIME
4057 #include <sys/time.h>
4058 #include <time.h>
4059 #else
4060 #ifdef HAVE_SYS_TIME_H
4061 #include <sys/time.h>
4062 #else
4063 #include <time.h>
4064 #endif
4065 #endif
4066 int main() {
4067 static struct timeval x; x.tv_sec = x.tv_usec;
4068 ; return 0; }
4069 EOF
4070 if { (eval echo configure:4071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4071   rm -rf conftest*
4072   echo "$ac_t""yes" 1>&6
4073   HAVE_TIMEVAL=yes
4074   { test "$extra_verbose" = "yes" && cat << \EOF
4075     Defining HAVE_TIMEVAL
4076 EOF
4077 cat >> confdefs.h <<\EOF
4078 #define HAVE_TIMEVAL 1
4079 EOF
4080 }
4081
4082 else
4083   echo "configure: failed program was:" >&5
4084   cat conftest.$ac_ext >&5
4085   rm -rf conftest*
4086   echo "$ac_t""no" 1>&6
4087    HAVE_TIMEVAL=no
4088 fi
4089 rm -f conftest*
4090
4091 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4092 echo "configure:4093: checking whether struct tm is in sys/time.h or time.h" >&5
4093
4094 cat > conftest.$ac_ext <<EOF
4095 #line 4096 "configure"
4096 #include "confdefs.h"
4097 #include <sys/types.h>
4098 #include <time.h>
4099 int main() {
4100 struct tm *tp; tp->tm_sec;
4101 ; return 0; }
4102 EOF
4103 if { (eval echo configure:4104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4104   rm -rf conftest*
4105   ac_cv_struct_tm=time.h
4106 else
4107   echo "configure: failed program was:" >&5
4108   cat conftest.$ac_ext >&5
4109   rm -rf conftest*
4110   ac_cv_struct_tm=sys/time.h
4111 fi
4112 rm -f conftest*
4113
4114 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4115 if test $ac_cv_struct_tm = sys/time.h; then
4116   { test "$extra_verbose" = "yes" && cat << \EOF
4117     Defining TM_IN_SYS_TIME
4118 EOF
4119 cat >> confdefs.h <<\EOF
4120 #define TM_IN_SYS_TIME 1
4121 EOF
4122 }
4123
4124 fi
4125
4126 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4127 echo "configure:4128: checking for tm_zone in struct tm" >&5
4128
4129 cat > conftest.$ac_ext <<EOF
4130 #line 4131 "configure"
4131 #include "confdefs.h"
4132 #include <sys/types.h>
4133 #include <$ac_cv_struct_tm>
4134 int main() {
4135 struct tm tm; tm.tm_zone;
4136 ; return 0; }
4137 EOF
4138 if { (eval echo configure:4139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4139   rm -rf conftest*
4140   ac_cv_struct_tm_zone=yes
4141 else
4142   echo "configure: failed program was:" >&5
4143   cat conftest.$ac_ext >&5
4144   rm -rf conftest*
4145   ac_cv_struct_tm_zone=no
4146 fi
4147 rm -f conftest*
4148
4149 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4150 if test "$ac_cv_struct_tm_zone" = yes; then
4151   { test "$extra_verbose" = "yes" && cat << \EOF
4152     Defining HAVE_TM_ZONE
4153 EOF
4154 cat >> confdefs.h <<\EOF
4155 #define HAVE_TM_ZONE 1
4156 EOF
4157 }
4158
4159 else
4160   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4161 echo "configure:4162: checking for tzname" >&5
4162
4163 cat > conftest.$ac_ext <<EOF
4164 #line 4165 "configure"
4165 #include "confdefs.h"
4166 #include <time.h>
4167 #ifndef tzname /* For SGI.  */
4168 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4169 #endif
4170 int main() {
4171 atoi(*tzname);
4172 ; return 0; }
4173 EOF
4174 if { (eval echo configure:4175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4175   rm -rf conftest*
4176   ac_cv_var_tzname=yes
4177 else
4178   echo "configure: failed program was:" >&5
4179   cat conftest.$ac_ext >&5
4180   rm -rf conftest*
4181   ac_cv_var_tzname=no
4182 fi
4183 rm -f conftest*
4184
4185 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4186   if test $ac_cv_var_tzname = yes; then
4187     { test "$extra_verbose" = "yes" && cat << \EOF
4188     Defining HAVE_TZNAME
4189 EOF
4190 cat >> confdefs.h <<\EOF
4191 #define HAVE_TZNAME 1
4192 EOF
4193 }
4194
4195   fi
4196 fi
4197
4198
4199 echo $ac_n "checking for working const""... $ac_c" 1>&6
4200 echo "configure:4201: checking for working const" >&5
4201
4202 cat > conftest.$ac_ext <<EOF
4203 #line 4204 "configure"
4204 #include "confdefs.h"
4205
4206 int main() {
4207
4208 /* Ultrix mips cc rejects this.  */
4209 typedef int charset[2]; const charset x;
4210 /* SunOS 4.1.1 cc rejects this.  */
4211 char const *const *ccp;
4212 char **p;
4213 /* NEC SVR4.0.2 mips cc rejects this.  */
4214 struct point {int x, y;};
4215 static struct point const zero = {0,0};
4216 /* AIX XL C 1.02.0.0 rejects this.
4217    It does not let you subtract one const X* pointer from another in an arm
4218    of an if-expression whose if-part is not a constant expression */
4219 const char *g = "string";
4220 ccp = &g + (g ? g-g : 0);
4221 /* HPUX 7.0 cc rejects these. */
4222 ++ccp;
4223 p = (char**) ccp;
4224 ccp = (char const *const *) p;
4225 { /* SCO 3.2v4 cc rejects this.  */
4226   char *t;
4227   char const *s = 0 ? (char *) 0 : (char const *) 0;
4228
4229   *t++ = 0;
4230 }
4231 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4232   int x[] = {25, 17};
4233   const int *foo = &x[0];
4234   ++foo;
4235 }
4236 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4237   typedef const int *iptr;
4238   iptr p = 0;
4239   ++p;
4240 }
4241 { /* AIX XL C 1.02.0.0 rejects this saying
4242      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4243   struct s { int j; const int *ap[3]; };
4244   struct s *b; b->j = 5;
4245 }
4246 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4247   const int foo = 10;
4248 }
4249
4250 ; return 0; }
4251 EOF
4252 if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4253   rm -rf conftest*
4254   ac_cv_c_const=yes
4255 else
4256   echo "configure: failed program was:" >&5
4257   cat conftest.$ac_ext >&5
4258   rm -rf conftest*
4259   ac_cv_c_const=no
4260 fi
4261 rm -f conftest*
4262
4263 echo "$ac_t""$ac_cv_c_const" 1>&6
4264 if test $ac_cv_c_const = no; then
4265   { test "$extra_verbose" = "yes" && cat << \EOF
4266     Defining const = 
4267 EOF
4268 cat >> confdefs.h <<\EOF
4269 #define const 
4270 EOF
4271 }
4272
4273 fi
4274
4275
4276 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4277 echo "configure:4278: checking whether ${MAKE-make} sets \${MAKE}" >&5
4278 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4279
4280 cat > conftestmake <<\EOF
4281 all:
4282         @echo 'ac_maketemp="${MAKE}"'
4283 EOF
4284 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4285 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4286 if test -n "$ac_maketemp"; then
4287   eval ac_cv_prog_make_${ac_make}_set=yes
4288 else
4289   eval ac_cv_prog_make_${ac_make}_set=no
4290 fi
4291 rm -f conftestmake
4292 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4293   echo "$ac_t""yes" 1>&6
4294   SET_MAKE=
4295 else
4296   echo "$ac_t""no" 1>&6
4297   SET_MAKE="MAKE=${MAKE-make}"
4298 fi
4299
4300
4301 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4302 echo "configure:4303: checking whether byte ordering is bigendian" >&5
4303
4304 ac_cv_c_bigendian=unknown
4305 # See if sys/param.h defines the BYTE_ORDER macro.
4306 cat > conftest.$ac_ext <<EOF
4307 #line 4308 "configure"
4308 #include "confdefs.h"
4309 #include <sys/types.h>
4310 #include <sys/param.h>
4311 int main() {
4312
4313 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4314  bogus endian macros
4315 #endif
4316 ; return 0; }
4317 EOF
4318 if { (eval echo configure:4319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4319   rm -rf conftest*
4320   # It does; now see whether it defined to BIG_ENDIAN or not.
4321 cat > conftest.$ac_ext <<EOF
4322 #line 4323 "configure"
4323 #include "confdefs.h"
4324 #include <sys/types.h>
4325 #include <sys/param.h>
4326 int main() {
4327
4328 #if BYTE_ORDER != BIG_ENDIAN
4329  not big endian
4330 #endif
4331 ; return 0; }
4332 EOF
4333 if { (eval echo configure:4334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4334   rm -rf conftest*
4335   ac_cv_c_bigendian=yes
4336 else
4337   echo "configure: failed program was:" >&5
4338   cat conftest.$ac_ext >&5
4339   rm -rf conftest*
4340   ac_cv_c_bigendian=no
4341 fi
4342 rm -f conftest*
4343 else
4344   echo "configure: failed program was:" >&5
4345   cat conftest.$ac_ext >&5
4346 fi
4347 rm -f conftest*
4348 if test $ac_cv_c_bigendian = unknown; then
4349 cat > conftest.$ac_ext <<EOF
4350 #line 4351 "configure"
4351 #include "confdefs.h"
4352 main () {
4353   /* Are we little or big endian?  From Harbison&Steele.  */
4354   union
4355   {
4356     long l;
4357     char c[sizeof (long)];
4358   } u;
4359   u.l = 1;
4360   exit (u.c[sizeof (long) - 1] == 1);
4361 }
4362 EOF
4363 if { (eval echo configure:4364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4364 then
4365   ac_cv_c_bigendian=no
4366 else
4367   conftest_rc="$?"
4368   echo "configure: failed program was:" >&5
4369   cat conftest.$ac_ext >&5
4370   rm -fr conftest*
4371   ac_cv_c_bigendian=yes
4372 fi
4373 rm -fr conftest*
4374 fi
4375
4376 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4377 if test $ac_cv_c_bigendian = yes; then
4378   { test "$extra_verbose" = "yes" && cat << \EOF
4379     Defining WORDS_BIGENDIAN
4380 EOF
4381 cat >> confdefs.h <<\EOF
4382 #define WORDS_BIGENDIAN 1
4383 EOF
4384 }
4385
4386 fi
4387
4388
4389 echo $ac_n "checking size of short""... $ac_c" 1>&6
4390 echo "configure:4391: checking size of short" >&5
4391
4392 cat > conftest.$ac_ext <<EOF
4393 #line 4394 "configure"
4394 #include "confdefs.h"
4395 #include <stdio.h>
4396 #include <sys/types.h>
4397 main()
4398 {
4399   FILE *f=fopen("conftestval", "w");
4400   if (!f) exit(1);
4401   fprintf(f, "%d\n", sizeof(short));
4402   exit(0);
4403 }
4404 EOF
4405 if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4406 then
4407   ac_cv_sizeof_short=`cat conftestval`
4408 else
4409   conftest_rc="$?"
4410   echo "configure: failed program was:" >&5
4411   cat conftest.$ac_ext >&5
4412   rm -fr conftest*
4413   ac_cv_sizeof_short=0
4414 fi
4415 rm -fr conftest*
4416 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4417 { test "$extra_verbose" = "yes" && cat << EOF
4418     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4419 EOF
4420 cat >> confdefs.h <<EOF
4421 #define SIZEOF_SHORT $ac_cv_sizeof_short
4422 EOF
4423 }
4424
4425
4426 if test "$ac_cv_sizeof_short" = 0; then
4427   echo ""
4428   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4429   echo "*** PANIC *** Please examine config.log for compilation errors."
4430   exit 1
4431 fi
4432 echo $ac_n "checking size of int""... $ac_c" 1>&6
4433 echo "configure:4434: checking size of int" >&5
4434
4435 cat > conftest.$ac_ext <<EOF
4436 #line 4437 "configure"
4437 #include "confdefs.h"
4438 #include <stdio.h>
4439 #include <sys/types.h>
4440 main()
4441 {
4442   FILE *f=fopen("conftestval", "w");
4443   if (!f) exit(1);
4444   fprintf(f, "%d\n", sizeof(int));
4445   exit(0);
4446 }
4447 EOF
4448 if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4449 then
4450   ac_cv_sizeof_int=`cat conftestval`
4451 else
4452   conftest_rc="$?"
4453   echo "configure: failed program was:" >&5
4454   cat conftest.$ac_ext >&5
4455   rm -fr conftest*
4456   ac_cv_sizeof_int=0
4457 fi
4458 rm -fr conftest*
4459 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4460 { test "$extra_verbose" = "yes" && cat << EOF
4461     Defining SIZEOF_INT = $ac_cv_sizeof_int
4462 EOF
4463 cat >> confdefs.h <<EOF
4464 #define SIZEOF_INT $ac_cv_sizeof_int
4465 EOF
4466 }
4467
4468
4469 echo $ac_n "checking size of long""... $ac_c" 1>&6
4470 echo "configure:4471: checking size of long" >&5
4471
4472 cat > conftest.$ac_ext <<EOF
4473 #line 4474 "configure"
4474 #include "confdefs.h"
4475 #include <stdio.h>
4476 #include <sys/types.h>
4477 main()
4478 {
4479   FILE *f=fopen("conftestval", "w");
4480   if (!f) exit(1);
4481   fprintf(f, "%d\n", sizeof(long));
4482   exit(0);
4483 }
4484 EOF
4485 if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4486 then
4487   ac_cv_sizeof_long=`cat conftestval`
4488 else
4489   conftest_rc="$?"
4490   echo "configure: failed program was:" >&5
4491   cat conftest.$ac_ext >&5
4492   rm -fr conftest*
4493   ac_cv_sizeof_long=0
4494 fi
4495 rm -fr conftest*
4496 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4497 { test "$extra_verbose" = "yes" && cat << EOF
4498     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4499 EOF
4500 cat >> confdefs.h <<EOF
4501 #define SIZEOF_LONG $ac_cv_sizeof_long
4502 EOF
4503 }
4504
4505
4506 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4507 echo "configure:4508: checking size of long long" >&5
4508
4509 cat > conftest.$ac_ext <<EOF
4510 #line 4511 "configure"
4511 #include "confdefs.h"
4512 #include <stdio.h>
4513 #include <sys/types.h>
4514 main()
4515 {
4516   FILE *f=fopen("conftestval", "w");
4517   if (!f) exit(1);
4518   fprintf(f, "%d\n", sizeof(long long));
4519   exit(0);
4520 }
4521 EOF
4522 if { (eval echo configure:4523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4523 then
4524   ac_cv_sizeof_long_long=`cat conftestval`
4525 else
4526   conftest_rc="$?"
4527   echo "configure: failed program was:" >&5
4528   cat conftest.$ac_ext >&5
4529   rm -fr conftest*
4530   ac_cv_sizeof_long_long=0
4531 fi
4532 rm -fr conftest*
4533 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4534 { test "$extra_verbose" = "yes" && cat << EOF
4535     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4536 EOF
4537 cat >> confdefs.h <<EOF
4538 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4539 EOF
4540 }
4541
4542
4543 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4544 echo "configure:4545: checking size of void *" >&5
4545
4546 cat > conftest.$ac_ext <<EOF
4547 #line 4548 "configure"
4548 #include "confdefs.h"
4549 #include <stdio.h>
4550 #include <sys/types.h>
4551 main()
4552 {
4553   FILE *f=fopen("conftestval", "w");
4554   if (!f) exit(1);
4555   fprintf(f, "%d\n", sizeof(void *));
4556   exit(0);
4557 }
4558 EOF
4559 if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4560 then
4561   ac_cv_sizeof_void_p=`cat conftestval`
4562 else
4563   conftest_rc="$?"
4564   echo "configure: failed program was:" >&5
4565   cat conftest.$ac_ext >&5
4566   rm -fr conftest*
4567   ac_cv_sizeof_void_p=0
4568 fi
4569 rm -fr conftest*
4570 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4571 { test "$extra_verbose" = "yes" && cat << EOF
4572     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4573 EOF
4574 cat >> confdefs.h <<EOF
4575 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4576 EOF
4577 }
4578
4579
4580
4581 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4582 echo "configure:4583: checking for long file names" >&5
4583
4584 ac_cv_sys_long_file_names=yes
4585 # Test for long file names in all the places we know might matter:
4586 #      .                the current directory, where building will happen
4587 #      $prefix/lib      where we will be installing things
4588 #      $exec_prefix/lib likewise
4589 # eval it to expand exec_prefix.
4590 #      $TMPDIR          if set, where it might want to write temporary files
4591 # if $TMPDIR is not set:
4592 #      /tmp             where it might want to write temporary files
4593 #      /var/tmp         likewise
4594 #      /usr/tmp         likewise
4595 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4596   ac_tmpdirs="$TMPDIR"
4597 else
4598   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4599 fi
4600 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4601   test -d $ac_dir || continue
4602   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4603   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4604   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4605   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4606   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4607     ac_cv_sys_long_file_names=no
4608     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4609     break
4610   fi
4611   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4612 done
4613
4614 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4615 if test $ac_cv_sys_long_file_names = yes; then
4616   { test "$extra_verbose" = "yes" && cat << \EOF
4617     Defining HAVE_LONG_FILE_NAMES
4618 EOF
4619 cat >> confdefs.h <<\EOF
4620 #define HAVE_LONG_FILE_NAMES 1
4621 EOF
4622 }
4623
4624 fi
4625
4626
4627 echo $ac_n "checking for sin""... $ac_c" 1>&6
4628 echo "configure:4629: checking for sin" >&5
4629
4630 cat > conftest.$ac_ext <<EOF
4631 #line 4632 "configure"
4632 #include "confdefs.h"
4633 /* System header to define __stub macros and hopefully few prototypes,
4634     which can conflict with char sin(); below.  */
4635 #include <assert.h>
4636 /* Override any gcc2 internal prototype to avoid an error.  */
4637 /* We use char because int might match the return type of a gcc2
4638     builtin and then its argument prototype would still apply.  */
4639 char sin();
4640
4641 int main() {
4642
4643 /* The GNU C library defines this for functions which it implements
4644     to always fail with ENOSYS.  Some functions are actually named
4645     something starting with __ and the normal name is an alias.  */
4646 #if defined (__stub_sin) || defined (__stub___sin)
4647 choke me
4648 #else
4649 sin();
4650 #endif
4651
4652 ; return 0; }
4653 EOF
4654 if { (eval echo configure:4655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4655   rm -rf conftest*
4656   eval "ac_cv_func_sin=yes"
4657 else
4658   echo "configure: failed program was:" >&5
4659   cat conftest.$ac_ext >&5
4660   rm -rf conftest*
4661   eval "ac_cv_func_sin=no"
4662 fi
4663 rm -f conftest*
4664
4665 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4666   echo "$ac_t""yes" 1>&6
4667   :
4668 else
4669   echo "$ac_t""no" 1>&6
4670
4671 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4672 echo "configure:4673: checking for sin in -lm" >&5
4673 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4674
4675 xe_check_libs=" -lm "
4676 cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 /* Override any gcc2 internal prototype to avoid an error.  */
4680 /* We use char because int might match the return type of a gcc2
4681     builtin and then its argument prototype would still apply.  */
4682 char sin();
4683
4684 int main() {
4685 sin()
4686 ; return 0; }
4687 EOF
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4689   rm -rf conftest*
4690   eval "ac_cv_lib_$ac_lib_var=yes"
4691 else
4692   echo "configure: failed program was:" >&5
4693   cat conftest.$ac_ext >&5
4694   rm -rf conftest*
4695   eval "ac_cv_lib_$ac_lib_var=no"
4696 fi
4697 rm -f conftest*
4698 xe_check_libs=""
4699
4700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4701   echo "$ac_t""yes" 1>&6
4702     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4703     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4704   { test "$extra_verbose" = "yes" && cat << EOF
4705     Defining $ac_tr_lib
4706 EOF
4707 cat >> confdefs.h <<EOF
4708 #define $ac_tr_lib 1
4709 EOF
4710 }
4711
4712   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4713
4714 else
4715   echo "$ac_t""no" 1>&6
4716 fi
4717
4718
4719 fi
4720
4721
4722 { test "$extra_verbose" = "yes" && cat << \EOF
4723     Defining LISP_FLOAT_TYPE
4724 EOF
4725 cat >> confdefs.h <<\EOF
4726 #define LISP_FLOAT_TYPE 1
4727 EOF
4728 }
4729
4730
4731 cat > conftest.$ac_ext <<EOF
4732 #line 4733 "configure"
4733 #include "confdefs.h"
4734 #include <math.h>
4735 int main() {
4736 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4737 ; return 0; }
4738 EOF
4739 if { (eval echo configure:4740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4740   rm -rf conftest*
4741   { test "$extra_verbose" = "yes" && cat << \EOF
4742     Defining HAVE_INVERSE_HYPERBOLIC
4743 EOF
4744 cat >> confdefs.h <<\EOF
4745 #define HAVE_INVERSE_HYPERBOLIC 1
4746 EOF
4747 }
4748
4749 else
4750   echo "configure: failed program was:" >&5
4751   cat conftest.$ac_ext >&5
4752 fi
4753 rm -f conftest*
4754
4755 echo "checking type of mail spool file locking" 1>&6
4756 echo "configure:4757: checking type of mail spool file locking" >&5
4757 for ac_func in lockf flock
4758 do
4759 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4760 echo "configure:4761: checking for $ac_func" >&5
4761
4762 cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765 /* System header to define __stub macros and hopefully few prototypes,
4766     which can conflict with char $ac_func(); below.  */
4767 #include <assert.h>
4768 /* Override any gcc2 internal prototype to avoid an error.  */
4769 /* We use char because int might match the return type of a gcc2
4770     builtin and then its argument prototype would still apply.  */
4771 char $ac_func();
4772
4773 int main() {
4774
4775 /* The GNU C library defines this for functions which it implements
4776     to always fail with ENOSYS.  Some functions are actually named
4777     something starting with __ and the normal name is an alias.  */
4778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4779 choke me
4780 #else
4781 $ac_func();
4782 #endif
4783
4784 ; return 0; }
4785 EOF
4786 if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4787   rm -rf conftest*
4788   eval "ac_cv_func_$ac_func=yes"
4789 else
4790   echo "configure: failed program was:" >&5
4791   cat conftest.$ac_ext >&5
4792   rm -rf conftest*
4793   eval "ac_cv_func_$ac_func=no"
4794 fi
4795 rm -f conftest*
4796
4797 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4798   echo "$ac_t""yes" 1>&6
4799     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4800   { test "$extra_verbose" = "yes" && cat << EOF
4801     Defining $ac_tr_func
4802 EOF
4803 cat >> confdefs.h <<EOF
4804 #define $ac_tr_func 1
4805 EOF
4806 }
4807  
4808 else
4809   echo "$ac_t""no" 1>&6
4810 fi
4811 done
4812
4813 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4814 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4815 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4816 if   test -z "$mail_locking"; then
4817   case "$opsys" in cygwin* | mingw*)
4818     mail_locking=pop ;;
4819   esac
4820 fi
4821
4822 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4823     Defining MAIL_LOCK_LOCKF
4824 EOF
4825 cat >> confdefs.h <<\EOF
4826 #define MAIL_LOCK_LOCKF 1
4827 EOF
4828 }
4829
4830 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4831     Defining MAIL_LOCK_FLOCK
4832 EOF
4833 cat >> confdefs.h <<\EOF
4834 #define MAIL_LOCK_FLOCK 1
4835 EOF
4836 }
4837
4838 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4839     Defining MAIL_LOCK_LOCKING
4840 EOF
4841 cat >> confdefs.h <<\EOF
4842 #define MAIL_LOCK_LOCKING 1
4843 EOF
4844 }
4845
4846 elif test "$mail_locking" = "pop"; then
4847   with_pop=yes
4848   mail_locking=
4849 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4850     Defining MAIL_LOCK_DOT
4851 EOF
4852 cat >> confdefs.h <<\EOF
4853 #define MAIL_LOCK_DOT 1
4854 EOF
4855 }
4856
4857 fi
4858 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4859   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4860 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4861   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4862 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4863   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4864
4865 case "$opsys" in decosf*)
4866   
4867 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4868 echo "configure:4869: checking for cma_open in -lpthreads" >&5
4869 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4870
4871 xe_check_libs=" -lpthreads "
4872 cat > conftest.$ac_ext <<EOF
4873 #line 4874 "configure"
4874 #include "confdefs.h"
4875 /* Override any gcc2 internal prototype to avoid an error.  */
4876 /* We use char because int might match the return type of a gcc2
4877     builtin and then its argument prototype would still apply.  */
4878 char cma_open();
4879
4880 int main() {
4881 cma_open()
4882 ; return 0; }
4883 EOF
4884 if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4885   rm -rf conftest*
4886   eval "ac_cv_lib_$ac_lib_var=yes"
4887 else
4888   echo "configure: failed program was:" >&5
4889   cat conftest.$ac_ext >&5
4890   rm -rf conftest*
4891   eval "ac_cv_lib_$ac_lib_var=no"
4892 fi
4893 rm -f conftest*
4894 xe_check_libs=""
4895
4896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4897   echo "$ac_t""yes" 1>&6
4898     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4899     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4900   { test "$extra_verbose" = "yes" && cat << EOF
4901     Defining $ac_tr_lib
4902 EOF
4903 cat >> confdefs.h <<EOF
4904 #define $ac_tr_lib 1
4905 EOF
4906 }
4907
4908   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4909
4910 else
4911   echo "$ac_t""no" 1>&6
4912 fi
4913
4914
4915   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4916     c_switch_site="$c_switch_site -threads" ;;
4917 esac
4918
4919 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4920 echo "configure:4921: checking whether the -xildoff compiler flag is required" >&5
4921 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4922   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4923     then echo "$ac_t""no" 1>&6;
4924     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
4925   fi
4926   else echo "$ac_t""no" 1>&6
4927 fi
4928
4929 if test "$opsys" = "sol2"; then
4930   if test "$os_release" -ge 56; then
4931     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4932 echo "configure:4933: checking for \"-z ignore\" linker flag" >&5
4933     case "`ld -h 2>&1`" in
4934       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4935         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4936       *) echo "$ac_t""no" 1>&6 ;;
4937     esac
4938   fi
4939 fi
4940
4941
4942 echo "checking "for specified window system"" 1>&6
4943 echo "configure:4944: checking "for specified window system"" >&5
4944
4945 if test "$with_x11" != "no"; then
4946     test "$x_includes $x_libraries" != "NONE NONE" && \
4947    window_system=x11 with_x11=yes
4948
4949         
4950       if test "$x_includes $x_libraries" = "NONE NONE" \
4951     -a -n "$OPENWINHOME" \
4952     -a "$OPENWINHOME" != "/usr/openwin" \
4953     -a -d "$OPENWINHOME"; then
4954       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4955       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4956       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4957   fi
4958
4959   if test "$x_includes" = "NONE"; then
4960                     for dir in "/usr/X11" "/usr/X11R6"; do
4961       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4962     done
4963   fi
4964
4965   if test "$x_libraries" = "NONE"; then
4966     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4967       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4968     done
4969   fi
4970
4971   # If we find X, set shell vars x_includes and x_libraries to the
4972 # paths, otherwise set no_x=yes.
4973 # Uses ac_ vars as temps to allow command line to override cache and checks.
4974 # --without-x overrides everything else, but does not touch the cache.
4975 echo $ac_n "checking for X""... $ac_c" 1>&6
4976 echo "configure:4977: checking for X" >&5
4977
4978 # Check whether --with-x or --without-x was given.
4979 if test "${with_x+set}" = set; then
4980   withval="$with_x"
4981   :
4982 fi
4983
4984 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4985 if test "x$with_x" = xno; then
4986   # The user explicitly disabled X.
4987   have_x=disabled
4988 else
4989   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4990     # Both variables are already set.
4991     have_x=yes
4992   else
4993
4994 # One or both of the vars are not set, and there is no cached value.
4995 ac_x_includes=NO ac_x_libraries=NO
4996 rm -fr conftestdir
4997 if mkdir conftestdir; then
4998   cd conftestdir
4999   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5000   cat > Imakefile <<'EOF'
5001 acfindx:
5002         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5003 EOF
5004   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5005     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5006     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5007     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5008     for ac_extension in a so sl; do
5009       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5010         test -f $ac_im_libdir/libX11.$ac_extension; then
5011         ac_im_usrlibdir=$ac_im_libdir; break
5012       fi
5013     done
5014     # Screen out bogus values from the imake configuration.  They are
5015     # bogus both because they are the default anyway, and because
5016     # using them would break gcc on systems where it needs fixed includes.
5017     case "$ac_im_incroot" in
5018         /usr/include) ;;
5019         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5020     esac
5021     case "$ac_im_usrlibdir" in
5022         /usr/lib | /lib) ;;
5023         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5024     esac
5025   fi
5026   cd ..
5027   rm -fr conftestdir
5028 fi
5029
5030 if test "$ac_x_includes" = NO; then
5031   # Guess where to find include files, by looking for this one X11 .h file.
5032   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5033
5034   # First, try using that file with no special directory specified.
5035 cat > conftest.$ac_ext <<EOF
5036 #line 5037 "configure"
5037 #include "confdefs.h"
5038 #include <$x_direct_test_include>
5039 EOF
5040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5041 { (eval echo configure:5042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5043 if test -z "$ac_err"; then
5044   rm -rf conftest*
5045   # We can compile using X headers with no special include directory.
5046 ac_x_includes=
5047 else
5048   echo "$ac_err" >&5
5049   echo "configure: failed program was:" >&5
5050   cat conftest.$ac_ext >&5
5051   rm -rf conftest*
5052   # Look for the header file in a standard set of common directories.
5053 # Check X11 before X11Rn because it is often a symlink to the current release.
5054   for ac_dir in               \
5055     /usr/X11/include          \
5056     /usr/X11R6/include        \
5057     /usr/X11R5/include        \
5058     /usr/X11R4/include        \
5059                               \
5060     /usr/include/X11          \
5061     /usr/include/X11R6        \
5062     /usr/include/X11R5        \
5063     /usr/include/X11R4        \
5064                               \
5065     /usr/local/X11/include    \
5066     /usr/local/X11R6/include  \
5067     /usr/local/X11R5/include  \
5068     /usr/local/X11R4/include  \
5069                               \
5070     /usr/local/include/X11    \
5071     /usr/local/include/X11R6  \
5072     /usr/local/include/X11R5  \
5073     /usr/local/include/X11R4  \
5074                               \
5075     /usr/X386/include         \
5076     /usr/x386/include         \
5077     /usr/XFree86/include/X11  \
5078                               \
5079     /usr/include              \
5080     /usr/local/include        \
5081     /usr/unsupported/include  \
5082     /usr/athena/include       \
5083     /usr/local/x11r5/include  \
5084     /usr/lpp/Xamples/include  \
5085                               \
5086     /usr/openwin/include      \
5087     /usr/openwin/share/include \
5088     ; \
5089   do
5090     if test -r "$ac_dir/$x_direct_test_include"; then
5091       ac_x_includes=$ac_dir
5092       break
5093     fi
5094   done
5095 fi
5096 rm -f conftest*
5097 fi # $ac_x_includes = NO
5098
5099 if test "$ac_x_libraries" = NO; then
5100   # Check for the libraries.
5101
5102   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5103   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5104
5105   # See if we find them without any special options.
5106   # Don't add to $LIBS permanently.
5107   ac_save_LIBS="$LIBS"
5108   LIBS="-l$x_direct_test_library $LIBS"
5109 cat > conftest.$ac_ext <<EOF
5110 #line 5111 "configure"
5111 #include "confdefs.h"
5112
5113 int main() {
5114 ${x_direct_test_function}()
5115 ; return 0; }
5116 EOF
5117 if { (eval echo configure:5118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5118   rm -rf conftest*
5119   LIBS="$ac_save_LIBS"
5120 # We can link X programs with no special library path.
5121 ac_x_libraries=
5122 else
5123   echo "configure: failed program was:" >&5
5124   cat conftest.$ac_ext >&5
5125   rm -rf conftest*
5126   LIBS="$ac_save_LIBS"
5127 # First see if replacing the include by lib works.
5128 # Check X11 before X11Rn because it is often a symlink to the current release.
5129 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5130     /usr/X11/lib          \
5131     /usr/X11R6/lib        \
5132     /usr/X11R5/lib        \
5133     /usr/X11R4/lib        \
5134                           \
5135     /usr/lib/X11          \
5136     /usr/lib/X11R6        \
5137     /usr/lib/X11R5        \
5138     /usr/lib/X11R4        \
5139                           \
5140     /usr/local/X11/lib    \
5141     /usr/local/X11R6/lib  \
5142     /usr/local/X11R5/lib  \
5143     /usr/local/X11R4/lib  \
5144                           \
5145     /usr/local/lib/X11    \
5146     /usr/local/lib/X11R6  \
5147     /usr/local/lib/X11R5  \
5148     /usr/local/lib/X11R4  \
5149                           \
5150     /usr/X386/lib         \
5151     /usr/x386/lib         \
5152     /usr/XFree86/lib/X11  \
5153                           \
5154     /usr/lib              \
5155     /usr/local/lib        \
5156     /usr/unsupported/lib  \
5157     /usr/athena/lib       \
5158     /usr/local/x11r5/lib  \
5159     /usr/lpp/Xamples/lib  \
5160     /lib/usr/lib/X11      \
5161                           \
5162     /usr/openwin/lib      \
5163     /usr/openwin/share/lib \
5164     ; \
5165 do
5166   for ac_extension in a so sl; do
5167     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5168       ac_x_libraries=$ac_dir
5169       break 2
5170     fi
5171   done
5172 done
5173 fi
5174 rm -f conftest*
5175 fi # $ac_x_libraries = NO
5176
5177 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5178   # Didn't find X anywhere.  Cache the known absence of X.
5179   ac_cv_have_x="have_x=no"
5180 else
5181   # Record where we found X for the cache.
5182   ac_cv_have_x="have_x=yes \
5183                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5184 fi
5185   fi
5186   eval "$ac_cv_have_x"
5187 fi # $with_x != no
5188
5189 if test "$have_x" != yes; then
5190   echo "$ac_t""$have_x" 1>&6
5191   no_x=yes
5192 else
5193   # If each of the values was on the command line, it overrides each guess.
5194   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5195   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5196   # Update the cache value to reflect the command line values.
5197   ac_cv_have_x="have_x=yes \
5198                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5199   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5200 fi
5201
5202 if test "$no_x" = yes; then
5203   # Not all programs may use this symbol, but it does not hurt to define it.
5204   { test "$extra_verbose" = "yes" && cat << \EOF
5205     Defining X_DISPLAY_MISSING
5206 EOF
5207 cat >> confdefs.h <<\EOF
5208 #define X_DISPLAY_MISSING 1
5209 EOF
5210 }
5211
5212   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5213 else
5214   if test -n "$x_includes"; then
5215     X_CFLAGS="$X_CFLAGS -I$x_includes"
5216   fi
5217
5218   # It would also be nice to do this for all -L options, not just this one.
5219   if test -n "$x_libraries"; then
5220     X_LIBS="$X_LIBS -L$x_libraries"
5221     # For Solaris; some versions of Sun CC require a space after -R and
5222     # others require no space.  Words are not sufficient . . . .
5223     case "`(uname -sr) 2>/dev/null`" in
5224     "SunOS 5"*)
5225       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5226 echo "configure:5227: checking whether -R must be followed by a space" >&5
5227       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5228       cat > conftest.$ac_ext <<EOF
5229 #line 5230 "configure"
5230 #include "confdefs.h"
5231
5232 int main() {
5233
5234 ; return 0; }
5235 EOF
5236 if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5237   rm -rf conftest*
5238   ac_R_nospace=yes
5239 else
5240   echo "configure: failed program was:" >&5
5241   cat conftest.$ac_ext >&5
5242   rm -rf conftest*
5243   ac_R_nospace=no
5244 fi
5245 rm -f conftest*
5246       if test $ac_R_nospace = yes; then
5247         echo "$ac_t""no" 1>&6
5248         X_LIBS="$X_LIBS -R$x_libraries"
5249       else
5250         LIBS="$ac_xsave_LIBS -R $x_libraries"
5251         cat > conftest.$ac_ext <<EOF
5252 #line 5253 "configure"
5253 #include "confdefs.h"
5254
5255 int main() {
5256
5257 ; return 0; }
5258 EOF
5259 if { (eval echo configure:5260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5260   rm -rf conftest*
5261   ac_R_space=yes
5262 else
5263   echo "configure: failed program was:" >&5
5264   cat conftest.$ac_ext >&5
5265   rm -rf conftest*
5266   ac_R_space=no
5267 fi
5268 rm -f conftest*
5269         if test $ac_R_space = yes; then
5270           echo "$ac_t""yes" 1>&6
5271           X_LIBS="$X_LIBS -R $x_libraries"
5272         else
5273           echo "$ac_t""neither works" 1>&6
5274         fi
5275       fi
5276       LIBS="$ac_xsave_LIBS"
5277     esac
5278   fi
5279
5280   # Check for system-dependent libraries X programs must link with.
5281   # Do this before checking for the system-independent R6 libraries
5282   # (-lICE), since we may need -lsocket or whatever for X linking.
5283
5284   if test "$ISC" = yes; then
5285     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5286   else
5287     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5288     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5289     # the Alpha needs dnet_stub (dnet does not exist).
5290     if test "$with_dnet" = "no" ; then
5291 ac_cv_lib_dnet_dnet_ntoa=no
5292 else
5293
5294 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5295 echo "configure:5296: checking for dnet_ntoa in -ldnet" >&5
5296 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5297
5298 xe_check_libs=" -ldnet "
5299 cat > conftest.$ac_ext <<EOF
5300 #line 5301 "configure"
5301 #include "confdefs.h"
5302 /* Override any gcc2 internal prototype to avoid an error.  */
5303 /* We use char because int might match the return type of a gcc2
5304     builtin and then its argument prototype would still apply.  */
5305 char dnet_ntoa();
5306
5307 int main() {
5308 dnet_ntoa()
5309 ; return 0; }
5310 EOF
5311 if { (eval echo configure:5312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5312   rm -rf conftest*
5313   eval "ac_cv_lib_$ac_lib_var=yes"
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317   rm -rf conftest*
5318   eval "ac_cv_lib_$ac_lib_var=no"
5319 fi
5320 rm -f conftest*
5321 xe_check_libs=""
5322
5323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5324   echo "$ac_t""yes" 1>&6
5325   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5326 else
5327   echo "$ac_t""no" 1>&6
5328 fi
5329
5330 fi
5331
5332     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5333       
5334 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5335 echo "configure:5336: checking for dnet_ntoa in -ldnet_stub" >&5
5336 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5337
5338 xe_check_libs=" -ldnet_stub "
5339 cat > conftest.$ac_ext <<EOF
5340 #line 5341 "configure"
5341 #include "confdefs.h"
5342 /* Override any gcc2 internal prototype to avoid an error.  */
5343 /* We use char because int might match the return type of a gcc2
5344     builtin and then its argument prototype would still apply.  */
5345 char dnet_ntoa();
5346
5347 int main() {
5348 dnet_ntoa()
5349 ; return 0; }
5350 EOF
5351 if { (eval echo configure:5352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5352   rm -rf conftest*
5353   eval "ac_cv_lib_$ac_lib_var=yes"
5354 else
5355   echo "configure: failed program was:" >&5
5356   cat conftest.$ac_ext >&5
5357   rm -rf conftest*
5358   eval "ac_cv_lib_$ac_lib_var=no"
5359 fi
5360 rm -f conftest*
5361 xe_check_libs=""
5362
5363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5364   echo "$ac_t""yes" 1>&6
5365   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5366 else
5367   echo "$ac_t""no" 1>&6
5368 fi
5369
5370
5371     fi
5372
5373     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5374     # to get the SysV transport functions.
5375     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5376     # needs -lnsl.
5377     # The nsl library prevents programs from opening the X display
5378     # on Irix 5.2, according to dickey@clark.net.
5379     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5380 echo "configure:5381: checking for gethostbyname" >&5
5381
5382 cat > conftest.$ac_ext <<EOF
5383 #line 5384 "configure"
5384 #include "confdefs.h"
5385 /* System header to define __stub macros and hopefully few prototypes,
5386     which can conflict with char gethostbyname(); below.  */
5387 #include <assert.h>
5388 /* Override any gcc2 internal prototype to avoid an error.  */
5389 /* We use char because int might match the return type of a gcc2
5390     builtin and then its argument prototype would still apply.  */
5391 char gethostbyname();
5392
5393 int main() {
5394
5395 /* The GNU C library defines this for functions which it implements
5396     to always fail with ENOSYS.  Some functions are actually named
5397     something starting with __ and the normal name is an alias.  */
5398 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5399 choke me
5400 #else
5401 gethostbyname();
5402 #endif
5403
5404 ; return 0; }
5405 EOF
5406 if { (eval echo configure:5407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5407   rm -rf conftest*
5408   eval "ac_cv_func_gethostbyname=yes"
5409 else
5410   echo "configure: failed program was:" >&5
5411   cat conftest.$ac_ext >&5
5412   rm -rf conftest*
5413   eval "ac_cv_func_gethostbyname=no"
5414 fi
5415 rm -f conftest*
5416
5417 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5418   echo "$ac_t""yes" 1>&6
5419   :
5420 else
5421   echo "$ac_t""no" 1>&6
5422 fi
5423
5424     if test $ac_cv_func_gethostbyname = no; then
5425       
5426 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5427 echo "configure:5428: checking for gethostbyname in -lnsl" >&5
5428 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5429
5430 xe_check_libs=" -lnsl "
5431 cat > conftest.$ac_ext <<EOF
5432 #line 5433 "configure"
5433 #include "confdefs.h"
5434 /* Override any gcc2 internal prototype to avoid an error.  */
5435 /* We use char because int might match the return type of a gcc2
5436     builtin and then its argument prototype would still apply.  */
5437 char gethostbyname();
5438
5439 int main() {
5440 gethostbyname()
5441 ; return 0; }
5442 EOF
5443 if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5444   rm -rf conftest*
5445   eval "ac_cv_lib_$ac_lib_var=yes"
5446 else
5447   echo "configure: failed program was:" >&5
5448   cat conftest.$ac_ext >&5
5449   rm -rf conftest*
5450   eval "ac_cv_lib_$ac_lib_var=no"
5451 fi
5452 rm -f conftest*
5453 xe_check_libs=""
5454
5455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5456   echo "$ac_t""yes" 1>&6
5457   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5458 else
5459   echo "$ac_t""no" 1>&6
5460 fi
5461
5462
5463     fi
5464
5465     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5466     # socket/setsockopt and other routines are undefined under SCO ODT
5467     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5468     # on later versions), says simon@lia.di.epfl.ch: it contains
5469     # gethostby* variants that don't use the nameserver (or something).
5470     # -lsocket must be given before -lnsl if both are needed.
5471     # We assume that if connect needs -lnsl, so does gethostbyname.
5472     echo $ac_n "checking for connect""... $ac_c" 1>&6
5473 echo "configure:5474: checking for connect" >&5
5474
5475 cat > conftest.$ac_ext <<EOF
5476 #line 5477 "configure"
5477 #include "confdefs.h"
5478 /* System header to define __stub macros and hopefully few prototypes,
5479     which can conflict with char connect(); below.  */
5480 #include <assert.h>
5481 /* Override any gcc2 internal prototype to avoid an error.  */
5482 /* We use char because int might match the return type of a gcc2
5483     builtin and then its argument prototype would still apply.  */
5484 char connect();
5485
5486 int main() {
5487
5488 /* The GNU C library defines this for functions which it implements
5489     to always fail with ENOSYS.  Some functions are actually named
5490     something starting with __ and the normal name is an alias.  */
5491 #if defined (__stub_connect) || defined (__stub___connect)
5492 choke me
5493 #else
5494 connect();
5495 #endif
5496
5497 ; return 0; }
5498 EOF
5499 if { (eval echo configure:5500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5500   rm -rf conftest*
5501   eval "ac_cv_func_connect=yes"
5502 else
5503   echo "configure: failed program was:" >&5
5504   cat conftest.$ac_ext >&5
5505   rm -rf conftest*
5506   eval "ac_cv_func_connect=no"
5507 fi
5508 rm -f conftest*
5509
5510 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5511   echo "$ac_t""yes" 1>&6
5512   :
5513 else
5514   echo "$ac_t""no" 1>&6
5515 fi
5516
5517     if test $ac_cv_func_connect = no; then
5518       
5519 xe_msg_checking="for connect in -lsocket"
5520 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5521 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5522 echo "configure:5523: checking "$xe_msg_checking"" >&5
5523 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5524
5525 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5526 cat > conftest.$ac_ext <<EOF
5527 #line 5528 "configure"
5528 #include "confdefs.h"
5529 /* Override any gcc2 internal prototype to avoid an error.  */
5530 /* We use char because int might match the return type of a gcc2
5531     builtin and then its argument prototype would still apply.  */
5532 char connect();
5533
5534 int main() {
5535 connect()
5536 ; return 0; }
5537 EOF
5538 if { (eval echo configure:5539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5539   rm -rf conftest*
5540   eval "ac_cv_lib_$ac_lib_var=yes"
5541 else
5542   echo "configure: failed program was:" >&5
5543   cat conftest.$ac_ext >&5
5544   rm -rf conftest*
5545   eval "ac_cv_lib_$ac_lib_var=no"
5546 fi
5547 rm -f conftest*
5548 xe_check_libs=""
5549
5550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5551   echo "$ac_t""yes" 1>&6
5552   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5553 else
5554   echo "$ac_t""no" 1>&6
5555 fi
5556
5557
5558     fi
5559
5560     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5561     echo $ac_n "checking for remove""... $ac_c" 1>&6
5562 echo "configure:5563: checking for remove" >&5
5563
5564 cat > conftest.$ac_ext <<EOF
5565 #line 5566 "configure"
5566 #include "confdefs.h"
5567 /* System header to define __stub macros and hopefully few prototypes,
5568     which can conflict with char remove(); below.  */
5569 #include <assert.h>
5570 /* Override any gcc2 internal prototype to avoid an error.  */
5571 /* We use char because int might match the return type of a gcc2
5572     builtin and then its argument prototype would still apply.  */
5573 char remove();
5574
5575 int main() {
5576
5577 /* The GNU C library defines this for functions which it implements
5578     to always fail with ENOSYS.  Some functions are actually named
5579     something starting with __ and the normal name is an alias.  */
5580 #if defined (__stub_remove) || defined (__stub___remove)
5581 choke me
5582 #else
5583 remove();
5584 #endif
5585
5586 ; return 0; }
5587 EOF
5588 if { (eval echo configure:5589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5589   rm -rf conftest*
5590   eval "ac_cv_func_remove=yes"
5591 else
5592   echo "configure: failed program was:" >&5
5593   cat conftest.$ac_ext >&5
5594   rm -rf conftest*
5595   eval "ac_cv_func_remove=no"
5596 fi
5597 rm -f conftest*
5598
5599 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5600   echo "$ac_t""yes" 1>&6
5601   :
5602 else
5603   echo "$ac_t""no" 1>&6
5604 fi
5605
5606     if test $ac_cv_func_remove = no; then
5607       
5608 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5609 echo "configure:5610: checking for remove in -lposix" >&5
5610 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5611
5612 xe_check_libs=" -lposix "
5613 cat > conftest.$ac_ext <<EOF
5614 #line 5615 "configure"
5615 #include "confdefs.h"
5616 /* Override any gcc2 internal prototype to avoid an error.  */
5617 /* We use char because int might match the return type of a gcc2
5618     builtin and then its argument prototype would still apply.  */
5619 char remove();
5620
5621 int main() {
5622 remove()
5623 ; return 0; }
5624 EOF
5625 if { (eval echo configure:5626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5626   rm -rf conftest*
5627   eval "ac_cv_lib_$ac_lib_var=yes"
5628 else
5629   echo "configure: failed program was:" >&5
5630   cat conftest.$ac_ext >&5
5631   rm -rf conftest*
5632   eval "ac_cv_lib_$ac_lib_var=no"
5633 fi
5634 rm -f conftest*
5635 xe_check_libs=""
5636
5637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5638   echo "$ac_t""yes" 1>&6
5639   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5640 else
5641   echo "$ac_t""no" 1>&6
5642 fi
5643
5644
5645     fi
5646
5647     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5648     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5649 echo "configure:5650: checking for shmat" >&5
5650
5651 cat > conftest.$ac_ext <<EOF
5652 #line 5653 "configure"
5653 #include "confdefs.h"
5654 /* System header to define __stub macros and hopefully few prototypes,
5655     which can conflict with char shmat(); below.  */
5656 #include <assert.h>
5657 /* Override any gcc2 internal prototype to avoid an error.  */
5658 /* We use char because int might match the return type of a gcc2
5659     builtin and then its argument prototype would still apply.  */
5660 char shmat();
5661
5662 int main() {
5663
5664 /* The GNU C library defines this for functions which it implements
5665     to always fail with ENOSYS.  Some functions are actually named
5666     something starting with __ and the normal name is an alias.  */
5667 #if defined (__stub_shmat) || defined (__stub___shmat)
5668 choke me
5669 #else
5670 shmat();
5671 #endif
5672
5673 ; return 0; }
5674 EOF
5675 if { (eval echo configure:5676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5676   rm -rf conftest*
5677   eval "ac_cv_func_shmat=yes"
5678 else
5679   echo "configure: failed program was:" >&5
5680   cat conftest.$ac_ext >&5
5681   rm -rf conftest*
5682   eval "ac_cv_func_shmat=no"
5683 fi
5684 rm -f conftest*
5685
5686 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5687   echo "$ac_t""yes" 1>&6
5688   :
5689 else
5690   echo "$ac_t""no" 1>&6
5691 fi
5692
5693     if test $ac_cv_func_shmat = no; then
5694       
5695 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5696 echo "configure:5697: checking for shmat in -lipc" >&5
5697 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5698
5699 xe_check_libs=" -lipc "
5700 cat > conftest.$ac_ext <<EOF
5701 #line 5702 "configure"
5702 #include "confdefs.h"
5703 /* Override any gcc2 internal prototype to avoid an error.  */
5704 /* We use char because int might match the return type of a gcc2
5705     builtin and then its argument prototype would still apply.  */
5706 char shmat();
5707
5708 int main() {
5709 shmat()
5710 ; return 0; }
5711 EOF
5712 if { (eval echo configure:5713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5713   rm -rf conftest*
5714   eval "ac_cv_lib_$ac_lib_var=yes"
5715 else
5716   echo "configure: failed program was:" >&5
5717   cat conftest.$ac_ext >&5
5718   rm -rf conftest*
5719   eval "ac_cv_lib_$ac_lib_var=no"
5720 fi
5721 rm -f conftest*
5722 xe_check_libs=""
5723
5724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5725   echo "$ac_t""yes" 1>&6
5726   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5727 else
5728   echo "$ac_t""no" 1>&6
5729 fi
5730
5731
5732     fi
5733   fi
5734
5735   # Check for libraries that X11R6 Xt/Xaw programs need.
5736   ac_save_LDFLAGS="$LDFLAGS"
5737   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5738   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5739   # check for ICE first), but we must link in the order -lSM -lICE or
5740   # we get undefined symbols.  So assume we have SM if we have ICE.
5741   # These have to be linked with before -lX11, unlike the other
5742   # libraries we check for below, so use a different variable.
5743   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5744   
5745 xe_msg_checking="for IceConnectionNumber in -lICE"
5746 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5747 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5748 echo "configure:5749: checking "$xe_msg_checking"" >&5
5749 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5750
5751 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5752 cat > conftest.$ac_ext <<EOF
5753 #line 5754 "configure"
5754 #include "confdefs.h"
5755 /* Override any gcc2 internal prototype to avoid an error.  */
5756 /* We use char because int might match the return type of a gcc2
5757     builtin and then its argument prototype would still apply.  */
5758 char IceConnectionNumber();
5759
5760 int main() {
5761 IceConnectionNumber()
5762 ; return 0; }
5763 EOF
5764 if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5765   rm -rf conftest*
5766   eval "ac_cv_lib_$ac_lib_var=yes"
5767 else
5768   echo "configure: failed program was:" >&5
5769   cat conftest.$ac_ext >&5
5770   rm -rf conftest*
5771   eval "ac_cv_lib_$ac_lib_var=no"
5772 fi
5773 rm -f conftest*
5774 xe_check_libs=""
5775
5776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5777   echo "$ac_t""yes" 1>&6
5778   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5779 else
5780   echo "$ac_t""no" 1>&6
5781 fi
5782
5783
5784   LDFLAGS="$ac_save_LDFLAGS"
5785
5786 fi
5787  # Autoconf claims to find X library and include dirs for us.
5788   if test "$no_x" = "yes"
5789   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5790   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5791   fi
5792 fi
5793
5794 case "$with_x11" in
5795   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5796   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5797 esac
5798
5799 if test "$with_x11" = "yes"; then
5800   { test "$extra_verbose" = "yes" && cat << \EOF
5801     Defining HAVE_X_WINDOWS
5802 EOF
5803 cat >> confdefs.h <<\EOF
5804 #define HAVE_X_WINDOWS 1
5805 EOF
5806 }
5807
5808   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5809   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5810
5811       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5812     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5813     if test -d "$lib_dir" -a -d "$inc_dir"; then
5814       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5815         x_libraries="$lib_dir $x_libraries"
5816         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5817       esac
5818       case "$x_includes" in "$inc_dir"* ) ;; *)
5819         x_includes="$inc_dir $x_includes"
5820         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5821       esac
5822       break;       fi
5823   done
5824
5825     for rel in "X11R6" "X11R5" "X11R4"; do
5826     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5827     if test -d "$lib_dir" -a -d "$inc_dir"; then
5828       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5829         x_libraries="$x_libraries $lib_dir"
5830         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5831       esac
5832       case "$x_includes" in "$inc_dir"* ) ;; *)
5833         x_includes="$x_includes $inc_dir"
5834         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5835       esac
5836       break;     fi
5837   done
5838
5839     case "$opsys" in
5840   decosf*) 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 ;;
5841   esac
5842
5843   ld_switch_x_site="$X_LIBS"
5844
5845   
5846 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5847     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5848   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5849   
5850         runpath="" runpath_dirs=""
5851   if test -n "$LD_RUN_PATH"; then
5852     runpath="$LD_RUN_PATH"
5853   elif test "$GCC" = "yes"; then
5854         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5855     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5856     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5857     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5858       case "$arg" in P,* | -L* | -R* )
5859         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5860           {
5861 xe_runpath_dir="$dir"
5862   test "$xe_runpath_dir" != "/lib"     -a \
5863         "$xe_runpath_dir" != "/usr/lib" -a \
5864         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5865   eval "$xe_add_unique_runpath_dir"
5866 }
5867         done ;;
5868       esac
5869     done
5870     ld_switch_run="$ld_switch_run_save"
5871     rm -f conftest*
5872   else
5873         for arg in $ld_switch_site $ld_switch_x_site; do
5874       case "$arg" in -L*) {
5875 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5876   test "$xe_runpath_dir" != "/lib"     -a \
5877         "$xe_runpath_dir" != "/usr/lib" -a \
5878         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5879   eval "$xe_add_unique_runpath_dir"
5880 };; esac
5881     done
5882         if test "$opsys $need_motif" = "sol2 yes"; then
5883       xe_runpath_dir="/opt/SUNWdt/lib";
5884       eval "$xe_add_unique_runpath_dir";
5885     fi
5886   fi 
5887   if test -n "$runpath"; then
5888     ld_switch_run="${dash_r}${runpath}"
5889     
5890 if test "$GCC" = "yes"; then
5891   set x $ld_switch_run; shift; ld_switch_run=""
5892   while test -n "$1"; do
5893     case $1 in
5894       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5895       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5896       -Xlinker* ) ;;
5897       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5898     esac
5899     shift
5900   done
5901 fi
5902     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5903   fi
5904 fi
5905
5906
5907   if test "$extra_verbose" = "yes"; then
5908     echo; echo "X11 compilation variables:"
5909     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5910     echo
5911   fi
5912
5913             bitmapdirs=
5914   if test "$x_includes" != NONE; then
5915     for i in $x_includes; do
5916       if test -d "$i/bitmaps"; then
5917         bitmapdirs="$i/bitmaps:$bitmapdirs"
5918       fi
5919       if test -d "$i/X11/bitmaps"; then
5920         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5921       fi
5922     done
5923     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5924   fi
5925   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5926     Defining BITMAPDIR = "$bitmapdirs"
5927 EOF
5928 cat >> confdefs.h <<EOF
5929 #define BITMAPDIR "$bitmapdirs"
5930 EOF
5931 }
5932
5933
5934     echo "checking for X defines extracted by xmkmf" 1>&6
5935 echo "configure:5936: checking for X defines extracted by xmkmf" >&5
5936   rm -fr conftestdir
5937   if mkdir conftestdir; then
5938     cd conftestdir
5939     cat > Imakefile <<'EOF'
5940 xetest:
5941         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5942 EOF
5943     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5944       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5945       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5946     fi
5947     cd ..
5948     rm -fr conftestdir
5949     for word in $xmkmf_defines; do
5950       case "$word" in -D* )
5951         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
5952         case "$word" in
5953           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
5954           *     ) val=1 ;;
5955         esac
5956         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
5957           if test "$val" = "1"
5958             then { test "$extra_verbose" = "yes" && cat << EOF
5959     Defining $sym
5960 EOF
5961 cat >> confdefs.h <<EOF
5962 #define $sym 1
5963 EOF
5964 }
5965
5966             else { test "$extra_verbose" = "yes" && cat << EOF
5967     Defining $sym = $val
5968 EOF
5969 cat >> confdefs.h <<EOF
5970 #define $sym $val
5971 EOF
5972 }
5973
5974           fi
5975         fi  ;;
5976       esac
5977     done
5978   fi
5979
5980     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5981 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5982 echo "configure:5983: checking for X11/Intrinsic.h" >&5
5983
5984 cat > conftest.$ac_ext <<EOF
5985 #line 5986 "configure"
5986 #include "confdefs.h"
5987 #include <X11/Intrinsic.h>
5988 EOF
5989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5990 { (eval echo configure:5991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5992 if test -z "$ac_err"; then
5993   rm -rf conftest*
5994   eval "ac_cv_header_$ac_safe=yes"
5995 else
5996   echo "$ac_err" >&5
5997   echo "configure: failed program was:" >&5
5998   cat conftest.$ac_ext >&5
5999   rm -rf conftest*
6000   eval "ac_cv_header_$ac_safe=no"
6001 fi
6002 rm -f conftest*
6003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6004   echo "$ac_t""yes" 1>&6
6005   :
6006 else
6007   echo "$ac_t""no" 1>&6
6008 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6009 fi
6010
6011
6012       
6013 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6014 echo "configure:6015: checking for XOpenDisplay in -lX11" >&5
6015 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6016
6017 xe_check_libs=" -lX11 "
6018 cat > conftest.$ac_ext <<EOF
6019 #line 6020 "configure"
6020 #include "confdefs.h"
6021 /* Override any gcc2 internal prototype to avoid an error.  */
6022 /* We use char because int might match the return type of a gcc2
6023     builtin and then its argument prototype would still apply.  */
6024 char XOpenDisplay();
6025
6026 int main() {
6027 XOpenDisplay()
6028 ; return 0; }
6029 EOF
6030 if { (eval echo configure:6031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6031   rm -rf conftest*
6032   eval "ac_cv_lib_$ac_lib_var=yes"
6033 else
6034   echo "configure: failed program was:" >&5
6035   cat conftest.$ac_ext >&5
6036   rm -rf conftest*
6037   eval "ac_cv_lib_$ac_lib_var=no"
6038 fi
6039 rm -f conftest*
6040 xe_check_libs=""
6041
6042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6043   echo "$ac_t""yes" 1>&6
6044   have_lib_x11=yes
6045 else
6046   echo "$ac_t""no" 1>&6
6047 fi
6048
6049
6050   if test "$have_lib_x11" != "yes"; then
6051     
6052 xe_msg_checking="for XGetFontProperty in -lX11"
6053 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6054 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6055 echo "configure:6056: checking "$xe_msg_checking"" >&5
6056 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6057
6058 xe_check_libs=" -lX11 -b i486-linuxaout"
6059 cat > conftest.$ac_ext <<EOF
6060 #line 6061 "configure"
6061 #include "confdefs.h"
6062 /* Override any gcc2 internal prototype to avoid an error.  */
6063 /* We use char because int might match the return type of a gcc2
6064     builtin and then its argument prototype would still apply.  */
6065 char XGetFontProperty();
6066
6067 int main() {
6068 XGetFontProperty()
6069 ; return 0; }
6070 EOF
6071 if { (eval echo configure:6072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6072   rm -rf conftest*
6073   eval "ac_cv_lib_$ac_lib_var=yes"
6074 else
6075   echo "configure: failed program was:" >&5
6076   cat conftest.$ac_ext >&5
6077   rm -rf conftest*
6078   eval "ac_cv_lib_$ac_lib_var=no"
6079 fi
6080 rm -f conftest*
6081 xe_check_libs=""
6082
6083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6084   echo "$ac_t""yes" 1>&6
6085   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6086 else
6087   echo "$ac_t""no" 1>&6
6088 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6089 fi
6090
6091
6092   fi
6093   libs_x="-lX11"
6094   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6095
6096     
6097 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6098 echo "configure:6099: checking for XShapeSelectInput in -lXext" >&5
6099 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6100
6101 xe_check_libs=" -lXext "
6102 cat > conftest.$ac_ext <<EOF
6103 #line 6104 "configure"
6104 #include "confdefs.h"
6105 /* Override any gcc2 internal prototype to avoid an error.  */
6106 /* We use char because int might match the return type of a gcc2
6107     builtin and then its argument prototype would still apply.  */
6108 char XShapeSelectInput();
6109
6110 int main() {
6111 XShapeSelectInput()
6112 ; return 0; }
6113 EOF
6114 if { (eval echo configure:6115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6115   rm -rf conftest*
6116   eval "ac_cv_lib_$ac_lib_var=yes"
6117 else
6118   echo "configure: failed program was:" >&5
6119   cat conftest.$ac_ext >&5
6120   rm -rf conftest*
6121   eval "ac_cv_lib_$ac_lib_var=no"
6122 fi
6123 rm -f conftest*
6124 xe_check_libs=""
6125
6126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6127   echo "$ac_t""yes" 1>&6
6128   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6129 else
6130   echo "$ac_t""no" 1>&6
6131 fi
6132
6133
6134
6135     
6136 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6137 echo "configure:6138: checking for XtOpenDisplay in -lXt" >&5
6138 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6139
6140 xe_check_libs=" -lXt "
6141 cat > conftest.$ac_ext <<EOF
6142 #line 6143 "configure"
6143 #include "confdefs.h"
6144 /* Override any gcc2 internal prototype to avoid an error.  */
6145 /* We use char because int might match the return type of a gcc2
6146     builtin and then its argument prototype would still apply.  */
6147 char XtOpenDisplay();
6148
6149 int main() {
6150 XtOpenDisplay()
6151 ; return 0; }
6152 EOF
6153 if { (eval echo configure:6154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6154   rm -rf conftest*
6155   eval "ac_cv_lib_$ac_lib_var=yes"
6156 else
6157   echo "configure: failed program was:" >&5
6158   cat conftest.$ac_ext >&5
6159   rm -rf conftest*
6160   eval "ac_cv_lib_$ac_lib_var=no"
6161 fi
6162 rm -f conftest*
6163 xe_check_libs=""
6164
6165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6166   echo "$ac_t""yes" 1>&6
6167   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6168 else
6169   echo "$ac_t""no" 1>&6
6170 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6171 fi
6172
6173
6174
6175   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6176 echo "configure:6177: checking the version of X11 being used" >&5
6177   cat > conftest.$ac_ext <<EOF
6178 #line 6179 "configure"
6179 #include "confdefs.h"
6180 #include <X11/Intrinsic.h>
6181     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6182 EOF
6183 if { (eval echo configure:6184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6184 then
6185   ./conftest foobar; x11_release=$?
6186 else
6187   conftest_rc="$?"
6188   echo "configure: failed program was:" >&5
6189   cat conftest.$ac_ext >&5
6190   rm -fr conftest*
6191   x11_release=4
6192 fi
6193 rm -fr conftest*
6194   echo "$ac_t""R${x11_release}" 1>&6
6195   { test "$extra_verbose" = "yes" && cat << EOF
6196     Defining THIS_IS_X11R${x11_release}
6197 EOF
6198 cat >> confdefs.h <<EOF
6199 #define THIS_IS_X11R${x11_release} 1
6200 EOF
6201 }
6202
6203
6204   if test "${x11_release}" = "4"; then
6205     case "$with_widgets" in
6206       "" | "no") with_widgets=no ;;
6207       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6208     esac
6209   fi
6210
6211   for ac_func in XConvertCase
6212 do
6213 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6214 echo "configure:6215: checking for $ac_func" >&5
6215
6216 cat > conftest.$ac_ext <<EOF
6217 #line 6218 "configure"
6218 #include "confdefs.h"
6219 /* System header to define __stub macros and hopefully few prototypes,
6220     which can conflict with char $ac_func(); below.  */
6221 #include <assert.h>
6222 /* Override any gcc2 internal prototype to avoid an error.  */
6223 /* We use char because int might match the return type of a gcc2
6224     builtin and then its argument prototype would still apply.  */
6225 char $ac_func();
6226
6227 int main() {
6228
6229 /* The GNU C library defines this for functions which it implements
6230     to always fail with ENOSYS.  Some functions are actually named
6231     something starting with __ and the normal name is an alias.  */
6232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6233 choke me
6234 #else
6235 $ac_func();
6236 #endif
6237
6238 ; return 0; }
6239 EOF
6240 if { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6241   rm -rf conftest*
6242   eval "ac_cv_func_$ac_func=yes"
6243 else
6244   echo "configure: failed program was:" >&5
6245   cat conftest.$ac_ext >&5
6246   rm -rf conftest*
6247   eval "ac_cv_func_$ac_func=no"
6248 fi
6249 rm -f conftest*
6250
6251 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6252   echo "$ac_t""yes" 1>&6
6253     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6254   { test "$extra_verbose" = "yes" && cat << EOF
6255     Defining $ac_tr_func
6256 EOF
6257 cat >> confdefs.h <<EOF
6258 #define $ac_tr_func 1
6259 EOF
6260 }
6261  
6262 else
6263   echo "$ac_t""no" 1>&6
6264 fi
6265 done
6266
6267
6268   for ac_hdr in X11/Xlocale.h
6269 do
6270 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6271 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6272 echo "configure:6273: checking for $ac_hdr" >&5
6273
6274 cat > conftest.$ac_ext <<EOF
6275 #line 6276 "configure"
6276 #include "confdefs.h"
6277 #include <$ac_hdr>
6278 EOF
6279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6280 { (eval echo configure:6281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6282 if test -z "$ac_err"; then
6283   rm -rf conftest*
6284   eval "ac_cv_header_$ac_safe=yes"
6285 else
6286   echo "$ac_err" >&5
6287   echo "configure: failed program was:" >&5
6288   cat conftest.$ac_ext >&5
6289   rm -rf conftest*
6290   eval "ac_cv_header_$ac_safe=no"
6291 fi
6292 rm -f conftest*
6293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6294   echo "$ac_t""yes" 1>&6
6295     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6296   { test "$extra_verbose" = "yes" && cat << EOF
6297     Defining $ac_tr_hdr
6298 EOF
6299 cat >> confdefs.h <<EOF
6300 #define $ac_tr_hdr 1
6301 EOF
6302 }
6303  
6304 else
6305   echo "$ac_t""no" 1>&6
6306 fi
6307 done
6308
6309
6310     for ac_func in XRegisterIMInstantiateCallback
6311 do
6312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6313 echo "configure:6314: checking for $ac_func" >&5
6314
6315 cat > conftest.$ac_ext <<EOF
6316 #line 6317 "configure"
6317 #include "confdefs.h"
6318 /* System header to define __stub macros and hopefully few prototypes,
6319     which can conflict with char $ac_func(); below.  */
6320 #include <assert.h>
6321 /* Override any gcc2 internal prototype to avoid an error.  */
6322 /* We use char because int might match the return type of a gcc2
6323     builtin and then its argument prototype would still apply.  */
6324 char $ac_func();
6325
6326 int main() {
6327
6328 /* The GNU C library defines this for functions which it implements
6329     to always fail with ENOSYS.  Some functions are actually named
6330     something starting with __ and the normal name is an alias.  */
6331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6332 choke me
6333 #else
6334 $ac_func();
6335 #endif
6336
6337 ; return 0; }
6338 EOF
6339 if { (eval echo configure:6340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6340   rm -rf conftest*
6341   eval "ac_cv_func_$ac_func=yes"
6342 else
6343   echo "configure: failed program was:" >&5
6344   cat conftest.$ac_ext >&5
6345   rm -rf conftest*
6346   eval "ac_cv_func_$ac_func=no"
6347 fi
6348 rm -f conftest*
6349
6350 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6351   echo "$ac_t""yes" 1>&6
6352     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6353   { test "$extra_verbose" = "yes" && cat << EOF
6354     Defining $ac_tr_func
6355 EOF
6356 cat >> confdefs.h <<EOF
6357 #define $ac_tr_func 1
6358 EOF
6359 }
6360  
6361 else
6362   echo "$ac_t""no" 1>&6
6363 fi
6364 done
6365
6366   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6367 echo "configure:6368: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6368   cat > conftest.$ac_ext <<EOF
6369 #line 6370 "configure"
6370 #include "confdefs.h"
6371
6372 #define NeedFunctionPrototypes 1
6373 #include <X11/Xlib.h>
6374 extern Bool XRegisterIMInstantiateCallback(
6375    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6376
6377 int main() {
6378
6379 ; return 0; }
6380 EOF
6381 if { (eval echo configure:6382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6382   rm -rf conftest*
6383   echo "$ac_t""yes" 1>&6
6384 else
6385   echo "configure: failed program was:" >&5
6386   cat conftest.$ac_ext >&5
6387   rm -rf conftest*
6388   echo "$ac_t""no" 1>&6
6389    { test "$extra_verbose" = "yes" && cat << \EOF
6390     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6391 EOF
6392 cat >> confdefs.h <<\EOF
6393 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6394 EOF
6395 }
6396
6397 fi
6398 rm -f conftest*
6399
6400     test -z "$with_xmu" && { 
6401 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6402 echo "configure:6403: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6403 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6404
6405 xe_check_libs=" -lXmu "
6406 cat > conftest.$ac_ext <<EOF
6407 #line 6408 "configure"
6408 #include "confdefs.h"
6409 /* Override any gcc2 internal prototype to avoid an error.  */
6410 /* We use char because int might match the return type of a gcc2
6411     builtin and then its argument prototype would still apply.  */
6412 char XmuReadBitmapDataFromFile();
6413
6414 int main() {
6415 XmuReadBitmapDataFromFile()
6416 ; return 0; }
6417 EOF
6418 if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6419   rm -rf conftest*
6420   eval "ac_cv_lib_$ac_lib_var=yes"
6421 else
6422   echo "configure: failed program was:" >&5
6423   cat conftest.$ac_ext >&5
6424   rm -rf conftest*
6425   eval "ac_cv_lib_$ac_lib_var=no"
6426 fi
6427 rm -f conftest*
6428 xe_check_libs=""
6429
6430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6431   echo "$ac_t""yes" 1>&6
6432   with_xmu=yes
6433 else
6434   echo "$ac_t""no" 1>&6
6435 with_xmu=no
6436 fi
6437
6438  }
6439   if test "$with_xmu" = "no"; then
6440     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6441    echo "    xemacs will be linked with \"xmu.o\""
6442  fi
6443   else
6444     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6445     { test "$extra_verbose" = "yes" && cat << \EOF
6446     Defining HAVE_XMU
6447 EOF
6448 cat >> confdefs.h <<\EOF
6449 #define HAVE_XMU 1
6450 EOF
6451 }
6452
6453   fi
6454
6455       
6456 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6457 echo "configure:6458: checking for main in -lXbsd" >&5
6458 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6459
6460 xe_check_libs=" -lXbsd "
6461 cat > conftest.$ac_ext <<EOF
6462 #line 6463 "configure"
6463 #include "confdefs.h"
6464
6465 int main() {
6466 main()
6467 ; return 0; }
6468 EOF
6469 if { (eval echo configure:6470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6470   rm -rf conftest*
6471   eval "ac_cv_lib_$ac_lib_var=yes"
6472 else
6473   echo "configure: failed program was:" >&5
6474   cat conftest.$ac_ext >&5
6475   rm -rf conftest*
6476   eval "ac_cv_lib_$ac_lib_var=no"
6477 fi
6478 rm -f conftest*
6479 xe_check_libs=""
6480
6481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6482   echo "$ac_t""yes" 1>&6
6483   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6484 else
6485   echo "$ac_t""no" 1>&6
6486 fi
6487
6488
6489
6490     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6491         if test "$GCC" = "yes"; then
6492       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6493       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6494     else
6495       case "$CC" in
6496         "xlc" ) CC="xlc_r" ;;
6497         "xlC" ) CC="xlC_r" ;;
6498         "cc"  ) CC="cc_r" ;;
6499       esac
6500     fi
6501   fi
6502
6503 fi 
6504 if test "$with_msw" != "no"; then
6505   echo "checking for MS-Windows" 1>&6
6506 echo "configure:6507: checking for MS-Windows" >&5
6507   
6508 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6509 echo "configure:6510: checking for main in -lgdi32" >&5
6510 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6511
6512 xe_check_libs=" -lgdi32 "
6513 cat > conftest.$ac_ext <<EOF
6514 #line 6515 "configure"
6515 #include "confdefs.h"
6516
6517 int main() {
6518 main()
6519 ; return 0; }
6520 EOF
6521 if { (eval echo configure:6522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6522   rm -rf conftest*
6523   eval "ac_cv_lib_$ac_lib_var=yes"
6524 else
6525   echo "configure: failed program was:" >&5
6526   cat conftest.$ac_ext >&5
6527   rm -rf conftest*
6528   eval "ac_cv_lib_$ac_lib_var=no"
6529 fi
6530 rm -f conftest*
6531 xe_check_libs=""
6532
6533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6534   echo "$ac_t""yes" 1>&6
6535   with_msw=yes
6536 else
6537   echo "$ac_t""no" 1>&6
6538 fi
6539
6540
6541   if test "$with_msw" = "yes"; then
6542     { test "$extra_verbose" = "yes" && cat << \EOF
6543     Defining HAVE_MS_WINDOWS
6544 EOF
6545 cat >> confdefs.h <<\EOF
6546 #define HAVE_MS_WINDOWS 1
6547 EOF
6548 }
6549
6550
6551         MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
6552     SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
6553     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
6554         
6555     install_pp="$blddir/lib-src/installexe.sh"
6556     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
6557     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6558     if test "$window_system" != x11; then
6559         window_system=msw
6560         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6561             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6562    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6563  fi
6564         test "$with_menubars"   != "no" && with_menubars=msw \
6565             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6566    echo "    xemacs will be linked with \"menubar-msw.o\""
6567  fi
6568         test "$with_toolbars"   != "no" && with_toolbars=msw \
6569             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6570    echo "    xemacs will be linked with \"toolbar-msw.o\""
6571  fi
6572         test "$with_dialogs"   != "no" && with_dialogs=msw \
6573             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6574    echo "    xemacs will be linked with \"dialog-msw.o\""
6575  fi
6576         test "$with_widgets"   != "no" && with_widgets=msw
6577     else
6578         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6579    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6580  fi
6581         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6582    echo "    xemacs will be linked with \"menubar-msw.o\""
6583  fi
6584         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6585    echo "    xemacs will be linked with \"toolbar-msw.o\""
6586  fi
6587         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6588    echo "    xemacs will be linked with \"dialog-msw.o\""
6589  fi
6590     fi
6591         cat > conftest.$ac_ext <<EOF
6592 #line 6593 "configure"
6593 #include "confdefs.h"
6594 #include <fcntl.h>
6595     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6596 EOF
6597 if { (eval echo configure:6598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6598 then
6599   { test "$extra_verbose" = "yes" && cat << \EOF
6600     Defining HAVE_MSG_SELECT
6601 EOF
6602 cat >> confdefs.h <<\EOF
6603 #define HAVE_MSG_SELECT 1
6604 EOF
6605 }
6606
6607 else
6608   conftest_rc="$?"
6609   echo "configure: failed program was:" >&5
6610   cat conftest.$ac_ext >&5
6611 fi
6612 rm -fr conftest*
6613     with_file_coding=yes
6614     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
6615    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\""
6616  fi
6617   fi
6618 fi
6619
6620
6621
6622 test -z "$window_system" && window_system="none"
6623
6624 if test "$window_system" = "none"; then
6625   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6626   do
6627     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6628        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6629     fi
6630     eval "with_${feature}=no"
6631   done
6632 else
6633   test -z "$with_toolbars" && with_toolbars=yes
6634 fi
6635
6636 if test "$with_msw" != "yes"; then
6637   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6638   do
6639     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6640        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6641     fi
6642     eval "with_${feature}=no"
6643   done
6644 else
6645   :
6646 fi
6647
6648 if test "$with_x11" != "yes"; then
6649             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6650   do
6651     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6652        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6653     fi
6654     eval "with_${feature}=no"
6655   done
6656 fi
6657
6658 if test "$with_x11" = "yes"; then
6659   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
6660 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
6661 echo "configure:6662: checking for X11/extensions/shape.h" >&5
6662
6663 cat > conftest.$ac_ext <<EOF
6664 #line 6665 "configure"
6665 #include "confdefs.h"
6666 #include <X11/extensions/shape.h>
6667 EOF
6668 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6669 { (eval echo configure:6670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6670 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6671 if test -z "$ac_err"; then
6672   rm -rf conftest*
6673   eval "ac_cv_header_$ac_safe=yes"
6674 else
6675   echo "$ac_err" >&5
6676   echo "configure: failed program was:" >&5
6677   cat conftest.$ac_ext >&5
6678   rm -rf conftest*
6679   eval "ac_cv_header_$ac_safe=no"
6680 fi
6681 rm -f conftest*
6682 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6683   echo "$ac_t""yes" 1>&6
6684   
6685    { test "$extra_verbose" = "yes" && cat << \EOF
6686     Defining HAVE_BALLOON_HELP
6687 EOF
6688 cat >> confdefs.h <<\EOF
6689 #define HAVE_BALLOON_HELP 1
6690 EOF
6691 }
6692
6693    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
6694    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
6695  fi
6696 else
6697   echo "$ac_t""no" 1>&6
6698 fi
6699
6700 fi
6701
6702 bitmapdir=
6703
6704 case "$window_system" in
6705   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6706   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6707   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6708 esac
6709
6710 case "$x_libraries" in *X11R4* )
6711   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6712   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6713 esac
6714
6715 echo "checking for WM_COMMAND option" 1>&6
6716 echo "configure:6717: checking for WM_COMMAND option" >&5;
6717 if test "$with_wmcommand" != "no"; then
6718   { test "$extra_verbose" = "yes" && cat << \EOF
6719     Defining HAVE_WMCOMMAND
6720 EOF
6721 cat >> confdefs.h <<\EOF
6722 #define HAVE_WMCOMMAND 1
6723 EOF
6724 }
6725
6726 fi
6727
6728 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6729 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6730 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6731 echo "configure:6732: checking for X11/Xauth.h" >&5
6732
6733 cat > conftest.$ac_ext <<EOF
6734 #line 6735 "configure"
6735 #include "confdefs.h"
6736 #include <X11/Xauth.h>
6737 EOF
6738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6739 { (eval echo configure:6740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6741 if test -z "$ac_err"; then
6742   rm -rf conftest*
6743   eval "ac_cv_header_$ac_safe=yes"
6744 else
6745   echo "$ac_err" >&5
6746   echo "configure: failed program was:" >&5
6747   cat conftest.$ac_ext >&5
6748   rm -rf conftest*
6749   eval "ac_cv_header_$ac_safe=no"
6750 fi
6751 rm -f conftest*
6752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6753   echo "$ac_t""yes" 1>&6
6754   :
6755 else
6756   echo "$ac_t""no" 1>&6
6757 with_xauth=no
6758 fi
6759  }
6760 test -z "$with_xauth" && { 
6761 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6762 echo "configure:6763: checking for XauGetAuthByAddr in -lXau" >&5
6763 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6764
6765 xe_check_libs=" -lXau "
6766 cat > conftest.$ac_ext <<EOF
6767 #line 6768 "configure"
6768 #include "confdefs.h"
6769 /* Override any gcc2 internal prototype to avoid an error.  */
6770 /* We use char because int might match the return type of a gcc2
6771     builtin and then its argument prototype would still apply.  */
6772 char XauGetAuthByAddr();
6773
6774 int main() {
6775 XauGetAuthByAddr()
6776 ; return 0; }
6777 EOF
6778 if { (eval echo configure:6779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6779   rm -rf conftest*
6780   eval "ac_cv_lib_$ac_lib_var=yes"
6781 else
6782   echo "configure: failed program was:" >&5
6783   cat conftest.$ac_ext >&5
6784   rm -rf conftest*
6785   eval "ac_cv_lib_$ac_lib_var=no"
6786 fi
6787 rm -f conftest*
6788 xe_check_libs=""
6789
6790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6791   echo "$ac_t""yes" 1>&6
6792   :
6793 else
6794   echo "$ac_t""no" 1>&6
6795 with_xauth=no
6796 fi
6797
6798  }
6799 test -z "$with_xauth" && with_xauth=yes
6800 if test "$with_xauth" = "yes"; then
6801   { test "$extra_verbose" = "yes" && cat << \EOF
6802     Defining HAVE_XAUTH
6803 EOF
6804 cat >> confdefs.h <<\EOF
6805 #define HAVE_XAUTH 1
6806 EOF
6807 }
6808
6809   
6810 T=""
6811 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
6812 libs_xauth="$T"
6813
6814 fi
6815
6816
6817
6818
6819 if test "$with_tooltalk" != "no" ; then
6820       for dir in "" "Tt/" "desktop/" ; do
6821     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6822 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6823 echo "configure:6824: checking for ${dir}tt_c.h" >&5
6824
6825 cat > conftest.$ac_ext <<EOF
6826 #line 6827 "configure"
6827 #include "confdefs.h"
6828 #include <${dir}tt_c.h>
6829 EOF
6830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6831 { (eval echo configure:6832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6833 if test -z "$ac_err"; then
6834   rm -rf conftest*
6835   eval "ac_cv_header_$ac_safe=yes"
6836 else
6837   echo "$ac_err" >&5
6838   echo "configure: failed program was:" >&5
6839   cat conftest.$ac_ext >&5
6840   rm -rf conftest*
6841   eval "ac_cv_header_$ac_safe=no"
6842 fi
6843 rm -f conftest*
6844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6845   echo "$ac_t""yes" 1>&6
6846   tt_c_h_file="${dir}tt_c.h"; break
6847 else
6848   echo "$ac_t""no" 1>&6
6849 fi
6850
6851   done
6852   if test -z "$tt_c_h_file"; then
6853     if test "$with_tooltalk" = "yes"; then
6854       (echo "$progname: Usage error:"
6855 echo " " "Unable to find required tooltalk header files."
6856 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6857     fi
6858     with_tooltalk=no
6859   fi
6860 fi
6861 if test "$with_tooltalk" != "no" ; then
6862   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6863     
6864 xe_msg_checking="for tt_message_create in -ltt"
6865 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6866 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6867 echo "configure:6868: checking "$xe_msg_checking"" >&5
6868 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6869
6870 xe_check_libs=" -ltt $extra_libs"
6871 cat > conftest.$ac_ext <<EOF
6872 #line 6873 "configure"
6873 #include "confdefs.h"
6874 /* Override any gcc2 internal prototype to avoid an error.  */
6875 /* We use char because int might match the return type of a gcc2
6876     builtin and then its argument prototype would still apply.  */
6877 char tt_message_create();
6878
6879 int main() {
6880 tt_message_create()
6881 ; return 0; }
6882 EOF
6883 if { (eval echo configure:6884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6884   rm -rf conftest*
6885   eval "ac_cv_lib_$ac_lib_var=yes"
6886 else
6887   echo "configure: failed program was:" >&5
6888   cat conftest.$ac_ext >&5
6889   rm -rf conftest*
6890   eval "ac_cv_lib_$ac_lib_var=no"
6891 fi
6892 rm -f conftest*
6893 xe_check_libs=""
6894
6895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6896   echo "$ac_t""yes" 1>&6
6897   tt_libs="-ltt $extra_libs"; break
6898 else
6899   echo "$ac_t""no" 1>&6
6900 :
6901 fi
6902
6903
6904   done
6905   if test -z "$tt_libs"; then
6906     if test "$with_tooltalk" = "yes"; then
6907       (echo "$progname: Usage error:"
6908 echo " " "Unable to find required tooltalk libraries."
6909 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6910     fi
6911     with_tooltalk=no
6912   fi
6913 fi
6914 test -z "$with_tooltalk" && with_tooltalk=yes
6915 if test "$with_tooltalk" = "yes"; then
6916   { test "$extra_verbose" = "yes" && cat << \EOF
6917     Defining TOOLTALK
6918 EOF
6919 cat >> confdefs.h <<\EOF
6920 #define TOOLTALK 1
6921 EOF
6922 }
6923
6924   { test "$extra_verbose" = "yes" && cat << EOF
6925     Defining TT_C_H_FILE = "$tt_c_h_file"
6926 EOF
6927 cat >> confdefs.h <<EOF
6928 #define TT_C_H_FILE "$tt_c_h_file"
6929 EOF
6930 }
6931
6932   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6933   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6934    echo "    xemacs will be linked with \"tooltalk.o\""
6935  fi
6936 fi
6937
6938 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6939 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6940 echo "configure:6941: checking for Dt/Dt.h" >&5
6941
6942 cat > conftest.$ac_ext <<EOF
6943 #line 6944 "configure"
6944 #include "confdefs.h"
6945 #include <Dt/Dt.h>
6946 EOF
6947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6948 { (eval echo configure:6949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6950 if test -z "$ac_err"; then
6951   rm -rf conftest*
6952   eval "ac_cv_header_$ac_safe=yes"
6953 else
6954   echo "$ac_err" >&5
6955   echo "configure: failed program was:" >&5
6956   cat conftest.$ac_ext >&5
6957   rm -rf conftest*
6958   eval "ac_cv_header_$ac_safe=no"
6959 fi
6960 rm -f conftest*
6961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6962   echo "$ac_t""yes" 1>&6
6963   :
6964 else
6965   echo "$ac_t""no" 1>&6
6966 with_cde=no
6967 fi
6968  }
6969 test -z "$with_cde" && { 
6970 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6971 echo "configure:6972: checking for DtDndDragStart in -lDtSvc" >&5
6972 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6973
6974 xe_check_libs=" -lDtSvc "
6975 cat > conftest.$ac_ext <<EOF
6976 #line 6977 "configure"
6977 #include "confdefs.h"
6978 /* Override any gcc2 internal prototype to avoid an error.  */
6979 /* We use char because int might match the return type of a gcc2
6980     builtin and then its argument prototype would still apply.  */
6981 char DtDndDragStart();
6982
6983 int main() {
6984 DtDndDragStart()
6985 ; return 0; }
6986 EOF
6987 if { (eval echo configure:6988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6988   rm -rf conftest*
6989   eval "ac_cv_lib_$ac_lib_var=yes"
6990 else
6991   echo "configure: failed program was:" >&5
6992   cat conftest.$ac_ext >&5
6993   rm -rf conftest*
6994   eval "ac_cv_lib_$ac_lib_var=no"
6995 fi
6996 rm -f conftest*
6997 xe_check_libs=""
6998
6999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7000   echo "$ac_t""yes" 1>&6
7001   :
7002 else
7003   echo "$ac_t""no" 1>&6
7004 with_cde=no
7005 fi
7006
7007  }
7008 test -z "$with_cde" && with_cde=yes
7009 if test "$with_dragndrop" = no; then
7010   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7011   with_cde=no
7012 fi
7013 if test "$with_cde" = "yes" ; then
7014   { test "$extra_verbose" = "yes" && cat << \EOF
7015     Defining HAVE_CDE
7016 EOF
7017 cat >> confdefs.h <<\EOF
7018 #define HAVE_CDE 1
7019 EOF
7020 }
7021
7022   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7023   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7024   with_tooltalk=yes # CDE requires Tooltalk
7025   need_motif=yes    # CDE requires Motif
7026 fi
7027
7028 test "$window_system" != "x11" && with_offix=no
7029 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7030   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7031   with_offix=no
7032 fi
7033 if test "$with_dragndrop" = no; then
7034   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7035   with_offix=no
7036 fi
7037 if test "$with_cde" = yes; then
7038   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7039   with_offix=no
7040 fi
7041 test -z "$with_offix" && with_offix=no
7042 if test "$with_offix" = "yes"; then
7043   { test "$extra_verbose" = "yes" && cat << \EOF
7044     Defining HAVE_OFFIX_DND
7045 EOF
7046 cat >> confdefs.h <<\EOF
7047 #define HAVE_OFFIX_DND 1
7048 EOF
7049 }
7050
7051   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7052   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7053 fi
7054
7055 if test "$with_dragndrop" != "no" ; then
7056   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7057 echo "configure:7058: checking if drag and drop API is needed" >&5
7058   if test -n "$dragndrop_proto" ; then
7059     with_dragndrop=yes
7060     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7061     { test "$extra_verbose" = "yes" && cat << \EOF
7062     Defining HAVE_DRAGNDROP
7063 EOF
7064 cat >> confdefs.h <<\EOF
7065 #define HAVE_DRAGNDROP 1
7066 EOF
7067 }
7068
7069     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7070   else
7071     with_dragndrop=no
7072     echo "$ac_t""no" 1>&6
7073   fi
7074 fi
7075
7076 echo "checking for LDAP" 1>&6
7077 echo "configure:7078: checking for LDAP" >&5
7078 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7079 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7080 echo "configure:7081: checking for ldap.h" >&5
7081
7082 cat > conftest.$ac_ext <<EOF
7083 #line 7084 "configure"
7084 #include "confdefs.h"
7085 #include <ldap.h>
7086 EOF
7087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7088 { (eval echo configure:7089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7090 if test -z "$ac_err"; then
7091   rm -rf conftest*
7092   eval "ac_cv_header_$ac_safe=yes"
7093 else
7094   echo "$ac_err" >&5
7095   echo "configure: failed program was:" >&5
7096   cat conftest.$ac_ext >&5
7097   rm -rf conftest*
7098   eval "ac_cv_header_$ac_safe=no"
7099 fi
7100 rm -f conftest*
7101 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7102   echo "$ac_t""yes" 1>&6
7103   :
7104 else
7105   echo "$ac_t""no" 1>&6
7106 with_ldap=no
7107 fi
7108  }
7109 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7110 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7111 echo "configure:7112: checking for lber.h" >&5
7112
7113 cat > conftest.$ac_ext <<EOF
7114 #line 7115 "configure"
7115 #include "confdefs.h"
7116 #include <lber.h>
7117 EOF
7118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7119 { (eval echo configure:7120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7121 if test -z "$ac_err"; then
7122   rm -rf conftest*
7123   eval "ac_cv_header_$ac_safe=yes"
7124 else
7125   echo "$ac_err" >&5
7126   echo "configure: failed program was:" >&5
7127   cat conftest.$ac_ext >&5
7128   rm -rf conftest*
7129   eval "ac_cv_header_$ac_safe=no"
7130 fi
7131 rm -f conftest*
7132 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7133   echo "$ac_t""yes" 1>&6
7134   :
7135 else
7136   echo "$ac_t""no" 1>&6
7137 with_ldap=no
7138 fi
7139  }
7140 if test "$with_ldap" != "no"; then
7141   
7142 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7143 echo "configure:7144: checking for ldap_search in -lldap" >&5
7144 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7145
7146 xe_check_libs=" -lldap "
7147 cat > conftest.$ac_ext <<EOF
7148 #line 7149 "configure"
7149 #include "confdefs.h"
7150 /* Override any gcc2 internal prototype to avoid an error.  */
7151 /* We use char because int might match the return type of a gcc2
7152     builtin and then its argument prototype would still apply.  */
7153 char ldap_search();
7154
7155 int main() {
7156 ldap_search()
7157 ; return 0; }
7158 EOF
7159 if { (eval echo configure:7160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7160   rm -rf conftest*
7161   eval "ac_cv_lib_$ac_lib_var=yes"
7162 else
7163   echo "configure: failed program was:" >&5
7164   cat conftest.$ac_ext >&5
7165   rm -rf conftest*
7166   eval "ac_cv_lib_$ac_lib_var=no"
7167 fi
7168 rm -f conftest*
7169 xe_check_libs=""
7170
7171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7172   echo "$ac_t""yes" 1>&6
7173   with_ldap_nolber=yes
7174 else
7175   echo "$ac_t""no" 1>&6
7176 with_ldap_nolber=no
7177 fi
7178
7179
7180   test "$with_ldap_nolber" = "no" && { 
7181 xe_msg_checking="for ldap_open in -lldap"
7182 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7183 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7184 echo "configure:7185: checking "$xe_msg_checking"" >&5
7185 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7186
7187 xe_check_libs=" -lldap -llber"
7188 cat > conftest.$ac_ext <<EOF
7189 #line 7190 "configure"
7190 #include "confdefs.h"
7191 /* Override any gcc2 internal prototype to avoid an error.  */
7192 /* We use char because int might match the return type of a gcc2
7193     builtin and then its argument prototype would still apply.  */
7194 char ldap_open();
7195
7196 int main() {
7197 ldap_open()
7198 ; return 0; }
7199 EOF
7200 if { (eval echo configure:7201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7201   rm -rf conftest*
7202   eval "ac_cv_lib_$ac_lib_var=yes"
7203 else
7204   echo "configure: failed program was:" >&5
7205   cat conftest.$ac_ext >&5
7206   rm -rf conftest*
7207   eval "ac_cv_lib_$ac_lib_var=no"
7208 fi
7209 rm -f conftest*
7210 xe_check_libs=""
7211
7212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7213   echo "$ac_t""yes" 1>&6
7214   with_ldap_lber=yes
7215 else
7216   echo "$ac_t""no" 1>&6
7217 with_ldap_lber=no
7218 fi
7219
7220  }
7221   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7222 xe_msg_checking="for ldap_open in -lldap"
7223 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7224 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7225 echo "configure:7226: checking "$xe_msg_checking"" >&5
7226 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7227
7228 xe_check_libs=" -lldap -llber -lkrb"
7229 cat > conftest.$ac_ext <<EOF
7230 #line 7231 "configure"
7231 #include "confdefs.h"
7232 /* Override any gcc2 internal prototype to avoid an error.  */
7233 /* We use char because int might match the return type of a gcc2
7234     builtin and then its argument prototype would still apply.  */
7235 char ldap_open();
7236
7237 int main() {
7238 ldap_open()
7239 ; return 0; }
7240 EOF
7241 if { (eval echo configure:7242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7242   rm -rf conftest*
7243   eval "ac_cv_lib_$ac_lib_var=yes"
7244 else
7245   echo "configure: failed program was:" >&5
7246   cat conftest.$ac_ext >&5
7247   rm -rf conftest*
7248   eval "ac_cv_lib_$ac_lib_var=no"
7249 fi
7250 rm -f conftest*
7251 xe_check_libs=""
7252
7253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7254   echo "$ac_t""yes" 1>&6
7255   with_ldap_krb=yes
7256 else
7257   echo "$ac_t""no" 1>&6
7258 with_ldap_krb=no
7259 fi
7260
7261  }
7262   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7263 xe_msg_checking="for ldap_open in -lldap"
7264 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7265 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7266 echo "configure:7267: checking "$xe_msg_checking"" >&5
7267 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7268
7269 xe_check_libs=" -lldap -llber -lkrb -ldes"
7270 cat > conftest.$ac_ext <<EOF
7271 #line 7272 "configure"
7272 #include "confdefs.h"
7273 /* Override any gcc2 internal prototype to avoid an error.  */
7274 /* We use char because int might match the return type of a gcc2
7275     builtin and then its argument prototype would still apply.  */
7276 char ldap_open();
7277
7278 int main() {
7279 ldap_open()
7280 ; return 0; }
7281 EOF
7282 if { (eval echo configure:7283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7283   rm -rf conftest*
7284   eval "ac_cv_lib_$ac_lib_var=yes"
7285 else
7286   echo "configure: failed program was:" >&5
7287   cat conftest.$ac_ext >&5
7288   rm -rf conftest*
7289   eval "ac_cv_lib_$ac_lib_var=no"
7290 fi
7291 rm -f conftest*
7292 xe_check_libs=""
7293
7294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7295   echo "$ac_t""yes" 1>&6
7296   with_ldap_krbdes=yes
7297 else
7298   echo "$ac_t""no" 1>&6
7299 with_ldap_krbdes=no
7300 fi
7301
7302  }
7303   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
7304 fi
7305 if test "$with_ldap" = "yes"; then
7306   { test "$extra_verbose" = "yes" && cat << \EOF
7307     Defining HAVE_LDAP
7308 EOF
7309 cat >> confdefs.h <<\EOF
7310 #define HAVE_LDAP 1
7311 EOF
7312 }
7313
7314   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7315    echo "    xemacs will be linked with \"eldap.o\""
7316  fi
7317   if test "$with_ldap_nolber" = "yes" ; then
7318     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7319   else
7320     if test "$with_ldap_krb" = "yes" ; then
7321       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7322     fi
7323     if test "$with_ldap_krbdes" = "yes" ; then
7324       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7325       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7326     fi
7327     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7328     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7329   fi
7330   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7331 do
7332 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7333 echo "configure:7334: checking for $ac_func" >&5
7334
7335 cat > conftest.$ac_ext <<EOF
7336 #line 7337 "configure"
7337 #include "confdefs.h"
7338 /* System header to define __stub macros and hopefully few prototypes,
7339     which can conflict with char $ac_func(); below.  */
7340 #include <assert.h>
7341 /* Override any gcc2 internal prototype to avoid an error.  */
7342 /* We use char because int might match the return type of a gcc2
7343     builtin and then its argument prototype would still apply.  */
7344 char $ac_func();
7345
7346 int main() {
7347
7348 /* The GNU C library defines this for functions which it implements
7349     to always fail with ENOSYS.  Some functions are actually named
7350     something starting with __ and the normal name is an alias.  */
7351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7352 choke me
7353 #else
7354 $ac_func();
7355 #endif
7356
7357 ; return 0; }
7358 EOF
7359 if { (eval echo configure:7360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7360   rm -rf conftest*
7361   eval "ac_cv_func_$ac_func=yes"
7362 else
7363   echo "configure: failed program was:" >&5
7364   cat conftest.$ac_ext >&5
7365   rm -rf conftest*
7366   eval "ac_cv_func_$ac_func=no"
7367 fi
7368 rm -f conftest*
7369
7370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7371   echo "$ac_t""yes" 1>&6
7372     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7373   { test "$extra_verbose" = "yes" && cat << EOF
7374     Defining $ac_tr_func
7375 EOF
7376 cat >> confdefs.h <<EOF
7377 #define $ac_tr_func 1
7378 EOF
7379 }
7380  
7381 else
7382   echo "$ac_t""no" 1>&6
7383 fi
7384 done
7385
7386 fi
7387
7388 if test "$with_postgresql" != "no"; then
7389   echo "checking for PostgreSQL" 1>&6
7390 echo "configure:7391: checking for PostgreSQL" >&5
7391
7392   for header_dir in "" "pgsql/" "postgresql/"; do
7393     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7394 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7395 echo "configure:7396: checking for ${header_dir}libpq-fe.h" >&5
7396
7397 cat > conftest.$ac_ext <<EOF
7398 #line 7399 "configure"
7399 #include "confdefs.h"
7400 #include <${header_dir}libpq-fe.h>
7401 EOF
7402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7403 { (eval echo configure:7404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7405 if test -z "$ac_err"; then
7406   rm -rf conftest*
7407   eval "ac_cv_header_$ac_safe=yes"
7408 else
7409   echo "$ac_err" >&5
7410   echo "configure: failed program was:" >&5
7411   cat conftest.$ac_ext >&5
7412   rm -rf conftest*
7413   eval "ac_cv_header_$ac_safe=no"
7414 fi
7415 rm -f conftest*
7416 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7417   echo "$ac_t""yes" 1>&6
7418   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7419 else
7420   echo "$ac_t""no" 1>&6
7421 fi
7422
7423   done
7424
7425   test -n "$libpq_fe_h_file" && { 
7426 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7427 echo "configure:7428: checking for PQconnectdb in -lpq" >&5
7428 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7429
7430 xe_check_libs=" -lpq "
7431 cat > conftest.$ac_ext <<EOF
7432 #line 7433 "configure"
7433 #include "confdefs.h"
7434 /* Override any gcc2 internal prototype to avoid an error.  */
7435 /* We use char because int might match the return type of a gcc2
7436     builtin and then its argument prototype would still apply.  */
7437 char PQconnectdb();
7438
7439 int main() {
7440 PQconnectdb()
7441 ; return 0; }
7442 EOF
7443 if { (eval echo configure:7444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7444   rm -rf conftest*
7445   eval "ac_cv_lib_$ac_lib_var=yes"
7446 else
7447   echo "configure: failed program was:" >&5
7448   cat conftest.$ac_ext >&5
7449   rm -rf conftest*
7450   eval "ac_cv_lib_$ac_lib_var=no"
7451 fi
7452 rm -f conftest*
7453 xe_check_libs=""
7454
7455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7456   echo "$ac_t""yes" 1>&6
7457   have_libpq=yes
7458 else
7459   echo "$ac_t""no" 1>&6
7460 fi
7461
7462  }
7463
7464   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7465     with_postgresql=yes
7466     { test "$extra_verbose" = "yes" && cat << \EOF
7467     Defining HAVE_POSTGRESQL
7468 EOF
7469 cat >> confdefs.h <<\EOF
7470 #define HAVE_POSTGRESQL 1
7471 EOF
7472 }
7473
7474     
7475 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7476 echo "configure:7477: checking for PQconnectStart in -lpq" >&5
7477 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7478
7479 xe_check_libs=" -lpq "
7480 cat > conftest.$ac_ext <<EOF
7481 #line 7482 "configure"
7482 #include "confdefs.h"
7483 /* Override any gcc2 internal prototype to avoid an error.  */
7484 /* We use char because int might match the return type of a gcc2
7485     builtin and then its argument prototype would still apply.  */
7486 char PQconnectStart();
7487
7488 int main() {
7489 PQconnectStart()
7490 ; return 0; }
7491 EOF
7492 if { (eval echo configure:7493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7493   rm -rf conftest*
7494   eval "ac_cv_lib_$ac_lib_var=yes"
7495 else
7496   echo "configure: failed program was:" >&5
7497   cat conftest.$ac_ext >&5
7498   rm -rf conftest*
7499   eval "ac_cv_lib_$ac_lib_var=no"
7500 fi
7501 rm -f conftest*
7502 xe_check_libs=""
7503
7504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7505   echo "$ac_t""yes" 1>&6
7506   with_postgresqlv7=yes;
7507                  { test "$extra_verbose" = "yes" && cat << \EOF
7508     Defining HAVE_POSTGRESQLV7
7509 EOF
7510 cat >> confdefs.h <<\EOF
7511 #define HAVE_POSTGRESQLV7 1
7512 EOF
7513 }
7514
7515 else
7516   echo "$ac_t""no" 1>&6
7517 fi
7518
7519
7520     { test "$extra_verbose" = "yes" && cat << EOF
7521     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
7522 EOF
7523 cat >> confdefs.h <<EOF
7524 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
7525 EOF
7526 }
7527
7528     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7529     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7530    echo "    xemacs will be linked with \"postgresql.o\""
7531  fi
7532   elif test "$with_postgresql" = "yes"; then
7533     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
7534   fi
7535 fi
7536
7537
7538 if test "$window_system" != "none"; then
7539   echo "checking for graphics libraries" 1>&6
7540 echo "configure:7541: checking for graphics libraries" >&5
7541
7542     xpm_problem=""
7543   if test -z "$with_xpm"; then
7544     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7545 echo "configure:7546: checking for Xpm - no older than 3.4f" >&5
7546     xe_check_libs=-lXpm
7547     cat > conftest.$ac_ext <<EOF
7548 #line 7549 "configure"
7549 #include "confdefs.h"
7550 #define XPM_NUMBERS
7551 #include <X11/xpm.h>
7552     int main(int c, char **v) {
7553     return c == 1 ? 0 :
7554       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7555       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7556 EOF
7557 if { (eval echo configure:7558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7558 then
7559   ./conftest dummy_arg; xpm_status=$?;
7560       if test "$xpm_status" = "0"; then
7561         with_xpm=yes;
7562       else
7563         with_xpm=no;
7564         if test "$xpm_status" = "1"; then
7565           xpm_problem="Xpm library version and header file version don't match!"
7566         elif test "$xpm_status" = "2"; then
7567           xpm_problem="Xpm library version is too old!"
7568         else
7569           xpm_problem="Internal xpm detection logic error!"
7570         fi
7571         echo "
7572 *** WARNING *** $xpm_problem
7573   I'm not touching that with a 10-foot pole!
7574   If you really want to use the installed version of Xpm, rerun
7575   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7576     fi
7577 else
7578   conftest_rc="$?"
7579   echo "configure: failed program was:" >&5
7580   cat conftest.$ac_ext >&5
7581   rm -fr conftest*
7582   with_xpm=no
7583 fi
7584 rm -fr conftest*
7585     xe_check_libs=
7586     echo "$ac_t""$with_xpm" 1>&6
7587   fi
7588   if test "$with_xpm" = "yes"; then
7589     { test "$extra_verbose" = "yes" && cat << \EOF
7590     Defining HAVE_XPM
7591 EOF
7592 cat >> confdefs.h <<\EOF
7593 #define HAVE_XPM 1
7594 EOF
7595 }
7596
7597     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7598     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7599 echo "configure:7600: checking for \"FOR_MSW\" xpm" >&5
7600     xe_check_libs=-lXpm
7601     cat > conftest.$ac_ext <<EOF
7602 #line 7603 "configure"
7603 #include "confdefs.h"
7604
7605 int main() {
7606 XpmCreatePixmapFromData()
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   xpm_for_msw=no
7612 else
7613   echo "configure: failed program was:" >&5
7614   cat conftest.$ac_ext >&5
7615   rm -rf conftest*
7616   xpm_for_msw=yes
7617 fi
7618 rm -f conftest*
7619     xe_check_libs=
7620     echo "$ac_t""$xpm_for_msw" 1>&6
7621     if test "$xpm_for_msw" = "yes"; then
7622       { test "$extra_verbose" = "yes" && cat << \EOF
7623     Defining FOR_MSW
7624 EOF
7625 cat >> confdefs.h <<\EOF
7626 #define FOR_MSW 1
7627 EOF
7628 }
7629
7630     fi
7631   fi
7632
7633     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7634 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7635 echo "configure:7636: checking for compface.h" >&5
7636
7637 cat > conftest.$ac_ext <<EOF
7638 #line 7639 "configure"
7639 #include "confdefs.h"
7640 #include <compface.h>
7641 EOF
7642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7643 { (eval echo configure:7644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7645 if test -z "$ac_err"; then
7646   rm -rf conftest*
7647   eval "ac_cv_header_$ac_safe=yes"
7648 else
7649   echo "$ac_err" >&5
7650   echo "configure: failed program was:" >&5
7651   cat conftest.$ac_ext >&5
7652   rm -rf conftest*
7653   eval "ac_cv_header_$ac_safe=no"
7654 fi
7655 rm -f conftest*
7656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7657   echo "$ac_t""yes" 1>&6
7658   :
7659 else
7660   echo "$ac_t""no" 1>&6
7661 with_xface=no
7662 fi
7663  }
7664   test -z "$with_xface" && { 
7665 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7666 echo "configure:7667: checking for UnGenFace in -lcompface" >&5
7667 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7668
7669 xe_check_libs=" -lcompface "
7670 cat > conftest.$ac_ext <<EOF
7671 #line 7672 "configure"
7672 #include "confdefs.h"
7673 /* Override any gcc2 internal prototype to avoid an error.  */
7674 /* We use char because int might match the return type of a gcc2
7675     builtin and then its argument prototype would still apply.  */
7676 char UnGenFace();
7677
7678 int main() {
7679 UnGenFace()
7680 ; return 0; }
7681 EOF
7682 if { (eval echo configure:7683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7683   rm -rf conftest*
7684   eval "ac_cv_lib_$ac_lib_var=yes"
7685 else
7686   echo "configure: failed program was:" >&5
7687   cat conftest.$ac_ext >&5
7688   rm -rf conftest*
7689   eval "ac_cv_lib_$ac_lib_var=no"
7690 fi
7691 rm -f conftest*
7692 xe_check_libs=""
7693
7694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7695   echo "$ac_t""yes" 1>&6
7696   : 
7697 else
7698   echo "$ac_t""no" 1>&6
7699 with_xface=no
7700 fi
7701
7702  }
7703   test -z "$with_xface" && with_xface=yes
7704   if test "$with_xface" = "yes"; then
7705     { test "$extra_verbose" = "yes" && cat << \EOF
7706     Defining HAVE_XFACE
7707 EOF
7708 cat >> confdefs.h <<\EOF
7709 #define HAVE_XFACE 1
7710 EOF
7711 }
7712
7713     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7714   fi
7715
7716         if test "$with_gif" != "no"; then
7717     with_gif="yes"
7718     { test "$extra_verbose" = "yes" && cat << \EOF
7719     Defining HAVE_GIF
7720 EOF
7721 cat >> confdefs.h <<\EOF
7722 #define HAVE_GIF 1
7723 EOF
7724 }
7725
7726     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7727    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7728  fi
7729   fi
7730
7731       if test "$with_png $with_tiff" != "no no"; then
7732     
7733 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7734 echo "configure:7735: checking for inflate in -lc" >&5
7735 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7736
7737 xe_check_libs=" -lc "
7738 cat > conftest.$ac_ext <<EOF
7739 #line 7740 "configure"
7740 #include "confdefs.h"
7741 /* Override any gcc2 internal prototype to avoid an error.  */
7742 /* We use char because int might match the return type of a gcc2
7743     builtin and then its argument prototype would still apply.  */
7744 char inflate();
7745
7746 int main() {
7747 inflate()
7748 ; return 0; }
7749 EOF
7750 if { (eval echo configure:7751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7751   rm -rf conftest*
7752   eval "ac_cv_lib_$ac_lib_var=yes"
7753 else
7754   echo "configure: failed program was:" >&5
7755   cat conftest.$ac_ext >&5
7756   rm -rf conftest*
7757   eval "ac_cv_lib_$ac_lib_var=no"
7758 fi
7759 rm -f conftest*
7760 xe_check_libs=""
7761
7762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7763   echo "$ac_t""yes" 1>&6
7764   :
7765 else
7766   echo "$ac_t""no" 1>&6
7767
7768 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7769 echo "configure:7770: checking for inflate in -lz" >&5
7770 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7771
7772 xe_check_libs=" -lz "
7773 cat > conftest.$ac_ext <<EOF
7774 #line 7775 "configure"
7775 #include "confdefs.h"
7776 /* Override any gcc2 internal prototype to avoid an error.  */
7777 /* We use char because int might match the return type of a gcc2
7778     builtin and then its argument prototype would still apply.  */
7779 char inflate();
7780
7781 int main() {
7782 inflate()
7783 ; return 0; }
7784 EOF
7785 if { (eval echo configure:7786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7786   rm -rf conftest*
7787   eval "ac_cv_lib_$ac_lib_var=yes"
7788 else
7789   echo "configure: failed program was:" >&5
7790   cat conftest.$ac_ext >&5
7791   rm -rf conftest*
7792   eval "ac_cv_lib_$ac_lib_var=no"
7793 fi
7794 rm -f conftest*
7795 xe_check_libs=""
7796
7797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7798   echo "$ac_t""yes" 1>&6
7799   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7800 else
7801   echo "$ac_t""no" 1>&6
7802
7803 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7804 echo "configure:7805: checking for inflate in -lgz" >&5
7805 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7806
7807 xe_check_libs=" -lgz "
7808 cat > conftest.$ac_ext <<EOF
7809 #line 7810 "configure"
7810 #include "confdefs.h"
7811 /* Override any gcc2 internal prototype to avoid an error.  */
7812 /* We use char because int might match the return type of a gcc2
7813     builtin and then its argument prototype would still apply.  */
7814 char inflate();
7815
7816 int main() {
7817 inflate()
7818 ; return 0; }
7819 EOF
7820 if { (eval echo configure:7821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7821   rm -rf conftest*
7822   eval "ac_cv_lib_$ac_lib_var=yes"
7823 else
7824   echo "configure: failed program was:" >&5
7825   cat conftest.$ac_ext >&5
7826   rm -rf conftest*
7827   eval "ac_cv_lib_$ac_lib_var=no"
7828 fi
7829 rm -f conftest*
7830 xe_check_libs=""
7831
7832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7833   echo "$ac_t""yes" 1>&6
7834   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7835 else
7836   echo "$ac_t""no" 1>&6
7837 fi
7838
7839
7840 fi
7841
7842
7843 fi
7844
7845
7846   fi
7847
7848     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7849 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7850 echo "configure:7851: checking for jpeglib.h" >&5
7851
7852 cat > conftest.$ac_ext <<EOF
7853 #line 7854 "configure"
7854 #include "confdefs.h"
7855 #include <jpeglib.h>
7856 EOF
7857 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7858 { (eval echo configure:7859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7859 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7860 if test -z "$ac_err"; then
7861   rm -rf conftest*
7862   eval "ac_cv_header_$ac_safe=yes"
7863 else
7864   echo "$ac_err" >&5
7865   echo "configure: failed program was:" >&5
7866   cat conftest.$ac_ext >&5
7867   rm -rf conftest*
7868   eval "ac_cv_header_$ac_safe=no"
7869 fi
7870 rm -f conftest*
7871 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7872   echo "$ac_t""yes" 1>&6
7873   :
7874 else
7875   echo "$ac_t""no" 1>&6
7876 with_jpeg=no
7877 fi
7878  }
7879   test -z "$with_jpeg" && { 
7880 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7881 echo "configure:7882: checking for jpeg_destroy_decompress in -ljpeg" >&5
7882 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7883
7884 xe_check_libs=" -ljpeg "
7885 cat > conftest.$ac_ext <<EOF
7886 #line 7887 "configure"
7887 #include "confdefs.h"
7888 /* Override any gcc2 internal prototype to avoid an error.  */
7889 /* We use char because int might match the return type of a gcc2
7890     builtin and then its argument prototype would still apply.  */
7891 char jpeg_destroy_decompress();
7892
7893 int main() {
7894 jpeg_destroy_decompress()
7895 ; return 0; }
7896 EOF
7897 if { (eval echo configure:7898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7898   rm -rf conftest*
7899   eval "ac_cv_lib_$ac_lib_var=yes"
7900 else
7901   echo "configure: failed program was:" >&5
7902   cat conftest.$ac_ext >&5
7903   rm -rf conftest*
7904   eval "ac_cv_lib_$ac_lib_var=no"
7905 fi
7906 rm -f conftest*
7907 xe_check_libs=""
7908
7909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7910   echo "$ac_t""yes" 1>&6
7911   :
7912 else
7913   echo "$ac_t""no" 1>&6
7914 with_jpeg=no
7915 fi
7916
7917  }
7918   test -z "$with_jpeg" && with_jpeg=yes
7919   if test "$with_jpeg" = "yes"; then
7920     { test "$extra_verbose" = "yes" && cat << \EOF
7921     Defining HAVE_JPEG
7922 EOF
7923 cat >> confdefs.h <<\EOF
7924 #define HAVE_JPEG 1
7925 EOF
7926 }
7927
7928     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7929   fi
7930
7931     png_problem=""
7932   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7933 echo "configure:7934: checking for pow" >&5
7934
7935 cat > conftest.$ac_ext <<EOF
7936 #line 7937 "configure"
7937 #include "confdefs.h"
7938 /* System header to define __stub macros and hopefully few prototypes,
7939     which can conflict with char pow(); below.  */
7940 #include <assert.h>
7941 /* Override any gcc2 internal prototype to avoid an error.  */
7942 /* We use char because int might match the return type of a gcc2
7943     builtin and then its argument prototype would still apply.  */
7944 char pow();
7945
7946 int main() {
7947
7948 /* The GNU C library defines this for functions which it implements
7949     to always fail with ENOSYS.  Some functions are actually named
7950     something starting with __ and the normal name is an alias.  */
7951 #if defined (__stub_pow) || defined (__stub___pow)
7952 choke me
7953 #else
7954 pow();
7955 #endif
7956
7957 ; return 0; }
7958 EOF
7959 if { (eval echo configure:7960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7960   rm -rf conftest*
7961   eval "ac_cv_func_pow=yes"
7962 else
7963   echo "configure: failed program was:" >&5
7964   cat conftest.$ac_ext >&5
7965   rm -rf conftest*
7966   eval "ac_cv_func_pow=no"
7967 fi
7968 rm -f conftest*
7969
7970 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7971   echo "$ac_t""yes" 1>&6
7972   :
7973 else
7974   echo "$ac_t""no" 1>&6
7975 with_png=no
7976 fi
7977  }
7978   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7979 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7980 echo "configure:7981: checking for png.h" >&5
7981
7982 cat > conftest.$ac_ext <<EOF
7983 #line 7984 "configure"
7984 #include "confdefs.h"
7985 #include <png.h>
7986 EOF
7987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7988 { (eval echo configure:7989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7990 if test -z "$ac_err"; then
7991   rm -rf conftest*
7992   eval "ac_cv_header_$ac_safe=yes"
7993 else
7994   echo "$ac_err" >&5
7995   echo "configure: failed program was:" >&5
7996   cat conftest.$ac_ext >&5
7997   rm -rf conftest*
7998   eval "ac_cv_header_$ac_safe=no"
7999 fi
8000 rm -f conftest*
8001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8002   echo "$ac_t""yes" 1>&6
8003   :
8004 else
8005   echo "$ac_t""no" 1>&6
8006 with_png=no
8007 fi
8008  }
8009   test -z "$with_png" && { 
8010 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8011 echo "configure:8012: checking for png_read_image in -lpng" >&5
8012 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8013
8014 xe_check_libs=" -lpng "
8015 cat > conftest.$ac_ext <<EOF
8016 #line 8017 "configure"
8017 #include "confdefs.h"
8018 /* Override any gcc2 internal prototype to avoid an error.  */
8019 /* We use char because int might match the return type of a gcc2
8020     builtin and then its argument prototype would still apply.  */
8021 char png_read_image();
8022
8023 int main() {
8024 png_read_image()
8025 ; return 0; }
8026 EOF
8027 if { (eval echo configure:8028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8028   rm -rf conftest*
8029   eval "ac_cv_lib_$ac_lib_var=yes"
8030 else
8031   echo "configure: failed program was:" >&5
8032   cat conftest.$ac_ext >&5
8033   rm -rf conftest*
8034   eval "ac_cv_lib_$ac_lib_var=no"
8035 fi
8036 rm -f conftest*
8037 xe_check_libs=""
8038
8039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8040   echo "$ac_t""yes" 1>&6
8041   :
8042 else
8043   echo "$ac_t""no" 1>&6
8044 with_png=no
8045 fi
8046
8047  }
8048   if test -z "$with_png"; then
8049     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8050 echo "configure:8051: checking for workable png version information" >&5
8051     xe_check_libs="-lpng -lz"
8052     cat > conftest.$ac_ext <<EOF
8053 #line 8054 "configure"
8054 #include "confdefs.h"
8055 #include <png.h>
8056     int main(int c, char **v) {
8057     if (c == 1) return 0;
8058     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8059     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8060 EOF
8061 if { (eval echo configure:8062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8062 then
8063   ./conftest dummy_arg; png_status=$?;
8064       if test "$png_status" = "0"; then
8065         with_png=yes;
8066       else
8067         with_png=no;
8068         if test "$png_status" = "1"; then
8069           png_problem="PNG library version and header file don't match!"
8070         elif test "$png_status" = "2"; then
8071           png_problem="PNG library version too old (pre 1.0.2)!"
8072         fi
8073         echo "
8074 *** WARNING *** $png_problem
8075   I'm not touching that with a 10-foot pole!
8076   If you really want to use the installed version of libPNG, rerun
8077   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8078     fi
8079 else
8080   conftest_rc="$?"
8081   echo "configure: failed program was:" >&5
8082   cat conftest.$ac_ext >&5
8083   rm -fr conftest*
8084   with_png=no
8085 fi
8086 rm -fr conftest*
8087     xe_check_libs=
8088     echo "$ac_t""$with_png" 1>&6
8089   fi
8090   if test "$with_png" = "yes"; then
8091     { test "$extra_verbose" = "yes" && cat << \EOF
8092     Defining HAVE_PNG
8093 EOF
8094 cat >> confdefs.h <<\EOF
8095 #define HAVE_PNG 1
8096 EOF
8097 }
8098
8099     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8100   fi
8101
8102     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8103 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8104 echo "configure:8105: checking for tiffio.h" >&5
8105
8106 cat > conftest.$ac_ext <<EOF
8107 #line 8108 "configure"
8108 #include "confdefs.h"
8109 #include <tiffio.h>
8110 EOF
8111 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8112 { (eval echo configure:8113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8113 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8114 if test -z "$ac_err"; then
8115   rm -rf conftest*
8116   eval "ac_cv_header_$ac_safe=yes"
8117 else
8118   echo "$ac_err" >&5
8119   echo "configure: failed program was:" >&5
8120   cat conftest.$ac_ext >&5
8121   rm -rf conftest*
8122   eval "ac_cv_header_$ac_safe=no"
8123 fi
8124 rm -f conftest*
8125 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8126   echo "$ac_t""yes" 1>&6
8127   :
8128 else
8129   echo "$ac_t""no" 1>&6
8130 with_tiff=no
8131 fi
8132  }
8133   test -z "$with_tiff" && { 
8134 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8135 echo "configure:8136: checking for TIFFClientOpen in -ltiff" >&5
8136 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8137
8138 xe_check_libs=" -ltiff "
8139 cat > conftest.$ac_ext <<EOF
8140 #line 8141 "configure"
8141 #include "confdefs.h"
8142 /* Override any gcc2 internal prototype to avoid an error.  */
8143 /* We use char because int might match the return type of a gcc2
8144     builtin and then its argument prototype would still apply.  */
8145 char TIFFClientOpen();
8146
8147 int main() {
8148 TIFFClientOpen()
8149 ; return 0; }
8150 EOF
8151 if { (eval echo configure:8152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8152   rm -rf conftest*
8153   eval "ac_cv_lib_$ac_lib_var=yes"
8154 else
8155   echo "configure: failed program was:" >&5
8156   cat conftest.$ac_ext >&5
8157   rm -rf conftest*
8158   eval "ac_cv_lib_$ac_lib_var=no"
8159 fi
8160 rm -f conftest*
8161 xe_check_libs=""
8162
8163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8164   echo "$ac_t""yes" 1>&6
8165   :
8166 else
8167   echo "$ac_t""no" 1>&6
8168 with_tiff=no
8169 fi
8170
8171  }
8172   test -z "$with_tiff" && with_tiff=yes
8173   if test "$with_tiff" = "yes"; then
8174     { test "$extra_verbose" = "yes" && cat << \EOF
8175     Defining HAVE_TIFF
8176 EOF
8177 cat >> confdefs.h <<\EOF
8178 #define HAVE_TIFF 1
8179 EOF
8180 }
8181
8182     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8183   fi
8184 fi
8185
8186
8187 if test "$with_x11" = "yes"; then
8188
8189   echo "checking for X11 graphics libraries" 1>&6
8190 echo "configure:8191: checking for X11 graphics libraries" >&5
8191
8192   echo "checking for the Athena widgets" 1>&6
8193 echo "configure:8194: checking for the Athena widgets" >&5
8194
8195     case "$with_athena" in
8196         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8197     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8198     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8199     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8200     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8201     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8202   esac
8203
8204     if test "$athena_3d" = "no"; then
8205     
8206 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8207 echo "configure:8208: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8208 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8209
8210 xe_check_libs=" -l$athena_variant "
8211 cat > conftest.$ac_ext <<EOF
8212 #line 8213 "configure"
8213 #include "confdefs.h"
8214 /* Override any gcc2 internal prototype to avoid an error.  */
8215 /* We use char because int might match the return type of a gcc2
8216     builtin and then its argument prototype would still apply.  */
8217 char XawScrollbarSetThumb();
8218
8219 int main() {
8220 XawScrollbarSetThumb()
8221 ; return 0; }
8222 EOF
8223 if { (eval echo configure:8224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8224   rm -rf conftest*
8225   eval "ac_cv_lib_$ac_lib_var=yes"
8226 else
8227   echo "configure: failed program was:" >&5
8228   cat conftest.$ac_ext >&5
8229   rm -rf conftest*
8230   eval "ac_cv_lib_$ac_lib_var=no"
8231 fi
8232 rm -f conftest*
8233 xe_check_libs=""
8234
8235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8236   echo "$ac_t""yes" 1>&6
8237           
8238 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8239 echo "configure:8240: checking for threeDClassRec in -l$athena_variant" >&5
8240 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8241
8242 xe_check_libs=" -l$athena_variant "
8243 cat > conftest.$ac_ext <<EOF
8244 #line 8245 "configure"
8245 #include "confdefs.h"
8246 /* Override any gcc2 internal prototype to avoid an error.  */
8247 /* We use char because int might match the return type of a gcc2
8248     builtin and then its argument prototype would still apply.  */
8249 char threeDClassRec();
8250
8251 int main() {
8252 threeDClassRec()
8253 ; return 0; }
8254 EOF
8255 if { (eval echo configure:8256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8256   rm -rf conftest*
8257   eval "ac_cv_lib_$ac_lib_var=yes"
8258 else
8259   echo "configure: failed program was:" >&5
8260   cat conftest.$ac_ext >&5
8261   rm -rf conftest*
8262   eval "ac_cv_lib_$ac_lib_var=no"
8263 fi
8264 rm -f conftest*
8265 xe_check_libs=""
8266
8267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8268   echo "$ac_t""yes" 1>&6
8269   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8270 else
8271   echo "$ac_t""no" 1>&6
8272 athena_lib=$athena_variant
8273 fi
8274
8275
8276       
8277 else
8278   echo "$ac_t""no" 1>&6
8279 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8280 fi
8281
8282
8283   else
8284         
8285 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8286 echo "configure:8287: checking for threeDClassRec in -l$athena_variant" >&5
8287 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8288
8289 xe_check_libs=" -l$athena_variant "
8290 cat > conftest.$ac_ext <<EOF
8291 #line 8292 "configure"
8292 #include "confdefs.h"
8293 /* Override any gcc2 internal prototype to avoid an error.  */
8294 /* We use char because int might match the return type of a gcc2
8295     builtin and then its argument prototype would still apply.  */
8296 char threeDClassRec();
8297
8298 int main() {
8299 threeDClassRec()
8300 ; return 0; }
8301 EOF
8302 if { (eval echo configure:8303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8303   rm -rf conftest*
8304   eval "ac_cv_lib_$ac_lib_var=yes"
8305 else
8306   echo "configure: failed program was:" >&5
8307   cat conftest.$ac_ext >&5
8308   rm -rf conftest*
8309   eval "ac_cv_lib_$ac_lib_var=no"
8310 fi
8311 rm -f conftest*
8312 xe_check_libs=""
8313
8314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8315   echo "$ac_t""yes" 1>&6
8316   athena_lib=$athena_variant
8317 else
8318   echo "$ac_t""no" 1>&6
8319 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8320 echo "configure:8321: checking for threeDClassRec in -lXaw" >&5
8321 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8322
8323 xe_check_libs=" -lXaw "
8324 cat > conftest.$ac_ext <<EOF
8325 #line 8326 "configure"
8326 #include "confdefs.h"
8327 /* Override any gcc2 internal prototype to avoid an error.  */
8328 /* We use char because int might match the return type of a gcc2
8329     builtin and then its argument prototype would still apply.  */
8330 char threeDClassRec();
8331
8332 int main() {
8333 threeDClassRec()
8334 ; return 0; }
8335 EOF
8336 if { (eval echo configure:8337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8337   rm -rf conftest*
8338   eval "ac_cv_lib_$ac_lib_var=yes"
8339 else
8340   echo "configure: failed program was:" >&5
8341   cat conftest.$ac_ext >&5
8342   rm -rf conftest*
8343   eval "ac_cv_lib_$ac_lib_var=no"
8344 fi
8345 rm -f conftest*
8346 xe_check_libs=""
8347
8348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8349   echo "$ac_t""yes" 1>&6
8350   athena_lib=Xaw;
8351           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8352         
8353 else
8354   echo "$ac_t""no" 1>&6
8355 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8356 fi
8357
8358
8359 fi
8360
8361
8362   fi
8363
8364     if test "$athena_3d" = "no"; then
8365     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8366 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8367 echo "configure:8368: checking for X11/Xaw/ThreeD.h" >&5
8368
8369 cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 #include <X11/Xaw/ThreeD.h>
8373 EOF
8374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8375 { (eval echo configure:8376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8377 if test -z "$ac_err"; then
8378   rm -rf conftest*
8379   eval "ac_cv_header_$ac_safe=yes"
8380 else
8381   echo "$ac_err" >&5
8382   echo "configure: failed program was:" >&5
8383   cat conftest.$ac_ext >&5
8384   rm -rf conftest*
8385   eval "ac_cv_header_$ac_safe=no"
8386 fi
8387 rm -f conftest*
8388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8389   echo "$ac_t""yes" 1>&6
8390   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8391 else
8392   echo "$ac_t""no" 1>&6
8393 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8394 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8395 echo "configure:8396: checking for X11/Xaw/XawInit.h" >&5
8396
8397 cat > conftest.$ac_ext <<EOF
8398 #line 8399 "configure"
8399 #include "confdefs.h"
8400 #include <X11/Xaw/XawInit.h>
8401 EOF
8402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8403 { (eval echo configure:8404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8405 if test -z "$ac_err"; then
8406   rm -rf conftest*
8407   eval "ac_cv_header_$ac_safe=yes"
8408 else
8409   echo "$ac_err" >&5
8410   echo "configure: failed program was:" >&5
8411   cat conftest.$ac_ext >&5
8412   rm -rf conftest*
8413   eval "ac_cv_header_$ac_safe=no"
8414 fi
8415 rm -f conftest*
8416 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8417   echo "$ac_t""yes" 1>&6
8418   athena_h_path=X11/Xaw
8419 else
8420   echo "$ac_t""no" 1>&6
8421 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8422 fi
8423
8424 fi
8425
8426   else
8427             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8428 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8429 echo "configure:8430: checking for X11/$athena_variant/XawInit.h" >&5
8430
8431 cat > conftest.$ac_ext <<EOF
8432 #line 8433 "configure"
8433 #include "confdefs.h"
8434 #include <X11/$athena_variant/XawInit.h>
8435 EOF
8436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8437 { (eval echo configure:8438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8439 if test -z "$ac_err"; then
8440   rm -rf conftest*
8441   eval "ac_cv_header_$ac_safe=yes"
8442 else
8443   echo "$ac_err" >&5
8444   echo "configure: failed program was:" >&5
8445   cat conftest.$ac_ext >&5
8446   rm -rf conftest*
8447   eval "ac_cv_header_$ac_safe=no"
8448 fi
8449 rm -f conftest*
8450 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8451   echo "$ac_t""yes" 1>&6
8452   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8453 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8454 echo "configure:8455: checking for X11/$athena_variant/ThreeD.h" >&5
8455
8456 cat > conftest.$ac_ext <<EOF
8457 #line 8458 "configure"
8458 #include "confdefs.h"
8459 #include <X11/$athena_variant/ThreeD.h>
8460 EOF
8461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8462 { (eval echo configure:8463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8464 if test -z "$ac_err"; then
8465   rm -rf conftest*
8466   eval "ac_cv_header_$ac_safe=yes"
8467 else
8468   echo "$ac_err" >&5
8469   echo "configure: failed program was:" >&5
8470   cat conftest.$ac_ext >&5
8471   rm -rf conftest*
8472   eval "ac_cv_header_$ac_safe=no"
8473 fi
8474 rm -f conftest*
8475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8476   echo "$ac_t""yes" 1>&6
8477   athena_h_path=X11/$athena_variant
8478 else
8479   echo "$ac_t""no" 1>&6
8480 fi
8481
8482 else
8483   echo "$ac_t""no" 1>&6
8484 fi
8485
8486
8487         if test -z "$athena_h_path"; then
8488       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8489 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8490 echo "configure:8491: checking for $athena_variant/XawInit.h" >&5
8491
8492 cat > conftest.$ac_ext <<EOF
8493 #line 8494 "configure"
8494 #include "confdefs.h"
8495 #include <$athena_variant/XawInit.h>
8496 EOF
8497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8498 { (eval echo configure:8499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8500 if test -z "$ac_err"; then
8501   rm -rf conftest*
8502   eval "ac_cv_header_$ac_safe=yes"
8503 else
8504   echo "$ac_err" >&5
8505   echo "configure: failed program was:" >&5
8506   cat conftest.$ac_ext >&5
8507   rm -rf conftest*
8508   eval "ac_cv_header_$ac_safe=no"
8509 fi
8510 rm -f conftest*
8511 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8512   echo "$ac_t""yes" 1>&6
8513   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8514 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8515 echo "configure:8516: checking for $athena_variant/ThreeD.h" >&5
8516
8517 cat > conftest.$ac_ext <<EOF
8518 #line 8519 "configure"
8519 #include "confdefs.h"
8520 #include <$athena_variant/ThreeD.h>
8521 EOF
8522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8523 { (eval echo configure:8524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8525 if test -z "$ac_err"; then
8526   rm -rf conftest*
8527   eval "ac_cv_header_$ac_safe=yes"
8528 else
8529   echo "$ac_err" >&5
8530   echo "configure: failed program was:" >&5
8531   cat conftest.$ac_ext >&5
8532   rm -rf conftest*
8533   eval "ac_cv_header_$ac_safe=no"
8534 fi
8535 rm -f conftest*
8536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8537   echo "$ac_t""yes" 1>&6
8538   athena_h_path=$athena_variant
8539 else
8540   echo "$ac_t""no" 1>&6
8541 fi
8542
8543 else
8544   echo "$ac_t""no" 1>&6
8545 fi
8546
8547     fi
8548
8549         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8550       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8551 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8552 echo "configure:8553: checking for X11/Xaw3d/XawInit.h" >&5
8553
8554 cat > conftest.$ac_ext <<EOF
8555 #line 8556 "configure"
8556 #include "confdefs.h"
8557 #include <X11/Xaw3d/XawInit.h>
8558 EOF
8559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8560 { (eval echo configure:8561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8562 if test -z "$ac_err"; then
8563   rm -rf conftest*
8564   eval "ac_cv_header_$ac_safe=yes"
8565 else
8566   echo "$ac_err" >&5
8567   echo "configure: failed program was:" >&5
8568   cat conftest.$ac_ext >&5
8569   rm -rf conftest*
8570   eval "ac_cv_header_$ac_safe=no"
8571 fi
8572 rm -f conftest*
8573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8574   echo "$ac_t""yes" 1>&6
8575   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8576 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8577 echo "configure:8578: checking for X11/Xaw3d/ThreeD.h" >&5
8578
8579 cat > conftest.$ac_ext <<EOF
8580 #line 8581 "configure"
8581 #include "confdefs.h"
8582 #include <X11/Xaw3d/ThreeD.h>
8583 EOF
8584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8585 { (eval echo configure:8586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8587 if test -z "$ac_err"; then
8588   rm -rf conftest*
8589   eval "ac_cv_header_$ac_safe=yes"
8590 else
8591   echo "$ac_err" >&5
8592   echo "configure: failed program was:" >&5
8593   cat conftest.$ac_ext >&5
8594   rm -rf conftest*
8595   eval "ac_cv_header_$ac_safe=no"
8596 fi
8597 rm -f conftest*
8598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8599   echo "$ac_t""yes" 1>&6
8600   
8601             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8602             athena_h_path=X11/Xaw3d
8603           
8604 else
8605   echo "$ac_t""no" 1>&6
8606 fi
8607
8608 else
8609   echo "$ac_t""no" 1>&6
8610 fi
8611
8612     fi
8613
8614         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8615       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8616 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8617 echo "configure:8618: checking for Xaw3d/XawInit.h" >&5
8618
8619 cat > conftest.$ac_ext <<EOF
8620 #line 8621 "configure"
8621 #include "confdefs.h"
8622 #include <Xaw3d/XawInit.h>
8623 EOF
8624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8625 { (eval echo configure:8626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8627 if test -z "$ac_err"; then
8628   rm -rf conftest*
8629   eval "ac_cv_header_$ac_safe=yes"
8630 else
8631   echo "$ac_err" >&5
8632   echo "configure: failed program was:" >&5
8633   cat conftest.$ac_ext >&5
8634   rm -rf conftest*
8635   eval "ac_cv_header_$ac_safe=no"
8636 fi
8637 rm -f conftest*
8638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8639   echo "$ac_t""yes" 1>&6
8640   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8641 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8642 echo "configure:8643: checking for Xaw3d/ThreeD.h" >&5
8643
8644 cat > conftest.$ac_ext <<EOF
8645 #line 8646 "configure"
8646 #include "confdefs.h"
8647 #include <Xaw3d/ThreeD.h>
8648 EOF
8649 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8650 { (eval echo configure:8651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8651 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8652 if test -z "$ac_err"; then
8653   rm -rf conftest*
8654   eval "ac_cv_header_$ac_safe=yes"
8655 else
8656   echo "$ac_err" >&5
8657   echo "configure: failed program was:" >&5
8658   cat conftest.$ac_ext >&5
8659   rm -rf conftest*
8660   eval "ac_cv_header_$ac_safe=no"
8661 fi
8662 rm -f conftest*
8663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8664   echo "$ac_t""yes" 1>&6
8665   
8666             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8667             athena_h_path=Xaw3d
8668           
8669 else
8670   echo "$ac_t""no" 1>&6
8671 fi
8672
8673 else
8674   echo "$ac_t""no" 1>&6
8675 fi
8676
8677     fi
8678
8679             if test -z "$athena_h_path"; then
8680       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8681 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8682 echo "configure:8683: checking for X11/Xaw/ThreeD.h" >&5
8683
8684 cat > conftest.$ac_ext <<EOF
8685 #line 8686 "configure"
8686 #include "confdefs.h"
8687 #include <X11/Xaw/ThreeD.h>
8688 EOF
8689 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8690 { (eval echo configure:8691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8691 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8692 if test -z "$ac_err"; then
8693   rm -rf conftest*
8694   eval "ac_cv_header_$ac_safe=yes"
8695 else
8696   echo "$ac_err" >&5
8697   echo "configure: failed program was:" >&5
8698   cat conftest.$ac_ext >&5
8699   rm -rf conftest*
8700   eval "ac_cv_header_$ac_safe=no"
8701 fi
8702 rm -f conftest*
8703 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8704   echo "$ac_t""yes" 1>&6
8705   
8706           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8707           athena_h_path=X11/Xaw
8708         
8709 else
8710   echo "$ac_t""no" 1>&6
8711 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8712 fi
8713
8714     fi
8715   fi
8716
8717     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8718     have_xaw=yes
8719   else
8720     have_xaw=no
8721   fi
8722
8723     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8724 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8725 echo "configure:8726: checking for Xm/Xm.h" >&5
8726
8727 cat > conftest.$ac_ext <<EOF
8728 #line 8729 "configure"
8729 #include "confdefs.h"
8730 #include <Xm/Xm.h>
8731 EOF
8732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8733 { (eval echo configure:8734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8735 if test -z "$ac_err"; then
8736   rm -rf conftest*
8737   eval "ac_cv_header_$ac_safe=yes"
8738 else
8739   echo "$ac_err" >&5
8740   echo "configure: failed program was:" >&5
8741   cat conftest.$ac_ext >&5
8742   rm -rf conftest*
8743   eval "ac_cv_header_$ac_safe=no"
8744 fi
8745 rm -f conftest*
8746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8747   echo "$ac_t""yes" 1>&6
8748   
8749 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8750 echo "configure:8751: checking for XmStringFree in -lXm" >&5
8751 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8752
8753 xe_check_libs=" -lXm "
8754 cat > conftest.$ac_ext <<EOF
8755 #line 8756 "configure"
8756 #include "confdefs.h"
8757 /* Override any gcc2 internal prototype to avoid an error.  */
8758 /* We use char because int might match the return type of a gcc2
8759     builtin and then its argument prototype would still apply.  */
8760 char XmStringFree();
8761
8762 int main() {
8763 XmStringFree()
8764 ; return 0; }
8765 EOF
8766 if { (eval echo configure:8767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8767   rm -rf conftest*
8768   eval "ac_cv_lib_$ac_lib_var=yes"
8769 else
8770   echo "configure: failed program was:" >&5
8771   cat conftest.$ac_ext >&5
8772   rm -rf conftest*
8773   eval "ac_cv_lib_$ac_lib_var=no"
8774 fi
8775 rm -f conftest*
8776 xe_check_libs=""
8777
8778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8779   echo "$ac_t""yes" 1>&6
8780   have_motif=yes
8781 else
8782   echo "$ac_t""no" 1>&6
8783 have_motif=no
8784 fi
8785
8786
8787 else
8788   echo "$ac_t""no" 1>&6
8789 have_motif=no
8790 fi
8791
8792
8793   if test "$have_motif" = "yes"; then
8794         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8795 echo "configure:8796: checking for Lesstif" >&5
8796     cat > conftest.$ac_ext <<EOF
8797 #line 8798 "configure"
8798 #include "confdefs.h"
8799 #include <Xm/Xm.h>
8800 #ifdef LESSTIF_VERSION
8801 yes
8802 #endif
8803
8804 EOF
8805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8806   egrep "yes" >/dev/null 2>&1; then
8807   rm -rf conftest*
8808   have_lesstif=yes
8809 else
8810   rm -rf conftest*
8811   have_lesstif=no
8812 fi
8813 rm -f conftest*
8814
8815   echo "$ac_t""$have_lesstif" 1>&6
8816   fi
8817
8818 fi 
8819
8820 case "$with_menubars" in "" | "yes" | "athena" )
8821   with_menubars="lucid" ;;
8822 esac
8823 case "$with_dialogs" in "" | "yes" | "lucid" )
8824   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8825   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8826   else with_dialogs=no
8827   fi ;;
8828 esac
8829 case "$with_scrollbars" in "" | "yes" )
8830   with_scrollbars="lucid" ;;
8831 esac
8832 case "$with_widgets" in "" | "yes" | "lucid")
8833   if   test "$have_motif" = "yes"; then with_widgets="motif"
8834   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8835   else with_widgets=no
8836   fi ;;
8837 esac
8838
8839 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8840
8841 case "$all_widgets" in
8842   *athena* )
8843     if test "$have_xaw" != "yes"; then
8844       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8845     fi
8846
8847         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8848
8849         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8850
8851                     { test "$extra_verbose" = "yes" && cat << EOF
8852     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
8853 EOF
8854 cat >> confdefs.h <<EOF
8855 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
8856 EOF
8857 }
8858
8859     { test "$extra_verbose" = "yes" && cat << EOF
8860     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
8861 EOF
8862 cat >> confdefs.h <<EOF
8863 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
8864 EOF
8865 }
8866
8867     { test "$extra_verbose" = "yes" && cat << EOF
8868     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
8869 EOF
8870 cat >> confdefs.h <<EOF
8871 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
8872 EOF
8873 }
8874
8875     { test "$extra_verbose" = "yes" && cat << EOF
8876     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
8877 EOF
8878 cat >> confdefs.h <<EOF
8879 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
8880 EOF
8881 }
8882
8883     { test "$extra_verbose" = "yes" && cat << EOF
8884     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
8885 EOF
8886 cat >> confdefs.h <<EOF
8887 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
8888 EOF
8889 }
8890
8891     { test "$extra_verbose" = "yes" && cat << EOF
8892     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
8893 EOF
8894 cat >> confdefs.h <<EOF
8895 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
8896 EOF
8897 }
8898
8899     { test "$extra_verbose" = "yes" && cat << EOF
8900     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
8901 EOF
8902 cat >> confdefs.h <<EOF
8903 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
8904 EOF
8905 }
8906
8907     { test "$extra_verbose" = "yes" && cat << EOF
8908     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
8909 EOF
8910 cat >> confdefs.h <<EOF
8911 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
8912 EOF
8913 }
8914
8915     { test "$extra_verbose" = "yes" && cat << EOF
8916     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
8917 EOF
8918 cat >> confdefs.h <<EOF
8919 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
8920 EOF
8921 }
8922
8923     { test "$extra_verbose" = "yes" && cat << EOF
8924     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
8925 EOF
8926 cat >> confdefs.h <<EOF
8927 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
8928 EOF
8929 }
8930
8931
8932     { test "$extra_verbose" = "yes" && cat << \EOF
8933     Defining LWLIB_USES_ATHENA
8934 EOF
8935 cat >> confdefs.h <<\EOF
8936 #define LWLIB_USES_ATHENA 1
8937 EOF
8938 }
8939
8940     { test "$extra_verbose" = "yes" && cat << \EOF
8941     Defining NEED_ATHENA
8942 EOF
8943 cat >> confdefs.h <<\EOF
8944 #define NEED_ATHENA 1
8945 EOF
8946 }
8947
8948     need_athena="yes"
8949
8950     if test "$athena_3d" = "yes"; then
8951       { test "$extra_verbose" = "yes" && cat << \EOF
8952     Defining HAVE_ATHENA_3D
8953 EOF
8954 cat >> confdefs.h <<\EOF
8955 #define HAVE_ATHENA_3D 1
8956 EOF
8957 }
8958
8959     fi
8960   ;;
8961 esac
8962
8963 case "$all_widgets" in *motif* )
8964   { test "$extra_verbose" = "yes" && cat << \EOF
8965     Defining LWLIB_USES_MOTIF
8966 EOF
8967 cat >> confdefs.h <<\EOF
8968 #define LWLIB_USES_MOTIF 1
8969 EOF
8970 }
8971
8972   { test "$extra_verbose" = "yes" && cat << \EOF
8973     Defining NEED_MOTIF
8974 EOF
8975 cat >> confdefs.h <<\EOF
8976 #define NEED_MOTIF 1
8977 EOF
8978 }
8979
8980   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8981   need_motif=yes ;;
8982 esac
8983
8984 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8985 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8986 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8987 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8988         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8989 case "$with_widgets" in athena* )
8990         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;;
8991 esac
8992 case "$all_widgets" in *lucid* )
8993   { test "$extra_verbose" = "yes" && cat << \EOF
8994     Defining NEED_LUCID
8995 EOF
8996 cat >> confdefs.h <<\EOF
8997 #define NEED_LUCID 1
8998 EOF
8999 }
9000
9001   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9002 esac
9003
9004
9005
9006 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9007     Defining LWLIB_SCROLLBARS_ATHENA
9008 EOF
9009 cat >> confdefs.h <<\EOF
9010 #define LWLIB_SCROLLBARS_ATHENA 1
9011 EOF
9012 }
9013
9014 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9015     Defining LWLIB_DIALOGS_ATHENA
9016 EOF
9017 cat >> confdefs.h <<\EOF
9018 #define LWLIB_DIALOGS_ATHENA 1
9019 EOF
9020 }
9021
9022
9023 if test "$athena_3d" = "yes"; then
9024   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9025     Defining LWLIB_SCROLLBARS_ATHENA3D
9026 EOF
9027 cat >> confdefs.h <<\EOF
9028 #define LWLIB_SCROLLBARS_ATHENA3D 1
9029 EOF
9030 }
9031
9032   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9033     Defining LWLIB_DIALOGS_ATHENA3D
9034 EOF
9035 cat >> confdefs.h <<\EOF
9036 #define LWLIB_DIALOGS_ATHENA3D 1
9037 EOF
9038 }
9039
9040 fi
9041
9042 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9043     Defining LWLIB_WIDGETS_ATHENA
9044 EOF
9045 cat >> confdefs.h <<\EOF
9046 #define LWLIB_WIDGETS_ATHENA 1
9047 EOF
9048 }
9049 ;; esac
9050 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9051         { test "$extra_verbose" = "yes" && cat << \EOF
9052     Defining LWLIB_TABS_LUCID
9053 EOF
9054 cat >> confdefs.h <<\EOF
9055 #define LWLIB_TABS_LUCID 1
9056 EOF
9057 }
9058
9059
9060 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9061     Defining HAVE_MENUBARS
9062 EOF
9063 cat >> confdefs.h <<\EOF
9064 #define HAVE_MENUBARS 1
9065 EOF
9066 }
9067
9068 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9069     Defining HAVE_SCROLLBARS
9070 EOF
9071 cat >> confdefs.h <<\EOF
9072 #define HAVE_SCROLLBARS 1
9073 EOF
9074 }
9075
9076 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9077     Defining HAVE_DIALOGS
9078 EOF
9079 cat >> confdefs.h <<\EOF
9080 #define HAVE_DIALOGS 1
9081 EOF
9082 }
9083
9084 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9085     Defining HAVE_TOOLBARS
9086 EOF
9087 cat >> confdefs.h <<\EOF
9088 #define HAVE_TOOLBARS 1
9089 EOF
9090 }
9091
9092 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9093     Defining HAVE_WIDGETS
9094 EOF
9095 cat >> confdefs.h <<\EOF
9096 #define HAVE_WIDGETS 1
9097 EOF
9098 }
9099
9100
9101 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9102     Defining LWLIB_MENUBARS_LUCID
9103 EOF
9104 cat >> confdefs.h <<\EOF
9105 #define LWLIB_MENUBARS_LUCID 1
9106 EOF
9107 }
9108
9109 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9110     Defining LWLIB_SCROLLBARS_LUCID
9111 EOF
9112 cat >> confdefs.h <<\EOF
9113 #define LWLIB_SCROLLBARS_LUCID 1
9114 EOF
9115 }
9116
9117
9118 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9119     Defining LWLIB_MENUBARS_MOTIF
9120 EOF
9121 cat >> confdefs.h <<\EOF
9122 #define LWLIB_MENUBARS_MOTIF 1
9123 EOF
9124 }
9125
9126 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9127     Defining LWLIB_SCROLLBARS_MOTIF
9128 EOF
9129 cat >> confdefs.h <<\EOF
9130 #define LWLIB_SCROLLBARS_MOTIF 1
9131 EOF
9132 }
9133
9134 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9135     Defining LWLIB_DIALOGS_MOTIF
9136 EOF
9137 cat >> confdefs.h <<\EOF
9138 #define LWLIB_DIALOGS_MOTIF 1
9139 EOF
9140 }
9141
9142 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9143     Defining LWLIB_WIDGETS_MOTIF
9144 EOF
9145 cat >> confdefs.h <<\EOF
9146 #define LWLIB_WIDGETS_MOTIF 1
9147 EOF
9148 }
9149
9150
9151 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9152    echo "    xemacs will be linked with \"menubar.o\""
9153  fi
9154 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9155    echo "    xemacs will be linked with \"scrollbar.o\""
9156  fi
9157 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9158    echo "    xemacs will be linked with \"dialog.o\""
9159  fi
9160 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9161    echo "    xemacs will be linked with \"toolbar.o\""
9162  fi
9163
9164 if test "$with_x11" = "yes"; then
9165   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9166    echo "    xemacs will be linked with \"menubar-x.o\""
9167  fi
9168   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9169    echo "    xemacs will be linked with \"scrollbar-x.o\""
9170  fi
9171   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9172    echo "    xemacs will be linked with \"dialog-x.o\""
9173  fi
9174   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9175    echo "    xemacs will be linked with \"toolbar-x.o\""
9176  fi
9177   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9178    echo "    xemacs will be linked with \"gui-x.o\""
9179  fi
9180 fi
9181
9182
9183 test -z "$with_mule" && with_mule=no
9184 test -z "$with_file_coding" && with_file_coding=no
9185
9186
9187 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9188   { test "$extra_verbose" = "yes" && cat << \EOF
9189     Defining FILE_CODING
9190 EOF
9191 cat >> confdefs.h <<\EOF
9192 #define FILE_CODING 1
9193 EOF
9194 }
9195
9196   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9197    echo "    xemacs will be linked with \"file-coding.o\""
9198  fi
9199 fi
9200
9201 if test "$with_mule" = "yes" ; then
9202   echo "checking for Mule-related features" 1>&6
9203 echo "configure:9204: checking for Mule-related features" >&5
9204   { test "$extra_verbose" = "yes" && cat << \EOF
9205     Defining MULE
9206 EOF
9207 cat >> confdefs.h <<\EOF
9208 #define MULE 1
9209 EOF
9210 }
9211
9212   { test "$extra_verbose" = "yes" && cat << \EOF
9213     Defining FILE_CODING
9214 EOF
9215 cat >> confdefs.h <<\EOF
9216 #define FILE_CODING 1
9217 EOF
9218 }
9219
9220   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9221    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9222  fi
9223   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9224     { test "$extra_verbose" = "yes" && cat << \EOF
9225     Defining TEXT_CODING
9226 EOF
9227 cat >> confdefs.h <<\EOF
9228 #define TEXT_CODING 1
9229 EOF
9230 }
9231
9232     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9233    echo "    xemacs will be linked with \"text-coding.o\""
9234  fi
9235   else
9236     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9237    echo "    xemacs will be linked with \"file-coding.o\""
9238  fi
9239   fi
9240     for ac_hdr in libintl.h
9241 do
9242 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9243 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9244 echo "configure:9245: checking for $ac_hdr" >&5
9245
9246 cat > conftest.$ac_ext <<EOF
9247 #line 9248 "configure"
9248 #include "confdefs.h"
9249 #include <$ac_hdr>
9250 EOF
9251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9252 { (eval echo configure:9253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9254 if test -z "$ac_err"; then
9255   rm -rf conftest*
9256   eval "ac_cv_header_$ac_safe=yes"
9257 else
9258   echo "$ac_err" >&5
9259   echo "configure: failed program was:" >&5
9260   cat conftest.$ac_ext >&5
9261   rm -rf conftest*
9262   eval "ac_cv_header_$ac_safe=no"
9263 fi
9264 rm -f conftest*
9265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9266   echo "$ac_t""yes" 1>&6
9267     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9268   { test "$extra_verbose" = "yes" && cat << EOF
9269     Defining $ac_tr_hdr
9270 EOF
9271 cat >> confdefs.h <<EOF
9272 #define $ac_tr_hdr 1
9273 EOF
9274 }
9275  
9276 else
9277   echo "$ac_t""no" 1>&6
9278 fi
9279 done
9280
9281   
9282 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9283 echo "configure:9284: checking for strerror in -lintl" >&5
9284 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9285
9286 xe_check_libs=" -lintl "
9287 cat > conftest.$ac_ext <<EOF
9288 #line 9289 "configure"
9289 #include "confdefs.h"
9290 /* Override any gcc2 internal prototype to avoid an error.  */
9291 /* We use char because int might match the return type of a gcc2
9292     builtin and then its argument prototype would still apply.  */
9293 char strerror();
9294
9295 int main() {
9296 strerror()
9297 ; return 0; }
9298 EOF
9299 if { (eval echo configure:9300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9300   rm -rf conftest*
9301   eval "ac_cv_lib_$ac_lib_var=yes"
9302 else
9303   echo "configure: failed program was:" >&5
9304   cat conftest.$ac_ext >&5
9305   rm -rf conftest*
9306   eval "ac_cv_lib_$ac_lib_var=no"
9307 fi
9308 rm -f conftest*
9309 xe_check_libs=""
9310
9311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9312   echo "$ac_t""yes" 1>&6
9313     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9314     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9315   { test "$extra_verbose" = "yes" && cat << EOF
9316     Defining $ac_tr_lib
9317 EOF
9318 cat >> confdefs.h <<EOF
9319 #define $ac_tr_lib 1
9320 EOF
9321 }
9322
9323   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9324
9325 else
9326   echo "$ac_t""no" 1>&6
9327 fi
9328
9329
9330
9331   if test "$with_utf_2000" = "yes" ; then
9332     { test "$extra_verbose" = "yes" && cat << \EOF
9333     Defining CHAR_IS_UCS4
9334 EOF
9335 cat >> confdefs.h <<\EOF
9336 #define CHAR_IS_UCS4 1
9337 EOF
9338 }
9339
9340     { test "$extra_verbose" = "yes" && cat << \EOF
9341     Defining UTF2000
9342 EOF
9343 cat >> confdefs.h <<\EOF
9344 #define UTF2000 1
9345 EOF
9346 }
9347
9348     { test "$extra_verbose" = "yes" && cat << \EOF
9349     Defining HAVE_GGC
9350 EOF
9351 cat >> confdefs.h <<\EOF
9352 #define HAVE_GGC 1
9353 EOF
9354 }
9355
9356   fi
9357
9358   echo "checking for Mule input methods" 1>&6
9359 echo "configure:9360: checking for Mule input methods" >&5
9360         case "$with_xim" in "" | "yes" )
9361     echo "checking for XIM" 1>&6
9362 echo "configure:9363: checking for XIM" >&5
9363     
9364 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9365 echo "configure:9366: checking for XOpenIM in -lX11" >&5
9366 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9367
9368 xe_check_libs=" -lX11 "
9369 cat > conftest.$ac_ext <<EOF
9370 #line 9371 "configure"
9371 #include "confdefs.h"
9372 /* Override any gcc2 internal prototype to avoid an error.  */
9373 /* We use char because int might match the return type of a gcc2
9374     builtin and then its argument prototype would still apply.  */
9375 char XOpenIM();
9376
9377 int main() {
9378 XOpenIM()
9379 ; return 0; }
9380 EOF
9381 if { (eval echo configure:9382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9382   rm -rf conftest*
9383   eval "ac_cv_lib_$ac_lib_var=yes"
9384 else
9385   echo "configure: failed program was:" >&5
9386   cat conftest.$ac_ext >&5
9387   rm -rf conftest*
9388   eval "ac_cv_lib_$ac_lib_var=no"
9389 fi
9390 rm -f conftest*
9391 xe_check_libs=""
9392
9393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9394   echo "$ac_t""yes" 1>&6
9395   with_xim=xlib
9396 else
9397   echo "$ac_t""no" 1>&6
9398 with_xim=no
9399 fi
9400
9401
9402         if test "$have_motif $have_lesstif" = "yes no"; then
9403       
9404 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9405 echo "configure:9406: checking for XmImMbLookupString in -lXm" >&5
9406 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9407
9408 xe_check_libs=" -lXm "
9409 cat > conftest.$ac_ext <<EOF
9410 #line 9411 "configure"
9411 #include "confdefs.h"
9412 /* Override any gcc2 internal prototype to avoid an error.  */
9413 /* We use char because int might match the return type of a gcc2
9414     builtin and then its argument prototype would still apply.  */
9415 char XmImMbLookupString();
9416
9417 int main() {
9418 XmImMbLookupString()
9419 ; return 0; }
9420 EOF
9421 if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9422   rm -rf conftest*
9423   eval "ac_cv_lib_$ac_lib_var=yes"
9424 else
9425   echo "configure: failed program was:" >&5
9426   cat conftest.$ac_ext >&5
9427   rm -rf conftest*
9428   eval "ac_cv_lib_$ac_lib_var=no"
9429 fi
9430 rm -f conftest*
9431 xe_check_libs=""
9432
9433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9434   echo "$ac_t""yes" 1>&6
9435   with_xim=motif
9436 else
9437   echo "$ac_t""no" 1>&6
9438 fi
9439
9440
9441     fi ;;
9442   esac
9443   if test "$with_xim" != "no"; then
9444     { test "$extra_verbose" = "yes" && cat << \EOF
9445     Defining HAVE_XIM
9446 EOF
9447 cat >> confdefs.h <<\EOF
9448 #define HAVE_XIM 1
9449 EOF
9450 }
9451
9452     if test "$with_xim" = "xlib"; then
9453       { test "$extra_verbose" = "yes" && cat << \EOF
9454     Defining XIM_XLIB
9455 EOF
9456 cat >> confdefs.h <<\EOF
9457 #define XIM_XLIB 1
9458 EOF
9459 }
9460
9461       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9462    echo "    xemacs will be linked with \"input-method-xlib.o\""
9463  fi
9464     fi
9465     if test "$with_xim" = "motif"; then
9466       { test "$extra_verbose" = "yes" && cat << \EOF
9467     Defining XIM_MOTIF
9468 EOF
9469 cat >> confdefs.h <<\EOF
9470 #define XIM_MOTIF 1
9471 EOF
9472 }
9473
9474       need_motif=yes
9475       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9476    echo "    xemacs will be linked with \"input-method-motif.o\""
9477  fi
9478     fi
9479     if test "$with_xim" = "motif"; then
9480       with_xfs=no
9481     fi
9482   fi
9483
9484     if test "$with_xfs" = "yes" ; then
9485     echo "checking for XFontSet" 1>&6
9486 echo "configure:9487: checking for XFontSet" >&5
9487     
9488 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9489 echo "configure:9490: checking for XmbDrawString in -lX11" >&5
9490 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9491
9492 xe_check_libs=" -lX11 "
9493 cat > conftest.$ac_ext <<EOF
9494 #line 9495 "configure"
9495 #include "confdefs.h"
9496 /* Override any gcc2 internal prototype to avoid an error.  */
9497 /* We use char because int might match the return type of a gcc2
9498     builtin and then its argument prototype would still apply.  */
9499 char XmbDrawString();
9500
9501 int main() {
9502 XmbDrawString()
9503 ; return 0; }
9504 EOF
9505 if { (eval echo configure:9506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9506   rm -rf conftest*
9507   eval "ac_cv_lib_$ac_lib_var=yes"
9508 else
9509   echo "configure: failed program was:" >&5
9510   cat conftest.$ac_ext >&5
9511   rm -rf conftest*
9512   eval "ac_cv_lib_$ac_lib_var=no"
9513 fi
9514 rm -f conftest*
9515 xe_check_libs=""
9516
9517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9518   echo "$ac_t""yes" 1>&6
9519   :
9520 else
9521   echo "$ac_t""no" 1>&6
9522 with_xfs=no
9523 fi
9524
9525
9526     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9527       { test "$extra_verbose" = "yes" && cat << \EOF
9528     Defining USE_XFONTSET
9529 EOF
9530 cat >> confdefs.h <<\EOF
9531 #define USE_XFONTSET 1
9532 EOF
9533 }
9534
9535       if test "$with_xim" = "no" ; then
9536         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9537    echo "    xemacs will be linked with \"input-method-xlib.o\""
9538  fi
9539       fi
9540     fi
9541   fi 
9542     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9543   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9544 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9545 echo "configure:9546: checking for wnn/jllib.h" >&5
9546
9547 cat > conftest.$ac_ext <<EOF
9548 #line 9549 "configure"
9549 #include "confdefs.h"
9550 #include <wnn/jllib.h>
9551 EOF
9552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9553 { (eval echo configure:9554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9555 if test -z "$ac_err"; then
9556   rm -rf conftest*
9557   eval "ac_cv_header_$ac_safe=yes"
9558 else
9559   echo "$ac_err" >&5
9560   echo "configure: failed program was:" >&5
9561   cat conftest.$ac_ext >&5
9562   rm -rf conftest*
9563   eval "ac_cv_header_$ac_safe=no"
9564 fi
9565 rm -f conftest*
9566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9567   echo "$ac_t""yes" 1>&6
9568   :
9569 else
9570   echo "$ac_t""no" 1>&6
9571 with_wnn=no
9572 fi
9573  }
9574     if test "$with_wnn" != "no"; then
9575     for ac_func in crypt
9576 do
9577 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9578 echo "configure:9579: checking for $ac_func" >&5
9579
9580 cat > conftest.$ac_ext <<EOF
9581 #line 9582 "configure"
9582 #include "confdefs.h"
9583 /* System header to define __stub macros and hopefully few prototypes,
9584     which can conflict with char $ac_func(); below.  */
9585 #include <assert.h>
9586 /* Override any gcc2 internal prototype to avoid an error.  */
9587 /* We use char because int might match the return type of a gcc2
9588     builtin and then its argument prototype would still apply.  */
9589 char $ac_func();
9590
9591 int main() {
9592
9593 /* The GNU C library defines this for functions which it implements
9594     to always fail with ENOSYS.  Some functions are actually named
9595     something starting with __ and the normal name is an alias.  */
9596 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9597 choke me
9598 #else
9599 $ac_func();
9600 #endif
9601
9602 ; return 0; }
9603 EOF
9604 if { (eval echo configure:9605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9605   rm -rf conftest*
9606   eval "ac_cv_func_$ac_func=yes"
9607 else
9608   echo "configure: failed program was:" >&5
9609   cat conftest.$ac_ext >&5
9610   rm -rf conftest*
9611   eval "ac_cv_func_$ac_func=no"
9612 fi
9613 rm -f conftest*
9614
9615 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9616   echo "$ac_t""yes" 1>&6
9617     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9618   { test "$extra_verbose" = "yes" && cat << EOF
9619     Defining $ac_tr_func
9620 EOF
9621 cat >> confdefs.h <<EOF
9622 #define $ac_tr_func 1
9623 EOF
9624 }
9625  
9626 else
9627   echo "$ac_t""no" 1>&6
9628 fi
9629 done
9630
9631     test "$ac_cv_func_crypt" != "yes" && { 
9632 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9633 echo "configure:9634: checking for crypt in -lcrypt" >&5
9634 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9635
9636 xe_check_libs=" -lcrypt "
9637 cat > conftest.$ac_ext <<EOF
9638 #line 9639 "configure"
9639 #include "confdefs.h"
9640 /* Override any gcc2 internal prototype to avoid an error.  */
9641 /* We use char because int might match the return type of a gcc2
9642     builtin and then its argument prototype would still apply.  */
9643 char crypt();
9644
9645 int main() {
9646 crypt()
9647 ; return 0; }
9648 EOF
9649 if { (eval echo configure:9650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9650   rm -rf conftest*
9651   eval "ac_cv_lib_$ac_lib_var=yes"
9652 else
9653   echo "configure: failed program was:" >&5
9654   cat conftest.$ac_ext >&5
9655   rm -rf conftest*
9656   eval "ac_cv_lib_$ac_lib_var=no"
9657 fi
9658 rm -f conftest*
9659 xe_check_libs=""
9660
9661 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9662   echo "$ac_t""yes" 1>&6
9663     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9664     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9665   { test "$extra_verbose" = "yes" && cat << EOF
9666     Defining $ac_tr_lib
9667 EOF
9668 cat >> confdefs.h <<EOF
9669 #define $ac_tr_lib 1
9670 EOF
9671 }
9672
9673   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9674
9675 else
9676   echo "$ac_t""no" 1>&6
9677 fi
9678
9679  }
9680   fi
9681     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9682     
9683 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9684 echo "configure:9685: checking for jl_dic_list_e in -lwnn" >&5
9685 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9686
9687 xe_check_libs=" -lwnn "
9688 cat > conftest.$ac_ext <<EOF
9689 #line 9690 "configure"
9690 #include "confdefs.h"
9691 /* Override any gcc2 internal prototype to avoid an error.  */
9692 /* We use char because int might match the return type of a gcc2
9693     builtin and then its argument prototype would still apply.  */
9694 char jl_dic_list_e();
9695
9696 int main() {
9697 jl_dic_list_e()
9698 ; return 0; }
9699 EOF
9700 if { (eval echo configure:9701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9701   rm -rf conftest*
9702   eval "ac_cv_lib_$ac_lib_var=yes"
9703 else
9704   echo "configure: failed program was:" >&5
9705   cat conftest.$ac_ext >&5
9706   rm -rf conftest*
9707   eval "ac_cv_lib_$ac_lib_var=no"
9708 fi
9709 rm -f conftest*
9710 xe_check_libs=""
9711
9712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9713   echo "$ac_t""yes" 1>&6
9714   libwnn=wnn
9715 else
9716   echo "$ac_t""no" 1>&6
9717 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9718 echo "configure:9719: checking for jl_dic_list_e in -lwnn4" >&5
9719 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9720
9721 xe_check_libs=" -lwnn4 "
9722 cat > conftest.$ac_ext <<EOF
9723 #line 9724 "configure"
9724 #include "confdefs.h"
9725 /* Override any gcc2 internal prototype to avoid an error.  */
9726 /* We use char because int might match the return type of a gcc2
9727     builtin and then its argument prototype would still apply.  */
9728 char jl_dic_list_e();
9729
9730 int main() {
9731 jl_dic_list_e()
9732 ; return 0; }
9733 EOF
9734 if { (eval echo configure:9735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9735   rm -rf conftest*
9736   eval "ac_cv_lib_$ac_lib_var=yes"
9737 else
9738   echo "configure: failed program was:" >&5
9739   cat conftest.$ac_ext >&5
9740   rm -rf conftest*
9741   eval "ac_cv_lib_$ac_lib_var=no"
9742 fi
9743 rm -f conftest*
9744 xe_check_libs=""
9745
9746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9747   echo "$ac_t""yes" 1>&6
9748   libwnn=wnn4
9749 else
9750   echo "$ac_t""no" 1>&6
9751 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9752 echo "configure:9753: checking for jl_dic_list_e in -lwnn6" >&5
9753 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9754
9755 xe_check_libs=" -lwnn6 "
9756 cat > conftest.$ac_ext <<EOF
9757 #line 9758 "configure"
9758 #include "confdefs.h"
9759 /* Override any gcc2 internal prototype to avoid an error.  */
9760 /* We use char because int might match the return type of a gcc2
9761     builtin and then its argument prototype would still apply.  */
9762 char jl_dic_list_e();
9763
9764 int main() {
9765 jl_dic_list_e()
9766 ; return 0; }
9767 EOF
9768 if { (eval echo configure:9769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9769   rm -rf conftest*
9770   eval "ac_cv_lib_$ac_lib_var=yes"
9771 else
9772   echo "configure: failed program was:" >&5
9773   cat conftest.$ac_ext >&5
9774   rm -rf conftest*
9775   eval "ac_cv_lib_$ac_lib_var=no"
9776 fi
9777 rm -f conftest*
9778 xe_check_libs=""
9779
9780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9781   echo "$ac_t""yes" 1>&6
9782   libwnn=wnn6
9783 else
9784   echo "$ac_t""no" 1>&6
9785 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9786 echo "configure:9787: checking for dic_list_e in -lwnn6_fromsrc" >&5
9787 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9788
9789 xe_check_libs=" -lwnn6_fromsrc "
9790 cat > conftest.$ac_ext <<EOF
9791 #line 9792 "configure"
9792 #include "confdefs.h"
9793 /* Override any gcc2 internal prototype to avoid an error.  */
9794 /* We use char because int might match the return type of a gcc2
9795     builtin and then its argument prototype would still apply.  */
9796 char dic_list_e();
9797
9798 int main() {
9799 dic_list_e()
9800 ; return 0; }
9801 EOF
9802 if { (eval echo configure:9803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9803   rm -rf conftest*
9804   eval "ac_cv_lib_$ac_lib_var=yes"
9805 else
9806   echo "configure: failed program was:" >&5
9807   cat conftest.$ac_ext >&5
9808   rm -rf conftest*
9809   eval "ac_cv_lib_$ac_lib_var=no"
9810 fi
9811 rm -f conftest*
9812 xe_check_libs=""
9813
9814 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9815   echo "$ac_t""yes" 1>&6
9816   libwnn=wnn6_fromsrc
9817 else
9818   echo "$ac_t""no" 1>&6
9819 with_wnn=no
9820 fi
9821
9822
9823 fi
9824
9825
9826 fi
9827
9828
9829 fi
9830
9831
9832   fi
9833   test -z "$with_wnn" && with_wnn=yes
9834   if test "$with_wnn" = "yes"; then
9835     { test "$extra_verbose" = "yes" && cat << \EOF
9836     Defining HAVE_WNN
9837 EOF
9838 cat >> confdefs.h <<\EOF
9839 #define HAVE_WNN 1
9840 EOF
9841 }
9842
9843     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9844     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9845    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9846  fi
9847     if test "$with_wnn6" != "no"; then
9848       
9849 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9850 echo "configure:9851: checking for jl_fi_dic_list in -l$libwnn" >&5
9851 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9852
9853 xe_check_libs=" -l$libwnn "
9854 cat > conftest.$ac_ext <<EOF
9855 #line 9856 "configure"
9856 #include "confdefs.h"
9857 /* Override any gcc2 internal prototype to avoid an error.  */
9858 /* We use char because int might match the return type of a gcc2
9859     builtin and then its argument prototype would still apply.  */
9860 char jl_fi_dic_list();
9861
9862 int main() {
9863 jl_fi_dic_list()
9864 ; return 0; }
9865 EOF
9866 if { (eval echo configure:9867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9867   rm -rf conftest*
9868   eval "ac_cv_lib_$ac_lib_var=yes"
9869 else
9870   echo "configure: failed program was:" >&5
9871   cat conftest.$ac_ext >&5
9872   rm -rf conftest*
9873   eval "ac_cv_lib_$ac_lib_var=no"
9874 fi
9875 rm -f conftest*
9876 xe_check_libs=""
9877
9878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9879   echo "$ac_t""yes" 1>&6
9880   with_wnn6=yes
9881 else
9882   echo "$ac_t""no" 1>&6
9883 fi
9884
9885
9886       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9887     Defining WNN6
9888 EOF
9889 cat >> confdefs.h <<\EOF
9890 #define WNN6 1
9891 EOF
9892 }
9893
9894     fi
9895   fi
9896
9897     canna_includes_found=no
9898   if test "$with_canna" != "no"; then
9899     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9900 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9901 echo "configure:9902: checking for canna/jrkanji.h" >&5
9902
9903 cat > conftest.$ac_ext <<EOF
9904 #line 9905 "configure"
9905 #include "confdefs.h"
9906 #include <canna/jrkanji.h>
9907 EOF
9908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9909 { (eval echo configure:9910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9911 if test -z "$ac_err"; then
9912   rm -rf conftest*
9913   eval "ac_cv_header_$ac_safe=yes"
9914 else
9915   echo "$ac_err" >&5
9916   echo "configure: failed program was:" >&5
9917   cat conftest.$ac_ext >&5
9918   rm -rf conftest*
9919   eval "ac_cv_header_$ac_safe=no"
9920 fi
9921 rm -f conftest*
9922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9923   echo "$ac_t""yes" 1>&6
9924   canna_includes_found=yes
9925 else
9926   echo "$ac_t""no" 1>&6
9927 fi
9928
9929   fi
9930   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9931       -d "/usr/local/canna/include"; then
9932     save_c_switch_site="$c_switch_site"
9933     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9934     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9935 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9936 echo "configure:9937: checking for canna/jrkanji.h" >&5
9937
9938 cat > conftest.$ac_ext <<EOF
9939 #line 9940 "configure"
9940 #include "confdefs.h"
9941 #include <canna/jrkanji.h>
9942 EOF
9943 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9944 { (eval echo configure:9945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9945 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9946 if test -z "$ac_err"; then
9947   rm -rf conftest*
9948   eval "ac_cv_header_$ac_safe=yes"
9949 else
9950   echo "$ac_err" >&5
9951   echo "configure: failed program was:" >&5
9952   cat conftest.$ac_ext >&5
9953   rm -rf conftest*
9954   eval "ac_cv_header_$ac_safe=no"
9955 fi
9956 rm -f conftest*
9957 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9958   echo "$ac_t""yes" 1>&6
9959   canna_includes_found=yes
9960 else
9961   echo "$ac_t""no" 1>&6
9962 fi
9963
9964     if test "$canna_includes_found" != "yes"; then
9965       c_switch_site="$save_c_switch_site"
9966       with_canna="no"
9967     fi
9968   fi
9969
9970   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9971 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9972 echo "configure:9973: checking for canna/RK.h" >&5
9973
9974 cat > conftest.$ac_ext <<EOF
9975 #line 9976 "configure"
9976 #include "confdefs.h"
9977 #include <canna/RK.h>
9978 EOF
9979 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9980 { (eval echo configure:9981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9981 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9982 if test -z "$ac_err"; then
9983   rm -rf conftest*
9984   eval "ac_cv_header_$ac_safe=yes"
9985 else
9986   echo "$ac_err" >&5
9987   echo "configure: failed program was:" >&5
9988   cat conftest.$ac_ext >&5
9989   rm -rf conftest*
9990   eval "ac_cv_header_$ac_safe=no"
9991 fi
9992 rm -f conftest*
9993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9994   echo "$ac_t""yes" 1>&6
9995   :
9996 else
9997   echo "$ac_t""no" 1>&6
9998 with_canna=no
9999 fi
10000  }
10001   test -z "$with_canna" && { 
10002 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10003 echo "configure:10004: checking for RkBgnBun in -lRKC" >&5
10004 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10005
10006 xe_check_libs=" -lRKC "
10007 cat > conftest.$ac_ext <<EOF
10008 #line 10009 "configure"
10009 #include "confdefs.h"
10010 /* Override any gcc2 internal prototype to avoid an error.  */
10011 /* We use char because int might match the return type of a gcc2
10012     builtin and then its argument prototype would still apply.  */
10013 char RkBgnBun();
10014
10015 int main() {
10016 RkBgnBun()
10017 ; return 0; }
10018 EOF
10019 if { (eval echo configure:10020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10020   rm -rf conftest*
10021   eval "ac_cv_lib_$ac_lib_var=yes"
10022 else
10023   echo "configure: failed program was:" >&5
10024   cat conftest.$ac_ext >&5
10025   rm -rf conftest*
10026   eval "ac_cv_lib_$ac_lib_var=no"
10027 fi
10028 rm -f conftest*
10029 xe_check_libs=""
10030
10031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10032   echo "$ac_t""yes" 1>&6
10033   :
10034 else
10035   echo "$ac_t""no" 1>&6
10036 with_canna=no
10037 fi
10038
10039  }
10040   test -z "$with_canna" && { 
10041 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10042 echo "configure:10043: checking for jrKanjiControl in -lcanna" >&5
10043 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10044
10045 xe_check_libs=" -lcanna "
10046 cat > conftest.$ac_ext <<EOF
10047 #line 10048 "configure"
10048 #include "confdefs.h"
10049 /* Override any gcc2 internal prototype to avoid an error.  */
10050 /* We use char because int might match the return type of a gcc2
10051     builtin and then its argument prototype would still apply.  */
10052 char jrKanjiControl();
10053
10054 int main() {
10055 jrKanjiControl()
10056 ; return 0; }
10057 EOF
10058 if { (eval echo configure:10059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10059   rm -rf conftest*
10060   eval "ac_cv_lib_$ac_lib_var=yes"
10061 else
10062   echo "configure: failed program was:" >&5
10063   cat conftest.$ac_ext >&5
10064   rm -rf conftest*
10065   eval "ac_cv_lib_$ac_lib_var=no"
10066 fi
10067 rm -f conftest*
10068 xe_check_libs=""
10069
10070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10071   echo "$ac_t""yes" 1>&6
10072   :
10073 else
10074   echo "$ac_t""no" 1>&6
10075 with_canna=no
10076 fi
10077
10078  }
10079   test -z "$with_canna" && with_canna=yes
10080   if test "$with_canna" = "yes"; then
10081     { test "$extra_verbose" = "yes" && cat << \EOF
10082     Defining HAVE_CANNA
10083 EOF
10084 cat >> confdefs.h <<\EOF
10085 #define HAVE_CANNA 1
10086 EOF
10087 }
10088
10089     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10090     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10091    echo "    xemacs will be linked with \"mule-canna.o\""
10092  fi
10093   fi
10094
10095 else   for feature in xim canna wnn; do
10096     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10097       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10098     fi
10099     eval "with_${feature}=no"
10100   done
10101 fi 
10102
10103 if test "$need_motif" = "yes" ; then
10104   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10105     
10106 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10107 echo "configure:10108: checking for layout_object_getvalue in -li18n" >&5
10108 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10109
10110 xe_check_libs=" -li18n "
10111 cat > conftest.$ac_ext <<EOF
10112 #line 10113 "configure"
10113 #include "confdefs.h"
10114 /* Override any gcc2 internal prototype to avoid an error.  */
10115 /* We use char because int might match the return type of a gcc2
10116     builtin and then its argument prototype would still apply.  */
10117 char layout_object_getvalue();
10118
10119 int main() {
10120 layout_object_getvalue()
10121 ; return 0; }
10122 EOF
10123 if { (eval echo configure:10124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10124   rm -rf conftest*
10125   eval "ac_cv_lib_$ac_lib_var=yes"
10126 else
10127   echo "configure: failed program was:" >&5
10128   cat conftest.$ac_ext >&5
10129   rm -rf conftest*
10130   eval "ac_cv_lib_$ac_lib_var=no"
10131 fi
10132 rm -f conftest*
10133 xe_check_libs=""
10134
10135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10136   echo "$ac_t""yes" 1>&6
10137   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10138 else
10139   echo "$ac_t""no" 1>&6
10140 fi
10141
10142
10143   
10144 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10145     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10146   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10147   
10148         runpath="" runpath_dirs=""
10149   if test -n "$LD_RUN_PATH"; then
10150     runpath="$LD_RUN_PATH"
10151   elif test "$GCC" = "yes"; then
10152         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10153     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10154     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10155     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10156       case "$arg" in P,* | -L* | -R* )
10157         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10158           {
10159 xe_runpath_dir="$dir"
10160   test "$xe_runpath_dir" != "/lib"     -a \
10161         "$xe_runpath_dir" != "/usr/lib" -a \
10162         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10163   eval "$xe_add_unique_runpath_dir"
10164 }
10165         done ;;
10166       esac
10167     done
10168     ld_switch_run="$ld_switch_run_save"
10169     rm -f conftest*
10170   else
10171         for arg in $ld_switch_site $ld_switch_x_site; do
10172       case "$arg" in -L*) {
10173 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10174   test "$xe_runpath_dir" != "/lib"     -a \
10175         "$xe_runpath_dir" != "/usr/lib" -a \
10176         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10177   eval "$xe_add_unique_runpath_dir"
10178 };; esac
10179     done
10180         if test "$opsys $need_motif" = "sol2 yes"; then
10181       xe_runpath_dir="/opt/SUNWdt/lib";
10182       eval "$xe_add_unique_runpath_dir";
10183     fi
10184   fi 
10185   if test -n "$runpath"; then
10186     ld_switch_run="${dash_r}${runpath}"
10187     
10188 if test "$GCC" = "yes"; then
10189   set x $ld_switch_run; shift; ld_switch_run=""
10190   while test -n "$1"; do
10191     case $1 in
10192       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10193       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10194       -Xlinker* ) ;;
10195       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10196     esac
10197     shift
10198   done
10199 fi
10200     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10201   fi
10202 fi
10203
10204 fi
10205
10206 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
10207 do
10208 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10209 echo "configure:10210: checking for $ac_func" >&5
10210
10211 cat > conftest.$ac_ext <<EOF
10212 #line 10213 "configure"
10213 #include "confdefs.h"
10214 /* System header to define __stub macros and hopefully few prototypes,
10215     which can conflict with char $ac_func(); below.  */
10216 #include <assert.h>
10217 /* Override any gcc2 internal prototype to avoid an error.  */
10218 /* We use char because int might match the return type of a gcc2
10219     builtin and then its argument prototype would still apply.  */
10220 char $ac_func();
10221
10222 int main() {
10223
10224 /* The GNU C library defines this for functions which it implements
10225     to always fail with ENOSYS.  Some functions are actually named
10226     something starting with __ and the normal name is an alias.  */
10227 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10228 choke me
10229 #else
10230 $ac_func();
10231 #endif
10232
10233 ; return 0; }
10234 EOF
10235 if { (eval echo configure:10236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10236   rm -rf conftest*
10237   eval "ac_cv_func_$ac_func=yes"
10238 else
10239   echo "configure: failed program was:" >&5
10240   cat conftest.$ac_ext >&5
10241   rm -rf conftest*
10242   eval "ac_cv_func_$ac_func=no"
10243 fi
10244 rm -f conftest*
10245
10246 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10247   echo "$ac_t""yes" 1>&6
10248     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10249   { test "$extra_verbose" = "yes" && cat << EOF
10250     Defining $ac_tr_func
10251 EOF
10252 cat >> confdefs.h <<EOF
10253 #define $ac_tr_func 1
10254 EOF
10255 }
10256  
10257 else
10258   echo "$ac_t""no" 1>&6
10259 fi
10260 done
10261
10262
10263 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10264 do
10265 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10266 echo "configure:10267: checking for $ac_func" >&5
10267
10268 cat > conftest.$ac_ext <<EOF
10269 #line 10270 "configure"
10270 #include "confdefs.h"
10271 /* System header to define __stub macros and hopefully few prototypes,
10272     which can conflict with char $ac_func(); below.  */
10273 #include <assert.h>
10274 /* Override any gcc2 internal prototype to avoid an error.  */
10275 /* We use char because int might match the return type of a gcc2
10276     builtin and then its argument prototype would still apply.  */
10277 char $ac_func();
10278
10279 int main() {
10280
10281 /* The GNU C library defines this for functions which it implements
10282     to always fail with ENOSYS.  Some functions are actually named
10283     something starting with __ and the normal name is an alias.  */
10284 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10285 choke me
10286 #else
10287 $ac_func();
10288 #endif
10289
10290 ; return 0; }
10291 EOF
10292 if { (eval echo configure:10293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10293   rm -rf conftest*
10294   eval "ac_cv_func_$ac_func=yes"
10295 else
10296   echo "configure: failed program was:" >&5
10297   cat conftest.$ac_ext >&5
10298   rm -rf conftest*
10299   eval "ac_cv_func_$ac_func=no"
10300 fi
10301 rm -f conftest*
10302
10303 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10304   echo "$ac_t""yes" 1>&6
10305     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10306   { test "$extra_verbose" = "yes" && cat << EOF
10307     Defining $ac_tr_func
10308 EOF
10309 cat >> confdefs.h <<EOF
10310 #define $ac_tr_func 1
10311 EOF
10312 }
10313  
10314 else
10315   echo "$ac_t""no" 1>&6
10316 fi
10317 done
10318
10319
10320 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10321 echo "configure:10322: checking for openpty" >&5
10322
10323 cat > conftest.$ac_ext <<EOF
10324 #line 10325 "configure"
10325 #include "confdefs.h"
10326 /* System header to define __stub macros and hopefully few prototypes,
10327     which can conflict with char openpty(); below.  */
10328 #include <assert.h>
10329 /* Override any gcc2 internal prototype to avoid an error.  */
10330 /* We use char because int might match the return type of a gcc2
10331     builtin and then its argument prototype would still apply.  */
10332 char openpty();
10333
10334 int main() {
10335
10336 /* The GNU C library defines this for functions which it implements
10337     to always fail with ENOSYS.  Some functions are actually named
10338     something starting with __ and the normal name is an alias.  */
10339 #if defined (__stub_openpty) || defined (__stub___openpty)
10340 choke me
10341 #else
10342 openpty();
10343 #endif
10344
10345 ; return 0; }
10346 EOF
10347 if { (eval echo configure:10348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10348   rm -rf conftest*
10349   eval "ac_cv_func_openpty=yes"
10350 else
10351   echo "configure: failed program was:" >&5
10352   cat conftest.$ac_ext >&5
10353   rm -rf conftest*
10354   eval "ac_cv_func_openpty=no"
10355 fi
10356 rm -f conftest*
10357
10358 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10359   echo "$ac_t""yes" 1>&6
10360   have_openpty=yes
10361 else
10362   echo "$ac_t""no" 1>&6
10363
10364   
10365 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10366 echo "configure:10367: checking for openpty in -lutil" >&5
10367 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10368
10369 xe_check_libs=" -lutil "
10370 cat > conftest.$ac_ext <<EOF
10371 #line 10372 "configure"
10372 #include "confdefs.h"
10373 /* Override any gcc2 internal prototype to avoid an error.  */
10374 /* We use char because int might match the return type of a gcc2
10375     builtin and then its argument prototype would still apply.  */
10376 char openpty();
10377
10378 int main() {
10379 openpty()
10380 ; return 0; }
10381 EOF
10382 if { (eval echo configure:10383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10383   rm -rf conftest*
10384   eval "ac_cv_lib_$ac_lib_var=yes"
10385 else
10386   echo "configure: failed program was:" >&5
10387   cat conftest.$ac_ext >&5
10388   rm -rf conftest*
10389   eval "ac_cv_lib_$ac_lib_var=no"
10390 fi
10391 rm -f conftest*
10392 xe_check_libs=""
10393
10394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10395   echo "$ac_t""yes" 1>&6
10396   have_openpty=yes need_libutil=yes
10397 else
10398   echo "$ac_t""no" 1>&6
10399 fi
10400
10401
10402 fi
10403
10404 if test "$have_openpty" = "yes"; then
10405   { test "$extra_verbose" = "yes" && cat << \EOF
10406     Defining HAVE_OPENPTY
10407 EOF
10408 cat >> confdefs.h <<\EOF
10409 #define HAVE_OPENPTY 1
10410 EOF
10411 }
10412
10413   for ac_hdr in pty.h libutil.h
10414 do
10415 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10416 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10417 echo "configure:10418: checking for $ac_hdr" >&5
10418
10419 cat > conftest.$ac_ext <<EOF
10420 #line 10421 "configure"
10421 #include "confdefs.h"
10422 #include <$ac_hdr>
10423 EOF
10424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10425 { (eval echo configure:10426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10427 if test -z "$ac_err"; then
10428   rm -rf conftest*
10429   eval "ac_cv_header_$ac_safe=yes"
10430 else
10431   echo "$ac_err" >&5
10432   echo "configure: failed program was:" >&5
10433   cat conftest.$ac_ext >&5
10434   rm -rf conftest*
10435   eval "ac_cv_header_$ac_safe=no"
10436 fi
10437 rm -f conftest*
10438 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10439   echo "$ac_t""yes" 1>&6
10440     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10441   { test "$extra_verbose" = "yes" && cat << EOF
10442     Defining $ac_tr_hdr
10443 EOF
10444 cat >> confdefs.h <<EOF
10445 #define $ac_tr_hdr 1
10446 EOF
10447 }
10448  
10449 else
10450   echo "$ac_t""no" 1>&6
10451 fi
10452 done
10453
10454   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
10455 fi
10456
10457 for ac_hdr in stropts.h
10458 do
10459 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10460 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10461 echo "configure:10462: checking for $ac_hdr" >&5
10462
10463 cat > conftest.$ac_ext <<EOF
10464 #line 10465 "configure"
10465 #include "confdefs.h"
10466 #include <$ac_hdr>
10467 EOF
10468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10469 { (eval echo configure:10470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10471 if test -z "$ac_err"; then
10472   rm -rf conftest*
10473   eval "ac_cv_header_$ac_safe=yes"
10474 else
10475   echo "$ac_err" >&5
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -rf conftest*
10479   eval "ac_cv_header_$ac_safe=no"
10480 fi
10481 rm -f conftest*
10482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10483   echo "$ac_t""yes" 1>&6
10484     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10485   { test "$extra_verbose" = "yes" && cat << EOF
10486     Defining $ac_tr_hdr
10487 EOF
10488 cat >> confdefs.h <<EOF
10489 #define $ac_tr_hdr 1
10490 EOF
10491 }
10492  
10493 else
10494   echo "$ac_t""no" 1>&6
10495 fi
10496 done
10497
10498 if test "$ac_cv_header_stropts_h" = "yes"; then
10499   for ac_func in isastream
10500 do
10501 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10502 echo "configure:10503: checking for $ac_func" >&5
10503
10504 cat > conftest.$ac_ext <<EOF
10505 #line 10506 "configure"
10506 #include "confdefs.h"
10507 /* System header to define __stub macros and hopefully few prototypes,
10508     which can conflict with char $ac_func(); below.  */
10509 #include <assert.h>
10510 /* Override any gcc2 internal prototype to avoid an error.  */
10511 /* We use char because int might match the return type of a gcc2
10512     builtin and then its argument prototype would still apply.  */
10513 char $ac_func();
10514
10515 int main() {
10516
10517 /* The GNU C library defines this for functions which it implements
10518     to always fail with ENOSYS.  Some functions are actually named
10519     something starting with __ and the normal name is an alias.  */
10520 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10521 choke me
10522 #else
10523 $ac_func();
10524 #endif
10525
10526 ; return 0; }
10527 EOF
10528 if { (eval echo configure:10529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10529   rm -rf conftest*
10530   eval "ac_cv_func_$ac_func=yes"
10531 else
10532   echo "configure: failed program was:" >&5
10533   cat conftest.$ac_ext >&5
10534   rm -rf conftest*
10535   eval "ac_cv_func_$ac_func=no"
10536 fi
10537 rm -f conftest*
10538
10539 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10540   echo "$ac_t""yes" 1>&6
10541     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10542   { test "$extra_verbose" = "yes" && cat << EOF
10543     Defining $ac_tr_func
10544 EOF
10545 cat >> confdefs.h <<EOF
10546 #define $ac_tr_func 1
10547 EOF
10548 }
10549  
10550 else
10551   echo "$ac_t""no" 1>&6
10552 fi
10553 done
10554
10555   for ac_hdr in strtio.h
10556 do
10557 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10558 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10559 echo "configure:10560: checking for $ac_hdr" >&5
10560
10561 cat > conftest.$ac_ext <<EOF
10562 #line 10563 "configure"
10563 #include "confdefs.h"
10564 #include <$ac_hdr>
10565 EOF
10566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10567 { (eval echo configure:10568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10569 if test -z "$ac_err"; then
10570   rm -rf conftest*
10571   eval "ac_cv_header_$ac_safe=yes"
10572 else
10573   echo "$ac_err" >&5
10574   echo "configure: failed program was:" >&5
10575   cat conftest.$ac_ext >&5
10576   rm -rf conftest*
10577   eval "ac_cv_header_$ac_safe=no"
10578 fi
10579 rm -f conftest*
10580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10581   echo "$ac_t""yes" 1>&6
10582     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10583   { test "$extra_verbose" = "yes" && cat << EOF
10584     Defining $ac_tr_hdr
10585 EOF
10586 cat >> confdefs.h <<EOF
10587 #define $ac_tr_hdr 1
10588 EOF
10589 }
10590  
10591 else
10592   echo "$ac_t""no" 1>&6
10593 fi
10594 done
10595  fi
10596
10597 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
10598    echo "    xemacs will be linked with \"realpath.o\""
10599  fi
10600
10601 for ac_func in getloadavg
10602 do
10603 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10604 echo "configure:10605: checking for $ac_func" >&5
10605
10606 cat > conftest.$ac_ext <<EOF
10607 #line 10608 "configure"
10608 #include "confdefs.h"
10609 /* System header to define __stub macros and hopefully few prototypes,
10610     which can conflict with char $ac_func(); below.  */
10611 #include <assert.h>
10612 /* Override any gcc2 internal prototype to avoid an error.  */
10613 /* We use char because int might match the return type of a gcc2
10614     builtin and then its argument prototype would still apply.  */
10615 char $ac_func();
10616
10617 int main() {
10618
10619 /* The GNU C library defines this for functions which it implements
10620     to always fail with ENOSYS.  Some functions are actually named
10621     something starting with __ and the normal name is an alias.  */
10622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10623 choke me
10624 #else
10625 $ac_func();
10626 #endif
10627
10628 ; return 0; }
10629 EOF
10630 if { (eval echo configure:10631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10631   rm -rf conftest*
10632   eval "ac_cv_func_$ac_func=yes"
10633 else
10634   echo "configure: failed program was:" >&5
10635   cat conftest.$ac_ext >&5
10636   rm -rf conftest*
10637   eval "ac_cv_func_$ac_func=no"
10638 fi
10639 rm -f conftest*
10640
10641 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10642   echo "$ac_t""yes" 1>&6
10643     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10644   { test "$extra_verbose" = "yes" && cat << EOF
10645     Defining $ac_tr_func
10646 EOF
10647 cat >> confdefs.h <<EOF
10648 #define $ac_tr_func 1
10649 EOF
10650 }
10651  
10652 else
10653   echo "$ac_t""no" 1>&6
10654 fi
10655 done
10656
10657
10658 if test "$ac_cv_func_getloadavg" = "yes"; then
10659         for ac_hdr in sys/loadavg.h
10660 do
10661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10663 echo "configure:10664: checking for $ac_hdr" >&5
10664
10665 cat > conftest.$ac_ext <<EOF
10666 #line 10667 "configure"
10667 #include "confdefs.h"
10668 #include <$ac_hdr>
10669 EOF
10670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10671 { (eval echo configure:10672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10673 if test -z "$ac_err"; then
10674   rm -rf conftest*
10675   eval "ac_cv_header_$ac_safe=yes"
10676 else
10677   echo "$ac_err" >&5
10678   echo "configure: failed program was:" >&5
10679   cat conftest.$ac_ext >&5
10680   rm -rf conftest*
10681   eval "ac_cv_header_$ac_safe=no"
10682 fi
10683 rm -f conftest*
10684 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10685   echo "$ac_t""yes" 1>&6
10686     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10687   { test "$extra_verbose" = "yes" && cat << EOF
10688     Defining $ac_tr_hdr
10689 EOF
10690 cat >> confdefs.h <<EOF
10691 #define $ac_tr_hdr 1
10692 EOF
10693 }
10694  
10695 else
10696   echo "$ac_t""no" 1>&6
10697 fi
10698 done
10699
10700 else
10701     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10702    echo "    xemacs will be linked with \"getloadavg.o\""
10703  fi
10704
10705     
10706 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10707 echo "configure:10708: checking for kstat_open in -lkstat" >&5
10708 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10709
10710 xe_check_libs=" -lkstat "
10711 cat > conftest.$ac_ext <<EOF
10712 #line 10713 "configure"
10713 #include "confdefs.h"
10714 /* Override any gcc2 internal prototype to avoid an error.  */
10715 /* We use char because int might match the return type of a gcc2
10716     builtin and then its argument prototype would still apply.  */
10717 char kstat_open();
10718
10719 int main() {
10720 kstat_open()
10721 ; return 0; }
10722 EOF
10723 if { (eval echo configure:10724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10724   rm -rf conftest*
10725   eval "ac_cv_lib_$ac_lib_var=yes"
10726 else
10727   echo "configure: failed program was:" >&5
10728   cat conftest.$ac_ext >&5
10729   rm -rf conftest*
10730   eval "ac_cv_lib_$ac_lib_var=no"
10731 fi
10732 rm -f conftest*
10733 xe_check_libs=""
10734
10735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10736   echo "$ac_t""yes" 1>&6
10737     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10738     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10739   { test "$extra_verbose" = "yes" && cat << EOF
10740     Defining $ac_tr_lib
10741 EOF
10742 cat >> confdefs.h <<EOF
10743 #define $ac_tr_lib 1
10744 EOF
10745 }
10746
10747   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10748
10749 else
10750   echo "$ac_t""no" 1>&6
10751 fi
10752
10753
10754   for ac_hdr in kstat.h
10755 do
10756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10758 echo "configure:10759: checking for $ac_hdr" >&5
10759
10760 cat > conftest.$ac_ext <<EOF
10761 #line 10762 "configure"
10762 #include "confdefs.h"
10763 #include <$ac_hdr>
10764 EOF
10765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10766 { (eval echo configure:10767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10768 if test -z "$ac_err"; then
10769   rm -rf conftest*
10770   eval "ac_cv_header_$ac_safe=yes"
10771 else
10772   echo "$ac_err" >&5
10773   echo "configure: failed program was:" >&5
10774   cat conftest.$ac_ext >&5
10775   rm -rf conftest*
10776   eval "ac_cv_header_$ac_safe=no"
10777 fi
10778 rm -f conftest*
10779 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10780   echo "$ac_t""yes" 1>&6
10781     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10782   { test "$extra_verbose" = "yes" && cat << EOF
10783     Defining $ac_tr_hdr
10784 EOF
10785 cat >> confdefs.h <<EOF
10786 #define $ac_tr_hdr 1
10787 EOF
10788 }
10789  
10790 else
10791   echo "$ac_t""no" 1>&6
10792 fi
10793 done
10794
10795
10796     
10797 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10798 echo "configure:10799: checking for kvm_read in -lkvm" >&5
10799 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10800
10801 xe_check_libs=" -lkvm "
10802 cat > conftest.$ac_ext <<EOF
10803 #line 10804 "configure"
10804 #include "confdefs.h"
10805 /* Override any gcc2 internal prototype to avoid an error.  */
10806 /* We use char because int might match the return type of a gcc2
10807     builtin and then its argument prototype would still apply.  */
10808 char kvm_read();
10809
10810 int main() {
10811 kvm_read()
10812 ; return 0; }
10813 EOF
10814 if { (eval echo configure:10815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10815   rm -rf conftest*
10816   eval "ac_cv_lib_$ac_lib_var=yes"
10817 else
10818   echo "configure: failed program was:" >&5
10819   cat conftest.$ac_ext >&5
10820   rm -rf conftest*
10821   eval "ac_cv_lib_$ac_lib_var=no"
10822 fi
10823 rm -f conftest*
10824 xe_check_libs=""
10825
10826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10827   echo "$ac_t""yes" 1>&6
10828     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10829     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10830   { test "$extra_verbose" = "yes" && cat << EOF
10831     Defining $ac_tr_lib
10832 EOF
10833 cat >> confdefs.h <<EOF
10834 #define $ac_tr_lib 1
10835 EOF
10836 }
10837
10838   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10839
10840 else
10841   echo "$ac_t""no" 1>&6
10842 fi
10843
10844
10845 fi
10846
10847 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10848 echo "configure:10849: checking whether netdb declares h_errno" >&5
10849 cat > conftest.$ac_ext <<EOF
10850 #line 10851 "configure"
10851 #include "confdefs.h"
10852 #include <netdb.h>
10853 int main() {
10854 return h_errno;
10855 ; return 0; }
10856 EOF
10857 if { (eval echo configure:10858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10858   rm -rf conftest*
10859   echo "$ac_t""yes" 1>&6
10860    { test "$extra_verbose" = "yes" && cat << \EOF
10861     Defining HAVE_H_ERRNO
10862 EOF
10863 cat >> confdefs.h <<\EOF
10864 #define HAVE_H_ERRNO 1
10865 EOF
10866 }
10867
10868 else
10869   echo "configure: failed program was:" >&5
10870   cat conftest.$ac_ext >&5
10871   rm -rf conftest*
10872   echo "$ac_t""no" 1>&6
10873 fi
10874 rm -f conftest*
10875
10876 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10877 echo "configure:10878: checking for sigsetjmp" >&5
10878 cat > conftest.$ac_ext <<EOF
10879 #line 10880 "configure"
10880 #include "confdefs.h"
10881 #include <setjmp.h>
10882 int main() {
10883 sigjmp_buf bar; sigsetjmp (bar, 0);
10884 ; return 0; }
10885 EOF
10886 if { (eval echo configure:10887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10887   rm -rf conftest*
10888   echo "$ac_t""yes" 1>&6
10889    { test "$extra_verbose" = "yes" && cat << \EOF
10890     Defining HAVE_SIGSETJMP
10891 EOF
10892 cat >> confdefs.h <<\EOF
10893 #define HAVE_SIGSETJMP 1
10894 EOF
10895 }
10896
10897 else
10898   echo "configure: failed program was:" >&5
10899   cat conftest.$ac_ext >&5
10900   rm -rf conftest*
10901   echo "$ac_t""no" 1>&6
10902 fi
10903 rm -f conftest*
10904
10905 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10906 echo "configure:10907: checking whether localtime caches TZ" >&5
10907
10908 if test "$ac_cv_func_tzset" = "yes"; then
10909 cat > conftest.$ac_ext <<EOF
10910 #line 10911 "configure"
10911 #include "confdefs.h"
10912 #include <time.h>
10913 #if STDC_HEADERS
10914 # include <stdlib.h>
10915 #endif
10916 extern char **environ;
10917 unset_TZ ()
10918 {
10919   char **from, **to;
10920   for (to = from = environ; (*to = *from); from++)
10921     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10922       to++;
10923 }
10924 char TZ_GMT0[] = "TZ=GMT0";
10925 char TZ_PST8[] = "TZ=PST8";
10926 main()
10927 {
10928   time_t now = time ((time_t *) 0);
10929   int hour_GMT0, hour_unset;
10930   if (putenv (TZ_GMT0) != 0)
10931     exit (1);
10932   hour_GMT0 = localtime (&now)->tm_hour;
10933   unset_TZ ();
10934   hour_unset = localtime (&now)->tm_hour;
10935   if (putenv (TZ_PST8) != 0)
10936     exit (1);
10937   if (localtime (&now)->tm_hour == hour_GMT0)
10938     exit (1);
10939   unset_TZ ();
10940   if (localtime (&now)->tm_hour != hour_unset)
10941     exit (1);
10942   exit (0);
10943 }
10944 EOF
10945 if { (eval echo configure:10946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10946 then
10947   emacs_cv_localtime_cache=no
10948 else
10949   conftest_rc="$?"
10950   echo "configure: failed program was:" >&5
10951   cat conftest.$ac_ext >&5
10952   rm -fr conftest*
10953   emacs_cv_localtime_cache=yes
10954 fi
10955 rm -fr conftest*
10956 else
10957         # If we lack tzset, report that localtime does not cache TZ,
10958         # since we can't invalidate the cache if we don't have tzset.
10959         emacs_cv_localtime_cache=no
10960 fi
10961 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10962 if test $emacs_cv_localtime_cache = yes; then
10963   { test "$extra_verbose" = "yes" && cat << \EOF
10964     Defining LOCALTIME_CACHE
10965 EOF
10966 cat >> confdefs.h <<\EOF
10967 #define LOCALTIME_CACHE 1
10968 EOF
10969 }
10970
10971 fi
10972
10973 if test "$HAVE_TIMEVAL" = "yes"; then
10974 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10975 echo "configure:10976: checking whether gettimeofday accepts one or two arguments" >&5
10976 cat > conftest.$ac_ext <<EOF
10977 #line 10978 "configure"
10978 #include "confdefs.h"
10979
10980 #ifdef TIME_WITH_SYS_TIME
10981 #include <sys/time.h>
10982 #include <time.h>
10983 #else
10984 #ifdef HAVE_SYS_TIME_H
10985 #include <sys/time.h>
10986 #else
10987 #include <time.h>
10988 #endif
10989 #endif
10990   
10991 int main() {
10992
10993   struct timeval time;
10994   gettimeofday (&time, 0);
10995
10996 ; return 0; }
10997 EOF
10998 if { (eval echo configure:10999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10999   rm -rf conftest*
11000   echo "$ac_t""two" 1>&6
11001 else
11002   echo "configure: failed program was:" >&5
11003   cat conftest.$ac_ext >&5
11004   rm -rf conftest*
11005   echo "$ac_t""one" 1>&6
11006    { test "$extra_verbose" = "yes" && cat << \EOF
11007     Defining GETTIMEOFDAY_ONE_ARGUMENT
11008 EOF
11009 cat >> confdefs.h <<\EOF
11010 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11011 EOF
11012 }
11013
11014 fi
11015 rm -f conftest*
11016 fi
11017
11018
11019 echo $ac_n "checking for inline""... $ac_c" 1>&6
11020 echo "configure:11021: checking for inline" >&5
11021
11022 ac_cv_c_inline=no
11023 for ac_kw in inline __inline__ __inline; do
11024   cat > conftest.$ac_ext <<EOF
11025 #line 11026 "configure"
11026 #include "confdefs.h"
11027
11028 int main() {
11029 } $ac_kw foo() {
11030 ; return 0; }
11031 EOF
11032 if { (eval echo configure:11033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11033   rm -rf conftest*
11034   ac_cv_c_inline=$ac_kw; break
11035 else
11036   echo "configure: failed program was:" >&5
11037   cat conftest.$ac_ext >&5
11038 fi
11039 rm -f conftest*
11040 done
11041
11042
11043 echo "$ac_t""$ac_cv_c_inline" 1>&6
11044 case "$ac_cv_c_inline" in
11045   inline | yes) ;;
11046   no) { test "$extra_verbose" = "yes" && cat << \EOF
11047     Defining inline = 
11048 EOF
11049 cat >> confdefs.h <<\EOF
11050 #define inline 
11051 EOF
11052 }
11053  ;;
11054   *)  { test "$extra_verbose" = "yes" && cat << EOF
11055     Defining inline = $ac_cv_c_inline
11056 EOF
11057 cat >> confdefs.h <<EOF
11058 #define inline $ac_cv_c_inline
11059 EOF
11060 }
11061  ;;
11062 esac
11063
11064 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11065    echo "    xemacs will be linked with \"inline.o\""
11066  fi
11067
11068
11069 if test "$__DECC" != "yes"; then
11070   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11071 # for constant arguments.  Useless!
11072 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11073 echo "configure:11074: checking for working alloca.h" >&5
11074
11075 cat > conftest.$ac_ext <<EOF
11076 #line 11077 "configure"
11077 #include "confdefs.h"
11078 #include <alloca.h>
11079 int main() {
11080 char *p = alloca(2 * sizeof(int));
11081 ; return 0; }
11082 EOF
11083 if { (eval echo configure:11084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11084   rm -rf conftest*
11085   ac_cv_header_alloca_h=yes
11086 else
11087   echo "configure: failed program was:" >&5
11088   cat conftest.$ac_ext >&5
11089   rm -rf conftest*
11090   ac_cv_header_alloca_h=no
11091 fi
11092 rm -f conftest*
11093
11094 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11095 if test $ac_cv_header_alloca_h = yes; then
11096   { test "$extra_verbose" = "yes" && cat << \EOF
11097     Defining HAVE_ALLOCA_H
11098 EOF
11099 cat >> confdefs.h <<\EOF
11100 #define HAVE_ALLOCA_H 1
11101 EOF
11102 }
11103
11104 fi
11105
11106 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11107 echo "configure:11108: checking for alloca" >&5
11108
11109 cat > conftest.$ac_ext <<EOF
11110 #line 11111 "configure"
11111 #include "confdefs.h"
11112
11113 #ifdef __GNUC__
11114 # define alloca __builtin_alloca
11115 #else
11116 # ifdef _MSC_VER
11117 #  include <malloc.h>
11118 #  define alloca _alloca
11119 # else
11120 #  if HAVE_ALLOCA_H
11121 #   include <alloca.h>
11122 #  else
11123 #   ifdef _AIX
11124  #pragma alloca
11125 #   else
11126 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11127 char *alloca ();
11128 #    endif
11129 #   endif
11130 #  endif
11131 # endif
11132 #endif
11133
11134 int main() {
11135 char *p = (char *) alloca(1);
11136 ; return 0; }
11137 EOF
11138 if { (eval echo configure:11139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11139   rm -rf conftest*
11140   ac_cv_func_alloca_works=yes
11141 else
11142   echo "configure: failed program was:" >&5
11143   cat conftest.$ac_ext >&5
11144   rm -rf conftest*
11145   ac_cv_func_alloca_works=no
11146 fi
11147 rm -f conftest*
11148
11149 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11150 if test $ac_cv_func_alloca_works = yes; then
11151   { test "$extra_verbose" = "yes" && cat << \EOF
11152     Defining HAVE_ALLOCA
11153 EOF
11154 cat >> confdefs.h <<\EOF
11155 #define HAVE_ALLOCA 1
11156 EOF
11157 }
11158
11159 fi
11160
11161 if test $ac_cv_func_alloca_works = no; then
11162   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11163   # that cause trouble.  Some versions do not even contain alloca or
11164   # contain a buggy version.  If you still want to use their alloca,
11165   # use ar to extract alloca.o from them instead of compiling alloca.c.
11166   ALLOCA=alloca.${ac_objext}
11167   { test "$extra_verbose" = "yes" && cat << \EOF
11168     Defining C_ALLOCA
11169 EOF
11170 cat >> confdefs.h <<\EOF
11171 #define C_ALLOCA 1
11172 EOF
11173 }
11174
11175
11176 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11177 echo "configure:11178: checking whether alloca needs Cray hooks" >&5
11178
11179 cat > conftest.$ac_ext <<EOF
11180 #line 11181 "configure"
11181 #include "confdefs.h"
11182 #if defined(CRAY) && ! defined(CRAY2)
11183 webecray
11184 #else
11185 wenotbecray
11186 #endif
11187
11188 EOF
11189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11190   egrep "webecray" >/dev/null 2>&1; then
11191   rm -rf conftest*
11192   ac_cv_os_cray=yes
11193 else
11194   rm -rf conftest*
11195   ac_cv_os_cray=no
11196 fi
11197 rm -f conftest*
11198
11199
11200 echo "$ac_t""$ac_cv_os_cray" 1>&6
11201 if test $ac_cv_os_cray = yes; then
11202 for ac_func in _getb67 GETB67 getb67; do
11203   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11204 echo "configure:11205: checking for $ac_func" >&5
11205
11206 cat > conftest.$ac_ext <<EOF
11207 #line 11208 "configure"
11208 #include "confdefs.h"
11209 /* System header to define __stub macros and hopefully few prototypes,
11210     which can conflict with char $ac_func(); below.  */
11211 #include <assert.h>
11212 /* Override any gcc2 internal prototype to avoid an error.  */
11213 /* We use char because int might match the return type of a gcc2
11214     builtin and then its argument prototype would still apply.  */
11215 char $ac_func();
11216
11217 int main() {
11218
11219 /* The GNU C library defines this for functions which it implements
11220     to always fail with ENOSYS.  Some functions are actually named
11221     something starting with __ and the normal name is an alias.  */
11222 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11223 choke me
11224 #else
11225 $ac_func();
11226 #endif
11227
11228 ; return 0; }
11229 EOF
11230 if { (eval echo configure:11231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11231   rm -rf conftest*
11232   eval "ac_cv_func_$ac_func=yes"
11233 else
11234   echo "configure: failed program was:" >&5
11235   cat conftest.$ac_ext >&5
11236   rm -rf conftest*
11237   eval "ac_cv_func_$ac_func=no"
11238 fi
11239 rm -f conftest*
11240
11241 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11242   echo "$ac_t""yes" 1>&6
11243   { test "$extra_verbose" = "yes" && cat << EOF
11244     Defining CRAY_STACKSEG_END = $ac_func
11245 EOF
11246 cat >> confdefs.h <<EOF
11247 #define CRAY_STACKSEG_END $ac_func
11248 EOF
11249 }
11250
11251   break
11252 else
11253   echo "$ac_t""no" 1>&6
11254 fi
11255
11256 done
11257 fi
11258
11259 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11260 echo "configure:11261: checking stack direction for C alloca" >&5
11261
11262 cat > conftest.$ac_ext <<EOF
11263 #line 11264 "configure"
11264 #include "confdefs.h"
11265 find_stack_direction ()
11266 {
11267   static char *addr = 0;
11268   auto char dummy;
11269   if (addr == 0)
11270     {
11271       addr = &dummy;
11272       return find_stack_direction ();
11273     }
11274   else
11275     return (&dummy > addr) ? 1 : -1;
11276 }
11277 main ()
11278 {
11279   exit (find_stack_direction() < 0);
11280 }
11281 EOF
11282 if { (eval echo configure:11283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11283 then
11284   ac_cv_c_stack_direction=1
11285 else
11286   conftest_rc="$?"
11287   echo "configure: failed program was:" >&5
11288   cat conftest.$ac_ext >&5
11289   rm -fr conftest*
11290   ac_cv_c_stack_direction=-1
11291 fi
11292 rm -fr conftest*
11293
11294 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11295 { test "$extra_verbose" = "yes" && cat << EOF
11296     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11297 EOF
11298 cat >> confdefs.h <<EOF
11299 #define STACK_DIRECTION $ac_cv_c_stack_direction
11300 EOF
11301 }
11302
11303 fi
11304
11305   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11306    echo "    xemacs will be linked with \"$ALLOCA\""
11307  fi
11308 fi
11309
11310 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11311 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11312 echo "configure:11313: checking for vfork.h" >&5
11313
11314 cat > conftest.$ac_ext <<EOF
11315 #line 11316 "configure"
11316 #include "confdefs.h"
11317 #include <vfork.h>
11318 EOF
11319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11320 { (eval echo configure:11321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11322 if test -z "$ac_err"; then
11323   rm -rf conftest*
11324   eval "ac_cv_header_$ac_safe=yes"
11325 else
11326   echo "$ac_err" >&5
11327   echo "configure: failed program was:" >&5
11328   cat conftest.$ac_ext >&5
11329   rm -rf conftest*
11330   eval "ac_cv_header_$ac_safe=no"
11331 fi
11332 rm -f conftest*
11333 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11334   echo "$ac_t""yes" 1>&6
11335   { test "$extra_verbose" = "yes" && cat << \EOF
11336     Defining HAVE_VFORK_H
11337 EOF
11338 cat >> confdefs.h <<\EOF
11339 #define HAVE_VFORK_H 1
11340 EOF
11341 }
11342
11343 else
11344   echo "$ac_t""no" 1>&6
11345 fi
11346
11347 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11348 echo "configure:11349: checking for working vfork" >&5
11349
11350 cat > conftest.$ac_ext <<EOF
11351 #line 11352 "configure"
11352 #include "confdefs.h"
11353 /* Thanks to Paul Eggert for this test.  */
11354 #include <stdio.h>
11355 #include <sys/types.h>
11356 #include <sys/stat.h>
11357 #ifdef HAVE_UNISTD_H
11358 #include <unistd.h>
11359 #endif
11360 #ifdef HAVE_VFORK_H
11361 #include <vfork.h>
11362 #endif
11363 /* On some sparc systems, changes by the child to local and incoming
11364    argument registers are propagated back to the parent.
11365    The compiler is told about this with #include <vfork.h>,
11366    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11367    Test for this by using a static variable whose address
11368    is put into a register that is clobbered by the vfork.  */
11369 static
11370 #ifdef __cplusplus
11371 sparc_address_test (int arg)
11372 #else
11373 sparc_address_test (arg) int arg;
11374 #endif
11375 {
11376   static pid_t child;
11377   if (!child) {
11378     child = vfork ();
11379     if (child < 0) {
11380       perror ("vfork");
11381       _exit(2);
11382     }
11383     if (!child) {
11384       arg = getpid();
11385       write(-1, "", 0);
11386       _exit (arg);
11387     }
11388   }
11389 }
11390 main() {
11391   pid_t parent = getpid ();
11392   pid_t child;
11393
11394   sparc_address_test ();
11395
11396   child = vfork ();
11397
11398   if (child == 0) {
11399     /* Here is another test for sparc vfork register problems.
11400        This test uses lots of local variables, at least
11401        as many local variables as main has allocated so far
11402        including compiler temporaries.  4 locals are enough for
11403        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
11404        A buggy compiler should reuse the register of parent
11405        for one of the local variables, since it will think that
11406        parent can't possibly be used any more in this routine.
11407        Assigning to the local variable will thus munge parent
11408        in the parent process.  */
11409     pid_t
11410       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11411       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11412     /* Convince the compiler that p..p7 are live; otherwise, it might
11413        use the same hardware register for all 8 local variables.  */
11414     if (p != p1 || p != p2 || p != p3 || p != p4
11415         || p != p5 || p != p6 || p != p7)
11416       _exit(1);
11417
11418     /* On some systems (e.g. IRIX 3.3),
11419        vfork doesn't separate parent from child file descriptors.
11420        If the child closes a descriptor before it execs or exits,
11421        this munges the parent's descriptor as well.
11422        Test for this by closing stdout in the child.  */
11423     _exit(close(fileno(stdout)) != 0);
11424   } else {
11425     int status;
11426     struct stat st;
11427
11428     while (wait(&status) != child)
11429       ;
11430     exit(
11431          /* Was there some problem with vforking?  */
11432          child < 0
11433
11434          /* Did the child fail?  (This shouldn't happen.)  */
11435          || status
11436
11437          /* Did the vfork/compiler bug occur?  */
11438          || parent != getpid()
11439
11440          /* Did the file descriptor bug occur?  */
11441          || fstat(fileno(stdout), &st) != 0
11442          );
11443   }
11444 }
11445 EOF
11446 if { (eval echo configure:11447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11447 then
11448   ac_cv_func_vfork_works=yes
11449 else
11450   conftest_rc="$?"
11451   echo "configure: failed program was:" >&5
11452   cat conftest.$ac_ext >&5
11453   rm -fr conftest*
11454   ac_cv_func_vfork_works=no
11455 fi
11456 rm -fr conftest*
11457
11458 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
11459 if test $ac_cv_func_vfork_works = no; then
11460   { test "$extra_verbose" = "yes" && cat << \EOF
11461     Defining vfork = fork
11462 EOF
11463 cat >> confdefs.h <<\EOF
11464 #define vfork fork
11465 EOF
11466 }
11467
11468 fi
11469
11470
11471 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
11472 echo "configure:11473: checking for working strcoll" >&5
11473
11474 cat > conftest.$ac_ext <<EOF
11475 #line 11476 "configure"
11476 #include "confdefs.h"
11477 #include <string.h>
11478 main ()
11479 {
11480   exit (strcoll ("abc", "def") >= 0 ||
11481         strcoll ("ABC", "DEF") >= 0 ||
11482         strcoll ("123", "456") >= 0);
11483 }
11484 EOF
11485 if { (eval echo configure:11486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11486 then
11487   ac_cv_func_strcoll_works=yes
11488 else
11489   conftest_rc="$?"
11490   echo "configure: failed program was:" >&5
11491   cat conftest.$ac_ext >&5
11492   rm -fr conftest*
11493   ac_cv_func_strcoll_works=no
11494 fi
11495 rm -fr conftest*
11496
11497 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
11498 if test $ac_cv_func_strcoll_works = yes; then
11499   { test "$extra_verbose" = "yes" && cat << \EOF
11500     Defining HAVE_STRCOLL
11501 EOF
11502 cat >> confdefs.h <<\EOF
11503 #define HAVE_STRCOLL 1
11504 EOF
11505 }
11506
11507 fi
11508
11509
11510 for ac_func in getpgrp
11511 do
11512 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11513 echo "configure:11514: checking for $ac_func" >&5
11514
11515 cat > conftest.$ac_ext <<EOF
11516 #line 11517 "configure"
11517 #include "confdefs.h"
11518 /* System header to define __stub macros and hopefully few prototypes,
11519     which can conflict with char $ac_func(); below.  */
11520 #include <assert.h>
11521 /* Override any gcc2 internal prototype to avoid an error.  */
11522 /* We use char because int might match the return type of a gcc2
11523     builtin and then its argument prototype would still apply.  */
11524 char $ac_func();
11525
11526 int main() {
11527
11528 /* The GNU C library defines this for functions which it implements
11529     to always fail with ENOSYS.  Some functions are actually named
11530     something starting with __ and the normal name is an alias.  */
11531 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11532 choke me
11533 #else
11534 $ac_func();
11535 #endif
11536
11537 ; return 0; }
11538 EOF
11539 if { (eval echo configure:11540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11540   rm -rf conftest*
11541   eval "ac_cv_func_$ac_func=yes"
11542 else
11543   echo "configure: failed program was:" >&5
11544   cat conftest.$ac_ext >&5
11545   rm -rf conftest*
11546   eval "ac_cv_func_$ac_func=no"
11547 fi
11548 rm -f conftest*
11549
11550 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11551   echo "$ac_t""yes" 1>&6
11552     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11553   { test "$extra_verbose" = "yes" && cat << EOF
11554     Defining $ac_tr_func
11555 EOF
11556 cat >> confdefs.h <<EOF
11557 #define $ac_tr_func 1
11558 EOF
11559 }
11560  
11561 else
11562   echo "$ac_t""no" 1>&6
11563 fi
11564 done
11565
11566 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
11567 echo "configure:11568: checking whether getpgrp takes no argument" >&5
11568
11569 cat > conftest.$ac_ext <<EOF
11570 #line 11571 "configure"
11571 #include "confdefs.h"
11572
11573 /*
11574  * If this system has a BSD-style getpgrp(),
11575  * which takes a pid argument, exit unsuccessfully.
11576  *
11577  * Snarfed from Chet Ramey's bash pgrp.c test program
11578  */
11579 #include <stdio.h>
11580 #include <sys/types.h>
11581
11582 int     pid;
11583 int     pg1, pg2, pg3, pg4;
11584 int     ng, np, s, child;
11585
11586 main()
11587 {
11588         pid = getpid();
11589         pg1 = getpgrp(0);
11590         pg2 = getpgrp();
11591         pg3 = getpgrp(pid);
11592         pg4 = getpgrp(1);
11593
11594         /*
11595          * If all of these values are the same, it's pretty sure that
11596          * we're on a system that ignores getpgrp's first argument.
11597          */
11598         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
11599                 exit(0);
11600
11601         child = fork();
11602         if (child < 0)
11603                 exit(1);
11604         else if (child == 0) {
11605                 np = getpid();
11606                 /*
11607                  * If this is Sys V, this will not work; pgrp will be
11608                  * set to np because setpgrp just changes a pgrp to be
11609                  * the same as the pid.
11610                  */
11611                 setpgrp(np, pg1);
11612                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
11613                 if (ng == pg1) {
11614                         exit(1);
11615                 } else {
11616                         exit(0);
11617                 }
11618         } else {
11619                 wait(&s);
11620                 exit(s>>8);
11621         }
11622 }
11623
11624 EOF
11625 if { (eval echo configure:11626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11626 then
11627   ac_cv_func_getpgrp_void=yes
11628 else
11629   conftest_rc="$?"
11630   echo "configure: failed program was:" >&5
11631   cat conftest.$ac_ext >&5
11632   rm -fr conftest*
11633   ac_cv_func_getpgrp_void=no
11634 fi
11635 rm -fr conftest*
11636
11637
11638 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
11639 if test $ac_cv_func_getpgrp_void = yes; then
11640   { test "$extra_verbose" = "yes" && cat << \EOF
11641     Defining GETPGRP_VOID
11642 EOF
11643 cat >> confdefs.h <<\EOF
11644 #define GETPGRP_VOID 1
11645 EOF
11646 }
11647
11648 fi
11649
11650
11651 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11652 echo "configure:11653: checking for working mmap" >&5
11653 case "$opsys" in ultrix* ) have_mmap=no ;; *)
11654 cat > conftest.$ac_ext <<EOF
11655 #line 11656 "configure"
11656 #include "confdefs.h"
11657 #include <stdio.h>
11658 #include <unistd.h>
11659 #include <fcntl.h>
11660 #include <sys/mman.h>
11661
11662 #ifndef MAP_VARIABLE
11663 #define MAP_VARIABLE 0
11664 #endif
11665
11666 #ifndef MAP_FAILED
11667 #define MAP_FAILED -1
11668 #endif
11669
11670 int main (int argc, char *argv[])
11671 {
11672   int fd = -1;
11673   caddr_t p;
11674 #ifndef MAP_ANONYMOUS
11675   fd = open ("/dev/zero", O_RDWR);
11676   if (fd < 0)
11677     return 1;
11678 #define MAP_ANONYMOUS 0
11679 #endif
11680   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
11681            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
11682            fd, 0) != (void *) MAP_FAILED)
11683     return 0;
11684   perror ("conftest: mmap failed");
11685   return 1;
11686 }
11687 EOF
11688 if { (eval echo configure:11689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11689 then
11690   have_mmap=yes
11691 else
11692   conftest_rc="$?"
11693   echo "configure: failed program was:" >&5
11694   cat conftest.$ac_ext >&5
11695   rm -fr conftest*
11696   have_mmap=no
11697 fi
11698 rm -fr conftest* ;;
11699 esac
11700 echo "$ac_t""$have_mmap" 1>&6
11701 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11702     Defining HAVE_MMAP
11703 EOF
11704 cat >> confdefs.h <<\EOF
11705 #define HAVE_MMAP 1
11706 EOF
11707 }
11708
11709
11710 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
11711 if test "$rel_alloc $have_mmap" = "default yes"; then
11712   if test "$doug_lea_malloc" = "yes"; then
11713         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
11714 echo "configure:11715: checking for M_MMAP_THRESHOLD" >&5
11715     cat > conftest.$ac_ext <<EOF
11716 #line 11717 "configure"
11717 #include "confdefs.h"
11718 #include <malloc.h>
11719 int main() {
11720
11721 #ifndef M_MMAP_THRESHOLD
11722 #error No M_MMAP_THRESHOLD :-(
11723 !@+$%^&*_)(_ - unlikely to compile...
11724 #endif
11725
11726 ; return 0; }
11727 EOF
11728 if { (eval echo configure:11729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11729   rm -rf conftest*
11730   rel_alloc=no; echo "$ac_t""yes" 1>&6;
11731 else
11732   echo "configure: failed program was:" >&5
11733   cat conftest.$ac_ext >&5
11734   rm -rf conftest*
11735   rel_alloc=yes; echo "$ac_t""no" 1>&6;
11736 fi
11737 rm -f conftest*
11738   else
11739     rel_alloc=yes
11740   fi
11741 fi
11742 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11743     Defining REL_ALLOC
11744 EOF
11745 cat >> confdefs.h <<\EOF
11746 #define REL_ALLOC 1
11747 EOF
11748 }
11749
11750
11751 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11752 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11753 echo "configure:11754: checking for termios.h" >&5
11754
11755 cat > conftest.$ac_ext <<EOF
11756 #line 11757 "configure"
11757 #include "confdefs.h"
11758 #include <termios.h>
11759 EOF
11760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11761 { (eval echo configure:11762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11763 if test -z "$ac_err"; then
11764   rm -rf conftest*
11765   eval "ac_cv_header_$ac_safe=yes"
11766 else
11767   echo "$ac_err" >&5
11768   echo "configure: failed program was:" >&5
11769   cat conftest.$ac_ext >&5
11770   rm -rf conftest*
11771   eval "ac_cv_header_$ac_safe=no"
11772 fi
11773 rm -f conftest*
11774 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11775   echo "$ac_t""yes" 1>&6
11776   { test "$extra_verbose" = "yes" && cat << \EOF
11777     Defining HAVE_TERMIOS
11778 EOF
11779 cat >> confdefs.h <<\EOF
11780 #define HAVE_TERMIOS 1
11781 EOF
11782 }
11783
11784   { test "$extra_verbose" = "yes" && cat << \EOF
11785     Defining SIGNALS_VIA_CHARACTERS
11786 EOF
11787 cat >> confdefs.h <<\EOF
11788 #define SIGNALS_VIA_CHARACTERS 1
11789 EOF
11790 }
11791
11792   { test "$extra_verbose" = "yes" && cat << \EOF
11793     Defining NO_TERMIO
11794 EOF
11795 cat >> confdefs.h <<\EOF
11796 #define NO_TERMIO 1
11797 EOF
11798 }
11799
11800 else
11801   echo "$ac_t""no" 1>&6
11802 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11803 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11804 echo "configure:11805: checking for termio.h" >&5
11805
11806 cat > conftest.$ac_ext <<EOF
11807 #line 11808 "configure"
11808 #include "confdefs.h"
11809 #include <termio.h>
11810 EOF
11811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11812 { (eval echo configure:11813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11814 if test -z "$ac_err"; then
11815   rm -rf conftest*
11816   eval "ac_cv_header_$ac_safe=yes"
11817 else
11818   echo "$ac_err" >&5
11819   echo "configure: failed program was:" >&5
11820   cat conftest.$ac_ext >&5
11821   rm -rf conftest*
11822   eval "ac_cv_header_$ac_safe=no"
11823 fi
11824 rm -f conftest*
11825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11826   echo "$ac_t""yes" 1>&6
11827   { test "$extra_verbose" = "yes" && cat << \EOF
11828     Defining HAVE_TERMIO
11829 EOF
11830 cat >> confdefs.h <<\EOF
11831 #define HAVE_TERMIO 1
11832 EOF
11833 }
11834
11835 else
11836   echo "$ac_t""no" 1>&6
11837 fi
11838
11839 fi
11840
11841
11842
11843 echo $ac_n "checking for socket""... $ac_c" 1>&6
11844 echo "configure:11845: checking for socket" >&5
11845
11846 cat > conftest.$ac_ext <<EOF
11847 #line 11848 "configure"
11848 #include "confdefs.h"
11849 /* System header to define __stub macros and hopefully few prototypes,
11850     which can conflict with char socket(); below.  */
11851 #include <assert.h>
11852 /* Override any gcc2 internal prototype to avoid an error.  */
11853 /* We use char because int might match the return type of a gcc2
11854     builtin and then its argument prototype would still apply.  */
11855 char socket();
11856
11857 int main() {
11858
11859 /* The GNU C library defines this for functions which it implements
11860     to always fail with ENOSYS.  Some functions are actually named
11861     something starting with __ and the normal name is an alias.  */
11862 #if defined (__stub_socket) || defined (__stub___socket)
11863 choke me
11864 #else
11865 socket();
11866 #endif
11867
11868 ; return 0; }
11869 EOF
11870 if { (eval echo configure:11871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11871   rm -rf conftest*
11872   eval "ac_cv_func_socket=yes"
11873 else
11874   echo "configure: failed program was:" >&5
11875   cat conftest.$ac_ext >&5
11876   rm -rf conftest*
11877   eval "ac_cv_func_socket=no"
11878 fi
11879 rm -f conftest*
11880
11881 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11882   echo "$ac_t""yes" 1>&6
11883   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11884 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11885 echo "configure:11886: checking for netinet/in.h" >&5
11886
11887 cat > conftest.$ac_ext <<EOF
11888 #line 11889 "configure"
11889 #include "confdefs.h"
11890 #include <netinet/in.h>
11891 EOF
11892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11893 { (eval echo configure:11894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11895 if test -z "$ac_err"; then
11896   rm -rf conftest*
11897   eval "ac_cv_header_$ac_safe=yes"
11898 else
11899   echo "$ac_err" >&5
11900   echo "configure: failed program was:" >&5
11901   cat conftest.$ac_ext >&5
11902   rm -rf conftest*
11903   eval "ac_cv_header_$ac_safe=no"
11904 fi
11905 rm -f conftest*
11906 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11907   echo "$ac_t""yes" 1>&6
11908   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11909 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11910 echo "configure:11911: checking for arpa/inet.h" >&5
11911
11912 cat > conftest.$ac_ext <<EOF
11913 #line 11914 "configure"
11914 #include "confdefs.h"
11915 #include <arpa/inet.h>
11916 EOF
11917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11918 { (eval echo configure:11919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11920 if test -z "$ac_err"; then
11921   rm -rf conftest*
11922   eval "ac_cv_header_$ac_safe=yes"
11923 else
11924   echo "$ac_err" >&5
11925   echo "configure: failed program was:" >&5
11926   cat conftest.$ac_ext >&5
11927   rm -rf conftest*
11928   eval "ac_cv_header_$ac_safe=no"
11929 fi
11930 rm -f conftest*
11931 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11932   echo "$ac_t""yes" 1>&6
11933   
11934   { test "$extra_verbose" = "yes" && cat << \EOF
11935     Defining HAVE_SOCKETS
11936 EOF
11937 cat >> confdefs.h <<\EOF
11938 #define HAVE_SOCKETS 1
11939 EOF
11940 }
11941
11942       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11943 echo "configure:11944: checking "for sun_len member in struct sockaddr_un"" >&5
11944       cat > conftest.$ac_ext <<EOF
11945 #line 11946 "configure"
11946 #include "confdefs.h"
11947
11948 #include <sys/types.h>
11949 #include <sys/socket.h>
11950 #include <sys/un.h>
11951       
11952 int main() {
11953 static struct sockaddr_un x; x.sun_len = 1;
11954 ; return 0; }
11955 EOF
11956 if { (eval echo configure:11957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11957   rm -rf conftest*
11958   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11959     Defining HAVE_SOCKADDR_SUN_LEN
11960 EOF
11961 cat >> confdefs.h <<\EOF
11962 #define HAVE_SOCKADDR_SUN_LEN 1
11963 EOF
11964 }
11965
11966 else
11967   echo "configure: failed program was:" >&5
11968   cat conftest.$ac_ext >&5
11969   rm -rf conftest*
11970   echo "$ac_t""no" 1>&6
11971 fi
11972 rm -f conftest*
11973       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11974 echo "configure:11975: checking "for ip_mreq struct in netinet/in.h"" >&5
11975       cat > conftest.$ac_ext <<EOF
11976 #line 11977 "configure"
11977 #include "confdefs.h"
11978
11979 #include <sys/types.h>
11980 #include <netinet/in.h>
11981       
11982 int main() {
11983 static struct ip_mreq x;
11984 ; return 0; }
11985 EOF
11986 if { (eval echo configure:11987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11987   rm -rf conftest*
11988   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11989     Defining HAVE_MULTICAST
11990 EOF
11991 cat >> confdefs.h <<\EOF
11992 #define HAVE_MULTICAST 1
11993 EOF
11994 }
11995
11996 else
11997   echo "configure: failed program was:" >&5
11998   cat conftest.$ac_ext >&5
11999   rm -rf conftest*
12000   echo "$ac_t""no" 1>&6
12001 fi
12002 rm -f conftest*
12003 else
12004   echo "$ac_t""no" 1>&6
12005 fi
12006
12007 else
12008   echo "$ac_t""no" 1>&6
12009 fi
12010
12011 else
12012   echo "$ac_t""no" 1>&6
12013 fi
12014
12015
12016 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12017 echo "configure:12018: checking for msgget" >&5
12018
12019 cat > conftest.$ac_ext <<EOF
12020 #line 12021 "configure"
12021 #include "confdefs.h"
12022 /* System header to define __stub macros and hopefully few prototypes,
12023     which can conflict with char msgget(); below.  */
12024 #include <assert.h>
12025 /* Override any gcc2 internal prototype to avoid an error.  */
12026 /* We use char because int might match the return type of a gcc2
12027     builtin and then its argument prototype would still apply.  */
12028 char msgget();
12029
12030 int main() {
12031
12032 /* The GNU C library defines this for functions which it implements
12033     to always fail with ENOSYS.  Some functions are actually named
12034     something starting with __ and the normal name is an alias.  */
12035 #if defined (__stub_msgget) || defined (__stub___msgget)
12036 choke me
12037 #else
12038 msgget();
12039 #endif
12040
12041 ; return 0; }
12042 EOF
12043 if { (eval echo configure:12044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12044   rm -rf conftest*
12045   eval "ac_cv_func_msgget=yes"
12046 else
12047   echo "configure: failed program was:" >&5
12048   cat conftest.$ac_ext >&5
12049   rm -rf conftest*
12050   eval "ac_cv_func_msgget=no"
12051 fi
12052 rm -f conftest*
12053
12054 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12055   echo "$ac_t""yes" 1>&6
12056   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12057 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12058 echo "configure:12059: checking for sys/ipc.h" >&5
12059
12060 cat > conftest.$ac_ext <<EOF
12061 #line 12062 "configure"
12062 #include "confdefs.h"
12063 #include <sys/ipc.h>
12064 EOF
12065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12066 { (eval echo configure:12067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12068 if test -z "$ac_err"; then
12069   rm -rf conftest*
12070   eval "ac_cv_header_$ac_safe=yes"
12071 else
12072   echo "$ac_err" >&5
12073   echo "configure: failed program was:" >&5
12074   cat conftest.$ac_ext >&5
12075   rm -rf conftest*
12076   eval "ac_cv_header_$ac_safe=no"
12077 fi
12078 rm -f conftest*
12079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12080   echo "$ac_t""yes" 1>&6
12081   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12082 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12083 echo "configure:12084: checking for sys/msg.h" >&5
12084
12085 cat > conftest.$ac_ext <<EOF
12086 #line 12087 "configure"
12087 #include "confdefs.h"
12088 #include <sys/msg.h>
12089 EOF
12090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12091 { (eval echo configure:12092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12093 if test -z "$ac_err"; then
12094   rm -rf conftest*
12095   eval "ac_cv_header_$ac_safe=yes"
12096 else
12097   echo "$ac_err" >&5
12098   echo "configure: failed program was:" >&5
12099   cat conftest.$ac_ext >&5
12100   rm -rf conftest*
12101   eval "ac_cv_header_$ac_safe=no"
12102 fi
12103 rm -f conftest*
12104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12105   echo "$ac_t""yes" 1>&6
12106   { test "$extra_verbose" = "yes" && cat << \EOF
12107     Defining HAVE_SYSVIPC
12108 EOF
12109 cat >> confdefs.h <<\EOF
12110 #define HAVE_SYSVIPC 1
12111 EOF
12112 }
12113
12114 else
12115   echo "$ac_t""no" 1>&6
12116 fi
12117
12118 else
12119   echo "$ac_t""no" 1>&6
12120 fi
12121
12122 else
12123   echo "$ac_t""no" 1>&6
12124 fi
12125
12126
12127 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12128 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12129 echo "configure:12130: checking for dirent.h" >&5
12130
12131 cat > conftest.$ac_ext <<EOF
12132 #line 12133 "configure"
12133 #include "confdefs.h"
12134 #include <dirent.h>
12135 EOF
12136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12137 { (eval echo configure:12138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12139 if test -z "$ac_err"; then
12140   rm -rf conftest*
12141   eval "ac_cv_header_$ac_safe=yes"
12142 else
12143   echo "$ac_err" >&5
12144   echo "configure: failed program was:" >&5
12145   cat conftest.$ac_ext >&5
12146   rm -rf conftest*
12147   eval "ac_cv_header_$ac_safe=no"
12148 fi
12149 rm -f conftest*
12150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12151   echo "$ac_t""yes" 1>&6
12152   { test "$extra_verbose" = "yes" && cat << \EOF
12153     Defining SYSV_SYSTEM_DIR
12154 EOF
12155 cat >> confdefs.h <<\EOF
12156 #define SYSV_SYSTEM_DIR 1
12157 EOF
12158 }
12159
12160 else
12161   echo "$ac_t""no" 1>&6
12162 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12163 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12164 echo "configure:12165: checking for sys/dir.h" >&5
12165
12166 cat > conftest.$ac_ext <<EOF
12167 #line 12168 "configure"
12168 #include "confdefs.h"
12169 #include <sys/dir.h>
12170 EOF
12171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12172 { (eval echo configure:12173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12174 if test -z "$ac_err"; then
12175   rm -rf conftest*
12176   eval "ac_cv_header_$ac_safe=yes"
12177 else
12178   echo "$ac_err" >&5
12179   echo "configure: failed program was:" >&5
12180   cat conftest.$ac_ext >&5
12181   rm -rf conftest*
12182   eval "ac_cv_header_$ac_safe=no"
12183 fi
12184 rm -f conftest*
12185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12186   echo "$ac_t""yes" 1>&6
12187   :
12188 else
12189   echo "$ac_t""no" 1>&6
12190 { test "$extra_verbose" = "yes" && cat << \EOF
12191     Defining NONSYSTEM_DIR_LIBRARY
12192 EOF
12193 cat >> confdefs.h <<\EOF
12194 #define NONSYSTEM_DIR_LIBRARY 1
12195 EOF
12196 }
12197
12198 fi
12199
12200 fi
12201
12202
12203 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12204 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12205 echo "configure:12206: checking for nlist.h" >&5
12206
12207 cat > conftest.$ac_ext <<EOF
12208 #line 12209 "configure"
12209 #include "confdefs.h"
12210 #include <nlist.h>
12211 EOF
12212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12213 { (eval echo configure:12214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12215 if test -z "$ac_err"; then
12216   rm -rf conftest*
12217   eval "ac_cv_header_$ac_safe=yes"
12218 else
12219   echo "$ac_err" >&5
12220   echo "configure: failed program was:" >&5
12221   cat conftest.$ac_ext >&5
12222   rm -rf conftest*
12223   eval "ac_cv_header_$ac_safe=no"
12224 fi
12225 rm -f conftest*
12226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12227   echo "$ac_t""yes" 1>&6
12228   { test "$extra_verbose" = "yes" && cat << \EOF
12229     Defining NLIST_STRUCT
12230 EOF
12231 cat >> confdefs.h <<\EOF
12232 #define NLIST_STRUCT 1
12233 EOF
12234 }
12235
12236 else
12237   echo "$ac_t""no" 1>&6
12238 fi
12239
12240
12241
12242 echo "checking "for sound support"" 1>&6
12243 echo "configure:12244: checking "for sound support"" >&5
12244 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12245
12246 if test "$with_native_sound" != "no"; then
12247     if test -n "$native_sound_lib"; then
12248     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12249 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12250 echo "configure:12251: checking for multimedia/audio_device.h" >&5
12251
12252 cat > conftest.$ac_ext <<EOF
12253 #line 12254 "configure"
12254 #include "confdefs.h"
12255 #include <multimedia/audio_device.h>
12256 EOF
12257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12258 { (eval echo configure:12259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12260 if test -z "$ac_err"; then
12261   rm -rf conftest*
12262   eval "ac_cv_header_$ac_safe=yes"
12263 else
12264   echo "$ac_err" >&5
12265   echo "configure: failed program was:" >&5
12266   cat conftest.$ac_ext >&5
12267   rm -rf conftest*
12268   eval "ac_cv_header_$ac_safe=no"
12269 fi
12270 rm -f conftest*
12271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12272   echo "$ac_t""yes" 1>&6
12273   sound_found=yes sound_cflags=""
12274       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12275    echo "    xemacs will be linked with \"sunplay.o\""
12276  fi
12277 else
12278   echo "$ac_t""no" 1>&6
12279 fi
12280
12281   fi
12282
12283     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12284     sound_found=yes
12285     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12286    echo "    xemacs will be linked with \"sunplay.o\""
12287  fi
12288     if test -d "/usr/demo/SOUND/include"
12289       then sound_cflags="-I/usr/demo/SOUND/include"
12290       else sound_cflags="-I/usr/demo/SOUND"
12291     fi
12292     if test -z "$native_sound_lib" ; then
12293       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12294         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12295         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12296       fi
12297     fi
12298   fi
12299
12300     if test -z "$sound_found"; then
12301     case "$canonical" in
12302     *-sgi-* )
12303       if test -z "$native_sound_lib"; then
12304         
12305 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12306 echo "configure:12307: checking for ALopenport in -laudio" >&5
12307 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12308
12309 xe_check_libs=" -laudio "
12310 cat > conftest.$ac_ext <<EOF
12311 #line 12312 "configure"
12312 #include "confdefs.h"
12313 /* Override any gcc2 internal prototype to avoid an error.  */
12314 /* We use char because int might match the return type of a gcc2
12315     builtin and then its argument prototype would still apply.  */
12316 char ALopenport();
12317
12318 int main() {
12319 ALopenport()
12320 ; return 0; }
12321 EOF
12322 if { (eval echo configure:12323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12323   rm -rf conftest*
12324   eval "ac_cv_lib_$ac_lib_var=yes"
12325 else
12326   echo "configure: failed program was:" >&5
12327   cat conftest.$ac_ext >&5
12328   rm -rf conftest*
12329   eval "ac_cv_lib_$ac_lib_var=no"
12330 fi
12331 rm -f conftest*
12332 xe_check_libs=""
12333
12334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12335   echo "$ac_t""yes" 1>&6
12336   native_sound_lib="-laudio"
12337 else
12338   echo "$ac_t""no" 1>&6
12339 fi
12340
12341
12342       fi
12343       if test -n "$native_sound_lib"; then
12344         sound_found=yes sound_cflags=""
12345         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12346    echo "    xemacs will be linked with \"sgiplay.o\""
12347  fi
12348       fi ;;
12349     hppa*-hp-hpux* )
12350       if test -z "$native_sound_lib"; then
12351         
12352 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12353 echo "configure:12354: checking for AOpenAudio in -lAlib" >&5
12354 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12355
12356 xe_check_libs=" -lAlib "
12357 cat > conftest.$ac_ext <<EOF
12358 #line 12359 "configure"
12359 #include "confdefs.h"
12360 /* Override any gcc2 internal prototype to avoid an error.  */
12361 /* We use char because int might match the return type of a gcc2
12362     builtin and then its argument prototype would still apply.  */
12363 char AOpenAudio();
12364
12365 int main() {
12366 AOpenAudio()
12367 ; return 0; }
12368 EOF
12369 if { (eval echo configure:12370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12370   rm -rf conftest*
12371   eval "ac_cv_lib_$ac_lib_var=yes"
12372 else
12373   echo "configure: failed program was:" >&5
12374   cat conftest.$ac_ext >&5
12375   rm -rf conftest*
12376   eval "ac_cv_lib_$ac_lib_var=no"
12377 fi
12378 rm -f conftest*
12379 xe_check_libs=""
12380
12381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12382   echo "$ac_t""yes" 1>&6
12383   native_sound_lib="-lAlib"
12384 else
12385   echo "$ac_t""no" 1>&6
12386 fi
12387
12388
12389       fi
12390       if test -n "$native_sound_lib"; then
12391         sound_found=yes
12392         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
12393    echo "    xemacs will be linked with \"hpplay.o\""
12394  fi
12395         if test "$GCC" = "yes" # Kludge city
12396           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
12397           else sound_cflags="+e -I/usr/audio/examples"
12398         fi
12399       fi ;;
12400     esac
12401   fi
12402
12403     if test -z "$sound_found"; then
12404     for dir in "machine" "sys" "linux"; do
12405       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
12406 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
12407 echo "configure:12408: checking for ${dir}/soundcard.h" >&5
12408
12409 cat > conftest.$ac_ext <<EOF
12410 #line 12411 "configure"
12411 #include "confdefs.h"
12412 #include <${dir}/soundcard.h>
12413 EOF
12414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12415 { (eval echo configure:12416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12417 if test -z "$ac_err"; then
12418   rm -rf conftest*
12419   eval "ac_cv_header_$ac_safe=yes"
12420 else
12421   echo "$ac_err" >&5
12422   echo "configure: failed program was:" >&5
12423   cat conftest.$ac_ext >&5
12424   rm -rf conftest*
12425   eval "ac_cv_header_$ac_safe=no"
12426 fi
12427 rm -f conftest*
12428 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12429   echo "$ac_t""yes" 1>&6
12430   sound_found=yes
12431        need_miscplay=yes
12432         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
12433    echo "    xemacs will be linked with \"linuxplay.o\""
12434  fi
12435         { test "$extra_verbose" = "yes" && cat << EOF
12436     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
12437 EOF
12438 cat >> confdefs.h <<EOF
12439 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
12440 EOF
12441 }
12442
12443         break
12444 else
12445   echo "$ac_t""no" 1>&6
12446 fi
12447
12448     done
12449   fi
12450
12451     if test -z "$sound_found"; then
12452     if test "$with_msw" = "yes"; then
12453     sound_found=yes
12454     native_sound_lib=
12455     fi
12456   fi
12457
12458   test "$sound_found" = "yes" && with_native_sound=yes
12459 fi
12460
12461 if test "$with_native_sound" = "yes"; then
12462   { test "$extra_verbose" = "yes" && cat << \EOF
12463     Defining HAVE_NATIVE_SOUND
12464 EOF
12465 cat >> confdefs.h <<\EOF
12466 #define HAVE_NATIVE_SOUND 1
12467 EOF
12468 }
12469
12470   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
12471 fi
12472
12473 if test "$with_nas_sound" != "no"; then
12474   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
12475 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
12476 echo "configure:12477: checking for audio/audiolib.h" >&5
12477
12478 cat > conftest.$ac_ext <<EOF
12479 #line 12480 "configure"
12480 #include "confdefs.h"
12481 #include <audio/audiolib.h>
12482 EOF
12483 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12484 { (eval echo configure:12485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12485 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12486 if test -z "$ac_err"; then
12487   rm -rf conftest*
12488   eval "ac_cv_header_$ac_safe=yes"
12489 else
12490   echo "$ac_err" >&5
12491   echo "configure: failed program was:" >&5
12492   cat conftest.$ac_ext >&5
12493   rm -rf conftest*
12494   eval "ac_cv_header_$ac_safe=no"
12495 fi
12496 rm -f conftest*
12497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12498   echo "$ac_t""yes" 1>&6
12499   
12500     
12501 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
12502 echo "configure:12503: checking for AuOpenServer in -laudio" >&5
12503 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
12504
12505 xe_check_libs=" -laudio "
12506 cat > conftest.$ac_ext <<EOF
12507 #line 12508 "configure"
12508 #include "confdefs.h"
12509 /* Override any gcc2 internal prototype to avoid an error.  */
12510 /* We use char because int might match the return type of a gcc2
12511     builtin and then its argument prototype would still apply.  */
12512 char AuOpenServer();
12513
12514 int main() {
12515 AuOpenServer()
12516 ; return 0; }
12517 EOF
12518 if { (eval echo configure:12519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12519   rm -rf conftest*
12520   eval "ac_cv_lib_$ac_lib_var=yes"
12521 else
12522   echo "configure: failed program was:" >&5
12523   cat conftest.$ac_ext >&5
12524   rm -rf conftest*
12525   eval "ac_cv_lib_$ac_lib_var=no"
12526 fi
12527 rm -f conftest*
12528 xe_check_libs=""
12529
12530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12531   echo "$ac_t""yes" 1>&6
12532   have_nas_sound=yes
12533 else
12534   echo "$ac_t""no" 1>&6
12535 fi
12536
12537
12538 else
12539   echo "$ac_t""no" 1>&6
12540 fi
12541
12542   if test "$have_nas_sound" = "yes"; then
12543     with_nas_sound=yes
12544     { test "$extra_verbose" = "yes" && cat << \EOF
12545     Defining HAVE_NAS_SOUND
12546 EOF
12547 cat >> confdefs.h <<\EOF
12548 #define HAVE_NAS_SOUND 1
12549 EOF
12550 }
12551
12552     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
12553    echo "    xemacs will be linked with \"nas.o\""
12554  fi
12555     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
12556             cat > conftest.$ac_ext <<EOF
12557 #line 12558 "configure"
12558 #include "confdefs.h"
12559 #include <audio/Xtutil.h>
12560 EOF
12561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12562   egrep "AuXtErrorJump" >/dev/null 2>&1; then
12563   :
12564 else
12565   rm -rf conftest*
12566   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
12567     Defining NAS_NO_ERROR_JUMP
12568 EOF
12569 cat >> confdefs.h <<\EOF
12570 #define NAS_NO_ERROR_JUMP 1
12571 EOF
12572 }
12573
12574 fi
12575 rm -f conftest*
12576
12577   else
12578     test "$with_nas_sound" = "yes" && \
12579       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
12580     with_nas_sound=no
12581   fi
12582 fi
12583
12584 if test "$with_esd_sound" != "no"; then
12585   # Extract the first word of "esd-config", so it can be a program name with args.
12586 set dummy esd-config; ac_word=$2
12587 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
12588 echo "configure:12589: checking for $ac_word" >&5
12589
12590 if test -n "$have_esd_config"; then
12591   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
12592 else
12593   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
12594   ac_dummy="$PATH"
12595   for ac_dir in $ac_dummy; do
12596     test -z "$ac_dir" && ac_dir=.
12597     if test -f $ac_dir/$ac_word; then
12598       ac_cv_prog_have_esd_config="yes"
12599       break
12600     fi
12601   done
12602   IFS="$ac_save_ifs"
12603   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
12604 fi
12605 have_esd_config="$ac_cv_prog_have_esd_config"
12606 if test -n "$have_esd_config"; then
12607   echo "$ac_t""$have_esd_config" 1>&6
12608 else
12609   echo "$ac_t""no" 1>&6
12610 fi
12611
12612   if test "$have_esd_config" = "yes"; then
12613     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
12614     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
12615     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
12616     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
12617 echo "configure:12618: checking for esd_play_stream" >&5
12618
12619 cat > conftest.$ac_ext <<EOF
12620 #line 12621 "configure"
12621 #include "confdefs.h"
12622 /* System header to define __stub macros and hopefully few prototypes,
12623     which can conflict with char esd_play_stream(); below.  */
12624 #include <assert.h>
12625 /* Override any gcc2 internal prototype to avoid an error.  */
12626 /* We use char because int might match the return type of a gcc2
12627     builtin and then its argument prototype would still apply.  */
12628 char esd_play_stream();
12629
12630 int main() {
12631
12632 /* The GNU C library defines this for functions which it implements
12633     to always fail with ENOSYS.  Some functions are actually named
12634     something starting with __ and the normal name is an alias.  */
12635 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
12636 choke me
12637 #else
12638 esd_play_stream();
12639 #endif
12640
12641 ; return 0; }
12642 EOF
12643 if { (eval echo configure:12644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12644   rm -rf conftest*
12645   eval "ac_cv_func_esd_play_stream=yes"
12646 else
12647   echo "configure: failed program was:" >&5
12648   cat conftest.$ac_ext >&5
12649   rm -rf conftest*
12650   eval "ac_cv_func_esd_play_stream=no"
12651 fi
12652 rm -f conftest*
12653
12654 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
12655   echo "$ac_t""yes" 1>&6
12656   have_esd_sound=yes
12657 else
12658   echo "$ac_t""no" 1>&6
12659 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
12660 fi
12661
12662   fi
12663
12664   if test "$have_esd_sound" = "yes"; then
12665     with_esd_sound=yes
12666     need_miscplay=yes
12667     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
12668    echo "    xemacs will be linked with \"esd.o\""
12669  fi
12670     { test "$extra_verbose" = "yes" && cat << \EOF
12671     Defining HAVE_ESD_SOUND
12672 EOF
12673 cat >> confdefs.h <<\EOF
12674 #define HAVE_ESD_SOUND 1
12675 EOF
12676 }
12677
12678   else
12679     test "$with_esd_sound" = "yes" && \
12680       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
12681     with_esd_sound=no
12682   fi
12683 fi
12684
12685 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
12686    echo "    xemacs will be linked with \"miscplay.o\""
12687  fi
12688
12689
12690 test -z "$with_tty" && with_tty=yes
12691
12692 if test "$with_tty" = "yes"  ; then
12693   echo "checking for TTY-related features" 1>&6
12694 echo "configure:12695: checking for TTY-related features" >&5
12695   { test "$extra_verbose" = "yes" && cat << \EOF
12696     Defining HAVE_TTY
12697 EOF
12698 cat >> confdefs.h <<\EOF
12699 #define HAVE_TTY 1
12700 EOF
12701 }
12702
12703   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
12704    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\""
12705  fi
12706
12707     if test -z "$with_ncurses"; then
12708     
12709 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12710 echo "configure:12711: checking for tgetent in -lncurses" >&5
12711 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12712
12713 xe_check_libs=" -lncurses "
12714 cat > conftest.$ac_ext <<EOF
12715 #line 12716 "configure"
12716 #include "confdefs.h"
12717 /* Override any gcc2 internal prototype to avoid an error.  */
12718 /* We use char because int might match the return type of a gcc2
12719     builtin and then its argument prototype would still apply.  */
12720 char tgetent();
12721
12722 int main() {
12723 tgetent()
12724 ; return 0; }
12725 EOF
12726 if { (eval echo configure:12727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12727   rm -rf conftest*
12728   eval "ac_cv_lib_$ac_lib_var=yes"
12729 else
12730   echo "configure: failed program was:" >&5
12731   cat conftest.$ac_ext >&5
12732   rm -rf conftest*
12733   eval "ac_cv_lib_$ac_lib_var=no"
12734 fi
12735 rm -f conftest*
12736 xe_check_libs=""
12737
12738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12739   echo "$ac_t""yes" 1>&6
12740   with_ncurses=yes
12741 else
12742   echo "$ac_t""no" 1>&6
12743 with_ncurses=no
12744 fi
12745
12746
12747   fi
12748   if test "$with_ncurses" = "yes"; then
12749     { test "$extra_verbose" = "yes" && cat << \EOF
12750     Defining HAVE_NCURSES
12751 EOF
12752 cat >> confdefs.h <<\EOF
12753 #define HAVE_NCURSES 1
12754 EOF
12755 }
12756
12757     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12758 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12759 echo "configure:12760: checking for ncurses/curses.h" >&5
12760
12761 cat > conftest.$ac_ext <<EOF
12762 #line 12763 "configure"
12763 #include "confdefs.h"
12764 #include <ncurses/curses.h>
12765 EOF
12766 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12767 { (eval echo configure:12768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12769 if test -z "$ac_err"; then
12770   rm -rf conftest*
12771   eval "ac_cv_header_$ac_safe=yes"
12772 else
12773   echo "$ac_err" >&5
12774   echo "configure: failed program was:" >&5
12775   cat conftest.$ac_ext >&5
12776   rm -rf conftest*
12777   eval "ac_cv_header_$ac_safe=no"
12778 fi
12779 rm -f conftest*
12780 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12781   echo "$ac_t""yes" 1>&6
12782   curses_h_file=ncurses/curses.h
12783 else
12784   echo "$ac_t""no" 1>&6
12785 fi
12786
12787     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12788 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12789 echo "configure:12790: checking for ncurses/term.h" >&5
12790
12791 cat > conftest.$ac_ext <<EOF
12792 #line 12793 "configure"
12793 #include "confdefs.h"
12794 #include <ncurses/term.h>
12795 EOF
12796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12797 { (eval echo configure:12798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12799 if test -z "$ac_err"; then
12800   rm -rf conftest*
12801   eval "ac_cv_header_$ac_safe=yes"
12802 else
12803   echo "$ac_err" >&5
12804   echo "configure: failed program was:" >&5
12805   cat conftest.$ac_ext >&5
12806   rm -rf conftest*
12807   eval "ac_cv_header_$ac_safe=no"
12808 fi
12809 rm -f conftest*
12810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12811   echo "$ac_t""yes" 1>&6
12812   term_h_file=ncurses/term.h
12813 else
12814   echo "$ac_t""no" 1>&6
12815 fi
12816
12817     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12818    echo "    xemacs will be linked with \"terminfo.o\""
12819  fi
12820     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12821
12822     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12823                         save_c_switch_site="$c_switch_site"
12824       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12825       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12826 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12827 echo "configure:12828: checking for ncurses/curses.h" >&5
12828
12829 cat > conftest.$ac_ext <<EOF
12830 #line 12831 "configure"
12831 #include "confdefs.h"
12832 #include <ncurses/curses.h>
12833 EOF
12834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12835 { (eval echo configure:12836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12837 if test -z "$ac_err"; then
12838   rm -rf conftest*
12839   eval "ac_cv_header_$ac_safe=yes"
12840 else
12841   echo "$ac_err" >&5
12842   echo "configure: failed program was:" >&5
12843   cat conftest.$ac_ext >&5
12844   rm -rf conftest*
12845   eval "ac_cv_header_$ac_safe=no"
12846 fi
12847 rm -f conftest*
12848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12849   echo "$ac_t""yes" 1>&6
12850   curses_h_file=ncurses/curses.h
12851 else
12852   echo "$ac_t""no" 1>&6
12853 fi
12854
12855       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12856         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12857         else c_switch_site="$save_c_switch_site"
12858       fi
12859     fi
12860   else         if test "$have_terminfo" = "yes"; then
12861       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12862    echo "    xemacs will be linked with \"terminfo.o\""
12863  fi
12864       if test -n "$libs_termcap"; then
12865         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12866       else
12867         for lib in curses termlib termcap; do
12868           
12869 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12870 echo "configure:12871: checking for tgetent in -l$lib" >&5
12871 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12872
12873 xe_check_libs=" -l$lib "
12874 cat > conftest.$ac_ext <<EOF
12875 #line 12876 "configure"
12876 #include "confdefs.h"
12877 /* Override any gcc2 internal prototype to avoid an error.  */
12878 /* We use char because int might match the return type of a gcc2
12879     builtin and then its argument prototype would still apply.  */
12880 char tgetent();
12881
12882 int main() {
12883 tgetent()
12884 ; return 0; }
12885 EOF
12886 if { (eval echo configure:12887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12887   rm -rf conftest*
12888   eval "ac_cv_lib_$ac_lib_var=yes"
12889 else
12890   echo "configure: failed program was:" >&5
12891   cat conftest.$ac_ext >&5
12892   rm -rf conftest*
12893   eval "ac_cv_lib_$ac_lib_var=no"
12894 fi
12895 rm -f conftest*
12896 xe_check_libs=""
12897
12898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12899   echo "$ac_t""yes" 1>&6
12900   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12901 else
12902   echo "$ac_t""no" 1>&6
12903 fi
12904
12905
12906         done
12907       fi
12908     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12909    echo "    xemacs will be linked with \"tparam.o\""
12910  fi
12911                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12912       if test -n "$libs_termcap"; then
12913         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12914       else
12915         
12916 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12917 echo "configure:12918: checking for tgetent in -lcurses" >&5
12918 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12919
12920 xe_check_libs=" -lcurses "
12921 cat > conftest.$ac_ext <<EOF
12922 #line 12923 "configure"
12923 #include "confdefs.h"
12924 /* Override any gcc2 internal prototype to avoid an error.  */
12925 /* We use char because int might match the return type of a gcc2
12926     builtin and then its argument prototype would still apply.  */
12927 char tgetent();
12928
12929 int main() {
12930 tgetent()
12931 ; return 0; }
12932 EOF
12933 if { (eval echo configure:12934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12934   rm -rf conftest*
12935   eval "ac_cv_lib_$ac_lib_var=yes"
12936 else
12937   echo "configure: failed program was:" >&5
12938   cat conftest.$ac_ext >&5
12939   rm -rf conftest*
12940   eval "ac_cv_lib_$ac_lib_var=no"
12941 fi
12942 rm -f conftest*
12943 xe_check_libs=""
12944
12945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12946   echo "$ac_t""yes" 1>&6
12947   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12948 else
12949   echo "$ac_t""no" 1>&6
12950 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12951 echo "configure:12952: checking for tgetent in -ltermcap" >&5
12952 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12953
12954 xe_check_libs=" -ltermcap "
12955 cat > conftest.$ac_ext <<EOF
12956 #line 12957 "configure"
12957 #include "confdefs.h"
12958 /* Override any gcc2 internal prototype to avoid an error.  */
12959 /* We use char because int might match the return type of a gcc2
12960     builtin and then its argument prototype would still apply.  */
12961 char tgetent();
12962
12963 int main() {
12964 tgetent()
12965 ; return 0; }
12966 EOF
12967 if { (eval echo configure:12968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12968   rm -rf conftest*
12969   eval "ac_cv_lib_$ac_lib_var=yes"
12970 else
12971   echo "configure: failed program was:" >&5
12972   cat conftest.$ac_ext >&5
12973   rm -rf conftest*
12974   eval "ac_cv_lib_$ac_lib_var=no"
12975 fi
12976 rm -f conftest*
12977 xe_check_libs=""
12978
12979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12980   echo "$ac_t""yes" 1>&6
12981   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12982 else
12983   echo "$ac_t""no" 1>&6
12984 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12985    echo "    xemacs will be linked with \"termcap.o\""
12986  fi
12987 fi
12988
12989
12990 fi
12991
12992
12993       fi
12994     fi
12995   fi
12996   { test "$extra_verbose" = "yes" && cat << EOF
12997     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
12998 EOF
12999 cat >> confdefs.h <<EOF
13000 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13001 EOF
13002 }
13003
13004   { test "$extra_verbose" = "yes" && cat << EOF
13005     Defining TERM_H_FILE = "${term_h_file-term.h}"
13006 EOF
13007 cat >> confdefs.h <<EOF
13008 #define TERM_H_FILE "${term_h_file-term.h}"
13009 EOF
13010 }
13011
13012
13013     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13014 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13015 echo "configure:13016: checking for gpm.h" >&5
13016
13017 cat > conftest.$ac_ext <<EOF
13018 #line 13019 "configure"
13019 #include "confdefs.h"
13020 #include <gpm.h>
13021 EOF
13022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13023 { (eval echo configure:13024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13025 if test -z "$ac_err"; then
13026   rm -rf conftest*
13027   eval "ac_cv_header_$ac_safe=yes"
13028 else
13029   echo "$ac_err" >&5
13030   echo "configure: failed program was:" >&5
13031   cat conftest.$ac_ext >&5
13032   rm -rf conftest*
13033   eval "ac_cv_header_$ac_safe=no"
13034 fi
13035 rm -f conftest*
13036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13037   echo "$ac_t""yes" 1>&6
13038   :
13039 else
13040   echo "$ac_t""no" 1>&6
13041 with_gpm=no
13042 fi
13043  }
13044   test -z "$with_gpm" && { 
13045 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13046 echo "configure:13047: checking for Gpm_Open in -lgpm" >&5
13047 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13048
13049 xe_check_libs=" -lgpm "
13050 cat > conftest.$ac_ext <<EOF
13051 #line 13052 "configure"
13052 #include "confdefs.h"
13053 /* Override any gcc2 internal prototype to avoid an error.  */
13054 /* We use char because int might match the return type of a gcc2
13055     builtin and then its argument prototype would still apply.  */
13056 char Gpm_Open();
13057
13058 int main() {
13059 Gpm_Open()
13060 ; return 0; }
13061 EOF
13062 if { (eval echo configure:13063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13063   rm -rf conftest*
13064   eval "ac_cv_lib_$ac_lib_var=yes"
13065 else
13066   echo "configure: failed program was:" >&5
13067   cat conftest.$ac_ext >&5
13068   rm -rf conftest*
13069   eval "ac_cv_lib_$ac_lib_var=no"
13070 fi
13071 rm -f conftest*
13072 xe_check_libs=""
13073
13074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13075   echo "$ac_t""yes" 1>&6
13076   with_gpm=yes
13077 else
13078   echo "$ac_t""no" 1>&6
13079 with_gpm=no
13080 fi
13081
13082  }
13083   if test "$with_gpm" = "yes"; then
13084     { test "$extra_verbose" = "yes" && cat << \EOF
13085     Defining HAVE_GPM
13086 EOF
13087 cat >> confdefs.h <<\EOF
13088 #define HAVE_GPM 1
13089 EOF
13090 }
13091
13092     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13093    echo "    xemacs will be linked with \"gpmevent.o\""
13094  fi
13095     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13096   fi
13097
13098 else   for feature in ncurses gpm; do
13099     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13100       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13101     fi
13102     eval "with_${feature}=no"
13103   done
13104 fi 
13105 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13106    echo "    xemacs will be linked with \"event-unixoid.o\""
13107  fi
13108
13109
13110 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13111   != "no no no" && echo "checking for database support" 1>&6
13112 echo "configure:13113: checking for database support" >&5
13113
13114 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13115   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13116 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13117 echo "configure:13118: checking for ndbm.h" >&5
13118
13119 cat > conftest.$ac_ext <<EOF
13120 #line 13121 "configure"
13121 #include "confdefs.h"
13122 #include <ndbm.h>
13123 EOF
13124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13125 { (eval echo configure:13126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13127 if test -z "$ac_err"; then
13128   rm -rf conftest*
13129   eval "ac_cv_header_$ac_safe=yes"
13130 else
13131   echo "$ac_err" >&5
13132   echo "configure: failed program was:" >&5
13133   cat conftest.$ac_ext >&5
13134   rm -rf conftest*
13135   eval "ac_cv_header_$ac_safe=no"
13136 fi
13137 rm -f conftest*
13138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13139   echo "$ac_t""yes" 1>&6
13140   :
13141 else
13142   echo "$ac_t""no" 1>&6
13143
13144     test "$with_database_gdbm" = "yes" -o \
13145          "$with_database_dbm"  = "yes" && \
13146       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13147     with_database_gdbm=no with_database_dbm=no
13148 fi
13149
13150 fi
13151
13152 if test "$with_database_gdbm" != "no"; then
13153   
13154 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13155 echo "configure:13156: checking for dbm_open in -lgdbm" >&5
13156 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13157
13158 xe_check_libs=" -lgdbm "
13159 cat > conftest.$ac_ext <<EOF
13160 #line 13161 "configure"
13161 #include "confdefs.h"
13162 /* Override any gcc2 internal prototype to avoid an error.  */
13163 /* We use char because int might match the return type of a gcc2
13164     builtin and then its argument prototype would still apply.  */
13165 char dbm_open();
13166
13167 int main() {
13168 dbm_open()
13169 ; return 0; }
13170 EOF
13171 if { (eval echo configure:13172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13172   rm -rf conftest*
13173   eval "ac_cv_lib_$ac_lib_var=yes"
13174 else
13175   echo "configure: failed program was:" >&5
13176   cat conftest.$ac_ext >&5
13177   rm -rf conftest*
13178   eval "ac_cv_lib_$ac_lib_var=no"
13179 fi
13180 rm -f conftest*
13181 xe_check_libs=""
13182
13183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13184   echo "$ac_t""yes" 1>&6
13185   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13186 else
13187   echo "$ac_t""no" 1>&6
13188 if test "$with_database_gdbm" = "yes"; then
13189      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13190    fi
13191    with_database_gdbm=no
13192 fi
13193
13194
13195 fi
13196
13197 if test "$with_database_dbm" != "no"; then
13198   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13199 echo "configure:13200: checking for dbm_open" >&5
13200
13201 cat > conftest.$ac_ext <<EOF
13202 #line 13203 "configure"
13203 #include "confdefs.h"
13204 /* System header to define __stub macros and hopefully few prototypes,
13205     which can conflict with char dbm_open(); below.  */
13206 #include <assert.h>
13207 /* Override any gcc2 internal prototype to avoid an error.  */
13208 /* We use char because int might match the return type of a gcc2
13209     builtin and then its argument prototype would still apply.  */
13210 char dbm_open();
13211
13212 int main() {
13213
13214 /* The GNU C library defines this for functions which it implements
13215     to always fail with ENOSYS.  Some functions are actually named
13216     something starting with __ and the normal name is an alias.  */
13217 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13218 choke me
13219 #else
13220 dbm_open();
13221 #endif
13222
13223 ; return 0; }
13224 EOF
13225 if { (eval echo configure:13226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13226   rm -rf conftest*
13227   eval "ac_cv_func_dbm_open=yes"
13228 else
13229   echo "configure: failed program was:" >&5
13230   cat conftest.$ac_ext >&5
13231   rm -rf conftest*
13232   eval "ac_cv_func_dbm_open=no"
13233 fi
13234 rm -f conftest*
13235
13236 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13237   echo "$ac_t""yes" 1>&6
13238   with_database_dbm=yes libdbm=
13239 else
13240   echo "$ac_t""no" 1>&6
13241
13242     
13243 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13244 echo "configure:13245: checking for dbm_open in -ldbm" >&5
13245 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13246
13247 xe_check_libs=" -ldbm "
13248 cat > conftest.$ac_ext <<EOF
13249 #line 13250 "configure"
13250 #include "confdefs.h"
13251 /* Override any gcc2 internal prototype to avoid an error.  */
13252 /* We use char because int might match the return type of a gcc2
13253     builtin and then its argument prototype would still apply.  */
13254 char dbm_open();
13255
13256 int main() {
13257 dbm_open()
13258 ; return 0; }
13259 EOF
13260 if { (eval echo configure:13261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13261   rm -rf conftest*
13262   eval "ac_cv_lib_$ac_lib_var=yes"
13263 else
13264   echo "configure: failed program was:" >&5
13265   cat conftest.$ac_ext >&5
13266   rm -rf conftest*
13267   eval "ac_cv_lib_$ac_lib_var=no"
13268 fi
13269 rm -f conftest*
13270 xe_check_libs=""
13271
13272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13273   echo "$ac_t""yes" 1>&6
13274   with_database_dbm=yes libdbm=-ldbm
13275 else
13276   echo "$ac_t""no" 1>&6
13277 test "$with_database_dbm" = "yes" && \
13278         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13279       with_database_dbm=no
13280 fi
13281
13282
13283 fi
13284
13285 fi
13286
13287 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13288 test "$with_database_gdbm" = "yes" -o \
13289      "$with_database_dbm"  = "yes" && \
13290   { test "$extra_verbose" = "yes" && cat << \EOF
13291     Defining HAVE_DBM
13292 EOF
13293 cat >> confdefs.h <<\EOF
13294 #define HAVE_DBM 1
13295 EOF
13296 }
13297
13298
13299 if test "$with_database_berkdb" != "no"; then
13300   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13301 echo "configure:13302: checking for Berkeley db.h" >&5
13302   for header in "db/db.h" "db.h"; do
13303     cat > conftest.$ac_ext <<EOF
13304 #line 13305 "configure"
13305 #include "confdefs.h"
13306
13307 #include <stdlib.h>
13308 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13309 #ifdef HAVE_INTTYPES_H
13310 #define __BIT_TYPES_DEFINED__
13311 #include <inttypes.h>
13312 typedef uint8_t  u_int8_t;
13313 typedef uint16_t u_int16_t;
13314 typedef uint32_t u_int32_t;
13315 #ifdef WE_DONT_NEED_QUADS
13316 typedef uint64_t u_int64_t;
13317 #endif
13318 #endif
13319 #endif
13320 #include <$header>
13321
13322 int main() {
13323
13324 ; return 0; }
13325 EOF
13326 if { (eval echo configure:13327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13327   rm -rf conftest*
13328   db_h_file="$header"; break
13329 else
13330   echo "configure: failed program was:" >&5
13331   cat conftest.$ac_ext >&5
13332 fi
13333 rm -f conftest*
13334   done
13335   if test -z "$db_h_file"
13336   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13337   else echo "$ac_t""$db_h_file" 1>&6
13338   fi
13339
13340   if test "$with_database_berkdb" != "no"; then
13341     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13342 echo "configure:13343: checking for Berkeley DB version" >&5
13343     cat > conftest.$ac_ext <<EOF
13344 #line 13345 "configure"
13345 #include "confdefs.h"
13346 #include <$db_h_file>
13347 #if DB_VERSION_MAJOR > 1
13348 yes
13349 #endif
13350
13351 EOF
13352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13353   egrep "yes" >/dev/null 2>&1; then
13354   rm -rf conftest*
13355   cat > conftest.$ac_ext <<EOF
13356 #line 13357 "configure"
13357 #include "confdefs.h"
13358 #include <$db_h_file>
13359 #if DB_VERSION_MAJOR > 2
13360 yes
13361 #endif
13362
13363 EOF
13364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13365   egrep "yes" >/dev/null 2>&1; then
13366   rm -rf conftest*
13367   echo "$ac_t""3" 1>&6; dbfunc=db_create
13368 else
13369   rm -rf conftest*
13370   
13371     echo "$ac_t""2" 1>&6; dbfunc=db_open
13372 fi
13373 rm -f conftest*
13374
13375 else
13376   rm -rf conftest*
13377   
13378     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13379 fi
13380 rm -f conftest*
13381
13382     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13383 echo "configure:13384: checking for $dbfunc" >&5
13384
13385 cat > conftest.$ac_ext <<EOF
13386 #line 13387 "configure"
13387 #include "confdefs.h"
13388 /* System header to define __stub macros and hopefully few prototypes,
13389     which can conflict with char $dbfunc(); below.  */
13390 #include <assert.h>
13391 /* Override any gcc2 internal prototype to avoid an error.  */
13392 /* We use char because int might match the return type of a gcc2
13393     builtin and then its argument prototype would still apply.  */
13394 char $dbfunc();
13395
13396 int main() {
13397
13398 /* The GNU C library defines this for functions which it implements
13399     to always fail with ENOSYS.  Some functions are actually named
13400     something starting with __ and the normal name is an alias.  */
13401 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
13402 choke me
13403 #else
13404 $dbfunc();
13405 #endif
13406
13407 ; return 0; }
13408 EOF
13409 if { (eval echo configure:13410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13410   rm -rf conftest*
13411   eval "ac_cv_func_$dbfunc=yes"
13412 else
13413   echo "configure: failed program was:" >&5
13414   cat conftest.$ac_ext >&5
13415   rm -rf conftest*
13416   eval "ac_cv_func_$dbfunc=no"
13417 fi
13418 rm -f conftest*
13419
13420 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
13421   echo "$ac_t""yes" 1>&6
13422   with_database_berkdb=yes need_libdb=no
13423 else
13424   echo "$ac_t""no" 1>&6
13425
13426     
13427 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
13428 echo "configure:13429: checking for $dbfunc in -ldb" >&5
13429 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
13430
13431 xe_check_libs=" -ldb "
13432 cat > conftest.$ac_ext <<EOF
13433 #line 13434 "configure"
13434 #include "confdefs.h"
13435 /* Override any gcc2 internal prototype to avoid an error.  */
13436 /* We use char because int might match the return type of a gcc2
13437     builtin and then its argument prototype would still apply.  */
13438 char $dbfunc();
13439
13440 int main() {
13441 $dbfunc()
13442 ; return 0; }
13443 EOF
13444 if { (eval echo configure:13445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13445   rm -rf conftest*
13446   eval "ac_cv_lib_$ac_lib_var=yes"
13447 else
13448   echo "configure: failed program was:" >&5
13449   cat conftest.$ac_ext >&5
13450   rm -rf conftest*
13451   eval "ac_cv_lib_$ac_lib_var=no"
13452 fi
13453 rm -f conftest*
13454 xe_check_libs=""
13455
13456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13457   echo "$ac_t""yes" 1>&6
13458   with_database_berkdb=yes need_libdb=yes
13459 else
13460   echo "$ac_t""no" 1>&6
13461 fi
13462
13463
13464 fi
13465
13466   fi
13467
13468   if test "$with_database_berkdb" = "yes"; then
13469     { test "$extra_verbose" = "yes" && cat << EOF
13470     Defining DB_H_FILE = "$db_h_file"
13471 EOF
13472 cat >> confdefs.h <<EOF
13473 #define DB_H_FILE "$db_h_file"
13474 EOF
13475 }
13476
13477     { test "$extra_verbose" = "yes" && cat << \EOF
13478     Defining HAVE_BERKELEY_DB
13479 EOF
13480 cat >> confdefs.h <<\EOF
13481 #define HAVE_BERKELEY_DB 1
13482 EOF
13483 }
13484
13485     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
13486   else with_database_berkdb=no
13487   fi
13488 fi
13489
13490 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13491      != "no no no"; then
13492   { test "$extra_verbose" = "yes" && cat << \EOF
13493     Defining HAVE_DATABASE
13494 EOF
13495 cat >> confdefs.h <<\EOF
13496 #define HAVE_DATABASE 1
13497 EOF
13498 }
13499
13500   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
13501    echo "    xemacs will be linked with \"database.o\""
13502  fi
13503 fi
13504
13505 if test "$with_socks" = "yes"; then
13506   
13507 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
13508 echo "configure:13509: checking for SOCKSinit in -lsocks" >&5
13509 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
13510
13511 xe_check_libs=" -lsocks "
13512 cat > conftest.$ac_ext <<EOF
13513 #line 13514 "configure"
13514 #include "confdefs.h"
13515 /* Override any gcc2 internal prototype to avoid an error.  */
13516 /* We use char because int might match the return type of a gcc2
13517     builtin and then its argument prototype would still apply.  */
13518 char SOCKSinit();
13519
13520 int main() {
13521 SOCKSinit()
13522 ; return 0; }
13523 EOF
13524 if { (eval echo configure:13525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13525   rm -rf conftest*
13526   eval "ac_cv_lib_$ac_lib_var=yes"
13527 else
13528   echo "configure: failed program was:" >&5
13529   cat conftest.$ac_ext >&5
13530   rm -rf conftest*
13531   eval "ac_cv_lib_$ac_lib_var=no"
13532 fi
13533 rm -f conftest*
13534 xe_check_libs=""
13535
13536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13537   echo "$ac_t""yes" 1>&6
13538     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13539     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13540   { test "$extra_verbose" = "yes" && cat << EOF
13541     Defining $ac_tr_lib
13542 EOF
13543 cat >> confdefs.h <<EOF
13544 #define $ac_tr_lib 1
13545 EOF
13546 }
13547
13548   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
13549
13550 else
13551   echo "$ac_t""no" 1>&6
13552 fi
13553
13554
13555   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
13556     Defining HAVE_SOCKS
13557 EOF
13558 cat >> confdefs.h <<\EOF
13559 #define HAVE_SOCKS 1
13560 EOF
13561 }
13562
13563 fi
13564
13565 if test "$usage_tracking" = "yes"; then
13566   { test "$extra_verbose" = "yes" && cat << \EOF
13567     Defining USAGE_TRACKING
13568 EOF
13569 cat >> confdefs.h <<\EOF
13570 #define USAGE_TRACKING 1
13571 EOF
13572 }
13573
13574   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
13575 fi
13576
13577 if test "$with_modules" != "no"; then
13578   echo "checking for module support" 1>&6
13579 echo "configure:13580: checking for module support" >&5
13580
13581     if test "$with_msw" = "yes"; then
13582     have_dl=yes;
13583   else
13584         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
13585 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
13586 echo "configure:13587: checking for dlfcn.h" >&5
13587
13588 cat > conftest.$ac_ext <<EOF
13589 #line 13590 "configure"
13590 #include "confdefs.h"
13591 #include <dlfcn.h>
13592 EOF
13593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13594 { (eval echo configure:13595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13596 if test -z "$ac_err"; then
13597   rm -rf conftest*
13598   eval "ac_cv_header_$ac_safe=yes"
13599 else
13600   echo "$ac_err" >&5
13601   echo "configure: failed program was:" >&5
13602   cat conftest.$ac_ext >&5
13603   rm -rf conftest*
13604   eval "ac_cv_header_$ac_safe=no"
13605 fi
13606 rm -f conftest*
13607 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13608   echo "$ac_t""yes" 1>&6
13609   
13610       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
13611 echo "configure:13612: checking for dlopen in -lc" >&5
13612       cat > conftest.$ac_ext <<EOF
13613 #line 13614 "configure"
13614 #include "confdefs.h"
13615 #include <dlfcn.h>
13616 int main() {
13617         dlopen ("", 0);
13618 ; return 0; }
13619 EOF
13620 if { (eval echo configure:13621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13621   rm -rf conftest*
13622    have_dl=yes 
13623 else
13624   echo "configure: failed program was:" >&5
13625   cat conftest.$ac_ext >&5
13626   rm -rf conftest*
13627   
13628       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
13629 echo "configure:13630: checking for dlopen in -ldl" >&5
13630       ac_save_LIBS="$LIBS"
13631       LIBS="-ldl $LIBS"
13632       cat > conftest.$ac_ext <<EOF
13633 #line 13634 "configure"
13634 #include "confdefs.h"
13635 #include <dlfcn.h>
13636 int main() {
13637         dlopen ("", 0);
13638 ; return 0; }
13639 EOF
13640 if { (eval echo configure:13641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13641   rm -rf conftest*
13642    have_dl=yes 
13643 else
13644   echo "configure: failed program was:" >&5
13645   cat conftest.$ac_ext >&5
13646   rm -rf conftest*
13647   LIBS="$ac_save_LIBS"
13648 fi
13649 rm -f conftest*
13650       ac_save_LIBS=
13651 fi
13652 rm -f conftest*
13653 else
13654   echo "$ac_t""no" 1>&6
13655 fi
13656
13657     if test -n "$have_dl"; then
13658       { test "$extra_verbose" = "yes" && cat << \EOF
13659     Defining HAVE_DLOPEN
13660 EOF
13661 cat >> confdefs.h <<\EOF
13662 #define HAVE_DLOPEN 1
13663 EOF
13664 }
13665
13666     else
13667       
13668 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
13669 echo "configure:13670: checking for shl_load in -ldld" >&5
13670 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
13671
13672 xe_check_libs=" -ldld "
13673 cat > conftest.$ac_ext <<EOF
13674 #line 13675 "configure"
13675 #include "confdefs.h"
13676 /* Override any gcc2 internal prototype to avoid an error.  */
13677 /* We use char because int might match the return type of a gcc2
13678     builtin and then its argument prototype would still apply.  */
13679 char shl_load();
13680
13681 int main() {
13682 shl_load()
13683 ; return 0; }
13684 EOF
13685 if { (eval echo configure:13686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13686   rm -rf conftest*
13687   eval "ac_cv_lib_$ac_lib_var=yes"
13688 else
13689   echo "configure: failed program was:" >&5
13690   cat conftest.$ac_ext >&5
13691   rm -rf conftest*
13692   eval "ac_cv_lib_$ac_lib_var=no"
13693 fi
13694 rm -f conftest*
13695 xe_check_libs=""
13696
13697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13698   echo "$ac_t""yes" 1>&6
13699   libdl=dld have_dl=yes;
13700         { test "$extra_verbose" = "yes" && cat << \EOF
13701     Defining HAVE_SHL_LOAD
13702 EOF
13703 cat >> confdefs.h <<\EOF
13704 #define HAVE_SHL_LOAD 1
13705 EOF
13706 }
13707
13708 else
13709   echo "$ac_t""no" 1>&6
13710
13711 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
13712 echo "configure:13713: checking for dld_init in -ldld" >&5
13713 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
13714
13715 xe_check_libs=" -ldld "
13716 cat > conftest.$ac_ext <<EOF
13717 #line 13718 "configure"
13718 #include "confdefs.h"
13719 /* Override any gcc2 internal prototype to avoid an error.  */
13720 /* We use char because int might match the return type of a gcc2
13721     builtin and then its argument prototype would still apply.  */
13722 char dld_init();
13723
13724 int main() {
13725 dld_init()
13726 ; return 0; }
13727 EOF
13728 if { (eval echo configure:13729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13729   rm -rf conftest*
13730   eval "ac_cv_lib_$ac_lib_var=yes"
13731 else
13732   echo "configure: failed program was:" >&5
13733   cat conftest.$ac_ext >&5
13734   rm -rf conftest*
13735   eval "ac_cv_lib_$ac_lib_var=no"
13736 fi
13737 rm -f conftest*
13738 xe_check_libs=""
13739
13740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13741   echo "$ac_t""yes" 1>&6
13742   libdl=dld have_dl=yes;
13743         { test "$extra_verbose" = "yes" && cat << \EOF
13744     Defining HAVE_DLD_INIT
13745 EOF
13746 cat >> confdefs.h <<\EOF
13747 #define HAVE_DLD_INIT 1
13748 EOF
13749 }
13750
13751 else
13752   echo "$ac_t""no" 1>&6
13753 fi
13754
13755
13756 fi
13757
13758
13759     fi
13760   fi 
13761   if test -n "$have_dl"; then
13762         
13763 dll_ld=
13764 dll_ldflags=
13765 dll_cflags=
13766 dll_post=
13767 dll_ldo="-o"
13768 ld_dynamic_link_flags=
13769 xehost=$canonical
13770 xealias=$internal_configuration
13771
13772 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13773 echo "configure:13774: checking how to build dynamic libraries for ${xehost}" >&5
13774 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13775 case "$xehost" in
13776 *-*-linux-gnu*) ;;
13777 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13778 esac
13779
13780 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13781 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13782 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13783
13784 case "$xehost_os" in
13785 aix3*)
13786   # AIX sometimes has problems with the GCC collect2 program.  For some
13787   # reason, if we set the COLLECT_NAMES environment variable, the problems
13788   # vanish in a puff of smoke.
13789   if test "${COLLECT_NAMES+set}" != set; then
13790     COLLECT_NAMES=
13791     export COLLECT_NAMES
13792   fi
13793   ;;
13794 esac
13795
13796 # Now see if the compiler is really GCC.
13797 if test "$GCC" = "yes"; then
13798   XEGCC=yes
13799 else
13800   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13801 echo "configure:13802: checking checking whether we are using GNU C" >&5
13802   cat > conftest.$ac_ext <<EOF
13803 #line 13804 "configure"
13804 #include "confdefs.h"
13805
13806 #ifdef __GNUC__
13807   yes;
13808 #endif
13809
13810 EOF
13811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13812   egrep "yes" >/dev/null 2>&1; then
13813   rm -rf conftest*
13814   XEGCC=yes
13815 else
13816   rm -rf conftest*
13817   XEGCC=no
13818 fi
13819 rm -f conftest*
13820
13821   echo "$ac_t""${XEGCC}" 1>&6
13822 fi
13823
13824 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13825 echo "configure:13826: checking how to produce PIC code" >&5
13826 wl=
13827
13828 can_build_shared=yes
13829 if test "$XEGCC" = yes; then
13830   wl='-Wl,'
13831
13832   case "$xehost_os" in
13833   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
13834     # PIC is the default for these OSes.
13835     ;;
13836
13837   aix3* | aix4* | os2*)
13838     # We can build DLLs from non-PIC.
13839     ;;
13840   amigaos*)
13841     # FIXME: we need at least 68020 code to build shared libraries, but
13842     # adding the `-m68020' flag to GCC prevents building anything better,
13843     # like `-m68040'.
13844     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13845     ;;
13846   *cygwin* | *mingw* )
13847     # PIC is the default
13848     ;;
13849   *)
13850     dll_cflags='-fPIC'
13851     ;;
13852   esac
13853 else
13854   # PORTME Check for PIC flags for the system compiler.
13855   case "$xehost_os" in
13856   hpux9* | hpux1[0-9]*)
13857     # Is there a better link_static_flag that works with the bundled CC?
13858     wl='-Wl,'
13859     dll_cflags='+Z'
13860     ;;
13861
13862   irix5* | irix6*)
13863     wl='-Wl,'
13864     # PIC (with -KPIC) is the default.
13865     ;;
13866
13867   os2*)
13868     # We can build DLLs from non-PIC.
13869     ;;
13870
13871   osf3* | osf4*)
13872     # All OSF/1 code is PIC.
13873     wl='-Wl,'
13874     ;;
13875
13876   sco3.2v5*)
13877     dll_cflags='-belf -Kpic'
13878     wl='-Wl,'
13879     ;;
13880
13881   unixware*)
13882     dll_cflags="-KPIC"
13883     wl="-Wl,"
13884     ;;
13885
13886   sysv4*)
13887     dll_cflags="-KPIC"
13888     wl="-Wl,"
13889     ;;
13890
13891   sysv5*)
13892     dll_cflags="-KPIC"
13893     wl="-Wl,"
13894     ;;
13895
13896   solaris2*)
13897     dll_cflags='-KPIC'
13898     wl='-Wl,'
13899     ;;
13900
13901   sunos4*)
13902     dll_cflags='-PIC'
13903     wl='-Qoption ld '
13904     ;;
13905
13906   uts4*)
13907     dll_cflags='-pic'
13908     ;;
13909
13910   *)
13911     can_build_shared=no
13912     ;;
13913   esac
13914 fi
13915
13916 if test -n "$dll_cflags"; then
13917   echo "$ac_t""${dll_cflags}" 1>&6
13918
13919   # Check to make sure the dll_cflags actually works.
13920   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
13921 echo "configure:13922: checking if PIC flag ${dll_cflags} really works" >&5
13922   save_CFLAGS="$CFLAGS"
13923   CFLAGS="$CFLAGS $dll_cflags -DPIC"
13924   cat > conftest.$ac_ext <<EOF
13925 #line 13926 "configure"
13926 #include "confdefs.h"
13927
13928 int main() {
13929 int x=0;
13930 ; return 0; }
13931 EOF
13932 if { (eval echo configure:13933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13933   rm -rf conftest*
13934   
13935     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
13936     # reports no error.  So, we need to grep stderr for (Bundled).
13937     if grep '(Bundled)' config.log >/dev/null; then
13938       echo "$ac_t""no" 1>&6
13939       can_build_shared=no
13940       dll_cflags=
13941     else
13942       echo "$ac_t""yes" 1>&6
13943     fi
13944 else
13945   echo "configure: failed program was:" >&5
13946   cat conftest.$ac_ext >&5
13947   rm -rf conftest*
13948   echo "$ac_t""no" 1>&6
13949     can_build_shared=no
13950     dll_cflags=
13951 fi
13952 rm -f conftest*
13953   CFLAGS="$save_CFLAGS"
13954 else
13955   echo "$ac_t""none" 1>&6
13956 fi
13957
13958 if test "$can_build_shared" = "yes"; then
13959 cc_produces_so=no
13960 xldf=
13961 xcldf=
13962 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13963 echo "configure:13964: checking if C compiler can produce shared libraries" >&5
13964 if test "$XEGCC" = yes; then
13965   xcldf="-shared"
13966   xldf="-shared"
13967 else # Not using GCC
13968   case "$xehost_os" in
13969     aix3* | aix4*)
13970       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13971       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13972       ;;
13973
13974     freebsd2* | netbsd* | openbsd*)
13975       xldf="-Bshareable"
13976       xcldf="${wl}-Bshareable"
13977       ;;
13978
13979     freebsd3*)
13980       xcldf="-shared"
13981       ;;
13982
13983     hpux*)
13984       xldf="-b +s"
13985       xcldf="${wl}-b ${wl}+s"
13986       ;;
13987
13988     irix5* | irix6* | osf3* | osf4*)
13989       xcldf="${wl}-shared"
13990       xldf="-shared"
13991       ;;
13992
13993     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13994       xcldf="-G"
13995       xldf="-G"
13996       ;;
13997
13998     sunos4*)
13999       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14000       xldf="-assert pure-text -Bstatic"
14001       ;;
14002   esac
14003 fi # End if if we are using gcc
14004
14005 if test -n "$xcldf"; then
14006   save_LDFLAGS=$LDFLAGS
14007   save_LIBS=$LIBS
14008   save_xe_libs=$xe_libs
14009   LDFLAGS="$xcldf $LDFLAGS"
14010   LIBS=
14011   xe_libs=
14012   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14013   cat > conftest.$ac_ext <<EOF
14014 #line 14015 "configure"
14015 #include "confdefs.h"
14016
14017 int main() {
14018 int x=0;
14019 ; return 0; }
14020 EOF
14021 if { (eval echo configure:14022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14022   rm -rf conftest*
14023   cc_produces_so=yes
14024 else
14025   echo "configure: failed program was:" >&5
14026   cat conftest.$ac_ext >&5
14027   rm -rf conftest*
14028   cc_produces_so=no
14029 fi
14030 rm -f conftest*
14031   LDFLAGS=$save_LDFLAGS
14032   LIBS=$save_LIBS
14033   xe_libs=$save_xe_libs
14034   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14035 else
14036   cc_produces_so=no
14037 fi
14038 echo "$ac_t""${cc_produces_so}" 1>&6
14039
14040 LTLD=$LD
14041 if test -z "$LTLD"; then
14042   ac_prog=ld
14043   if test "$XEGCC" = yes; then
14044     # Check if gcc -print-prog-name=ld gives a path.
14045     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14046 echo "configure:14047: checking for ld used by GCC" >&5
14047     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14048     case "$ac_prog" in
14049     # Accept absolute paths.
14050     /*)
14051       if test -z "$LTLD"; then
14052         case "$ac_prog" in
14053           *gcc-lib*) LTLD="$CC"
14054                      ;;
14055           *)         LTLD="$ac_prog"
14056                      ;;
14057         esac
14058       fi
14059       ;;
14060     "")
14061       # If it fails, then pretend we aren't using GCC.
14062       ac_prog=ld
14063       ;;
14064     *)
14065       # If it is relative, then search for the first ld in PATH.
14066       with_gnu_ld=unknown
14067       ;;
14068     esac
14069   else
14070     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14071 echo "configure:14072: checking for GNU ld" >&5
14072   fi
14073
14074   if test -z "$LTLD"; then
14075     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14076     for ac_dir in $PATH; do
14077       test -z "$ac_dir" && ac_dir=.
14078       if test -f "$ac_dir/$ac_prog"; then
14079         LTLD="$ac_dir/$ac_prog"
14080         # Check to see if the program is GNU ld.  I'd rather use --version,
14081         # but apparently some GNU ld's only accept -v.
14082         # Break only if it was the GNU/non-GNU ld that we prefer.
14083         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14084           xe_gnu_ld=yes
14085         else
14086           xe_gnu_ld=no
14087         fi
14088       fi
14089     done
14090     IFS="$ac_save_ifs"
14091   fi
14092
14093   if test -n "$LTLD"; then
14094     echo "$ac_t""${LTLD}" 1>&6
14095   else
14096     echo "$ac_t""no" 1>&6
14097   fi
14098
14099   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14100     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14101     exit 1
14102   fi
14103 fi
14104
14105 ld_dynamic_link_flags=
14106
14107 # Check to see if it really is or isn't GNU ld.
14108 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14109 echo "configure:14110: checking if the linker is GNU ld" >&5
14110 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14111 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14112   xe_gnu_ld=yes
14113 else
14114   xe_gnu_ld=no
14115 fi
14116 echo "$ac_t""${xe_gnu_ld}" 1>&6
14117
14118 case "$xehost_os" in
14119   amigaos* | sunos4*)
14120     # On these operating systems, we should treat GNU ld like the system ld.
14121     gnu_ld_acts_native=yes
14122     ;;
14123   *)
14124     gnu_ld_acts_native=no
14125     ;;
14126 esac
14127
14128 if test "$cc_produces_so" = "yes"; then
14129   dll_ld=$CC
14130   dll_ldflags=$xcldf
14131   can_build_shared=yes
14132   ld_shlibs=yes
14133 else
14134   # OK - only NOW do we futz about with ld.
14135   # See if the linker supports building shared libraries.
14136   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14137 echo "configure:14138: checking whether the linker supports shared libraries" >&5
14138   dll_ld=$CC
14139   dll_ldflags=$LDFLAGS
14140   ld_shlibs=yes
14141   can_build_shared=yes
14142   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14143     # See if GNU ld supports shared libraries.
14144     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14145       dll_ld=$CC
14146       dll_ldflags="-shared"
14147       ld_shlibs=yes
14148     else
14149       ld_shlibs=no
14150     fi
14151   else
14152     # PORTME fill in a description of your system's linker (not GNU ld)
14153     case "$xehost_os" in
14154     aix3*)
14155       dll_ld=$LTLD
14156       dll_ldflags=$xldf
14157       ;;
14158
14159     aix4*)
14160       dll_ldflags=$xcldf
14161       ;;
14162
14163     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14164     # support.  Future versions do this automatically, but an explicit c++rt0.o
14165     # doesn't break anything, and helps significantly (at the cost of a little
14166     # extra space).
14167     freebsd2.2*)
14168       dll_ld=$LTLD
14169       dll_ldflags=$xldf
14170       dll_post="/usr/lib/c++rt0.o"
14171       ;;
14172
14173     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14174     freebsd2*)
14175       dll_ld=$LTLD
14176       dll_ldflags="-Bshareable"
14177       ;;
14178
14179     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14180     freebsd3*)
14181       dll_ldflags="-shared"
14182       ;;
14183
14184     hpux*)
14185       dll_ld=$LTLD
14186       dll_ldflags=$xldf
14187       ;;
14188
14189     irix5* | irix6*)
14190       dll_ld=$LTLD
14191       dll_ldflags=$xldf
14192       ;;
14193
14194     netbsd*)
14195       # Tested with NetBSD 1.2 ld
14196       dll_ld=$LTLD
14197       dll_ldflags=$xldf
14198       ;;
14199
14200     openbsd*)
14201       dll_ld=$LTLD
14202       dll_ldflags=$xldf
14203       ;;
14204
14205     osf3* | osf4*)
14206       dll_ld=$LTLD
14207       dll_ldflags=$xldf
14208       ;;
14209
14210     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14211     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14212       dll_ld=$LTLD
14213       case "$dll_ld" in
14214         *gcc*) dll_ldflags="-shared"
14215                dll_ld=$CC
14216                ;;
14217         *)     dll_ldflags="-G"
14218                ;;
14219       esac
14220       ;;
14221
14222     sunos4*)
14223       if test "$XEGCC" = yes; then
14224         dll_ld=$CC
14225       else
14226         dll_ld=$LTLD
14227       fi
14228       dll_ldflags=$xldf
14229       ;;
14230
14231     uts4*)
14232       dll_ld=$LTLD
14233       dll_ldflags="-G"
14234       ;;
14235
14236     bsdi*)
14237       dll_ldflags="-r"
14238       dll_ld="shlicc2"
14239       ;;
14240
14241     *)
14242       ld_shlibs=no
14243       can_build_shared=no
14244       ;;
14245     esac
14246   fi
14247   echo "$ac_t""${ld_shlibs}" 1>&6
14248   if test "$ld_shlibs" = "no"; then
14249     can_build_shared=no
14250   fi
14251 fi # End of if cc_produces_so = no
14252
14253
14254 if test "$xe_gnu_ld" = yes; then
14255   if test "$ld_shlibs" = yes; then
14256     ld_dynamic_link_flags="${wl}-export-dynamic"
14257   fi
14258 fi
14259
14260 if test -z "$ld_dynamic_link_flags"; then
14261   case "$xehost_os" in
14262   aix3*)
14263     ld_dynamic_link_flags=
14264     ;;
14265
14266   aix4*)
14267     ld_dynamic_link_flags=
14268     ;;
14269
14270   freebsd2.2*)
14271     ld_dynamic_link_flags=
14272     ;;
14273
14274   freebsd2*)
14275     ld_dynamic_link_flags=
14276     ;;
14277
14278   freebsd3*)
14279     ld_dynamic_link_flags=
14280     ;;
14281
14282   hpux*)
14283     ld_dynamic_link_flags="${wl}-E"
14284     ;;
14285
14286   irix5* | irix6*)
14287     ld_dynamic_link_flags=
14288     ;;
14289
14290   netbsd*)
14291     ld_dynamic_link_flags=
14292     ;;
14293
14294   openbsd*)
14295     ld_dynamic_link_flags=
14296     ;;
14297
14298   osf3* | osf4*)
14299     ld_dynamic_link_flags=
14300     ;;
14301
14302   solaris2* | solaris7*)
14303     ld_dynamic_link_flags=
14304     ;;
14305
14306   sco3.2v5* | unixware* | sysv5* | sysv4*)
14307     ld_dynamic_link_flags="${wl}-Bexport"
14308     ;;
14309
14310   sunos4*)
14311     ld_dynamic_link_flags=
14312     ;;
14313
14314   uts4*)
14315     ld_dynamic_link_flags=
14316     ;;
14317
14318   bsdi*)
14319     ld_dynamic_link_flags=
14320     ;;
14321
14322   esac
14323 fi # End of if -z ld_dynamic_link_flags
14324 fi # End of if test "$can_build_shared" = "yes"
14325
14326
14327
14328
14329
14330
14331
14332
14333   fi
14334
14335   if test "$can_build_shared" = "yes"; then
14336     { test "$extra_verbose" = "yes" && cat << \EOF
14337     Defining HAVE_SHLIB
14338 EOF
14339 cat >> confdefs.h <<\EOF
14340 #define HAVE_SHLIB 1
14341 EOF
14342 }
14343
14344     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14345    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14346  fi
14347     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14348     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14349     for ac_func in dlerror _dlerror
14350 do
14351 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14352 echo "configure:14353: checking for $ac_func" >&5
14353
14354 cat > conftest.$ac_ext <<EOF
14355 #line 14356 "configure"
14356 #include "confdefs.h"
14357 /* System header to define __stub macros and hopefully few prototypes,
14358     which can conflict with char $ac_func(); below.  */
14359 #include <assert.h>
14360 /* Override any gcc2 internal prototype to avoid an error.  */
14361 /* We use char because int might match the return type of a gcc2
14362     builtin and then its argument prototype would still apply.  */
14363 char $ac_func();
14364
14365 int main() {
14366
14367 /* The GNU C library defines this for functions which it implements
14368     to always fail with ENOSYS.  Some functions are actually named
14369     something starting with __ and the normal name is an alias.  */
14370 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14371 choke me
14372 #else
14373 $ac_func();
14374 #endif
14375
14376 ; return 0; }
14377 EOF
14378 if { (eval echo configure:14379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14379   rm -rf conftest*
14380   eval "ac_cv_func_$ac_func=yes"
14381 else
14382   echo "configure: failed program was:" >&5
14383   cat conftest.$ac_ext >&5
14384   rm -rf conftest*
14385   eval "ac_cv_func_$ac_func=no"
14386 fi
14387 rm -f conftest*
14388
14389 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14390   echo "$ac_t""yes" 1>&6
14391     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14392   { test "$extra_verbose" = "yes" && cat << EOF
14393     Defining $ac_tr_func
14394 EOF
14395 cat >> confdefs.h <<EOF
14396 #define $ac_tr_func 1
14397 EOF
14398 }
14399  
14400 else
14401   echo "$ac_t""no" 1>&6
14402 fi
14403 done
14404
14405     with_modules=yes
14406   else
14407     if test "$with_modules" = "yes"; then
14408       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
14409     else
14410       echo "configure: warning: "Module support cannot be provided."" 1>&2
14411     fi
14412     with_modules=no
14413   fi
14414 fi
14415
14416 cat > conftest.$ac_ext <<EOF
14417 #line 14418 "configure"
14418 #include "confdefs.h"
14419 int main(int c,char *v[]){return 0;}
14420 EOF
14421 if { (eval echo configure:14422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
14422 then
14423   :
14424 else
14425   conftest_rc="$?"
14426   echo "configure: failed program was:" >&5
14427   cat conftest.$ac_ext >&5
14428   rm -fr conftest*
14429   
14430   echo ""
14431   echo "*** PANIC *** The C compiler can no longer build working executables."
14432   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
14433   echo "*** PANIC *** The most likely reason for this problem is that configure"
14434   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
14435   echo "*** PANIC *** found at run time."
14436   echo "*** PANIC ***"
14437   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
14438   echo "*** PANIC *** On other systems, try telling configure where to find the"
14439   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
14440   echo "*** PANIC ***"
14441   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
14442   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
14443   echo "*** PANIC *** on your system.  Don't do that."
14444   exit 1
14445 fi
14446 rm -fr conftest*
14447
14448 if test "$win32_processes" = "yes"; then
14449   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
14450    echo "    xemacs will be linked with \"process-nt.o\""
14451  fi
14452 else
14453   { test "$extra_verbose" = "yes" && cat << \EOF
14454     Defining HAVE_UNIX_PROCESSES
14455 EOF
14456 cat >> confdefs.h <<\EOF
14457 #define HAVE_UNIX_PROCESSES 1
14458 EOF
14459 }
14460
14461   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
14462    echo "    xemacs will be linked with \"process-unix.o\""
14463  fi
14464 fi
14465
14466
14467
14468 T=""
14469 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14470 CFLAGS="$T"
14471
14472
14473 T=""
14474 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14475 extra_objs="$T"
14476
14477
14478 T=""
14479 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
14480 c_switch_general="$T"
14481
14482
14483 T=""
14484 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14485 c_switch_window_system="$T"
14486
14487
14488 T=""
14489 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14490 c_switch_all="$T"
14491
14492
14493 T=""
14494 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
14495 ld_switch_general="$T"
14496
14497
14498 T=""
14499 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14500 ld_switch_window_system="$T"
14501
14502
14503 T=""
14504 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14505 ld_switch_all="$T"
14506
14507
14508 T=""
14509 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14510 ld_libs_general="$T"
14511
14512
14513 T=""
14514 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
14515 ld_libs_window_system="$T"
14516
14517
14518 T=""
14519 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14520 ld_libs_all="$T"
14521
14522
14523
14524 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
14525 internal_makefile_list="Makefile.in"
14526 SUBDIR_MAKEFILES=''
14527 test -d lock || mkdir lock
14528 for dir in $MAKE_SUBDIR; do
14529   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
14530         test -d "$d" || mkdir "$d"; cd "$d"
14531       done ) ;;
14532    * ) test -d "$dir" || mkdir "$dir" ;;
14533   esac
14534   
14535 T=""
14536 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14537 SUBDIR_MAKEFILES="$T"
14538
14539   
14540 T=""
14541 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14542 internal_makefile_list="$T"
14543
14544 done
14545
14546
14547
14548
14549 for dir in src/s src/m; do
14550   if test ! -d "$dir" ; then
14551     echo Making symbolic link to "$srcdir/$dir"
14552     ${LN_S} "$srcdir/$dir" "$dir"
14553   fi
14554 done
14555
14556 if test "$extra_verbose" = "yes"; then
14557   echo ""
14558   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
14559   echo ""
14560 fi
14561
14562
14563 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
14564   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
14565   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
14566 fi
14567
14568 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
14569   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
14570   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
14571 fi
14572
14573 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
14574   test "$extra_verbose" = "yes" && echo "creating TAGS"
14575   echo "\f
14576 $srcdir/TAGS,include" > "TAGS"
14577 fi
14578
14579 if test "$__SUNPRO_C" = "yes"; then
14580   test "$extra_verbose" = "yes" && echo "creating .sbinit"
14581   ( echo "# For use with Sun WorkShop's Source browser."
14582     echo "# See sbquery(1) and sbinit(4) for more information"
14583     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
14584   ) > .sbinit
14585 fi
14586
14587 rm -f core
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608 PREFIX=$prefix
14609 while true; do
14610   case "$PREFIX" in
14611     *\$* ) eval "PREFIX=$PREFIX" ;;
14612     *) break ;;
14613   esac
14614 done
14615
14616
14617
14618
14619 EXEC_PREFIX=$exec_prefix
14620 while true; do
14621   case "$EXEC_PREFIX" in
14622     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
14623     *) break ;;
14624   esac
14625 done
14626
14627
14628
14629
14630 INFODIR=$infodir
14631 while true; do
14632   case "$INFODIR" in
14633     *\$* ) eval "INFODIR=$INFODIR" ;;
14634     *) break ;;
14635   esac
14636 done
14637
14638
14639
14640
14641 INFOPATH=$infopath
14642 while true; do
14643   case "$INFOPATH" in
14644     *\$* ) eval "INFOPATH=$INFOPATH" ;;
14645     *) break ;;
14646   esac
14647 done
14648
14649
14650
14651
14652 PACKAGE_PATH=$package_path
14653 while true; do
14654   case "$PACKAGE_PATH" in
14655     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
14656     *) break ;;
14657   esac
14658 done
14659
14660
14661
14662
14663 LISPDIR=$lispdir
14664 while true; do
14665   case "$LISPDIR" in
14666     *\$* ) eval "LISPDIR=$LISPDIR" ;;
14667     *) break ;;
14668   esac
14669 done
14670
14671
14672
14673
14674 MODULEDIR=$moduledir
14675 while true; do
14676   case "$MODULEDIR" in
14677     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
14678     *) break ;;
14679   esac
14680 done
14681
14682
14683
14684
14685 SITELISPDIR=$sitelispdir
14686 while true; do
14687   case "$SITELISPDIR" in
14688     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
14689     *) break ;;
14690   esac
14691 done
14692
14693
14694
14695
14696 SITEMODULEDIR=$sitemoduledir
14697 while true; do
14698   case "$SITEMODULEDIR" in
14699     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
14700     *) break ;;
14701   esac
14702 done
14703
14704
14705
14706
14707 ETCDIR=$etcdir
14708 while true; do
14709   case "$ETCDIR" in
14710     *\$* ) eval "ETCDIR=$ETCDIR" ;;
14711     *) break ;;
14712   esac
14713 done
14714
14715
14716
14717
14718 DOCDIR=$docdir
14719 while true; do
14720   case "$DOCDIR" in
14721     *\$* ) eval "DOCDIR=$DOCDIR" ;;
14722     *) break ;;
14723   esac
14724 done
14725
14726
14727
14728
14729 ARCHLIBDIR=$archlibdir
14730 while true; do
14731   case "$ARCHLIBDIR" in
14732     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14733     *) break ;;
14734   esac
14735 done
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14757
14758
14759
14760
14761
14762
14763
14764 : ${XEMACS_CC:=$CC}
14765
14766
14767 if test "$with_prefix" = "yes"; then
14768   { test "$extra_verbose" = "yes" && cat << \EOF
14769     Defining PREFIX_USER_DEFINED
14770 EOF
14771 cat >> confdefs.h <<\EOF
14772 #define PREFIX_USER_DEFINED 1
14773 EOF
14774 }
14775
14776 fi
14777
14778 if test "$with_site_lisp" = "no"; then
14779   { test "$extra_verbose" = "yes" && cat << \EOF
14780     Defining INHIBIT_SITE_LISP
14781 EOF
14782 cat >> confdefs.h <<\EOF
14783 #define INHIBIT_SITE_LISP 1
14784 EOF
14785 }
14786
14787 fi
14788 if test "$with_site_modules" = "no"; then
14789   { test "$extra_verbose" = "yes" && cat << \EOF
14790     Defining INHIBIT_SITE_MODULES
14791 EOF
14792 cat >> confdefs.h <<\EOF
14793 #define INHIBIT_SITE_MODULES 1
14794 EOF
14795 }
14796
14797 fi
14798
14799
14800 T=""
14801 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14802 ac_configure_args="$T"
14803
14804 { test "$extra_verbose" = "yes" && cat << EOF
14805     Defining EMACS_CONFIGURATION = "$configuration"
14806 EOF
14807 cat >> confdefs.h <<EOF
14808 #define EMACS_CONFIGURATION "$configuration"
14809 EOF
14810 }
14811
14812 { test "$extra_verbose" = "yes" && cat << EOF
14813     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14814 EOF
14815 cat >> confdefs.h <<EOF
14816 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14817 EOF
14818 }
14819
14820
14821
14822 null_string=""
14823 { test "$extra_verbose" = "yes" && cat << EOF
14824     Defining LD_SWITCH_X_SITE = $null_string
14825 EOF
14826 cat >> confdefs.h <<EOF
14827 #define LD_SWITCH_X_SITE $null_string
14828 EOF
14829 }
14830
14831 { test "$extra_verbose" = "yes" && cat << EOF
14832     Defining LD_SWITCH_X_SITE_AUX = $null_string
14833 EOF
14834 cat >> confdefs.h <<EOF
14835 #define LD_SWITCH_X_SITE_AUX $null_string
14836 EOF
14837 }
14838
14839 { test "$extra_verbose" = "yes" && cat << EOF
14840     Defining C_SWITCH_X_SITE = $null_string
14841 EOF
14842 cat >> confdefs.h <<EOF
14843 #define C_SWITCH_X_SITE $null_string
14844 EOF
14845 }
14846
14847 { test "$extra_verbose" = "yes" && cat << EOF
14848     Defining LD_SWITCH_SITE = $null_string
14849 EOF
14850 cat >> confdefs.h <<EOF
14851 #define LD_SWITCH_SITE $null_string
14852 EOF
14853 }
14854
14855 { test "$extra_verbose" = "yes" && cat << EOF
14856     Defining C_SWITCH_SITE = $null_string
14857 EOF
14858 cat >> confdefs.h <<EOF
14859 #define C_SWITCH_SITE $null_string
14860 EOF
14861 }
14862
14863
14864
14865 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14866     Defining GNU_MALLOC
14867 EOF
14868 cat >> confdefs.h <<\EOF
14869 #define GNU_MALLOC 1
14870 EOF
14871 }
14872
14873 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14874     Defining USE_SYSTEM_MALLOC
14875 EOF
14876 cat >> confdefs.h <<\EOF
14877 #define USE_SYSTEM_MALLOC 1
14878 EOF
14879 }
14880
14881 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14882     Defining USE_DEBUG_MALLOC
14883 EOF
14884 cat >> confdefs.h <<\EOF
14885 #define USE_DEBUG_MALLOC 1
14886 EOF
14887 }
14888
14889                                               { test "$extra_verbose" = "yes" && cat << \EOF
14890     Defining USE_SYSTEM_MALLOC
14891 EOF
14892 cat >> confdefs.h <<\EOF
14893 #define USE_SYSTEM_MALLOC 1
14894 EOF
14895 }
14896
14897 fi
14898 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14899     Defining I18N3
14900 EOF
14901 cat >> confdefs.h <<\EOF
14902 #define I18N3 1
14903 EOF
14904 }
14905
14906 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14907     Defining USE_GCC
14908 EOF
14909 cat >> confdefs.h <<\EOF
14910 #define USE_GCC 1
14911 EOF
14912 }
14913
14914 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14915     Defining EXTERNAL_WIDGET
14916 EOF
14917 cat >> confdefs.h <<\EOF
14918 #define EXTERNAL_WIDGET 1
14919 EOF
14920 }
14921
14922 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14923     Defining QUICK_BUILD
14924 EOF
14925 cat >> confdefs.h <<\EOF
14926 #define QUICK_BUILD 1
14927 EOF
14928 }
14929
14930 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14931     Defining PURIFY
14932 EOF
14933 cat >> confdefs.h <<\EOF
14934 #define PURIFY 1
14935 EOF
14936 }
14937
14938 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14939     Defining QUANTIFY
14940 EOF
14941 cat >> confdefs.h <<\EOF
14942 #define QUANTIFY 1
14943 EOF
14944 }
14945
14946 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14947     Defining MAIL_USE_POP
14948 EOF
14949 cat >> confdefs.h <<\EOF
14950 #define MAIL_USE_POP 1
14951 EOF
14952 }
14953
14954 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14955     Defining KERBEROS
14956 EOF
14957 cat >> confdefs.h <<\EOF
14958 #define KERBEROS 1
14959 EOF
14960 }
14961
14962 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14963     Defining HESIOD
14964 EOF
14965 cat >> confdefs.h <<\EOF
14966 #define HESIOD 1
14967 EOF
14968 }
14969
14970 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14971     Defining USE_UNION_TYPE
14972 EOF
14973 cat >> confdefs.h <<\EOF
14974 #define USE_UNION_TYPE 1
14975 EOF
14976 }
14977
14978 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14979     Defining PDUMP
14980 EOF
14981 cat >> confdefs.h <<\EOF
14982 #define PDUMP 1
14983 EOF
14984 }
14985
14986
14987
14988 (
14989 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14990 else
14991   echo "uname -a: `uname -a`"
14992 fi
14993 echo ""
14994 echo "$0 $quoted_arguments"
14995 ) > Installation
14996
14997 if test ! -z ${emacs_beta_version} ; then
14998   if test -z "${emacs_is_beta}" ; then
14999         xemacs_betaname=".${emacs_beta_version}"
15000   else
15001         xemacs_betaname="-b${emacs_beta_version}"
15002   fi
15003 else
15004   xemacs_betaname=""
15005 fi
15006
15007 (
15008 echo "
15009
15010 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15011 "
15012 echo "
15013 Compilation / Installation:"
15014 echo "  Source code location:              $srcdir"
15015 echo "  Installation prefix:               $prefix"
15016 if test -n "$site_includes"; then
15017   echo "  Additional header files:           $site_includes"
15018 fi
15019 if test -n "$site_libraries"; then
15020   echo "  Additional libraries:              $site_libraries"
15021 fi
15022 if test -n "$site_prefixes"; then
15023   echo "  Additional prefixes:               $site_prefixes"
15024 fi
15025 if test -n "$runpath"; then
15026   echo "  Runtime library search path:       $runpath"
15027 fi
15028
15029 if test -n "$opsysfile"
15030 then echo "  Operating system description file: \`$opsysfile'"
15031 else echo "  Not using any operating system description file"
15032 fi
15033 if test -n "$machfile"
15034 then echo "  Machine description file:          \`$machfile'"
15035 else echo "  Not using any machine description file"
15036 fi
15037
15038 echo "  Compiler:                          $CC $CFLAGS"
15039 echo "  Relocating allocator for buffers:  $rel_alloc"
15040 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15041
15042 echo "
15043 Window System:"
15044 if test "$with_msw" = "yes"; then
15045   echo "  Compiling in support for the Microsoft window system."
15046 fi
15047 if test "$with_x11" = "yes"; then
15048   echo "  Compiling in support for the X window system:"
15049   echo "    - X Windows headers location:                 $x_includes"
15050   echo "    - X Windows libraries location:               $x_libraries"
15051   if test "$with_xauth" != yes; then
15052     echo "    - Xau (X authority) not available."
15053   fi
15054   if test "$with_xmu" != yes; then
15055     echo "    - Xmu library not available; substituting equivalent routines."
15056   fi
15057   if test "$with_wmcommand" != no; then
15058     echo "    - Handling WM_COMMAND properly."
15059   fi
15060 fi
15061 if test "$need_athena" = "yes"; then
15062   echo "  Compiling in support for the Athena widget set:"
15063   echo "    - Athena headers location:                    $athena_h_path"
15064   echo "    - Athena library to link:                     $athena_lib"
15065 fi
15066 case "$with_menubars" in
15067   lucid ) echo "  Using Lucid menubars." ;;
15068   motif ) echo "  Using Motif menubars."
15069           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15070           echo "             We recommend using the Lucid menubar instead."
15071           echo "             Re-run configure with --with-menubars='lucid'." ;;
15072     msw ) echo "  Using MS-Windows menubars." ;;
15073 esac
15074 case "$with_scrollbars" in
15075   lucid  ) echo "  Using Lucid scrollbars."      ;;
15076   motif  ) echo "  Using Motif scrollbars."      ;;
15077   athena ) echo "  Using Athena scrollbars."     ;;
15078      msw ) echo "  Using MS-Windows scrollbars." ;;
15079 esac
15080 case "$with_dialogs" in
15081   motif  ) echo "  Using Motif dialog boxes."
15082            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15083              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15084              echo "             We recommend using the Athena dialog boxes instead."
15085              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15086              echo "             Read the PROBLEMS file for more information."
15087            fi; fi ;;
15088   athena ) echo "  Using Athena dialog boxes."     ;;
15089      msw ) echo "  Using MS-Windows dialog boxes." ;;
15090 esac
15091 case "$with_widgets" in
15092   motif  ) echo "  Using Motif native widgets."      ;;
15093   athena ) echo "  Using Athena native widgets."     ;;
15094      msw ) echo "  Using MS-Windows native widgets." ;;
15095 esac
15096 if test "$with_dragndrop" = yes; then
15097   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15098   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15099 fi
15100
15101 echo "
15102 TTY:"
15103 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15104 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15105
15106 echo "
15107 Images:"
15108 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15109 if test "$with_xpm" = yes; then
15110   echo "  Compiling in support for XPM  images."
15111 elif test "$with_x11" = yes; then
15112   echo "  WARNING: -----------------------------------------------------------"
15113   echo "  WARNING: Compiling without XPM image support."
15114   if test "$xpm_problem" != ""; then
15115     echo "  Reason: $xpm_problem"
15116   fi
15117   echo "  WARNING: You should strongly consider installing XPM."
15118   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15119   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15120   echo "  WARNING: -----------------------------------------------------------"
15121 fi
15122 if test "$with_png" = yes; then
15123   echo "  Compiling in support for PNG  images."
15124 elif test "$window_system" != "none"; then
15125   echo "  WARNING: -----------------------------------------------------------"
15126   echo "  WARNING: Compiling without PNG image support."
15127   if test "$png_problem" != ""; then
15128     echo "  Reason: $png_problem"
15129   fi
15130   echo "  WARNING: You should strongly consider installing the PNG libraries."
15131   echo "  WARNING: Otherwise certain images and glyphs may not display."
15132   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15133   echo "  WARNING: -----------------------------------------------------------"
15134 fi
15135 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15136 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15137 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15138
15139 echo "
15140 Sound:"
15141 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15142 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15143 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15144 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15145
15146 echo "
15147 Databases:"
15148 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15149 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15150 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15151 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15152 if test "$with_postgresql" = yes; then
15153   echo "  Compiling in support for PostgreSQL."
15154   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15155   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15156 fi
15157
15158 echo "
15159 Internationalization:"
15160 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15161 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15162 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15163 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15164 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15165 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15166 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15167 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15168 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15169 if test "$with_wnn" = yes; then
15170   echo "  Compiling in support for the WNN input method on Mule."
15171   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15172 fi
15173 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15174
15175 echo "
15176 Mail:"
15177 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15178 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15179 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15180 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15181
15182 echo "
15183 Other Features:"
15184 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15185 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15186 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15187 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15188 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15189 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15190 test "$pdump" = yes && echo "  Using the new portable dumper."
15191 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15192 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15193 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15194   != "no no no no no no"; then
15195   echo "  WARNING: ---------------------------------------------------------"
15196   echo "  WARNING: Compiling in support for runtime error checking."
15197   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15198   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15199   echo "  WARNING: ---------------------------------------------------------"
15200 fi
15201 echo ""
15202 ) | tee -a Installation
15203 echo ""
15204
15205
15206 # Remove any trailing slashes in these variables.
15207 test -n "$prefix" &&
15208   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15209 test -n "$exec_prefix" &&
15210   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15211
15212
15213 for file in $internal_makefile_list; do
15214   test "$file" = src/Makefile.in && \
15215     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15216   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15217 done
15218 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15219 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
15220
15221 trap '' 1 2 15
15222
15223 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15224
15225 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15226 # Let make expand exec_prefix.
15227 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15228
15229 # Any assignment to VPATH causes Sun make to only execute
15230 # the first set of double-colon rules, so remove it if not needed.
15231 # If there is a colon in the path, we need to keep it.
15232 if test "x$srcdir" = x.; then
15233   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15234 fi
15235
15236 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15237
15238 DEFS=-DHAVE_CONFIG_H
15239
15240 # Without the "./", some shells look in PATH for config.status.
15241 : ${CONFIG_STATUS=./config.status}
15242
15243 echo creating $CONFIG_STATUS
15244 rm -f $CONFIG_STATUS
15245 cat > $CONFIG_STATUS <<EOF
15246 #! /bin/sh
15247 # Generated automatically by configure.
15248 # Run this file to recreate the current configuration.
15249 # This directory was configured as follows,
15250 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15251 #
15252 # $0 $ac_configure_args
15253 #
15254 # Compiler output produced by configure, useful for debugging
15255 # configure, is in ./config.log if it exists.
15256
15257 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15258 for ac_option
15259 do
15260   case "\$ac_option" in
15261   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15262     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15263     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15264   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15265     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15266     exit 0 ;;
15267   -help | --help | --hel | --he | --h)
15268     echo "\$ac_cs_usage"; exit 0 ;;
15269   *) echo "\$ac_cs_usage"; exit 1 ;;
15270   esac
15271 done
15272
15273 ac_given_srcdir=$srcdir
15274 ac_given_INSTALL="$INSTALL"
15275
15276 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15277 EOF
15278 cat >> $CONFIG_STATUS <<EOF
15279
15280 # Protect against being on the right side of a sed subst in config.status.
15281 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15282  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15283 $ac_vpsub
15284 $extrasub
15285 s%@SHELL@%$SHELL%g
15286 s%@CFLAGS@%$CFLAGS%g
15287 s%@CPPFLAGS@%$CPPFLAGS%g
15288 s%@CXXFLAGS@%$CXXFLAGS%g
15289 s%@FFLAGS@%$FFLAGS%g
15290 s%@DEFS@%$DEFS%g
15291 s%@LDFLAGS@%$LDFLAGS%g
15292 s%@LIBS@%$LIBS%g
15293 s%@exec_prefix@%$exec_prefix%g
15294 s%@prefix@%$prefix%g
15295 s%@program_transform_name@%$program_transform_name%g
15296 s%@bindir@%$bindir%g
15297 s%@sbindir@%$sbindir%g
15298 s%@libexecdir@%$libexecdir%g
15299 s%@datadir@%$datadir%g
15300 s%@sysconfdir@%$sysconfdir%g
15301 s%@sharedstatedir@%$sharedstatedir%g
15302 s%@localstatedir@%$localstatedir%g
15303 s%@libdir@%$libdir%g
15304 s%@includedir@%$includedir%g
15305 s%@oldincludedir@%$oldincludedir%g
15306 s%@infodir@%$infodir%g
15307 s%@mandir@%$mandir%g
15308 s%@LN_S@%$LN_S%g
15309 s%@blddir@%$blddir%g
15310 s%@CC@%$CC%g
15311 s%@CPP@%$CPP%g
15312 s%@start_flags@%$start_flags%g
15313 s%@ld_switch_shared@%$ld_switch_shared%g
15314 s%@start_files@%$start_files%g
15315 s%@ld@%$ld%g
15316 s%@lib_gcc@%$lib_gcc%g
15317 s%@RANLIB@%$RANLIB%g
15318 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15319 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15320 s%@INSTALL_DATA@%$INSTALL_DATA%g
15321 s%@YACC@%$YACC%g
15322 s%@SET_MAKE@%$SET_MAKE%g
15323 s%@X_CFLAGS@%$X_CFLAGS%g
15324 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15325 s%@X_LIBS@%$X_LIBS%g
15326 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15327 s%@install_pp@%$install_pp%g
15328 s%@libs_xauth@%$libs_xauth%g
15329 s%@dnd_objs@%$dnd_objs%g
15330 s%@lwlib_objs@%$lwlib_objs%g
15331 s%@ALLOCA@%$ALLOCA%g
15332 s%@have_esd_config@%$have_esd_config%g
15333 s%@dll_ld@%$dll_ld%g
15334 s%@dll_cflags@%$dll_cflags%g
15335 s%@dll_ldflags@%$dll_ldflags%g
15336 s%@dll_post@%$dll_post%g
15337 s%@dll_ldo@%$dll_ldo%g
15338 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15339 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15340 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15341 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15342 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15343 s%@PROGNAME@%$PROGNAME%g
15344 s%@version@%$version%g
15345 s%@configuration@%$configuration%g
15346 s%@canonical@%$canonical%g
15347 s%@inststaticdir@%$inststaticdir%g
15348 s%@instvardir@%$instvardir%g
15349 s%@srcdir@%$srcdir%g
15350 s%@pkgdir@%$pkgdir%g
15351 s%@statedir@%$statedir%g
15352 s%@extra_includes@%$extra_includes%g
15353 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15354 s%@PREFIX@%$PREFIX%g
15355 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15356 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15357 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15358 s%@INFODIR@%$INFODIR%g
15359 s%@infopath@%$infopath%g
15360 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15361 s%@INFOPATH@%$INFOPATH%g
15362 s%@package_path@%$package_path%g
15363 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15364 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15365 s%@lispdir@%$lispdir%g
15366 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15367 s%@LISPDIR@%$LISPDIR%g
15368 s%@moduledir@%$moduledir%g
15369 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15370 s%@MODULEDIR@%$MODULEDIR%g
15371 s%@sitelispdir@%$sitelispdir%g
15372 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
15373 s%@SITELISPDIR@%$SITELISPDIR%g
15374 s%@sitemoduledir@%$sitemoduledir%g
15375 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
15376 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
15377 s%@etcdir@%$etcdir%g
15378 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
15379 s%@ETCDIR@%$ETCDIR%g
15380 s%@docdir@%$docdir%g
15381 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
15382 s%@DOCDIR@%$DOCDIR%g
15383 s%@archlibdir@%$archlibdir%g
15384 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
15385 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
15386 s%@bitmapdir@%$bitmapdir%g
15387 s%@extra_objs@%$extra_objs%g
15388 s%@machfile@%$machfile%g
15389 s%@opsysfile@%$opsysfile%g
15390 s%@c_switch_general@%$c_switch_general%g
15391 s%@c_switch_window_system@%$c_switch_window_system%g
15392 s%@c_switch_all@%$c_switch_all%g
15393 s%@ld_switch_general@%$ld_switch_general%g
15394 s%@ld_switch_window_system@%$ld_switch_window_system%g
15395 s%@ld_switch_all@%$ld_switch_all%g
15396 s%@ld_libs_general@%$ld_libs_general%g
15397 s%@ld_libs_window_system@%$ld_libs_window_system%g
15398 s%@ld_libs_all@%$ld_libs_all%g
15399 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
15400 s%@native_sound_lib@%$native_sound_lib%g
15401 s%@sound_cflags@%$sound_cflags%g
15402 s%@dynodump_arch@%$dynodump_arch%g
15403 s%@XEMACS_CC@%$XEMACS_CC%g
15404 s%@internal_makefile_list@%$internal_makefile_list%g
15405
15406 CEOF
15407 EOF
15408
15409 cat >> $CONFIG_STATUS <<\EOF
15410
15411 # Split the substitutions into bite-sized pieces for seds with
15412 # small command number limits, like on Digital OSF/1 and HP-UX.
15413 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15414 ac_file=1 # Number of current file.
15415 ac_beg=1 # First line for current file.
15416 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15417 ac_more_lines=:
15418 ac_sed_cmds=""
15419 while $ac_more_lines; do
15420   if test $ac_beg -gt 1; then
15421     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15422   else
15423     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15424   fi
15425   if test ! -s conftest.s$ac_file; then
15426     ac_more_lines=false
15427     rm -f conftest.s$ac_file
15428   else
15429     if test -z "$ac_sed_cmds"; then
15430       ac_sed_cmds="sed -f conftest.s$ac_file"
15431     else
15432       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15433     fi
15434     ac_file=`expr $ac_file + 1`
15435     ac_beg=$ac_end
15436     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15437   fi
15438 done
15439 if test -z "$ac_sed_cmds"; then
15440   ac_sed_cmds=cat
15441 fi
15442 EOF
15443
15444 cat >> $CONFIG_STATUS <<EOF
15445
15446 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
15447 EOF
15448 cat >> $CONFIG_STATUS <<\EOF
15449 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15450   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15451   case "$ac_file" in
15452   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15453        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15454   *) ac_file_in="${ac_file}.in" ;;
15455   esac
15456
15457   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15458
15459   # Remove last slash and all that follows it.  Not all systems have dirname.
15460   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15461   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15462     # The file is in a subdirectory.
15463     test ! -d "$ac_dir" && mkdir "$ac_dir"
15464     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15465     # A "../" for each directory in $ac_dir_suffix.
15466     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15467   else
15468     ac_dir_suffix= ac_dots=
15469   fi
15470
15471   case "$ac_given_srcdir" in
15472   .)  srcdir=.
15473       if test -z "$ac_dots"; then top_srcdir=.
15474       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15475   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15476   *) # Relative path.
15477     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15478     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15479   esac
15480
15481   case "$ac_given_INSTALL" in
15482   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15483   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15484   esac
15485
15486   echo creating "$ac_file"
15487   rm -f "$ac_file"
15488   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15489   case "$ac_file" in
15490   *Makefile*) ac_comsub="1i\\
15491 # $configure_input" ;;
15492   *) ac_comsub= ;;
15493   esac
15494
15495   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15496   sed -e "$ac_comsub
15497 s%@configure_input@%$configure_input%g
15498 s%@srcdir@%$srcdir%g
15499 s%@top_srcdir@%$top_srcdir%g
15500 s%@INSTALL@%$INSTALL%g
15501 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15502 fi; done
15503 rm -f conftest.s*
15504
15505 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15506 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15507 #
15508 # ac_d sets the value in "#define NAME VALUE" lines.
15509 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15510 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15511 ac_dC='\3'
15512 ac_dD='%g'
15513 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15514 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15515 ac_uB='\([      ]\)%\1#\2define\3'
15516 ac_uC=' '
15517 ac_uD='\4%g'
15518 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15519 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15520 ac_eB='$%\1#\2define\3'
15521 ac_eC=' '
15522 ac_eD='%g'
15523
15524 if test "${CONFIG_HEADERS+set}" != set; then
15525 EOF
15526 cat >> $CONFIG_STATUS <<EOF
15527   CONFIG_HEADERS="src/config.h lwlib/config.h"
15528 EOF
15529 cat >> $CONFIG_STATUS <<\EOF
15530 fi
15531 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15532   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15533   case "$ac_file" in
15534   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15535        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15536   *) ac_file_in="${ac_file}.in" ;;
15537   esac
15538
15539   echo creating $ac_file
15540
15541   rm -f conftest.frag conftest.in conftest.out
15542   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15543   cat $ac_file_inputs > conftest.in
15544
15545 EOF
15546
15547 # Transform confdefs.h into a sed script conftest.vals that substitutes
15548 # the proper values into config.h.in to produce config.h.  And first:
15549 # Protect against being on the right side of a sed subst in config.status.
15550 # Protect against being in an unquoted here document in config.status.
15551 rm -f conftest.vals
15552 cat > conftest.hdr <<\EOF
15553 s/[\\&%]/\\&/g
15554 s%[\\$`]%\\&%g
15555 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15556 s%ac_d%ac_u%gp
15557 s%ac_u%ac_e%gp
15558 EOF
15559 sed -n -f conftest.hdr confdefs.h > conftest.vals
15560 rm -f conftest.hdr
15561
15562 # This sed command replaces #undef with comments.  This is necessary, for
15563 # example, in the case of _POSIX_SOURCE, which is predefined and required
15564 # on some systems where configure will not decide to define it.
15565 cat >> conftest.vals <<\EOF
15566 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15567 EOF
15568
15569 # Break up conftest.vals because some shells have a limit on
15570 # the size of here documents, and old seds have small limits too.
15571
15572 rm -f conftest.tail
15573 while :
15574 do
15575   ac_lines=`grep -c . conftest.vals`
15576   # grep -c gives empty output for an empty file on some AIX systems.
15577   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15578   # Write a limited-size here document to conftest.frag.
15579   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15580   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15581   echo 'CEOF
15582   sed -f conftest.frag conftest.in > conftest.out
15583   rm -f conftest.in
15584   mv conftest.out conftest.in
15585 ' >> $CONFIG_STATUS
15586   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15587   rm -f conftest.vals
15588   mv conftest.tail conftest.vals
15589 done
15590 rm -f conftest.vals
15591
15592 cat >> $CONFIG_STATUS <<\EOF
15593   rm -f conftest.frag conftest.h
15594   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15595   cat conftest.in >> conftest.h
15596   rm -f conftest.in
15597   if cmp -s $ac_file conftest.h 2>/dev/null; then
15598     echo "$ac_file is unchanged"
15599     rm -f conftest.h
15600   else
15601     # Remove last slash and all that follows it.  Not all systems have dirname.
15602       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15603       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15604       # The file is in a subdirectory.
15605       test ! -d "$ac_dir" && mkdir "$ac_dir"
15606     fi
15607     rm -f $ac_file
15608     mv conftest.h $ac_file
15609   fi
15610 fi; done
15611
15612 EOF
15613 cat >> $CONFIG_STATUS <<EOF
15614 CPP="$CPP"
15615  top_srcdir="$srcdir"
15616  MAKE_SUBDIR="$MAKE_SUBDIR"
15617
15618 EOF
15619 cat >> $CONFIG_STATUS <<\EOF
15620 for dir in . $MAKE_SUBDIR; do
15621   (
15622     cd $dir
15623     rm -f junk.c
15624     < Makefile.in \
15625       sed -e '/^# Generated/d' \
15626           -e 's%/\*\*/#.*%%' \
15627           -e 's/^ *# */#/' \
15628           -e '/^##/d' \
15629           -e '/^#/ {
15630 p
15631 d
15632 }'        \
15633           -e '/./ {
15634 s/\([\"]\)/\\\1/g
15635 s/^/"/
15636 s/$/"/
15637 }'  > junk.c;
15638
15639
15640
15641     echo creating $dir/Makefile
15642 $CPP -I. -I${top_srcdir}/src  junk.c \
15643   | sed -e 's/^\#.*//'          \
15644         -e 's/^[        ][      ]*$//'\
15645         -e 's/^ /       /'              \
15646         -e '/^[ \f]*$/d' \
15647         -e '/^\"/ {
15648         s/\\\([\"]\)/\1/g
15649         s/^[    ]*\"//
15650         s/\"[   ]*$//
15651 }' > Makefile.new
15652     chmod 444 Makefile.new
15653     mv -f Makefile.new Makefile
15654
15655     echo creating $dir/GNUmakefile
15656 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
15657   | sed -e 's/^\#.*//'          \
15658         -e 's/^[        ][      ]*$//'\
15659         -e 's/^ /       /'              \
15660         -e '/^[ \f]*$/d' \
15661         -e '/^\"/ {
15662         s/\\\([\"]\)/\1/g
15663         s/^[    ]*\"//
15664         s/\"[   ]*$//
15665 }' > Makefile.new
15666     chmod 444 Makefile.new
15667     mv -f Makefile.new GNUmakefile
15668
15669     rm -f junk.c
15670   )
15671 done
15672
15673 sed < config.status >> lib-src/config.values \
15674   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
15675   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
15676   -e 's/^\([^ ]*\) $/\1 ""/' \
15677   -e 's/ 1$/ t/'
15678
15679
15680 exit 0
15681 EOF
15682 chmod +x $CONFIG_STATUS
15683 rm -fr confdefs* $ac_clean_files
15684 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1