873d9c3d55b098ac09ed152afb8b50465988c10d
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 1998, 1999 J. Kean Johnston.
11
12 ### Don't edit this script!
13 ### This script was automatically generated by the `autoconf' program
14 ### from the file `./configure.in'.
15 ### To rebuild it, execute the command
16 ###     autoconf
17 ### in the this directory.  You must have autoconf version 2.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 subdirs=
81 MFLAGS= MAKEFLAGS=
82 SHELL=${CONFIG_SHELL-/bin/sh}
83 ac_max_here_lines=12
84
85 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
86
87 # File descriptor usage:
88 # 0 standard input
89 # 1 file creation
90 # 2 errors and warnings
91 # 3 some systems may open it to /dev/tty
92 # 4 used on the Kubota Titan
93 # 6 checking for... messages and results
94 # 5 compiler messages saved in config.log
95 if test "$silent" = yes; then
96   exec 6>/dev/null
97 else
98   exec 6>&1
99 fi
100 exec 5>./config.log
101
102 echo "\
103 This file contains any messages produced by compilers while
104 running configure, to aid debugging if configure makes a mistake.
105 " 1>&5
106
107 # Strip out --no-create and --no-recursion so they do not pile up.
108 # Also quote any args containing shell metacharacters.
109 ac_configure_args=
110 for ac_arg
111 do
112   case "$ac_arg" in
113   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
114   | --no-cr | --no-c) ;;
115   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
116   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
117   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
118   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
119   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
120   esac
121 done
122
123 # NLS nuisances.
124 # Only set these to C if already set.  These must not be set unconditionally
125 # because not all systems understand e.g. LANG=C (notably SCO).
126 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
127 # Non-C LC_CTYPE values break the ctype check.
128 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
129 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
130 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
131 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
132
133 # confdefs.h avoids OS command line length limits that DEFS can exceed.
134 rm -rf conftest* confdefs.h
135 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
136 echo > confdefs.h
137
138 # A filename unique to this package, relative to the directory that
139 # configure is in, which we can look for to find out if srcdir is correct.
140 ac_unique_file=src/lisp.h
141
142 # Find the source files, if location was not specified.
143 if test -z "$srcdir"; then
144   ac_srcdir_defaulted=yes
145   # Try the directory containing this script, then its parent.
146   ac_prog=$0
147   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
148   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
149   srcdir=$ac_confdir
150   if test ! -r $srcdir/$ac_unique_file; then
151     srcdir=..
152   fi
153 else
154   ac_srcdir_defaulted=no
155 fi
156 if test ! -r $srcdir/$ac_unique_file; then
157   if test "$ac_srcdir_defaulted" = yes; then
158     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
159   else
160     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
161   fi
162 fi
163 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
164
165 # Prefer explicitly selected file to automatically selected ones.
166 if test -z "$CONFIG_SITE"; then
167   if test "x$prefix" != xNONE; then
168     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
169   else
170     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
171   fi
172 fi
173 for ac_site_file in $CONFIG_SITE; do
174   if test -r "$ac_site_file"; then
175     echo "loading site script $ac_site_file"
176     . "$ac_site_file"
177   fi
178 done
179
180
181 ac_ext=c
182 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
183 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
184 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
185 ac_cpp='$CPP '"$xe_cppflags"
186 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
187 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
188 cross_compiling=no
189
190 ac_exeext=
191 ac_objext=o
192 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
193   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
194   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
195     ac_n= ac_c='
196 ' ac_t='        '
197   else
198     ac_n=-n ac_c= ac_t=
199   fi
200 else
201   ac_n= ac_c='\c' ac_t=
202 fi
203
204
205 progname="`echo $0 | sed 's:^\./\./:\./:'`"
206
207
208 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
209 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
210
211 prefix='/usr/local'
212 exec_prefix='${prefix}'
213 bindir='${exec_prefix}/bin'
214 datadir='${prefix}/lib'
215 statedir='${prefix}/lib'
216 libdir='${exec_prefix}/lib'
217 mandir='${prefix}/man/man1'
218 inststaticdir='${PROGNAME}'
219 instvardir='${PROGNAME}-${version}'
220 infodir='${datadir}/${instvardir}/info'
221 infopath=''
222 install_pp=''
223 lispdir='${datadir}/${instvardir}/lisp'
224 moduledir='${datadir}/${instvardir}/${configuration}/modules'
225 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
226 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
227 pkgdir='${datadir}/${instvardir}/lisp'
228 package_path=''
229 etcdir='${datadir}/${instvardir}/etc'
230 archlibdir='${datadir}/${instvardir}/${configuration}'
231 docdir='${archlibdir}'
232 with_prefix='yes'
233 with_site_lisp='no'
234 with_site_modules='yes'
235 with_menubars=''
236 with_scrollbars=''
237 with_widgets=''
238 with_dialogs=''
239 with_file_coding=''
240 cpp='' cppflags='' libs='' ldflags=''
241 extra_includes=''
242 dynamic=''
243 with_x11=''
244 with_msw=''
245 rel_alloc='default'
246 with_system_malloc='default'
247 with_dlmalloc='default'
248 native_sound_lib=''
249 use_assertions="yes"
250 with_toolbars=""
251 with_tty=""
252 use_union_type="no"
253 with_dnet=""
254 pdump="no"
255 with_dragndrop="no"
256
257
258
259
260 arguments="$@"
261
262 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
263 quoted_arguments=
264 for i in "$@"; do
265    case "$i" in
266    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
267    | --no-cr | --no-c) ;;
268    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
269    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
270    *)
271    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
272    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
273    esac
274 done
275
276 while test $# != 0; do
277   arg="$1"; shift
278   case "$arg" in
279     --no-create|--no-recursion) ;;
280         -* )
281             case "$arg" in
282         -*=*)
283           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
284           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
285           valomitted=no
286         ;;
287                                                                           -*)
288                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
289           val="yes" valomitted=yes
290         ;;
291       esac
292
293             optname="$opt"
294       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
295
296             case "${valomitted}-${opt}" in yes-without_* )
297         opt=`echo $opt | sed 's/without/with/'`
298         valomitted="no" val="no" ;;
299       esac
300
301             case "$opt" in
302
303         with_site_lisp  | \
304         with_prefix     | \
305         with_site_modules | \
306         with_x          | \
307         with_x11        | \
308         with_msw        | \
309         with_gcc        | \
310         dynamic         | \
311         with_ncurses    | \
312         with_dnet       | \
313         with_socks      | \
314         with_dragndrop  | \
315         with_cde        | \
316         with_offix      | \
317         with_gpm        | \
318         with_xpm        | \
319         with_xface      | \
320         with_gif        | \
321         with_jpeg       | \
322         with_png        | \
323         with_tiff       | \
324         with_wmcommand  | \
325         with_xmu        | \
326         with_purify     | \
327         with_quantify   | \
328         with_toolbars   | \
329         with_tty        | \
330         with_xfs        | \
331         with_i18n3      | \
332         with_mule       | \
333         with_file_coding| \
334         with_canna      | \
335         with_wnn        | \
336         with_wnn6       | \
337         with_workshop   | \
338         with_sparcworks | \
339         with_tooltalk   | \
340         with_ldap       | \
341         with_postgresql | \
342         with_pop        | \
343         with_kerberos   | \
344         with_hesiod     | \
345         with_dnet       | \
346         with_infodock   | \
347         external_widget | \
348         verbose         | \
349         extra_verbose   | \
350         usage_tracking  | \
351         use_union_type  | \
352         pdump           | \
353         debug           | \
354         use_assertions  | \
355         memory_usage_stats | \
356         with_clash_detection | \
357         with_modules | \
358         quick_build )
359                   case "$val" in
360             y | ye | yes )      val=yes ;;
361             n | no )            val=no  ;;
362             * ) (echo "$progname: Usage error:"
363 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
364 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
365           esac
366           eval "$opt=\"$val\"" ;;
367
368
369                         srcdir          | \
370         compiler        | \
371         cflags          | \
372         cpp             | \
373         cppflags        | \
374         libs            | \
375         ldflags         | \
376         cache_file      | \
377         native_sound_lib| \
378         site_lisp       | \
379         x_includes      | \
380         x_libraries     | \
381         site_includes   | \
382         site_libraries  | \
383         site_prefixes   | \
384         site_runtime_libraries )
385                   if test "$valomitted" = "yes" ; then
386                     if test "$#" = 0 ; then
387               (echo "$progname: Usage error:"
388 echo " " "The \`--$optname' option requires a value."
389 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
390             fi
391             val="$1"; shift
392           fi
393           eval "$opt=\"$val\""
394         ;;
395
396                 rel_alloc | \
397         with_dlmalloc | \
398         with_debug_malloc  | use_debug_malloc | \
399         with_system_malloc | use_system_malloc )
400           case "$val" in
401             y | ye | yes )      val=yes ;;
402             n | no )            val=no  ;;
403             d | de | def | defa | defau | defaul | default ) val=default ;;
404             * ) (echo "$progname: Usage error:"
405 echo " " "The \`--$optname' option requires one of these values:
406   \`yes', \`no', or \`default'."
407 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
408           esac
409           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
410           eval "$opt=\"$val\""
411         ;;
412
413                 "with_database" )
414           with_database_berkdb=no
415           with_database_dbm=no
416           with_database_gdbm=no
417           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
418             case "$x" in
419               no ) ;;
420               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
421               d | db | dbm )                               with_database_dbm=yes    ;;
422               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
423               * ) (echo "$progname: Usage error:"
424 echo " " "The \`--$optname' option value
425   must be either \`no' or a comma-separated list
426   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
427 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
428             esac
429           done
430           if test "$with_database_dbm"  = "yes" -a \
431                   "$with_database_gdbm" = "yes"; then
432           (echo "$progname: Usage error:"
433 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
434   with the \`--$optname' option."
435 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
436           fi
437         ;;
438
439                 "with_sound" )
440                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
441             case "$x" in
442                       n | no | non | none ) new_sdefault=no ;;
443               a | al | all | both ) new_sdefault=yes ;;
444
445               native )       with_native_sound=yes ;;
446               nonative )     with_native_sound=no ;;
447
448               nas )          with_nas_sound=yes ;;
449               nonas )        with_nas_sound=no ;;
450
451               esd )          with_esd_sound=yes ;;
452               noesd )        with_esd_sound=no ;;
453
454               * ) bogus_sound=yes ;;
455             esac
456             if test "$bogus_sound" -o \
457                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
458                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
459                 (echo "$progname: Usage error:"
460 echo " " "Valid types for the \`--$optname' option are:
461   $types.
462 The default is to autodetect all sound support."
463 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
464             elif test -n "$new_sdefault" ; then
465                 with_native_sound=$new_sdefault
466                 with_nas_sound=$new_sdefault
467                 with_esd_sound=$new_sdefault
468                 new_sdefault=   # reset this
469             fi
470             sound_notfirst=true
471           done
472         ;;
473
474                         "with_athena" )
475           case "$val" in
476             xa | xaw )                    val=xaw    ;;
477             3 | 3d | xaw3d )              val=3d     ;;
478                         ne | nex | next | naxtaw)     val=next   ;;
479                         9 | 95 | xaw95 )              val=95     ;;
480             xp | xpm | xawxpm )           val=xpm    ;;
481             * ) (echo "$progname: Usage error:"
482 echo " " "The \`--$optname' option must have one of these values:
483   \`xaw', \`3d', \`next', \`95', or \`xpm'."
484 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
485           esac
486           eval "$opt=\"$val\""
487         ;;
488
489                 "with_xim" )
490           case "$val" in
491             y | ye | yes )                val=yes   ;;
492             n | no | non | none )         val=no    ;;
493             x | xl | xli | xlib )         val=xlib  ;;
494             m | mo | mot | moti | motif ) val=motif ;;
495             * ) (echo "$progname: Usage error:"
496 echo " " "The \`--$optname' option must have one of these values:
497   \`motif', \`xlib', \`yes', or \`no'."
498 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
499           esac
500           eval "$opt=\"$val\""
501         ;;
502
503                 "mail_locking" )
504           case "$val" in
505             lockf )     val=lockf ;;
506             flock )     val=flock ;;
507             file | dot ) val=file  ;;
508             locking )   val=locking  ;;
509             * ) (echo "$progname: Usage error:"
510 echo " " "The \`--$optname' option must have one of these values:
511   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
512 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
513           esac
514           eval "$opt=\"$val\""
515         ;;
516
517                 "error_checking" )
518                           
519           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
520             case "$x" in
521                       n | no | non | none ) new_default=no ;;
522               a | al | all )        new_default=yes ;;
523
524               extents )       error_check_extents=yes ;;
525               noextents )     error_check_extents=no ;;
526
527               typecheck )     error_check_typecheck=yes ;;
528               notypecheck )   error_check_typecheck=no ;;
529
530               bufpos )        error_check_bufpos=yes ;;
531               nobufpos )      error_check_bufpos=no ;;
532
533               gc )            error_check_gc=yes ;;
534               nogc )          error_check_gc=no ;;
535
536               malloc )        error_check_malloc=yes ;;
537               nomalloc )      error_check_malloc=no ;;
538
539               byte_code )     error_check_byte_code=yes ;;
540               nobyte_code )   error_check_byte_code=no ;;
541
542               glyphs )     error_check_glyphs=yes ;;
543               noglyphs )   error_check_glyphs=no ;;
544
545               * ) bogus_error_check=yes ;;
546             esac
547             if test "$bogus_error_check" -o \
548                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
549                 if test "$error_check_default" = yes ; then
550                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
551                 else
552                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
553                 fi
554                 (echo "$progname: Usage error:"
555 echo " " "Valid types for the \`--$optname' option are:
556   $types."
557 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
558             elif test -n "$new_default" ; then
559                 error_check_extents=$new_default
560                 error_check_typecheck=$new_default
561                 error_check_bufpos=$new_default
562                 error_check_gc=$new_default
563                 error_check_malloc=$new_default
564                 error_check_byte_code=$new_default
565                 error_check_glyphs=$new_default
566                 new_default=    # reset this
567             fi
568             echeck_notfirst=true
569           done
570         ;;
571
572                                 
573                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
574         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
575         archlibdir | docdir | package_path )
576                    if test "$valomitted" = "yes"; then
577              if test "$#" = 0; then
578                  (echo "$progname: Usage error:"
579 echo " " "The \`--$optname' option requires a value."
580 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
581              fi
582              val="$1"; shift
583            fi
584            eval "$opt=\"$val\""
585
586                            case "$opt" in
587                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
588     Defining EXEC_PREFIX_USER_DEFINED
589 EOF
590 cat >> confdefs.h <<\EOF
591 #define EXEC_PREFIX_USER_DEFINED 1
592 EOF
593 }
594  ;;
595              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
596     Defining LISPDIR_USER_DEFINED
597 EOF
598 cat >> confdefs.h <<\EOF
599 #define LISPDIR_USER_DEFINED 1
600 EOF
601 }
602  ;;
603              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
604     Defining SITELISPDIR_USER_DEFINED
605 EOF
606 cat >> confdefs.h <<\EOF
607 #define SITELISPDIR_USER_DEFINED 1
608 EOF
609 }
610  ;;
611              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
612     Defining MODULEDIR_USER_DEFINED
613 EOF
614 cat >> confdefs.h <<\EOF
615 #define MODULEDIR_USER_DEFINED 1
616 EOF
617 }
618  ;;
619              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
620     Defining ETCDIR_USER_DEFINED
621 EOF
622 cat >> confdefs.h <<\EOF
623 #define ETCDIR_USER_DEFINED 1
624 EOF
625 }
626  ;;
627              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
628     Defining INFODIR_USER_DEFINED
629 EOF
630 cat >> confdefs.h <<\EOF
631 #define INFODIR_USER_DEFINED 1
632 EOF
633 }
634  ;;
635              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
636     Defining INFOPATH_USER_DEFINED
637 EOF
638 cat >> confdefs.h <<\EOF
639 #define INFOPATH_USER_DEFINED 1
640 EOF
641 }
642  ;;
643              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
644     Defining PACKAGE_PATH_USER_DEFINED
645 EOF
646 cat >> confdefs.h <<\EOF
647 #define PACKAGE_PATH_USER_DEFINED 1
648 EOF
649 }
650  ;;
651              datadir )
652                 { test "$extra_verbose" = "yes" && cat << \EOF
653     Defining INFODIR_USER_DEFINED
654 EOF
655 cat >> confdefs.h <<\EOF
656 #define INFODIR_USER_DEFINED 1
657 EOF
658 }
659
660                 { test "$extra_verbose" = "yes" && cat << \EOF
661     Defining LISPDIR_USER_DEFINED
662 EOF
663 cat >> confdefs.h <<\EOF
664 #define LISPDIR_USER_DEFINED 1
665 EOF
666 }
667
668                 { test "$extra_verbose" = "yes" && cat << \EOF
669     Defining MODULEDIR_USER_DEFINED
670 EOF
671 cat >> confdefs.h <<\EOF
672 #define MODULEDIR_USER_DEFINED 1
673 EOF
674 }
675
676                 { test "$extra_verbose" = "yes" && cat << \EOF
677     Defining ETCDIR_USER_DEFINED
678 EOF
679 cat >> confdefs.h <<\EOF
680 #define ETCDIR_USER_DEFINED 1
681 EOF
682 }
683
684                 { test "$extra_verbose" = "yes" && cat << \EOF
685     Defining DOCDIR_USER_DEFINED
686 EOF
687 cat >> confdefs.h <<\EOF
688 #define DOCDIR_USER_DEFINED 1
689 EOF
690 }
691
692                 { test "$extra_verbose" = "yes" && cat << \EOF
693     Defining ARCHLIBDIR_USER_DEFINED
694 EOF
695 cat >> confdefs.h <<\EOF
696 #define ARCHLIBDIR_USER_DEFINED 1
697 EOF
698 }
699  ;;
700              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
701     Defining DOCDIR_USER_DEFINED
702 EOF
703 cat >> confdefs.h <<\EOF
704 #define DOCDIR_USER_DEFINED 1
705 EOF
706 }
707  ;;
708              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
709     Defining ARCHLIBDIR_USER_DEFINED
710 EOF
711 cat >> confdefs.h <<\EOF
712 #define ARCHLIBDIR_USER_DEFINED 1
713 EOF
714 }
715  ;;
716            esac
717         ;;
718
719                 "no_create" ) ;;
720
721                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
722
723                 "with_menubars"   | \
724         "with_scrollbars" | \
725         "with_dialogs"    | \
726         "with_widgets" )
727           case "$val" in
728             l | lu | luc | luci | lucid )               val=lucid  ;;
729             m | mo | mot | moti | motif )               val=motif  ;;
730             a | at | ath | athe | athen | athena )      val=athena ;;
731             n | no | non | none )                       val=no     ;;
732             y | ye | yes )                              val=yes    ;;
733             m | ms | msw )                      val=msw    ;;
734             * ) (echo "$progname: Usage error:"
735 echo " " "The \`--$optname' option must have one of these values:
736   \`lucid', \`motif', \`athena', \`yes', or \`no'."
737 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
738           esac
739           eval "$opt=\"$val\""
740         ;;
741
742                 "use_minimal_tagbits" | \
743         "use_indexed_lrecord_implementation" | \
744         "run_in_place"  | \
745         "const_is_losing" | \
746         "with_gnu_make" )
747           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
748         ;;
749
750                 * ) (echo "$progname: Usage error:"
751 echo " " "Unrecognized option: $arg"
752 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
753
754       esac
755     ;;
756
757         *-*-*) configuration="$arg" ;;
758
759         *) (echo "$progname: Usage error:"
760 echo " " "Unrecognized argument: $arg"
761 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
762
763   esac
764 done
765
766
767 test -n "$cpp"      && CPP="$cpp"
768 test -n "$cppflags" && CPPFLAGS="$cppflags"
769 test -n "$libs"     && LIBS="$libs"
770 test -n "$ldflags"  && LDFLAGS="$ldflags"
771
772 eval set x "$quoted_arguments"; shift
773
774 test "$extra_verbose" = "yes" && verbose=yes
775
776 test -n "$with_x" && with_x11="$with_x"
777
778 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
779   test "$with_system_malloc" = "default" && with_system_malloc=yes
780 fi
781
782
783
784 if test "$with_cde $with_tooltalk" = "yes no"; then
785   (echo "$progname: Usage error:"
786 echo " " "--with-cde requires --with-tooltalk"
787 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
788 elif test "$with_tooltalk" = "no" ; then with_cde=no
789 elif test "$with_cde" = "yes"; then with_tooltalk=yes
790 fi
791
792
793 case "$srcdir" in
794
795     "" )
796     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
797       if test -f "$dir/src/lisp.h" -a \
798               -f "$dir/lisp/version.el" ; then
799         srcdir="$dir"
800         break
801       fi
802     done
803     if test -z "$srcdir" ; then
804       (echo "$progname: Usage error:"
805 echo " " "Neither the current directory nor its parent seem to
806   contain the XEmacs sources.  If you do not want to build XEmacs in its
807   source tree, you should run \`$progname' in the directory in which
808   you wish to build XEmacs, using the \`--srcdir' option to say where the
809   sources may be found."
810 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
811     fi
812   ;;
813
814     * )
815     if test ! -f "$srcdir/src/lisp.h" -o \
816             ! -f "$srcdir/lisp/version.el" ; then
817       (echo "$progname: Usage error:"
818 echo " " "The directory specified with the \`--srcdir' option,
819   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
820   either run the \`$progname' script at the top of the XEmacs source
821   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
822 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
823     fi
824   ;;
825 esac
826
827 if test -z "$configuration"; then
828     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
829   if test -z "$configuration"; then
830     (echo "$progname: Usage error:"
831 echo " " "XEmacs has not been ported to this host type.
832 Try explicitly specifying the CONFIGURATION when rerunning configure."
833 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
834   fi
835 fi
836
837 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
838 echo "configure:839: checking whether ln -s works" >&5
839
840 rm -f conftestdata
841 if ln -s X conftestdata 2>/dev/null
842 then
843   rm -f conftestdata
844   ac_cv_prog_LN_S="ln -s"
845 else
846   ac_cv_prog_LN_S=ln
847 fi
848 LN_S="$ac_cv_prog_LN_S"
849 if test "$ac_cv_prog_LN_S" = "ln -s"; then
850   echo "$ac_t""yes" 1>&6
851 else
852   echo "$ac_t""no" 1>&6
853 fi
854
855
856 for dir in lisp etc man info tests; do
857   if test ! -d "$dir" ; then
858     echo Making symbolic link to "$srcdir/$dir"
859     ${LN_S} "$srcdir/$dir" "$dir"
860   fi
861 done
862
863
864 absolute_pwd="`pwd`";
865 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
866 then blddir="$PWD"
867 else blddir="$absolute_pwd"; if test -d "/net"; then
868   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
869   blddir=`echo "$blddir" | \
870    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
871 fi
872 fi
873
874
875 case "$srcdir" in
876   /* ) ;;
877   .  ) srcdir="$blddir" ;;
878   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
879   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
880   srcdir=`echo "$srcdir" | \
881    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
882 fi ;;
883 esac
884
885 if test `pwd` != `sh -c cd $srcdir && pwd`  \
886    && test -f "$srcdir/src/config.h"; then
887   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
888    echo "   as a build directory right now; it has been configured in its own"
889    echo "   right.  To configure in another directory as well, you MUST"
890    echo "   use GNU make.  If you do not have GNU make, then you must"
891    echo "   now do \`make distclean' in $srcdir,"
892    echo "   and then run $progname again.") >&2
893   extrasub='/^VPATH[     ]*=/c\
894 vpath %.c $(srcdir)\
895 vpath %.h $(srcdir)\
896 vpath %.y $(srcdir)\
897 vpath %.l $(srcdir)\
898 vpath %.s $(srcdir)\
899 vpath %.in $(srcdir)'
900 fi
901
902 . "$srcdir/version.sh" || exit 1;
903 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
904 : "${extra_verbose=$beta}"
905 version="${emacs_major_version}.${emacs_minor_version}"
906 { test "$extra_verbose" = "yes" && cat << EOF
907     Defining EMACS_MAJOR_VERSION = $emacs_major_version
908 EOF
909 cat >> confdefs.h <<EOF
910 #define EMACS_MAJOR_VERSION $emacs_major_version
911 EOF
912 }
913
914 { test "$extra_verbose" = "yes" && cat << EOF
915     Defining EMACS_MINOR_VERSION = $emacs_minor_version
916 EOF
917 cat >> confdefs.h <<EOF
918 #define EMACS_MINOR_VERSION $emacs_minor_version
919 EOF
920 }
921
922 if test -n "$emacs_beta_version" ; then
923   if test "$beta" = "yes"; then
924         version="${version}-b${emacs_beta_version}"
925         { test "$extra_verbose" = "yes" && cat << EOF
926     Defining EMACS_BETA_VERSION = $emacs_beta_version
927 EOF
928 cat >> confdefs.h <<EOF
929 #define EMACS_BETA_VERSION $emacs_beta_version
930 EOF
931 }
932
933   else
934         version="${version}.${emacs_beta_version}"
935         { test "$extra_verbose" = "yes" && cat << EOF
936     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
937 EOF
938 cat >> confdefs.h <<EOF
939 #define EMACS_PATCH_LEVEL $emacs_beta_version
940 EOF
941 }
942
943   fi
944 fi
945 { test "$extra_verbose" = "yes" && cat << EOF
946     Defining XEMACS_CODENAME = "$xemacs_codename"
947 EOF
948 cat >> confdefs.h <<EOF
949 #define XEMACS_CODENAME "$xemacs_codename"
950 EOF
951 }
952
953 { test "$extra_verbose" = "yes" && cat << EOF
954     Defining EMACS_VERSION = "$version"
955 EOF
956 cat >> confdefs.h <<EOF
957 #define EMACS_VERSION "$version"
958 EOF
959 }
960
961
962 if test "$with_infodock" = "yes"; then
963   if test ! -f ../../ID-INSTALL; then
964     echo "Cannot build InfoDock without InfoDock sources"
965     with_infodock=no
966   fi
967 fi
968
969 if test "$with_infodock" = "yes"; then
970       { test "$extra_verbose" = "yes" && cat << EOF
971     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
972 EOF
973 cat >> confdefs.h <<EOF
974 #define INFODOCK_MAJOR_VERSION $infodock_major_version
975 EOF
976 }
977
978   { test "$extra_verbose" = "yes" && cat << EOF
979     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
980 EOF
981 cat >> confdefs.h <<EOF
982 #define INFODOCK_MINOR_VERSION $infodock_minor_version
983 EOF
984 }
985
986   { test "$extra_verbose" = "yes" && cat << EOF
987     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
988 EOF
989 cat >> confdefs.h <<EOF
990 #define INFODOCK_BUILD_VERSION $infodock_build_version
991 EOF
992 }
993
994   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
995   PROGNAME=infodock
996   CPPFLAGS="$CPPFLAGS -DINFODOCK"
997 else
998   PROGNAME=xemacs
999 fi
1000
1001 { test "$extra_verbose" = "yes" && cat << EOF
1002     Defining EMACS_PROGNAME = "$PROGNAME"
1003 EOF
1004 cat >> confdefs.h <<EOF
1005 #define EMACS_PROGNAME "$PROGNAME"
1006 EOF
1007 }
1008
1009
1010 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1011 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1012     Defining ERROR_CHECK_EXTENTS
1013 EOF
1014 cat >> confdefs.h <<\EOF
1015 #define ERROR_CHECK_EXTENTS 1
1016 EOF
1017 }
1018
1019 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1020     Defining ERROR_CHECK_TYPECHECK
1021 EOF
1022 cat >> confdefs.h <<\EOF
1023 #define ERROR_CHECK_TYPECHECK 1
1024 EOF
1025 }
1026
1027 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1028     Defining ERROR_CHECK_BUFPOS
1029 EOF
1030 cat >> confdefs.h <<\EOF
1031 #define ERROR_CHECK_BUFPOS 1
1032 EOF
1033 }
1034
1035 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1036     Defining ERROR_CHECK_GC
1037 EOF
1038 cat >> confdefs.h <<\EOF
1039 #define ERROR_CHECK_GC 1
1040 EOF
1041 }
1042
1043 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1044     Defining ERROR_CHECK_MALLOC
1045 EOF
1046 cat >> confdefs.h <<\EOF
1047 #define ERROR_CHECK_MALLOC 1
1048 EOF
1049 }
1050
1051 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1052     Defining ERROR_CHECK_BYTE_CODE
1053 EOF
1054 cat >> confdefs.h <<\EOF
1055 #define ERROR_CHECK_BYTE_CODE 1
1056 EOF
1057 }
1058
1059 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1060     Defining ERROR_CHECK_GLYPHS
1061 EOF
1062 cat >> confdefs.h <<\EOF
1063 #define ERROR_CHECK_GLYPHS 1
1064 EOF
1065 }
1066
1067 if test "${debug:=$beta}" = "yes"; then
1068   use_assertions=yes memory_usage_stats=yes
1069   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1070    echo "    xemacs will be linked with \"debug.o\""
1071  fi
1072   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1073    echo "    xemacs will be linked with \"tests.o\""
1074  fi
1075   { test "$extra_verbose" = "yes" && cat << \EOF
1076     Defining DEBUG_XEMACS
1077 EOF
1078 cat >> confdefs.h <<\EOF
1079 #define DEBUG_XEMACS 1
1080 EOF
1081 }
1082
1083 fi
1084 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1085     Defining USE_ASSERTIONS
1086 EOF
1087 cat >> confdefs.h <<\EOF
1088 #define USE_ASSERTIONS 1
1089 EOF
1090 }
1091
1092 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1093     Defining MEMORY_USAGE_STATS
1094 EOF
1095 cat >> confdefs.h <<\EOF
1096 #define MEMORY_USAGE_STATS 1
1097 EOF
1098 }
1099
1100
1101
1102 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1103 echo "configure:1104: checking "host system type"" >&5
1104 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1105 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1106 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1107 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1108 echo "$ac_t""$configuration" 1>&6
1109
1110
1111
1112
1113
1114 machine='' opsys=''
1115
1116 case "$canonical" in
1117   sparc-*-*        ) machine=sparc ;;
1118   alpha*-*-*       ) machine=alpha ;;
1119   vax-*-*          ) machine=vax ;;
1120   mips-dec-*       ) machine=pmax ;;
1121   mips-sgi-irix6*  ) machine=iris6d ;;
1122   mips-sgi-*       ) machine=iris4d ;;
1123   mips*-linux      ) machine=mips ;;
1124   romp-ibm-*       ) machine=ibmrt ;;
1125   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1126   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1127   powerpc*-*       ) machine=powerpc ;;
1128   hppa-*-*         ) machine=hp800 ;;
1129   m88k-dg-*        ) machine=aviion ;;
1130   m68*-sony-*      ) machine=news ;;
1131   mips-sony-*      ) machine=news-risc ;;
1132   clipper-*        ) machine=clipper ;;
1133   arm*             ) machine=arm ;;
1134   ns32k-*          ) machine=ns32000 ;;
1135 esac
1136
1137 case "$canonical" in
1138   *-*-linux*    ) opsys=linux ;;
1139   *-*-netbsd*   ) opsys=netbsd ;;
1140   *-*-openbsd*  ) opsys=openbsd ;;
1141   *-*-nextstep* ) opsys=nextstep ;;
1142   *-*-vms       ) opsys=vms ;;
1143
1144     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1145   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1146   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1147   *-dec-osf3*                ) opsys=decosf3-1 ;;
1148   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1149
1150     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1151   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1152   *-*-ultrix* )         opsys=ultrix4-3 ;;
1153
1154     *-*-aix3.1*  ) opsys=aix3-1 ;;
1155   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1156   *-*-aix3*    ) opsys=aix3-2   ;;
1157   *-*-aix4.0*  ) opsys=aix4     ;;
1158   *-*-aix4.1*  ) opsys=aix4-1   ;;
1159   *-*-aix4*    ) opsys=aix4-2   ;;
1160
1161     *-gnu* )                    opsys=gnu    ;;
1162   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1163   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1164   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1165   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1166   *-*-aos*   )                  opsys=bsd4-3 ;;
1167   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1168   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1169   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1170   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1171   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1172   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1173         if test -z "$NON_GNU_CPP" ; then
1174           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1175             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1176           done
1177         fi
1178         opsys=usg5-4-2 ;;
1179     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1180     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1181 esac
1182
1183 case "$canonical" in
1184
1185     *-*-netbsd* )
1186     case "$canonical" in
1187       i[3-9]86-*-netbsd*) machine=intel386 ;;
1188       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1189                                             machine=hp9000s300 ;;
1190       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1191       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1192     esac
1193   ;;
1194
1195     *-*-openbsd* )
1196     case "${canonical}" in
1197       i386-*-openbsd*)          machine=intel386 ;;
1198       m68k-*-openbsd*)          machine=hp9000s300 ;;
1199       mipsel-*-openbsd*)        machine=pmax ;;
1200      esac
1201    ;;
1202
1203     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1204   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1205
1206     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1207   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1208
1209     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1210
1211     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1212
1213     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1214
1215     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1216
1217     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1218
1219     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1220   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1221   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1222
1223   
1224     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1225
1226     *-convex-bsd* | *-convex-convexos* )
1227     machine=convex opsys=bsd4-3
1228     NON_GNU_CPP="cc -E -P"
1229   ;;
1230
1231     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1232
1233     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1234   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1235   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1236   m88k-dg-dgux*                           ) opsys=dgux     ;;
1237
1238     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1239   m88k-motorola-sysv4* )
1240                     machine=delta88k opsys=usg5-4-2
1241   ;;
1242   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1243
1244     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1245   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1246
1247     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1248
1249     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1250   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1251   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1252
1253       m88k-harris-cxux* )
1254         case "`uname -r`" in
1255        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1256        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1257     esac
1258     NON_GNU_CPP="/lib/cpp"
1259   ;;
1260     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1261     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1262
1263     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1264
1265     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1266
1267     *-hp-hpux* )
1268         case "$canonical" in
1269       m68*  ) machine=hp9000s300 ;;
1270       hppa* ) machine=hp800      ;;
1271     esac
1272
1273     case "$canonical" in
1274       *-hp-hpux7*  )  opsys=hpux   ;;
1275       *-hp-hpux8*  )  opsys=hpux8  ;;
1276       *-hp-hpux9*  )  opsys=hpux9  ;;
1277       *-hp-hpux10* )  opsys=hpux10 ;;
1278       *-hp-hpux11* )  opsys=hpux11 ;;
1279       *            )  opsys=hpux   ;;
1280     esac
1281
1282         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1283    echo "    xemacs will be linked with \"strcat.o\""
1284  fi ;; esac
1285
1286     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1287         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1288     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1289
1290     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1291   ;;
1292
1293     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1294   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1295
1296     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1297   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1298   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1299   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1300   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1301   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1302
1303     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1304   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1305
1306     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1307
1308     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1309
1310     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1311
1312     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1313
1314       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1315
1316     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1317
1318     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1319
1320     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1321
1322     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1323
1324         mips-mips-usg* ) machine=mips4 ;;
1325   mips-mips-riscos4 )
1326     machine=mips4
1327     NON_GNU_CC="cc -systype bsd43"
1328     NON_GNU_CPP="cc -systype bsd43 -E"
1329     case "$canonical" in
1330       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1331       mips-mips-riscos5* ) opsys=riscos5 ;;
1332     esac
1333   ;;
1334   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1335   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1336
1337     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1338
1339     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1340
1341     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1342   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1343
1344     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1345
1346     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1347
1348     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1349
1350     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1351
1352     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1353   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1354
1355     mips-siemens-sysv* | mips-sni-sysv*)
1356     machine=mips-siemens opsys=usg5-4
1357     NON_GNU_CC=/usr/ccs/bin/cc
1358     NON_GNU_CPP=/usr/ccs/lib/cpp
1359   ;;
1360
1361     mips-nec-sysv*)
1362     machine=mips-nec
1363     NON_GNU_CC=/usr/ccs/bin/cc
1364     NON_GNU_CPP=/usr/ccs/lib/cpp
1365   ;;
1366
1367       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1368   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1369     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1370   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1371   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1372   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1373   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1374   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1375   mips-sgi-irix*      ) opsys=irix5-0 ;;
1376
1377     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1378   *-sony-news* ) opsys=newsos5 ;;
1379
1380     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1381
1382     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1383         case "$canonical" in
1384       m68*-sunos1* )             machine=sun1     ;;
1385       m68*-sunos2* )             machine=sun2     ;;
1386       m68* )                     machine=sun3     ;;
1387       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1388       i*86-*-* )                 machine=intel386 ;;
1389       rs6000* )                  machine=rs6000   ;;
1390     esac
1391
1392         case "$canonical" in *-sunos5*)
1393       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1394     esac
1395
1396                     case "$canonical" in
1397       *-sunos4* )
1398         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1399         : ;;
1400       *-solaris2* )
1401         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1402         RANLIB=':' ;;
1403     esac
1404
1405     case "$canonical" in
1406       *-solaris*          )
1407         opsys=sol2
1408         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1409         { test "$extra_verbose" = "yes" && cat << EOF
1410     Defining OS_RELEASE = $os_release
1411 EOF
1412 cat >> confdefs.h <<EOF
1413 #define OS_RELEASE $os_release
1414 EOF
1415 }
1416  ;;
1417
1418             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1419       *-sunos4.0*         ) opsys=sunos4-0      ;;
1420       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1421       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1422       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1423       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1424       *-mach*             ) opsys=mach-bsd4-3   ;;
1425       *                   ) opsys=bsd4-2        ;;
1426     esac
1427
1428     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1429
1430         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1431   ;;
1432
1433     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1434
1435     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1436   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1437
1438     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1439
1440     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1441
1442     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1443       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1444
1445     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1446
1447     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1448
1449     vax-dec-* )
1450     case "$canonical" in
1451       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1452       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1453       *-mach* )                         opsys=mach-bsd4-3 ;;
1454     esac
1455   ;;
1456
1457     ns16k-whitechapel-* ) machine=mg1 ;;
1458
1459     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1460
1461     i[3-9]86-*-* )
1462     machine=intel386
1463     case "$canonical" in
1464       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1465       *-isc2.2* )               opsys=isc2-2 ;;
1466       *-isc4.0* )               opsys=isc4-0 ;;
1467       *-isc4.* )                opsys=isc4-1
1468                                 GCC_TEST_OPTIONS=-posix
1469                                 NON_GCC_TEST_OPTIONS=-Xp
1470                                 ;;
1471       *-isc* )                  opsys=isc3-0 ;;
1472       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1473       *-esix* )                 opsys=esix ;;
1474       *-mach* )                 opsys=mach-bsd4-3 ;;
1475       *-xenix* )                opsys=xenix ;;
1476       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1477       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1478       *-bsdi4* )                opsys=bsdos4 ;;
1479       *-bsdi3* )                opsys=bsdos3 ;;
1480       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1481       *-bsdi2* )                opsys=bsdos2 ;;
1482       *-sco3.2v5* )             opsys=sco5 ;
1483                                                         if test "$dynamic" = "yes" ; then
1484                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1485         else
1486                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1487         fi ;;
1488       *-sysv5* )                opsys=sco7 ;;
1489       *-386bsd* )               opsys=386bsd ;;
1490       *-freebsd* )              opsys=freebsd ;;
1491       *-nextstep* )             opsys=nextstep ;;
1492       *-pc-cygwin* )            opsys=cygwin32 ;;
1493       *-pc-mingw* )             opsys=mingw32 ;
1494                                 test -z "$with_tty" && with_tty="no";;
1495           esac
1496   ;;
1497
1498     m68k-*-linux* ) machine=m68k opsys=linux ;;
1499
1500 esac
1501
1502 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1503 test -z "$opsys"   && opsys=`echo $canonical | sed 's/^^-*-^-*-//'`
1504
1505 if test -r "${srcdir}/src/m/${machine}.h"; then
1506   machfile="m/${machine}.h"
1507   { test "$extra_verbose" = "yes" && cat << EOF
1508     Defining config_machfile = "$machfile"
1509 EOF
1510 cat >> confdefs.h <<EOF
1511 #define config_machfile "$machfile"
1512 EOF
1513 }
1514
1515 else
1516   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1517   echo "Using configure-time autodetection only."
1518 fi
1519
1520 if test -r "${srcdir}/src/s/${opsys}.h"; then
1521   opsysfile="s/${opsys}.h"
1522   { test "$extra_verbose" = "yes" && cat << EOF
1523     Defining config_opsysfile = "$opsysfile"
1524 EOF
1525 cat >> confdefs.h <<EOF
1526 #define config_opsysfile "$opsysfile"
1527 EOF
1528 }
1529
1530 else
1531   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1532   echo "Using configure-time autodetection only."
1533 fi
1534
1535
1536 if test -z "$dynamic"; then
1537   case "$opsys" in
1538     hpux* | sunos4* ) dynamic=no ;;
1539     *) dynamic=yes ;;
1540   esac
1541 fi
1542 if test "$dynamic" = "yes"; then
1543   case "$opsys" in
1544     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1545     decosf* ) ld_call_shared="-call_shared" ;;
1546   esac
1547 else   case "$opsys" in
1548     sol2 )
1549       echo "Static linking is not supported on Solaris 2."
1550       echo "Rerun configure without specifying --dynamic=no."
1551       exit 1 ;;
1552     linux   ) ld_call_shared="-Bstatic" ;;
1553     decosf* ) ld_call_shared="-non_shared" ;;
1554   esac
1555 fi
1556
1557 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1558
1559 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1560 { test "$extra_verbose" = "yes" && cat << EOF
1561     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1562 EOF
1563 cat >> confdefs.h <<EOF
1564 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1565 EOF
1566 }
1567
1568
1569
1570 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1571 if test "$with_workshop $with_tooltalk" = "yes no"; then
1572   (echo "$progname: Usage error:"
1573 echo " " "--with-workshop requires --with-tooltalk"
1574 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1575 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1576 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1577 fi
1578
1579 if test "$with_workshop" = "yes"; then
1580   { test "$extra_verbose" = "yes" && cat << \EOF
1581     Defining SUNPRO
1582 EOF
1583 cat >> confdefs.h <<\EOF
1584 #define SUNPRO 1
1585 EOF
1586 }
1587
1588   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1589    echo "    xemacs will be linked with \"sunpro.o\""
1590  fi
1591 fi
1592
1593 if test "$with_clash_detection" != "no"; then
1594   { test "$extra_verbose" = "yes" && cat << \EOF
1595     Defining CLASH_DETECTION
1596 EOF
1597 cat >> confdefs.h <<\EOF
1598 #define CLASH_DETECTION 1
1599 EOF
1600 }
1601
1602   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1603    echo "    xemacs will be linked with \"filelock.o\""
1604  fi
1605 fi
1606
1607 test -n "$compiler" && CC="$compiler"
1608 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1609 fi
1610
1611 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1612 if test "${CFLAGS-unset}" != unset
1613   then cflags_specified=yes;
1614   else cflags_specified=no;
1615 fi
1616
1617 xe_save_CFLAGS="$CFLAGS"
1618
1619 # Extract the first word of "gcc", so it can be a program name with args.
1620 set dummy gcc; ac_word=$2
1621 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1622 echo "configure:1623: checking for $ac_word" >&5
1623
1624 if test -n "$CC"; then
1625   ac_cv_prog_CC="$CC" # Let the user override the test.
1626 else
1627   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1628   ac_dummy="$PATH"
1629   for ac_dir in $ac_dummy; do
1630     test -z "$ac_dir" && ac_dir=.
1631     if test -f $ac_dir/$ac_word; then
1632       ac_cv_prog_CC="gcc"
1633       break
1634     fi
1635   done
1636   IFS="$ac_save_ifs"
1637 fi
1638 CC="$ac_cv_prog_CC"
1639 if test -n "$CC"; then
1640   echo "$ac_t""$CC" 1>&6
1641 else
1642   echo "$ac_t""no" 1>&6
1643 fi
1644
1645 if test -z "$CC"; then
1646   # Extract the first word of "cc", so it can be a program name with args.
1647 set dummy cc; ac_word=$2
1648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1649 echo "configure:1650: checking for $ac_word" >&5
1650
1651 if test -n "$CC"; then
1652   ac_cv_prog_CC="$CC" # Let the user override the test.
1653 else
1654   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1655   ac_prog_rejected=no
1656   ac_dummy="$PATH"
1657   for ac_dir in $ac_dummy; do
1658     test -z "$ac_dir" && ac_dir=.
1659     if test -f $ac_dir/$ac_word; then
1660       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1661         ac_prog_rejected=yes
1662         continue
1663       fi
1664       ac_cv_prog_CC="cc"
1665       break
1666     fi
1667   done
1668   IFS="$ac_save_ifs"
1669 if test $ac_prog_rejected = yes; then
1670   # We found a bogon in the path, so make sure we never use it.
1671   set dummy $ac_cv_prog_CC
1672   shift
1673   if test $# -gt 0; then
1674     # We chose a different compiler from the bogus one.
1675     # However, it has the same basename, so the bogon will be chosen
1676     # first if we set CC to just the basename; use the full file name.
1677     shift
1678     set dummy "$ac_dir/$ac_word" "$@"
1679     shift
1680     ac_cv_prog_CC="$@"
1681   fi
1682 fi
1683 fi
1684 CC="$ac_cv_prog_CC"
1685 if test -n "$CC"; then
1686   echo "$ac_t""$CC" 1>&6
1687 else
1688   echo "$ac_t""no" 1>&6
1689 fi
1690
1691   if test -z "$CC"; then
1692     case "`uname -s`" in
1693     *win32* | *WIN32*)
1694       # Extract the first word of "cl", so it can be a program name with args.
1695 set dummy cl; ac_word=$2
1696 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1697 echo "configure:1698: checking for $ac_word" >&5
1698
1699 if test -n "$CC"; then
1700   ac_cv_prog_CC="$CC" # Let the user override the test.
1701 else
1702   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1703   ac_dummy="$PATH"
1704   for ac_dir in $ac_dummy; do
1705     test -z "$ac_dir" && ac_dir=.
1706     if test -f $ac_dir/$ac_word; then
1707       ac_cv_prog_CC="cl"
1708       break
1709     fi
1710   done
1711   IFS="$ac_save_ifs"
1712 fi
1713 CC="$ac_cv_prog_CC"
1714 if test -n "$CC"; then
1715   echo "$ac_t""$CC" 1>&6
1716 else
1717   echo "$ac_t""no" 1>&6
1718 fi
1719  ;;
1720     esac
1721   fi
1722   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1723 fi
1724
1725 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1726 echo "configure:1727: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1727
1728 ac_ext=c
1729 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1730 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1731 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1732 ac_cpp='$CPP '"$xe_cppflags"
1733 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1734 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1735 cross_compiling=no
1736
1737 cat > conftest.$ac_ext << EOF
1738
1739 #line 1740 "configure"
1740 #include "confdefs.h"
1741
1742 main(){return(0);}
1743 EOF
1744 if { (eval echo configure:1745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1745   ac_cv_prog_cc_works=yes
1746   # If we can't run a trivial program, we are probably using a cross compiler.
1747   if (./conftest; exit) 2>/dev/null; then
1748     ac_cv_prog_cc_cross=no
1749   else
1750     ac_cv_prog_cc_cross=yes
1751   fi
1752 else
1753   echo "configure: failed program was:" >&5
1754   cat conftest.$ac_ext >&5
1755   ac_cv_prog_cc_works=no
1756 fi
1757 rm -fr conftest*
1758 ac_ext=c
1759 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1760 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1761 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1762 ac_cpp='$CPP '"$xe_cppflags"
1763 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1764 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1765 cross_compiling=no
1766
1767 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1768 if test $ac_cv_prog_cc_works = no; then
1769   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1770 fi
1771 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1772 echo "configure:1773: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1773 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1774 cross_compiling=$ac_cv_prog_cc_cross
1775
1776 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1777 echo "configure:1778: checking whether we are using GNU C" >&5
1778
1779 cat > conftest.c <<EOF
1780 #ifdef __GNUC__
1781   yes;
1782 #endif
1783 EOF
1784 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1785   ac_cv_prog_gcc=yes
1786 else
1787   ac_cv_prog_gcc=no
1788 fi
1789
1790 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1791
1792 if test $ac_cv_prog_gcc = yes; then
1793   GCC=yes
1794 else
1795   GCC=
1796 fi
1797
1798 ac_test_CFLAGS="${CFLAGS+set}"
1799 ac_save_CFLAGS="$CFLAGS"
1800 CFLAGS=
1801 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1802 echo "configure:1803: checking whether ${CC-cc} accepts -g" >&5
1803
1804 echo 'void f(){}' > conftest.c
1805 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1806   ac_cv_prog_cc_g=yes
1807 else
1808   ac_cv_prog_cc_g=no
1809 fi
1810 rm -f conftest*
1811
1812
1813 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1814 if test "$ac_test_CFLAGS" = set; then
1815   CFLAGS="$ac_save_CFLAGS"
1816 elif test $ac_cv_prog_cc_g = yes; then
1817   if test "$GCC" = yes; then
1818     CFLAGS="-g -O2"
1819   else
1820     CFLAGS="-g"
1821   fi
1822 else
1823   if test "$GCC" = yes; then
1824     CFLAGS="-O2"
1825   else
1826     CFLAGS=
1827   fi
1828 fi
1829  
1830 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1831   CC=${NON_GNU_CC-cc}
1832   # Extract the first word of "gcc", so it can be a program name with args.
1833 set dummy gcc; ac_word=$2
1834 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1835 echo "configure:1836: checking for $ac_word" >&5
1836
1837 if test -n "$CC"; then
1838   ac_cv_prog_CC="$CC" # Let the user override the test.
1839 else
1840   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1841   ac_dummy="$PATH"
1842   for ac_dir in $ac_dummy; do
1843     test -z "$ac_dir" && ac_dir=.
1844     if test -f $ac_dir/$ac_word; then
1845       ac_cv_prog_CC="gcc"
1846       break
1847     fi
1848   done
1849   IFS="$ac_save_ifs"
1850 fi
1851 CC="$ac_cv_prog_CC"
1852 if test -n "$CC"; then
1853   echo "$ac_t""$CC" 1>&6
1854 else
1855   echo "$ac_t""no" 1>&6
1856 fi
1857
1858 if test -z "$CC"; then
1859   # Extract the first word of "cc", so it can be a program name with args.
1860 set dummy cc; ac_word=$2
1861 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1862 echo "configure:1863: checking for $ac_word" >&5
1863
1864 if test -n "$CC"; then
1865   ac_cv_prog_CC="$CC" # Let the user override the test.
1866 else
1867   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1868   ac_prog_rejected=no
1869   ac_dummy="$PATH"
1870   for ac_dir in $ac_dummy; do
1871     test -z "$ac_dir" && ac_dir=.
1872     if test -f $ac_dir/$ac_word; then
1873       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1874         ac_prog_rejected=yes
1875         continue
1876       fi
1877       ac_cv_prog_CC="cc"
1878       break
1879     fi
1880   done
1881   IFS="$ac_save_ifs"
1882 if test $ac_prog_rejected = yes; then
1883   # We found a bogon in the path, so make sure we never use it.
1884   set dummy $ac_cv_prog_CC
1885   shift
1886   if test $# -gt 0; then
1887     # We chose a different compiler from the bogus one.
1888     # However, it has the same basename, so the bogon will be chosen
1889     # first if we set CC to just the basename; use the full file name.
1890     shift
1891     set dummy "$ac_dir/$ac_word" "$@"
1892     shift
1893     ac_cv_prog_CC="$@"
1894   fi
1895 fi
1896 fi
1897 CC="$ac_cv_prog_CC"
1898 if test -n "$CC"; then
1899   echo "$ac_t""$CC" 1>&6
1900 else
1901   echo "$ac_t""no" 1>&6
1902 fi
1903
1904   if test -z "$CC"; then
1905     case "`uname -s`" in
1906     *win32* | *WIN32*)
1907       # Extract the first word of "cl", so it can be a program name with args.
1908 set dummy cl; ac_word=$2
1909 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1910 echo "configure:1911: checking for $ac_word" >&5
1911
1912 if test -n "$CC"; then
1913   ac_cv_prog_CC="$CC" # Let the user override the test.
1914 else
1915   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1916   ac_dummy="$PATH"
1917   for ac_dir in $ac_dummy; do
1918     test -z "$ac_dir" && ac_dir=.
1919     if test -f $ac_dir/$ac_word; then
1920       ac_cv_prog_CC="cl"
1921       break
1922     fi
1923   done
1924   IFS="$ac_save_ifs"
1925 fi
1926 CC="$ac_cv_prog_CC"
1927 if test -n "$CC"; then
1928   echo "$ac_t""$CC" 1>&6
1929 else
1930   echo "$ac_t""no" 1>&6
1931 fi
1932  ;;
1933     esac
1934   fi
1935   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1936 fi
1937
1938 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1939 echo "configure:1940: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1940
1941 ac_ext=c
1942 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1943 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1944 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1945 ac_cpp='$CPP '"$xe_cppflags"
1946 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1947 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1948 cross_compiling=no
1949
1950 cat > conftest.$ac_ext << EOF
1951
1952 #line 1953 "configure"
1953 #include "confdefs.h"
1954
1955 main(){return(0);}
1956 EOF
1957 if { (eval echo configure:1958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1958   ac_cv_prog_cc_works=yes
1959   # If we can't run a trivial program, we are probably using a cross compiler.
1960   if (./conftest; exit) 2>/dev/null; then
1961     ac_cv_prog_cc_cross=no
1962   else
1963     ac_cv_prog_cc_cross=yes
1964   fi
1965 else
1966   echo "configure: failed program was:" >&5
1967   cat conftest.$ac_ext >&5
1968   ac_cv_prog_cc_works=no
1969 fi
1970 rm -fr conftest*
1971 ac_ext=c
1972 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1973 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1974 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1975 ac_cpp='$CPP '"$xe_cppflags"
1976 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1977 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1978 cross_compiling=no
1979
1980 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1981 if test $ac_cv_prog_cc_works = no; then
1982   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1983 fi
1984 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1985 echo "configure:1986: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1986 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1987 cross_compiling=$ac_cv_prog_cc_cross
1988
1989 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1990 echo "configure:1991: checking whether we are using GNU C" >&5
1991
1992 cat > conftest.c <<EOF
1993 #ifdef __GNUC__
1994   yes;
1995 #endif
1996 EOF
1997 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1998   ac_cv_prog_gcc=yes
1999 else
2000   ac_cv_prog_gcc=no
2001 fi
2002
2003 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2004
2005 if test $ac_cv_prog_gcc = yes; then
2006   GCC=yes
2007 else
2008   GCC=
2009 fi
2010
2011 ac_test_CFLAGS="${CFLAGS+set}"
2012 ac_save_CFLAGS="$CFLAGS"
2013 CFLAGS=
2014 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2015 echo "configure:2016: checking whether ${CC-cc} accepts -g" >&5
2016
2017 echo 'void f(){}' > conftest.c
2018 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2019   ac_cv_prog_cc_g=yes
2020 else
2021   ac_cv_prog_cc_g=no
2022 fi
2023 rm -f conftest*
2024
2025
2026 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2027 if test "$ac_test_CFLAGS" = set; then
2028   CFLAGS="$ac_save_CFLAGS"
2029 elif test $ac_cv_prog_cc_g = yes; then
2030   if test "$GCC" = yes; then
2031     CFLAGS="-g -O2"
2032   else
2033     CFLAGS="-g"
2034   fi
2035 else
2036   if test "$GCC" = yes; then
2037     CFLAGS="-O2"
2038   else
2039     CFLAGS=
2040   fi
2041 fi
2042
2043 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2044   CC=gcc
2045   # Extract the first word of "gcc", so it can be a program name with args.
2046 set dummy gcc; ac_word=$2
2047 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2048 echo "configure:2049: checking for $ac_word" >&5
2049
2050 if test -n "$CC"; then
2051   ac_cv_prog_CC="$CC" # Let the user override the test.
2052 else
2053   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2054   ac_dummy="$PATH"
2055   for ac_dir in $ac_dummy; do
2056     test -z "$ac_dir" && ac_dir=.
2057     if test -f $ac_dir/$ac_word; then
2058       ac_cv_prog_CC="gcc"
2059       break
2060     fi
2061   done
2062   IFS="$ac_save_ifs"
2063 fi
2064 CC="$ac_cv_prog_CC"
2065 if test -n "$CC"; then
2066   echo "$ac_t""$CC" 1>&6
2067 else
2068   echo "$ac_t""no" 1>&6
2069 fi
2070
2071 if test -z "$CC"; then
2072   # Extract the first word of "cc", so it can be a program name with args.
2073 set dummy cc; ac_word=$2
2074 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2075 echo "configure:2076: checking for $ac_word" >&5
2076
2077 if test -n "$CC"; then
2078   ac_cv_prog_CC="$CC" # Let the user override the test.
2079 else
2080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2081   ac_prog_rejected=no
2082   ac_dummy="$PATH"
2083   for ac_dir in $ac_dummy; do
2084     test -z "$ac_dir" && ac_dir=.
2085     if test -f $ac_dir/$ac_word; then
2086       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2087         ac_prog_rejected=yes
2088         continue
2089       fi
2090       ac_cv_prog_CC="cc"
2091       break
2092     fi
2093   done
2094   IFS="$ac_save_ifs"
2095 if test $ac_prog_rejected = yes; then
2096   # We found a bogon in the path, so make sure we never use it.
2097   set dummy $ac_cv_prog_CC
2098   shift
2099   if test $# -gt 0; then
2100     # We chose a different compiler from the bogus one.
2101     # However, it has the same basename, so the bogon will be chosen
2102     # first if we set CC to just the basename; use the full file name.
2103     shift
2104     set dummy "$ac_dir/$ac_word" "$@"
2105     shift
2106     ac_cv_prog_CC="$@"
2107   fi
2108 fi
2109 fi
2110 CC="$ac_cv_prog_CC"
2111 if test -n "$CC"; then
2112   echo "$ac_t""$CC" 1>&6
2113 else
2114   echo "$ac_t""no" 1>&6
2115 fi
2116
2117   if test -z "$CC"; then
2118     case "`uname -s`" in
2119     *win32* | *WIN32*)
2120       # Extract the first word of "cl", so it can be a program name with args.
2121 set dummy cl; ac_word=$2
2122 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2123 echo "configure:2124: checking for $ac_word" >&5
2124
2125 if test -n "$CC"; then
2126   ac_cv_prog_CC="$CC" # Let the user override the test.
2127 else
2128   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2129   ac_dummy="$PATH"
2130   for ac_dir in $ac_dummy; do
2131     test -z "$ac_dir" && ac_dir=.
2132     if test -f $ac_dir/$ac_word; then
2133       ac_cv_prog_CC="cl"
2134       break
2135     fi
2136   done
2137   IFS="$ac_save_ifs"
2138 fi
2139 CC="$ac_cv_prog_CC"
2140 if test -n "$CC"; then
2141   echo "$ac_t""$CC" 1>&6
2142 else
2143   echo "$ac_t""no" 1>&6
2144 fi
2145  ;;
2146     esac
2147   fi
2148   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2149 fi
2150
2151 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2152 echo "configure:2153: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2153
2154 ac_ext=c
2155 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2156 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2157 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2158 ac_cpp='$CPP '"$xe_cppflags"
2159 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2160 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2161 cross_compiling=no
2162
2163 cat > conftest.$ac_ext << EOF
2164
2165 #line 2166 "configure"
2166 #include "confdefs.h"
2167
2168 main(){return(0);}
2169 EOF
2170 if { (eval echo configure:2171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2171   ac_cv_prog_cc_works=yes
2172   # If we can't run a trivial program, we are probably using a cross compiler.
2173   if (./conftest; exit) 2>/dev/null; then
2174     ac_cv_prog_cc_cross=no
2175   else
2176     ac_cv_prog_cc_cross=yes
2177   fi
2178 else
2179   echo "configure: failed program was:" >&5
2180   cat conftest.$ac_ext >&5
2181   ac_cv_prog_cc_works=no
2182 fi
2183 rm -fr conftest*
2184 ac_ext=c
2185 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2186 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2187 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2188 ac_cpp='$CPP '"$xe_cppflags"
2189 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2190 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2191 cross_compiling=no
2192
2193 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2194 if test $ac_cv_prog_cc_works = no; then
2195   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2196 fi
2197 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2198 echo "configure:2199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2199 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2200 cross_compiling=$ac_cv_prog_cc_cross
2201
2202 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2203 echo "configure:2204: checking whether we are using GNU C" >&5
2204
2205 cat > conftest.c <<EOF
2206 #ifdef __GNUC__
2207   yes;
2208 #endif
2209 EOF
2210 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2211   ac_cv_prog_gcc=yes
2212 else
2213   ac_cv_prog_gcc=no
2214 fi
2215
2216 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2217
2218 if test $ac_cv_prog_gcc = yes; then
2219   GCC=yes
2220 else
2221   GCC=
2222 fi
2223
2224 ac_test_CFLAGS="${CFLAGS+set}"
2225 ac_save_CFLAGS="$CFLAGS"
2226 CFLAGS=
2227 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2228 echo "configure:2229: checking whether ${CC-cc} accepts -g" >&5
2229
2230 echo 'void f(){}' > conftest.c
2231 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2232   ac_cv_prog_cc_g=yes
2233 else
2234   ac_cv_prog_cc_g=no
2235 fi
2236 rm -f conftest*
2237
2238
2239 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2240 if test "$ac_test_CFLAGS" = set; then
2241   CFLAGS="$ac_save_CFLAGS"
2242 elif test $ac_cv_prog_cc_g = yes; then
2243   if test "$GCC" = yes; then
2244     CFLAGS="-g -O2"
2245   else
2246     CFLAGS="-g"
2247   fi
2248 else
2249   if test "$GCC" = yes; then
2250     CFLAGS="-O2"
2251   else
2252     CFLAGS=
2253   fi
2254 fi
2255
2256 fi
2257 CFLAGS="$xe_save_CFLAGS"
2258
2259
2260 test -n "$CPP" -a -d "$CPP" && CPP=
2261
2262 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2263
2264 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2265 echo "configure:2266: checking how to run the C preprocessor" >&5
2266 # On Suns, sometimes $CPP names a directory.
2267 if test -n "$CPP" && test -d "$CPP"; then
2268   CPP=
2269 fi
2270 if test -z "$CPP"; then
2271
2272   # This must be in double quotes, not single quotes, because CPP may get
2273   # substituted into the Makefile and "${CC-cc}" will confuse make.
2274   CPP="${CC-cc} -E"
2275   # On the NeXT, cc -E runs the code through the compiler's parser,
2276   # not just through cpp.
2277   cat > conftest.$ac_ext <<EOF
2278 #line 2279 "configure"
2279 #include "confdefs.h"
2280 #include <assert.h>
2281 Syntax Error
2282 EOF
2283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2284 { (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2286 if test -z "$ac_err"; then
2287   :
2288 else
2289   echo "$ac_err" >&5
2290   echo "configure: failed program was:" >&5
2291   cat conftest.$ac_ext >&5
2292   rm -rf conftest*
2293   CPP="${CC-cc} -E -traditional-cpp"
2294   cat > conftest.$ac_ext <<EOF
2295 #line 2296 "configure"
2296 #include "confdefs.h"
2297 #include <assert.h>
2298 Syntax Error
2299 EOF
2300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2301 { (eval echo configure:2302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2303 if test -z "$ac_err"; then
2304   :
2305 else
2306   echo "$ac_err" >&5
2307   echo "configure: failed program was:" >&5
2308   cat conftest.$ac_ext >&5
2309   rm -rf conftest*
2310   CPP="${CC-cc} -nologo -E"
2311   cat > conftest.$ac_ext <<EOF
2312 #line 2313 "configure"
2313 #include "confdefs.h"
2314 #include <assert.h>
2315 Syntax Error
2316 EOF
2317 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2318 { (eval echo configure:2319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2319 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2320 if test -z "$ac_err"; then
2321   :
2322 else
2323   echo "$ac_err" >&5
2324   echo "configure: failed program was:" >&5
2325   cat conftest.$ac_ext >&5
2326   rm -rf conftest*
2327   CPP=/lib/cpp
2328 fi
2329 rm -f conftest*
2330 fi
2331 rm -f conftest*
2332 fi
2333 rm -f conftest*
2334   ac_cv_prog_CPP="$CPP"
2335   CPP="$ac_cv_prog_CPP"
2336 else
2337   ac_cv_prog_CPP="$CPP"
2338 fi
2339 echo "$ac_t""$CPP" 1>&6
2340
2341
2342
2343 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2344 echo "configure:2345: checking for AIX" >&5
2345 cat > conftest.$ac_ext <<EOF
2346 #line 2347 "configure"
2347 #include "confdefs.h"
2348 #ifdef _AIX
2349   yes
2350 #endif
2351
2352 EOF
2353 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2354   egrep "yes" >/dev/null 2>&1; then
2355   rm -rf conftest*
2356   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2357     Defining _ALL_SOURCE
2358 EOF
2359 cat >> confdefs.h <<\EOF
2360 #define _ALL_SOURCE 1
2361 EOF
2362 }
2363
2364 else
2365   rm -rf conftest*
2366   echo "$ac_t""no" 1>&6
2367 fi
2368 rm -f conftest*
2369
2370  
2371
2372 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2373 echo "configure:2374: checking for GNU libc" >&5
2374 cat > conftest.$ac_ext <<EOF
2375 #line 2376 "configure"
2376 #include "confdefs.h"
2377 #include <features.h>
2378 int main() {
2379
2380 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2381 #error Not a GNU libc system :-(
2382 ******* ======= ******** &&&&&&&&
2383 #endif
2384
2385 ; return 0; }
2386 EOF
2387 if { (eval echo configure:2388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2388   rm -rf conftest*
2389   have_glibc=yes
2390 else
2391   echo "configure: failed program was:" >&5
2392   cat conftest.$ac_ext >&5
2393   rm -rf conftest*
2394   have_glibc=no
2395 fi
2396 rm -f conftest*
2397 echo "$ac_t""$have_glibc" 1>&6
2398 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2399     Defining _GNU_SOURCE
2400 EOF
2401 cat >> confdefs.h <<\EOF
2402 #define _GNU_SOURCE 1
2403 EOF
2404 }
2405
2406
2407 case "$opsys" in
2408   sol2)
2409    { test "$extra_verbose" = "yes" && cat << \EOF
2410     Defining __EXTENSIONS__
2411 EOF
2412 cat >> confdefs.h <<\EOF
2413 #define __EXTENSIONS__ 1
2414 EOF
2415 }
2416
2417       if test "$os_release" -ge 55; then
2418      { test "$extra_verbose" = "yes" && cat << \EOF
2419     Defining _XOPEN_SOURCE = 500
2420 EOF
2421 cat >> confdefs.h <<\EOF
2422 #define _XOPEN_SOURCE 500
2423 EOF
2424 }
2425
2426      { test "$extra_verbose" = "yes" && cat << \EOF
2427     Defining _XOPEN_SOURCE_EXTENDED
2428 EOF
2429 cat >> confdefs.h <<\EOF
2430 #define _XOPEN_SOURCE_EXTENDED 1
2431 EOF
2432 }
2433
2434    fi ;;
2435   linux)
2436     { test "$extra_verbose" = "yes" && cat << \EOF
2437     Defining _POSIX_C_SOURCE = 199506L
2438 EOF
2439 cat >> confdefs.h <<\EOF
2440 #define _POSIX_C_SOURCE 199506L
2441 EOF
2442 }
2443
2444     { test "$extra_verbose" = "yes" && cat << \EOF
2445     Defining _XOPEN_SOURCE = 500
2446 EOF
2447 cat >> confdefs.h <<\EOF
2448 #define _XOPEN_SOURCE 500
2449 EOF
2450 }
2451
2452     { test "$extra_verbose" = "yes" && cat << \EOF
2453     Defining _XOPEN_SOURCE_EXTENDED
2454 EOF
2455 cat >> confdefs.h <<\EOF
2456 #define _XOPEN_SOURCE_EXTENDED 1
2457 EOF
2458 }
2459
2460     ;;
2461 esac
2462
2463 cat > conftest.$ac_ext <<EOF
2464 #line 2465 "configure"
2465 #include "confdefs.h"
2466 int main () {
2467 #if defined __SUNPRO_C
2468 return 11;
2469 #elif defined __DECC
2470 return 12;
2471 #elif defined __USLC__ && defined __SCO_VERSION__
2472 return 13;
2473 #else
2474 return 0;
2475 #endif
2476 }
2477 EOF
2478 if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2479 then
2480   :
2481 else
2482   conftest_rc="$?"
2483   echo "configure: failed program was:" >&5
2484   cat conftest.$ac_ext >&5
2485   rm -fr conftest*
2486   case "$conftest_rc" in
2487   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2488   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2489   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2490 esac
2491 fi
2492 rm -fr conftest*
2493
2494
2495
2496
2497 echo "Extracting information from the machine- and system-dependent headers..."
2498
2499 tempcname="conftest.c"
2500
2501
2502
2503 cat > $tempcname < confdefs.h
2504 cat >> $tempcname <<EOF
2505 #define NOT_C_CODE
2506 #define C_SWITCH_SITE
2507 #define C_SWITCH_X_SITE
2508 #define LD_SWITCH_SITE
2509 #define LD_SWITCH_X_SITE
2510 #define LD_SWITCH_X_SITE_AUX
2511 #define OS_RELEASE $os_release
2512
2513 #ifdef config_opsysfile
2514 #include "$srcdir/src/$opsysfile"
2515 #endif
2516
2517 #ifdef config_machfile
2518 #include "$srcdir/src/$machfile"
2519 #endif
2520
2521 #ifndef LIBS_MACHINE
2522 #define LIBS_MACHINE
2523 #endif
2524 configure___ libs_machine=LIBS_MACHINE
2525
2526 #ifndef LIBS_SYSTEM
2527 #define LIBS_SYSTEM
2528 #endif
2529 configure___ libs_system=LIBS_SYSTEM
2530
2531 #ifndef LIBS_TERMCAP
2532 #define LIBS_TERMCAP
2533 #endif
2534 configure___ libs_termcap=LIBS_TERMCAP
2535
2536 #ifndef LIB_STANDARD
2537 #define LIB_STANDARD
2538 #endif
2539 configure___ libs_standard=LIB_STANDARD
2540
2541
2542 #ifndef OBJECTS_MACHINE
2543 #define OBJECTS_MACHINE
2544 #endif
2545 configure___ objects_machine=OBJECTS_MACHINE
2546
2547 #ifndef OBJECTS_SYSTEM
2548 #define OBJECTS_SYSTEM
2549 #endif
2550 configure___ objects_system=OBJECTS_SYSTEM
2551
2552
2553 #ifndef C_SWITCH_MACHINE
2554 #define C_SWITCH_MACHINE
2555 #endif
2556 configure___ c_switch_machine=C_SWITCH_MACHINE
2557
2558 #ifndef C_SWITCH_SYSTEM
2559 #define C_SWITCH_SYSTEM
2560 #endif
2561 configure___ c_switch_system=C_SWITCH_SYSTEM
2562
2563
2564 #ifndef LD_SWITCH_MACHINE
2565 #define LD_SWITCH_MACHINE
2566 #endif
2567 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2568
2569 #ifndef LD_SWITCH_SYSTEM
2570 #define LD_SWITCH_SYSTEM
2571 #endif
2572 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2573
2574
2575 #ifndef UNEXEC
2576 #define UNEXEC "unexec.o"
2577 #endif
2578 configure___ unexec=UNEXEC
2579
2580
2581 #ifndef LD_SWITCH_SHARED
2582 #define LD_SWITCH_SHARED "-c"
2583 #endif
2584 configure___ ld_switch_shared=LD_SWITCH_SHARED
2585
2586
2587 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2588 configure___ ordinary_ld=ORDINARY_LD
2589
2590 #ifdef ORDINARY_LINK
2591 #define LD ORDINARY_LD
2592 #else /* no ORDINARY LINK */
2593 #ifdef COFF_ENCAPSULATE
2594 #define LD "\$(CC) -nostdlib"
2595 #else /* not COFF_ENCAPSULATE */
2596 #ifdef LINKER
2597 #define LD LINKER
2598 #else /* ! defined (LINKER) */
2599 #define LD "ld"
2600 #endif /* ! defined (LINKER) */
2601 #endif /* ! defined (COFF_ENCAPSULATE) */
2602 #endif /* not ORDINARY_LINK */
2603 configure___ ld=LD
2604
2605 #ifndef LIB_GCC
2606 #define LIB_GCC
2607 #endif
2608 configure___ lib_gcc=LIB_GCC
2609
2610 #ifndef LD_TEXT_START_ADDR
2611 #define LD_TEXT_START_ADDR
2612 #endif
2613 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2614
2615
2616 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2617 #ifdef NO_REMAP
2618 #ifdef COFF_ENCAPSULATE
2619 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2620 #else /* ! defined (COFF_ENCAPSULATE) */
2621 #define START_FILES "pre-crt0.o /lib/crt0.o"
2622 #endif /* ! defined (COFF_ENCAPSULATE) */
2623 #else /* ! defined (NO_REMAP) */
2624 #define START_FILES "ecrt0.o"
2625 #endif /* ! defined (NO_REMAP) */
2626 #endif /* no ORDINARY_LINK */
2627 #ifndef START_FILES
2628 #define START_FILES
2629 #endif
2630 configure___ start_files=START_FILES
2631
2632 #ifdef ORDINARY_LINK
2633 configure___ ordinary_link=yes
2634 #else
2635 configure___ ordinary_link=no
2636 #endif
2637
2638 #ifdef SYSTEM_MALLOC
2639 configure___ system_malloc=yes
2640 #else
2641 configure___ system_malloc=no
2642 #endif
2643
2644 #ifdef TERMINFO
2645 configure___ have_terminfo=yes
2646 #else
2647 configure___ have_terminfo=no
2648 #endif
2649
2650 #ifdef MAIL_USE_FLOCK
2651 configure___ mail_use_flock=yes
2652 #else
2653 configure___ mail_use_flock=no
2654 #endif
2655
2656 #ifdef MAIL_USE_LOCKF
2657 configure___ mail_use_lockf=yes
2658 #else
2659 configure___ mail_use_lockf=no
2660 #endif
2661
2662 #ifdef MAIL_USE_LOCKING
2663 configure___ mail_use_locking=yes
2664 #else
2665 configure___ mail_use_locking=no
2666 #endif
2667
2668 #ifdef HAVE_WIN32_PROCESSES
2669 configure___ win32_processes=yes
2670 #else
2671 configure___ win32_processes=no
2672 #endif
2673
2674 EOF
2675
2676 CPP=`eval "echo $CPP $CPPFLAGS"`
2677 eval `$CPP -Isrc $tempcname \
2678         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2679
2680 rm $tempcname
2681
2682 if test "$pdump" = "yes"; then
2683   ordinary_link="yes"
2684   ld="${ordinary_ld}"
2685   start_files=
2686   libs_standard=
2687   unexec=
2688   lib_gcc=
2689 fi
2690
2691 test "$extra_verbose" = "yes" && \
2692   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 ""
2693
2694 case "$opsys" in mingw* | cygwin*)
2695   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2696   cygwin_include=`eval "dirname $cygwin_include"` ;
2697   cygwin_include="-I$cygwin_include/../include" ;
2698   extra_includes="$cygwin_include/mingw32 $cygwin_include/mingw $cygwin_include" ;
2699   case "$opsys" in mingw*)
2700     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2701   esac
2702   ;;
2703 esac
2704
2705 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2706
2707
2708 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2709
2710 if test "$__USLC__" = yes; then
2711   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2712 echo "configure:2713: checking for whether the -Kalloca compiler flag is needed" >&5
2713   need_kalloca=no
2714   cat > conftest.$ac_ext <<EOF
2715 #line 2716 "configure"
2716 #include "confdefs.h"
2717
2718 int main() {
2719 void *x = alloca(4);
2720 ; return 0; }
2721 EOF
2722 if { (eval echo configure:2723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2723   rm -rf conftest*
2724   :
2725 else
2726   echo "configure: failed program was:" >&5
2727   cat conftest.$ac_ext >&5
2728   rm -rf conftest*
2729   
2730     xe_save_c_switch_system="$c_switch_system"
2731     c_switch_system="$c_switch_system -Kalloca"
2732     cat > conftest.$ac_ext <<EOF
2733 #line 2734 "configure"
2734 #include "confdefs.h"
2735
2736 int main() {
2737 void *x = alloca(4);
2738 ; return 0; }
2739 EOF
2740 if { (eval echo configure:2741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2741   rm -rf conftest*
2742    need_kalloca=yes 
2743 else
2744   echo "configure: failed program was:" >&5
2745   cat conftest.$ac_ext >&5
2746 fi
2747 rm -f conftest*
2748     c_switch_system="$xe_save_c_switch_system"
2749 fi
2750 rm -f conftest*
2751   echo "$ac_t""$need_kalloca" 1>&6
2752   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
2753 fi
2754
2755 if test "$cflags_specified" = "no"; then
2756       if   test "$GCC" = "yes"; then
2757     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wshadow"
2758             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2759               elif test "$__SUNPRO_C" = "yes"; then
2760     case "$opsys" in
2761       sol2    ) CFLAGS="-v -xO4" ;;
2762       sunos4* ) CFLAGS="-xO2";;
2763     esac
2764   elif test "$__DECC" = "yes"; then
2765     CFLAGS="-O3"
2766   elif test "$CC" = "xlc"; then
2767     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2768     else
2769     CFLAGS="-O" ;  fi
2770 fi
2771
2772 if test "$GCC" = "yes"; then
2773 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2774 echo "configure:2775: checking for buggy gcc versions" >&5
2775 GCC_VERSION=`$CC --version`
2776 case `uname -s`:`uname -m`:$GCC_VERSION in
2777                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2778                         case "$CFLAGS" in
2779             *-O2*|*-O3*)
2780                 case "$CFLAGS" in
2781                     *-fno-schedule-insns*) ;;
2782                     *)
2783                         echo "$ac_t""yes" 1>&6
2784                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2785                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2786                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2787                         ;;
2788                 esac
2789                 ;;
2790         esac
2791         ;;
2792                     Linux:alpha:egcs-2.91.*)
2793         echo "$ac_t""yes" 1>&6
2794         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2795         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2796         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2797         ;;
2798     *:i*86*:2.7.2*)
2799         case "$CFLAGS" in
2800             *-O2*|*-O3*)
2801                 case "$GCC_VERSION" in
2802                     2.7.2)
2803                         case "$CFLAGS" in
2804                             *-fno-strength-reduce*) ;;
2805                             *)
2806                                 echo "$ac_t""yes" 1>&6
2807                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2808                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2809                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2810                                 ;;
2811                         esac
2812                         ;;
2813                 esac
2814                 case "$CFLAGS" in
2815                  *-fno-caller-saves*) ;;
2816                  *)
2817                     echo "$ac_t""yes" 1>&6
2818                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2819                     echo "configure: warning: -fno-caller-saves." 1>&2
2820                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2821                     ;;
2822                 esac
2823                 ;;
2824         esac
2825         ;;
2826 esac
2827 echo "$ac_t""no" 1>&6
2828 fi
2829
2830
2831 if test "$GCC" = "yes"; then
2832   set x $ld_switch_system; shift; ld_switch_system=""
2833   while test -n "$1"; do
2834     case $1 in
2835       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2836       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2837       -Xlinker* ) ;;
2838       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2839     esac
2840     shift
2841   done
2842 fi
2843
2844 if test "$GCC" = "yes"; then
2845   set x $ld_switch_machine; shift; ld_switch_machine=""
2846   while test -n "$1"; do
2847     case $1 in
2848       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2849       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2850       -Xlinker* ) ;;
2851       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2852     esac
2853     shift
2854   done
2855 fi
2856
2857 if test "$GCC" = "yes"; then
2858   set x $LDFLAGS; shift; LDFLAGS=""
2859   while test -n "$1"; do
2860     case $1 in
2861       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2862       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2863       -Xlinker* ) ;;
2864       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2865     esac
2866     shift
2867   done
2868 fi
2869
2870 if test "$GCC" = "yes"; then
2871   set x $ld_call_shared; shift; ld_call_shared=""
2872   while test -n "$1"; do
2873     case $1 in
2874       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2875       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2876       -Xlinker* ) ;;
2877       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2878     esac
2879     shift
2880   done
2881 fi
2882
2883 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2884    echo "    xemacs will be linked with \"$objects_machine\""
2885  fi
2886 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2887    echo "    xemacs will be linked with \"$objects_system\""
2888  fi
2889 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2890    echo "    xemacs will be linked with \"$unexec\""
2891  fi
2892 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2893    echo "    xemacs will be linked with \"dumper.o\""
2894  fi
2895
2896 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2897 echo "configure:2898: checking for dynodump" >&5
2898 if test "$unexec" != "unexsol2.o"; then
2899   echo "$ac_t""no" 1>&6
2900 else
2901   echo "$ac_t""yes" 1>&6
2902   { test "$extra_verbose" = "yes" && cat << \EOF
2903     Defining DYNODUMP
2904 EOF
2905 cat >> confdefs.h <<\EOF
2906 #define DYNODUMP 1
2907 EOF
2908 }
2909
2910   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2911   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2912   case "$machine" in
2913     sparc   ) dynodump_arch=sparc ;;
2914     *86*    ) dynodump_arch=i386  ;;
2915     powerpc ) dynodump_arch=ppc   ;;
2916   esac
2917     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
2918 fi
2919
2920
2921 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2922
2923 if test "$unexec" = "unexaix.o"; then
2924   if   test "$dynamic" = "no"; then
2925   start_flags="-Wl,-bnso,-bnodelcsect"
2926   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2927   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2928     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2929   done
2930   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2931     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2932   done
2933   
2934 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2935 echo "configure:2936: checking for terminateAndUnload in -lC" >&5
2936 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2937
2938 xe_check_libs=" -lC "
2939 cat > conftest.$ac_ext <<EOF
2940 #line 2941 "configure"
2941 #include "confdefs.h"
2942 /* Override any gcc2 internal prototype to avoid an error.  */
2943 /* We use char because int might match the return type of a gcc2
2944     builtin and then its argument prototype would still apply.  */
2945 char terminateAndUnload();
2946
2947 int main() {
2948 terminateAndUnload()
2949 ; return 0; }
2950 EOF
2951 if { (eval echo configure:2952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2952   rm -rf conftest*
2953   eval "ac_cv_lib_$ac_lib_var=yes"
2954 else
2955   echo "configure: failed program was:" >&5
2956   cat conftest.$ac_ext >&5
2957   rm -rf conftest*
2958   eval "ac_cv_lib_$ac_lib_var=no"
2959 fi
2960 rm -f conftest*
2961 xe_check_libs=""
2962
2963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2964   echo "$ac_t""yes" 1>&6
2965   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2966 else
2967   echo "$ac_t""no" 1>&6
2968 fi
2969
2970
2971   fi
2972 elif test -n "$ld_text_start_addr"; then
2973   start_flags="-T $ld_text_start_addr -e __start"
2974 fi
2975
2976
2977
2978
2979 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2980  test -z "$linker" &&  linker='$(CC) -nostdlib'
2981  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2982 fi
2983 test "$GCC" != "yes" && lib_gcc=
2984
2985
2986
2987
2988
2989 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2990 if test -n "$site_libraries"; then
2991   for arg in $site_libraries; do
2992     case "$arg" in
2993      -* ) ;;
2994      * ) test -d "$arg" || \
2995            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2996        arg="-L${arg}" ;;
2997     esac
2998     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2999   done
3000 fi
3001
3002 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3003 if test -n "$site_includes"; then
3004   for arg in $site_includes; do
3005     case "$arg" in
3006       -* ) ;;
3007       * ) test -d "$arg" || \
3008            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3009       arg="-I${arg}" ;;
3010     esac
3011     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3012   done
3013 fi
3014
3015 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3016 if test -n "$site_prefixes"; then
3017   for dir in $site_prefixes; do
3018     lib_dir="${dir}/lib"
3019     inc_dir="${dir}/include"
3020     if test ! -d "$dir"; then
3021       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3022     elif test ! -d "$lib_dir"; then
3023       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3024     else
3025       if test -d "$inc_dir"; then
3026         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
3027       fi
3028       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
3029     fi
3030   done
3031 fi
3032
3033
3034 for dir in "/usr/ccs/lib"; do
3035   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
3036 done
3037
3038 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3039 if test -n "$site_runtime_libraries"; then
3040   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3041   export LD_RUN_PATH
3042 fi
3043
3044
3045
3046
3047
3048 if test -n "$add_runtime_path"; then :;
3049 elif test "$dynamic" = "no"; then add_runtime_path=no
3050 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3051 else case "$opsys" in
3052        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3053        * ) add_runtime_path=no ;;
3054      esac
3055 fi
3056
3057 if test "$add_runtime_path" = "yes"; then
3058       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3059 echo "configure:3060: checking "for runtime libraries flag"" >&5
3060   case "$opsys" in
3061     sol2 ) dash_r="-R" ;;
3062     decosf* | linux* | irix*) dash_r="-rpath " ;;
3063     *)
3064       dash_r=""
3065       for try_dash_r in "-R" "-R " "-rpath "; do
3066         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3067         
3068 if test "$GCC" = "yes"; then
3069   set x $xe_check_libs; shift; xe_check_libs=""
3070   while test -n "$1"; do
3071     case $1 in
3072       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3073       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3074       -Xlinker* ) ;;
3075       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3076     esac
3077     shift
3078   done
3079 fi
3080         cat > conftest.$ac_ext <<EOF
3081 #line 3082 "configure"
3082 #include "confdefs.h"
3083
3084 int main() {
3085
3086 ; return 0; }
3087 EOF
3088 if { (eval echo configure:3089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3089   rm -rf conftest*
3090   dash_r="$try_dash_r"
3091 else
3092   echo "configure: failed program was:" >&5
3093   cat conftest.$ac_ext >&5
3094 fi
3095 rm -f conftest*
3096         xe_check_libs=""
3097         test -n "$dash_r" && break
3098       done ;;
3099   esac
3100   if test -n "$dash_r";
3101     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3102     else echo "$ac_t""NONE" 1>&6
3103   fi
3104 fi
3105
3106 xe_add_unique_runpath_dir='
3107   xe_add_p=yes
3108   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3109   done
3110   if test "$xe_add_p" = "yes"; then
3111     test -n "$runpath" && runpath="${runpath}:"
3112     runpath="${runpath}${xe_runpath_dir}"
3113     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3114   fi'
3115
3116
3117
3118
3119 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3120     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3121   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3122   
3123         runpath="" runpath_dirs=""
3124   if test -n "$LD_RUN_PATH"; then
3125     runpath="$LD_RUN_PATH"
3126   elif test "$GCC" = "yes"; then
3127         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3128     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3129     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3130     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3131       case "$arg" in P,* | -L* | -R* )
3132         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3133           {
3134 xe_runpath_dir="$dir"
3135   test "$xe_runpath_dir" != "/lib"     -a \
3136         "$xe_runpath_dir" != "/usr/lib" -a \
3137         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3138   eval "$xe_add_unique_runpath_dir"
3139 }
3140         done ;;
3141       esac
3142     done
3143     ld_switch_run="$ld_switch_run_save"
3144     rm -f conftest*
3145   else
3146         for arg in $ld_switch_site $ld_switch_x_site; do
3147       case "$arg" in -L*) {
3148 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3149   test "$xe_runpath_dir" != "/lib"     -a \
3150         "$xe_runpath_dir" != "/usr/lib" -a \
3151         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3152   eval "$xe_add_unique_runpath_dir"
3153 };; esac
3154     done
3155         if test "$opsys $need_motif" = "sol2 yes"; then
3156       xe_runpath_dir="/opt/SUNWdt/lib";
3157       eval "$xe_add_unique_runpath_dir";
3158     fi
3159   fi 
3160   if test -n "$runpath"; then
3161     ld_switch_run="${dash_r}${runpath}"
3162     
3163 if test "$GCC" = "yes"; then
3164   set x $ld_switch_run; shift; ld_switch_run=""
3165   while test -n "$1"; do
3166     case $1 in
3167       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3168       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3169       -Xlinker* ) ;;
3170       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3171     esac
3172     shift
3173   done
3174 fi
3175     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3176   fi
3177 fi
3178
3179
3180
3181
3182 GNU_MALLOC=yes
3183 if test "$with_dlmalloc" != "no"; then
3184         doug_lea_malloc=yes
3185 else
3186         doug_lea_malloc=no
3187 fi
3188 after_morecore_hook_exists=yes
3189 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3190 echo "configure:3191: checking for malloc_set_state" >&5
3191
3192 cat > conftest.$ac_ext <<EOF
3193 #line 3194 "configure"
3194 #include "confdefs.h"
3195 /* System header to define __stub macros and hopefully few prototypes,
3196     which can conflict with char malloc_set_state(); below.  */
3197 #include <assert.h>
3198 /* Override any gcc2 internal prototype to avoid an error.  */
3199 /* We use char because int might match the return type of a gcc2
3200     builtin and then its argument prototype would still apply.  */
3201 char malloc_set_state();
3202
3203 int main() {
3204
3205 /* The GNU C library defines this for functions which it implements
3206     to always fail with ENOSYS.  Some functions are actually named
3207     something starting with __ and the normal name is an alias.  */
3208 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3209 choke me
3210 #else
3211 malloc_set_state();
3212 #endif
3213
3214 ; return 0; }
3215 EOF
3216 if { (eval echo configure:3217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3217   rm -rf conftest*
3218   eval "ac_cv_func_malloc_set_state=yes"
3219 else
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   eval "ac_cv_func_malloc_set_state=no"
3224 fi
3225 rm -f conftest*
3226
3227 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3228   echo "$ac_t""yes" 1>&6
3229   :
3230 else
3231   echo "$ac_t""no" 1>&6
3232 doug_lea_malloc=no
3233 fi
3234
3235 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3236 echo "configure:3237: checking whether __after_morecore_hook exists" >&5
3237 cat > conftest.$ac_ext <<EOF
3238 #line 3239 "configure"
3239 #include "confdefs.h"
3240 extern void (* __after_morecore_hook)();
3241 int main() {
3242 __after_morecore_hook = 0
3243 ; return 0; }
3244 EOF
3245 if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3246   rm -rf conftest*
3247   echo "$ac_t""yes" 1>&6
3248 else
3249   echo "configure: failed program was:" >&5
3250   cat conftest.$ac_ext >&5
3251   rm -rf conftest*
3252   echo "$ac_t""no" 1>&6
3253    after_morecore_hook_exists=no
3254 fi
3255 rm -f conftest*
3256 if test "$system_malloc" = "yes" ; then
3257   GNU_MALLOC=no
3258   GNU_MALLOC_reason="
3259     - The GNU allocators don't work with this system configuration."
3260 elif test "$with_system_malloc" = "yes" ; then
3261   GNU_MALLOC=no
3262   GNU_MALLOC_reason="
3263     - User chose not to use GNU allocators."
3264 elif test "$with_debug_malloc" = "yes" ; then
3265   GNU_MALLOC=no
3266   GNU_MALLOC_reason="
3267     - User chose to use Debugging Malloc."
3268 fi
3269
3270 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3271   GNU_MALLOC_reason="
3272     - Using Doug Lea's new malloc from the GNU C Library."
3273   { test "$extra_verbose" = "yes" && cat << \EOF
3274     Defining DOUG_LEA_MALLOC
3275 EOF
3276 cat >> confdefs.h <<\EOF
3277 #define DOUG_LEA_MALLOC 1
3278 EOF
3279 }
3280
3281   if test "$after_morecore_hook_exists" = "no" ; then
3282     GNU_MALLOC_reason="
3283     - Using Doug Lea's new malloc from the Linux C Library."
3284     { test "$extra_verbose" = "yes" && cat << \EOF
3285     Defining _NO_MALLOC_WARNING_
3286 EOF
3287 cat >> confdefs.h <<\EOF
3288 #define _NO_MALLOC_WARNING_ 1
3289 EOF
3290 }
3291
3292   fi
3293 fi
3294
3295
3296
3297
3298 # Extract the first word of "ranlib", so it can be a program name with args.
3299 set dummy ranlib; ac_word=$2
3300 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3301 echo "configure:3302: checking for $ac_word" >&5
3302
3303 if test -n "$RANLIB"; then
3304   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3305 else
3306   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3307   ac_dummy="$PATH"
3308   for ac_dir in $ac_dummy; do
3309     test -z "$ac_dir" && ac_dir=.
3310     if test -f $ac_dir/$ac_word; then
3311       ac_cv_prog_RANLIB="ranlib"
3312       break
3313     fi
3314   done
3315   IFS="$ac_save_ifs"
3316   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3317 fi
3318 RANLIB="$ac_cv_prog_RANLIB"
3319 if test -n "$RANLIB"; then
3320   echo "$ac_t""$RANLIB" 1>&6
3321 else
3322   echo "$ac_t""no" 1>&6
3323 fi
3324
3325 ac_aux_dir=
3326 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3327   if test -f $ac_dir/install-sh; then
3328     ac_aux_dir=$ac_dir
3329     ac_install_sh="$ac_aux_dir/install-sh -c"
3330     break
3331   elif test -f $ac_dir/install.sh; then
3332     ac_aux_dir=$ac_dir
3333     ac_install_sh="$ac_aux_dir/install.sh -c"
3334     break
3335   fi
3336 done
3337 if test -z "$ac_aux_dir"; then
3338   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3339 fi
3340 ac_config_guess=$ac_aux_dir/config.guess
3341 ac_config_sub=$ac_aux_dir/config.sub
3342 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3343
3344 # Find a good install program.  We prefer a C program (faster),
3345 # so one script is as good as another.  But avoid the broken or
3346 # incompatible versions:
3347 # SysV /etc/install, /usr/sbin/install
3348 # SunOS /usr/etc/install
3349 # IRIX /sbin/install
3350 # AIX /bin/install
3351 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3352 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3353 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3354 # ./install, which can be erroneously created by make from ./install.sh.
3355 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3356 echo "configure:3357: checking for a BSD compatible install" >&5
3357 if test -z "$INSTALL"; then
3358
3359   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3360   for ac_dir in $PATH; do
3361     # Account for people who put trailing slashes in PATH elements.
3362     case "$ac_dir/" in
3363     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3364     *)
3365       # OSF1 and SCO ODT 3.0 have their own names for install.
3366       # Don't use installbsd from OSF since it installs stuff as root
3367       # by default.
3368       for ac_prog in ginstall scoinst install; do
3369         if test -f $ac_dir/$ac_prog; then
3370           if test $ac_prog = install &&
3371             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3372             # AIX install.  It has an incompatible calling convention.
3373             :
3374           else
3375             ac_cv_path_install="$ac_dir/$ac_prog -c"
3376             break 2
3377           fi
3378         fi
3379       done
3380       ;;
3381     esac
3382   done
3383   IFS="$ac_save_IFS"
3384
3385   if test "${ac_cv_path_install+set}" = set; then
3386     INSTALL="$ac_cv_path_install"
3387   else
3388     # As a last resort, use the slow shell script.  We don't cache a
3389     # path for INSTALL within a source directory, because that will
3390     # break other packages using the cache if that directory is
3391     # removed, or if the path is relative.
3392     INSTALL="$ac_install_sh"
3393   fi
3394 fi
3395 echo "$ac_t""$INSTALL" 1>&6
3396
3397 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3398 # It thinks the first close brace ends the variable substitution.
3399 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3400
3401 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3402
3403 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3404
3405 for ac_prog in 'bison -y' byacc
3406 do
3407 # Extract the first word of "$ac_prog", so it can be a program name with args.
3408 set dummy $ac_prog; ac_word=$2
3409 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3410 echo "configure:3411: checking for $ac_word" >&5
3411
3412 if test -n "$YACC"; then
3413   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3414 else
3415   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3416   ac_dummy="$PATH"
3417   for ac_dir in $ac_dummy; do
3418     test -z "$ac_dir" && ac_dir=.
3419     if test -f $ac_dir/$ac_word; then
3420       ac_cv_prog_YACC="$ac_prog"
3421       break
3422     fi
3423   done
3424   IFS="$ac_save_ifs"
3425 fi
3426 YACC="$ac_cv_prog_YACC"
3427 if test -n "$YACC"; then
3428   echo "$ac_t""$YACC" 1>&6
3429 else
3430   echo "$ac_t""no" 1>&6
3431 fi
3432
3433 test -n "$YACC" && break
3434 done
3435 test -n "$YACC" || YACC="yacc"
3436
3437
3438 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 
3439 do
3440 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3441 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3442 echo "configure:3443: checking for $ac_hdr" >&5
3443
3444 cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3447 #include <$ac_hdr>
3448 EOF
3449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3450 { (eval echo configure:3451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3452 if test -z "$ac_err"; then
3453   rm -rf conftest*
3454   eval "ac_cv_header_$ac_safe=yes"
3455 else
3456   echo "$ac_err" >&5
3457   echo "configure: failed program was:" >&5
3458   cat conftest.$ac_ext >&5
3459   rm -rf conftest*
3460   eval "ac_cv_header_$ac_safe=no"
3461 fi
3462 rm -f conftest*
3463 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3464   echo "$ac_t""yes" 1>&6
3465     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3466   { test "$extra_verbose" = "yes" && cat << EOF
3467     Defining $ac_tr_hdr
3468 EOF
3469 cat >> confdefs.h <<EOF
3470 #define $ac_tr_hdr 1
3471 EOF
3472 }
3473  
3474 else
3475   echo "$ac_t""no" 1>&6
3476 fi
3477 done
3478
3479 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3480 echo "configure:3481: checking for sys/wait.h that is POSIX.1 compatible" >&5
3481
3482 cat > conftest.$ac_ext <<EOF
3483 #line 3484 "configure"
3484 #include "confdefs.h"
3485 #include <sys/types.h>
3486 #include <sys/wait.h>
3487 #ifndef WEXITSTATUS
3488 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3489 #endif
3490 #ifndef WIFEXITED
3491 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3492 #endif
3493 int main() {
3494 int s;
3495 wait (&s);
3496 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3497 ; return 0; }
3498 EOF
3499 if { (eval echo configure:3500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3500   rm -rf conftest*
3501   ac_cv_header_sys_wait_h=yes
3502 else
3503   echo "configure: failed program was:" >&5
3504   cat conftest.$ac_ext >&5
3505   rm -rf conftest*
3506   ac_cv_header_sys_wait_h=no
3507 fi
3508 rm -f conftest*
3509
3510 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3511 if test $ac_cv_header_sys_wait_h = yes; then
3512   { test "$extra_verbose" = "yes" && cat << \EOF
3513     Defining HAVE_SYS_WAIT_H
3514 EOF
3515 cat >> confdefs.h <<\EOF
3516 #define HAVE_SYS_WAIT_H 1
3517 EOF
3518 }
3519
3520 fi
3521
3522 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3523 echo "configure:3524: checking for ANSI C header files" >&5
3524
3525 cat > conftest.$ac_ext <<EOF
3526 #line 3527 "configure"
3527 #include "confdefs.h"
3528 #include <stdlib.h>
3529 #include <stdarg.h>
3530 #include <string.h>
3531 #include <float.h>
3532 EOF
3533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3534 { (eval echo configure:3535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3536 if test -z "$ac_err"; then
3537   rm -rf conftest*
3538   ac_cv_header_stdc=yes
3539 else
3540   echo "$ac_err" >&5
3541   echo "configure: failed program was:" >&5
3542   cat conftest.$ac_ext >&5
3543   rm -rf conftest*
3544   ac_cv_header_stdc=no
3545 fi
3546 rm -f conftest*
3547
3548 if test $ac_cv_header_stdc = yes; then
3549   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3550 cat > conftest.$ac_ext <<EOF
3551 #line 3552 "configure"
3552 #include "confdefs.h"
3553 #include <string.h>
3554 EOF
3555 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3556   egrep "memchr" >/dev/null 2>&1; then
3557   :
3558 else
3559   rm -rf conftest*
3560   ac_cv_header_stdc=no
3561 fi
3562 rm -f conftest*
3563
3564 fi
3565
3566 if test $ac_cv_header_stdc = yes; then
3567   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3568 cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 #include <stdlib.h>
3572 EOF
3573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3574   egrep "free" >/dev/null 2>&1; then
3575   :
3576 else
3577   rm -rf conftest*
3578   ac_cv_header_stdc=no
3579 fi
3580 rm -f conftest*
3581
3582 fi
3583
3584 if test $ac_cv_header_stdc = yes; then
3585   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3586 cat > conftest.$ac_ext <<EOF
3587 #line 3588 "configure"
3588 #include "confdefs.h"
3589 #include <ctype.h>
3590 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3591 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3592 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3593 int main () { int i; for (i = 0; i < 256; i++)
3594 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3595 exit (0); }
3596
3597 EOF
3598 if { (eval echo configure:3599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3599 then
3600   :
3601 else
3602   conftest_rc="$?"
3603   echo "configure: failed program was:" >&5
3604   cat conftest.$ac_ext >&5
3605   rm -fr conftest*
3606   ac_cv_header_stdc=no
3607 fi
3608 rm -fr conftest*
3609 fi
3610
3611 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3612 if test $ac_cv_header_stdc = yes; then
3613   { test "$extra_verbose" = "yes" && cat << \EOF
3614     Defining STDC_HEADERS
3615 EOF
3616 cat >> confdefs.h <<\EOF
3617 #define STDC_HEADERS 1
3618 EOF
3619 }
3620
3621 fi
3622
3623 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3624 echo "configure:3625: checking whether time.h and sys/time.h may both be included" >&5
3625
3626 cat > conftest.$ac_ext <<EOF
3627 #line 3628 "configure"
3628 #include "confdefs.h"
3629 #include <sys/types.h>
3630 #include <sys/time.h>
3631 #include <time.h>
3632 int main() {
3633 struct tm *tp;
3634 ; return 0; }
3635 EOF
3636 if { (eval echo configure:3637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3637   rm -rf conftest*
3638   ac_cv_header_time=yes
3639 else
3640   echo "configure: failed program was:" >&5
3641   cat conftest.$ac_ext >&5
3642   rm -rf conftest*
3643   ac_cv_header_time=no
3644 fi
3645 rm -f conftest*
3646
3647 echo "$ac_t""$ac_cv_header_time" 1>&6
3648 if test $ac_cv_header_time = yes; then
3649   { test "$extra_verbose" = "yes" && cat << \EOF
3650     Defining TIME_WITH_SYS_TIME
3651 EOF
3652 cat >> confdefs.h <<\EOF
3653 #define TIME_WITH_SYS_TIME 1
3654 EOF
3655 }
3656
3657 fi
3658
3659 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3660 echo "configure:3661: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3661
3662 cat > conftest.$ac_ext <<EOF
3663 #line 3664 "configure"
3664 #include "confdefs.h"
3665 #include <sys/types.h>
3666 #include <signal.h>
3667 /* NetBSD declares sys_siglist in unistd.h.  */
3668 #ifdef HAVE_UNISTD_H
3669 #include <unistd.h>
3670 #endif
3671 int main() {
3672 char *msg = *(sys_siglist + 1);
3673 ; return 0; }
3674 EOF
3675 if { (eval echo configure:3676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3676   rm -rf conftest*
3677   ac_cv_decl_sys_siglist=yes
3678 else
3679   echo "configure: failed program was:" >&5
3680   cat conftest.$ac_ext >&5
3681   rm -rf conftest*
3682   ac_cv_decl_sys_siglist=no
3683 fi
3684 rm -f conftest*
3685
3686 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3687 if test $ac_cv_decl_sys_siglist = yes; then
3688   { test "$extra_verbose" = "yes" && cat << \EOF
3689     Defining SYS_SIGLIST_DECLARED
3690 EOF
3691 cat >> confdefs.h <<\EOF
3692 #define SYS_SIGLIST_DECLARED 1
3693 EOF
3694 }
3695
3696 fi
3697
3698
3699 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3700 echo "configure:3701: checking for struct utimbuf" >&5
3701 cat > conftest.$ac_ext <<EOF
3702 #line 3703 "configure"
3703 #include "confdefs.h"
3704 #ifdef TIME_WITH_SYS_TIME
3705 #include <sys/time.h>
3706 #include <time.h>
3707 #else
3708 #ifdef HAVE_SYS_TIME_H
3709 #include <sys/time.h>
3710 #else
3711 #include <time.h>
3712 #endif
3713 #endif
3714 #ifdef HAVE_UTIME_H
3715 #include <utime.h>
3716 #endif
3717 int main() {
3718 static struct utimbuf x; x.actime = x.modtime;
3719 ; return 0; }
3720 EOF
3721 if { (eval echo configure:3722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3722   rm -rf conftest*
3723   echo "$ac_t""yes" 1>&6
3724    { test "$extra_verbose" = "yes" && cat << \EOF
3725     Defining HAVE_STRUCT_UTIMBUF
3726 EOF
3727 cat >> confdefs.h <<\EOF
3728 #define HAVE_STRUCT_UTIMBUF 1
3729 EOF
3730 }
3731
3732 else
3733   echo "configure: failed program was:" >&5
3734   cat conftest.$ac_ext >&5
3735   rm -rf conftest*
3736   echo "$ac_t""no" 1>&6
3737 fi
3738 rm -f conftest*
3739
3740 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3741 echo "configure:3742: checking return type of signal handlers" >&5
3742
3743 cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746 #include <sys/types.h>
3747 #include <signal.h>
3748 #ifdef signal
3749 #undef signal
3750 #endif
3751 #ifdef __cplusplus
3752 extern "C" void (*signal (int, void (*)(int)))(int);
3753 #else
3754 void (*signal ()) ();
3755 #endif
3756
3757 int main() {
3758 int i;
3759 ; return 0; }
3760 EOF
3761 if { (eval echo configure:3762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3762   rm -rf conftest*
3763   ac_cv_type_signal=void
3764 else
3765   echo "configure: failed program was:" >&5
3766   cat conftest.$ac_ext >&5
3767   rm -rf conftest*
3768   ac_cv_type_signal=int
3769 fi
3770 rm -f conftest*
3771
3772 echo "$ac_t""$ac_cv_type_signal" 1>&6
3773 { test "$extra_verbose" = "yes" && cat << EOF
3774     Defining RETSIGTYPE = $ac_cv_type_signal
3775 EOF
3776 cat >> confdefs.h <<EOF
3777 #define RETSIGTYPE $ac_cv_type_signal
3778 EOF
3779 }
3780
3781
3782 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3783 echo "configure:3784: checking for size_t" >&5
3784
3785 cat > conftest.$ac_ext <<EOF
3786 #line 3787 "configure"
3787 #include "confdefs.h"
3788 #include <sys/types.h>
3789 #if STDC_HEADERS
3790 #include <stdlib.h>
3791 #include <stddef.h>
3792 #endif
3793 EOF
3794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3795   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3796   rm -rf conftest*
3797   ac_cv_type_size_t=yes
3798 else
3799   rm -rf conftest*
3800   ac_cv_type_size_t=no
3801 fi
3802 rm -f conftest*
3803
3804 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3805 if test $ac_cv_type_size_t = no; then
3806   { test "$extra_verbose" = "yes" && cat << \EOF
3807     Defining size_t = unsigned
3808 EOF
3809 cat >> confdefs.h <<\EOF
3810 #define size_t unsigned
3811 EOF
3812 }
3813
3814 fi
3815
3816 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3817 echo "configure:3818: checking for pid_t" >&5
3818
3819 cat > conftest.$ac_ext <<EOF
3820 #line 3821 "configure"
3821 #include "confdefs.h"
3822 #include <sys/types.h>
3823 #if STDC_HEADERS
3824 #include <stdlib.h>
3825 #include <stddef.h>
3826 #endif
3827 EOF
3828 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3829   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3830   rm -rf conftest*
3831   ac_cv_type_pid_t=yes
3832 else
3833   rm -rf conftest*
3834   ac_cv_type_pid_t=no
3835 fi
3836 rm -f conftest*
3837
3838 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3839 if test $ac_cv_type_pid_t = no; then
3840   { test "$extra_verbose" = "yes" && cat << \EOF
3841     Defining pid_t = int
3842 EOF
3843 cat >> confdefs.h <<\EOF
3844 #define pid_t int
3845 EOF
3846 }
3847
3848 fi
3849
3850 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3851 echo "configure:3852: checking for uid_t in sys/types.h" >&5
3852
3853 cat > conftest.$ac_ext <<EOF
3854 #line 3855 "configure"
3855 #include "confdefs.h"
3856 #include <sys/types.h>
3857 EOF
3858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3859   egrep "uid_t" >/dev/null 2>&1; then
3860   rm -rf conftest*
3861   ac_cv_type_uid_t=yes
3862 else
3863   rm -rf conftest*
3864   ac_cv_type_uid_t=no
3865 fi
3866 rm -f conftest*
3867
3868
3869 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3870 if test $ac_cv_type_uid_t = no; then
3871   { test "$extra_verbose" = "yes" && cat << \EOF
3872     Defining uid_t = int
3873 EOF
3874 cat >> confdefs.h <<\EOF
3875 #define uid_t int
3876 EOF
3877 }
3878
3879   { test "$extra_verbose" = "yes" && cat << \EOF
3880     Defining gid_t = int
3881 EOF
3882 cat >> confdefs.h <<\EOF
3883 #define gid_t int
3884 EOF
3885 }
3886
3887 fi
3888
3889 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3890 echo "configure:3891: checking for mode_t" >&5
3891
3892 cat > conftest.$ac_ext <<EOF
3893 #line 3894 "configure"
3894 #include "confdefs.h"
3895 #include <sys/types.h>
3896 #if STDC_HEADERS
3897 #include <stdlib.h>
3898 #include <stddef.h>
3899 #endif
3900 EOF
3901 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3902   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3903   rm -rf conftest*
3904   ac_cv_type_mode_t=yes
3905 else
3906   rm -rf conftest*
3907   ac_cv_type_mode_t=no
3908 fi
3909 rm -f conftest*
3910
3911 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3912 if test $ac_cv_type_mode_t = no; then
3913   { test "$extra_verbose" = "yes" && cat << \EOF
3914     Defining mode_t = int
3915 EOF
3916 cat >> confdefs.h <<\EOF
3917 #define mode_t int
3918 EOF
3919 }
3920
3921 fi
3922
3923 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3924 echo "configure:3925: checking for off_t" >&5
3925
3926 cat > conftest.$ac_ext <<EOF
3927 #line 3928 "configure"
3928 #include "confdefs.h"
3929 #include <sys/types.h>
3930 #if STDC_HEADERS
3931 #include <stdlib.h>
3932 #include <stddef.h>
3933 #endif
3934 EOF
3935 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3936   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3937   rm -rf conftest*
3938   ac_cv_type_off_t=yes
3939 else
3940   rm -rf conftest*
3941   ac_cv_type_off_t=no
3942 fi
3943 rm -f conftest*
3944
3945 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3946 if test $ac_cv_type_off_t = no; then
3947   { test "$extra_verbose" = "yes" && cat << \EOF
3948     Defining off_t = long
3949 EOF
3950 cat >> confdefs.h <<\EOF
3951 #define off_t long
3952 EOF
3953 }
3954
3955 fi
3956
3957 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3958 echo "configure:3959: checking for ssize_t" >&5
3959
3960 cat > conftest.$ac_ext <<EOF
3961 #line 3962 "configure"
3962 #include "confdefs.h"
3963 #include <sys/types.h>
3964 #if STDC_HEADERS
3965 #include <stdlib.h>
3966 #include <stddef.h>
3967 #endif
3968 EOF
3969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3970   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3971   rm -rf conftest*
3972   ac_cv_type_ssize_t=yes
3973 else
3974   rm -rf conftest*
3975   ac_cv_type_ssize_t=no
3976 fi
3977 rm -f conftest*
3978
3979 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3980 if test $ac_cv_type_ssize_t = no; then
3981   { test "$extra_verbose" = "yes" && cat << \EOF
3982     Defining ssize_t = int
3983 EOF
3984 cat >> confdefs.h <<\EOF
3985 #define ssize_t int
3986 EOF
3987 }
3988
3989 fi
3990
3991
3992 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
3993 echo "configure:3994: checking for socklen_t" >&5
3994 cat > conftest.$ac_ext <<EOF
3995 #line 3996 "configure"
3996 #include "confdefs.h"
3997 #include <sys/socket.h>
3998 socklen_t x;
3999
4000 int main() {
4001
4002 ; return 0; }
4003 EOF
4004 if { (eval echo configure:4005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4005   rm -rf conftest*
4006   echo "$ac_t""yes" 1>&6
4007 else
4008   echo "configure: failed program was:" >&5
4009   cat conftest.$ac_ext >&5
4010   rm -rf conftest*
4011   
4012 cat > conftest.$ac_ext <<EOF
4013 #line 4014 "configure"
4014 #include "confdefs.h"
4015 #include <sys/socket.h>
4016 int accept (int, struct sockaddr *, size_t *);
4017
4018 int main() {
4019
4020 ; return 0; }
4021 EOF
4022 if { (eval echo configure:4023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4023   rm -rf conftest*
4024   
4025 echo "$ac_t""size_t" 1>&6
4026 { test "$extra_verbose" = "yes" && cat << \EOF
4027     Defining socklen_t = size_t
4028 EOF
4029 cat >> confdefs.h <<\EOF
4030 #define socklen_t size_t
4031 EOF
4032 }
4033
4034 else
4035   echo "configure: failed program was:" >&5
4036   cat conftest.$ac_ext >&5
4037   rm -rf conftest*
4038   
4039 echo "$ac_t""int" 1>&6
4040 { test "$extra_verbose" = "yes" && cat << \EOF
4041     Defining socklen_t = int
4042 EOF
4043 cat >> confdefs.h <<\EOF
4044 #define socklen_t int
4045 EOF
4046 }
4047
4048 fi
4049 rm -f conftest*
4050 fi
4051 rm -f conftest*
4052
4053 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4054 echo "configure:4055: checking for struct timeval" >&5
4055 cat > conftest.$ac_ext <<EOF
4056 #line 4057 "configure"
4057 #include "confdefs.h"
4058 #ifdef TIME_WITH_SYS_TIME
4059 #include <sys/time.h>
4060 #include <time.h>
4061 #else
4062 #ifdef HAVE_SYS_TIME_H
4063 #include <sys/time.h>
4064 #else
4065 #include <time.h>
4066 #endif
4067 #endif
4068 int main() {
4069 static struct timeval x; x.tv_sec = x.tv_usec;
4070 ; return 0; }
4071 EOF
4072 if { (eval echo configure:4073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4073   rm -rf conftest*
4074   echo "$ac_t""yes" 1>&6
4075   HAVE_TIMEVAL=yes
4076   { test "$extra_verbose" = "yes" && cat << \EOF
4077     Defining HAVE_TIMEVAL
4078 EOF
4079 cat >> confdefs.h <<\EOF
4080 #define HAVE_TIMEVAL 1
4081 EOF
4082 }
4083
4084 else
4085   echo "configure: failed program was:" >&5
4086   cat conftest.$ac_ext >&5
4087   rm -rf conftest*
4088   echo "$ac_t""no" 1>&6
4089    HAVE_TIMEVAL=no
4090 fi
4091 rm -f conftest*
4092
4093 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4094 echo "configure:4095: checking whether struct tm is in sys/time.h or time.h" >&5
4095
4096 cat > conftest.$ac_ext <<EOF
4097 #line 4098 "configure"
4098 #include "confdefs.h"
4099 #include <sys/types.h>
4100 #include <time.h>
4101 int main() {
4102 struct tm *tp; tp->tm_sec;
4103 ; return 0; }
4104 EOF
4105 if { (eval echo configure:4106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4106   rm -rf conftest*
4107   ac_cv_struct_tm=time.h
4108 else
4109   echo "configure: failed program was:" >&5
4110   cat conftest.$ac_ext >&5
4111   rm -rf conftest*
4112   ac_cv_struct_tm=sys/time.h
4113 fi
4114 rm -f conftest*
4115
4116 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4117 if test $ac_cv_struct_tm = sys/time.h; then
4118   { test "$extra_verbose" = "yes" && cat << \EOF
4119     Defining TM_IN_SYS_TIME
4120 EOF
4121 cat >> confdefs.h <<\EOF
4122 #define TM_IN_SYS_TIME 1
4123 EOF
4124 }
4125
4126 fi
4127
4128 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4129 echo "configure:4130: checking for tm_zone in struct tm" >&5
4130
4131 cat > conftest.$ac_ext <<EOF
4132 #line 4133 "configure"
4133 #include "confdefs.h"
4134 #include <sys/types.h>
4135 #include <$ac_cv_struct_tm>
4136 int main() {
4137 struct tm tm; tm.tm_zone;
4138 ; return 0; }
4139 EOF
4140 if { (eval echo configure:4141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4141   rm -rf conftest*
4142   ac_cv_struct_tm_zone=yes
4143 else
4144   echo "configure: failed program was:" >&5
4145   cat conftest.$ac_ext >&5
4146   rm -rf conftest*
4147   ac_cv_struct_tm_zone=no
4148 fi
4149 rm -f conftest*
4150
4151 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4152 if test "$ac_cv_struct_tm_zone" = yes; then
4153   { test "$extra_verbose" = "yes" && cat << \EOF
4154     Defining HAVE_TM_ZONE
4155 EOF
4156 cat >> confdefs.h <<\EOF
4157 #define HAVE_TM_ZONE 1
4158 EOF
4159 }
4160
4161 else
4162   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4163 echo "configure:4164: checking for tzname" >&5
4164
4165 cat > conftest.$ac_ext <<EOF
4166 #line 4167 "configure"
4167 #include "confdefs.h"
4168 #include <time.h>
4169 #ifndef tzname /* For SGI.  */
4170 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4171 #endif
4172 int main() {
4173 atoi(*tzname);
4174 ; return 0; }
4175 EOF
4176 if { (eval echo configure:4177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4177   rm -rf conftest*
4178   ac_cv_var_tzname=yes
4179 else
4180   echo "configure: failed program was:" >&5
4181   cat conftest.$ac_ext >&5
4182   rm -rf conftest*
4183   ac_cv_var_tzname=no
4184 fi
4185 rm -f conftest*
4186
4187 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4188   if test $ac_cv_var_tzname = yes; then
4189     { test "$extra_verbose" = "yes" && cat << \EOF
4190     Defining HAVE_TZNAME
4191 EOF
4192 cat >> confdefs.h <<\EOF
4193 #define HAVE_TZNAME 1
4194 EOF
4195 }
4196
4197   fi
4198 fi
4199
4200
4201 echo $ac_n "checking for working const""... $ac_c" 1>&6
4202 echo "configure:4203: checking for working const" >&5
4203
4204 cat > conftest.$ac_ext <<EOF
4205 #line 4206 "configure"
4206 #include "confdefs.h"
4207
4208 int main() {
4209
4210 /* Ultrix mips cc rejects this.  */
4211 typedef int charset[2]; const charset x;
4212 /* SunOS 4.1.1 cc rejects this.  */
4213 char const *const *ccp;
4214 char **p;
4215 /* NEC SVR4.0.2 mips cc rejects this.  */
4216 struct point {int x, y;};
4217 static struct point const zero = {0,0};
4218 /* AIX XL C 1.02.0.0 rejects this.
4219    It does not let you subtract one const X* pointer from another in an arm
4220    of an if-expression whose if-part is not a constant expression */
4221 const char *g = "string";
4222 ccp = &g + (g ? g-g : 0);
4223 /* HPUX 7.0 cc rejects these. */
4224 ++ccp;
4225 p = (char**) ccp;
4226 ccp = (char const *const *) p;
4227 { /* SCO 3.2v4 cc rejects this.  */
4228   char *t;
4229   char const *s = 0 ? (char *) 0 : (char const *) 0;
4230
4231   *t++ = 0;
4232 }
4233 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4234   int x[] = {25, 17};
4235   const int *foo = &x[0];
4236   ++foo;
4237 }
4238 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4239   typedef const int *iptr;
4240   iptr p = 0;
4241   ++p;
4242 }
4243 { /* AIX XL C 1.02.0.0 rejects this saying
4244      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4245   struct s { int j; const int *ap[3]; };
4246   struct s *b; b->j = 5;
4247 }
4248 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4249   const int foo = 10;
4250 }
4251
4252 ; return 0; }
4253 EOF
4254 if { (eval echo configure:4255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4255   rm -rf conftest*
4256   ac_cv_c_const=yes
4257 else
4258   echo "configure: failed program was:" >&5
4259   cat conftest.$ac_ext >&5
4260   rm -rf conftest*
4261   ac_cv_c_const=no
4262 fi
4263 rm -f conftest*
4264
4265 echo "$ac_t""$ac_cv_c_const" 1>&6
4266 if test $ac_cv_c_const = no; then
4267   { test "$extra_verbose" = "yes" && cat << \EOF
4268     Defining const = 
4269 EOF
4270 cat >> confdefs.h <<\EOF
4271 #define const 
4272 EOF
4273 }
4274
4275 fi
4276
4277
4278 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4279 echo "configure:4280: checking whether ${MAKE-make} sets \${MAKE}" >&5
4280 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4281
4282 cat > conftestmake <<\EOF
4283 all:
4284         @echo 'ac_maketemp="${MAKE}"'
4285 EOF
4286 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4287 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4288 if test -n "$ac_maketemp"; then
4289   eval ac_cv_prog_make_${ac_make}_set=yes
4290 else
4291   eval ac_cv_prog_make_${ac_make}_set=no
4292 fi
4293 rm -f conftestmake
4294 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4295   echo "$ac_t""yes" 1>&6
4296   SET_MAKE=
4297 else
4298   echo "$ac_t""no" 1>&6
4299   SET_MAKE="MAKE=${MAKE-make}"
4300 fi
4301
4302
4303 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4304 echo "configure:4305: checking whether byte ordering is bigendian" >&5
4305
4306 ac_cv_c_bigendian=unknown
4307 # See if sys/param.h defines the BYTE_ORDER macro.
4308 cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311 #include <sys/types.h>
4312 #include <sys/param.h>
4313 int main() {
4314
4315 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4316  bogus endian macros
4317 #endif
4318 ; return 0; }
4319 EOF
4320 if { (eval echo configure:4321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4321   rm -rf conftest*
4322   # It does; now see whether it defined to BIG_ENDIAN or not.
4323 cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 #include <sys/types.h>
4327 #include <sys/param.h>
4328 int main() {
4329
4330 #if BYTE_ORDER != BIG_ENDIAN
4331  not big endian
4332 #endif
4333 ; return 0; }
4334 EOF
4335 if { (eval echo configure:4336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4336   rm -rf conftest*
4337   ac_cv_c_bigendian=yes
4338 else
4339   echo "configure: failed program was:" >&5
4340   cat conftest.$ac_ext >&5
4341   rm -rf conftest*
4342   ac_cv_c_bigendian=no
4343 fi
4344 rm -f conftest*
4345 else
4346   echo "configure: failed program was:" >&5
4347   cat conftest.$ac_ext >&5
4348 fi
4349 rm -f conftest*
4350 if test $ac_cv_c_bigendian = unknown; then
4351 cat > conftest.$ac_ext <<EOF
4352 #line 4353 "configure"
4353 #include "confdefs.h"
4354 main () {
4355   /* Are we little or big endian?  From Harbison&Steele.  */
4356   union
4357   {
4358     long l;
4359     char c[sizeof (long)];
4360   } u;
4361   u.l = 1;
4362   exit (u.c[sizeof (long) - 1] == 1);
4363 }
4364 EOF
4365 if { (eval echo configure:4366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4366 then
4367   ac_cv_c_bigendian=no
4368 else
4369   conftest_rc="$?"
4370   echo "configure: failed program was:" >&5
4371   cat conftest.$ac_ext >&5
4372   rm -fr conftest*
4373   ac_cv_c_bigendian=yes
4374 fi
4375 rm -fr conftest*
4376 fi
4377
4378 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4379 if test $ac_cv_c_bigendian = yes; then
4380   { test "$extra_verbose" = "yes" && cat << \EOF
4381     Defining WORDS_BIGENDIAN
4382 EOF
4383 cat >> confdefs.h <<\EOF
4384 #define WORDS_BIGENDIAN 1
4385 EOF
4386 }
4387
4388 fi
4389
4390
4391 echo $ac_n "checking size of short""... $ac_c" 1>&6
4392 echo "configure:4393: checking size of short" >&5
4393
4394 cat > conftest.$ac_ext <<EOF
4395 #line 4396 "configure"
4396 #include "confdefs.h"
4397 #include <stdio.h>
4398 main()
4399 {
4400   FILE *f=fopen("conftestval", "w");
4401   if (!f) exit(1);
4402   fprintf(f, "%d\n", sizeof(short));
4403   exit(0);
4404 }
4405 EOF
4406 if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4407 then
4408   ac_cv_sizeof_short=`cat conftestval`
4409 else
4410   conftest_rc="$?"
4411   echo "configure: failed program was:" >&5
4412   cat conftest.$ac_ext >&5
4413   rm -fr conftest*
4414   ac_cv_sizeof_short=0
4415 fi
4416 rm -fr conftest*
4417 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4418 { test "$extra_verbose" = "yes" && cat << EOF
4419     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4420 EOF
4421 cat >> confdefs.h <<EOF
4422 #define SIZEOF_SHORT $ac_cv_sizeof_short
4423 EOF
4424 }
4425
4426
4427 if test "$ac_cv_sizeof_short" = 0; then
4428   echo ""
4429   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4430   echo "*** PANIC *** Please examine config.log for compilation errors."
4431   exit 1
4432 fi
4433 echo $ac_n "checking size of int""... $ac_c" 1>&6
4434 echo "configure:4435: checking size of int" >&5
4435
4436 cat > conftest.$ac_ext <<EOF
4437 #line 4438 "configure"
4438 #include "confdefs.h"
4439 #include <stdio.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 main()
4477 {
4478   FILE *f=fopen("conftestval", "w");
4479   if (!f) exit(1);
4480   fprintf(f, "%d\n", sizeof(long));
4481   exit(0);
4482 }
4483 EOF
4484 if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4485 then
4486   ac_cv_sizeof_long=`cat conftestval`
4487 else
4488   conftest_rc="$?"
4489   echo "configure: failed program was:" >&5
4490   cat conftest.$ac_ext >&5
4491   rm -fr conftest*
4492   ac_cv_sizeof_long=0
4493 fi
4494 rm -fr conftest*
4495 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4496 { test "$extra_verbose" = "yes" && cat << EOF
4497     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4498 EOF
4499 cat >> confdefs.h <<EOF
4500 #define SIZEOF_LONG $ac_cv_sizeof_long
4501 EOF
4502 }
4503
4504
4505 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4506 echo "configure:4507: checking size of long long" >&5
4507
4508 cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511 #include <stdio.h>
4512 main()
4513 {
4514   FILE *f=fopen("conftestval", "w");
4515   if (!f) exit(1);
4516   fprintf(f, "%d\n", sizeof(long long));
4517   exit(0);
4518 }
4519 EOF
4520 if { (eval echo configure:4521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4521 then
4522   ac_cv_sizeof_long_long=`cat conftestval`
4523 else
4524   conftest_rc="$?"
4525   echo "configure: failed program was:" >&5
4526   cat conftest.$ac_ext >&5
4527   rm -fr conftest*
4528   ac_cv_sizeof_long_long=0
4529 fi
4530 rm -fr conftest*
4531 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4532 { test "$extra_verbose" = "yes" && cat << EOF
4533     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4534 EOF
4535 cat >> confdefs.h <<EOF
4536 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4537 EOF
4538 }
4539
4540
4541 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4542 echo "configure:4543: checking size of void *" >&5
4543
4544 cat > conftest.$ac_ext <<EOF
4545 #line 4546 "configure"
4546 #include "confdefs.h"
4547 #include <stdio.h>
4548 main()
4549 {
4550   FILE *f=fopen("conftestval", "w");
4551   if (!f) exit(1);
4552   fprintf(f, "%d\n", sizeof(void *));
4553   exit(0);
4554 }
4555 EOF
4556 if { (eval echo configure:4557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4557 then
4558   ac_cv_sizeof_void_p=`cat conftestval`
4559 else
4560   conftest_rc="$?"
4561   echo "configure: failed program was:" >&5
4562   cat conftest.$ac_ext >&5
4563   rm -fr conftest*
4564   ac_cv_sizeof_void_p=0
4565 fi
4566 rm -fr conftest*
4567 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4568 { test "$extra_verbose" = "yes" && cat << EOF
4569     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4570 EOF
4571 cat >> confdefs.h <<EOF
4572 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4573 EOF
4574 }
4575
4576
4577
4578 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4579 echo "configure:4580: checking for long file names" >&5
4580
4581 ac_cv_sys_long_file_names=yes
4582 # Test for long file names in all the places we know might matter:
4583 #      .                the current directory, where building will happen
4584 #      $prefix/lib      where we will be installing things
4585 #      $exec_prefix/lib likewise
4586 # eval it to expand exec_prefix.
4587 #      $TMPDIR          if set, where it might want to write temporary files
4588 # if $TMPDIR is not set:
4589 #      /tmp             where it might want to write temporary files
4590 #      /var/tmp         likewise
4591 #      /usr/tmp         likewise
4592 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4593   ac_tmpdirs="$TMPDIR"
4594 else
4595   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4596 fi
4597 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4598   test -d $ac_dir || continue
4599   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4600   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4601   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4602   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4603   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4604     ac_cv_sys_long_file_names=no
4605     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4606     break
4607   fi
4608   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4609 done
4610
4611 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4612 if test $ac_cv_sys_long_file_names = yes; then
4613   { test "$extra_verbose" = "yes" && cat << \EOF
4614     Defining HAVE_LONG_FILE_NAMES
4615 EOF
4616 cat >> confdefs.h <<\EOF
4617 #define HAVE_LONG_FILE_NAMES 1
4618 EOF
4619 }
4620
4621 fi
4622
4623
4624 echo $ac_n "checking for sin""... $ac_c" 1>&6
4625 echo "configure:4626: checking for sin" >&5
4626
4627 cat > conftest.$ac_ext <<EOF
4628 #line 4629 "configure"
4629 #include "confdefs.h"
4630 /* System header to define __stub macros and hopefully few prototypes,
4631     which can conflict with char sin(); below.  */
4632 #include <assert.h>
4633 /* Override any gcc2 internal prototype to avoid an error.  */
4634 /* We use char because int might match the return type of a gcc2
4635     builtin and then its argument prototype would still apply.  */
4636 char sin();
4637
4638 int main() {
4639
4640 /* The GNU C library defines this for functions which it implements
4641     to always fail with ENOSYS.  Some functions are actually named
4642     something starting with __ and the normal name is an alias.  */
4643 #if defined (__stub_sin) || defined (__stub___sin)
4644 choke me
4645 #else
4646 sin();
4647 #endif
4648
4649 ; return 0; }
4650 EOF
4651 if { (eval echo configure:4652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4652   rm -rf conftest*
4653   eval "ac_cv_func_sin=yes"
4654 else
4655   echo "configure: failed program was:" >&5
4656   cat conftest.$ac_ext >&5
4657   rm -rf conftest*
4658   eval "ac_cv_func_sin=no"
4659 fi
4660 rm -f conftest*
4661
4662 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4663   echo "$ac_t""yes" 1>&6
4664   :
4665 else
4666   echo "$ac_t""no" 1>&6
4667
4668 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4669 echo "configure:4670: checking for sin in -lm" >&5
4670 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4671
4672 xe_check_libs=" -lm "
4673 cat > conftest.$ac_ext <<EOF
4674 #line 4675 "configure"
4675 #include "confdefs.h"
4676 /* Override any gcc2 internal prototype to avoid an error.  */
4677 /* We use char because int might match the return type of a gcc2
4678     builtin and then its argument prototype would still apply.  */
4679 char sin();
4680
4681 int main() {
4682 sin()
4683 ; return 0; }
4684 EOF
4685 if { (eval echo configure:4686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4686   rm -rf conftest*
4687   eval "ac_cv_lib_$ac_lib_var=yes"
4688 else
4689   echo "configure: failed program was:" >&5
4690   cat conftest.$ac_ext >&5
4691   rm -rf conftest*
4692   eval "ac_cv_lib_$ac_lib_var=no"
4693 fi
4694 rm -f conftest*
4695 xe_check_libs=""
4696
4697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4698   echo "$ac_t""yes" 1>&6
4699     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4700     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4701   { test "$extra_verbose" = "yes" && cat << EOF
4702     Defining $ac_tr_lib
4703 EOF
4704 cat >> confdefs.h <<EOF
4705 #define $ac_tr_lib 1
4706 EOF
4707 }
4708
4709   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4710
4711 else
4712   echo "$ac_t""no" 1>&6
4713 fi
4714
4715
4716 fi
4717
4718
4719 { test "$extra_verbose" = "yes" && cat << \EOF
4720     Defining LISP_FLOAT_TYPE
4721 EOF
4722 cat >> confdefs.h <<\EOF
4723 #define LISP_FLOAT_TYPE 1
4724 EOF
4725 }
4726
4727
4728 cat > conftest.$ac_ext <<EOF
4729 #line 4730 "configure"
4730 #include "confdefs.h"
4731 #include <math.h>
4732 int main() {
4733 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4734 ; return 0; }
4735 EOF
4736 if { (eval echo configure:4737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4737   rm -rf conftest*
4738   { test "$extra_verbose" = "yes" && cat << \EOF
4739     Defining HAVE_INVERSE_HYPERBOLIC
4740 EOF
4741 cat >> confdefs.h <<\EOF
4742 #define HAVE_INVERSE_HYPERBOLIC 1
4743 EOF
4744 }
4745
4746 else
4747   echo "configure: failed program was:" >&5
4748   cat conftest.$ac_ext >&5
4749 fi
4750 rm -f conftest*
4751
4752 echo "checking type of mail spool file locking" 1>&6
4753 echo "configure:4754: checking type of mail spool file locking" >&5
4754 for ac_func in lockf flock
4755 do
4756 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4757 echo "configure:4758: checking for $ac_func" >&5
4758
4759 cat > conftest.$ac_ext <<EOF
4760 #line 4761 "configure"
4761 #include "confdefs.h"
4762 /* System header to define __stub macros and hopefully few prototypes,
4763     which can conflict with char $ac_func(); below.  */
4764 #include <assert.h>
4765 /* Override any gcc2 internal prototype to avoid an error.  */
4766 /* We use char because int might match the return type of a gcc2
4767     builtin and then its argument prototype would still apply.  */
4768 char $ac_func();
4769
4770 int main() {
4771
4772 /* The GNU C library defines this for functions which it implements
4773     to always fail with ENOSYS.  Some functions are actually named
4774     something starting with __ and the normal name is an alias.  */
4775 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4776 choke me
4777 #else
4778 $ac_func();
4779 #endif
4780
4781 ; return 0; }
4782 EOF
4783 if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4784   rm -rf conftest*
4785   eval "ac_cv_func_$ac_func=yes"
4786 else
4787   echo "configure: failed program was:" >&5
4788   cat conftest.$ac_ext >&5
4789   rm -rf conftest*
4790   eval "ac_cv_func_$ac_func=no"
4791 fi
4792 rm -f conftest*
4793
4794 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4795   echo "$ac_t""yes" 1>&6
4796     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4797   { test "$extra_verbose" = "yes" && cat << EOF
4798     Defining $ac_tr_func
4799 EOF
4800 cat >> confdefs.h <<EOF
4801 #define $ac_tr_func 1
4802 EOF
4803 }
4804  
4805 else
4806   echo "$ac_t""no" 1>&6
4807 fi
4808 done
4809
4810 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4811 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4812 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4813 if   test -z "$mail_locking"; then
4814   case "$opsys" in cygwin* | mingw*)
4815     mail_locking=pop ;;
4816   esac
4817 fi
4818
4819 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4820     Defining MAIL_LOCK_LOCKF
4821 EOF
4822 cat >> confdefs.h <<\EOF
4823 #define MAIL_LOCK_LOCKF 1
4824 EOF
4825 }
4826
4827 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4828     Defining MAIL_LOCK_FLOCK
4829 EOF
4830 cat >> confdefs.h <<\EOF
4831 #define MAIL_LOCK_FLOCK 1
4832 EOF
4833 }
4834
4835 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4836     Defining MAIL_LOCK_LOCKING
4837 EOF
4838 cat >> confdefs.h <<\EOF
4839 #define MAIL_LOCK_LOCKING 1
4840 EOF
4841 }
4842
4843 elif test "$mail_locking" = "pop"; then
4844   with_pop=yes
4845   mail_locking=
4846 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4847     Defining MAIL_LOCK_DOT
4848 EOF
4849 cat >> confdefs.h <<\EOF
4850 #define MAIL_LOCK_DOT 1
4851 EOF
4852 }
4853
4854 fi
4855 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4856   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4857 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4858   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4859 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4860   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4861
4862 case "$opsys" in decosf*)
4863   
4864 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4865 echo "configure:4866: checking for cma_open in -lpthreads" >&5
4866 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4867
4868 xe_check_libs=" -lpthreads "
4869 cat > conftest.$ac_ext <<EOF
4870 #line 4871 "configure"
4871 #include "confdefs.h"
4872 /* Override any gcc2 internal prototype to avoid an error.  */
4873 /* We use char because int might match the return type of a gcc2
4874     builtin and then its argument prototype would still apply.  */
4875 char cma_open();
4876
4877 int main() {
4878 cma_open()
4879 ; return 0; }
4880 EOF
4881 if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4882   rm -rf conftest*
4883   eval "ac_cv_lib_$ac_lib_var=yes"
4884 else
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887   rm -rf conftest*
4888   eval "ac_cv_lib_$ac_lib_var=no"
4889 fi
4890 rm -f conftest*
4891 xe_check_libs=""
4892
4893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4894   echo "$ac_t""yes" 1>&6
4895     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4896     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4897   { test "$extra_verbose" = "yes" && cat << EOF
4898     Defining $ac_tr_lib
4899 EOF
4900 cat >> confdefs.h <<EOF
4901 #define $ac_tr_lib 1
4902 EOF
4903 }
4904
4905   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4906
4907 else
4908   echo "$ac_t""no" 1>&6
4909 fi
4910
4911
4912   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4913     c_switch_site="$c_switch_site -threads" ;;
4914 esac
4915
4916 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4917 echo "configure:4918: checking whether the -xildoff compiler flag is required" >&5
4918 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4919   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4920     then echo "$ac_t""no" 1>&6;
4921     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
4922   fi
4923   else echo "$ac_t""no" 1>&6
4924 fi
4925
4926 if test "$opsys" = "sol2"; then
4927   if test "$os_release" -ge 56; then
4928     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4929 echo "configure:4930: checking for \"-z ignore\" linker flag" >&5
4930     case "`ld -h 2>&1`" in
4931       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4932         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4933       *) echo "$ac_t""no" 1>&6 ;;
4934     esac
4935   fi
4936 fi
4937
4938
4939 echo "checking "for specified window system"" 1>&6
4940 echo "configure:4941: checking "for specified window system"" >&5
4941
4942 if test "$with_x11" != "no"; then
4943     test "$x_includes $x_libraries" != "NONE NONE" && \
4944    window_system=x11 with_x11=yes
4945
4946         
4947       if test "$x_includes $x_libraries" = "NONE NONE" \
4948     -a -n "$OPENWINHOME" \
4949     -a "$OPENWINHOME" != "/usr/openwin" \
4950     -a -d "$OPENWINHOME"; then
4951       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4952       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4953       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4954   fi
4955
4956   if test "$x_includes" = "NONE"; then
4957                     for dir in "/usr/X11" "/usr/X11R6"; do
4958       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4959     done
4960   fi
4961
4962   if test "$x_libraries" = "NONE"; then
4963     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4964       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4965     done
4966   fi
4967
4968   # If we find X, set shell vars x_includes and x_libraries to the
4969 # paths, otherwise set no_x=yes.
4970 # Uses ac_ vars as temps to allow command line to override cache and checks.
4971 # --without-x overrides everything else, but does not touch the cache.
4972 echo $ac_n "checking for X""... $ac_c" 1>&6
4973 echo "configure:4974: checking for X" >&5
4974
4975 # Check whether --with-x or --without-x was given.
4976 if test "${with_x+set}" = set; then
4977   withval="$with_x"
4978   :
4979 fi
4980
4981 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4982 if test "x$with_x" = xno; then
4983   # The user explicitly disabled X.
4984   have_x=disabled
4985 else
4986   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4987     # Both variables are already set.
4988     have_x=yes
4989   else
4990
4991 # One or both of the vars are not set, and there is no cached value.
4992 ac_x_includes=NO ac_x_libraries=NO
4993 rm -fr conftestdir
4994 if mkdir conftestdir; then
4995   cd conftestdir
4996   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4997   cat > Imakefile <<'EOF'
4998 acfindx:
4999         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5000 EOF
5001   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5002     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5003     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5004     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5005     for ac_extension in a so sl; do
5006       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5007         test -f $ac_im_libdir/libX11.$ac_extension; then
5008         ac_im_usrlibdir=$ac_im_libdir; break
5009       fi
5010     done
5011     # Screen out bogus values from the imake configuration.  They are
5012     # bogus both because they are the default anyway, and because
5013     # using them would break gcc on systems where it needs fixed includes.
5014     case "$ac_im_incroot" in
5015         /usr/include) ;;
5016         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5017     esac
5018     case "$ac_im_usrlibdir" in
5019         /usr/lib | /lib) ;;
5020         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5021     esac
5022   fi
5023   cd ..
5024   rm -fr conftestdir
5025 fi
5026
5027 if test "$ac_x_includes" = NO; then
5028   # Guess where to find include files, by looking for this one X11 .h file.
5029   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5030
5031   # First, try using that file with no special directory specified.
5032 cat > conftest.$ac_ext <<EOF
5033 #line 5034 "configure"
5034 #include "confdefs.h"
5035 #include <$x_direct_test_include>
5036 EOF
5037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5038 { (eval echo configure:5039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5040 if test -z "$ac_err"; then
5041   rm -rf conftest*
5042   # We can compile using X headers with no special include directory.
5043 ac_x_includes=
5044 else
5045   echo "$ac_err" >&5
5046   echo "configure: failed program was:" >&5
5047   cat conftest.$ac_ext >&5
5048   rm -rf conftest*
5049   # Look for the header file in a standard set of common directories.
5050 # Check X11 before X11Rn because it is often a symlink to the current release.
5051   for ac_dir in               \
5052     /usr/X11/include          \
5053     /usr/X11R6/include        \
5054     /usr/X11R5/include        \
5055     /usr/X11R4/include        \
5056                               \
5057     /usr/include/X11          \
5058     /usr/include/X11R6        \
5059     /usr/include/X11R5        \
5060     /usr/include/X11R4        \
5061                               \
5062     /usr/local/X11/include    \
5063     /usr/local/X11R6/include  \
5064     /usr/local/X11R5/include  \
5065     /usr/local/X11R4/include  \
5066                               \
5067     /usr/local/include/X11    \
5068     /usr/local/include/X11R6  \
5069     /usr/local/include/X11R5  \
5070     /usr/local/include/X11R4  \
5071                               \
5072     /usr/X386/include         \
5073     /usr/x386/include         \
5074     /usr/XFree86/include/X11  \
5075                               \
5076     /usr/include              \
5077     /usr/local/include        \
5078     /usr/unsupported/include  \
5079     /usr/athena/include       \
5080     /usr/local/x11r5/include  \
5081     /usr/lpp/Xamples/include  \
5082                               \
5083     /usr/openwin/include      \
5084     /usr/openwin/share/include \
5085     ; \
5086   do
5087     if test -r "$ac_dir/$x_direct_test_include"; then
5088       ac_x_includes=$ac_dir
5089       break
5090     fi
5091   done
5092 fi
5093 rm -f conftest*
5094 fi # $ac_x_includes = NO
5095
5096 if test "$ac_x_libraries" = NO; then
5097   # Check for the libraries.
5098
5099   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5100   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5101
5102   # See if we find them without any special options.
5103   # Don't add to $LIBS permanently.
5104   ac_save_LIBS="$LIBS"
5105   LIBS="-l$x_direct_test_library $LIBS"
5106 cat > conftest.$ac_ext <<EOF
5107 #line 5108 "configure"
5108 #include "confdefs.h"
5109
5110 int main() {
5111 ${x_direct_test_function}()
5112 ; return 0; }
5113 EOF
5114 if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5115   rm -rf conftest*
5116   LIBS="$ac_save_LIBS"
5117 # We can link X programs with no special library path.
5118 ac_x_libraries=
5119 else
5120   echo "configure: failed program was:" >&5
5121   cat conftest.$ac_ext >&5
5122   rm -rf conftest*
5123   LIBS="$ac_save_LIBS"
5124 # First see if replacing the include by lib works.
5125 # Check X11 before X11Rn because it is often a symlink to the current release.
5126 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5127     /usr/X11/lib          \
5128     /usr/X11R6/lib        \
5129     /usr/X11R5/lib        \
5130     /usr/X11R4/lib        \
5131                           \
5132     /usr/lib/X11          \
5133     /usr/lib/X11R6        \
5134     /usr/lib/X11R5        \
5135     /usr/lib/X11R4        \
5136                           \
5137     /usr/local/X11/lib    \
5138     /usr/local/X11R6/lib  \
5139     /usr/local/X11R5/lib  \
5140     /usr/local/X11R4/lib  \
5141                           \
5142     /usr/local/lib/X11    \
5143     /usr/local/lib/X11R6  \
5144     /usr/local/lib/X11R5  \
5145     /usr/local/lib/X11R4  \
5146                           \
5147     /usr/X386/lib         \
5148     /usr/x386/lib         \
5149     /usr/XFree86/lib/X11  \
5150                           \
5151     /usr/lib              \
5152     /usr/local/lib        \
5153     /usr/unsupported/lib  \
5154     /usr/athena/lib       \
5155     /usr/local/x11r5/lib  \
5156     /usr/lpp/Xamples/lib  \
5157     /lib/usr/lib/X11      \
5158                           \
5159     /usr/openwin/lib      \
5160     /usr/openwin/share/lib \
5161     ; \
5162 do
5163   for ac_extension in a so sl; do
5164     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5165       ac_x_libraries=$ac_dir
5166       break 2
5167     fi
5168   done
5169 done
5170 fi
5171 rm -f conftest*
5172 fi # $ac_x_libraries = NO
5173
5174 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5175   # Didn't find X anywhere.  Cache the known absence of X.
5176   ac_cv_have_x="have_x=no"
5177 else
5178   # Record where we found X for the cache.
5179   ac_cv_have_x="have_x=yes \
5180                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5181 fi
5182   fi
5183   eval "$ac_cv_have_x"
5184 fi # $with_x != no
5185
5186 if test "$have_x" != yes; then
5187   echo "$ac_t""$have_x" 1>&6
5188   no_x=yes
5189 else
5190   # If each of the values was on the command line, it overrides each guess.
5191   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5192   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5193   # Update the cache value to reflect the command line values.
5194   ac_cv_have_x="have_x=yes \
5195                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5196   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5197 fi
5198
5199 if test "$no_x" = yes; then
5200   # Not all programs may use this symbol, but it does not hurt to define it.
5201   { test "$extra_verbose" = "yes" && cat << \EOF
5202     Defining X_DISPLAY_MISSING
5203 EOF
5204 cat >> confdefs.h <<\EOF
5205 #define X_DISPLAY_MISSING 1
5206 EOF
5207 }
5208
5209   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5210 else
5211   if test -n "$x_includes"; then
5212     X_CFLAGS="$X_CFLAGS -I$x_includes"
5213   fi
5214
5215   # It would also be nice to do this for all -L options, not just this one.
5216   if test -n "$x_libraries"; then
5217     X_LIBS="$X_LIBS -L$x_libraries"
5218     # For Solaris; some versions of Sun CC require a space after -R and
5219     # others require no space.  Words are not sufficient . . . .
5220     case "`(uname -sr) 2>/dev/null`" in
5221     "SunOS 5"*)
5222       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5223 echo "configure:5224: checking whether -R must be followed by a space" >&5
5224       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5225       cat > conftest.$ac_ext <<EOF
5226 #line 5227 "configure"
5227 #include "confdefs.h"
5228
5229 int main() {
5230
5231 ; return 0; }
5232 EOF
5233 if { (eval echo configure:5234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5234   rm -rf conftest*
5235   ac_R_nospace=yes
5236 else
5237   echo "configure: failed program was:" >&5
5238   cat conftest.$ac_ext >&5
5239   rm -rf conftest*
5240   ac_R_nospace=no
5241 fi
5242 rm -f conftest*
5243       if test $ac_R_nospace = yes; then
5244         echo "$ac_t""no" 1>&6
5245         X_LIBS="$X_LIBS -R$x_libraries"
5246       else
5247         LIBS="$ac_xsave_LIBS -R $x_libraries"
5248         cat > conftest.$ac_ext <<EOF
5249 #line 5250 "configure"
5250 #include "confdefs.h"
5251
5252 int main() {
5253
5254 ; return 0; }
5255 EOF
5256 if { (eval echo configure:5257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5257   rm -rf conftest*
5258   ac_R_space=yes
5259 else
5260   echo "configure: failed program was:" >&5
5261   cat conftest.$ac_ext >&5
5262   rm -rf conftest*
5263   ac_R_space=no
5264 fi
5265 rm -f conftest*
5266         if test $ac_R_space = yes; then
5267           echo "$ac_t""yes" 1>&6
5268           X_LIBS="$X_LIBS -R $x_libraries"
5269         else
5270           echo "$ac_t""neither works" 1>&6
5271         fi
5272       fi
5273       LIBS="$ac_xsave_LIBS"
5274     esac
5275   fi
5276
5277   # Check for system-dependent libraries X programs must link with.
5278   # Do this before checking for the system-independent R6 libraries
5279   # (-lICE), since we may need -lsocket or whatever for X linking.
5280
5281   if test "$ISC" = yes; then
5282     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5283   else
5284     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5285     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5286     # the Alpha needs dnet_stub (dnet does not exist).
5287     if test "$with_dnet" = "no" ; then
5288 ac_cv_lib_dnet_dnet_ntoa=no
5289 else
5290
5291 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5292 echo "configure:5293: checking for dnet_ntoa in -ldnet" >&5
5293 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5294
5295 xe_check_libs=" -ldnet "
5296 cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299 /* Override any gcc2 internal prototype to avoid an error.  */
5300 /* We use char because int might match the return type of a gcc2
5301     builtin and then its argument prototype would still apply.  */
5302 char dnet_ntoa();
5303
5304 int main() {
5305 dnet_ntoa()
5306 ; return 0; }
5307 EOF
5308 if { (eval echo configure:5309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5309   rm -rf conftest*
5310   eval "ac_cv_lib_$ac_lib_var=yes"
5311 else
5312   echo "configure: failed program was:" >&5
5313   cat conftest.$ac_ext >&5
5314   rm -rf conftest*
5315   eval "ac_cv_lib_$ac_lib_var=no"
5316 fi
5317 rm -f conftest*
5318 xe_check_libs=""
5319
5320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5321   echo "$ac_t""yes" 1>&6
5322   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5323 else
5324   echo "$ac_t""no" 1>&6
5325 fi
5326
5327 fi
5328
5329     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5330       
5331 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5332 echo "configure:5333: checking for dnet_ntoa in -ldnet_stub" >&5
5333 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5334
5335 xe_check_libs=" -ldnet_stub "
5336 cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339 /* Override any gcc2 internal prototype to avoid an error.  */
5340 /* We use char because int might match the return type of a gcc2
5341     builtin and then its argument prototype would still apply.  */
5342 char dnet_ntoa();
5343
5344 int main() {
5345 dnet_ntoa()
5346 ; return 0; }
5347 EOF
5348 if { (eval echo configure:5349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5349   rm -rf conftest*
5350   eval "ac_cv_lib_$ac_lib_var=yes"
5351 else
5352   echo "configure: failed program was:" >&5
5353   cat conftest.$ac_ext >&5
5354   rm -rf conftest*
5355   eval "ac_cv_lib_$ac_lib_var=no"
5356 fi
5357 rm -f conftest*
5358 xe_check_libs=""
5359
5360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5361   echo "$ac_t""yes" 1>&6
5362   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5363 else
5364   echo "$ac_t""no" 1>&6
5365 fi
5366
5367
5368     fi
5369
5370     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5371     # to get the SysV transport functions.
5372     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5373     # needs -lnsl.
5374     # The nsl library prevents programs from opening the X display
5375     # on Irix 5.2, according to dickey@clark.net.
5376     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5377 echo "configure:5378: checking for gethostbyname" >&5
5378
5379 cat > conftest.$ac_ext <<EOF
5380 #line 5381 "configure"
5381 #include "confdefs.h"
5382 /* System header to define __stub macros and hopefully few prototypes,
5383     which can conflict with char gethostbyname(); below.  */
5384 #include <assert.h>
5385 /* Override any gcc2 internal prototype to avoid an error.  */
5386 /* We use char because int might match the return type of a gcc2
5387     builtin and then its argument prototype would still apply.  */
5388 char gethostbyname();
5389
5390 int main() {
5391
5392 /* The GNU C library defines this for functions which it implements
5393     to always fail with ENOSYS.  Some functions are actually named
5394     something starting with __ and the normal name is an alias.  */
5395 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5396 choke me
5397 #else
5398 gethostbyname();
5399 #endif
5400
5401 ; return 0; }
5402 EOF
5403 if { (eval echo configure:5404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5404   rm -rf conftest*
5405   eval "ac_cv_func_gethostbyname=yes"
5406 else
5407   echo "configure: failed program was:" >&5
5408   cat conftest.$ac_ext >&5
5409   rm -rf conftest*
5410   eval "ac_cv_func_gethostbyname=no"
5411 fi
5412 rm -f conftest*
5413
5414 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5415   echo "$ac_t""yes" 1>&6
5416   :
5417 else
5418   echo "$ac_t""no" 1>&6
5419 fi
5420
5421     if test $ac_cv_func_gethostbyname = no; then
5422       
5423 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5424 echo "configure:5425: checking for gethostbyname in -lnsl" >&5
5425 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5426
5427 xe_check_libs=" -lnsl "
5428 cat > conftest.$ac_ext <<EOF
5429 #line 5430 "configure"
5430 #include "confdefs.h"
5431 /* Override any gcc2 internal prototype to avoid an error.  */
5432 /* We use char because int might match the return type of a gcc2
5433     builtin and then its argument prototype would still apply.  */
5434 char gethostbyname();
5435
5436 int main() {
5437 gethostbyname()
5438 ; return 0; }
5439 EOF
5440 if { (eval echo configure:5441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5441   rm -rf conftest*
5442   eval "ac_cv_lib_$ac_lib_var=yes"
5443 else
5444   echo "configure: failed program was:" >&5
5445   cat conftest.$ac_ext >&5
5446   rm -rf conftest*
5447   eval "ac_cv_lib_$ac_lib_var=no"
5448 fi
5449 rm -f conftest*
5450 xe_check_libs=""
5451
5452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5453   echo "$ac_t""yes" 1>&6
5454   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5455 else
5456   echo "$ac_t""no" 1>&6
5457 fi
5458
5459
5460     fi
5461
5462     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5463     # socket/setsockopt and other routines are undefined under SCO ODT
5464     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5465     # on later versions), says simon@lia.di.epfl.ch: it contains
5466     # gethostby* variants that don't use the nameserver (or something).
5467     # -lsocket must be given before -lnsl if both are needed.
5468     # We assume that if connect needs -lnsl, so does gethostbyname.
5469     echo $ac_n "checking for connect""... $ac_c" 1>&6
5470 echo "configure:5471: checking for connect" >&5
5471
5472 cat > conftest.$ac_ext <<EOF
5473 #line 5474 "configure"
5474 #include "confdefs.h"
5475 /* System header to define __stub macros and hopefully few prototypes,
5476     which can conflict with char connect(); below.  */
5477 #include <assert.h>
5478 /* Override any gcc2 internal prototype to avoid an error.  */
5479 /* We use char because int might match the return type of a gcc2
5480     builtin and then its argument prototype would still apply.  */
5481 char connect();
5482
5483 int main() {
5484
5485 /* The GNU C library defines this for functions which it implements
5486     to always fail with ENOSYS.  Some functions are actually named
5487     something starting with __ and the normal name is an alias.  */
5488 #if defined (__stub_connect) || defined (__stub___connect)
5489 choke me
5490 #else
5491 connect();
5492 #endif
5493
5494 ; return 0; }
5495 EOF
5496 if { (eval echo configure:5497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5497   rm -rf conftest*
5498   eval "ac_cv_func_connect=yes"
5499 else
5500   echo "configure: failed program was:" >&5
5501   cat conftest.$ac_ext >&5
5502   rm -rf conftest*
5503   eval "ac_cv_func_connect=no"
5504 fi
5505 rm -f conftest*
5506
5507 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5508   echo "$ac_t""yes" 1>&6
5509   :
5510 else
5511   echo "$ac_t""no" 1>&6
5512 fi
5513
5514     if test $ac_cv_func_connect = no; then
5515       
5516 xe_msg_checking="for connect in -lsocket"
5517 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5518 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5519 echo "configure:5520: checking "$xe_msg_checking"" >&5
5520 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5521
5522 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5523 cat > conftest.$ac_ext <<EOF
5524 #line 5525 "configure"
5525 #include "confdefs.h"
5526 /* Override any gcc2 internal prototype to avoid an error.  */
5527 /* We use char because int might match the return type of a gcc2
5528     builtin and then its argument prototype would still apply.  */
5529 char connect();
5530
5531 int main() {
5532 connect()
5533 ; return 0; }
5534 EOF
5535 if { (eval echo configure:5536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5536   rm -rf conftest*
5537   eval "ac_cv_lib_$ac_lib_var=yes"
5538 else
5539   echo "configure: failed program was:" >&5
5540   cat conftest.$ac_ext >&5
5541   rm -rf conftest*
5542   eval "ac_cv_lib_$ac_lib_var=no"
5543 fi
5544 rm -f conftest*
5545 xe_check_libs=""
5546
5547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5548   echo "$ac_t""yes" 1>&6
5549   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5550 else
5551   echo "$ac_t""no" 1>&6
5552 fi
5553
5554
5555     fi
5556
5557     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5558     echo $ac_n "checking for remove""... $ac_c" 1>&6
5559 echo "configure:5560: checking for remove" >&5
5560
5561 cat > conftest.$ac_ext <<EOF
5562 #line 5563 "configure"
5563 #include "confdefs.h"
5564 /* System header to define __stub macros and hopefully few prototypes,
5565     which can conflict with char remove(); below.  */
5566 #include <assert.h>
5567 /* Override any gcc2 internal prototype to avoid an error.  */
5568 /* We use char because int might match the return type of a gcc2
5569     builtin and then its argument prototype would still apply.  */
5570 char remove();
5571
5572 int main() {
5573
5574 /* The GNU C library defines this for functions which it implements
5575     to always fail with ENOSYS.  Some functions are actually named
5576     something starting with __ and the normal name is an alias.  */
5577 #if defined (__stub_remove) || defined (__stub___remove)
5578 choke me
5579 #else
5580 remove();
5581 #endif
5582
5583 ; return 0; }
5584 EOF
5585 if { (eval echo configure:5586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5586   rm -rf conftest*
5587   eval "ac_cv_func_remove=yes"
5588 else
5589   echo "configure: failed program was:" >&5
5590   cat conftest.$ac_ext >&5
5591   rm -rf conftest*
5592   eval "ac_cv_func_remove=no"
5593 fi
5594 rm -f conftest*
5595
5596 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5597   echo "$ac_t""yes" 1>&6
5598   :
5599 else
5600   echo "$ac_t""no" 1>&6
5601 fi
5602
5603     if test $ac_cv_func_remove = no; then
5604       
5605 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5606 echo "configure:5607: checking for remove in -lposix" >&5
5607 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5608
5609 xe_check_libs=" -lposix "
5610 cat > conftest.$ac_ext <<EOF
5611 #line 5612 "configure"
5612 #include "confdefs.h"
5613 /* Override any gcc2 internal prototype to avoid an error.  */
5614 /* We use char because int might match the return type of a gcc2
5615     builtin and then its argument prototype would still apply.  */
5616 char remove();
5617
5618 int main() {
5619 remove()
5620 ; return 0; }
5621 EOF
5622 if { (eval echo configure:5623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5623   rm -rf conftest*
5624   eval "ac_cv_lib_$ac_lib_var=yes"
5625 else
5626   echo "configure: failed program was:" >&5
5627   cat conftest.$ac_ext >&5
5628   rm -rf conftest*
5629   eval "ac_cv_lib_$ac_lib_var=no"
5630 fi
5631 rm -f conftest*
5632 xe_check_libs=""
5633
5634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5635   echo "$ac_t""yes" 1>&6
5636   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5637 else
5638   echo "$ac_t""no" 1>&6
5639 fi
5640
5641
5642     fi
5643
5644     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5645     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5646 echo "configure:5647: checking for shmat" >&5
5647
5648 cat > conftest.$ac_ext <<EOF
5649 #line 5650 "configure"
5650 #include "confdefs.h"
5651 /* System header to define __stub macros and hopefully few prototypes,
5652     which can conflict with char shmat(); below.  */
5653 #include <assert.h>
5654 /* Override any gcc2 internal prototype to avoid an error.  */
5655 /* We use char because int might match the return type of a gcc2
5656     builtin and then its argument prototype would still apply.  */
5657 char shmat();
5658
5659 int main() {
5660
5661 /* The GNU C library defines this for functions which it implements
5662     to always fail with ENOSYS.  Some functions are actually named
5663     something starting with __ and the normal name is an alias.  */
5664 #if defined (__stub_shmat) || defined (__stub___shmat)
5665 choke me
5666 #else
5667 shmat();
5668 #endif
5669
5670 ; return 0; }
5671 EOF
5672 if { (eval echo configure:5673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5673   rm -rf conftest*
5674   eval "ac_cv_func_shmat=yes"
5675 else
5676   echo "configure: failed program was:" >&5
5677   cat conftest.$ac_ext >&5
5678   rm -rf conftest*
5679   eval "ac_cv_func_shmat=no"
5680 fi
5681 rm -f conftest*
5682
5683 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5684   echo "$ac_t""yes" 1>&6
5685   :
5686 else
5687   echo "$ac_t""no" 1>&6
5688 fi
5689
5690     if test $ac_cv_func_shmat = no; then
5691       
5692 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5693 echo "configure:5694: checking for shmat in -lipc" >&5
5694 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5695
5696 xe_check_libs=" -lipc "
5697 cat > conftest.$ac_ext <<EOF
5698 #line 5699 "configure"
5699 #include "confdefs.h"
5700 /* Override any gcc2 internal prototype to avoid an error.  */
5701 /* We use char because int might match the return type of a gcc2
5702     builtin and then its argument prototype would still apply.  */
5703 char shmat();
5704
5705 int main() {
5706 shmat()
5707 ; return 0; }
5708 EOF
5709 if { (eval echo configure:5710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5710   rm -rf conftest*
5711   eval "ac_cv_lib_$ac_lib_var=yes"
5712 else
5713   echo "configure: failed program was:" >&5
5714   cat conftest.$ac_ext >&5
5715   rm -rf conftest*
5716   eval "ac_cv_lib_$ac_lib_var=no"
5717 fi
5718 rm -f conftest*
5719 xe_check_libs=""
5720
5721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5722   echo "$ac_t""yes" 1>&6
5723   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5724 else
5725   echo "$ac_t""no" 1>&6
5726 fi
5727
5728
5729     fi
5730   fi
5731
5732   # Check for libraries that X11R6 Xt/Xaw programs need.
5733   ac_save_LDFLAGS="$LDFLAGS"
5734   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5735   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5736   # check for ICE first), but we must link in the order -lSM -lICE or
5737   # we get undefined symbols.  So assume we have SM if we have ICE.
5738   # These have to be linked with before -lX11, unlike the other
5739   # libraries we check for below, so use a different variable.
5740   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5741   
5742 xe_msg_checking="for IceConnectionNumber in -lICE"
5743 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5744 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5745 echo "configure:5746: checking "$xe_msg_checking"" >&5
5746 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5747
5748 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5749 cat > conftest.$ac_ext <<EOF
5750 #line 5751 "configure"
5751 #include "confdefs.h"
5752 /* Override any gcc2 internal prototype to avoid an error.  */
5753 /* We use char because int might match the return type of a gcc2
5754     builtin and then its argument prototype would still apply.  */
5755 char IceConnectionNumber();
5756
5757 int main() {
5758 IceConnectionNumber()
5759 ; return 0; }
5760 EOF
5761 if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5762   rm -rf conftest*
5763   eval "ac_cv_lib_$ac_lib_var=yes"
5764 else
5765   echo "configure: failed program was:" >&5
5766   cat conftest.$ac_ext >&5
5767   rm -rf conftest*
5768   eval "ac_cv_lib_$ac_lib_var=no"
5769 fi
5770 rm -f conftest*
5771 xe_check_libs=""
5772
5773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5774   echo "$ac_t""yes" 1>&6
5775   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5776 else
5777   echo "$ac_t""no" 1>&6
5778 fi
5779
5780
5781   LDFLAGS="$ac_save_LDFLAGS"
5782
5783 fi
5784  # Autoconf claims to find X library and include dirs for us.
5785   if test "$no_x" = "yes"
5786   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5787   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5788   fi
5789 fi
5790
5791 case "$with_x11" in
5792   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5793   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5794 esac
5795
5796 if test "$with_x11" = "yes"; then
5797   { test "$extra_verbose" = "yes" && cat << \EOF
5798     Defining HAVE_X_WINDOWS
5799 EOF
5800 cat >> confdefs.h <<\EOF
5801 #define HAVE_X_WINDOWS 1
5802 EOF
5803 }
5804
5805   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5806   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5807
5808       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5809     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5810     if test -d "$lib_dir" -a -d "$inc_dir"; then
5811       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5812         x_libraries="$lib_dir $x_libraries"
5813         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5814       esac
5815       case "$x_includes" in "$inc_dir"* ) ;; *)
5816         x_includes="$inc_dir $x_includes"
5817         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5818       esac
5819       break;       fi
5820   done
5821
5822     for rel in "X11R6" "X11R5" "X11R4"; do
5823     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5824     if test -d "$lib_dir" -a -d "$inc_dir"; then
5825       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5826         x_libraries="$x_libraries $lib_dir"
5827         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5828       esac
5829       case "$x_includes" in "$inc_dir"* ) ;; *)
5830         x_includes="$x_includes $inc_dir"
5831         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5832       esac
5833       break;     fi
5834   done
5835
5836     case "$opsys" in
5837   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 ;;
5838   esac
5839
5840   ld_switch_x_site="$X_LIBS"
5841
5842   
5843 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5844     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5845   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5846   
5847         runpath="" runpath_dirs=""
5848   if test -n "$LD_RUN_PATH"; then
5849     runpath="$LD_RUN_PATH"
5850   elif test "$GCC" = "yes"; then
5851         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5852     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5853     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5854     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5855       case "$arg" in P,* | -L* | -R* )
5856         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5857           {
5858 xe_runpath_dir="$dir"
5859   test "$xe_runpath_dir" != "/lib"     -a \
5860         "$xe_runpath_dir" != "/usr/lib" -a \
5861         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5862   eval "$xe_add_unique_runpath_dir"
5863 }
5864         done ;;
5865       esac
5866     done
5867     ld_switch_run="$ld_switch_run_save"
5868     rm -f conftest*
5869   else
5870         for arg in $ld_switch_site $ld_switch_x_site; do
5871       case "$arg" in -L*) {
5872 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5873   test "$xe_runpath_dir" != "/lib"     -a \
5874         "$xe_runpath_dir" != "/usr/lib" -a \
5875         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5876   eval "$xe_add_unique_runpath_dir"
5877 };; esac
5878     done
5879         if test "$opsys $need_motif" = "sol2 yes"; then
5880       xe_runpath_dir="/opt/SUNWdt/lib";
5881       eval "$xe_add_unique_runpath_dir";
5882     fi
5883   fi 
5884   if test -n "$runpath"; then
5885     ld_switch_run="${dash_r}${runpath}"
5886     
5887 if test "$GCC" = "yes"; then
5888   set x $ld_switch_run; shift; ld_switch_run=""
5889   while test -n "$1"; do
5890     case $1 in
5891       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5892       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5893       -Xlinker* ) ;;
5894       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5895     esac
5896     shift
5897   done
5898 fi
5899     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5900   fi
5901 fi
5902
5903
5904   if test "$extra_verbose" = "yes"; then
5905     echo; echo "X11 compilation variables:"
5906     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5907     echo
5908   fi
5909
5910             bitmapdirs=
5911   if test "$x_includes" != NONE; then
5912     for i in $x_includes; do
5913       if test -d "$i/bitmaps"; then
5914         bitmapdirs="$i/bitmaps:$bitmapdirs"
5915       fi
5916       if test -d "$i/X11/bitmaps"; then
5917         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5918       fi
5919     done
5920     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5921   fi
5922   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5923     Defining BITMAPDIR = "$bitmapdirs"
5924 EOF
5925 cat >> confdefs.h <<EOF
5926 #define BITMAPDIR "$bitmapdirs"
5927 EOF
5928 }
5929
5930
5931     echo "checking for X defines extracted by xmkmf" 1>&6
5932 echo "configure:5933: checking for X defines extracted by xmkmf" >&5
5933   rm -fr conftestdir
5934   if mkdir conftestdir; then
5935     cd conftestdir
5936     cat > Imakefile <<'EOF'
5937 xetest:
5938         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5939 EOF
5940     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5941       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5942       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5943     fi
5944     cd ..
5945     rm -fr conftestdir
5946     for word in $xmkmf_defines; do
5947       case "$word" in -D* )
5948         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
5949         case "$word" in
5950           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
5951           *     ) val=1 ;;
5952         esac
5953         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
5954           if test "$val" = "1"
5955             then { test "$extra_verbose" = "yes" && cat << EOF
5956     Defining $sym
5957 EOF
5958 cat >> confdefs.h <<EOF
5959 #define $sym 1
5960 EOF
5961 }
5962
5963             else { test "$extra_verbose" = "yes" && cat << EOF
5964     Defining $sym = $val
5965 EOF
5966 cat >> confdefs.h <<EOF
5967 #define $sym $val
5968 EOF
5969 }
5970
5971           fi
5972         fi  ;;
5973       esac
5974     done
5975   fi
5976
5977     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5978 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5979 echo "configure:5980: checking for X11/Intrinsic.h" >&5
5980
5981 cat > conftest.$ac_ext <<EOF
5982 #line 5983 "configure"
5983 #include "confdefs.h"
5984 #include <X11/Intrinsic.h>
5985 EOF
5986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5987 { (eval echo configure:5988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5989 if test -z "$ac_err"; then
5990   rm -rf conftest*
5991   eval "ac_cv_header_$ac_safe=yes"
5992 else
5993   echo "$ac_err" >&5
5994   echo "configure: failed program was:" >&5
5995   cat conftest.$ac_ext >&5
5996   rm -rf conftest*
5997   eval "ac_cv_header_$ac_safe=no"
5998 fi
5999 rm -f conftest*
6000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6001   echo "$ac_t""yes" 1>&6
6002   :
6003 else
6004   echo "$ac_t""no" 1>&6
6005 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6006 fi
6007
6008
6009       
6010 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6011 echo "configure:6012: checking for XOpenDisplay in -lX11" >&5
6012 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6013
6014 xe_check_libs=" -lX11 "
6015 cat > conftest.$ac_ext <<EOF
6016 #line 6017 "configure"
6017 #include "confdefs.h"
6018 /* Override any gcc2 internal prototype to avoid an error.  */
6019 /* We use char because int might match the return type of a gcc2
6020     builtin and then its argument prototype would still apply.  */
6021 char XOpenDisplay();
6022
6023 int main() {
6024 XOpenDisplay()
6025 ; return 0; }
6026 EOF
6027 if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6028   rm -rf conftest*
6029   eval "ac_cv_lib_$ac_lib_var=yes"
6030 else
6031   echo "configure: failed program was:" >&5
6032   cat conftest.$ac_ext >&5
6033   rm -rf conftest*
6034   eval "ac_cv_lib_$ac_lib_var=no"
6035 fi
6036 rm -f conftest*
6037 xe_check_libs=""
6038
6039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6040   echo "$ac_t""yes" 1>&6
6041   have_lib_x11=yes
6042 else
6043   echo "$ac_t""no" 1>&6
6044 fi
6045
6046
6047   if test "$have_lib_x11" != "yes"; then
6048     
6049 xe_msg_checking="for XGetFontProperty in -lX11"
6050 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6051 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6052 echo "configure:6053: checking "$xe_msg_checking"" >&5
6053 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6054
6055 xe_check_libs=" -lX11 -b i486-linuxaout"
6056 cat > conftest.$ac_ext <<EOF
6057 #line 6058 "configure"
6058 #include "confdefs.h"
6059 /* Override any gcc2 internal prototype to avoid an error.  */
6060 /* We use char because int might match the return type of a gcc2
6061     builtin and then its argument prototype would still apply.  */
6062 char XGetFontProperty();
6063
6064 int main() {
6065 XGetFontProperty()
6066 ; return 0; }
6067 EOF
6068 if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6069   rm -rf conftest*
6070   eval "ac_cv_lib_$ac_lib_var=yes"
6071 else
6072   echo "configure: failed program was:" >&5
6073   cat conftest.$ac_ext >&5
6074   rm -rf conftest*
6075   eval "ac_cv_lib_$ac_lib_var=no"
6076 fi
6077 rm -f conftest*
6078 xe_check_libs=""
6079
6080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6081   echo "$ac_t""yes" 1>&6
6082   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6083 else
6084   echo "$ac_t""no" 1>&6
6085 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6086 fi
6087
6088
6089   fi
6090   libs_x="-lX11"
6091   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6092
6093     
6094 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6095 echo "configure:6096: checking for XShapeSelectInput in -lXext" >&5
6096 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6097
6098 xe_check_libs=" -lXext "
6099 cat > conftest.$ac_ext <<EOF
6100 #line 6101 "configure"
6101 #include "confdefs.h"
6102 /* Override any gcc2 internal prototype to avoid an error.  */
6103 /* We use char because int might match the return type of a gcc2
6104     builtin and then its argument prototype would still apply.  */
6105 char XShapeSelectInput();
6106
6107 int main() {
6108 XShapeSelectInput()
6109 ; return 0; }
6110 EOF
6111 if { (eval echo configure:6112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6112   rm -rf conftest*
6113   eval "ac_cv_lib_$ac_lib_var=yes"
6114 else
6115   echo "configure: failed program was:" >&5
6116   cat conftest.$ac_ext >&5
6117   rm -rf conftest*
6118   eval "ac_cv_lib_$ac_lib_var=no"
6119 fi
6120 rm -f conftest*
6121 xe_check_libs=""
6122
6123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6124   echo "$ac_t""yes" 1>&6
6125   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6126 else
6127   echo "$ac_t""no" 1>&6
6128 fi
6129
6130
6131
6132     
6133 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6134 echo "configure:6135: checking for XtOpenDisplay in -lXt" >&5
6135 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6136
6137 xe_check_libs=" -lXt "
6138 cat > conftest.$ac_ext <<EOF
6139 #line 6140 "configure"
6140 #include "confdefs.h"
6141 /* Override any gcc2 internal prototype to avoid an error.  */
6142 /* We use char because int might match the return type of a gcc2
6143     builtin and then its argument prototype would still apply.  */
6144 char XtOpenDisplay();
6145
6146 int main() {
6147 XtOpenDisplay()
6148 ; return 0; }
6149 EOF
6150 if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6151   rm -rf conftest*
6152   eval "ac_cv_lib_$ac_lib_var=yes"
6153 else
6154   echo "configure: failed program was:" >&5
6155   cat conftest.$ac_ext >&5
6156   rm -rf conftest*
6157   eval "ac_cv_lib_$ac_lib_var=no"
6158 fi
6159 rm -f conftest*
6160 xe_check_libs=""
6161
6162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6163   echo "$ac_t""yes" 1>&6
6164   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6165 else
6166   echo "$ac_t""no" 1>&6
6167 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6168 fi
6169
6170
6171
6172   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6173 echo "configure:6174: checking the version of X11 being used" >&5
6174   cat > conftest.$ac_ext <<EOF
6175 #line 6176 "configure"
6176 #include "confdefs.h"
6177 #include <X11/Intrinsic.h>
6178     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6179 EOF
6180 if { (eval echo configure:6181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6181 then
6182   ./conftest foobar; x11_release=$?
6183 else
6184   conftest_rc="$?"
6185   echo "configure: failed program was:" >&5
6186   cat conftest.$ac_ext >&5
6187   rm -fr conftest*
6188   x11_release=4
6189 fi
6190 rm -fr conftest*
6191   echo "$ac_t""R${x11_release}" 1>&6
6192   { test "$extra_verbose" = "yes" && cat << EOF
6193     Defining THIS_IS_X11R${x11_release}
6194 EOF
6195 cat >> confdefs.h <<EOF
6196 #define THIS_IS_X11R${x11_release} 1
6197 EOF
6198 }
6199
6200
6201   if test "${x11_release}" = "4"; then
6202     case "$with_widgets" in
6203       "" | "no") with_widgets=no ;;
6204       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6205     esac
6206   fi
6207
6208   for ac_func in XConvertCase
6209 do
6210 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6211 echo "configure:6212: checking for $ac_func" >&5
6212
6213 cat > conftest.$ac_ext <<EOF
6214 #line 6215 "configure"
6215 #include "confdefs.h"
6216 /* System header to define __stub macros and hopefully few prototypes,
6217     which can conflict with char $ac_func(); below.  */
6218 #include <assert.h>
6219 /* Override any gcc2 internal prototype to avoid an error.  */
6220 /* We use char because int might match the return type of a gcc2
6221     builtin and then its argument prototype would still apply.  */
6222 char $ac_func();
6223
6224 int main() {
6225
6226 /* The GNU C library defines this for functions which it implements
6227     to always fail with ENOSYS.  Some functions are actually named
6228     something starting with __ and the normal name is an alias.  */
6229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6230 choke me
6231 #else
6232 $ac_func();
6233 #endif
6234
6235 ; return 0; }
6236 EOF
6237 if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6238   rm -rf conftest*
6239   eval "ac_cv_func_$ac_func=yes"
6240 else
6241   echo "configure: failed program was:" >&5
6242   cat conftest.$ac_ext >&5
6243   rm -rf conftest*
6244   eval "ac_cv_func_$ac_func=no"
6245 fi
6246 rm -f conftest*
6247
6248 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6249   echo "$ac_t""yes" 1>&6
6250     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6251   { test "$extra_verbose" = "yes" && cat << EOF
6252     Defining $ac_tr_func
6253 EOF
6254 cat >> confdefs.h <<EOF
6255 #define $ac_tr_func 1
6256 EOF
6257 }
6258  
6259 else
6260   echo "$ac_t""no" 1>&6
6261 fi
6262 done
6263
6264
6265   for ac_hdr in X11/Xlocale.h
6266 do
6267 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6268 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6269 echo "configure:6270: checking for $ac_hdr" >&5
6270
6271 cat > conftest.$ac_ext <<EOF
6272 #line 6273 "configure"
6273 #include "confdefs.h"
6274 #include <$ac_hdr>
6275 EOF
6276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6277 { (eval echo configure:6278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6279 if test -z "$ac_err"; then
6280   rm -rf conftest*
6281   eval "ac_cv_header_$ac_safe=yes"
6282 else
6283   echo "$ac_err" >&5
6284   echo "configure: failed program was:" >&5
6285   cat conftest.$ac_ext >&5
6286   rm -rf conftest*
6287   eval "ac_cv_header_$ac_safe=no"
6288 fi
6289 rm -f conftest*
6290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6291   echo "$ac_t""yes" 1>&6
6292     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6293   { test "$extra_verbose" = "yes" && cat << EOF
6294     Defining $ac_tr_hdr
6295 EOF
6296 cat >> confdefs.h <<EOF
6297 #define $ac_tr_hdr 1
6298 EOF
6299 }
6300  
6301 else
6302   echo "$ac_t""no" 1>&6
6303 fi
6304 done
6305
6306
6307     for ac_func in XRegisterIMInstantiateCallback
6308 do
6309 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6310 echo "configure:6311: checking for $ac_func" >&5
6311
6312 cat > conftest.$ac_ext <<EOF
6313 #line 6314 "configure"
6314 #include "confdefs.h"
6315 /* System header to define __stub macros and hopefully few prototypes,
6316     which can conflict with char $ac_func(); below.  */
6317 #include <assert.h>
6318 /* Override any gcc2 internal prototype to avoid an error.  */
6319 /* We use char because int might match the return type of a gcc2
6320     builtin and then its argument prototype would still apply.  */
6321 char $ac_func();
6322
6323 int main() {
6324
6325 /* The GNU C library defines this for functions which it implements
6326     to always fail with ENOSYS.  Some functions are actually named
6327     something starting with __ and the normal name is an alias.  */
6328 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6329 choke me
6330 #else
6331 $ac_func();
6332 #endif
6333
6334 ; return 0; }
6335 EOF
6336 if { (eval echo configure:6337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6337   rm -rf conftest*
6338   eval "ac_cv_func_$ac_func=yes"
6339 else
6340   echo "configure: failed program was:" >&5
6341   cat conftest.$ac_ext >&5
6342   rm -rf conftest*
6343   eval "ac_cv_func_$ac_func=no"
6344 fi
6345 rm -f conftest*
6346
6347 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6348   echo "$ac_t""yes" 1>&6
6349     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6350   { test "$extra_verbose" = "yes" && cat << EOF
6351     Defining $ac_tr_func
6352 EOF
6353 cat >> confdefs.h <<EOF
6354 #define $ac_tr_func 1
6355 EOF
6356 }
6357  
6358 else
6359   echo "$ac_t""no" 1>&6
6360 fi
6361 done
6362
6363   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6364 echo "configure:6365: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6365   cat > conftest.$ac_ext <<EOF
6366 #line 6367 "configure"
6367 #include "confdefs.h"
6368
6369 #define NeedFunctionPrototypes 1
6370 #include <X11/Xlib.h>
6371 extern Bool XRegisterIMInstantiateCallback(
6372    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6373
6374 int main() {
6375
6376 ; return 0; }
6377 EOF
6378 if { (eval echo configure:6379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6379   rm -rf conftest*
6380   echo "$ac_t""yes" 1>&6
6381 else
6382   echo "configure: failed program was:" >&5
6383   cat conftest.$ac_ext >&5
6384   rm -rf conftest*
6385   echo "$ac_t""no" 1>&6
6386    { test "$extra_verbose" = "yes" && cat << \EOF
6387     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6388 EOF
6389 cat >> confdefs.h <<\EOF
6390 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6391 EOF
6392 }
6393
6394 fi
6395 rm -f conftest*
6396
6397     test -z "$with_xmu" && { 
6398 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6399 echo "configure:6400: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6400 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6401
6402 xe_check_libs=" -lXmu "
6403 cat > conftest.$ac_ext <<EOF
6404 #line 6405 "configure"
6405 #include "confdefs.h"
6406 /* Override any gcc2 internal prototype to avoid an error.  */
6407 /* We use char because int might match the return type of a gcc2
6408     builtin and then its argument prototype would still apply.  */
6409 char XmuReadBitmapDataFromFile();
6410
6411 int main() {
6412 XmuReadBitmapDataFromFile()
6413 ; return 0; }
6414 EOF
6415 if { (eval echo configure:6416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6416   rm -rf conftest*
6417   eval "ac_cv_lib_$ac_lib_var=yes"
6418 else
6419   echo "configure: failed program was:" >&5
6420   cat conftest.$ac_ext >&5
6421   rm -rf conftest*
6422   eval "ac_cv_lib_$ac_lib_var=no"
6423 fi
6424 rm -f conftest*
6425 xe_check_libs=""
6426
6427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6428   echo "$ac_t""yes" 1>&6
6429   with_xmu=yes
6430 else
6431   echo "$ac_t""no" 1>&6
6432 with_xmu=no
6433 fi
6434
6435  }
6436   if test "$with_xmu" = "no"; then
6437     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6438    echo "    xemacs will be linked with \"xmu.o\""
6439  fi
6440   else
6441     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6442     { test "$extra_verbose" = "yes" && cat << \EOF
6443     Defining HAVE_XMU
6444 EOF
6445 cat >> confdefs.h <<\EOF
6446 #define HAVE_XMU 1
6447 EOF
6448 }
6449
6450   fi
6451
6452       
6453 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6454 echo "configure:6455: checking for main in -lXbsd" >&5
6455 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6456
6457 xe_check_libs=" -lXbsd "
6458 cat > conftest.$ac_ext <<EOF
6459 #line 6460 "configure"
6460 #include "confdefs.h"
6461
6462 int main() {
6463 main()
6464 ; return 0; }
6465 EOF
6466 if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6467   rm -rf conftest*
6468   eval "ac_cv_lib_$ac_lib_var=yes"
6469 else
6470   echo "configure: failed program was:" >&5
6471   cat conftest.$ac_ext >&5
6472   rm -rf conftest*
6473   eval "ac_cv_lib_$ac_lib_var=no"
6474 fi
6475 rm -f conftest*
6476 xe_check_libs=""
6477
6478 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6479   echo "$ac_t""yes" 1>&6
6480   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6481 else
6482   echo "$ac_t""no" 1>&6
6483 fi
6484
6485
6486
6487     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6488         if test "$GCC" = "yes"; then
6489       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6490       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6491     else
6492       case "$CC" in
6493         "xlc" ) CC="xlc_r" ;;
6494         "xlC" ) CC="xlC_r" ;;
6495         "cc"  ) CC="cc_r" ;;
6496       esac
6497     fi
6498   fi
6499
6500 fi 
6501 if test "$with_msw" != "no"; then
6502   echo "checking for MS-Windows" 1>&6
6503 echo "configure:6504: checking for MS-Windows" >&5
6504   
6505 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6506 echo "configure:6507: checking for main in -lgdi32" >&5
6507 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6508
6509 xe_check_libs=" -lgdi32 "
6510 cat > conftest.$ac_ext <<EOF
6511 #line 6512 "configure"
6512 #include "confdefs.h"
6513
6514 int main() {
6515 main()
6516 ; return 0; }
6517 EOF
6518 if { (eval echo configure:6519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6519   rm -rf conftest*
6520   eval "ac_cv_lib_$ac_lib_var=yes"
6521 else
6522   echo "configure: failed program was:" >&5
6523   cat conftest.$ac_ext >&5
6524   rm -rf conftest*
6525   eval "ac_cv_lib_$ac_lib_var=no"
6526 fi
6527 rm -f conftest*
6528 xe_check_libs=""
6529
6530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6531   echo "$ac_t""yes" 1>&6
6532   with_msw=yes
6533 else
6534   echo "$ac_t""no" 1>&6
6535 fi
6536
6537
6538   if test "$with_msw" = "yes"; then
6539     { test "$extra_verbose" = "yes" && cat << \EOF
6540     Defining HAVE_MS_WINDOWS
6541 EOF
6542 cat >> confdefs.h <<\EOF
6543 #define HAVE_MS_WINDOWS 1
6544 EOF
6545 }
6546
6547
6548         MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
6549     SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
6550     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
6551
6552     install_pp="$blddir/lib-src/installexe.sh"
6553     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
6554     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6555     if test "$window_system" != x11; then
6556         window_system=msw
6557         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6558             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6559    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6560  fi
6561         test "$with_menubars"   != "no" && with_menubars=msw \
6562             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6563    echo "    xemacs will be linked with \"menubar-msw.o\""
6564  fi
6565         test "$with_toolbars"   != "no" && with_toolbars=msw \
6566             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6567    echo "    xemacs will be linked with \"toolbar-msw.o\""
6568  fi
6569         test "$with_dialogs"   != "no" && with_dialogs=msw \
6570             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6571    echo "    xemacs will be linked with \"dialog-msw.o\""
6572  fi
6573         test "$with_widgets"   != "no" && with_widgets=msw
6574     else
6575         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6576    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6577  fi
6578         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6579    echo "    xemacs will be linked with \"menubar-msw.o\""
6580  fi
6581         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6582    echo "    xemacs will be linked with \"toolbar-msw.o\""
6583  fi
6584         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6585    echo "    xemacs will be linked with \"dialog-msw.o\""
6586  fi
6587     fi
6588         cat > conftest.$ac_ext <<EOF
6589 #line 6590 "configure"
6590 #include "confdefs.h"
6591 #include <fcntl.h>
6592     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6593 EOF
6594 if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6595 then
6596   { test "$extra_verbose" = "yes" && cat << \EOF
6597     Defining HAVE_MSG_SELECT
6598 EOF
6599 cat >> confdefs.h <<\EOF
6600 #define HAVE_MSG_SELECT 1
6601 EOF
6602 }
6603
6604 else
6605   conftest_rc="$?"
6606   echo "configure: failed program was:" >&5
6607   cat conftest.$ac_ext >&5
6608 fi
6609 rm -fr conftest*
6610     with_file_coding=yes
6611     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
6612    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\""
6613  fi
6614   fi
6615 fi
6616
6617
6618
6619 test -z "$window_system" && window_system="none"
6620
6621 if test "$window_system" = "none"; then
6622   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6623   do
6624     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6625        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6626     fi
6627     eval "with_${feature}=no"
6628   done
6629 else
6630   test -z "$with_toolbars" && with_toolbars=yes
6631 fi
6632
6633 if test "$with_msw" != "yes"; then
6634   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6635   do
6636     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6637        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6638     fi
6639     eval "with_${feature}=no"
6640   done
6641 else
6642   :
6643 fi
6644
6645 if test "$with_x11" != "yes"; then
6646             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6647   do
6648     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6649        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6650     fi
6651     eval "with_${feature}=no"
6652   done
6653 fi
6654
6655 if test "$with_x11" = "yes"; then
6656   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
6657 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
6658 echo "configure:6659: checking for X11/extensions/shape.h" >&5
6659
6660 cat > conftest.$ac_ext <<EOF
6661 #line 6662 "configure"
6662 #include "confdefs.h"
6663 #include <X11/extensions/shape.h>
6664 EOF
6665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6666 { (eval echo configure:6667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6667 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6668 if test -z "$ac_err"; then
6669   rm -rf conftest*
6670   eval "ac_cv_header_$ac_safe=yes"
6671 else
6672   echo "$ac_err" >&5
6673   echo "configure: failed program was:" >&5
6674   cat conftest.$ac_ext >&5
6675   rm -rf conftest*
6676   eval "ac_cv_header_$ac_safe=no"
6677 fi
6678 rm -f conftest*
6679 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6680   echo "$ac_t""yes" 1>&6
6681   
6682    { test "$extra_verbose" = "yes" && cat << \EOF
6683     Defining HAVE_BALLOON_HELP
6684 EOF
6685 cat >> confdefs.h <<\EOF
6686 #define HAVE_BALLOON_HELP 1
6687 EOF
6688 }
6689
6690    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
6691    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
6692  fi
6693 else
6694   echo "$ac_t""no" 1>&6
6695 fi
6696
6697 fi
6698
6699 bitmapdir=
6700
6701 case "$window_system" in
6702   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6703   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6704   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6705 esac
6706
6707 case "$x_libraries" in *X11R4* )
6708   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6709   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6710 esac
6711
6712 echo "checking for WM_COMMAND option" 1>&6
6713 echo "configure:6714: checking for WM_COMMAND option" >&5;
6714 if test "$with_wmcommand" != "no"; then
6715   { test "$extra_verbose" = "yes" && cat << \EOF
6716     Defining HAVE_WMCOMMAND
6717 EOF
6718 cat >> confdefs.h <<\EOF
6719 #define HAVE_WMCOMMAND 1
6720 EOF
6721 }
6722
6723 fi
6724
6725 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6726 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6727 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6728 echo "configure:6729: checking for X11/Xauth.h" >&5
6729
6730 cat > conftest.$ac_ext <<EOF
6731 #line 6732 "configure"
6732 #include "confdefs.h"
6733 #include <X11/Xauth.h>
6734 EOF
6735 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6736 { (eval echo configure:6737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6737 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6738 if test -z "$ac_err"; then
6739   rm -rf conftest*
6740   eval "ac_cv_header_$ac_safe=yes"
6741 else
6742   echo "$ac_err" >&5
6743   echo "configure: failed program was:" >&5
6744   cat conftest.$ac_ext >&5
6745   rm -rf conftest*
6746   eval "ac_cv_header_$ac_safe=no"
6747 fi
6748 rm -f conftest*
6749 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6750   echo "$ac_t""yes" 1>&6
6751   :
6752 else
6753   echo "$ac_t""no" 1>&6
6754 with_xauth=no
6755 fi
6756  }
6757 test -z "$with_xauth" && { 
6758 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6759 echo "configure:6760: checking for XauGetAuthByAddr in -lXau" >&5
6760 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6761
6762 xe_check_libs=" -lXau "
6763 cat > conftest.$ac_ext <<EOF
6764 #line 6765 "configure"
6765 #include "confdefs.h"
6766 /* Override any gcc2 internal prototype to avoid an error.  */
6767 /* We use char because int might match the return type of a gcc2
6768     builtin and then its argument prototype would still apply.  */
6769 char XauGetAuthByAddr();
6770
6771 int main() {
6772 XauGetAuthByAddr()
6773 ; return 0; }
6774 EOF
6775 if { (eval echo configure:6776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6776   rm -rf conftest*
6777   eval "ac_cv_lib_$ac_lib_var=yes"
6778 else
6779   echo "configure: failed program was:" >&5
6780   cat conftest.$ac_ext >&5
6781   rm -rf conftest*
6782   eval "ac_cv_lib_$ac_lib_var=no"
6783 fi
6784 rm -f conftest*
6785 xe_check_libs=""
6786
6787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6788   echo "$ac_t""yes" 1>&6
6789   :
6790 else
6791   echo "$ac_t""no" 1>&6
6792 with_xauth=no
6793 fi
6794
6795  }
6796 test -z "$with_xauth" && with_xauth=yes
6797 if test "$with_xauth" = "yes"; then
6798   { test "$extra_verbose" = "yes" && cat << \EOF
6799     Defining HAVE_XAUTH
6800 EOF
6801 cat >> confdefs.h <<\EOF
6802 #define HAVE_XAUTH 1
6803 EOF
6804 }
6805
6806   
6807 T=""
6808 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
6809 libs_xauth="$T"
6810
6811 fi
6812
6813
6814
6815
6816 if test "$with_tooltalk" != "no" ; then
6817       for dir in "" "Tt/" "desktop/" ; do
6818     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6819 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6820 echo "configure:6821: checking for ${dir}tt_c.h" >&5
6821
6822 cat > conftest.$ac_ext <<EOF
6823 #line 6824 "configure"
6824 #include "confdefs.h"
6825 #include <${dir}tt_c.h>
6826 EOF
6827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6828 { (eval echo configure:6829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6830 if test -z "$ac_err"; then
6831   rm -rf conftest*
6832   eval "ac_cv_header_$ac_safe=yes"
6833 else
6834   echo "$ac_err" >&5
6835   echo "configure: failed program was:" >&5
6836   cat conftest.$ac_ext >&5
6837   rm -rf conftest*
6838   eval "ac_cv_header_$ac_safe=no"
6839 fi
6840 rm -f conftest*
6841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6842   echo "$ac_t""yes" 1>&6
6843   tt_c_h_file="${dir}tt_c.h"; break
6844 else
6845   echo "$ac_t""no" 1>&6
6846 fi
6847
6848   done
6849   if test -z "$tt_c_h_file"; then
6850     if test "$with_tooltalk" = "yes"; then
6851       (echo "$progname: Usage error:"
6852 echo " " "Unable to find required tooltalk header files."
6853 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6854     fi
6855     with_tooltalk=no
6856   fi
6857 fi
6858 if test "$with_tooltalk" != "no" ; then
6859   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6860     
6861 xe_msg_checking="for tt_message_create in -ltt"
6862 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6863 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6864 echo "configure:6865: checking "$xe_msg_checking"" >&5
6865 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6866
6867 xe_check_libs=" -ltt $extra_libs"
6868 cat > conftest.$ac_ext <<EOF
6869 #line 6870 "configure"
6870 #include "confdefs.h"
6871 /* Override any gcc2 internal prototype to avoid an error.  */
6872 /* We use char because int might match the return type of a gcc2
6873     builtin and then its argument prototype would still apply.  */
6874 char tt_message_create();
6875
6876 int main() {
6877 tt_message_create()
6878 ; return 0; }
6879 EOF
6880 if { (eval echo configure:6881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6881   rm -rf conftest*
6882   eval "ac_cv_lib_$ac_lib_var=yes"
6883 else
6884   echo "configure: failed program was:" >&5
6885   cat conftest.$ac_ext >&5
6886   rm -rf conftest*
6887   eval "ac_cv_lib_$ac_lib_var=no"
6888 fi
6889 rm -f conftest*
6890 xe_check_libs=""
6891
6892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6893   echo "$ac_t""yes" 1>&6
6894   tt_libs="-ltt $extra_libs"; break
6895 else
6896   echo "$ac_t""no" 1>&6
6897 :
6898 fi
6899
6900
6901   done
6902   if test -z "$tt_libs"; then
6903     if test "$with_tooltalk" = "yes"; then
6904       (echo "$progname: Usage error:"
6905 echo " " "Unable to find required tooltalk libraries."
6906 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6907     fi
6908     with_tooltalk=no
6909   fi
6910 fi
6911 test -z "$with_tooltalk" && with_tooltalk=yes
6912 if test "$with_tooltalk" = "yes"; then
6913   { test "$extra_verbose" = "yes" && cat << \EOF
6914     Defining TOOLTALK
6915 EOF
6916 cat >> confdefs.h <<\EOF
6917 #define TOOLTALK 1
6918 EOF
6919 }
6920
6921   { test "$extra_verbose" = "yes" && cat << EOF
6922     Defining TT_C_H_FILE = "$tt_c_h_file"
6923 EOF
6924 cat >> confdefs.h <<EOF
6925 #define TT_C_H_FILE "$tt_c_h_file"
6926 EOF
6927 }
6928
6929   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6930   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6931    echo "    xemacs will be linked with \"tooltalk.o\""
6932  fi
6933 fi
6934
6935 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6936 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6937 echo "configure:6938: checking for Dt/Dt.h" >&5
6938
6939 cat > conftest.$ac_ext <<EOF
6940 #line 6941 "configure"
6941 #include "confdefs.h"
6942 #include <Dt/Dt.h>
6943 EOF
6944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6945 { (eval echo configure:6946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6947 if test -z "$ac_err"; then
6948   rm -rf conftest*
6949   eval "ac_cv_header_$ac_safe=yes"
6950 else
6951   echo "$ac_err" >&5
6952   echo "configure: failed program was:" >&5
6953   cat conftest.$ac_ext >&5
6954   rm -rf conftest*
6955   eval "ac_cv_header_$ac_safe=no"
6956 fi
6957 rm -f conftest*
6958 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6959   echo "$ac_t""yes" 1>&6
6960   :
6961 else
6962   echo "$ac_t""no" 1>&6
6963 with_cde=no
6964 fi
6965  }
6966 test -z "$with_cde" && { 
6967 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6968 echo "configure:6969: checking for DtDndDragStart in -lDtSvc" >&5
6969 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6970
6971 xe_check_libs=" -lDtSvc "
6972 cat > conftest.$ac_ext <<EOF
6973 #line 6974 "configure"
6974 #include "confdefs.h"
6975 /* Override any gcc2 internal prototype to avoid an error.  */
6976 /* We use char because int might match the return type of a gcc2
6977     builtin and then its argument prototype would still apply.  */
6978 char DtDndDragStart();
6979
6980 int main() {
6981 DtDndDragStart()
6982 ; return 0; }
6983 EOF
6984 if { (eval echo configure:6985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6985   rm -rf conftest*
6986   eval "ac_cv_lib_$ac_lib_var=yes"
6987 else
6988   echo "configure: failed program was:" >&5
6989   cat conftest.$ac_ext >&5
6990   rm -rf conftest*
6991   eval "ac_cv_lib_$ac_lib_var=no"
6992 fi
6993 rm -f conftest*
6994 xe_check_libs=""
6995
6996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6997   echo "$ac_t""yes" 1>&6
6998   :
6999 else
7000   echo "$ac_t""no" 1>&6
7001 with_cde=no
7002 fi
7003
7004  }
7005 test -z "$with_cde" && with_cde=yes
7006 if test "$with_dragndrop" = no; then
7007   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7008   with_cde=no
7009 fi
7010 if test "$with_cde" = "yes" ; then
7011   { test "$extra_verbose" = "yes" && cat << \EOF
7012     Defining HAVE_CDE
7013 EOF
7014 cat >> confdefs.h <<\EOF
7015 #define HAVE_CDE 1
7016 EOF
7017 }
7018
7019   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7020   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7021   with_tooltalk=yes # CDE requires Tooltalk
7022   need_motif=yes    # CDE requires Motif
7023 fi
7024
7025 test "$window_system" != "x11" && with_offix=no
7026 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7027   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7028   with_offix=no
7029 fi
7030 if test "$with_dragndrop" = no; then
7031   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7032   with_offix=no
7033 fi
7034 if test "$with_cde" = yes; then
7035   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7036   with_offix=no
7037 fi
7038 test -z "$with_offix" && with_offix=no
7039 if test "$with_offix" = "yes"; then
7040   { test "$extra_verbose" = "yes" && cat << \EOF
7041     Defining HAVE_OFFIX_DND
7042 EOF
7043 cat >> confdefs.h <<\EOF
7044 #define HAVE_OFFIX_DND 1
7045 EOF
7046 }
7047
7048   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7049   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7050 fi
7051
7052 if test "$with_dragndrop" != "no" ; then
7053   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7054 echo "configure:7055: checking if drag and drop API is needed" >&5
7055   if test -n "$dragndrop_proto" ; then
7056     with_dragndrop=yes
7057     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7058     { test "$extra_verbose" = "yes" && cat << \EOF
7059     Defining HAVE_DRAGNDROP
7060 EOF
7061 cat >> confdefs.h <<\EOF
7062 #define HAVE_DRAGNDROP 1
7063 EOF
7064 }
7065
7066     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7067   else
7068     with_dragndrop=no
7069     echo "$ac_t""no" 1>&6
7070   fi
7071 fi
7072
7073 echo "checking for LDAP" 1>&6
7074 echo "configure:7075: checking for LDAP" >&5
7075 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7076 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7077 echo "configure:7078: checking for ldap.h" >&5
7078
7079 cat > conftest.$ac_ext <<EOF
7080 #line 7081 "configure"
7081 #include "confdefs.h"
7082 #include <ldap.h>
7083 EOF
7084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7085 { (eval echo configure:7086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7087 if test -z "$ac_err"; then
7088   rm -rf conftest*
7089   eval "ac_cv_header_$ac_safe=yes"
7090 else
7091   echo "$ac_err" >&5
7092   echo "configure: failed program was:" >&5
7093   cat conftest.$ac_ext >&5
7094   rm -rf conftest*
7095   eval "ac_cv_header_$ac_safe=no"
7096 fi
7097 rm -f conftest*
7098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7099   echo "$ac_t""yes" 1>&6
7100   :
7101 else
7102   echo "$ac_t""no" 1>&6
7103 with_ldap=no
7104 fi
7105  }
7106 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7107 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7108 echo "configure:7109: checking for lber.h" >&5
7109
7110 cat > conftest.$ac_ext <<EOF
7111 #line 7112 "configure"
7112 #include "confdefs.h"
7113 #include <lber.h>
7114 EOF
7115 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7116 { (eval echo configure:7117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7117 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7118 if test -z "$ac_err"; then
7119   rm -rf conftest*
7120   eval "ac_cv_header_$ac_safe=yes"
7121 else
7122   echo "$ac_err" >&5
7123   echo "configure: failed program was:" >&5
7124   cat conftest.$ac_ext >&5
7125   rm -rf conftest*
7126   eval "ac_cv_header_$ac_safe=no"
7127 fi
7128 rm -f conftest*
7129 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7130   echo "$ac_t""yes" 1>&6
7131   :
7132 else
7133   echo "$ac_t""no" 1>&6
7134 with_ldap=no
7135 fi
7136  }
7137 if test "$with_ldap" != "no"; then
7138   
7139 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7140 echo "configure:7141: checking for ldap_search in -lldap" >&5
7141 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7142
7143 xe_check_libs=" -lldap "
7144 cat > conftest.$ac_ext <<EOF
7145 #line 7146 "configure"
7146 #include "confdefs.h"
7147 /* Override any gcc2 internal prototype to avoid an error.  */
7148 /* We use char because int might match the return type of a gcc2
7149     builtin and then its argument prototype would still apply.  */
7150 char ldap_search();
7151
7152 int main() {
7153 ldap_search()
7154 ; return 0; }
7155 EOF
7156 if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7157   rm -rf conftest*
7158   eval "ac_cv_lib_$ac_lib_var=yes"
7159 else
7160   echo "configure: failed program was:" >&5
7161   cat conftest.$ac_ext >&5
7162   rm -rf conftest*
7163   eval "ac_cv_lib_$ac_lib_var=no"
7164 fi
7165 rm -f conftest*
7166 xe_check_libs=""
7167
7168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7169   echo "$ac_t""yes" 1>&6
7170   with_ldap_nolber=yes
7171 else
7172   echo "$ac_t""no" 1>&6
7173 with_ldap_nolber=no
7174 fi
7175
7176
7177   test "$with_ldap_nolber" = "no" && { 
7178 xe_msg_checking="for ldap_open in -lldap"
7179 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7180 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7181 echo "configure:7182: checking "$xe_msg_checking"" >&5
7182 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7183
7184 xe_check_libs=" -lldap -llber"
7185 cat > conftest.$ac_ext <<EOF
7186 #line 7187 "configure"
7187 #include "confdefs.h"
7188 /* Override any gcc2 internal prototype to avoid an error.  */
7189 /* We use char because int might match the return type of a gcc2
7190     builtin and then its argument prototype would still apply.  */
7191 char ldap_open();
7192
7193 int main() {
7194 ldap_open()
7195 ; return 0; }
7196 EOF
7197 if { (eval echo configure:7198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7198   rm -rf conftest*
7199   eval "ac_cv_lib_$ac_lib_var=yes"
7200 else
7201   echo "configure: failed program was:" >&5
7202   cat conftest.$ac_ext >&5
7203   rm -rf conftest*
7204   eval "ac_cv_lib_$ac_lib_var=no"
7205 fi
7206 rm -f conftest*
7207 xe_check_libs=""
7208
7209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7210   echo "$ac_t""yes" 1>&6
7211   with_ldap_lber=yes
7212 else
7213   echo "$ac_t""no" 1>&6
7214 with_ldap_lber=no
7215 fi
7216
7217  }
7218   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7219 xe_msg_checking="for ldap_open in -lldap"
7220 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7221 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7222 echo "configure:7223: checking "$xe_msg_checking"" >&5
7223 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7224
7225 xe_check_libs=" -lldap -llber -lkrb"
7226 cat > conftest.$ac_ext <<EOF
7227 #line 7228 "configure"
7228 #include "confdefs.h"
7229 /* Override any gcc2 internal prototype to avoid an error.  */
7230 /* We use char because int might match the return type of a gcc2
7231     builtin and then its argument prototype would still apply.  */
7232 char ldap_open();
7233
7234 int main() {
7235 ldap_open()
7236 ; return 0; }
7237 EOF
7238 if { (eval echo configure:7239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7239   rm -rf conftest*
7240   eval "ac_cv_lib_$ac_lib_var=yes"
7241 else
7242   echo "configure: failed program was:" >&5
7243   cat conftest.$ac_ext >&5
7244   rm -rf conftest*
7245   eval "ac_cv_lib_$ac_lib_var=no"
7246 fi
7247 rm -f conftest*
7248 xe_check_libs=""
7249
7250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7251   echo "$ac_t""yes" 1>&6
7252   with_ldap_krb=yes
7253 else
7254   echo "$ac_t""no" 1>&6
7255 with_ldap_krb=no
7256 fi
7257
7258  }
7259   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7260 xe_msg_checking="for ldap_open in -lldap"
7261 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7262 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7263 echo "configure:7264: checking "$xe_msg_checking"" >&5
7264 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7265
7266 xe_check_libs=" -lldap -llber -lkrb -ldes"
7267 cat > conftest.$ac_ext <<EOF
7268 #line 7269 "configure"
7269 #include "confdefs.h"
7270 /* Override any gcc2 internal prototype to avoid an error.  */
7271 /* We use char because int might match the return type of a gcc2
7272     builtin and then its argument prototype would still apply.  */
7273 char ldap_open();
7274
7275 int main() {
7276 ldap_open()
7277 ; return 0; }
7278 EOF
7279 if { (eval echo configure:7280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7280   rm -rf conftest*
7281   eval "ac_cv_lib_$ac_lib_var=yes"
7282 else
7283   echo "configure: failed program was:" >&5
7284   cat conftest.$ac_ext >&5
7285   rm -rf conftest*
7286   eval "ac_cv_lib_$ac_lib_var=no"
7287 fi
7288 rm -f conftest*
7289 xe_check_libs=""
7290
7291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7292   echo "$ac_t""yes" 1>&6
7293   with_ldap_krbdes=yes
7294 else
7295   echo "$ac_t""no" 1>&6
7296 with_ldap_krbdes=no
7297 fi
7298
7299  }
7300   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
7301 fi
7302 if test "$with_ldap" = "yes"; then
7303   { test "$extra_verbose" = "yes" && cat << \EOF
7304     Defining HAVE_LDAP
7305 EOF
7306 cat >> confdefs.h <<\EOF
7307 #define HAVE_LDAP 1
7308 EOF
7309 }
7310
7311   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7312    echo "    xemacs will be linked with \"eldap.o\""
7313  fi
7314   if test "$with_ldap_nolber" = "yes" ; then
7315     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7316   else
7317     if test "$with_ldap_krb" = "yes" ; then
7318       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7319     fi
7320     if test "$with_ldap_krbdes" = "yes" ; then
7321       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7322       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7323     fi
7324     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7325     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7326   fi
7327   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7328 do
7329 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7330 echo "configure:7331: checking for $ac_func" >&5
7331
7332 cat > conftest.$ac_ext <<EOF
7333 #line 7334 "configure"
7334 #include "confdefs.h"
7335 /* System header to define __stub macros and hopefully few prototypes,
7336     which can conflict with char $ac_func(); below.  */
7337 #include <assert.h>
7338 /* Override any gcc2 internal prototype to avoid an error.  */
7339 /* We use char because int might match the return type of a gcc2
7340     builtin and then its argument prototype would still apply.  */
7341 char $ac_func();
7342
7343 int main() {
7344
7345 /* The GNU C library defines this for functions which it implements
7346     to always fail with ENOSYS.  Some functions are actually named
7347     something starting with __ and the normal name is an alias.  */
7348 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7349 choke me
7350 #else
7351 $ac_func();
7352 #endif
7353
7354 ; return 0; }
7355 EOF
7356 if { (eval echo configure:7357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7357   rm -rf conftest*
7358   eval "ac_cv_func_$ac_func=yes"
7359 else
7360   echo "configure: failed program was:" >&5
7361   cat conftest.$ac_ext >&5
7362   rm -rf conftest*
7363   eval "ac_cv_func_$ac_func=no"
7364 fi
7365 rm -f conftest*
7366
7367 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7368   echo "$ac_t""yes" 1>&6
7369     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7370   { test "$extra_verbose" = "yes" && cat << EOF
7371     Defining $ac_tr_func
7372 EOF
7373 cat >> confdefs.h <<EOF
7374 #define $ac_tr_func 1
7375 EOF
7376 }
7377  
7378 else
7379   echo "$ac_t""no" 1>&6
7380 fi
7381 done
7382
7383 fi
7384
7385 if test "$with_postgresql" != "no"; then
7386   echo "checking for PostgreSQL" 1>&6
7387 echo "configure:7388: checking for PostgreSQL" >&5
7388
7389   for header_dir in "" "pgsql/" "postgresql/"; do
7390     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7391 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7392 echo "configure:7393: checking for ${header_dir}libpq-fe.h" >&5
7393
7394 cat > conftest.$ac_ext <<EOF
7395 #line 7396 "configure"
7396 #include "confdefs.h"
7397 #include <${header_dir}libpq-fe.h>
7398 EOF
7399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7400 { (eval echo configure:7401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7402 if test -z "$ac_err"; then
7403   rm -rf conftest*
7404   eval "ac_cv_header_$ac_safe=yes"
7405 else
7406   echo "$ac_err" >&5
7407   echo "configure: failed program was:" >&5
7408   cat conftest.$ac_ext >&5
7409   rm -rf conftest*
7410   eval "ac_cv_header_$ac_safe=no"
7411 fi
7412 rm -f conftest*
7413 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7414   echo "$ac_t""yes" 1>&6
7415   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7416 else
7417   echo "$ac_t""no" 1>&6
7418 fi
7419
7420   done
7421
7422   test -n "$libpq_fe_h_file" && { 
7423 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7424 echo "configure:7425: checking for PQconnectdb in -lpq" >&5
7425 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7426
7427 xe_check_libs=" -lpq "
7428 cat > conftest.$ac_ext <<EOF
7429 #line 7430 "configure"
7430 #include "confdefs.h"
7431 /* Override any gcc2 internal prototype to avoid an error.  */
7432 /* We use char because int might match the return type of a gcc2
7433     builtin and then its argument prototype would still apply.  */
7434 char PQconnectdb();
7435
7436 int main() {
7437 PQconnectdb()
7438 ; return 0; }
7439 EOF
7440 if { (eval echo configure:7441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7441   rm -rf conftest*
7442   eval "ac_cv_lib_$ac_lib_var=yes"
7443 else
7444   echo "configure: failed program was:" >&5
7445   cat conftest.$ac_ext >&5
7446   rm -rf conftest*
7447   eval "ac_cv_lib_$ac_lib_var=no"
7448 fi
7449 rm -f conftest*
7450 xe_check_libs=""
7451
7452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7453   echo "$ac_t""yes" 1>&6
7454   have_libpq=yes
7455 else
7456   echo "$ac_t""no" 1>&6
7457 fi
7458
7459  }
7460
7461   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7462     with_postgresql=yes
7463     { test "$extra_verbose" = "yes" && cat << \EOF
7464     Defining HAVE_POSTGRESQL
7465 EOF
7466 cat >> confdefs.h <<\EOF
7467 #define HAVE_POSTGRESQL 1
7468 EOF
7469 }
7470
7471     
7472 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7473 echo "configure:7474: checking for PQconnectStart in -lpq" >&5
7474 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7475
7476 xe_check_libs=" -lpq "
7477 cat > conftest.$ac_ext <<EOF
7478 #line 7479 "configure"
7479 #include "confdefs.h"
7480 /* Override any gcc2 internal prototype to avoid an error.  */
7481 /* We use char because int might match the return type of a gcc2
7482     builtin and then its argument prototype would still apply.  */
7483 char PQconnectStart();
7484
7485 int main() {
7486 PQconnectStart()
7487 ; return 0; }
7488 EOF
7489 if { (eval echo configure:7490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7490   rm -rf conftest*
7491   eval "ac_cv_lib_$ac_lib_var=yes"
7492 else
7493   echo "configure: failed program was:" >&5
7494   cat conftest.$ac_ext >&5
7495   rm -rf conftest*
7496   eval "ac_cv_lib_$ac_lib_var=no"
7497 fi
7498 rm -f conftest*
7499 xe_check_libs=""
7500
7501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7502   echo "$ac_t""yes" 1>&6
7503   with_postgresqlv7=yes;
7504                  { test "$extra_verbose" = "yes" && cat << \EOF
7505     Defining HAVE_POSTGRESQLV7
7506 EOF
7507 cat >> confdefs.h <<\EOF
7508 #define HAVE_POSTGRESQLV7 1
7509 EOF
7510 }
7511
7512 else
7513   echo "$ac_t""no" 1>&6
7514 fi
7515
7516
7517     { test "$extra_verbose" = "yes" && cat << EOF
7518     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
7519 EOF
7520 cat >> confdefs.h <<EOF
7521 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
7522 EOF
7523 }
7524
7525     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7526     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7527    echo "    xemacs will be linked with \"postgresql.o\""
7528  fi
7529   elif test "$with_postgresql" = "yes"; then
7530     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
7531   fi
7532 fi
7533
7534
7535 if test "$window_system" != "none"; then
7536   echo "checking for graphics libraries" 1>&6
7537 echo "configure:7538: checking for graphics libraries" >&5
7538
7539     xpm_problem=""
7540   if test -z "$with_xpm"; then
7541     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7542 echo "configure:7543: checking for Xpm - no older than 3.4f" >&5
7543     xe_check_libs=-lXpm
7544     cat > conftest.$ac_ext <<EOF
7545 #line 7546 "configure"
7546 #include "confdefs.h"
7547 #define XPM_NUMBERS
7548 #include <X11/xpm.h>
7549     int main(int c, char **v) {
7550     return c == 1 ? 0 :
7551       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7552       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7553 EOF
7554 if { (eval echo configure:7555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7555 then
7556   ./conftest dummy_arg; xpm_status=$?;
7557       if test "$xpm_status" = "0"; then
7558         with_xpm=yes;
7559       else
7560         with_xpm=no;
7561         if test "$xpm_status" = "1"; then
7562           xpm_problem="Xpm library version and header file version don't match!"
7563         elif test "$xpm_status" = "2"; then
7564           xpm_problem="Xpm library version is too old!"
7565         else
7566           xpm_problem="Internal xpm detection logic error!"
7567         fi
7568         echo "
7569 *** WARNING *** $xpm_problem
7570   I'm not touching that with a 10-foot pole!
7571   If you really want to use the installed version of Xpm, rerun
7572   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7573     fi
7574 else
7575   conftest_rc="$?"
7576   echo "configure: failed program was:" >&5
7577   cat conftest.$ac_ext >&5
7578   rm -fr conftest*
7579   with_xpm=no
7580 fi
7581 rm -fr conftest*
7582     xe_check_libs=
7583     echo "$ac_t""$with_xpm" 1>&6
7584   fi
7585   if test "$with_xpm" = "yes"; then
7586                 { test "$extra_verbose" = "yes" && cat << \EOF
7587     Defining HAVE_XPM
7588 EOF
7589 cat >> confdefs.h <<\EOF
7590 #define HAVE_XPM 1
7591 EOF
7592 }
7593
7594     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7595     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7596 echo "configure:7597: checking for \"FOR_MSW\" xpm" >&5
7597     xe_check_libs=-lXpm
7598     cat > conftest.$ac_ext <<EOF
7599 #line 7600 "configure"
7600 #include "confdefs.h"
7601
7602 int main() {
7603 XpmCreatePixmapFromData()
7604 ; return 0; }
7605 EOF
7606 if { (eval echo configure:7607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7607   rm -rf conftest*
7608   xpm_for_msw=no
7609 else
7610   echo "configure: failed program was:" >&5
7611   cat conftest.$ac_ext >&5
7612   rm -rf conftest*
7613   xpm_for_msw=yes
7614 fi
7615 rm -f conftest*
7616     xe_check_libs=
7617     echo "$ac_t""$xpm_for_msw" 1>&6
7618     if test "$xpm_for_msw" = "yes"; then
7619       { test "$extra_verbose" = "yes" && cat << \EOF
7620     Defining FOR_MSW
7621 EOF
7622 cat >> confdefs.h <<\EOF
7623 #define FOR_MSW 1
7624 EOF
7625 }
7626
7627     fi
7628   fi
7629
7630     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7631 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7632 echo "configure:7633: checking for compface.h" >&5
7633
7634 cat > conftest.$ac_ext <<EOF
7635 #line 7636 "configure"
7636 #include "confdefs.h"
7637 #include <compface.h>
7638 EOF
7639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7640 { (eval echo configure:7641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7642 if test -z "$ac_err"; then
7643   rm -rf conftest*
7644   eval "ac_cv_header_$ac_safe=yes"
7645 else
7646   echo "$ac_err" >&5
7647   echo "configure: failed program was:" >&5
7648   cat conftest.$ac_ext >&5
7649   rm -rf conftest*
7650   eval "ac_cv_header_$ac_safe=no"
7651 fi
7652 rm -f conftest*
7653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7654   echo "$ac_t""yes" 1>&6
7655   :
7656 else
7657   echo "$ac_t""no" 1>&6
7658 with_xface=no
7659 fi
7660  }
7661   test -z "$with_xface" && { 
7662 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7663 echo "configure:7664: checking for UnGenFace in -lcompface" >&5
7664 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7665
7666 xe_check_libs=" -lcompface "
7667 cat > conftest.$ac_ext <<EOF
7668 #line 7669 "configure"
7669 #include "confdefs.h"
7670 /* Override any gcc2 internal prototype to avoid an error.  */
7671 /* We use char because int might match the return type of a gcc2
7672     builtin and then its argument prototype would still apply.  */
7673 char UnGenFace();
7674
7675 int main() {
7676 UnGenFace()
7677 ; return 0; }
7678 EOF
7679 if { (eval echo configure:7680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7680   rm -rf conftest*
7681   eval "ac_cv_lib_$ac_lib_var=yes"
7682 else
7683   echo "configure: failed program was:" >&5
7684   cat conftest.$ac_ext >&5
7685   rm -rf conftest*
7686   eval "ac_cv_lib_$ac_lib_var=no"
7687 fi
7688 rm -f conftest*
7689 xe_check_libs=""
7690
7691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7692   echo "$ac_t""yes" 1>&6
7693   : 
7694 else
7695   echo "$ac_t""no" 1>&6
7696 with_xface=no
7697 fi
7698
7699  }
7700   test -z "$with_xface" && with_xface=yes
7701   if test "$with_xface" = "yes"; then
7702     { test "$extra_verbose" = "yes" && cat << \EOF
7703     Defining HAVE_XFACE
7704 EOF
7705 cat >> confdefs.h <<\EOF
7706 #define HAVE_XFACE 1
7707 EOF
7708 }
7709
7710     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7711   fi
7712
7713         if test "$with_gif" != "no"; then
7714     with_gif="yes"
7715     { test "$extra_verbose" = "yes" && cat << \EOF
7716     Defining HAVE_GIF
7717 EOF
7718 cat >> confdefs.h <<\EOF
7719 #define HAVE_GIF 1
7720 EOF
7721 }
7722
7723     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7724    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7725  fi
7726   fi
7727
7728       if test "$with_png $with_tiff" != "no no"; then
7729     
7730 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7731 echo "configure:7732: checking for inflate in -lc" >&5
7732 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7733
7734 xe_check_libs=" -lc "
7735 cat > conftest.$ac_ext <<EOF
7736 #line 7737 "configure"
7737 #include "confdefs.h"
7738 /* Override any gcc2 internal prototype to avoid an error.  */
7739 /* We use char because int might match the return type of a gcc2
7740     builtin and then its argument prototype would still apply.  */
7741 char inflate();
7742
7743 int main() {
7744 inflate()
7745 ; return 0; }
7746 EOF
7747 if { (eval echo configure:7748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7748   rm -rf conftest*
7749   eval "ac_cv_lib_$ac_lib_var=yes"
7750 else
7751   echo "configure: failed program was:" >&5
7752   cat conftest.$ac_ext >&5
7753   rm -rf conftest*
7754   eval "ac_cv_lib_$ac_lib_var=no"
7755 fi
7756 rm -f conftest*
7757 xe_check_libs=""
7758
7759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7760   echo "$ac_t""yes" 1>&6
7761   :
7762 else
7763   echo "$ac_t""no" 1>&6
7764
7765 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7766 echo "configure:7767: checking for inflate in -lz" >&5
7767 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7768
7769 xe_check_libs=" -lz "
7770 cat > conftest.$ac_ext <<EOF
7771 #line 7772 "configure"
7772 #include "confdefs.h"
7773 /* Override any gcc2 internal prototype to avoid an error.  */
7774 /* We use char because int might match the return type of a gcc2
7775     builtin and then its argument prototype would still apply.  */
7776 char inflate();
7777
7778 int main() {
7779 inflate()
7780 ; return 0; }
7781 EOF
7782 if { (eval echo configure:7783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7783   rm -rf conftest*
7784   eval "ac_cv_lib_$ac_lib_var=yes"
7785 else
7786   echo "configure: failed program was:" >&5
7787   cat conftest.$ac_ext >&5
7788   rm -rf conftest*
7789   eval "ac_cv_lib_$ac_lib_var=no"
7790 fi
7791 rm -f conftest*
7792 xe_check_libs=""
7793
7794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7795   echo "$ac_t""yes" 1>&6
7796   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7797 else
7798   echo "$ac_t""no" 1>&6
7799
7800 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7801 echo "configure:7802: checking for inflate in -lgz" >&5
7802 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7803
7804 xe_check_libs=" -lgz "
7805 cat > conftest.$ac_ext <<EOF
7806 #line 7807 "configure"
7807 #include "confdefs.h"
7808 /* Override any gcc2 internal prototype to avoid an error.  */
7809 /* We use char because int might match the return type of a gcc2
7810     builtin and then its argument prototype would still apply.  */
7811 char inflate();
7812
7813 int main() {
7814 inflate()
7815 ; return 0; }
7816 EOF
7817 if { (eval echo configure:7818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7818   rm -rf conftest*
7819   eval "ac_cv_lib_$ac_lib_var=yes"
7820 else
7821   echo "configure: failed program was:" >&5
7822   cat conftest.$ac_ext >&5
7823   rm -rf conftest*
7824   eval "ac_cv_lib_$ac_lib_var=no"
7825 fi
7826 rm -f conftest*
7827 xe_check_libs=""
7828
7829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7830   echo "$ac_t""yes" 1>&6
7831   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7832 else
7833   echo "$ac_t""no" 1>&6
7834 fi
7835
7836
7837 fi
7838
7839
7840 fi
7841
7842
7843   fi
7844
7845     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7846 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7847 echo "configure:7848: checking for jpeglib.h" >&5
7848
7849 cat > conftest.$ac_ext <<EOF
7850 #line 7851 "configure"
7851 #include "confdefs.h"
7852 #include <jpeglib.h>
7853 EOF
7854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7855 { (eval echo configure:7856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7857 if test -z "$ac_err"; then
7858   rm -rf conftest*
7859   eval "ac_cv_header_$ac_safe=yes"
7860 else
7861   echo "$ac_err" >&5
7862   echo "configure: failed program was:" >&5
7863   cat conftest.$ac_ext >&5
7864   rm -rf conftest*
7865   eval "ac_cv_header_$ac_safe=no"
7866 fi
7867 rm -f conftest*
7868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7869   echo "$ac_t""yes" 1>&6
7870   :
7871 else
7872   echo "$ac_t""no" 1>&6
7873 with_jpeg=no
7874 fi
7875  }
7876   test -z "$with_jpeg" && { 
7877 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7878 echo "configure:7879: checking for jpeg_destroy_decompress in -ljpeg" >&5
7879 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7880
7881 xe_check_libs=" -ljpeg "
7882 cat > conftest.$ac_ext <<EOF
7883 #line 7884 "configure"
7884 #include "confdefs.h"
7885 /* Override any gcc2 internal prototype to avoid an error.  */
7886 /* We use char because int might match the return type of a gcc2
7887     builtin and then its argument prototype would still apply.  */
7888 char jpeg_destroy_decompress();
7889
7890 int main() {
7891 jpeg_destroy_decompress()
7892 ; return 0; }
7893 EOF
7894 if { (eval echo configure:7895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7895   rm -rf conftest*
7896   eval "ac_cv_lib_$ac_lib_var=yes"
7897 else
7898   echo "configure: failed program was:" >&5
7899   cat conftest.$ac_ext >&5
7900   rm -rf conftest*
7901   eval "ac_cv_lib_$ac_lib_var=no"
7902 fi
7903 rm -f conftest*
7904 xe_check_libs=""
7905
7906 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7907   echo "$ac_t""yes" 1>&6
7908   :
7909 else
7910   echo "$ac_t""no" 1>&6
7911 with_jpeg=no
7912 fi
7913
7914  }
7915   test -z "$with_jpeg" && with_jpeg=yes
7916   if test "$with_jpeg" = "yes"; then
7917     { test "$extra_verbose" = "yes" && cat << \EOF
7918     Defining HAVE_JPEG
7919 EOF
7920 cat >> confdefs.h <<\EOF
7921 #define HAVE_JPEG 1
7922 EOF
7923 }
7924
7925     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7926   fi
7927
7928     png_problem=""
7929   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7930 echo "configure:7931: checking for pow" >&5
7931
7932 cat > conftest.$ac_ext <<EOF
7933 #line 7934 "configure"
7934 #include "confdefs.h"
7935 /* System header to define __stub macros and hopefully few prototypes,
7936     which can conflict with char pow(); below.  */
7937 #include <assert.h>
7938 /* Override any gcc2 internal prototype to avoid an error.  */
7939 /* We use char because int might match the return type of a gcc2
7940     builtin and then its argument prototype would still apply.  */
7941 char pow();
7942
7943 int main() {
7944
7945 /* The GNU C library defines this for functions which it implements
7946     to always fail with ENOSYS.  Some functions are actually named
7947     something starting with __ and the normal name is an alias.  */
7948 #if defined (__stub_pow) || defined (__stub___pow)
7949 choke me
7950 #else
7951 pow();
7952 #endif
7953
7954 ; return 0; }
7955 EOF
7956 if { (eval echo configure:7957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7957   rm -rf conftest*
7958   eval "ac_cv_func_pow=yes"
7959 else
7960   echo "configure: failed program was:" >&5
7961   cat conftest.$ac_ext >&5
7962   rm -rf conftest*
7963   eval "ac_cv_func_pow=no"
7964 fi
7965 rm -f conftest*
7966
7967 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7968   echo "$ac_t""yes" 1>&6
7969   :
7970 else
7971   echo "$ac_t""no" 1>&6
7972 with_png=no
7973 fi
7974  }
7975   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7976 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7977 echo "configure:7978: checking for png.h" >&5
7978
7979 cat > conftest.$ac_ext <<EOF
7980 #line 7981 "configure"
7981 #include "confdefs.h"
7982 #include <png.h>
7983 EOF
7984 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7985 { (eval echo configure:7986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7986 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7987 if test -z "$ac_err"; then
7988   rm -rf conftest*
7989   eval "ac_cv_header_$ac_safe=yes"
7990 else
7991   echo "$ac_err" >&5
7992   echo "configure: failed program was:" >&5
7993   cat conftest.$ac_ext >&5
7994   rm -rf conftest*
7995   eval "ac_cv_header_$ac_safe=no"
7996 fi
7997 rm -f conftest*
7998 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7999   echo "$ac_t""yes" 1>&6
8000   :
8001 else
8002   echo "$ac_t""no" 1>&6
8003 with_png=no
8004 fi
8005  }
8006   test -z "$with_png" && { 
8007 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8008 echo "configure:8009: checking for png_read_image in -lpng" >&5
8009 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8010
8011 xe_check_libs=" -lpng "
8012 cat > conftest.$ac_ext <<EOF
8013 #line 8014 "configure"
8014 #include "confdefs.h"
8015 /* Override any gcc2 internal prototype to avoid an error.  */
8016 /* We use char because int might match the return type of a gcc2
8017     builtin and then its argument prototype would still apply.  */
8018 char png_read_image();
8019
8020 int main() {
8021 png_read_image()
8022 ; return 0; }
8023 EOF
8024 if { (eval echo configure:8025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8025   rm -rf conftest*
8026   eval "ac_cv_lib_$ac_lib_var=yes"
8027 else
8028   echo "configure: failed program was:" >&5
8029   cat conftest.$ac_ext >&5
8030   rm -rf conftest*
8031   eval "ac_cv_lib_$ac_lib_var=no"
8032 fi
8033 rm -f conftest*
8034 xe_check_libs=""
8035
8036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8037   echo "$ac_t""yes" 1>&6
8038   :
8039 else
8040   echo "$ac_t""no" 1>&6
8041 with_png=no
8042 fi
8043
8044  }
8045   if test -z "$with_png"; then
8046     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8047 echo "configure:8048: checking for workable png version information" >&5
8048     xe_check_libs="-lpng -lz"
8049     cat > conftest.$ac_ext <<EOF
8050 #line 8051 "configure"
8051 #include "confdefs.h"
8052 #include <png.h>
8053     int main(int c, char **v) {
8054     if (c == 1) return 0;
8055     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8056     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8057 EOF
8058 if { (eval echo configure:8059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8059 then
8060   ./conftest dummy_arg; png_status=$?;
8061       if test "$png_status" = "0"; then
8062         with_png=yes;
8063       else
8064         with_png=no;
8065         if test "$png_status" = "1"; then
8066           png_problem="PNG library version and header file don't match!"
8067         elif test "$png_status" = "2"; then
8068           png_problem="PNG library version too old (pre 1.0.2)!"
8069         fi
8070         echo "
8071 *** WARNING *** $png_problem
8072   I'm not touching that with a 10-foot pole!
8073   If you really want to use the installed version of libPNG, rerun
8074   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8075     fi
8076 else
8077   conftest_rc="$?"
8078   echo "configure: failed program was:" >&5
8079   cat conftest.$ac_ext >&5
8080   rm -fr conftest*
8081   with_png=no
8082 fi
8083 rm -fr conftest*
8084     xe_check_libs=
8085     echo "$ac_t""$with_png" 1>&6
8086   fi
8087   if test "$with_png" = "yes"; then
8088     { test "$extra_verbose" = "yes" && cat << \EOF
8089     Defining HAVE_PNG
8090 EOF
8091 cat >> confdefs.h <<\EOF
8092 #define HAVE_PNG 1
8093 EOF
8094 }
8095
8096     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8097   fi
8098
8099     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8100 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8101 echo "configure:8102: checking for tiffio.h" >&5
8102
8103 cat > conftest.$ac_ext <<EOF
8104 #line 8105 "configure"
8105 #include "confdefs.h"
8106 #include <tiffio.h>
8107 EOF
8108 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8109 { (eval echo configure:8110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8110 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8111 if test -z "$ac_err"; then
8112   rm -rf conftest*
8113   eval "ac_cv_header_$ac_safe=yes"
8114 else
8115   echo "$ac_err" >&5
8116   echo "configure: failed program was:" >&5
8117   cat conftest.$ac_ext >&5
8118   rm -rf conftest*
8119   eval "ac_cv_header_$ac_safe=no"
8120 fi
8121 rm -f conftest*
8122 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8123   echo "$ac_t""yes" 1>&6
8124   :
8125 else
8126   echo "$ac_t""no" 1>&6
8127 with_tiff=no
8128 fi
8129  }
8130   test -z "$with_tiff" && { 
8131 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8132 echo "configure:8133: checking for TIFFClientOpen in -ltiff" >&5
8133 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8134
8135 xe_check_libs=" -ltiff "
8136 cat > conftest.$ac_ext <<EOF
8137 #line 8138 "configure"
8138 #include "confdefs.h"
8139 /* Override any gcc2 internal prototype to avoid an error.  */
8140 /* We use char because int might match the return type of a gcc2
8141     builtin and then its argument prototype would still apply.  */
8142 char TIFFClientOpen();
8143
8144 int main() {
8145 TIFFClientOpen()
8146 ; return 0; }
8147 EOF
8148 if { (eval echo configure:8149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8149   rm -rf conftest*
8150   eval "ac_cv_lib_$ac_lib_var=yes"
8151 else
8152   echo "configure: failed program was:" >&5
8153   cat conftest.$ac_ext >&5
8154   rm -rf conftest*
8155   eval "ac_cv_lib_$ac_lib_var=no"
8156 fi
8157 rm -f conftest*
8158 xe_check_libs=""
8159
8160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8161   echo "$ac_t""yes" 1>&6
8162   :
8163 else
8164   echo "$ac_t""no" 1>&6
8165 with_tiff=no
8166 fi
8167
8168  }
8169   test -z "$with_tiff" && with_tiff=yes
8170   if test "$with_tiff" = "yes"; then
8171     { test "$extra_verbose" = "yes" && cat << \EOF
8172     Defining HAVE_TIFF
8173 EOF
8174 cat >> confdefs.h <<\EOF
8175 #define HAVE_TIFF 1
8176 EOF
8177 }
8178
8179     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8180   fi
8181 fi
8182
8183
8184 if test "$with_x11" = "yes"; then
8185
8186   echo "checking for X11 graphics libraries" 1>&6
8187 echo "configure:8188: checking for X11 graphics libraries" >&5
8188
8189   echo "checking for the Athena widgets" 1>&6
8190 echo "configure:8191: checking for the Athena widgets" >&5
8191
8192     case "$with_athena" in
8193         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8194     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8195     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8196     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8197     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8198     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8199   esac
8200
8201     if test "$athena_3d" = "no"; then
8202     
8203 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8204 echo "configure:8205: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8205 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8206
8207 xe_check_libs=" -l$athena_variant "
8208 cat > conftest.$ac_ext <<EOF
8209 #line 8210 "configure"
8210 #include "confdefs.h"
8211 /* Override any gcc2 internal prototype to avoid an error.  */
8212 /* We use char because int might match the return type of a gcc2
8213     builtin and then its argument prototype would still apply.  */
8214 char XawScrollbarSetThumb();
8215
8216 int main() {
8217 XawScrollbarSetThumb()
8218 ; return 0; }
8219 EOF
8220 if { (eval echo configure:8221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8221   rm -rf conftest*
8222   eval "ac_cv_lib_$ac_lib_var=yes"
8223 else
8224   echo "configure: failed program was:" >&5
8225   cat conftest.$ac_ext >&5
8226   rm -rf conftest*
8227   eval "ac_cv_lib_$ac_lib_var=no"
8228 fi
8229 rm -f conftest*
8230 xe_check_libs=""
8231
8232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8233   echo "$ac_t""yes" 1>&6
8234           
8235 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8236 echo "configure:8237: checking for threeDClassRec in -l$athena_variant" >&5
8237 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8238
8239 xe_check_libs=" -l$athena_variant "
8240 cat > conftest.$ac_ext <<EOF
8241 #line 8242 "configure"
8242 #include "confdefs.h"
8243 /* Override any gcc2 internal prototype to avoid an error.  */
8244 /* We use char because int might match the return type of a gcc2
8245     builtin and then its argument prototype would still apply.  */
8246 char threeDClassRec();
8247
8248 int main() {
8249 threeDClassRec()
8250 ; return 0; }
8251 EOF
8252 if { (eval echo configure:8253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8253   rm -rf conftest*
8254   eval "ac_cv_lib_$ac_lib_var=yes"
8255 else
8256   echo "configure: failed program was:" >&5
8257   cat conftest.$ac_ext >&5
8258   rm -rf conftest*
8259   eval "ac_cv_lib_$ac_lib_var=no"
8260 fi
8261 rm -f conftest*
8262 xe_check_libs=""
8263
8264 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8265   echo "$ac_t""yes" 1>&6
8266   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8267 else
8268   echo "$ac_t""no" 1>&6
8269 athena_lib=$athena_variant
8270 fi
8271
8272
8273       
8274 else
8275   echo "$ac_t""no" 1>&6
8276 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8277 fi
8278
8279
8280   else
8281         
8282 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8283 echo "configure:8284: checking for threeDClassRec in -l$athena_variant" >&5
8284 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8285
8286 xe_check_libs=" -l$athena_variant "
8287 cat > conftest.$ac_ext <<EOF
8288 #line 8289 "configure"
8289 #include "confdefs.h"
8290 /* Override any gcc2 internal prototype to avoid an error.  */
8291 /* We use char because int might match the return type of a gcc2
8292     builtin and then its argument prototype would still apply.  */
8293 char threeDClassRec();
8294
8295 int main() {
8296 threeDClassRec()
8297 ; return 0; }
8298 EOF
8299 if { (eval echo configure:8300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8300   rm -rf conftest*
8301   eval "ac_cv_lib_$ac_lib_var=yes"
8302 else
8303   echo "configure: failed program was:" >&5
8304   cat conftest.$ac_ext >&5
8305   rm -rf conftest*
8306   eval "ac_cv_lib_$ac_lib_var=no"
8307 fi
8308 rm -f conftest*
8309 xe_check_libs=""
8310
8311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8312   echo "$ac_t""yes" 1>&6
8313   athena_lib=$athena_variant
8314 else
8315   echo "$ac_t""no" 1>&6
8316 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8317 echo "configure:8318: checking for threeDClassRec in -lXaw" >&5
8318 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8319
8320 xe_check_libs=" -lXaw "
8321 cat > conftest.$ac_ext <<EOF
8322 #line 8323 "configure"
8323 #include "confdefs.h"
8324 /* Override any gcc2 internal prototype to avoid an error.  */
8325 /* We use char because int might match the return type of a gcc2
8326     builtin and then its argument prototype would still apply.  */
8327 char threeDClassRec();
8328
8329 int main() {
8330 threeDClassRec()
8331 ; return 0; }
8332 EOF
8333 if { (eval echo configure:8334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8334   rm -rf conftest*
8335   eval "ac_cv_lib_$ac_lib_var=yes"
8336 else
8337   echo "configure: failed program was:" >&5
8338   cat conftest.$ac_ext >&5
8339   rm -rf conftest*
8340   eval "ac_cv_lib_$ac_lib_var=no"
8341 fi
8342 rm -f conftest*
8343 xe_check_libs=""
8344
8345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8346   echo "$ac_t""yes" 1>&6
8347   athena_lib=Xaw;
8348           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8349         
8350 else
8351   echo "$ac_t""no" 1>&6
8352 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8353 fi
8354
8355
8356 fi
8357
8358
8359   fi
8360
8361     if test "$athena_3d" = "no"; then
8362     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8363 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8364 echo "configure:8365: checking for X11/Xaw/ThreeD.h" >&5
8365
8366 cat > conftest.$ac_ext <<EOF
8367 #line 8368 "configure"
8368 #include "confdefs.h"
8369 #include <X11/Xaw/ThreeD.h>
8370 EOF
8371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8372 { (eval echo configure:8373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8374 if test -z "$ac_err"; then
8375   rm -rf conftest*
8376   eval "ac_cv_header_$ac_safe=yes"
8377 else
8378   echo "$ac_err" >&5
8379   echo "configure: failed program was:" >&5
8380   cat conftest.$ac_ext >&5
8381   rm -rf conftest*
8382   eval "ac_cv_header_$ac_safe=no"
8383 fi
8384 rm -f conftest*
8385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8386   echo "$ac_t""yes" 1>&6
8387   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8388 else
8389   echo "$ac_t""no" 1>&6
8390 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8391 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8392 echo "configure:8393: checking for X11/Xaw/XawInit.h" >&5
8393
8394 cat > conftest.$ac_ext <<EOF
8395 #line 8396 "configure"
8396 #include "confdefs.h"
8397 #include <X11/Xaw/XawInit.h>
8398 EOF
8399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8400 { (eval echo configure:8401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8402 if test -z "$ac_err"; then
8403   rm -rf conftest*
8404   eval "ac_cv_header_$ac_safe=yes"
8405 else
8406   echo "$ac_err" >&5
8407   echo "configure: failed program was:" >&5
8408   cat conftest.$ac_ext >&5
8409   rm -rf conftest*
8410   eval "ac_cv_header_$ac_safe=no"
8411 fi
8412 rm -f conftest*
8413 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8414   echo "$ac_t""yes" 1>&6
8415   athena_h_path=X11/Xaw
8416 else
8417   echo "$ac_t""no" 1>&6
8418 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8419 fi
8420
8421 fi
8422
8423   else
8424             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8425 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8426 echo "configure:8427: checking for X11/$athena_variant/XawInit.h" >&5
8427
8428 cat > conftest.$ac_ext <<EOF
8429 #line 8430 "configure"
8430 #include "confdefs.h"
8431 #include <X11/$athena_variant/XawInit.h>
8432 EOF
8433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8434 { (eval echo configure:8435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8436 if test -z "$ac_err"; then
8437   rm -rf conftest*
8438   eval "ac_cv_header_$ac_safe=yes"
8439 else
8440   echo "$ac_err" >&5
8441   echo "configure: failed program was:" >&5
8442   cat conftest.$ac_ext >&5
8443   rm -rf conftest*
8444   eval "ac_cv_header_$ac_safe=no"
8445 fi
8446 rm -f conftest*
8447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8448   echo "$ac_t""yes" 1>&6
8449   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8450 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8451 echo "configure:8452: checking for X11/$athena_variant/ThreeD.h" >&5
8452
8453 cat > conftest.$ac_ext <<EOF
8454 #line 8455 "configure"
8455 #include "confdefs.h"
8456 #include <X11/$athena_variant/ThreeD.h>
8457 EOF
8458 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8459 { (eval echo configure:8460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8460 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8461 if test -z "$ac_err"; then
8462   rm -rf conftest*
8463   eval "ac_cv_header_$ac_safe=yes"
8464 else
8465   echo "$ac_err" >&5
8466   echo "configure: failed program was:" >&5
8467   cat conftest.$ac_ext >&5
8468   rm -rf conftest*
8469   eval "ac_cv_header_$ac_safe=no"
8470 fi
8471 rm -f conftest*
8472 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8473   echo "$ac_t""yes" 1>&6
8474   athena_h_path=X11/$athena_variant
8475 else
8476   echo "$ac_t""no" 1>&6
8477 fi
8478
8479 else
8480   echo "$ac_t""no" 1>&6
8481 fi
8482
8483
8484         if test -z "$athena_h_path"; then
8485       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8486 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8487 echo "configure:8488: checking for $athena_variant/XawInit.h" >&5
8488
8489 cat > conftest.$ac_ext <<EOF
8490 #line 8491 "configure"
8491 #include "confdefs.h"
8492 #include <$athena_variant/XawInit.h>
8493 EOF
8494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8495 { (eval echo configure:8496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8497 if test -z "$ac_err"; then
8498   rm -rf conftest*
8499   eval "ac_cv_header_$ac_safe=yes"
8500 else
8501   echo "$ac_err" >&5
8502   echo "configure: failed program was:" >&5
8503   cat conftest.$ac_ext >&5
8504   rm -rf conftest*
8505   eval "ac_cv_header_$ac_safe=no"
8506 fi
8507 rm -f conftest*
8508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8509   echo "$ac_t""yes" 1>&6
8510   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8511 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8512 echo "configure:8513: checking for $athena_variant/ThreeD.h" >&5
8513
8514 cat > conftest.$ac_ext <<EOF
8515 #line 8516 "configure"
8516 #include "confdefs.h"
8517 #include <$athena_variant/ThreeD.h>
8518 EOF
8519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8520 { (eval echo configure:8521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8522 if test -z "$ac_err"; then
8523   rm -rf conftest*
8524   eval "ac_cv_header_$ac_safe=yes"
8525 else
8526   echo "$ac_err" >&5
8527   echo "configure: failed program was:" >&5
8528   cat conftest.$ac_ext >&5
8529   rm -rf conftest*
8530   eval "ac_cv_header_$ac_safe=no"
8531 fi
8532 rm -f conftest*
8533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8534   echo "$ac_t""yes" 1>&6
8535   athena_h_path=$athena_variant
8536 else
8537   echo "$ac_t""no" 1>&6
8538 fi
8539
8540 else
8541   echo "$ac_t""no" 1>&6
8542 fi
8543
8544     fi
8545
8546         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8547       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8548 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8549 echo "configure:8550: checking for X11/Xaw3d/XawInit.h" >&5
8550
8551 cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 #include <X11/Xaw3d/XawInit.h>
8555 EOF
8556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8557 { (eval echo configure:8558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8559 if test -z "$ac_err"; then
8560   rm -rf conftest*
8561   eval "ac_cv_header_$ac_safe=yes"
8562 else
8563   echo "$ac_err" >&5
8564   echo "configure: failed program was:" >&5
8565   cat conftest.$ac_ext >&5
8566   rm -rf conftest*
8567   eval "ac_cv_header_$ac_safe=no"
8568 fi
8569 rm -f conftest*
8570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8571   echo "$ac_t""yes" 1>&6
8572   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8573 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8574 echo "configure:8575: checking for X11/Xaw3d/ThreeD.h" >&5
8575
8576 cat > conftest.$ac_ext <<EOF
8577 #line 8578 "configure"
8578 #include "confdefs.h"
8579 #include <X11/Xaw3d/ThreeD.h>
8580 EOF
8581 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8582 { (eval echo configure:8583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8583 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8584 if test -z "$ac_err"; then
8585   rm -rf conftest*
8586   eval "ac_cv_header_$ac_safe=yes"
8587 else
8588   echo "$ac_err" >&5
8589   echo "configure: failed program was:" >&5
8590   cat conftest.$ac_ext >&5
8591   rm -rf conftest*
8592   eval "ac_cv_header_$ac_safe=no"
8593 fi
8594 rm -f conftest*
8595 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8596   echo "$ac_t""yes" 1>&6
8597   
8598             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8599             athena_h_path=X11/Xaw3d
8600           
8601 else
8602   echo "$ac_t""no" 1>&6
8603 fi
8604
8605 else
8606   echo "$ac_t""no" 1>&6
8607 fi
8608
8609     fi
8610
8611         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8612       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8613 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8614 echo "configure:8615: checking for Xaw3d/XawInit.h" >&5
8615
8616 cat > conftest.$ac_ext <<EOF
8617 #line 8618 "configure"
8618 #include "confdefs.h"
8619 #include <Xaw3d/XawInit.h>
8620 EOF
8621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8622 { (eval echo configure:8623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8624 if test -z "$ac_err"; then
8625   rm -rf conftest*
8626   eval "ac_cv_header_$ac_safe=yes"
8627 else
8628   echo "$ac_err" >&5
8629   echo "configure: failed program was:" >&5
8630   cat conftest.$ac_ext >&5
8631   rm -rf conftest*
8632   eval "ac_cv_header_$ac_safe=no"
8633 fi
8634 rm -f conftest*
8635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8636   echo "$ac_t""yes" 1>&6
8637   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8638 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8639 echo "configure:8640: checking for Xaw3d/ThreeD.h" >&5
8640
8641 cat > conftest.$ac_ext <<EOF
8642 #line 8643 "configure"
8643 #include "confdefs.h"
8644 #include <Xaw3d/ThreeD.h>
8645 EOF
8646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8647 { (eval echo configure:8648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8649 if test -z "$ac_err"; then
8650   rm -rf conftest*
8651   eval "ac_cv_header_$ac_safe=yes"
8652 else
8653   echo "$ac_err" >&5
8654   echo "configure: failed program was:" >&5
8655   cat conftest.$ac_ext >&5
8656   rm -rf conftest*
8657   eval "ac_cv_header_$ac_safe=no"
8658 fi
8659 rm -f conftest*
8660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8661   echo "$ac_t""yes" 1>&6
8662   
8663             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8664             athena_h_path=Xaw3d
8665           
8666 else
8667   echo "$ac_t""no" 1>&6
8668 fi
8669
8670 else
8671   echo "$ac_t""no" 1>&6
8672 fi
8673
8674     fi
8675
8676             if test -z "$athena_h_path"; then
8677       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8678 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8679 echo "configure:8680: checking for X11/Xaw/ThreeD.h" >&5
8680
8681 cat > conftest.$ac_ext <<EOF
8682 #line 8683 "configure"
8683 #include "confdefs.h"
8684 #include <X11/Xaw/ThreeD.h>
8685 EOF
8686 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8687 { (eval echo configure:8688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8688 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8689 if test -z "$ac_err"; then
8690   rm -rf conftest*
8691   eval "ac_cv_header_$ac_safe=yes"
8692 else
8693   echo "$ac_err" >&5
8694   echo "configure: failed program was:" >&5
8695   cat conftest.$ac_ext >&5
8696   rm -rf conftest*
8697   eval "ac_cv_header_$ac_safe=no"
8698 fi
8699 rm -f conftest*
8700 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8701   echo "$ac_t""yes" 1>&6
8702   
8703           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8704           athena_h_path=X11/Xaw
8705         
8706 else
8707   echo "$ac_t""no" 1>&6
8708 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8709 fi
8710
8711     fi
8712   fi
8713
8714     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8715     have_xaw=yes
8716   else
8717     have_xaw=no
8718   fi
8719
8720     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8721 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8722 echo "configure:8723: checking for Xm/Xm.h" >&5
8723
8724 cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727 #include <Xm/Xm.h>
8728 EOF
8729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8730 { (eval echo configure:8731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8732 if test -z "$ac_err"; then
8733   rm -rf conftest*
8734   eval "ac_cv_header_$ac_safe=yes"
8735 else
8736   echo "$ac_err" >&5
8737   echo "configure: failed program was:" >&5
8738   cat conftest.$ac_ext >&5
8739   rm -rf conftest*
8740   eval "ac_cv_header_$ac_safe=no"
8741 fi
8742 rm -f conftest*
8743 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8744   echo "$ac_t""yes" 1>&6
8745   
8746 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8747 echo "configure:8748: checking for XmStringFree in -lXm" >&5
8748 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8749
8750 xe_check_libs=" -lXm "
8751 cat > conftest.$ac_ext <<EOF
8752 #line 8753 "configure"
8753 #include "confdefs.h"
8754 /* Override any gcc2 internal prototype to avoid an error.  */
8755 /* We use char because int might match the return type of a gcc2
8756     builtin and then its argument prototype would still apply.  */
8757 char XmStringFree();
8758
8759 int main() {
8760 XmStringFree()
8761 ; return 0; }
8762 EOF
8763 if { (eval echo configure:8764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8764   rm -rf conftest*
8765   eval "ac_cv_lib_$ac_lib_var=yes"
8766 else
8767   echo "configure: failed program was:" >&5
8768   cat conftest.$ac_ext >&5
8769   rm -rf conftest*
8770   eval "ac_cv_lib_$ac_lib_var=no"
8771 fi
8772 rm -f conftest*
8773 xe_check_libs=""
8774
8775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8776   echo "$ac_t""yes" 1>&6
8777   have_motif=yes
8778 else
8779   echo "$ac_t""no" 1>&6
8780 have_motif=no
8781 fi
8782
8783
8784 else
8785   echo "$ac_t""no" 1>&6
8786 have_motif=no
8787 fi
8788
8789
8790   if test "$have_motif" = "yes"; then
8791         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8792 echo "configure:8793: checking for Lesstif" >&5
8793     cat > conftest.$ac_ext <<EOF
8794 #line 8795 "configure"
8795 #include "confdefs.h"
8796 #include <Xm/Xm.h>
8797 #ifdef LESSTIF_VERSION
8798 yes
8799 #endif
8800
8801 EOF
8802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8803   egrep "yes" >/dev/null 2>&1; then
8804   rm -rf conftest*
8805   have_lesstif=yes
8806 else
8807   rm -rf conftest*
8808   have_lesstif=no
8809 fi
8810 rm -f conftest*
8811
8812   echo "$ac_t""$have_lesstif" 1>&6
8813   fi
8814
8815 fi 
8816
8817 case "$with_menubars" in "" | "yes" | "athena" )
8818   with_menubars="lucid" ;;
8819 esac
8820 case "$with_dialogs" in "" | "yes" | "lucid" )
8821   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8822   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8823   else with_dialogs=no
8824   fi ;;
8825 esac
8826 case "$with_scrollbars" in "" | "yes" )
8827   with_scrollbars="lucid" ;;
8828 esac
8829 case "$with_widgets" in "" | "yes" | "lucid")
8830   if   test "$have_motif" = "yes"; then with_widgets="motif"
8831   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8832   else with_widgets=no
8833   fi ;;
8834 esac
8835
8836 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8837
8838 case "$all_widgets" in
8839   *athena* )
8840     if test "$have_xaw" != "yes"; then
8841       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8842     fi
8843
8844         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8845
8846         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8847
8848                     { test "$extra_verbose" = "yes" && cat << EOF
8849     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
8850 EOF
8851 cat >> confdefs.h <<EOF
8852 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
8853 EOF
8854 }
8855
8856     { test "$extra_verbose" = "yes" && cat << EOF
8857     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
8858 EOF
8859 cat >> confdefs.h <<EOF
8860 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
8861 EOF
8862 }
8863
8864     { test "$extra_verbose" = "yes" && cat << EOF
8865     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
8866 EOF
8867 cat >> confdefs.h <<EOF
8868 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
8869 EOF
8870 }
8871
8872     { test "$extra_verbose" = "yes" && cat << EOF
8873     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
8874 EOF
8875 cat >> confdefs.h <<EOF
8876 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
8877 EOF
8878 }
8879
8880     { test "$extra_verbose" = "yes" && cat << EOF
8881     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
8882 EOF
8883 cat >> confdefs.h <<EOF
8884 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
8885 EOF
8886 }
8887
8888     { test "$extra_verbose" = "yes" && cat << EOF
8889     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
8890 EOF
8891 cat >> confdefs.h <<EOF
8892 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
8893 EOF
8894 }
8895
8896     { test "$extra_verbose" = "yes" && cat << EOF
8897     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
8898 EOF
8899 cat >> confdefs.h <<EOF
8900 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
8901 EOF
8902 }
8903
8904     { test "$extra_verbose" = "yes" && cat << EOF
8905     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
8906 EOF
8907 cat >> confdefs.h <<EOF
8908 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
8909 EOF
8910 }
8911
8912     { test "$extra_verbose" = "yes" && cat << EOF
8913     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
8914 EOF
8915 cat >> confdefs.h <<EOF
8916 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
8917 EOF
8918 }
8919
8920     { test "$extra_verbose" = "yes" && cat << EOF
8921     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
8922 EOF
8923 cat >> confdefs.h <<EOF
8924 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
8925 EOF
8926 }
8927
8928
8929     { test "$extra_verbose" = "yes" && cat << \EOF
8930     Defining LWLIB_USES_ATHENA
8931 EOF
8932 cat >> confdefs.h <<\EOF
8933 #define LWLIB_USES_ATHENA 1
8934 EOF
8935 }
8936
8937     { test "$extra_verbose" = "yes" && cat << \EOF
8938     Defining NEED_ATHENA
8939 EOF
8940 cat >> confdefs.h <<\EOF
8941 #define NEED_ATHENA 1
8942 EOF
8943 }
8944
8945     need_athena="yes"
8946
8947     if test "$athena_3d" = "yes"; then
8948       { test "$extra_verbose" = "yes" && cat << \EOF
8949     Defining HAVE_ATHENA_3D
8950 EOF
8951 cat >> confdefs.h <<\EOF
8952 #define HAVE_ATHENA_3D 1
8953 EOF
8954 }
8955
8956     fi
8957   ;;
8958 esac
8959
8960 case "$all_widgets" in *motif* )
8961   { test "$extra_verbose" = "yes" && cat << \EOF
8962     Defining LWLIB_USES_MOTIF
8963 EOF
8964 cat >> confdefs.h <<\EOF
8965 #define LWLIB_USES_MOTIF 1
8966 EOF
8967 }
8968
8969   { test "$extra_verbose" = "yes" && cat << \EOF
8970     Defining NEED_MOTIF
8971 EOF
8972 cat >> confdefs.h <<\EOF
8973 #define NEED_MOTIF 1
8974 EOF
8975 }
8976
8977   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8978   need_motif=yes ;;
8979 esac
8980
8981 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8982 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8983 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8984 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8985         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8986 case "$with_widgets" in athena* )
8987         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;;
8988 esac
8989 case "$all_widgets" in *lucid* )
8990   { test "$extra_verbose" = "yes" && cat << \EOF
8991     Defining NEED_LUCID
8992 EOF
8993 cat >> confdefs.h <<\EOF
8994 #define NEED_LUCID 1
8995 EOF
8996 }
8997
8998   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8999 esac
9000
9001
9002
9003 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9004     Defining LWLIB_SCROLLBARS_ATHENA
9005 EOF
9006 cat >> confdefs.h <<\EOF
9007 #define LWLIB_SCROLLBARS_ATHENA 1
9008 EOF
9009 }
9010
9011 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9012     Defining LWLIB_DIALOGS_ATHENA
9013 EOF
9014 cat >> confdefs.h <<\EOF
9015 #define LWLIB_DIALOGS_ATHENA 1
9016 EOF
9017 }
9018
9019
9020 if test "$athena_3d" = "yes"; then
9021   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9022     Defining LWLIB_SCROLLBARS_ATHENA3D
9023 EOF
9024 cat >> confdefs.h <<\EOF
9025 #define LWLIB_SCROLLBARS_ATHENA3D 1
9026 EOF
9027 }
9028
9029   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9030     Defining LWLIB_DIALOGS_ATHENA3D
9031 EOF
9032 cat >> confdefs.h <<\EOF
9033 #define LWLIB_DIALOGS_ATHENA3D 1
9034 EOF
9035 }
9036
9037 fi
9038
9039 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9040     Defining LWLIB_WIDGETS_ATHENA
9041 EOF
9042 cat >> confdefs.h <<\EOF
9043 #define LWLIB_WIDGETS_ATHENA 1
9044 EOF
9045 }
9046 ;; esac
9047 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9048         { test "$extra_verbose" = "yes" && cat << \EOF
9049     Defining LWLIB_TABS_LUCID
9050 EOF
9051 cat >> confdefs.h <<\EOF
9052 #define LWLIB_TABS_LUCID 1
9053 EOF
9054 }
9055
9056
9057 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9058     Defining HAVE_MENUBARS
9059 EOF
9060 cat >> confdefs.h <<\EOF
9061 #define HAVE_MENUBARS 1
9062 EOF
9063 }
9064
9065 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9066     Defining HAVE_SCROLLBARS
9067 EOF
9068 cat >> confdefs.h <<\EOF
9069 #define HAVE_SCROLLBARS 1
9070 EOF
9071 }
9072
9073 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9074     Defining HAVE_DIALOGS
9075 EOF
9076 cat >> confdefs.h <<\EOF
9077 #define HAVE_DIALOGS 1
9078 EOF
9079 }
9080
9081 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9082     Defining HAVE_TOOLBARS
9083 EOF
9084 cat >> confdefs.h <<\EOF
9085 #define HAVE_TOOLBARS 1
9086 EOF
9087 }
9088
9089 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9090     Defining HAVE_WIDGETS
9091 EOF
9092 cat >> confdefs.h <<\EOF
9093 #define HAVE_WIDGETS 1
9094 EOF
9095 }
9096
9097
9098 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9099     Defining LWLIB_MENUBARS_LUCID
9100 EOF
9101 cat >> confdefs.h <<\EOF
9102 #define LWLIB_MENUBARS_LUCID 1
9103 EOF
9104 }
9105
9106 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9107     Defining LWLIB_SCROLLBARS_LUCID
9108 EOF
9109 cat >> confdefs.h <<\EOF
9110 #define LWLIB_SCROLLBARS_LUCID 1
9111 EOF
9112 }
9113
9114
9115 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9116     Defining LWLIB_MENUBARS_MOTIF
9117 EOF
9118 cat >> confdefs.h <<\EOF
9119 #define LWLIB_MENUBARS_MOTIF 1
9120 EOF
9121 }
9122
9123 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9124     Defining LWLIB_SCROLLBARS_MOTIF
9125 EOF
9126 cat >> confdefs.h <<\EOF
9127 #define LWLIB_SCROLLBARS_MOTIF 1
9128 EOF
9129 }
9130
9131 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9132     Defining LWLIB_DIALOGS_MOTIF
9133 EOF
9134 cat >> confdefs.h <<\EOF
9135 #define LWLIB_DIALOGS_MOTIF 1
9136 EOF
9137 }
9138
9139 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9140     Defining LWLIB_WIDGETS_MOTIF
9141 EOF
9142 cat >> confdefs.h <<\EOF
9143 #define LWLIB_WIDGETS_MOTIF 1
9144 EOF
9145 }
9146
9147
9148 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9149    echo "    xemacs will be linked with \"menubar.o\""
9150  fi
9151 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9152    echo "    xemacs will be linked with \"scrollbar.o\""
9153  fi
9154 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9155    echo "    xemacs will be linked with \"dialog.o\""
9156  fi
9157 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9158    echo "    xemacs will be linked with \"toolbar.o\""
9159  fi
9160
9161 if test "$with_x11" = "yes"; then
9162   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9163    echo "    xemacs will be linked with \"menubar-x.o\""
9164  fi
9165   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9166    echo "    xemacs will be linked with \"scrollbar-x.o\""
9167  fi
9168   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9169    echo "    xemacs will be linked with \"dialog-x.o\""
9170  fi
9171   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9172    echo "    xemacs will be linked with \"toolbar-x.o\""
9173  fi
9174   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9175    echo "    xemacs will be linked with \"gui-x.o\""
9176  fi
9177 fi
9178
9179
9180 test -z "$with_mule" && with_mule=no
9181 test -z "$with_file_coding" && with_file_coding=no
9182
9183
9184 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9185   { test "$extra_verbose" = "yes" && cat << \EOF
9186     Defining FILE_CODING
9187 EOF
9188 cat >> confdefs.h <<\EOF
9189 #define FILE_CODING 1
9190 EOF
9191 }
9192
9193   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9194    echo "    xemacs will be linked with \"file-coding.o\""
9195  fi
9196 fi
9197
9198 if test "$with_mule" = "yes" ; then
9199   echo "checking for Mule-related features" 1>&6
9200 echo "configure:9201: checking for Mule-related features" >&5
9201   { test "$extra_verbose" = "yes" && cat << \EOF
9202     Defining MULE
9203 EOF
9204 cat >> confdefs.h <<\EOF
9205 #define MULE 1
9206 EOF
9207 }
9208
9209   { test "$extra_verbose" = "yes" && cat << \EOF
9210     Defining FILE_CODING
9211 EOF
9212 cat >> confdefs.h <<\EOF
9213 #define FILE_CODING 1
9214 EOF
9215 }
9216
9217   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9218    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9219  fi
9220
9221     for ac_hdr in libintl.h
9222 do
9223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9225 echo "configure:9226: checking for $ac_hdr" >&5
9226
9227 cat > conftest.$ac_ext <<EOF
9228 #line 9229 "configure"
9229 #include "confdefs.h"
9230 #include <$ac_hdr>
9231 EOF
9232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9233 { (eval echo configure:9234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9235 if test -z "$ac_err"; then
9236   rm -rf conftest*
9237   eval "ac_cv_header_$ac_safe=yes"
9238 else
9239   echo "$ac_err" >&5
9240   echo "configure: failed program was:" >&5
9241   cat conftest.$ac_ext >&5
9242   rm -rf conftest*
9243   eval "ac_cv_header_$ac_safe=no"
9244 fi
9245 rm -f conftest*
9246 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9247   echo "$ac_t""yes" 1>&6
9248     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9249   { test "$extra_verbose" = "yes" && cat << EOF
9250     Defining $ac_tr_hdr
9251 EOF
9252 cat >> confdefs.h <<EOF
9253 #define $ac_tr_hdr 1
9254 EOF
9255 }
9256  
9257 else
9258   echo "$ac_t""no" 1>&6
9259 fi
9260 done
9261
9262   
9263 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9264 echo "configure:9265: checking for strerror in -lintl" >&5
9265 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9266
9267 xe_check_libs=" -lintl "
9268 cat > conftest.$ac_ext <<EOF
9269 #line 9270 "configure"
9270 #include "confdefs.h"
9271 /* Override any gcc2 internal prototype to avoid an error.  */
9272 /* We use char because int might match the return type of a gcc2
9273     builtin and then its argument prototype would still apply.  */
9274 char strerror();
9275
9276 int main() {
9277 strerror()
9278 ; return 0; }
9279 EOF
9280 if { (eval echo configure:9281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9281   rm -rf conftest*
9282   eval "ac_cv_lib_$ac_lib_var=yes"
9283 else
9284   echo "configure: failed program was:" >&5
9285   cat conftest.$ac_ext >&5
9286   rm -rf conftest*
9287   eval "ac_cv_lib_$ac_lib_var=no"
9288 fi
9289 rm -f conftest*
9290 xe_check_libs=""
9291
9292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9293   echo "$ac_t""yes" 1>&6
9294     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9295     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9296   { test "$extra_verbose" = "yes" && cat << EOF
9297     Defining $ac_tr_lib
9298 EOF
9299 cat >> confdefs.h <<EOF
9300 #define $ac_tr_lib 1
9301 EOF
9302 }
9303
9304   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9305
9306 else
9307   echo "$ac_t""no" 1>&6
9308 fi
9309
9310
9311
9312   echo "checking for Mule input methods" 1>&6
9313 echo "configure:9314: checking for Mule input methods" >&5
9314         case "$with_xim" in "" | "yes" )
9315     echo "checking for XIM" 1>&6
9316 echo "configure:9317: checking for XIM" >&5
9317     
9318 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9319 echo "configure:9320: checking for XOpenIM in -lX11" >&5
9320 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9321
9322 xe_check_libs=" -lX11 "
9323 cat > conftest.$ac_ext <<EOF
9324 #line 9325 "configure"
9325 #include "confdefs.h"
9326 /* Override any gcc2 internal prototype to avoid an error.  */
9327 /* We use char because int might match the return type of a gcc2
9328     builtin and then its argument prototype would still apply.  */
9329 char XOpenIM();
9330
9331 int main() {
9332 XOpenIM()
9333 ; return 0; }
9334 EOF
9335 if { (eval echo configure:9336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9336   rm -rf conftest*
9337   eval "ac_cv_lib_$ac_lib_var=yes"
9338 else
9339   echo "configure: failed program was:" >&5
9340   cat conftest.$ac_ext >&5
9341   rm -rf conftest*
9342   eval "ac_cv_lib_$ac_lib_var=no"
9343 fi
9344 rm -f conftest*
9345 xe_check_libs=""
9346
9347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9348   echo "$ac_t""yes" 1>&6
9349   with_xim=xlib
9350 else
9351   echo "$ac_t""no" 1>&6
9352 with_xim=no
9353 fi
9354
9355
9356         if test "$have_motif $have_lesstif" = "yes no"; then
9357       
9358 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9359 echo "configure:9360: checking for XmImMbLookupString in -lXm" >&5
9360 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9361
9362 xe_check_libs=" -lXm "
9363 cat > conftest.$ac_ext <<EOF
9364 #line 9365 "configure"
9365 #include "confdefs.h"
9366 /* Override any gcc2 internal prototype to avoid an error.  */
9367 /* We use char because int might match the return type of a gcc2
9368     builtin and then its argument prototype would still apply.  */
9369 char XmImMbLookupString();
9370
9371 int main() {
9372 XmImMbLookupString()
9373 ; return 0; }
9374 EOF
9375 if { (eval echo configure:9376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9376   rm -rf conftest*
9377   eval "ac_cv_lib_$ac_lib_var=yes"
9378 else
9379   echo "configure: failed program was:" >&5
9380   cat conftest.$ac_ext >&5
9381   rm -rf conftest*
9382   eval "ac_cv_lib_$ac_lib_var=no"
9383 fi
9384 rm -f conftest*
9385 xe_check_libs=""
9386
9387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9388   echo "$ac_t""yes" 1>&6
9389   with_xim=motif
9390 else
9391   echo "$ac_t""no" 1>&6
9392 fi
9393
9394
9395     fi ;;
9396   esac
9397   if test "$with_xim" != "no"; then
9398     { test "$extra_verbose" = "yes" && cat << \EOF
9399     Defining HAVE_XIM
9400 EOF
9401 cat >> confdefs.h <<\EOF
9402 #define HAVE_XIM 1
9403 EOF
9404 }
9405
9406     if test "$with_xim" = "xlib"; then
9407       { test "$extra_verbose" = "yes" && cat << \EOF
9408     Defining XIM_XLIB
9409 EOF
9410 cat >> confdefs.h <<\EOF
9411 #define XIM_XLIB 1
9412 EOF
9413 }
9414
9415       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9416    echo "    xemacs will be linked with \"input-method-xlib.o\""
9417  fi
9418     fi
9419     if test "$with_xim" = "motif"; then
9420       { test "$extra_verbose" = "yes" && cat << \EOF
9421     Defining XIM_MOTIF
9422 EOF
9423 cat >> confdefs.h <<\EOF
9424 #define XIM_MOTIF 1
9425 EOF
9426 }
9427
9428       need_motif=yes
9429       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9430    echo "    xemacs will be linked with \"input-method-motif.o\""
9431  fi
9432     fi
9433     if test "$with_xim" = "motif"; then
9434       with_xfs=no
9435     fi
9436   fi
9437
9438     if test "$with_xfs" = "yes" ; then
9439     echo "checking for XFontSet" 1>&6
9440 echo "configure:9441: checking for XFontSet" >&5
9441     
9442 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9443 echo "configure:9444: checking for XmbDrawString in -lX11" >&5
9444 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9445
9446 xe_check_libs=" -lX11 "
9447 cat > conftest.$ac_ext <<EOF
9448 #line 9449 "configure"
9449 #include "confdefs.h"
9450 /* Override any gcc2 internal prototype to avoid an error.  */
9451 /* We use char because int might match the return type of a gcc2
9452     builtin and then its argument prototype would still apply.  */
9453 char XmbDrawString();
9454
9455 int main() {
9456 XmbDrawString()
9457 ; return 0; }
9458 EOF
9459 if { (eval echo configure:9460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9460   rm -rf conftest*
9461   eval "ac_cv_lib_$ac_lib_var=yes"
9462 else
9463   echo "configure: failed program was:" >&5
9464   cat conftest.$ac_ext >&5
9465   rm -rf conftest*
9466   eval "ac_cv_lib_$ac_lib_var=no"
9467 fi
9468 rm -f conftest*
9469 xe_check_libs=""
9470
9471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9472   echo "$ac_t""yes" 1>&6
9473   :
9474 else
9475   echo "$ac_t""no" 1>&6
9476 with_xfs=no
9477 fi
9478
9479
9480     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9481       { test "$extra_verbose" = "yes" && cat << \EOF
9482     Defining USE_XFONTSET
9483 EOF
9484 cat >> confdefs.h <<\EOF
9485 #define USE_XFONTSET 1
9486 EOF
9487 }
9488
9489       if test "$with_xim" = "no" ; then
9490         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9491    echo "    xemacs will be linked with \"input-method-xlib.o\""
9492  fi
9493       fi
9494     fi
9495   fi 
9496     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9497   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9498 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9499 echo "configure:9500: checking for wnn/jllib.h" >&5
9500
9501 cat > conftest.$ac_ext <<EOF
9502 #line 9503 "configure"
9503 #include "confdefs.h"
9504 #include <wnn/jllib.h>
9505 EOF
9506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9507 { (eval echo configure:9508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9509 if test -z "$ac_err"; then
9510   rm -rf conftest*
9511   eval "ac_cv_header_$ac_safe=yes"
9512 else
9513   echo "$ac_err" >&5
9514   echo "configure: failed program was:" >&5
9515   cat conftest.$ac_ext >&5
9516   rm -rf conftest*
9517   eval "ac_cv_header_$ac_safe=no"
9518 fi
9519 rm -f conftest*
9520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9521   echo "$ac_t""yes" 1>&6
9522   :
9523 else
9524   echo "$ac_t""no" 1>&6
9525 with_wnn=no
9526 fi
9527  }
9528     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
9529 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
9530 echo "configure:9531: checking for wnn/commonhd.h" >&5
9531
9532 cat > conftest.$ac_ext <<EOF
9533 #line 9534 "configure"
9534 #include "confdefs.h"
9535 #include <wnn/commonhd.h>
9536 EOF
9537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9538 { (eval echo configure:9539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9540 if test -z "$ac_err"; then
9541   rm -rf conftest*
9542   eval "ac_cv_header_$ac_safe=yes"
9543 else
9544   echo "$ac_err" >&5
9545   echo "configure: failed program was:" >&5
9546   cat conftest.$ac_ext >&5
9547   rm -rf conftest*
9548   eval "ac_cv_header_$ac_safe=no"
9549 fi
9550 rm -f conftest*
9551 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9552   echo "$ac_t""yes" 1>&6
9553   :
9554 else
9555   echo "$ac_t""no" 1>&6
9556 with_wnn=no
9557 fi
9558  }
9559     if test "$with_wnn" != "no"; then
9560     for ac_func in crypt
9561 do
9562 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9563 echo "configure:9564: checking for $ac_func" >&5
9564
9565 cat > conftest.$ac_ext <<EOF
9566 #line 9567 "configure"
9567 #include "confdefs.h"
9568 /* System header to define __stub macros and hopefully few prototypes,
9569     which can conflict with char $ac_func(); below.  */
9570 #include <assert.h>
9571 /* Override any gcc2 internal prototype to avoid an error.  */
9572 /* We use char because int might match the return type of a gcc2
9573     builtin and then its argument prototype would still apply.  */
9574 char $ac_func();
9575
9576 int main() {
9577
9578 /* The GNU C library defines this for functions which it implements
9579     to always fail with ENOSYS.  Some functions are actually named
9580     something starting with __ and the normal name is an alias.  */
9581 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9582 choke me
9583 #else
9584 $ac_func();
9585 #endif
9586
9587 ; return 0; }
9588 EOF
9589 if { (eval echo configure:9590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9590   rm -rf conftest*
9591   eval "ac_cv_func_$ac_func=yes"
9592 else
9593   echo "configure: failed program was:" >&5
9594   cat conftest.$ac_ext >&5
9595   rm -rf conftest*
9596   eval "ac_cv_func_$ac_func=no"
9597 fi
9598 rm -f conftest*
9599
9600 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9601   echo "$ac_t""yes" 1>&6
9602     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9603   { test "$extra_verbose" = "yes" && cat << EOF
9604     Defining $ac_tr_func
9605 EOF
9606 cat >> confdefs.h <<EOF
9607 #define $ac_tr_func 1
9608 EOF
9609 }
9610  
9611 else
9612   echo "$ac_t""no" 1>&6
9613 fi
9614 done
9615
9616     test "$ac_cv_func_crypt" != "yes" && { 
9617 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9618 echo "configure:9619: checking for crypt in -lcrypt" >&5
9619 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9620
9621 xe_check_libs=" -lcrypt "
9622 cat > conftest.$ac_ext <<EOF
9623 #line 9624 "configure"
9624 #include "confdefs.h"
9625 /* Override any gcc2 internal prototype to avoid an error.  */
9626 /* We use char because int might match the return type of a gcc2
9627     builtin and then its argument prototype would still apply.  */
9628 char crypt();
9629
9630 int main() {
9631 crypt()
9632 ; return 0; }
9633 EOF
9634 if { (eval echo configure:9635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9635   rm -rf conftest*
9636   eval "ac_cv_lib_$ac_lib_var=yes"
9637 else
9638   echo "configure: failed program was:" >&5
9639   cat conftest.$ac_ext >&5
9640   rm -rf conftest*
9641   eval "ac_cv_lib_$ac_lib_var=no"
9642 fi
9643 rm -f conftest*
9644 xe_check_libs=""
9645
9646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9647   echo "$ac_t""yes" 1>&6
9648     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9649     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9650   { test "$extra_verbose" = "yes" && cat << EOF
9651     Defining $ac_tr_lib
9652 EOF
9653 cat >> confdefs.h <<EOF
9654 #define $ac_tr_lib 1
9655 EOF
9656 }
9657
9658   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9659
9660 else
9661   echo "$ac_t""no" 1>&6
9662 fi
9663
9664  }
9665   fi
9666     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9667     
9668 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9669 echo "configure:9670: checking for jl_dic_list_e in -lwnn" >&5
9670 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9671
9672 xe_check_libs=" -lwnn "
9673 cat > conftest.$ac_ext <<EOF
9674 #line 9675 "configure"
9675 #include "confdefs.h"
9676 /* Override any gcc2 internal prototype to avoid an error.  */
9677 /* We use char because int might match the return type of a gcc2
9678     builtin and then its argument prototype would still apply.  */
9679 char jl_dic_list_e();
9680
9681 int main() {
9682 jl_dic_list_e()
9683 ; return 0; }
9684 EOF
9685 if { (eval echo configure:9686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9686   rm -rf conftest*
9687   eval "ac_cv_lib_$ac_lib_var=yes"
9688 else
9689   echo "configure: failed program was:" >&5
9690   cat conftest.$ac_ext >&5
9691   rm -rf conftest*
9692   eval "ac_cv_lib_$ac_lib_var=no"
9693 fi
9694 rm -f conftest*
9695 xe_check_libs=""
9696
9697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9698   echo "$ac_t""yes" 1>&6
9699   libwnn=wnn
9700 else
9701   echo "$ac_t""no" 1>&6
9702 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9703 echo "configure:9704: checking for jl_dic_list_e in -lwnn4" >&5
9704 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9705
9706 xe_check_libs=" -lwnn4 "
9707 cat > conftest.$ac_ext <<EOF
9708 #line 9709 "configure"
9709 #include "confdefs.h"
9710 /* Override any gcc2 internal prototype to avoid an error.  */
9711 /* We use char because int might match the return type of a gcc2
9712     builtin and then its argument prototype would still apply.  */
9713 char jl_dic_list_e();
9714
9715 int main() {
9716 jl_dic_list_e()
9717 ; return 0; }
9718 EOF
9719 if { (eval echo configure:9720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9720   rm -rf conftest*
9721   eval "ac_cv_lib_$ac_lib_var=yes"
9722 else
9723   echo "configure: failed program was:" >&5
9724   cat conftest.$ac_ext >&5
9725   rm -rf conftest*
9726   eval "ac_cv_lib_$ac_lib_var=no"
9727 fi
9728 rm -f conftest*
9729 xe_check_libs=""
9730
9731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9732   echo "$ac_t""yes" 1>&6
9733   libwnn=wnn4
9734 else
9735   echo "$ac_t""no" 1>&6
9736 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9737 echo "configure:9738: checking for jl_dic_list_e in -lwnn6" >&5
9738 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9739
9740 xe_check_libs=" -lwnn6 "
9741 cat > conftest.$ac_ext <<EOF
9742 #line 9743 "configure"
9743 #include "confdefs.h"
9744 /* Override any gcc2 internal prototype to avoid an error.  */
9745 /* We use char because int might match the return type of a gcc2
9746     builtin and then its argument prototype would still apply.  */
9747 char jl_dic_list_e();
9748
9749 int main() {
9750 jl_dic_list_e()
9751 ; return 0; }
9752 EOF
9753 if { (eval echo configure:9754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9754   rm -rf conftest*
9755   eval "ac_cv_lib_$ac_lib_var=yes"
9756 else
9757   echo "configure: failed program was:" >&5
9758   cat conftest.$ac_ext >&5
9759   rm -rf conftest*
9760   eval "ac_cv_lib_$ac_lib_var=no"
9761 fi
9762 rm -f conftest*
9763 xe_check_libs=""
9764
9765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9766   echo "$ac_t""yes" 1>&6
9767   libwnn=wnn6
9768 else
9769   echo "$ac_t""no" 1>&6
9770 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9771 echo "configure:9772: checking for dic_list_e in -lwnn6_fromsrc" >&5
9772 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9773
9774 xe_check_libs=" -lwnn6_fromsrc "
9775 cat > conftest.$ac_ext <<EOF
9776 #line 9777 "configure"
9777 #include "confdefs.h"
9778 /* Override any gcc2 internal prototype to avoid an error.  */
9779 /* We use char because int might match the return type of a gcc2
9780     builtin and then its argument prototype would still apply.  */
9781 char dic_list_e();
9782
9783 int main() {
9784 dic_list_e()
9785 ; return 0; }
9786 EOF
9787 if { (eval echo configure:9788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9788   rm -rf conftest*
9789   eval "ac_cv_lib_$ac_lib_var=yes"
9790 else
9791   echo "configure: failed program was:" >&5
9792   cat conftest.$ac_ext >&5
9793   rm -rf conftest*
9794   eval "ac_cv_lib_$ac_lib_var=no"
9795 fi
9796 rm -f conftest*
9797 xe_check_libs=""
9798
9799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9800   echo "$ac_t""yes" 1>&6
9801   libwnn=wnn6_fromsrc
9802 else
9803   echo "$ac_t""no" 1>&6
9804 with_wnn=no
9805 fi
9806
9807
9808 fi
9809
9810
9811 fi
9812
9813
9814 fi
9815
9816
9817   fi
9818   test -z "$with_wnn" && with_wnn=yes
9819   if test "$with_wnn" = "yes"; then
9820     { test "$extra_verbose" = "yes" && cat << \EOF
9821     Defining HAVE_WNN
9822 EOF
9823 cat >> confdefs.h <<\EOF
9824 #define HAVE_WNN 1
9825 EOF
9826 }
9827
9828     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9829     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9830    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9831  fi
9832     if test "$with_wnn6" != "no"; then
9833       
9834 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9835 echo "configure:9836: checking for jl_fi_dic_list in -l$libwnn" >&5
9836 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9837
9838 xe_check_libs=" -l$libwnn "
9839 cat > conftest.$ac_ext <<EOF
9840 #line 9841 "configure"
9841 #include "confdefs.h"
9842 /* Override any gcc2 internal prototype to avoid an error.  */
9843 /* We use char because int might match the return type of a gcc2
9844     builtin and then its argument prototype would still apply.  */
9845 char jl_fi_dic_list();
9846
9847 int main() {
9848 jl_fi_dic_list()
9849 ; return 0; }
9850 EOF
9851 if { (eval echo configure:9852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9852   rm -rf conftest*
9853   eval "ac_cv_lib_$ac_lib_var=yes"
9854 else
9855   echo "configure: failed program was:" >&5
9856   cat conftest.$ac_ext >&5
9857   rm -rf conftest*
9858   eval "ac_cv_lib_$ac_lib_var=no"
9859 fi
9860 rm -f conftest*
9861 xe_check_libs=""
9862
9863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9864   echo "$ac_t""yes" 1>&6
9865   with_wnn6=yes
9866 else
9867   echo "$ac_t""no" 1>&6
9868 fi
9869
9870
9871       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9872     Defining WNN6
9873 EOF
9874 cat >> confdefs.h <<\EOF
9875 #define WNN6 1
9876 EOF
9877 }
9878
9879     fi
9880   fi
9881
9882     canna_includes_found=no
9883   if test "$with_canna" != "no"; then
9884     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9885 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9886 echo "configure:9887: checking for canna/jrkanji.h" >&5
9887
9888 cat > conftest.$ac_ext <<EOF
9889 #line 9890 "configure"
9890 #include "confdefs.h"
9891 #include <canna/jrkanji.h>
9892 EOF
9893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9894 { (eval echo configure:9895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9896 if test -z "$ac_err"; then
9897   rm -rf conftest*
9898   eval "ac_cv_header_$ac_safe=yes"
9899 else
9900   echo "$ac_err" >&5
9901   echo "configure: failed program was:" >&5
9902   cat conftest.$ac_ext >&5
9903   rm -rf conftest*
9904   eval "ac_cv_header_$ac_safe=no"
9905 fi
9906 rm -f conftest*
9907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9908   echo "$ac_t""yes" 1>&6
9909   canna_includes_found=yes
9910 else
9911   echo "$ac_t""no" 1>&6
9912 fi
9913
9914   fi
9915   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9916       -d "/usr/local/canna/include"; then
9917     save_c_switch_site="$c_switch_site"
9918     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9919     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9920 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9921 echo "configure:9922: checking for canna/jrkanji.h" >&5
9922
9923 cat > conftest.$ac_ext <<EOF
9924 #line 9925 "configure"
9925 #include "confdefs.h"
9926 #include <canna/jrkanji.h>
9927 EOF
9928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9929 { (eval echo configure:9930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9931 if test -z "$ac_err"; then
9932   rm -rf conftest*
9933   eval "ac_cv_header_$ac_safe=yes"
9934 else
9935   echo "$ac_err" >&5
9936   echo "configure: failed program was:" >&5
9937   cat conftest.$ac_ext >&5
9938   rm -rf conftest*
9939   eval "ac_cv_header_$ac_safe=no"
9940 fi
9941 rm -f conftest*
9942 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9943   echo "$ac_t""yes" 1>&6
9944   canna_includes_found=yes
9945 else
9946   echo "$ac_t""no" 1>&6
9947 fi
9948
9949     if test "$canna_includes_found" != "yes"; then
9950       c_switch_site="$save_c_switch_site"
9951       with_canna="no"
9952     fi
9953   fi
9954
9955   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9956 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9957 echo "configure:9958: checking for canna/RK.h" >&5
9958
9959 cat > conftest.$ac_ext <<EOF
9960 #line 9961 "configure"
9961 #include "confdefs.h"
9962 #include <canna/RK.h>
9963 EOF
9964 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9965 { (eval echo configure:9966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9966 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9967 if test -z "$ac_err"; then
9968   rm -rf conftest*
9969   eval "ac_cv_header_$ac_safe=yes"
9970 else
9971   echo "$ac_err" >&5
9972   echo "configure: failed program was:" >&5
9973   cat conftest.$ac_ext >&5
9974   rm -rf conftest*
9975   eval "ac_cv_header_$ac_safe=no"
9976 fi
9977 rm -f conftest*
9978 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9979   echo "$ac_t""yes" 1>&6
9980   :
9981 else
9982   echo "$ac_t""no" 1>&6
9983 with_canna=no
9984 fi
9985  }
9986   test -z "$with_canna" && { 
9987 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9988 echo "configure:9989: checking for RkBgnBun in -lRKC" >&5
9989 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9990
9991 xe_check_libs=" -lRKC "
9992 cat > conftest.$ac_ext <<EOF
9993 #line 9994 "configure"
9994 #include "confdefs.h"
9995 /* Override any gcc2 internal prototype to avoid an error.  */
9996 /* We use char because int might match the return type of a gcc2
9997     builtin and then its argument prototype would still apply.  */
9998 char RkBgnBun();
9999
10000 int main() {
10001 RkBgnBun()
10002 ; return 0; }
10003 EOF
10004 if { (eval echo configure:10005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10005   rm -rf conftest*
10006   eval "ac_cv_lib_$ac_lib_var=yes"
10007 else
10008   echo "configure: failed program was:" >&5
10009   cat conftest.$ac_ext >&5
10010   rm -rf conftest*
10011   eval "ac_cv_lib_$ac_lib_var=no"
10012 fi
10013 rm -f conftest*
10014 xe_check_libs=""
10015
10016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10017   echo "$ac_t""yes" 1>&6
10018   :
10019 else
10020   echo "$ac_t""no" 1>&6
10021 with_canna=no
10022 fi
10023
10024  }
10025   test -z "$with_canna" && { 
10026 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10027 echo "configure:10028: checking for jrKanjiControl in -lcanna" >&5
10028 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10029
10030 xe_check_libs=" -lcanna "
10031 cat > conftest.$ac_ext <<EOF
10032 #line 10033 "configure"
10033 #include "confdefs.h"
10034 /* Override any gcc2 internal prototype to avoid an error.  */
10035 /* We use char because int might match the return type of a gcc2
10036     builtin and then its argument prototype would still apply.  */
10037 char jrKanjiControl();
10038
10039 int main() {
10040 jrKanjiControl()
10041 ; return 0; }
10042 EOF
10043 if { (eval echo configure:10044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10044   rm -rf conftest*
10045   eval "ac_cv_lib_$ac_lib_var=yes"
10046 else
10047   echo "configure: failed program was:" >&5
10048   cat conftest.$ac_ext >&5
10049   rm -rf conftest*
10050   eval "ac_cv_lib_$ac_lib_var=no"
10051 fi
10052 rm -f conftest*
10053 xe_check_libs=""
10054
10055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10056   echo "$ac_t""yes" 1>&6
10057   :
10058 else
10059   echo "$ac_t""no" 1>&6
10060 with_canna=no
10061 fi
10062
10063  }
10064   test -z "$with_canna" && with_canna=yes
10065   if test "$with_canna" = "yes"; then
10066     { test "$extra_verbose" = "yes" && cat << \EOF
10067     Defining HAVE_CANNA
10068 EOF
10069 cat >> confdefs.h <<\EOF
10070 #define HAVE_CANNA 1
10071 EOF
10072 }
10073
10074     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10075     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10076    echo "    xemacs will be linked with \"mule-canna.o\""
10077  fi
10078   fi
10079
10080 else   for feature in xim canna wnn; do
10081     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10082       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10083     fi
10084     eval "with_${feature}=no"
10085   done
10086 fi 
10087
10088 if test "$need_motif" = "yes" ; then
10089   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10090     
10091 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10092 echo "configure:10093: checking for layout_object_getvalue in -li18n" >&5
10093 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10094
10095 xe_check_libs=" -li18n "
10096 cat > conftest.$ac_ext <<EOF
10097 #line 10098 "configure"
10098 #include "confdefs.h"
10099 /* Override any gcc2 internal prototype to avoid an error.  */
10100 /* We use char because int might match the return type of a gcc2
10101     builtin and then its argument prototype would still apply.  */
10102 char layout_object_getvalue();
10103
10104 int main() {
10105 layout_object_getvalue()
10106 ; return 0; }
10107 EOF
10108 if { (eval echo configure:10109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10109   rm -rf conftest*
10110   eval "ac_cv_lib_$ac_lib_var=yes"
10111 else
10112   echo "configure: failed program was:" >&5
10113   cat conftest.$ac_ext >&5
10114   rm -rf conftest*
10115   eval "ac_cv_lib_$ac_lib_var=no"
10116 fi
10117 rm -f conftest*
10118 xe_check_libs=""
10119
10120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10121   echo "$ac_t""yes" 1>&6
10122   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10123 else
10124   echo "$ac_t""no" 1>&6
10125 fi
10126
10127
10128   
10129 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10130     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10131   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10132   
10133         runpath="" runpath_dirs=""
10134   if test -n "$LD_RUN_PATH"; then
10135     runpath="$LD_RUN_PATH"
10136   elif test "$GCC" = "yes"; then
10137         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10138     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10139     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10140     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10141       case "$arg" in P,* | -L* | -R* )
10142         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10143           {
10144 xe_runpath_dir="$dir"
10145   test "$xe_runpath_dir" != "/lib"     -a \
10146         "$xe_runpath_dir" != "/usr/lib" -a \
10147         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10148   eval "$xe_add_unique_runpath_dir"
10149 }
10150         done ;;
10151       esac
10152     done
10153     ld_switch_run="$ld_switch_run_save"
10154     rm -f conftest*
10155   else
10156         for arg in $ld_switch_site $ld_switch_x_site; do
10157       case "$arg" in -L*) {
10158 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10159   test "$xe_runpath_dir" != "/lib"     -a \
10160         "$xe_runpath_dir" != "/usr/lib" -a \
10161         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10162   eval "$xe_add_unique_runpath_dir"
10163 };; esac
10164     done
10165         if test "$opsys $need_motif" = "sol2 yes"; then
10166       xe_runpath_dir="/opt/SUNWdt/lib";
10167       eval "$xe_add_unique_runpath_dir";
10168     fi
10169   fi 
10170   if test -n "$runpath"; then
10171     ld_switch_run="${dash_r}${runpath}"
10172     
10173 if test "$GCC" = "yes"; then
10174   set x $ld_switch_run; shift; ld_switch_run=""
10175   while test -n "$1"; do
10176     case $1 in
10177       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10178       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10179       -Xlinker* ) ;;
10180       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10181     esac
10182     shift
10183   done
10184 fi
10185     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10186   fi
10187 fi
10188
10189 fi
10190
10191 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
10192 do
10193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10194 echo "configure:10195: checking for $ac_func" >&5
10195
10196 cat > conftest.$ac_ext <<EOF
10197 #line 10198 "configure"
10198 #include "confdefs.h"
10199 /* System header to define __stub macros and hopefully few prototypes,
10200     which can conflict with char $ac_func(); below.  */
10201 #include <assert.h>
10202 /* Override any gcc2 internal prototype to avoid an error.  */
10203 /* We use char because int might match the return type of a gcc2
10204     builtin and then its argument prototype would still apply.  */
10205 char $ac_func();
10206
10207 int main() {
10208
10209 /* The GNU C library defines this for functions which it implements
10210     to always fail with ENOSYS.  Some functions are actually named
10211     something starting with __ and the normal name is an alias.  */
10212 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10213 choke me
10214 #else
10215 $ac_func();
10216 #endif
10217
10218 ; return 0; }
10219 EOF
10220 if { (eval echo configure:10221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10221   rm -rf conftest*
10222   eval "ac_cv_func_$ac_func=yes"
10223 else
10224   echo "configure: failed program was:" >&5
10225   cat conftest.$ac_ext >&5
10226   rm -rf conftest*
10227   eval "ac_cv_func_$ac_func=no"
10228 fi
10229 rm -f conftest*
10230
10231 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10232   echo "$ac_t""yes" 1>&6
10233     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10234   { test "$extra_verbose" = "yes" && cat << EOF
10235     Defining $ac_tr_func
10236 EOF
10237 cat >> confdefs.h <<EOF
10238 #define $ac_tr_func 1
10239 EOF
10240 }
10241  
10242 else
10243   echo "$ac_t""no" 1>&6
10244 fi
10245 done
10246
10247
10248
10249 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10250 do
10251 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10252 echo "configure:10253: checking for $ac_func" >&5
10253
10254 cat > conftest.$ac_ext <<EOF
10255 #line 10256 "configure"
10256 #include "confdefs.h"
10257 /* System header to define __stub macros and hopefully few prototypes,
10258     which can conflict with char $ac_func(); below.  */
10259 #include <assert.h>
10260 /* Override any gcc2 internal prototype to avoid an error.  */
10261 /* We use char because int might match the return type of a gcc2
10262     builtin and then its argument prototype would still apply.  */
10263 char $ac_func();
10264
10265 int main() {
10266
10267 /* The GNU C library defines this for functions which it implements
10268     to always fail with ENOSYS.  Some functions are actually named
10269     something starting with __ and the normal name is an alias.  */
10270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10271 choke me
10272 #else
10273 $ac_func();
10274 #endif
10275
10276 ; return 0; }
10277 EOF
10278 if { (eval echo configure:10279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10279   rm -rf conftest*
10280   eval "ac_cv_func_$ac_func=yes"
10281 else
10282   echo "configure: failed program was:" >&5
10283   cat conftest.$ac_ext >&5
10284   rm -rf conftest*
10285   eval "ac_cv_func_$ac_func=no"
10286 fi
10287 rm -f conftest*
10288
10289 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10290   echo "$ac_t""yes" 1>&6
10291     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10292   { test "$extra_verbose" = "yes" && cat << EOF
10293     Defining $ac_tr_func
10294 EOF
10295 cat >> confdefs.h <<EOF
10296 #define $ac_tr_func 1
10297 EOF
10298 }
10299  
10300 else
10301   echo "$ac_t""no" 1>&6
10302 fi
10303 done
10304
10305
10306 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10307 echo "configure:10308: checking for openpty" >&5
10308
10309 cat > conftest.$ac_ext <<EOF
10310 #line 10311 "configure"
10311 #include "confdefs.h"
10312 /* System header to define __stub macros and hopefully few prototypes,
10313     which can conflict with char openpty(); below.  */
10314 #include <assert.h>
10315 /* Override any gcc2 internal prototype to avoid an error.  */
10316 /* We use char because int might match the return type of a gcc2
10317     builtin and then its argument prototype would still apply.  */
10318 char openpty();
10319
10320 int main() {
10321
10322 /* The GNU C library defines this for functions which it implements
10323     to always fail with ENOSYS.  Some functions are actually named
10324     something starting with __ and the normal name is an alias.  */
10325 #if defined (__stub_openpty) || defined (__stub___openpty)
10326 choke me
10327 #else
10328 openpty();
10329 #endif
10330
10331 ; return 0; }
10332 EOF
10333 if { (eval echo configure:10334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10334   rm -rf conftest*
10335   eval "ac_cv_func_openpty=yes"
10336 else
10337   echo "configure: failed program was:" >&5
10338   cat conftest.$ac_ext >&5
10339   rm -rf conftest*
10340   eval "ac_cv_func_openpty=no"
10341 fi
10342 rm -f conftest*
10343
10344 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10345   echo "$ac_t""yes" 1>&6
10346   have_openpty=yes
10347 else
10348   echo "$ac_t""no" 1>&6
10349
10350   
10351 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10352 echo "configure:10353: checking for openpty in -lutil" >&5
10353 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10354
10355 xe_check_libs=" -lutil "
10356 cat > conftest.$ac_ext <<EOF
10357 #line 10358 "configure"
10358 #include "confdefs.h"
10359 /* Override any gcc2 internal prototype to avoid an error.  */
10360 /* We use char because int might match the return type of a gcc2
10361     builtin and then its argument prototype would still apply.  */
10362 char openpty();
10363
10364 int main() {
10365 openpty()
10366 ; return 0; }
10367 EOF
10368 if { (eval echo configure:10369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10369   rm -rf conftest*
10370   eval "ac_cv_lib_$ac_lib_var=yes"
10371 else
10372   echo "configure: failed program was:" >&5
10373   cat conftest.$ac_ext >&5
10374   rm -rf conftest*
10375   eval "ac_cv_lib_$ac_lib_var=no"
10376 fi
10377 rm -f conftest*
10378 xe_check_libs=""
10379
10380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10381   echo "$ac_t""yes" 1>&6
10382   have_openpty=yes need_libutil=yes
10383 else
10384   echo "$ac_t""no" 1>&6
10385 fi
10386
10387
10388 fi
10389
10390 if test "$have_openpty" = "yes"; then
10391   { test "$extra_verbose" = "yes" && cat << \EOF
10392     Defining HAVE_OPENPTY
10393 EOF
10394 cat >> confdefs.h <<\EOF
10395 #define HAVE_OPENPTY 1
10396 EOF
10397 }
10398
10399   for ac_hdr in pty.h libutil.h util.h
10400 do
10401 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10402 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10403 echo "configure:10404: checking for $ac_hdr" >&5
10404
10405 cat > conftest.$ac_ext <<EOF
10406 #line 10407 "configure"
10407 #include "confdefs.h"
10408 #include <$ac_hdr>
10409 EOF
10410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10411 { (eval echo configure:10412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10413 if test -z "$ac_err"; then
10414   rm -rf conftest*
10415   eval "ac_cv_header_$ac_safe=yes"
10416 else
10417   echo "$ac_err" >&5
10418   echo "configure: failed program was:" >&5
10419   cat conftest.$ac_ext >&5
10420   rm -rf conftest*
10421   eval "ac_cv_header_$ac_safe=no"
10422 fi
10423 rm -f conftest*
10424 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10425   echo "$ac_t""yes" 1>&6
10426     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10427   { test "$extra_verbose" = "yes" && cat << EOF
10428     Defining $ac_tr_hdr
10429 EOF
10430 cat >> confdefs.h <<EOF
10431 #define $ac_tr_hdr 1
10432 EOF
10433 }
10434  break
10435 else
10436   echo "$ac_t""no" 1>&6
10437 fi
10438 done
10439
10440   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
10441 fi
10442
10443 for ac_hdr in stropts.h
10444 do
10445 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10446 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10447 echo "configure:10448: checking for $ac_hdr" >&5
10448
10449 cat > conftest.$ac_ext <<EOF
10450 #line 10451 "configure"
10451 #include "confdefs.h"
10452 #include <$ac_hdr>
10453 EOF
10454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10455 { (eval echo configure:10456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10457 if test -z "$ac_err"; then
10458   rm -rf conftest*
10459   eval "ac_cv_header_$ac_safe=yes"
10460 else
10461   echo "$ac_err" >&5
10462   echo "configure: failed program was:" >&5
10463   cat conftest.$ac_ext >&5
10464   rm -rf conftest*
10465   eval "ac_cv_header_$ac_safe=no"
10466 fi
10467 rm -f conftest*
10468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10469   echo "$ac_t""yes" 1>&6
10470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10471   { test "$extra_verbose" = "yes" && cat << EOF
10472     Defining $ac_tr_hdr
10473 EOF
10474 cat >> confdefs.h <<EOF
10475 #define $ac_tr_hdr 1
10476 EOF
10477 }
10478  
10479 else
10480   echo "$ac_t""no" 1>&6
10481 fi
10482 done
10483
10484 if test "$ac_cv_header_stropts_h" = "yes"; then
10485   for ac_func in isastream
10486 do
10487 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10488 echo "configure:10489: checking for $ac_func" >&5
10489
10490 cat > conftest.$ac_ext <<EOF
10491 #line 10492 "configure"
10492 #include "confdefs.h"
10493 /* System header to define __stub macros and hopefully few prototypes,
10494     which can conflict with char $ac_func(); below.  */
10495 #include <assert.h>
10496 /* Override any gcc2 internal prototype to avoid an error.  */
10497 /* We use char because int might match the return type of a gcc2
10498     builtin and then its argument prototype would still apply.  */
10499 char $ac_func();
10500
10501 int main() {
10502
10503 /* The GNU C library defines this for functions which it implements
10504     to always fail with ENOSYS.  Some functions are actually named
10505     something starting with __ and the normal name is an alias.  */
10506 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10507 choke me
10508 #else
10509 $ac_func();
10510 #endif
10511
10512 ; return 0; }
10513 EOF
10514 if { (eval echo configure:10515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10515   rm -rf conftest*
10516   eval "ac_cv_func_$ac_func=yes"
10517 else
10518   echo "configure: failed program was:" >&5
10519   cat conftest.$ac_ext >&5
10520   rm -rf conftest*
10521   eval "ac_cv_func_$ac_func=no"
10522 fi
10523 rm -f conftest*
10524
10525 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10526   echo "$ac_t""yes" 1>&6
10527     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10528   { test "$extra_verbose" = "yes" && cat << EOF
10529     Defining $ac_tr_func
10530 EOF
10531 cat >> confdefs.h <<EOF
10532 #define $ac_tr_func 1
10533 EOF
10534 }
10535  
10536 else
10537   echo "$ac_t""no" 1>&6
10538 fi
10539 done
10540
10541   for ac_hdr in strtio.h
10542 do
10543 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10544 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10545 echo "configure:10546: checking for $ac_hdr" >&5
10546
10547 cat > conftest.$ac_ext <<EOF
10548 #line 10549 "configure"
10549 #include "confdefs.h"
10550 #include <$ac_hdr>
10551 EOF
10552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10553 { (eval echo configure:10554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10555 if test -z "$ac_err"; then
10556   rm -rf conftest*
10557   eval "ac_cv_header_$ac_safe=yes"
10558 else
10559   echo "$ac_err" >&5
10560   echo "configure: failed program was:" >&5
10561   cat conftest.$ac_ext >&5
10562   rm -rf conftest*
10563   eval "ac_cv_header_$ac_safe=no"
10564 fi
10565 rm -f conftest*
10566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10567   echo "$ac_t""yes" 1>&6
10568     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10569   { test "$extra_verbose" = "yes" && cat << EOF
10570     Defining $ac_tr_hdr
10571 EOF
10572 cat >> confdefs.h <<EOF
10573 #define $ac_tr_hdr 1
10574 EOF
10575 }
10576  
10577 else
10578   echo "$ac_t""no" 1>&6
10579 fi
10580 done
10581  fi
10582
10583 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
10584    echo "    xemacs will be linked with \"realpath.o\""
10585  fi
10586
10587 for ac_func in getloadavg
10588 do
10589 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10590 echo "configure:10591: checking for $ac_func" >&5
10591
10592 cat > conftest.$ac_ext <<EOF
10593 #line 10594 "configure"
10594 #include "confdefs.h"
10595 /* System header to define __stub macros and hopefully few prototypes,
10596     which can conflict with char $ac_func(); below.  */
10597 #include <assert.h>
10598 /* Override any gcc2 internal prototype to avoid an error.  */
10599 /* We use char because int might match the return type of a gcc2
10600     builtin and then its argument prototype would still apply.  */
10601 char $ac_func();
10602
10603 int main() {
10604
10605 /* The GNU C library defines this for functions which it implements
10606     to always fail with ENOSYS.  Some functions are actually named
10607     something starting with __ and the normal name is an alias.  */
10608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10609 choke me
10610 #else
10611 $ac_func();
10612 #endif
10613
10614 ; return 0; }
10615 EOF
10616 if { (eval echo configure:10617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10617   rm -rf conftest*
10618   eval "ac_cv_func_$ac_func=yes"
10619 else
10620   echo "configure: failed program was:" >&5
10621   cat conftest.$ac_ext >&5
10622   rm -rf conftest*
10623   eval "ac_cv_func_$ac_func=no"
10624 fi
10625 rm -f conftest*
10626
10627 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10628   echo "$ac_t""yes" 1>&6
10629     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10630   { test "$extra_verbose" = "yes" && cat << EOF
10631     Defining $ac_tr_func
10632 EOF
10633 cat >> confdefs.h <<EOF
10634 #define $ac_tr_func 1
10635 EOF
10636 }
10637  
10638 else
10639   echo "$ac_t""no" 1>&6
10640 fi
10641 done
10642
10643
10644 if test "$ac_cv_func_getloadavg" = "yes"; then
10645         for ac_hdr in sys/loadavg.h
10646 do
10647 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10648 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10649 echo "configure:10650: checking for $ac_hdr" >&5
10650
10651 cat > conftest.$ac_ext <<EOF
10652 #line 10653 "configure"
10653 #include "confdefs.h"
10654 #include <$ac_hdr>
10655 EOF
10656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10657 { (eval echo configure:10658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10659 if test -z "$ac_err"; then
10660   rm -rf conftest*
10661   eval "ac_cv_header_$ac_safe=yes"
10662 else
10663   echo "$ac_err" >&5
10664   echo "configure: failed program was:" >&5
10665   cat conftest.$ac_ext >&5
10666   rm -rf conftest*
10667   eval "ac_cv_header_$ac_safe=no"
10668 fi
10669 rm -f conftest*
10670 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10671   echo "$ac_t""yes" 1>&6
10672     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10673   { test "$extra_verbose" = "yes" && cat << EOF
10674     Defining $ac_tr_hdr
10675 EOF
10676 cat >> confdefs.h <<EOF
10677 #define $ac_tr_hdr 1
10678 EOF
10679 }
10680  
10681 else
10682   echo "$ac_t""no" 1>&6
10683 fi
10684 done
10685
10686 else
10687     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10688    echo "    xemacs will be linked with \"getloadavg.o\""
10689  fi
10690
10691     
10692 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10693 echo "configure:10694: checking for kstat_open in -lkstat" >&5
10694 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10695
10696 xe_check_libs=" -lkstat "
10697 cat > conftest.$ac_ext <<EOF
10698 #line 10699 "configure"
10699 #include "confdefs.h"
10700 /* Override any gcc2 internal prototype to avoid an error.  */
10701 /* We use char because int might match the return type of a gcc2
10702     builtin and then its argument prototype would still apply.  */
10703 char kstat_open();
10704
10705 int main() {
10706 kstat_open()
10707 ; return 0; }
10708 EOF
10709 if { (eval echo configure:10710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10710   rm -rf conftest*
10711   eval "ac_cv_lib_$ac_lib_var=yes"
10712 else
10713   echo "configure: failed program was:" >&5
10714   cat conftest.$ac_ext >&5
10715   rm -rf conftest*
10716   eval "ac_cv_lib_$ac_lib_var=no"
10717 fi
10718 rm -f conftest*
10719 xe_check_libs=""
10720
10721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10722   echo "$ac_t""yes" 1>&6
10723     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10724     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10725   { test "$extra_verbose" = "yes" && cat << EOF
10726     Defining $ac_tr_lib
10727 EOF
10728 cat >> confdefs.h <<EOF
10729 #define $ac_tr_lib 1
10730 EOF
10731 }
10732
10733   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10734
10735 else
10736   echo "$ac_t""no" 1>&6
10737 fi
10738
10739
10740   for ac_hdr in kstat.h
10741 do
10742 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10743 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10744 echo "configure:10745: checking for $ac_hdr" >&5
10745
10746 cat > conftest.$ac_ext <<EOF
10747 #line 10748 "configure"
10748 #include "confdefs.h"
10749 #include <$ac_hdr>
10750 EOF
10751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10752 { (eval echo configure:10753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10754 if test -z "$ac_err"; then
10755   rm -rf conftest*
10756   eval "ac_cv_header_$ac_safe=yes"
10757 else
10758   echo "$ac_err" >&5
10759   echo "configure: failed program was:" >&5
10760   cat conftest.$ac_ext >&5
10761   rm -rf conftest*
10762   eval "ac_cv_header_$ac_safe=no"
10763 fi
10764 rm -f conftest*
10765 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10766   echo "$ac_t""yes" 1>&6
10767     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10768   { test "$extra_verbose" = "yes" && cat << EOF
10769     Defining $ac_tr_hdr
10770 EOF
10771 cat >> confdefs.h <<EOF
10772 #define $ac_tr_hdr 1
10773 EOF
10774 }
10775  
10776 else
10777   echo "$ac_t""no" 1>&6
10778 fi
10779 done
10780
10781
10782     
10783 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10784 echo "configure:10785: checking for kvm_read in -lkvm" >&5
10785 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10786
10787 xe_check_libs=" -lkvm "
10788 cat > conftest.$ac_ext <<EOF
10789 #line 10790 "configure"
10790 #include "confdefs.h"
10791 /* Override any gcc2 internal prototype to avoid an error.  */
10792 /* We use char because int might match the return type of a gcc2
10793     builtin and then its argument prototype would still apply.  */
10794 char kvm_read();
10795
10796 int main() {
10797 kvm_read()
10798 ; return 0; }
10799 EOF
10800 if { (eval echo configure:10801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10801   rm -rf conftest*
10802   eval "ac_cv_lib_$ac_lib_var=yes"
10803 else
10804   echo "configure: failed program was:" >&5
10805   cat conftest.$ac_ext >&5
10806   rm -rf conftest*
10807   eval "ac_cv_lib_$ac_lib_var=no"
10808 fi
10809 rm -f conftest*
10810 xe_check_libs=""
10811
10812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10813   echo "$ac_t""yes" 1>&6
10814     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10815     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10816   { test "$extra_verbose" = "yes" && cat << EOF
10817     Defining $ac_tr_lib
10818 EOF
10819 cat >> confdefs.h <<EOF
10820 #define $ac_tr_lib 1
10821 EOF
10822 }
10823
10824   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10825
10826 else
10827   echo "$ac_t""no" 1>&6
10828 fi
10829
10830
10831 fi
10832
10833 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10834 echo "configure:10835: checking whether netdb declares h_errno" >&5
10835 cat > conftest.$ac_ext <<EOF
10836 #line 10837 "configure"
10837 #include "confdefs.h"
10838 #include <netdb.h>
10839 int main() {
10840 return h_errno;
10841 ; return 0; }
10842 EOF
10843 if { (eval echo configure:10844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10844   rm -rf conftest*
10845   echo "$ac_t""yes" 1>&6
10846    { test "$extra_verbose" = "yes" && cat << \EOF
10847     Defining HAVE_H_ERRNO
10848 EOF
10849 cat >> confdefs.h <<\EOF
10850 #define HAVE_H_ERRNO 1
10851 EOF
10852 }
10853
10854 else
10855   echo "configure: failed program was:" >&5
10856   cat conftest.$ac_ext >&5
10857   rm -rf conftest*
10858   echo "$ac_t""no" 1>&6
10859 fi
10860 rm -f conftest*
10861
10862 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10863 echo "configure:10864: checking for sigsetjmp" >&5
10864 cat > conftest.$ac_ext <<EOF
10865 #line 10866 "configure"
10866 #include "confdefs.h"
10867 #include <setjmp.h>
10868 int main() {
10869 sigjmp_buf bar; sigsetjmp (bar, 0);
10870 ; return 0; }
10871 EOF
10872 if { (eval echo configure:10873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10873   rm -rf conftest*
10874   echo "$ac_t""yes" 1>&6
10875    { test "$extra_verbose" = "yes" && cat << \EOF
10876     Defining HAVE_SIGSETJMP
10877 EOF
10878 cat >> confdefs.h <<\EOF
10879 #define HAVE_SIGSETJMP 1
10880 EOF
10881 }
10882
10883 else
10884   echo "configure: failed program was:" >&5
10885   cat conftest.$ac_ext >&5
10886   rm -rf conftest*
10887   echo "$ac_t""no" 1>&6
10888 fi
10889 rm -f conftest*
10890
10891 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10892 echo "configure:10893: checking whether localtime caches TZ" >&5
10893
10894 if test "$ac_cv_func_tzset" = "yes"; then
10895 cat > conftest.$ac_ext <<EOF
10896 #line 10897 "configure"
10897 #include "confdefs.h"
10898 #include <time.h>
10899 #if STDC_HEADERS
10900 # include <stdlib.h>
10901 #endif
10902 extern char **environ;
10903 unset_TZ ()
10904 {
10905   char **from, **to;
10906   for (to = from = environ; (*to = *from); from++)
10907     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10908       to++;
10909 }
10910 char TZ_GMT0[] = "TZ=GMT0";
10911 char TZ_PST8[] = "TZ=PST8";
10912 main()
10913 {
10914   time_t now = time ((time_t *) 0);
10915   int hour_GMT0, hour_unset;
10916   if (putenv (TZ_GMT0) != 0)
10917     exit (1);
10918   hour_GMT0 = localtime (&now)->tm_hour;
10919   unset_TZ ();
10920   hour_unset = localtime (&now)->tm_hour;
10921   if (putenv (TZ_PST8) != 0)
10922     exit (1);
10923   if (localtime (&now)->tm_hour == hour_GMT0)
10924     exit (1);
10925   unset_TZ ();
10926   if (localtime (&now)->tm_hour != hour_unset)
10927     exit (1);
10928   exit (0);
10929 }
10930 EOF
10931 if { (eval echo configure:10932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10932 then
10933   emacs_cv_localtime_cache=no
10934 else
10935   conftest_rc="$?"
10936   echo "configure: failed program was:" >&5
10937   cat conftest.$ac_ext >&5
10938   rm -fr conftest*
10939   emacs_cv_localtime_cache=yes
10940 fi
10941 rm -fr conftest*
10942 else
10943         # If we lack tzset, report that localtime does not cache TZ,
10944         # since we can't invalidate the cache if we don't have tzset.
10945         emacs_cv_localtime_cache=no
10946 fi
10947 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10948 if test $emacs_cv_localtime_cache = yes; then
10949   { test "$extra_verbose" = "yes" && cat << \EOF
10950     Defining LOCALTIME_CACHE
10951 EOF
10952 cat >> confdefs.h <<\EOF
10953 #define LOCALTIME_CACHE 1
10954 EOF
10955 }
10956
10957 fi
10958
10959 if test "$HAVE_TIMEVAL" = "yes"; then
10960 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10961 echo "configure:10962: checking whether gettimeofday accepts one or two arguments" >&5
10962 cat > conftest.$ac_ext <<EOF
10963 #line 10964 "configure"
10964 #include "confdefs.h"
10965
10966 #ifdef TIME_WITH_SYS_TIME
10967 #include <sys/time.h>
10968 #include <time.h>
10969 #else
10970 #ifdef HAVE_SYS_TIME_H
10971 #include <sys/time.h>
10972 #else
10973 #include <time.h>
10974 #endif
10975 #endif
10976   
10977 int main() {
10978
10979   struct timeval time;
10980   gettimeofday (&time, 0);
10981
10982 ; return 0; }
10983 EOF
10984 if { (eval echo configure:10985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10985   rm -rf conftest*
10986   echo "$ac_t""two" 1>&6
10987 else
10988   echo "configure: failed program was:" >&5
10989   cat conftest.$ac_ext >&5
10990   rm -rf conftest*
10991   echo "$ac_t""one" 1>&6
10992    { test "$extra_verbose" = "yes" && cat << \EOF
10993     Defining GETTIMEOFDAY_ONE_ARGUMENT
10994 EOF
10995 cat >> confdefs.h <<\EOF
10996 #define GETTIMEOFDAY_ONE_ARGUMENT 1
10997 EOF
10998 }
10999
11000 fi
11001 rm -f conftest*
11002 fi
11003
11004
11005 echo $ac_n "checking for inline""... $ac_c" 1>&6
11006 echo "configure:11007: checking for inline" >&5
11007
11008 ac_cv_c_inline=no
11009 for ac_kw in inline __inline__ __inline; do
11010   cat > conftest.$ac_ext <<EOF
11011 #line 11012 "configure"
11012 #include "confdefs.h"
11013
11014 int main() {
11015 } $ac_kw foo() {
11016 ; return 0; }
11017 EOF
11018 if { (eval echo configure:11019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11019   rm -rf conftest*
11020   ac_cv_c_inline=$ac_kw; break
11021 else
11022   echo "configure: failed program was:" >&5
11023   cat conftest.$ac_ext >&5
11024 fi
11025 rm -f conftest*
11026 done
11027
11028
11029 echo "$ac_t""$ac_cv_c_inline" 1>&6
11030 case "$ac_cv_c_inline" in
11031   inline | yes) ;;
11032   no) { test "$extra_verbose" = "yes" && cat << \EOF
11033     Defining inline = 
11034 EOF
11035 cat >> confdefs.h <<\EOF
11036 #define inline 
11037 EOF
11038 }
11039  ;;
11040   *)  { test "$extra_verbose" = "yes" && cat << EOF
11041     Defining inline = $ac_cv_c_inline
11042 EOF
11043 cat >> confdefs.h <<EOF
11044 #define inline $ac_cv_c_inline
11045 EOF
11046 }
11047  ;;
11048 esac
11049
11050 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11051    echo "    xemacs will be linked with \"inline.o\""
11052  fi
11053
11054
11055 if test "$__DECC" != "yes"; then
11056   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11057 # for constant arguments.  Useless!
11058 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11059 echo "configure:11060: checking for working alloca.h" >&5
11060
11061 cat > conftest.$ac_ext <<EOF
11062 #line 11063 "configure"
11063 #include "confdefs.h"
11064 #include <alloca.h>
11065 int main() {
11066 char *p = alloca(2 * sizeof(int));
11067 ; return 0; }
11068 EOF
11069 if { (eval echo configure:11070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11070   rm -rf conftest*
11071   ac_cv_header_alloca_h=yes
11072 else
11073   echo "configure: failed program was:" >&5
11074   cat conftest.$ac_ext >&5
11075   rm -rf conftest*
11076   ac_cv_header_alloca_h=no
11077 fi
11078 rm -f conftest*
11079
11080 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11081 if test $ac_cv_header_alloca_h = yes; then
11082   { test "$extra_verbose" = "yes" && cat << \EOF
11083     Defining HAVE_ALLOCA_H
11084 EOF
11085 cat >> confdefs.h <<\EOF
11086 #define HAVE_ALLOCA_H 1
11087 EOF
11088 }
11089
11090 fi
11091
11092 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11093 echo "configure:11094: checking for alloca" >&5
11094
11095 cat > conftest.$ac_ext <<EOF
11096 #line 11097 "configure"
11097 #include "confdefs.h"
11098
11099 #ifdef __GNUC__
11100 # define alloca __builtin_alloca
11101 #else
11102 # ifdef _MSC_VER
11103 #  include <malloc.h>
11104 #  define alloca _alloca
11105 # else
11106 #  if HAVE_ALLOCA_H
11107 #   include <alloca.h>
11108 #  else
11109 #   ifdef _AIX
11110  #pragma alloca
11111 #   else
11112 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11113 char *alloca ();
11114 #    endif
11115 #   endif
11116 #  endif
11117 # endif
11118 #endif
11119
11120 int main() {
11121 char *p = (char *) alloca(1);
11122 ; return 0; }
11123 EOF
11124 if { (eval echo configure:11125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11125   rm -rf conftest*
11126   ac_cv_func_alloca_works=yes
11127 else
11128   echo "configure: failed program was:" >&5
11129   cat conftest.$ac_ext >&5
11130   rm -rf conftest*
11131   ac_cv_func_alloca_works=no
11132 fi
11133 rm -f conftest*
11134
11135 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11136 if test $ac_cv_func_alloca_works = yes; then
11137   { test "$extra_verbose" = "yes" && cat << \EOF
11138     Defining HAVE_ALLOCA
11139 EOF
11140 cat >> confdefs.h <<\EOF
11141 #define HAVE_ALLOCA 1
11142 EOF
11143 }
11144
11145 fi
11146
11147 if test $ac_cv_func_alloca_works = no; then
11148   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11149   # that cause trouble.  Some versions do not even contain alloca or
11150   # contain a buggy version.  If you still want to use their alloca,
11151   # use ar to extract alloca.o from them instead of compiling alloca.c.
11152   ALLOCA=alloca.${ac_objext}
11153   { test "$extra_verbose" = "yes" && cat << \EOF
11154     Defining C_ALLOCA
11155 EOF
11156 cat >> confdefs.h <<\EOF
11157 #define C_ALLOCA 1
11158 EOF
11159 }
11160
11161
11162 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11163 echo "configure:11164: checking whether alloca needs Cray hooks" >&5
11164
11165 cat > conftest.$ac_ext <<EOF
11166 #line 11167 "configure"
11167 #include "confdefs.h"
11168 #if defined(CRAY) && ! defined(CRAY2)
11169 webecray
11170 #else
11171 wenotbecray
11172 #endif
11173
11174 EOF
11175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11176   egrep "webecray" >/dev/null 2>&1; then
11177   rm -rf conftest*
11178   ac_cv_os_cray=yes
11179 else
11180   rm -rf conftest*
11181   ac_cv_os_cray=no
11182 fi
11183 rm -f conftest*
11184
11185
11186 echo "$ac_t""$ac_cv_os_cray" 1>&6
11187 if test $ac_cv_os_cray = yes; then
11188 for ac_func in _getb67 GETB67 getb67; do
11189   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11190 echo "configure:11191: checking for $ac_func" >&5
11191
11192 cat > conftest.$ac_ext <<EOF
11193 #line 11194 "configure"
11194 #include "confdefs.h"
11195 /* System header to define __stub macros and hopefully few prototypes,
11196     which can conflict with char $ac_func(); below.  */
11197 #include <assert.h>
11198 /* Override any gcc2 internal prototype to avoid an error.  */
11199 /* We use char because int might match the return type of a gcc2
11200     builtin and then its argument prototype would still apply.  */
11201 char $ac_func();
11202
11203 int main() {
11204
11205 /* The GNU C library defines this for functions which it implements
11206     to always fail with ENOSYS.  Some functions are actually named
11207     something starting with __ and the normal name is an alias.  */
11208 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11209 choke me
11210 #else
11211 $ac_func();
11212 #endif
11213
11214 ; return 0; }
11215 EOF
11216 if { (eval echo configure:11217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11217   rm -rf conftest*
11218   eval "ac_cv_func_$ac_func=yes"
11219 else
11220   echo "configure: failed program was:" >&5
11221   cat conftest.$ac_ext >&5
11222   rm -rf conftest*
11223   eval "ac_cv_func_$ac_func=no"
11224 fi
11225 rm -f conftest*
11226
11227 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11228   echo "$ac_t""yes" 1>&6
11229   { test "$extra_verbose" = "yes" && cat << EOF
11230     Defining CRAY_STACKSEG_END = $ac_func
11231 EOF
11232 cat >> confdefs.h <<EOF
11233 #define CRAY_STACKSEG_END $ac_func
11234 EOF
11235 }
11236
11237   break
11238 else
11239   echo "$ac_t""no" 1>&6
11240 fi
11241
11242 done
11243 fi
11244
11245 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11246 echo "configure:11247: checking stack direction for C alloca" >&5
11247
11248 cat > conftest.$ac_ext <<EOF
11249 #line 11250 "configure"
11250 #include "confdefs.h"
11251 find_stack_direction ()
11252 {
11253   static char *addr = 0;
11254   auto char dummy;
11255   if (addr == 0)
11256     {
11257       addr = &dummy;
11258       return find_stack_direction ();
11259     }
11260   else
11261     return (&dummy > addr) ? 1 : -1;
11262 }
11263 main ()
11264 {
11265   exit (find_stack_direction() < 0);
11266 }
11267 EOF
11268 if { (eval echo configure:11269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11269 then
11270   ac_cv_c_stack_direction=1
11271 else
11272   conftest_rc="$?"
11273   echo "configure: failed program was:" >&5
11274   cat conftest.$ac_ext >&5
11275   rm -fr conftest*
11276   ac_cv_c_stack_direction=-1
11277 fi
11278 rm -fr conftest*
11279
11280 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11281 { test "$extra_verbose" = "yes" && cat << EOF
11282     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11283 EOF
11284 cat >> confdefs.h <<EOF
11285 #define STACK_DIRECTION $ac_cv_c_stack_direction
11286 EOF
11287 }
11288
11289 fi
11290
11291   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11292    echo "    xemacs will be linked with \"$ALLOCA\""
11293  fi
11294 fi
11295
11296 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11297 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11298 echo "configure:11299: checking for vfork.h" >&5
11299
11300 cat > conftest.$ac_ext <<EOF
11301 #line 11302 "configure"
11302 #include "confdefs.h"
11303 #include <vfork.h>
11304 EOF
11305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11306 { (eval echo configure:11307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11308 if test -z "$ac_err"; then
11309   rm -rf conftest*
11310   eval "ac_cv_header_$ac_safe=yes"
11311 else
11312   echo "$ac_err" >&5
11313   echo "configure: failed program was:" >&5
11314   cat conftest.$ac_ext >&5
11315   rm -rf conftest*
11316   eval "ac_cv_header_$ac_safe=no"
11317 fi
11318 rm -f conftest*
11319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11320   echo "$ac_t""yes" 1>&6
11321   { test "$extra_verbose" = "yes" && cat << \EOF
11322     Defining HAVE_VFORK_H
11323 EOF
11324 cat >> confdefs.h <<\EOF
11325 #define HAVE_VFORK_H 1
11326 EOF
11327 }
11328
11329 else
11330   echo "$ac_t""no" 1>&6
11331 fi
11332
11333 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11334 echo "configure:11335: checking for working vfork" >&5
11335
11336 cat > conftest.$ac_ext <<EOF
11337 #line 11338 "configure"
11338 #include "confdefs.h"
11339 /* Thanks to Paul Eggert for this test.  */
11340 #include <stdio.h>
11341 #include <sys/types.h>
11342 #include <sys/stat.h>
11343 #ifdef HAVE_UNISTD_H
11344 #include <unistd.h>
11345 #endif
11346 #ifdef HAVE_VFORK_H
11347 #include <vfork.h>
11348 #endif
11349 /* On some sparc systems, changes by the child to local and incoming
11350    argument registers are propagated back to the parent.
11351    The compiler is told about this with #include <vfork.h>,
11352    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11353    Test for this by using a static variable whose address
11354    is put into a register that is clobbered by the vfork.  */
11355 static
11356 #ifdef __cplusplus
11357 sparc_address_test (int arg)
11358 #else
11359 sparc_address_test (arg) int arg;
11360 #endif
11361 {
11362   static pid_t child;
11363   if (!child) {
11364     child = vfork ();
11365     if (child < 0) {
11366       perror ("vfork");
11367       _exit(2);
11368     }
11369     if (!child) {
11370       arg = getpid();
11371       write(-1, "", 0);
11372       _exit (arg);
11373     }
11374   }
11375 }
11376 main() {
11377   pid_t parent = getpid ();
11378   pid_t child;
11379
11380   sparc_address_test ();
11381
11382   child = vfork ();
11383
11384   if (child == 0) {
11385     /* Here is another test for sparc vfork register problems.
11386        This test uses lots of local variables, at least
11387        as many local variables as main has allocated so far
11388        including compiler temporaries.  4 locals are enough for
11389        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
11390        A buggy compiler should reuse the register of parent
11391        for one of the local variables, since it will think that
11392        parent can't possibly be used any more in this routine.
11393        Assigning to the local variable will thus munge parent
11394        in the parent process.  */
11395     pid_t
11396       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11397       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11398     /* Convince the compiler that p..p7 are live; otherwise, it might
11399        use the same hardware register for all 8 local variables.  */
11400     if (p != p1 || p != p2 || p != p3 || p != p4
11401         || p != p5 || p != p6 || p != p7)
11402       _exit(1);
11403
11404     /* On some systems (e.g. IRIX 3.3),
11405        vfork doesn't separate parent from child file descriptors.
11406        If the child closes a descriptor before it execs or exits,
11407        this munges the parent's descriptor as well.
11408        Test for this by closing stdout in the child.  */
11409     _exit(close(fileno(stdout)) != 0);
11410   } else {
11411     int status;
11412     struct stat st;
11413
11414     while (wait(&status) != child)
11415       ;
11416     exit(
11417          /* Was there some problem with vforking?  */
11418          child < 0
11419
11420          /* Did the child fail?  (This shouldn't happen.)  */
11421          || status
11422
11423          /* Did the vfork/compiler bug occur?  */
11424          || parent != getpid()
11425
11426          /* Did the file descriptor bug occur?  */
11427          || fstat(fileno(stdout), &st) != 0
11428          );
11429   }
11430 }
11431 EOF
11432 if { (eval echo configure:11433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11433 then
11434   ac_cv_func_vfork_works=yes
11435 else
11436   conftest_rc="$?"
11437   echo "configure: failed program was:" >&5
11438   cat conftest.$ac_ext >&5
11439   rm -fr conftest*
11440   ac_cv_func_vfork_works=no
11441 fi
11442 rm -fr conftest*
11443
11444 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
11445 if test $ac_cv_func_vfork_works = no; then
11446   { test "$extra_verbose" = "yes" && cat << \EOF
11447     Defining vfork = fork
11448 EOF
11449 cat >> confdefs.h <<\EOF
11450 #define vfork fork
11451 EOF
11452 }
11453
11454 fi
11455
11456
11457 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
11458 echo "configure:11459: checking for working strcoll" >&5
11459
11460 cat > conftest.$ac_ext <<EOF
11461 #line 11462 "configure"
11462 #include "confdefs.h"
11463 #include <string.h>
11464 main ()
11465 {
11466   exit (strcoll ("abc", "def") >= 0 ||
11467         strcoll ("ABC", "DEF") >= 0 ||
11468         strcoll ("123", "456") >= 0);
11469 }
11470 EOF
11471 if { (eval echo configure:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11472 then
11473   ac_cv_func_strcoll_works=yes
11474 else
11475   conftest_rc="$?"
11476   echo "configure: failed program was:" >&5
11477   cat conftest.$ac_ext >&5
11478   rm -fr conftest*
11479   ac_cv_func_strcoll_works=no
11480 fi
11481 rm -fr conftest*
11482
11483 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
11484 if test $ac_cv_func_strcoll_works = yes; then
11485   { test "$extra_verbose" = "yes" && cat << \EOF
11486     Defining HAVE_STRCOLL
11487 EOF
11488 cat >> confdefs.h <<\EOF
11489 #define HAVE_STRCOLL 1
11490 EOF
11491 }
11492
11493 fi
11494
11495
11496 for ac_func in getpgrp
11497 do
11498 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11499 echo "configure:11500: checking for $ac_func" >&5
11500
11501 cat > conftest.$ac_ext <<EOF
11502 #line 11503 "configure"
11503 #include "confdefs.h"
11504 /* System header to define __stub macros and hopefully few prototypes,
11505     which can conflict with char $ac_func(); below.  */
11506 #include <assert.h>
11507 /* Override any gcc2 internal prototype to avoid an error.  */
11508 /* We use char because int might match the return type of a gcc2
11509     builtin and then its argument prototype would still apply.  */
11510 char $ac_func();
11511
11512 int main() {
11513
11514 /* The GNU C library defines this for functions which it implements
11515     to always fail with ENOSYS.  Some functions are actually named
11516     something starting with __ and the normal name is an alias.  */
11517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11518 choke me
11519 #else
11520 $ac_func();
11521 #endif
11522
11523 ; return 0; }
11524 EOF
11525 if { (eval echo configure:11526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11526   rm -rf conftest*
11527   eval "ac_cv_func_$ac_func=yes"
11528 else
11529   echo "configure: failed program was:" >&5
11530   cat conftest.$ac_ext >&5
11531   rm -rf conftest*
11532   eval "ac_cv_func_$ac_func=no"
11533 fi
11534 rm -f conftest*
11535
11536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11537   echo "$ac_t""yes" 1>&6
11538     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11539   { test "$extra_verbose" = "yes" && cat << EOF
11540     Defining $ac_tr_func
11541 EOF
11542 cat >> confdefs.h <<EOF
11543 #define $ac_tr_func 1
11544 EOF
11545 }
11546  
11547 else
11548   echo "$ac_t""no" 1>&6
11549 fi
11550 done
11551
11552 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
11553 echo "configure:11554: checking whether getpgrp takes no argument" >&5
11554
11555 cat > conftest.$ac_ext <<EOF
11556 #line 11557 "configure"
11557 #include "confdefs.h"
11558
11559 /*
11560  * If this system has a BSD-style getpgrp(),
11561  * which takes a pid argument, exit unsuccessfully.
11562  *
11563  * Snarfed from Chet Ramey's bash pgrp.c test program
11564  */
11565 #include <stdio.h>
11566 #include <sys/types.h>
11567
11568 int     pid;
11569 int     pg1, pg2, pg3, pg4;
11570 int     ng, np, s, child;
11571
11572 main()
11573 {
11574         pid = getpid();
11575         pg1 = getpgrp(0);
11576         pg2 = getpgrp();
11577         pg3 = getpgrp(pid);
11578         pg4 = getpgrp(1);
11579
11580         /*
11581          * If all of these values are the same, it's pretty sure that
11582          * we're on a system that ignores getpgrp's first argument.
11583          */
11584         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
11585                 exit(0);
11586
11587         child = fork();
11588         if (child < 0)
11589                 exit(1);
11590         else if (child == 0) {
11591                 np = getpid();
11592                 /*
11593                  * If this is Sys V, this will not work; pgrp will be
11594                  * set to np because setpgrp just changes a pgrp to be
11595                  * the same as the pid.
11596                  */
11597                 setpgrp(np, pg1);
11598                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
11599                 if (ng == pg1) {
11600                         exit(1);
11601                 } else {
11602                         exit(0);
11603                 }
11604         } else {
11605                 wait(&s);
11606                 exit(s>>8);
11607         }
11608 }
11609
11610 EOF
11611 if { (eval echo configure:11612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11612 then
11613   ac_cv_func_getpgrp_void=yes
11614 else
11615   conftest_rc="$?"
11616   echo "configure: failed program was:" >&5
11617   cat conftest.$ac_ext >&5
11618   rm -fr conftest*
11619   ac_cv_func_getpgrp_void=no
11620 fi
11621 rm -fr conftest*
11622
11623
11624 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
11625 if test $ac_cv_func_getpgrp_void = yes; then
11626   { test "$extra_verbose" = "yes" && cat << \EOF
11627     Defining GETPGRP_VOID
11628 EOF
11629 cat >> confdefs.h <<\EOF
11630 #define GETPGRP_VOID 1
11631 EOF
11632 }
11633
11634 fi
11635
11636
11637 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11638 echo "configure:11639: checking for working mmap" >&5
11639 case "$opsys" in ultrix* ) have_mmap=no ;; *)
11640 cat > conftest.$ac_ext <<EOF
11641 #line 11642 "configure"
11642 #include "confdefs.h"
11643 #include <stdio.h>
11644 #include <unistd.h>
11645 #include <fcntl.h>
11646 #include <sys/mman.h>
11647
11648 #ifndef MAP_VARIABLE
11649 #define MAP_VARIABLE 0
11650 #endif
11651
11652 #ifndef MAP_FAILED
11653 #define MAP_FAILED -1
11654 #endif
11655
11656 int main (int argc, char *argv[])
11657 {
11658   int fd = -1;
11659   caddr_t p;
11660 #ifndef MAP_ANONYMOUS
11661   fd = open ("/dev/zero", O_RDWR);
11662   if (fd < 0)
11663     return 1;
11664 #define MAP_ANONYMOUS 0
11665 #endif
11666   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
11667            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
11668            fd, 0) != (void *) MAP_FAILED)
11669     return 0;
11670   perror ("conftest: mmap failed");
11671   return 1;
11672 }
11673 EOF
11674 if { (eval echo configure:11675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11675 then
11676   have_mmap=yes
11677 else
11678   conftest_rc="$?"
11679   echo "configure: failed program was:" >&5
11680   cat conftest.$ac_ext >&5
11681   rm -fr conftest*
11682   have_mmap=no
11683 fi
11684 rm -fr conftest* ;;
11685 esac
11686 echo "$ac_t""$have_mmap" 1>&6
11687 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11688     Defining HAVE_MMAP
11689 EOF
11690 cat >> confdefs.h <<\EOF
11691 #define HAVE_MMAP 1
11692 EOF
11693 }
11694
11695
11696 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
11697 if test "$rel_alloc $have_mmap" = "default yes"; then
11698   if test "$doug_lea_malloc" = "yes"; then
11699         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
11700 echo "configure:11701: checking for M_MMAP_THRESHOLD" >&5
11701     cat > conftest.$ac_ext <<EOF
11702 #line 11703 "configure"
11703 #include "confdefs.h"
11704 #include <malloc.h>
11705 int main() {
11706
11707 #ifndef M_MMAP_THRESHOLD
11708 #error No M_MMAP_THRESHOLD :-(
11709 !@+$%^&*_)(_ - unlikely to compile...
11710 #endif
11711
11712 ; return 0; }
11713 EOF
11714 if { (eval echo configure:11715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11715   rm -rf conftest*
11716   rel_alloc=no; echo "$ac_t""yes" 1>&6;
11717 else
11718   echo "configure: failed program was:" >&5
11719   cat conftest.$ac_ext >&5
11720   rm -rf conftest*
11721   rel_alloc=yes; echo "$ac_t""no" 1>&6;
11722 fi
11723 rm -f conftest*
11724   else
11725     rel_alloc=yes
11726   fi
11727 fi
11728 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11729     Defining REL_ALLOC
11730 EOF
11731 cat >> confdefs.h <<\EOF
11732 #define REL_ALLOC 1
11733 EOF
11734 }
11735
11736
11737 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11738 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11739 echo "configure:11740: checking for termios.h" >&5
11740
11741 cat > conftest.$ac_ext <<EOF
11742 #line 11743 "configure"
11743 #include "confdefs.h"
11744 #include <termios.h>
11745 EOF
11746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11747 { (eval echo configure:11748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11749 if test -z "$ac_err"; then
11750   rm -rf conftest*
11751   eval "ac_cv_header_$ac_safe=yes"
11752 else
11753   echo "$ac_err" >&5
11754   echo "configure: failed program was:" >&5
11755   cat conftest.$ac_ext >&5
11756   rm -rf conftest*
11757   eval "ac_cv_header_$ac_safe=no"
11758 fi
11759 rm -f conftest*
11760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11761   echo "$ac_t""yes" 1>&6
11762   { test "$extra_verbose" = "yes" && cat << \EOF
11763     Defining HAVE_TERMIOS
11764 EOF
11765 cat >> confdefs.h <<\EOF
11766 #define HAVE_TERMIOS 1
11767 EOF
11768 }
11769
11770   { test "$extra_verbose" = "yes" && cat << \EOF
11771     Defining SIGNALS_VIA_CHARACTERS
11772 EOF
11773 cat >> confdefs.h <<\EOF
11774 #define SIGNALS_VIA_CHARACTERS 1
11775 EOF
11776 }
11777
11778   { test "$extra_verbose" = "yes" && cat << \EOF
11779     Defining NO_TERMIO
11780 EOF
11781 cat >> confdefs.h <<\EOF
11782 #define NO_TERMIO 1
11783 EOF
11784 }
11785
11786 else
11787   echo "$ac_t""no" 1>&6
11788 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11789 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11790 echo "configure:11791: checking for termio.h" >&5
11791
11792 cat > conftest.$ac_ext <<EOF
11793 #line 11794 "configure"
11794 #include "confdefs.h"
11795 #include <termio.h>
11796 EOF
11797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11798 { (eval echo configure:11799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11800 if test -z "$ac_err"; then
11801   rm -rf conftest*
11802   eval "ac_cv_header_$ac_safe=yes"
11803 else
11804   echo "$ac_err" >&5
11805   echo "configure: failed program was:" >&5
11806   cat conftest.$ac_ext >&5
11807   rm -rf conftest*
11808   eval "ac_cv_header_$ac_safe=no"
11809 fi
11810 rm -f conftest*
11811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11812   echo "$ac_t""yes" 1>&6
11813   { test "$extra_verbose" = "yes" && cat << \EOF
11814     Defining HAVE_TERMIO
11815 EOF
11816 cat >> confdefs.h <<\EOF
11817 #define HAVE_TERMIO 1
11818 EOF
11819 }
11820
11821 else
11822   echo "$ac_t""no" 1>&6
11823 fi
11824
11825 fi
11826
11827
11828
11829 echo $ac_n "checking for socket""... $ac_c" 1>&6
11830 echo "configure:11831: checking for socket" >&5
11831
11832 cat > conftest.$ac_ext <<EOF
11833 #line 11834 "configure"
11834 #include "confdefs.h"
11835 /* System header to define __stub macros and hopefully few prototypes,
11836     which can conflict with char socket(); below.  */
11837 #include <assert.h>
11838 /* Override any gcc2 internal prototype to avoid an error.  */
11839 /* We use char because int might match the return type of a gcc2
11840     builtin and then its argument prototype would still apply.  */
11841 char socket();
11842
11843 int main() {
11844
11845 /* The GNU C library defines this for functions which it implements
11846     to always fail with ENOSYS.  Some functions are actually named
11847     something starting with __ and the normal name is an alias.  */
11848 #if defined (__stub_socket) || defined (__stub___socket)
11849 choke me
11850 #else
11851 socket();
11852 #endif
11853
11854 ; return 0; }
11855 EOF
11856 if { (eval echo configure:11857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11857   rm -rf conftest*
11858   eval "ac_cv_func_socket=yes"
11859 else
11860   echo "configure: failed program was:" >&5
11861   cat conftest.$ac_ext >&5
11862   rm -rf conftest*
11863   eval "ac_cv_func_socket=no"
11864 fi
11865 rm -f conftest*
11866
11867 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11868   echo "$ac_t""yes" 1>&6
11869   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11870 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11871 echo "configure:11872: checking for netinet/in.h" >&5
11872
11873 cat > conftest.$ac_ext <<EOF
11874 #line 11875 "configure"
11875 #include "confdefs.h"
11876 #include <netinet/in.h>
11877 EOF
11878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11879 { (eval echo configure:11880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11881 if test -z "$ac_err"; then
11882   rm -rf conftest*
11883   eval "ac_cv_header_$ac_safe=yes"
11884 else
11885   echo "$ac_err" >&5
11886   echo "configure: failed program was:" >&5
11887   cat conftest.$ac_ext >&5
11888   rm -rf conftest*
11889   eval "ac_cv_header_$ac_safe=no"
11890 fi
11891 rm -f conftest*
11892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11893   echo "$ac_t""yes" 1>&6
11894   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11895 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11896 echo "configure:11897: checking for arpa/inet.h" >&5
11897
11898 cat > conftest.$ac_ext <<EOF
11899 #line 11900 "configure"
11900 #include "confdefs.h"
11901 #include <arpa/inet.h>
11902 EOF
11903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11904 { (eval echo configure:11905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11906 if test -z "$ac_err"; then
11907   rm -rf conftest*
11908   eval "ac_cv_header_$ac_safe=yes"
11909 else
11910   echo "$ac_err" >&5
11911   echo "configure: failed program was:" >&5
11912   cat conftest.$ac_ext >&5
11913   rm -rf conftest*
11914   eval "ac_cv_header_$ac_safe=no"
11915 fi
11916 rm -f conftest*
11917 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11918   echo "$ac_t""yes" 1>&6
11919   
11920   { test "$extra_verbose" = "yes" && cat << \EOF
11921     Defining HAVE_SOCKETS
11922 EOF
11923 cat >> confdefs.h <<\EOF
11924 #define HAVE_SOCKETS 1
11925 EOF
11926 }
11927
11928       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11929 echo "configure:11930: checking "for sun_len member in struct sockaddr_un"" >&5
11930       cat > conftest.$ac_ext <<EOF
11931 #line 11932 "configure"
11932 #include "confdefs.h"
11933
11934 #include <sys/types.h>
11935 #include <sys/socket.h>
11936 #include <sys/un.h>
11937       
11938 int main() {
11939 static struct sockaddr_un x; x.sun_len = 1;
11940 ; return 0; }
11941 EOF
11942 if { (eval echo configure:11943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11943   rm -rf conftest*
11944   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11945     Defining HAVE_SOCKADDR_SUN_LEN
11946 EOF
11947 cat >> confdefs.h <<\EOF
11948 #define HAVE_SOCKADDR_SUN_LEN 1
11949 EOF
11950 }
11951
11952 else
11953   echo "configure: failed program was:" >&5
11954   cat conftest.$ac_ext >&5
11955   rm -rf conftest*
11956   echo "$ac_t""no" 1>&6
11957 fi
11958 rm -f conftest*
11959       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11960 echo "configure:11961: checking "for ip_mreq struct in netinet/in.h"" >&5
11961       cat > conftest.$ac_ext <<EOF
11962 #line 11963 "configure"
11963 #include "confdefs.h"
11964
11965 #include <sys/types.h>
11966 #include <netinet/in.h>
11967       
11968 int main() {
11969 static struct ip_mreq x;
11970 ; return 0; }
11971 EOF
11972 if { (eval echo configure:11973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11973   rm -rf conftest*
11974   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11975     Defining HAVE_MULTICAST
11976 EOF
11977 cat >> confdefs.h <<\EOF
11978 #define HAVE_MULTICAST 1
11979 EOF
11980 }
11981
11982 else
11983   echo "configure: failed program was:" >&5
11984   cat conftest.$ac_ext >&5
11985   rm -rf conftest*
11986   echo "$ac_t""no" 1>&6
11987 fi
11988 rm -f conftest*
11989 else
11990   echo "$ac_t""no" 1>&6
11991 fi
11992
11993 else
11994   echo "$ac_t""no" 1>&6
11995 fi
11996
11997 else
11998   echo "$ac_t""no" 1>&6
11999 fi
12000
12001
12002 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12003 echo "configure:12004: checking for msgget" >&5
12004
12005 cat > conftest.$ac_ext <<EOF
12006 #line 12007 "configure"
12007 #include "confdefs.h"
12008 /* System header to define __stub macros and hopefully few prototypes,
12009     which can conflict with char msgget(); below.  */
12010 #include <assert.h>
12011 /* Override any gcc2 internal prototype to avoid an error.  */
12012 /* We use char because int might match the return type of a gcc2
12013     builtin and then its argument prototype would still apply.  */
12014 char msgget();
12015
12016 int main() {
12017
12018 /* The GNU C library defines this for functions which it implements
12019     to always fail with ENOSYS.  Some functions are actually named
12020     something starting with __ and the normal name is an alias.  */
12021 #if defined (__stub_msgget) || defined (__stub___msgget)
12022 choke me
12023 #else
12024 msgget();
12025 #endif
12026
12027 ; return 0; }
12028 EOF
12029 if { (eval echo configure:12030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12030   rm -rf conftest*
12031   eval "ac_cv_func_msgget=yes"
12032 else
12033   echo "configure: failed program was:" >&5
12034   cat conftest.$ac_ext >&5
12035   rm -rf conftest*
12036   eval "ac_cv_func_msgget=no"
12037 fi
12038 rm -f conftest*
12039
12040 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12041   echo "$ac_t""yes" 1>&6
12042   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12043 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12044 echo "configure:12045: checking for sys/ipc.h" >&5
12045
12046 cat > conftest.$ac_ext <<EOF
12047 #line 12048 "configure"
12048 #include "confdefs.h"
12049 #include <sys/ipc.h>
12050 EOF
12051 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12052 { (eval echo configure:12053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12053 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12054 if test -z "$ac_err"; then
12055   rm -rf conftest*
12056   eval "ac_cv_header_$ac_safe=yes"
12057 else
12058   echo "$ac_err" >&5
12059   echo "configure: failed program was:" >&5
12060   cat conftest.$ac_ext >&5
12061   rm -rf conftest*
12062   eval "ac_cv_header_$ac_safe=no"
12063 fi
12064 rm -f conftest*
12065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12066   echo "$ac_t""yes" 1>&6
12067   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12068 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12069 echo "configure:12070: checking for sys/msg.h" >&5
12070
12071 cat > conftest.$ac_ext <<EOF
12072 #line 12073 "configure"
12073 #include "confdefs.h"
12074 #include <sys/msg.h>
12075 EOF
12076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12077 { (eval echo configure:12078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12079 if test -z "$ac_err"; then
12080   rm -rf conftest*
12081   eval "ac_cv_header_$ac_safe=yes"
12082 else
12083   echo "$ac_err" >&5
12084   echo "configure: failed program was:" >&5
12085   cat conftest.$ac_ext >&5
12086   rm -rf conftest*
12087   eval "ac_cv_header_$ac_safe=no"
12088 fi
12089 rm -f conftest*
12090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12091   echo "$ac_t""yes" 1>&6
12092   { test "$extra_verbose" = "yes" && cat << \EOF
12093     Defining HAVE_SYSVIPC
12094 EOF
12095 cat >> confdefs.h <<\EOF
12096 #define HAVE_SYSVIPC 1
12097 EOF
12098 }
12099
12100 else
12101   echo "$ac_t""no" 1>&6
12102 fi
12103
12104 else
12105   echo "$ac_t""no" 1>&6
12106 fi
12107
12108 else
12109   echo "$ac_t""no" 1>&6
12110 fi
12111
12112
12113 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12114 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12115 echo "configure:12116: checking for dirent.h" >&5
12116
12117 cat > conftest.$ac_ext <<EOF
12118 #line 12119 "configure"
12119 #include "confdefs.h"
12120 #include <dirent.h>
12121 EOF
12122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12123 { (eval echo configure:12124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12125 if test -z "$ac_err"; then
12126   rm -rf conftest*
12127   eval "ac_cv_header_$ac_safe=yes"
12128 else
12129   echo "$ac_err" >&5
12130   echo "configure: failed program was:" >&5
12131   cat conftest.$ac_ext >&5
12132   rm -rf conftest*
12133   eval "ac_cv_header_$ac_safe=no"
12134 fi
12135 rm -f conftest*
12136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12137   echo "$ac_t""yes" 1>&6
12138   { test "$extra_verbose" = "yes" && cat << \EOF
12139     Defining SYSV_SYSTEM_DIR
12140 EOF
12141 cat >> confdefs.h <<\EOF
12142 #define SYSV_SYSTEM_DIR 1
12143 EOF
12144 }
12145
12146 else
12147   echo "$ac_t""no" 1>&6
12148 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12149 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12150 echo "configure:12151: checking for sys/dir.h" >&5
12151
12152 cat > conftest.$ac_ext <<EOF
12153 #line 12154 "configure"
12154 #include "confdefs.h"
12155 #include <sys/dir.h>
12156 EOF
12157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12158 { (eval echo configure:12159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12160 if test -z "$ac_err"; then
12161   rm -rf conftest*
12162   eval "ac_cv_header_$ac_safe=yes"
12163 else
12164   echo "$ac_err" >&5
12165   echo "configure: failed program was:" >&5
12166   cat conftest.$ac_ext >&5
12167   rm -rf conftest*
12168   eval "ac_cv_header_$ac_safe=no"
12169 fi
12170 rm -f conftest*
12171 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12172   echo "$ac_t""yes" 1>&6
12173   :
12174 else
12175   echo "$ac_t""no" 1>&6
12176 { test "$extra_verbose" = "yes" && cat << \EOF
12177     Defining NONSYSTEM_DIR_LIBRARY
12178 EOF
12179 cat >> confdefs.h <<\EOF
12180 #define NONSYSTEM_DIR_LIBRARY 1
12181 EOF
12182 }
12183
12184 fi
12185
12186 fi
12187
12188
12189 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12190 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12191 echo "configure:12192: checking for nlist.h" >&5
12192
12193 cat > conftest.$ac_ext <<EOF
12194 #line 12195 "configure"
12195 #include "confdefs.h"
12196 #include <nlist.h>
12197 EOF
12198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12199 { (eval echo configure:12200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12201 if test -z "$ac_err"; then
12202   rm -rf conftest*
12203   eval "ac_cv_header_$ac_safe=yes"
12204 else
12205   echo "$ac_err" >&5
12206   echo "configure: failed program was:" >&5
12207   cat conftest.$ac_ext >&5
12208   rm -rf conftest*
12209   eval "ac_cv_header_$ac_safe=no"
12210 fi
12211 rm -f conftest*
12212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12213   echo "$ac_t""yes" 1>&6
12214   { test "$extra_verbose" = "yes" && cat << \EOF
12215     Defining NLIST_STRUCT
12216 EOF
12217 cat >> confdefs.h <<\EOF
12218 #define NLIST_STRUCT 1
12219 EOF
12220 }
12221
12222 else
12223   echo "$ac_t""no" 1>&6
12224 fi
12225
12226
12227
12228 echo "checking "for sound support"" 1>&6
12229 echo "configure:12230: checking "for sound support"" >&5
12230 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12231
12232 if test "$with_native_sound" != "no"; then
12233     if test -n "$native_sound_lib"; then
12234     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12235 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12236 echo "configure:12237: checking for multimedia/audio_device.h" >&5
12237
12238 cat > conftest.$ac_ext <<EOF
12239 #line 12240 "configure"
12240 #include "confdefs.h"
12241 #include <multimedia/audio_device.h>
12242 EOF
12243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12244 { (eval echo configure:12245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12246 if test -z "$ac_err"; then
12247   rm -rf conftest*
12248   eval "ac_cv_header_$ac_safe=yes"
12249 else
12250   echo "$ac_err" >&5
12251   echo "configure: failed program was:" >&5
12252   cat conftest.$ac_ext >&5
12253   rm -rf conftest*
12254   eval "ac_cv_header_$ac_safe=no"
12255 fi
12256 rm -f conftest*
12257 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12258   echo "$ac_t""yes" 1>&6
12259   sound_found=yes sound_cflags=""
12260       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12261    echo "    xemacs will be linked with \"sunplay.o\""
12262  fi
12263 else
12264   echo "$ac_t""no" 1>&6
12265 fi
12266
12267   fi
12268
12269     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12270     sound_found=yes
12271     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12272    echo "    xemacs will be linked with \"sunplay.o\""
12273  fi
12274     if test -d "/usr/demo/SOUND/include"
12275       then sound_cflags="-I/usr/demo/SOUND/include"
12276       else sound_cflags="-I/usr/demo/SOUND"
12277     fi
12278     if test -z "$native_sound_lib" ; then
12279       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12280         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12281         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12282       fi
12283     fi
12284   fi
12285
12286     if test -z "$sound_found"; then
12287     case "$canonical" in
12288     *-sgi-* )
12289       if test -z "$native_sound_lib"; then
12290         
12291 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12292 echo "configure:12293: checking for ALopenport in -laudio" >&5
12293 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12294
12295 xe_check_libs=" -laudio "
12296 cat > conftest.$ac_ext <<EOF
12297 #line 12298 "configure"
12298 #include "confdefs.h"
12299 /* Override any gcc2 internal prototype to avoid an error.  */
12300 /* We use char because int might match the return type of a gcc2
12301     builtin and then its argument prototype would still apply.  */
12302 char ALopenport();
12303
12304 int main() {
12305 ALopenport()
12306 ; return 0; }
12307 EOF
12308 if { (eval echo configure:12309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12309   rm -rf conftest*
12310   eval "ac_cv_lib_$ac_lib_var=yes"
12311 else
12312   echo "configure: failed program was:" >&5
12313   cat conftest.$ac_ext >&5
12314   rm -rf conftest*
12315   eval "ac_cv_lib_$ac_lib_var=no"
12316 fi
12317 rm -f conftest*
12318 xe_check_libs=""
12319
12320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12321   echo "$ac_t""yes" 1>&6
12322   native_sound_lib="-laudio"
12323 else
12324   echo "$ac_t""no" 1>&6
12325 fi
12326
12327
12328       fi
12329       if test -n "$native_sound_lib"; then
12330         sound_found=yes sound_cflags=""
12331         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12332    echo "    xemacs will be linked with \"sgiplay.o\""
12333  fi
12334       fi ;;
12335     hppa*-hp-hpux* )
12336       if test -z "$native_sound_lib"; then
12337         
12338 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12339 echo "configure:12340: checking for AOpenAudio in -lAlib" >&5
12340 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12341
12342 xe_check_libs=" -lAlib "
12343 cat > conftest.$ac_ext <<EOF
12344 #line 12345 "configure"
12345 #include "confdefs.h"
12346 /* Override any gcc2 internal prototype to avoid an error.  */
12347 /* We use char because int might match the return type of a gcc2
12348     builtin and then its argument prototype would still apply.  */
12349 char AOpenAudio();
12350
12351 int main() {
12352 AOpenAudio()
12353 ; return 0; }
12354 EOF
12355 if { (eval echo configure:12356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12356   rm -rf conftest*
12357   eval "ac_cv_lib_$ac_lib_var=yes"
12358 else
12359   echo "configure: failed program was:" >&5
12360   cat conftest.$ac_ext >&5
12361   rm -rf conftest*
12362   eval "ac_cv_lib_$ac_lib_var=no"
12363 fi
12364 rm -f conftest*
12365 xe_check_libs=""
12366
12367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12368   echo "$ac_t""yes" 1>&6
12369   native_sound_lib="-lAlib"
12370 else
12371   echo "$ac_t""no" 1>&6
12372 fi
12373
12374
12375       fi
12376       if test -n "$native_sound_lib"; then
12377         sound_found=yes
12378         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
12379    echo "    xemacs will be linked with \"hpplay.o\""
12380  fi
12381         if test "$GCC" = "yes" # Kludge city
12382           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
12383           else sound_cflags="+e -I/usr/audio/examples"
12384         fi
12385       fi ;;
12386     esac
12387   fi
12388
12389     if test -z "$sound_found"; then
12390     for dir in "machine" "sys" "linux"; do
12391       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
12392 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
12393 echo "configure:12394: checking for ${dir}/soundcard.h" >&5
12394
12395 cat > conftest.$ac_ext <<EOF
12396 #line 12397 "configure"
12397 #include "confdefs.h"
12398 #include <${dir}/soundcard.h>
12399 EOF
12400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12401 { (eval echo configure:12402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12403 if test -z "$ac_err"; then
12404   rm -rf conftest*
12405   eval "ac_cv_header_$ac_safe=yes"
12406 else
12407   echo "$ac_err" >&5
12408   echo "configure: failed program was:" >&5
12409   cat conftest.$ac_ext >&5
12410   rm -rf conftest*
12411   eval "ac_cv_header_$ac_safe=no"
12412 fi
12413 rm -f conftest*
12414 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12415   echo "$ac_t""yes" 1>&6
12416   sound_found=yes
12417        need_miscplay=yes
12418         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
12419    echo "    xemacs will be linked with \"linuxplay.o\""
12420  fi
12421         { test "$extra_verbose" = "yes" && cat << EOF
12422     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
12423 EOF
12424 cat >> confdefs.h <<EOF
12425 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
12426 EOF
12427 }
12428
12429         break
12430 else
12431   echo "$ac_t""no" 1>&6
12432 fi
12433
12434     done
12435   fi
12436
12437     if test -z "$sound_found"; then
12438     if test "$with_msw" = "yes"; then
12439     sound_found=yes
12440     native_sound_lib=
12441     fi
12442   fi
12443
12444   test "$sound_found" = "yes" && with_native_sound=yes
12445 fi
12446
12447 if test "$with_native_sound" = "yes"; then
12448   { test "$extra_verbose" = "yes" && cat << \EOF
12449     Defining HAVE_NATIVE_SOUND
12450 EOF
12451 cat >> confdefs.h <<\EOF
12452 #define HAVE_NATIVE_SOUND 1
12453 EOF
12454 }
12455
12456   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
12457 fi
12458
12459 if test "$with_nas_sound" != "no"; then
12460   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
12461 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
12462 echo "configure:12463: checking for audio/audiolib.h" >&5
12463
12464 cat > conftest.$ac_ext <<EOF
12465 #line 12466 "configure"
12466 #include "confdefs.h"
12467 #include <audio/audiolib.h>
12468 EOF
12469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12470 { (eval echo configure:12471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12472 if test -z "$ac_err"; then
12473   rm -rf conftest*
12474   eval "ac_cv_header_$ac_safe=yes"
12475 else
12476   echo "$ac_err" >&5
12477   echo "configure: failed program was:" >&5
12478   cat conftest.$ac_ext >&5
12479   rm -rf conftest*
12480   eval "ac_cv_header_$ac_safe=no"
12481 fi
12482 rm -f conftest*
12483 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12484   echo "$ac_t""yes" 1>&6
12485   
12486     
12487 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
12488 echo "configure:12489: checking for AuOpenServer in -laudio" >&5
12489 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
12490
12491 xe_check_libs=" -laudio "
12492 cat > conftest.$ac_ext <<EOF
12493 #line 12494 "configure"
12494 #include "confdefs.h"
12495 /* Override any gcc2 internal prototype to avoid an error.  */
12496 /* We use char because int might match the return type of a gcc2
12497     builtin and then its argument prototype would still apply.  */
12498 char AuOpenServer();
12499
12500 int main() {
12501 AuOpenServer()
12502 ; return 0; }
12503 EOF
12504 if { (eval echo configure:12505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12505   rm -rf conftest*
12506   eval "ac_cv_lib_$ac_lib_var=yes"
12507 else
12508   echo "configure: failed program was:" >&5
12509   cat conftest.$ac_ext >&5
12510   rm -rf conftest*
12511   eval "ac_cv_lib_$ac_lib_var=no"
12512 fi
12513 rm -f conftest*
12514 xe_check_libs=""
12515
12516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12517   echo "$ac_t""yes" 1>&6
12518   have_nas_sound=yes
12519 else
12520   echo "$ac_t""no" 1>&6
12521 fi
12522
12523
12524 else
12525   echo "$ac_t""no" 1>&6
12526 fi
12527
12528   if test "$have_nas_sound" = "yes"; then
12529     with_nas_sound=yes
12530     { test "$extra_verbose" = "yes" && cat << \EOF
12531     Defining HAVE_NAS_SOUND
12532 EOF
12533 cat >> confdefs.h <<\EOF
12534 #define HAVE_NAS_SOUND 1
12535 EOF
12536 }
12537
12538     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
12539    echo "    xemacs will be linked with \"nas.o\""
12540  fi
12541     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
12542             cat > conftest.$ac_ext <<EOF
12543 #line 12544 "configure"
12544 #include "confdefs.h"
12545 #include <audio/Xtutil.h>
12546 EOF
12547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12548   egrep "AuXtErrorJump" >/dev/null 2>&1; then
12549   :
12550 else
12551   rm -rf conftest*
12552   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
12553     Defining NAS_NO_ERROR_JUMP
12554 EOF
12555 cat >> confdefs.h <<\EOF
12556 #define NAS_NO_ERROR_JUMP 1
12557 EOF
12558 }
12559
12560 fi
12561 rm -f conftest*
12562
12563   else
12564     test "$with_nas_sound" = "yes" && \
12565       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
12566     with_nas_sound=no
12567   fi
12568 fi
12569
12570 if test "$with_esd_sound" != "no"; then
12571   # Extract the first word of "esd-config", so it can be a program name with args.
12572 set dummy esd-config; ac_word=$2
12573 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
12574 echo "configure:12575: checking for $ac_word" >&5
12575
12576 if test -n "$have_esd_config"; then
12577   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
12578 else
12579   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
12580   ac_dummy="$PATH"
12581   for ac_dir in $ac_dummy; do
12582     test -z "$ac_dir" && ac_dir=.
12583     if test -f $ac_dir/$ac_word; then
12584       ac_cv_prog_have_esd_config="yes"
12585       break
12586     fi
12587   done
12588   IFS="$ac_save_ifs"
12589   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
12590 fi
12591 have_esd_config="$ac_cv_prog_have_esd_config"
12592 if test -n "$have_esd_config"; then
12593   echo "$ac_t""$have_esd_config" 1>&6
12594 else
12595   echo "$ac_t""no" 1>&6
12596 fi
12597
12598   if test "$have_esd_config" = "yes"; then
12599     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
12600     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
12601     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
12602     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
12603 echo "configure:12604: checking for esd_play_stream" >&5
12604
12605 cat > conftest.$ac_ext <<EOF
12606 #line 12607 "configure"
12607 #include "confdefs.h"
12608 /* System header to define __stub macros and hopefully few prototypes,
12609     which can conflict with char esd_play_stream(); below.  */
12610 #include <assert.h>
12611 /* Override any gcc2 internal prototype to avoid an error.  */
12612 /* We use char because int might match the return type of a gcc2
12613     builtin and then its argument prototype would still apply.  */
12614 char esd_play_stream();
12615
12616 int main() {
12617
12618 /* The GNU C library defines this for functions which it implements
12619     to always fail with ENOSYS.  Some functions are actually named
12620     something starting with __ and the normal name is an alias.  */
12621 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
12622 choke me
12623 #else
12624 esd_play_stream();
12625 #endif
12626
12627 ; return 0; }
12628 EOF
12629 if { (eval echo configure:12630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12630   rm -rf conftest*
12631   eval "ac_cv_func_esd_play_stream=yes"
12632 else
12633   echo "configure: failed program was:" >&5
12634   cat conftest.$ac_ext >&5
12635   rm -rf conftest*
12636   eval "ac_cv_func_esd_play_stream=no"
12637 fi
12638 rm -f conftest*
12639
12640 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
12641   echo "$ac_t""yes" 1>&6
12642   have_esd_sound=yes
12643 else
12644   echo "$ac_t""no" 1>&6
12645 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
12646 fi
12647
12648   fi
12649
12650   if test "$have_esd_sound" = "yes"; then
12651     with_esd_sound=yes
12652     need_miscplay=yes
12653     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
12654    echo "    xemacs will be linked with \"esd.o\""
12655  fi
12656     { test "$extra_verbose" = "yes" && cat << \EOF
12657     Defining HAVE_ESD_SOUND
12658 EOF
12659 cat >> confdefs.h <<\EOF
12660 #define HAVE_ESD_SOUND 1
12661 EOF
12662 }
12663
12664   else
12665     test "$with_esd_sound" = "yes" && \
12666       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
12667     with_esd_sound=no
12668   fi
12669 fi
12670
12671 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
12672    echo "    xemacs will be linked with \"miscplay.o\""
12673  fi
12674
12675
12676 test -z "$with_tty" && with_tty=yes
12677
12678 if test "$with_tty" = "yes"  ; then
12679   echo "checking for TTY-related features" 1>&6
12680 echo "configure:12681: checking for TTY-related features" >&5
12681   { test "$extra_verbose" = "yes" && cat << \EOF
12682     Defining HAVE_TTY
12683 EOF
12684 cat >> confdefs.h <<\EOF
12685 #define HAVE_TTY 1
12686 EOF
12687 }
12688
12689   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
12690    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\""
12691  fi
12692
12693     if test -z "$with_ncurses"; then
12694     
12695 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12696 echo "configure:12697: checking for tgetent in -lncurses" >&5
12697 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12698
12699 xe_check_libs=" -lncurses "
12700 cat > conftest.$ac_ext <<EOF
12701 #line 12702 "configure"
12702 #include "confdefs.h"
12703 /* Override any gcc2 internal prototype to avoid an error.  */
12704 /* We use char because int might match the return type of a gcc2
12705     builtin and then its argument prototype would still apply.  */
12706 char tgetent();
12707
12708 int main() {
12709 tgetent()
12710 ; return 0; }
12711 EOF
12712 if { (eval echo configure:12713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12713   rm -rf conftest*
12714   eval "ac_cv_lib_$ac_lib_var=yes"
12715 else
12716   echo "configure: failed program was:" >&5
12717   cat conftest.$ac_ext >&5
12718   rm -rf conftest*
12719   eval "ac_cv_lib_$ac_lib_var=no"
12720 fi
12721 rm -f conftest*
12722 xe_check_libs=""
12723
12724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12725   echo "$ac_t""yes" 1>&6
12726   with_ncurses=yes
12727 else
12728   echo "$ac_t""no" 1>&6
12729 with_ncurses=no
12730 fi
12731
12732
12733   fi
12734   if test "$with_ncurses" = "yes"; then
12735     { test "$extra_verbose" = "yes" && cat << \EOF
12736     Defining HAVE_NCURSES
12737 EOF
12738 cat >> confdefs.h <<\EOF
12739 #define HAVE_NCURSES 1
12740 EOF
12741 }
12742
12743     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12744 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12745 echo "configure:12746: checking for ncurses/curses.h" >&5
12746
12747 cat > conftest.$ac_ext <<EOF
12748 #line 12749 "configure"
12749 #include "confdefs.h"
12750 #include <ncurses/curses.h>
12751 EOF
12752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12753 { (eval echo configure:12754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12755 if test -z "$ac_err"; then
12756   rm -rf conftest*
12757   eval "ac_cv_header_$ac_safe=yes"
12758 else
12759   echo "$ac_err" >&5
12760   echo "configure: failed program was:" >&5
12761   cat conftest.$ac_ext >&5
12762   rm -rf conftest*
12763   eval "ac_cv_header_$ac_safe=no"
12764 fi
12765 rm -f conftest*
12766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12767   echo "$ac_t""yes" 1>&6
12768   curses_h_file=ncurses/curses.h
12769 else
12770   echo "$ac_t""no" 1>&6
12771 fi
12772
12773     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12774 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12775 echo "configure:12776: checking for ncurses/term.h" >&5
12776
12777 cat > conftest.$ac_ext <<EOF
12778 #line 12779 "configure"
12779 #include "confdefs.h"
12780 #include <ncurses/term.h>
12781 EOF
12782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12783 { (eval echo configure:12784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12784 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12785 if test -z "$ac_err"; then
12786   rm -rf conftest*
12787   eval "ac_cv_header_$ac_safe=yes"
12788 else
12789   echo "$ac_err" >&5
12790   echo "configure: failed program was:" >&5
12791   cat conftest.$ac_ext >&5
12792   rm -rf conftest*
12793   eval "ac_cv_header_$ac_safe=no"
12794 fi
12795 rm -f conftest*
12796 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12797   echo "$ac_t""yes" 1>&6
12798   term_h_file=ncurses/term.h
12799 else
12800   echo "$ac_t""no" 1>&6
12801 fi
12802
12803     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12804    echo "    xemacs will be linked with \"terminfo.o\""
12805  fi
12806     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12807
12808     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12809                         save_c_switch_site="$c_switch_site"
12810       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12811       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12812 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12813 echo "configure:12814: checking for ncurses/curses.h" >&5
12814
12815 cat > conftest.$ac_ext <<EOF
12816 #line 12817 "configure"
12817 #include "confdefs.h"
12818 #include <ncurses/curses.h>
12819 EOF
12820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12821 { (eval echo configure:12822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12823 if test -z "$ac_err"; then
12824   rm -rf conftest*
12825   eval "ac_cv_header_$ac_safe=yes"
12826 else
12827   echo "$ac_err" >&5
12828   echo "configure: failed program was:" >&5
12829   cat conftest.$ac_ext >&5
12830   rm -rf conftest*
12831   eval "ac_cv_header_$ac_safe=no"
12832 fi
12833 rm -f conftest*
12834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12835   echo "$ac_t""yes" 1>&6
12836   curses_h_file=ncurses/curses.h
12837 else
12838   echo "$ac_t""no" 1>&6
12839 fi
12840
12841       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12842         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12843         else c_switch_site="$save_c_switch_site"
12844       fi
12845     fi
12846   else         if test "$have_terminfo" = "yes"; then
12847       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12848    echo "    xemacs will be linked with \"terminfo.o\""
12849  fi
12850       if test -n "$libs_termcap"; then
12851         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12852       else
12853         for lib in curses termlib termcap; do
12854           
12855 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12856 echo "configure:12857: checking for tgetent in -l$lib" >&5
12857 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12858
12859 xe_check_libs=" -l$lib "
12860 cat > conftest.$ac_ext <<EOF
12861 #line 12862 "configure"
12862 #include "confdefs.h"
12863 /* Override any gcc2 internal prototype to avoid an error.  */
12864 /* We use char because int might match the return type of a gcc2
12865     builtin and then its argument prototype would still apply.  */
12866 char tgetent();
12867
12868 int main() {
12869 tgetent()
12870 ; return 0; }
12871 EOF
12872 if { (eval echo configure:12873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12873   rm -rf conftest*
12874   eval "ac_cv_lib_$ac_lib_var=yes"
12875 else
12876   echo "configure: failed program was:" >&5
12877   cat conftest.$ac_ext >&5
12878   rm -rf conftest*
12879   eval "ac_cv_lib_$ac_lib_var=no"
12880 fi
12881 rm -f conftest*
12882 xe_check_libs=""
12883
12884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12885   echo "$ac_t""yes" 1>&6
12886   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12887 else
12888   echo "$ac_t""no" 1>&6
12889 fi
12890
12891
12892         done
12893       fi
12894     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12895    echo "    xemacs will be linked with \"tparam.o\""
12896  fi
12897                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12898       if test -n "$libs_termcap"; then
12899         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12900       else
12901         
12902 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12903 echo "configure:12904: checking for tgetent in -lcurses" >&5
12904 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12905
12906 xe_check_libs=" -lcurses "
12907 cat > conftest.$ac_ext <<EOF
12908 #line 12909 "configure"
12909 #include "confdefs.h"
12910 /* Override any gcc2 internal prototype to avoid an error.  */
12911 /* We use char because int might match the return type of a gcc2
12912     builtin and then its argument prototype would still apply.  */
12913 char tgetent();
12914
12915 int main() {
12916 tgetent()
12917 ; return 0; }
12918 EOF
12919 if { (eval echo configure:12920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12920   rm -rf conftest*
12921   eval "ac_cv_lib_$ac_lib_var=yes"
12922 else
12923   echo "configure: failed program was:" >&5
12924   cat conftest.$ac_ext >&5
12925   rm -rf conftest*
12926   eval "ac_cv_lib_$ac_lib_var=no"
12927 fi
12928 rm -f conftest*
12929 xe_check_libs=""
12930
12931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12932   echo "$ac_t""yes" 1>&6
12933   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12934 else
12935   echo "$ac_t""no" 1>&6
12936 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12937 echo "configure:12938: checking for tgetent in -ltermcap" >&5
12938 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12939
12940 xe_check_libs=" -ltermcap "
12941 cat > conftest.$ac_ext <<EOF
12942 #line 12943 "configure"
12943 #include "confdefs.h"
12944 /* Override any gcc2 internal prototype to avoid an error.  */
12945 /* We use char because int might match the return type of a gcc2
12946     builtin and then its argument prototype would still apply.  */
12947 char tgetent();
12948
12949 int main() {
12950 tgetent()
12951 ; return 0; }
12952 EOF
12953 if { (eval echo configure:12954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12954   rm -rf conftest*
12955   eval "ac_cv_lib_$ac_lib_var=yes"
12956 else
12957   echo "configure: failed program was:" >&5
12958   cat conftest.$ac_ext >&5
12959   rm -rf conftest*
12960   eval "ac_cv_lib_$ac_lib_var=no"
12961 fi
12962 rm -f conftest*
12963 xe_check_libs=""
12964
12965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12966   echo "$ac_t""yes" 1>&6
12967   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12968 else
12969   echo "$ac_t""no" 1>&6
12970 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12971    echo "    xemacs will be linked with \"termcap.o\""
12972  fi
12973 fi
12974
12975
12976 fi
12977
12978
12979       fi
12980     fi
12981   fi
12982   { test "$extra_verbose" = "yes" && cat << EOF
12983     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
12984 EOF
12985 cat >> confdefs.h <<EOF
12986 #define CURSES_H_FILE "${curses_h_file-curses.h}"
12987 EOF
12988 }
12989
12990   { test "$extra_verbose" = "yes" && cat << EOF
12991     Defining TERM_H_FILE = "${term_h_file-term.h}"
12992 EOF
12993 cat >> confdefs.h <<EOF
12994 #define TERM_H_FILE "${term_h_file-term.h}"
12995 EOF
12996 }
12997
12998
12999     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13000 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13001 echo "configure:13002: checking for gpm.h" >&5
13002
13003 cat > conftest.$ac_ext <<EOF
13004 #line 13005 "configure"
13005 #include "confdefs.h"
13006 #include <gpm.h>
13007 EOF
13008 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13009 { (eval echo configure:13010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13010 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13011 if test -z "$ac_err"; then
13012   rm -rf conftest*
13013   eval "ac_cv_header_$ac_safe=yes"
13014 else
13015   echo "$ac_err" >&5
13016   echo "configure: failed program was:" >&5
13017   cat conftest.$ac_ext >&5
13018   rm -rf conftest*
13019   eval "ac_cv_header_$ac_safe=no"
13020 fi
13021 rm -f conftest*
13022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13023   echo "$ac_t""yes" 1>&6
13024   :
13025 else
13026   echo "$ac_t""no" 1>&6
13027 with_gpm=no
13028 fi
13029  }
13030   test -z "$with_gpm" && { 
13031 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13032 echo "configure:13033: checking for Gpm_Open in -lgpm" >&5
13033 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13034
13035 xe_check_libs=" -lgpm "
13036 cat > conftest.$ac_ext <<EOF
13037 #line 13038 "configure"
13038 #include "confdefs.h"
13039 /* Override any gcc2 internal prototype to avoid an error.  */
13040 /* We use char because int might match the return type of a gcc2
13041     builtin and then its argument prototype would still apply.  */
13042 char Gpm_Open();
13043
13044 int main() {
13045 Gpm_Open()
13046 ; return 0; }
13047 EOF
13048 if { (eval echo configure:13049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13049   rm -rf conftest*
13050   eval "ac_cv_lib_$ac_lib_var=yes"
13051 else
13052   echo "configure: failed program was:" >&5
13053   cat conftest.$ac_ext >&5
13054   rm -rf conftest*
13055   eval "ac_cv_lib_$ac_lib_var=no"
13056 fi
13057 rm -f conftest*
13058 xe_check_libs=""
13059
13060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13061   echo "$ac_t""yes" 1>&6
13062   with_gpm=yes
13063 else
13064   echo "$ac_t""no" 1>&6
13065 with_gpm=no
13066 fi
13067
13068  }
13069   if test "$with_gpm" = "yes"; then
13070     { test "$extra_verbose" = "yes" && cat << \EOF
13071     Defining HAVE_GPM
13072 EOF
13073 cat >> confdefs.h <<\EOF
13074 #define HAVE_GPM 1
13075 EOF
13076 }
13077
13078     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13079    echo "    xemacs will be linked with \"gpmevent.o\""
13080  fi
13081     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13082   fi
13083
13084 else   for feature in ncurses gpm; do
13085     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13086       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13087     fi
13088     eval "with_${feature}=no"
13089   done
13090 fi 
13091 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13092    echo "    xemacs will be linked with \"event-unixoid.o\""
13093  fi
13094
13095
13096 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13097   != "no no no" && echo "checking for database support" 1>&6
13098 echo "configure:13099: checking for database support" >&5
13099
13100 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13101   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13102 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13103 echo "configure:13104: checking for ndbm.h" >&5
13104
13105 cat > conftest.$ac_ext <<EOF
13106 #line 13107 "configure"
13107 #include "confdefs.h"
13108 #include <ndbm.h>
13109 EOF
13110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13111 { (eval echo configure:13112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13113 if test -z "$ac_err"; then
13114   rm -rf conftest*
13115   eval "ac_cv_header_$ac_safe=yes"
13116 else
13117   echo "$ac_err" >&5
13118   echo "configure: failed program was:" >&5
13119   cat conftest.$ac_ext >&5
13120   rm -rf conftest*
13121   eval "ac_cv_header_$ac_safe=no"
13122 fi
13123 rm -f conftest*
13124 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13125   echo "$ac_t""yes" 1>&6
13126   :
13127 else
13128   echo "$ac_t""no" 1>&6
13129
13130     test "$with_database_gdbm" = "yes" -o \
13131          "$with_database_dbm"  = "yes" && \
13132       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13133     with_database_gdbm=no with_database_dbm=no
13134 fi
13135
13136 fi
13137
13138 if test "$with_database_gdbm" != "no"; then
13139   
13140 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13141 echo "configure:13142: checking for dbm_open in -lgdbm" >&5
13142 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13143
13144 xe_check_libs=" -lgdbm "
13145 cat > conftest.$ac_ext <<EOF
13146 #line 13147 "configure"
13147 #include "confdefs.h"
13148 /* Override any gcc2 internal prototype to avoid an error.  */
13149 /* We use char because int might match the return type of a gcc2
13150     builtin and then its argument prototype would still apply.  */
13151 char dbm_open();
13152
13153 int main() {
13154 dbm_open()
13155 ; return 0; }
13156 EOF
13157 if { (eval echo configure:13158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13158   rm -rf conftest*
13159   eval "ac_cv_lib_$ac_lib_var=yes"
13160 else
13161   echo "configure: failed program was:" >&5
13162   cat conftest.$ac_ext >&5
13163   rm -rf conftest*
13164   eval "ac_cv_lib_$ac_lib_var=no"
13165 fi
13166 rm -f conftest*
13167 xe_check_libs=""
13168
13169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13170   echo "$ac_t""yes" 1>&6
13171   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13172 else
13173   echo "$ac_t""no" 1>&6
13174 if test "$with_database_gdbm" = "yes"; then
13175      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13176    fi
13177    with_database_gdbm=no
13178 fi
13179
13180
13181 fi
13182
13183 if test "$with_database_dbm" != "no"; then
13184   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13185 echo "configure:13186: checking for dbm_open" >&5
13186
13187 cat > conftest.$ac_ext <<EOF
13188 #line 13189 "configure"
13189 #include "confdefs.h"
13190 /* System header to define __stub macros and hopefully few prototypes,
13191     which can conflict with char dbm_open(); below.  */
13192 #include <assert.h>
13193 /* Override any gcc2 internal prototype to avoid an error.  */
13194 /* We use char because int might match the return type of a gcc2
13195     builtin and then its argument prototype would still apply.  */
13196 char dbm_open();
13197
13198 int main() {
13199
13200 /* The GNU C library defines this for functions which it implements
13201     to always fail with ENOSYS.  Some functions are actually named
13202     something starting with __ and the normal name is an alias.  */
13203 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13204 choke me
13205 #else
13206 dbm_open();
13207 #endif
13208
13209 ; return 0; }
13210 EOF
13211 if { (eval echo configure:13212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13212   rm -rf conftest*
13213   eval "ac_cv_func_dbm_open=yes"
13214 else
13215   echo "configure: failed program was:" >&5
13216   cat conftest.$ac_ext >&5
13217   rm -rf conftest*
13218   eval "ac_cv_func_dbm_open=no"
13219 fi
13220 rm -f conftest*
13221
13222 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13223   echo "$ac_t""yes" 1>&6
13224   with_database_dbm=yes libdbm=
13225 else
13226   echo "$ac_t""no" 1>&6
13227
13228     
13229 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13230 echo "configure:13231: checking for dbm_open in -ldbm" >&5
13231 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13232
13233 xe_check_libs=" -ldbm "
13234 cat > conftest.$ac_ext <<EOF
13235 #line 13236 "configure"
13236 #include "confdefs.h"
13237 /* Override any gcc2 internal prototype to avoid an error.  */
13238 /* We use char because int might match the return type of a gcc2
13239     builtin and then its argument prototype would still apply.  */
13240 char dbm_open();
13241
13242 int main() {
13243 dbm_open()
13244 ; return 0; }
13245 EOF
13246 if { (eval echo configure:13247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13247   rm -rf conftest*
13248   eval "ac_cv_lib_$ac_lib_var=yes"
13249 else
13250   echo "configure: failed program was:" >&5
13251   cat conftest.$ac_ext >&5
13252   rm -rf conftest*
13253   eval "ac_cv_lib_$ac_lib_var=no"
13254 fi
13255 rm -f conftest*
13256 xe_check_libs=""
13257
13258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13259   echo "$ac_t""yes" 1>&6
13260   with_database_dbm=yes libdbm=-ldbm
13261 else
13262   echo "$ac_t""no" 1>&6
13263 test "$with_database_dbm" = "yes" && \
13264         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13265       with_database_dbm=no
13266 fi
13267
13268
13269 fi
13270
13271 fi
13272
13273 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13274 test "$with_database_gdbm" = "yes" -o \
13275      "$with_database_dbm"  = "yes" && \
13276   { test "$extra_verbose" = "yes" && cat << \EOF
13277     Defining HAVE_DBM
13278 EOF
13279 cat >> confdefs.h <<\EOF
13280 #define HAVE_DBM 1
13281 EOF
13282 }
13283
13284
13285 if test "$with_database_berkdb" != "no"; then
13286   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13287 echo "configure:13288: checking for Berkeley db.h" >&5
13288   for header in "db/db.h" "db.h"; do
13289     cat > conftest.$ac_ext <<EOF
13290 #line 13291 "configure"
13291 #include "confdefs.h"
13292
13293 #include <stdlib.h>
13294 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13295 #ifdef HAVE_INTTYPES_H
13296 #define __BIT_TYPES_DEFINED__
13297 #include <inttypes.h>
13298 typedef uint8_t  u_int8_t;
13299 typedef uint16_t u_int16_t;
13300 typedef uint32_t u_int32_t;
13301 #ifdef WE_DONT_NEED_QUADS
13302 typedef uint64_t u_int64_t;
13303 #endif
13304 #endif
13305 #endif
13306 #include <$header>
13307
13308 int main() {
13309
13310 ; return 0; }
13311 EOF
13312 if { (eval echo configure:13313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13313   rm -rf conftest*
13314   db_h_file="$header"; break
13315 else
13316   echo "configure: failed program was:" >&5
13317   cat conftest.$ac_ext >&5
13318 fi
13319 rm -f conftest*
13320   done
13321   if test -z "$db_h_file"
13322   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13323   else echo "$ac_t""$db_h_file" 1>&6
13324   fi
13325
13326   if test "$with_database_berkdb" != "no"; then
13327     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13328 echo "configure:13329: checking for Berkeley DB version" >&5
13329     cat > conftest.$ac_ext <<EOF
13330 #line 13331 "configure"
13331 #include "confdefs.h"
13332 #include <$db_h_file>
13333 #if DB_VERSION_MAJOR > 1
13334 yes
13335 #endif
13336
13337 EOF
13338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13339   egrep "yes" >/dev/null 2>&1; then
13340   rm -rf conftest*
13341   cat > conftest.$ac_ext <<EOF
13342 #line 13343 "configure"
13343 #include "confdefs.h"
13344 #include <$db_h_file>
13345 #if DB_VERSION_MAJOR > 2
13346 yes
13347 #endif
13348
13349 EOF
13350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13351   egrep "yes" >/dev/null 2>&1; then
13352   rm -rf conftest*
13353   echo "$ac_t""3" 1>&6; dbfunc=db_create
13354 else
13355   rm -rf conftest*
13356   
13357     echo "$ac_t""2" 1>&6; dbfunc=db_open
13358 fi
13359 rm -f conftest*
13360
13361 else
13362   rm -rf conftest*
13363   
13364     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13365 fi
13366 rm -f conftest*
13367
13368     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13369 echo "configure:13370: checking for $dbfunc" >&5
13370
13371 cat > conftest.$ac_ext <<EOF
13372 #line 13373 "configure"
13373 #include "confdefs.h"
13374 /* System header to define __stub macros and hopefully few prototypes,
13375     which can conflict with char $dbfunc(); below.  */
13376 #include <assert.h>
13377 /* Override any gcc2 internal prototype to avoid an error.  */
13378 /* We use char because int might match the return type of a gcc2
13379     builtin and then its argument prototype would still apply.  */
13380 char $dbfunc();
13381
13382 int main() {
13383
13384 /* The GNU C library defines this for functions which it implements
13385     to always fail with ENOSYS.  Some functions are actually named
13386     something starting with __ and the normal name is an alias.  */
13387 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
13388 choke me
13389 #else
13390 $dbfunc();
13391 #endif
13392
13393 ; return 0; }
13394 EOF
13395 if { (eval echo configure:13396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13396   rm -rf conftest*
13397   eval "ac_cv_func_$dbfunc=yes"
13398 else
13399   echo "configure: failed program was:" >&5
13400   cat conftest.$ac_ext >&5
13401   rm -rf conftest*
13402   eval "ac_cv_func_$dbfunc=no"
13403 fi
13404 rm -f conftest*
13405
13406 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
13407   echo "$ac_t""yes" 1>&6
13408   with_database_berkdb=yes need_libdb=no
13409 else
13410   echo "$ac_t""no" 1>&6
13411
13412     
13413 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
13414 echo "configure:13415: checking for $dbfunc in -ldb" >&5
13415 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
13416
13417 xe_check_libs=" -ldb "
13418 cat > conftest.$ac_ext <<EOF
13419 #line 13420 "configure"
13420 #include "confdefs.h"
13421 /* Override any gcc2 internal prototype to avoid an error.  */
13422 /* We use char because int might match the return type of a gcc2
13423     builtin and then its argument prototype would still apply.  */
13424 char $dbfunc();
13425
13426 int main() {
13427 $dbfunc()
13428 ; return 0; }
13429 EOF
13430 if { (eval echo configure:13431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13431   rm -rf conftest*
13432   eval "ac_cv_lib_$ac_lib_var=yes"
13433 else
13434   echo "configure: failed program was:" >&5
13435   cat conftest.$ac_ext >&5
13436   rm -rf conftest*
13437   eval "ac_cv_lib_$ac_lib_var=no"
13438 fi
13439 rm -f conftest*
13440 xe_check_libs=""
13441
13442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13443   echo "$ac_t""yes" 1>&6
13444   with_database_berkdb=yes need_libdb=yes
13445 else
13446   echo "$ac_t""no" 1>&6
13447 fi
13448
13449
13450 fi
13451
13452   fi
13453
13454   if test "$with_database_berkdb" = "yes"; then
13455     { test "$extra_verbose" = "yes" && cat << EOF
13456     Defining DB_H_FILE = "$db_h_file"
13457 EOF
13458 cat >> confdefs.h <<EOF
13459 #define DB_H_FILE "$db_h_file"
13460 EOF
13461 }
13462
13463     { test "$extra_verbose" = "yes" && cat << \EOF
13464     Defining HAVE_BERKELEY_DB
13465 EOF
13466 cat >> confdefs.h <<\EOF
13467 #define HAVE_BERKELEY_DB 1
13468 EOF
13469 }
13470
13471     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
13472   else with_database_berkdb=no
13473   fi
13474 fi
13475
13476 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13477      != "no no no"; then
13478   { test "$extra_verbose" = "yes" && cat << \EOF
13479     Defining HAVE_DATABASE
13480 EOF
13481 cat >> confdefs.h <<\EOF
13482 #define HAVE_DATABASE 1
13483 EOF
13484 }
13485
13486   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
13487    echo "    xemacs will be linked with \"database.o\""
13488  fi
13489 fi
13490
13491 if test "$with_socks" = "yes"; then
13492   
13493 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
13494 echo "configure:13495: checking for SOCKSinit in -lsocks" >&5
13495 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
13496
13497 xe_check_libs=" -lsocks "
13498 cat > conftest.$ac_ext <<EOF
13499 #line 13500 "configure"
13500 #include "confdefs.h"
13501 /* Override any gcc2 internal prototype to avoid an error.  */
13502 /* We use char because int might match the return type of a gcc2
13503     builtin and then its argument prototype would still apply.  */
13504 char SOCKSinit();
13505
13506 int main() {
13507 SOCKSinit()
13508 ; return 0; }
13509 EOF
13510 if { (eval echo configure:13511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13511   rm -rf conftest*
13512   eval "ac_cv_lib_$ac_lib_var=yes"
13513 else
13514   echo "configure: failed program was:" >&5
13515   cat conftest.$ac_ext >&5
13516   rm -rf conftest*
13517   eval "ac_cv_lib_$ac_lib_var=no"
13518 fi
13519 rm -f conftest*
13520 xe_check_libs=""
13521
13522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13523   echo "$ac_t""yes" 1>&6
13524     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13525     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13526   { test "$extra_verbose" = "yes" && cat << EOF
13527     Defining $ac_tr_lib
13528 EOF
13529 cat >> confdefs.h <<EOF
13530 #define $ac_tr_lib 1
13531 EOF
13532 }
13533
13534   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
13535
13536 else
13537   echo "$ac_t""no" 1>&6
13538 fi
13539
13540
13541   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
13542     Defining HAVE_SOCKS
13543 EOF
13544 cat >> confdefs.h <<\EOF
13545 #define HAVE_SOCKS 1
13546 EOF
13547 }
13548
13549 fi
13550
13551 if test "$usage_tracking" = "yes"; then
13552   { test "$extra_verbose" = "yes" && cat << \EOF
13553     Defining USAGE_TRACKING
13554 EOF
13555 cat >> confdefs.h <<\EOF
13556 #define USAGE_TRACKING 1
13557 EOF
13558 }
13559
13560   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
13561 fi
13562
13563 if test "$with_modules" != "no"; then
13564   echo "checking for module support" 1>&6
13565 echo "configure:13566: checking for module support" >&5
13566
13567     if test "$with_msw" = "yes"; then
13568     have_dl=yes;
13569   else
13570         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
13571 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
13572 echo "configure:13573: checking for dlfcn.h" >&5
13573
13574 cat > conftest.$ac_ext <<EOF
13575 #line 13576 "configure"
13576 #include "confdefs.h"
13577 #include <dlfcn.h>
13578 EOF
13579 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13580 { (eval echo configure:13581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13581 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13582 if test -z "$ac_err"; then
13583   rm -rf conftest*
13584   eval "ac_cv_header_$ac_safe=yes"
13585 else
13586   echo "$ac_err" >&5
13587   echo "configure: failed program was:" >&5
13588   cat conftest.$ac_ext >&5
13589   rm -rf conftest*
13590   eval "ac_cv_header_$ac_safe=no"
13591 fi
13592 rm -f conftest*
13593 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13594   echo "$ac_t""yes" 1>&6
13595   
13596       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
13597 echo "configure:13598: checking for dlopen in -lc" >&5
13598       cat > conftest.$ac_ext <<EOF
13599 #line 13600 "configure"
13600 #include "confdefs.h"
13601 #include <dlfcn.h>
13602 int main() {
13603         dlopen ("", 0);
13604 ; return 0; }
13605 EOF
13606 if { (eval echo configure:13607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13607   rm -rf conftest*
13608    have_dl=yes 
13609 else
13610   echo "configure: failed program was:" >&5
13611   cat conftest.$ac_ext >&5
13612   rm -rf conftest*
13613   
13614       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
13615 echo "configure:13616: checking for dlopen in -ldl" >&5
13616       ac_save_LIBS="$LIBS"
13617       LIBS="-ldl $LIBS"
13618       cat > conftest.$ac_ext <<EOF
13619 #line 13620 "configure"
13620 #include "confdefs.h"
13621 #include <dlfcn.h>
13622 int main() {
13623         dlopen ("", 0);
13624 ; return 0; }
13625 EOF
13626 if { (eval echo configure:13627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13627   rm -rf conftest*
13628    have_dl=yes 
13629 else
13630   echo "configure: failed program was:" >&5
13631   cat conftest.$ac_ext >&5
13632   rm -rf conftest*
13633   LIBS="$ac_save_LIBS"
13634 fi
13635 rm -f conftest*
13636       ac_save_LIBS=
13637 fi
13638 rm -f conftest*
13639 else
13640   echo "$ac_t""no" 1>&6
13641 fi
13642
13643     if test -n "$have_dl"; then
13644       { test "$extra_verbose" = "yes" && cat << \EOF
13645     Defining HAVE_DLOPEN
13646 EOF
13647 cat >> confdefs.h <<\EOF
13648 #define HAVE_DLOPEN 1
13649 EOF
13650 }
13651
13652     else
13653       
13654 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
13655 echo "configure:13656: checking for shl_load in -ldld" >&5
13656 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
13657
13658 xe_check_libs=" -ldld "
13659 cat > conftest.$ac_ext <<EOF
13660 #line 13661 "configure"
13661 #include "confdefs.h"
13662 /* Override any gcc2 internal prototype to avoid an error.  */
13663 /* We use char because int might match the return type of a gcc2
13664     builtin and then its argument prototype would still apply.  */
13665 char shl_load();
13666
13667 int main() {
13668 shl_load()
13669 ; return 0; }
13670 EOF
13671 if { (eval echo configure:13672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13672   rm -rf conftest*
13673   eval "ac_cv_lib_$ac_lib_var=yes"
13674 else
13675   echo "configure: failed program was:" >&5
13676   cat conftest.$ac_ext >&5
13677   rm -rf conftest*
13678   eval "ac_cv_lib_$ac_lib_var=no"
13679 fi
13680 rm -f conftest*
13681 xe_check_libs=""
13682
13683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13684   echo "$ac_t""yes" 1>&6
13685   libdl=dld have_dl=yes;
13686         { test "$extra_verbose" = "yes" && cat << \EOF
13687     Defining HAVE_SHL_LOAD
13688 EOF
13689 cat >> confdefs.h <<\EOF
13690 #define HAVE_SHL_LOAD 1
13691 EOF
13692 }
13693
13694 else
13695   echo "$ac_t""no" 1>&6
13696
13697 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
13698 echo "configure:13699: checking for dld_init in -ldld" >&5
13699 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
13700
13701 xe_check_libs=" -ldld "
13702 cat > conftest.$ac_ext <<EOF
13703 #line 13704 "configure"
13704 #include "confdefs.h"
13705 /* Override any gcc2 internal prototype to avoid an error.  */
13706 /* We use char because int might match the return type of a gcc2
13707     builtin and then its argument prototype would still apply.  */
13708 char dld_init();
13709
13710 int main() {
13711 dld_init()
13712 ; return 0; }
13713 EOF
13714 if { (eval echo configure:13715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13715   rm -rf conftest*
13716   eval "ac_cv_lib_$ac_lib_var=yes"
13717 else
13718   echo "configure: failed program was:" >&5
13719   cat conftest.$ac_ext >&5
13720   rm -rf conftest*
13721   eval "ac_cv_lib_$ac_lib_var=no"
13722 fi
13723 rm -f conftest*
13724 xe_check_libs=""
13725
13726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13727   echo "$ac_t""yes" 1>&6
13728   libdl=dld have_dl=yes;
13729         { test "$extra_verbose" = "yes" && cat << \EOF
13730     Defining HAVE_DLD_INIT
13731 EOF
13732 cat >> confdefs.h <<\EOF
13733 #define HAVE_DLD_INIT 1
13734 EOF
13735 }
13736
13737 else
13738   echo "$ac_t""no" 1>&6
13739 fi
13740
13741
13742 fi
13743
13744
13745     fi
13746   fi 
13747   if test -n "$have_dl"; then
13748         
13749 dll_ld=
13750 dll_ldflags=
13751 dll_cflags=
13752 dll_post=
13753 dll_ldo="-o"
13754 ld_dynamic_link_flags=
13755 xehost=$canonical
13756 xealias=$internal_configuration
13757
13758 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13759 echo "configure:13760: checking how to build dynamic libraries for ${xehost}" >&5
13760 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13761 case "$xehost" in
13762 *-*-linux-gnu*) ;;
13763 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13764 esac
13765
13766 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13767 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13768 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13769
13770 case "$xehost_os" in
13771 aix3*)
13772   # AIX sometimes has problems with the GCC collect2 program.  For some
13773   # reason, if we set the COLLECT_NAMES environment variable, the problems
13774   # vanish in a puff of smoke.
13775   if test "${COLLECT_NAMES+set}" != set; then
13776     COLLECT_NAMES=
13777     export COLLECT_NAMES
13778   fi
13779   ;;
13780 esac
13781
13782 # Now see if the compiler is really GCC.
13783 if test "$GCC" = "yes"; then
13784   XEGCC=yes
13785 else
13786   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13787 echo "configure:13788: checking checking whether we are using GNU C" >&5
13788   cat > conftest.$ac_ext <<EOF
13789 #line 13790 "configure"
13790 #include "confdefs.h"
13791
13792 #ifdef __GNUC__
13793   yes;
13794 #endif
13795
13796 EOF
13797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13798   egrep "yes" >/dev/null 2>&1; then
13799   rm -rf conftest*
13800   XEGCC=yes
13801 else
13802   rm -rf conftest*
13803   XEGCC=no
13804 fi
13805 rm -f conftest*
13806
13807   echo "$ac_t""${XEGCC}" 1>&6
13808 fi
13809
13810 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13811 echo "configure:13812: checking how to produce PIC code" >&5
13812 wl=
13813
13814 can_build_shared=yes
13815 if test "$XEGCC" = yes; then
13816   wl='-Wl,'
13817
13818   case "$xehost_os" in
13819   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
13820     # PIC is the default for these OSes.
13821     ;;
13822
13823   aix3* | aix4* | os2*)
13824     # We can build DLLs from non-PIC.
13825     ;;
13826   amigaos*)
13827     # FIXME: we need at least 68020 code to build shared libraries, but
13828     # adding the `-m68020' flag to GCC prevents building anything better,
13829     # like `-m68040'.
13830     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13831     ;;
13832   *cygwin* | *mingw* )
13833     # PIC is the default
13834     ;;
13835   *)
13836     dll_cflags='-fPIC'
13837     ;;
13838   esac
13839 else
13840   # PORTME Check for PIC flags for the system compiler.
13841   case "$xehost_os" in
13842   hpux9* | hpux1[0-9]*)
13843     # Is there a better link_static_flag that works with the bundled CC?
13844     wl='-Wl,'
13845     dll_cflags='+Z'
13846     ;;
13847
13848   irix5* | irix6*)
13849     wl='-Wl,'
13850     # PIC (with -KPIC) is the default.
13851     ;;
13852
13853   os2*)
13854     # We can build DLLs from non-PIC.
13855     ;;
13856
13857   osf3* | osf4*)
13858     # All OSF/1 code is PIC.
13859     wl='-Wl,'
13860     ;;
13861
13862   sco3.2v5*)
13863     dll_cflags='-belf -Kpic'
13864     wl='-Wl,'
13865     ;;
13866
13867   unixware*)
13868     dll_cflags="-KPIC"
13869     wl="-Wl,"
13870     ;;
13871
13872   sysv4*)
13873     dll_cflags="-KPIC"
13874     wl="-Wl,"
13875     ;;
13876
13877   sysv5*)
13878     dll_cflags="-KPIC"
13879     wl="-Wl,"
13880     ;;
13881
13882   solaris2*)
13883     dll_cflags='-KPIC'
13884     wl='-Wl,'
13885     ;;
13886
13887   sunos4*)
13888     dll_cflags='-PIC'
13889     wl='-Qoption ld '
13890     ;;
13891
13892   uts4*)
13893     dll_cflags='-pic'
13894     ;;
13895
13896   *)
13897     can_build_shared=no
13898     ;;
13899   esac
13900 fi
13901
13902 if test -n "$dll_cflags"; then
13903   echo "$ac_t""${dll_cflags}" 1>&6
13904
13905   # Check to make sure the dll_cflags actually works.
13906   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
13907 echo "configure:13908: checking if PIC flag ${dll_cflags} really works" >&5
13908   save_CFLAGS="$CFLAGS"
13909   CFLAGS="$CFLAGS $dll_cflags -DPIC"
13910   cat > conftest.$ac_ext <<EOF
13911 #line 13912 "configure"
13912 #include "confdefs.h"
13913
13914 int main() {
13915 int x=0;
13916 ; return 0; }
13917 EOF
13918 if { (eval echo configure:13919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13919   rm -rf conftest*
13920   
13921     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
13922     # reports no error.  So, we need to grep stderr for (Bundled).
13923     if grep '(Bundled)' config.log >/dev/null; then
13924       echo "$ac_t""no" 1>&6
13925       can_build_shared=no
13926       dll_cflags=
13927     else
13928       echo "$ac_t""yes" 1>&6
13929     fi
13930 else
13931   echo "configure: failed program was:" >&5
13932   cat conftest.$ac_ext >&5
13933   rm -rf conftest*
13934   echo "$ac_t""no" 1>&6
13935     can_build_shared=no
13936     dll_cflags=
13937 fi
13938 rm -f conftest*
13939   CFLAGS="$save_CFLAGS"
13940 else
13941   echo "$ac_t""none" 1>&6
13942 fi
13943
13944 if test "$can_build_shared" = "yes"; then
13945 cc_produces_so=no
13946 xldf=
13947 xcldf=
13948 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13949 echo "configure:13950: checking if C compiler can produce shared libraries" >&5
13950 if test "$XEGCC" = yes; then
13951   xcldf="-shared"
13952   xldf="-shared"
13953 else # Not using GCC
13954   case "$xehost_os" in
13955     aix3* | aix4*)
13956       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13957       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13958       ;;
13959
13960     freebsd2* | netbsd* | openbsd*)
13961       xldf="-Bshareable"
13962       xcldf="${wl}-Bshareable"
13963       ;;
13964
13965     freebsd3*)
13966       xcldf="-shared"
13967       ;;
13968
13969     hpux*)
13970       xldf="-b +s"
13971       xcldf="${wl}-b ${wl}+s"
13972       ;;
13973
13974     irix5* | irix6* | osf3* | osf4*)
13975       xcldf="${wl}-shared"
13976       xldf="-shared"
13977       ;;
13978
13979     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13980       xcldf="-G"
13981       xldf="-G"
13982       ;;
13983
13984     sunos4*)
13985       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
13986       xldf="-assert pure-text -Bstatic"
13987       ;;
13988   esac
13989 fi # End if if we are using gcc
13990
13991 if test -n "$xcldf"; then
13992   save_LDFLAGS=$LDFLAGS
13993   save_LIBS=$LIBS
13994   save_xe_libs=$xe_libs
13995   LDFLAGS="$xcldf $LDFLAGS"
13996   LIBS=
13997   xe_libs=
13998   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13999   cat > conftest.$ac_ext <<EOF
14000 #line 14001 "configure"
14001 #include "confdefs.h"
14002
14003 int main() {
14004 int x=0;
14005 ; return 0; }
14006 EOF
14007 if { (eval echo configure:14008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14008   rm -rf conftest*
14009   cc_produces_so=yes
14010 else
14011   echo "configure: failed program was:" >&5
14012   cat conftest.$ac_ext >&5
14013   rm -rf conftest*
14014   cc_produces_so=no
14015 fi
14016 rm -f conftest*
14017   LDFLAGS=$save_LDFLAGS
14018   LIBS=$save_LIBS
14019   xe_libs=$save_xe_libs
14020   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14021 else
14022   cc_produces_so=no
14023 fi
14024 echo "$ac_t""${cc_produces_so}" 1>&6
14025
14026 LTLD=$LD
14027 if test -z "$LTLD"; then
14028   ac_prog=ld
14029   if test "$XEGCC" = yes; then
14030     # Check if gcc -print-prog-name=ld gives a path.
14031     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14032 echo "configure:14033: checking for ld used by GCC" >&5
14033     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14034     case "$ac_prog" in
14035     # Accept absolute paths.
14036     /*)
14037       if test -z "$LTLD"; then
14038         case "$ac_prog" in
14039           *gcc-lib*) LTLD="$CC"
14040                      ;;
14041           *)         LTLD="$ac_prog"
14042                      ;;
14043         esac
14044       fi
14045       ;;
14046     "")
14047       # If it fails, then pretend we aren't using GCC.
14048       ac_prog=ld
14049       ;;
14050     *)
14051       # If it is relative, then search for the first ld in PATH.
14052       with_gnu_ld=unknown
14053       ;;
14054     esac
14055   else
14056     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14057 echo "configure:14058: checking for GNU ld" >&5
14058   fi
14059
14060   if test -z "$LTLD"; then
14061     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14062     for ac_dir in $PATH; do
14063       test -z "$ac_dir" && ac_dir=.
14064       if test -f "$ac_dir/$ac_prog"; then
14065         LTLD="$ac_dir/$ac_prog"
14066         # Check to see if the program is GNU ld.  I'd rather use --version,
14067         # but apparently some GNU ld's only accept -v.
14068         # Break only if it was the GNU/non-GNU ld that we prefer.
14069         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14070           xe_gnu_ld=yes
14071         else
14072           xe_gnu_ld=no
14073         fi
14074       fi
14075     done
14076     IFS="$ac_save_ifs"
14077   fi
14078
14079   if test -n "$LTLD"; then
14080     echo "$ac_t""${LTLD}" 1>&6
14081   else
14082     echo "$ac_t""no" 1>&6
14083   fi
14084
14085   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14086     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14087     exit 1
14088   fi
14089 fi
14090
14091 ld_dynamic_link_flags=
14092
14093 # Check to see if it really is or isn't GNU ld.
14094 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14095 echo "configure:14096: checking if the linker is GNU ld" >&5
14096 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14097 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14098   xe_gnu_ld=yes
14099 else
14100   xe_gnu_ld=no
14101 fi
14102 echo "$ac_t""${xe_gnu_ld}" 1>&6
14103
14104 case "$xehost_os" in
14105   amigaos* | sunos4*)
14106     # On these operating systems, we should treat GNU ld like the system ld.
14107     gnu_ld_acts_native=yes
14108     ;;
14109   *)
14110     gnu_ld_acts_native=no
14111     ;;
14112 esac
14113
14114 if test "$cc_produces_so" = "yes"; then
14115   dll_ld=$CC
14116   dll_ldflags=$xcldf
14117   can_build_shared=yes
14118   ld_shlibs=yes
14119 else
14120   # OK - only NOW do we futz about with ld.
14121   # See if the linker supports building shared libraries.
14122   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14123 echo "configure:14124: checking whether the linker supports shared libraries" >&5
14124   dll_ld=$CC
14125   dll_ldflags=$LDFLAGS
14126   ld_shlibs=yes
14127   can_build_shared=yes
14128   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14129     # See if GNU ld supports shared libraries.
14130     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14131       dll_ld=$CC
14132       dll_ldflags="-shared"
14133       ld_shlibs=yes
14134     else
14135       ld_shlibs=no
14136     fi
14137   else
14138     # PORTME fill in a description of your system's linker (not GNU ld)
14139     case "$xehost_os" in
14140     aix3*)
14141       dll_ld=$LTLD
14142       dll_ldflags=$xldf
14143       ;;
14144
14145     aix4*)
14146       dll_ldflags=$xcldf
14147       ;;
14148
14149     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14150     # support.  Future versions do this automatically, but an explicit c++rt0.o
14151     # doesn't break anything, and helps significantly (at the cost of a little
14152     # extra space).
14153     freebsd2.2*)
14154       dll_ld=$LTLD
14155       dll_ldflags=$xldf
14156       dll_post="/usr/lib/c++rt0.o"
14157       ;;
14158
14159     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14160     freebsd2*)
14161       dll_ld=$LTLD
14162       dll_ldflags="-Bshareable"
14163       ;;
14164
14165     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14166     freebsd3*)
14167       dll_ldflags="-shared"
14168       ;;
14169
14170     hpux*)
14171       dll_ld=$LTLD
14172       dll_ldflags=$xldf
14173       ;;
14174
14175     irix5* | irix6*)
14176       dll_ld=$LTLD
14177       dll_ldflags=$xldf
14178       ;;
14179
14180     netbsd*)
14181       # Tested with NetBSD 1.2 ld
14182       dll_ld=$LTLD
14183       dll_ldflags=$xldf
14184       ;;
14185
14186     openbsd*)
14187       dll_ld=$LTLD
14188       dll_ldflags=$xldf
14189       ;;
14190
14191     osf3* | osf4*)
14192       dll_ld=$LTLD
14193       dll_ldflags=$xldf
14194       ;;
14195
14196     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14197     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14198       dll_ld=$LTLD
14199       case "$dll_ld" in
14200         *gcc*) dll_ldflags="-shared"
14201                dll_ld=$CC
14202                ;;
14203         *)     dll_ldflags="-G"
14204                ;;
14205       esac
14206       ;;
14207
14208     sunos4*)
14209       if test "$XEGCC" = yes; then
14210         dll_ld=$CC
14211       else
14212         dll_ld=$LTLD
14213       fi
14214       dll_ldflags=$xldf
14215       ;;
14216
14217     uts4*)
14218       dll_ld=$LTLD
14219       dll_ldflags="-G"
14220       ;;
14221
14222     bsdi*)
14223       dll_ldflags="-r"
14224       dll_ld="shlicc2"
14225       ;;
14226
14227     *)
14228       ld_shlibs=no
14229       can_build_shared=no
14230       ;;
14231     esac
14232   fi
14233   echo "$ac_t""${ld_shlibs}" 1>&6
14234   if test "$ld_shlibs" = "no"; then
14235     can_build_shared=no
14236   fi
14237 fi # End of if cc_produces_so = no
14238
14239
14240 if test "$xe_gnu_ld" = yes; then
14241   if test "$ld_shlibs" = yes; then
14242     ld_dynamic_link_flags="${wl}-export-dynamic"
14243   fi
14244 fi
14245
14246 if test -z "$ld_dynamic_link_flags"; then
14247   case "$xehost_os" in
14248   aix3*)
14249     ld_dynamic_link_flags=
14250     ;;
14251
14252   aix4*)
14253     ld_dynamic_link_flags=
14254     ;;
14255
14256   freebsd2.2*)
14257     ld_dynamic_link_flags=
14258     ;;
14259
14260   freebsd2*)
14261     ld_dynamic_link_flags=
14262     ;;
14263
14264   freebsd3*)
14265     ld_dynamic_link_flags=
14266     ;;
14267
14268   hpux*)
14269     ld_dynamic_link_flags="${wl}-E"
14270     ;;
14271
14272   irix5* | irix6*)
14273     ld_dynamic_link_flags=
14274     ;;
14275
14276   netbsd*)
14277     ld_dynamic_link_flags=
14278     ;;
14279
14280   openbsd*)
14281     ld_dynamic_link_flags=
14282     ;;
14283
14284   osf3* | osf4*)
14285     ld_dynamic_link_flags=
14286     ;;
14287
14288   solaris2* | solaris7*)
14289     ld_dynamic_link_flags=
14290     ;;
14291
14292   sco3.2v5* | unixware* | sysv5* | sysv4*)
14293     ld_dynamic_link_flags="${wl}-Bexport"
14294     ;;
14295
14296   sunos4*)
14297     ld_dynamic_link_flags=
14298     ;;
14299
14300   uts4*)
14301     ld_dynamic_link_flags=
14302     ;;
14303
14304   bsdi*)
14305     ld_dynamic_link_flags=
14306     ;;
14307
14308   esac
14309 fi # End of if -z ld_dynamic_link_flags
14310 fi # End of if test "$can_build_shared" = "yes"
14311
14312
14313
14314
14315
14316
14317
14318
14319   fi
14320
14321   if test "$can_build_shared" = "yes"; then
14322     { test "$extra_verbose" = "yes" && cat << \EOF
14323     Defining HAVE_SHLIB
14324 EOF
14325 cat >> confdefs.h <<\EOF
14326 #define HAVE_SHLIB 1
14327 EOF
14328 }
14329
14330     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14331    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14332  fi
14333     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14334     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14335     for ac_func in dlerror _dlerror
14336 do
14337 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14338 echo "configure:14339: checking for $ac_func" >&5
14339
14340 cat > conftest.$ac_ext <<EOF
14341 #line 14342 "configure"
14342 #include "confdefs.h"
14343 /* System header to define __stub macros and hopefully few prototypes,
14344     which can conflict with char $ac_func(); below.  */
14345 #include <assert.h>
14346 /* Override any gcc2 internal prototype to avoid an error.  */
14347 /* We use char because int might match the return type of a gcc2
14348     builtin and then its argument prototype would still apply.  */
14349 char $ac_func();
14350
14351 int main() {
14352
14353 /* The GNU C library defines this for functions which it implements
14354     to always fail with ENOSYS.  Some functions are actually named
14355     something starting with __ and the normal name is an alias.  */
14356 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14357 choke me
14358 #else
14359 $ac_func();
14360 #endif
14361
14362 ; return 0; }
14363 EOF
14364 if { (eval echo configure:14365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14365   rm -rf conftest*
14366   eval "ac_cv_func_$ac_func=yes"
14367 else
14368   echo "configure: failed program was:" >&5
14369   cat conftest.$ac_ext >&5
14370   rm -rf conftest*
14371   eval "ac_cv_func_$ac_func=no"
14372 fi
14373 rm -f conftest*
14374
14375 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14376   echo "$ac_t""yes" 1>&6
14377     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14378   { test "$extra_verbose" = "yes" && cat << EOF
14379     Defining $ac_tr_func
14380 EOF
14381 cat >> confdefs.h <<EOF
14382 #define $ac_tr_func 1
14383 EOF
14384 }
14385  
14386 else
14387   echo "$ac_t""no" 1>&6
14388 fi
14389 done
14390
14391     with_modules=yes
14392   else
14393     if test "$with_modules" = "yes"; then
14394       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
14395     else
14396       echo "configure: warning: "Module support cannot be provided."" 1>&2
14397     fi
14398     with_modules=no
14399   fi
14400 fi
14401
14402 cat > conftest.$ac_ext <<EOF
14403 #line 14404 "configure"
14404 #include "confdefs.h"
14405 int main(int c,char *v[]){return 0;}
14406 EOF
14407 if { (eval echo configure:14408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
14408 then
14409   :
14410 else
14411   conftest_rc="$?"
14412   echo "configure: failed program was:" >&5
14413   cat conftest.$ac_ext >&5
14414   rm -fr conftest*
14415   
14416   echo ""
14417   echo "*** PANIC *** The C compiler can no longer build working executables."
14418   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
14419   echo "*** PANIC *** The most likely reason for this problem is that configure"
14420   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
14421   echo "*** PANIC *** found at run time."
14422   echo "*** PANIC ***"
14423   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
14424   echo "*** PANIC *** On other systems, try telling configure where to find the"
14425   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
14426   echo "*** PANIC ***"
14427   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
14428   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
14429   echo "*** PANIC *** on your system.  Don't do that."
14430   exit 1
14431 fi
14432 rm -fr conftest*
14433
14434 if test "$win32_processes" = "yes"; then
14435   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
14436    echo "    xemacs will be linked with \"process-nt.o\""
14437  fi
14438 else
14439   { test "$extra_verbose" = "yes" && cat << \EOF
14440     Defining HAVE_UNIX_PROCESSES
14441 EOF
14442 cat >> confdefs.h <<\EOF
14443 #define HAVE_UNIX_PROCESSES 1
14444 EOF
14445 }
14446
14447   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
14448    echo "    xemacs will be linked with \"process-unix.o\""
14449  fi
14450 fi
14451
14452
14453
14454 T=""
14455 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14456 CFLAGS="$T"
14457
14458
14459 T=""
14460 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14461 extra_objs="$T"
14462
14463
14464 T=""
14465 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
14466 c_switch_general="$T"
14467
14468
14469 T=""
14470 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14471 c_switch_window_system="$T"
14472
14473
14474 T=""
14475 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14476 c_switch_all="$T"
14477
14478
14479 T=""
14480 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
14481 ld_switch_general="$T"
14482
14483
14484 T=""
14485 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14486 ld_switch_window_system="$T"
14487
14488
14489 T=""
14490 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14491 ld_switch_all="$T"
14492
14493
14494 T=""
14495 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14496 ld_libs_general="$T"
14497
14498
14499 T=""
14500 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
14501 ld_libs_window_system="$T"
14502
14503
14504 T=""
14505 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14506 ld_libs_all="$T"
14507
14508
14509
14510 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
14511 internal_makefile_list="Makefile.in"
14512 SUBDIR_MAKEFILES=''
14513 test -d lock || mkdir lock
14514 for dir in $MAKE_SUBDIR; do
14515   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
14516         test -d "$d" || mkdir "$d"; cd "$d"
14517       done ) ;;
14518    * ) test -d "$dir" || mkdir "$dir" ;;
14519   esac
14520   
14521 T=""
14522 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14523 SUBDIR_MAKEFILES="$T"
14524
14525   
14526 T=""
14527 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14528 internal_makefile_list="$T"
14529
14530 done
14531
14532
14533
14534
14535 for dir in src/s src/m; do
14536   if test ! -d "$dir" ; then
14537     echo Making symbolic link to "$srcdir/$dir"
14538     ${LN_S} "$srcdir/$dir" "$dir"
14539   fi
14540 done
14541
14542 if test "$extra_verbose" = "yes"; then
14543   echo ""
14544   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
14545   echo ""
14546 fi
14547
14548
14549 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
14550   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
14551   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
14552 fi
14553
14554 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
14555   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
14556   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
14557 fi
14558
14559 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
14560   test "$extra_verbose" = "yes" && echo "creating TAGS"
14561   echo "\f
14562 $srcdir/TAGS,include" > "TAGS"
14563 fi
14564
14565 if test "$__SUNPRO_C" = "yes"; then
14566   test "$extra_verbose" = "yes" && echo "creating .sbinit"
14567   ( echo "# For use with Sun WorkShop's Source browser."
14568     echo "# See sbquery(1) and sbinit(4) for more information"
14569     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
14570   ) > .sbinit
14571 fi
14572
14573 rm -f core
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594 PREFIX=$prefix
14595 while true; do
14596   case "$PREFIX" in
14597     *\$* ) eval "PREFIX=$PREFIX" ;;
14598     *) break ;;
14599   esac
14600 done
14601
14602
14603
14604
14605 EXEC_PREFIX=$exec_prefix
14606 while true; do
14607   case "$EXEC_PREFIX" in
14608     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
14609     *) break ;;
14610   esac
14611 done
14612
14613
14614
14615
14616 INFODIR=$infodir
14617 while true; do
14618   case "$INFODIR" in
14619     *\$* ) eval "INFODIR=$INFODIR" ;;
14620     *) break ;;
14621   esac
14622 done
14623
14624
14625
14626
14627 INFOPATH=$infopath
14628 while true; do
14629   case "$INFOPATH" in
14630     *\$* ) eval "INFOPATH=$INFOPATH" ;;
14631     *) break ;;
14632   esac
14633 done
14634
14635
14636
14637
14638 PACKAGE_PATH=$package_path
14639 while true; do
14640   case "$PACKAGE_PATH" in
14641     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
14642     *) break ;;
14643   esac
14644 done
14645
14646
14647
14648
14649 LISPDIR=$lispdir
14650 while true; do
14651   case "$LISPDIR" in
14652     *\$* ) eval "LISPDIR=$LISPDIR" ;;
14653     *) break ;;
14654   esac
14655 done
14656
14657
14658
14659
14660 MODULEDIR=$moduledir
14661 while true; do
14662   case "$MODULEDIR" in
14663     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
14664     *) break ;;
14665   esac
14666 done
14667
14668
14669
14670
14671 SITELISPDIR=$sitelispdir
14672 while true; do
14673   case "$SITELISPDIR" in
14674     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
14675     *) break ;;
14676   esac
14677 done
14678
14679
14680
14681
14682 SITEMODULEDIR=$sitemoduledir
14683 while true; do
14684   case "$SITEMODULEDIR" in
14685     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
14686     *) break ;;
14687   esac
14688 done
14689
14690
14691
14692
14693 ETCDIR=$etcdir
14694 while true; do
14695   case "$ETCDIR" in
14696     *\$* ) eval "ETCDIR=$ETCDIR" ;;
14697     *) break ;;
14698   esac
14699 done
14700
14701
14702
14703
14704 DOCDIR=$docdir
14705 while true; do
14706   case "$DOCDIR" in
14707     *\$* ) eval "DOCDIR=$DOCDIR" ;;
14708     *) break ;;
14709   esac
14710 done
14711
14712
14713
14714
14715 ARCHLIBDIR=$archlibdir
14716 while true; do
14717   case "$ARCHLIBDIR" in
14718     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14719     *) break ;;
14720   esac
14721 done
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14743
14744
14745
14746
14747
14748
14749
14750 : ${XEMACS_CC:=$CC}
14751
14752
14753 if test "$with_prefix" = "yes"; then
14754   { test "$extra_verbose" = "yes" && cat << \EOF
14755     Defining PREFIX_USER_DEFINED
14756 EOF
14757 cat >> confdefs.h <<\EOF
14758 #define PREFIX_USER_DEFINED 1
14759 EOF
14760 }
14761
14762 fi
14763
14764 if test "$with_site_lisp" = "no"; then
14765   { test "$extra_verbose" = "yes" && cat << \EOF
14766     Defining INHIBIT_SITE_LISP
14767 EOF
14768 cat >> confdefs.h <<\EOF
14769 #define INHIBIT_SITE_LISP 1
14770 EOF
14771 }
14772
14773 fi
14774 if test "$with_site_modules" = "no"; then
14775   { test "$extra_verbose" = "yes" && cat << \EOF
14776     Defining INHIBIT_SITE_MODULES
14777 EOF
14778 cat >> confdefs.h <<\EOF
14779 #define INHIBIT_SITE_MODULES 1
14780 EOF
14781 }
14782
14783 fi
14784
14785
14786 T=""
14787 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14788 ac_configure_args="$T"
14789
14790 { test "$extra_verbose" = "yes" && cat << EOF
14791     Defining EMACS_CONFIGURATION = "$configuration"
14792 EOF
14793 cat >> confdefs.h <<EOF
14794 #define EMACS_CONFIGURATION "$configuration"
14795 EOF
14796 }
14797
14798 { test "$extra_verbose" = "yes" && cat << EOF
14799     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14800 EOF
14801 cat >> confdefs.h <<EOF
14802 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14803 EOF
14804 }
14805
14806
14807
14808 null_string=""
14809 { test "$extra_verbose" = "yes" && cat << EOF
14810     Defining LD_SWITCH_X_SITE = $null_string
14811 EOF
14812 cat >> confdefs.h <<EOF
14813 #define LD_SWITCH_X_SITE $null_string
14814 EOF
14815 }
14816
14817 { test "$extra_verbose" = "yes" && cat << EOF
14818     Defining LD_SWITCH_X_SITE_AUX = $null_string
14819 EOF
14820 cat >> confdefs.h <<EOF
14821 #define LD_SWITCH_X_SITE_AUX $null_string
14822 EOF
14823 }
14824
14825 { test "$extra_verbose" = "yes" && cat << EOF
14826     Defining C_SWITCH_X_SITE = $null_string
14827 EOF
14828 cat >> confdefs.h <<EOF
14829 #define C_SWITCH_X_SITE $null_string
14830 EOF
14831 }
14832
14833 { test "$extra_verbose" = "yes" && cat << EOF
14834     Defining LD_SWITCH_SITE = $null_string
14835 EOF
14836 cat >> confdefs.h <<EOF
14837 #define LD_SWITCH_SITE $null_string
14838 EOF
14839 }
14840
14841 { test "$extra_verbose" = "yes" && cat << EOF
14842     Defining C_SWITCH_SITE = $null_string
14843 EOF
14844 cat >> confdefs.h <<EOF
14845 #define C_SWITCH_SITE $null_string
14846 EOF
14847 }
14848
14849
14850
14851 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14852     Defining GNU_MALLOC
14853 EOF
14854 cat >> confdefs.h <<\EOF
14855 #define GNU_MALLOC 1
14856 EOF
14857 }
14858
14859 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14860     Defining USE_SYSTEM_MALLOC
14861 EOF
14862 cat >> confdefs.h <<\EOF
14863 #define USE_SYSTEM_MALLOC 1
14864 EOF
14865 }
14866
14867 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14868     Defining USE_DEBUG_MALLOC
14869 EOF
14870 cat >> confdefs.h <<\EOF
14871 #define USE_DEBUG_MALLOC 1
14872 EOF
14873 }
14874
14875                                               { test "$extra_verbose" = "yes" && cat << \EOF
14876     Defining USE_SYSTEM_MALLOC
14877 EOF
14878 cat >> confdefs.h <<\EOF
14879 #define USE_SYSTEM_MALLOC 1
14880 EOF
14881 }
14882
14883 fi
14884 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14885     Defining I18N3
14886 EOF
14887 cat >> confdefs.h <<\EOF
14888 #define I18N3 1
14889 EOF
14890 }
14891
14892 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14893     Defining USE_GCC
14894 EOF
14895 cat >> confdefs.h <<\EOF
14896 #define USE_GCC 1
14897 EOF
14898 }
14899
14900 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14901     Defining EXTERNAL_WIDGET
14902 EOF
14903 cat >> confdefs.h <<\EOF
14904 #define EXTERNAL_WIDGET 1
14905 EOF
14906 }
14907
14908 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14909     Defining QUICK_BUILD
14910 EOF
14911 cat >> confdefs.h <<\EOF
14912 #define QUICK_BUILD 1
14913 EOF
14914 }
14915
14916 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14917     Defining PURIFY
14918 EOF
14919 cat >> confdefs.h <<\EOF
14920 #define PURIFY 1
14921 EOF
14922 }
14923
14924 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14925     Defining QUANTIFY
14926 EOF
14927 cat >> confdefs.h <<\EOF
14928 #define QUANTIFY 1
14929 EOF
14930 }
14931
14932 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14933     Defining MAIL_USE_POP
14934 EOF
14935 cat >> confdefs.h <<\EOF
14936 #define MAIL_USE_POP 1
14937 EOF
14938 }
14939
14940 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14941     Defining KERBEROS
14942 EOF
14943 cat >> confdefs.h <<\EOF
14944 #define KERBEROS 1
14945 EOF
14946 }
14947
14948 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14949     Defining HESIOD
14950 EOF
14951 cat >> confdefs.h <<\EOF
14952 #define HESIOD 1
14953 EOF
14954 }
14955
14956 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14957     Defining USE_UNION_TYPE
14958 EOF
14959 cat >> confdefs.h <<\EOF
14960 #define USE_UNION_TYPE 1
14961 EOF
14962 }
14963
14964 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14965     Defining PDUMP
14966 EOF
14967 cat >> confdefs.h <<\EOF
14968 #define PDUMP 1
14969 EOF
14970 }
14971
14972
14973
14974 (
14975 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14976 else
14977   echo "uname -a: `uname -a`"
14978 fi
14979 echo ""
14980 echo "$0 $quoted_arguments"
14981 ) > Installation
14982
14983 if test ! -z ${emacs_beta_version} ; then
14984   if test -z "${emacs_is_beta}" ; then
14985         xemacs_betaname=".${emacs_beta_version}"
14986   else
14987         xemacs_betaname="-b${emacs_beta_version}"
14988   fi
14989 else
14990   xemacs_betaname=""
14991 fi
14992
14993 (
14994 echo "
14995
14996 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
14997 "
14998 echo "
14999 Compilation / Installation:"
15000 echo "  Source code location:              $srcdir"
15001 echo "  Installation prefix:               $prefix"
15002 if test -n "$site_includes"; then
15003   echo "  Additional header files:           $site_includes"
15004 fi
15005 if test -n "$site_libraries"; then
15006   echo "  Additional libraries:              $site_libraries"
15007 fi
15008 if test -n "$site_prefixes"; then
15009   echo "  Additional prefixes:               $site_prefixes"
15010 fi
15011 if test -n "$runpath"; then
15012   echo "  Runtime library search path:       $runpath"
15013 fi
15014
15015 if test -n "$opsysfile"
15016 then echo "  Operating system description file: \`$opsysfile'"
15017 else echo "  Not using any operating system description file"
15018 fi
15019 if test -n "$machfile"
15020 then echo "  Machine description file:          \`$machfile'"
15021 else echo "  Not using any machine description file"
15022 fi
15023
15024 echo "  Compiler:                          $CC $CFLAGS"
15025 echo "  Relocating allocator for buffers:  $rel_alloc"
15026 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15027
15028 echo "
15029 Window System:"
15030 if test "$with_msw" = "yes"; then
15031   echo "  Compiling in support for the Microsoft window system."
15032 fi
15033 if test "$with_x11" = "yes"; then
15034   echo "  Compiling in support for the X window system:"
15035   echo "    - X Windows headers location:                 $x_includes"
15036   echo "    - X Windows libraries location:               $x_libraries"
15037   if test "$with_xauth" != yes; then
15038     echo "    - Xau (X authority) not available."
15039   fi
15040   if test "$with_xmu" != yes; then
15041     echo "    - Xmu library not available; substituting equivalent routines."
15042   fi
15043   if test "$with_wmcommand" != no; then
15044     echo "    - Handling WM_COMMAND properly."
15045   fi
15046 fi
15047 if test "$need_athena" = "yes"; then
15048   echo "  Compiling in support for the Athena widget set:"
15049   echo "    - Athena headers location:                    $athena_h_path"
15050   echo "    - Athena library to link:                     $athena_lib"
15051 fi
15052 case "$with_menubars" in
15053   lucid ) echo "  Using Lucid menubars." ;;
15054   motif ) echo "  Using Motif menubars."
15055           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15056           echo "             We recommend using the Lucid menubar instead."
15057           echo "             Re-run configure with --with-menubars='lucid'." ;;
15058     msw ) echo "  Using MS-Windows menubars." ;;
15059 esac
15060 case "$with_scrollbars" in
15061   lucid  ) echo "  Using Lucid scrollbars."      ;;
15062   motif  ) echo "  Using Motif scrollbars."      ;;
15063   athena ) echo "  Using Athena scrollbars."     ;;
15064      msw ) echo "  Using MS-Windows scrollbars." ;;
15065 esac
15066 case "$with_dialogs" in
15067   motif  ) echo "  Using Motif dialog boxes."
15068            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15069              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15070              echo "             We recommend using the Athena dialog boxes instead."
15071              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15072              echo "             Read the PROBLEMS file for more information."
15073            fi; fi ;;
15074   athena ) echo "  Using Athena dialog boxes."     ;;
15075      msw ) echo "  Using MS-Windows dialog boxes." ;;
15076 esac
15077 case "$with_widgets" in
15078   motif  ) echo "  Using Motif native widgets."      ;;
15079   athena ) echo "  Using Athena native widgets."     ;;
15080      msw ) echo "  Using MS-Windows native widgets." ;;
15081 esac
15082 if test "$with_dragndrop" = yes; then
15083   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15084   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15085 fi
15086
15087 echo "
15088 TTY:"
15089 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15090 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15091
15092 echo "
15093 Images:"
15094 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15095 if test "$with_xpm" = yes; then
15096   echo "  Compiling in support for XPM  images."
15097 elif test "$with_x11" = yes; then
15098   echo "  WARNING: -----------------------------------------------------------"
15099   echo "  WARNING: Compiling without XPM image support."
15100   if test "$xpm_problem" != ""; then
15101     echo "  Reason: $xpm_problem"
15102   fi
15103   echo "  WARNING: You should strongly consider installing XPM."
15104   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15105   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15106   echo "  WARNING: -----------------------------------------------------------"
15107 fi
15108 if test "$with_png" = yes; then
15109   echo "  Compiling in support for PNG  images."
15110 elif test "$window_system" != "none"; then
15111   echo "  WARNING: -----------------------------------------------------------"
15112   echo "  WARNING: Compiling without PNG image support."
15113   if test "$png_problem" != ""; then
15114     echo "  Reason: $png_problem"
15115   fi
15116   echo "  WARNING: You should strongly consider installing the PNG libraries."
15117   echo "  WARNING: Otherwise certain images and glyphs may not display."
15118   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15119   echo "  WARNING: -----------------------------------------------------------"
15120 fi
15121 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15122 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15123 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15124
15125 echo "
15126 Sound:"
15127 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15128 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15129 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15130 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15131
15132 echo "
15133 Databases:"
15134 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15135 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15136 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15137 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15138 if test "$with_postgresql" = yes; then
15139   echo "  Compiling in support for PostgreSQL."
15140   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15141   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15142 fi
15143
15144 echo "
15145 Internationalization:"
15146 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15147 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15148 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15149 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15150 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15151 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15152 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15153 if test "$with_wnn" = yes; then
15154   echo "  Compiling in support for the WNN input method on Mule."
15155   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15156 fi
15157 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15158
15159 echo "
15160 Mail:"
15161 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15162 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15163 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15164 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15165
15166 echo "
15167 Other Features:"
15168 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15169 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15170 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15171 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15172 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15173 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15174 test "$pdump" = yes && echo "  Using the new portable dumper."
15175 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15176 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15177 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15178   != "no no no no no no"; then
15179   echo "  WARNING: ---------------------------------------------------------"
15180   echo "  WARNING: Compiling in support for runtime error checking."
15181   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15182   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15183   echo "  WARNING: ---------------------------------------------------------"
15184 fi
15185 echo ""
15186 ) | tee -a Installation
15187 echo ""
15188
15189
15190 # Remove any trailing slashes in these variables.
15191 test -n "$prefix" &&
15192   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15193 test -n "$exec_prefix" &&
15194   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15195
15196
15197 for file in $internal_makefile_list; do
15198   test "$file" = src/Makefile.in && \
15199     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15200   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15201 done
15202 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15203 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
15204
15205 trap '' 1 2 15
15206
15207 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15208
15209 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15210 # Let make expand exec_prefix.
15211 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15212
15213 # Any assignment to VPATH causes Sun make to only execute
15214 # the first set of double-colon rules, so remove it if not needed.
15215 # If there is a colon in the path, we need to keep it.
15216 if test "x$srcdir" = x.; then
15217   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15218 fi
15219
15220 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15221
15222 DEFS=-DHAVE_CONFIG_H
15223
15224 # Without the "./", some shells look in PATH for config.status.
15225 : ${CONFIG_STATUS=./config.status}
15226
15227 echo creating $CONFIG_STATUS
15228 rm -f $CONFIG_STATUS
15229 cat > $CONFIG_STATUS <<EOF
15230 #! /bin/sh
15231 # Generated automatically by configure.
15232 # Run this file to recreate the current configuration.
15233 # This directory was configured as follows,
15234 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15235 #
15236 # $0 $ac_configure_args
15237 #
15238 # Compiler output produced by configure, useful for debugging
15239 # configure, is in ./config.log if it exists.
15240
15241 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15242 for ac_option
15243 do
15244   case "\$ac_option" in
15245   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15246     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15247     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15248   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15249     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15250     exit 0 ;;
15251   -help | --help | --hel | --he | --h)
15252     echo "\$ac_cs_usage"; exit 0 ;;
15253   *) echo "\$ac_cs_usage"; exit 1 ;;
15254   esac
15255 done
15256
15257 ac_given_srcdir=$srcdir
15258 ac_given_INSTALL="$INSTALL"
15259
15260 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15261 EOF
15262 cat >> $CONFIG_STATUS <<EOF
15263
15264 # Protect against being on the right side of a sed subst in config.status.
15265 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15266  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15267 $ac_vpsub
15268 $extrasub
15269 s%@SHELL@%$SHELL%g
15270 s%@CFLAGS@%$CFLAGS%g
15271 s%@CPPFLAGS@%$CPPFLAGS%g
15272 s%@CXXFLAGS@%$CXXFLAGS%g
15273 s%@FFLAGS@%$FFLAGS%g
15274 s%@DEFS@%$DEFS%g
15275 s%@LDFLAGS@%$LDFLAGS%g
15276 s%@LIBS@%$LIBS%g
15277 s%@exec_prefix@%$exec_prefix%g
15278 s%@prefix@%$prefix%g
15279 s%@program_transform_name@%$program_transform_name%g
15280 s%@bindir@%$bindir%g
15281 s%@sbindir@%$sbindir%g
15282 s%@libexecdir@%$libexecdir%g
15283 s%@datadir@%$datadir%g
15284 s%@sysconfdir@%$sysconfdir%g
15285 s%@sharedstatedir@%$sharedstatedir%g
15286 s%@localstatedir@%$localstatedir%g
15287 s%@libdir@%$libdir%g
15288 s%@includedir@%$includedir%g
15289 s%@oldincludedir@%$oldincludedir%g
15290 s%@infodir@%$infodir%g
15291 s%@mandir@%$mandir%g
15292 s%@LN_S@%$LN_S%g
15293 s%@blddir@%$blddir%g
15294 s%@CC@%$CC%g
15295 s%@CPP@%$CPP%g
15296 s%@start_flags@%$start_flags%g
15297 s%@ld_switch_shared@%$ld_switch_shared%g
15298 s%@start_files@%$start_files%g
15299 s%@ld@%$ld%g
15300 s%@lib_gcc@%$lib_gcc%g
15301 s%@RANLIB@%$RANLIB%g
15302 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15303 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15304 s%@INSTALL_DATA@%$INSTALL_DATA%g
15305 s%@YACC@%$YACC%g
15306 s%@SET_MAKE@%$SET_MAKE%g
15307 s%@X_CFLAGS@%$X_CFLAGS%g
15308 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15309 s%@X_LIBS@%$X_LIBS%g
15310 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15311 s%@install_pp@%$install_pp%g
15312 s%@libs_xauth@%$libs_xauth%g
15313 s%@dnd_objs@%$dnd_objs%g
15314 s%@lwlib_objs@%$lwlib_objs%g
15315 s%@ALLOCA@%$ALLOCA%g
15316 s%@have_esd_config@%$have_esd_config%g
15317 s%@dll_ld@%$dll_ld%g
15318 s%@dll_cflags@%$dll_cflags%g
15319 s%@dll_ldflags@%$dll_ldflags%g
15320 s%@dll_post@%$dll_post%g
15321 s%@dll_ldo@%$dll_ldo%g
15322 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15323 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15324 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15325 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15326 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15327 s%@PROGNAME@%$PROGNAME%g
15328 s%@version@%$version%g
15329 s%@configuration@%$configuration%g
15330 s%@canonical@%$canonical%g
15331 s%@inststaticdir@%$inststaticdir%g
15332 s%@instvardir@%$instvardir%g
15333 s%@srcdir@%$srcdir%g
15334 s%@pkgdir@%$pkgdir%g
15335 s%@statedir@%$statedir%g
15336 s%@extra_includes@%$extra_includes%g
15337 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15338 s%@PREFIX@%$PREFIX%g
15339 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15340 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15341 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15342 s%@INFODIR@%$INFODIR%g
15343 s%@infopath@%$infopath%g
15344 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15345 s%@INFOPATH@%$INFOPATH%g
15346 s%@package_path@%$package_path%g
15347 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15348 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15349 s%@lispdir@%$lispdir%g
15350 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15351 s%@LISPDIR@%$LISPDIR%g
15352 s%@moduledir@%$moduledir%g
15353 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15354 s%@MODULEDIR@%$MODULEDIR%g
15355 s%@sitelispdir@%$sitelispdir%g
15356 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
15357 s%@SITELISPDIR@%$SITELISPDIR%g
15358 s%@sitemoduledir@%$sitemoduledir%g
15359 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
15360 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
15361 s%@etcdir@%$etcdir%g
15362 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
15363 s%@ETCDIR@%$ETCDIR%g
15364 s%@docdir@%$docdir%g
15365 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
15366 s%@DOCDIR@%$DOCDIR%g
15367 s%@archlibdir@%$archlibdir%g
15368 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
15369 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
15370 s%@bitmapdir@%$bitmapdir%g
15371 s%@extra_objs@%$extra_objs%g
15372 s%@machfile@%$machfile%g
15373 s%@opsysfile@%$opsysfile%g
15374 s%@c_switch_general@%$c_switch_general%g
15375 s%@c_switch_window_system@%$c_switch_window_system%g
15376 s%@c_switch_all@%$c_switch_all%g
15377 s%@ld_switch_general@%$ld_switch_general%g
15378 s%@ld_switch_window_system@%$ld_switch_window_system%g
15379 s%@ld_switch_all@%$ld_switch_all%g
15380 s%@ld_libs_general@%$ld_libs_general%g
15381 s%@ld_libs_window_system@%$ld_libs_window_system%g
15382 s%@ld_libs_all@%$ld_libs_all%g
15383 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
15384 s%@native_sound_lib@%$native_sound_lib%g
15385 s%@sound_cflags@%$sound_cflags%g
15386 s%@dynodump_arch@%$dynodump_arch%g
15387 s%@XEMACS_CC@%$XEMACS_CC%g
15388 s%@internal_makefile_list@%$internal_makefile_list%g
15389
15390 CEOF
15391 EOF
15392
15393 cat >> $CONFIG_STATUS <<\EOF
15394
15395 # Split the substitutions into bite-sized pieces for seds with
15396 # small command number limits, like on Digital OSF/1 and HP-UX.
15397 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15398 ac_file=1 # Number of current file.
15399 ac_beg=1 # First line for current file.
15400 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15401 ac_more_lines=:
15402 ac_sed_cmds=""
15403 while $ac_more_lines; do
15404   if test $ac_beg -gt 1; then
15405     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15406   else
15407     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15408   fi
15409   if test ! -s conftest.s$ac_file; then
15410     ac_more_lines=false
15411     rm -f conftest.s$ac_file
15412   else
15413     if test -z "$ac_sed_cmds"; then
15414       ac_sed_cmds="sed -f conftest.s$ac_file"
15415     else
15416       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15417     fi
15418     ac_file=`expr $ac_file + 1`
15419     ac_beg=$ac_end
15420     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15421   fi
15422 done
15423 if test -z "$ac_sed_cmds"; then
15424   ac_sed_cmds=cat
15425 fi
15426 EOF
15427
15428 cat >> $CONFIG_STATUS <<EOF
15429
15430 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
15431 EOF
15432 cat >> $CONFIG_STATUS <<\EOF
15433 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15434   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15435   case "$ac_file" in
15436   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15437        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15438   *) ac_file_in="${ac_file}.in" ;;
15439   esac
15440
15441   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15442
15443   # Remove last slash and all that follows it.  Not all systems have dirname.
15444   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15445   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15446     # The file is in a subdirectory.
15447     test ! -d "$ac_dir" && mkdir "$ac_dir"
15448     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15449     # A "../" for each directory in $ac_dir_suffix.
15450     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15451   else
15452     ac_dir_suffix= ac_dots=
15453   fi
15454
15455   case "$ac_given_srcdir" in
15456   .)  srcdir=.
15457       if test -z "$ac_dots"; then top_srcdir=.
15458       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15459   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15460   *) # Relative path.
15461     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15462     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15463   esac
15464
15465   case "$ac_given_INSTALL" in
15466   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15467   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15468   esac
15469
15470   echo creating "$ac_file"
15471   rm -f "$ac_file"
15472   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15473   case "$ac_file" in
15474   *Makefile*) ac_comsub="1i\\
15475 # $configure_input" ;;
15476   *) ac_comsub= ;;
15477   esac
15478
15479   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15480   sed -e "$ac_comsub
15481 s%@configure_input@%$configure_input%g
15482 s%@srcdir@%$srcdir%g
15483 s%@top_srcdir@%$top_srcdir%g
15484 s%@INSTALL@%$INSTALL%g
15485 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15486 fi; done
15487 rm -f conftest.s*
15488
15489 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15490 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15491 #
15492 # ac_d sets the value in "#define NAME VALUE" lines.
15493 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15494 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15495 ac_dC='\3'
15496 ac_dD='%g'
15497 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15498 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15499 ac_uB='\([      ]\)%\1#\2define\3'
15500 ac_uC=' '
15501 ac_uD='\4%g'
15502 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15503 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15504 ac_eB='$%\1#\2define\3'
15505 ac_eC=' '
15506 ac_eD='%g'
15507
15508 if test "${CONFIG_HEADERS+set}" != set; then
15509 EOF
15510 cat >> $CONFIG_STATUS <<EOF
15511   CONFIG_HEADERS="src/config.h lwlib/config.h"
15512 EOF
15513 cat >> $CONFIG_STATUS <<\EOF
15514 fi
15515 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15516   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15517   case "$ac_file" in
15518   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15519        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15520   *) ac_file_in="${ac_file}.in" ;;
15521   esac
15522
15523   echo creating $ac_file
15524
15525   rm -f conftest.frag conftest.in conftest.out
15526   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15527   cat $ac_file_inputs > conftest.in
15528
15529 EOF
15530
15531 # Transform confdefs.h into a sed script conftest.vals that substitutes
15532 # the proper values into config.h.in to produce config.h.  And first:
15533 # Protect against being on the right side of a sed subst in config.status.
15534 # Protect against being in an unquoted here document in config.status.
15535 rm -f conftest.vals
15536 cat > conftest.hdr <<\EOF
15537 s/[\\&%]/\\&/g
15538 s%[\\$`]%\\&%g
15539 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15540 s%ac_d%ac_u%gp
15541 s%ac_u%ac_e%gp
15542 EOF
15543 sed -n -f conftest.hdr confdefs.h > conftest.vals
15544 rm -f conftest.hdr
15545
15546 # This sed command replaces #undef with comments.  This is necessary, for
15547 # example, in the case of _POSIX_SOURCE, which is predefined and required
15548 # on some systems where configure will not decide to define it.
15549 cat >> conftest.vals <<\EOF
15550 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15551 EOF
15552
15553 # Break up conftest.vals because some shells have a limit on
15554 # the size of here documents, and old seds have small limits too.
15555
15556 rm -f conftest.tail
15557 while :
15558 do
15559   ac_lines=`grep -c . conftest.vals`
15560   # grep -c gives empty output for an empty file on some AIX systems.
15561   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15562   # Write a limited-size here document to conftest.frag.
15563   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15564   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15565   echo 'CEOF
15566   sed -f conftest.frag conftest.in > conftest.out
15567   rm -f conftest.in
15568   mv conftest.out conftest.in
15569 ' >> $CONFIG_STATUS
15570   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15571   rm -f conftest.vals
15572   mv conftest.tail conftest.vals
15573 done
15574 rm -f conftest.vals
15575
15576 cat >> $CONFIG_STATUS <<\EOF
15577   rm -f conftest.frag conftest.h
15578   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15579   cat conftest.in >> conftest.h
15580   rm -f conftest.in
15581   if cmp -s $ac_file conftest.h 2>/dev/null; then
15582     echo "$ac_file is unchanged"
15583     rm -f conftest.h
15584   else
15585     # Remove last slash and all that follows it.  Not all systems have dirname.
15586       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15587       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15588       # The file is in a subdirectory.
15589       test ! -d "$ac_dir" && mkdir "$ac_dir"
15590     fi
15591     rm -f $ac_file
15592     mv conftest.h $ac_file
15593   fi
15594 fi; done
15595
15596 EOF
15597 cat >> $CONFIG_STATUS <<EOF
15598 CPP="$CPP"
15599  top_srcdir="$srcdir"
15600  MAKE_SUBDIR="$MAKE_SUBDIR"
15601
15602 EOF
15603 cat >> $CONFIG_STATUS <<\EOF
15604 for dir in . $MAKE_SUBDIR; do
15605   (
15606     cd $dir
15607     rm -f junk.c
15608     < Makefile.in \
15609       sed -e '/^# Generated/d' \
15610           -e 's%/\*\*/#.*%%' \
15611           -e 's/^ *# */#/' \
15612           -e '/^##/d' \
15613           -e '/^#/ {
15614 p
15615 d
15616 }'        \
15617           -e '/./ {
15618 s/\([\"]\)/\\\1/g
15619 s/^/"/
15620 s/$/"/
15621 }'  > junk.c;
15622
15623
15624
15625     echo creating $dir/Makefile
15626 $CPP -I. -I${top_srcdir}/src  junk.c \
15627   | sed -e 's/^\#.*//'          \
15628         -e 's/^[        ][      ]*$//'\
15629         -e 's/^ /       /'              \
15630         -e '/^[ \f]*$/d' \
15631         -e '/^\"/ {
15632         s/\\\([\"]\)/\1/g
15633         s/^[    ]*\"//
15634         s/\"[   ]*$//
15635 }' > Makefile.new
15636     chmod 444 Makefile.new
15637     mv -f Makefile.new Makefile
15638
15639     echo creating $dir/GNUmakefile
15640 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
15641   | sed -e 's/^\#.*//'          \
15642         -e 's/^[        ][      ]*$//'\
15643         -e 's/^ /       /'              \
15644         -e '/^[ \f]*$/d' \
15645         -e '/^\"/ {
15646         s/\\\([\"]\)/\1/g
15647         s/^[    ]*\"//
15648         s/\"[   ]*$//
15649 }' > Makefile.new
15650     chmod 444 Makefile.new
15651     mv -f Makefile.new GNUmakefile
15652
15653     rm -f junk.c
15654   )
15655 done
15656
15657 sed < config.status >> lib-src/config.values \
15658   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
15659   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
15660   -e 's/^\([^ ]*\) $/\1 ""/' \
15661   -e 's/ 1$/ t/'
15662
15663
15664 exit 0
15665 EOF
15666 chmod +x $CONFIG_STATUS
15667 rm -fr confdefs* $ac_clean_files
15668 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1