XEmacs 21.2.34 "Molpe".
[chise/xemacs-chise.git-] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 1998, 1999 J. Kean Johnston.
11
12 ### Don't edit this script!
13 ### This script was automatically generated by the `autoconf' program
14 ### from the file `./configure.in'.
15 ### To rebuild it, execute the command
16 ###     autoconf
17 ### in the this directory.  You must have autoconf version 2.13 or later.
18
19 ### This file is part of XEmacs.
20
21 ### XEmacs is free software; you can redistribute it and/or modify it
22 ### under the terms of the GNU General Public License as published by
23 ### the Free Software Foundation; either version 2, or (at your
24 ### option) any later version.
25
26 ### XEmacs is distributed in the hope that it will be useful, but
27 ### WITHOUT ANY WARRANTY; without even the implied warranty of
28 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29 ### General Public License for more details.
30
31 ### You should have received a copy of the GNU General Public License
32 ### along with XEmacs; see the file COPYING.  If not, write to the Free
33 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34 ### 02111-1307, USA.
35
36 ### For usage, run `./configure --help'
37 ### For more detailed information on building and installing XEmacs,
38 ### read the file `INSTALL'.
39 ###
40 ### If configure succeeds, it leaves its status in config.status.
41 ### A log of configuration tests can be found in config.log.
42 ### If configure fails after disturbing the status quo,
43 ###     config.status is removed.
44
45 ac_help="$ac_help
46   --with-x                use the X Window System"
47
48
49
50 if test -n "$ZSH_VERSION"; then
51     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
52   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
53   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
54   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
55       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
56 elif test -n "$BASH_VERSION"; then
57     set -o posix
58   unset CDPATH
59 else
60   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
61 fi
62
63 exec_prefix=NONE
64 host=NONE
65 no_create=
66 nonopt=NONE
67 no_recursion=
68 prefix=NONE
69 program_prefix=NONE
70 program_suffix=NONE
71 program_transform_name=s,x,x,
72 silent=
73 site=
74 srcdir=
75 target=NONE
76 verbose=
77 x_includes=NONE
78 x_libraries=NONE
79
80 bindir='${exec_prefix}/bin'
81 sbindir='${exec_prefix}/sbin'
82 libexecdir='${exec_prefix}/libexec'
83 datadir='${prefix}/share'
84 sysconfdir='${prefix}/etc'
85 sharedstatedir='${prefix}/com'
86 localstatedir='${prefix}/var'
87 libdir='${{exec_prefix}}/lib'
88 includedir='${prefix}/include'
89 oldincludedir='/usr/include'
90 infodir='${prefix}/info'
91 mandir='${prefix}/man'
92
93 subdirs=
94 MFLAGS= MAKEFLAGS=
95 SHELL=${CONFIG_SHELL-/bin/sh}
96 ac_max_here_lines=12
97
98 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
99
100 # File descriptor usage:
101 # 0 standard input
102 # 1 file creation
103 # 2 errors and warnings
104 # 3 some systems may open it to /dev/tty
105 # 4 used on the Kubota Titan
106 # 6 checking for... messages and results
107 # 5 compiler messages saved in config.log
108 if test "$silent" = yes; then
109   exec 6>/dev/null
110 else
111   exec 6>&1
112 fi
113 exec 5>./config.log
114
115 echo "\
116 This file contains any messages produced by compilers while
117 running configure, to aid debugging if configure makes a mistake.
118 " 1>&5
119
120 # Strip out --no-create and --no-recursion so they do not pile up.
121 # Also quote any args containing shell metacharacters.
122 ac_configure_args=
123 for ac_arg
124 do
125   case "$ac_arg" in
126   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
127   | --no-cr | --no-c) ;;
128   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
129   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
130   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
131   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
132   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
133   esac
134 done
135
136 # NLS nuisances.
137 # Only set these to C if already set.  These must not be set unconditionally
138 # because not all systems understand e.g. LANG=C (notably SCO).
139 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
140 # Non-C LC_CTYPE values break the ctype check.
141 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
142 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
143 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
144 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
145
146 # confdefs.h avoids OS command line length limits that DEFS can exceed.
147 rm -rf conftest* confdefs.h
148 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
149 echo > confdefs.h
150
151 # A filename unique to this package, relative to the directory that
152 # configure is in, which we can look for to find out if srcdir is correct.
153 ac_unique_file=src/lisp.h
154
155 # Find the source files, if location was not specified.
156 if test -z "$srcdir"; then
157   ac_srcdir_defaulted=yes
158   # Try the directory containing this script, then its parent.
159   ac_prog=$0
160   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
161   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
162   srcdir=$ac_confdir
163   if test ! -r $srcdir/$ac_unique_file; then
164     srcdir=..
165   fi
166 else
167   ac_srcdir_defaulted=no
168 fi
169 if test ! -r $srcdir/$ac_unique_file; then
170   if test "$ac_srcdir_defaulted" = yes; then
171     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
172   else
173     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
174   fi
175 fi
176 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
177
178 # Prefer explicitly selected file to automatically selected ones.
179 if test -z "$CONFIG_SITE"; then
180   if test "x$prefix" != xNONE; then
181     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
182   else
183     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
184   fi
185 fi
186 for ac_site_file in $CONFIG_SITE; do
187   if test -r "$ac_site_file"; then
188     echo "loading site script $ac_site_file"
189     . "$ac_site_file"
190   fi
191 done
192
193
194 ac_ext=c
195 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
196 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
197 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
198 ac_cpp='$CPP '"$xe_cppflags"
199 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
200 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
201 cross_compiling=no
202
203 ac_exeext=
204 ac_objext=o
205 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
206   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
207   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
208     ac_n= ac_c='
209 ' ac_t='        '
210   else
211     ac_n=-n ac_c= ac_t=
212   fi
213 else
214   ac_n= ac_c='\c' ac_t=
215 fi
216
217
218 progname="`echo $0 | sed 's:^\./\./:\./:'`"
219
220
221 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
222 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
223
224 prefix='/usr/local'
225 exec_prefix='${prefix}'
226 bindir='${exec_prefix}/bin'
227 datadir='${prefix}/lib'
228 statedir='${prefix}/lib'
229 libdir='${exec_prefix}/lib'
230 mandir='${prefix}/man/man1'
231 inststaticdir='${PROGNAME}'
232 instvardir='${PROGNAME}-${version}'
233 infodir='${datadir}/${instvardir}/info'
234 infopath=''
235 install_pp=''
236 lispdir='${datadir}/${instvardir}/lisp'
237 moduledir='${datadir}/${instvardir}/${configuration}/modules'
238 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
239 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
240 pkgdir='${datadir}/${instvardir}/lisp'
241 package_path=''
242 etcdir='${datadir}/${instvardir}/etc'
243 archlibdir='${datadir}/${instvardir}/${configuration}'
244 docdir='${archlibdir}'
245 with_prefix='yes'
246 with_site_lisp='no'
247 with_site_modules='yes'
248 with_menubars=''
249 with_scrollbars=''
250 with_widgets=''
251 with_dialogs=''
252 with_file_coding=''
253 cpp='' cppflags='' libs='' ldflags=''
254 dynamic=''
255 with_x11=''
256 with_msw=''
257 rel_alloc='default'
258 with_system_malloc='default'
259 with_dlmalloc='default'
260 native_sound_lib=''
261 use_assertions="yes"
262 with_toolbars=""
263 with_tty=""
264 use_union_type="no"
265 with_dnet=""
266 pdump="no"
267 with_dragndrop="no"
268
269
270
271
272 arguments="$@"
273
274 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
275 quoted_arguments=
276 for i in "$@"; do
277    case "$i" in
278    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
279    | --no-cr | --no-c) ;;
280    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
281    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
282    *)
283    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
284    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
285    esac
286 done
287
288 while test $# != 0; do
289   arg="$1"; shift
290   case "$arg" in
291     --no-create|--no-recursion) ;;
292         -* )
293             case "$arg" in
294         -*=*)
295           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
296           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
297           valomitted=no
298         ;;
299                                                                           -*)
300                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
301           val="yes" valomitted=yes
302         ;;
303       esac
304
305             optname="$opt"
306       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
307
308             case "${valomitted}-${opt}" in yes-without_* )
309         opt=`echo $opt | sed 's/without/with/'`
310         valomitted="no" val="no" ;;
311       esac
312
313             case "$opt" in
314
315         with_site_lisp  | \
316         with_prefix     | \
317         with_site_modules | \
318         with_x          | \
319         with_x11        | \
320         with_msw        | \
321         with_gcc        | \
322         dynamic         | \
323         with_ncurses    | \
324         with_dnet       | \
325         with_socks      | \
326         with_dragndrop  | \
327         with_cde        | \
328         with_offix      | \
329         with_gpm        | \
330         with_xpm        | \
331         with_xface      | \
332         with_gif        | \
333         with_jpeg       | \
334         with_png        | \
335         with_tiff       | \
336         with_wmcommand  | \
337         with_xmu        | \
338         with_purify     | \
339         with_quantify   | \
340         with_toolbars   | \
341         with_tty        | \
342         with_xfs        | \
343         with_i18n3      | \
344         with_mule       | \
345         with_file_coding| \
346         with_canna      | \
347         with_wnn        | \
348         with_wnn6       | \
349         with_workshop   | \
350         with_sparcworks | \
351         with_tooltalk   | \
352         with_ldap       | \
353         with_postgresql | \
354         with_pop        | \
355         with_kerberos   | \
356         with_hesiod     | \
357         with_dnet       | \
358         with_infodock   | \
359         external_widget | \
360         verbose         | \
361         extra_verbose   | \
362         usage_tracking  | \
363         use_union_type  | \
364         pdump           | \
365         debug           | \
366         use_assertions  | \
367         memory_usage_stats | \
368         with_clash_detection | \
369         with_modules | \
370         quick_build )
371                   case "$val" in
372             y | ye | yes )      val=yes ;;
373             n | no )            val=no  ;;
374             * ) (echo "$progname: Usage error:"
375 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
376 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
377           esac
378           eval "$opt=\"$val\"" ;;
379
380
381                         srcdir          | \
382         compiler        | \
383         cflags          | \
384         cpp             | \
385         cppflags        | \
386         libs            | \
387         ldflags         | \
388         cache_file      | \
389         native_sound_lib| \
390         site_lisp       | \
391         x_includes      | \
392         x_libraries     | \
393         site_includes   | \
394         site_libraries  | \
395         site_prefixes   | \
396         site_runtime_libraries )
397                   if test "$valomitted" = "yes" ; then
398                     if test "$#" = 0 ; then
399               (echo "$progname: Usage error:"
400 echo " " "The \`--$optname' option requires a value."
401 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
402             fi
403             val="$1"; shift
404           fi
405           eval "$opt=\"$val\""
406         ;;
407
408                 rel_alloc | \
409         with_dlmalloc | \
410         with_debug_malloc  | use_debug_malloc | \
411         with_system_malloc | use_system_malloc )
412           case "$val" in
413             y | ye | yes )      val=yes ;;
414             n | no )            val=no  ;;
415             d | de | def | defa | defau | defaul | default ) val=default ;;
416             * ) (echo "$progname: Usage error:"
417 echo " " "The \`--$optname' option requires one of these values:
418   \`yes', \`no', or \`default'."
419 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
420           esac
421           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
422           eval "$opt=\"$val\""
423         ;;
424
425                 "with_database" )
426           with_database_berkdb=no
427           with_database_dbm=no
428           with_database_gdbm=no
429           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
430             case "$x" in
431               no ) ;;
432               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
433               d | db | dbm )                               with_database_dbm=yes    ;;
434               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
435               * ) (echo "$progname: Usage error:"
436 echo " " "The \`--$optname' option value
437   must be either \`no' or a comma-separated list
438   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
439 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
440             esac
441           done
442           if test "$with_database_dbm"  = "yes" -a \
443                   "$with_database_gdbm" = "yes"; then
444           (echo "$progname: Usage error:"
445 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
446   with the \`--$optname' option."
447 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
448           fi
449         ;;
450
451                 "with_sound" )
452                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
453             case "$x" in
454                       n | no | non | none ) new_sdefault=no ;;
455               a | al | all | both ) new_sdefault=yes ;;
456
457               native )       with_native_sound=yes ;;
458               nonative )     with_native_sound=no ;;
459
460               nas )          with_nas_sound=yes ;;
461               nonas )        with_nas_sound=no ;;
462
463               esd )          with_esd_sound=yes ;;
464               noesd )        with_esd_sound=no ;;
465
466               * ) bogus_sound=yes ;;
467             esac
468             if test "$bogus_sound" -o \
469                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
470                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
471                 (echo "$progname: Usage error:"
472 echo " " "Valid types for the \`--$optname' option are:
473   $types.
474 The default is to autodetect all sound support."
475 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
476             elif test -n "$new_sdefault" ; then
477                 with_native_sound=$new_sdefault
478                 with_nas_sound=$new_sdefault
479                 with_esd_sound=$new_sdefault
480                 new_sdefault=   # reset this
481             fi
482             sound_notfirst=true
483           done
484         ;;
485
486                         "with_athena" )
487           case "$val" in
488             xa | xaw )                    val=xaw    ;;
489             3 | 3d | xaw3d )              val=3d     ;;
490                         ne | nex | next | naxtaw)     val=next   ;;
491                         9 | 95 | xaw95 )              val=95     ;;
492             xp | xpm | xawxpm )           val=xpm    ;;
493             * ) (echo "$progname: Usage error:"
494 echo " " "The \`--$optname' option must have one of these values:
495   \`xaw', \`3d', \`next', \`95', or \`xpm'."
496 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
497           esac
498           eval "$opt=\"$val\""
499         ;;
500
501                 "with_xim" )
502           case "$val" in
503             y | ye | yes )                val=yes   ;;
504             n | no | non | none )         val=no    ;;
505             x | xl | xli | xlib )         val=xlib  ;;
506             m | mo | mot | moti | motif ) val=motif ;;
507             * ) (echo "$progname: Usage error:"
508 echo " " "The \`--$optname' option must have one of these values:
509   \`motif', \`xlib', \`yes', or \`no'."
510 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
511           esac
512           eval "$opt=\"$val\""
513         ;;
514
515                 "mail_locking" )
516           case "$val" in
517             lockf )     val=lockf ;;
518             flock )     val=flock ;;
519             file | dot ) val=file  ;;
520             locking )   val=locking  ;;
521             * ) (echo "$progname: Usage error:"
522 echo " " "The \`--$optname' option must have one of these values:
523   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
524 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
525           esac
526           eval "$opt=\"$val\""
527         ;;
528
529                 "error_checking" )
530                           
531           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
532             case "$x" in
533                       n | no | non | none ) new_default=no ;;
534               a | al | all )        new_default=yes ;;
535
536               extents )       error_check_extents=yes ;;
537               noextents )     error_check_extents=no ;;
538
539               typecheck )     error_check_typecheck=yes ;;
540               notypecheck )   error_check_typecheck=no ;;
541
542               bufpos )        error_check_bufpos=yes ;;
543               nobufpos )      error_check_bufpos=no ;;
544
545               gc )            error_check_gc=yes ;;
546               nogc )          error_check_gc=no ;;
547
548               malloc )        error_check_malloc=yes ;;
549               nomalloc )      error_check_malloc=no ;;
550
551               byte_code )     error_check_byte_code=yes ;;
552               nobyte_code )   error_check_byte_code=no ;;
553
554               glyphs )     error_check_glyphs=yes ;;
555               noglyphs )   error_check_glyphs=no ;;
556
557               * ) bogus_error_check=yes ;;
558             esac
559             if test "$bogus_error_check" -o \
560                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
561                 if test "$error_check_default" = yes ; then
562                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
563                 else
564                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
565                 fi
566                 (echo "$progname: Usage error:"
567 echo " " "Valid types for the \`--$optname' option are:
568   $types."
569 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
570             elif test -n "$new_default" ; then
571                 error_check_extents=$new_default
572                 error_check_typecheck=$new_default
573                 error_check_bufpos=$new_default
574                 error_check_gc=$new_default
575                 error_check_malloc=$new_default
576                 error_check_byte_code=$new_default
577                 error_check_glyphs=$new_default
578                 new_default=    # reset this
579             fi
580             echeck_notfirst=true
581           done
582         ;;
583
584                                 
585                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
586         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
587         archlibdir | docdir | package_path )
588                    if test "$valomitted" = "yes"; then
589              if test "$#" = 0; then
590                  (echo "$progname: Usage error:"
591 echo " " "The \`--$optname' option requires a value."
592 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
593              fi
594              val="$1"; shift
595            fi
596            eval "$opt=\"$val\""
597
598                            case "$opt" in
599                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
600     Defining EXEC_PREFIX_USER_DEFINED
601 EOF
602 cat >> confdefs.h <<\EOF
603 #define EXEC_PREFIX_USER_DEFINED 1
604 EOF
605 }
606  ;;
607              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
608     Defining LISPDIR_USER_DEFINED
609 EOF
610 cat >> confdefs.h <<\EOF
611 #define LISPDIR_USER_DEFINED 1
612 EOF
613 }
614  ;;
615              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
616     Defining SITELISPDIR_USER_DEFINED
617 EOF
618 cat >> confdefs.h <<\EOF
619 #define SITELISPDIR_USER_DEFINED 1
620 EOF
621 }
622  ;;
623              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
624     Defining MODULEDIR_USER_DEFINED
625 EOF
626 cat >> confdefs.h <<\EOF
627 #define MODULEDIR_USER_DEFINED 1
628 EOF
629 }
630  ;;
631              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
632     Defining ETCDIR_USER_DEFINED
633 EOF
634 cat >> confdefs.h <<\EOF
635 #define ETCDIR_USER_DEFINED 1
636 EOF
637 }
638  ;;
639              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
640     Defining INFODIR_USER_DEFINED
641 EOF
642 cat >> confdefs.h <<\EOF
643 #define INFODIR_USER_DEFINED 1
644 EOF
645 }
646  ;;
647              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
648     Defining INFOPATH_USER_DEFINED
649 EOF
650 cat >> confdefs.h <<\EOF
651 #define INFOPATH_USER_DEFINED 1
652 EOF
653 }
654  ;;
655              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
656     Defining PACKAGE_PATH_USER_DEFINED
657 EOF
658 cat >> confdefs.h <<\EOF
659 #define PACKAGE_PATH_USER_DEFINED 1
660 EOF
661 }
662  ;;
663              datadir )
664                 { test "$extra_verbose" = "yes" && cat << \EOF
665     Defining INFODIR_USER_DEFINED
666 EOF
667 cat >> confdefs.h <<\EOF
668 #define INFODIR_USER_DEFINED 1
669 EOF
670 }
671
672                 { test "$extra_verbose" = "yes" && cat << \EOF
673     Defining LISPDIR_USER_DEFINED
674 EOF
675 cat >> confdefs.h <<\EOF
676 #define LISPDIR_USER_DEFINED 1
677 EOF
678 }
679
680             { test "$extra_verbose" = "yes" && cat << \EOF
681     Defining MODULEDIR_USER_DEFINED
682 EOF
683 cat >> confdefs.h <<\EOF
684 #define MODULEDIR_USER_DEFINED 1
685 EOF
686 }
687
688                 { test "$extra_verbose" = "yes" && cat << \EOF
689     Defining ETCDIR_USER_DEFINED
690 EOF
691 cat >> confdefs.h <<\EOF
692 #define ETCDIR_USER_DEFINED 1
693 EOF
694 }
695  ;;
696              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
697     Defining DOCDIR_USER_DEFINED
698 EOF
699 cat >> confdefs.h <<\EOF
700 #define DOCDIR_USER_DEFINED 1
701 EOF
702 }
703  ;;
704              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
705     Defining ARCHLIBDIR_USER_DEFINED
706 EOF
707 cat >> confdefs.h <<\EOF
708 #define ARCHLIBDIR_USER_DEFINED 1
709 EOF
710 }
711  ;;
712            esac
713         ;;
714
715                 "no_create" ) ;;
716
717                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
718
719                 "with_menubars"   | \
720         "with_scrollbars" | \
721         "with_dialogs" | \
722         "with_widgets" )
723           case "$val" in
724             l | lu | luc | luci | lucid )               val=lucid  ;;
725             m | mo | mot | moti | motif )               val=motif  ;;
726             a | at | ath | athe | athen | athena )      val=athena ;;
727             n | no | non | none )                       val=no ;;
728             * ) (echo "$progname: Usage error:"
729 echo " " "The \`--$optname' option must have one of these values:
730   \`lucid', \`motif', \`athena', or \`no'."
731 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
732           esac
733           eval "$opt=\"$val\""
734         ;;
735
736                 "use_minimal_tagbits" | \
737         "use_indexed_lrecord_implementation" | \
738         "run_in_place"  | \
739         "const_is_losing" | \
740         "with_gnu_make" )
741           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
742         ;;
743
744                 * ) (echo "$progname: Usage error:"
745 echo " " "Unrecognized option: $arg"
746 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
747
748       esac
749     ;;
750
751         *-*-*) configuration="$arg" ;;
752
753         *) (echo "$progname: Usage error:"
754 echo " " "Unrecognized argument: $arg"
755 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
756
757   esac
758 done
759
760
761 test -n "$cpp"      && CPP="$cpp"
762 test -n "$cppflags" && CPPFLAGS="$cppflags"
763 test -n "$libs"     && LIBS="$libs"
764 test -n "$ldflags"  && LDFLAGS="$ldflags"
765
766 eval set x "$quoted_arguments"; shift
767
768 test "$extra_verbose" = "yes" && verbose=yes
769
770 test -n "$with_x" && with_x11="$with_x"
771
772 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
773   test "$with_system_malloc" = "default" && with_system_malloc=yes
774 fi
775
776
777
778 if test "$with_cde $with_tooltalk" = "yes no"; then
779   (echo "$progname: Usage error:"
780 echo " " "--with-cde requires --with-tooltalk"
781 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
782 elif test "$with_tooltalk" = "no" ; then with_cde=no
783 elif test "$with_cde" = "yes"; then with_tooltalk=yes
784 fi
785
786
787 case "$srcdir" in
788
789     "" )
790     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
791       if test -f "$dir/src/lisp.h" -a \
792               -f "$dir/lisp/version.el" ; then
793         srcdir="$dir"
794         break
795       fi
796     done
797     if test -z "$srcdir" ; then
798       (echo "$progname: Usage error:"
799 echo " " "Neither the current directory nor its parent seem to
800   contain the XEmacs sources.  If you do not want to build XEmacs in its
801   source tree, you should run \`$progname' in the directory in which
802   you wish to build XEmacs, using the \`--srcdir' option to say where the
803   sources may be found."
804 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
805     fi
806   ;;
807
808     * )
809     if test ! -f "$srcdir/src/lisp.h" -o \
810             ! -f "$srcdir/lisp/version.el" ; then
811       (echo "$progname: Usage error:"
812 echo " " "The directory specified with the \`--srcdir' option,
813   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
814   either run the \`$progname' script at the top of the XEmacs source
815   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
816 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
817     fi
818   ;;
819 esac
820
821 if test -z "$configuration"; then
822     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
823   if test -z "$configuration"; then
824     (echo "$progname: Usage error:"
825 echo " " "XEmacs has not been ported to this host type.
826 Try explicitly specifying the CONFIGURATION when rerunning configure."
827 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
828   fi
829 fi
830
831 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
832 echo "configure:833: checking whether ln -s works" >&5
833
834 rm -f conftestdata
835 if ln -s X conftestdata 2>/dev/null
836 then
837   rm -f conftestdata
838   ac_cv_prog_LN_S="ln -s"
839 else
840   ac_cv_prog_LN_S=ln
841 fi
842 LN_S="$ac_cv_prog_LN_S"
843 if test "$ac_cv_prog_LN_S" = "ln -s"; then
844   echo "$ac_t""yes" 1>&6
845 else
846   echo "$ac_t""no" 1>&6
847 fi
848
849
850 for dir in lisp etc man info tests; do
851   if test ! -d "$dir" ; then
852     echo Making symbolic link to "$srcdir/$dir"
853     ${LN_S} "$srcdir/$dir" "$dir"
854   fi
855 done
856
857
858 absolute_pwd="`pwd`";
859 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
860 then blddir="$PWD"
861 else blddir="$absolute_pwd"; if test -d "/net"; then
862   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
863   blddir=`echo "$blddir" | \
864    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
865 fi
866 fi
867
868
869 case "$srcdir" in
870   /* ) ;;
871   .  ) srcdir="$blddir" ;;
872   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
873   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
874   srcdir=`echo "$srcdir" | \
875    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
876 fi ;;
877 esac
878
879 if test `pwd` != `sh -c cd $srcdir && pwd`  \
880    && test -f "$srcdir/src/config.h"; then
881   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
882    echo "   as a build directory right now; it has been configured in its own"
883    echo "   right.  To configure in another directory as well, you MUST"
884    echo "   use GNU make.  If you do not have GNU make, then you must"
885    echo "   now do \`make distclean' in $srcdir,"
886    echo "   and then run $progname again.") >&2
887   extrasub='/^VPATH[     ]*=/c\
888 vpath %.c $(srcdir)\
889 vpath %.h $(srcdir)\
890 vpath %.y $(srcdir)\
891 vpath %.l $(srcdir)\
892 vpath %.s $(srcdir)\
893 vpath %.in $(srcdir)'
894 fi
895
896 . "$srcdir/version.sh" || exit 1;
897 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
898 : "${extra_verbose=$beta}"
899 version="${emacs_major_version}.${emacs_minor_version}"
900 { test "$extra_verbose" = "yes" && cat << EOF
901     Defining EMACS_MAJOR_VERSION = $emacs_major_version
902 EOF
903 cat >> confdefs.h <<EOF
904 #define EMACS_MAJOR_VERSION $emacs_major_version
905 EOF
906 }
907
908 { test "$extra_verbose" = "yes" && cat << EOF
909     Defining EMACS_MINOR_VERSION = $emacs_minor_version
910 EOF
911 cat >> confdefs.h <<EOF
912 #define EMACS_MINOR_VERSION $emacs_minor_version
913 EOF
914 }
915
916 if test -n "$emacs_beta_version" ; then
917   if test "$beta" = "yes"; then
918         version="${version}-b${emacs_beta_version}"
919         { test "$extra_verbose" = "yes" && cat << EOF
920     Defining EMACS_BETA_VERSION = $emacs_beta_version
921 EOF
922 cat >> confdefs.h <<EOF
923 #define EMACS_BETA_VERSION $emacs_beta_version
924 EOF
925 }
926
927   else
928         version="${version}.${emacs_beta_version}"
929         { test "$extra_verbose" = "yes" && cat << EOF
930     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
931 EOF
932 cat >> confdefs.h <<EOF
933 #define EMACS_PATCH_LEVEL $emacs_beta_version
934 EOF
935 }
936
937   fi
938 fi
939 { test "$extra_verbose" = "yes" && cat << EOF
940     Defining XEMACS_CODENAME = "$xemacs_codename"
941 EOF
942 cat >> confdefs.h <<EOF
943 #define XEMACS_CODENAME "$xemacs_codename"
944 EOF
945 }
946
947 { test "$extra_verbose" = "yes" && cat << EOF
948     Defining EMACS_VERSION = "$version"
949 EOF
950 cat >> confdefs.h <<EOF
951 #define EMACS_VERSION "$version"
952 EOF
953 }
954
955
956 if test "$with_infodock" = "yes"; then
957   if test ! -f ../../ID-INSTALL; then
958     echo "Cannot build InfoDock without InfoDock sources"
959     with_infodock=no
960   fi
961 fi
962
963 if test "$with_infodock" = "yes"; then
964       { test "$extra_verbose" = "yes" && cat << EOF
965     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
966 EOF
967 cat >> confdefs.h <<EOF
968 #define INFODOCK_MAJOR_VERSION $infodock_major_version
969 EOF
970 }
971
972   { test "$extra_verbose" = "yes" && cat << EOF
973     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
974 EOF
975 cat >> confdefs.h <<EOF
976 #define INFODOCK_MINOR_VERSION $infodock_minor_version
977 EOF
978 }
979
980   { test "$extra_verbose" = "yes" && cat << EOF
981     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
982 EOF
983 cat >> confdefs.h <<EOF
984 #define INFODOCK_BUILD_VERSION $infodock_build_version
985 EOF
986 }
987
988   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
989   PROGNAME=infodock
990   CPPFLAGS="$CPPFLAGS -DINFODOCK"
991 else
992   PROGNAME=xemacs
993 fi
994
995 { test "$extra_verbose" = "yes" && cat << EOF
996     Defining EMACS_PROGNAME = "$PROGNAME"
997 EOF
998 cat >> confdefs.h <<EOF
999 #define EMACS_PROGNAME "$PROGNAME"
1000 EOF
1001 }
1002
1003
1004 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1005 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1006     Defining ERROR_CHECK_EXTENTS
1007 EOF
1008 cat >> confdefs.h <<\EOF
1009 #define ERROR_CHECK_EXTENTS 1
1010 EOF
1011 }
1012
1013 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1014     Defining ERROR_CHECK_TYPECHECK
1015 EOF
1016 cat >> confdefs.h <<\EOF
1017 #define ERROR_CHECK_TYPECHECK 1
1018 EOF
1019 }
1020
1021 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1022     Defining ERROR_CHECK_BUFPOS
1023 EOF
1024 cat >> confdefs.h <<\EOF
1025 #define ERROR_CHECK_BUFPOS 1
1026 EOF
1027 }
1028
1029 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1030     Defining ERROR_CHECK_GC
1031 EOF
1032 cat >> confdefs.h <<\EOF
1033 #define ERROR_CHECK_GC 1
1034 EOF
1035 }
1036
1037 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1038     Defining ERROR_CHECK_MALLOC
1039 EOF
1040 cat >> confdefs.h <<\EOF
1041 #define ERROR_CHECK_MALLOC 1
1042 EOF
1043 }
1044
1045 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1046     Defining ERROR_CHECK_BYTE_CODE
1047 EOF
1048 cat >> confdefs.h <<\EOF
1049 #define ERROR_CHECK_BYTE_CODE 1
1050 EOF
1051 }
1052
1053 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1054     Defining ERROR_CHECK_GLYPHS
1055 EOF
1056 cat >> confdefs.h <<\EOF
1057 #define ERROR_CHECK_GLYPHS 1
1058 EOF
1059 }
1060
1061 if test "${debug:=$beta}" = "yes"; then
1062   use_assertions=yes memory_usage_stats=yes
1063   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1064    echo "    xemacs will be linked with \"debug.o\""
1065  fi
1066   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1067    echo "    xemacs will be linked with \"tests.o\""
1068  fi
1069   { test "$extra_verbose" = "yes" && cat << \EOF
1070     Defining DEBUG_XEMACS
1071 EOF
1072 cat >> confdefs.h <<\EOF
1073 #define DEBUG_XEMACS 1
1074 EOF
1075 }
1076
1077 fi
1078 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1079     Defining USE_ASSERTIONS
1080 EOF
1081 cat >> confdefs.h <<\EOF
1082 #define USE_ASSERTIONS 1
1083 EOF
1084 }
1085
1086 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1087     Defining MEMORY_USAGE_STATS
1088 EOF
1089 cat >> confdefs.h <<\EOF
1090 #define MEMORY_USAGE_STATS 1
1091 EOF
1092 }
1093
1094
1095
1096 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1097 echo "configure:1098: checking "host system type"" >&5
1098 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1099 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1100 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1101 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1102 echo "$ac_t""$configuration" 1>&6
1103
1104
1105
1106
1107
1108 machine='' opsys=''
1109
1110 case "$canonical" in
1111   sparc-*-*        ) machine=sparc ;;
1112   alpha*-*-*       ) machine=alpha ;;
1113   vax-*-*          ) machine=vax ;;
1114   mips-dec-*       ) machine=pmax ;;
1115   mips-sgi-irix6*  ) machine=iris6d ;;
1116   mips-sgi-*       ) machine=iris4d ;;
1117   mips*-linux      ) machine=mips ;;
1118   romp-ibm-*       ) machine=ibmrt ;;
1119   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1120   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1121   powerpc*-*       ) machine=powerpc ;;
1122   hppa-*-*         ) machine=hp800 ;;
1123   m88k-dg-*        ) machine=aviion ;;
1124   m68*-sony-*      ) machine=news ;;
1125   mips-sony-*      ) machine=news-risc ;;
1126   clipper-*        ) machine=clipper ;;
1127   arm*             ) machine=arm ;;
1128   ns32k-*          ) machine=ns32000 ;;
1129 esac
1130
1131 case "$canonical" in
1132   *-*-linux*    ) opsys=linux ;;
1133   *-*-netbsd*   ) opsys=netbsd ;;
1134   *-*-openbsd*  ) opsys=openbsd ;;
1135   *-*-nextstep* ) opsys=nextstep ;;
1136   *-*-vms       ) opsys=vms ;;
1137
1138     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1139   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1140   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1141   *-dec-osf3*                ) opsys=decosf3-1 ;;
1142   *-dec-osf4*                ) opsys=decosf4-0 ;;
1143
1144     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1145   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1146   *-*-ultrix* )         opsys=ultrix4-3 ;;
1147
1148     *-*-aix3.1*  ) opsys=aix3-1 ;;
1149   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1150   *-*-aix3*    ) opsys=aix3-2   ;;
1151   *-*-aix4.0*  ) opsys=aix4     ;;
1152   *-*-aix4.1*  ) opsys=aix4-1   ;;
1153   *-*-aix4*    ) opsys=aix4-2   ;;
1154
1155     *-gnu* )                    opsys=gnu    ;;
1156   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1157   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1158   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1159   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1160   *-*-aos*   )                  opsys=bsd4-3 ;;
1161   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1162   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1163   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1164   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1165   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1166   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1167         if test -z "$NON_GNU_CPP" ; then
1168           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1169             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1170           done
1171         fi
1172         opsys=usg5-4-2 ;;
1173     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1174     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1175 esac
1176
1177 case "$canonical" in
1178
1179     *-*-netbsd* )
1180     case "$canonical" in
1181       i[3-9]86-*-netbsd*) machine=intel386 ;;
1182       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1183                                             machine=hp9000s300 ;;
1184       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1185       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1186     esac
1187   ;;
1188
1189     *-*-openbsd* )
1190     case "${canonical}" in
1191       i386-*-openbsd*)          machine=intel386 ;;
1192       m68k-*-openbsd*)          machine=hp9000s300 ;;
1193       mipsel-*-openbsd*)        machine=pmax ;;
1194      esac
1195    ;;
1196
1197     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1198   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1199
1200     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1201   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1202
1203     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1204
1205     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1206
1207     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1208
1209     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1210
1211     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1212
1213     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1214   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1215   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1216
1217   
1218     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1219
1220     *-convex-bsd* | *-convex-convexos* )
1221     machine=convex opsys=bsd4-3
1222     NON_GNU_CPP="cc -E -P"
1223   ;;
1224
1225     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1226
1227     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1228   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1229   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1230   m88k-dg-dgux*                           ) opsys=dgux     ;;
1231
1232     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1233   m88k-motorola-sysv4* )
1234                     machine=delta88k opsys=usg5-4-2
1235   ;;
1236   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1237
1238     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1239   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1240
1241     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1242
1243     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1244   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1245   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1246
1247       m88k-harris-cxux* )
1248         case "`uname -r`" in
1249        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1250        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1251     esac
1252     NON_GNU_CPP="/lib/cpp"
1253   ;;
1254     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1255     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1256
1257     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1258
1259     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1260
1261     *-hp-hpux* )
1262         case "$canonical" in
1263       m68*  ) machine=hp9000s300 ;;
1264       hppa* ) machine=hp800      ;;
1265     esac
1266
1267     case "$canonical" in
1268       *-hp-hpux7*  )  opsys=hpux   ;;
1269       *-hp-hpux8*  )  opsys=hpux8  ;;
1270       *-hp-hpux9*  )  opsys=hpux9  ;;
1271       *-hp-hpux10* )  opsys=hpux10 ;;
1272       *-hp-hpux11* )  opsys=hpux11 ;;
1273       *            )  opsys=hpux   ;;
1274     esac
1275
1276         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1277    echo "    xemacs will be linked with \"strcat.o\""
1278  fi ;; esac
1279
1280     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1281         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1282     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1283
1284     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1285   ;;
1286
1287     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1288   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1289
1290     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1291   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1292   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1293   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1294   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1295   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1296
1297     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1298   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1299
1300     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1301
1302     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1303
1304     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1305
1306     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1307
1308       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1309
1310     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1311
1312     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1313
1314     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1315
1316     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1317
1318         mips-mips-usg* ) machine=mips4 ;;
1319   mips-mips-riscos4 )
1320     machine=mips4
1321     NON_GNU_CC="cc -systype bsd43"
1322     NON_GNU_CPP="cc -systype bsd43 -E"
1323     case "$canonical" in
1324       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1325       mips-mips-riscos5* ) opsys=riscos5 ;;
1326     esac
1327   ;;
1328   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1329   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1330
1331     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1332
1333     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1334
1335     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1336   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1337
1338     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1339
1340     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1341
1342     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1343
1344     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1345
1346     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1347   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1348
1349     mips-siemens-sysv* | mips-sni-sysv*)
1350     machine=mips-siemens opsys=usg5-4
1351     NON_GNU_CC=/usr/ccs/bin/cc
1352     NON_GNU_CPP=/usr/ccs/lib/cpp
1353   ;;
1354
1355     mips-nec-sysv*)
1356     machine=mips-nec
1357     NON_GNU_CC=/usr/ccs/bin/cc
1358     NON_GNU_CPP=/usr/ccs/lib/cpp
1359   ;;
1360
1361       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1362   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1363     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1364   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1365   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1366   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1367   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1368   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1369   mips-sgi-irix*      ) opsys=irix5-0 ;;
1370
1371     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1372   *-sony-news* ) opsys=newsos5 ;;
1373
1374     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1375
1376     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1377         case "$canonical" in
1378       m68*-sunos1* )             machine=sun1     ;;
1379       m68*-sunos2* )             machine=sun2     ;;
1380       m68* )                     machine=sun3     ;;
1381       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1382       i*86-*-* )                 machine=intel386 ;;
1383       rs6000* )                  machine=rs6000   ;;
1384     esac
1385
1386         case "$canonical" in *-sunos5*)
1387       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1388     esac
1389
1390                     case "$canonical" in
1391       *-sunos4* )
1392         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1393         : ;;
1394       *-solaris2* )
1395         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1396         RANLIB=':' ;;
1397     esac
1398
1399     case "$canonical" in
1400       *-solaris*          )
1401         opsys=sol2
1402         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1403         { test "$extra_verbose" = "yes" && cat << EOF
1404     Defining OS_RELEASE = $os_release
1405 EOF
1406 cat >> confdefs.h <<EOF
1407 #define OS_RELEASE $os_release
1408 EOF
1409 }
1410  ;;
1411
1412             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1413       *-sunos4.0*         ) opsys=sunos4-0      ;;
1414       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1415       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1416       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1417       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1418       *-mach*             ) opsys=mach-bsd4-3   ;;
1419       *                   ) opsys=bsd4-2        ;;
1420     esac
1421
1422     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1423
1424         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1425   ;;
1426
1427     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1428
1429     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1430   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1431
1432     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1433
1434     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1435
1436     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1437       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1438
1439     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1440
1441     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1442
1443     vax-dec-* )
1444     case "$canonical" in
1445       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1446       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1447       *-mach* )                         opsys=mach-bsd4-3 ;;
1448     esac
1449   ;;
1450
1451     ns16k-whitechapel-* ) machine=mg1 ;;
1452
1453     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1454
1455     i[3-9]86-*-* )
1456     machine=intel386
1457     case "$canonical" in
1458       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1459       *-isc2.2* )               opsys=isc2-2 ;;
1460       *-isc4.0* )               opsys=isc4-0 ;;
1461       *-isc4.* )                opsys=isc4-1
1462                                 GCC_TEST_OPTIONS=-posix
1463                                 NON_GCC_TEST_OPTIONS=-Xp
1464                                 ;;
1465       *-isc* )                  opsys=isc3-0 ;;
1466       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1467       *-esix* )                 opsys=esix ;;
1468       *-mach* )                 opsys=mach-bsd4-3 ;;
1469       *-xenix* )                opsys=xenix ;;
1470       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1471       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1472       *-bsdi4* )                opsys=bsdos4 ;;
1473       *-bsdi3* )                opsys=bsdos3 ;;
1474       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1475       *-bsdi2* )                opsys=bsdos2 ;;
1476       *-sco3.2v5* )             opsys=sco5 ;
1477                                                         if test "$dynamic" = "yes" ; then
1478                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1479         else
1480                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1481         fi ;;
1482       *-sysv5* )                opsys=sco7 ;;
1483       *-386bsd* )               opsys=386bsd ;;
1484       *-freebsd* )              opsys=freebsd ;;
1485       *-nextstep* )             opsys=nextstep ;;
1486       *-pc-cygwin* )            opsys=cygwin32 ;;
1487       *-pc-mingw* )             opsys=mingw32 ;
1488                                 test -z "$with_tty" && with_tty="no";;
1489           esac
1490   ;;
1491
1492     m68k-*-linux* ) machine=m68k opsys=linux ;;
1493
1494 esac
1495
1496 if test -z "$machine" -o -z "$opsys"; then
1497   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1498    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1499   ) >&2
1500   exit 1
1501 fi
1502
1503 if test -z "$dynamic"; then
1504   case "$opsys" in
1505     hpux* | sunos4* ) dynamic=no ;;
1506     *) dynamic=yes ;;
1507   esac
1508 fi
1509 if test "$dynamic" = "yes"; then
1510   case "$opsys" in
1511     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1512     decosf* ) ld_call_shared="-call_shared" ;;
1513   esac
1514 else   case "$opsys" in
1515     sol2 )
1516       echo "Static linking is not supported on Solaris 2."
1517       echo "Rerun configure without specifying --dynamic=no."
1518       exit 1 ;;
1519     linux   ) ld_call_shared="-Bstatic" ;;
1520     decosf* ) ld_call_shared="-non_shared" ;;
1521   esac
1522 fi
1523
1524 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1525
1526 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1527 { test "$extra_verbose" = "yes" && cat << EOF
1528     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1529 EOF
1530 cat >> confdefs.h <<EOF
1531 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1532 EOF
1533 }
1534
1535
1536 machfile="m/${machine}.h"
1537 opsysfile="s/${opsys}.h"
1538
1539
1540 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1541 if test "$with_workshop $with_tooltalk" = "yes no"; then
1542   (echo "$progname: Usage error:"
1543 echo " " "--with-workshop requires --with-tooltalk"
1544 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1545 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1546 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1547 fi
1548
1549 if test "$with_workshop" = "yes"; then
1550   { test "$extra_verbose" = "yes" && cat << \EOF
1551     Defining SUNPRO
1552 EOF
1553 cat >> confdefs.h <<\EOF
1554 #define SUNPRO 1
1555 EOF
1556 }
1557
1558   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1559    echo "    xemacs will be linked with \"sunpro.o\""
1560  fi
1561 fi
1562
1563 if test "$with_clash_detection" != "no"; then
1564   { test "$extra_verbose" = "yes" && cat << \EOF
1565     Defining CLASH_DETECTION
1566 EOF
1567 cat >> confdefs.h <<\EOF
1568 #define CLASH_DETECTION 1
1569 EOF
1570 }
1571
1572   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1573    echo "    xemacs will be linked with \"filelock.o\""
1574  fi
1575 fi
1576
1577 test -n "$compiler" && CC="$compiler"
1578 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1579 fi
1580
1581 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1582 if test "${CFLAGS-unset}" != unset
1583   then cflags_specified=yes;
1584   else cflags_specified=no;
1585 fi
1586
1587 xe_save_CFLAGS="$CFLAGS"
1588
1589 # Extract the first word of "gcc", so it can be a program name with args.
1590 set dummy gcc; ac_word=$2
1591 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1592 echo "configure:1593: checking for $ac_word" >&5
1593
1594 if test -n "$CC"; then
1595   ac_cv_prog_CC="$CC" # Let the user override the test.
1596 else
1597   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1598   ac_dummy="$PATH"
1599   for ac_dir in $ac_dummy; do
1600     test -z "$ac_dir" && ac_dir=.
1601     if test -f $ac_dir/$ac_word; then
1602       ac_cv_prog_CC="gcc"
1603       break
1604     fi
1605   done
1606   IFS="$ac_save_ifs"
1607 fi
1608 CC="$ac_cv_prog_CC"
1609 if test -n "$CC"; then
1610   echo "$ac_t""$CC" 1>&6
1611 else
1612   echo "$ac_t""no" 1>&6
1613 fi
1614
1615 if test -z "$CC"; then
1616   # Extract the first word of "cc", so it can be a program name with args.
1617 set dummy cc; ac_word=$2
1618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1619 echo "configure:1620: checking for $ac_word" >&5
1620
1621 if test -n "$CC"; then
1622   ac_cv_prog_CC="$CC" # Let the user override the test.
1623 else
1624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1625   ac_prog_rejected=no
1626   ac_dummy="$PATH"
1627   for ac_dir in $ac_dummy; do
1628     test -z "$ac_dir" && ac_dir=.
1629     if test -f $ac_dir/$ac_word; then
1630       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1631         ac_prog_rejected=yes
1632         continue
1633       fi
1634       ac_cv_prog_CC="cc"
1635       break
1636     fi
1637   done
1638   IFS="$ac_save_ifs"
1639 if test $ac_prog_rejected = yes; then
1640   # We found a bogon in the path, so make sure we never use it.
1641   set dummy $ac_cv_prog_CC
1642   shift
1643   if test $# -gt 0; then
1644     # We chose a different compiler from the bogus one.
1645     # However, it has the same basename, so the bogon will be chosen
1646     # first if we set CC to just the basename; use the full file name.
1647     shift
1648     set dummy "$ac_dir/$ac_word" "$@"
1649     shift
1650     ac_cv_prog_CC="$@"
1651   fi
1652 fi
1653 fi
1654 CC="$ac_cv_prog_CC"
1655 if test -n "$CC"; then
1656   echo "$ac_t""$CC" 1>&6
1657 else
1658   echo "$ac_t""no" 1>&6
1659 fi
1660
1661   if test -z "$CC"; then
1662     case "`uname -s`" in
1663     *win32* | *WIN32*)
1664       # Extract the first word of "cl", so it can be a program name with args.
1665 set dummy cl; ac_word=$2
1666 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1667 echo "configure:1668: checking for $ac_word" >&5
1668
1669 if test -n "$CC"; then
1670   ac_cv_prog_CC="$CC" # Let the user override the test.
1671 else
1672   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1673   ac_dummy="$PATH"
1674   for ac_dir in $ac_dummy; do
1675     test -z "$ac_dir" && ac_dir=.
1676     if test -f $ac_dir/$ac_word; then
1677       ac_cv_prog_CC="cl"
1678       break
1679     fi
1680   done
1681   IFS="$ac_save_ifs"
1682 fi
1683 CC="$ac_cv_prog_CC"
1684 if test -n "$CC"; then
1685   echo "$ac_t""$CC" 1>&6
1686 else
1687   echo "$ac_t""no" 1>&6
1688 fi
1689  ;;
1690     esac
1691   fi
1692   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1693 fi
1694
1695 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1696 echo "configure:1697: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1697
1698 ac_ext=c
1699 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1700 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1701 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1702 ac_cpp='$CPP '"$xe_cppflags"
1703 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1704 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1705 cross_compiling=no
1706
1707 cat > conftest.$ac_ext << EOF
1708
1709 #line 1710 "configure"
1710 #include "confdefs.h"
1711
1712 main(){return(0);}
1713 EOF
1714 if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1715   ac_cv_prog_cc_works=yes
1716   # If we can't run a trivial program, we are probably using a cross compiler.
1717   if (./conftest; exit) 2>/dev/null; then
1718     ac_cv_prog_cc_cross=no
1719   else
1720     ac_cv_prog_cc_cross=yes
1721   fi
1722 else
1723   echo "configure: failed program was:" >&5
1724   cat conftest.$ac_ext >&5
1725   ac_cv_prog_cc_works=no
1726 fi
1727 rm -fr conftest*
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 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1738 if test $ac_cv_prog_cc_works = no; then
1739   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1740 fi
1741 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1742 echo "configure:1743: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1743 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1744 cross_compiling=$ac_cv_prog_cc_cross
1745
1746 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1747 echo "configure:1748: checking whether we are using GNU C" >&5
1748
1749 cat > conftest.c <<EOF
1750 #ifdef __GNUC__
1751   yes;
1752 #endif
1753 EOF
1754 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1755   ac_cv_prog_gcc=yes
1756 else
1757   ac_cv_prog_gcc=no
1758 fi
1759
1760 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1761
1762 if test $ac_cv_prog_gcc = yes; then
1763   GCC=yes
1764 else
1765   GCC=
1766 fi
1767
1768 ac_test_CFLAGS="${CFLAGS+set}"
1769 ac_save_CFLAGS="$CFLAGS"
1770 CFLAGS=
1771 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1772 echo "configure:1773: checking whether ${CC-cc} accepts -g" >&5
1773
1774 echo 'void f(){}' > conftest.c
1775 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1776   ac_cv_prog_cc_g=yes
1777 else
1778   ac_cv_prog_cc_g=no
1779 fi
1780 rm -f conftest*
1781
1782
1783 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1784 if test "$ac_test_CFLAGS" = set; then
1785   CFLAGS="$ac_save_CFLAGS"
1786 elif test $ac_cv_prog_cc_g = yes; then
1787   if test "$GCC" = yes; then
1788     CFLAGS="-g -O2"
1789   else
1790     CFLAGS="-g"
1791   fi
1792 else
1793   if test "$GCC" = yes; then
1794     CFLAGS="-O2"
1795   else
1796     CFLAGS=
1797   fi
1798 fi
1799  
1800 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1801   CC=${NON_GNU_CC-cc}
1802   # Extract the first word of "gcc", so it can be a program name with args.
1803 set dummy gcc; ac_word=$2
1804 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1805 echo "configure:1806: checking for $ac_word" >&5
1806
1807 if test -n "$CC"; then
1808   ac_cv_prog_CC="$CC" # Let the user override the test.
1809 else
1810   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1811   ac_dummy="$PATH"
1812   for ac_dir in $ac_dummy; do
1813     test -z "$ac_dir" && ac_dir=.
1814     if test -f $ac_dir/$ac_word; then
1815       ac_cv_prog_CC="gcc"
1816       break
1817     fi
1818   done
1819   IFS="$ac_save_ifs"
1820 fi
1821 CC="$ac_cv_prog_CC"
1822 if test -n "$CC"; then
1823   echo "$ac_t""$CC" 1>&6
1824 else
1825   echo "$ac_t""no" 1>&6
1826 fi
1827
1828 if test -z "$CC"; then
1829   # Extract the first word of "cc", so it can be a program name with args.
1830 set dummy cc; ac_word=$2
1831 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1832 echo "configure:1833: checking for $ac_word" >&5
1833
1834 if test -n "$CC"; then
1835   ac_cv_prog_CC="$CC" # Let the user override the test.
1836 else
1837   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1838   ac_prog_rejected=no
1839   ac_dummy="$PATH"
1840   for ac_dir in $ac_dummy; do
1841     test -z "$ac_dir" && ac_dir=.
1842     if test -f $ac_dir/$ac_word; then
1843       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1844         ac_prog_rejected=yes
1845         continue
1846       fi
1847       ac_cv_prog_CC="cc"
1848       break
1849     fi
1850   done
1851   IFS="$ac_save_ifs"
1852 if test $ac_prog_rejected = yes; then
1853   # We found a bogon in the path, so make sure we never use it.
1854   set dummy $ac_cv_prog_CC
1855   shift
1856   if test $# -gt 0; then
1857     # We chose a different compiler from the bogus one.
1858     # However, it has the same basename, so the bogon will be chosen
1859     # first if we set CC to just the basename; use the full file name.
1860     shift
1861     set dummy "$ac_dir/$ac_word" "$@"
1862     shift
1863     ac_cv_prog_CC="$@"
1864   fi
1865 fi
1866 fi
1867 CC="$ac_cv_prog_CC"
1868 if test -n "$CC"; then
1869   echo "$ac_t""$CC" 1>&6
1870 else
1871   echo "$ac_t""no" 1>&6
1872 fi
1873
1874   if test -z "$CC"; then
1875     case "`uname -s`" in
1876     *win32* | *WIN32*)
1877       # Extract the first word of "cl", so it can be a program name with args.
1878 set dummy cl; ac_word=$2
1879 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1880 echo "configure:1881: checking for $ac_word" >&5
1881
1882 if test -n "$CC"; then
1883   ac_cv_prog_CC="$CC" # Let the user override the test.
1884 else
1885   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1886   ac_dummy="$PATH"
1887   for ac_dir in $ac_dummy; do
1888     test -z "$ac_dir" && ac_dir=.
1889     if test -f $ac_dir/$ac_word; then
1890       ac_cv_prog_CC="cl"
1891       break
1892     fi
1893   done
1894   IFS="$ac_save_ifs"
1895 fi
1896 CC="$ac_cv_prog_CC"
1897 if test -n "$CC"; then
1898   echo "$ac_t""$CC" 1>&6
1899 else
1900   echo "$ac_t""no" 1>&6
1901 fi
1902  ;;
1903     esac
1904   fi
1905   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1906 fi
1907
1908 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1909 echo "configure:1910: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1910
1911 ac_ext=c
1912 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1913 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1914 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1915 ac_cpp='$CPP '"$xe_cppflags"
1916 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1917 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1918 cross_compiling=no
1919
1920 cat > conftest.$ac_ext << EOF
1921
1922 #line 1923 "configure"
1923 #include "confdefs.h"
1924
1925 main(){return(0);}
1926 EOF
1927 if { (eval echo configure:1928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1928   ac_cv_prog_cc_works=yes
1929   # If we can't run a trivial program, we are probably using a cross compiler.
1930   if (./conftest; exit) 2>/dev/null; then
1931     ac_cv_prog_cc_cross=no
1932   else
1933     ac_cv_prog_cc_cross=yes
1934   fi
1935 else
1936   echo "configure: failed program was:" >&5
1937   cat conftest.$ac_ext >&5
1938   ac_cv_prog_cc_works=no
1939 fi
1940 rm -fr conftest*
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 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1951 if test $ac_cv_prog_cc_works = no; then
1952   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1953 fi
1954 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1955 echo "configure:1956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1956 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1957 cross_compiling=$ac_cv_prog_cc_cross
1958
1959 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1960 echo "configure:1961: checking whether we are using GNU C" >&5
1961
1962 cat > conftest.c <<EOF
1963 #ifdef __GNUC__
1964   yes;
1965 #endif
1966 EOF
1967 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1968   ac_cv_prog_gcc=yes
1969 else
1970   ac_cv_prog_gcc=no
1971 fi
1972
1973 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1974
1975 if test $ac_cv_prog_gcc = yes; then
1976   GCC=yes
1977 else
1978   GCC=
1979 fi
1980
1981 ac_test_CFLAGS="${CFLAGS+set}"
1982 ac_save_CFLAGS="$CFLAGS"
1983 CFLAGS=
1984 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1985 echo "configure:1986: checking whether ${CC-cc} accepts -g" >&5
1986
1987 echo 'void f(){}' > conftest.c
1988 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1989   ac_cv_prog_cc_g=yes
1990 else
1991   ac_cv_prog_cc_g=no
1992 fi
1993 rm -f conftest*
1994
1995
1996 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1997 if test "$ac_test_CFLAGS" = set; then
1998   CFLAGS="$ac_save_CFLAGS"
1999 elif test $ac_cv_prog_cc_g = yes; then
2000   if test "$GCC" = yes; then
2001     CFLAGS="-g -O2"
2002   else
2003     CFLAGS="-g"
2004   fi
2005 else
2006   if test "$GCC" = yes; then
2007     CFLAGS="-O2"
2008   else
2009     CFLAGS=
2010   fi
2011 fi
2012
2013 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2014   CC=gcc
2015   # Extract the first word of "gcc", so it can be a program name with args.
2016 set dummy gcc; ac_word=$2
2017 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2018 echo "configure:2019: checking for $ac_word" >&5
2019
2020 if test -n "$CC"; then
2021   ac_cv_prog_CC="$CC" # Let the user override the test.
2022 else
2023   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2024   ac_dummy="$PATH"
2025   for ac_dir in $ac_dummy; do
2026     test -z "$ac_dir" && ac_dir=.
2027     if test -f $ac_dir/$ac_word; then
2028       ac_cv_prog_CC="gcc"
2029       break
2030     fi
2031   done
2032   IFS="$ac_save_ifs"
2033 fi
2034 CC="$ac_cv_prog_CC"
2035 if test -n "$CC"; then
2036   echo "$ac_t""$CC" 1>&6
2037 else
2038   echo "$ac_t""no" 1>&6
2039 fi
2040
2041 if test -z "$CC"; then
2042   # Extract the first word of "cc", so it can be a program name with args.
2043 set dummy cc; ac_word=$2
2044 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2045 echo "configure:2046: checking for $ac_word" >&5
2046
2047 if test -n "$CC"; then
2048   ac_cv_prog_CC="$CC" # Let the user override the test.
2049 else
2050   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2051   ac_prog_rejected=no
2052   ac_dummy="$PATH"
2053   for ac_dir in $ac_dummy; do
2054     test -z "$ac_dir" && ac_dir=.
2055     if test -f $ac_dir/$ac_word; then
2056       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2057         ac_prog_rejected=yes
2058         continue
2059       fi
2060       ac_cv_prog_CC="cc"
2061       break
2062     fi
2063   done
2064   IFS="$ac_save_ifs"
2065 if test $ac_prog_rejected = yes; then
2066   # We found a bogon in the path, so make sure we never use it.
2067   set dummy $ac_cv_prog_CC
2068   shift
2069   if test $# -gt 0; then
2070     # We chose a different compiler from the bogus one.
2071     # However, it has the same basename, so the bogon will be chosen
2072     # first if we set CC to just the basename; use the full file name.
2073     shift
2074     set dummy "$ac_dir/$ac_word" "$@"
2075     shift
2076     ac_cv_prog_CC="$@"
2077   fi
2078 fi
2079 fi
2080 CC="$ac_cv_prog_CC"
2081 if test -n "$CC"; then
2082   echo "$ac_t""$CC" 1>&6
2083 else
2084   echo "$ac_t""no" 1>&6
2085 fi
2086
2087   if test -z "$CC"; then
2088     case "`uname -s`" in
2089     *win32* | *WIN32*)
2090       # Extract the first word of "cl", so it can be a program name with args.
2091 set dummy cl; ac_word=$2
2092 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2093 echo "configure:2094: checking for $ac_word" >&5
2094
2095 if test -n "$CC"; then
2096   ac_cv_prog_CC="$CC" # Let the user override the test.
2097 else
2098   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2099   ac_dummy="$PATH"
2100   for ac_dir in $ac_dummy; do
2101     test -z "$ac_dir" && ac_dir=.
2102     if test -f $ac_dir/$ac_word; then
2103       ac_cv_prog_CC="cl"
2104       break
2105     fi
2106   done
2107   IFS="$ac_save_ifs"
2108 fi
2109 CC="$ac_cv_prog_CC"
2110 if test -n "$CC"; then
2111   echo "$ac_t""$CC" 1>&6
2112 else
2113   echo "$ac_t""no" 1>&6
2114 fi
2115  ;;
2116     esac
2117   fi
2118   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2119 fi
2120
2121 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2122 echo "configure:2123: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2123
2124 ac_ext=c
2125 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2126 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2127 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2128 ac_cpp='$CPP '"$xe_cppflags"
2129 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2130 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2131 cross_compiling=no
2132
2133 cat > conftest.$ac_ext << EOF
2134
2135 #line 2136 "configure"
2136 #include "confdefs.h"
2137
2138 main(){return(0);}
2139 EOF
2140 if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2141   ac_cv_prog_cc_works=yes
2142   # If we can't run a trivial program, we are probably using a cross compiler.
2143   if (./conftest; exit) 2>/dev/null; then
2144     ac_cv_prog_cc_cross=no
2145   else
2146     ac_cv_prog_cc_cross=yes
2147   fi
2148 else
2149   echo "configure: failed program was:" >&5
2150   cat conftest.$ac_ext >&5
2151   ac_cv_prog_cc_works=no
2152 fi
2153 rm -fr conftest*
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 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2164 if test $ac_cv_prog_cc_works = no; then
2165   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2166 fi
2167 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2168 echo "configure:2169: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2169 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2170 cross_compiling=$ac_cv_prog_cc_cross
2171
2172 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2173 echo "configure:2174: checking whether we are using GNU C" >&5
2174
2175 cat > conftest.c <<EOF
2176 #ifdef __GNUC__
2177   yes;
2178 #endif
2179 EOF
2180 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2181   ac_cv_prog_gcc=yes
2182 else
2183   ac_cv_prog_gcc=no
2184 fi
2185
2186 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2187
2188 if test $ac_cv_prog_gcc = yes; then
2189   GCC=yes
2190 else
2191   GCC=
2192 fi
2193
2194 ac_test_CFLAGS="${CFLAGS+set}"
2195 ac_save_CFLAGS="$CFLAGS"
2196 CFLAGS=
2197 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2198 echo "configure:2199: checking whether ${CC-cc} accepts -g" >&5
2199
2200 echo 'void f(){}' > conftest.c
2201 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2202   ac_cv_prog_cc_g=yes
2203 else
2204   ac_cv_prog_cc_g=no
2205 fi
2206 rm -f conftest*
2207
2208
2209 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2210 if test "$ac_test_CFLAGS" = set; then
2211   CFLAGS="$ac_save_CFLAGS"
2212 elif test $ac_cv_prog_cc_g = yes; then
2213   if test "$GCC" = yes; then
2214     CFLAGS="-g -O2"
2215   else
2216     CFLAGS="-g"
2217   fi
2218 else
2219   if test "$GCC" = yes; then
2220     CFLAGS="-O2"
2221   else
2222     CFLAGS=
2223   fi
2224 fi
2225
2226 fi
2227 CFLAGS="$xe_save_CFLAGS"
2228
2229
2230 test -n "$CPP" -a -d "$CPP" && CPP=
2231
2232 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2233
2234 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2235 echo "configure:2236: checking how to run the C preprocessor" >&5
2236 # On Suns, sometimes $CPP names a directory.
2237 if test -n "$CPP" && test -d "$CPP"; then
2238   CPP=
2239 fi
2240 if test -z "$CPP"; then
2241
2242   # This must be in double quotes, not single quotes, because CPP may get
2243   # substituted into the Makefile and "${CC-cc}" will confuse make.
2244   CPP="${CC-cc} -E"
2245   # On the NeXT, cc -E runs the code through the compiler's parser,
2246   # not just through cpp.
2247   cat > conftest.$ac_ext <<EOF
2248 #line 2249 "configure"
2249 #include "confdefs.h"
2250 #include <assert.h>
2251 Syntax Error
2252 EOF
2253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2254 { (eval echo configure:2255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2256 if test -z "$ac_err"; then
2257   :
2258 else
2259   echo "$ac_err" >&5
2260   echo "configure: failed program was:" >&5
2261   cat conftest.$ac_ext >&5
2262   rm -rf conftest*
2263   CPP="${CC-cc} -E -traditional-cpp"
2264   cat > conftest.$ac_ext <<EOF
2265 #line 2266 "configure"
2266 #include "confdefs.h"
2267 #include <assert.h>
2268 Syntax Error
2269 EOF
2270 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2271 { (eval echo configure:2272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2272 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2273 if test -z "$ac_err"; then
2274   :
2275 else
2276   echo "$ac_err" >&5
2277   echo "configure: failed program was:" >&5
2278   cat conftest.$ac_ext >&5
2279   rm -rf conftest*
2280   CPP="${CC-cc} -nologo -E"
2281   cat > conftest.$ac_ext <<EOF
2282 #line 2283 "configure"
2283 #include "confdefs.h"
2284 #include <assert.h>
2285 Syntax Error
2286 EOF
2287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2288 { (eval echo configure:2289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2290 if test -z "$ac_err"; then
2291   :
2292 else
2293   echo "$ac_err" >&5
2294   echo "configure: failed program was:" >&5
2295   cat conftest.$ac_ext >&5
2296   rm -rf conftest*
2297   CPP=/lib/cpp
2298 fi
2299 rm -f conftest*
2300 fi
2301 rm -f conftest*
2302 fi
2303 rm -f conftest*
2304   ac_cv_prog_CPP="$CPP"
2305   CPP="$ac_cv_prog_CPP"
2306 else
2307   ac_cv_prog_CPP="$CPP"
2308 fi
2309 echo "$ac_t""$CPP" 1>&6
2310
2311
2312
2313 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2314 echo "configure:2315: checking for AIX" >&5
2315 cat > conftest.$ac_ext <<EOF
2316 #line 2317 "configure"
2317 #include "confdefs.h"
2318 #ifdef _AIX
2319   yes
2320 #endif
2321
2322 EOF
2323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2324   egrep "yes" >/dev/null 2>&1; then
2325   rm -rf conftest*
2326   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2327     Defining _ALL_SOURCE
2328 EOF
2329 cat >> confdefs.h <<\EOF
2330 #define _ALL_SOURCE 1
2331 EOF
2332 }
2333
2334 else
2335   rm -rf conftest*
2336   echo "$ac_t""no" 1>&6
2337 fi
2338 rm -f conftest*
2339
2340  
2341 cat > $srcdir/conffoo.h <<EOF
2342 #define CONFFOO 1
2343 EOF
2344 echo $ac_n "checking for a working inclusion macro""... $ac_c" 1>&6
2345 echo "configure:2346: checking for a working inclusion macro" >&5
2346 cat > conftest.$ac_ext <<EOF
2347 #line 2348 "configure"
2348 #include "confdefs.h"
2349
2350 int main() {
2351
2352 #define SMART_INCLUDE(path,file) <path/file>
2353 #define CONFFOO_H_PATH $srcdir
2354 #define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file)
2355 #include CONFFOO_INCLUDE(conffoo.h)
2356
2357 ; return 0; }
2358 EOF
2359 if { (eval echo configure:2360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2360   rm -rf conftest*
2361    echo "$ac_t""direct" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2362     Defining SMART_INCLUDE_INDIRECTIONS = 0
2363 EOF
2364 cat >> confdefs.h <<\EOF
2365 #define SMART_INCLUDE_INDIRECTIONS 0
2366 EOF
2367 }
2368  
2369 else
2370   echo "configure: failed program was:" >&5
2371   cat conftest.$ac_ext >&5
2372   rm -rf conftest*
2373   cat > conftest.$ac_ext <<EOF
2374 #line 2375 "configure"
2375 #include "confdefs.h"
2376
2377 int main() {
2378
2379 #define GLUE_INCLUDE(path,file)  <##path##/##file##>
2380 #define SMART_INCLUDE(path,file) GLUE_INCLUDE(path,file)
2381 #define CONFFOO_H_PATH $srcdir
2382 #define CONFFOO_INCLUDE(file) SMART_INCLUDE(CONFFOO_H_PATH,file)
2383 #include CONFFOO_INCLUDE(conffoo.h)
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    echo "$ac_t""simple" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2390     Defining SMART_INCLUDE_INDIRECTIONS = 1
2391 EOF
2392 cat >> confdefs.h <<\EOF
2393 #define SMART_INCLUDE_INDIRECTIONS 1
2394 EOF
2395 }
2396  
2397 else
2398   echo "configure: failed program was:" >&5
2399   cat conftest.$ac_ext >&5
2400   rm -rf conftest*
2401   cat > conftest.$ac_ext <<EOF
2402 #line 2403 "configure"
2403 #include "confdefs.h"
2404
2405 int main() {
2406
2407 #define GLUE_INCLUDE_2(path,file)  <##path##/##file##>
2408 #define GLUE_INCLUDE_1(path,file) GLUE_INCLUDE_2(path,file)
2409 #define SMART_INCLUDE(path,file) GLUE_INCLUDE_1(path,file)
2410 #define CONFFOO_H_PATH $srcdir
2411 #define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file)
2412 #include CONFFOO_INCLUDE(conffoo.h)
2413
2414 ; return 0; }
2415 EOF
2416 if { (eval echo configure:2417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2417   rm -rf conftest*
2418    echo "$ac_t""double" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2419     Defining SMART_INCLUDE_INDIRECTIONS = 2
2420 EOF
2421 cat >> confdefs.h <<\EOF
2422 #define SMART_INCLUDE_INDIRECTIONS 2
2423 EOF
2424 }
2425  
2426 else
2427   echo "configure: failed program was:" >&5
2428   cat conftest.$ac_ext >&5
2429   rm -rf conftest*
2430   { echo "configure: error: Cannot define a proper SMART_INCLUDE macro. Please report." 1>&2; exit 1; }
2431 fi
2432 rm -f conftest*
2433 fi
2434 rm -f conftest*
2435 fi
2436 rm -f conftest*
2437 rm -f $srcdir/conffoo.h
2438
2439
2440
2441 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2442 echo "configure:2443: checking for GNU libc" >&5
2443 cat > conftest.$ac_ext <<EOF
2444 #line 2445 "configure"
2445 #include "confdefs.h"
2446 #include <features.h>
2447 int main() {
2448
2449 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2450 #error Not a GNU libc system :-(
2451 ******* ======= ******** &&&&&&&&
2452 #endif
2453
2454 ; return 0; }
2455 EOF
2456 if { (eval echo configure:2457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2457   rm -rf conftest*
2458   have_glibc=yes
2459 else
2460   echo "configure: failed program was:" >&5
2461   cat conftest.$ac_ext >&5
2462   rm -rf conftest*
2463   have_glibc=no
2464 fi
2465 rm -f conftest*
2466 echo "$ac_t""$have_glibc" 1>&6
2467 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2468     Defining _GNU_SOURCE
2469 EOF
2470 cat >> confdefs.h <<\EOF
2471 #define _GNU_SOURCE 1
2472 EOF
2473 }
2474
2475
2476 case "$opsys" in
2477   sol2)
2478    { test "$extra_verbose" = "yes" && cat << \EOF
2479     Defining __EXTENSIONS__
2480 EOF
2481 cat >> confdefs.h <<\EOF
2482 #define __EXTENSIONS__ 1
2483 EOF
2484 }
2485
2486       if test "$os_release" -ge 55; then
2487      { test "$extra_verbose" = "yes" && cat << \EOF
2488     Defining _XOPEN_SOURCE = 500
2489 EOF
2490 cat >> confdefs.h <<\EOF
2491 #define _XOPEN_SOURCE 500
2492 EOF
2493 }
2494
2495      { test "$extra_verbose" = "yes" && cat << \EOF
2496     Defining _XOPEN_SOURCE_EXTENDED
2497 EOF
2498 cat >> confdefs.h <<\EOF
2499 #define _XOPEN_SOURCE_EXTENDED 1
2500 EOF
2501 }
2502
2503    fi ;;
2504   linux)
2505     { test "$extra_verbose" = "yes" && cat << \EOF
2506     Defining _POSIX_C_SOURCE = 199506L
2507 EOF
2508 cat >> confdefs.h <<\EOF
2509 #define _POSIX_C_SOURCE 199506L
2510 EOF
2511 }
2512
2513     { test "$extra_verbose" = "yes" && cat << \EOF
2514     Defining _XOPEN_SOURCE = 500
2515 EOF
2516 cat >> confdefs.h <<\EOF
2517 #define _XOPEN_SOURCE 500
2518 EOF
2519 }
2520
2521     { test "$extra_verbose" = "yes" && cat << \EOF
2522     Defining _XOPEN_SOURCE_EXTENDED
2523 EOF
2524 cat >> confdefs.h <<\EOF
2525 #define _XOPEN_SOURCE_EXTENDED 1
2526 EOF
2527 }
2528
2529     ;;
2530 esac
2531
2532 cat > conftest.$ac_ext <<EOF
2533 #line 2534 "configure"
2534 #include "confdefs.h"
2535 int main () {
2536 #if defined __SUNPRO_C
2537 return 11;
2538 #elif defined __DECC
2539 return 12;
2540 #else
2541 return 0;
2542 #endif
2543 }
2544 EOF
2545 if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2546 then
2547   :
2548 else
2549   conftest_rc="$?"
2550   echo "configure: failed program was:" >&5
2551   cat conftest.$ac_ext >&5
2552   rm -fr conftest*
2553   case "$conftest_rc" in
2554   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2555   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2556 esac
2557 fi
2558 rm -fr conftest*
2559
2560
2561
2562
2563 echo "Extracting information from the machine- and system-dependent headers..."
2564
2565 tempcname="conftest.c"
2566
2567
2568
2569 cat > $tempcname <<EOF
2570 #define NOT_C_CODE
2571 #define C_SWITCH_SITE
2572 #define C_SWITCH_X_SITE
2573 #define LD_SWITCH_SITE
2574 #define LD_SWITCH_X_SITE
2575 #define LD_SWITCH_X_SITE_AUX
2576 #define OS_RELEASE $os_release
2577 #include "$srcdir/src/$opsysfile"
2578 #include "$srcdir/src/$machfile"
2579
2580 #ifndef LIBS_MACHINE
2581 #define LIBS_MACHINE
2582 #endif
2583 configure___ libs_machine=LIBS_MACHINE
2584
2585 #ifndef LIBS_SYSTEM
2586 #define LIBS_SYSTEM
2587 #endif
2588 configure___ libs_system=LIBS_SYSTEM
2589
2590 #ifndef LIBS_TERMCAP
2591 #define LIBS_TERMCAP
2592 #endif
2593 configure___ libs_termcap=LIBS_TERMCAP
2594
2595 #ifndef LIB_STANDARD
2596 #define LIB_STANDARD
2597 #endif
2598 configure___ libs_standard=LIB_STANDARD
2599
2600
2601 #ifndef OBJECTS_MACHINE
2602 #define OBJECTS_MACHINE
2603 #endif
2604 configure___ objects_machine=OBJECTS_MACHINE
2605
2606 #ifndef OBJECTS_SYSTEM
2607 #define OBJECTS_SYSTEM
2608 #endif
2609 configure___ objects_system=OBJECTS_SYSTEM
2610
2611
2612 #ifndef C_SWITCH_MACHINE
2613 #define C_SWITCH_MACHINE
2614 #endif
2615 configure___ c_switch_machine=C_SWITCH_MACHINE
2616
2617 #ifndef C_SWITCH_SYSTEM
2618 #define C_SWITCH_SYSTEM
2619 #endif
2620 configure___ c_switch_system=C_SWITCH_SYSTEM
2621
2622
2623 #ifndef LD_SWITCH_MACHINE
2624 #define LD_SWITCH_MACHINE
2625 #endif
2626 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2627
2628 #ifndef LD_SWITCH_SYSTEM
2629 #define LD_SWITCH_SYSTEM
2630 #endif
2631 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2632
2633
2634 #ifndef UNEXEC
2635 #define UNEXEC "unexec.o"
2636 #endif
2637 configure___ unexec=UNEXEC
2638
2639
2640 #ifndef LD_SWITCH_SHARED
2641 #define LD_SWITCH_SHARED "-c"
2642 #endif
2643 configure___ ld_switch_shared=LD_SWITCH_SHARED
2644
2645
2646 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2647 configure___ ordinary_ld=ORDINARY_LD
2648
2649 #ifdef ORDINARY_LINK
2650 #define LD ORDINARY_LD
2651 #else /* no ORDINARY LINK */
2652 #ifdef COFF_ENCAPSULATE
2653 #define LD "\$(CC) -nostdlib"
2654 #else /* not COFF_ENCAPSULATE */
2655 #ifdef LINKER
2656 #define LD LINKER
2657 #else /* ! defined (LINKER) */
2658 #define LD "ld"
2659 #endif /* ! defined (LINKER) */
2660 #endif /* ! defined (COFF_ENCAPSULATE) */
2661 #endif /* not ORDINARY_LINK */
2662 configure___ ld=LD
2663
2664 #ifndef LIB_GCC
2665 #define LIB_GCC
2666 #endif
2667 configure___ lib_gcc=LIB_GCC
2668
2669 #ifndef LD_TEXT_START_ADDR
2670 #define LD_TEXT_START_ADDR
2671 #endif
2672 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2673
2674
2675 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2676 #ifdef NO_REMAP
2677 #ifdef COFF_ENCAPSULATE
2678 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2679 #else /* ! defined (COFF_ENCAPSULATE) */
2680 #define START_FILES "pre-crt0.o /lib/crt0.o"
2681 #endif /* ! defined (COFF_ENCAPSULATE) */
2682 #else /* ! defined (NO_REMAP) */
2683 #define START_FILES "ecrt0.o"
2684 #endif /* ! defined (NO_REMAP) */
2685 #endif /* no ORDINARY_LINK */
2686 #ifndef START_FILES
2687 #define START_FILES
2688 #endif
2689 configure___ start_files=START_FILES
2690
2691 #ifdef ORDINARY_LINK
2692 configure___ ordinary_link=yes
2693 #else
2694 configure___ ordinary_link=no
2695 #endif
2696
2697 #ifdef SYSTEM_MALLOC
2698 configure___ system_malloc=yes
2699 #else
2700 configure___ system_malloc=no
2701 #endif
2702
2703 #ifdef TERMINFO
2704 configure___ have_terminfo=yes
2705 #else
2706 configure___ have_terminfo=no
2707 #endif
2708
2709 #ifdef MAIL_USE_FLOCK
2710 configure___ mail_use_flock=yes
2711 #else
2712 configure___ mail_use_flock=no
2713 #endif
2714
2715 #ifdef MAIL_USE_LOCKF
2716 configure___ mail_use_lockf=yes
2717 #else
2718 configure___ mail_use_lockf=no
2719 #endif
2720
2721 #ifdef MAIL_USE_LOCKING
2722 configure___ mail_use_locking=yes
2723 #else
2724 configure___ mail_use_locking=no
2725 #endif
2726
2727 #ifdef HAVE_WIN32_PROCESSES
2728 configure___ win32_processes=yes
2729 #else
2730 configure___ win32_processes=no
2731 #endif
2732
2733 EOF
2734
2735 CPP=`eval "echo $CPP $CPPFLAGS"`
2736 eval `$CPP -Isrc $tempcname \
2737         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2738
2739 rm $tempcname
2740
2741 if test "$pdump" = "yes"; then
2742   ordinary_link="yes"
2743   ld="${ordinary_ld}"
2744   start_files=
2745   libs_standard=
2746   unexec=
2747   lib_gcc=      
2748 fi
2749
2750 test "$extra_verbose" = "yes" && \
2751   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 ""
2752
2753 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2754         mingw_include=`eval "dirname $mingw_include"` ;
2755         mingw_include="-I$mingw_include/../include/mingw32" ;
2756         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2757 esac
2758
2759 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2760
2761 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2762
2763 if test "$cflags_specified" = "no"; then
2764       if   test "$GCC" = "yes"; then
2765     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2766               elif test "$__SUNPRO_C" = "yes"; then
2767     case "$opsys" in
2768       sol2    ) CFLAGS="-v -xO4" ;;
2769       sunos4* ) CFLAGS="-xO2";;
2770     esac
2771   elif test "$__DECC" = "yes"; then
2772     CFLAGS="-O3"
2773   elif test "$CC" = "xlc"; then
2774     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2775     else
2776     CFLAGS="-O" ;  fi
2777 fi
2778
2779 if test "$GCC" = "yes"; then
2780 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2781 echo "configure:2782: checking for buggy gcc versions" >&5
2782 GCC_VERSION=`$CC --version`
2783 case `uname -s`:`uname -m`:$GCC_VERSION in
2784                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2785                         case "$CFLAGS" in
2786             *-O2*|*-O3*)
2787                 case "$CFLAGS" in
2788                     *-fno-schedule-insns*) ;;
2789                     *)
2790                         echo "$ac_t""Yes" 1>&6
2791                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2792                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2793                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2794                         ;;
2795                 esac
2796                 ;;
2797         esac
2798         ;;
2799                     Linux:alpha:egcs-2.91.*)
2800         echo "$ac_t""Yes" 1>&6
2801         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2802         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2803         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2804         ;;
2805     *:i*86*:2.7.2*)
2806         case "$GCC_VERSION" in
2807             2.7.2)
2808                 case "$CFLAGS" in
2809                     *-O2*|*-O3*)
2810                         case "$CFLAGS" in
2811                             *-fno-strength-reduce*) ;;
2812                             *)
2813                                 echo "$ac_t""Yes" 1>&6
2814                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2815                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2816                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2817                                 ;;
2818                         esac
2819                         ;;
2820                 esac
2821                 ;;
2822         esac
2823         case "$CFLAGS" in
2824          *-fno-caller-saves*) ;;
2825          *)
2826             echo "$ac_t""Yes" 1>&6
2827             echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2828             echo "configure: warning: -fno-caller-saves." 1>&2
2829             { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2830             ;;
2831         esac
2832         ;;
2833 esac
2834 fi
2835 echo "$ac_t""No" 1>&6
2836
2837
2838 if test "$GCC" = "yes"; then
2839   set x $ld_switch_system; shift; ld_switch_system=""
2840   while test -n "$1"; do
2841     case $1 in
2842       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2843       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2844       -Xlinker* ) ;;
2845       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2846     esac
2847     shift
2848   done
2849 fi
2850
2851 if test "$GCC" = "yes"; then
2852   set x $ld_switch_machine; shift; ld_switch_machine=""
2853   while test -n "$1"; do
2854     case $1 in
2855       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2856       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2857       -Xlinker* ) ;;
2858       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2859     esac
2860     shift
2861   done
2862 fi
2863
2864 if test "$GCC" = "yes"; then
2865   set x $LDFLAGS; shift; LDFLAGS=""
2866   while test -n "$1"; do
2867     case $1 in
2868       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2869       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2870       -Xlinker* ) ;;
2871       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2872     esac
2873     shift
2874   done
2875 fi
2876
2877 if test "$GCC" = "yes"; then
2878   set x $ld_call_shared; shift; ld_call_shared=""
2879   while test -n "$1"; do
2880     case $1 in
2881       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2882       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2883       -Xlinker* ) ;;
2884       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2885     esac
2886     shift
2887   done
2888 fi
2889
2890 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2891    echo "    xemacs will be linked with \"$objects_machine\""
2892  fi
2893 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2894    echo "    xemacs will be linked with \"$objects_system\""
2895  fi
2896 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2897    echo "    xemacs will be linked with \"$unexec\""
2898  fi
2899 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2900    echo "    xemacs will be linked with \"dumper.o\""
2901  fi
2902
2903 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2904 echo "configure:2905: checking for dynodump" >&5
2905 if test "$unexec" != "unexsol2.o"; then
2906   echo "$ac_t""no" 1>&6
2907 else
2908   echo "$ac_t""yes" 1>&6
2909   { test "$extra_verbose" = "yes" && cat << \EOF
2910     Defining DYNODUMP
2911 EOF
2912 cat >> confdefs.h <<\EOF
2913 #define DYNODUMP 1
2914 EOF
2915 }
2916
2917   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2918   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2919   case "$machine" in
2920     sparc   ) dynodump_arch=sparc ;;
2921     *86*    ) dynodump_arch=i386  ;;
2922     powerpc ) dynodump_arch=ppc   ;;
2923   esac
2924     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
2925 fi
2926
2927
2928 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2929
2930 if test "$unexec" = "unexaix.o"; then
2931   if   test "$dynamic" = "no"; then
2932   start_flags="-Wl,-bnso,-bnodelcsect"
2933   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2934   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2935     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2936   done
2937   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2938     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2939   done
2940   
2941 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2942 echo "configure:2943: checking for terminateAndUnload in -lC" >&5
2943 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2944
2945 xe_check_libs=" -lC "
2946 cat > conftest.$ac_ext <<EOF
2947 #line 2948 "configure"
2948 #include "confdefs.h"
2949 /* Override any gcc2 internal prototype to avoid an error.  */
2950 /* We use char because int might match the return type of a gcc2
2951     builtin and then its argument prototype would still apply.  */
2952 char terminateAndUnload();
2953
2954 int main() {
2955 terminateAndUnload()
2956 ; return 0; }
2957 EOF
2958 if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2959   rm -rf conftest*
2960   eval "ac_cv_lib_$ac_lib_var=yes"
2961 else
2962   echo "configure: failed program was:" >&5
2963   cat conftest.$ac_ext >&5
2964   rm -rf conftest*
2965   eval "ac_cv_lib_$ac_lib_var=no"
2966 fi
2967 rm -f conftest*
2968 xe_check_libs=""
2969
2970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2971   echo "$ac_t""yes" 1>&6
2972   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2973 else
2974   echo "$ac_t""no" 1>&6
2975 fi
2976
2977
2978   fi
2979 elif test -n "$ld_text_start_addr"; then
2980   start_flags="-T $ld_text_start_addr -e __start"
2981 fi
2982
2983
2984
2985
2986 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2987  test -z "$linker" &&  linker='$(CC) -nostdlib'
2988  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2989 fi
2990 test "$GCC" != "yes" && lib_gcc=
2991
2992
2993
2994
2995
2996 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2997 if test -n "$site_libraries"; then
2998   for arg in $site_libraries; do
2999     case "$arg" in
3000      -* ) ;;
3001      * ) test -d "$arg" || \
3002            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3003        arg="-L${arg}" ;;
3004     esac
3005     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3006   done
3007 fi
3008
3009 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3010 if test -n "$site_includes"; then
3011   for arg in $site_includes; do
3012     case "$arg" in
3013       -* ) ;;
3014       * ) test -d "$arg" || \
3015            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3016       arg="-I${arg}" ;;
3017     esac
3018     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3019   done
3020 fi
3021
3022 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3023 if test -n "$site_prefixes"; then
3024   for dir in $site_prefixes; do
3025     lib_dir="${dir}/lib"
3026     inc_dir="${dir}/include"
3027     if test ! -d "$dir"; then
3028       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3029     elif test ! -d "$lib_dir"; then
3030       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3031     else
3032       if test -d "$inc_dir"; then
3033         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
3034       fi
3035       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
3036     fi
3037   done
3038 fi
3039
3040
3041 for dir in "/usr/ccs/lib"; do
3042   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
3043 done
3044
3045 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3046 if test -n "$site_runtime_libraries"; then
3047   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3048   export LD_RUN_PATH
3049 fi
3050
3051
3052
3053
3054
3055 if test -n "$add_runtime_path"; then :;
3056 elif test "$dynamic" = "no"; then add_runtime_path=no
3057 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3058 else case "$opsys" in
3059        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3060        * ) add_runtime_path=no ;;
3061      esac
3062 fi
3063
3064 if test "$add_runtime_path" = "yes"; then
3065       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3066 echo "configure:3067: checking "for runtime libraries flag"" >&5
3067   case "$opsys" in
3068     sol2 ) dash_r="-R" ;;
3069     decosf* | linux* | irix*) dash_r="-rpath " ;;
3070     *)
3071       dash_r=""
3072       for try_dash_r in "-R" "-R " "-rpath "; do
3073         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3074         
3075 if test "$GCC" = "yes"; then
3076   set x $xe_check_libs; shift; xe_check_libs=""
3077   while test -n "$1"; do
3078     case $1 in
3079       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3080       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3081       -Xlinker* ) ;;
3082       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3083     esac
3084     shift
3085   done
3086 fi
3087         cat > conftest.$ac_ext <<EOF
3088 #line 3089 "configure"
3089 #include "confdefs.h"
3090
3091 int main() {
3092
3093 ; return 0; }
3094 EOF
3095 if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3096   rm -rf conftest*
3097   dash_r="$try_dash_r"
3098 else
3099   echo "configure: failed program was:" >&5
3100   cat conftest.$ac_ext >&5
3101 fi
3102 rm -f conftest*
3103         xe_check_libs=""
3104         test -n "$dash_r" && break
3105       done ;;
3106   esac
3107   if test -n "$dash_r";
3108     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3109     else echo "$ac_t""NONE" 1>&6
3110   fi
3111 fi
3112
3113 xe_add_unique_runpath_dir='
3114   xe_add_p=yes
3115   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3116   done
3117   if test "$xe_add_p" = "yes"; then
3118     test -n "$runpath" && runpath="${runpath}:"
3119     runpath="${runpath}${xe_runpath_dir}"
3120     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3121   fi'
3122
3123
3124
3125
3126 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3127     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3128   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3129   
3130         runpath="" runpath_dirs=""
3131   if test -n "$LD_RUN_PATH"; then
3132     runpath="$LD_RUN_PATH"
3133   elif test "$GCC" = "yes"; then
3134         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3135     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3136     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3137     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3138       case "$arg" in P,* | -L* | -R* )
3139         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3140           {
3141 xe_runpath_dir="$dir"
3142   test "$xe_runpath_dir" != "/lib"     -a \
3143         "$xe_runpath_dir" != "/usr/lib" -a \
3144         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3145   eval "$xe_add_unique_runpath_dir"
3146 }
3147         done ;;
3148       esac
3149     done
3150     ld_switch_run="$ld_switch_run_save"
3151     rm -f conftest*
3152   else
3153         for arg in $ld_switch_site $ld_switch_x_site; do
3154       case "$arg" in -L*) {
3155 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3156   test "$xe_runpath_dir" != "/lib"     -a \
3157         "$xe_runpath_dir" != "/usr/lib" -a \
3158         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3159   eval "$xe_add_unique_runpath_dir"
3160 };; esac
3161     done
3162         if test "$opsys $need_motif" = "sol2 yes"; then
3163       xe_runpath_dir="/opt/SUNWdt/lib";
3164       eval "$xe_add_unique_runpath_dir";
3165     fi
3166   fi 
3167   if test -n "$runpath"; then
3168     ld_switch_run="${dash_r}${runpath}"
3169     
3170 if test "$GCC" = "yes"; then
3171   set x $ld_switch_run; shift; ld_switch_run=""
3172   while test -n "$1"; do
3173     case $1 in
3174       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3175       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3176       -Xlinker* ) ;;
3177       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3178     esac
3179     shift
3180   done
3181 fi
3182     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3183   fi
3184 fi
3185
3186
3187
3188
3189 GNU_MALLOC=yes
3190 if test "$with_dlmalloc" != "no"; then
3191         doug_lea_malloc=yes
3192 else
3193         doug_lea_malloc=no
3194 fi
3195 after_morecore_hook_exists=yes
3196 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3197 echo "configure:3198: checking for malloc_set_state" >&5
3198
3199 cat > conftest.$ac_ext <<EOF
3200 #line 3201 "configure"
3201 #include "confdefs.h"
3202 /* System header to define __stub macros and hopefully few prototypes,
3203     which can conflict with char malloc_set_state(); below.  */
3204 #include <assert.h>
3205 /* Override any gcc2 internal prototype to avoid an error.  */
3206 /* We use char because int might match the return type of a gcc2
3207     builtin and then its argument prototype would still apply.  */
3208 char malloc_set_state();
3209
3210 int main() {
3211
3212 /* The GNU C library defines this for functions which it implements
3213     to always fail with ENOSYS.  Some functions are actually named
3214     something starting with __ and the normal name is an alias.  */
3215 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3216 choke me
3217 #else
3218 malloc_set_state();
3219 #endif
3220
3221 ; return 0; }
3222 EOF
3223 if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3224   rm -rf conftest*
3225   eval "ac_cv_func_malloc_set_state=yes"
3226 else
3227   echo "configure: failed program was:" >&5
3228   cat conftest.$ac_ext >&5
3229   rm -rf conftest*
3230   eval "ac_cv_func_malloc_set_state=no"
3231 fi
3232 rm -f conftest*
3233
3234 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3235   echo "$ac_t""yes" 1>&6
3236   :
3237 else
3238   echo "$ac_t""no" 1>&6
3239 doug_lea_malloc=no
3240 fi
3241
3242 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3243 echo "configure:3244: checking whether __after_morecore_hook exists" >&5
3244 cat > conftest.$ac_ext <<EOF
3245 #line 3246 "configure"
3246 #include "confdefs.h"
3247 extern void (* __after_morecore_hook)();
3248 int main() {
3249 __after_morecore_hook = 0
3250 ; return 0; }
3251 EOF
3252 if { (eval echo configure:3253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3253   rm -rf conftest*
3254   echo "$ac_t""yes" 1>&6
3255 else
3256   echo "configure: failed program was:" >&5
3257   cat conftest.$ac_ext >&5
3258   rm -rf conftest*
3259   echo "$ac_t""no" 1>&6
3260    after_morecore_hook_exists=no
3261 fi
3262 rm -f conftest*
3263 if test "$system_malloc" = "yes" ; then
3264   GNU_MALLOC=no
3265   GNU_MALLOC_reason="
3266     - The GNU allocators don't work with this system configuration."
3267 elif test "$with_system_malloc" = "yes" ; then
3268   GNU_MALLOC=no
3269   GNU_MALLOC_reason="
3270     - User chose not to use GNU allocators."
3271 elif test "$with_debug_malloc" = "yes" ; then
3272   GNU_MALLOC=no
3273   GNU_MALLOC_reason="
3274     - User chose to use Debugging Malloc."
3275 fi
3276
3277 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3278   GNU_MALLOC_reason="
3279     - Using Doug Lea's new malloc from the GNU C Library."
3280   { test "$extra_verbose" = "yes" && cat << \EOF
3281     Defining DOUG_LEA_MALLOC
3282 EOF
3283 cat >> confdefs.h <<\EOF
3284 #define DOUG_LEA_MALLOC 1
3285 EOF
3286 }
3287
3288   if test "$after_morecore_hook_exists" = "no" ; then
3289     GNU_MALLOC_reason="
3290     - Using Doug Lea's new malloc from the Linux C Library."
3291     { test "$extra_verbose" = "yes" && cat << \EOF
3292     Defining _NO_MALLOC_WARNING_
3293 EOF
3294 cat >> confdefs.h <<\EOF
3295 #define _NO_MALLOC_WARNING_ 1
3296 EOF
3297 }
3298
3299   fi
3300 fi
3301
3302
3303
3304
3305 # Extract the first word of "ranlib", so it can be a program name with args.
3306 set dummy ranlib; ac_word=$2
3307 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3308 echo "configure:3309: checking for $ac_word" >&5
3309
3310 if test -n "$RANLIB"; then
3311   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3312 else
3313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3314   ac_dummy="$PATH"
3315   for ac_dir in $ac_dummy; do
3316     test -z "$ac_dir" && ac_dir=.
3317     if test -f $ac_dir/$ac_word; then
3318       ac_cv_prog_RANLIB="ranlib"
3319       break
3320     fi
3321   done
3322   IFS="$ac_save_ifs"
3323   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3324 fi
3325 RANLIB="$ac_cv_prog_RANLIB"
3326 if test -n "$RANLIB"; then
3327   echo "$ac_t""$RANLIB" 1>&6
3328 else
3329   echo "$ac_t""no" 1>&6
3330 fi
3331
3332 ac_aux_dir=
3333 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3334   if test -f $ac_dir/install-sh; then
3335     ac_aux_dir=$ac_dir
3336     ac_install_sh="$ac_aux_dir/install-sh -c"
3337     break
3338   elif test -f $ac_dir/install.sh; then
3339     ac_aux_dir=$ac_dir
3340     ac_install_sh="$ac_aux_dir/install.sh -c"
3341     break
3342   fi
3343 done
3344 if test -z "$ac_aux_dir"; then
3345   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3346 fi
3347 ac_config_guess=$ac_aux_dir/config.guess
3348 ac_config_sub=$ac_aux_dir/config.sub
3349 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3350
3351 # Find a good install program.  We prefer a C program (faster),
3352 # so one script is as good as another.  But avoid the broken or
3353 # incompatible versions:
3354 # SysV /etc/install, /usr/sbin/install
3355 # SunOS /usr/etc/install
3356 # IRIX /sbin/install
3357 # AIX /bin/install
3358 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3359 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3360 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3361 # ./install, which can be erroneously created by make from ./install.sh.
3362 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3363 echo "configure:3364: checking for a BSD compatible install" >&5
3364 if test -z "$INSTALL"; then
3365
3366   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3367   for ac_dir in $PATH; do
3368     # Account for people who put trailing slashes in PATH elements.
3369     case "$ac_dir/" in
3370     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3371     *)
3372       # OSF1 and SCO ODT 3.0 have their own names for install.
3373       # Don't use installbsd from OSF since it installs stuff as root
3374       # by default.
3375       for ac_prog in ginstall scoinst install; do
3376         if test -f $ac_dir/$ac_prog; then
3377           if test $ac_prog = install &&
3378             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3379             # AIX install.  It has an incompatible calling convention.
3380             :
3381           else
3382             ac_cv_path_install="$ac_dir/$ac_prog -c"
3383             break 2
3384           fi
3385         fi
3386       done
3387       ;;
3388     esac
3389   done
3390   IFS="$ac_save_IFS"
3391
3392   if test "${ac_cv_path_install+set}" = set; then
3393     INSTALL="$ac_cv_path_install"
3394   else
3395     # As a last resort, use the slow shell script.  We don't cache a
3396     # path for INSTALL within a source directory, because that will
3397     # break other packages using the cache if that directory is
3398     # removed, or if the path is relative.
3399     INSTALL="$ac_install_sh"
3400   fi
3401 fi
3402 echo "$ac_t""$INSTALL" 1>&6
3403
3404 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3405 # It thinks the first close brace ends the variable substitution.
3406 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3407
3408 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3409
3410 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3411
3412 for ac_prog in 'bison -y' byacc
3413 do
3414 # Extract the first word of "$ac_prog", so it can be a program name with args.
3415 set dummy $ac_prog; ac_word=$2
3416 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3417 echo "configure:3418: checking for $ac_word" >&5
3418
3419 if test -n "$YACC"; then
3420   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3421 else
3422   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3423   ac_dummy="$PATH"
3424   for ac_dir in $ac_dummy; do
3425     test -z "$ac_dir" && ac_dir=.
3426     if test -f $ac_dir/$ac_word; then
3427       ac_cv_prog_YACC="$ac_prog"
3428       break
3429     fi
3430   done
3431   IFS="$ac_save_ifs"
3432 fi
3433 YACC="$ac_cv_prog_YACC"
3434 if test -n "$YACC"; then
3435   echo "$ac_t""$YACC" 1>&6
3436 else
3437   echo "$ac_t""no" 1>&6
3438 fi
3439
3440 test -n "$YACC" && break
3441 done
3442 test -n "$YACC" || YACC="yacc"
3443
3444
3445 for ac_hdr in   a.out.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/stropts.h   sys/time.h   sys/timeb.h   sys/un.h   kstat.h   ulimit.h   unistd.h   utime.h 
3446 do
3447 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3448 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3449 echo "configure:3450: checking for $ac_hdr" >&5
3450
3451 cat > conftest.$ac_ext <<EOF
3452 #line 3453 "configure"
3453 #include "confdefs.h"
3454 #include <$ac_hdr>
3455 EOF
3456 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3457 { (eval echo configure:3458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3458 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3459 if test -z "$ac_err"; then
3460   rm -rf conftest*
3461   eval "ac_cv_header_$ac_safe=yes"
3462 else
3463   echo "$ac_err" >&5
3464   echo "configure: failed program was:" >&5
3465   cat conftest.$ac_ext >&5
3466   rm -rf conftest*
3467   eval "ac_cv_header_$ac_safe=no"
3468 fi
3469 rm -f conftest*
3470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3471   echo "$ac_t""yes" 1>&6
3472     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3473   { test "$extra_verbose" = "yes" && cat << EOF
3474     Defining $ac_tr_hdr
3475 EOF
3476 cat >> confdefs.h <<EOF
3477 #define $ac_tr_hdr 1
3478 EOF
3479 }
3480  
3481 else
3482   echo "$ac_t""no" 1>&6
3483 fi
3484 done
3485
3486 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3487 echo "configure:3488: checking for sys/wait.h that is POSIX.1 compatible" >&5
3488
3489 cat > conftest.$ac_ext <<EOF
3490 #line 3491 "configure"
3491 #include "confdefs.h"
3492 #include <sys/types.h>
3493 #include <sys/wait.h>
3494 #ifndef WEXITSTATUS
3495 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3496 #endif
3497 #ifndef WIFEXITED
3498 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3499 #endif
3500 int main() {
3501 int s;
3502 wait (&s);
3503 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3504 ; return 0; }
3505 EOF
3506 if { (eval echo configure:3507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3507   rm -rf conftest*
3508   ac_cv_header_sys_wait_h=yes
3509 else
3510   echo "configure: failed program was:" >&5
3511   cat conftest.$ac_ext >&5
3512   rm -rf conftest*
3513   ac_cv_header_sys_wait_h=no
3514 fi
3515 rm -f conftest*
3516
3517 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3518 if test $ac_cv_header_sys_wait_h = yes; then
3519   { test "$extra_verbose" = "yes" && cat << \EOF
3520     Defining HAVE_SYS_WAIT_H
3521 EOF
3522 cat >> confdefs.h <<\EOF
3523 #define HAVE_SYS_WAIT_H 1
3524 EOF
3525 }
3526
3527 fi
3528
3529 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3530 echo "configure:3531: checking for ANSI C header files" >&5
3531
3532 cat > conftest.$ac_ext <<EOF
3533 #line 3534 "configure"
3534 #include "confdefs.h"
3535 #include <stdlib.h>
3536 #include <stdarg.h>
3537 #include <string.h>
3538 #include <float.h>
3539 EOF
3540 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3541 { (eval echo configure:3542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3542 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3543 if test -z "$ac_err"; then
3544   rm -rf conftest*
3545   ac_cv_header_stdc=yes
3546 else
3547   echo "$ac_err" >&5
3548   echo "configure: failed program was:" >&5
3549   cat conftest.$ac_ext >&5
3550   rm -rf conftest*
3551   ac_cv_header_stdc=no
3552 fi
3553 rm -f conftest*
3554
3555 if test $ac_cv_header_stdc = yes; then
3556   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3557 cat > conftest.$ac_ext <<EOF
3558 #line 3559 "configure"
3559 #include "confdefs.h"
3560 #include <string.h>
3561 EOF
3562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3563   egrep "memchr" >/dev/null 2>&1; then
3564   :
3565 else
3566   rm -rf conftest*
3567   ac_cv_header_stdc=no
3568 fi
3569 rm -f conftest*
3570
3571 fi
3572
3573 if test $ac_cv_header_stdc = yes; then
3574   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3575 cat > conftest.$ac_ext <<EOF
3576 #line 3577 "configure"
3577 #include "confdefs.h"
3578 #include <stdlib.h>
3579 EOF
3580 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3581   egrep "free" >/dev/null 2>&1; then
3582   :
3583 else
3584   rm -rf conftest*
3585   ac_cv_header_stdc=no
3586 fi
3587 rm -f conftest*
3588
3589 fi
3590
3591 if test $ac_cv_header_stdc = yes; then
3592   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3593 cat > conftest.$ac_ext <<EOF
3594 #line 3595 "configure"
3595 #include "confdefs.h"
3596 #include <ctype.h>
3597 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3598 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3599 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3600 int main () { int i; for (i = 0; i < 256; i++)
3601 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3602 exit (0); }
3603
3604 EOF
3605 if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3606 then
3607   :
3608 else
3609   conftest_rc="$?"
3610   echo "configure: failed program was:" >&5
3611   cat conftest.$ac_ext >&5
3612   rm -fr conftest*
3613   ac_cv_header_stdc=no
3614 fi
3615 rm -fr conftest*
3616 fi
3617
3618 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3619 if test $ac_cv_header_stdc = yes; then
3620   { test "$extra_verbose" = "yes" && cat << \EOF
3621     Defining STDC_HEADERS
3622 EOF
3623 cat >> confdefs.h <<\EOF
3624 #define STDC_HEADERS 1
3625 EOF
3626 }
3627
3628 fi
3629
3630 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3631 echo "configure:3632: checking whether time.h and sys/time.h may both be included" >&5
3632
3633 cat > conftest.$ac_ext <<EOF
3634 #line 3635 "configure"
3635 #include "confdefs.h"
3636 #include <sys/types.h>
3637 #include <sys/time.h>
3638 #include <time.h>
3639 int main() {
3640 struct tm *tp;
3641 ; return 0; }
3642 EOF
3643 if { (eval echo configure:3644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3644   rm -rf conftest*
3645   ac_cv_header_time=yes
3646 else
3647   echo "configure: failed program was:" >&5
3648   cat conftest.$ac_ext >&5
3649   rm -rf conftest*
3650   ac_cv_header_time=no
3651 fi
3652 rm -f conftest*
3653
3654 echo "$ac_t""$ac_cv_header_time" 1>&6
3655 if test $ac_cv_header_time = yes; then
3656   { test "$extra_verbose" = "yes" && cat << \EOF
3657     Defining TIME_WITH_SYS_TIME
3658 EOF
3659 cat >> confdefs.h <<\EOF
3660 #define TIME_WITH_SYS_TIME 1
3661 EOF
3662 }
3663
3664 fi
3665
3666 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3667 echo "configure:3668: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3668
3669 cat > conftest.$ac_ext <<EOF
3670 #line 3671 "configure"
3671 #include "confdefs.h"
3672 #include <sys/types.h>
3673 #include <signal.h>
3674 /* NetBSD declares sys_siglist in unistd.h.  */
3675 #ifdef HAVE_UNISTD_H
3676 #include <unistd.h>
3677 #endif
3678 int main() {
3679 char *msg = *(sys_siglist + 1);
3680 ; return 0; }
3681 EOF
3682 if { (eval echo configure:3683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3683   rm -rf conftest*
3684   ac_cv_decl_sys_siglist=yes
3685 else
3686   echo "configure: failed program was:" >&5
3687   cat conftest.$ac_ext >&5
3688   rm -rf conftest*
3689   ac_cv_decl_sys_siglist=no
3690 fi
3691 rm -f conftest*
3692
3693 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3694 if test $ac_cv_decl_sys_siglist = yes; then
3695   { test "$extra_verbose" = "yes" && cat << \EOF
3696     Defining SYS_SIGLIST_DECLARED
3697 EOF
3698 cat >> confdefs.h <<\EOF
3699 #define SYS_SIGLIST_DECLARED 1
3700 EOF
3701 }
3702
3703 fi
3704
3705
3706 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3707 echo "configure:3708: checking for struct utimbuf" >&5
3708 cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3711 #ifdef TIME_WITH_SYS_TIME
3712 #include <sys/time.h>
3713 #include <time.h>
3714 #else
3715 #ifdef HAVE_SYS_TIME_H
3716 #include <sys/time.h>
3717 #else
3718 #include <time.h>
3719 #endif
3720 #endif
3721 #ifdef HAVE_UTIME_H
3722 #include <utime.h>
3723 #endif
3724 int main() {
3725 static struct utimbuf x; x.actime = x.modtime;
3726 ; return 0; }
3727 EOF
3728 if { (eval echo configure:3729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3729   rm -rf conftest*
3730   echo "$ac_t""yes" 1>&6
3731    { test "$extra_verbose" = "yes" && cat << \EOF
3732     Defining HAVE_STRUCT_UTIMBUF
3733 EOF
3734 cat >> confdefs.h <<\EOF
3735 #define HAVE_STRUCT_UTIMBUF 1
3736 EOF
3737 }
3738
3739 else
3740   echo "configure: failed program was:" >&5
3741   cat conftest.$ac_ext >&5
3742   rm -rf conftest*
3743   echo "$ac_t""no" 1>&6
3744 fi
3745 rm -f conftest*
3746
3747 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3748 echo "configure:3749: checking return type of signal handlers" >&5
3749
3750 cat > conftest.$ac_ext <<EOF
3751 #line 3752 "configure"
3752 #include "confdefs.h"
3753 #include <sys/types.h>
3754 #include <signal.h>
3755 #ifdef signal
3756 #undef signal
3757 #endif
3758 #ifdef __cplusplus
3759 extern "C" void (*signal (int, void (*)(int)))(int);
3760 #else
3761 void (*signal ()) ();
3762 #endif
3763
3764 int main() {
3765 int i;
3766 ; return 0; }
3767 EOF
3768 if { (eval echo configure:3769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3769   rm -rf conftest*
3770   ac_cv_type_signal=void
3771 else
3772   echo "configure: failed program was:" >&5
3773   cat conftest.$ac_ext >&5
3774   rm -rf conftest*
3775   ac_cv_type_signal=int
3776 fi
3777 rm -f conftest*
3778
3779 echo "$ac_t""$ac_cv_type_signal" 1>&6
3780 { test "$extra_verbose" = "yes" && cat << EOF
3781     Defining RETSIGTYPE = $ac_cv_type_signal
3782 EOF
3783 cat >> confdefs.h <<EOF
3784 #define RETSIGTYPE $ac_cv_type_signal
3785 EOF
3786 }
3787
3788
3789 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3790 echo "configure:3791: checking for size_t" >&5
3791
3792 cat > conftest.$ac_ext <<EOF
3793 #line 3794 "configure"
3794 #include "confdefs.h"
3795 #include <sys/types.h>
3796 #if STDC_HEADERS
3797 #include <stdlib.h>
3798 #include <stddef.h>
3799 #endif
3800 EOF
3801 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3802   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3803   rm -rf conftest*
3804   ac_cv_type_size_t=yes
3805 else
3806   rm -rf conftest*
3807   ac_cv_type_size_t=no
3808 fi
3809 rm -f conftest*
3810
3811 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3812 if test $ac_cv_type_size_t = no; then
3813   { test "$extra_verbose" = "yes" && cat << \EOF
3814     Defining size_t = unsigned
3815 EOF
3816 cat >> confdefs.h <<\EOF
3817 #define size_t unsigned
3818 EOF
3819 }
3820
3821 fi
3822
3823 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3824 echo "configure:3825: checking for pid_t" >&5
3825
3826 cat > conftest.$ac_ext <<EOF
3827 #line 3828 "configure"
3828 #include "confdefs.h"
3829 #include <sys/types.h>
3830 #if STDC_HEADERS
3831 #include <stdlib.h>
3832 #include <stddef.h>
3833 #endif
3834 EOF
3835 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3836   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3837   rm -rf conftest*
3838   ac_cv_type_pid_t=yes
3839 else
3840   rm -rf conftest*
3841   ac_cv_type_pid_t=no
3842 fi
3843 rm -f conftest*
3844
3845 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3846 if test $ac_cv_type_pid_t = no; then
3847   { test "$extra_verbose" = "yes" && cat << \EOF
3848     Defining pid_t = int
3849 EOF
3850 cat >> confdefs.h <<\EOF
3851 #define pid_t int
3852 EOF
3853 }
3854
3855 fi
3856
3857 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3858 echo "configure:3859: checking for uid_t in sys/types.h" >&5
3859
3860 cat > conftest.$ac_ext <<EOF
3861 #line 3862 "configure"
3862 #include "confdefs.h"
3863 #include <sys/types.h>
3864 EOF
3865 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3866   egrep "uid_t" >/dev/null 2>&1; then
3867   rm -rf conftest*
3868   ac_cv_type_uid_t=yes
3869 else
3870   rm -rf conftest*
3871   ac_cv_type_uid_t=no
3872 fi
3873 rm -f conftest*
3874
3875
3876 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3877 if test $ac_cv_type_uid_t = no; then
3878   { test "$extra_verbose" = "yes" && cat << \EOF
3879     Defining uid_t = int
3880 EOF
3881 cat >> confdefs.h <<\EOF
3882 #define uid_t int
3883 EOF
3884 }
3885
3886   { test "$extra_verbose" = "yes" && cat << \EOF
3887     Defining gid_t = int
3888 EOF
3889 cat >> confdefs.h <<\EOF
3890 #define gid_t int
3891 EOF
3892 }
3893
3894 fi
3895
3896 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3897 echo "configure:3898: checking for mode_t" >&5
3898
3899 cat > conftest.$ac_ext <<EOF
3900 #line 3901 "configure"
3901 #include "confdefs.h"
3902 #include <sys/types.h>
3903 #if STDC_HEADERS
3904 #include <stdlib.h>
3905 #include <stddef.h>
3906 #endif
3907 EOF
3908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3909   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3910   rm -rf conftest*
3911   ac_cv_type_mode_t=yes
3912 else
3913   rm -rf conftest*
3914   ac_cv_type_mode_t=no
3915 fi
3916 rm -f conftest*
3917
3918 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3919 if test $ac_cv_type_mode_t = no; then
3920   { test "$extra_verbose" = "yes" && cat << \EOF
3921     Defining mode_t = int
3922 EOF
3923 cat >> confdefs.h <<\EOF
3924 #define mode_t int
3925 EOF
3926 }
3927
3928 fi
3929
3930 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3931 echo "configure:3932: checking for off_t" >&5
3932
3933 cat > conftest.$ac_ext <<EOF
3934 #line 3935 "configure"
3935 #include "confdefs.h"
3936 #include <sys/types.h>
3937 #if STDC_HEADERS
3938 #include <stdlib.h>
3939 #include <stddef.h>
3940 #endif
3941 EOF
3942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3943   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3944   rm -rf conftest*
3945   ac_cv_type_off_t=yes
3946 else
3947   rm -rf conftest*
3948   ac_cv_type_off_t=no
3949 fi
3950 rm -f conftest*
3951
3952 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3953 if test $ac_cv_type_off_t = no; then
3954   { test "$extra_verbose" = "yes" && cat << \EOF
3955     Defining off_t = long
3956 EOF
3957 cat >> confdefs.h <<\EOF
3958 #define off_t long
3959 EOF
3960 }
3961
3962 fi
3963
3964 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3965 echo "configure:3966: checking for ssize_t" >&5
3966
3967 cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3970 #include <sys/types.h>
3971 #if STDC_HEADERS
3972 #include <stdlib.h>
3973 #include <stddef.h>
3974 #endif
3975 EOF
3976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3977   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3978   rm -rf conftest*
3979   ac_cv_type_ssize_t=yes
3980 else
3981   rm -rf conftest*
3982   ac_cv_type_ssize_t=no
3983 fi
3984 rm -f conftest*
3985
3986 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3987 if test $ac_cv_type_ssize_t = no; then
3988   { test "$extra_verbose" = "yes" && cat << \EOF
3989     Defining ssize_t = int
3990 EOF
3991 cat >> confdefs.h <<\EOF
3992 #define ssize_t int
3993 EOF
3994 }
3995
3996 fi
3997
3998
3999 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4000 echo "configure:4001: checking for struct timeval" >&5
4001 cat > conftest.$ac_ext <<EOF
4002 #line 4003 "configure"
4003 #include "confdefs.h"
4004 #ifdef TIME_WITH_SYS_TIME
4005 #include <sys/time.h>
4006 #include <time.h>
4007 #else
4008 #ifdef HAVE_SYS_TIME_H
4009 #include <sys/time.h>
4010 #else
4011 #include <time.h>
4012 #endif
4013 #endif
4014 int main() {
4015 static struct timeval x; x.tv_sec = x.tv_usec;
4016 ; return 0; }
4017 EOF
4018 if { (eval echo configure:4019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4019   rm -rf conftest*
4020   echo "$ac_t""yes" 1>&6
4021   HAVE_TIMEVAL=yes
4022   { test "$extra_verbose" = "yes" && cat << \EOF
4023     Defining HAVE_TIMEVAL
4024 EOF
4025 cat >> confdefs.h <<\EOF
4026 #define HAVE_TIMEVAL 1
4027 EOF
4028 }
4029
4030 else
4031   echo "configure: failed program was:" >&5
4032   cat conftest.$ac_ext >&5
4033   rm -rf conftest*
4034   echo "$ac_t""no" 1>&6
4035    HAVE_TIMEVAL=no
4036 fi
4037 rm -f conftest*
4038
4039 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4040 echo "configure:4041: checking whether struct tm is in sys/time.h or time.h" >&5
4041
4042 cat > conftest.$ac_ext <<EOF
4043 #line 4044 "configure"
4044 #include "confdefs.h"
4045 #include <sys/types.h>
4046 #include <time.h>
4047 int main() {
4048 struct tm *tp; tp->tm_sec;
4049 ; return 0; }
4050 EOF
4051 if { (eval echo configure:4052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4052   rm -rf conftest*
4053   ac_cv_struct_tm=time.h
4054 else
4055   echo "configure: failed program was:" >&5
4056   cat conftest.$ac_ext >&5
4057   rm -rf conftest*
4058   ac_cv_struct_tm=sys/time.h
4059 fi
4060 rm -f conftest*
4061
4062 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4063 if test $ac_cv_struct_tm = sys/time.h; then
4064   { test "$extra_verbose" = "yes" && cat << \EOF
4065     Defining TM_IN_SYS_TIME
4066 EOF
4067 cat >> confdefs.h <<\EOF
4068 #define TM_IN_SYS_TIME 1
4069 EOF
4070 }
4071
4072 fi
4073
4074 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4075 echo "configure:4076: checking for tm_zone in struct tm" >&5
4076
4077 cat > conftest.$ac_ext <<EOF
4078 #line 4079 "configure"
4079 #include "confdefs.h"
4080 #include <sys/types.h>
4081 #include <$ac_cv_struct_tm>
4082 int main() {
4083 struct tm tm; tm.tm_zone;
4084 ; return 0; }
4085 EOF
4086 if { (eval echo configure:4087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4087   rm -rf conftest*
4088   ac_cv_struct_tm_zone=yes
4089 else
4090   echo "configure: failed program was:" >&5
4091   cat conftest.$ac_ext >&5
4092   rm -rf conftest*
4093   ac_cv_struct_tm_zone=no
4094 fi
4095 rm -f conftest*
4096
4097 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4098 if test "$ac_cv_struct_tm_zone" = yes; then
4099   { test "$extra_verbose" = "yes" && cat << \EOF
4100     Defining HAVE_TM_ZONE
4101 EOF
4102 cat >> confdefs.h <<\EOF
4103 #define HAVE_TM_ZONE 1
4104 EOF
4105 }
4106
4107 else
4108   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4109 echo "configure:4110: checking for tzname" >&5
4110
4111 cat > conftest.$ac_ext <<EOF
4112 #line 4113 "configure"
4113 #include "confdefs.h"
4114 #include <time.h>
4115 #ifndef tzname /* For SGI.  */
4116 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4117 #endif
4118 int main() {
4119 atoi(*tzname);
4120 ; return 0; }
4121 EOF
4122 if { (eval echo configure:4123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4123   rm -rf conftest*
4124   ac_cv_var_tzname=yes
4125 else
4126   echo "configure: failed program was:" >&5
4127   cat conftest.$ac_ext >&5
4128   rm -rf conftest*
4129   ac_cv_var_tzname=no
4130 fi
4131 rm -f conftest*
4132
4133 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4134   if test $ac_cv_var_tzname = yes; then
4135     { test "$extra_verbose" = "yes" && cat << \EOF
4136     Defining HAVE_TZNAME
4137 EOF
4138 cat >> confdefs.h <<\EOF
4139 #define HAVE_TZNAME 1
4140 EOF
4141 }
4142
4143   fi
4144 fi
4145
4146
4147 echo $ac_n "checking for working const""... $ac_c" 1>&6
4148 echo "configure:4149: checking for working const" >&5
4149
4150 cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4153
4154 int main() {
4155
4156 /* Ultrix mips cc rejects this.  */
4157 typedef int charset[2]; const charset x;
4158 /* SunOS 4.1.1 cc rejects this.  */
4159 char const *const *ccp;
4160 char **p;
4161 /* NEC SVR4.0.2 mips cc rejects this.  */
4162 struct point {int x, y;};
4163 static struct point const zero = {0,0};
4164 /* AIX XL C 1.02.0.0 rejects this.
4165    It does not let you subtract one const X* pointer from another in an arm
4166    of an if-expression whose if-part is not a constant expression */
4167 const char *g = "string";
4168 ccp = &g + (g ? g-g : 0);
4169 /* HPUX 7.0 cc rejects these. */
4170 ++ccp;
4171 p = (char**) ccp;
4172 ccp = (char const *const *) p;
4173 { /* SCO 3.2v4 cc rejects this.  */
4174   char *t;
4175   char const *s = 0 ? (char *) 0 : (char const *) 0;
4176
4177   *t++ = 0;
4178 }
4179 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4180   int x[] = {25, 17};
4181   const int *foo = &x[0];
4182   ++foo;
4183 }
4184 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4185   typedef const int *iptr;
4186   iptr p = 0;
4187   ++p;
4188 }
4189 { /* AIX XL C 1.02.0.0 rejects this saying
4190      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4191   struct s { int j; const int *ap[3]; };
4192   struct s *b; b->j = 5;
4193 }
4194 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4195   const int foo = 10;
4196 }
4197
4198 ; return 0; }
4199 EOF
4200 if { (eval echo configure:4201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4201   rm -rf conftest*
4202   ac_cv_c_const=yes
4203 else
4204   echo "configure: failed program was:" >&5
4205   cat conftest.$ac_ext >&5
4206   rm -rf conftest*
4207   ac_cv_c_const=no
4208 fi
4209 rm -f conftest*
4210
4211 echo "$ac_t""$ac_cv_c_const" 1>&6
4212 if test $ac_cv_c_const = no; then
4213   { test "$extra_verbose" = "yes" && cat << \EOF
4214     Defining const = 
4215 EOF
4216 cat >> confdefs.h <<\EOF
4217 #define const 
4218 EOF
4219 }
4220
4221 fi
4222
4223
4224 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4225 echo "configure:4226: checking whether ${MAKE-make} sets \${MAKE}" >&5
4226 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4227
4228 cat > conftestmake <<\EOF
4229 all:
4230         @echo 'ac_maketemp="${MAKE}"'
4231 EOF
4232 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4233 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4234 if test -n "$ac_maketemp"; then
4235   eval ac_cv_prog_make_${ac_make}_set=yes
4236 else
4237   eval ac_cv_prog_make_${ac_make}_set=no
4238 fi
4239 rm -f conftestmake
4240 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4241   echo "$ac_t""yes" 1>&6
4242   SET_MAKE=
4243 else
4244   echo "$ac_t""no" 1>&6
4245   SET_MAKE="MAKE=${MAKE-make}"
4246 fi
4247
4248
4249 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4250 echo "configure:4251: checking whether byte ordering is bigendian" >&5
4251
4252 ac_cv_c_bigendian=unknown
4253 # See if sys/param.h defines the BYTE_ORDER macro.
4254 cat > conftest.$ac_ext <<EOF
4255 #line 4256 "configure"
4256 #include "confdefs.h"
4257 #include <sys/types.h>
4258 #include <sys/param.h>
4259 int main() {
4260
4261 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4262  bogus endian macros
4263 #endif
4264 ; return 0; }
4265 EOF
4266 if { (eval echo configure:4267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4267   rm -rf conftest*
4268   # It does; now see whether it defined to BIG_ENDIAN or not.
4269 cat > conftest.$ac_ext <<EOF
4270 #line 4271 "configure"
4271 #include "confdefs.h"
4272 #include <sys/types.h>
4273 #include <sys/param.h>
4274 int main() {
4275
4276 #if BYTE_ORDER != BIG_ENDIAN
4277  not big endian
4278 #endif
4279 ; return 0; }
4280 EOF
4281 if { (eval echo configure:4282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4282   rm -rf conftest*
4283   ac_cv_c_bigendian=yes
4284 else
4285   echo "configure: failed program was:" >&5
4286   cat conftest.$ac_ext >&5
4287   rm -rf conftest*
4288   ac_cv_c_bigendian=no
4289 fi
4290 rm -f conftest*
4291 else
4292   echo "configure: failed program was:" >&5
4293   cat conftest.$ac_ext >&5
4294 fi
4295 rm -f conftest*
4296 if test $ac_cv_c_bigendian = unknown; then
4297 cat > conftest.$ac_ext <<EOF
4298 #line 4299 "configure"
4299 #include "confdefs.h"
4300 main () {
4301   /* Are we little or big endian?  From Harbison&Steele.  */
4302   union
4303   {
4304     long l;
4305     char c[sizeof (long)];
4306   } u;
4307   u.l = 1;
4308   exit (u.c[sizeof (long) - 1] == 1);
4309 }
4310 EOF
4311 if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4312 then
4313   ac_cv_c_bigendian=no
4314 else
4315   conftest_rc="$?"
4316   echo "configure: failed program was:" >&5
4317   cat conftest.$ac_ext >&5
4318   rm -fr conftest*
4319   ac_cv_c_bigendian=yes
4320 fi
4321 rm -fr conftest*
4322 fi
4323
4324 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4325 if test $ac_cv_c_bigendian = yes; then
4326   { test "$extra_verbose" = "yes" && cat << \EOF
4327     Defining WORDS_BIGENDIAN
4328 EOF
4329 cat >> confdefs.h <<\EOF
4330 #define WORDS_BIGENDIAN 1
4331 EOF
4332 }
4333
4334 fi
4335
4336
4337 echo $ac_n "checking size of short""... $ac_c" 1>&6
4338 echo "configure:4339: checking size of short" >&5
4339
4340 cat > conftest.$ac_ext <<EOF
4341 #line 4342 "configure"
4342 #include "confdefs.h"
4343 #include <stdio.h>
4344 main()
4345 {
4346   FILE *f=fopen("conftestval", "w");
4347   if (!f) exit(1);
4348   fprintf(f, "%d\n", sizeof(short));
4349   exit(0);
4350 }
4351 EOF
4352 if { (eval echo configure:4353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4353 then
4354   ac_cv_sizeof_short=`cat conftestval`
4355 else
4356   conftest_rc="$?"
4357   echo "configure: failed program was:" >&5
4358   cat conftest.$ac_ext >&5
4359   rm -fr conftest*
4360   ac_cv_sizeof_short=0
4361 fi
4362 rm -fr conftest*
4363 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4364 { test "$extra_verbose" = "yes" && cat << EOF
4365     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4366 EOF
4367 cat >> confdefs.h <<EOF
4368 #define SIZEOF_SHORT $ac_cv_sizeof_short
4369 EOF
4370 }
4371
4372
4373 if test "$ac_cv_sizeof_short" = 0; then
4374   echo ""
4375   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4376   echo "*** PANIC *** Please examine config.log for compilation errors."
4377   exit 1
4378 fi
4379 echo $ac_n "checking size of int""... $ac_c" 1>&6
4380 echo "configure:4381: checking size of int" >&5
4381
4382 cat > conftest.$ac_ext <<EOF
4383 #line 4384 "configure"
4384 #include "confdefs.h"
4385 #include <stdio.h>
4386 main()
4387 {
4388   FILE *f=fopen("conftestval", "w");
4389   if (!f) exit(1);
4390   fprintf(f, "%d\n", sizeof(int));
4391   exit(0);
4392 }
4393 EOF
4394 if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4395 then
4396   ac_cv_sizeof_int=`cat conftestval`
4397 else
4398   conftest_rc="$?"
4399   echo "configure: failed program was:" >&5
4400   cat conftest.$ac_ext >&5
4401   rm -fr conftest*
4402   ac_cv_sizeof_int=0
4403 fi
4404 rm -fr conftest*
4405 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4406 { test "$extra_verbose" = "yes" && cat << EOF
4407     Defining SIZEOF_INT = $ac_cv_sizeof_int
4408 EOF
4409 cat >> confdefs.h <<EOF
4410 #define SIZEOF_INT $ac_cv_sizeof_int
4411 EOF
4412 }
4413
4414
4415 echo $ac_n "checking size of long""... $ac_c" 1>&6
4416 echo "configure:4417: checking size of long" >&5
4417
4418 cat > conftest.$ac_ext <<EOF
4419 #line 4420 "configure"
4420 #include "confdefs.h"
4421 #include <stdio.h>
4422 main()
4423 {
4424   FILE *f=fopen("conftestval", "w");
4425   if (!f) exit(1);
4426   fprintf(f, "%d\n", sizeof(long));
4427   exit(0);
4428 }
4429 EOF
4430 if { (eval echo configure:4431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4431 then
4432   ac_cv_sizeof_long=`cat conftestval`
4433 else
4434   conftest_rc="$?"
4435   echo "configure: failed program was:" >&5
4436   cat conftest.$ac_ext >&5
4437   rm -fr conftest*
4438   ac_cv_sizeof_long=0
4439 fi
4440 rm -fr conftest*
4441 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4442 { test "$extra_verbose" = "yes" && cat << EOF
4443     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4444 EOF
4445 cat >> confdefs.h <<EOF
4446 #define SIZEOF_LONG $ac_cv_sizeof_long
4447 EOF
4448 }
4449
4450
4451 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4452 echo "configure:4453: checking size of long long" >&5
4453
4454 cat > conftest.$ac_ext <<EOF
4455 #line 4456 "configure"
4456 #include "confdefs.h"
4457 #include <stdio.h>
4458 main()
4459 {
4460   FILE *f=fopen("conftestval", "w");
4461   if (!f) exit(1);
4462   fprintf(f, "%d\n", sizeof(long long));
4463   exit(0);
4464 }
4465 EOF
4466 if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4467 then
4468   ac_cv_sizeof_long_long=`cat conftestval`
4469 else
4470   conftest_rc="$?"
4471   echo "configure: failed program was:" >&5
4472   cat conftest.$ac_ext >&5
4473   rm -fr conftest*
4474   ac_cv_sizeof_long_long=0
4475 fi
4476 rm -fr conftest*
4477 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4478 { test "$extra_verbose" = "yes" && cat << EOF
4479     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4480 EOF
4481 cat >> confdefs.h <<EOF
4482 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4483 EOF
4484 }
4485
4486
4487 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4488 echo "configure:4489: checking size of void *" >&5
4489
4490 cat > conftest.$ac_ext <<EOF
4491 #line 4492 "configure"
4492 #include "confdefs.h"
4493 #include <stdio.h>
4494 main()
4495 {
4496   FILE *f=fopen("conftestval", "w");
4497   if (!f) exit(1);
4498   fprintf(f, "%d\n", sizeof(void *));
4499   exit(0);
4500 }
4501 EOF
4502 if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4503 then
4504   ac_cv_sizeof_void_p=`cat conftestval`
4505 else
4506   conftest_rc="$?"
4507   echo "configure: failed program was:" >&5
4508   cat conftest.$ac_ext >&5
4509   rm -fr conftest*
4510   ac_cv_sizeof_void_p=0
4511 fi
4512 rm -fr conftest*
4513 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4514 { test "$extra_verbose" = "yes" && cat << EOF
4515     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4516 EOF
4517 cat >> confdefs.h <<EOF
4518 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4519 EOF
4520 }
4521
4522
4523
4524 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4525 echo "configure:4526: checking for long file names" >&5
4526
4527 ac_cv_sys_long_file_names=yes
4528 # Test for long file names in all the places we know might matter:
4529 #      .                the current directory, where building will happen
4530 #      $prefix/lib      where we will be installing things
4531 #      $exec_prefix/lib likewise
4532 # eval it to expand exec_prefix.
4533 #      $TMPDIR          if set, where it might want to write temporary files
4534 # if $TMPDIR is not set:
4535 #      /tmp             where it might want to write temporary files
4536 #      /var/tmp         likewise
4537 #      /usr/tmp         likewise
4538 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4539   ac_tmpdirs="$TMPDIR"
4540 else
4541   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4542 fi
4543 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4544   test -d $ac_dir || continue
4545   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4546   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4547   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4548   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4549   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4550     ac_cv_sys_long_file_names=no
4551     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4552     break
4553   fi
4554   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4555 done
4556
4557 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4558 if test $ac_cv_sys_long_file_names = yes; then
4559   { test "$extra_verbose" = "yes" && cat << \EOF
4560     Defining HAVE_LONG_FILE_NAMES
4561 EOF
4562 cat >> confdefs.h <<\EOF
4563 #define HAVE_LONG_FILE_NAMES 1
4564 EOF
4565 }
4566
4567 fi
4568
4569
4570 echo $ac_n "checking for sin""... $ac_c" 1>&6
4571 echo "configure:4572: checking for sin" >&5
4572
4573 cat > conftest.$ac_ext <<EOF
4574 #line 4575 "configure"
4575 #include "confdefs.h"
4576 /* System header to define __stub macros and hopefully few prototypes,
4577     which can conflict with char sin(); below.  */
4578 #include <assert.h>
4579 /* Override any gcc2 internal prototype to avoid an error.  */
4580 /* We use char because int might match the return type of a gcc2
4581     builtin and then its argument prototype would still apply.  */
4582 char sin();
4583
4584 int main() {
4585
4586 /* The GNU C library defines this for functions which it implements
4587     to always fail with ENOSYS.  Some functions are actually named
4588     something starting with __ and the normal name is an alias.  */
4589 #if defined (__stub_sin) || defined (__stub___sin)
4590 choke me
4591 #else
4592 sin();
4593 #endif
4594
4595 ; return 0; }
4596 EOF
4597 if { (eval echo configure:4598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4598   rm -rf conftest*
4599   eval "ac_cv_func_sin=yes"
4600 else
4601   echo "configure: failed program was:" >&5
4602   cat conftest.$ac_ext >&5
4603   rm -rf conftest*
4604   eval "ac_cv_func_sin=no"
4605 fi
4606 rm -f conftest*
4607
4608 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4609   echo "$ac_t""yes" 1>&6
4610   :
4611 else
4612   echo "$ac_t""no" 1>&6
4613
4614 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4615 echo "configure:4616: checking for sin in -lm" >&5
4616 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4617
4618 xe_check_libs=" -lm "
4619 cat > conftest.$ac_ext <<EOF
4620 #line 4621 "configure"
4621 #include "confdefs.h"
4622 /* Override any gcc2 internal prototype to avoid an error.  */
4623 /* We use char because int might match the return type of a gcc2
4624     builtin and then its argument prototype would still apply.  */
4625 char sin();
4626
4627 int main() {
4628 sin()
4629 ; return 0; }
4630 EOF
4631 if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4632   rm -rf conftest*
4633   eval "ac_cv_lib_$ac_lib_var=yes"
4634 else
4635   echo "configure: failed program was:" >&5
4636   cat conftest.$ac_ext >&5
4637   rm -rf conftest*
4638   eval "ac_cv_lib_$ac_lib_var=no"
4639 fi
4640 rm -f conftest*
4641 xe_check_libs=""
4642
4643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4644   echo "$ac_t""yes" 1>&6
4645     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4646     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4647   { test "$extra_verbose" = "yes" && cat << EOF
4648     Defining $ac_tr_lib
4649 EOF
4650 cat >> confdefs.h <<EOF
4651 #define $ac_tr_lib 1
4652 EOF
4653 }
4654
4655   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4656
4657 else
4658   echo "$ac_t""no" 1>&6
4659 fi
4660
4661
4662 fi
4663
4664
4665 { test "$extra_verbose" = "yes" && cat << \EOF
4666     Defining LISP_FLOAT_TYPE
4667 EOF
4668 cat >> confdefs.h <<\EOF
4669 #define LISP_FLOAT_TYPE 1
4670 EOF
4671 }
4672
4673
4674 cat > conftest.$ac_ext <<EOF
4675 #line 4676 "configure"
4676 #include "confdefs.h"
4677 #include <math.h>
4678 int main() {
4679 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4680 ; return 0; }
4681 EOF
4682 if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4683   rm -rf conftest*
4684   { test "$extra_verbose" = "yes" && cat << \EOF
4685     Defining HAVE_INVERSE_HYPERBOLIC
4686 EOF
4687 cat >> confdefs.h <<\EOF
4688 #define HAVE_INVERSE_HYPERBOLIC 1
4689 EOF
4690 }
4691
4692 else
4693   echo "configure: failed program was:" >&5
4694   cat conftest.$ac_ext >&5
4695 fi
4696 rm -f conftest*
4697
4698 echo "checking type of mail spool file locking" 1>&6
4699 echo "configure:4700: checking type of mail spool file locking" >&5
4700 for ac_func in lockf flock
4701 do
4702 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4703 echo "configure:4704: checking for $ac_func" >&5
4704
4705 cat > conftest.$ac_ext <<EOF
4706 #line 4707 "configure"
4707 #include "confdefs.h"
4708 /* System header to define __stub macros and hopefully few prototypes,
4709     which can conflict with char $ac_func(); below.  */
4710 #include <assert.h>
4711 /* Override any gcc2 internal prototype to avoid an error.  */
4712 /* We use char because int might match the return type of a gcc2
4713     builtin and then its argument prototype would still apply.  */
4714 char $ac_func();
4715
4716 int main() {
4717
4718 /* The GNU C library defines this for functions which it implements
4719     to always fail with ENOSYS.  Some functions are actually named
4720     something starting with __ and the normal name is an alias.  */
4721 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4722 choke me
4723 #else
4724 $ac_func();
4725 #endif
4726
4727 ; return 0; }
4728 EOF
4729 if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4730   rm -rf conftest*
4731   eval "ac_cv_func_$ac_func=yes"
4732 else
4733   echo "configure: failed program was:" >&5
4734   cat conftest.$ac_ext >&5
4735   rm -rf conftest*
4736   eval "ac_cv_func_$ac_func=no"
4737 fi
4738 rm -f conftest*
4739
4740 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4741   echo "$ac_t""yes" 1>&6
4742     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4743   { test "$extra_verbose" = "yes" && cat << EOF
4744     Defining $ac_tr_func
4745 EOF
4746 cat >> confdefs.h <<EOF
4747 #define $ac_tr_func 1
4748 EOF
4749 }
4750  
4751 else
4752   echo "$ac_t""no" 1>&6
4753 fi
4754 done
4755
4756 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4757 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4758 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4759 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4760     Defining MAIL_LOCK_LOCKF
4761 EOF
4762 cat >> confdefs.h <<\EOF
4763 #define MAIL_LOCK_LOCKF 1
4764 EOF
4765 }
4766
4767 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4768     Defining MAIL_LOCK_FLOCK
4769 EOF
4770 cat >> confdefs.h <<\EOF
4771 #define MAIL_LOCK_FLOCK 1
4772 EOF
4773 }
4774
4775 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4776     Defining MAIL_LOCK_LOCKING
4777 EOF
4778 cat >> confdefs.h <<\EOF
4779 #define MAIL_LOCK_LOCKING 1
4780 EOF
4781 }
4782
4783 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4784     Defining MAIL_LOCK_DOT
4785 EOF
4786 cat >> confdefs.h <<\EOF
4787 #define MAIL_LOCK_DOT 1
4788 EOF
4789 }
4790
4791 fi
4792 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4793   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4794 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4795   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4796 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4797   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4798
4799 case "$opsys" in decosf*)
4800   
4801 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4802 echo "configure:4803: checking for cma_open in -lpthreads" >&5
4803 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4804
4805 xe_check_libs=" -lpthreads "
4806 cat > conftest.$ac_ext <<EOF
4807 #line 4808 "configure"
4808 #include "confdefs.h"
4809 /* Override any gcc2 internal prototype to avoid an error.  */
4810 /* We use char because int might match the return type of a gcc2
4811     builtin and then its argument prototype would still apply.  */
4812 char cma_open();
4813
4814 int main() {
4815 cma_open()
4816 ; return 0; }
4817 EOF
4818 if { (eval echo configure:4819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4819   rm -rf conftest*
4820   eval "ac_cv_lib_$ac_lib_var=yes"
4821 else
4822   echo "configure: failed program was:" >&5
4823   cat conftest.$ac_ext >&5
4824   rm -rf conftest*
4825   eval "ac_cv_lib_$ac_lib_var=no"
4826 fi
4827 rm -f conftest*
4828 xe_check_libs=""
4829
4830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4831   echo "$ac_t""yes" 1>&6
4832     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4833     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4834   { test "$extra_verbose" = "yes" && cat << EOF
4835     Defining $ac_tr_lib
4836 EOF
4837 cat >> confdefs.h <<EOF
4838 #define $ac_tr_lib 1
4839 EOF
4840 }
4841
4842   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4843
4844 else
4845   echo "$ac_t""no" 1>&6
4846 fi
4847
4848
4849   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4850     c_switch_site="$c_switch_site -threads" ;;
4851 esac
4852
4853 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4854 echo "configure:4855: checking whether the -xildoff compiler flag is required" >&5
4855 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4856   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4857     then echo "$ac_t""no" 1>&6;
4858     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
4859   fi
4860   else echo "$ac_t""no" 1>&6
4861 fi
4862
4863 if test "$opsys" = "sol2"; then
4864   if test "$os_release" -ge 56; then
4865     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4866 echo "configure:4867: checking for \"-z ignore\" linker flag" >&5
4867     case "`ld -h 2>&1`" in
4868       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4869         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4870       *) echo "$ac_t""no" 1>&6 ;;
4871     esac
4872   fi
4873 fi
4874
4875
4876 echo "checking "for specified window system"" 1>&6
4877 echo "configure:4878: checking "for specified window system"" >&5
4878
4879 if test "$with_x11" != "no"; then
4880     test "$x_includes $x_libraries" != "NONE NONE" && \
4881    window_system=x11 with_x11=yes
4882
4883         
4884       if test "$x_includes $x_libraries" = "NONE NONE" \
4885     -a -n "$OPENWINHOME" \
4886     -a "$OPENWINHOME" != "/usr/openwin" \
4887     -a -d "$OPENWINHOME"; then
4888       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4889       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4890       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4891   fi
4892
4893   if test "$x_includes" = "NONE"; then
4894                     for dir in "/usr/X11" "/usr/X11R6"; do
4895       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4896     done
4897   fi
4898
4899   if test "$x_libraries" = "NONE"; then
4900     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4901       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4902     done
4903   fi
4904
4905   # If we find X, set shell vars x_includes and x_libraries to the
4906 # paths, otherwise set no_x=yes.
4907 # Uses ac_ vars as temps to allow command line to override cache and checks.
4908 # --without-x overrides everything else, but does not touch the cache.
4909 echo $ac_n "checking for X""... $ac_c" 1>&6
4910 echo "configure:4911: checking for X" >&5
4911
4912 # Check whether --with-x or --without-x was given.
4913 if test "${with_x+set}" = set; then
4914   withval="$with_x"
4915   :
4916 fi
4917
4918 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4919 if test "x$with_x" = xno; then
4920   # The user explicitly disabled X.
4921   have_x=disabled
4922 else
4923   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4924     # Both variables are already set.
4925     have_x=yes
4926   else
4927
4928 # One or both of the vars are not set, and there is no cached value.
4929 ac_x_includes=NO ac_x_libraries=NO
4930 rm -fr conftestdir
4931 if mkdir conftestdir; then
4932   cd conftestdir
4933   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4934   cat > Imakefile <<'EOF'
4935 acfindx:
4936         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4937 EOF
4938   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4939     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4940     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4941     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4942     for ac_extension in a so sl; do
4943       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4944         test -f $ac_im_libdir/libX11.$ac_extension; then
4945         ac_im_usrlibdir=$ac_im_libdir; break
4946       fi
4947     done
4948     # Screen out bogus values from the imake configuration.  They are
4949     # bogus both because they are the default anyway, and because
4950     # using them would break gcc on systems where it needs fixed includes.
4951     case "$ac_im_incroot" in
4952         /usr/include) ;;
4953         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4954     esac
4955     case "$ac_im_usrlibdir" in
4956         /usr/lib | /lib) ;;
4957         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4958     esac
4959   fi
4960   cd ..
4961   rm -fr conftestdir
4962 fi
4963
4964 if test "$ac_x_includes" = NO; then
4965   # Guess where to find include files, by looking for this one X11 .h file.
4966   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4967
4968   # First, try using that file with no special directory specified.
4969 cat > conftest.$ac_ext <<EOF
4970 #line 4971 "configure"
4971 #include "confdefs.h"
4972 #include <$x_direct_test_include>
4973 EOF
4974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4975 { (eval echo configure:4976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4976 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4977 if test -z "$ac_err"; then
4978   rm -rf conftest*
4979   # We can compile using X headers with no special include directory.
4980 ac_x_includes=
4981 else
4982   echo "$ac_err" >&5
4983   echo "configure: failed program was:" >&5
4984   cat conftest.$ac_ext >&5
4985   rm -rf conftest*
4986   # Look for the header file in a standard set of common directories.
4987 # Check X11 before X11Rn because it is often a symlink to the current release.
4988   for ac_dir in               \
4989     /usr/X11/include          \
4990     /usr/X11R6/include        \
4991     /usr/X11R5/include        \
4992     /usr/X11R4/include        \
4993                               \
4994     /usr/include/X11          \
4995     /usr/include/X11R6        \
4996     /usr/include/X11R5        \
4997     /usr/include/X11R4        \
4998                               \
4999     /usr/local/X11/include    \
5000     /usr/local/X11R6/include  \
5001     /usr/local/X11R5/include  \
5002     /usr/local/X11R4/include  \
5003                               \
5004     /usr/local/include/X11    \
5005     /usr/local/include/X11R6  \
5006     /usr/local/include/X11R5  \
5007     /usr/local/include/X11R4  \
5008                               \
5009     /usr/X386/include         \
5010     /usr/x386/include         \
5011     /usr/XFree86/include/X11  \
5012                               \
5013     /usr/include              \
5014     /usr/local/include        \
5015     /usr/unsupported/include  \
5016     /usr/athena/include       \
5017     /usr/local/x11r5/include  \
5018     /usr/lpp/Xamples/include  \
5019                               \
5020     /usr/openwin/include      \
5021     /usr/openwin/share/include \
5022     ; \
5023   do
5024     if test -r "$ac_dir/$x_direct_test_include"; then
5025       ac_x_includes=$ac_dir
5026       break
5027     fi
5028   done
5029 fi
5030 rm -f conftest*
5031 fi # $ac_x_includes = NO
5032
5033 if test "$ac_x_libraries" = NO; then
5034   # Check for the libraries.
5035
5036   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5037   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5038
5039   # See if we find them without any special options.
5040   # Don't add to $LIBS permanently.
5041   ac_save_LIBS="$LIBS"
5042   LIBS="-l$x_direct_test_library $LIBS"
5043 cat > conftest.$ac_ext <<EOF
5044 #line 5045 "configure"
5045 #include "confdefs.h"
5046
5047 int main() {
5048 ${x_direct_test_function}()
5049 ; return 0; }
5050 EOF
5051 if { (eval echo configure:5052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5052   rm -rf conftest*
5053   LIBS="$ac_save_LIBS"
5054 # We can link X programs with no special library path.
5055 ac_x_libraries=
5056 else
5057   echo "configure: failed program was:" >&5
5058   cat conftest.$ac_ext >&5
5059   rm -rf conftest*
5060   LIBS="$ac_save_LIBS"
5061 # First see if replacing the include by lib works.
5062 # Check X11 before X11Rn because it is often a symlink to the current release.
5063 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5064     /usr/X11/lib          \
5065     /usr/X11R6/lib        \
5066     /usr/X11R5/lib        \
5067     /usr/X11R4/lib        \
5068                           \
5069     /usr/lib/X11          \
5070     /usr/lib/X11R6        \
5071     /usr/lib/X11R5        \
5072     /usr/lib/X11R4        \
5073                           \
5074     /usr/local/X11/lib    \
5075     /usr/local/X11R6/lib  \
5076     /usr/local/X11R5/lib  \
5077     /usr/local/X11R4/lib  \
5078                           \
5079     /usr/local/lib/X11    \
5080     /usr/local/lib/X11R6  \
5081     /usr/local/lib/X11R5  \
5082     /usr/local/lib/X11R4  \
5083                           \
5084     /usr/X386/lib         \
5085     /usr/x386/lib         \
5086     /usr/XFree86/lib/X11  \
5087                           \
5088     /usr/lib              \
5089     /usr/local/lib        \
5090     /usr/unsupported/lib  \
5091     /usr/athena/lib       \
5092     /usr/local/x11r5/lib  \
5093     /usr/lpp/Xamples/lib  \
5094     /lib/usr/lib/X11      \
5095                           \
5096     /usr/openwin/lib      \
5097     /usr/openwin/share/lib \
5098     ; \
5099 do
5100   for ac_extension in a so sl; do
5101     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5102       ac_x_libraries=$ac_dir
5103       break 2
5104     fi
5105   done
5106 done
5107 fi
5108 rm -f conftest*
5109 fi # $ac_x_libraries = NO
5110
5111 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5112   # Didn't find X anywhere.  Cache the known absence of X.
5113   ac_cv_have_x="have_x=no"
5114 else
5115   # Record where we found X for the cache.
5116   ac_cv_have_x="have_x=yes \
5117                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5118 fi
5119   fi
5120   eval "$ac_cv_have_x"
5121 fi # $with_x != no
5122
5123 if test "$have_x" != yes; then
5124   echo "$ac_t""$have_x" 1>&6
5125   no_x=yes
5126 else
5127   # If each of the values was on the command line, it overrides each guess.
5128   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5129   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5130   # Update the cache value to reflect the command line values.
5131   ac_cv_have_x="have_x=yes \
5132                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5133   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5134 fi
5135
5136 if test "$no_x" = yes; then
5137   # Not all programs may use this symbol, but it does not hurt to define it.
5138   { test "$extra_verbose" = "yes" && cat << \EOF
5139     Defining X_DISPLAY_MISSING
5140 EOF
5141 cat >> confdefs.h <<\EOF
5142 #define X_DISPLAY_MISSING 1
5143 EOF
5144 }
5145
5146   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5147 else
5148   if test -n "$x_includes"; then
5149     X_CFLAGS="$X_CFLAGS -I$x_includes"
5150   fi
5151
5152   # It would also be nice to do this for all -L options, not just this one.
5153   if test -n "$x_libraries"; then
5154     X_LIBS="$X_LIBS -L$x_libraries"
5155     # For Solaris; some versions of Sun CC require a space after -R and
5156     # others require no space.  Words are not sufficient . . . .
5157     case "`(uname -sr) 2>/dev/null`" in
5158     "SunOS 5"*)
5159       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5160 echo "configure:5161: checking whether -R must be followed by a space" >&5
5161       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5162       cat > conftest.$ac_ext <<EOF
5163 #line 5164 "configure"
5164 #include "confdefs.h"
5165
5166 int main() {
5167
5168 ; return 0; }
5169 EOF
5170 if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5171   rm -rf conftest*
5172   ac_R_nospace=yes
5173 else
5174   echo "configure: failed program was:" >&5
5175   cat conftest.$ac_ext >&5
5176   rm -rf conftest*
5177   ac_R_nospace=no
5178 fi
5179 rm -f conftest*
5180       if test $ac_R_nospace = yes; then
5181         echo "$ac_t""no" 1>&6
5182         X_LIBS="$X_LIBS -R$x_libraries"
5183       else
5184         LIBS="$ac_xsave_LIBS -R $x_libraries"
5185         cat > conftest.$ac_ext <<EOF
5186 #line 5187 "configure"
5187 #include "confdefs.h"
5188
5189 int main() {
5190
5191 ; return 0; }
5192 EOF
5193 if { (eval echo configure:5194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5194   rm -rf conftest*
5195   ac_R_space=yes
5196 else
5197   echo "configure: failed program was:" >&5
5198   cat conftest.$ac_ext >&5
5199   rm -rf conftest*
5200   ac_R_space=no
5201 fi
5202 rm -f conftest*
5203         if test $ac_R_space = yes; then
5204           echo "$ac_t""yes" 1>&6
5205           X_LIBS="$X_LIBS -R $x_libraries"
5206         else
5207           echo "$ac_t""neither works" 1>&6
5208         fi
5209       fi
5210       LIBS="$ac_xsave_LIBS"
5211     esac
5212   fi
5213
5214   # Check for system-dependent libraries X programs must link with.
5215   # Do this before checking for the system-independent R6 libraries
5216   # (-lICE), since we may need -lsocket or whatever for X linking.
5217
5218   if test "$ISC" = yes; then
5219     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5220   else
5221     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5222     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5223     # the Alpha needs dnet_stub (dnet does not exist).
5224     if test "$with_dnet" = "no" ; then
5225 ac_cv_lib_dnet_dnet_ntoa=no
5226 else
5227
5228 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5229 echo "configure:5230: checking for dnet_ntoa in -ldnet" >&5
5230 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5231
5232 xe_check_libs=" -ldnet "
5233 cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236 /* Override any gcc2 internal prototype to avoid an error.  */
5237 /* We use char because int might match the return type of a gcc2
5238     builtin and then its argument prototype would still apply.  */
5239 char dnet_ntoa();
5240
5241 int main() {
5242 dnet_ntoa()
5243 ; return 0; }
5244 EOF
5245 if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5246   rm -rf conftest*
5247   eval "ac_cv_lib_$ac_lib_var=yes"
5248 else
5249   echo "configure: failed program was:" >&5
5250   cat conftest.$ac_ext >&5
5251   rm -rf conftest*
5252   eval "ac_cv_lib_$ac_lib_var=no"
5253 fi
5254 rm -f conftest*
5255 xe_check_libs=""
5256
5257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5258   echo "$ac_t""yes" 1>&6
5259   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5260 else
5261   echo "$ac_t""no" 1>&6
5262 fi
5263
5264 fi
5265
5266     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5267       
5268 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5269 echo "configure:5270: checking for dnet_ntoa in -ldnet_stub" >&5
5270 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5271
5272 xe_check_libs=" -ldnet_stub "
5273 cat > conftest.$ac_ext <<EOF
5274 #line 5275 "configure"
5275 #include "confdefs.h"
5276 /* Override any gcc2 internal prototype to avoid an error.  */
5277 /* We use char because int might match the return type of a gcc2
5278     builtin and then its argument prototype would still apply.  */
5279 char dnet_ntoa();
5280
5281 int main() {
5282 dnet_ntoa()
5283 ; return 0; }
5284 EOF
5285 if { (eval echo configure:5286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5286   rm -rf conftest*
5287   eval "ac_cv_lib_$ac_lib_var=yes"
5288 else
5289   echo "configure: failed program was:" >&5
5290   cat conftest.$ac_ext >&5
5291   rm -rf conftest*
5292   eval "ac_cv_lib_$ac_lib_var=no"
5293 fi
5294 rm -f conftest*
5295 xe_check_libs=""
5296
5297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5298   echo "$ac_t""yes" 1>&6
5299   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5300 else
5301   echo "$ac_t""no" 1>&6
5302 fi
5303
5304
5305     fi
5306
5307     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5308     # to get the SysV transport functions.
5309     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5310     # needs -lnsl.
5311     # The nsl library prevents programs from opening the X display
5312     # on Irix 5.2, according to dickey@clark.net.
5313     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5314 echo "configure:5315: checking for gethostbyname" >&5
5315
5316 cat > conftest.$ac_ext <<EOF
5317 #line 5318 "configure"
5318 #include "confdefs.h"
5319 /* System header to define __stub macros and hopefully few prototypes,
5320     which can conflict with char gethostbyname(); below.  */
5321 #include <assert.h>
5322 /* Override any gcc2 internal prototype to avoid an error.  */
5323 /* We use char because int might match the return type of a gcc2
5324     builtin and then its argument prototype would still apply.  */
5325 char gethostbyname();
5326
5327 int main() {
5328
5329 /* The GNU C library defines this for functions which it implements
5330     to always fail with ENOSYS.  Some functions are actually named
5331     something starting with __ and the normal name is an alias.  */
5332 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5333 choke me
5334 #else
5335 gethostbyname();
5336 #endif
5337
5338 ; return 0; }
5339 EOF
5340 if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5341   rm -rf conftest*
5342   eval "ac_cv_func_gethostbyname=yes"
5343 else
5344   echo "configure: failed program was:" >&5
5345   cat conftest.$ac_ext >&5
5346   rm -rf conftest*
5347   eval "ac_cv_func_gethostbyname=no"
5348 fi
5349 rm -f conftest*
5350
5351 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5352   echo "$ac_t""yes" 1>&6
5353   :
5354 else
5355   echo "$ac_t""no" 1>&6
5356 fi
5357
5358     if test $ac_cv_func_gethostbyname = no; then
5359       
5360 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5361 echo "configure:5362: checking for gethostbyname in -lnsl" >&5
5362 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5363
5364 xe_check_libs=" -lnsl "
5365 cat > conftest.$ac_ext <<EOF
5366 #line 5367 "configure"
5367 #include "confdefs.h"
5368 /* Override any gcc2 internal prototype to avoid an error.  */
5369 /* We use char because int might match the return type of a gcc2
5370     builtin and then its argument prototype would still apply.  */
5371 char gethostbyname();
5372
5373 int main() {
5374 gethostbyname()
5375 ; return 0; }
5376 EOF
5377 if { (eval echo configure:5378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5378   rm -rf conftest*
5379   eval "ac_cv_lib_$ac_lib_var=yes"
5380 else
5381   echo "configure: failed program was:" >&5
5382   cat conftest.$ac_ext >&5
5383   rm -rf conftest*
5384   eval "ac_cv_lib_$ac_lib_var=no"
5385 fi
5386 rm -f conftest*
5387 xe_check_libs=""
5388
5389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5390   echo "$ac_t""yes" 1>&6
5391   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5392 else
5393   echo "$ac_t""no" 1>&6
5394 fi
5395
5396
5397     fi
5398
5399     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5400     # socket/setsockopt and other routines are undefined under SCO ODT
5401     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5402     # on later versions), says simon@lia.di.epfl.ch: it contains
5403     # gethostby* variants that don't use the nameserver (or something).
5404     # -lsocket must be given before -lnsl if both are needed.
5405     # We assume that if connect needs -lnsl, so does gethostbyname.
5406     echo $ac_n "checking for connect""... $ac_c" 1>&6
5407 echo "configure:5408: checking for connect" >&5
5408
5409 cat > conftest.$ac_ext <<EOF
5410 #line 5411 "configure"
5411 #include "confdefs.h"
5412 /* System header to define __stub macros and hopefully few prototypes,
5413     which can conflict with char connect(); below.  */
5414 #include <assert.h>
5415 /* Override any gcc2 internal prototype to avoid an error.  */
5416 /* We use char because int might match the return type of a gcc2
5417     builtin and then its argument prototype would still apply.  */
5418 char connect();
5419
5420 int main() {
5421
5422 /* The GNU C library defines this for functions which it implements
5423     to always fail with ENOSYS.  Some functions are actually named
5424     something starting with __ and the normal name is an alias.  */
5425 #if defined (__stub_connect) || defined (__stub___connect)
5426 choke me
5427 #else
5428 connect();
5429 #endif
5430
5431 ; return 0; }
5432 EOF
5433 if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5434   rm -rf conftest*
5435   eval "ac_cv_func_connect=yes"
5436 else
5437   echo "configure: failed program was:" >&5
5438   cat conftest.$ac_ext >&5
5439   rm -rf conftest*
5440   eval "ac_cv_func_connect=no"
5441 fi
5442 rm -f conftest*
5443
5444 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5445   echo "$ac_t""yes" 1>&6
5446   :
5447 else
5448   echo "$ac_t""no" 1>&6
5449 fi
5450
5451     if test $ac_cv_func_connect = no; then
5452       
5453 xe_msg_checking="for connect in -lsocket"
5454 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5455 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5456 echo "configure:5457: checking "$xe_msg_checking"" >&5
5457 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5458
5459 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5460 cat > conftest.$ac_ext <<EOF
5461 #line 5462 "configure"
5462 #include "confdefs.h"
5463 /* Override any gcc2 internal prototype to avoid an error.  */
5464 /* We use char because int might match the return type of a gcc2
5465     builtin and then its argument prototype would still apply.  */
5466 char connect();
5467
5468 int main() {
5469 connect()
5470 ; return 0; }
5471 EOF
5472 if { (eval echo configure:5473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5473   rm -rf conftest*
5474   eval "ac_cv_lib_$ac_lib_var=yes"
5475 else
5476   echo "configure: failed program was:" >&5
5477   cat conftest.$ac_ext >&5
5478   rm -rf conftest*
5479   eval "ac_cv_lib_$ac_lib_var=no"
5480 fi
5481 rm -f conftest*
5482 xe_check_libs=""
5483
5484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5485   echo "$ac_t""yes" 1>&6
5486   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5487 else
5488   echo "$ac_t""no" 1>&6
5489 fi
5490
5491
5492     fi
5493
5494     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5495     echo $ac_n "checking for remove""... $ac_c" 1>&6
5496 echo "configure:5497: checking for remove" >&5
5497
5498 cat > conftest.$ac_ext <<EOF
5499 #line 5500 "configure"
5500 #include "confdefs.h"
5501 /* System header to define __stub macros and hopefully few prototypes,
5502     which can conflict with char remove(); below.  */
5503 #include <assert.h>
5504 /* Override any gcc2 internal prototype to avoid an error.  */
5505 /* We use char because int might match the return type of a gcc2
5506     builtin and then its argument prototype would still apply.  */
5507 char remove();
5508
5509 int main() {
5510
5511 /* The GNU C library defines this for functions which it implements
5512     to always fail with ENOSYS.  Some functions are actually named
5513     something starting with __ and the normal name is an alias.  */
5514 #if defined (__stub_remove) || defined (__stub___remove)
5515 choke me
5516 #else
5517 remove();
5518 #endif
5519
5520 ; return 0; }
5521 EOF
5522 if { (eval echo configure:5523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5523   rm -rf conftest*
5524   eval "ac_cv_func_remove=yes"
5525 else
5526   echo "configure: failed program was:" >&5
5527   cat conftest.$ac_ext >&5
5528   rm -rf conftest*
5529   eval "ac_cv_func_remove=no"
5530 fi
5531 rm -f conftest*
5532
5533 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5534   echo "$ac_t""yes" 1>&6
5535   :
5536 else
5537   echo "$ac_t""no" 1>&6
5538 fi
5539
5540     if test $ac_cv_func_remove = no; then
5541       
5542 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5543 echo "configure:5544: checking for remove in -lposix" >&5
5544 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5545
5546 xe_check_libs=" -lposix "
5547 cat > conftest.$ac_ext <<EOF
5548 #line 5549 "configure"
5549 #include "confdefs.h"
5550 /* Override any gcc2 internal prototype to avoid an error.  */
5551 /* We use char because int might match the return type of a gcc2
5552     builtin and then its argument prototype would still apply.  */
5553 char remove();
5554
5555 int main() {
5556 remove()
5557 ; return 0; }
5558 EOF
5559 if { (eval echo configure:5560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5560   rm -rf conftest*
5561   eval "ac_cv_lib_$ac_lib_var=yes"
5562 else
5563   echo "configure: failed program was:" >&5
5564   cat conftest.$ac_ext >&5
5565   rm -rf conftest*
5566   eval "ac_cv_lib_$ac_lib_var=no"
5567 fi
5568 rm -f conftest*
5569 xe_check_libs=""
5570
5571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5572   echo "$ac_t""yes" 1>&6
5573   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5574 else
5575   echo "$ac_t""no" 1>&6
5576 fi
5577
5578
5579     fi
5580
5581     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5582     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5583 echo "configure:5584: checking for shmat" >&5
5584
5585 cat > conftest.$ac_ext <<EOF
5586 #line 5587 "configure"
5587 #include "confdefs.h"
5588 /* System header to define __stub macros and hopefully few prototypes,
5589     which can conflict with char shmat(); below.  */
5590 #include <assert.h>
5591 /* Override any gcc2 internal prototype to avoid an error.  */
5592 /* We use char because int might match the return type of a gcc2
5593     builtin and then its argument prototype would still apply.  */
5594 char shmat();
5595
5596 int main() {
5597
5598 /* The GNU C library defines this for functions which it implements
5599     to always fail with ENOSYS.  Some functions are actually named
5600     something starting with __ and the normal name is an alias.  */
5601 #if defined (__stub_shmat) || defined (__stub___shmat)
5602 choke me
5603 #else
5604 shmat();
5605 #endif
5606
5607 ; return 0; }
5608 EOF
5609 if { (eval echo configure:5610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5610   rm -rf conftest*
5611   eval "ac_cv_func_shmat=yes"
5612 else
5613   echo "configure: failed program was:" >&5
5614   cat conftest.$ac_ext >&5
5615   rm -rf conftest*
5616   eval "ac_cv_func_shmat=no"
5617 fi
5618 rm -f conftest*
5619
5620 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5621   echo "$ac_t""yes" 1>&6
5622   :
5623 else
5624   echo "$ac_t""no" 1>&6
5625 fi
5626
5627     if test $ac_cv_func_shmat = no; then
5628       
5629 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5630 echo "configure:5631: checking for shmat in -lipc" >&5
5631 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5632
5633 xe_check_libs=" -lipc "
5634 cat > conftest.$ac_ext <<EOF
5635 #line 5636 "configure"
5636 #include "confdefs.h"
5637 /* Override any gcc2 internal prototype to avoid an error.  */
5638 /* We use char because int might match the return type of a gcc2
5639     builtin and then its argument prototype would still apply.  */
5640 char shmat();
5641
5642 int main() {
5643 shmat()
5644 ; return 0; }
5645 EOF
5646 if { (eval echo configure:5647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5647   rm -rf conftest*
5648   eval "ac_cv_lib_$ac_lib_var=yes"
5649 else
5650   echo "configure: failed program was:" >&5
5651   cat conftest.$ac_ext >&5
5652   rm -rf conftest*
5653   eval "ac_cv_lib_$ac_lib_var=no"
5654 fi
5655 rm -f conftest*
5656 xe_check_libs=""
5657
5658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5659   echo "$ac_t""yes" 1>&6
5660   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5661 else
5662   echo "$ac_t""no" 1>&6
5663 fi
5664
5665
5666     fi
5667   fi
5668
5669   # Check for libraries that X11R6 Xt/Xaw programs need.
5670   ac_save_LDFLAGS="$LDFLAGS"
5671   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5672   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5673   # check for ICE first), but we must link in the order -lSM -lICE or
5674   # we get undefined symbols.  So assume we have SM if we have ICE.
5675   # These have to be linked with before -lX11, unlike the other
5676   # libraries we check for below, so use a different variable.
5677   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5678   
5679 xe_msg_checking="for IceConnectionNumber in -lICE"
5680 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5681 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5682 echo "configure:5683: checking "$xe_msg_checking"" >&5
5683 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5684
5685 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5686 cat > conftest.$ac_ext <<EOF
5687 #line 5688 "configure"
5688 #include "confdefs.h"
5689 /* Override any gcc2 internal prototype to avoid an error.  */
5690 /* We use char because int might match the return type of a gcc2
5691     builtin and then its argument prototype would still apply.  */
5692 char IceConnectionNumber();
5693
5694 int main() {
5695 IceConnectionNumber()
5696 ; return 0; }
5697 EOF
5698 if { (eval echo configure:5699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5699   rm -rf conftest*
5700   eval "ac_cv_lib_$ac_lib_var=yes"
5701 else
5702   echo "configure: failed program was:" >&5
5703   cat conftest.$ac_ext >&5
5704   rm -rf conftest*
5705   eval "ac_cv_lib_$ac_lib_var=no"
5706 fi
5707 rm -f conftest*
5708 xe_check_libs=""
5709
5710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5711   echo "$ac_t""yes" 1>&6
5712   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5713 else
5714   echo "$ac_t""no" 1>&6
5715 fi
5716
5717
5718   LDFLAGS="$ac_save_LDFLAGS"
5719
5720 fi
5721  # Autoconf claims to find X library and include dirs for us.
5722   if test "$no_x" = "yes"
5723   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5724   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5725   fi
5726 fi
5727
5728 case "$with_x11" in
5729   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5730   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5731 esac
5732
5733 if test "$with_x11" = "yes"; then
5734   { test "$extra_verbose" = "yes" && cat << \EOF
5735     Defining HAVE_X_WINDOWS
5736 EOF
5737 cat >> confdefs.h <<\EOF
5738 #define HAVE_X_WINDOWS 1
5739 EOF
5740 }
5741
5742   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5743   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5744
5745       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5746     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5747     if test -d "$lib_dir" -a -d "$inc_dir"; then
5748       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5749         x_libraries="$lib_dir $x_libraries"
5750         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5751       esac
5752       case "$x_includes" in "$inc_dir"* ) ;; *)
5753         x_includes="$inc_dir $x_includes"
5754         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5755       esac
5756       break;       fi
5757   done
5758
5759     for rel in "X11R6" "X11R5" "X11R4"; do
5760     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5761     if test -d "$lib_dir" -a -d "$inc_dir"; then
5762       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5763         x_libraries="$x_libraries $lib_dir"
5764         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5765       esac
5766       case "$x_includes" in "$inc_dir"* ) ;; *)
5767         x_includes="$x_includes $inc_dir"
5768         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5769       esac
5770       break;     fi
5771   done
5772
5773     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
5774
5775   ld_switch_x_site="$X_LIBS"
5776
5777   
5778 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5779     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5780   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5781   
5782         runpath="" runpath_dirs=""
5783   if test -n "$LD_RUN_PATH"; then
5784     runpath="$LD_RUN_PATH"
5785   elif test "$GCC" = "yes"; then
5786         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5787     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5788     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5789     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5790       case "$arg" in P,* | -L* | -R* )
5791         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5792           {
5793 xe_runpath_dir="$dir"
5794   test "$xe_runpath_dir" != "/lib"     -a \
5795         "$xe_runpath_dir" != "/usr/lib" -a \
5796         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5797   eval "$xe_add_unique_runpath_dir"
5798 }
5799         done ;;
5800       esac
5801     done
5802     ld_switch_run="$ld_switch_run_save"
5803     rm -f conftest*
5804   else
5805         for arg in $ld_switch_site $ld_switch_x_site; do
5806       case "$arg" in -L*) {
5807 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5808   test "$xe_runpath_dir" != "/lib"     -a \
5809         "$xe_runpath_dir" != "/usr/lib" -a \
5810         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5811   eval "$xe_add_unique_runpath_dir"
5812 };; esac
5813     done
5814         if test "$opsys $need_motif" = "sol2 yes"; then
5815       xe_runpath_dir="/opt/SUNWdt/lib";
5816       eval "$xe_add_unique_runpath_dir";
5817     fi
5818   fi 
5819   if test -n "$runpath"; then
5820     ld_switch_run="${dash_r}${runpath}"
5821     
5822 if test "$GCC" = "yes"; then
5823   set x $ld_switch_run; shift; ld_switch_run=""
5824   while test -n "$1"; do
5825     case $1 in
5826       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5827       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5828       -Xlinker* ) ;;
5829       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5830     esac
5831     shift
5832   done
5833 fi
5834     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5835   fi
5836 fi
5837
5838
5839   if test "$extra_verbose" = "yes"; then
5840     echo; echo "X11 compilation variables:"
5841     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5842     echo
5843   fi
5844
5845             bitmapdirs=
5846   if test "$x_includes" != NONE; then
5847     for i in $x_includes; do
5848       if test -d "$i/bitmaps"; then
5849         bitmapdirs="$i/bitmaps:$bitmapdirs"
5850       fi
5851       if test -d "$i/X11/bitmaps"; then
5852         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5853       fi
5854     done
5855     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5856   fi
5857   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5858     Defining BITMAPDIR = "$bitmapdirs"
5859 EOF
5860 cat >> confdefs.h <<EOF
5861 #define BITMAPDIR "$bitmapdirs"
5862 EOF
5863 }
5864
5865
5866     echo "checking for X defines extracted by xmkmf" 1>&6
5867 echo "configure:5868: checking for X defines extracted by xmkmf" >&5
5868   rm -fr conftestdir
5869   if mkdir conftestdir; then
5870     cd conftestdir
5871     cat > Imakefile <<'EOF'
5872 xetest:
5873         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5874 EOF
5875     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5876       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5877       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5878     fi
5879     cd ..
5880     rm -fr conftestdir
5881     for word in $xmkmf_defines; do
5882       case "$word" in
5883         -D*=* ) ;;
5884         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5885               { test "$extra_verbose" = "yes" && cat << EOF
5886     Defining $word
5887 EOF
5888 cat >> confdefs.h <<EOF
5889 #define $word 1
5890 EOF
5891 }
5892  ;;
5893       esac
5894     done
5895   fi
5896
5897     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5898 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5899 echo "configure:5900: checking for X11/Intrinsic.h" >&5
5900
5901 cat > conftest.$ac_ext <<EOF
5902 #line 5903 "configure"
5903 #include "confdefs.h"
5904 #include <X11/Intrinsic.h>
5905 EOF
5906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5907 { (eval echo configure:5908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5909 if test -z "$ac_err"; then
5910   rm -rf conftest*
5911   eval "ac_cv_header_$ac_safe=yes"
5912 else
5913   echo "$ac_err" >&5
5914   echo "configure: failed program was:" >&5
5915   cat conftest.$ac_ext >&5
5916   rm -rf conftest*
5917   eval "ac_cv_header_$ac_safe=no"
5918 fi
5919 rm -f conftest*
5920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5921   echo "$ac_t""yes" 1>&6
5922   :
5923 else
5924   echo "$ac_t""no" 1>&6
5925 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5926 fi
5927
5928
5929       
5930 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5931 echo "configure:5932: checking for XOpenDisplay in -lX11" >&5
5932 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5933
5934 xe_check_libs=" -lX11 "
5935 cat > conftest.$ac_ext <<EOF
5936 #line 5937 "configure"
5937 #include "confdefs.h"
5938 /* Override any gcc2 internal prototype to avoid an error.  */
5939 /* We use char because int might match the return type of a gcc2
5940     builtin and then its argument prototype would still apply.  */
5941 char XOpenDisplay();
5942
5943 int main() {
5944 XOpenDisplay()
5945 ; return 0; }
5946 EOF
5947 if { (eval echo configure:5948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5948   rm -rf conftest*
5949   eval "ac_cv_lib_$ac_lib_var=yes"
5950 else
5951   echo "configure: failed program was:" >&5
5952   cat conftest.$ac_ext >&5
5953   rm -rf conftest*
5954   eval "ac_cv_lib_$ac_lib_var=no"
5955 fi
5956 rm -f conftest*
5957 xe_check_libs=""
5958
5959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5960   echo "$ac_t""yes" 1>&6
5961   have_lib_x11=yes
5962 else
5963   echo "$ac_t""no" 1>&6
5964 fi
5965
5966
5967   if test "$have_lib_x11" != "yes"; then
5968     
5969 xe_msg_checking="for XGetFontProperty in -lX11"
5970 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5971 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5972 echo "configure:5973: checking "$xe_msg_checking"" >&5
5973 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5974
5975 xe_check_libs=" -lX11 -b i486-linuxaout"
5976 cat > conftest.$ac_ext <<EOF
5977 #line 5978 "configure"
5978 #include "confdefs.h"
5979 /* Override any gcc2 internal prototype to avoid an error.  */
5980 /* We use char because int might match the return type of a gcc2
5981     builtin and then its argument prototype would still apply.  */
5982 char XGetFontProperty();
5983
5984 int main() {
5985 XGetFontProperty()
5986 ; return 0; }
5987 EOF
5988 if { (eval echo configure:5989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5989   rm -rf conftest*
5990   eval "ac_cv_lib_$ac_lib_var=yes"
5991 else
5992   echo "configure: failed program was:" >&5
5993   cat conftest.$ac_ext >&5
5994   rm -rf conftest*
5995   eval "ac_cv_lib_$ac_lib_var=no"
5996 fi
5997 rm -f conftest*
5998 xe_check_libs=""
5999
6000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6001   echo "$ac_t""yes" 1>&6
6002   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6003 else
6004   echo "$ac_t""no" 1>&6
6005 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6006 fi
6007
6008
6009   fi
6010   libs_x="-lX11"
6011   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6012
6013     
6014 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6015 echo "configure:6016: checking for XShapeSelectInput in -lXext" >&5
6016 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6017
6018 xe_check_libs=" -lXext "
6019 cat > conftest.$ac_ext <<EOF
6020 #line 6021 "configure"
6021 #include "confdefs.h"
6022 /* Override any gcc2 internal prototype to avoid an error.  */
6023 /* We use char because int might match the return type of a gcc2
6024     builtin and then its argument prototype would still apply.  */
6025 char XShapeSelectInput();
6026
6027 int main() {
6028 XShapeSelectInput()
6029 ; return 0; }
6030 EOF
6031 if { (eval echo configure:6032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6032   rm -rf conftest*
6033   eval "ac_cv_lib_$ac_lib_var=yes"
6034 else
6035   echo "configure: failed program was:" >&5
6036   cat conftest.$ac_ext >&5
6037   rm -rf conftest*
6038   eval "ac_cv_lib_$ac_lib_var=no"
6039 fi
6040 rm -f conftest*
6041 xe_check_libs=""
6042
6043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6044   echo "$ac_t""yes" 1>&6
6045   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6046 else
6047   echo "$ac_t""no" 1>&6
6048 fi
6049
6050
6051
6052     
6053 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6054 echo "configure:6055: checking for XtOpenDisplay in -lXt" >&5
6055 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6056
6057 xe_check_libs=" -lXt "
6058 cat > conftest.$ac_ext <<EOF
6059 #line 6060 "configure"
6060 #include "confdefs.h"
6061 /* Override any gcc2 internal prototype to avoid an error.  */
6062 /* We use char because int might match the return type of a gcc2
6063     builtin and then its argument prototype would still apply.  */
6064 char XtOpenDisplay();
6065
6066 int main() {
6067 XtOpenDisplay()
6068 ; return 0; }
6069 EOF
6070 if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6071   rm -rf conftest*
6072   eval "ac_cv_lib_$ac_lib_var=yes"
6073 else
6074   echo "configure: failed program was:" >&5
6075   cat conftest.$ac_ext >&5
6076   rm -rf conftest*
6077   eval "ac_cv_lib_$ac_lib_var=no"
6078 fi
6079 rm -f conftest*
6080 xe_check_libs=""
6081
6082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6083   echo "$ac_t""yes" 1>&6
6084   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6085 else
6086   echo "$ac_t""no" 1>&6
6087 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6088 fi
6089
6090
6091
6092   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6093 echo "configure:6094: checking the version of X11 being used" >&5
6094   cat > conftest.$ac_ext <<EOF
6095 #line 6096 "configure"
6096 #include "confdefs.h"
6097 #include <X11/Intrinsic.h>
6098     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6099 EOF
6100 if { (eval echo configure:6101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6101 then
6102   ./conftest foobar; x11_release=$?
6103 else
6104   conftest_rc="$?"
6105   echo "configure: failed program was:" >&5
6106   cat conftest.$ac_ext >&5
6107   rm -fr conftest*
6108   x11_release=4
6109 fi
6110 rm -fr conftest*
6111   echo "$ac_t""R${x11_release}" 1>&6
6112   { test "$extra_verbose" = "yes" && cat << EOF
6113     Defining THIS_IS_X11R${x11_release}
6114 EOF
6115 cat >> confdefs.h <<EOF
6116 #define THIS_IS_X11R${x11_release} 1
6117 EOF
6118 }
6119
6120
6121   for ac_func in XConvertCase
6122 do
6123 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6124 echo "configure:6125: checking for $ac_func" >&5
6125
6126 cat > conftest.$ac_ext <<EOF
6127 #line 6128 "configure"
6128 #include "confdefs.h"
6129 /* System header to define __stub macros and hopefully few prototypes,
6130     which can conflict with char $ac_func(); below.  */
6131 #include <assert.h>
6132 /* Override any gcc2 internal prototype to avoid an error.  */
6133 /* We use char because int might match the return type of a gcc2
6134     builtin and then its argument prototype would still apply.  */
6135 char $ac_func();
6136
6137 int main() {
6138
6139 /* The GNU C library defines this for functions which it implements
6140     to always fail with ENOSYS.  Some functions are actually named
6141     something starting with __ and the normal name is an alias.  */
6142 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6143 choke me
6144 #else
6145 $ac_func();
6146 #endif
6147
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_func_$ac_func=yes"
6153 else
6154   echo "configure: failed program was:" >&5
6155   cat conftest.$ac_ext >&5
6156   rm -rf conftest*
6157   eval "ac_cv_func_$ac_func=no"
6158 fi
6159 rm -f conftest*
6160
6161 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6162   echo "$ac_t""yes" 1>&6
6163     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6164   { test "$extra_verbose" = "yes" && cat << EOF
6165     Defining $ac_tr_func
6166 EOF
6167 cat >> confdefs.h <<EOF
6168 #define $ac_tr_func 1
6169 EOF
6170 }
6171  
6172 else
6173   echo "$ac_t""no" 1>&6
6174 fi
6175 done
6176
6177
6178   for ac_hdr in X11/Xlocale.h
6179 do
6180 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6181 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6182 echo "configure:6183: checking for $ac_hdr" >&5
6183
6184 cat > conftest.$ac_ext <<EOF
6185 #line 6186 "configure"
6186 #include "confdefs.h"
6187 #include <$ac_hdr>
6188 EOF
6189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6190 { (eval echo configure:6191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6192 if test -z "$ac_err"; then
6193   rm -rf conftest*
6194   eval "ac_cv_header_$ac_safe=yes"
6195 else
6196   echo "$ac_err" >&5
6197   echo "configure: failed program was:" >&5
6198   cat conftest.$ac_ext >&5
6199   rm -rf conftest*
6200   eval "ac_cv_header_$ac_safe=no"
6201 fi
6202 rm -f conftest*
6203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6204   echo "$ac_t""yes" 1>&6
6205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6206   { test "$extra_verbose" = "yes" && cat << EOF
6207     Defining $ac_tr_hdr
6208 EOF
6209 cat >> confdefs.h <<EOF
6210 #define $ac_tr_hdr 1
6211 EOF
6212 }
6213  
6214 else
6215   echo "$ac_t""no" 1>&6
6216 fi
6217 done
6218
6219
6220     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6221 echo "configure:6222: checking for XFree86" >&5
6222   if test -d "/usr/X386/include" -o \
6223           -f "/etc/XF86Config"    -o \
6224           -f "/etc/X11/XF86Config" -o \
6225           -f "/usr/X11R6/lib/X11/XF86Config"; then
6226     echo "$ac_t""yes" 1>&6
6227     { test "$extra_verbose" = "yes" && cat << \EOF
6228     Defining HAVE_XFREE386
6229 EOF
6230 cat >> confdefs.h <<\EOF
6231 #define HAVE_XFREE386 1
6232 EOF
6233 }
6234
6235   else
6236     echo "$ac_t""no" 1>&6
6237   fi
6238
6239     test -z "$with_xmu" && { 
6240 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6241 echo "configure:6242: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6242 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6243
6244 xe_check_libs=" -lXmu "
6245 cat > conftest.$ac_ext <<EOF
6246 #line 6247 "configure"
6247 #include "confdefs.h"
6248 /* Override any gcc2 internal prototype to avoid an error.  */
6249 /* We use char because int might match the return type of a gcc2
6250     builtin and then its argument prototype would still apply.  */
6251 char XmuReadBitmapDataFromFile();
6252
6253 int main() {
6254 XmuReadBitmapDataFromFile()
6255 ; return 0; }
6256 EOF
6257 if { (eval echo configure:6258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6258   rm -rf conftest*
6259   eval "ac_cv_lib_$ac_lib_var=yes"
6260 else
6261   echo "configure: failed program was:" >&5
6262   cat conftest.$ac_ext >&5
6263   rm -rf conftest*
6264   eval "ac_cv_lib_$ac_lib_var=no"
6265 fi
6266 rm -f conftest*
6267 xe_check_libs=""
6268
6269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6270   echo "$ac_t""yes" 1>&6
6271   with_xmu=yes
6272 else
6273   echo "$ac_t""no" 1>&6
6274 with_xmu=no
6275 fi
6276
6277  }
6278   if test "$with_xmu" = "no"; then
6279     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6280    echo "    xemacs will be linked with \"xmu.o\""
6281  fi
6282   else
6283     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6284     { test "$extra_verbose" = "yes" && cat << \EOF
6285     Defining HAVE_XMU
6286 EOF
6287 cat >> confdefs.h <<\EOF
6288 #define HAVE_XMU 1
6289 EOF
6290 }
6291
6292   fi
6293
6294       
6295 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6296 echo "configure:6297: checking for main in -lXbsd" >&5
6297 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6298
6299 xe_check_libs=" -lXbsd "
6300 cat > conftest.$ac_ext <<EOF
6301 #line 6302 "configure"
6302 #include "confdefs.h"
6303
6304 int main() {
6305 main()
6306 ; return 0; }
6307 EOF
6308 if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6309   rm -rf conftest*
6310   eval "ac_cv_lib_$ac_lib_var=yes"
6311 else
6312   echo "configure: failed program was:" >&5
6313   cat conftest.$ac_ext >&5
6314   rm -rf conftest*
6315   eval "ac_cv_lib_$ac_lib_var=no"
6316 fi
6317 rm -f conftest*
6318 xe_check_libs=""
6319
6320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6321   echo "$ac_t""yes" 1>&6
6322   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6323 else
6324   echo "$ac_t""no" 1>&6
6325 fi
6326
6327
6328
6329     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6330         if test "$GCC" = "yes"; then
6331       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6332       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6333     else
6334       case "$CC" in
6335         "xlc" ) CC="xlc_r" ;;
6336         "xlC" ) CC="xlC_r" ;;
6337         "cc"  ) CC="cc_r" ;;
6338       esac
6339     fi
6340   fi
6341
6342 fi 
6343 if test "$with_msw" != "no"; then
6344   echo "checking for MS-Windows" 1>&6
6345 echo "configure:6346: checking for MS-Windows" >&5
6346   
6347 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6348 echo "configure:6349: checking for main in -lgdi32" >&5
6349 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6350
6351 xe_check_libs=" -lgdi32 "
6352 cat > conftest.$ac_ext <<EOF
6353 #line 6354 "configure"
6354 #include "confdefs.h"
6355
6356 int main() {
6357 main()
6358 ; return 0; }
6359 EOF
6360 if { (eval echo configure:6361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6361   rm -rf conftest*
6362   eval "ac_cv_lib_$ac_lib_var=yes"
6363 else
6364   echo "configure: failed program was:" >&5
6365   cat conftest.$ac_ext >&5
6366   rm -rf conftest*
6367   eval "ac_cv_lib_$ac_lib_var=no"
6368 fi
6369 rm -f conftest*
6370 xe_check_libs=""
6371
6372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6373   echo "$ac_t""yes" 1>&6
6374   with_msw=yes
6375 else
6376   echo "$ac_t""no" 1>&6
6377 fi
6378
6379
6380   if test "$with_msw" = "yes"; then
6381     { test "$extra_verbose" = "yes" && cat << \EOF
6382     Defining HAVE_MS_WINDOWS
6383 EOF
6384 cat >> confdefs.h <<\EOF
6385 #define HAVE_MS_WINDOWS 1
6386 EOF
6387 }
6388
6389     install_pp="$blddir/lib-src/installexe.sh"
6390     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
6391     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6392     if test "$window_system" != x11; then
6393         window_system=msw
6394         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6395             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6396    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6397  fi
6398         test "$with_menubars"   != "no" && with_menubars=msw \
6399             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6400    echo "    xemacs will be linked with \"menubar-msw.o\""
6401  fi
6402         test "$with_toolbars"   != "no" && with_toolbars=msw \
6403             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6404    echo "    xemacs will be linked with \"toolbar-msw.o\""
6405  fi
6406         test "$with_dialogs"   != "no" && with_dialogs=msw \
6407             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6408    echo "    xemacs will be linked with \"dialog-msw.o\""
6409  fi
6410         test "$with_widgets"   != "no" && with_widgets=msw
6411     else
6412         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6413    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6414  fi
6415         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6416    echo "    xemacs will be linked with \"menubar-msw.o\""
6417  fi
6418         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6419    echo "    xemacs will be linked with \"toolbar-msw.o\""
6420  fi
6421         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6422    echo "    xemacs will be linked with \"dialog-msw.o\""
6423  fi
6424     fi
6425         cat > conftest.$ac_ext <<EOF
6426 #line 6427 "configure"
6427 #include "confdefs.h"
6428 #include <fcntl.h>
6429     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6430 EOF
6431 if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6432 then
6433   { test "$extra_verbose" = "yes" && cat << \EOF
6434     Defining HAVE_MSG_SELECT
6435 EOF
6436 cat >> confdefs.h <<\EOF
6437 #define HAVE_MSG_SELECT 1
6438 EOF
6439 }
6440
6441 else
6442   conftest_rc="$?"
6443   echo "configure: failed program was:" >&5
6444   cat conftest.$ac_ext >&5
6445 fi
6446 rm -fr conftest*
6447     with_file_coding=yes
6448     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
6449    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\""
6450  fi
6451   fi
6452 fi
6453
6454
6455
6456 test -z "$window_system" && window_system="none"
6457
6458 if test "$window_system" = "none"; then
6459   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6460   do
6461     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6462        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6463     fi
6464     eval "with_${feature}=no"
6465   done
6466 else
6467   test -z "$with_toolbars" && with_toolbars=yes
6468 fi
6469
6470 if test "$with_msw" != "yes"; then
6471   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6472   do
6473     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6474        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6475     fi
6476     eval "with_${feature}=no"
6477   done
6478 else
6479   :
6480 fi
6481
6482 if test "$with_x11" != "yes"; then
6483             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6484   do
6485     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6486        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6487     fi
6488     eval "with_${feature}=no"
6489   done
6490 fi
6491
6492 bitmapdir=
6493
6494 case "$window_system" in
6495   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6496   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6497   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6498 esac
6499
6500 case "$x_libraries" in *X11R4* )
6501   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6502   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6503 esac
6504
6505 echo "checking for WM_COMMAND option" 1>&6
6506 echo "configure:6507: checking for WM_COMMAND option" >&5;
6507 if test "$with_wmcommand" != "no"; then
6508   { test "$extra_verbose" = "yes" && cat << \EOF
6509     Defining HAVE_WMCOMMAND
6510 EOF
6511 cat >> confdefs.h <<\EOF
6512 #define HAVE_WMCOMMAND 1
6513 EOF
6514 }
6515
6516 fi
6517
6518 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6519 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6520 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6521 echo "configure:6522: checking for X11/Xauth.h" >&5
6522
6523 cat > conftest.$ac_ext <<EOF
6524 #line 6525 "configure"
6525 #include "confdefs.h"
6526 #include <X11/Xauth.h>
6527 EOF
6528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6529 { (eval echo configure:6530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6531 if test -z "$ac_err"; then
6532   rm -rf conftest*
6533   eval "ac_cv_header_$ac_safe=yes"
6534 else
6535   echo "$ac_err" >&5
6536   echo "configure: failed program was:" >&5
6537   cat conftest.$ac_ext >&5
6538   rm -rf conftest*
6539   eval "ac_cv_header_$ac_safe=no"
6540 fi
6541 rm -f conftest*
6542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6543   echo "$ac_t""yes" 1>&6
6544   :
6545 else
6546   echo "$ac_t""no" 1>&6
6547 with_xauth=no
6548 fi
6549  }
6550 test -z "$with_xauth" && { 
6551 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6552 echo "configure:6553: checking for XauGetAuthByAddr in -lXau" >&5
6553 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6554
6555 xe_check_libs=" -lXau "
6556 cat > conftest.$ac_ext <<EOF
6557 #line 6558 "configure"
6558 #include "confdefs.h"
6559 /* Override any gcc2 internal prototype to avoid an error.  */
6560 /* We use char because int might match the return type of a gcc2
6561     builtin and then its argument prototype would still apply.  */
6562 char XauGetAuthByAddr();
6563
6564 int main() {
6565 XauGetAuthByAddr()
6566 ; return 0; }
6567 EOF
6568 if { (eval echo configure:6569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6569   rm -rf conftest*
6570   eval "ac_cv_lib_$ac_lib_var=yes"
6571 else
6572   echo "configure: failed program was:" >&5
6573   cat conftest.$ac_ext >&5
6574   rm -rf conftest*
6575   eval "ac_cv_lib_$ac_lib_var=no"
6576 fi
6577 rm -f conftest*
6578 xe_check_libs=""
6579
6580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6581   echo "$ac_t""yes" 1>&6
6582   :
6583 else
6584   echo "$ac_t""no" 1>&6
6585 with_xauth=no
6586 fi
6587
6588  }
6589 test -z "$with_xauth" && with_xauth=yes
6590 if test "$with_xauth" = "yes"; then
6591   { test "$extra_verbose" = "yes" && cat << \EOF
6592     Defining HAVE_XAUTH
6593 EOF
6594 cat >> confdefs.h <<\EOF
6595 #define HAVE_XAUTH 1
6596 EOF
6597 }
6598
6599   
6600 T=""
6601 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
6602 libs_xauth="$T"
6603
6604 fi
6605
6606
6607
6608
6609 if test "$with_tooltalk" != "no" ; then
6610       for dir in "" "Tt/" "desktop/" ; do
6611     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6612 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6613 echo "configure:6614: checking for ${dir}tt_c.h" >&5
6614
6615 cat > conftest.$ac_ext <<EOF
6616 #line 6617 "configure"
6617 #include "confdefs.h"
6618 #include <${dir}tt_c.h>
6619 EOF
6620 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6621 { (eval echo configure:6622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6622 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6623 if test -z "$ac_err"; then
6624   rm -rf conftest*
6625   eval "ac_cv_header_$ac_safe=yes"
6626 else
6627   echo "$ac_err" >&5
6628   echo "configure: failed program was:" >&5
6629   cat conftest.$ac_ext >&5
6630   rm -rf conftest*
6631   eval "ac_cv_header_$ac_safe=no"
6632 fi
6633 rm -f conftest*
6634 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6635   echo "$ac_t""yes" 1>&6
6636   tt_c_h_file="${dir}tt_c.h"; break
6637 else
6638   echo "$ac_t""no" 1>&6
6639 fi
6640
6641   done
6642   if test -z "$tt_c_h_file"; then
6643     if test "$with_tooltalk" = "yes"; then
6644       (echo "$progname: Usage error:"
6645 echo " " "Unable to find required tooltalk header files."
6646 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6647     fi
6648     with_tooltalk=no
6649   fi
6650 fi
6651 if test "$with_tooltalk" != "no" ; then
6652   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6653     
6654 xe_msg_checking="for tt_message_create in -ltt"
6655 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6656 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6657 echo "configure:6658: checking "$xe_msg_checking"" >&5
6658 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6659
6660 xe_check_libs=" -ltt $extra_libs"
6661 cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 /* We use char because int might match the return type of a gcc2
6666     builtin and then its argument prototype would still apply.  */
6667 char tt_message_create();
6668
6669 int main() {
6670 tt_message_create()
6671 ; return 0; }
6672 EOF
6673 if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6674   rm -rf conftest*
6675   eval "ac_cv_lib_$ac_lib_var=yes"
6676 else
6677   echo "configure: failed program was:" >&5
6678   cat conftest.$ac_ext >&5
6679   rm -rf conftest*
6680   eval "ac_cv_lib_$ac_lib_var=no"
6681 fi
6682 rm -f conftest*
6683 xe_check_libs=""
6684
6685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6686   echo "$ac_t""yes" 1>&6
6687   tt_libs="-ltt $extra_libs"; break
6688 else
6689   echo "$ac_t""no" 1>&6
6690 :
6691 fi
6692
6693
6694   done
6695   if test -z "$tt_libs"; then
6696     if test "$with_tooltalk" = "yes"; then
6697       (echo "$progname: Usage error:"
6698 echo " " "Unable to find required tooltalk libraries."
6699 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6700     fi
6701     with_tooltalk=no
6702   fi
6703 fi
6704 test -z "$with_tooltalk" && with_tooltalk=yes
6705 if test "$with_tooltalk" = "yes"; then
6706   { test "$extra_verbose" = "yes" && cat << \EOF
6707     Defining TOOLTALK
6708 EOF
6709 cat >> confdefs.h <<\EOF
6710 #define TOOLTALK 1
6711 EOF
6712 }
6713
6714   { test "$extra_verbose" = "yes" && cat << EOF
6715     Defining TT_C_H_FILE = "$tt_c_h_file"
6716 EOF
6717 cat >> confdefs.h <<EOF
6718 #define TT_C_H_FILE "$tt_c_h_file"
6719 EOF
6720 }
6721
6722   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6723   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6724    echo "    xemacs will be linked with \"tooltalk.o\""
6725  fi
6726 fi
6727
6728 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6729 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6730 echo "configure:6731: checking for Dt/Dt.h" >&5
6731
6732 cat > conftest.$ac_ext <<EOF
6733 #line 6734 "configure"
6734 #include "confdefs.h"
6735 #include <Dt/Dt.h>
6736 EOF
6737 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6738 { (eval echo configure:6739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6739 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6740 if test -z "$ac_err"; then
6741   rm -rf conftest*
6742   eval "ac_cv_header_$ac_safe=yes"
6743 else
6744   echo "$ac_err" >&5
6745   echo "configure: failed program was:" >&5
6746   cat conftest.$ac_ext >&5
6747   rm -rf conftest*
6748   eval "ac_cv_header_$ac_safe=no"
6749 fi
6750 rm -f conftest*
6751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6752   echo "$ac_t""yes" 1>&6
6753   :
6754 else
6755   echo "$ac_t""no" 1>&6
6756 with_cde=no
6757 fi
6758  }
6759 test -z "$with_cde" && { 
6760 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6761 echo "configure:6762: checking for DtDndDragStart in -lDtSvc" >&5
6762 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6763
6764 xe_check_libs=" -lDtSvc "
6765 cat > conftest.$ac_ext <<EOF
6766 #line 6767 "configure"
6767 #include "confdefs.h"
6768 /* Override any gcc2 internal prototype to avoid an error.  */
6769 /* We use char because int might match the return type of a gcc2
6770     builtin and then its argument prototype would still apply.  */
6771 char DtDndDragStart();
6772
6773 int main() {
6774 DtDndDragStart()
6775 ; return 0; }
6776 EOF
6777 if { (eval echo configure:6778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6778   rm -rf conftest*
6779   eval "ac_cv_lib_$ac_lib_var=yes"
6780 else
6781   echo "configure: failed program was:" >&5
6782   cat conftest.$ac_ext >&5
6783   rm -rf conftest*
6784   eval "ac_cv_lib_$ac_lib_var=no"
6785 fi
6786 rm -f conftest*
6787 xe_check_libs=""
6788
6789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6790   echo "$ac_t""yes" 1>&6
6791   :
6792 else
6793   echo "$ac_t""no" 1>&6
6794 with_cde=no
6795 fi
6796
6797  }
6798 test -z "$with_cde" && with_cde=yes
6799 if test "$with_dragndrop" = no; then
6800   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6801   with_cde=no
6802 fi
6803 if test "$with_cde" = "yes" ; then
6804   { test "$extra_verbose" = "yes" && cat << \EOF
6805     Defining HAVE_CDE
6806 EOF
6807 cat >> confdefs.h <<\EOF
6808 #define HAVE_CDE 1
6809 EOF
6810 }
6811
6812   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6813   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6814   with_tooltalk=yes # CDE requires Tooltalk
6815   need_motif=yes    # CDE requires Motif
6816 fi
6817
6818 test "$window_system" != "x11" && with_offix=no
6819 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6820   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6821   with_offix=no
6822 fi
6823 if test "$with_dragndrop" = no; then
6824   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6825   with_offix=no
6826 fi
6827 if test "$with_cde" = yes; then
6828   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6829   with_offix=no
6830 fi
6831 test -z "$with_offix" && with_offix=no
6832 if test "$with_offix" = "yes"; then
6833   { test "$extra_verbose" = "yes" && cat << \EOF
6834     Defining HAVE_OFFIX_DND
6835 EOF
6836 cat >> confdefs.h <<\EOF
6837 #define HAVE_OFFIX_DND 1
6838 EOF
6839 }
6840
6841   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6842   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6843 fi
6844
6845 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6846 echo "configure:6847: checking if drag and drop API is needed" >&5
6847 if test "$with_dragndrop" != "no" ; then
6848   if test -n "$dragndrop_proto" ; then
6849     with_dragndrop=yes
6850     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6851     { test "$extra_verbose" = "yes" && cat << \EOF
6852     Defining HAVE_DRAGNDROP
6853 EOF
6854 cat >> confdefs.h <<\EOF
6855 #define HAVE_DRAGNDROP 1
6856 EOF
6857 }
6858
6859     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6860   else
6861     with_dragndrop=no
6862     echo "$ac_t""no" 1>&6
6863   fi
6864 fi
6865
6866 echo "checking for LDAP" 1>&6
6867 echo "configure:6868: checking for LDAP" >&5
6868 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6869 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6870 echo "configure:6871: checking for ldap.h" >&5
6871
6872 cat > conftest.$ac_ext <<EOF
6873 #line 6874 "configure"
6874 #include "confdefs.h"
6875 #include <ldap.h>
6876 EOF
6877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6878 { (eval echo configure:6879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6880 if test -z "$ac_err"; then
6881   rm -rf conftest*
6882   eval "ac_cv_header_$ac_safe=yes"
6883 else
6884   echo "$ac_err" >&5
6885   echo "configure: failed program was:" >&5
6886   cat conftest.$ac_ext >&5
6887   rm -rf conftest*
6888   eval "ac_cv_header_$ac_safe=no"
6889 fi
6890 rm -f conftest*
6891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6892   echo "$ac_t""yes" 1>&6
6893   :
6894 else
6895   echo "$ac_t""no" 1>&6
6896 with_ldap=no
6897 fi
6898  }
6899 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6900 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6901 echo "configure:6902: checking for lber.h" >&5
6902
6903 cat > conftest.$ac_ext <<EOF
6904 #line 6905 "configure"
6905 #include "confdefs.h"
6906 #include <lber.h>
6907 EOF
6908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6909 { (eval echo configure:6910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6911 if test -z "$ac_err"; then
6912   rm -rf conftest*
6913   eval "ac_cv_header_$ac_safe=yes"
6914 else
6915   echo "$ac_err" >&5
6916   echo "configure: failed program was:" >&5
6917   cat conftest.$ac_ext >&5
6918   rm -rf conftest*
6919   eval "ac_cv_header_$ac_safe=no"
6920 fi
6921 rm -f conftest*
6922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6923   echo "$ac_t""yes" 1>&6
6924   :
6925 else
6926   echo "$ac_t""no" 1>&6
6927 with_ldap=no
6928 fi
6929  }
6930 if test "$with_ldap" != "no"; then
6931   
6932 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6933 echo "configure:6934: checking for ldap_search in -lldap" >&5
6934 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6935
6936 xe_check_libs=" -lldap "
6937 cat > conftest.$ac_ext <<EOF
6938 #line 6939 "configure"
6939 #include "confdefs.h"
6940 /* Override any gcc2 internal prototype to avoid an error.  */
6941 /* We use char because int might match the return type of a gcc2
6942     builtin and then its argument prototype would still apply.  */
6943 char ldap_search();
6944
6945 int main() {
6946 ldap_search()
6947 ; return 0; }
6948 EOF
6949 if { (eval echo configure:6950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6950   rm -rf conftest*
6951   eval "ac_cv_lib_$ac_lib_var=yes"
6952 else
6953   echo "configure: failed program was:" >&5
6954   cat conftest.$ac_ext >&5
6955   rm -rf conftest*
6956   eval "ac_cv_lib_$ac_lib_var=no"
6957 fi
6958 rm -f conftest*
6959 xe_check_libs=""
6960
6961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6962   echo "$ac_t""yes" 1>&6
6963   with_ldap_nolber=yes
6964 else
6965   echo "$ac_t""no" 1>&6
6966 with_ldap_nolber=no
6967 fi
6968
6969
6970   test "$with_ldap_nolber" = "no" && { 
6971 xe_msg_checking="for ldap_open in -lldap"
6972 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6973 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6974 echo "configure:6975: checking "$xe_msg_checking"" >&5
6975 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6976
6977 xe_check_libs=" -lldap -llber"
6978 cat > conftest.$ac_ext <<EOF
6979 #line 6980 "configure"
6980 #include "confdefs.h"
6981 /* Override any gcc2 internal prototype to avoid an error.  */
6982 /* We use char because int might match the return type of a gcc2
6983     builtin and then its argument prototype would still apply.  */
6984 char ldap_open();
6985
6986 int main() {
6987 ldap_open()
6988 ; return 0; }
6989 EOF
6990 if { (eval echo configure:6991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6991   rm -rf conftest*
6992   eval "ac_cv_lib_$ac_lib_var=yes"
6993 else
6994   echo "configure: failed program was:" >&5
6995   cat conftest.$ac_ext >&5
6996   rm -rf conftest*
6997   eval "ac_cv_lib_$ac_lib_var=no"
6998 fi
6999 rm -f conftest*
7000 xe_check_libs=""
7001
7002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7003   echo "$ac_t""yes" 1>&6
7004   with_ldap_lber=yes
7005 else
7006   echo "$ac_t""no" 1>&6
7007 with_ldap_lber=no
7008 fi
7009
7010  }
7011   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7012 xe_msg_checking="for ldap_open in -lldap"
7013 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7014 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7015 echo "configure:7016: checking "$xe_msg_checking"" >&5
7016 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7017
7018 xe_check_libs=" -lldap -llber -lkrb"
7019 cat > conftest.$ac_ext <<EOF
7020 #line 7021 "configure"
7021 #include "confdefs.h"
7022 /* Override any gcc2 internal prototype to avoid an error.  */
7023 /* We use char because int might match the return type of a gcc2
7024     builtin and then its argument prototype would still apply.  */
7025 char ldap_open();
7026
7027 int main() {
7028 ldap_open()
7029 ; return 0; }
7030 EOF
7031 if { (eval echo configure:7032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7032   rm -rf conftest*
7033   eval "ac_cv_lib_$ac_lib_var=yes"
7034 else
7035   echo "configure: failed program was:" >&5
7036   cat conftest.$ac_ext >&5
7037   rm -rf conftest*
7038   eval "ac_cv_lib_$ac_lib_var=no"
7039 fi
7040 rm -f conftest*
7041 xe_check_libs=""
7042
7043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7044   echo "$ac_t""yes" 1>&6
7045   with_ldap_krb=yes
7046 else
7047   echo "$ac_t""no" 1>&6
7048 with_ldap_krb=no
7049 fi
7050
7051  }
7052   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7053 xe_msg_checking="for ldap_open in -lldap"
7054 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7055 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7056 echo "configure:7057: checking "$xe_msg_checking"" >&5
7057 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7058
7059 xe_check_libs=" -lldap -llber -lkrb -ldes"
7060 cat > conftest.$ac_ext <<EOF
7061 #line 7062 "configure"
7062 #include "confdefs.h"
7063 /* Override any gcc2 internal prototype to avoid an error.  */
7064 /* We use char because int might match the return type of a gcc2
7065     builtin and then its argument prototype would still apply.  */
7066 char ldap_open();
7067
7068 int main() {
7069 ldap_open()
7070 ; return 0; }
7071 EOF
7072 if { (eval echo configure:7073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7073   rm -rf conftest*
7074   eval "ac_cv_lib_$ac_lib_var=yes"
7075 else
7076   echo "configure: failed program was:" >&5
7077   cat conftest.$ac_ext >&5
7078   rm -rf conftest*
7079   eval "ac_cv_lib_$ac_lib_var=no"
7080 fi
7081 rm -f conftest*
7082 xe_check_libs=""
7083
7084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7085   echo "$ac_t""yes" 1>&6
7086   with_ldap_krbdes=yes
7087 else
7088   echo "$ac_t""no" 1>&6
7089 with_ldap_krbdes=no
7090 fi
7091
7092  }
7093   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
7094 fi
7095 if test "$with_ldap" = "yes"; then
7096   { test "$extra_verbose" = "yes" && cat << \EOF
7097     Defining HAVE_LDAP
7098 EOF
7099 cat >> confdefs.h <<\EOF
7100 #define HAVE_LDAP 1
7101 EOF
7102 }
7103
7104   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7105    echo "    xemacs will be linked with \"eldap.o\""
7106  fi
7107   if test "$with_ldap_nolber" = "yes" ; then
7108     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7109   else
7110     if test "$with_ldap_krb" = "yes" ; then
7111       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7112     fi
7113     if test "$with_ldap_krbdes" = "yes" ; then
7114       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7115       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7116     fi
7117     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7118     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7119   fi
7120   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7121 do
7122 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7123 echo "configure:7124: checking for $ac_func" >&5
7124
7125 cat > conftest.$ac_ext <<EOF
7126 #line 7127 "configure"
7127 #include "confdefs.h"
7128 /* System header to define __stub macros and hopefully few prototypes,
7129     which can conflict with char $ac_func(); below.  */
7130 #include <assert.h>
7131 /* Override any gcc2 internal prototype to avoid an error.  */
7132 /* We use char because int might match the return type of a gcc2
7133     builtin and then its argument prototype would still apply.  */
7134 char $ac_func();
7135
7136 int main() {
7137
7138 /* The GNU C library defines this for functions which it implements
7139     to always fail with ENOSYS.  Some functions are actually named
7140     something starting with __ and the normal name is an alias.  */
7141 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7142 choke me
7143 #else
7144 $ac_func();
7145 #endif
7146
7147 ; return 0; }
7148 EOF
7149 if { (eval echo configure:7150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7150   rm -rf conftest*
7151   eval "ac_cv_func_$ac_func=yes"
7152 else
7153   echo "configure: failed program was:" >&5
7154   cat conftest.$ac_ext >&5
7155   rm -rf conftest*
7156   eval "ac_cv_func_$ac_func=no"
7157 fi
7158 rm -f conftest*
7159
7160 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7161   echo "$ac_t""yes" 1>&6
7162     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7163   { test "$extra_verbose" = "yes" && cat << EOF
7164     Defining $ac_tr_func
7165 EOF
7166 cat >> confdefs.h <<EOF
7167 #define $ac_tr_func 1
7168 EOF
7169 }
7170  
7171 else
7172   echo "$ac_t""no" 1>&6
7173 fi
7174 done
7175
7176 fi
7177
7178 echo "checking for PostgreSQL" 1>&6
7179 echo "configure:7180: checking for PostgreSQL" >&5
7180 postgres_h_path=""
7181 postgres_includes_found=no
7182 save_c_switch_site="$c_switch_site"
7183
7184 if test "$with_postgresql" != "no"; then
7185         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7186 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7187 echo "configure:7188: checking for libpq-fe.h" >&5
7188
7189 cat > conftest.$ac_ext <<EOF
7190 #line 7191 "configure"
7191 #include "confdefs.h"
7192 #include <libpq-fe.h>
7193 EOF
7194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7195 { (eval echo configure:7196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7197 if test -z "$ac_err"; then
7198   rm -rf conftest*
7199   eval "ac_cv_header_$ac_safe=yes"
7200 else
7201   echo "$ac_err" >&5
7202   echo "configure: failed program was:" >&5
7203   cat conftest.$ac_ext >&5
7204   rm -rf conftest*
7205   eval "ac_cv_header_$ac_safe=no"
7206 fi
7207 rm -f conftest*
7208 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7209   echo "$ac_t""yes" 1>&6
7210   postgres_includes_found=yes
7211 else
7212   echo "$ac_t""no" 1>&6
7213 fi
7214
7215 fi
7216
7217 if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
7218         -d "/usr/local/pgsql/include"; then
7219         c_switch_site="$c_switch_site -I/usr/local/pgsql/include"
7220         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7221 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7222 echo "configure:7223: checking for libpq-fe.h" >&5
7223
7224 cat > conftest.$ac_ext <<EOF
7225 #line 7226 "configure"
7226 #include "confdefs.h"
7227 #include <libpq-fe.h>
7228 EOF
7229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7230 { (eval echo configure:7231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7232 if test -z "$ac_err"; then
7233   rm -rf conftest*
7234   eval "ac_cv_header_$ac_safe=yes"
7235 else
7236   echo "$ac_err" >&5
7237   echo "configure: failed program was:" >&5
7238   cat conftest.$ac_ext >&5
7239   rm -rf conftest*
7240   eval "ac_cv_header_$ac_safe=no"
7241 fi
7242 rm -f conftest*
7243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7244   echo "$ac_t""yes" 1>&6
7245   postgres_includes_found=yes
7246 else
7247   echo "$ac_t""no" 1>&6
7248 fi
7249
7250         if test "$postgres_includes_found" != "yes"; then
7251                 postgres_h_path="/usr/local/pgsql/include"
7252         fi
7253         c_switch_site="$save_c_switch_site"
7254 fi
7255 if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
7256         -d "/usr/include/pgsql"; then
7257         c_switch_site="$c_switch_site -I/usr/include/pgsql"
7258         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7259 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7260 echo "configure:7261: checking for libpq-fe.h" >&5
7261
7262 cat > conftest.$ac_ext <<EOF
7263 #line 7264 "configure"
7264 #include "confdefs.h"
7265 #include <libpq-fe.h>
7266 EOF
7267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7268 { (eval echo configure:7269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7270 if test -z "$ac_err"; then
7271   rm -rf conftest*
7272   eval "ac_cv_header_$ac_safe=yes"
7273 else
7274   echo "$ac_err" >&5
7275   echo "configure: failed program was:" >&5
7276   cat conftest.$ac_ext >&5
7277   rm -rf conftest*
7278   eval "ac_cv_header_$ac_safe=no"
7279 fi
7280 rm -f conftest*
7281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7282   echo "$ac_t""yes" 1>&6
7283   postgres_includes_found=yes
7284 else
7285   echo "$ac_t""no" 1>&6
7286 fi
7287
7288         if test "$postgres_includes_found" = "yes"; then
7289                 postgres_h_path="pgsql"
7290         fi
7291                 c_switch_site="$save_c_switch_site"
7292         fi
7293 if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
7294         -d "/usr/include/postgresql"; then
7295         c_switch_site="$c_switch_site -I/usr/include/postgresql"
7296         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7297 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7298 echo "configure:7299: checking for libpq-fe.h" >&5
7299
7300 cat > conftest.$ac_ext <<EOF
7301 #line 7302 "configure"
7302 #include "confdefs.h"
7303 #include <libpq-fe.h>
7304 EOF
7305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7306 { (eval echo configure:7307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7308 if test -z "$ac_err"; then
7309   rm -rf conftest*
7310   eval "ac_cv_header_$ac_safe=yes"
7311 else
7312   echo "$ac_err" >&5
7313   echo "configure: failed program was:" >&5
7314   cat conftest.$ac_ext >&5
7315   rm -rf conftest*
7316   eval "ac_cv_header_$ac_safe=no"
7317 fi
7318 rm -f conftest*
7319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7320   echo "$ac_t""yes" 1>&6
7321   postgres_includes_found=yes
7322 else
7323   echo "$ac_t""no" 1>&6
7324 fi
7325
7326         if test "$postgres_includes_found" = "yes"; then
7327                 postgres_h_path="postgresql"
7328 fi
7329         c_switch_site="$save_c_switch_site"
7330 fi
7331
7332 if test "$postgres_includes_found" = "yes"; then
7333         
7334 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7335 echo "configure:7336: checking for PQconnectdb in -lpq" >&5
7336 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7337
7338 xe_check_libs=" -lpq "
7339 cat > conftest.$ac_ext <<EOF
7340 #line 7341 "configure"
7341 #include "confdefs.h"
7342 /* Override any gcc2 internal prototype to avoid an error.  */
7343 /* We use char because int might match the return type of a gcc2
7344     builtin and then its argument prototype would still apply.  */
7345 char PQconnectdb();
7346
7347 int main() {
7348 PQconnectdb()
7349 ; return 0; }
7350 EOF
7351 if { (eval echo configure:7352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7352   rm -rf conftest*
7353   eval "ac_cv_lib_$ac_lib_var=yes"
7354 else
7355   echo "configure: failed program was:" >&5
7356   cat conftest.$ac_ext >&5
7357   rm -rf conftest*
7358   eval "ac_cv_lib_$ac_lib_var=no"
7359 fi
7360 rm -f conftest*
7361 xe_check_libs=""
7362
7363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7364   echo "$ac_t""yes" 1>&6
7365   with_postgresql=yes
7366 else
7367   echo "$ac_t""no" 1>&6
7368 with_postgresql=no
7369 fi
7370
7371
7372 fi
7373 if test "$with_postgresql" = "yes"; then
7374         
7375 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7376 echo "configure:7377: checking for PQconnectStart in -lpq" >&5
7377 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7378
7379 xe_check_libs=" -lpq "
7380 cat > conftest.$ac_ext <<EOF
7381 #line 7382 "configure"
7382 #include "confdefs.h"
7383 /* Override any gcc2 internal prototype to avoid an error.  */
7384 /* We use char because int might match the return type of a gcc2
7385     builtin and then its argument prototype would still apply.  */
7386 char PQconnectStart();
7387
7388 int main() {
7389 PQconnectStart()
7390 ; return 0; }
7391 EOF
7392 if { (eval echo configure:7393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7393   rm -rf conftest*
7394   eval "ac_cv_lib_$ac_lib_var=yes"
7395 else
7396   echo "configure: failed program was:" >&5
7397   cat conftest.$ac_ext >&5
7398   rm -rf conftest*
7399   eval "ac_cv_lib_$ac_lib_var=no"
7400 fi
7401 rm -f conftest*
7402 xe_check_libs=""
7403
7404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7405   echo "$ac_t""yes" 1>&6
7406   with_postgresqlv7=yes
7407 else
7408   echo "$ac_t""no" 1>&6
7409 with_postgresqlv7=no
7410 fi
7411
7412
7413 fi
7414 if test "$with_postgresql" = "yes"; then
7415         if test -n "$postgres_h_path"; then
7416                 { test "$extra_verbose" = "yes" && cat << EOF
7417     Defining POSTGRES_H_PATH = $postgres_h_path
7418 EOF
7419 cat >> confdefs.h <<EOF
7420 #define POSTGRES_H_PATH $postgres_h_path
7421 EOF
7422 }
7423
7424         fi
7425         { test "$extra_verbose" = "yes" && cat << \EOF
7426     Defining HAVE_POSTGRESQL
7427 EOF
7428 cat >> confdefs.h <<\EOF
7429 #define HAVE_POSTGRESQL 1
7430 EOF
7431 }
7432
7433         if test "$with_postgresqlv7" = "yes"; then
7434                 { test "$extra_verbose" = "yes" && cat << \EOF
7435     Defining HAVE_POSTGRESQLV7
7436 EOF
7437 cat >> confdefs.h <<\EOF
7438 #define HAVE_POSTGRESQLV7 1
7439 EOF
7440 }
7441
7442         fi
7443         LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7444         extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7445    echo "    xemacs will be linked with \"postgresql.o\""
7446  fi
7447 fi
7448
7449
7450 if test "$window_system" != "none"; then
7451   echo "checking for graphics libraries" 1>&6
7452 echo "configure:7453: checking for graphics libraries" >&5
7453
7454     xpm_problem=""
7455   if test -z "$with_xpm"; then
7456     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7457 echo "configure:7458: checking for Xpm - no older than 3.4f" >&5
7458     xe_check_libs=-lXpm
7459     cat > conftest.$ac_ext <<EOF
7460 #line 7461 "configure"
7461 #include "confdefs.h"
7462 #define XPM_NUMBERS
7463 #include <X11/xpm.h>
7464     int main(int c, char **v) {
7465     return c == 1 ? 0 :
7466       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7467       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7468 EOF
7469 if { (eval echo configure:7470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7470 then
7471   ./conftest dummy_arg; xpm_status=$?;
7472       if test "$xpm_status" = "0"; then
7473         with_xpm=yes;
7474       else
7475         with_xpm=no;
7476         if test "$xpm_status" = "1"; then
7477           xpm_problem="Xpm library version and header file version don't match!"
7478         elif test "$xpm_status" = "2"; then
7479           xpm_problem="Xpm library version is too old!"
7480         else
7481           xpm_problem="Internal xpm detection logic error!"
7482         fi
7483         echo "
7484 *** WARNING *** $xpm_problem
7485   I'm not touching that with a 10-foot pole!
7486   If you really want to use the installed version of Xpm, rerun
7487   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7488     fi
7489 else
7490   conftest_rc="$?"
7491   echo "configure: failed program was:" >&5
7492   cat conftest.$ac_ext >&5
7493   rm -fr conftest*
7494   with_xpm=no
7495 fi
7496 rm -fr conftest*
7497     xe_check_libs=
7498     echo "$ac_t""$with_xpm" 1>&6
7499   fi
7500   if test "$with_xpm" = "yes"; then
7501     { test "$extra_verbose" = "yes" && cat << \EOF
7502     Defining HAVE_XPM
7503 EOF
7504 cat >> confdefs.h <<\EOF
7505 #define HAVE_XPM 1
7506 EOF
7507 }
7508
7509     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7510     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7511 echo "configure:7512: checking for \"FOR_MSW\" xpm" >&5
7512     xe_check_libs=-lXpm
7513     cat > conftest.$ac_ext <<EOF
7514 #line 7515 "configure"
7515 #include "confdefs.h"
7516
7517 int main() {
7518 XpmCreatePixmapFromData()
7519 ; return 0; }
7520 EOF
7521 if { (eval echo configure:7522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7522   rm -rf conftest*
7523   xpm_for_msw=no
7524 else
7525   echo "configure: failed program was:" >&5
7526   cat conftest.$ac_ext >&5
7527   rm -rf conftest*
7528   xpm_for_msw=yes
7529 fi
7530 rm -f conftest*
7531     xe_check_libs=
7532     echo "$ac_t""$xpm_for_msw" 1>&6
7533     if test "$xpm_for_msw" = "yes"; then
7534       { test "$extra_verbose" = "yes" && cat << \EOF
7535     Defining FOR_MSW
7536 EOF
7537 cat >> confdefs.h <<\EOF
7538 #define FOR_MSW 1
7539 EOF
7540 }
7541
7542     fi
7543   fi
7544
7545     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7546 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7547 echo "configure:7548: checking for compface.h" >&5
7548
7549 cat > conftest.$ac_ext <<EOF
7550 #line 7551 "configure"
7551 #include "confdefs.h"
7552 #include <compface.h>
7553 EOF
7554 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7555 { (eval echo configure:7556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7556 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7557 if test -z "$ac_err"; then
7558   rm -rf conftest*
7559   eval "ac_cv_header_$ac_safe=yes"
7560 else
7561   echo "$ac_err" >&5
7562   echo "configure: failed program was:" >&5
7563   cat conftest.$ac_ext >&5
7564   rm -rf conftest*
7565   eval "ac_cv_header_$ac_safe=no"
7566 fi
7567 rm -f conftest*
7568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7569   echo "$ac_t""yes" 1>&6
7570   :
7571 else
7572   echo "$ac_t""no" 1>&6
7573 with_xface=no
7574 fi
7575  }
7576   test -z "$with_xface" && { 
7577 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7578 echo "configure:7579: checking for UnGenFace in -lcompface" >&5
7579 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7580
7581 xe_check_libs=" -lcompface "
7582 cat > conftest.$ac_ext <<EOF
7583 #line 7584 "configure"
7584 #include "confdefs.h"
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 /* We use char because int might match the return type of a gcc2
7587     builtin and then its argument prototype would still apply.  */
7588 char UnGenFace();
7589
7590 int main() {
7591 UnGenFace()
7592 ; return 0; }
7593 EOF
7594 if { (eval echo configure:7595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7595   rm -rf conftest*
7596   eval "ac_cv_lib_$ac_lib_var=yes"
7597 else
7598   echo "configure: failed program was:" >&5
7599   cat conftest.$ac_ext >&5
7600   rm -rf conftest*
7601   eval "ac_cv_lib_$ac_lib_var=no"
7602 fi
7603 rm -f conftest*
7604 xe_check_libs=""
7605
7606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7607   echo "$ac_t""yes" 1>&6
7608   : 
7609 else
7610   echo "$ac_t""no" 1>&6
7611 with_xface=no
7612 fi
7613
7614  }
7615   test -z "$with_xface" && with_xface=yes
7616   if test "$with_xface" = "yes"; then
7617     { test "$extra_verbose" = "yes" && cat << \EOF
7618     Defining HAVE_XFACE
7619 EOF
7620 cat >> confdefs.h <<\EOF
7621 #define HAVE_XFACE 1
7622 EOF
7623 }
7624
7625     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7626   fi
7627
7628         if test "$with_gif" != "no"; then
7629     with_gif="yes"
7630     { test "$extra_verbose" = "yes" && cat << \EOF
7631     Defining HAVE_GIF
7632 EOF
7633 cat >> confdefs.h <<\EOF
7634 #define HAVE_GIF 1
7635 EOF
7636 }
7637
7638     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7639    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7640  fi
7641   fi
7642
7643       if test "$with_png $with_tiff" != "no no"; then
7644     
7645 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7646 echo "configure:7647: checking for inflate in -lc" >&5
7647 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7648
7649 xe_check_libs=" -lc "
7650 cat > conftest.$ac_ext <<EOF
7651 #line 7652 "configure"
7652 #include "confdefs.h"
7653 /* Override any gcc2 internal prototype to avoid an error.  */
7654 /* We use char because int might match the return type of a gcc2
7655     builtin and then its argument prototype would still apply.  */
7656 char inflate();
7657
7658 int main() {
7659 inflate()
7660 ; return 0; }
7661 EOF
7662 if { (eval echo configure:7663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7663   rm -rf conftest*
7664   eval "ac_cv_lib_$ac_lib_var=yes"
7665 else
7666   echo "configure: failed program was:" >&5
7667   cat conftest.$ac_ext >&5
7668   rm -rf conftest*
7669   eval "ac_cv_lib_$ac_lib_var=no"
7670 fi
7671 rm -f conftest*
7672 xe_check_libs=""
7673
7674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7675   echo "$ac_t""yes" 1>&6
7676   :
7677 else
7678   echo "$ac_t""no" 1>&6
7679
7680 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7681 echo "configure:7682: checking for inflate in -lz" >&5
7682 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7683
7684 xe_check_libs=" -lz "
7685 cat > conftest.$ac_ext <<EOF
7686 #line 7687 "configure"
7687 #include "confdefs.h"
7688 /* Override any gcc2 internal prototype to avoid an error.  */
7689 /* We use char because int might match the return type of a gcc2
7690     builtin and then its argument prototype would still apply.  */
7691 char inflate();
7692
7693 int main() {
7694 inflate()
7695 ; return 0; }
7696 EOF
7697 if { (eval echo configure:7698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7698   rm -rf conftest*
7699   eval "ac_cv_lib_$ac_lib_var=yes"
7700 else
7701   echo "configure: failed program was:" >&5
7702   cat conftest.$ac_ext >&5
7703   rm -rf conftest*
7704   eval "ac_cv_lib_$ac_lib_var=no"
7705 fi
7706 rm -f conftest*
7707 xe_check_libs=""
7708
7709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7710   echo "$ac_t""yes" 1>&6
7711   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7712 else
7713   echo "$ac_t""no" 1>&6
7714
7715 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7716 echo "configure:7717: checking for inflate in -lgz" >&5
7717 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7718
7719 xe_check_libs=" -lgz "
7720 cat > conftest.$ac_ext <<EOF
7721 #line 7722 "configure"
7722 #include "confdefs.h"
7723 /* Override any gcc2 internal prototype to avoid an error.  */
7724 /* We use char because int might match the return type of a gcc2
7725     builtin and then its argument prototype would still apply.  */
7726 char inflate();
7727
7728 int main() {
7729 inflate()
7730 ; return 0; }
7731 EOF
7732 if { (eval echo configure:7733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7733   rm -rf conftest*
7734   eval "ac_cv_lib_$ac_lib_var=yes"
7735 else
7736   echo "configure: failed program was:" >&5
7737   cat conftest.$ac_ext >&5
7738   rm -rf conftest*
7739   eval "ac_cv_lib_$ac_lib_var=no"
7740 fi
7741 rm -f conftest*
7742 xe_check_libs=""
7743
7744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7745   echo "$ac_t""yes" 1>&6
7746   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7747 else
7748   echo "$ac_t""no" 1>&6
7749 fi
7750
7751
7752 fi
7753
7754
7755 fi
7756
7757
7758   fi
7759
7760     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7761 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7762 echo "configure:7763: checking for jpeglib.h" >&5
7763
7764 cat > conftest.$ac_ext <<EOF
7765 #line 7766 "configure"
7766 #include "confdefs.h"
7767 #include <jpeglib.h>
7768 EOF
7769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7770 { (eval echo configure:7771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7772 if test -z "$ac_err"; then
7773   rm -rf conftest*
7774   eval "ac_cv_header_$ac_safe=yes"
7775 else
7776   echo "$ac_err" >&5
7777   echo "configure: failed program was:" >&5
7778   cat conftest.$ac_ext >&5
7779   rm -rf conftest*
7780   eval "ac_cv_header_$ac_safe=no"
7781 fi
7782 rm -f conftest*
7783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7784   echo "$ac_t""yes" 1>&6
7785   :
7786 else
7787   echo "$ac_t""no" 1>&6
7788 with_jpeg=no
7789 fi
7790  }
7791   test -z "$with_jpeg" && { 
7792 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7793 echo "configure:7794: checking for jpeg_destroy_decompress in -ljpeg" >&5
7794 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7795
7796 xe_check_libs=" -ljpeg "
7797 cat > conftest.$ac_ext <<EOF
7798 #line 7799 "configure"
7799 #include "confdefs.h"
7800 /* Override any gcc2 internal prototype to avoid an error.  */
7801 /* We use char because int might match the return type of a gcc2
7802     builtin and then its argument prototype would still apply.  */
7803 char jpeg_destroy_decompress();
7804
7805 int main() {
7806 jpeg_destroy_decompress()
7807 ; return 0; }
7808 EOF
7809 if { (eval echo configure:7810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7810   rm -rf conftest*
7811   eval "ac_cv_lib_$ac_lib_var=yes"
7812 else
7813   echo "configure: failed program was:" >&5
7814   cat conftest.$ac_ext >&5
7815   rm -rf conftest*
7816   eval "ac_cv_lib_$ac_lib_var=no"
7817 fi
7818 rm -f conftest*
7819 xe_check_libs=""
7820
7821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7822   echo "$ac_t""yes" 1>&6
7823   :
7824 else
7825   echo "$ac_t""no" 1>&6
7826 with_jpeg=no
7827 fi
7828
7829  }
7830   test -z "$with_jpeg" && with_jpeg=yes
7831   if test "$with_jpeg" = "yes"; then
7832     { test "$extra_verbose" = "yes" && cat << \EOF
7833     Defining HAVE_JPEG
7834 EOF
7835 cat >> confdefs.h <<\EOF
7836 #define HAVE_JPEG 1
7837 EOF
7838 }
7839
7840     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7841   fi
7842
7843     png_problem=""
7844   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7845 echo "configure:7846: checking for pow" >&5
7846
7847 cat > conftest.$ac_ext <<EOF
7848 #line 7849 "configure"
7849 #include "confdefs.h"
7850 /* System header to define __stub macros and hopefully few prototypes,
7851     which can conflict with char pow(); below.  */
7852 #include <assert.h>
7853 /* Override any gcc2 internal prototype to avoid an error.  */
7854 /* We use char because int might match the return type of a gcc2
7855     builtin and then its argument prototype would still apply.  */
7856 char pow();
7857
7858 int main() {
7859
7860 /* The GNU C library defines this for functions which it implements
7861     to always fail with ENOSYS.  Some functions are actually named
7862     something starting with __ and the normal name is an alias.  */
7863 #if defined (__stub_pow) || defined (__stub___pow)
7864 choke me
7865 #else
7866 pow();
7867 #endif
7868
7869 ; return 0; }
7870 EOF
7871 if { (eval echo configure:7872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7872   rm -rf conftest*
7873   eval "ac_cv_func_pow=yes"
7874 else
7875   echo "configure: failed program was:" >&5
7876   cat conftest.$ac_ext >&5
7877   rm -rf conftest*
7878   eval "ac_cv_func_pow=no"
7879 fi
7880 rm -f conftest*
7881
7882 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7883   echo "$ac_t""yes" 1>&6
7884   :
7885 else
7886   echo "$ac_t""no" 1>&6
7887 with_png=no
7888 fi
7889  }
7890   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7891 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7892 echo "configure:7893: checking for png.h" >&5
7893
7894 cat > conftest.$ac_ext <<EOF
7895 #line 7896 "configure"
7896 #include "confdefs.h"
7897 #include <png.h>
7898 EOF
7899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7900 { (eval echo configure:7901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7901 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7902 if test -z "$ac_err"; then
7903   rm -rf conftest*
7904   eval "ac_cv_header_$ac_safe=yes"
7905 else
7906   echo "$ac_err" >&5
7907   echo "configure: failed program was:" >&5
7908   cat conftest.$ac_ext >&5
7909   rm -rf conftest*
7910   eval "ac_cv_header_$ac_safe=no"
7911 fi
7912 rm -f conftest*
7913 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7914   echo "$ac_t""yes" 1>&6
7915   :
7916 else
7917   echo "$ac_t""no" 1>&6
7918 with_png=no
7919 fi
7920  }
7921   test -z "$with_png" && { 
7922 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7923 echo "configure:7924: checking for png_read_image in -lpng" >&5
7924 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7925
7926 xe_check_libs=" -lpng "
7927 cat > conftest.$ac_ext <<EOF
7928 #line 7929 "configure"
7929 #include "confdefs.h"
7930 /* Override any gcc2 internal prototype to avoid an error.  */
7931 /* We use char because int might match the return type of a gcc2
7932     builtin and then its argument prototype would still apply.  */
7933 char png_read_image();
7934
7935 int main() {
7936 png_read_image()
7937 ; return 0; }
7938 EOF
7939 if { (eval echo configure:7940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7940   rm -rf conftest*
7941   eval "ac_cv_lib_$ac_lib_var=yes"
7942 else
7943   echo "configure: failed program was:" >&5
7944   cat conftest.$ac_ext >&5
7945   rm -rf conftest*
7946   eval "ac_cv_lib_$ac_lib_var=no"
7947 fi
7948 rm -f conftest*
7949 xe_check_libs=""
7950
7951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7952   echo "$ac_t""yes" 1>&6
7953   :
7954 else
7955   echo "$ac_t""no" 1>&6
7956 with_png=no
7957 fi
7958
7959  }
7960   if test -z "$with_png"; then
7961     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7962 echo "configure:7963: checking for workable png version information" >&5
7963     xe_check_libs="-lpng -lz"
7964     cat > conftest.$ac_ext <<EOF
7965 #line 7966 "configure"
7966 #include "confdefs.h"
7967 #include <png.h>
7968     int main(int c, char **v) {
7969     if (c == 1) return 0;
7970     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7971     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7972 EOF
7973 if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7974 then
7975   ./conftest dummy_arg; png_status=$?;
7976       if test "$png_status" = "0"; then
7977         with_png=yes;
7978       else
7979         with_png=no;
7980         if test "$png_status" = "1"; then
7981           png_problem="PNG library version and header file don't match!"
7982         elif test "$png_status" = "2"; then
7983           png_problem="PNG library version too old (pre 1.0.2)!"
7984         fi
7985         echo "
7986 *** WARNING *** $png_problem
7987   I'm not touching that with a 10-foot pole!
7988   If you really want to use the installed version of libPNG, rerun
7989   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7990     fi
7991 else
7992   conftest_rc="$?"
7993   echo "configure: failed program was:" >&5
7994   cat conftest.$ac_ext >&5
7995   rm -fr conftest*
7996   with_png=no
7997 fi
7998 rm -fr conftest*
7999     xe_check_libs=
8000     echo "$ac_t""$with_png" 1>&6
8001   fi
8002   if test "$with_png" = "yes"; then
8003     { test "$extra_verbose" = "yes" && cat << \EOF
8004     Defining HAVE_PNG
8005 EOF
8006 cat >> confdefs.h <<\EOF
8007 #define HAVE_PNG 1
8008 EOF
8009 }
8010
8011     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8012   fi
8013
8014     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8015 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8016 echo "configure:8017: checking for tiffio.h" >&5
8017
8018 cat > conftest.$ac_ext <<EOF
8019 #line 8020 "configure"
8020 #include "confdefs.h"
8021 #include <tiffio.h>
8022 EOF
8023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8024 { (eval echo configure:8025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8026 if test -z "$ac_err"; then
8027   rm -rf conftest*
8028   eval "ac_cv_header_$ac_safe=yes"
8029 else
8030   echo "$ac_err" >&5
8031   echo "configure: failed program was:" >&5
8032   cat conftest.$ac_ext >&5
8033   rm -rf conftest*
8034   eval "ac_cv_header_$ac_safe=no"
8035 fi
8036 rm -f conftest*
8037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8038   echo "$ac_t""yes" 1>&6
8039   :
8040 else
8041   echo "$ac_t""no" 1>&6
8042 with_tiff=no
8043 fi
8044  }
8045   test -z "$with_tiff" && { 
8046 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8047 echo "configure:8048: checking for TIFFClientOpen in -ltiff" >&5
8048 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8049
8050 xe_check_libs=" -ltiff "
8051 cat > conftest.$ac_ext <<EOF
8052 #line 8053 "configure"
8053 #include "confdefs.h"
8054 /* Override any gcc2 internal prototype to avoid an error.  */
8055 /* We use char because int might match the return type of a gcc2
8056     builtin and then its argument prototype would still apply.  */
8057 char TIFFClientOpen();
8058
8059 int main() {
8060 TIFFClientOpen()
8061 ; return 0; }
8062 EOF
8063 if { (eval echo configure:8064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8064   rm -rf conftest*
8065   eval "ac_cv_lib_$ac_lib_var=yes"
8066 else
8067   echo "configure: failed program was:" >&5
8068   cat conftest.$ac_ext >&5
8069   rm -rf conftest*
8070   eval "ac_cv_lib_$ac_lib_var=no"
8071 fi
8072 rm -f conftest*
8073 xe_check_libs=""
8074
8075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8076   echo "$ac_t""yes" 1>&6
8077   :
8078 else
8079   echo "$ac_t""no" 1>&6
8080 with_tiff=no
8081 fi
8082
8083  }
8084   test -z "$with_tiff" && with_tiff=yes
8085   if test "$with_tiff" = "yes"; then
8086     { test "$extra_verbose" = "yes" && cat << \EOF
8087     Defining HAVE_TIFF
8088 EOF
8089 cat >> confdefs.h <<\EOF
8090 #define HAVE_TIFF 1
8091 EOF
8092 }
8093
8094     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8095   fi
8096 fi
8097
8098
8099 if test "$with_x11" = "yes"; then
8100
8101   echo "checking for X11 graphics libraries" 1>&6
8102 echo "configure:8103: checking for X11 graphics libraries" >&5
8103
8104   echo "checking for the Athena widgets" 1>&6
8105 echo "configure:8106: checking for the Athena widgets" >&5
8106
8107     case "$with_athena" in
8108         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8109     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8110     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8111     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8112     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8113     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8114   esac
8115
8116     if test "$athena_3d" = "no"; then
8117     
8118 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8119 echo "configure:8120: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8120 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8121
8122 xe_check_libs=" -l$athena_variant "
8123 cat > conftest.$ac_ext <<EOF
8124 #line 8125 "configure"
8125 #include "confdefs.h"
8126 /* Override any gcc2 internal prototype to avoid an error.  */
8127 /* We use char because int might match the return type of a gcc2
8128     builtin and then its argument prototype would still apply.  */
8129 char XawScrollbarSetThumb();
8130
8131 int main() {
8132 XawScrollbarSetThumb()
8133 ; return 0; }
8134 EOF
8135 if { (eval echo configure:8136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8136   rm -rf conftest*
8137   eval "ac_cv_lib_$ac_lib_var=yes"
8138 else
8139   echo "configure: failed program was:" >&5
8140   cat conftest.$ac_ext >&5
8141   rm -rf conftest*
8142   eval "ac_cv_lib_$ac_lib_var=no"
8143 fi
8144 rm -f conftest*
8145 xe_check_libs=""
8146
8147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8148   echo "$ac_t""yes" 1>&6
8149           
8150 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8151 echo "configure:8152: checking for threeDClassRec in -l$athena_variant" >&5
8152 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8153
8154 xe_check_libs=" -l$athena_variant "
8155 cat > conftest.$ac_ext <<EOF
8156 #line 8157 "configure"
8157 #include "confdefs.h"
8158 /* Override any gcc2 internal prototype to avoid an error.  */
8159 /* We use char because int might match the return type of a gcc2
8160     builtin and then its argument prototype would still apply.  */
8161 char threeDClassRec();
8162
8163 int main() {
8164 threeDClassRec()
8165 ; return 0; }
8166 EOF
8167 if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8168   rm -rf conftest*
8169   eval "ac_cv_lib_$ac_lib_var=yes"
8170 else
8171   echo "configure: failed program was:" >&5
8172   cat conftest.$ac_ext >&5
8173   rm -rf conftest*
8174   eval "ac_cv_lib_$ac_lib_var=no"
8175 fi
8176 rm -f conftest*
8177 xe_check_libs=""
8178
8179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8180   echo "$ac_t""yes" 1>&6
8181   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8182 else
8183   echo "$ac_t""no" 1>&6
8184 athena_lib=$athena_variant
8185 fi
8186
8187
8188       
8189 else
8190   echo "$ac_t""no" 1>&6
8191 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8192 fi
8193
8194
8195   else
8196         
8197 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8198 echo "configure:8199: checking for threeDClassRec in -l$athena_variant" >&5
8199 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8200
8201 xe_check_libs=" -l$athena_variant "
8202 cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205 /* Override any gcc2 internal prototype to avoid an error.  */
8206 /* We use char because int might match the return type of a gcc2
8207     builtin and then its argument prototype would still apply.  */
8208 char threeDClassRec();
8209
8210 int main() {
8211 threeDClassRec()
8212 ; return 0; }
8213 EOF
8214 if { (eval echo configure:8215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8215   rm -rf conftest*
8216   eval "ac_cv_lib_$ac_lib_var=yes"
8217 else
8218   echo "configure: failed program was:" >&5
8219   cat conftest.$ac_ext >&5
8220   rm -rf conftest*
8221   eval "ac_cv_lib_$ac_lib_var=no"
8222 fi
8223 rm -f conftest*
8224 xe_check_libs=""
8225
8226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8227   echo "$ac_t""yes" 1>&6
8228   athena_lib=$athena_variant
8229 else
8230   echo "$ac_t""no" 1>&6
8231 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8232 echo "configure:8233: checking for threeDClassRec in -lXaw" >&5
8233 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8234
8235 xe_check_libs=" -lXaw "
8236 cat > conftest.$ac_ext <<EOF
8237 #line 8238 "configure"
8238 #include "confdefs.h"
8239 /* Override any gcc2 internal prototype to avoid an error.  */
8240 /* We use char because int might match the return type of a gcc2
8241     builtin and then its argument prototype would still apply.  */
8242 char threeDClassRec();
8243
8244 int main() {
8245 threeDClassRec()
8246 ; return 0; }
8247 EOF
8248 if { (eval echo configure:8249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8249   rm -rf conftest*
8250   eval "ac_cv_lib_$ac_lib_var=yes"
8251 else
8252   echo "configure: failed program was:" >&5
8253   cat conftest.$ac_ext >&5
8254   rm -rf conftest*
8255   eval "ac_cv_lib_$ac_lib_var=no"
8256 fi
8257 rm -f conftest*
8258 xe_check_libs=""
8259
8260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8261   echo "$ac_t""yes" 1>&6
8262   athena_lib=Xaw;
8263           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8264         
8265 else
8266   echo "$ac_t""no" 1>&6
8267 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8268 fi
8269
8270
8271 fi
8272
8273
8274   fi
8275
8276     if test "$athena_3d" = "no"; then
8277     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8278 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8279 echo "configure:8280: checking for X11/Xaw/ThreeD.h" >&5
8280
8281 cat > conftest.$ac_ext <<EOF
8282 #line 8283 "configure"
8283 #include "confdefs.h"
8284 #include <X11/Xaw/ThreeD.h>
8285 EOF
8286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8287 { (eval echo configure:8288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8289 if test -z "$ac_err"; then
8290   rm -rf conftest*
8291   eval "ac_cv_header_$ac_safe=yes"
8292 else
8293   echo "$ac_err" >&5
8294   echo "configure: failed program was:" >&5
8295   cat conftest.$ac_ext >&5
8296   rm -rf conftest*
8297   eval "ac_cv_header_$ac_safe=no"
8298 fi
8299 rm -f conftest*
8300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8301   echo "$ac_t""yes" 1>&6
8302   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8303 else
8304   echo "$ac_t""no" 1>&6
8305 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8306 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8307 echo "configure:8308: checking for X11/Xaw/XawInit.h" >&5
8308
8309 cat > conftest.$ac_ext <<EOF
8310 #line 8311 "configure"
8311 #include "confdefs.h"
8312 #include <X11/Xaw/XawInit.h>
8313 EOF
8314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8315 { (eval echo configure:8316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8317 if test -z "$ac_err"; then
8318   rm -rf conftest*
8319   eval "ac_cv_header_$ac_safe=yes"
8320 else
8321   echo "$ac_err" >&5
8322   echo "configure: failed program was:" >&5
8323   cat conftest.$ac_ext >&5
8324   rm -rf conftest*
8325   eval "ac_cv_header_$ac_safe=no"
8326 fi
8327 rm -f conftest*
8328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8329   echo "$ac_t""yes" 1>&6
8330   athena_h_path=X11/Xaw
8331 else
8332   echo "$ac_t""no" 1>&6
8333 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8334 fi
8335
8336 fi
8337
8338   else
8339             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8340 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8341 echo "configure:8342: checking for X11/$athena_variant/XawInit.h" >&5
8342
8343 cat > conftest.$ac_ext <<EOF
8344 #line 8345 "configure"
8345 #include "confdefs.h"
8346 #include <X11/$athena_variant/XawInit.h>
8347 EOF
8348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8349 { (eval echo configure:8350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8351 if test -z "$ac_err"; then
8352   rm -rf conftest*
8353   eval "ac_cv_header_$ac_safe=yes"
8354 else
8355   echo "$ac_err" >&5
8356   echo "configure: failed program was:" >&5
8357   cat conftest.$ac_ext >&5
8358   rm -rf conftest*
8359   eval "ac_cv_header_$ac_safe=no"
8360 fi
8361 rm -f conftest*
8362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8363   echo "$ac_t""yes" 1>&6
8364   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8365 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8366 echo "configure:8367: checking for X11/$athena_variant/ThreeD.h" >&5
8367
8368 cat > conftest.$ac_ext <<EOF
8369 #line 8370 "configure"
8370 #include "confdefs.h"
8371 #include <X11/$athena_variant/ThreeD.h>
8372 EOF
8373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8374 { (eval echo configure:8375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8376 if test -z "$ac_err"; then
8377   rm -rf conftest*
8378   eval "ac_cv_header_$ac_safe=yes"
8379 else
8380   echo "$ac_err" >&5
8381   echo "configure: failed program was:" >&5
8382   cat conftest.$ac_ext >&5
8383   rm -rf conftest*
8384   eval "ac_cv_header_$ac_safe=no"
8385 fi
8386 rm -f conftest*
8387 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8388   echo "$ac_t""yes" 1>&6
8389   athena_h_path=X11/$athena_variant
8390 else
8391   echo "$ac_t""no" 1>&6
8392 fi
8393
8394 else
8395   echo "$ac_t""no" 1>&6
8396 fi
8397
8398
8399         if test -z "$athena_h_path"; then
8400       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8401 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8402 echo "configure:8403: checking for $athena_variant/XawInit.h" >&5
8403
8404 cat > conftest.$ac_ext <<EOF
8405 #line 8406 "configure"
8406 #include "confdefs.h"
8407 #include <$athena_variant/XawInit.h>
8408 EOF
8409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8410 { (eval echo configure:8411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8412 if test -z "$ac_err"; then
8413   rm -rf conftest*
8414   eval "ac_cv_header_$ac_safe=yes"
8415 else
8416   echo "$ac_err" >&5
8417   echo "configure: failed program was:" >&5
8418   cat conftest.$ac_ext >&5
8419   rm -rf conftest*
8420   eval "ac_cv_header_$ac_safe=no"
8421 fi
8422 rm -f conftest*
8423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8424   echo "$ac_t""yes" 1>&6
8425   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8426 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8427 echo "configure:8428: checking for $athena_variant/ThreeD.h" >&5
8428
8429 cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432 #include <$athena_variant/ThreeD.h>
8433 EOF
8434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8435 { (eval echo configure:8436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8437 if test -z "$ac_err"; then
8438   rm -rf conftest*
8439   eval "ac_cv_header_$ac_safe=yes"
8440 else
8441   echo "$ac_err" >&5
8442   echo "configure: failed program was:" >&5
8443   cat conftest.$ac_ext >&5
8444   rm -rf conftest*
8445   eval "ac_cv_header_$ac_safe=no"
8446 fi
8447 rm -f conftest*
8448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8449   echo "$ac_t""yes" 1>&6
8450   athena_h_path=$athena_variant
8451 else
8452   echo "$ac_t""no" 1>&6
8453 fi
8454
8455 else
8456   echo "$ac_t""no" 1>&6
8457 fi
8458
8459     fi
8460
8461         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8462       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8463 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8464 echo "configure:8465: checking for X11/Xaw3d/XawInit.h" >&5
8465
8466 cat > conftest.$ac_ext <<EOF
8467 #line 8468 "configure"
8468 #include "confdefs.h"
8469 #include <X11/Xaw3d/XawInit.h>
8470 EOF
8471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8472 { (eval echo configure:8473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8474 if test -z "$ac_err"; then
8475   rm -rf conftest*
8476   eval "ac_cv_header_$ac_safe=yes"
8477 else
8478   echo "$ac_err" >&5
8479   echo "configure: failed program was:" >&5
8480   cat conftest.$ac_ext >&5
8481   rm -rf conftest*
8482   eval "ac_cv_header_$ac_safe=no"
8483 fi
8484 rm -f conftest*
8485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8486   echo "$ac_t""yes" 1>&6
8487   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8488 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8489 echo "configure:8490: checking for X11/Xaw3d/ThreeD.h" >&5
8490
8491 cat > conftest.$ac_ext <<EOF
8492 #line 8493 "configure"
8493 #include "confdefs.h"
8494 #include <X11/Xaw3d/ThreeD.h>
8495 EOF
8496 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8497 { (eval echo configure:8498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8498 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8499 if test -z "$ac_err"; then
8500   rm -rf conftest*
8501   eval "ac_cv_header_$ac_safe=yes"
8502 else
8503   echo "$ac_err" >&5
8504   echo "configure: failed program was:" >&5
8505   cat conftest.$ac_ext >&5
8506   rm -rf conftest*
8507   eval "ac_cv_header_$ac_safe=no"
8508 fi
8509 rm -f conftest*
8510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8511   echo "$ac_t""yes" 1>&6
8512   
8513             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8514             athena_h_path=X11/Xaw3d
8515           
8516 else
8517   echo "$ac_t""no" 1>&6
8518 fi
8519
8520 else
8521   echo "$ac_t""no" 1>&6
8522 fi
8523
8524     fi
8525
8526         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8527       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8528 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8529 echo "configure:8530: checking for Xaw3d/XawInit.h" >&5
8530
8531 cat > conftest.$ac_ext <<EOF
8532 #line 8533 "configure"
8533 #include "confdefs.h"
8534 #include <Xaw3d/XawInit.h>
8535 EOF
8536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8537 { (eval echo configure:8538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8539 if test -z "$ac_err"; then
8540   rm -rf conftest*
8541   eval "ac_cv_header_$ac_safe=yes"
8542 else
8543   echo "$ac_err" >&5
8544   echo "configure: failed program was:" >&5
8545   cat conftest.$ac_ext >&5
8546   rm -rf conftest*
8547   eval "ac_cv_header_$ac_safe=no"
8548 fi
8549 rm -f conftest*
8550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8551   echo "$ac_t""yes" 1>&6
8552   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8553 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8554 echo "configure:8555: checking for Xaw3d/ThreeD.h" >&5
8555
8556 cat > conftest.$ac_ext <<EOF
8557 #line 8558 "configure"
8558 #include "confdefs.h"
8559 #include <Xaw3d/ThreeD.h>
8560 EOF
8561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8562 { (eval echo configure:8563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8564 if test -z "$ac_err"; then
8565   rm -rf conftest*
8566   eval "ac_cv_header_$ac_safe=yes"
8567 else
8568   echo "$ac_err" >&5
8569   echo "configure: failed program was:" >&5
8570   cat conftest.$ac_ext >&5
8571   rm -rf conftest*
8572   eval "ac_cv_header_$ac_safe=no"
8573 fi
8574 rm -f conftest*
8575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8576   echo "$ac_t""yes" 1>&6
8577   
8578             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8579             athena_h_path=Xaw3d
8580           
8581 else
8582   echo "$ac_t""no" 1>&6
8583 fi
8584
8585 else
8586   echo "$ac_t""no" 1>&6
8587 fi
8588
8589     fi
8590
8591             if test -z "$athena_h_path"; then
8592       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8593 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8594 echo "configure:8595: checking for X11/Xaw/ThreeD.h" >&5
8595
8596 cat > conftest.$ac_ext <<EOF
8597 #line 8598 "configure"
8598 #include "confdefs.h"
8599 #include <X11/Xaw/ThreeD.h>
8600 EOF
8601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8602 { (eval echo configure:8603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8604 if test -z "$ac_err"; then
8605   rm -rf conftest*
8606   eval "ac_cv_header_$ac_safe=yes"
8607 else
8608   echo "$ac_err" >&5
8609   echo "configure: failed program was:" >&5
8610   cat conftest.$ac_ext >&5
8611   rm -rf conftest*
8612   eval "ac_cv_header_$ac_safe=no"
8613 fi
8614 rm -f conftest*
8615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8616   echo "$ac_t""yes" 1>&6
8617   
8618           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8619           athena_h_path=X11/Xaw
8620         
8621 else
8622   echo "$ac_t""no" 1>&6
8623 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8624 fi
8625
8626     fi
8627   fi
8628
8629     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8630     have_xaw=yes
8631   else
8632     have_xaw=no
8633   fi
8634
8635     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8636 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8637 echo "configure:8638: checking for Xm/Xm.h" >&5
8638
8639 cat > conftest.$ac_ext <<EOF
8640 #line 8641 "configure"
8641 #include "confdefs.h"
8642 #include <Xm/Xm.h>
8643 EOF
8644 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8645 { (eval echo configure:8646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8646 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8647 if test -z "$ac_err"; then
8648   rm -rf conftest*
8649   eval "ac_cv_header_$ac_safe=yes"
8650 else
8651   echo "$ac_err" >&5
8652   echo "configure: failed program was:" >&5
8653   cat conftest.$ac_ext >&5
8654   rm -rf conftest*
8655   eval "ac_cv_header_$ac_safe=no"
8656 fi
8657 rm -f conftest*
8658 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8659   echo "$ac_t""yes" 1>&6
8660   
8661 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8662 echo "configure:8663: checking for XmStringFree in -lXm" >&5
8663 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8664
8665 xe_check_libs=" -lXm "
8666 cat > conftest.$ac_ext <<EOF
8667 #line 8668 "configure"
8668 #include "confdefs.h"
8669 /* Override any gcc2 internal prototype to avoid an error.  */
8670 /* We use char because int might match the return type of a gcc2
8671     builtin and then its argument prototype would still apply.  */
8672 char XmStringFree();
8673
8674 int main() {
8675 XmStringFree()
8676 ; return 0; }
8677 EOF
8678 if { (eval echo configure:8679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8679   rm -rf conftest*
8680   eval "ac_cv_lib_$ac_lib_var=yes"
8681 else
8682   echo "configure: failed program was:" >&5
8683   cat conftest.$ac_ext >&5
8684   rm -rf conftest*
8685   eval "ac_cv_lib_$ac_lib_var=no"
8686 fi
8687 rm -f conftest*
8688 xe_check_libs=""
8689
8690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8691   echo "$ac_t""yes" 1>&6
8692   have_motif=yes
8693 else
8694   echo "$ac_t""no" 1>&6
8695 have_motif=no
8696 fi
8697
8698
8699 else
8700   echo "$ac_t""no" 1>&6
8701 have_motif=no
8702 fi
8703
8704
8705   if test "$have_motif" = "yes"; then
8706         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8707 echo "configure:8708: checking for Lesstif" >&5
8708     cat > conftest.$ac_ext <<EOF
8709 #line 8710 "configure"
8710 #include "confdefs.h"
8711 #include <Xm/Xm.h>
8712 #ifdef LESSTIF_VERSION
8713 yes
8714 #endif
8715
8716 EOF
8717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8718   egrep "yes" >/dev/null 2>&1; then
8719   rm -rf conftest*
8720   have_lesstif=yes
8721 else
8722   rm -rf conftest*
8723   have_lesstif=no
8724 fi
8725 rm -f conftest*
8726
8727   echo "$ac_t""$have_lesstif" 1>&6
8728   fi
8729
8730 fi 
8731
8732 case "$with_menubars" in "" | "yes" | "athena" )
8733   with_menubars="lucid" ;;
8734 esac
8735 case "$with_dialogs" in "" | "yes" | "lucid" )
8736   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8737   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8738   else with_dialogs=no
8739   fi ;;
8740 esac
8741 case "$with_scrollbars" in "" | "yes" )
8742   with_scrollbars="lucid" ;;
8743 esac
8744 case "$with_widgets" in "" | "yes" | "lucid")
8745   if   test "$have_motif" = "yes"; then with_widgets="motif"
8746   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8747   else with_widgets=no
8748   fi ;;
8749 esac
8750
8751 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8752
8753 case "$all_widgets" in
8754   *athena* )
8755     if test "$have_xaw" != "yes"; then
8756       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8757     fi
8758
8759         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8760
8761         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8762
8763             { test "$extra_verbose" = "yes" && cat << EOF
8764     Defining ATHENA_H_PATH = $athena_h_path
8765 EOF
8766 cat >> confdefs.h <<EOF
8767 #define ATHENA_H_PATH $athena_h_path
8768 EOF
8769 }
8770
8771
8772     { test "$extra_verbose" = "yes" && cat << \EOF
8773     Defining LWLIB_USES_ATHENA
8774 EOF
8775 cat >> confdefs.h <<\EOF
8776 #define LWLIB_USES_ATHENA 1
8777 EOF
8778 }
8779
8780     { test "$extra_verbose" = "yes" && cat << \EOF
8781     Defining NEED_ATHENA
8782 EOF
8783 cat >> confdefs.h <<\EOF
8784 #define NEED_ATHENA 1
8785 EOF
8786 }
8787
8788
8789     if test "$athena_3d" = "yes"; then
8790       { test "$extra_verbose" = "yes" && cat << \EOF
8791     Defining HAVE_ATHENA_3D
8792 EOF
8793 cat >> confdefs.h <<\EOF
8794 #define HAVE_ATHENA_3D 1
8795 EOF
8796 }
8797
8798     fi
8799   ;;
8800 esac
8801
8802 case "$all_widgets" in *motif* )
8803   { test "$extra_verbose" = "yes" && cat << \EOF
8804     Defining LWLIB_USES_MOTIF
8805 EOF
8806 cat >> confdefs.h <<\EOF
8807 #define LWLIB_USES_MOTIF 1
8808 EOF
8809 }
8810
8811   { test "$extra_verbose" = "yes" && cat << \EOF
8812     Defining NEED_MOTIF
8813 EOF
8814 cat >> confdefs.h <<\EOF
8815 #define NEED_MOTIF 1
8816 EOF
8817 }
8818
8819   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8820   need_motif=yes ;;
8821 esac
8822
8823 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8824 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8825 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8826 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8827         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8828 case "$with_widgets" in athena* )
8829         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;;
8830 esac
8831 case "$all_widgets" in *lucid* )
8832   { test "$extra_verbose" = "yes" && cat << \EOF
8833     Defining NEED_LUCID
8834 EOF
8835 cat >> confdefs.h <<\EOF
8836 #define NEED_LUCID 1
8837 EOF
8838 }
8839
8840   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8841 esac
8842
8843
8844
8845 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8846     Defining LWLIB_SCROLLBARS_ATHENA
8847 EOF
8848 cat >> confdefs.h <<\EOF
8849 #define LWLIB_SCROLLBARS_ATHENA 1
8850 EOF
8851 }
8852
8853 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8854     Defining LWLIB_DIALOGS_ATHENA
8855 EOF
8856 cat >> confdefs.h <<\EOF
8857 #define LWLIB_DIALOGS_ATHENA 1
8858 EOF
8859 }
8860
8861
8862 if test "$athena_3d" = "yes"; then
8863   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8864     Defining LWLIB_SCROLLBARS_ATHENA3D
8865 EOF
8866 cat >> confdefs.h <<\EOF
8867 #define LWLIB_SCROLLBARS_ATHENA3D 1
8868 EOF
8869 }
8870
8871   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8872     Defining LWLIB_DIALOGS_ATHENA3D
8873 EOF
8874 cat >> confdefs.h <<\EOF
8875 #define LWLIB_DIALOGS_ATHENA3D 1
8876 EOF
8877 }
8878
8879 fi
8880
8881 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8882     Defining LWLIB_WIDGETS_ATHENA
8883 EOF
8884 cat >> confdefs.h <<\EOF
8885 #define LWLIB_WIDGETS_ATHENA 1
8886 EOF
8887 }
8888 ;; esac
8889 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8890         { test "$extra_verbose" = "yes" && cat << \EOF
8891     Defining LWLIB_TABS_LUCID
8892 EOF
8893 cat >> confdefs.h <<\EOF
8894 #define LWLIB_TABS_LUCID 1
8895 EOF
8896 }
8897
8898
8899 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8900     Defining HAVE_MENUBARS
8901 EOF
8902 cat >> confdefs.h <<\EOF
8903 #define HAVE_MENUBARS 1
8904 EOF
8905 }
8906
8907 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8908     Defining HAVE_SCROLLBARS
8909 EOF
8910 cat >> confdefs.h <<\EOF
8911 #define HAVE_SCROLLBARS 1
8912 EOF
8913 }
8914
8915 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8916     Defining HAVE_DIALOGS
8917 EOF
8918 cat >> confdefs.h <<\EOF
8919 #define HAVE_DIALOGS 1
8920 EOF
8921 }
8922
8923 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8924     Defining HAVE_TOOLBARS
8925 EOF
8926 cat >> confdefs.h <<\EOF
8927 #define HAVE_TOOLBARS 1
8928 EOF
8929 }
8930
8931 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8932     Defining HAVE_WIDGETS
8933 EOF
8934 cat >> confdefs.h <<\EOF
8935 #define HAVE_WIDGETS 1
8936 EOF
8937 }
8938
8939
8940 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8941     Defining LWLIB_MENUBARS_LUCID
8942 EOF
8943 cat >> confdefs.h <<\EOF
8944 #define LWLIB_MENUBARS_LUCID 1
8945 EOF
8946 }
8947
8948 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8949     Defining LWLIB_SCROLLBARS_LUCID
8950 EOF
8951 cat >> confdefs.h <<\EOF
8952 #define LWLIB_SCROLLBARS_LUCID 1
8953 EOF
8954 }
8955
8956
8957 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8958     Defining LWLIB_MENUBARS_MOTIF
8959 EOF
8960 cat >> confdefs.h <<\EOF
8961 #define LWLIB_MENUBARS_MOTIF 1
8962 EOF
8963 }
8964
8965 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8966     Defining LWLIB_SCROLLBARS_MOTIF
8967 EOF
8968 cat >> confdefs.h <<\EOF
8969 #define LWLIB_SCROLLBARS_MOTIF 1
8970 EOF
8971 }
8972
8973 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8974     Defining LWLIB_DIALOGS_MOTIF
8975 EOF
8976 cat >> confdefs.h <<\EOF
8977 #define LWLIB_DIALOGS_MOTIF 1
8978 EOF
8979 }
8980
8981 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8982     Defining LWLIB_WIDGETS_MOTIF
8983 EOF
8984 cat >> confdefs.h <<\EOF
8985 #define LWLIB_WIDGETS_MOTIF 1
8986 EOF
8987 }
8988
8989
8990 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
8991    echo "    xemacs will be linked with \"menubar.o\""
8992  fi
8993 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
8994    echo "    xemacs will be linked with \"scrollbar.o\""
8995  fi
8996 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
8997    echo "    xemacs will be linked with \"dialog.o\""
8998  fi
8999 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9000    echo "    xemacs will be linked with \"toolbar.o\""
9001  fi
9002
9003 if test "$with_x11" = "yes"; then
9004   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9005    echo "    xemacs will be linked with \"menubar-x.o\""
9006  fi
9007   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9008    echo "    xemacs will be linked with \"scrollbar-x.o\""
9009  fi
9010   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9011    echo "    xemacs will be linked with \"dialog-x.o\""
9012  fi
9013   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9014    echo "    xemacs will be linked with \"toolbar-x.o\""
9015  fi
9016   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9017    echo "    xemacs will be linked with \"gui-x.o\""
9018  fi
9019 fi
9020
9021
9022 test -z "$with_mule" && with_mule=no
9023 test -z "$with_file_coding" && with_file_coding=no
9024
9025
9026 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9027   { test "$extra_verbose" = "yes" && cat << \EOF
9028     Defining FILE_CODING
9029 EOF
9030 cat >> confdefs.h <<\EOF
9031 #define FILE_CODING 1
9032 EOF
9033 }
9034
9035   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9036    echo "    xemacs will be linked with \"file-coding.o\""
9037  fi
9038 fi
9039
9040 if test "$with_mule" = "yes" ; then
9041   echo "checking for Mule-related features" 1>&6
9042 echo "configure:9043: checking for Mule-related features" >&5
9043   { test "$extra_verbose" = "yes" && cat << \EOF
9044     Defining MULE
9045 EOF
9046 cat >> confdefs.h <<\EOF
9047 #define MULE 1
9048 EOF
9049 }
9050
9051   { test "$extra_verbose" = "yes" && cat << \EOF
9052     Defining FILE_CODING
9053 EOF
9054 cat >> confdefs.h <<\EOF
9055 #define FILE_CODING 1
9056 EOF
9057 }
9058
9059   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9060    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9061  fi
9062
9063     for ac_hdr in libintl.h
9064 do
9065 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9066 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9067 echo "configure:9068: checking for $ac_hdr" >&5
9068
9069 cat > conftest.$ac_ext <<EOF
9070 #line 9071 "configure"
9071 #include "confdefs.h"
9072 #include <$ac_hdr>
9073 EOF
9074 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9075 { (eval echo configure:9076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9076 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9077 if test -z "$ac_err"; then
9078   rm -rf conftest*
9079   eval "ac_cv_header_$ac_safe=yes"
9080 else
9081   echo "$ac_err" >&5
9082   echo "configure: failed program was:" >&5
9083   cat conftest.$ac_ext >&5
9084   rm -rf conftest*
9085   eval "ac_cv_header_$ac_safe=no"
9086 fi
9087 rm -f conftest*
9088 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9089   echo "$ac_t""yes" 1>&6
9090     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9091   { test "$extra_verbose" = "yes" && cat << EOF
9092     Defining $ac_tr_hdr
9093 EOF
9094 cat >> confdefs.h <<EOF
9095 #define $ac_tr_hdr 1
9096 EOF
9097 }
9098  
9099 else
9100   echo "$ac_t""no" 1>&6
9101 fi
9102 done
9103
9104   
9105 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9106 echo "configure:9107: checking for strerror in -lintl" >&5
9107 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9108
9109 xe_check_libs=" -lintl "
9110 cat > conftest.$ac_ext <<EOF
9111 #line 9112 "configure"
9112 #include "confdefs.h"
9113 /* Override any gcc2 internal prototype to avoid an error.  */
9114 /* We use char because int might match the return type of a gcc2
9115     builtin and then its argument prototype would still apply.  */
9116 char strerror();
9117
9118 int main() {
9119 strerror()
9120 ; return 0; }
9121 EOF
9122 if { (eval echo configure:9123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9123   rm -rf conftest*
9124   eval "ac_cv_lib_$ac_lib_var=yes"
9125 else
9126   echo "configure: failed program was:" >&5
9127   cat conftest.$ac_ext >&5
9128   rm -rf conftest*
9129   eval "ac_cv_lib_$ac_lib_var=no"
9130 fi
9131 rm -f conftest*
9132 xe_check_libs=""
9133
9134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9135   echo "$ac_t""yes" 1>&6
9136     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9137     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9138   { test "$extra_verbose" = "yes" && cat << EOF
9139     Defining $ac_tr_lib
9140 EOF
9141 cat >> confdefs.h <<EOF
9142 #define $ac_tr_lib 1
9143 EOF
9144 }
9145
9146   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9147
9148 else
9149   echo "$ac_t""no" 1>&6
9150 fi
9151
9152
9153
9154   echo "checking for Mule input methods" 1>&6
9155 echo "configure:9156: checking for Mule input methods" >&5
9156         case "$with_xim" in "" | "yes" )
9157     echo "checking for XIM" 1>&6
9158 echo "configure:9159: checking for XIM" >&5
9159     
9160 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9161 echo "configure:9162: checking for XOpenIM in -lX11" >&5
9162 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9163
9164 xe_check_libs=" -lX11 "
9165 cat > conftest.$ac_ext <<EOF
9166 #line 9167 "configure"
9167 #include "confdefs.h"
9168 /* Override any gcc2 internal prototype to avoid an error.  */
9169 /* We use char because int might match the return type of a gcc2
9170     builtin and then its argument prototype would still apply.  */
9171 char XOpenIM();
9172
9173 int main() {
9174 XOpenIM()
9175 ; return 0; }
9176 EOF
9177 if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9178   rm -rf conftest*
9179   eval "ac_cv_lib_$ac_lib_var=yes"
9180 else
9181   echo "configure: failed program was:" >&5
9182   cat conftest.$ac_ext >&5
9183   rm -rf conftest*
9184   eval "ac_cv_lib_$ac_lib_var=no"
9185 fi
9186 rm -f conftest*
9187 xe_check_libs=""
9188
9189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9190   echo "$ac_t""yes" 1>&6
9191   with_xim=xlib
9192 else
9193   echo "$ac_t""no" 1>&6
9194 with_xim=no
9195 fi
9196
9197
9198         if test "$have_motif $have_lesstif" = "yes no"; then
9199       
9200 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9201 echo "configure:9202: checking for XmImMbLookupString in -lXm" >&5
9202 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9203
9204 xe_check_libs=" -lXm "
9205 cat > conftest.$ac_ext <<EOF
9206 #line 9207 "configure"
9207 #include "confdefs.h"
9208 /* Override any gcc2 internal prototype to avoid an error.  */
9209 /* We use char because int might match the return type of a gcc2
9210     builtin and then its argument prototype would still apply.  */
9211 char XmImMbLookupString();
9212
9213 int main() {
9214 XmImMbLookupString()
9215 ; return 0; }
9216 EOF
9217 if { (eval echo configure:9218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9218   rm -rf conftest*
9219   eval "ac_cv_lib_$ac_lib_var=yes"
9220 else
9221   echo "configure: failed program was:" >&5
9222   cat conftest.$ac_ext >&5
9223   rm -rf conftest*
9224   eval "ac_cv_lib_$ac_lib_var=no"
9225 fi
9226 rm -f conftest*
9227 xe_check_libs=""
9228
9229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9230   echo "$ac_t""yes" 1>&6
9231   with_xim=motif
9232 else
9233   echo "$ac_t""no" 1>&6
9234 fi
9235
9236
9237     fi ;;
9238   esac
9239   if test "$with_xim" != "no"; then
9240     { test "$extra_verbose" = "yes" && cat << \EOF
9241     Defining HAVE_XIM
9242 EOF
9243 cat >> confdefs.h <<\EOF
9244 #define HAVE_XIM 1
9245 EOF
9246 }
9247
9248     if test "$with_xim" = "xlib"; then
9249       { test "$extra_verbose" = "yes" && cat << \EOF
9250     Defining XIM_XLIB
9251 EOF
9252 cat >> confdefs.h <<\EOF
9253 #define XIM_XLIB 1
9254 EOF
9255 }
9256
9257       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9258    echo "    xemacs will be linked with \"input-method-xlib.o\""
9259  fi
9260     fi
9261     if test "$with_xim" = "motif"; then
9262       { test "$extra_verbose" = "yes" && cat << \EOF
9263     Defining XIM_MOTIF
9264 EOF
9265 cat >> confdefs.h <<\EOF
9266 #define XIM_MOTIF 1
9267 EOF
9268 }
9269
9270       need_motif=yes
9271       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9272    echo "    xemacs will be linked with \"input-method-motif.o\""
9273  fi
9274     fi
9275     if test "$with_xim" = "motif"; then
9276       with_xfs=no
9277     fi
9278   fi
9279
9280     if test "$with_xfs" = "yes" ; then
9281     echo "checking for XFontSet" 1>&6
9282 echo "configure:9283: checking for XFontSet" >&5
9283     
9284 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9285 echo "configure:9286: checking for XmbDrawString in -lX11" >&5
9286 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9287
9288 xe_check_libs=" -lX11 "
9289 cat > conftest.$ac_ext <<EOF
9290 #line 9291 "configure"
9291 #include "confdefs.h"
9292 /* Override any gcc2 internal prototype to avoid an error.  */
9293 /* We use char because int might match the return type of a gcc2
9294     builtin and then its argument prototype would still apply.  */
9295 char XmbDrawString();
9296
9297 int main() {
9298 XmbDrawString()
9299 ; return 0; }
9300 EOF
9301 if { (eval echo configure:9302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9302   rm -rf conftest*
9303   eval "ac_cv_lib_$ac_lib_var=yes"
9304 else
9305   echo "configure: failed program was:" >&5
9306   cat conftest.$ac_ext >&5
9307   rm -rf conftest*
9308   eval "ac_cv_lib_$ac_lib_var=no"
9309 fi
9310 rm -f conftest*
9311 xe_check_libs=""
9312
9313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9314   echo "$ac_t""yes" 1>&6
9315   :
9316 else
9317   echo "$ac_t""no" 1>&6
9318 with_xfs=no
9319 fi
9320
9321
9322     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9323       { test "$extra_verbose" = "yes" && cat << \EOF
9324     Defining USE_XFONTSET
9325 EOF
9326 cat >> confdefs.h <<\EOF
9327 #define USE_XFONTSET 1
9328 EOF
9329 }
9330
9331       if test "$with_xim" = "no" ; then
9332         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
9333    echo "    xemacs will be linked with \"input-method-xfs.o\""
9334  fi
9335       fi
9336     fi
9337   fi 
9338     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9339   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9340 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9341 echo "configure:9342: checking for wnn/jllib.h" >&5
9342
9343 cat > conftest.$ac_ext <<EOF
9344 #line 9345 "configure"
9345 #include "confdefs.h"
9346 #include <wnn/jllib.h>
9347 EOF
9348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9349 { (eval echo configure:9350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9351 if test -z "$ac_err"; then
9352   rm -rf conftest*
9353   eval "ac_cv_header_$ac_safe=yes"
9354 else
9355   echo "$ac_err" >&5
9356   echo "configure: failed program was:" >&5
9357   cat conftest.$ac_ext >&5
9358   rm -rf conftest*
9359   eval "ac_cv_header_$ac_safe=no"
9360 fi
9361 rm -f conftest*
9362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9363   echo "$ac_t""yes" 1>&6
9364   :
9365 else
9366   echo "$ac_t""no" 1>&6
9367 with_wnn=no
9368 fi
9369  }
9370     if test "$with_wnn" != "no"; then
9371     for ac_func in crypt
9372 do
9373 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9374 echo "configure:9375: checking for $ac_func" >&5
9375
9376 cat > conftest.$ac_ext <<EOF
9377 #line 9378 "configure"
9378 #include "confdefs.h"
9379 /* System header to define __stub macros and hopefully few prototypes,
9380     which can conflict with char $ac_func(); below.  */
9381 #include <assert.h>
9382 /* Override any gcc2 internal prototype to avoid an error.  */
9383 /* We use char because int might match the return type of a gcc2
9384     builtin and then its argument prototype would still apply.  */
9385 char $ac_func();
9386
9387 int main() {
9388
9389 /* The GNU C library defines this for functions which it implements
9390     to always fail with ENOSYS.  Some functions are actually named
9391     something starting with __ and the normal name is an alias.  */
9392 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9393 choke me
9394 #else
9395 $ac_func();
9396 #endif
9397
9398 ; return 0; }
9399 EOF
9400 if { (eval echo configure:9401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9401   rm -rf conftest*
9402   eval "ac_cv_func_$ac_func=yes"
9403 else
9404   echo "configure: failed program was:" >&5
9405   cat conftest.$ac_ext >&5
9406   rm -rf conftest*
9407   eval "ac_cv_func_$ac_func=no"
9408 fi
9409 rm -f conftest*
9410
9411 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9412   echo "$ac_t""yes" 1>&6
9413     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9414   { test "$extra_verbose" = "yes" && cat << EOF
9415     Defining $ac_tr_func
9416 EOF
9417 cat >> confdefs.h <<EOF
9418 #define $ac_tr_func 1
9419 EOF
9420 }
9421  
9422 else
9423   echo "$ac_t""no" 1>&6
9424 fi
9425 done
9426
9427     test "$ac_cv_func_crypt" != "yes" && { 
9428 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9429 echo "configure:9430: checking for crypt in -lcrypt" >&5
9430 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9431
9432 xe_check_libs=" -lcrypt "
9433 cat > conftest.$ac_ext <<EOF
9434 #line 9435 "configure"
9435 #include "confdefs.h"
9436 /* Override any gcc2 internal prototype to avoid an error.  */
9437 /* We use char because int might match the return type of a gcc2
9438     builtin and then its argument prototype would still apply.  */
9439 char crypt();
9440
9441 int main() {
9442 crypt()
9443 ; return 0; }
9444 EOF
9445 if { (eval echo configure:9446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9446   rm -rf conftest*
9447   eval "ac_cv_lib_$ac_lib_var=yes"
9448 else
9449   echo "configure: failed program was:" >&5
9450   cat conftest.$ac_ext >&5
9451   rm -rf conftest*
9452   eval "ac_cv_lib_$ac_lib_var=no"
9453 fi
9454 rm -f conftest*
9455 xe_check_libs=""
9456
9457 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9458   echo "$ac_t""yes" 1>&6
9459     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9460     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9461   { test "$extra_verbose" = "yes" && cat << EOF
9462     Defining $ac_tr_lib
9463 EOF
9464 cat >> confdefs.h <<EOF
9465 #define $ac_tr_lib 1
9466 EOF
9467 }
9468
9469   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9470
9471 else
9472   echo "$ac_t""no" 1>&6
9473 fi
9474
9475  }
9476   fi
9477     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9478     
9479 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9480 echo "configure:9481: checking for jl_dic_list_e in -lwnn" >&5
9481 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9482
9483 xe_check_libs=" -lwnn "
9484 cat > conftest.$ac_ext <<EOF
9485 #line 9486 "configure"
9486 #include "confdefs.h"
9487 /* Override any gcc2 internal prototype to avoid an error.  */
9488 /* We use char because int might match the return type of a gcc2
9489     builtin and then its argument prototype would still apply.  */
9490 char jl_dic_list_e();
9491
9492 int main() {
9493 jl_dic_list_e()
9494 ; return 0; }
9495 EOF
9496 if { (eval echo configure:9497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9497   rm -rf conftest*
9498   eval "ac_cv_lib_$ac_lib_var=yes"
9499 else
9500   echo "configure: failed program was:" >&5
9501   cat conftest.$ac_ext >&5
9502   rm -rf conftest*
9503   eval "ac_cv_lib_$ac_lib_var=no"
9504 fi
9505 rm -f conftest*
9506 xe_check_libs=""
9507
9508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9509   echo "$ac_t""yes" 1>&6
9510   libwnn=wnn
9511 else
9512   echo "$ac_t""no" 1>&6
9513 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9514 echo "configure:9515: checking for jl_dic_list_e in -lwnn4" >&5
9515 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9516
9517 xe_check_libs=" -lwnn4 "
9518 cat > conftest.$ac_ext <<EOF
9519 #line 9520 "configure"
9520 #include "confdefs.h"
9521 /* Override any gcc2 internal prototype to avoid an error.  */
9522 /* We use char because int might match the return type of a gcc2
9523     builtin and then its argument prototype would still apply.  */
9524 char jl_dic_list_e();
9525
9526 int main() {
9527 jl_dic_list_e()
9528 ; return 0; }
9529 EOF
9530 if { (eval echo configure:9531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9531   rm -rf conftest*
9532   eval "ac_cv_lib_$ac_lib_var=yes"
9533 else
9534   echo "configure: failed program was:" >&5
9535   cat conftest.$ac_ext >&5
9536   rm -rf conftest*
9537   eval "ac_cv_lib_$ac_lib_var=no"
9538 fi
9539 rm -f conftest*
9540 xe_check_libs=""
9541
9542 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9543   echo "$ac_t""yes" 1>&6
9544   libwnn=wnn4
9545 else
9546   echo "$ac_t""no" 1>&6
9547 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9548 echo "configure:9549: checking for jl_dic_list_e in -lwnn6" >&5
9549 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9550
9551 xe_check_libs=" -lwnn6 "
9552 cat > conftest.$ac_ext <<EOF
9553 #line 9554 "configure"
9554 #include "confdefs.h"
9555 /* Override any gcc2 internal prototype to avoid an error.  */
9556 /* We use char because int might match the return type of a gcc2
9557     builtin and then its argument prototype would still apply.  */
9558 char jl_dic_list_e();
9559
9560 int main() {
9561 jl_dic_list_e()
9562 ; return 0; }
9563 EOF
9564 if { (eval echo configure:9565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9565   rm -rf conftest*
9566   eval "ac_cv_lib_$ac_lib_var=yes"
9567 else
9568   echo "configure: failed program was:" >&5
9569   cat conftest.$ac_ext >&5
9570   rm -rf conftest*
9571   eval "ac_cv_lib_$ac_lib_var=no"
9572 fi
9573 rm -f conftest*
9574 xe_check_libs=""
9575
9576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9577   echo "$ac_t""yes" 1>&6
9578   libwnn=wnn6
9579 else
9580   echo "$ac_t""no" 1>&6
9581 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9582 echo "configure:9583: checking for dic_list_e in -lwnn6_fromsrc" >&5
9583 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9584
9585 xe_check_libs=" -lwnn6_fromsrc "
9586 cat > conftest.$ac_ext <<EOF
9587 #line 9588 "configure"
9588 #include "confdefs.h"
9589 /* Override any gcc2 internal prototype to avoid an error.  */
9590 /* We use char because int might match the return type of a gcc2
9591     builtin and then its argument prototype would still apply.  */
9592 char dic_list_e();
9593
9594 int main() {
9595 dic_list_e()
9596 ; return 0; }
9597 EOF
9598 if { (eval echo configure:9599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9599   rm -rf conftest*
9600   eval "ac_cv_lib_$ac_lib_var=yes"
9601 else
9602   echo "configure: failed program was:" >&5
9603   cat conftest.$ac_ext >&5
9604   rm -rf conftest*
9605   eval "ac_cv_lib_$ac_lib_var=no"
9606 fi
9607 rm -f conftest*
9608 xe_check_libs=""
9609
9610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9611   echo "$ac_t""yes" 1>&6
9612   libwnn=wnn6_fromsrc
9613 else
9614   echo "$ac_t""no" 1>&6
9615 with_wnn=no
9616 fi
9617
9618
9619 fi
9620
9621
9622 fi
9623
9624
9625 fi
9626
9627
9628   fi
9629   test -z "$with_wnn" && with_wnn=yes
9630   if test "$with_wnn" = "yes"; then
9631     { test "$extra_verbose" = "yes" && cat << \EOF
9632     Defining HAVE_WNN
9633 EOF
9634 cat >> confdefs.h <<\EOF
9635 #define HAVE_WNN 1
9636 EOF
9637 }
9638
9639     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9640     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9641    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9642  fi
9643     if test "$with_wnn6" != "no"; then
9644       
9645 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9646 echo "configure:9647: checking for jl_fi_dic_list in -l$libwnn" >&5
9647 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9648
9649 xe_check_libs=" -l$libwnn "
9650 cat > conftest.$ac_ext <<EOF
9651 #line 9652 "configure"
9652 #include "confdefs.h"
9653 /* Override any gcc2 internal prototype to avoid an error.  */
9654 /* We use char because int might match the return type of a gcc2
9655     builtin and then its argument prototype would still apply.  */
9656 char jl_fi_dic_list();
9657
9658 int main() {
9659 jl_fi_dic_list()
9660 ; return 0; }
9661 EOF
9662 if { (eval echo configure:9663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9663   rm -rf conftest*
9664   eval "ac_cv_lib_$ac_lib_var=yes"
9665 else
9666   echo "configure: failed program was:" >&5
9667   cat conftest.$ac_ext >&5
9668   rm -rf conftest*
9669   eval "ac_cv_lib_$ac_lib_var=no"
9670 fi
9671 rm -f conftest*
9672 xe_check_libs=""
9673
9674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9675   echo "$ac_t""yes" 1>&6
9676   with_wnn6=yes
9677 else
9678   echo "$ac_t""no" 1>&6
9679 fi
9680
9681
9682       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9683     Defining WNN6
9684 EOF
9685 cat >> confdefs.h <<\EOF
9686 #define WNN6 1
9687 EOF
9688 }
9689
9690     fi
9691   fi
9692
9693     canna_includes_found=no
9694   if test "$with_canna" != "no"; then
9695     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9696 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9697 echo "configure:9698: checking for canna/jrkanji.h" >&5
9698
9699 cat > conftest.$ac_ext <<EOF
9700 #line 9701 "configure"
9701 #include "confdefs.h"
9702 #include <canna/jrkanji.h>
9703 EOF
9704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9705 { (eval echo configure:9706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9707 if test -z "$ac_err"; then
9708   rm -rf conftest*
9709   eval "ac_cv_header_$ac_safe=yes"
9710 else
9711   echo "$ac_err" >&5
9712   echo "configure: failed program was:" >&5
9713   cat conftest.$ac_ext >&5
9714   rm -rf conftest*
9715   eval "ac_cv_header_$ac_safe=no"
9716 fi
9717 rm -f conftest*
9718 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9719   echo "$ac_t""yes" 1>&6
9720   canna_includes_found=yes
9721 else
9722   echo "$ac_t""no" 1>&6
9723 fi
9724
9725   fi
9726   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9727       -d "/usr/local/canna/include"; then
9728     save_c_switch_site="$c_switch_site"
9729     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9730     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9731 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9732 echo "configure:9733: checking for canna/jrkanji.h" >&5
9733
9734 cat > conftest.$ac_ext <<EOF
9735 #line 9736 "configure"
9736 #include "confdefs.h"
9737 #include <canna/jrkanji.h>
9738 EOF
9739 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9740 { (eval echo configure:9741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9741 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9742 if test -z "$ac_err"; then
9743   rm -rf conftest*
9744   eval "ac_cv_header_$ac_safe=yes"
9745 else
9746   echo "$ac_err" >&5
9747   echo "configure: failed program was:" >&5
9748   cat conftest.$ac_ext >&5
9749   rm -rf conftest*
9750   eval "ac_cv_header_$ac_safe=no"
9751 fi
9752 rm -f conftest*
9753 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9754   echo "$ac_t""yes" 1>&6
9755   canna_includes_found=yes
9756 else
9757   echo "$ac_t""no" 1>&6
9758 fi
9759
9760     if test "$canna_includes_found" != "yes"; then
9761       c_switch_site="$save_c_switch_site"
9762       with_canna="no"
9763     fi
9764   fi
9765
9766   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9767 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9768 echo "configure:9769: checking for canna/RK.h" >&5
9769
9770 cat > conftest.$ac_ext <<EOF
9771 #line 9772 "configure"
9772 #include "confdefs.h"
9773 #include <canna/RK.h>
9774 EOF
9775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9776 { (eval echo configure:9777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9778 if test -z "$ac_err"; then
9779   rm -rf conftest*
9780   eval "ac_cv_header_$ac_safe=yes"
9781 else
9782   echo "$ac_err" >&5
9783   echo "configure: failed program was:" >&5
9784   cat conftest.$ac_ext >&5
9785   rm -rf conftest*
9786   eval "ac_cv_header_$ac_safe=no"
9787 fi
9788 rm -f conftest*
9789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9790   echo "$ac_t""yes" 1>&6
9791   :
9792 else
9793   echo "$ac_t""no" 1>&6
9794 with_canna=no
9795 fi
9796  }
9797   test -z "$with_canna" && { 
9798 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9799 echo "configure:9800: checking for RkBgnBun in -lRKC" >&5
9800 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9801
9802 xe_check_libs=" -lRKC "
9803 cat > conftest.$ac_ext <<EOF
9804 #line 9805 "configure"
9805 #include "confdefs.h"
9806 /* Override any gcc2 internal prototype to avoid an error.  */
9807 /* We use char because int might match the return type of a gcc2
9808     builtin and then its argument prototype would still apply.  */
9809 char RkBgnBun();
9810
9811 int main() {
9812 RkBgnBun()
9813 ; return 0; }
9814 EOF
9815 if { (eval echo configure:9816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9816   rm -rf conftest*
9817   eval "ac_cv_lib_$ac_lib_var=yes"
9818 else
9819   echo "configure: failed program was:" >&5
9820   cat conftest.$ac_ext >&5
9821   rm -rf conftest*
9822   eval "ac_cv_lib_$ac_lib_var=no"
9823 fi
9824 rm -f conftest*
9825 xe_check_libs=""
9826
9827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9828   echo "$ac_t""yes" 1>&6
9829   :
9830 else
9831   echo "$ac_t""no" 1>&6
9832 with_canna=no
9833 fi
9834
9835  }
9836   test -z "$with_canna" && { 
9837 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9838 echo "configure:9839: checking for jrKanjiControl in -lcanna" >&5
9839 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9840
9841 xe_check_libs=" -lcanna "
9842 cat > conftest.$ac_ext <<EOF
9843 #line 9844 "configure"
9844 #include "confdefs.h"
9845 /* Override any gcc2 internal prototype to avoid an error.  */
9846 /* We use char because int might match the return type of a gcc2
9847     builtin and then its argument prototype would still apply.  */
9848 char jrKanjiControl();
9849
9850 int main() {
9851 jrKanjiControl()
9852 ; return 0; }
9853 EOF
9854 if { (eval echo configure:9855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9855   rm -rf conftest*
9856   eval "ac_cv_lib_$ac_lib_var=yes"
9857 else
9858   echo "configure: failed program was:" >&5
9859   cat conftest.$ac_ext >&5
9860   rm -rf conftest*
9861   eval "ac_cv_lib_$ac_lib_var=no"
9862 fi
9863 rm -f conftest*
9864 xe_check_libs=""
9865
9866 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9867   echo "$ac_t""yes" 1>&6
9868   :
9869 else
9870   echo "$ac_t""no" 1>&6
9871 with_canna=no
9872 fi
9873
9874  }
9875   test -z "$with_canna" && with_canna=yes
9876   if test "$with_canna" = "yes"; then
9877     { test "$extra_verbose" = "yes" && cat << \EOF
9878     Defining HAVE_CANNA
9879 EOF
9880 cat >> confdefs.h <<\EOF
9881 #define HAVE_CANNA 1
9882 EOF
9883 }
9884
9885     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9886     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9887    echo "    xemacs will be linked with \"mule-canna.o\""
9888  fi
9889   fi
9890
9891 else   for feature in xim canna wnn; do
9892     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9893       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9894     fi
9895     eval "with_${feature}=no"
9896   done
9897 fi 
9898
9899 if test "$need_motif" = "yes" ; then
9900   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9901     
9902 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9903 echo "configure:9904: checking for layout_object_getvalue in -li18n" >&5
9904 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9905
9906 xe_check_libs=" -li18n "
9907 cat > conftest.$ac_ext <<EOF
9908 #line 9909 "configure"
9909 #include "confdefs.h"
9910 /* Override any gcc2 internal prototype to avoid an error.  */
9911 /* We use char because int might match the return type of a gcc2
9912     builtin and then its argument prototype would still apply.  */
9913 char layout_object_getvalue();
9914
9915 int main() {
9916 layout_object_getvalue()
9917 ; return 0; }
9918 EOF
9919 if { (eval echo configure:9920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9920   rm -rf conftest*
9921   eval "ac_cv_lib_$ac_lib_var=yes"
9922 else
9923   echo "configure: failed program was:" >&5
9924   cat conftest.$ac_ext >&5
9925   rm -rf conftest*
9926   eval "ac_cv_lib_$ac_lib_var=no"
9927 fi
9928 rm -f conftest*
9929 xe_check_libs=""
9930
9931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9932   echo "$ac_t""yes" 1>&6
9933   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9934 else
9935   echo "$ac_t""no" 1>&6
9936 fi
9937
9938
9939   
9940 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9941     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9942   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9943   
9944         runpath="" runpath_dirs=""
9945   if test -n "$LD_RUN_PATH"; then
9946     runpath="$LD_RUN_PATH"
9947   elif test "$GCC" = "yes"; then
9948         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
9949     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
9950     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
9951     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
9952       case "$arg" in P,* | -L* | -R* )
9953         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
9954           {
9955 xe_runpath_dir="$dir"
9956   test "$xe_runpath_dir" != "/lib"     -a \
9957         "$xe_runpath_dir" != "/usr/lib" -a \
9958         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9959   eval "$xe_add_unique_runpath_dir"
9960 }
9961         done ;;
9962       esac
9963     done
9964     ld_switch_run="$ld_switch_run_save"
9965     rm -f conftest*
9966   else
9967         for arg in $ld_switch_site $ld_switch_x_site; do
9968       case "$arg" in -L*) {
9969 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
9970   test "$xe_runpath_dir" != "/lib"     -a \
9971         "$xe_runpath_dir" != "/usr/lib" -a \
9972         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9973   eval "$xe_add_unique_runpath_dir"
9974 };; esac
9975     done
9976         if test "$opsys $need_motif" = "sol2 yes"; then
9977       xe_runpath_dir="/opt/SUNWdt/lib";
9978       eval "$xe_add_unique_runpath_dir";
9979     fi
9980   fi 
9981   if test -n "$runpath"; then
9982     ld_switch_run="${dash_r}${runpath}"
9983     
9984 if test "$GCC" = "yes"; then
9985   set x $ld_switch_run; shift; ld_switch_run=""
9986   while test -n "$1"; do
9987     case $1 in
9988       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9989       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9990       -Xlinker* ) ;;
9991       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9992     esac
9993     shift
9994   done
9995 fi
9996     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9997   fi
9998 fi
9999
10000 fi
10001
10002 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
10003 do
10004 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10005 echo "configure:10006: checking for $ac_func" >&5
10006
10007 cat > conftest.$ac_ext <<EOF
10008 #line 10009 "configure"
10009 #include "confdefs.h"
10010 /* System header to define __stub macros and hopefully few prototypes,
10011     which can conflict with char $ac_func(); below.  */
10012 #include <assert.h>
10013 /* Override any gcc2 internal prototype to avoid an error.  */
10014 /* We use char because int might match the return type of a gcc2
10015     builtin and then its argument prototype would still apply.  */
10016 char $ac_func();
10017
10018 int main() {
10019
10020 /* The GNU C library defines this for functions which it implements
10021     to always fail with ENOSYS.  Some functions are actually named
10022     something starting with __ and the normal name is an alias.  */
10023 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10024 choke me
10025 #else
10026 $ac_func();
10027 #endif
10028
10029 ; return 0; }
10030 EOF
10031 if { (eval echo configure:10032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10032   rm -rf conftest*
10033   eval "ac_cv_func_$ac_func=yes"
10034 else
10035   echo "configure: failed program was:" >&5
10036   cat conftest.$ac_ext >&5
10037   rm -rf conftest*
10038   eval "ac_cv_func_$ac_func=no"
10039 fi
10040 rm -f conftest*
10041
10042 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10043   echo "$ac_t""yes" 1>&6
10044     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10045   { test "$extra_verbose" = "yes" && cat << EOF
10046     Defining $ac_tr_func
10047 EOF
10048 cat >> confdefs.h <<EOF
10049 #define $ac_tr_func 1
10050 EOF
10051 }
10052  
10053 else
10054   echo "$ac_t""no" 1>&6
10055 fi
10056 done
10057
10058
10059 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
10060    echo "    xemacs will be linked with \"realpath.o\""
10061  fi
10062
10063 for ac_func in getloadavg
10064 do
10065 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10066 echo "configure:10067: checking for $ac_func" >&5
10067
10068 cat > conftest.$ac_ext <<EOF
10069 #line 10070 "configure"
10070 #include "confdefs.h"
10071 /* System header to define __stub macros and hopefully few prototypes,
10072     which can conflict with char $ac_func(); below.  */
10073 #include <assert.h>
10074 /* Override any gcc2 internal prototype to avoid an error.  */
10075 /* We use char because int might match the return type of a gcc2
10076     builtin and then its argument prototype would still apply.  */
10077 char $ac_func();
10078
10079 int main() {
10080
10081 /* The GNU C library defines this for functions which it implements
10082     to always fail with ENOSYS.  Some functions are actually named
10083     something starting with __ and the normal name is an alias.  */
10084 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10085 choke me
10086 #else
10087 $ac_func();
10088 #endif
10089
10090 ; return 0; }
10091 EOF
10092 if { (eval echo configure:10093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10093   rm -rf conftest*
10094   eval "ac_cv_func_$ac_func=yes"
10095 else
10096   echo "configure: failed program was:" >&5
10097   cat conftest.$ac_ext >&5
10098   rm -rf conftest*
10099   eval "ac_cv_func_$ac_func=no"
10100 fi
10101 rm -f conftest*
10102
10103 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10104   echo "$ac_t""yes" 1>&6
10105     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10106   { test "$extra_verbose" = "yes" && cat << EOF
10107     Defining $ac_tr_func
10108 EOF
10109 cat >> confdefs.h <<EOF
10110 #define $ac_tr_func 1
10111 EOF
10112 }
10113  
10114 else
10115   echo "$ac_t""no" 1>&6
10116 fi
10117 done
10118
10119
10120 if test "$ac_cv_func_getloadavg" != "yes"
10121 then
10122   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10123    echo "    xemacs will be linked with \"getloadavg.o\""
10124  fi
10125
10126     
10127 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10128 echo "configure:10129: checking for kstat_open in -lkstat" >&5
10129 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10130
10131 xe_check_libs=" -lkstat "
10132 cat > conftest.$ac_ext <<EOF
10133 #line 10134 "configure"
10134 #include "confdefs.h"
10135 /* Override any gcc2 internal prototype to avoid an error.  */
10136 /* We use char because int might match the return type of a gcc2
10137     builtin and then its argument prototype would still apply.  */
10138 char kstat_open();
10139
10140 int main() {
10141 kstat_open()
10142 ; return 0; }
10143 EOF
10144 if { (eval echo configure:10145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10145   rm -rf conftest*
10146   eval "ac_cv_lib_$ac_lib_var=yes"
10147 else
10148   echo "configure: failed program was:" >&5
10149   cat conftest.$ac_ext >&5
10150   rm -rf conftest*
10151   eval "ac_cv_lib_$ac_lib_var=no"
10152 fi
10153 rm -f conftest*
10154 xe_check_libs=""
10155
10156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10157   echo "$ac_t""yes" 1>&6
10158     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10159     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10160   { test "$extra_verbose" = "yes" && cat << EOF
10161     Defining $ac_tr_lib
10162 EOF
10163 cat >> confdefs.h <<EOF
10164 #define $ac_tr_lib 1
10165 EOF
10166 }
10167
10168   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10169
10170 else
10171   echo "$ac_t""no" 1>&6
10172 fi
10173
10174
10175
10176     
10177 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10178 echo "configure:10179: checking for kvm_read in -lkvm" >&5
10179 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10180
10181 xe_check_libs=" -lkvm "
10182 cat > conftest.$ac_ext <<EOF
10183 #line 10184 "configure"
10184 #include "confdefs.h"
10185 /* Override any gcc2 internal prototype to avoid an error.  */
10186 /* We use char because int might match the return type of a gcc2
10187     builtin and then its argument prototype would still apply.  */
10188 char kvm_read();
10189
10190 int main() {
10191 kvm_read()
10192 ; return 0; }
10193 EOF
10194 if { (eval echo configure:10195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10195   rm -rf conftest*
10196   eval "ac_cv_lib_$ac_lib_var=yes"
10197 else
10198   echo "configure: failed program was:" >&5
10199   cat conftest.$ac_ext >&5
10200   rm -rf conftest*
10201   eval "ac_cv_lib_$ac_lib_var=no"
10202 fi
10203 rm -f conftest*
10204 xe_check_libs=""
10205
10206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10207   echo "$ac_t""yes" 1>&6
10208     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10209     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10210   { test "$extra_verbose" = "yes" && cat << EOF
10211     Defining $ac_tr_lib
10212 EOF
10213 cat >> confdefs.h <<EOF
10214 #define $ac_tr_lib 1
10215 EOF
10216 }
10217
10218   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10219
10220 else
10221   echo "$ac_t""no" 1>&6
10222 fi
10223
10224
10225 fi
10226
10227 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10228 echo "configure:10229: checking whether netdb declares h_errno" >&5
10229 cat > conftest.$ac_ext <<EOF
10230 #line 10231 "configure"
10231 #include "confdefs.h"
10232 #include <netdb.h>
10233 int main() {
10234 return h_errno;
10235 ; return 0; }
10236 EOF
10237 if { (eval echo configure:10238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10238   rm -rf conftest*
10239   echo "$ac_t""yes" 1>&6
10240    { test "$extra_verbose" = "yes" && cat << \EOF
10241     Defining HAVE_H_ERRNO
10242 EOF
10243 cat >> confdefs.h <<\EOF
10244 #define HAVE_H_ERRNO 1
10245 EOF
10246 }
10247
10248 else
10249   echo "configure: failed program was:" >&5
10250   cat conftest.$ac_ext >&5
10251   rm -rf conftest*
10252   echo "$ac_t""no" 1>&6
10253 fi
10254 rm -f conftest*
10255
10256 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10257 echo "configure:10258: checking for sigsetjmp" >&5
10258 cat > conftest.$ac_ext <<EOF
10259 #line 10260 "configure"
10260 #include "confdefs.h"
10261 #include <setjmp.h>
10262 int main() {
10263 sigjmp_buf bar; sigsetjmp (bar, 0);
10264 ; return 0; }
10265 EOF
10266 if { (eval echo configure:10267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10267   rm -rf conftest*
10268   echo "$ac_t""yes" 1>&6
10269    { test "$extra_verbose" = "yes" && cat << \EOF
10270     Defining HAVE_SIGSETJMP
10271 EOF
10272 cat >> confdefs.h <<\EOF
10273 #define HAVE_SIGSETJMP 1
10274 EOF
10275 }
10276
10277 else
10278   echo "configure: failed program was:" >&5
10279   cat conftest.$ac_ext >&5
10280   rm -rf conftest*
10281   echo "$ac_t""no" 1>&6
10282 fi
10283 rm -f conftest*
10284
10285 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10286 echo "configure:10287: checking whether localtime caches TZ" >&5
10287
10288 if test "$ac_cv_func_tzset" = "yes"; then
10289 cat > conftest.$ac_ext <<EOF
10290 #line 10291 "configure"
10291 #include "confdefs.h"
10292 #include <time.h>
10293 #if STDC_HEADERS
10294 # include <stdlib.h>
10295 #endif
10296 extern char **environ;
10297 unset_TZ ()
10298 {
10299   char **from, **to;
10300   for (to = from = environ; (*to = *from); from++)
10301     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10302       to++;
10303 }
10304 char TZ_GMT0[] = "TZ=GMT0";
10305 char TZ_PST8[] = "TZ=PST8";
10306 main()
10307 {
10308   time_t now = time ((time_t *) 0);
10309   int hour_GMT0, hour_unset;
10310   if (putenv (TZ_GMT0) != 0)
10311     exit (1);
10312   hour_GMT0 = localtime (&now)->tm_hour;
10313   unset_TZ ();
10314   hour_unset = localtime (&now)->tm_hour;
10315   if (putenv (TZ_PST8) != 0)
10316     exit (1);
10317   if (localtime (&now)->tm_hour == hour_GMT0)
10318     exit (1);
10319   unset_TZ ();
10320   if (localtime (&now)->tm_hour != hour_unset)
10321     exit (1);
10322   exit (0);
10323 }
10324 EOF
10325 if { (eval echo configure:10326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10326 then
10327   emacs_cv_localtime_cache=no
10328 else
10329   conftest_rc="$?"
10330   echo "configure: failed program was:" >&5
10331   cat conftest.$ac_ext >&5
10332   rm -fr conftest*
10333   emacs_cv_localtime_cache=yes
10334 fi
10335 rm -fr conftest*
10336 else
10337         # If we lack tzset, report that localtime does not cache TZ,
10338         # since we can't invalidate the cache if we don't have tzset.
10339         emacs_cv_localtime_cache=no
10340 fi
10341 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10342 if test $emacs_cv_localtime_cache = yes; then
10343   { test "$extra_verbose" = "yes" && cat << \EOF
10344     Defining LOCALTIME_CACHE
10345 EOF
10346 cat >> confdefs.h <<\EOF
10347 #define LOCALTIME_CACHE 1
10348 EOF
10349 }
10350
10351 fi
10352
10353 if test "$HAVE_TIMEVAL" = "yes"; then
10354 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10355 echo "configure:10356: checking whether gettimeofday accepts one or two arguments" >&5
10356 cat > conftest.$ac_ext <<EOF
10357 #line 10358 "configure"
10358 #include "confdefs.h"
10359
10360 #ifdef TIME_WITH_SYS_TIME
10361 #include <sys/time.h>
10362 #include <time.h>
10363 #else
10364 #ifdef HAVE_SYS_TIME_H
10365 #include <sys/time.h>
10366 #else
10367 #include <time.h>
10368 #endif
10369 #endif
10370   
10371 int main() {
10372
10373   struct timeval time;
10374   gettimeofday (&time, 0);
10375
10376 ; return 0; }
10377 EOF
10378 if { (eval echo configure:10379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10379   rm -rf conftest*
10380   echo "$ac_t""two" 1>&6
10381 else
10382   echo "configure: failed program was:" >&5
10383   cat conftest.$ac_ext >&5
10384   rm -rf conftest*
10385   echo "$ac_t""one" 1>&6
10386    { test "$extra_verbose" = "yes" && cat << \EOF
10387     Defining GETTIMEOFDAY_ONE_ARGUMENT
10388 EOF
10389 cat >> confdefs.h <<\EOF
10390 #define GETTIMEOFDAY_ONE_ARGUMENT 1
10391 EOF
10392 }
10393
10394 fi
10395 rm -f conftest*
10396 fi
10397
10398
10399 echo $ac_n "checking for inline""... $ac_c" 1>&6
10400 echo "configure:10401: checking for inline" >&5
10401
10402 ac_cv_c_inline=no
10403 for ac_kw in inline __inline__ __inline; do
10404   cat > conftest.$ac_ext <<EOF
10405 #line 10406 "configure"
10406 #include "confdefs.h"
10407
10408 int main() {
10409 } $ac_kw foo() {
10410 ; return 0; }
10411 EOF
10412 if { (eval echo configure:10413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10413   rm -rf conftest*
10414   ac_cv_c_inline=$ac_kw; break
10415 else
10416   echo "configure: failed program was:" >&5
10417   cat conftest.$ac_ext >&5
10418 fi
10419 rm -f conftest*
10420 done
10421
10422
10423 echo "$ac_t""$ac_cv_c_inline" 1>&6
10424 case "$ac_cv_c_inline" in
10425   inline | yes) ;;
10426   no) { test "$extra_verbose" = "yes" && cat << \EOF
10427     Defining inline = 
10428 EOF
10429 cat >> confdefs.h <<\EOF
10430 #define inline 
10431 EOF
10432 }
10433  ;;
10434   *)  { test "$extra_verbose" = "yes" && cat << EOF
10435     Defining inline = $ac_cv_c_inline
10436 EOF
10437 cat >> confdefs.h <<EOF
10438 #define inline $ac_cv_c_inline
10439 EOF
10440 }
10441  ;;
10442 esac
10443
10444 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
10445    echo "    xemacs will be linked with \"inline.o\""
10446  fi
10447
10448
10449 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10450 # for constant arguments.  Useless!
10451 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
10452 echo "configure:10453: checking for working alloca.h" >&5
10453
10454 cat > conftest.$ac_ext <<EOF
10455 #line 10456 "configure"
10456 #include "confdefs.h"
10457 #include <alloca.h>
10458 int main() {
10459 char *p = alloca(2 * sizeof(int));
10460 ; return 0; }
10461 EOF
10462 if { (eval echo configure:10463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10463   rm -rf conftest*
10464   ac_cv_header_alloca_h=yes
10465 else
10466   echo "configure: failed program was:" >&5
10467   cat conftest.$ac_ext >&5
10468   rm -rf conftest*
10469   ac_cv_header_alloca_h=no
10470 fi
10471 rm -f conftest*
10472
10473 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
10474 if test $ac_cv_header_alloca_h = yes; then
10475   { test "$extra_verbose" = "yes" && cat << \EOF
10476     Defining HAVE_ALLOCA_H
10477 EOF
10478 cat >> confdefs.h <<\EOF
10479 #define HAVE_ALLOCA_H 1
10480 EOF
10481 }
10482
10483 fi
10484
10485 echo $ac_n "checking for alloca""... $ac_c" 1>&6
10486 echo "configure:10487: checking for alloca" >&5
10487
10488 cat > conftest.$ac_ext <<EOF
10489 #line 10490 "configure"
10490 #include "confdefs.h"
10491
10492 #ifdef __GNUC__
10493 # define alloca __builtin_alloca
10494 #else
10495 # ifdef _MSC_VER
10496 #  include <malloc.h>
10497 #  define alloca _alloca
10498 # else
10499 #  if HAVE_ALLOCA_H
10500 #   include <alloca.h>
10501 #  else
10502 #   ifdef _AIX
10503  #pragma alloca
10504 #   else
10505 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10506 char *alloca ();
10507 #    endif
10508 #   endif
10509 #  endif
10510 # endif
10511 #endif
10512
10513 int main() {
10514 char *p = (char *) alloca(1);
10515 ; return 0; }
10516 EOF
10517 if { (eval echo configure:10518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10518   rm -rf conftest*
10519   ac_cv_func_alloca_works=yes
10520 else
10521   echo "configure: failed program was:" >&5
10522   cat conftest.$ac_ext >&5
10523   rm -rf conftest*
10524   ac_cv_func_alloca_works=no
10525 fi
10526 rm -f conftest*
10527
10528 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
10529 if test $ac_cv_func_alloca_works = yes; then
10530   { test "$extra_verbose" = "yes" && cat << \EOF
10531     Defining HAVE_ALLOCA
10532 EOF
10533 cat >> confdefs.h <<\EOF
10534 #define HAVE_ALLOCA 1
10535 EOF
10536 }
10537
10538 fi
10539
10540 if test $ac_cv_func_alloca_works = no; then
10541   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10542   # that cause trouble.  Some versions do not even contain alloca or
10543   # contain a buggy version.  If you still want to use their alloca,
10544   # use ar to extract alloca.o from them instead of compiling alloca.c.
10545   ALLOCA=alloca.${ac_objext}
10546   { test "$extra_verbose" = "yes" && cat << \EOF
10547     Defining C_ALLOCA
10548 EOF
10549 cat >> confdefs.h <<\EOF
10550 #define C_ALLOCA 1
10551 EOF
10552 }
10553
10554
10555 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10556 echo "configure:10557: checking whether alloca needs Cray hooks" >&5
10557
10558 cat > conftest.$ac_ext <<EOF
10559 #line 10560 "configure"
10560 #include "confdefs.h"
10561 #if defined(CRAY) && ! defined(CRAY2)
10562 webecray
10563 #else
10564 wenotbecray
10565 #endif
10566
10567 EOF
10568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10569   egrep "webecray" >/dev/null 2>&1; then
10570   rm -rf conftest*
10571   ac_cv_os_cray=yes
10572 else
10573   rm -rf conftest*
10574   ac_cv_os_cray=no
10575 fi
10576 rm -f conftest*
10577
10578
10579 echo "$ac_t""$ac_cv_os_cray" 1>&6
10580 if test $ac_cv_os_cray = yes; then
10581 for ac_func in _getb67 GETB67 getb67; do
10582   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10583 echo "configure:10584: checking for $ac_func" >&5
10584
10585 cat > conftest.$ac_ext <<EOF
10586 #line 10587 "configure"
10587 #include "confdefs.h"
10588 /* System header to define __stub macros and hopefully few prototypes,
10589     which can conflict with char $ac_func(); below.  */
10590 #include <assert.h>
10591 /* Override any gcc2 internal prototype to avoid an error.  */
10592 /* We use char because int might match the return type of a gcc2
10593     builtin and then its argument prototype would still apply.  */
10594 char $ac_func();
10595
10596 int main() {
10597
10598 /* The GNU C library defines this for functions which it implements
10599     to always fail with ENOSYS.  Some functions are actually named
10600     something starting with __ and the normal name is an alias.  */
10601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10602 choke me
10603 #else
10604 $ac_func();
10605 #endif
10606
10607 ; return 0; }
10608 EOF
10609 if { (eval echo configure:10610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10610   rm -rf conftest*
10611   eval "ac_cv_func_$ac_func=yes"
10612 else
10613   echo "configure: failed program was:" >&5
10614   cat conftest.$ac_ext >&5
10615   rm -rf conftest*
10616   eval "ac_cv_func_$ac_func=no"
10617 fi
10618 rm -f conftest*
10619
10620 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10621   echo "$ac_t""yes" 1>&6
10622   { test "$extra_verbose" = "yes" && cat << EOF
10623     Defining CRAY_STACKSEG_END = $ac_func
10624 EOF
10625 cat >> confdefs.h <<EOF
10626 #define CRAY_STACKSEG_END $ac_func
10627 EOF
10628 }
10629
10630   break
10631 else
10632   echo "$ac_t""no" 1>&6
10633 fi
10634
10635 done
10636 fi
10637
10638 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10639 echo "configure:10640: checking stack direction for C alloca" >&5
10640
10641 cat > conftest.$ac_ext <<EOF
10642 #line 10643 "configure"
10643 #include "confdefs.h"
10644 find_stack_direction ()
10645 {
10646   static char *addr = 0;
10647   auto char dummy;
10648   if (addr == 0)
10649     {
10650       addr = &dummy;
10651       return find_stack_direction ();
10652     }
10653   else
10654     return (&dummy > addr) ? 1 : -1;
10655 }
10656 main ()
10657 {
10658   exit (find_stack_direction() < 0);
10659 }
10660 EOF
10661 if { (eval echo configure:10662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10662 then
10663   ac_cv_c_stack_direction=1
10664 else
10665   conftest_rc="$?"
10666   echo "configure: failed program was:" >&5
10667   cat conftest.$ac_ext >&5
10668   rm -fr conftest*
10669   ac_cv_c_stack_direction=-1
10670 fi
10671 rm -fr conftest*
10672
10673 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10674 { test "$extra_verbose" = "yes" && cat << EOF
10675     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10676 EOF
10677 cat >> confdefs.h <<EOF
10678 #define STACK_DIRECTION $ac_cv_c_stack_direction
10679 EOF
10680 }
10681
10682 fi
10683
10684 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10685    echo "    xemacs will be linked with \"$ALLOCA\""
10686  fi
10687
10688 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10689 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10690 echo "configure:10691: checking for vfork.h" >&5
10691
10692 cat > conftest.$ac_ext <<EOF
10693 #line 10694 "configure"
10694 #include "confdefs.h"
10695 #include <vfork.h>
10696 EOF
10697 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10698 { (eval echo configure:10699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10699 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10700 if test -z "$ac_err"; then
10701   rm -rf conftest*
10702   eval "ac_cv_header_$ac_safe=yes"
10703 else
10704   echo "$ac_err" >&5
10705   echo "configure: failed program was:" >&5
10706   cat conftest.$ac_ext >&5
10707   rm -rf conftest*
10708   eval "ac_cv_header_$ac_safe=no"
10709 fi
10710 rm -f conftest*
10711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10712   echo "$ac_t""yes" 1>&6
10713   { test "$extra_verbose" = "yes" && cat << \EOF
10714     Defining HAVE_VFORK_H
10715 EOF
10716 cat >> confdefs.h <<\EOF
10717 #define HAVE_VFORK_H 1
10718 EOF
10719 }
10720
10721 else
10722   echo "$ac_t""no" 1>&6
10723 fi
10724
10725 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10726 echo "configure:10727: checking for working vfork" >&5
10727
10728 cat > conftest.$ac_ext <<EOF
10729 #line 10730 "configure"
10730 #include "confdefs.h"
10731 /* Thanks to Paul Eggert for this test.  */
10732 #include <stdio.h>
10733 #include <sys/types.h>
10734 #include <sys/stat.h>
10735 #ifdef HAVE_UNISTD_H
10736 #include <unistd.h>
10737 #endif
10738 #ifdef HAVE_VFORK_H
10739 #include <vfork.h>
10740 #endif
10741 /* On some sparc systems, changes by the child to local and incoming
10742    argument registers are propagated back to the parent.
10743    The compiler is told about this with #include <vfork.h>,
10744    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10745    Test for this by using a static variable whose address
10746    is put into a register that is clobbered by the vfork.  */
10747 static
10748 #ifdef __cplusplus
10749 sparc_address_test (int arg)
10750 #else
10751 sparc_address_test (arg) int arg;
10752 #endif
10753 {
10754   static pid_t child;
10755   if (!child) {
10756     child = vfork ();
10757     if (child < 0) {
10758       perror ("vfork");
10759       _exit(2);
10760     }
10761     if (!child) {
10762       arg = getpid();
10763       write(-1, "", 0);
10764       _exit (arg);
10765     }
10766   }
10767 }
10768 main() {
10769   pid_t parent = getpid ();
10770   pid_t child;
10771
10772   sparc_address_test ();
10773
10774   child = vfork ();
10775
10776   if (child == 0) {
10777     /* Here is another test for sparc vfork register problems.
10778        This test uses lots of local variables, at least
10779        as many local variables as main has allocated so far
10780        including compiler temporaries.  4 locals are enough for
10781        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10782        A buggy compiler should reuse the register of parent
10783        for one of the local variables, since it will think that
10784        parent can't possibly be used any more in this routine.
10785        Assigning to the local variable will thus munge parent
10786        in the parent process.  */
10787     pid_t
10788       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10789       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10790     /* Convince the compiler that p..p7 are live; otherwise, it might
10791        use the same hardware register for all 8 local variables.  */
10792     if (p != p1 || p != p2 || p != p3 || p != p4
10793         || p != p5 || p != p6 || p != p7)
10794       _exit(1);
10795
10796     /* On some systems (e.g. IRIX 3.3),
10797        vfork doesn't separate parent from child file descriptors.
10798        If the child closes a descriptor before it execs or exits,
10799        this munges the parent's descriptor as well.
10800        Test for this by closing stdout in the child.  */
10801     _exit(close(fileno(stdout)) != 0);
10802   } else {
10803     int status;
10804     struct stat st;
10805
10806     while (wait(&status) != child)
10807       ;
10808     exit(
10809          /* Was there some problem with vforking?  */
10810          child < 0
10811
10812          /* Did the child fail?  (This shouldn't happen.)  */
10813          || status
10814
10815          /* Did the vfork/compiler bug occur?  */
10816          || parent != getpid()
10817
10818          /* Did the file descriptor bug occur?  */
10819          || fstat(fileno(stdout), &st) != 0
10820          );
10821   }
10822 }
10823 EOF
10824 if { (eval echo configure:10825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10825 then
10826   ac_cv_func_vfork_works=yes
10827 else
10828   conftest_rc="$?"
10829   echo "configure: failed program was:" >&5
10830   cat conftest.$ac_ext >&5
10831   rm -fr conftest*
10832   ac_cv_func_vfork_works=no
10833 fi
10834 rm -fr conftest*
10835
10836 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10837 if test $ac_cv_func_vfork_works = no; then
10838   { test "$extra_verbose" = "yes" && cat << \EOF
10839     Defining vfork = fork
10840 EOF
10841 cat >> confdefs.h <<\EOF
10842 #define vfork fork
10843 EOF
10844 }
10845
10846 fi
10847
10848
10849 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10850 echo "configure:10851: checking for working strcoll" >&5
10851
10852 cat > conftest.$ac_ext <<EOF
10853 #line 10854 "configure"
10854 #include "confdefs.h"
10855 #include <string.h>
10856 main ()
10857 {
10858   exit (strcoll ("abc", "def") >= 0 ||
10859         strcoll ("ABC", "DEF") >= 0 ||
10860         strcoll ("123", "456") >= 0);
10861 }
10862 EOF
10863 if { (eval echo configure:10864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10864 then
10865   ac_cv_func_strcoll_works=yes
10866 else
10867   conftest_rc="$?"
10868   echo "configure: failed program was:" >&5
10869   cat conftest.$ac_ext >&5
10870   rm -fr conftest*
10871   ac_cv_func_strcoll_works=no
10872 fi
10873 rm -fr conftest*
10874
10875 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10876 if test $ac_cv_func_strcoll_works = yes; then
10877   { test "$extra_verbose" = "yes" && cat << \EOF
10878     Defining HAVE_STRCOLL
10879 EOF
10880 cat >> confdefs.h <<\EOF
10881 #define HAVE_STRCOLL 1
10882 EOF
10883 }
10884
10885 fi
10886
10887
10888 for ac_func in getpgrp
10889 do
10890 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10891 echo "configure:10892: checking for $ac_func" >&5
10892
10893 cat > conftest.$ac_ext <<EOF
10894 #line 10895 "configure"
10895 #include "confdefs.h"
10896 /* System header to define __stub macros and hopefully few prototypes,
10897     which can conflict with char $ac_func(); below.  */
10898 #include <assert.h>
10899 /* Override any gcc2 internal prototype to avoid an error.  */
10900 /* We use char because int might match the return type of a gcc2
10901     builtin and then its argument prototype would still apply.  */
10902 char $ac_func();
10903
10904 int main() {
10905
10906 /* The GNU C library defines this for functions which it implements
10907     to always fail with ENOSYS.  Some functions are actually named
10908     something starting with __ and the normal name is an alias.  */
10909 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10910 choke me
10911 #else
10912 $ac_func();
10913 #endif
10914
10915 ; return 0; }
10916 EOF
10917 if { (eval echo configure:10918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10918   rm -rf conftest*
10919   eval "ac_cv_func_$ac_func=yes"
10920 else
10921   echo "configure: failed program was:" >&5
10922   cat conftest.$ac_ext >&5
10923   rm -rf conftest*
10924   eval "ac_cv_func_$ac_func=no"
10925 fi
10926 rm -f conftest*
10927
10928 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10929   echo "$ac_t""yes" 1>&6
10930     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10931   { test "$extra_verbose" = "yes" && cat << EOF
10932     Defining $ac_tr_func
10933 EOF
10934 cat >> confdefs.h <<EOF
10935 #define $ac_tr_func 1
10936 EOF
10937 }
10938  
10939 else
10940   echo "$ac_t""no" 1>&6
10941 fi
10942 done
10943
10944 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10945 echo "configure:10946: checking whether getpgrp takes no argument" >&5
10946
10947 cat > conftest.$ac_ext <<EOF
10948 #line 10949 "configure"
10949 #include "confdefs.h"
10950
10951 /*
10952  * If this system has a BSD-style getpgrp(),
10953  * which takes a pid argument, exit unsuccessfully.
10954  *
10955  * Snarfed from Chet Ramey's bash pgrp.c test program
10956  */
10957 #include <stdio.h>
10958 #include <sys/types.h>
10959
10960 int     pid;
10961 int     pg1, pg2, pg3, pg4;
10962 int     ng, np, s, child;
10963
10964 main()
10965 {
10966         pid = getpid();
10967         pg1 = getpgrp(0);
10968         pg2 = getpgrp();
10969         pg3 = getpgrp(pid);
10970         pg4 = getpgrp(1);
10971
10972         /*
10973          * If all of these values are the same, it's pretty sure that
10974          * we're on a system that ignores getpgrp's first argument.
10975          */
10976         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10977                 exit(0);
10978
10979         child = fork();
10980         if (child < 0)
10981                 exit(1);
10982         else if (child == 0) {
10983                 np = getpid();
10984                 /*
10985                  * If this is Sys V, this will not work; pgrp will be
10986                  * set to np because setpgrp just changes a pgrp to be
10987                  * the same as the pid.
10988                  */
10989                 setpgrp(np, pg1);
10990                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10991                 if (ng == pg1) {
10992                         exit(1);
10993                 } else {
10994                         exit(0);
10995                 }
10996         } else {
10997                 wait(&s);
10998                 exit(s>>8);
10999         }
11000 }
11001
11002 EOF
11003 if { (eval echo configure:11004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11004 then
11005   ac_cv_func_getpgrp_void=yes
11006 else
11007   conftest_rc="$?"
11008   echo "configure: failed program was:" >&5
11009   cat conftest.$ac_ext >&5
11010   rm -fr conftest*
11011   ac_cv_func_getpgrp_void=no
11012 fi
11013 rm -fr conftest*
11014
11015
11016 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
11017 if test $ac_cv_func_getpgrp_void = yes; then
11018   { test "$extra_verbose" = "yes" && cat << \EOF
11019     Defining GETPGRP_VOID
11020 EOF
11021 cat >> confdefs.h <<\EOF
11022 #define GETPGRP_VOID 1
11023 EOF
11024 }
11025
11026 fi
11027
11028
11029 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11030 echo "configure:11031: checking for working mmap" >&5
11031 case "$opsys" in ultrix* ) have_mmap=no ;; *)
11032 cat > conftest.$ac_ext <<EOF
11033 #line 11034 "configure"
11034 #include "confdefs.h"
11035 #include <stdio.h>
11036 #include <unistd.h>
11037 #include <fcntl.h>
11038 #include <sys/mman.h>
11039
11040 #ifndef MAP_VARIABLE
11041 #define MAP_VARIABLE 0
11042 #endif
11043
11044 #ifndef MAP_FAILED
11045 #define MAP_FAILED -1
11046 #endif
11047
11048 int main (int argc, char *argv[])
11049 {
11050   int fd = -1;
11051   caddr_t p;
11052 #ifndef MAP_ANONYMOUS
11053   fd = open ("/dev/zero", O_RDWR);
11054   if (fd < 0)
11055     return 1;
11056 #define MAP_ANONYMOUS 0
11057 #endif
11058   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
11059            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
11060            fd, 0) != (void *) MAP_FAILED)
11061     return 0;
11062   perror ("conftest: mmap failed");
11063   return 1;
11064 }
11065 EOF
11066 if { (eval echo configure:11067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11067 then
11068   have_mmap=yes
11069 else
11070   conftest_rc="$?"
11071   echo "configure: failed program was:" >&5
11072   cat conftest.$ac_ext >&5
11073   rm -fr conftest*
11074   have_mmap=no
11075 fi
11076 rm -fr conftest* ;;
11077 esac
11078 echo "$ac_t""$have_mmap" 1>&6
11079 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11080     Defining HAVE_MMAP
11081 EOF
11082 cat >> confdefs.h <<\EOF
11083 #define HAVE_MMAP 1
11084 EOF
11085 }
11086
11087
11088 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
11089 if test "$rel_alloc $have_mmap" = "default yes"; then
11090   if test "$doug_lea_malloc" = "yes"; then
11091         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
11092 echo "configure:11093: checking for M_MMAP_THRESHOLD" >&5
11093     cat > conftest.$ac_ext <<EOF
11094 #line 11095 "configure"
11095 #include "confdefs.h"
11096 #include <malloc.h>
11097 int main() {
11098
11099 #ifndef M_MMAP_THRESHOLD
11100 #error No M_MMAP_THRESHOLD :-(
11101 !@+$%^&*_)(_ - unlikely to compile...
11102 #endif
11103
11104 ; return 0; }
11105 EOF
11106 if { (eval echo configure:11107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11107   rm -rf conftest*
11108   rel_alloc=no; echo "$ac_t""yes" 1>&6;
11109 else
11110   echo "configure: failed program was:" >&5
11111   cat conftest.$ac_ext >&5
11112   rm -rf conftest*
11113   rel_alloc=yes; echo "$ac_t""no" 1>&6;
11114 fi
11115 rm -f conftest*
11116   else
11117     rel_alloc=yes
11118   fi
11119 fi
11120 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11121     Defining REL_ALLOC
11122 EOF
11123 cat >> confdefs.h <<\EOF
11124 #define REL_ALLOC 1
11125 EOF
11126 }
11127
11128
11129 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11130 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11131 echo "configure:11132: checking for termios.h" >&5
11132
11133 cat > conftest.$ac_ext <<EOF
11134 #line 11135 "configure"
11135 #include "confdefs.h"
11136 #include <termios.h>
11137 EOF
11138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11139 { (eval echo configure:11140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11141 if test -z "$ac_err"; then
11142   rm -rf conftest*
11143   eval "ac_cv_header_$ac_safe=yes"
11144 else
11145   echo "$ac_err" >&5
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148   rm -rf conftest*
11149   eval "ac_cv_header_$ac_safe=no"
11150 fi
11151 rm -f conftest*
11152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11153   echo "$ac_t""yes" 1>&6
11154   { test "$extra_verbose" = "yes" && cat << \EOF
11155     Defining HAVE_TERMIOS
11156 EOF
11157 cat >> confdefs.h <<\EOF
11158 #define HAVE_TERMIOS 1
11159 EOF
11160 }
11161
11162   { test "$extra_verbose" = "yes" && cat << \EOF
11163     Defining SIGNALS_VIA_CHARACTERS
11164 EOF
11165 cat >> confdefs.h <<\EOF
11166 #define SIGNALS_VIA_CHARACTERS 1
11167 EOF
11168 }
11169
11170   { test "$extra_verbose" = "yes" && cat << \EOF
11171     Defining NO_TERMIO
11172 EOF
11173 cat >> confdefs.h <<\EOF
11174 #define NO_TERMIO 1
11175 EOF
11176 }
11177
11178 else
11179   echo "$ac_t""no" 1>&6
11180 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11181 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11182 echo "configure:11183: checking for termio.h" >&5
11183
11184 cat > conftest.$ac_ext <<EOF
11185 #line 11186 "configure"
11186 #include "confdefs.h"
11187 #include <termio.h>
11188 EOF
11189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11190 { (eval echo configure:11191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11192 if test -z "$ac_err"; then
11193   rm -rf conftest*
11194   eval "ac_cv_header_$ac_safe=yes"
11195 else
11196   echo "$ac_err" >&5
11197   echo "configure: failed program was:" >&5
11198   cat conftest.$ac_ext >&5
11199   rm -rf conftest*
11200   eval "ac_cv_header_$ac_safe=no"
11201 fi
11202 rm -f conftest*
11203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11204   echo "$ac_t""yes" 1>&6
11205   { test "$extra_verbose" = "yes" && cat << \EOF
11206     Defining HAVE_TERMIO
11207 EOF
11208 cat >> confdefs.h <<\EOF
11209 #define HAVE_TERMIO 1
11210 EOF
11211 }
11212
11213 else
11214   echo "$ac_t""no" 1>&6
11215 fi
11216
11217 fi
11218
11219
11220
11221 echo $ac_n "checking for socket""... $ac_c" 1>&6
11222 echo "configure:11223: checking for socket" >&5
11223
11224 cat > conftest.$ac_ext <<EOF
11225 #line 11226 "configure"
11226 #include "confdefs.h"
11227 /* System header to define __stub macros and hopefully few prototypes,
11228     which can conflict with char socket(); below.  */
11229 #include <assert.h>
11230 /* Override any gcc2 internal prototype to avoid an error.  */
11231 /* We use char because int might match the return type of a gcc2
11232     builtin and then its argument prototype would still apply.  */
11233 char socket();
11234
11235 int main() {
11236
11237 /* The GNU C library defines this for functions which it implements
11238     to always fail with ENOSYS.  Some functions are actually named
11239     something starting with __ and the normal name is an alias.  */
11240 #if defined (__stub_socket) || defined (__stub___socket)
11241 choke me
11242 #else
11243 socket();
11244 #endif
11245
11246 ; return 0; }
11247 EOF
11248 if { (eval echo configure:11249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11249   rm -rf conftest*
11250   eval "ac_cv_func_socket=yes"
11251 else
11252   echo "configure: failed program was:" >&5
11253   cat conftest.$ac_ext >&5
11254   rm -rf conftest*
11255   eval "ac_cv_func_socket=no"
11256 fi
11257 rm -f conftest*
11258
11259 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11260   echo "$ac_t""yes" 1>&6
11261   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11262 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11263 echo "configure:11264: checking for netinet/in.h" >&5
11264
11265 cat > conftest.$ac_ext <<EOF
11266 #line 11267 "configure"
11267 #include "confdefs.h"
11268 #include <netinet/in.h>
11269 EOF
11270 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11271 { (eval echo configure:11272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11272 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11273 if test -z "$ac_err"; then
11274   rm -rf conftest*
11275   eval "ac_cv_header_$ac_safe=yes"
11276 else
11277   echo "$ac_err" >&5
11278   echo "configure: failed program was:" >&5
11279   cat conftest.$ac_ext >&5
11280   rm -rf conftest*
11281   eval "ac_cv_header_$ac_safe=no"
11282 fi
11283 rm -f conftest*
11284 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11285   echo "$ac_t""yes" 1>&6
11286   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11287 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11288 echo "configure:11289: checking for arpa/inet.h" >&5
11289
11290 cat > conftest.$ac_ext <<EOF
11291 #line 11292 "configure"
11292 #include "confdefs.h"
11293 #include <arpa/inet.h>
11294 EOF
11295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11296 { (eval echo configure:11297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11298 if test -z "$ac_err"; then
11299   rm -rf conftest*
11300   eval "ac_cv_header_$ac_safe=yes"
11301 else
11302   echo "$ac_err" >&5
11303   echo "configure: failed program was:" >&5
11304   cat conftest.$ac_ext >&5
11305   rm -rf conftest*
11306   eval "ac_cv_header_$ac_safe=no"
11307 fi
11308 rm -f conftest*
11309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11310   echo "$ac_t""yes" 1>&6
11311   
11312   { test "$extra_verbose" = "yes" && cat << \EOF
11313     Defining HAVE_SOCKETS
11314 EOF
11315 cat >> confdefs.h <<\EOF
11316 #define HAVE_SOCKETS 1
11317 EOF
11318 }
11319
11320       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11321 echo "configure:11322: checking "for sun_len member in struct sockaddr_un"" >&5
11322       cat > conftest.$ac_ext <<EOF
11323 #line 11324 "configure"
11324 #include "confdefs.h"
11325
11326 #include <sys/types.h>
11327 #include <sys/socket.h>
11328 #include <sys/un.h>
11329       
11330 int main() {
11331 static struct sockaddr_un x; x.sun_len = 1;
11332 ; return 0; }
11333 EOF
11334 if { (eval echo configure:11335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11335   rm -rf conftest*
11336   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11337     Defining HAVE_SOCKADDR_SUN_LEN
11338 EOF
11339 cat >> confdefs.h <<\EOF
11340 #define HAVE_SOCKADDR_SUN_LEN 1
11341 EOF
11342 }
11343
11344 else
11345   echo "configure: failed program was:" >&5
11346   cat conftest.$ac_ext >&5
11347   rm -rf conftest*
11348   echo "$ac_t""no" 1>&6
11349 fi
11350 rm -f conftest*
11351       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11352 echo "configure:11353: checking "for ip_mreq struct in netinet/in.h"" >&5
11353       cat > conftest.$ac_ext <<EOF
11354 #line 11355 "configure"
11355 #include "confdefs.h"
11356
11357 #include <sys/types.h>
11358 #include <netinet/in.h>
11359       
11360 int main() {
11361 static struct ip_mreq x;
11362 ; return 0; }
11363 EOF
11364 if { (eval echo configure:11365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11365   rm -rf conftest*
11366   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11367     Defining HAVE_MULTICAST
11368 EOF
11369 cat >> confdefs.h <<\EOF
11370 #define HAVE_MULTICAST 1
11371 EOF
11372 }
11373
11374 else
11375   echo "configure: failed program was:" >&5
11376   cat conftest.$ac_ext >&5
11377   rm -rf conftest*
11378   echo "$ac_t""no" 1>&6
11379 fi
11380 rm -f conftest*
11381 else
11382   echo "$ac_t""no" 1>&6
11383 fi
11384
11385 else
11386   echo "$ac_t""no" 1>&6
11387 fi
11388
11389 else
11390   echo "$ac_t""no" 1>&6
11391 fi
11392
11393
11394 echo $ac_n "checking for msgget""... $ac_c" 1>&6
11395 echo "configure:11396: checking for msgget" >&5
11396
11397 cat > conftest.$ac_ext <<EOF
11398 #line 11399 "configure"
11399 #include "confdefs.h"
11400 /* System header to define __stub macros and hopefully few prototypes,
11401     which can conflict with char msgget(); below.  */
11402 #include <assert.h>
11403 /* Override any gcc2 internal prototype to avoid an error.  */
11404 /* We use char because int might match the return type of a gcc2
11405     builtin and then its argument prototype would still apply.  */
11406 char msgget();
11407
11408 int main() {
11409
11410 /* The GNU C library defines this for functions which it implements
11411     to always fail with ENOSYS.  Some functions are actually named
11412     something starting with __ and the normal name is an alias.  */
11413 #if defined (__stub_msgget) || defined (__stub___msgget)
11414 choke me
11415 #else
11416 msgget();
11417 #endif
11418
11419 ; return 0; }
11420 EOF
11421 if { (eval echo configure:11422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11422   rm -rf conftest*
11423   eval "ac_cv_func_msgget=yes"
11424 else
11425   echo "configure: failed program was:" >&5
11426   cat conftest.$ac_ext >&5
11427   rm -rf conftest*
11428   eval "ac_cv_func_msgget=no"
11429 fi
11430 rm -f conftest*
11431
11432 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
11433   echo "$ac_t""yes" 1>&6
11434   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
11435 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
11436 echo "configure:11437: checking for sys/ipc.h" >&5
11437
11438 cat > conftest.$ac_ext <<EOF
11439 #line 11440 "configure"
11440 #include "confdefs.h"
11441 #include <sys/ipc.h>
11442 EOF
11443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11444 { (eval echo configure:11445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11446 if test -z "$ac_err"; then
11447   rm -rf conftest*
11448   eval "ac_cv_header_$ac_safe=yes"
11449 else
11450   echo "$ac_err" >&5
11451   echo "configure: failed program was:" >&5
11452   cat conftest.$ac_ext >&5
11453   rm -rf conftest*
11454   eval "ac_cv_header_$ac_safe=no"
11455 fi
11456 rm -f conftest*
11457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11458   echo "$ac_t""yes" 1>&6
11459   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
11460 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
11461 echo "configure:11462: checking for sys/msg.h" >&5
11462
11463 cat > conftest.$ac_ext <<EOF
11464 #line 11465 "configure"
11465 #include "confdefs.h"
11466 #include <sys/msg.h>
11467 EOF
11468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11469 { (eval echo configure:11470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11471 if test -z "$ac_err"; then
11472   rm -rf conftest*
11473   eval "ac_cv_header_$ac_safe=yes"
11474 else
11475   echo "$ac_err" >&5
11476   echo "configure: failed program was:" >&5
11477   cat conftest.$ac_ext >&5
11478   rm -rf conftest*
11479   eval "ac_cv_header_$ac_safe=no"
11480 fi
11481 rm -f conftest*
11482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11483   echo "$ac_t""yes" 1>&6
11484   { test "$extra_verbose" = "yes" && cat << \EOF
11485     Defining HAVE_SYSVIPC
11486 EOF
11487 cat >> confdefs.h <<\EOF
11488 #define HAVE_SYSVIPC 1
11489 EOF
11490 }
11491
11492 else
11493   echo "$ac_t""no" 1>&6
11494 fi
11495
11496 else
11497   echo "$ac_t""no" 1>&6
11498 fi
11499
11500 else
11501   echo "$ac_t""no" 1>&6
11502 fi
11503
11504
11505 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
11506 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
11507 echo "configure:11508: checking for dirent.h" >&5
11508
11509 cat > conftest.$ac_ext <<EOF
11510 #line 11511 "configure"
11511 #include "confdefs.h"
11512 #include <dirent.h>
11513 EOF
11514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11515 { (eval echo configure:11516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11517 if test -z "$ac_err"; then
11518   rm -rf conftest*
11519   eval "ac_cv_header_$ac_safe=yes"
11520 else
11521   echo "$ac_err" >&5
11522   echo "configure: failed program was:" >&5
11523   cat conftest.$ac_ext >&5
11524   rm -rf conftest*
11525   eval "ac_cv_header_$ac_safe=no"
11526 fi
11527 rm -f conftest*
11528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11529   echo "$ac_t""yes" 1>&6
11530   { test "$extra_verbose" = "yes" && cat << \EOF
11531     Defining SYSV_SYSTEM_DIR
11532 EOF
11533 cat >> confdefs.h <<\EOF
11534 #define SYSV_SYSTEM_DIR 1
11535 EOF
11536 }
11537
11538 else
11539   echo "$ac_t""no" 1>&6
11540 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
11541 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
11542 echo "configure:11543: checking for sys/dir.h" >&5
11543
11544 cat > conftest.$ac_ext <<EOF
11545 #line 11546 "configure"
11546 #include "confdefs.h"
11547 #include <sys/dir.h>
11548 EOF
11549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11550 { (eval echo configure:11551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11552 if test -z "$ac_err"; then
11553   rm -rf conftest*
11554   eval "ac_cv_header_$ac_safe=yes"
11555 else
11556   echo "$ac_err" >&5
11557   echo "configure: failed program was:" >&5
11558   cat conftest.$ac_ext >&5
11559   rm -rf conftest*
11560   eval "ac_cv_header_$ac_safe=no"
11561 fi
11562 rm -f conftest*
11563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11564   echo "$ac_t""yes" 1>&6
11565   :
11566 else
11567   echo "$ac_t""no" 1>&6
11568 { test "$extra_verbose" = "yes" && cat << \EOF
11569     Defining NONSYSTEM_DIR_LIBRARY
11570 EOF
11571 cat >> confdefs.h <<\EOF
11572 #define NONSYSTEM_DIR_LIBRARY 1
11573 EOF
11574 }
11575
11576 fi
11577
11578 fi
11579
11580
11581 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11582 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11583 echo "configure:11584: checking for nlist.h" >&5
11584
11585 cat > conftest.$ac_ext <<EOF
11586 #line 11587 "configure"
11587 #include "confdefs.h"
11588 #include <nlist.h>
11589 EOF
11590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11591 { (eval echo configure:11592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11593 if test -z "$ac_err"; then
11594   rm -rf conftest*
11595   eval "ac_cv_header_$ac_safe=yes"
11596 else
11597   echo "$ac_err" >&5
11598   echo "configure: failed program was:" >&5
11599   cat conftest.$ac_ext >&5
11600   rm -rf conftest*
11601   eval "ac_cv_header_$ac_safe=no"
11602 fi
11603 rm -f conftest*
11604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11605   echo "$ac_t""yes" 1>&6
11606   { test "$extra_verbose" = "yes" && cat << \EOF
11607     Defining NLIST_STRUCT
11608 EOF
11609 cat >> confdefs.h <<\EOF
11610 #define NLIST_STRUCT 1
11611 EOF
11612 }
11613
11614 else
11615   echo "$ac_t""no" 1>&6
11616 fi
11617
11618
11619
11620 echo "checking "for sound support"" 1>&6
11621 echo "configure:11622: checking "for sound support"" >&5
11622 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11623
11624 if test "$with_native_sound" != "no"; then
11625     if test -n "$native_sound_lib"; then
11626     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11627 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11628 echo "configure:11629: checking for multimedia/audio_device.h" >&5
11629
11630 cat > conftest.$ac_ext <<EOF
11631 #line 11632 "configure"
11632 #include "confdefs.h"
11633 #include <multimedia/audio_device.h>
11634 EOF
11635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11636 { (eval echo configure:11637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11638 if test -z "$ac_err"; then
11639   rm -rf conftest*
11640   eval "ac_cv_header_$ac_safe=yes"
11641 else
11642   echo "$ac_err" >&5
11643   echo "configure: failed program was:" >&5
11644   cat conftest.$ac_ext >&5
11645   rm -rf conftest*
11646   eval "ac_cv_header_$ac_safe=no"
11647 fi
11648 rm -f conftest*
11649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11650   echo "$ac_t""yes" 1>&6
11651   sound_found=yes sound_cflags=""
11652       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11653    echo "    xemacs will be linked with \"sunplay.o\""
11654  fi
11655 else
11656   echo "$ac_t""no" 1>&6
11657 fi
11658
11659   fi
11660
11661     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11662     sound_found=yes
11663     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11664    echo "    xemacs will be linked with \"sunplay.o\""
11665  fi
11666     if test -d "/usr/demo/SOUND/include"
11667       then sound_cflags="-I/usr/demo/SOUND/include"
11668       else sound_cflags="-I/usr/demo/SOUND"
11669     fi
11670     if test -z "$native_sound_lib" ; then
11671       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11672         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11673         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11674       fi
11675     fi
11676   fi
11677
11678     if test -z "$sound_found"; then
11679     case "$canonical" in
11680     *-sgi-* )
11681       if test -z "$native_sound_lib"; then
11682         
11683 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11684 echo "configure:11685: checking for ALopenport in -laudio" >&5
11685 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11686
11687 xe_check_libs=" -laudio "
11688 cat > conftest.$ac_ext <<EOF
11689 #line 11690 "configure"
11690 #include "confdefs.h"
11691 /* Override any gcc2 internal prototype to avoid an error.  */
11692 /* We use char because int might match the return type of a gcc2
11693     builtin and then its argument prototype would still apply.  */
11694 char ALopenport();
11695
11696 int main() {
11697 ALopenport()
11698 ; return 0; }
11699 EOF
11700 if { (eval echo configure:11701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11701   rm -rf conftest*
11702   eval "ac_cv_lib_$ac_lib_var=yes"
11703 else
11704   echo "configure: failed program was:" >&5
11705   cat conftest.$ac_ext >&5
11706   rm -rf conftest*
11707   eval "ac_cv_lib_$ac_lib_var=no"
11708 fi
11709 rm -f conftest*
11710 xe_check_libs=""
11711
11712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11713   echo "$ac_t""yes" 1>&6
11714   native_sound_lib="-laudio"
11715 else
11716   echo "$ac_t""no" 1>&6
11717 fi
11718
11719
11720       fi
11721       if test -n "$native_sound_lib"; then
11722         sound_found=yes sound_cflags=""
11723         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11724    echo "    xemacs will be linked with \"sgiplay.o\""
11725  fi
11726       fi ;;
11727     hppa*-hp-hpux* )
11728       if test -z "$native_sound_lib"; then
11729         
11730 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11731 echo "configure:11732: checking for AOpenAudio in -lAlib" >&5
11732 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11733
11734 xe_check_libs=" -lAlib "
11735 cat > conftest.$ac_ext <<EOF
11736 #line 11737 "configure"
11737 #include "confdefs.h"
11738 /* Override any gcc2 internal prototype to avoid an error.  */
11739 /* We use char because int might match the return type of a gcc2
11740     builtin and then its argument prototype would still apply.  */
11741 char AOpenAudio();
11742
11743 int main() {
11744 AOpenAudio()
11745 ; return 0; }
11746 EOF
11747 if { (eval echo configure:11748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11748   rm -rf conftest*
11749   eval "ac_cv_lib_$ac_lib_var=yes"
11750 else
11751   echo "configure: failed program was:" >&5
11752   cat conftest.$ac_ext >&5
11753   rm -rf conftest*
11754   eval "ac_cv_lib_$ac_lib_var=no"
11755 fi
11756 rm -f conftest*
11757 xe_check_libs=""
11758
11759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11760   echo "$ac_t""yes" 1>&6
11761   native_sound_lib="-lAlib"
11762 else
11763   echo "$ac_t""no" 1>&6
11764 fi
11765
11766
11767       fi
11768       if test -n "$native_sound_lib"; then
11769         sound_found=yes
11770         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11771    echo "    xemacs will be linked with \"hpplay.o\""
11772  fi
11773         if test "$GCC" = "yes" # Kludge city
11774           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11775           else sound_cflags="+e -I/usr/audio/examples"
11776         fi
11777       fi ;;
11778     esac
11779   fi
11780
11781     if test -z "$sound_found"; then
11782     for dir in "machine" "sys" "linux"; do
11783       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11784 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11785 echo "configure:11786: checking for ${dir}/soundcard.h" >&5
11786
11787 cat > conftest.$ac_ext <<EOF
11788 #line 11789 "configure"
11789 #include "confdefs.h"
11790 #include <${dir}/soundcard.h>
11791 EOF
11792 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11793 { (eval echo configure:11794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11794 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11795 if test -z "$ac_err"; then
11796   rm -rf conftest*
11797   eval "ac_cv_header_$ac_safe=yes"
11798 else
11799   echo "$ac_err" >&5
11800   echo "configure: failed program was:" >&5
11801   cat conftest.$ac_ext >&5
11802   rm -rf conftest*
11803   eval "ac_cv_header_$ac_safe=no"
11804 fi
11805 rm -f conftest*
11806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11807   echo "$ac_t""yes" 1>&6
11808   sound_found=yes
11809        need_miscplay=yes
11810         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11811    echo "    xemacs will be linked with \"linuxplay.o\""
11812  fi
11813         { test "$extra_verbose" = "yes" && cat << EOF
11814     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
11815 EOF
11816 cat >> confdefs.h <<EOF
11817 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
11818 EOF
11819 }
11820
11821         break
11822 else
11823   echo "$ac_t""no" 1>&6
11824 fi
11825
11826     done
11827   fi
11828
11829   test "$sound_found" = "yes" && with_native_sound=yes
11830 fi
11831
11832 if test "$with_native_sound" = "yes"; then
11833   { test "$extra_verbose" = "yes" && cat << \EOF
11834     Defining HAVE_NATIVE_SOUND
11835 EOF
11836 cat >> confdefs.h <<\EOF
11837 #define HAVE_NATIVE_SOUND 1
11838 EOF
11839 }
11840
11841   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11842 fi
11843
11844 if test "$with_nas_sound" != "no"; then
11845   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11846 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11847 echo "configure:11848: checking for audio/audiolib.h" >&5
11848
11849 cat > conftest.$ac_ext <<EOF
11850 #line 11851 "configure"
11851 #include "confdefs.h"
11852 #include <audio/audiolib.h>
11853 EOF
11854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11855 { (eval echo configure:11856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11857 if test -z "$ac_err"; then
11858   rm -rf conftest*
11859   eval "ac_cv_header_$ac_safe=yes"
11860 else
11861   echo "$ac_err" >&5
11862   echo "configure: failed program was:" >&5
11863   cat conftest.$ac_ext >&5
11864   rm -rf conftest*
11865   eval "ac_cv_header_$ac_safe=no"
11866 fi
11867 rm -f conftest*
11868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11869   echo "$ac_t""yes" 1>&6
11870   
11871     
11872 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11873 echo "configure:11874: checking for AuOpenServer in -laudio" >&5
11874 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11875
11876 xe_check_libs=" -laudio "
11877 cat > conftest.$ac_ext <<EOF
11878 #line 11879 "configure"
11879 #include "confdefs.h"
11880 /* Override any gcc2 internal prototype to avoid an error.  */
11881 /* We use char because int might match the return type of a gcc2
11882     builtin and then its argument prototype would still apply.  */
11883 char AuOpenServer();
11884
11885 int main() {
11886 AuOpenServer()
11887 ; return 0; }
11888 EOF
11889 if { (eval echo configure:11890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11890   rm -rf conftest*
11891   eval "ac_cv_lib_$ac_lib_var=yes"
11892 else
11893   echo "configure: failed program was:" >&5
11894   cat conftest.$ac_ext >&5
11895   rm -rf conftest*
11896   eval "ac_cv_lib_$ac_lib_var=no"
11897 fi
11898 rm -f conftest*
11899 xe_check_libs=""
11900
11901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11902   echo "$ac_t""yes" 1>&6
11903   have_nas_sound=yes
11904 else
11905   echo "$ac_t""no" 1>&6
11906 fi
11907
11908
11909 else
11910   echo "$ac_t""no" 1>&6
11911 fi
11912
11913   if test "$have_nas_sound" = "yes"; then
11914     with_nas_sound=yes
11915     { test "$extra_verbose" = "yes" && cat << \EOF
11916     Defining HAVE_NAS_SOUND
11917 EOF
11918 cat >> confdefs.h <<\EOF
11919 #define HAVE_NAS_SOUND 1
11920 EOF
11921 }
11922
11923     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11924    echo "    xemacs will be linked with \"nas.o\""
11925  fi
11926     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11927             cat > conftest.$ac_ext <<EOF
11928 #line 11929 "configure"
11929 #include "confdefs.h"
11930 #include <audio/Xtutil.h>
11931 EOF
11932 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11933   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11934   :
11935 else
11936   rm -rf conftest*
11937   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11938     Defining NAS_NO_ERROR_JUMP
11939 EOF
11940 cat >> confdefs.h <<\EOF
11941 #define NAS_NO_ERROR_JUMP 1
11942 EOF
11943 }
11944
11945 fi
11946 rm -f conftest*
11947
11948   else
11949     test "$with_nas_sound" = "yes" && \
11950       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11951     with_nas_sound=no
11952   fi
11953 fi
11954
11955 if test "$with_esd_sound" != "no"; then
11956   # Extract the first word of "esd-config", so it can be a program name with args.
11957 set dummy esd-config; ac_word=$2
11958 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11959 echo "configure:11960: checking for $ac_word" >&5
11960
11961 if test -n "$have_esd_config"; then
11962   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11963 else
11964   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11965   ac_dummy="$PATH"
11966   for ac_dir in $ac_dummy; do
11967     test -z "$ac_dir" && ac_dir=.
11968     if test -f $ac_dir/$ac_word; then
11969       ac_cv_prog_have_esd_config="yes"
11970       break
11971     fi
11972   done
11973   IFS="$ac_save_ifs"
11974   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11975 fi
11976 have_esd_config="$ac_cv_prog_have_esd_config"
11977 if test -n "$have_esd_config"; then
11978   echo "$ac_t""$have_esd_config" 1>&6
11979 else
11980   echo "$ac_t""no" 1>&6
11981 fi
11982
11983   if test "$have_esd_config" = "yes"; then
11984     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11985     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
11986     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11987     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11988 echo "configure:11989: checking for esd_play_stream" >&5
11989
11990 cat > conftest.$ac_ext <<EOF
11991 #line 11992 "configure"
11992 #include "confdefs.h"
11993 /* System header to define __stub macros and hopefully few prototypes,
11994     which can conflict with char esd_play_stream(); below.  */
11995 #include <assert.h>
11996 /* Override any gcc2 internal prototype to avoid an error.  */
11997 /* We use char because int might match the return type of a gcc2
11998     builtin and then its argument prototype would still apply.  */
11999 char esd_play_stream();
12000
12001 int main() {
12002
12003 /* The GNU C library defines this for functions which it implements
12004     to always fail with ENOSYS.  Some functions are actually named
12005     something starting with __ and the normal name is an alias.  */
12006 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
12007 choke me
12008 #else
12009 esd_play_stream();
12010 #endif
12011
12012 ; return 0; }
12013 EOF
12014 if { (eval echo configure:12015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12015   rm -rf conftest*
12016   eval "ac_cv_func_esd_play_stream=yes"
12017 else
12018   echo "configure: failed program was:" >&5
12019   cat conftest.$ac_ext >&5
12020   rm -rf conftest*
12021   eval "ac_cv_func_esd_play_stream=no"
12022 fi
12023 rm -f conftest*
12024
12025 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
12026   echo "$ac_t""yes" 1>&6
12027   have_esd_sound=yes
12028 else
12029   echo "$ac_t""no" 1>&6
12030 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
12031 fi
12032
12033   fi
12034
12035   if test "$have_esd_sound" = "yes"; then
12036     with_esd_sound=yes
12037     need_miscplay=yes
12038     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
12039    echo "    xemacs will be linked with \"esd.o\""
12040  fi
12041     { test "$extra_verbose" = "yes" && cat << \EOF
12042     Defining HAVE_ESD_SOUND
12043 EOF
12044 cat >> confdefs.h <<\EOF
12045 #define HAVE_ESD_SOUND 1
12046 EOF
12047 }
12048
12049   else
12050     test "$with_esd_sound" = "yes" && \
12051       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
12052     with_esd_sound=no
12053   fi
12054 fi
12055
12056 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
12057    echo "    xemacs will be linked with \"miscplay.o\""
12058  fi
12059
12060
12061 test -z "$with_tty" && with_tty=yes
12062
12063 if test "$with_tty" = "yes"  ; then
12064   echo "checking for TTY-related features" 1>&6
12065 echo "configure:12066: checking for TTY-related features" >&5
12066   { test "$extra_verbose" = "yes" && cat << \EOF
12067     Defining HAVE_TTY
12068 EOF
12069 cat >> confdefs.h <<\EOF
12070 #define HAVE_TTY 1
12071 EOF
12072 }
12073
12074   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
12075    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\""
12076  fi
12077
12078     if test -z "$with_ncurses"; then
12079     
12080 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12081 echo "configure:12082: checking for tgetent in -lncurses" >&5
12082 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12083
12084 xe_check_libs=" -lncurses "
12085 cat > conftest.$ac_ext <<EOF
12086 #line 12087 "configure"
12087 #include "confdefs.h"
12088 /* Override any gcc2 internal prototype to avoid an error.  */
12089 /* We use char because int might match the return type of a gcc2
12090     builtin and then its argument prototype would still apply.  */
12091 char tgetent();
12092
12093 int main() {
12094 tgetent()
12095 ; return 0; }
12096 EOF
12097 if { (eval echo configure:12098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12098   rm -rf conftest*
12099   eval "ac_cv_lib_$ac_lib_var=yes"
12100 else
12101   echo "configure: failed program was:" >&5
12102   cat conftest.$ac_ext >&5
12103   rm -rf conftest*
12104   eval "ac_cv_lib_$ac_lib_var=no"
12105 fi
12106 rm -f conftest*
12107 xe_check_libs=""
12108
12109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12110   echo "$ac_t""yes" 1>&6
12111   with_ncurses=yes
12112 else
12113   echo "$ac_t""no" 1>&6
12114 with_ncurses=no
12115 fi
12116
12117
12118   fi
12119   if test "$with_ncurses" = "yes"; then
12120     { test "$extra_verbose" = "yes" && cat << \EOF
12121     Defining HAVE_NCURSES
12122 EOF
12123 cat >> confdefs.h <<\EOF
12124 #define HAVE_NCURSES 1
12125 EOF
12126 }
12127
12128     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12129 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12130 echo "configure:12131: checking for ncurses/curses.h" >&5
12131
12132 cat > conftest.$ac_ext <<EOF
12133 #line 12134 "configure"
12134 #include "confdefs.h"
12135 #include <ncurses/curses.h>
12136 EOF
12137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12138 { (eval echo configure:12139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12140 if test -z "$ac_err"; then
12141   rm -rf conftest*
12142   eval "ac_cv_header_$ac_safe=yes"
12143 else
12144   echo "$ac_err" >&5
12145   echo "configure: failed program was:" >&5
12146   cat conftest.$ac_ext >&5
12147   rm -rf conftest*
12148   eval "ac_cv_header_$ac_safe=no"
12149 fi
12150 rm -f conftest*
12151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12152   echo "$ac_t""yes" 1>&6
12153   curses_h_file=ncurses/curses.h
12154 else
12155   echo "$ac_t""no" 1>&6
12156 fi
12157
12158     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12159 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12160 echo "configure:12161: checking for ncurses/term.h" >&5
12161
12162 cat > conftest.$ac_ext <<EOF
12163 #line 12164 "configure"
12164 #include "confdefs.h"
12165 #include <ncurses/term.h>
12166 EOF
12167 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12168 { (eval echo configure:12169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12169 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12170 if test -z "$ac_err"; then
12171   rm -rf conftest*
12172   eval "ac_cv_header_$ac_safe=yes"
12173 else
12174   echo "$ac_err" >&5
12175   echo "configure: failed program was:" >&5
12176   cat conftest.$ac_ext >&5
12177   rm -rf conftest*
12178   eval "ac_cv_header_$ac_safe=no"
12179 fi
12180 rm -f conftest*
12181 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12182   echo "$ac_t""yes" 1>&6
12183   term_h_file=ncurses/term.h
12184 else
12185   echo "$ac_t""no" 1>&6
12186 fi
12187
12188     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12189    echo "    xemacs will be linked with \"terminfo.o\""
12190  fi
12191     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12192
12193     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12194                         save_c_switch_site="$c_switch_site"
12195       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12196       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12197 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12198 echo "configure:12199: checking for ncurses/curses.h" >&5
12199
12200 cat > conftest.$ac_ext <<EOF
12201 #line 12202 "configure"
12202 #include "confdefs.h"
12203 #include <ncurses/curses.h>
12204 EOF
12205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12206 { (eval echo configure:12207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12208 if test -z "$ac_err"; then
12209   rm -rf conftest*
12210   eval "ac_cv_header_$ac_safe=yes"
12211 else
12212   echo "$ac_err" >&5
12213   echo "configure: failed program was:" >&5
12214   cat conftest.$ac_ext >&5
12215   rm -rf conftest*
12216   eval "ac_cv_header_$ac_safe=no"
12217 fi
12218 rm -f conftest*
12219 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12220   echo "$ac_t""yes" 1>&6
12221   curses_h_file=ncurses/curses.h
12222 else
12223   echo "$ac_t""no" 1>&6
12224 fi
12225
12226       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12227         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12228         else c_switch_site="$save_c_switch_site"
12229       fi
12230     fi
12231   else         if test "$have_terminfo" = "yes"; then
12232       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12233    echo "    xemacs will be linked with \"terminfo.o\""
12234  fi
12235       if test -n "$libs_termcap"; then
12236         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12237       else
12238         for lib in curses termlib termcap; do
12239           
12240 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12241 echo "configure:12242: checking for tgetent in -l$lib" >&5
12242 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12243
12244 xe_check_libs=" -l$lib "
12245 cat > conftest.$ac_ext <<EOF
12246 #line 12247 "configure"
12247 #include "confdefs.h"
12248 /* Override any gcc2 internal prototype to avoid an error.  */
12249 /* We use char because int might match the return type of a gcc2
12250     builtin and then its argument prototype would still apply.  */
12251 char tgetent();
12252
12253 int main() {
12254 tgetent()
12255 ; return 0; }
12256 EOF
12257 if { (eval echo configure:12258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12258   rm -rf conftest*
12259   eval "ac_cv_lib_$ac_lib_var=yes"
12260 else
12261   echo "configure: failed program was:" >&5
12262   cat conftest.$ac_ext >&5
12263   rm -rf conftest*
12264   eval "ac_cv_lib_$ac_lib_var=no"
12265 fi
12266 rm -f conftest*
12267 xe_check_libs=""
12268
12269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12270   echo "$ac_t""yes" 1>&6
12271   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12272 else
12273   echo "$ac_t""no" 1>&6
12274 fi
12275
12276
12277         done
12278       fi
12279     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12280    echo "    xemacs will be linked with \"tparam.o\""
12281  fi
12282                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12283       if test -n "$libs_termcap"; then
12284         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12285       else
12286         
12287 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12288 echo "configure:12289: checking for tgetent in -lcurses" >&5
12289 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12290
12291 xe_check_libs=" -lcurses "
12292 cat > conftest.$ac_ext <<EOF
12293 #line 12294 "configure"
12294 #include "confdefs.h"
12295 /* Override any gcc2 internal prototype to avoid an error.  */
12296 /* We use char because int might match the return type of a gcc2
12297     builtin and then its argument prototype would still apply.  */
12298 char tgetent();
12299
12300 int main() {
12301 tgetent()
12302 ; return 0; }
12303 EOF
12304 if { (eval echo configure:12305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12305   rm -rf conftest*
12306   eval "ac_cv_lib_$ac_lib_var=yes"
12307 else
12308   echo "configure: failed program was:" >&5
12309   cat conftest.$ac_ext >&5
12310   rm -rf conftest*
12311   eval "ac_cv_lib_$ac_lib_var=no"
12312 fi
12313 rm -f conftest*
12314 xe_check_libs=""
12315
12316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12317   echo "$ac_t""yes" 1>&6
12318   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12319 else
12320   echo "$ac_t""no" 1>&6
12321 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12322 echo "configure:12323: checking for tgetent in -ltermcap" >&5
12323 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12324
12325 xe_check_libs=" -ltermcap "
12326 cat > conftest.$ac_ext <<EOF
12327 #line 12328 "configure"
12328 #include "confdefs.h"
12329 /* Override any gcc2 internal prototype to avoid an error.  */
12330 /* We use char because int might match the return type of a gcc2
12331     builtin and then its argument prototype would still apply.  */
12332 char tgetent();
12333
12334 int main() {
12335 tgetent()
12336 ; return 0; }
12337 EOF
12338 if { (eval echo configure:12339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12339   rm -rf conftest*
12340   eval "ac_cv_lib_$ac_lib_var=yes"
12341 else
12342   echo "configure: failed program was:" >&5
12343   cat conftest.$ac_ext >&5
12344   rm -rf conftest*
12345   eval "ac_cv_lib_$ac_lib_var=no"
12346 fi
12347 rm -f conftest*
12348 xe_check_libs=""
12349
12350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12351   echo "$ac_t""yes" 1>&6
12352   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12353 else
12354   echo "$ac_t""no" 1>&6
12355 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12356    echo "    xemacs will be linked with \"termcap.o\""
12357  fi
12358 fi
12359
12360
12361 fi
12362
12363
12364       fi
12365     fi
12366   fi
12367   { test "$extra_verbose" = "yes" && cat << EOF
12368     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
12369 EOF
12370 cat >> confdefs.h <<EOF
12371 #define CURSES_H_FILE "${curses_h_file-curses.h}"
12372 EOF
12373 }
12374
12375   { test "$extra_verbose" = "yes" && cat << EOF
12376     Defining TERM_H_FILE = "${term_h_file-term.h}"
12377 EOF
12378 cat >> confdefs.h <<EOF
12379 #define TERM_H_FILE "${term_h_file-term.h}"
12380 EOF
12381 }
12382
12383
12384     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
12385 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
12386 echo "configure:12387: checking for gpm.h" >&5
12387
12388 cat > conftest.$ac_ext <<EOF
12389 #line 12390 "configure"
12390 #include "confdefs.h"
12391 #include <gpm.h>
12392 EOF
12393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12394 { (eval echo configure:12395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12396 if test -z "$ac_err"; then
12397   rm -rf conftest*
12398   eval "ac_cv_header_$ac_safe=yes"
12399 else
12400   echo "$ac_err" >&5
12401   echo "configure: failed program was:" >&5
12402   cat conftest.$ac_ext >&5
12403   rm -rf conftest*
12404   eval "ac_cv_header_$ac_safe=no"
12405 fi
12406 rm -f conftest*
12407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12408   echo "$ac_t""yes" 1>&6
12409   :
12410 else
12411   echo "$ac_t""no" 1>&6
12412 with_gpm=no
12413 fi
12414  }
12415   test -z "$with_gpm" && { 
12416 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
12417 echo "configure:12418: checking for Gpm_Open in -lgpm" >&5
12418 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
12419
12420 xe_check_libs=" -lgpm "
12421 cat > conftest.$ac_ext <<EOF
12422 #line 12423 "configure"
12423 #include "confdefs.h"
12424 /* Override any gcc2 internal prototype to avoid an error.  */
12425 /* We use char because int might match the return type of a gcc2
12426     builtin and then its argument prototype would still apply.  */
12427 char Gpm_Open();
12428
12429 int main() {
12430 Gpm_Open()
12431 ; return 0; }
12432 EOF
12433 if { (eval echo configure:12434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12434   rm -rf conftest*
12435   eval "ac_cv_lib_$ac_lib_var=yes"
12436 else
12437   echo "configure: failed program was:" >&5
12438   cat conftest.$ac_ext >&5
12439   rm -rf conftest*
12440   eval "ac_cv_lib_$ac_lib_var=no"
12441 fi
12442 rm -f conftest*
12443 xe_check_libs=""
12444
12445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12446   echo "$ac_t""yes" 1>&6
12447   with_gpm=yes
12448 else
12449   echo "$ac_t""no" 1>&6
12450 with_gpm=no
12451 fi
12452
12453  }
12454   if test "$with_gpm" = "yes"; then
12455     { test "$extra_verbose" = "yes" && cat << \EOF
12456     Defining HAVE_GPM
12457 EOF
12458 cat >> confdefs.h <<\EOF
12459 #define HAVE_GPM 1
12460 EOF
12461 }
12462
12463     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
12464    echo "    xemacs will be linked with \"gpmevent.o\""
12465  fi
12466     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
12467   fi
12468
12469 else   for feature in ncurses gpm; do
12470     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
12471       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
12472     fi
12473     eval "with_${feature}=no"
12474   done
12475 fi 
12476 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
12477    echo "    xemacs will be linked with \"event-unixoid.o\""
12478  fi
12479
12480
12481 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12482   != "no no no" && echo "checking for database support" 1>&6
12483 echo "configure:12484: checking for database support" >&5
12484
12485 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
12486   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
12487 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
12488 echo "configure:12489: checking for ndbm.h" >&5
12489
12490 cat > conftest.$ac_ext <<EOF
12491 #line 12492 "configure"
12492 #include "confdefs.h"
12493 #include <ndbm.h>
12494 EOF
12495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12496 { (eval echo configure:12497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12498 if test -z "$ac_err"; then
12499   rm -rf conftest*
12500   eval "ac_cv_header_$ac_safe=yes"
12501 else
12502   echo "$ac_err" >&5
12503   echo "configure: failed program was:" >&5
12504   cat conftest.$ac_ext >&5
12505   rm -rf conftest*
12506   eval "ac_cv_header_$ac_safe=no"
12507 fi
12508 rm -f conftest*
12509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12510   echo "$ac_t""yes" 1>&6
12511   :
12512 else
12513   echo "$ac_t""no" 1>&6
12514
12515     test "$with_database_gdbm" = "yes" -o \
12516          "$with_database_dbm"  = "yes" && \
12517       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12518     with_database_gdbm=no with_database_dbm=no
12519 fi
12520
12521 fi
12522
12523 if test "$with_database_gdbm" != "no"; then
12524   
12525 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
12526 echo "configure:12527: checking for dbm_open in -lgdbm" >&5
12527 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
12528
12529 xe_check_libs=" -lgdbm "
12530 cat > conftest.$ac_ext <<EOF
12531 #line 12532 "configure"
12532 #include "confdefs.h"
12533 /* Override any gcc2 internal prototype to avoid an error.  */
12534 /* We use char because int might match the return type of a gcc2
12535     builtin and then its argument prototype would still apply.  */
12536 char dbm_open();
12537
12538 int main() {
12539 dbm_open()
12540 ; return 0; }
12541 EOF
12542 if { (eval echo configure:12543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12543   rm -rf conftest*
12544   eval "ac_cv_lib_$ac_lib_var=yes"
12545 else
12546   echo "configure: failed program was:" >&5
12547   cat conftest.$ac_ext >&5
12548   rm -rf conftest*
12549   eval "ac_cv_lib_$ac_lib_var=no"
12550 fi
12551 rm -f conftest*
12552 xe_check_libs=""
12553
12554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12555   echo "$ac_t""yes" 1>&6
12556   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
12557 else
12558   echo "$ac_t""no" 1>&6
12559 if test "$with_database_gdbm" = "yes"; then
12560      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
12561    fi
12562    with_database_gdbm=no
12563 fi
12564
12565
12566 fi
12567
12568 if test "$with_database_dbm" != "no"; then
12569   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12570 echo "configure:12571: checking for dbm_open" >&5
12571
12572 cat > conftest.$ac_ext <<EOF
12573 #line 12574 "configure"
12574 #include "confdefs.h"
12575 /* System header to define __stub macros and hopefully few prototypes,
12576     which can conflict with char dbm_open(); below.  */
12577 #include <assert.h>
12578 /* Override any gcc2 internal prototype to avoid an error.  */
12579 /* We use char because int might match the return type of a gcc2
12580     builtin and then its argument prototype would still apply.  */
12581 char dbm_open();
12582
12583 int main() {
12584
12585 /* The GNU C library defines this for functions which it implements
12586     to always fail with ENOSYS.  Some functions are actually named
12587     something starting with __ and the normal name is an alias.  */
12588 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12589 choke me
12590 #else
12591 dbm_open();
12592 #endif
12593
12594 ; return 0; }
12595 EOF
12596 if { (eval echo configure:12597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12597   rm -rf conftest*
12598   eval "ac_cv_func_dbm_open=yes"
12599 else
12600   echo "configure: failed program was:" >&5
12601   cat conftest.$ac_ext >&5
12602   rm -rf conftest*
12603   eval "ac_cv_func_dbm_open=no"
12604 fi
12605 rm -f conftest*
12606
12607 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12608   echo "$ac_t""yes" 1>&6
12609   with_database_dbm=yes libdbm=
12610 else
12611   echo "$ac_t""no" 1>&6
12612
12613     
12614 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12615 echo "configure:12616: checking for dbm_open in -ldbm" >&5
12616 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12617
12618 xe_check_libs=" -ldbm "
12619 cat > conftest.$ac_ext <<EOF
12620 #line 12621 "configure"
12621 #include "confdefs.h"
12622 /* Override any gcc2 internal prototype to avoid an error.  */
12623 /* We use char because int might match the return type of a gcc2
12624     builtin and then its argument prototype would still apply.  */
12625 char dbm_open();
12626
12627 int main() {
12628 dbm_open()
12629 ; return 0; }
12630 EOF
12631 if { (eval echo configure:12632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12632   rm -rf conftest*
12633   eval "ac_cv_lib_$ac_lib_var=yes"
12634 else
12635   echo "configure: failed program was:" >&5
12636   cat conftest.$ac_ext >&5
12637   rm -rf conftest*
12638   eval "ac_cv_lib_$ac_lib_var=no"
12639 fi
12640 rm -f conftest*
12641 xe_check_libs=""
12642
12643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12644   echo "$ac_t""yes" 1>&6
12645   with_database_dbm=yes libdbm=-ldbm
12646 else
12647   echo "$ac_t""no" 1>&6
12648 test "$with_database_dbm" = "yes" && \
12649         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12650       with_database_dbm=no
12651 fi
12652
12653
12654 fi
12655
12656 fi
12657
12658 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12659 test "$with_database_gdbm" = "yes" -o \
12660      "$with_database_dbm"  = "yes" && \
12661   { test "$extra_verbose" = "yes" && cat << \EOF
12662     Defining HAVE_DBM
12663 EOF
12664 cat >> confdefs.h <<\EOF
12665 #define HAVE_DBM 1
12666 EOF
12667 }
12668
12669
12670 if test "$with_database_berkdb" != "no"; then
12671   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12672 echo "configure:12673: checking for Berkeley db.h" >&5
12673   for header in "db/db.h" "db.h"; do
12674     cat > conftest.$ac_ext <<EOF
12675 #line 12676 "configure"
12676 #include "confdefs.h"
12677
12678 #include <stdlib.h>
12679 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
12680 #ifdef HAVE_INTTYPES_H
12681 #define __BIT_TYPES_DEFINED__
12682 #include <inttypes.h>
12683 typedef uint8_t  u_int8_t;
12684 typedef uint16_t u_int16_t;
12685 typedef uint32_t u_int32_t;
12686 #ifdef WE_DONT_NEED_QUADS
12687 typedef uint64_t u_int64_t;
12688 #endif
12689 #endif
12690 #endif
12691 #include <$header>
12692
12693 int main() {
12694
12695 ; return 0; }
12696 EOF
12697 if { (eval echo configure:12698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12698   rm -rf conftest*
12699   db_h_file="$header"; break
12700 else
12701   echo "configure: failed program was:" >&5
12702   cat conftest.$ac_ext >&5
12703 fi
12704 rm -f conftest*
12705   done
12706   if test -z "$db_h_file"
12707   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12708   else echo "$ac_t""$db_h_file" 1>&6
12709   fi
12710
12711   if test "$with_database_berkdb" != "no"; then
12712     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12713 echo "configure:12714: checking for Berkeley DB version" >&5
12714     cat > conftest.$ac_ext <<EOF
12715 #line 12716 "configure"
12716 #include "confdefs.h"
12717 #include <$db_h_file>
12718 #if DB_VERSION_MAJOR > 1
12719 yes
12720 #endif
12721
12722 EOF
12723 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12724   egrep "yes" >/dev/null 2>&1; then
12725   rm -rf conftest*
12726   echo "$ac_t""2" 1>&6; dbfunc=db_open
12727 else
12728   rm -rf conftest*
12729   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12730 fi
12731 rm -f conftest*
12732
12733     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12734 echo "configure:12735: checking for $dbfunc" >&5
12735
12736 cat > conftest.$ac_ext <<EOF
12737 #line 12738 "configure"
12738 #include "confdefs.h"
12739 /* System header to define __stub macros and hopefully few prototypes,
12740     which can conflict with char $dbfunc(); below.  */
12741 #include <assert.h>
12742 /* Override any gcc2 internal prototype to avoid an error.  */
12743 /* We use char because int might match the return type of a gcc2
12744     builtin and then its argument prototype would still apply.  */
12745 char $dbfunc();
12746
12747 int main() {
12748
12749 /* The GNU C library defines this for functions which it implements
12750     to always fail with ENOSYS.  Some functions are actually named
12751     something starting with __ and the normal name is an alias.  */
12752 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12753 choke me
12754 #else
12755 $dbfunc();
12756 #endif
12757
12758 ; return 0; }
12759 EOF
12760 if { (eval echo configure:12761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12761   rm -rf conftest*
12762   eval "ac_cv_func_$dbfunc=yes"
12763 else
12764   echo "configure: failed program was:" >&5
12765   cat conftest.$ac_ext >&5
12766   rm -rf conftest*
12767   eval "ac_cv_func_$dbfunc=no"
12768 fi
12769 rm -f conftest*
12770
12771 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12772   echo "$ac_t""yes" 1>&6
12773   with_database_berkdb=yes need_libdb=no
12774 else
12775   echo "$ac_t""no" 1>&6
12776
12777     
12778 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12779 echo "configure:12780: checking for $dbfunc in -ldb" >&5
12780 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12781
12782 xe_check_libs=" -ldb "
12783 cat > conftest.$ac_ext <<EOF
12784 #line 12785 "configure"
12785 #include "confdefs.h"
12786 /* Override any gcc2 internal prototype to avoid an error.  */
12787 /* We use char because int might match the return type of a gcc2
12788     builtin and then its argument prototype would still apply.  */
12789 char $dbfunc();
12790
12791 int main() {
12792 $dbfunc()
12793 ; return 0; }
12794 EOF
12795 if { (eval echo configure:12796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12796   rm -rf conftest*
12797   eval "ac_cv_lib_$ac_lib_var=yes"
12798 else
12799   echo "configure: failed program was:" >&5
12800   cat conftest.$ac_ext >&5
12801   rm -rf conftest*
12802   eval "ac_cv_lib_$ac_lib_var=no"
12803 fi
12804 rm -f conftest*
12805 xe_check_libs=""
12806
12807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12808   echo "$ac_t""yes" 1>&6
12809   with_database_berkdb=yes need_libdb=yes
12810 else
12811   echo "$ac_t""no" 1>&6
12812 fi
12813
12814
12815 fi
12816
12817   fi
12818
12819   if test "$with_database_berkdb" = "yes"; then
12820     { test "$extra_verbose" = "yes" && cat << EOF
12821     Defining DB_H_FILE = "$db_h_file"
12822 EOF
12823 cat >> confdefs.h <<EOF
12824 #define DB_H_FILE "$db_h_file"
12825 EOF
12826 }
12827
12828     { test "$extra_verbose" = "yes" && cat << \EOF
12829     Defining HAVE_BERKELEY_DB
12830 EOF
12831 cat >> confdefs.h <<\EOF
12832 #define HAVE_BERKELEY_DB 1
12833 EOF
12834 }
12835
12836     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12837   else with_database_berkdb=no
12838   fi
12839 fi
12840
12841 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12842      != "no no no"; then
12843   { test "$extra_verbose" = "yes" && cat << \EOF
12844     Defining HAVE_DATABASE
12845 EOF
12846 cat >> confdefs.h <<\EOF
12847 #define HAVE_DATABASE 1
12848 EOF
12849 }
12850
12851   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12852    echo "    xemacs will be linked with \"database.o\""
12853  fi
12854 fi
12855
12856 if test "$with_socks" = "yes"; then
12857   
12858 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12859 echo "configure:12860: checking for SOCKSinit in -lsocks" >&5
12860 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12861
12862 xe_check_libs=" -lsocks "
12863 cat > conftest.$ac_ext <<EOF
12864 #line 12865 "configure"
12865 #include "confdefs.h"
12866 /* Override any gcc2 internal prototype to avoid an error.  */
12867 /* We use char because int might match the return type of a gcc2
12868     builtin and then its argument prototype would still apply.  */
12869 char SOCKSinit();
12870
12871 int main() {
12872 SOCKSinit()
12873 ; return 0; }
12874 EOF
12875 if { (eval echo configure:12876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12876   rm -rf conftest*
12877   eval "ac_cv_lib_$ac_lib_var=yes"
12878 else
12879   echo "configure: failed program was:" >&5
12880   cat conftest.$ac_ext >&5
12881   rm -rf conftest*
12882   eval "ac_cv_lib_$ac_lib_var=no"
12883 fi
12884 rm -f conftest*
12885 xe_check_libs=""
12886
12887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12888   echo "$ac_t""yes" 1>&6
12889     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12890     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12891   { test "$extra_verbose" = "yes" && cat << EOF
12892     Defining $ac_tr_lib
12893 EOF
12894 cat >> confdefs.h <<EOF
12895 #define $ac_tr_lib 1
12896 EOF
12897 }
12898
12899   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12900
12901 else
12902   echo "$ac_t""no" 1>&6
12903 fi
12904
12905
12906   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12907     Defining HAVE_SOCKS
12908 EOF
12909 cat >> confdefs.h <<\EOF
12910 #define HAVE_SOCKS 1
12911 EOF
12912 }
12913
12914 fi
12915
12916 if test "$usage_tracking" = "yes"; then
12917   { test "$extra_verbose" = "yes" && cat << \EOF
12918     Defining USAGE_TRACKING
12919 EOF
12920 cat >> confdefs.h <<\EOF
12921 #define USAGE_TRACKING 1
12922 EOF
12923 }
12924
12925   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12926 fi
12927
12928 if test "$with_modules" != "no"; then
12929   echo "checking for module support" 1>&6
12930 echo "configure:12931: checking for module support" >&5
12931
12932     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12933 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12934 echo "configure:12935: checking for dlfcn.h" >&5
12935
12936 cat > conftest.$ac_ext <<EOF
12937 #line 12938 "configure"
12938 #include "confdefs.h"
12939 #include <dlfcn.h>
12940 EOF
12941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12942 { (eval echo configure:12943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12943 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12944 if test -z "$ac_err"; then
12945   rm -rf conftest*
12946   eval "ac_cv_header_$ac_safe=yes"
12947 else
12948   echo "$ac_err" >&5
12949   echo "configure: failed program was:" >&5
12950   cat conftest.$ac_ext >&5
12951   rm -rf conftest*
12952   eval "ac_cv_header_$ac_safe=no"
12953 fi
12954 rm -f conftest*
12955 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12956   echo "$ac_t""yes" 1>&6
12957   
12958     
12959 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12960 echo "configure:12961: checking for dlopen in -ldl" >&5
12961 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12962
12963 xe_check_libs=" -ldl "
12964 cat > conftest.$ac_ext <<EOF
12965 #line 12966 "configure"
12966 #include "confdefs.h"
12967 /* Override any gcc2 internal prototype to avoid an error.  */
12968 /* We use char because int might match the return type of a gcc2
12969     builtin and then its argument prototype would still apply.  */
12970 char dlopen();
12971
12972 int main() {
12973 dlopen()
12974 ; return 0; }
12975 EOF
12976 if { (eval echo configure:12977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12977   rm -rf conftest*
12978   eval "ac_cv_lib_$ac_lib_var=yes"
12979 else
12980   echo "configure: failed program was:" >&5
12981   cat conftest.$ac_ext >&5
12982   rm -rf conftest*
12983   eval "ac_cv_lib_$ac_lib_var=no"
12984 fi
12985 rm -f conftest*
12986 xe_check_libs=""
12987
12988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12989   echo "$ac_t""yes" 1>&6
12990   have_dl=yes libdl=dl
12991 else
12992   echo "$ac_t""no" 1>&6
12993
12994 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12995 echo "configure:12996: checking for dlopen in -lc" >&5
12996 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12997
12998 xe_check_libs=" -lc "
12999 cat > conftest.$ac_ext <<EOF
13000 #line 13001 "configure"
13001 #include "confdefs.h"
13002 /* Override any gcc2 internal prototype to avoid an error.  */
13003 /* We use char because int might match the return type of a gcc2
13004     builtin and then its argument prototype would still apply.  */
13005 char dlopen();
13006
13007 int main() {
13008 dlopen()
13009 ; return 0; }
13010 EOF
13011 if { (eval echo configure:13012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13012   rm -rf conftest*
13013   eval "ac_cv_lib_$ac_lib_var=yes"
13014 else
13015   echo "configure: failed program was:" >&5
13016   cat conftest.$ac_ext >&5
13017   rm -rf conftest*
13018   eval "ac_cv_lib_$ac_lib_var=no"
13019 fi
13020 rm -f conftest*
13021 xe_check_libs=""
13022
13023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13024   echo "$ac_t""yes" 1>&6
13025   have_dl=yes 
13026 else
13027   echo "$ac_t""no" 1>&6
13028 fi
13029
13030
13031 fi
13032
13033
13034 else
13035   echo "$ac_t""no" 1>&6
13036 fi
13037
13038   if test -n "$have_dl"; then
13039     { test "$extra_verbose" = "yes" && cat << \EOF
13040     Defining HAVE_DLOPEN
13041 EOF
13042 cat >> confdefs.h <<\EOF
13043 #define HAVE_DLOPEN 1
13044 EOF
13045 }
13046
13047   else
13048     
13049 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
13050 echo "configure:13051: checking for shl_load in -ldld" >&5
13051 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
13052
13053 xe_check_libs=" -ldld "
13054 cat > conftest.$ac_ext <<EOF
13055 #line 13056 "configure"
13056 #include "confdefs.h"
13057 /* Override any gcc2 internal prototype to avoid an error.  */
13058 /* We use char because int might match the return type of a gcc2
13059     builtin and then its argument prototype would still apply.  */
13060 char shl_load();
13061
13062 int main() {
13063 shl_load()
13064 ; return 0; }
13065 EOF
13066 if { (eval echo configure:13067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13067   rm -rf conftest*
13068   eval "ac_cv_lib_$ac_lib_var=yes"
13069 else
13070   echo "configure: failed program was:" >&5
13071   cat conftest.$ac_ext >&5
13072   rm -rf conftest*
13073   eval "ac_cv_lib_$ac_lib_var=no"
13074 fi
13075 rm -f conftest*
13076 xe_check_libs=""
13077
13078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13079   echo "$ac_t""yes" 1>&6
13080   libdl=dld have_dl=yes;
13081       { test "$extra_verbose" = "yes" && cat << \EOF
13082     Defining HAVE_SHL_LOAD
13083 EOF
13084 cat >> confdefs.h <<\EOF
13085 #define HAVE_SHL_LOAD 1
13086 EOF
13087 }
13088
13089 else
13090   echo "$ac_t""no" 1>&6
13091
13092 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
13093 echo "configure:13094: checking for dld_init in -ldld" >&5
13094 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
13095
13096 xe_check_libs=" -ldld "
13097 cat > conftest.$ac_ext <<EOF
13098 #line 13099 "configure"
13099 #include "confdefs.h"
13100 /* Override any gcc2 internal prototype to avoid an error.  */
13101 /* We use char because int might match the return type of a gcc2
13102     builtin and then its argument prototype would still apply.  */
13103 char dld_init();
13104
13105 int main() {
13106 dld_init()
13107 ; return 0; }
13108 EOF
13109 if { (eval echo configure:13110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13110   rm -rf conftest*
13111   eval "ac_cv_lib_$ac_lib_var=yes"
13112 else
13113   echo "configure: failed program was:" >&5
13114   cat conftest.$ac_ext >&5
13115   rm -rf conftest*
13116   eval "ac_cv_lib_$ac_lib_var=no"
13117 fi
13118 rm -f conftest*
13119 xe_check_libs=""
13120
13121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13122   echo "$ac_t""yes" 1>&6
13123   libdl=dld have_dl=yes;
13124       { test "$extra_verbose" = "yes" && cat << \EOF
13125     Defining HAVE_DLD_INIT
13126 EOF
13127 cat >> confdefs.h <<\EOF
13128 #define HAVE_DLD_INIT 1
13129 EOF
13130 }
13131
13132 else
13133   echo "$ac_t""no" 1>&6
13134 fi
13135
13136
13137 fi
13138
13139
13140   fi
13141
13142   if test -n "$have_dl"; then
13143         
13144 dll_ld=
13145 dll_ldflags=
13146 dll_cflags=
13147 dll_post=
13148 dll_ldo="-o"
13149 ld_dynamic_link_flags=
13150 xehost=$canonical
13151 xealias=$internal_configuration
13152
13153 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13154 echo "configure:13155: checking how to build dynamic libraries for ${xehost}" >&5
13155 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13156 case "$xehost" in
13157 *-*-linux-gnu*) ;;
13158 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13159 esac
13160
13161 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13162 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13163 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13164
13165 case "$xehost_os" in
13166 aix3*)
13167   # AIX sometimes has problems with the GCC collect2 program.  For some
13168   # reason, if we set the COLLECT_NAMES environment variable, the problems
13169   # vanish in a puff of smoke.
13170   if test "${COLLECT_NAMES+set}" != set; then
13171     COLLECT_NAMES=
13172     export COLLECT_NAMES
13173   fi
13174   ;;
13175 esac
13176
13177 # Now see if the compiler is really GCC.
13178 if test "$GCC" = "yes"; then
13179   XEGCC=yes
13180 else
13181   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13182 echo "configure:13183: checking checking whether we are using GNU C" >&5
13183   cat > conftest.$ac_ext <<EOF
13184 #line 13185 "configure"
13185 #include "confdefs.h"
13186
13187 #ifdef __GNUC__
13188   yes;
13189 #endif
13190
13191 EOF
13192 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13193   egrep "yes" >/dev/null 2>&1; then
13194   rm -rf conftest*
13195   XEGCC=yes
13196 else
13197   rm -rf conftest*
13198   XEGCC=no
13199 fi
13200 rm -f conftest*
13201
13202   echo "$ac_t""${XEGCC}" 1>&6
13203 fi
13204
13205 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13206 echo "configure:13207: checking how to produce PIC code" >&5
13207 wl=
13208
13209 can_build_shared=yes
13210 if test "$XEGCC" = yes; then
13211   wl='-Wl,'
13212
13213   case "$xehost_os" in
13214   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
13215     # PIC is the default for these OSes.
13216     ;;
13217
13218   aix3* | aix4* | os2*)
13219     # We can build DLLs from non-PIC.
13220     ;;
13221   amigaos*)
13222     # FIXME: we need at least 68020 code to build shared libraries, but
13223     # adding the `-m68020' flag to GCC prevents building anything better,
13224     # like `-m68040'.
13225     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13226     ;;
13227   *)
13228     dll_cflags='-fPIC'
13229     ;;
13230   esac
13231 else
13232   # PORTME Check for PIC flags for the system compiler.
13233   case "$xehost_os" in
13234   hpux9* | hpux1[0-9]*)
13235     # Is there a better link_static_flag that works with the bundled CC?
13236     wl='-Wl,'
13237     dll_cflags='+Z'
13238     ;;
13239
13240   irix5* | irix6*)
13241     wl='-Wl,'
13242     # PIC (with -KPIC) is the default.
13243     ;;
13244
13245   os2*)
13246     # We can build DLLs from non-PIC.
13247     ;;
13248
13249   osf3* | osf4*)
13250     # All OSF/1 code is PIC.
13251     wl='-Wl,'
13252     ;;
13253
13254   sco3.2v5*)
13255     dll_cflags='-belf -Kpic'
13256     wl='-Wl,'
13257     ;;
13258
13259   unixware*)
13260     dll_cflags="-KPIC"
13261     wl="-Wl,"
13262     ;;
13263
13264   sysv4*)
13265     dll_cflags="-KPIC"
13266     wl="-Wl,"
13267     ;;
13268
13269   sysv5*)
13270     dll_cflags="-KPIC"
13271     wl="-Wl,"
13272     ;;
13273
13274   solaris2*)
13275     dll_cflags='-KPIC'
13276     wl='-Wl,'
13277     ;;
13278
13279   sunos4*)
13280     dll_cflags='-PIC'
13281     wl='-Qoption ld '
13282     ;;
13283
13284   uts4*)
13285     dll_cflags='-pic'
13286     ;;
13287
13288   *)
13289     can_build_shared=no
13290     ;;
13291   esac
13292 fi
13293
13294 if test -n "$dll_cflags"; then
13295   echo "$ac_t""${dll_cflags}" 1>&6
13296   
13297   # Check to make sure the dll_cflags actually works.
13298   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
13299 echo "configure:13300: checking if PIC flag ${dll_cflags} really works" >&5
13300   save_CFLAGS="$CFLAGS"
13301   CFLAGS="$CFLAGS $dll_cflags -DPIC"
13302   cat > conftest.$ac_ext <<EOF
13303 #line 13304 "configure"
13304 #include "confdefs.h"
13305
13306 int main() {
13307 int x=0;
13308 ; return 0; }
13309 EOF
13310 if { (eval echo configure:13311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13311   rm -rf conftest*
13312   
13313     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
13314     # reports no error.  So, we need to grep stderr for (Bundled).
13315     if grep '(Bundled)' config.log >/dev/null; then
13316       echo "$ac_t""no" 1>&6
13317       can_build_shared=no
13318       dll_cflags=
13319     else
13320       echo "$ac_t""yes" 1>&6
13321     fi
13322 else
13323   echo "configure: failed program was:" >&5
13324   cat conftest.$ac_ext >&5
13325   rm -rf conftest*
13326   echo "$ac_t""no" 1>&6
13327     can_build_shared=no
13328     dll_cflags=
13329 fi
13330 rm -f conftest*
13331   CFLAGS="$save_CFLAGS"
13332 else
13333   echo "$ac_t""none" 1>&6
13334 fi
13335
13336 if test "$can_build_shared" = "yes"; then
13337 cc_produces_so=no
13338 xldf=
13339 xcldf=
13340 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13341 echo "configure:13342: checking if C compiler can produce shared libraries" >&5
13342 if test "$XEGCC" = yes; then
13343   xcldf="-shared"
13344   xldf="-shared"
13345 else # Not using GCC
13346   case "$xehost_os" in
13347     aix3* | aix4*)
13348       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13349       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13350       ;;
13351
13352     freebsd2* | netbsd* | openbsd*)
13353       xldf="-Bshareable"
13354       xcldf="${wl}-Bshareable"
13355       ;;
13356
13357     freebsd3*)
13358       xcldf="-shared"
13359       ;;
13360
13361     hpux*)
13362       xldf="-b +s"
13363       xcldf="${wl}-b ${wl}+s"
13364       ;;
13365
13366     irix5* | irix6* | osf3* | osf4*)
13367       xcldf="${wl}-shared"
13368       xldf="-shared"
13369       ;;
13370
13371     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13372       xcldf="-G"
13373       xldf="-G"
13374       ;;
13375
13376     sunos4*)
13377       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
13378       xldf="-assert pure-text -Bstatic"
13379       ;;
13380   esac
13381 fi # End if if we are using gcc
13382
13383 if test -n "$xcldf"; then
13384   save_LDFLAGS=$LDFLAGS
13385   save_LIBS=$LIBS
13386   save_xe_libs=$xe_libs
13387   LDFLAGS="$xcldf $LDFLAGS"
13388   LIBS=
13389   xe_libs=
13390   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13391   cat > conftest.$ac_ext <<EOF
13392 #line 13393 "configure"
13393 #include "confdefs.h"
13394
13395 int main() {
13396 int x=0;
13397 ; return 0; }
13398 EOF
13399 if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13400   rm -rf conftest*
13401   cc_produces_so=yes
13402 else
13403   echo "configure: failed program was:" >&5
13404   cat conftest.$ac_ext >&5
13405   rm -rf conftest*
13406   cc_produces_so=no
13407 fi
13408 rm -f conftest*
13409   LDFLAGS=$save_LDFLAGS
13410   LIBS=$save_LIBS
13411   xe_libs=$save_xe_libs
13412   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13413 else
13414   cc_produces_so=no
13415 fi
13416 echo "$ac_t""${cc_produces_so}" 1>&6
13417
13418 LTLD=$LD
13419 if test -z "$LTLD"; then
13420   ac_prog=ld
13421   if test "$XEGCC" = yes; then
13422     # Check if gcc -print-prog-name=ld gives a path.
13423     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
13424 echo "configure:13425: checking for ld used by GCC" >&5
13425     ac_prog=`($CC -print-prog-name=ld) 2>&5`
13426     case "$ac_prog" in
13427     # Accept absolute paths.
13428     /*)
13429       if test -z "$LTLD"; then
13430         case "$ac_prog" in
13431           *gcc-lib*) LTLD="$CC"
13432                      ;;
13433           *)         LTLD="$ac_prog"
13434                      ;;
13435         esac
13436       fi
13437       ;;
13438     "")
13439       # If it fails, then pretend we aren't using GCC.
13440       ac_prog=ld
13441       ;;
13442     *)
13443       # If it is relative, then search for the first ld in PATH.
13444       with_gnu_ld=unknown
13445       ;;
13446     esac
13447   else
13448     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
13449 echo "configure:13450: checking for GNU ld" >&5
13450   fi
13451
13452   if test -z "$LTLD"; then
13453     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13454     for ac_dir in $PATH; do
13455       test -z "$ac_dir" && ac_dir=.
13456       if test -f "$ac_dir/$ac_prog"; then
13457         LTLD="$ac_dir/$ac_prog"
13458         # Check to see if the program is GNU ld.  I'd rather use --version,
13459         # but apparently some GNU ld's only accept -v.
13460         # Break only if it was the GNU/non-GNU ld that we prefer.
13461         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
13462           xe_gnu_ld=yes
13463         else
13464           xe_gnu_ld=no
13465         fi
13466       fi
13467     done
13468     IFS="$ac_save_ifs"
13469   fi
13470
13471   if test -n "$LTLD"; then
13472     echo "$ac_t""${LTLD}" 1>&6
13473   else
13474     echo "$ac_t""no" 1>&6
13475   fi
13476
13477   if test -z "$LTLD" -a "$cc_produces_so" = no; then
13478     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
13479     exit 1
13480   fi
13481 fi
13482
13483 ld_dynamic_link_flags=
13484
13485 # Check to see if it really is or isn't GNU ld.
13486 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
13487 echo "configure:13488: checking if the linker is GNU ld" >&5
13488 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
13489 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
13490   xe_gnu_ld=yes
13491 else
13492   xe_gnu_ld=no
13493 fi
13494 echo "$ac_t""${xe_gnu_ld}" 1>&6
13495
13496 case "$xehost_os" in
13497   amigaos* | sunos4*)
13498     # On these operating systems, we should treat GNU ld like the system ld.
13499     gnu_ld_acts_native=yes
13500     ;;
13501   *)
13502     gnu_ld_acts_native=no
13503     ;;
13504 esac
13505
13506 if test "$cc_produces_so" = "yes"; then
13507   dll_ld=$CC
13508   dll_ldflags=$xcldf
13509   can_build_shared=yes
13510   ld_shlibs=yes
13511 else
13512   # OK - only NOW do we futz about with ld.
13513   # See if the linker supports building shared libraries.
13514   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
13515 echo "configure:13516: checking whether the linker supports shared libraries" >&5
13516   dll_ld=$CC
13517   dll_ldflags=$LDFLAGS
13518   ld_shlibs=yes
13519   can_build_shared=yes
13520   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
13521     # See if GNU ld supports shared libraries.
13522     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
13523       dll_ld=$CC
13524       dll_ldflags="-shared"
13525       ld_shlibs=yes
13526     else
13527       ld_shlibs=no
13528     fi
13529   else
13530     # PORTME fill in a description of your system's linker (not GNU ld)
13531     case "$xehost_os" in
13532     aix3*)
13533       dll_ld=$LTLD
13534       dll_ldflags=$xldf
13535       ;;
13536
13537     aix4*)
13538       dll_ldflags=$xcldf
13539       ;;
13540
13541     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13542     # support.  Future versions do this automatically, but an explicit c++rt0.o
13543     # doesn't break anything, and helps significantly (at the cost of a little
13544     # extra space).
13545     freebsd2.2*)
13546       dll_ld=$LTLD
13547       dll_ldflags=$xldf
13548       dll_post="/usr/lib/c++rt0.o"
13549       ;;
13550
13551     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
13552     freebsd2*)
13553       dll_ld=$LTLD
13554       dll_ldflags="-Bshareable"
13555       ;;
13556
13557     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
13558     freebsd3*)
13559       dll_ldflags="-shared"
13560       ;;
13561
13562     hpux*)
13563       dll_ld=$LTLD
13564       dll_ldflags=$xldf
13565       ;;
13566
13567     irix5* | irix6*)
13568       dll_ld=$LTLD
13569       dll_ldflags=$xldf
13570       ;;
13571
13572     netbsd*)
13573       # Tested with NetBSD 1.2 ld
13574       dll_ld=$LTLD
13575       dll_ldflags=$xldf
13576       ;;
13577
13578     openbsd*)
13579       dll_ld=$LTLD
13580       dll_ldflags=$xldf
13581       ;;
13582
13583     osf3* | osf4*)
13584       dll_ld=$LTLD
13585       dll_ldflags=$xldf
13586       ;;
13587
13588     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13589     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13590       dll_ld=$LTLD
13591       case "$dll_ld" in
13592         *gcc*) dll_ldflags="-shared"
13593                dll_ld=$CC
13594                ;;
13595         *)     dll_ldflags="-G"
13596                ;;
13597       esac
13598       ;;
13599
13600     sunos4*)
13601       if test "$XEGCC" = yes; then
13602         dll_ld=$CC
13603       else
13604         dll_ld=$LTLD
13605       fi
13606       dll_ldflags=$xldf
13607       ;;
13608
13609     uts4*)
13610       dll_ld=$LTLD
13611       dll_ldflags="-G"
13612       ;;
13613
13614     bsdi*)
13615       dll_ldflags="-r"
13616       dll_ld="shlicc2"
13617       ;;
13618
13619     *)
13620       ld_shlibs=no
13621       can_build_shared=no
13622       ;;
13623     esac
13624   fi
13625   echo "$ac_t""${ld_shlibs}" 1>&6
13626   if test "$ld_shlibs" = "no"; then
13627     can_build_shared=no
13628   fi
13629 fi # End of if cc_produces_so = no
13630
13631
13632 if test "$xe_gnu_ld" = yes; then
13633   if test "$ld_shlibs" = yes; then
13634     ld_dynamic_link_flags="${wl}-export-dynamic"
13635   fi
13636 fi
13637
13638 if test -z "$ld_dynamic_link_flags"; then
13639   case "$xehost_os" in
13640   aix3*)
13641     ld_dynamic_link_flags=
13642     ;;
13643
13644   aix4*)
13645     ld_dynamic_link_flags=
13646     ;;
13647
13648   freebsd2.2*)
13649     ld_dynamic_link_flags=
13650     ;;
13651
13652   freebsd2*)
13653     ld_dynamic_link_flags=
13654     ;;
13655
13656   freebsd3*)
13657     ld_dynamic_link_flags=
13658     ;;
13659
13660   hpux*)
13661     ld_dynamic_link_flags="${wl}-E"
13662     ;;
13663
13664   irix5* | irix6*)
13665     ld_dynamic_link_flags=
13666     ;;
13667
13668   netbsd*)
13669     ld_dynamic_link_flags=
13670     ;;
13671
13672   openbsd*)
13673     ld_dynamic_link_flags=
13674     ;;
13675
13676   osf3* | osf4*)
13677     ld_dynamic_link_flags=
13678     ;;
13679
13680   solaris2* | solaris7*)
13681     ld_dynamic_link_flags=
13682     ;;
13683
13684   sco3.2v5* | unixware* | sysv5* | sysv4*)
13685     ld_dynamic_link_flags="${wl}-Bexport"
13686     ;;
13687
13688   sunos4*)
13689     ld_dynamic_link_flags=
13690     ;;
13691
13692   uts4*)
13693     ld_dynamic_link_flags=
13694     ;;
13695
13696   bsdi*)
13697     ld_dynamic_link_flags=
13698     ;;
13699
13700   esac
13701 fi # End of if -z ld_dynamic_link_flags
13702 fi # End of if test "$can_build_shared" = "yes"
13703
13704
13705
13706
13707
13708
13709
13710
13711   fi
13712
13713   if test "$can_build_shared" = "yes"; then
13714     { test "$extra_verbose" = "yes" && cat << \EOF
13715     Defining HAVE_SHLIB
13716 EOF
13717 cat >> confdefs.h <<\EOF
13718 #define HAVE_SHLIB 1
13719 EOF
13720 }
13721
13722     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13723    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13724  fi
13725     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13726     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13727     for ac_func in dlerror _dlerror
13728 do
13729 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13730 echo "configure:13731: checking for $ac_func" >&5
13731
13732 cat > conftest.$ac_ext <<EOF
13733 #line 13734 "configure"
13734 #include "confdefs.h"
13735 /* System header to define __stub macros and hopefully few prototypes,
13736     which can conflict with char $ac_func(); below.  */
13737 #include <assert.h>
13738 /* Override any gcc2 internal prototype to avoid an error.  */
13739 /* We use char because int might match the return type of a gcc2
13740     builtin and then its argument prototype would still apply.  */
13741 char $ac_func();
13742
13743 int main() {
13744
13745 /* The GNU C library defines this for functions which it implements
13746     to always fail with ENOSYS.  Some functions are actually named
13747     something starting with __ and the normal name is an alias.  */
13748 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13749 choke me
13750 #else
13751 $ac_func();
13752 #endif
13753
13754 ; return 0; }
13755 EOF
13756 if { (eval echo configure:13757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13757   rm -rf conftest*
13758   eval "ac_cv_func_$ac_func=yes"
13759 else
13760   echo "configure: failed program was:" >&5
13761   cat conftest.$ac_ext >&5
13762   rm -rf conftest*
13763   eval "ac_cv_func_$ac_func=no"
13764 fi
13765 rm -f conftest*
13766
13767 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13768   echo "$ac_t""yes" 1>&6
13769     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13770   { test "$extra_verbose" = "yes" && cat << EOF
13771     Defining $ac_tr_func
13772 EOF
13773 cat >> confdefs.h <<EOF
13774 #define $ac_tr_func 1
13775 EOF
13776 }
13777  
13778 else
13779   echo "$ac_t""no" 1>&6
13780 fi
13781 done
13782
13783     with_modules=yes
13784   else
13785     if test "$with_modules" = "yes"; then
13786       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13787     else
13788       echo "configure: warning: "Module support cannot be provided."" 1>&2
13789     fi
13790     with_modules=no
13791   fi
13792 fi
13793
13794 cat > conftest.$ac_ext <<EOF
13795 #line 13796 "configure"
13796 #include "confdefs.h"
13797 int main(int c,char *v[]){return 0;}
13798 EOF
13799 if { (eval echo configure:13800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13800 then
13801   :
13802 else
13803   conftest_rc="$?"
13804   echo "configure: failed program was:" >&5
13805   cat conftest.$ac_ext >&5
13806   rm -fr conftest*
13807   
13808   echo ""
13809   echo "*** PANIC *** The C compiler can no longer build working executables."
13810   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13811   echo "*** PANIC *** The most likely reason for this problem is that configure"
13812   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13813   echo "*** PANIC *** found at run time."
13814   echo "*** PANIC ***"
13815   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13816   echo "*** PANIC *** On other systems, try telling configure where to find the"
13817   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13818   echo "*** PANIC ***"
13819   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13820   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13821   echo "*** PANIC *** on your system.  Don't do that."
13822   exit 1
13823 fi
13824 rm -fr conftest*
13825
13826 if test "$win32_processes" = "yes"; then
13827   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13828    echo "    xemacs will be linked with \"process-nt.o\""
13829  fi
13830 else
13831   { test "$extra_verbose" = "yes" && cat << \EOF
13832     Defining HAVE_UNIX_PROCESSES
13833 EOF
13834 cat >> confdefs.h <<\EOF
13835 #define HAVE_UNIX_PROCESSES 1
13836 EOF
13837 }
13838
13839   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13840    echo "    xemacs will be linked with \"process-unix.o\""
13841  fi
13842 fi
13843
13844
13845
13846 T=""
13847 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13848 CFLAGS="$T"
13849
13850
13851 T=""
13852 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13853 extra_objs="$T"
13854
13855
13856 T=""
13857 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
13858 c_switch_general="$T"
13859
13860
13861 T=""
13862 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13863 c_switch_window_system="$T"
13864
13865
13866 T=""
13867 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13868 c_switch_all="$T"
13869
13870
13871 T=""
13872 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
13873 ld_switch_general="$T"
13874
13875
13876 T=""
13877 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13878 ld_switch_window_system="$T"
13879
13880
13881 T=""
13882 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13883 ld_switch_all="$T"
13884
13885
13886 T=""
13887 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13888 ld_libs_general="$T"
13889
13890
13891 T=""
13892 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
13893 ld_libs_window_system="$T"
13894
13895
13896 T=""
13897 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13898 ld_libs_all="$T"
13899
13900
13901
13902 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13903 internal_makefile_list="Makefile.in"
13904 SUBDIR_MAKEFILES=''
13905 test -d lock || mkdir lock
13906 for dir in $MAKE_SUBDIR; do
13907   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13908         test -d "$d" || mkdir "$d"; cd "$d"
13909       done ) ;;
13910    * ) test -d "$dir" || mkdir "$dir" ;;
13911   esac
13912   
13913 T=""
13914 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13915 SUBDIR_MAKEFILES="$T"
13916
13917   
13918 T=""
13919 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13920 internal_makefile_list="$T"
13921
13922 done
13923
13924
13925
13926
13927 for dir in src/s src/m; do
13928   if test ! -d "$dir" ; then
13929     echo Making symbolic link to "$srcdir/$dir"
13930     ${LN_S} "$srcdir/$dir" "$dir"
13931   fi
13932 done
13933
13934 if test "$extra_verbose" = "yes"; then
13935   echo ""
13936   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
13937   echo ""
13938 fi
13939
13940
13941 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
13942   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
13943   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
13944 fi
13945
13946 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
13947   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
13948   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
13949 fi
13950
13951 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
13952   test "$extra_verbose" = "yes" && echo "creating TAGS"
13953   echo "\f
13954 $srcdir/TAGS,include" > "TAGS"
13955 fi
13956
13957 if test "$__SUNPRO_C" = "yes"; then
13958   test "$extra_verbose" = "yes" && echo "creating .sbinit"
13959   ( echo "# For use with Sun WorkShop's Source browser."
13960     echo "# See sbquery(1) and sbinit(4) for more information"
13961     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13962   ) > .sbinit
13963 fi
13964
13965 rm -f core
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985 PREFIX=$prefix
13986 while true; do
13987   case "$PREFIX" in
13988     *\$* ) eval "PREFIX=$PREFIX" ;;
13989     *) break ;;
13990   esac
13991 done
13992
13993
13994
13995
13996 EXEC_PREFIX=$exec_prefix
13997 while true; do
13998   case "$EXEC_PREFIX" in
13999     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
14000     *) break ;;
14001   esac
14002 done
14003
14004
14005
14006
14007 INFODIR=$infodir
14008 while true; do
14009   case "$INFODIR" in
14010     *\$* ) eval "INFODIR=$INFODIR" ;;
14011     *) break ;;
14012   esac
14013 done
14014
14015
14016
14017
14018 INFOPATH=$infopath
14019 while true; do
14020   case "$INFOPATH" in
14021     *\$* ) eval "INFOPATH=$INFOPATH" ;;
14022     *) break ;;
14023   esac
14024 done
14025
14026
14027
14028
14029 PACKAGE_PATH=$package_path
14030 while true; do
14031   case "$PACKAGE_PATH" in
14032     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
14033     *) break ;;
14034   esac
14035 done
14036
14037
14038
14039
14040 LISPDIR=$lispdir
14041 while true; do
14042   case "$LISPDIR" in
14043     *\$* ) eval "LISPDIR=$LISPDIR" ;;
14044     *) break ;;
14045   esac
14046 done
14047
14048
14049
14050
14051 MODULEDIR=$moduledir
14052 while true; do
14053   case "$MODULEDIR" in
14054     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
14055     *) break ;;
14056   esac
14057 done
14058
14059
14060
14061
14062 SITELISPDIR=$sitelispdir
14063 while true; do
14064   case "$SITELISPDIR" in
14065     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
14066     *) break ;;
14067   esac
14068 done
14069
14070
14071
14072
14073 SITEMODULEDIR=$sitemoduledir
14074 while true; do
14075   case "$SITEMODULEDIR" in
14076     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
14077     *) break ;;
14078   esac
14079 done
14080
14081
14082
14083
14084 ETCDIR=$etcdir
14085 while true; do
14086   case "$ETCDIR" in
14087     *\$* ) eval "ETCDIR=$ETCDIR" ;;
14088     *) break ;;
14089   esac
14090 done
14091
14092
14093
14094
14095 DOCDIR=$docdir
14096 while true; do
14097   case "$DOCDIR" in
14098     *\$* ) eval "DOCDIR=$DOCDIR" ;;
14099     *) break ;;
14100   esac
14101 done
14102
14103
14104
14105
14106 ARCHLIBDIR=$archlibdir
14107 while true; do
14108   case "$ARCHLIBDIR" in
14109     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14110     *) break ;;
14111   esac
14112 done
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14134
14135
14136
14137
14138
14139
14140
14141 : ${XEMACS_CC:=$CC}
14142
14143
14144 if test "$with_prefix" = "yes"; then
14145   { test "$extra_verbose" = "yes" && cat << \EOF
14146     Defining PREFIX_USER_DEFINED
14147 EOF
14148 cat >> confdefs.h <<\EOF
14149 #define PREFIX_USER_DEFINED 1
14150 EOF
14151 }
14152
14153 fi
14154
14155 if test "$with_site_lisp" = "no"; then
14156   { test "$extra_verbose" = "yes" && cat << \EOF
14157     Defining INHIBIT_SITE_LISP
14158 EOF
14159 cat >> confdefs.h <<\EOF
14160 #define INHIBIT_SITE_LISP 1
14161 EOF
14162 }
14163
14164 fi
14165 if test "$with_site_modules" = "no"; then
14166   { test "$extra_verbose" = "yes" && cat << \EOF
14167     Defining INHIBIT_SITE_MODULES
14168 EOF
14169 cat >> confdefs.h <<\EOF
14170 #define INHIBIT_SITE_MODULES 1
14171 EOF
14172 }
14173
14174 fi
14175
14176
14177 T=""
14178 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14179 ac_configure_args="$T"
14180
14181 { test "$extra_verbose" = "yes" && cat << EOF
14182     Defining EMACS_CONFIGURATION = "$configuration"
14183 EOF
14184 cat >> confdefs.h <<EOF
14185 #define EMACS_CONFIGURATION "$configuration"
14186 EOF
14187 }
14188
14189 { test "$extra_verbose" = "yes" && cat << EOF
14190     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14191 EOF
14192 cat >> confdefs.h <<EOF
14193 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14194 EOF
14195 }
14196
14197 { test "$extra_verbose" = "yes" && cat << EOF
14198     Defining config_machfile = "$machfile"
14199 EOF
14200 cat >> confdefs.h <<EOF
14201 #define config_machfile "$machfile"
14202 EOF
14203 }
14204
14205 { test "$extra_verbose" = "yes" && cat << EOF
14206     Defining config_opsysfile = "$opsysfile"
14207 EOF
14208 cat >> confdefs.h <<EOF
14209 #define config_opsysfile "$opsysfile"
14210 EOF
14211 }
14212
14213
14214
14215 null_string=""
14216 { test "$extra_verbose" = "yes" && cat << EOF
14217     Defining LD_SWITCH_X_SITE = $null_string
14218 EOF
14219 cat >> confdefs.h <<EOF
14220 #define LD_SWITCH_X_SITE $null_string
14221 EOF
14222 }
14223
14224 { test "$extra_verbose" = "yes" && cat << EOF
14225     Defining LD_SWITCH_X_SITE_AUX = $null_string
14226 EOF
14227 cat >> confdefs.h <<EOF
14228 #define LD_SWITCH_X_SITE_AUX $null_string
14229 EOF
14230 }
14231
14232 { test "$extra_verbose" = "yes" && cat << EOF
14233     Defining C_SWITCH_X_SITE = $null_string
14234 EOF
14235 cat >> confdefs.h <<EOF
14236 #define C_SWITCH_X_SITE $null_string
14237 EOF
14238 }
14239
14240 { test "$extra_verbose" = "yes" && cat << EOF
14241     Defining LD_SWITCH_SITE = $null_string
14242 EOF
14243 cat >> confdefs.h <<EOF
14244 #define LD_SWITCH_SITE $null_string
14245 EOF
14246 }
14247
14248 { test "$extra_verbose" = "yes" && cat << EOF
14249     Defining C_SWITCH_SITE = $null_string
14250 EOF
14251 cat >> confdefs.h <<EOF
14252 #define C_SWITCH_SITE $null_string
14253 EOF
14254 }
14255
14256
14257
14258 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14259     Defining GNU_MALLOC
14260 EOF
14261 cat >> confdefs.h <<\EOF
14262 #define GNU_MALLOC 1
14263 EOF
14264 }
14265
14266 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14267     Defining USE_SYSTEM_MALLOC
14268 EOF
14269 cat >> confdefs.h <<\EOF
14270 #define USE_SYSTEM_MALLOC 1
14271 EOF
14272 }
14273
14274 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14275     Defining USE_DEBUG_MALLOC
14276 EOF
14277 cat >> confdefs.h <<\EOF
14278 #define USE_DEBUG_MALLOC 1
14279 EOF
14280 }
14281
14282                                               { test "$extra_verbose" = "yes" && cat << \EOF
14283     Defining USE_SYSTEM_MALLOC
14284 EOF
14285 cat >> confdefs.h <<\EOF
14286 #define USE_SYSTEM_MALLOC 1
14287 EOF
14288 }
14289
14290 fi
14291 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14292     Defining I18N3
14293 EOF
14294 cat >> confdefs.h <<\EOF
14295 #define I18N3 1
14296 EOF
14297 }
14298
14299 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14300     Defining USE_GCC
14301 EOF
14302 cat >> confdefs.h <<\EOF
14303 #define USE_GCC 1
14304 EOF
14305 }
14306
14307 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14308     Defining EXTERNAL_WIDGET
14309 EOF
14310 cat >> confdefs.h <<\EOF
14311 #define EXTERNAL_WIDGET 1
14312 EOF
14313 }
14314
14315 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14316     Defining QUICK_BUILD
14317 EOF
14318 cat >> confdefs.h <<\EOF
14319 #define QUICK_BUILD 1
14320 EOF
14321 }
14322
14323 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14324     Defining PURIFY
14325 EOF
14326 cat >> confdefs.h <<\EOF
14327 #define PURIFY 1
14328 EOF
14329 }
14330
14331 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14332     Defining QUANTIFY
14333 EOF
14334 cat >> confdefs.h <<\EOF
14335 #define QUANTIFY 1
14336 EOF
14337 }
14338
14339 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14340     Defining MAIL_USE_POP
14341 EOF
14342 cat >> confdefs.h <<\EOF
14343 #define MAIL_USE_POP 1
14344 EOF
14345 }
14346
14347 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14348     Defining KERBEROS
14349 EOF
14350 cat >> confdefs.h <<\EOF
14351 #define KERBEROS 1
14352 EOF
14353 }
14354
14355 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14356     Defining HESIOD
14357 EOF
14358 cat >> confdefs.h <<\EOF
14359 #define HESIOD 1
14360 EOF
14361 }
14362
14363 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14364     Defining USE_UNION_TYPE
14365 EOF
14366 cat >> confdefs.h <<\EOF
14367 #define USE_UNION_TYPE 1
14368 EOF
14369 }
14370
14371 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14372     Defining PDUMP
14373 EOF
14374 cat >> confdefs.h <<\EOF
14375 #define PDUMP 1
14376 EOF
14377 }
14378
14379
14380
14381 (
14382 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14383 else
14384   echo "uname -a: `uname -a`"
14385 fi
14386 echo ""
14387 echo "$0 $quoted_arguments"
14388 ) > Installation
14389
14390 if test ! -z ${emacs_beta_version} ; then
14391   if test -z "${emacs_is_beta}" ; then
14392         xemacs_betaname=".${emacs_beta_version}"
14393   else
14394         xemacs_betaname="-b${emacs_beta_version}"
14395   fi
14396 else
14397   xemacs_betaname=""
14398 fi
14399
14400 (
14401 echo "
14402
14403 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
14404 "
14405 echo "
14406 Compilation / Installation:"
14407 echo "  Source code location:              $srcdir"
14408 echo "  Installation prefix:               $prefix"
14409 if test -n "$site_includes"; then
14410   echo "  Additional header files:           $site_includes"
14411 fi
14412 if test -n "$site_libraries"; then
14413   echo "  Additional libraries:              $site_libraries"
14414 fi
14415 if test -n "$site_prefixes"; then
14416   echo "  Additional prefixes:               $site_prefixes"
14417 fi
14418 if test -n "$runpath"; then
14419   echo "  Runtime library search path:       $runpath"
14420 fi
14421 echo "  Operating system description file: \`$opsysfile'"
14422 echo "  Machine description file:          \`$machfile'"
14423 echo "  Compiler:                          $CC $CFLAGS"
14424 echo "  Relocating allocator for buffers:  $rel_alloc"
14425 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
14426
14427 echo "
14428 Window System:"
14429 if test "$with_msw" = "yes"; then
14430   echo "  Compiling in support for the Microsoft window system."
14431 fi
14432 if test "$with_x11" = "yes"; then
14433   echo "  Compiling in support for the X window system:"
14434   echo "    - X Windows headers location:                 $x_includes"
14435   echo "    - X Windows libraries location:               $x_libraries"
14436   if test "$with_xauth" != yes; then
14437     echo "    - Xau (X authority) not available."
14438   fi
14439   if test "$with_xmu" != yes; then
14440     echo "    - Xmu library not available; substituting equivalent routines."
14441   fi
14442   if test "$with_wmcommand" != no; then
14443     echo "    - Handling WM_COMMAND properly."
14444   fi
14445 fi
14446 if test "$have_xaw" = "yes"; then
14447   echo "  Compiling in support for the Athena widget set:"
14448   echo "    - Athena headers location:                    $athena_h_path"
14449   echo "    - Athena library to link:                     $athena_lib"
14450 fi
14451 case "$with_menubars" in
14452   lucid ) echo "  Using Lucid menubars." ;;
14453   motif ) echo "  Using Motif menubars."
14454           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
14455           echo "             We recommend using the Lucid menubar instead."
14456           echo "             Re-run configure with --with-menubars='lucid'." ;;
14457     msw ) echo "  Using MS-Windows menubars." ;;
14458 esac
14459 case "$with_scrollbars" in
14460   lucid  ) echo "  Using Lucid scrollbars."      ;;
14461   motif  ) echo "  Using Motif scrollbars."      ;;
14462   athena ) echo "  Using Athena scrollbars."     ;;
14463      msw ) echo "  Using MS-Windows scrollbars." ;;
14464 esac
14465 case "$with_dialogs" in
14466   motif  ) echo "  Using Motif dialog boxes."
14467            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
14468              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
14469              echo "             We recommend using the Athena dialog boxes instead."
14470              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
14471              echo "             Read the PROBLEMS file for more information."
14472            fi; fi ;;
14473   athena ) echo "  Using Athena dialog boxes."     ;;
14474      msw ) echo "  Using MS-Windows dialog boxes." ;;
14475 esac
14476 case "$with_widgets" in
14477   motif  ) echo "  Using Motif native widgets."      ;;
14478   athena ) echo "  Using Athena native widgets."     ;;
14479      msw ) echo "  Using MS-Windows native widgets." ;;
14480 esac
14481 if test "$with_dragndrop" = yes; then
14482   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
14483   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
14484 fi
14485
14486 echo "
14487 TTY:"
14488 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
14489 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
14490
14491 echo "
14492 Images:"
14493 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
14494 if test "$with_xpm" = yes; then
14495   echo "  Compiling in support for XPM  images."
14496 elif test "$with_x11" = yes; then
14497   echo "  WARNING: -----------------------------------------------------------"
14498   echo "  WARNING: Compiling without XPM image support."
14499   if test "$xpm_problem" != ""; then
14500     echo "  Reason: $xpm_problem"
14501   fi
14502   echo "  WARNING: You should strongly consider installing XPM."
14503   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
14504   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14505   echo "  WARNING: -----------------------------------------------------------"
14506 fi
14507 if test "$with_png" = yes; then
14508   echo "  Compiling in support for PNG  images."
14509 elif test "$window_system" != "none"; then
14510   echo "  WARNING: -----------------------------------------------------------"
14511   echo "  WARNING: Compiling without PNG image support."
14512   if test "$png_problem" != ""; then
14513     echo "  Reason: $png_problem"
14514   fi
14515   echo "  WARNING: You should strongly consider installing the PNG libraries."
14516   echo "  WARNING: Otherwise certain images and glyphs may not display."
14517   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14518   echo "  WARNING: -----------------------------------------------------------"
14519 fi
14520 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
14521 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
14522 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
14523
14524 echo "
14525 Sound:"
14526 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
14527 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
14528 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
14529 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
14530
14531 echo "
14532 Databases:"
14533 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
14534 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
14535 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
14536 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
14537 if test "$with_postgresql" = yes; then
14538   echo "  Compiling in support for PostgreSQL."
14539   if test "$with_postgresqlv7" = yes; then
14540     echo "    - Using PostgreSQL V7 bindings."
14541   fi
14542   if test -n "$postgres_h_path"; then
14543     echo "    - PostgreSQL headers location:  $postgres_h_path"
14544   fi
14545 fi
14546
14547 echo "
14548 Internationalization:"
14549 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
14550 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
14551 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
14552 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
14553 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
14554 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
14555 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
14556 if test "$with_wnn" = yes; then
14557   echo "  Compiling in support for the WNN input method on Mule."
14558   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
14559 fi
14560 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
14561
14562 echo "
14563 Mail:"
14564 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
14565 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
14566 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
14567 echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
14568
14569 echo "
14570 Other Features:"
14571 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
14572 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
14573 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
14574 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
14575 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
14576 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
14577 test "$pdump" = yes && echo "  Using the new portable dumper."
14578 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
14579 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
14580 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
14581   != "no no no no no no"; then
14582   echo "  WARNING: ---------------------------------------------------------"
14583   echo "  WARNING: Compiling in support for runtime error checking."
14584   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
14585   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
14586   echo "  WARNING: ---------------------------------------------------------"
14587 fi
14588 echo ""
14589 ) | tee -a Installation
14590 echo ""
14591
14592
14593 # Remove any trailing slashes in these variables.
14594 test -n "$prefix" &&
14595   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14596 test -n "$exec_prefix" &&
14597   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14598
14599
14600 for file in $internal_makefile_list; do
14601   test "$file" = src/Makefile.in && \
14602     file="src/Makefile.in:src/Makefile.in.in:src/depend"
14603   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
14604 done
14605 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
14606 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
14607
14608 trap '' 1 2 15
14609
14610 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14611
14612 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14613 # Let make expand exec_prefix.
14614 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14615
14616 # Any assignment to VPATH causes Sun make to only execute
14617 # the first set of double-colon rules, so remove it if not needed.
14618 # If there is a colon in the path, we need to keep it.
14619 if test "x$srcdir" = x.; then
14620   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14621 fi
14622
14623 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14624
14625 DEFS=-DHAVE_CONFIG_H
14626
14627 # Without the "./", some shells look in PATH for config.status.
14628 : ${CONFIG_STATUS=./config.status}
14629
14630 echo creating $CONFIG_STATUS
14631 rm -f $CONFIG_STATUS
14632 cat > $CONFIG_STATUS <<EOF
14633 #! /bin/sh
14634 # Generated automatically by configure.
14635 # Run this file to recreate the current configuration.
14636 # This directory was configured as follows,
14637 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14638 #
14639 # $0 $ac_configure_args
14640 #
14641 # Compiler output produced by configure, useful for debugging
14642 # configure, is in ./config.log if it exists.
14643
14644 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14645 for ac_option
14646 do
14647   case "\$ac_option" in
14648   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14649     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14650     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14651   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14652     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14653     exit 0 ;;
14654   -help | --help | --hel | --he | --h)
14655     echo "\$ac_cs_usage"; exit 0 ;;
14656   *) echo "\$ac_cs_usage"; exit 1 ;;
14657   esac
14658 done
14659
14660 ac_given_srcdir=$srcdir
14661 ac_given_INSTALL="$INSTALL"
14662
14663 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14664 EOF
14665 cat >> $CONFIG_STATUS <<EOF
14666
14667 # Protect against being on the right side of a sed subst in config.status.
14668 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14669  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14670 $ac_vpsub
14671 $extrasub
14672 s%@SHELL@%$SHELL%g
14673 s%@CFLAGS@%$CFLAGS%g
14674 s%@CPPFLAGS@%$CPPFLAGS%g
14675 s%@CXXFLAGS@%$CXXFLAGS%g
14676 s%@FFLAGS@%$FFLAGS%g
14677 s%@DEFS@%$DEFS%g
14678 s%@LDFLAGS@%$LDFLAGS%g
14679 s%@LIBS@%$LIBS%g
14680 s%@exec_prefix@%$exec_prefix%g
14681 s%@prefix@%$prefix%g
14682 s%@program_transform_name@%$program_transform_name%g
14683 s%@bindir@%$bindir%g
14684 s%@sbindir@%$sbindir%g
14685 s%@libexecdir@%$libexecdir%g
14686 s%@datadir@%$datadir%g
14687 s%@sysconfdir@%$sysconfdir%g
14688 s%@sharedstatedir@%$sharedstatedir%g
14689 s%@localstatedir@%$localstatedir%g
14690 s%@libdir@%$libdir%g
14691 s%@includedir@%$includedir%g
14692 s%@oldincludedir@%$oldincludedir%g
14693 s%@infodir@%$infodir%g
14694 s%@mandir@%$mandir%g
14695 s%@LN_S@%$LN_S%g
14696 s%@blddir@%$blddir%g
14697 s%@CC@%$CC%g
14698 s%@CPP@%$CPP%g
14699 s%@start_flags@%$start_flags%g
14700 s%@ld_switch_shared@%$ld_switch_shared%g
14701 s%@start_files@%$start_files%g
14702 s%@ld@%$ld%g
14703 s%@lib_gcc@%$lib_gcc%g
14704 s%@RANLIB@%$RANLIB%g
14705 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14706 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14707 s%@INSTALL_DATA@%$INSTALL_DATA%g
14708 s%@YACC@%$YACC%g
14709 s%@SET_MAKE@%$SET_MAKE%g
14710 s%@X_CFLAGS@%$X_CFLAGS%g
14711 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14712 s%@X_LIBS@%$X_LIBS%g
14713 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14714 s%@install_pp@%$install_pp%g
14715 s%@libs_xauth@%$libs_xauth%g
14716 s%@dnd_objs@%$dnd_objs%g
14717 s%@lwlib_objs@%$lwlib_objs%g
14718 s%@ALLOCA@%$ALLOCA%g
14719 s%@have_esd_config@%$have_esd_config%g
14720 s%@dll_ld@%$dll_ld%g
14721 s%@dll_cflags@%$dll_cflags%g
14722 s%@dll_ldflags@%$dll_ldflags%g
14723 s%@dll_post@%$dll_post%g
14724 s%@dll_ldo@%$dll_ldo%g
14725 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14726 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14727 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14728 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14729 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14730 s%@PROGNAME@%$PROGNAME%g
14731 s%@version@%$version%g
14732 s%@configuration@%$configuration%g
14733 s%@canonical@%$canonical%g
14734 s%@inststaticdir@%$inststaticdir%g
14735 s%@instvardir@%$instvardir%g
14736 s%@srcdir@%$srcdir%g
14737 s%@pkgdir@%$pkgdir%g
14738 s%@statedir@%$statedir%g
14739 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14740 s%@PREFIX@%$PREFIX%g
14741 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14742 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14743 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14744 s%@INFODIR@%$INFODIR%g
14745 s%@infopath@%$infopath%g
14746 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14747 s%@INFOPATH@%$INFOPATH%g
14748 s%@package_path@%$package_path%g
14749 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14750 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14751 s%@lispdir@%$lispdir%g
14752 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14753 s%@LISPDIR@%$LISPDIR%g
14754 s%@moduledir@%$moduledir%g
14755 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14756 s%@MODULEDIR@%$MODULEDIR%g
14757 s%@sitelispdir@%$sitelispdir%g
14758 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14759 s%@SITELISPDIR@%$SITELISPDIR%g
14760 s%@sitemoduledir@%$sitemoduledir%g
14761 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14762 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14763 s%@etcdir@%$etcdir%g
14764 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14765 s%@ETCDIR@%$ETCDIR%g
14766 s%@docdir@%$docdir%g
14767 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14768 s%@DOCDIR@%$DOCDIR%g
14769 s%@archlibdir@%$archlibdir%g
14770 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14771 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14772 s%@bitmapdir@%$bitmapdir%g
14773 s%@extra_objs@%$extra_objs%g
14774 s%@machfile@%$machfile%g
14775 s%@opsysfile@%$opsysfile%g
14776 s%@c_switch_general@%$c_switch_general%g
14777 s%@c_switch_window_system@%$c_switch_window_system%g
14778 s%@c_switch_all@%$c_switch_all%g
14779 s%@ld_switch_general@%$ld_switch_general%g
14780 s%@ld_switch_window_system@%$ld_switch_window_system%g
14781 s%@ld_switch_all@%$ld_switch_all%g
14782 s%@ld_libs_general@%$ld_libs_general%g
14783 s%@ld_libs_window_system@%$ld_libs_window_system%g
14784 s%@ld_libs_all@%$ld_libs_all%g
14785 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14786 s%@native_sound_lib@%$native_sound_lib%g
14787 s%@sound_cflags@%$sound_cflags%g
14788 s%@dynodump_arch@%$dynodump_arch%g
14789 s%@XEMACS_CC@%$XEMACS_CC%g
14790 s%@internal_makefile_list@%$internal_makefile_list%g
14791
14792 CEOF
14793 EOF
14794
14795 cat >> $CONFIG_STATUS <<\EOF
14796
14797 # Split the substitutions into bite-sized pieces for seds with
14798 # small command number limits, like on Digital OSF/1 and HP-UX.
14799 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14800 ac_file=1 # Number of current file.
14801 ac_beg=1 # First line for current file.
14802 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14803 ac_more_lines=:
14804 ac_sed_cmds=""
14805 while $ac_more_lines; do
14806   if test $ac_beg -gt 1; then
14807     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14808   else
14809     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14810   fi
14811   if test ! -s conftest.s$ac_file; then
14812     ac_more_lines=false
14813     rm -f conftest.s$ac_file
14814   else
14815     if test -z "$ac_sed_cmds"; then
14816       ac_sed_cmds="sed -f conftest.s$ac_file"
14817     else
14818       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14819     fi
14820     ac_file=`expr $ac_file + 1`
14821     ac_beg=$ac_end
14822     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14823   fi
14824 done
14825 if test -z "$ac_sed_cmds"; then
14826   ac_sed_cmds=cat
14827 fi
14828 EOF
14829
14830 cat >> $CONFIG_STATUS <<EOF
14831
14832 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14833 EOF
14834 cat >> $CONFIG_STATUS <<\EOF
14835 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14836   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14837   case "$ac_file" in
14838   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14839        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14840   *) ac_file_in="${ac_file}.in" ;;
14841   esac
14842
14843   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14844
14845   # Remove last slash and all that follows it.  Not all systems have dirname.
14846   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14847   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14848     # The file is in a subdirectory.
14849     test ! -d "$ac_dir" && mkdir "$ac_dir"
14850     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14851     # A "../" for each directory in $ac_dir_suffix.
14852     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14853   else
14854     ac_dir_suffix= ac_dots=
14855   fi
14856
14857   case "$ac_given_srcdir" in
14858   .)  srcdir=.
14859       if test -z "$ac_dots"; then top_srcdir=.
14860       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14861   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14862   *) # Relative path.
14863     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14864     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14865   esac
14866
14867   case "$ac_given_INSTALL" in
14868   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14869   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14870   esac
14871
14872   echo creating "$ac_file"
14873   rm -f "$ac_file"
14874   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14875   case "$ac_file" in
14876   *Makefile*) ac_comsub="1i\\
14877 # $configure_input" ;;
14878   *) ac_comsub= ;;
14879   esac
14880
14881   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14882   sed -e "$ac_comsub
14883 s%@configure_input@%$configure_input%g
14884 s%@srcdir@%$srcdir%g
14885 s%@top_srcdir@%$top_srcdir%g
14886 s%@INSTALL@%$INSTALL%g
14887 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14888 fi; done
14889 rm -f conftest.s*
14890
14891 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14892 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14893 #
14894 # ac_d sets the value in "#define NAME VALUE" lines.
14895 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14896 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14897 ac_dC='\3'
14898 ac_dD='%g'
14899 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14900 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14901 ac_uB='\([      ]\)%\1#\2define\3'
14902 ac_uC=' '
14903 ac_uD='\4%g'
14904 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14905 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14906 ac_eB='$%\1#\2define\3'
14907 ac_eC=' '
14908 ac_eD='%g'
14909
14910 if test "${CONFIG_HEADERS+set}" != set; then
14911 EOF
14912 cat >> $CONFIG_STATUS <<EOF
14913   CONFIG_HEADERS="src/config.h lwlib/config.h"
14914 EOF
14915 cat >> $CONFIG_STATUS <<\EOF
14916 fi
14917 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14918   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14919   case "$ac_file" in
14920   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14921        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14922   *) ac_file_in="${ac_file}.in" ;;
14923   esac
14924
14925   echo creating $ac_file
14926
14927   rm -f conftest.frag conftest.in conftest.out
14928   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14929   cat $ac_file_inputs > conftest.in
14930
14931 EOF
14932
14933 # Transform confdefs.h into a sed script conftest.vals that substitutes
14934 # the proper values into config.h.in to produce config.h.  And first:
14935 # Protect against being on the right side of a sed subst in config.status.
14936 # Protect against being in an unquoted here document in config.status.
14937 rm -f conftest.vals
14938 cat > conftest.hdr <<\EOF
14939 s/[\\&%]/\\&/g
14940 s%[\\$`]%\\&%g
14941 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14942 s%ac_d%ac_u%gp
14943 s%ac_u%ac_e%gp
14944 EOF
14945 sed -n -f conftest.hdr confdefs.h > conftest.vals
14946 rm -f conftest.hdr
14947
14948 # This sed command replaces #undef with comments.  This is necessary, for
14949 # example, in the case of _POSIX_SOURCE, which is predefined and required
14950 # on some systems where configure will not decide to define it.
14951 cat >> conftest.vals <<\EOF
14952 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14953 EOF
14954
14955 # Break up conftest.vals because some shells have a limit on
14956 # the size of here documents, and old seds have small limits too.
14957
14958 rm -f conftest.tail
14959 while :
14960 do
14961   ac_lines=`grep -c . conftest.vals`
14962   # grep -c gives empty output for an empty file on some AIX systems.
14963   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14964   # Write a limited-size here document to conftest.frag.
14965   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14966   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14967   echo 'CEOF
14968   sed -f conftest.frag conftest.in > conftest.out
14969   rm -f conftest.in
14970   mv conftest.out conftest.in
14971 ' >> $CONFIG_STATUS
14972   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14973   rm -f conftest.vals
14974   mv conftest.tail conftest.vals
14975 done
14976 rm -f conftest.vals
14977
14978 cat >> $CONFIG_STATUS <<\EOF
14979   rm -f conftest.frag conftest.h
14980   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14981   cat conftest.in >> conftest.h
14982   rm -f conftest.in
14983   if cmp -s $ac_file conftest.h 2>/dev/null; then
14984     echo "$ac_file is unchanged"
14985     rm -f conftest.h
14986   else
14987     # Remove last slash and all that follows it.  Not all systems have dirname.
14988       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14989       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14990       # The file is in a subdirectory.
14991       test ! -d "$ac_dir" && mkdir "$ac_dir"
14992     fi
14993     rm -f $ac_file
14994     mv conftest.h $ac_file
14995   fi
14996 fi; done
14997
14998 EOF
14999 cat >> $CONFIG_STATUS <<EOF
15000 CPP="$CPP"
15001  top_srcdir="$srcdir"
15002  MAKE_SUBDIR="$MAKE_SUBDIR"
15003
15004 EOF
15005 cat >> $CONFIG_STATUS <<\EOF
15006 for dir in . $MAKE_SUBDIR; do
15007   (
15008     cd $dir
15009     rm -f junk.c
15010     < Makefile.in \
15011       sed -e '/^# Generated/d' \
15012           -e 's%/\*\*/#.*%%' \
15013           -e 's/^ *# */#/' \
15014           -e '/^##/d' \
15015           -e '/^#/ {
15016 p
15017 d
15018 }'        \
15019           -e '/./ {
15020 s/\([\"]\)/\\\1/g
15021 s/^/"/
15022 s/$/"/
15023 }'  > junk.c;
15024
15025
15026
15027     echo creating $dir/Makefile
15028 $CPP -I. -I${top_srcdir}/src  junk.c \
15029   | sed -e 's/^\#.*//'          \
15030         -e 's/^[        ][      ]*$//'\
15031         -e 's/^ /       /'              \
15032   | sed -n -e '/^..*$/p'        \
15033   | sed '/^\"/ {
15034         s/\\\([\"]\)/\1/g
15035         s/^[    ]*\"//
15036         s/\"[   ]*$//
15037 }' > Makefile.new
15038     chmod 444 Makefile.new
15039     mv -f Makefile.new Makefile
15040
15041     echo creating $dir/GNUmakefile
15042 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
15043   | sed -e 's/^\#.*//'          \
15044         -e 's/^[        ][      ]*$//'\
15045         -e 's/^ /       /'              \
15046   | sed -n -e '/^..*$/p'        \
15047   | sed '/^\"/ {
15048         s/\\\([\"]\)/\1/g
15049         s/^[    ]*\"//
15050         s/\"[   ]*$//
15051 }' > Makefile.new
15052     chmod 444 Makefile.new
15053     mv -f Makefile.new GNUmakefile
15054
15055     rm -f junk.c
15056   )
15057 done
15058
15059 sed < config.status >> lib-src/config.values \
15060   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
15061   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
15062   -e 's/^\([^ ]*\) $/\1 ""/' \
15063   -e 's/ 1$/ t/'
15064
15065
15066 exit 0
15067 EOF
15068 chmod +x $CONFIG_STATUS
15069 rm -fr confdefs* $ac_clean_files
15070 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1