XEmacs 21.2-b3
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.12 
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
11 ### Don't edit this script!
12 ### This script was automatically generated by the `autoconf' program
13 ### from the file `./configure.in'.
14 ### To rebuild it, execute the command
15 ###     autoconf
16 ### in the this directory.  You must have autoconf version 2.12 or later.
17
18 ### This file is part of XEmacs.
19
20 ### XEmacs is free software; you can redistribute it and/or modify it
21 ### under the terms of the GNU General Public License as published by
22 ### the Free Software Foundation; either version 2, or (at your
23 ### option) any later version.
24
25 ### XEmacs is distributed in the hope that it will be useful, but
26 ### WITHOUT ANY WARRANTY; without even the implied warranty of
27 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
28 ### General Public License for more details.
29
30 ### You should have received a copy of the GNU General Public License
31 ### along with XEmacs; see the file COPYING.  If not, write to the Free
32 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
33 ### 02111-1307, USA.
34
35 ### For usage, run `./configure --help'
36 ### For more detailed information on building and installing XEmacs,
37 ### read the file `INSTALL'.
38 ###
39 ### If configure succeeds, it leaves its status in config.status.
40 ### A log of configuration tests can be found in config.log.
41 ### If configure fails after disturbing the status quo,
42 ###     config.status is removed.
43
44 ac_help="$ac_help
45   --with-x                use the X Window System"
46
47
48
49 if test -n "$ZSH_VERSION"; then
50     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
51   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
52   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
53   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
54       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
55 elif test -n "$BASH_VERSION"; then
56     set -o posix
57   unset CDPATH
58 else
59   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
60 fi
61
62 exec_prefix=NONE
63 host=NONE
64 no_create=
65 nonopt=NONE
66 no_recursion=
67 prefix=NONE
68 program_prefix=NONE
69 program_suffix=NONE
70 program_transform_name=s,x,x,
71 silent=
72 site=
73 srcdir=
74 target=NONE
75 verbose=
76 x_includes=NONE
77 x_libraries=NONE
78
79 bindir='${exec_prefix}/bin'
80 sbindir='${exec_prefix}/sbin'
81 libexecdir='${exec_prefix}/libexec'
82 datadir='${prefix}/share'
83 sysconfdir='${prefix}/etc'
84 sharedstatedir='${prefix}/com'
85 localstatedir='${prefix}/var'
86 libdir='${{exec_prefix}}/lib'
87 includedir='${prefix}/include'
88 oldincludedir='/usr/include'
89 infodir='${prefix}/info'
90 mandir='${prefix}/man'
91
92 subdirs=
93 MFLAGS= MAKEFLAGS=
94 ac_max_here_lines=12
95
96 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
97
98 # File descriptor usage:
99 # 0 standard input
100 # 1 file creation
101 # 2 errors and warnings
102 # 3 some systems may open it to /dev/tty
103 # 4 used on the Kubota Titan
104 # 6 checking for... messages and results
105 # 5 compiler messages saved in config.log
106 if test "$silent" = yes; then
107   exec 6>/dev/null
108 else
109   exec 6>&1
110 fi
111 exec 5>./config.log
112
113 echo "\
114 This file contains any messages produced by compilers while
115 running configure, to aid debugging if configure makes a mistake.
116 " 1>&5
117
118 # Strip out --no-create and --no-recursion so they do not pile up.
119 # Also quote any args containing shell metacharacters.
120 ac_configure_args=
121 for ac_arg
122 do
123   case "$ac_arg" in
124   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
125   | --no-cr | --no-c) ;;
126   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
127   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
128   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
129   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
130   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
131   esac
132 done
133
134 # NLS nuisances.
135 # Only set these to C if already set.  These must not be set unconditionally
136 # because not all systems understand e.g. LANG=C (notably SCO).
137 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
138 # Non-C LC_CTYPE values break the ctype check.
139 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
140 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
141 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
142 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
143
144 # confdefs.h avoids OS command line length limits that DEFS can exceed.
145 rm -rf conftest* confdefs.h
146 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
147 echo > confdefs.h
148
149 # A filename unique to this package, relative to the directory that
150 # configure is in, which we can look for to find out if srcdir is correct.
151 ac_unique_file=src/lisp.h
152
153 # Find the source files, if location was not specified.
154 if test -z "$srcdir"; then
155   ac_srcdir_defaulted=yes
156   # Try the directory containing this script, then its parent.
157   ac_prog=$0
158   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
159   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
160   srcdir=$ac_confdir
161   if test ! -r $srcdir/$ac_unique_file; then
162     srcdir=..
163   fi
164 else
165   ac_srcdir_defaulted=no
166 fi
167 if test ! -r $srcdir/$ac_unique_file; then
168   if test "$ac_srcdir_defaulted" = yes; then
169     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
170   else
171     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
172   fi
173 fi
174 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
175
176 # Prefer explicitly selected file to automatically selected ones.
177 if test -z "$CONFIG_SITE"; then
178   if test "x$prefix" != xNONE; then
179     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
180   else
181     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
182   fi
183 fi
184 for ac_site_file in $CONFIG_SITE; do
185   if test -r "$ac_site_file"; then
186     echo "loading site script $ac_site_file"
187     . "$ac_site_file"
188   fi
189 done
190
191
192 ac_ext=c
193 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
194 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
195 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
196 ac_cpp='$CPP '"$xe_cppflags"
197 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
198 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
199 cross_compiling=no
200
201 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
202   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
203   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
204     ac_n= ac_c='
205 ' ac_t='        '
206   else
207     ac_n=-n ac_c= ac_t=
208   fi
209 else
210   ac_n= ac_c='\c' ac_t=
211 fi
212
213
214 progname="`echo $0 | sed 's:^\./\./:\./:'`"
215
216
217 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
218 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
219
220 prefix='/usr/local'
221 exec_prefix='${prefix}'
222 bindir='${exec_prefix}/bin'
223 datadir='${prefix}/lib'
224 statedir='${prefix}/lib'
225 libdir='${exec_prefix}/lib'
226 mandir='${prefix}/man/man1'
227 infodir='${datadir}/${PROGNAME}-${version}/info'
228 infopath=''
229 install_pp=''
230 lispdir='${datadir}/${PROGNAME}-${version}/lisp'
231 pkgdir='${datadir}/${PROGNAME}-${version}/lisp'
232 package_path=''
233 etcdir='${datadir}/${PROGNAME}-${version}/etc'
234 lockdir='${statedir}/${PROGNAME}/lock'
235 archlibdir='${libdir}/${PROGNAME}-${version}/${configuration}'
236 with_site_lisp='no'
237 with_menubars=''
238 with_scrollbars=''
239 with_dialogs=''
240 with_file_coding=''
241 puresize=''
242 cpp='' cppflags='' libs='' ldflags=''
243 dynamic=''
244 with_x11=''
245 with_msw=''
246 rel_alloc='default'
247 with_system_malloc='default'
248 with_dlmalloc='default'
249 native_sound_lib=''
250 use_assertions="yes"
251 with_toolbars=""
252 with_tty=""
253 use_union_type="no"
254 with_dnet=""
255
256
257
258
259 arguments="$@"
260
261 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
262 quoted_arguments=
263 for i in "$@"; do
264    case "$i" in
265    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
266    | --no-cr | --no-c) ;;
267    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
268    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
269    *)
270    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
271    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
272    esac
273 done
274
275 while test $# != 0; do
276   arg="$1"; shift
277   case "$arg" in
278     --no-create|--no-recursion) ;;
279         -* )
280             case "$arg" in
281         -*=*)
282           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
283           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
284           valomitted=no
285         ;;
286                                                                           -*)
287                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
288           val="yes" valomitted=yes
289         ;;
290       esac
291
292             optname="$opt"
293       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
294
295             case "${valomitted}-${opt}" in yes-without_* )
296         opt=`echo $opt | sed 's/without/with/'`
297         valomitted="no" val="no" ;;
298       esac
299
300             case "$opt" in
301
302         run_in_place    | \
303         with_site_lisp  | \
304         with_x          | \
305         with_x11        | \
306         with_msw        | \
307         with_gcc        | \
308         with_gnu_make   | \
309         dynamic         | \
310         with_ncurses    | \
311         with_dnet       | \
312         with_socks      | \
313         with_dragndrop  | \
314         with_cde        | \
315         with_offix      | \
316         with_gpm        | \
317         with_xpm        | \
318         with_xface      | \
319         with_gif        | \
320         with_jpeg       | \
321         with_png        | \
322         with_tiff       | \
323         with_session    | \
324         with_xmu        | \
325         with_quantify   | \
326         with_toolbars   | \
327         with_tty        | \
328         with_xfs        | \
329         with_i18n3      | \
330         with_mule       | \
331         with_file_coding        | \
332         with_canna      | \
333         with_wnn        | \
334         with_wnn6       | \
335         with_workshop   | \
336         with_sparcworks | \
337         with_tooltalk   | \
338         with_ldap       | \
339         with_pop        | \
340         with_kerberos   | \
341         with_hesiod     | \
342         with_dnet       | \
343         with_infodock   | \
344         external_widget | \
345         verbose         | \
346         extra_verbose   | \
347         const_is_losing | \
348         usage_tracking  | \
349         use_union_type  | \
350         debug           | \
351         use_assertions  | \
352         use_minimal_tagbits                     | \
353         use_indexed_lrecord_implementation      | \
354         gung_ho         | \
355         use_assertions  | \
356         memory_usage_stats | \
357         with_clash_detection | \
358         with_shlib | \
359         no_doc_file )
360                   case "$val" in
361             y | ye | yes )      val=yes ;;
362             n | no )            val=no  ;;
363             * ) (echo "$progname: Usage error:"
364 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
365 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
366           esac
367           eval "$opt=\"$val\"" ;;
368
369
370                         srcdir          | \
371         compiler        | \
372         cflags          | \
373         cpp             | \
374         cppflags        | \
375         libs            | \
376         ldflags         | \
377         puresize        | \
378         cache_file      | \
379         native_sound_lib | \
380         site_lisp       | \
381         x_includes      | \
382         x_libraries     | \
383         site_includes   | \
384         site_libraries  | \
385         site_prefixes   | \
386         site_runtime_libraries )
387                   if test "$valomitted" = "yes" ; then
388                     if test "$#" = 0 ; then
389               (echo "$progname: Usage error:"
390 echo " " "The \`--$optname' option requires a value."
391 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
392             fi
393             val="$1"; shift
394           fi
395           eval "$opt=\"$val\""
396         ;;
397
398                 rel_alloc | \
399         with_dlmalloc | \
400         with_debug_malloc  | use_debug_malloc | \
401         with_system_malloc | use_system_malloc )
402           case "$val" in
403             y | ye | yes )      val=yes ;;
404             n | no )            val=no  ;;
405             d | de | def | defa | defau | defaul | default ) val=default ;;
406             * ) (echo "$progname: Usage error:"
407 echo " " "The \`--$optname' option requires one of these values:
408   \`yes', \`no', or \`default'."
409 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
410           esac
411           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
412           eval "$opt=\"$val\""
413         ;;
414
415                 "with_database" )
416           with_database_berkdb=no
417           with_database_dbm=no
418           with_database_gnudbm=no
419           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
420             case "$x" in
421                 no ) ;;
422                 b | be | ber | berk | berkd | berkdb )  with_database_berkdb=yes ;;
423                 d | db | dbm )                          with_database_dbm=yes    ;;
424                 g | gn | gnu | gnud | gnudb | gnudbm )  with_database_gnudbm=yes ;;
425                 * ) (echo "$progname: Usage error:"
426 echo " " "The \`--$optname' option value
427   must be either \`no' or a comma-separated list
428   of one or more of \`berkdb', \`dbm', or \`gnudbm'."
429 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
430             esac
431           done
432           if test "$with_database_dbm"    = "yes" -a \
433                   "$with_database_gnudbm" = "yes"; then
434           (echo "$progname: Usage error:"
435 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
436   with the \`--$optname' option."
437 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
438           fi
439         ;;
440
441                 "with_sound" )
442                           case "$val" in
443             y | ye | yes )                      val=native ;;
444             n | no | non | none )               val=no;;
445             na | nat | nati | nativ | native )  val=native  ;;
446             ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas  ;;
447             b | bo | bot | both )               val=both;;
448             * ) (echo "$progname: Usage error:"
449 echo " " "The \`--$optname' option must have one of these values:
450   \`native', \`nas', \`both', or \`none'."
451 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
452           esac
453           eval "$opt=\"$val\""
454         ;;
455
456                 "with_xim" )
457           case "$val" in
458             y | ye | yes )                val=yes   ;;
459             n | no | non | none )         val=no    ;;
460             x | xl | xli | xlib )         val=xlib  ;;
461             m | mo | mot | moti | motif ) val=motif ;;
462             * ) (echo "$progname: Usage error:"
463 echo " " "The \`--$optname' option must have one of these values:
464   \`motif', \`xlib', \`yes', or \`no'."
465 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
466           esac
467           eval "$opt=\"$val\""
468         ;;
469
470                 "with_xfs" )
471           case "$val" in
472           y | ye | yes )                val=yes ;;
473           n | no | non | none )         val=no  ;;
474           * ) (echo "$progname: Usage error:"
475 echo " " "The \`--$optname' option must have one of these values:
476  \`yes', or \`no'."
477 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
478           esac
479           eval "$opt=\"$val\""
480         ;;
481
482                 "mail_locking" )
483           case "$val" in
484             lockf )     val=lockf ;;
485             flock )     val=flock ;;
486             file )      val=file  ;;
487             * ) (echo "$progname: Usage error:"
488 echo " " "The \`--$optname' option must have one of these values:
489   \`lockf', \`flock', or \`file'."
490 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
491           esac
492           eval "$opt=\"$val\""
493         ;;
494
495                 "error_checking" )
496                           
497           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
498             case "$x" in
499                       n | no | non | none ) new_default=no ;;
500               a | al | all )        new_default=yes ;;
501
502               extents )       error_check_extents=yes ;;
503               noextents )     error_check_extents=no ;;
504
505               typecheck )     error_check_typecheck=yes ;;
506               notypecheck )   error_check_typecheck=no ;;
507
508               bufpos )        error_check_bufpos=yes ;;
509               nobufpos )      error_check_bufpos=no ;;
510
511               gc )            error_check_gc=yes ;;
512               nogc )          error_check_gc=no ;;
513
514               malloc )        error_check_malloc=yes ;;
515               nomalloc )      error_check_malloc=no ;;
516
517               * ) bogus_error_check=yes ;;
518             esac
519             if test "$bogus_error_check" -o \
520                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
521                 if test "$error_check_default" = yes ; then
522                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'."
523                 else
524                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'."
525                 fi
526                 (echo "$progname: Usage error:"
527 echo " " "Valid types for the \`--$optname' option are:
528   $types."
529 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
530             elif test -n "$new_default" ; then
531                 error_check_extents=$new_default
532                 error_check_typecheck=$new_default
533                 error_check_bufpos=$new_default
534                 error_check_gc=$new_default
535                 error_check_malloc=$new_default
536                 new_default=    # reset this
537             fi
538             echeck_notfirst=true
539           done
540         ;;
541
542                                 
543                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
544         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
545         archlibdir | docdir | package_path )    
546                    if test "$valomitted" = "yes"; then
547              if test "$#" = 0; then
548                  (echo "$progname: Usage error:"
549 echo " " "The \`--$optname' option requires a value."
550 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
551              fi
552              val="$1"; shift
553            fi
554            eval "$opt=\"$val\""
555
556                            case "$opt" in
557              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
558     Defining LISPDIR_USER_DEFINED
559 EOF
560 cat >> confdefs.h <<\EOF
561 #define LISPDIR_USER_DEFINED 1
562 EOF
563 }
564  ;;
565              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
566     Defining ETCDIR_USER_DEFINED
567 EOF
568 cat >> confdefs.h <<\EOF
569 #define ETCDIR_USER_DEFINED 1
570 EOF
571 }
572  ;;
573              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
574     Defining INFODIR_USER_DEFINED
575 EOF
576 cat >> confdefs.h <<\EOF
577 #define INFODIR_USER_DEFINED 1
578 EOF
579 }
580  ;;
581              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
582     Defining INFOPATH_USER_DEFINED
583 EOF
584 cat >> confdefs.h <<\EOF
585 #define INFOPATH_USER_DEFINED 1
586 EOF
587 }
588  ;;
589              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
590     Defining PACKAGE_PATH_USER_DEFINED
591 EOF
592 cat >> confdefs.h <<\EOF
593 #define PACKAGE_PATH_USER_DEFINED 1
594 EOF
595 }
596  ;;
597              datadir )
598                 { test "$extra_verbose" = "yes" && cat << \EOF
599     Defining INFODIR_USER_DEFINED
600 EOF
601 cat >> confdefs.h <<\EOF
602 #define INFODIR_USER_DEFINED 1
603 EOF
604 }
605
606                 { test "$extra_verbose" = "yes" && cat << \EOF
607     Defining LISPDIR_USER_DEFINED
608 EOF
609 cat >> confdefs.h <<\EOF
610 #define LISPDIR_USER_DEFINED 1
611 EOF
612 }
613
614                 { test "$extra_verbose" = "yes" && cat << \EOF
615     Defining ETCDIR_USER_DEFINED
616 EOF
617 cat >> confdefs.h <<\EOF
618 #define ETCDIR_USER_DEFINED 1
619 EOF
620 }
621  ;;
622              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
623     Defining LOCKDIR_USER_DEFINED
624 EOF
625 cat >> confdefs.h <<\EOF
626 #define LOCKDIR_USER_DEFINED 1
627 EOF
628 }
629  ;;
630              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
631     Defining ARCHLIBDIR_USER_DEFINED
632 EOF
633 cat >> confdefs.h <<\EOF
634 #define ARCHLIBDIR_USER_DEFINED 1
635 EOF
636 }
637  ;;
638            esac
639         ;;
640
641                 "no_create" ) ;;
642
643                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
644
645                         "with_menubars" | "with_scrollbars" | "with_dialogs" )
646           case "$val" in
647             l | lu | luc | luci | lucid )               val=lucid  ;;
648             m | mo | mot | moti | motif )               val=motif  ;;
649             athena3d | athena-3d )                      val=athena3d ;;
650             a | at | ath | athe | athen | athena )      val=athena ;;
651             n | no | non | none )                       val=no ;;
652             * ) (echo "$progname: Usage error:"
653 echo " " "The \`--$optname' option must have one of these values:
654   \`lucid', \`motif', \`athena', \`athena3d', or \`no'."
655 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
656           esac
657           eval "$opt=\"$val\""
658         ;;
659
660                 * ) (echo "$progname: Usage error:"
661 echo " " "Unrecognized option: $arg"
662 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
663
664       esac
665     ;;
666
667         *-*-*) configuration="$arg" ;;
668
669         *) (echo "$progname: Usage error:"
670 echo " " "Unrecognized argument: $arg"
671 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
672
673   esac
674 done
675
676
677 test -n "$cpp"      && CPP="$cpp"
678 test -n "$cppflags" && CPPFLAGS="$cppflags"
679 test -n "$libs"     && LIBS="$libs"
680 test -n "$ldflags"  && LDFLAGS="$ldflags"
681
682 eval set x "$quoted_arguments"; shift
683
684 test "$extra_verbose" = "yes" && verbose=yes
685
686 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
687 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
688 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
689 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
690
691 test -n "$with_x" && with_x11="$with_x"
692
693
694 if test -n "$gung_ho"; then
695   test -z "$use_minimal_tagbits" && use_minimal_tagbits="$gung_ho"
696   test -z "$use_indexed_lrecord_implementation" && \
697     use_indexed_lrecord_implementation="$gung_ho"
698 fi
699 if test "$use_minimal_tagbits" = "no"; then
700   test "$with_dlmalloc" = "yes" && \
701     (echo "$progname: Usage error:"
702 echo " " "--with-dlmalloc requires --use-minimal-tagbits"
703 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
704   with_dlmalloc=no
705 fi
706
707
708
709 if test "$with_cde $with_tooltalk" = "yes no"; then
710   (echo "$progname: Usage error:"
711 echo " " "--with-cde requires --with-tooltalk"
712 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
713 elif test "$with_tooltalk" = "no" ; then with_cde=no
714 elif test "$with_cde" = "yes"; then with_tooltalk=yes
715 fi
716
717
718 if test "$run_in_place" = "yes"; then
719   echo "configure: warning: "The --run-in-place option is ignored because it is unnecessary."" 1>&2
720 fi
721
722 case "$srcdir" in
723
724     "" )
725     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
726       if test -f "$dir/src/lisp.h" -a \
727               -f "$dir/lisp/version.el" ; then
728         srcdir="$dir"
729         break
730       fi
731     done
732     if test -z "$srcdir" ; then
733       (echo "$progname: Usage error:"
734 echo " " "Neither the current directory nor its parent seem to
735   contain the XEmacs sources.  If you do not want to build XEmacs in its
736   source tree, you should run \`$progname' in the directory in which
737   you wish to build XEmacs, using the \`--srcdir' option to say where the
738   sources may be found."
739 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
740     fi
741   ;;
742
743     * )
744     if test ! -f "$srcdir/src/lisp.h" -o \
745             ! -f "$srcdir/lisp/version.el" ; then
746       (echo "$progname: Usage error:"
747 echo " " "The directory specified with the \`--srcdir' option,
748   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
749   either run the \`$progname' script at the top of the XEmacs source
750   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
751 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
752     fi
753   ;;
754 esac
755
756 if test -z "$configuration"; then
757   echo $ac_n "checking "host system type"""... $ac_c" 1>&6
758 echo "configure:759: checking "host system type"" >&5
759     if configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess | \
760     sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` ; then
761     echo "$ac_t""$configuration" 1>&6
762   else
763     echo "$ac_t""unknown" 1>&6
764     (echo "$progname: Usage error:"
765 echo " " "XEmacs has not been ported to this host type.
766 Try explicitly specifying the CONFIGURATION when rerunning configure."
767 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
768   fi
769 fi
770
771 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
772 echo "configure:773: checking whether ln -s works" >&5
773
774 rm -f conftestdata
775 if ln -s X conftestdata 2>/dev/null
776 then
777   rm -f conftestdata
778   ac_cv_prog_LN_S="ln -s"
779 else
780   ac_cv_prog_LN_S=ln
781 fi
782 LN_S="$ac_cv_prog_LN_S"
783 if test "$ac_cv_prog_LN_S" = "ln -s"; then
784   echo "$ac_t""yes" 1>&6
785 else
786   echo "$ac_t""no" 1>&6
787 fi
788
789
790 for dir in lisp etc man info; do
791   if test ! -d "$dir" ; then
792     echo Making symbolic link to "$srcdir/$dir"
793     ${LN_S} "$srcdir/$dir" "$dir"
794   fi
795 done
796
797 absolute_pwd="`pwd`";
798 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
799 then blddir="$PWD"
800 else blddir="$absolute_pwd"
801 fi
802
803
804 case "$srcdir" in
805   /* ) ;;
806   .  ) srcdir="$blddir" ;;
807   *  ) srcdir="`cd $srcdir && pwd`" ;;
808 esac
809
810 if test `pwd` != `sh -c cd $srcdir && pwd`  \
811    && test -f "$srcdir/src/config.h"; then
812   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
813    echo "   as a build directory right now; it has been configured in its own"
814    echo "   right.  To configure in another directory as well, you MUST"
815    echo "   use GNU make.  If you do not have GNU make, then you must"
816    echo "   now do \`make distclean' in $srcdir,"
817    echo "   and then run $progname again.") >&2
818   extrasub='/^VPATH[     ]*=/c\
819 vpath %.c $(srcdir)\
820 vpath %.h $(srcdir)\
821 vpath %.y $(srcdir)\
822 vpath %.l $(srcdir)\
823 vpath %.s $(srcdir)\
824 vpath %.in $(srcdir)'
825 fi
826
827 . "$srcdir/version.sh" || exit 1;
828 if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
829 : "${extra_verbose=$beta}"
830 version="${emacs_major_version}.${emacs_minor_version}"
831 { test "$extra_verbose" = "yes" && cat << EOF
832     Defining EMACS_MAJOR_VERSION = $emacs_major_version
833 EOF
834 cat >> confdefs.h <<EOF
835 #define EMACS_MAJOR_VERSION $emacs_major_version
836 EOF
837 }
838
839 { test "$extra_verbose" = "yes" && cat << EOF
840     Defining EMACS_MINOR_VERSION = $emacs_minor_version
841 EOF
842 cat >> confdefs.h <<EOF
843 #define EMACS_MINOR_VERSION $emacs_minor_version
844 EOF
845 }
846
847 if test -n "$emacs_beta_version"; then
848   version="${version}-b${emacs_beta_version}"
849   { test "$extra_verbose" = "yes" && cat << EOF
850     Defining EMACS_BETA_VERSION = $emacs_beta_version
851 EOF
852 cat >> confdefs.h <<EOF
853 #define EMACS_BETA_VERSION $emacs_beta_version
854 EOF
855 }
856
857 fi
858 { test "$extra_verbose" = "yes" && cat << EOF
859     Defining XEMACS_CODENAME = "$xemacs_codename"
860 EOF
861 cat >> confdefs.h <<EOF
862 #define XEMACS_CODENAME "$xemacs_codename"
863 EOF
864 }
865
866 { test "$extra_verbose" = "yes" && cat << EOF
867     Defining EMACS_VERSION = "$version"
868 EOF
869 cat >> confdefs.h <<EOF
870 #define EMACS_VERSION "$version"
871 EOF
872 }
873
874
875 if test "$with_infodock" = "yes"; then
876   if test ! -f ../ID-INSTALL; then
877     echo "Cannot build InfoDock without InfoDock sources"
878     with_infodock=no
879   fi
880 fi
881
882 if test "$with_infodock" = "yes"; then
883       { test "$extra_verbose" = "yes" && cat << EOF
884     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
885 EOF
886 cat >> confdefs.h <<EOF
887 #define INFODOCK_MAJOR_VERSION $infodock_major_version
888 EOF
889 }
890
891   { test "$extra_verbose" = "yes" && cat << EOF
892     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
893 EOF
894 cat >> confdefs.h <<EOF
895 #define INFODOCK_MINOR_VERSION $infodock_minor_version
896 EOF
897 }
898
899   { test "$extra_verbose" = "yes" && cat << EOF
900     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
901 EOF
902 cat >> confdefs.h <<EOF
903 #define INFODOCK_BUILD_VERSION $infodock_build_version
904 EOF
905 }
906
907   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
908   PROGNAME=infodock
909   CPPFLAGS="$CPPFLAGS -DINFODOCK"
910 else
911   PROGNAME=xemacs
912 fi
913
914 if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
915 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
916     Defining ERROR_CHECK_EXTENTS
917 EOF
918 cat >> confdefs.h <<\EOF
919 #define ERROR_CHECK_EXTENTS 1
920 EOF
921 }
922
923 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
924     Defining ERROR_CHECK_TYPECHECK
925 EOF
926 cat >> confdefs.h <<\EOF
927 #define ERROR_CHECK_TYPECHECK 1
928 EOF
929 }
930
931 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
932     Defining ERROR_CHECK_BUFPOS
933 EOF
934 cat >> confdefs.h <<\EOF
935 #define ERROR_CHECK_BUFPOS 1
936 EOF
937 }
938
939 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
940     Defining ERROR_CHECK_GC
941 EOF
942 cat >> confdefs.h <<\EOF
943 #define ERROR_CHECK_GC 1
944 EOF
945 }
946
947 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
948     Defining ERROR_CHECK_MALLOC
949 EOF
950 cat >> confdefs.h <<\EOF
951 #define ERROR_CHECK_MALLOC 1
952 EOF
953 }
954
955 if test "${debug:=$beta}" = "yes"; then
956   use_assertions=yes memory_usage_stats=yes
957   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
958    echo "    xemacs will be linked with \"debug.o\""
959  fi
960   { test "$extra_verbose" = "yes" && cat << \EOF
961     Defining DEBUG_XEMACS
962 EOF
963 cat >> confdefs.h <<\EOF
964 #define DEBUG_XEMACS 1
965 EOF
966 }
967
968 fi
969 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
970     Defining USE_ASSERTIONS
971 EOF
972 cat >> confdefs.h <<\EOF
973 #define USE_ASSERTIONS 1
974 EOF
975 }
976
977 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
978     Defining MEMORY_USAGE_STATS
979 EOF
980 cat >> confdefs.h <<\EOF
981 #define MEMORY_USAGE_STATS 1
982 EOF
983 }
984
985
986
987 echo "checking "the configuration name"" 1>&6
988 echo "configure:989: checking "the configuration name"" >&5
989 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
990 if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else
991   exit $?
992 fi
993
994
995
996
997
998 machine='' opsys=''
999
1000 case "$canonical" in
1001   sparc-*-*        ) machine=sparc ;;
1002   alpha*-*-*       ) machine=alpha ;;
1003   vax-*-*          ) machine=vax ;;
1004   mips-dec-*       ) machine=pmax ;;
1005   mips-sgi-*       ) machine=iris4d ;;
1006   romp-ibm-*       ) machine=ibmrt ;;
1007   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1008   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1009   powerpc*-*       ) machine=powerpc ;;
1010   hppa-*-*         ) machine=hp800 ;;
1011   m88k-dg-*        ) machine=aviion ;;
1012   m68*-sony-*      ) machine=news ;;
1013   mips-sony-*      ) machine=news-risc ;;
1014   clipper-*        ) machine=clipper ;;
1015 esac
1016
1017 case "$canonical" in
1018   *-*-linux*    ) opsys=linux ;;
1019   *-*-netbsd*   ) opsys=netbsd ;;
1020   *-*-openbsd*  ) opsys=openbsd ;;
1021   *-*-nextstep* ) opsys=nextstep ;;
1022   *-*-vms       ) opsys=vms ;;
1023
1024     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1025   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1026   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1027   *-dec-osf3*                ) opsys=decosf3-1 ;;
1028   *-dec-osf4*                ) opsys=decosf4-0 ;;
1029
1030     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1031   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1032   *-*-ultrix* )         opsys=ultrix4-3 ;;
1033
1034     *-*-aix3.1*  ) opsys=aix3-1 ;;
1035   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1036   *-*-aix3*    ) opsys=aix3-2   ;;
1037   *-*-aix4.0*  ) opsys=aix4     ;;
1038   *-*-aix4.1*  ) opsys=aix4-1   ;;
1039   *-*-aix4*    ) opsys=aix4-2   ;;
1040
1041     *-gnu* )                    opsys=gnu    ;;
1042   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1043   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1044   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1045   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1046   *-*-aos*   )                  opsys=bsd4-3 ;;
1047   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1048   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1049   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1050   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1051   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1052   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1053         if test -z "$NON_GNU_CPP" ; then
1054           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1055             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1056           done
1057         fi
1058         opsys=usg5-4-2 ;;
1059     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1060     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1061 esac
1062
1063 case "$canonical" in
1064
1065     *-*-netbsd* )
1066     case "$canonical" in
1067       i[3-9]86-*-netbsd*) machine=intel386 ;;
1068       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1069                                             machine=hp9000s300 ;;
1070       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1071       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1072     esac
1073   ;;
1074
1075     *-*-openbsd* )
1076     case "${canonical}" in
1077       alpha*-*-openbsd*)        machine=alpha ;;
1078       i386-*-openbsd*)          machine=intel386 ;;
1079       m68k-*-openbsd*)          machine=hp9000s300 ;;
1080       mipsel-*-openbsd*)        machine=pmax ;;
1081       ns32k-*-openbsd*)         machine=ns32000 ;;
1082       sparc-*-openbsd*)         machine=sparc ;;
1083       vax-*-openbsd*)           machine=vax ;;
1084      esac
1085    ;;
1086
1087     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1088   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1089
1090     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1091   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1092
1093     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1094
1095     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1096
1097     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1098
1099     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1100
1101     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1102
1103     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1104   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1105   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1106
1107   
1108     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1109
1110     *-convex-bsd* | *-convex-convexos* )
1111     machine=convex opsys=bsd4-3
1112     NON_GNU_CPP="cc -E -P"
1113   ;;
1114
1115     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1116
1117     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1118   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1119   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1120   m88k-dg-dgux*                           ) opsys=dgux     ;;
1121
1122     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1123   m88k-motorola-sysv4* )
1124                     machine=delta88k opsys=usg5-4-2
1125   ;;
1126   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1127
1128     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1129   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1130
1131     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1132
1133     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1134   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1135   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1136
1137       m88k-harris-cxux* )
1138         case "`uname -r`" in
1139        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1140        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1141     esac
1142     NON_GNU_CPP="/lib/cpp"
1143   ;;
1144     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1145     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1146
1147     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1148
1149     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1150
1151     *-hp-hpux* )
1152         case "$canonical" in
1153       m68*  ) machine=hp9000s300 ;;
1154       hppa* ) machine=hp800      ;;
1155     esac
1156
1157     case "$canonical" in
1158       *-hp-hpux7*  )  opsys=hpux   ;;
1159       *-hp-hpux8*  )  opsys=hpux8  ;;
1160       *-hp-hpux9*  )  opsys=hpux9  ;;
1161       *-hp-hpux10* )  opsys=hpux10 ;;
1162       *-hp-hpux11* )  opsys=hpux11 ;;
1163       *            )  opsys=hpux   ;;
1164     esac
1165
1166         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1167    echo "    xemacs will be linked with \"strcat.o\""
1168  fi ;; esac
1169
1170     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1171         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1172     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1173
1174     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1175   ;;
1176
1177     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1178   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1179
1180     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1181   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1182   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1183   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1184   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1185   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1186
1187     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1188   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1189
1190     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1191
1192     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1193
1194     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1195
1196     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1197
1198       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1199
1200     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1201
1202     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1203
1204     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1205
1206     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1207
1208         mips-mips-usg* ) machine=mips4 ;;
1209   mips-mips-riscos4 )
1210     machine=mips4
1211     NON_GNU_CC="cc -systype bsd43"
1212     NON_GNU_CPP="cc -systype bsd43 -E"
1213     case "$canonical" in
1214       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1215       mips-mips-riscos5* ) opsys=riscos5 ;;
1216     esac
1217   ;;
1218   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1219   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1220
1221     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1222
1223     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1224
1225     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1226   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1227
1228     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1229
1230     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1231
1232     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1233
1234     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1235
1236     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1237   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1238
1239     mips-siemens-sysv* | mips-sni-sysv*)
1240     machine=mips-siemens opsys=usg5-4
1241     NON_GNU_CC=/usr/ccs/bin/cc
1242     NON_GNU_CPP=/usr/ccs/lib/cpp
1243   ;;
1244
1245       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1246   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1247     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1248   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1249   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1250   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1251   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1252   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1253   mips-sgi-irix*      ) opsys=irix5-0 ;;
1254
1255     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1256   *-sony-news* ) opsys=newsos5 ;;
1257
1258     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1259
1260     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1261         case "$canonical" in
1262       m68*-sunos1* )             machine=sun1     ;;
1263       m68*-sunos2* )             machine=sun2     ;;
1264       m68* )                     machine=sun3     ;;
1265       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1266       i*86-*-* )                 machine=intel386 ;;
1267       rs6000* )                  machine=rs6000   ;;
1268     esac
1269
1270         case "$canonical" in *-sunos5*)
1271       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1272     esac
1273
1274                     case "$canonical" in
1275       *-sunos4* )
1276         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1277         : ;;
1278       *-solaris2* )
1279         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1280         RANLIB=':' ;;
1281     esac
1282
1283     case "$canonical" in
1284       *-solaris*          )
1285         opsys=sol2
1286         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1287         { test "$extra_verbose" = "yes" && cat << EOF
1288     Defining OS_RELEASE = $os_release
1289 EOF
1290 cat >> confdefs.h <<EOF
1291 #define OS_RELEASE $os_release
1292 EOF
1293 }
1294  ;;
1295
1296             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1297       *-sunos4.0*         ) opsys=sunos4-0      ;;
1298       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1299       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1300       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1301       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1302       *-mach*             ) opsys=mach-bsd4-3   ;;
1303       *                   ) opsys=bsd4-2        ;;
1304     esac
1305
1306     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1307
1308         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1309   ;;
1310
1311     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1312
1313     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1314   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1315
1316     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1317
1318     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1319
1320     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1321       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1322
1323     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1324
1325     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1326
1327     vax-dec-* )
1328     case "$canonical" in
1329       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1330       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1331       *-mach* )                         opsys=mach-bsd4-3 ;;
1332     esac
1333   ;;
1334
1335     ns16k-whitechapel-* ) machine=mg1 ;;
1336
1337     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1338
1339     i[3-9]86-*-* )
1340     machine=intel386
1341     case "$canonical" in
1342       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1343       *-isc2.2* )               opsys=isc2-2 ;;
1344       *-isc4.0* )               opsys=isc4-0 ;;
1345       *-isc4.* )                opsys=isc4-1
1346                                 GCC_TEST_OPTIONS=-posix
1347                                 NON_GCC_TEST_OPTIONS=-Xp
1348                                 ;;
1349       *-isc* )                  opsys=isc3-0 ;;
1350       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1351       *-esix* )                 opsys=esix ;;
1352       *-mach* )                 opsys=mach-bsd4-3 ;;
1353       *-xenix* )                opsys=xenix ;;
1354       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1355       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1356       *-bsdi3* )                opsys=bsdos3 ;;
1357       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1358       *-bsdi2* )                opsys=bsdos2 ;;
1359       *-sco3.2v5* )             opsys=sco5 ;
1360                                                         if test "$dynamic" = "yes" ; then
1361                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1362         else
1363                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1364         fi ;;
1365       *-386bsd* )               opsys=386bsd ;;
1366       *-freebsd* )              opsys=freebsd ;;
1367       *-nextstep* )             opsys=nextstep ;;
1368       *-pc-cygwin32 )           opsys=cygwin32 ;;
1369           esac
1370   ;;
1371
1372     m68k-*-linux* ) machine=m68k opsys=linux ;;
1373
1374 esac
1375
1376 if test -z "$machine" -o -z "$opsys"; then
1377   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1378    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1379   ) >&2
1380   exit 1
1381 fi
1382
1383 if test -z "$dynamic"; then
1384   case "$opsys" in
1385     hpux* | sunos4* | sco5 ) dynamic=no ;;
1386     *) dynamic=yes ;;
1387   esac
1388 fi
1389 if test "$dynamic" = "yes"; then
1390   case "$opsys" in
1391     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1392     decosf* ) ld_call_shared="-call_shared" ;;
1393   esac
1394 else   case "$opsys" in
1395     sol2 )
1396       echo "Static linking is not supported on Solaris 2."
1397       echo "Rerun configure without specifying --dynamic=no."
1398       exit 1 ;;
1399     linux   ) ld_call_shared="-Bstatic" ;;
1400     decosf* ) ld_call_shared="-non_shared" ;;
1401   esac
1402 fi
1403
1404 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1405
1406 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1407 { test "$extra_verbose" = "yes" && cat << EOF
1408     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1409 EOF
1410 cat >> confdefs.h <<EOF
1411 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1412 EOF
1413 }
1414
1415
1416 machfile="m/${machine}.h"
1417 opsysfile="s/${opsys}.h"
1418
1419
1420 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1421 if test "$with_workshop $with_tooltalk" = "yes no"; then
1422   (echo "$progname: Usage error:"
1423 echo " " "--with-workshop requires --with-tooltalk"
1424 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1425 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1426 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1427 fi
1428
1429 if test "$with_workshop" = "yes"; then
1430   { test "$extra_verbose" = "yes" && cat << \EOF
1431     Defining SUNPRO
1432 EOF
1433 cat >> confdefs.h <<\EOF
1434 #define SUNPRO 1
1435 EOF
1436 }
1437
1438   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1439    echo "    xemacs will be linked with \"sunpro.o\""
1440  fi
1441 fi
1442
1443 if test "$with_clash_detection" = "yes"; then
1444   { test "$extra_verbose" = "yes" && cat << \EOF
1445     Defining CLASH_DETECTION
1446 EOF
1447 cat >> confdefs.h <<\EOF
1448 #define CLASH_DETECTION 1
1449 EOF
1450 }
1451
1452   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1453    echo "    xemacs will be linked with \"filelock.o\""
1454  fi
1455 fi
1456
1457 test -n "$compiler" && CC="$compiler"
1458 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1459 fi
1460
1461 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1462 if test "${CFLAGS-unset}" != unset
1463   then cflags_specified=yes;
1464   else cflags_specified=no;
1465 fi
1466
1467 xe_save_CFLAGS="$CFLAGS"
1468
1469 # Extract the first word of "gcc", so it can be a program name with args.
1470 set dummy gcc; ac_word=$2
1471 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1472 echo "configure:1473: checking for $ac_word" >&5
1473
1474 if test -n "$CC"; then
1475   ac_cv_prog_CC="$CC" # Let the user override the test.
1476 else
1477   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1478   for ac_dir in $PATH; do
1479     test -z "$ac_dir" && ac_dir=.
1480     if test -f $ac_dir/$ac_word; then
1481       ac_cv_prog_CC="gcc"
1482       break
1483     fi
1484   done
1485   IFS="$ac_save_ifs"
1486 fi
1487 CC="$ac_cv_prog_CC"
1488 if test -n "$CC"; then
1489   echo "$ac_t""$CC" 1>&6
1490 else
1491   echo "$ac_t""no" 1>&6
1492 fi
1493
1494 if test -z "$CC"; then
1495   # Extract the first word of "cc", so it can be a program name with args.
1496 set dummy cc; ac_word=$2
1497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1498 echo "configure:1499: checking for $ac_word" >&5
1499
1500 if test -n "$CC"; then
1501   ac_cv_prog_CC="$CC" # Let the user override the test.
1502 else
1503   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1504   ac_prog_rejected=no
1505   for ac_dir in $PATH; do
1506     test -z "$ac_dir" && ac_dir=.
1507     if test -f $ac_dir/$ac_word; then
1508       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1509         ac_prog_rejected=yes
1510         continue
1511       fi
1512       ac_cv_prog_CC="cc"
1513       break
1514     fi
1515   done
1516   IFS="$ac_save_ifs"
1517 if test $ac_prog_rejected = yes; then
1518   # We found a bogon in the path, so make sure we never use it.
1519   set dummy $ac_cv_prog_CC
1520   shift
1521   if test $# -gt 0; then
1522     # We chose a different compiler from the bogus one.
1523     # However, it has the same basename, so the bogon will be chosen
1524     # first if we set CC to just the basename; use the full file name.
1525     shift
1526     set dummy "$ac_dir/$ac_word" "$@"
1527     shift
1528     ac_cv_prog_CC="$@"
1529   fi
1530 fi
1531 fi
1532 CC="$ac_cv_prog_CC"
1533 if test -n "$CC"; then
1534   echo "$ac_t""$CC" 1>&6
1535 else
1536   echo "$ac_t""no" 1>&6
1537 fi
1538
1539   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1540 fi
1541
1542 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1543 echo "configure:1544: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1544
1545 ac_ext=c
1546 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1547 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1548 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1549 ac_cpp='$CPP '"$xe_cppflags"
1550 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1551 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1552 cross_compiling=no
1553
1554 cat > conftest.$ac_ext <<EOF
1555 #line 1556 "configure"
1556 #include "confdefs.h"
1557 main(){return(0);}
1558 EOF
1559 if { (eval echo configure:1560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1560   ac_cv_prog_cc_works=yes
1561   # If we can't run a trivial program, we are probably using a cross compiler.
1562   if (./conftest; exit) 2>/dev/null; then
1563     ac_cv_prog_cc_cross=no
1564   else
1565     ac_cv_prog_cc_cross=yes
1566   fi
1567 else
1568   echo "configure: failed program was:" >&5
1569   cat conftest.$ac_ext >&5
1570   ac_cv_prog_cc_works=no
1571 fi
1572 rm -fr conftest*
1573
1574 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1575 if test $ac_cv_prog_cc_works = no; then
1576   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1577 fi
1578 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1579 echo "configure:1580: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1580 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1581 cross_compiling=$ac_cv_prog_cc_cross
1582
1583 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1584 echo "configure:1585: checking whether we are using GNU C" >&5
1585
1586 cat > conftest.c <<EOF
1587 #ifdef __GNUC__
1588   yes;
1589 #endif
1590 EOF
1591 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1592   ac_cv_prog_gcc=yes
1593 else
1594   ac_cv_prog_gcc=no
1595 fi
1596
1597 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1598
1599 if test $ac_cv_prog_gcc = yes; then
1600   GCC=yes
1601   ac_test_CFLAGS="${CFLAGS+set}"
1602   ac_save_CFLAGS="$CFLAGS"
1603   CFLAGS=
1604   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1605 echo "configure:1606: checking whether ${CC-cc} accepts -g" >&5
1606
1607 echo 'void f(){}' > conftest.c
1608 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1609   ac_cv_prog_cc_g=yes
1610 else
1611   ac_cv_prog_cc_g=no
1612 fi
1613 rm -f conftest*
1614
1615
1616 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1617   if test "$ac_test_CFLAGS" = set; then
1618     CFLAGS="$ac_save_CFLAGS"
1619   elif test $ac_cv_prog_cc_g = yes; then
1620     CFLAGS="-g -O2"
1621   else
1622     CFLAGS="-O2"
1623   fi
1624 else
1625   GCC=
1626   test "${CFLAGS+set}" = set || CFLAGS="-g"
1627 fi
1628  
1629 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1630   CC=${NON_GNU_CC-cc}
1631   # Extract the first word of "gcc", so it can be a program name with args.
1632 set dummy gcc; ac_word=$2
1633 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1634 echo "configure:1635: checking for $ac_word" >&5
1635
1636 if test -n "$CC"; then
1637   ac_cv_prog_CC="$CC" # Let the user override the test.
1638 else
1639   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1640   for ac_dir in $PATH; do
1641     test -z "$ac_dir" && ac_dir=.
1642     if test -f $ac_dir/$ac_word; then
1643       ac_cv_prog_CC="gcc"
1644       break
1645     fi
1646   done
1647   IFS="$ac_save_ifs"
1648 fi
1649 CC="$ac_cv_prog_CC"
1650 if test -n "$CC"; then
1651   echo "$ac_t""$CC" 1>&6
1652 else
1653   echo "$ac_t""no" 1>&6
1654 fi
1655
1656 if test -z "$CC"; then
1657   # Extract the first word of "cc", so it can be a program name with args.
1658 set dummy cc; ac_word=$2
1659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1660 echo "configure:1661: checking for $ac_word" >&5
1661
1662 if test -n "$CC"; then
1663   ac_cv_prog_CC="$CC" # Let the user override the test.
1664 else
1665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1666   ac_prog_rejected=no
1667   for ac_dir in $PATH; do
1668     test -z "$ac_dir" && ac_dir=.
1669     if test -f $ac_dir/$ac_word; then
1670       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1671         ac_prog_rejected=yes
1672         continue
1673       fi
1674       ac_cv_prog_CC="cc"
1675       break
1676     fi
1677   done
1678   IFS="$ac_save_ifs"
1679 if test $ac_prog_rejected = yes; then
1680   # We found a bogon in the path, so make sure we never use it.
1681   set dummy $ac_cv_prog_CC
1682   shift
1683   if test $# -gt 0; then
1684     # We chose a different compiler from the bogus one.
1685     # However, it has the same basename, so the bogon will be chosen
1686     # first if we set CC to just the basename; use the full file name.
1687     shift
1688     set dummy "$ac_dir/$ac_word" "$@"
1689     shift
1690     ac_cv_prog_CC="$@"
1691   fi
1692 fi
1693 fi
1694 CC="$ac_cv_prog_CC"
1695 if test -n "$CC"; then
1696   echo "$ac_t""$CC" 1>&6
1697 else
1698   echo "$ac_t""no" 1>&6
1699 fi
1700
1701   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1702 fi
1703
1704 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1705 echo "configure:1706: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1706
1707 ac_ext=c
1708 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1709 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1710 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1711 ac_cpp='$CPP '"$xe_cppflags"
1712 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1713 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1714 cross_compiling=no
1715
1716 cat > conftest.$ac_ext <<EOF
1717 #line 1718 "configure"
1718 #include "confdefs.h"
1719 main(){return(0);}
1720 EOF
1721 if { (eval echo configure:1722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1722   ac_cv_prog_cc_works=yes
1723   # If we can't run a trivial program, we are probably using a cross compiler.
1724   if (./conftest; exit) 2>/dev/null; then
1725     ac_cv_prog_cc_cross=no
1726   else
1727     ac_cv_prog_cc_cross=yes
1728   fi
1729 else
1730   echo "configure: failed program was:" >&5
1731   cat conftest.$ac_ext >&5
1732   ac_cv_prog_cc_works=no
1733 fi
1734 rm -fr conftest*
1735
1736 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1737 if test $ac_cv_prog_cc_works = no; then
1738   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1739 fi
1740 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1741 echo "configure:1742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1742 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1743 cross_compiling=$ac_cv_prog_cc_cross
1744
1745 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1746 echo "configure:1747: checking whether we are using GNU C" >&5
1747
1748 cat > conftest.c <<EOF
1749 #ifdef __GNUC__
1750   yes;
1751 #endif
1752 EOF
1753 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1754   ac_cv_prog_gcc=yes
1755 else
1756   ac_cv_prog_gcc=no
1757 fi
1758
1759 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1760
1761 if test $ac_cv_prog_gcc = yes; then
1762   GCC=yes
1763   ac_test_CFLAGS="${CFLAGS+set}"
1764   ac_save_CFLAGS="$CFLAGS"
1765   CFLAGS=
1766   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1767 echo "configure:1768: checking whether ${CC-cc} accepts -g" >&5
1768
1769 echo 'void f(){}' > conftest.c
1770 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1771   ac_cv_prog_cc_g=yes
1772 else
1773   ac_cv_prog_cc_g=no
1774 fi
1775 rm -f conftest*
1776
1777
1778 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1779   if test "$ac_test_CFLAGS" = set; then
1780     CFLAGS="$ac_save_CFLAGS"
1781   elif test $ac_cv_prog_cc_g = yes; then
1782     CFLAGS="-g -O2"
1783   else
1784     CFLAGS="-O2"
1785   fi
1786 else
1787   GCC=
1788   test "${CFLAGS+set}" = set || CFLAGS="-g"
1789 fi
1790
1791 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1792   CC=gcc
1793   # Extract the first word of "gcc", so it can be a program name with args.
1794 set dummy gcc; ac_word=$2
1795 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1796 echo "configure:1797: checking for $ac_word" >&5
1797
1798 if test -n "$CC"; then
1799   ac_cv_prog_CC="$CC" # Let the user override the test.
1800 else
1801   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1802   for ac_dir in $PATH; do
1803     test -z "$ac_dir" && ac_dir=.
1804     if test -f $ac_dir/$ac_word; then
1805       ac_cv_prog_CC="gcc"
1806       break
1807     fi
1808   done
1809   IFS="$ac_save_ifs"
1810 fi
1811 CC="$ac_cv_prog_CC"
1812 if test -n "$CC"; then
1813   echo "$ac_t""$CC" 1>&6
1814 else
1815   echo "$ac_t""no" 1>&6
1816 fi
1817
1818 if test -z "$CC"; then
1819   # Extract the first word of "cc", so it can be a program name with args.
1820 set dummy cc; ac_word=$2
1821 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1822 echo "configure:1823: checking for $ac_word" >&5
1823
1824 if test -n "$CC"; then
1825   ac_cv_prog_CC="$CC" # Let the user override the test.
1826 else
1827   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1828   ac_prog_rejected=no
1829   for ac_dir in $PATH; do
1830     test -z "$ac_dir" && ac_dir=.
1831     if test -f $ac_dir/$ac_word; then
1832       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1833         ac_prog_rejected=yes
1834         continue
1835       fi
1836       ac_cv_prog_CC="cc"
1837       break
1838     fi
1839   done
1840   IFS="$ac_save_ifs"
1841 if test $ac_prog_rejected = yes; then
1842   # We found a bogon in the path, so make sure we never use it.
1843   set dummy $ac_cv_prog_CC
1844   shift
1845   if test $# -gt 0; then
1846     # We chose a different compiler from the bogus one.
1847     # However, it has the same basename, so the bogon will be chosen
1848     # first if we set CC to just the basename; use the full file name.
1849     shift
1850     set dummy "$ac_dir/$ac_word" "$@"
1851     shift
1852     ac_cv_prog_CC="$@"
1853   fi
1854 fi
1855 fi
1856 CC="$ac_cv_prog_CC"
1857 if test -n "$CC"; then
1858   echo "$ac_t""$CC" 1>&6
1859 else
1860   echo "$ac_t""no" 1>&6
1861 fi
1862
1863   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1864 fi
1865
1866 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1867 echo "configure:1868: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1868
1869 ac_ext=c
1870 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1871 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1872 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1873 ac_cpp='$CPP '"$xe_cppflags"
1874 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1875 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1876 cross_compiling=no
1877
1878 cat > conftest.$ac_ext <<EOF
1879 #line 1880 "configure"
1880 #include "confdefs.h"
1881 main(){return(0);}
1882 EOF
1883 if { (eval echo configure:1884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1884   ac_cv_prog_cc_works=yes
1885   # If we can't run a trivial program, we are probably using a cross compiler.
1886   if (./conftest; exit) 2>/dev/null; then
1887     ac_cv_prog_cc_cross=no
1888   else
1889     ac_cv_prog_cc_cross=yes
1890   fi
1891 else
1892   echo "configure: failed program was:" >&5
1893   cat conftest.$ac_ext >&5
1894   ac_cv_prog_cc_works=no
1895 fi
1896 rm -fr conftest*
1897
1898 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1899 if test $ac_cv_prog_cc_works = no; then
1900   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1901 fi
1902 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1903 echo "configure:1904: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1904 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1905 cross_compiling=$ac_cv_prog_cc_cross
1906
1907 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1908 echo "configure:1909: checking whether we are using GNU C" >&5
1909
1910 cat > conftest.c <<EOF
1911 #ifdef __GNUC__
1912   yes;
1913 #endif
1914 EOF
1915 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1916   ac_cv_prog_gcc=yes
1917 else
1918   ac_cv_prog_gcc=no
1919 fi
1920
1921 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1922
1923 if test $ac_cv_prog_gcc = yes; then
1924   GCC=yes
1925   ac_test_CFLAGS="${CFLAGS+set}"
1926   ac_save_CFLAGS="$CFLAGS"
1927   CFLAGS=
1928   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1929 echo "configure:1930: checking whether ${CC-cc} accepts -g" >&5
1930
1931 echo 'void f(){}' > conftest.c
1932 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1933   ac_cv_prog_cc_g=yes
1934 else
1935   ac_cv_prog_cc_g=no
1936 fi
1937 rm -f conftest*
1938
1939
1940 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1941   if test "$ac_test_CFLAGS" = set; then
1942     CFLAGS="$ac_save_CFLAGS"
1943   elif test $ac_cv_prog_cc_g = yes; then
1944     CFLAGS="-g -O2"
1945   else
1946     CFLAGS="-O2"
1947   fi
1948 else
1949   GCC=
1950   test "${CFLAGS+set}" = set || CFLAGS="-g"
1951 fi
1952
1953 fi
1954 CFLAGS="$xe_save_CFLAGS"
1955
1956
1957 test -n "$CPP" -a -d "$CPP" && CPP=
1958
1959 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
1960
1961 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1962 echo "configure:1963: checking how to run the C preprocessor" >&5
1963 # On Suns, sometimes $CPP names a directory.
1964 if test -n "$CPP" && test -d "$CPP"; then
1965   CPP=
1966 fi
1967 if test -z "$CPP"; then
1968
1969   # This must be in double quotes, not single quotes, because CPP may get
1970   # substituted into the Makefile and "${CC-cc}" will confuse make.
1971   CPP="${CC-cc} -E"
1972   # On the NeXT, cc -E runs the code through the compiler's parser,
1973   # not just through cpp.
1974   cat > conftest.$ac_ext <<EOF
1975 #line 1976 "configure"
1976 #include "confdefs.h"
1977 #include <assert.h>
1978 Syntax Error
1979 EOF
1980 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1981 { (eval echo configure:1982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1982 ac_err=`grep -v '^ *+' conftest.out`
1983 if test -z "$ac_err"; then
1984   :
1985 else
1986   echo "$ac_err" >&5
1987   echo "configure: failed program was:" >&5
1988   cat conftest.$ac_ext >&5
1989   rm -rf conftest*
1990   CPP="${CC-cc} -E -traditional-cpp"
1991   cat > conftest.$ac_ext <<EOF
1992 #line 1993 "configure"
1993 #include "confdefs.h"
1994 #include <assert.h>
1995 Syntax Error
1996 EOF
1997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1998 { (eval echo configure:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1999 ac_err=`grep -v '^ *+' conftest.out`
2000 if test -z "$ac_err"; then
2001   :
2002 else
2003   echo "$ac_err" >&5
2004   echo "configure: failed program was:" >&5
2005   cat conftest.$ac_ext >&5
2006   rm -rf conftest*
2007   CPP=/lib/cpp
2008 fi
2009 rm -f conftest*
2010 fi
2011 rm -f conftest*
2012   ac_cv_prog_CPP="$CPP"
2013   CPP="$ac_cv_prog_CPP"
2014 else
2015   ac_cv_prog_CPP="$CPP"
2016 fi
2017 echo "$ac_t""$CPP" 1>&6
2018
2019
2020 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2021 echo "configure:2022: checking for AIX" >&5
2022 cat > conftest.$ac_ext <<EOF
2023 #line 2024 "configure"
2024 #include "confdefs.h"
2025 #ifdef _AIX
2026   yes
2027 #endif
2028
2029 EOF
2030 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2031   egrep "yes" >/dev/null 2>&1; then
2032   rm -rf conftest*
2033   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2034     Defining _ALL_SOURCE
2035 EOF
2036 cat >> confdefs.h <<\EOF
2037 #define _ALL_SOURCE 1
2038 EOF
2039 }
2040
2041 else
2042   rm -rf conftest*
2043   echo "$ac_t""no" 1>&6
2044 fi
2045 rm -f conftest*
2046
2047
2048
2049 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2050 echo "configure:2051: checking for GNU libc" >&5
2051 cat > conftest.$ac_ext <<EOF
2052 #line 2053 "configure"
2053 #include "confdefs.h"
2054 #include <features.h>
2055 int main() {
2056
2057 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2058 #error Not a GNU libc system :-(
2059 ******* ======= ******** &&&&&&&&
2060 #endif
2061
2062 ; return 0; }
2063 EOF
2064 if { (eval echo configure:2065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2065   rm -rf conftest*
2066   have_glibc=yes
2067 else
2068   echo "configure: failed program was:" >&5
2069   cat conftest.$ac_ext >&5
2070   rm -rf conftest*
2071   have_glibc=no
2072 fi
2073 rm -f conftest*
2074 echo "$ac_t""$have_glibc" 1>&6
2075 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2076     Defining _GNU_SOURCE
2077 EOF
2078 cat >> confdefs.h <<\EOF
2079 #define _GNU_SOURCE 1
2080 EOF
2081 }
2082
2083
2084
2085 cat > conftest.$ac_ext <<EOF
2086 #line 2087 "configure"
2087 #include "confdefs.h"
2088 int main () {
2089 #if defined __SUNPRO_C
2090 return 11;
2091 #elif defined __DECC
2092 return 12;
2093 #else
2094 return 0;
2095 #endif
2096 }
2097 EOF
2098 if { (eval echo configure:2099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2099 then
2100   :
2101 else
2102   conftest_rc="$?"
2103   echo "configure: failed program was:" >&5
2104   cat conftest.$ac_ext >&5
2105   rm -fr conftest*
2106   case "$conftest_rc" in
2107   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2108   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2109 esac
2110 fi
2111 rm -fr conftest*
2112
2113
2114
2115
2116 echo "Extracting information from the machine- and system-dependent headers..."
2117
2118 tempcname="conftest.c"
2119
2120
2121
2122 cat > $tempcname <<EOF
2123 #define NOT_C_CODE
2124 #define C_SWITCH_SITE
2125 #define C_SWITCH_X_SITE
2126 #define LD_SWITCH_SITE
2127 #define LD_SWITCH_X_SITE
2128 #define LD_SWITCH_X_SITE_AUX
2129 #define OS_RELEASE $os_release
2130 #include "$srcdir/src/$opsysfile"
2131 #include "$srcdir/src/$machfile"
2132
2133 #ifndef LIBS_MACHINE
2134 #define LIBS_MACHINE
2135 #endif
2136 configure___ libs_machine=LIBS_MACHINE
2137
2138 #ifndef LIBS_SYSTEM
2139 #define LIBS_SYSTEM
2140 #endif
2141 configure___ libs_system=LIBS_SYSTEM
2142
2143 #ifndef LIBS_TERMCAP
2144 #define LIBS_TERMCAP
2145 #endif
2146 configure___ libs_termcap=LIBS_TERMCAP
2147
2148 #ifndef LIB_STANDARD
2149 #define LIB_STANDARD
2150 #endif
2151 configure___ libs_standard=LIB_STANDARD
2152
2153
2154 #ifndef OBJECTS_MACHINE
2155 #define OBJECTS_MACHINE
2156 #endif
2157 configure___ objects_machine=OBJECTS_MACHINE
2158
2159 #ifndef OBJECTS_SYSTEM
2160 #define OBJECTS_SYSTEM
2161 #endif
2162 configure___ objects_system=OBJECTS_SYSTEM
2163
2164
2165 #ifndef C_SWITCH_MACHINE
2166 #define C_SWITCH_MACHINE
2167 #endif
2168 configure___ c_switch_machine=C_SWITCH_MACHINE
2169
2170 #ifndef C_SWITCH_SYSTEM
2171 #define C_SWITCH_SYSTEM
2172 #endif
2173 configure___ c_switch_system=C_SWITCH_SYSTEM
2174
2175
2176 #ifndef LD_SWITCH_MACHINE
2177 #define LD_SWITCH_MACHINE
2178 #endif
2179 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2180
2181 #ifndef LD_SWITCH_SYSTEM
2182 #define LD_SWITCH_SYSTEM
2183 #endif
2184 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2185
2186
2187 #ifndef UNEXEC
2188 #define UNEXEC "unexec.o"
2189 #endif
2190 configure___ unexec=UNEXEC
2191
2192
2193 #ifndef LD_SWITCH_SHARED
2194 #define LD_SWITCH_SHARED "-c"
2195 #endif
2196 configure___ ld_switch_shared=LD_SWITCH_SHARED
2197
2198
2199 #ifdef ORDINARY_LINK
2200 #define LD "\$(CC) \$(CFLAGS)"
2201 #else /* no ORDINARY LINK */
2202 #ifdef COFF_ENCAPSULATE
2203 #define LD "\$(CC) -nostdlib"
2204 #else /* not COFF_ENCAPSULATE */
2205 #ifdef LINKER
2206 #define LD LINKER
2207 #else /* ! defined (LINKER) */
2208 #define LD "ld"
2209 #endif /* ! defined (LINKER) */
2210 #endif /* ! defined (COFF_ENCAPSULATE) */
2211 #endif /* not ORDINARY_LINK */
2212 configure___ ld=LD
2213
2214 #ifndef LIB_GCC
2215 #define LIB_GCC
2216 #endif
2217 configure___ lib_gcc=LIB_GCC
2218
2219 #ifndef LD_TEXT_START_ADDR
2220 #define LD_TEXT_START_ADDR
2221 #endif
2222 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2223
2224
2225 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2226 #ifdef NO_REMAP
2227 #ifdef COFF_ENCAPSULATE
2228 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2229 #else /* ! defined (COFF_ENCAPSULATE) */
2230 #define START_FILES "pre-crt0.o /lib/crt0.o"
2231 #endif /* ! defined (COFF_ENCAPSULATE) */
2232 #else /* ! defined (NO_REMAP) */
2233 #define START_FILES "ecrt0.o"
2234 #endif /* ! defined (NO_REMAP) */
2235 #endif /* no ORDINARY_LINK */
2236 #ifndef START_FILES
2237 #define START_FILES
2238 #endif
2239 configure___ start_files=START_FILES
2240
2241 #ifdef ORDINARY_LINK
2242 configure___ ordinary_link=yes
2243 #else
2244 configure___ ordinary_link=no
2245 #endif
2246
2247 #ifdef SYSTEM_MALLOC
2248 configure___ system_malloc=yes
2249 #else
2250 configure___ system_malloc=no
2251 #endif
2252
2253 #ifdef TERMINFO
2254 configure___ have_terminfo=yes
2255 #else
2256 configure___ have_terminfo=no
2257 #endif
2258
2259 #ifdef MAIL_USE_FLOCK
2260 configure___ mail_use_flock=yes
2261 #else
2262 configure___ mail_use_flock=no
2263 #endif
2264
2265 #ifdef MAIL_USE_LOCKF
2266 configure___ mail_use_lockf=yes
2267 #else
2268 configure___ mail_use_lockf=no
2269 #endif
2270
2271 EOF
2272
2273 CPP=`eval "echo $CPP"`
2274 eval `$CPP -Isrc $tempcname \
2275         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2276
2277 rm $tempcname
2278
2279 test "$extra_verbose" = "yes" && \
2280   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 ""
2281
2282 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2283
2284 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2285
2286 if test "$cflags_specified" = "no"; then
2287       if   test "$GCC" = "yes"; then
2288     CFLAGS="-g -O3 -Wall -Wno-switch"
2289                     test "$opsys $machine" = "cygwin32 intel386" && \
2290       CFLAGS="-g -O2 -Wall -Wno-switch"
2291   elif test "$__SUNPRO_C" = "yes"; then
2292     case "$opsys" in
2293       sol2    ) CFLAGS="-v -xO4" ;;
2294       sunos4* ) CFLAGS="-xO2";;
2295     esac
2296   elif test "$__DECC" = "yes"; then
2297     CFLAGS="-O3"
2298   elif test "$CC" = "xlc"; then
2299     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2300     else
2301     CFLAGS="-O" ;  fi
2302 fi
2303
2304
2305 if test "$GCC" = "yes"; then
2306   set x $ld_switch_system; shift; ld_switch_system=""
2307   while test -n "$1"; do
2308     case $1 in
2309       -L  | -l  | -u         ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2310       -L* | -l* | -u* | -Wl* ) ld_switch_system="$ld_switch_system $1" ;;
2311       -Xlinker* ) ;;
2312       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2313     esac
2314     shift
2315   done
2316 fi
2317
2318 if test "$GCC" = "yes"; then
2319   set x $ld_switch_machine; shift; ld_switch_machine=""
2320   while test -n "$1"; do
2321     case $1 in
2322       -L  | -l  | -u         ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2323       -L* | -l* | -u* | -Wl* ) ld_switch_machine="$ld_switch_machine $1" ;;
2324       -Xlinker* ) ;;
2325       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2326     esac
2327     shift
2328   done
2329 fi
2330
2331 if test "$GCC" = "yes"; then
2332   set x $LDFLAGS; shift; LDFLAGS=""
2333   while test -n "$1"; do
2334     case $1 in
2335       -L  | -l  | -u         ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2336       -L* | -l* | -u* | -Wl* ) LDFLAGS="$LDFLAGS $1" ;;
2337       -Xlinker* ) ;;
2338       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2339     esac
2340     shift
2341   done
2342 fi
2343
2344 if test "$GCC" = "yes"; then
2345   set x $ld_call_shared; shift; ld_call_shared=""
2346   while test -n "$1"; do
2347     case $1 in
2348       -L  | -l  | -u         ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2349       -L* | -l* | -u* | -Wl* ) ld_call_shared="$ld_call_shared $1" ;;
2350       -Xlinker* ) ;;
2351       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2352     esac
2353     shift
2354   done
2355 fi
2356
2357 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2358    echo "    xemacs will be linked with \"$objects_machine\""
2359  fi
2360 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2361    echo "    xemacs will be linked with \"$objects_system\""
2362  fi
2363 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2364    echo "    xemacs will be linked with \"$unexec\""
2365  fi
2366
2367 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2368 echo "configure:2369: checking for dynodump" >&5
2369 if test "$unexec" != "unexsol2.o"; then
2370   echo "$ac_t""no" 1>&6
2371 else
2372   echo "$ac_t""yes" 1>&6
2373   { test "$extra_verbose" = "yes" && cat << \EOF
2374     Defining DYNODUMP
2375 EOF
2376 cat >> confdefs.h <<\EOF
2377 #define DYNODUMP 1
2378 EOF
2379 }
2380
2381   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2382   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2383   case "$machine" in
2384     sparc   ) dynodump_arch=sparc ;;
2385     *86*    ) dynodump_arch=i386  ;;
2386     powerpc ) dynodump_arch=ppc   ;;
2387   esac
2388     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
2389 fi
2390
2391
2392 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2393
2394 if test "$unexec" = "unexaix.o"; then
2395   if   test "$dynamic" = "no"; then
2396   start_flags="-Wl,-bnso,-bnodelcsect"
2397   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2398   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2399     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2400   done
2401   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2402     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2403   done
2404   
2405 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2406 echo "configure:2407: checking for terminateAndUnload in -lC" >&5
2407 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2408
2409 xe_check_libs=" -lC "
2410 cat > conftest.$ac_ext <<EOF
2411 #line 2412 "configure"
2412 #include "confdefs.h"
2413 /* Override any gcc2 internal prototype to avoid an error.  */
2414 /* We use char because int might match the return type of a gcc2
2415     builtin and then its argument prototype would still apply.  */
2416 char terminateAndUnload();
2417
2418 int main() {
2419 terminateAndUnload()
2420 ; return 0; }
2421 EOF
2422 if { (eval echo configure:2423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2423   rm -rf conftest*
2424   eval "ac_cv_lib_$ac_lib_var=yes"
2425 else
2426   echo "configure: failed program was:" >&5
2427   cat conftest.$ac_ext >&5
2428   rm -rf conftest*
2429   eval "ac_cv_lib_$ac_lib_var=no"
2430 fi
2431 rm -f conftest*
2432 xe_check_libs=""
2433
2434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2435   echo "$ac_t""yes" 1>&6
2436   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2437 else
2438   echo "$ac_t""no" 1>&6
2439 fi
2440
2441
2442   fi
2443 elif test -n "$ld_text_start_addr"; then
2444   start_flags="-T $ld_text_start_addr -e __start"
2445 fi
2446
2447
2448
2449
2450 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2451  test -z "$linker" &&  linker='$(CC) -nostdlib'
2452  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2453 fi
2454 test "$GCC" != "yes" && lib_gcc=
2455
2456
2457
2458
2459
2460 if test -n "$site_prefixes"; then
2461   for arg in $site_prefixes; do
2462     case "$arg" in
2463         -* ) ;;
2464         * ) argi="-I${arg}/include" ; argl="-L${arg}/lib" ;;
2465     esac
2466     c_switch_site="$c_switch_site $argi" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$argi\" to \$c_switch_site"; fi
2467     ld_switch_site="$ld_switch_site $argl" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$argl\" to \$ld_switch_site"; fi
2468   done
2469 fi
2470
2471 if test -n "$site_libraries"; then
2472   for arg in $site_libraries; do
2473     case "$arg" in -* ) ;; * ) arg="-L${arg}" ;; esac
2474     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2475   done
2476 fi
2477
2478 if test -n "$site_includes"; then
2479   for arg in $site_includes; do
2480     case "$arg" in -* ) ;; * ) arg="-I${arg}" ;; esac
2481     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2482   done
2483 fi
2484
2485
2486 for dir in "/usr/ccs/lib"; do
2487   test -d "$dir" && ld_switch_site="$ld_switch_site -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_site"; fi
2488 done
2489
2490 if test -n "$site_runtime_libraries"; then
2491   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2492   export LD_RUN_PATH
2493 fi
2494
2495
2496 if   test "$dynamic" = "no"; then add_runtime_path=no
2497 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2498 else case "$opsys" in
2499        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2500        * ) add_runtime_path=no ;;
2501      esac
2502 fi
2503
2504 if test "$add_runtime_path" = "yes"; then
2505       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2506 echo "configure:2507: checking "for runtime libraries flag"" >&5
2507   case "$opsys" in
2508     sol2 ) dash_r = "-R" ;;
2509     decosf* | linux* ) dash_r = "-rpath " ;;
2510     *)
2511       dash_r=""
2512       for try_dash_r in "-R" "-R " "-rpath "; do
2513         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2514         
2515 if test "$GCC" = "yes"; then
2516   set x $xe_check_libs; shift; xe_check_libs=""
2517   while test -n "$1"; do
2518     case $1 in
2519       -L  | -l  | -u         ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2520       -L* | -l* | -u* | -Wl* ) xe_check_libs="$xe_check_libs $1" ;;
2521       -Xlinker* ) ;;
2522       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2523     esac
2524     shift
2525   done
2526 fi
2527         cat > conftest.$ac_ext <<EOF
2528 #line 2529 "configure"
2529 #include "confdefs.h"
2530
2531 int main() {
2532
2533 ; return 0; }
2534 EOF
2535 if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2536   rm -rf conftest*
2537   dash_r="$try_dash_r"
2538 else
2539   echo "configure: failed program was:" >&5
2540   cat conftest.$ac_ext >&5
2541 fi
2542 rm -f conftest*
2543         xe_check_libs=""
2544         test -n "$dash_r" && break
2545       done ;;
2546   esac
2547   if test -n "$dash_r";
2548     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2549     else echo "$ac_t""NONE" 1>&6
2550   fi
2551 fi
2552
2553 xe_add_unique_runpath_dir='
2554   xe_add_p=yes
2555   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2556   done
2557   if test "$xe_add_p" = "yes"; then
2558     test -n "$runpath" && runpath="${runpath}:"
2559     runpath="${runpath}${xe_runpath_dir}"
2560     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2561   fi'
2562
2563
2564
2565
2566 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2567     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2568   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2569   
2570         runpath="" runpath_dirs=""
2571   if test -n "$LD_RUN_PATH"; then
2572     runpath="$LD_RUN_PATH"
2573   elif test "$GCC" = "yes"; then
2574         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2575     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2576     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2577     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2578       case "$arg" in P,* | -L* | -R* )
2579         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2580           {
2581 xe_runpath_dir="$dir"
2582   test "$xe_runpath_dir" != "/lib"     -a \
2583         "$xe_runpath_dir" != "/usr/lib" -a \
2584         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2585   eval "$xe_add_unique_runpath_dir"
2586 }
2587         done ;;
2588       esac
2589     done
2590     ld_switch_run="$ld_switch_run_save"
2591     rm -f conftest*
2592   else
2593         for arg in $ld_switch_site $ld_switch_x_site; do
2594       case "$arg" in -L*) {
2595 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2596   test "$xe_runpath_dir" != "/lib"     -a \
2597         "$xe_runpath_dir" != "/usr/lib" -a \
2598         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2599   eval "$xe_add_unique_runpath_dir"
2600 };; esac
2601     done
2602         if test "$opsys $need_motif" = "sol2 yes"; then
2603       xe_runpath_dir="/opt/SUNWdt/lib";
2604       eval "$xe_add_unique_runpath_dir";
2605     fi
2606   fi 
2607   if test -n "$runpath"; then
2608     ld_switch_run="${dash_r}${runpath}"
2609     
2610 if test "$GCC" = "yes"; then
2611   set x $ld_switch_run; shift; ld_switch_run=""
2612   while test -n "$1"; do
2613     case $1 in
2614       -L  | -l  | -u         ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2615       -L* | -l* | -u* | -Wl* ) ld_switch_run="$ld_switch_run $1" ;;
2616       -Xlinker* ) ;;
2617       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2618     esac
2619     shift
2620   done
2621 fi
2622     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2623   fi
2624 fi
2625
2626
2627
2628 GNU_MALLOC=yes
2629 if test "$with_dlmalloc" != "no"; then
2630         doug_lea_malloc=yes
2631 else
2632         doug_lea_malloc=no
2633 fi
2634 after_morecore_hook_exists=yes
2635 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2636 echo "configure:2637: checking for malloc_get_state" >&5
2637
2638 cat > conftest.$ac_ext <<EOF
2639 #line 2640 "configure"
2640 #include "confdefs.h"
2641 /* System header to define __stub macros and hopefully few prototypes,
2642     which can conflict with char malloc_get_state(); below.  */
2643 #include <assert.h>
2644 /* Override any gcc2 internal prototype to avoid an error.  */
2645 /* We use char because int might match the return type of a gcc2
2646     builtin and then its argument prototype would still apply.  */
2647 char malloc_get_state();
2648
2649 int main() {
2650
2651 /* The GNU C library defines this for functions which it implements
2652     to always fail with ENOSYS.  Some functions are actually named
2653     something starting with __ and the normal name is an alias.  */
2654 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2655 choke me
2656 #else
2657 malloc_get_state();
2658 #endif
2659
2660 ; return 0; }
2661 EOF
2662 if { (eval echo configure:2663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2663   rm -rf conftest*
2664   eval "ac_cv_func_malloc_get_state=yes"
2665 else
2666   echo "configure: failed program was:" >&5
2667   cat conftest.$ac_ext >&5
2668   rm -rf conftest*
2669   eval "ac_cv_func_malloc_get_state=no"
2670 fi
2671 rm -f conftest*
2672
2673 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2674   echo "$ac_t""yes" 1>&6
2675   :
2676 else
2677   echo "$ac_t""no" 1>&6
2678 doug_lea_malloc=no
2679 fi
2680
2681 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2682 echo "configure:2683: checking for malloc_set_state" >&5
2683
2684 cat > conftest.$ac_ext <<EOF
2685 #line 2686 "configure"
2686 #include "confdefs.h"
2687 /* System header to define __stub macros and hopefully few prototypes,
2688     which can conflict with char malloc_set_state(); below.  */
2689 #include <assert.h>
2690 /* Override any gcc2 internal prototype to avoid an error.  */
2691 /* We use char because int might match the return type of a gcc2
2692     builtin and then its argument prototype would still apply.  */
2693 char malloc_set_state();
2694
2695 int main() {
2696
2697 /* The GNU C library defines this for functions which it implements
2698     to always fail with ENOSYS.  Some functions are actually named
2699     something starting with __ and the normal name is an alias.  */
2700 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
2701 choke me
2702 #else
2703 malloc_set_state();
2704 #endif
2705
2706 ; return 0; }
2707 EOF
2708 if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2709   rm -rf conftest*
2710   eval "ac_cv_func_malloc_set_state=yes"
2711 else
2712   echo "configure: failed program was:" >&5
2713   cat conftest.$ac_ext >&5
2714   rm -rf conftest*
2715   eval "ac_cv_func_malloc_set_state=no"
2716 fi
2717 rm -f conftest*
2718
2719 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
2720   echo "$ac_t""yes" 1>&6
2721   :
2722 else
2723   echo "$ac_t""no" 1>&6
2724 doug_lea_malloc=no
2725 fi
2726
2727 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
2728 echo "configure:2729: checking whether __after_morecore_hook exists" >&5
2729 cat > conftest.$ac_ext <<EOF
2730 #line 2731 "configure"
2731 #include "confdefs.h"
2732 extern void (* __after_morecore_hook)();
2733 int main() {
2734 __after_morecore_hook = 0
2735 ; return 0; }
2736 EOF
2737 if { (eval echo configure:2738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2738   rm -rf conftest*
2739   echo "$ac_t""yes" 1>&6
2740 else
2741   echo "configure: failed program was:" >&5
2742   cat conftest.$ac_ext >&5
2743   rm -rf conftest*
2744   echo "$ac_t""no" 1>&6
2745    after_morecore_hook_exists=no
2746 fi
2747 rm -f conftest*
2748 if test "$system_malloc" = "yes" ; then
2749   GNU_MALLOC=no
2750   GNU_MALLOC_reason="
2751   (The GNU allocators don't work with this system configuration)."
2752 elif test "$with_system_malloc" = "yes" ; then
2753   GNU_MALLOC=no
2754   GNU_MALLOC_reason="
2755   (User chose not to use GNU allocators)."
2756 elif test "$with_debug_malloc" = "yes" ; then
2757   GNU_MALLOC=no
2758   GNU_MALLOC_reason="
2759   (User chose to use Debugging Malloc)."
2760 fi
2761
2762 if test "$doug_lea_malloc" = "yes" ; then
2763   if test "$GNU_MALLOC" = yes ; then
2764     GNU_MALLOC_reason="
2765   (Using Doug Lea's new malloc from the GNU C Library.)"
2766   fi
2767   { test "$extra_verbose" = "yes" && cat << \EOF
2768     Defining DOUG_LEA_MALLOC
2769 EOF
2770 cat >> confdefs.h <<\EOF
2771 #define DOUG_LEA_MALLOC 1
2772 EOF
2773 }
2774
2775   if test "$after_morecore_hook_exists" = "no" ; then
2776     GNU_MALLOC_reason="
2777   (Using Doug Lea's new malloc from the Linux C Library.)"
2778     { test "$extra_verbose" = "yes" && cat << \EOF
2779     Defining _NO_MALLOC_WARNING_
2780 EOF
2781 cat >> confdefs.h <<\EOF
2782 #define _NO_MALLOC_WARNING_ 1
2783 EOF
2784 }
2785
2786   fi
2787   use_minimal_tagbits=yes
2788 fi
2789
2790
2791
2792
2793 # Extract the first word of "ranlib", so it can be a program name with args.
2794 set dummy ranlib; ac_word=$2
2795 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2796 echo "configure:2797: checking for $ac_word" >&5
2797
2798 if test -n "$RANLIB"; then
2799   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2800 else
2801   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2802   for ac_dir in $PATH; do
2803     test -z "$ac_dir" && ac_dir=.
2804     if test -f $ac_dir/$ac_word; then
2805       ac_cv_prog_RANLIB="ranlib"
2806       break
2807     fi
2808   done
2809   IFS="$ac_save_ifs"
2810   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2811 fi
2812 RANLIB="$ac_cv_prog_RANLIB"
2813 if test -n "$RANLIB"; then
2814   echo "$ac_t""$RANLIB" 1>&6
2815 else
2816   echo "$ac_t""no" 1>&6
2817 fi
2818
2819 ac_aux_dir=
2820 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2821   if test -f $ac_dir/install-sh; then
2822     ac_aux_dir=$ac_dir
2823     ac_install_sh="$ac_aux_dir/install-sh -c"
2824     break
2825   elif test -f $ac_dir/install.sh; then
2826     ac_aux_dir=$ac_dir
2827     ac_install_sh="$ac_aux_dir/install.sh -c"
2828     break
2829   fi
2830 done
2831 if test -z "$ac_aux_dir"; then
2832   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
2833 fi
2834 ac_config_guess=$ac_aux_dir/config.guess
2835 ac_config_sub=$ac_aux_dir/config.sub
2836 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
2837
2838 # Find a good install program.  We prefer a C program (faster),
2839 # so one script is as good as another.  But avoid the broken or
2840 # incompatible versions:
2841 # SysV /etc/install, /usr/sbin/install
2842 # SunOS /usr/etc/install
2843 # IRIX /sbin/install
2844 # AIX /bin/install
2845 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2846 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2847 # ./install, which can be erroneously created by make from ./install.sh.
2848 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2849 echo "configure:2850: checking for a BSD compatible install" >&5
2850 if test -z "$INSTALL"; then
2851
2852   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2853   for ac_dir in $PATH; do
2854     # Account for people who put trailing slashes in PATH elements.
2855     case "$ac_dir/" in
2856     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2857     *)
2858       # OSF1 and SCO ODT 3.0 have their own names for install.
2859       for ac_prog in ginstall installbsd scoinst install; do
2860         if test -f $ac_dir/$ac_prog; then
2861           if test $ac_prog = install &&
2862             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2863             # AIX install.  It has an incompatible calling convention.
2864             # OSF/1 installbsd also uses dspmsg, but is usable.
2865             :
2866           else
2867             ac_cv_path_install="$ac_dir/$ac_prog -c"
2868             break 2
2869           fi
2870         fi
2871       done
2872       ;;
2873     esac
2874   done
2875   IFS="$ac_save_IFS"
2876
2877   if test "${ac_cv_path_install+set}" = set; then
2878     INSTALL="$ac_cv_path_install"
2879   else
2880     # As a last resort, use the slow shell script.  We don't cache a
2881     # path for INSTALL within a source directory, because that will
2882     # break other packages using the cache if that directory is
2883     # removed, or if the path is relative.
2884     INSTALL="$ac_install_sh"
2885   fi
2886 fi
2887 echo "$ac_t""$INSTALL" 1>&6
2888
2889 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2890 # It thinks the first close brace ends the variable substitution.
2891 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2892
2893 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2894
2895 for ac_prog in 'bison -y' byacc
2896 do
2897 # Extract the first word of "$ac_prog", so it can be a program name with args.
2898 set dummy $ac_prog; ac_word=$2
2899 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2900 echo "configure:2901: checking for $ac_word" >&5
2901
2902 if test -n "$YACC"; then
2903   ac_cv_prog_YACC="$YACC" # Let the user override the test.
2904 else
2905   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2906   for ac_dir in $PATH; do
2907     test -z "$ac_dir" && ac_dir=.
2908     if test -f $ac_dir/$ac_word; then
2909       ac_cv_prog_YACC="$ac_prog"
2910       break
2911     fi
2912   done
2913   IFS="$ac_save_ifs"
2914 fi
2915 YACC="$ac_cv_prog_YACC"
2916 if test -n "$YACC"; then
2917   echo "$ac_t""$YACC" 1>&6
2918 else
2919   echo "$ac_t""no" 1>&6
2920 fi
2921
2922 test -n "$YACC" && break
2923 done
2924 test -n "$YACC" || YACC="yacc"
2925
2926
2927 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
2928 do
2929 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2930 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2931 echo "configure:2932: checking for $ac_hdr" >&5
2932
2933 cat > conftest.$ac_ext <<EOF
2934 #line 2935 "configure"
2935 #include "confdefs.h"
2936 #include <$ac_hdr>
2937 EOF
2938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2939 { (eval echo configure:2940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2940 ac_err=`grep -v '^ *+' conftest.out`
2941 if test -z "$ac_err"; then
2942   rm -rf conftest*
2943   eval "ac_cv_header_$ac_safe=yes"
2944 else
2945   echo "$ac_err" >&5
2946   echo "configure: failed program was:" >&5
2947   cat conftest.$ac_ext >&5
2948   rm -rf conftest*
2949   eval "ac_cv_header_$ac_safe=no"
2950 fi
2951 rm -f conftest*
2952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2953   echo "$ac_t""yes" 1>&6
2954     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2955   { test "$extra_verbose" = "yes" && cat << EOF
2956     Defining $ac_tr_hdr
2957 EOF
2958 cat >> confdefs.h <<EOF
2959 #define $ac_tr_hdr 1
2960 EOF
2961 }
2962  
2963 else
2964   echo "$ac_t""no" 1>&6
2965 fi
2966 done
2967
2968 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin32/version.h
2969 do
2970 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2971 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2972 echo "configure:2973: checking for $ac_hdr" >&5
2973
2974 cat > conftest.$ac_ext <<EOF
2975 #line 2976 "configure"
2976 #include "confdefs.h"
2977 #include <$ac_hdr>
2978 EOF
2979 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2980 { (eval echo configure:2981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2981 ac_err=`grep -v '^ *+' conftest.out`
2982 if test -z "$ac_err"; then
2983   rm -rf conftest*
2984   eval "ac_cv_header_$ac_safe=yes"
2985 else
2986   echo "$ac_err" >&5
2987   echo "configure: failed program was:" >&5
2988   cat conftest.$ac_ext >&5
2989   rm -rf conftest*
2990   eval "ac_cv_header_$ac_safe=no"
2991 fi
2992 rm -f conftest*
2993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2994   echo "$ac_t""yes" 1>&6
2995     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2996   { test "$extra_verbose" = "yes" && cat << EOF
2997     Defining $ac_tr_hdr
2998 EOF
2999 cat >> confdefs.h <<EOF
3000 #define $ac_tr_hdr 1
3001 EOF
3002 }
3003  
3004 else
3005   echo "$ac_t""no" 1>&6
3006 fi
3007 done
3008
3009 for ac_hdr in linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3010 do
3011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3013 echo "configure:3014: checking for $ac_hdr" >&5
3014
3015 cat > conftest.$ac_ext <<EOF
3016 #line 3017 "configure"
3017 #include "confdefs.h"
3018 #include <$ac_hdr>
3019 EOF
3020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3021 { (eval echo configure:3022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3022 ac_err=`grep -v '^ *+' conftest.out`
3023 if test -z "$ac_err"; then
3024   rm -rf conftest*
3025   eval "ac_cv_header_$ac_safe=yes"
3026 else
3027   echo "$ac_err" >&5
3028   echo "configure: failed program was:" >&5
3029   cat conftest.$ac_ext >&5
3030   rm -rf conftest*
3031   eval "ac_cv_header_$ac_safe=no"
3032 fi
3033 rm -f conftest*
3034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3035   echo "$ac_t""yes" 1>&6
3036     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3037   { test "$extra_verbose" = "yes" && cat << EOF
3038     Defining $ac_tr_hdr
3039 EOF
3040 cat >> confdefs.h <<EOF
3041 #define $ac_tr_hdr 1
3042 EOF
3043 }
3044  
3045 else
3046   echo "$ac_t""no" 1>&6
3047 fi
3048 done
3049
3050 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3051 echo "configure:3052: checking for sys/wait.h that is POSIX.1 compatible" >&5
3052
3053 cat > conftest.$ac_ext <<EOF
3054 #line 3055 "configure"
3055 #include "confdefs.h"
3056 #include <sys/types.h>
3057 #include <sys/wait.h>
3058 #ifndef WEXITSTATUS
3059 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3060 #endif
3061 #ifndef WIFEXITED
3062 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3063 #endif
3064 int main() {
3065 int s;
3066 wait (&s);
3067 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3068 ; return 0; }
3069 EOF
3070 if { (eval echo configure:3071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3071   rm -rf conftest*
3072   ac_cv_header_sys_wait_h=yes
3073 else
3074   echo "configure: failed program was:" >&5
3075   cat conftest.$ac_ext >&5
3076   rm -rf conftest*
3077   ac_cv_header_sys_wait_h=no
3078 fi
3079 rm -f conftest*
3080
3081 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3082 if test $ac_cv_header_sys_wait_h = yes; then
3083   { test "$extra_verbose" = "yes" && cat << \EOF
3084     Defining HAVE_SYS_WAIT_H
3085 EOF
3086 cat >> confdefs.h <<\EOF
3087 #define HAVE_SYS_WAIT_H 1
3088 EOF
3089 }
3090
3091 fi
3092
3093 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3094 echo "configure:3095: checking for ANSI C header files" >&5
3095
3096 cat > conftest.$ac_ext <<EOF
3097 #line 3098 "configure"
3098 #include "confdefs.h"
3099 #include <stdlib.h>
3100 #include <stdarg.h>
3101 #include <string.h>
3102 #include <float.h>
3103 EOF
3104 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3105 { (eval echo configure:3106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3106 ac_err=`grep -v '^ *+' conftest.out`
3107 if test -z "$ac_err"; then
3108   rm -rf conftest*
3109   ac_cv_header_stdc=yes
3110 else
3111   echo "$ac_err" >&5
3112   echo "configure: failed program was:" >&5
3113   cat conftest.$ac_ext >&5
3114   rm -rf conftest*
3115   ac_cv_header_stdc=no
3116 fi
3117 rm -f conftest*
3118
3119 if test $ac_cv_header_stdc = yes; then
3120   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3121 cat > conftest.$ac_ext <<EOF
3122 #line 3123 "configure"
3123 #include "confdefs.h"
3124 #include <string.h>
3125 EOF
3126 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3127   egrep "memchr" >/dev/null 2>&1; then
3128   :
3129 else
3130   rm -rf conftest*
3131   ac_cv_header_stdc=no
3132 fi
3133 rm -f conftest*
3134
3135 fi
3136
3137 if test $ac_cv_header_stdc = yes; then
3138   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3139 cat > conftest.$ac_ext <<EOF
3140 #line 3141 "configure"
3141 #include "confdefs.h"
3142 #include <stdlib.h>
3143 EOF
3144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3145   egrep "free" >/dev/null 2>&1; then
3146   :
3147 else
3148   rm -rf conftest*
3149   ac_cv_header_stdc=no
3150 fi
3151 rm -f conftest*
3152
3153 fi
3154
3155 if test $ac_cv_header_stdc = yes; then
3156   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3157 cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160 #include <ctype.h>
3161 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3162 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3163 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3164 int main () { int i; for (i = 0; i < 256; i++)
3165 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3166 exit (0); }
3167
3168 EOF
3169 if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3170 then
3171   :
3172 else
3173   conftest_rc="$?"
3174   echo "configure: failed program was:" >&5
3175   cat conftest.$ac_ext >&5
3176   rm -fr conftest*
3177   ac_cv_header_stdc=no
3178 fi
3179 rm -fr conftest*
3180 fi
3181
3182 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3183 if test $ac_cv_header_stdc = yes; then
3184   { test "$extra_verbose" = "yes" && cat << \EOF
3185     Defining STDC_HEADERS
3186 EOF
3187 cat >> confdefs.h <<\EOF
3188 #define STDC_HEADERS 1
3189 EOF
3190 }
3191
3192 fi
3193
3194 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3195 echo "configure:3196: checking whether time.h and sys/time.h may both be included" >&5
3196
3197 cat > conftest.$ac_ext <<EOF
3198 #line 3199 "configure"
3199 #include "confdefs.h"
3200 #include <sys/types.h>
3201 #include <sys/time.h>
3202 #include <time.h>
3203 int main() {
3204 struct tm *tp;
3205 ; return 0; }
3206 EOF
3207 if { (eval echo configure:3208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3208   rm -rf conftest*
3209   ac_cv_header_time=yes
3210 else
3211   echo "configure: failed program was:" >&5
3212   cat conftest.$ac_ext >&5
3213   rm -rf conftest*
3214   ac_cv_header_time=no
3215 fi
3216 rm -f conftest*
3217
3218 echo "$ac_t""$ac_cv_header_time" 1>&6
3219 if test $ac_cv_header_time = yes; then
3220   { test "$extra_verbose" = "yes" && cat << \EOF
3221     Defining TIME_WITH_SYS_TIME
3222 EOF
3223 cat >> confdefs.h <<\EOF
3224 #define TIME_WITH_SYS_TIME 1
3225 EOF
3226 }
3227
3228 fi
3229
3230 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3231 echo "configure:3232: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3232
3233 cat > conftest.$ac_ext <<EOF
3234 #line 3235 "configure"
3235 #include "confdefs.h"
3236 #include <sys/types.h>
3237 #include <signal.h>
3238 /* NetBSD declares sys_siglist in unistd.h.  */
3239 #ifdef HAVE_UNISTD_H
3240 #include <unistd.h>
3241 #endif
3242 int main() {
3243 char *msg = *(sys_siglist + 1);
3244 ; return 0; }
3245 EOF
3246 if { (eval echo configure:3247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3247   rm -rf conftest*
3248   ac_cv_decl_sys_siglist=yes
3249 else
3250   echo "configure: failed program was:" >&5
3251   cat conftest.$ac_ext >&5
3252   rm -rf conftest*
3253   ac_cv_decl_sys_siglist=no
3254 fi
3255 rm -f conftest*
3256
3257 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3258 if test $ac_cv_decl_sys_siglist = yes; then
3259   { test "$extra_verbose" = "yes" && cat << \EOF
3260     Defining SYS_SIGLIST_DECLARED
3261 EOF
3262 cat >> confdefs.h <<\EOF
3263 #define SYS_SIGLIST_DECLARED 1
3264 EOF
3265 }
3266
3267 fi
3268
3269
3270 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3271 echo "configure:3272: checking for struct utimbuf" >&5
3272 cat > conftest.$ac_ext <<EOF
3273 #line 3274 "configure"
3274 #include "confdefs.h"
3275 #ifdef TIME_WITH_SYS_TIME
3276 #include <sys/time.h>
3277 #include <time.h>
3278 #else
3279 #ifdef HAVE_SYS_TIME_H
3280 #include <sys/time.h>
3281 #else
3282 #include <time.h>
3283 #endif
3284 #endif
3285 #ifdef HAVE_UTIME_H
3286 #include <utime.h>
3287 #endif
3288 int main() {
3289 static struct utimbuf x; x.actime = x.modtime;
3290 ; return 0; }
3291 EOF
3292 if { (eval echo configure:3293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3293   rm -rf conftest*
3294   echo "$ac_t""yes" 1>&6
3295    { test "$extra_verbose" = "yes" && cat << \EOF
3296     Defining HAVE_STRUCT_UTIMBUF
3297 EOF
3298 cat >> confdefs.h <<\EOF
3299 #define HAVE_STRUCT_UTIMBUF 1
3300 EOF
3301 }
3302
3303 else
3304   echo "configure: failed program was:" >&5
3305   cat conftest.$ac_ext >&5
3306   rm -rf conftest*
3307   echo "$ac_t""no" 1>&6
3308 fi
3309 rm -f conftest*
3310
3311 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3312 echo "configure:3313: checking return type of signal handlers" >&5
3313
3314 cat > conftest.$ac_ext <<EOF
3315 #line 3316 "configure"
3316 #include "confdefs.h"
3317 #include <sys/types.h>
3318 #include <signal.h>
3319 #ifdef signal
3320 #undef signal
3321 #endif
3322 #ifdef __cplusplus
3323 extern "C" void (*signal (int, void (*)(int)))(int);
3324 #else
3325 void (*signal ()) ();
3326 #endif
3327
3328 int main() {
3329 int i;
3330 ; return 0; }
3331 EOF
3332 if { (eval echo configure:3333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3333   rm -rf conftest*
3334   ac_cv_type_signal=void
3335 else
3336   echo "configure: failed program was:" >&5
3337   cat conftest.$ac_ext >&5
3338   rm -rf conftest*
3339   ac_cv_type_signal=int
3340 fi
3341 rm -f conftest*
3342
3343 echo "$ac_t""$ac_cv_type_signal" 1>&6
3344 { test "$extra_verbose" = "yes" && cat << EOF
3345     Defining RETSIGTYPE = $ac_cv_type_signal
3346 EOF
3347 cat >> confdefs.h <<EOF
3348 #define RETSIGTYPE $ac_cv_type_signal
3349 EOF
3350 }
3351
3352
3353 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3354 echo "configure:3355: checking for size_t" >&5
3355
3356 cat > conftest.$ac_ext <<EOF
3357 #line 3358 "configure"
3358 #include "confdefs.h"
3359 #include <sys/types.h>
3360 #if STDC_HEADERS
3361 #include <stdlib.h>
3362 #include <stddef.h>
3363 #endif
3364 EOF
3365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3366   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3367   rm -rf conftest*
3368   ac_cv_type_size_t=yes
3369 else
3370   rm -rf conftest*
3371   ac_cv_type_size_t=no
3372 fi
3373 rm -f conftest*
3374
3375 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3376 if test $ac_cv_type_size_t = no; then
3377   { test "$extra_verbose" = "yes" && cat << \EOF
3378     Defining size_t = unsigned
3379 EOF
3380 cat >> confdefs.h <<\EOF
3381 #define size_t unsigned
3382 EOF
3383 }
3384
3385 fi
3386
3387 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3388 echo "configure:3389: checking for pid_t" >&5
3389
3390 cat > conftest.$ac_ext <<EOF
3391 #line 3392 "configure"
3392 #include "confdefs.h"
3393 #include <sys/types.h>
3394 #if STDC_HEADERS
3395 #include <stdlib.h>
3396 #include <stddef.h>
3397 #endif
3398 EOF
3399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3400   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3401   rm -rf conftest*
3402   ac_cv_type_pid_t=yes
3403 else
3404   rm -rf conftest*
3405   ac_cv_type_pid_t=no
3406 fi
3407 rm -f conftest*
3408
3409 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3410 if test $ac_cv_type_pid_t = no; then
3411   { test "$extra_verbose" = "yes" && cat << \EOF
3412     Defining pid_t = int
3413 EOF
3414 cat >> confdefs.h <<\EOF
3415 #define pid_t int
3416 EOF
3417 }
3418
3419 fi
3420
3421 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3422 echo "configure:3423: checking for uid_t in sys/types.h" >&5
3423
3424 cat > conftest.$ac_ext <<EOF
3425 #line 3426 "configure"
3426 #include "confdefs.h"
3427 #include <sys/types.h>
3428 EOF
3429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3430   egrep "uid_t" >/dev/null 2>&1; then
3431   rm -rf conftest*
3432   ac_cv_type_uid_t=yes
3433 else
3434   rm -rf conftest*
3435   ac_cv_type_uid_t=no
3436 fi
3437 rm -f conftest*
3438
3439
3440 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3441 if test $ac_cv_type_uid_t = no; then
3442   { test "$extra_verbose" = "yes" && cat << \EOF
3443     Defining uid_t = int
3444 EOF
3445 cat >> confdefs.h <<\EOF
3446 #define uid_t int
3447 EOF
3448 }
3449
3450   { test "$extra_verbose" = "yes" && cat << \EOF
3451     Defining gid_t = int
3452 EOF
3453 cat >> confdefs.h <<\EOF
3454 #define gid_t int
3455 EOF
3456 }
3457
3458 fi
3459
3460 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3461 echo "configure:3462: checking for mode_t" >&5
3462
3463 cat > conftest.$ac_ext <<EOF
3464 #line 3465 "configure"
3465 #include "confdefs.h"
3466 #include <sys/types.h>
3467 #if STDC_HEADERS
3468 #include <stdlib.h>
3469 #include <stddef.h>
3470 #endif
3471 EOF
3472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3473   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3474   rm -rf conftest*
3475   ac_cv_type_mode_t=yes
3476 else
3477   rm -rf conftest*
3478   ac_cv_type_mode_t=no
3479 fi
3480 rm -f conftest*
3481
3482 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3483 if test $ac_cv_type_mode_t = no; then
3484   { test "$extra_verbose" = "yes" && cat << \EOF
3485     Defining mode_t = int
3486 EOF
3487 cat >> confdefs.h <<\EOF
3488 #define mode_t int
3489 EOF
3490 }
3491
3492 fi
3493
3494 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3495 echo "configure:3496: checking for off_t" >&5
3496
3497 cat > conftest.$ac_ext <<EOF
3498 #line 3499 "configure"
3499 #include "confdefs.h"
3500 #include <sys/types.h>
3501 #if STDC_HEADERS
3502 #include <stdlib.h>
3503 #include <stddef.h>
3504 #endif
3505 EOF
3506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3507   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3508   rm -rf conftest*
3509   ac_cv_type_off_t=yes
3510 else
3511   rm -rf conftest*
3512   ac_cv_type_off_t=no
3513 fi
3514 rm -f conftest*
3515
3516 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3517 if test $ac_cv_type_off_t = no; then
3518   { test "$extra_verbose" = "yes" && cat << \EOF
3519     Defining off_t = long
3520 EOF
3521 cat >> confdefs.h <<\EOF
3522 #define off_t long
3523 EOF
3524 }
3525
3526 fi
3527
3528
3529 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3530 echo "configure:3531: checking for struct timeval" >&5
3531 cat > conftest.$ac_ext <<EOF
3532 #line 3533 "configure"
3533 #include "confdefs.h"
3534 #ifdef TIME_WITH_SYS_TIME
3535 #include <sys/time.h>
3536 #include <time.h>
3537 #else
3538 #ifdef HAVE_SYS_TIME_H
3539 #include <sys/time.h>
3540 #else
3541 #include <time.h>
3542 #endif
3543 #endif
3544 int main() {
3545 static struct timeval x; x.tv_sec = x.tv_usec;
3546 ; return 0; }
3547 EOF
3548 if { (eval echo configure:3549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3549   rm -rf conftest*
3550   echo "$ac_t""yes" 1>&6
3551   HAVE_TIMEVAL=yes
3552   { test "$extra_verbose" = "yes" && cat << \EOF
3553     Defining HAVE_TIMEVAL
3554 EOF
3555 cat >> confdefs.h <<\EOF
3556 #define HAVE_TIMEVAL 1
3557 EOF
3558 }
3559
3560 else
3561   echo "configure: failed program was:" >&5
3562   cat conftest.$ac_ext >&5
3563   rm -rf conftest*
3564   echo "$ac_t""no" 1>&6
3565    HAVE_TIMEVAL=no
3566 fi
3567 rm -f conftest*
3568
3569 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3570 echo "configure:3571: checking whether struct tm is in sys/time.h or time.h" >&5
3571
3572 cat > conftest.$ac_ext <<EOF
3573 #line 3574 "configure"
3574 #include "confdefs.h"
3575 #include <sys/types.h>
3576 #include <time.h>
3577 int main() {
3578 struct tm *tp; tp->tm_sec;
3579 ; return 0; }
3580 EOF
3581 if { (eval echo configure:3582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3582   rm -rf conftest*
3583   ac_cv_struct_tm=time.h
3584 else
3585   echo "configure: failed program was:" >&5
3586   cat conftest.$ac_ext >&5
3587   rm -rf conftest*
3588   ac_cv_struct_tm=sys/time.h
3589 fi
3590 rm -f conftest*
3591
3592 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3593 if test $ac_cv_struct_tm = sys/time.h; then
3594   { test "$extra_verbose" = "yes" && cat << \EOF
3595     Defining TM_IN_SYS_TIME
3596 EOF
3597 cat >> confdefs.h <<\EOF
3598 #define TM_IN_SYS_TIME 1
3599 EOF
3600 }
3601
3602 fi
3603
3604 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3605 echo "configure:3606: checking for tm_zone in struct tm" >&5
3606
3607 cat > conftest.$ac_ext <<EOF
3608 #line 3609 "configure"
3609 #include "confdefs.h"
3610 #include <sys/types.h>
3611 #include <$ac_cv_struct_tm>
3612 int main() {
3613 struct tm tm; tm.tm_zone;
3614 ; return 0; }
3615 EOF
3616 if { (eval echo configure:3617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3617   rm -rf conftest*
3618   ac_cv_struct_tm_zone=yes
3619 else
3620   echo "configure: failed program was:" >&5
3621   cat conftest.$ac_ext >&5
3622   rm -rf conftest*
3623   ac_cv_struct_tm_zone=no
3624 fi
3625 rm -f conftest*
3626
3627 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3628 if test "$ac_cv_struct_tm_zone" = yes; then
3629   { test "$extra_verbose" = "yes" && cat << \EOF
3630     Defining HAVE_TM_ZONE
3631 EOF
3632 cat >> confdefs.h <<\EOF
3633 #define HAVE_TM_ZONE 1
3634 EOF
3635 }
3636
3637 else
3638   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3639 echo "configure:3640: checking for tzname" >&5
3640
3641 cat > conftest.$ac_ext <<EOF
3642 #line 3643 "configure"
3643 #include "confdefs.h"
3644 #include <time.h>
3645 #ifndef tzname /* For SGI.  */
3646 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3647 #endif
3648 int main() {
3649 atoi(*tzname);
3650 ; return 0; }
3651 EOF
3652 if { (eval echo configure:3653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3653   rm -rf conftest*
3654   ac_cv_var_tzname=yes
3655 else
3656   echo "configure: failed program was:" >&5
3657   cat conftest.$ac_ext >&5
3658   rm -rf conftest*
3659   ac_cv_var_tzname=no
3660 fi
3661 rm -f conftest*
3662
3663 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3664   if test $ac_cv_var_tzname = yes; then
3665     { test "$extra_verbose" = "yes" && cat << \EOF
3666     Defining HAVE_TZNAME
3667 EOF
3668 cat >> confdefs.h <<\EOF
3669 #define HAVE_TZNAME 1
3670 EOF
3671 }
3672
3673   fi
3674 fi
3675
3676
3677 echo $ac_n "checking for working const""... $ac_c" 1>&6
3678 echo "configure:3679: checking for working const" >&5
3679
3680 cat > conftest.$ac_ext <<EOF
3681 #line 3682 "configure"
3682 #include "confdefs.h"
3683
3684 int main() {
3685
3686 /* Ultrix mips cc rejects this.  */
3687 typedef int charset[2]; const charset x;
3688 /* SunOS 4.1.1 cc rejects this.  */
3689 char const *const *ccp;
3690 char **p;
3691 /* NEC SVR4.0.2 mips cc rejects this.  */
3692 struct point {int x, y;};
3693 static struct point const zero = {0,0};
3694 /* AIX XL C 1.02.0.0 rejects this.
3695    It does not let you subtract one const X* pointer from another in an arm
3696    of an if-expression whose if-part is not a constant expression */
3697 const char *g = "string";
3698 ccp = &g + (g ? g-g : 0);
3699 /* HPUX 7.0 cc rejects these. */
3700 ++ccp;
3701 p = (char**) ccp;
3702 ccp = (char const *const *) p;
3703 { /* SCO 3.2v4 cc rejects this.  */
3704   char *t;
3705   char const *s = 0 ? (char *) 0 : (char const *) 0;
3706
3707   *t++ = 0;
3708 }
3709 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3710   int x[] = {25, 17};
3711   const int *foo = &x[0];
3712   ++foo;
3713 }
3714 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3715   typedef const int *iptr;
3716   iptr p = 0;
3717   ++p;
3718 }
3719 { /* AIX XL C 1.02.0.0 rejects this saying
3720      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3721   struct s { int j; const int *ap[3]; };
3722   struct s *b; b->j = 5;
3723 }
3724 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3725   const int foo = 10;
3726 }
3727
3728 ; return 0; }
3729 EOF
3730 if { (eval echo configure:3731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3731   rm -rf conftest*
3732   ac_cv_c_const=yes
3733 else
3734   echo "configure: failed program was:" >&5
3735   cat conftest.$ac_ext >&5
3736   rm -rf conftest*
3737   ac_cv_c_const=no
3738 fi
3739 rm -f conftest*
3740
3741 echo "$ac_t""$ac_cv_c_const" 1>&6
3742 if test $ac_cv_c_const = no; then
3743   { test "$extra_verbose" = "yes" && cat << \EOF
3744     Defining const = 
3745 EOF
3746 cat >> confdefs.h <<\EOF
3747 #define const 
3748 EOF
3749 }
3750
3751 fi
3752
3753
3754 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3755 echo "configure:3756: checking whether ${MAKE-make} sets \${MAKE}" >&5
3756 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3757
3758 cat > conftestmake <<\EOF
3759 all:
3760         @echo 'ac_maketemp="${MAKE}"'
3761 EOF
3762 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3763 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3764 if test -n "$ac_maketemp"; then
3765   eval ac_cv_prog_make_${ac_make}_set=yes
3766 else
3767   eval ac_cv_prog_make_${ac_make}_set=no
3768 fi
3769 rm -f conftestmake
3770 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3771   echo "$ac_t""yes" 1>&6
3772   SET_MAKE=
3773 else
3774   echo "$ac_t""no" 1>&6
3775   SET_MAKE="MAKE=${MAKE-make}"
3776 fi
3777
3778
3779 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3780 echo "configure:3781: checking whether byte ordering is bigendian" >&5
3781
3782 ac_cv_c_bigendian=unknown
3783 # See if sys/param.h defines the BYTE_ORDER macro.
3784 cat > conftest.$ac_ext <<EOF
3785 #line 3786 "configure"
3786 #include "confdefs.h"
3787 #include <sys/types.h>
3788 #include <sys/param.h>
3789 int main() {
3790
3791 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3792  bogus endian macros
3793 #endif
3794 ; return 0; }
3795 EOF
3796 if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3797   rm -rf conftest*
3798   # It does; now see whether it defined to BIG_ENDIAN or not.
3799 cat > conftest.$ac_ext <<EOF
3800 #line 3801 "configure"
3801 #include "confdefs.h"
3802 #include <sys/types.h>
3803 #include <sys/param.h>
3804 int main() {
3805
3806 #if BYTE_ORDER != BIG_ENDIAN
3807  not big endian
3808 #endif
3809 ; return 0; }
3810 EOF
3811 if { (eval echo configure:3812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3812   rm -rf conftest*
3813   ac_cv_c_bigendian=yes
3814 else
3815   echo "configure: failed program was:" >&5
3816   cat conftest.$ac_ext >&5
3817   rm -rf conftest*
3818   ac_cv_c_bigendian=no
3819 fi
3820 rm -f conftest*
3821 else
3822   echo "configure: failed program was:" >&5
3823   cat conftest.$ac_ext >&5
3824 fi
3825 rm -f conftest*
3826 if test $ac_cv_c_bigendian = unknown; then
3827 cat > conftest.$ac_ext <<EOF
3828 #line 3829 "configure"
3829 #include "confdefs.h"
3830 main () {
3831   /* Are we little or big endian?  From Harbison&Steele.  */
3832   union
3833   {
3834     long l;
3835     char c[sizeof (long)];
3836   } u;
3837   u.l = 1;
3838   exit (u.c[sizeof (long) - 1] == 1);
3839 }
3840 EOF
3841 if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3842 then
3843   ac_cv_c_bigendian=no
3844 else
3845   conftest_rc="$?"
3846   echo "configure: failed program was:" >&5
3847   cat conftest.$ac_ext >&5
3848   rm -fr conftest*
3849   ac_cv_c_bigendian=yes
3850 fi
3851 rm -fr conftest*
3852 fi
3853
3854 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3855 if test $ac_cv_c_bigendian = yes; then
3856   { test "$extra_verbose" = "yes" && cat << \EOF
3857     Defining WORDS_BIGENDIAN
3858 EOF
3859 cat >> confdefs.h <<\EOF
3860 #define WORDS_BIGENDIAN 1
3861 EOF
3862 }
3863
3864 fi
3865
3866
3867 echo $ac_n "checking size of short""... $ac_c" 1>&6
3868 echo "configure:3869: checking size of short" >&5
3869
3870 cat > conftest.$ac_ext <<EOF
3871 #line 3872 "configure"
3872 #include "confdefs.h"
3873 #include <stdio.h>
3874 main()
3875 {
3876   FILE *f=fopen("conftestval", "w");
3877   if (!f) exit(1);
3878   fprintf(f, "%d\n", sizeof(short));
3879   exit(0);
3880 }
3881 EOF
3882 if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3883 then
3884   ac_cv_sizeof_short=`cat conftestval`
3885 else
3886   conftest_rc="$?"
3887   echo "configure: failed program was:" >&5
3888   cat conftest.$ac_ext >&5
3889   rm -fr conftest*
3890   ac_cv_sizeof_short=0
3891 fi
3892 rm -fr conftest*
3893 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3894 { test "$extra_verbose" = "yes" && cat << EOF
3895     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
3896 EOF
3897 cat >> confdefs.h <<EOF
3898 #define SIZEOF_SHORT $ac_cv_sizeof_short
3899 EOF
3900 }
3901
3902
3903 if test "$ac_cv_sizeof_short" = 0; then
3904   echo ""
3905   echo "*** PANIC *** Configure tests are not working - compiler is broken."
3906   echo "*** PANIC *** Please examine config.log for compilation errors."
3907   exit 1
3908 fi
3909 echo $ac_n "checking size of int""... $ac_c" 1>&6
3910 echo "configure:3911: checking size of int" >&5
3911
3912 cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915 #include <stdio.h>
3916 main()
3917 {
3918   FILE *f=fopen("conftestval", "w");
3919   if (!f) exit(1);
3920   fprintf(f, "%d\n", sizeof(int));
3921   exit(0);
3922 }
3923 EOF
3924 if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3925 then
3926   ac_cv_sizeof_int=`cat conftestval`
3927 else
3928   conftest_rc="$?"
3929   echo "configure: failed program was:" >&5
3930   cat conftest.$ac_ext >&5
3931   rm -fr conftest*
3932   ac_cv_sizeof_int=0
3933 fi
3934 rm -fr conftest*
3935 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3936 { test "$extra_verbose" = "yes" && cat << EOF
3937     Defining SIZEOF_INT = $ac_cv_sizeof_int
3938 EOF
3939 cat >> confdefs.h <<EOF
3940 #define SIZEOF_INT $ac_cv_sizeof_int
3941 EOF
3942 }
3943
3944
3945 echo $ac_n "checking size of long""... $ac_c" 1>&6
3946 echo "configure:3947: checking size of long" >&5
3947
3948 cat > conftest.$ac_ext <<EOF
3949 #line 3950 "configure"
3950 #include "confdefs.h"
3951 #include <stdio.h>
3952 main()
3953 {
3954   FILE *f=fopen("conftestval", "w");
3955   if (!f) exit(1);
3956   fprintf(f, "%d\n", sizeof(long));
3957   exit(0);
3958 }
3959 EOF
3960 if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3961 then
3962   ac_cv_sizeof_long=`cat conftestval`
3963 else
3964   conftest_rc="$?"
3965   echo "configure: failed program was:" >&5
3966   cat conftest.$ac_ext >&5
3967   rm -fr conftest*
3968   ac_cv_sizeof_long=0
3969 fi
3970 rm -fr conftest*
3971 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3972 { test "$extra_verbose" = "yes" && cat << EOF
3973     Defining SIZEOF_LONG = $ac_cv_sizeof_long
3974 EOF
3975 cat >> confdefs.h <<EOF
3976 #define SIZEOF_LONG $ac_cv_sizeof_long
3977 EOF
3978 }
3979
3980
3981 echo $ac_n "checking size of long long""... $ac_c" 1>&6
3982 echo "configure:3983: checking size of long long" >&5
3983
3984 cat > conftest.$ac_ext <<EOF
3985 #line 3986 "configure"
3986 #include "confdefs.h"
3987 #include <stdio.h>
3988 main()
3989 {
3990   FILE *f=fopen("conftestval", "w");
3991   if (!f) exit(1);
3992   fprintf(f, "%d\n", sizeof(long long));
3993   exit(0);
3994 }
3995 EOF
3996 if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3997 then
3998   ac_cv_sizeof_long_long=`cat conftestval`
3999 else
4000   conftest_rc="$?"
4001   echo "configure: failed program was:" >&5
4002   cat conftest.$ac_ext >&5
4003   rm -fr conftest*
4004   ac_cv_sizeof_long_long=0
4005 fi
4006 rm -fr conftest*
4007 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4008 { test "$extra_verbose" = "yes" && cat << EOF
4009     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4010 EOF
4011 cat >> confdefs.h <<EOF
4012 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4013 EOF
4014 }
4015
4016
4017 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4018 echo "configure:4019: checking size of void *" >&5
4019
4020 cat > conftest.$ac_ext <<EOF
4021 #line 4022 "configure"
4022 #include "confdefs.h"
4023 #include <stdio.h>
4024 main()
4025 {
4026   FILE *f=fopen("conftestval", "w");
4027   if (!f) exit(1);
4028   fprintf(f, "%d\n", sizeof(void *));
4029   exit(0);
4030 }
4031 EOF
4032 if { (eval echo configure:4033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4033 then
4034   ac_cv_sizeof_void_p=`cat conftestval`
4035 else
4036   conftest_rc="$?"
4037   echo "configure: failed program was:" >&5
4038   cat conftest.$ac_ext >&5
4039   rm -fr conftest*
4040   ac_cv_sizeof_void_p=0
4041 fi
4042 rm -fr conftest*
4043 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4044 { test "$extra_verbose" = "yes" && cat << EOF
4045     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4046 EOF
4047 cat >> confdefs.h <<EOF
4048 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4049 EOF
4050 }
4051
4052
4053
4054 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4055 echo "configure:4056: checking for long file names" >&5
4056
4057 ac_cv_sys_long_file_names=yes
4058 # Test for long file names in all the places we know might matter:
4059 #      .                the current directory, where building will happen
4060 #      $prefix/lib      where we will be installing things
4061 #      $exec_prefix/lib likewise
4062 # eval it to expand exec_prefix.
4063 #      $TMPDIR          if set, where it might want to write temporary files
4064 # if $TMPDIR is not set:
4065 #      /tmp             where it might want to write temporary files
4066 #      /var/tmp         likewise
4067 #      /usr/tmp         likewise
4068 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4069   ac_tmpdirs="$TMPDIR"
4070 else
4071   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4072 fi
4073 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4074   test -d $ac_dir || continue
4075   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4076   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4077   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4078   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4079   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4080     ac_cv_sys_long_file_names=no
4081     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4082     break
4083   fi
4084   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4085 done
4086
4087 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4088 if test $ac_cv_sys_long_file_names = yes; then
4089   { test "$extra_verbose" = "yes" && cat << \EOF
4090     Defining HAVE_LONG_FILE_NAMES
4091 EOF
4092 cat >> confdefs.h <<\EOF
4093 #define HAVE_LONG_FILE_NAMES 1
4094 EOF
4095 }
4096
4097 fi
4098
4099
4100
4101 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4102 echo "configure:4103: checking for sin in -lm" >&5
4103 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4104
4105 xe_check_libs=" -lm "
4106 cat > conftest.$ac_ext <<EOF
4107 #line 4108 "configure"
4108 #include "confdefs.h"
4109 /* Override any gcc2 internal prototype to avoid an error.  */
4110 /* We use char because int might match the return type of a gcc2
4111     builtin and then its argument prototype would still apply.  */
4112 char sin();
4113
4114 int main() {
4115 sin()
4116 ; return 0; }
4117 EOF
4118 if { (eval echo configure:4119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4119   rm -rf conftest*
4120   eval "ac_cv_lib_$ac_lib_var=yes"
4121 else
4122   echo "configure: failed program was:" >&5
4123   cat conftest.$ac_ext >&5
4124   rm -rf conftest*
4125   eval "ac_cv_lib_$ac_lib_var=no"
4126 fi
4127 rm -f conftest*
4128 xe_check_libs=""
4129
4130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4131   echo "$ac_t""yes" 1>&6
4132     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4133     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4134   { test "$extra_verbose" = "yes" && cat << EOF
4135     Defining $ac_tr_lib
4136 EOF
4137 cat >> confdefs.h <<EOF
4138 #define $ac_tr_lib 1
4139 EOF
4140 }
4141
4142   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4143
4144 else
4145   echo "$ac_t""no" 1>&6
4146 fi
4147
4148
4149
4150 { test "$extra_verbose" = "yes" && cat << \EOF
4151     Defining LISP_FLOAT_TYPE
4152 EOF
4153 cat >> confdefs.h <<\EOF
4154 #define LISP_FLOAT_TYPE 1
4155 EOF
4156 }
4157
4158
4159 cat > conftest.$ac_ext <<EOF
4160 #line 4161 "configure"
4161 #include "confdefs.h"
4162 #include <math.h>
4163 int main() {
4164 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4165 ; return 0; }
4166 EOF
4167 if { (eval echo configure:4168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4168   rm -rf conftest*
4169   { test "$extra_verbose" = "yes" && cat << \EOF
4170     Defining HAVE_INVERSE_HYPERBOLIC
4171 EOF
4172 cat >> confdefs.h <<\EOF
4173 #define HAVE_INVERSE_HYPERBOLIC 1
4174 EOF
4175 }
4176
4177 else
4178   echo "configure: failed program was:" >&5
4179   cat conftest.$ac_ext >&5
4180 fi
4181 rm -f conftest*
4182
4183 echo "checking type of mail spool file locking" 1>&6
4184 echo "configure:4185: checking type of mail spool file locking" >&5
4185 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4186 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4187 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4188     Defining REAL_MAIL_USE_LOCKF
4189 EOF
4190 cat >> confdefs.h <<\EOF
4191 #define REAL_MAIL_USE_LOCKF 1
4192 EOF
4193 }
4194
4195 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4196     Defining REAL_MAIL_USE_FLOCK
4197 EOF
4198 cat >> confdefs.h <<\EOF
4199 #define REAL_MAIL_USE_FLOCK 1
4200 EOF
4201 }
4202
4203 else mail_locking="dot-locking"
4204 fi
4205
4206
4207 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
4208 echo "configure:4209: checking for kstat_open in -lkstat" >&5
4209 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
4210
4211 xe_check_libs=" -lkstat "
4212 cat > conftest.$ac_ext <<EOF
4213 #line 4214 "configure"
4214 #include "confdefs.h"
4215 /* Override any gcc2 internal prototype to avoid an error.  */
4216 /* We use char because int might match the return type of a gcc2
4217     builtin and then its argument prototype would still apply.  */
4218 char kstat_open();
4219
4220 int main() {
4221 kstat_open()
4222 ; return 0; }
4223 EOF
4224 if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4225   rm -rf conftest*
4226   eval "ac_cv_lib_$ac_lib_var=yes"
4227 else
4228   echo "configure: failed program was:" >&5
4229   cat conftest.$ac_ext >&5
4230   rm -rf conftest*
4231   eval "ac_cv_lib_$ac_lib_var=no"
4232 fi
4233 rm -f conftest*
4234 xe_check_libs=""
4235
4236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4237   echo "$ac_t""yes" 1>&6
4238     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4239     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4240   { test "$extra_verbose" = "yes" && cat << EOF
4241     Defining $ac_tr_lib
4242 EOF
4243 cat >> confdefs.h <<EOF
4244 #define $ac_tr_lib 1
4245 EOF
4246 }
4247
4248   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
4249
4250 else
4251   echo "$ac_t""no" 1>&6
4252 fi
4253
4254
4255
4256
4257 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
4258 echo "configure:4259: checking for kvm_read in -lkvm" >&5
4259 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
4260
4261 xe_check_libs=" -lkvm "
4262 cat > conftest.$ac_ext <<EOF
4263 #line 4264 "configure"
4264 #include "confdefs.h"
4265 /* Override any gcc2 internal prototype to avoid an error.  */
4266 /* We use char because int might match the return type of a gcc2
4267     builtin and then its argument prototype would still apply.  */
4268 char kvm_read();
4269
4270 int main() {
4271 kvm_read()
4272 ; return 0; }
4273 EOF
4274 if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4275   rm -rf conftest*
4276   eval "ac_cv_lib_$ac_lib_var=yes"
4277 else
4278   echo "configure: failed program was:" >&5
4279   cat conftest.$ac_ext >&5
4280   rm -rf conftest*
4281   eval "ac_cv_lib_$ac_lib_var=no"
4282 fi
4283 rm -f conftest*
4284 xe_check_libs=""
4285
4286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4287   echo "$ac_t""yes" 1>&6
4288     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4289     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4290   { test "$extra_verbose" = "yes" && cat << EOF
4291     Defining $ac_tr_lib
4292 EOF
4293 cat >> confdefs.h <<EOF
4294 #define $ac_tr_lib 1
4295 EOF
4296 }
4297
4298   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
4299
4300 else
4301   echo "$ac_t""no" 1>&6
4302 fi
4303
4304
4305
4306 case "$opsys" in decosf*)
4307   
4308 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4309 echo "configure:4310: checking for cma_open in -lpthreads" >&5
4310 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4311
4312 xe_check_libs=" -lpthreads "
4313 cat > conftest.$ac_ext <<EOF
4314 #line 4315 "configure"
4315 #include "confdefs.h"
4316 /* Override any gcc2 internal prototype to avoid an error.  */
4317 /* We use char because int might match the return type of a gcc2
4318     builtin and then its argument prototype would still apply.  */
4319 char cma_open();
4320
4321 int main() {
4322 cma_open()
4323 ; return 0; }
4324 EOF
4325 if { (eval echo configure:4326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4326   rm -rf conftest*
4327   eval "ac_cv_lib_$ac_lib_var=yes"
4328 else
4329   echo "configure: failed program was:" >&5
4330   cat conftest.$ac_ext >&5
4331   rm -rf conftest*
4332   eval "ac_cv_lib_$ac_lib_var=no"
4333 fi
4334 rm -f conftest*
4335 xe_check_libs=""
4336
4337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4338   echo "$ac_t""yes" 1>&6
4339     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4340     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4341   { test "$extra_verbose" = "yes" && cat << EOF
4342     Defining $ac_tr_lib
4343 EOF
4344 cat >> confdefs.h <<EOF
4345 #define $ac_tr_lib 1
4346 EOF
4347 }
4348
4349   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4350
4351 else
4352   echo "$ac_t""no" 1>&6
4353 fi
4354
4355
4356   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4357     c_switch_site="$c_switch_site -threads" ;;
4358 esac
4359
4360 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4361 echo "configure:4362: checking whether the -xildoff compiler flag is required" >&5
4362 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4363   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4364     then echo "$ac_t""no" 1>&6;
4365     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
4366   fi
4367   else echo "$ac_t""no" 1>&6
4368 fi
4369
4370 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4371   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4372 echo "configure:4373: checking for \"-z ignore\" linker flag" >&5
4373   case "`ld -h 2>&1`" in
4374     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4375       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4376     *) echo "$ac_t""no" 1>&6 ;;
4377   esac
4378 fi
4379
4380
4381 echo "checking "for specified window system"" 1>&6
4382 echo "configure:4383: checking "for specified window system"" >&5
4383
4384 if test "$with_x11" != "no"; then
4385     test "$x_includes $x_libraries" != "NONE NONE" && \
4386    window_system=x11 with_x11=yes
4387
4388         
4389       if test "$x_includes $x_libraries" = "NONE NONE" \
4390     -a -n "$OPENWINHOME" \
4391     -a "$OPENWINHOME" != "/usr/openwin" \
4392     -a -d "$OPENWINHOME"; then
4393       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4394       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4395       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4396   fi
4397
4398   if test "$x_includes" = "NONE"; then
4399                     for dir in "/usr/X11" "/usr/X11R6"; do
4400       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4401     done
4402   fi
4403
4404   if test "$x_libraries" = "NONE"; then
4405     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4406       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4407     done
4408   fi
4409
4410   # If we find X, set shell vars x_includes and x_libraries to the
4411 # paths, otherwise set no_x=yes.
4412 # Uses ac_ vars as temps to allow command line to override cache and checks.
4413 # --without-x overrides everything else, but does not touch the cache.
4414 echo $ac_n "checking for X""... $ac_c" 1>&6
4415 echo "configure:4416: checking for X" >&5
4416
4417 # Check whether --with-x or --without-x was given.
4418 if test "${with_x+set}" = set; then
4419   withval="$with_x"
4420   :
4421 fi
4422
4423 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4424 if test "x$with_x" = xno; then
4425   # The user explicitly disabled X.
4426   have_x=disabled
4427 else
4428   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4429     # Both variables are already set.
4430     have_x=yes
4431   else
4432
4433 # One or both of the vars are not set, and there is no cached value.
4434 ac_x_includes=NO ac_x_libraries=NO
4435 rm -fr conftestdir
4436 if mkdir conftestdir; then
4437   cd conftestdir
4438   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4439   cat > Imakefile <<'EOF'
4440 acfindx:
4441         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4442 EOF
4443   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4444     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4445     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4446     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4447     for ac_extension in a so sl; do
4448       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4449         test -f $ac_im_libdir/libX11.$ac_extension; then
4450         ac_im_usrlibdir=$ac_im_libdir; break
4451       fi
4452     done
4453     # Screen out bogus values from the imake configuration.  They are
4454     # bogus both because they are the default anyway, and because
4455     # using them would break gcc on systems where it needs fixed includes.
4456     case "$ac_im_incroot" in
4457         /usr/include) ;;
4458         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4459     esac
4460     case "$ac_im_usrlibdir" in
4461         /usr/lib | /lib) ;;
4462         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4463     esac
4464   fi
4465   cd ..
4466   rm -fr conftestdir
4467 fi
4468
4469 if test "$ac_x_includes" = NO; then
4470   # Guess where to find include files, by looking for this one X11 .h file.
4471   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4472
4473   # First, try using that file with no special directory specified.
4474 cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477 #include <$x_direct_test_include>
4478 EOF
4479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4480 { (eval echo configure:4481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4481 ac_err=`grep -v '^ *+' conftest.out`
4482 if test -z "$ac_err"; then
4483   rm -rf conftest*
4484   # We can compile using X headers with no special include directory.
4485 ac_x_includes=
4486 else
4487   echo "$ac_err" >&5
4488   echo "configure: failed program was:" >&5
4489   cat conftest.$ac_ext >&5
4490   rm -rf conftest*
4491   # Look for the header file in a standard set of common directories.
4492 # Check X11 before X11Rn because it is often a symlink to the current release.
4493   for ac_dir in               \
4494     /usr/X11/include          \
4495     /usr/X11R6/include        \
4496     /usr/X11R5/include        \
4497     /usr/X11R4/include        \
4498                               \
4499     /usr/include/X11          \
4500     /usr/include/X11R6        \
4501     /usr/include/X11R5        \
4502     /usr/include/X11R4        \
4503                               \
4504     /usr/local/X11/include    \
4505     /usr/local/X11R6/include  \
4506     /usr/local/X11R5/include  \
4507     /usr/local/X11R4/include  \
4508                               \
4509     /usr/local/include/X11    \
4510     /usr/local/include/X11R6  \
4511     /usr/local/include/X11R5  \
4512     /usr/local/include/X11R4  \
4513                               \
4514     /usr/X386/include         \
4515     /usr/x386/include         \
4516     /usr/XFree86/include/X11  \
4517                               \
4518     /usr/include              \
4519     /usr/local/include        \
4520     /usr/unsupported/include  \
4521     /usr/athena/include       \
4522     /usr/local/x11r5/include  \
4523     /usr/lpp/Xamples/include  \
4524                               \
4525     /usr/openwin/include      \
4526     /usr/openwin/share/include \
4527     ; \
4528   do
4529     if test -r "$ac_dir/$x_direct_test_include"; then
4530       ac_x_includes=$ac_dir
4531       break
4532     fi
4533   done
4534 fi
4535 rm -f conftest*
4536 fi # $ac_x_includes = NO
4537
4538 if test "$ac_x_libraries" = NO; then
4539   # Check for the libraries.
4540
4541   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4542   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4543
4544   # See if we find them without any special options.
4545   # Don't add to $LIBS permanently.
4546   ac_save_LIBS="$LIBS"
4547   LIBS="-l$x_direct_test_library $LIBS"
4548 cat > conftest.$ac_ext <<EOF
4549 #line 4550 "configure"
4550 #include "confdefs.h"
4551
4552 int main() {
4553 ${x_direct_test_function}()
4554 ; return 0; }
4555 EOF
4556 if { (eval echo configure:4557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4557   rm -rf conftest*
4558   LIBS="$ac_save_LIBS"
4559 # We can link X programs with no special library path.
4560 ac_x_libraries=
4561 else
4562   echo "configure: failed program was:" >&5
4563   cat conftest.$ac_ext >&5
4564   rm -rf conftest*
4565   LIBS="$ac_save_LIBS"
4566 # First see if replacing the include by lib works.
4567 # Check X11 before X11Rn because it is often a symlink to the current release.
4568 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4569     /usr/X11/lib          \
4570     /usr/X11R6/lib        \
4571     /usr/X11R5/lib        \
4572     /usr/X11R4/lib        \
4573                           \
4574     /usr/lib/X11          \
4575     /usr/lib/X11R6        \
4576     /usr/lib/X11R5        \
4577     /usr/lib/X11R4        \
4578                           \
4579     /usr/local/X11/lib    \
4580     /usr/local/X11R6/lib  \
4581     /usr/local/X11R5/lib  \
4582     /usr/local/X11R4/lib  \
4583                           \
4584     /usr/local/lib/X11    \
4585     /usr/local/lib/X11R6  \
4586     /usr/local/lib/X11R5  \
4587     /usr/local/lib/X11R4  \
4588                           \
4589     /usr/X386/lib         \
4590     /usr/x386/lib         \
4591     /usr/XFree86/lib/X11  \
4592                           \
4593     /usr/lib              \
4594     /usr/local/lib        \
4595     /usr/unsupported/lib  \
4596     /usr/athena/lib       \
4597     /usr/local/x11r5/lib  \
4598     /usr/lpp/Xamples/lib  \
4599     /lib/usr/lib/X11      \
4600                           \
4601     /usr/openwin/lib      \
4602     /usr/openwin/share/lib \
4603     ; \
4604 do
4605   for ac_extension in a so sl; do
4606     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4607       ac_x_libraries=$ac_dir
4608       break 2
4609     fi
4610   done
4611 done
4612 fi
4613 rm -f conftest*
4614 fi # $ac_x_libraries = NO
4615
4616 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4617   # Didn't find X anywhere.  Cache the known absence of X.
4618   ac_cv_have_x="have_x=no"
4619 else
4620   # Record where we found X for the cache.
4621   ac_cv_have_x="have_x=yes \
4622                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4623 fi
4624   fi
4625   eval "$ac_cv_have_x"
4626 fi # $with_x != no
4627
4628 if test "$have_x" != yes; then
4629   echo "$ac_t""$have_x" 1>&6
4630   no_x=yes
4631 else
4632   # If each of the values was on the command line, it overrides each guess.
4633   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4634   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4635   # Update the cache value to reflect the command line values.
4636   ac_cv_have_x="have_x=yes \
4637                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4638   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4639 fi
4640
4641 if test "$no_x" = yes; then
4642   # Not all programs may use this symbol, but it does not hurt to define it.
4643   { test "$extra_verbose" = "yes" && cat << \EOF
4644     Defining X_DISPLAY_MISSING
4645 EOF
4646 cat >> confdefs.h <<\EOF
4647 #define X_DISPLAY_MISSING 1
4648 EOF
4649 }
4650
4651   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4652 else
4653   if test -n "$x_includes"; then
4654     X_CFLAGS="$X_CFLAGS -I$x_includes"
4655   fi
4656
4657   # It would also be nice to do this for all -L options, not just this one.
4658   if test -n "$x_libraries"; then
4659     X_LIBS="$X_LIBS -L$x_libraries"
4660     # For Solaris; some versions of Sun CC require a space after -R and
4661     # others require no space.  Words are not sufficient . . . .
4662     case "`(uname -sr) 2>/dev/null`" in
4663     "SunOS 5"*)
4664       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4665 echo "configure:4666: checking whether -R must be followed by a space" >&5
4666       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4667       cat > conftest.$ac_ext <<EOF
4668 #line 4669 "configure"
4669 #include "confdefs.h"
4670
4671 int main() {
4672
4673 ; return 0; }
4674 EOF
4675 if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4676   rm -rf conftest*
4677   ac_R_nospace=yes
4678 else
4679   echo "configure: failed program was:" >&5
4680   cat conftest.$ac_ext >&5
4681   rm -rf conftest*
4682   ac_R_nospace=no
4683 fi
4684 rm -f conftest*
4685       if test $ac_R_nospace = yes; then
4686         echo "$ac_t""no" 1>&6
4687         X_LIBS="$X_LIBS -R$x_libraries"
4688       else
4689         LIBS="$ac_xsave_LIBS -R $x_libraries"
4690         cat > conftest.$ac_ext <<EOF
4691 #line 4692 "configure"
4692 #include "confdefs.h"
4693
4694 int main() {
4695
4696 ; return 0; }
4697 EOF
4698 if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4699   rm -rf conftest*
4700   ac_R_space=yes
4701 else
4702   echo "configure: failed program was:" >&5
4703   cat conftest.$ac_ext >&5
4704   rm -rf conftest*
4705   ac_R_space=no
4706 fi
4707 rm -f conftest*
4708         if test $ac_R_space = yes; then
4709           echo "$ac_t""yes" 1>&6
4710           X_LIBS="$X_LIBS -R $x_libraries"
4711         else
4712           echo "$ac_t""neither works" 1>&6
4713         fi
4714       fi
4715       LIBS="$ac_xsave_LIBS"
4716     esac
4717   fi
4718
4719   # Check for system-dependent libraries X programs must link with.
4720   # Do this before checking for the system-independent R6 libraries
4721   # (-lICE), since we may need -lsocket or whatever for X linking.
4722
4723   if test "$ISC" = yes; then
4724     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4725   else
4726     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4727     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4728     # the Alpha needs dnet_stub (dnet does not exist).
4729     if test "$with_dnet" = "no" ; then
4730 ac_cv_lib_dnet_dnet_ntoa=no
4731 else
4732
4733 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4734 echo "configure:4735: checking for dnet_ntoa in -ldnet" >&5
4735 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4736
4737 xe_check_libs=" -ldnet "
4738 cat > conftest.$ac_ext <<EOF
4739 #line 4740 "configure"
4740 #include "confdefs.h"
4741 /* Override any gcc2 internal prototype to avoid an error.  */
4742 /* We use char because int might match the return type of a gcc2
4743     builtin and then its argument prototype would still apply.  */
4744 char dnet_ntoa();
4745
4746 int main() {
4747 dnet_ntoa()
4748 ; return 0; }
4749 EOF
4750 if { (eval echo configure:4751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4751   rm -rf conftest*
4752   eval "ac_cv_lib_$ac_lib_var=yes"
4753 else
4754   echo "configure: failed program was:" >&5
4755   cat conftest.$ac_ext >&5
4756   rm -rf conftest*
4757   eval "ac_cv_lib_$ac_lib_var=no"
4758 fi
4759 rm -f conftest*
4760 xe_check_libs=""
4761
4762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4763   echo "$ac_t""yes" 1>&6
4764   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4765 else
4766   echo "$ac_t""no" 1>&6
4767 fi
4768
4769 fi
4770
4771     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4772       
4773 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4774 echo "configure:4775: checking for dnet_ntoa in -ldnet_stub" >&5
4775 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4776
4777 xe_check_libs=" -ldnet_stub "
4778 cat > conftest.$ac_ext <<EOF
4779 #line 4780 "configure"
4780 #include "confdefs.h"
4781 /* Override any gcc2 internal prototype to avoid an error.  */
4782 /* We use char because int might match the return type of a gcc2
4783     builtin and then its argument prototype would still apply.  */
4784 char dnet_ntoa();
4785
4786 int main() {
4787 dnet_ntoa()
4788 ; return 0; }
4789 EOF
4790 if { (eval echo configure:4791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4791   rm -rf conftest*
4792   eval "ac_cv_lib_$ac_lib_var=yes"
4793 else
4794   echo "configure: failed program was:" >&5
4795   cat conftest.$ac_ext >&5
4796   rm -rf conftest*
4797   eval "ac_cv_lib_$ac_lib_var=no"
4798 fi
4799 rm -f conftest*
4800 xe_check_libs=""
4801
4802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4803   echo "$ac_t""yes" 1>&6
4804   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4805 else
4806   echo "$ac_t""no" 1>&6
4807 fi
4808
4809
4810     fi
4811
4812     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4813     # to get the SysV transport functions.
4814     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4815     # needs -lnsl.
4816     # The nsl library prevents programs from opening the X display
4817     # on Irix 5.2, according to dickey@clark.net.
4818     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4819 echo "configure:4820: checking for gethostbyname" >&5
4820
4821 cat > conftest.$ac_ext <<EOF
4822 #line 4823 "configure"
4823 #include "confdefs.h"
4824 /* System header to define __stub macros and hopefully few prototypes,
4825     which can conflict with char gethostbyname(); below.  */
4826 #include <assert.h>
4827 /* Override any gcc2 internal prototype to avoid an error.  */
4828 /* We use char because int might match the return type of a gcc2
4829     builtin and then its argument prototype would still apply.  */
4830 char gethostbyname();
4831
4832 int main() {
4833
4834 /* The GNU C library defines this for functions which it implements
4835     to always fail with ENOSYS.  Some functions are actually named
4836     something starting with __ and the normal name is an alias.  */
4837 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4838 choke me
4839 #else
4840 gethostbyname();
4841 #endif
4842
4843 ; return 0; }
4844 EOF
4845 if { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4846   rm -rf conftest*
4847   eval "ac_cv_func_gethostbyname=yes"
4848 else
4849   echo "configure: failed program was:" >&5
4850   cat conftest.$ac_ext >&5
4851   rm -rf conftest*
4852   eval "ac_cv_func_gethostbyname=no"
4853 fi
4854 rm -f conftest*
4855
4856 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4857   echo "$ac_t""yes" 1>&6
4858   :
4859 else
4860   echo "$ac_t""no" 1>&6
4861 fi
4862
4863     if test $ac_cv_func_gethostbyname = no; then
4864       
4865 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4866 echo "configure:4867: checking for gethostbyname in -lnsl" >&5
4867 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4868
4869 xe_check_libs=" -lnsl "
4870 cat > conftest.$ac_ext <<EOF
4871 #line 4872 "configure"
4872 #include "confdefs.h"
4873 /* Override any gcc2 internal prototype to avoid an error.  */
4874 /* We use char because int might match the return type of a gcc2
4875     builtin and then its argument prototype would still apply.  */
4876 char gethostbyname();
4877
4878 int main() {
4879 gethostbyname()
4880 ; return 0; }
4881 EOF
4882 if { (eval echo configure:4883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4883   rm -rf conftest*
4884   eval "ac_cv_lib_$ac_lib_var=yes"
4885 else
4886   echo "configure: failed program was:" >&5
4887   cat conftest.$ac_ext >&5
4888   rm -rf conftest*
4889   eval "ac_cv_lib_$ac_lib_var=no"
4890 fi
4891 rm -f conftest*
4892 xe_check_libs=""
4893
4894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4895   echo "$ac_t""yes" 1>&6
4896   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4897 else
4898   echo "$ac_t""no" 1>&6
4899 fi
4900
4901
4902     fi
4903
4904     # lieder@skyler.mavd.honeywell.com says without -lsocket,
4905     # socket/setsockopt and other routines are undefined under SCO ODT
4906     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
4907     # on later versions), says simon@lia.di.epfl.ch: it contains
4908     # gethostby* variants that don't use the nameserver (or something).
4909     # -lsocket must be given before -lnsl if both are needed.
4910     # We assume that if connect needs -lnsl, so does gethostbyname.
4911     echo $ac_n "checking for connect""... $ac_c" 1>&6
4912 echo "configure:4913: checking for connect" >&5
4913
4914 cat > conftest.$ac_ext <<EOF
4915 #line 4916 "configure"
4916 #include "confdefs.h"
4917 /* System header to define __stub macros and hopefully few prototypes,
4918     which can conflict with char connect(); below.  */
4919 #include <assert.h>
4920 /* Override any gcc2 internal prototype to avoid an error.  */
4921 /* We use char because int might match the return type of a gcc2
4922     builtin and then its argument prototype would still apply.  */
4923 char connect();
4924
4925 int main() {
4926
4927 /* The GNU C library defines this for functions which it implements
4928     to always fail with ENOSYS.  Some functions are actually named
4929     something starting with __ and the normal name is an alias.  */
4930 #if defined (__stub_connect) || defined (__stub___connect)
4931 choke me
4932 #else
4933 connect();
4934 #endif
4935
4936 ; return 0; }
4937 EOF
4938 if { (eval echo configure:4939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4939   rm -rf conftest*
4940   eval "ac_cv_func_connect=yes"
4941 else
4942   echo "configure: failed program was:" >&5
4943   cat conftest.$ac_ext >&5
4944   rm -rf conftest*
4945   eval "ac_cv_func_connect=no"
4946 fi
4947 rm -f conftest*
4948
4949 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4950   echo "$ac_t""yes" 1>&6
4951   :
4952 else
4953   echo "$ac_t""no" 1>&6
4954 fi
4955
4956     if test $ac_cv_func_connect = no; then
4957       
4958 xe_msg_checking="for connect in -lsocket"
4959 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
4960 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
4961 echo "configure:4962: checking "$xe_msg_checking"" >&5
4962 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4963
4964 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
4965 cat > conftest.$ac_ext <<EOF
4966 #line 4967 "configure"
4967 #include "confdefs.h"
4968 /* Override any gcc2 internal prototype to avoid an error.  */
4969 /* We use char because int might match the return type of a gcc2
4970     builtin and then its argument prototype would still apply.  */
4971 char connect();
4972
4973 int main() {
4974 connect()
4975 ; return 0; }
4976 EOF
4977 if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4978   rm -rf conftest*
4979   eval "ac_cv_lib_$ac_lib_var=yes"
4980 else
4981   echo "configure: failed program was:" >&5
4982   cat conftest.$ac_ext >&5
4983   rm -rf conftest*
4984   eval "ac_cv_lib_$ac_lib_var=no"
4985 fi
4986 rm -f conftest*
4987 xe_check_libs=""
4988
4989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4990   echo "$ac_t""yes" 1>&6
4991   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
4992 else
4993   echo "$ac_t""no" 1>&6
4994 fi
4995
4996
4997     fi
4998
4999     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5000     echo $ac_n "checking for remove""... $ac_c" 1>&6
5001 echo "configure:5002: checking for remove" >&5
5002
5003 cat > conftest.$ac_ext <<EOF
5004 #line 5005 "configure"
5005 #include "confdefs.h"
5006 /* System header to define __stub macros and hopefully few prototypes,
5007     which can conflict with char remove(); below.  */
5008 #include <assert.h>
5009 /* Override any gcc2 internal prototype to avoid an error.  */
5010 /* We use char because int might match the return type of a gcc2
5011     builtin and then its argument prototype would still apply.  */
5012 char remove();
5013
5014 int main() {
5015
5016 /* The GNU C library defines this for functions which it implements
5017     to always fail with ENOSYS.  Some functions are actually named
5018     something starting with __ and the normal name is an alias.  */
5019 #if defined (__stub_remove) || defined (__stub___remove)
5020 choke me
5021 #else
5022 remove();
5023 #endif
5024
5025 ; return 0; }
5026 EOF
5027 if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5028   rm -rf conftest*
5029   eval "ac_cv_func_remove=yes"
5030 else
5031   echo "configure: failed program was:" >&5
5032   cat conftest.$ac_ext >&5
5033   rm -rf conftest*
5034   eval "ac_cv_func_remove=no"
5035 fi
5036 rm -f conftest*
5037
5038 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5039   echo "$ac_t""yes" 1>&6
5040   :
5041 else
5042   echo "$ac_t""no" 1>&6
5043 fi
5044
5045     if test $ac_cv_func_remove = no; then
5046       
5047 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5048 echo "configure:5049: checking for remove in -lposix" >&5
5049 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5050
5051 xe_check_libs=" -lposix "
5052 cat > conftest.$ac_ext <<EOF
5053 #line 5054 "configure"
5054 #include "confdefs.h"
5055 /* Override any gcc2 internal prototype to avoid an error.  */
5056 /* We use char because int might match the return type of a gcc2
5057     builtin and then its argument prototype would still apply.  */
5058 char remove();
5059
5060 int main() {
5061 remove()
5062 ; return 0; }
5063 EOF
5064 if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5065   rm -rf conftest*
5066   eval "ac_cv_lib_$ac_lib_var=yes"
5067 else
5068   echo "configure: failed program was:" >&5
5069   cat conftest.$ac_ext >&5
5070   rm -rf conftest*
5071   eval "ac_cv_lib_$ac_lib_var=no"
5072 fi
5073 rm -f conftest*
5074 xe_check_libs=""
5075
5076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5077   echo "$ac_t""yes" 1>&6
5078   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5079 else
5080   echo "$ac_t""no" 1>&6
5081 fi
5082
5083
5084     fi
5085
5086     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5087     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5088 echo "configure:5089: checking for shmat" >&5
5089
5090 cat > conftest.$ac_ext <<EOF
5091 #line 5092 "configure"
5092 #include "confdefs.h"
5093 /* System header to define __stub macros and hopefully few prototypes,
5094     which can conflict with char shmat(); below.  */
5095 #include <assert.h>
5096 /* Override any gcc2 internal prototype to avoid an error.  */
5097 /* We use char because int might match the return type of a gcc2
5098     builtin and then its argument prototype would still apply.  */
5099 char shmat();
5100
5101 int main() {
5102
5103 /* The GNU C library defines this for functions which it implements
5104     to always fail with ENOSYS.  Some functions are actually named
5105     something starting with __ and the normal name is an alias.  */
5106 #if defined (__stub_shmat) || defined (__stub___shmat)
5107 choke me
5108 #else
5109 shmat();
5110 #endif
5111
5112 ; return 0; }
5113 EOF
5114 if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5115   rm -rf conftest*
5116   eval "ac_cv_func_shmat=yes"
5117 else
5118   echo "configure: failed program was:" >&5
5119   cat conftest.$ac_ext >&5
5120   rm -rf conftest*
5121   eval "ac_cv_func_shmat=no"
5122 fi
5123 rm -f conftest*
5124
5125 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5126   echo "$ac_t""yes" 1>&6
5127   :
5128 else
5129   echo "$ac_t""no" 1>&6
5130 fi
5131
5132     if test $ac_cv_func_shmat = no; then
5133       
5134 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5135 echo "configure:5136: checking for shmat in -lipc" >&5
5136 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5137
5138 xe_check_libs=" -lipc "
5139 cat > conftest.$ac_ext <<EOF
5140 #line 5141 "configure"
5141 #include "confdefs.h"
5142 /* Override any gcc2 internal prototype to avoid an error.  */
5143 /* We use char because int might match the return type of a gcc2
5144     builtin and then its argument prototype would still apply.  */
5145 char shmat();
5146
5147 int main() {
5148 shmat()
5149 ; return 0; }
5150 EOF
5151 if { (eval echo configure:5152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5152   rm -rf conftest*
5153   eval "ac_cv_lib_$ac_lib_var=yes"
5154 else
5155   echo "configure: failed program was:" >&5
5156   cat conftest.$ac_ext >&5
5157   rm -rf conftest*
5158   eval "ac_cv_lib_$ac_lib_var=no"
5159 fi
5160 rm -f conftest*
5161 xe_check_libs=""
5162
5163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5164   echo "$ac_t""yes" 1>&6
5165   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5166 else
5167   echo "$ac_t""no" 1>&6
5168 fi
5169
5170
5171     fi
5172   fi
5173
5174   # Check for libraries that X11R6 Xt/Xaw programs need.
5175   ac_save_LDFLAGS="$LDFLAGS"
5176   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5177   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5178   # check for ICE first), but we must link in the order -lSM -lICE or
5179   # we get undefined symbols.  So assume we have SM if we have ICE.
5180   # These have to be linked with before -lX11, unlike the other
5181   # libraries we check for below, so use a different variable.
5182   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5183   
5184 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5185 echo "configure:5186: checking for IceConnectionNumber in -lICE" >&5
5186 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5187
5188 xe_check_libs=" -lICE "
5189 cat > conftest.$ac_ext <<EOF
5190 #line 5191 "configure"
5191 #include "confdefs.h"
5192 /* Override any gcc2 internal prototype to avoid an error.  */
5193 /* We use char because int might match the return type of a gcc2
5194     builtin and then its argument prototype would still apply.  */
5195 char IceConnectionNumber();
5196
5197 int main() {
5198 IceConnectionNumber()
5199 ; return 0; }
5200 EOF
5201 if { (eval echo configure:5202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5202   rm -rf conftest*
5203   eval "ac_cv_lib_$ac_lib_var=yes"
5204 else
5205   echo "configure: failed program was:" >&5
5206   cat conftest.$ac_ext >&5
5207   rm -rf conftest*
5208   eval "ac_cv_lib_$ac_lib_var=no"
5209 fi
5210 rm -f conftest*
5211 xe_check_libs=""
5212
5213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5214   echo "$ac_t""yes" 1>&6
5215   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5216 else
5217   echo "$ac_t""no" 1>&6
5218 fi
5219
5220
5221   LDFLAGS="$ac_save_LDFLAGS"
5222
5223 fi
5224  # Autoconf claims to find X library and include dirs for us.
5225   if test "$no_x" = "yes"
5226   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5227   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5228   fi
5229 fi
5230
5231 case "$with_x11" in
5232   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5233   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5234 esac
5235
5236 if test "$with_x11" = "yes"; then
5237   { test "$extra_verbose" = "yes" && cat << \EOF
5238     Defining HAVE_X_WINDOWS
5239 EOF
5240 cat >> confdefs.h <<\EOF
5241 #define HAVE_X_WINDOWS 1
5242 EOF
5243 }
5244
5245   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5246   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5247
5248       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5249     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5250     if test -d "$lib_dir" -a -d "$inc_dir"; then
5251       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5252         x_libraries="$lib_dir $x_libraries"
5253         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5254       esac
5255       case "$x_includes" in "$inc_dir"* ) ;; *)
5256         x_includes="$inc_dir $x_includes"
5257         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5258       esac
5259       break;       fi
5260   done
5261
5262     for rel in "X11R6" "X11R5" "X11R4"; do
5263     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5264     if test -d "$lib_dir" -a -d "$inc_dir"; then
5265       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5266         x_libraries="$x_libraries $lib_dir"
5267         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5268       esac
5269       case "$x_includes" in "$inc_dir"* ) ;; *)
5270         x_includes="$x_includes $inc_dir"
5271         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5272       esac
5273       break;     fi
5274   done
5275
5276     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
5277
5278   ld_switch_x_site="$X_LIBS"
5279
5280   
5281 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5282     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5283   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5284   
5285         runpath="" runpath_dirs=""
5286   if test -n "$LD_RUN_PATH"; then
5287     runpath="$LD_RUN_PATH"
5288   elif test "$GCC" = "yes"; then
5289         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5290     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5291     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5292     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5293       case "$arg" in P,* | -L* | -R* )
5294         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5295           {
5296 xe_runpath_dir="$dir"
5297   test "$xe_runpath_dir" != "/lib"     -a \
5298         "$xe_runpath_dir" != "/usr/lib" -a \
5299         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5300   eval "$xe_add_unique_runpath_dir"
5301 }
5302         done ;;
5303       esac
5304     done
5305     ld_switch_run="$ld_switch_run_save"
5306     rm -f conftest*
5307   else
5308         for arg in $ld_switch_site $ld_switch_x_site; do
5309       case "$arg" in -L*) {
5310 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5311   test "$xe_runpath_dir" != "/lib"     -a \
5312         "$xe_runpath_dir" != "/usr/lib" -a \
5313         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5314   eval "$xe_add_unique_runpath_dir"
5315 };; esac
5316     done
5317         if test "$opsys $need_motif" = "sol2 yes"; then
5318       xe_runpath_dir="/opt/SUNWdt/lib";
5319       eval "$xe_add_unique_runpath_dir";
5320     fi
5321   fi 
5322   if test -n "$runpath"; then
5323     ld_switch_run="${dash_r}${runpath}"
5324     
5325 if test "$GCC" = "yes"; then
5326   set x $ld_switch_run; shift; ld_switch_run=""
5327   while test -n "$1"; do
5328     case $1 in
5329       -L  | -l  | -u         ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5330       -L* | -l* | -u* | -Wl* ) ld_switch_run="$ld_switch_run $1" ;;
5331       -Xlinker* ) ;;
5332       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5333     esac
5334     shift
5335   done
5336 fi
5337     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5338   fi
5339 fi
5340
5341
5342   if test "$extra_verbose" = "yes"; then
5343     echo; echo "X11 compilation variables:"
5344     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5345     echo
5346   fi
5347
5348             bitmapdirs=
5349   if test "$x_includes" != NONE; then
5350     for i in $x_includes; do
5351       if test -d "$i/bitmaps"; then
5352         bitmapdirs="$i/bitmaps:$bitmapdirs"
5353       fi
5354       if test -d "$i/X11/bitmaps"; then
5355         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5356       fi
5357     done
5358     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5359   fi
5360   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5361     Defining BITMAPDIR = "$bitmapdirs"
5362 EOF
5363 cat >> confdefs.h <<EOF
5364 #define BITMAPDIR "$bitmapdirs"
5365 EOF
5366 }
5367
5368
5369     echo "checking for X defines extracted by xmkmf" 1>&6
5370 echo "configure:5371: checking for X defines extracted by xmkmf" >&5
5371   rm -fr conftestdir
5372   if mkdir conftestdir; then
5373     cd conftestdir
5374     cat > Imakefile <<'EOF'
5375 xetest:
5376         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5377 EOF
5378     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5379       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5380       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5381     fi
5382     cd ..
5383     rm -fr conftestdir
5384     for word in $xmkmf_defines; do
5385       case "$word" in
5386         -D*=* ) ;;
5387         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5388               { test "$extra_verbose" = "yes" && cat << EOF
5389     Defining $word
5390 EOF
5391 cat >> confdefs.h <<EOF
5392 #define $word 1
5393 EOF
5394 }
5395  ;;
5396       esac
5397     done
5398   fi
5399
5400     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5401 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5402 echo "configure:5403: checking for X11/Intrinsic.h" >&5
5403
5404 cat > conftest.$ac_ext <<EOF
5405 #line 5406 "configure"
5406 #include "confdefs.h"
5407 #include <X11/Intrinsic.h>
5408 EOF
5409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5410 { (eval echo configure:5411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5411 ac_err=`grep -v '^ *+' conftest.out`
5412 if test -z "$ac_err"; then
5413   rm -rf conftest*
5414   eval "ac_cv_header_$ac_safe=yes"
5415 else
5416   echo "$ac_err" >&5
5417   echo "configure: failed program was:" >&5
5418   cat conftest.$ac_ext >&5
5419   rm -rf conftest*
5420   eval "ac_cv_header_$ac_safe=no"
5421 fi
5422 rm -f conftest*
5423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5424   echo "$ac_t""yes" 1>&6
5425   :
5426 else
5427   echo "$ac_t""no" 1>&6
5428 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5429 fi
5430
5431
5432       
5433 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5434 echo "configure:5435: checking for XOpenDisplay in -lX11" >&5
5435 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5436
5437 xe_check_libs=" -lX11 "
5438 cat > conftest.$ac_ext <<EOF
5439 #line 5440 "configure"
5440 #include "confdefs.h"
5441 /* Override any gcc2 internal prototype to avoid an error.  */
5442 /* We use char because int might match the return type of a gcc2
5443     builtin and then its argument prototype would still apply.  */
5444 char XOpenDisplay();
5445
5446 int main() {
5447 XOpenDisplay()
5448 ; return 0; }
5449 EOF
5450 if { (eval echo configure:5451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5451   rm -rf conftest*
5452   eval "ac_cv_lib_$ac_lib_var=yes"
5453 else
5454   echo "configure: failed program was:" >&5
5455   cat conftest.$ac_ext >&5
5456   rm -rf conftest*
5457   eval "ac_cv_lib_$ac_lib_var=no"
5458 fi
5459 rm -f conftest*
5460 xe_check_libs=""
5461
5462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5463   echo "$ac_t""yes" 1>&6
5464   have_lib_x11=yes
5465 else
5466   echo "$ac_t""no" 1>&6
5467 fi
5468
5469
5470   if test "$have_lib_x11" != "yes"; then
5471     
5472 xe_msg_checking="for XGetFontProperty in -lX11"
5473 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5474 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5475 echo "configure:5476: checking "$xe_msg_checking"" >&5
5476 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5477
5478 xe_check_libs=" -lX11 -b i486-linuxaout"
5479 cat > conftest.$ac_ext <<EOF
5480 #line 5481 "configure"
5481 #include "confdefs.h"
5482 /* Override any gcc2 internal prototype to avoid an error.  */
5483 /* We use char because int might match the return type of a gcc2
5484     builtin and then its argument prototype would still apply.  */
5485 char XGetFontProperty();
5486
5487 int main() {
5488 XGetFontProperty()
5489 ; return 0; }
5490 EOF
5491 if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5492   rm -rf conftest*
5493   eval "ac_cv_lib_$ac_lib_var=yes"
5494 else
5495   echo "configure: failed program was:" >&5
5496   cat conftest.$ac_ext >&5
5497   rm -rf conftest*
5498   eval "ac_cv_lib_$ac_lib_var=no"
5499 fi
5500 rm -f conftest*
5501 xe_check_libs=""
5502
5503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5504   echo "$ac_t""yes" 1>&6
5505   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5506 else
5507   echo "$ac_t""no" 1>&6
5508 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5509 fi
5510
5511
5512   fi
5513   libs_x="-lX11"
5514   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5515
5516     
5517 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5518 echo "configure:5519: checking for XShapeSelectInput in -lXext" >&5
5519 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5520
5521 xe_check_libs=" -lXext "
5522 cat > conftest.$ac_ext <<EOF
5523 #line 5524 "configure"
5524 #include "confdefs.h"
5525 /* Override any gcc2 internal prototype to avoid an error.  */
5526 /* We use char because int might match the return type of a gcc2
5527     builtin and then its argument prototype would still apply.  */
5528 char XShapeSelectInput();
5529
5530 int main() {
5531 XShapeSelectInput()
5532 ; return 0; }
5533 EOF
5534 if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5535   rm -rf conftest*
5536   eval "ac_cv_lib_$ac_lib_var=yes"
5537 else
5538   echo "configure: failed program was:" >&5
5539   cat conftest.$ac_ext >&5
5540   rm -rf conftest*
5541   eval "ac_cv_lib_$ac_lib_var=no"
5542 fi
5543 rm -f conftest*
5544 xe_check_libs=""
5545
5546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5547   echo "$ac_t""yes" 1>&6
5548   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5549 else
5550   echo "$ac_t""no" 1>&6
5551 fi
5552
5553
5554
5555     
5556 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5557 echo "configure:5558: checking for XtOpenDisplay in -lXt" >&5
5558 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5559
5560 xe_check_libs=" -lXt "
5561 cat > conftest.$ac_ext <<EOF
5562 #line 5563 "configure"
5563 #include "confdefs.h"
5564 /* Override any gcc2 internal prototype to avoid an error.  */
5565 /* We use char because int might match the return type of a gcc2
5566     builtin and then its argument prototype would still apply.  */
5567 char XtOpenDisplay();
5568
5569 int main() {
5570 XtOpenDisplay()
5571 ; return 0; }
5572 EOF
5573 if { (eval echo configure:5574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5574   rm -rf conftest*
5575   eval "ac_cv_lib_$ac_lib_var=yes"
5576 else
5577   echo "configure: failed program was:" >&5
5578   cat conftest.$ac_ext >&5
5579   rm -rf conftest*
5580   eval "ac_cv_lib_$ac_lib_var=no"
5581 fi
5582 rm -f conftest*
5583 xe_check_libs=""
5584
5585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5586   echo "$ac_t""yes" 1>&6
5587   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5588 else
5589   echo "$ac_t""no" 1>&6
5590 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5591 fi
5592
5593
5594
5595   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5596 echo "configure:5597: checking the version of X11 being used" >&5
5597   cat > conftest.$ac_ext <<EOF
5598 #line 5599 "configure"
5599 #include "confdefs.h"
5600 #include <X11/Intrinsic.h>
5601     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5602 EOF
5603 if { (eval echo configure:5604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5604 then
5605   ./conftest foobar; x11_release=$?
5606 else
5607   conftest_rc="$?"
5608   echo "configure: failed program was:" >&5
5609   cat conftest.$ac_ext >&5
5610   rm -fr conftest*
5611   x11_release=4
5612 fi
5613 rm -fr conftest*
5614   echo "$ac_t""R${x11_release}" 1>&6
5615   { test "$extra_verbose" = "yes" && cat << EOF
5616     Defining THIS_IS_X11R${x11_release}
5617 EOF
5618 cat >> confdefs.h <<EOF
5619 #define THIS_IS_X11R${x11_release} 1
5620 EOF
5621 }
5622
5623
5624   for ac_hdr in X11/Xlocale.h
5625 do
5626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5628 echo "configure:5629: checking for $ac_hdr" >&5
5629
5630 cat > conftest.$ac_ext <<EOF
5631 #line 5632 "configure"
5632 #include "confdefs.h"
5633 #include <$ac_hdr>
5634 EOF
5635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5636 { (eval echo configure:5637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5637 ac_err=`grep -v '^ *+' conftest.out`
5638 if test -z "$ac_err"; then
5639   rm -rf conftest*
5640   eval "ac_cv_header_$ac_safe=yes"
5641 else
5642   echo "$ac_err" >&5
5643   echo "configure: failed program was:" >&5
5644   cat conftest.$ac_ext >&5
5645   rm -rf conftest*
5646   eval "ac_cv_header_$ac_safe=no"
5647 fi
5648 rm -f conftest*
5649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5650   echo "$ac_t""yes" 1>&6
5651     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5652   { test "$extra_verbose" = "yes" && cat << EOF
5653     Defining $ac_tr_hdr
5654 EOF
5655 cat >> confdefs.h <<EOF
5656 #define $ac_tr_hdr 1
5657 EOF
5658 }
5659  
5660 else
5661   echo "$ac_t""no" 1>&6
5662 fi
5663 done
5664
5665
5666     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5667 echo "configure:5668: checking for XFree86" >&5
5668   if test -d "/usr/X386/include" -o \
5669           -f "/etc/XF86Config"    -o \
5670           -f "/etc/X11/XF86Config" -o \
5671           -f "/usr/X11R6/lib/X11/XF86Config"; then
5672     echo "$ac_t""yes" 1>&6
5673     { test "$extra_verbose" = "yes" && cat << \EOF
5674     Defining HAVE_XFREE386
5675 EOF
5676 cat >> confdefs.h <<\EOF
5677 #define HAVE_XFREE386 1
5678 EOF
5679 }
5680
5681   else
5682     echo "$ac_t""no" 1>&6
5683   fi
5684
5685     test -z "$with_xmu" && { 
5686 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5687 echo "configure:5688: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5688 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5689
5690 xe_check_libs=" -lXmu "
5691 cat > conftest.$ac_ext <<EOF
5692 #line 5693 "configure"
5693 #include "confdefs.h"
5694 /* Override any gcc2 internal prototype to avoid an error.  */
5695 /* We use char because int might match the return type of a gcc2
5696     builtin and then its argument prototype would still apply.  */
5697 char XmuReadBitmapDataFromFile();
5698
5699 int main() {
5700 XmuReadBitmapDataFromFile()
5701 ; return 0; }
5702 EOF
5703 if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5704   rm -rf conftest*
5705   eval "ac_cv_lib_$ac_lib_var=yes"
5706 else
5707   echo "configure: failed program was:" >&5
5708   cat conftest.$ac_ext >&5
5709   rm -rf conftest*
5710   eval "ac_cv_lib_$ac_lib_var=no"
5711 fi
5712 rm -f conftest*
5713 xe_check_libs=""
5714
5715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5716   echo "$ac_t""yes" 1>&6
5717   with_xmu=yes
5718 else
5719   echo "$ac_t""no" 1>&6
5720 with_xmu=no
5721 fi
5722
5723  }
5724   if test "$with_xmu" = "no"; then
5725     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
5726    echo "    xemacs will be linked with \"xmu.o\""
5727  fi
5728   else
5729     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
5730     { test "$extra_verbose" = "yes" && cat << \EOF
5731     Defining HAVE_XMU
5732 EOF
5733 cat >> confdefs.h <<\EOF
5734 #define HAVE_XMU 1
5735 EOF
5736 }
5737
5738   fi
5739
5740       
5741 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
5742 echo "configure:5743: checking for main in -lXbsd" >&5
5743 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
5744
5745 xe_check_libs=" -lXbsd "
5746 cat > conftest.$ac_ext <<EOF
5747 #line 5748 "configure"
5748 #include "confdefs.h"
5749
5750 int main() {
5751 main()
5752 ; return 0; }
5753 EOF
5754 if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5755   rm -rf conftest*
5756   eval "ac_cv_lib_$ac_lib_var=yes"
5757 else
5758   echo "configure: failed program was:" >&5
5759   cat conftest.$ac_ext >&5
5760   rm -rf conftest*
5761   eval "ac_cv_lib_$ac_lib_var=no"
5762 fi
5763 rm -f conftest*
5764 xe_check_libs=""
5765
5766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5767   echo "$ac_t""yes" 1>&6
5768   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
5769 else
5770   echo "$ac_t""no" 1>&6
5771 fi
5772
5773
5774
5775     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
5776         if test "$GCC" = "yes"; then
5777       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
5778       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
5779     else
5780       case "$CC" in
5781         "xlc" ) CC="xlc_r" ;;
5782         "xlC" ) CC="xlC_r" ;;
5783         "cc"  ) CC="cc_r" ;;
5784       esac
5785     fi
5786   fi
5787
5788 fi 
5789 if test "$with_msw" != "no"; then
5790   echo "checking for MS-Windows" 1>&6
5791 echo "configure:5792: checking for MS-Windows" >&5
5792   
5793 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
5794 echo "configure:5795: checking for main in -lgdi32" >&5
5795 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
5796
5797 xe_check_libs=" -lgdi32 "
5798 cat > conftest.$ac_ext <<EOF
5799 #line 5800 "configure"
5800 #include "confdefs.h"
5801
5802 int main() {
5803 main()
5804 ; return 0; }
5805 EOF
5806 if { (eval echo configure:5807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5807   rm -rf conftest*
5808   eval "ac_cv_lib_$ac_lib_var=yes"
5809 else
5810   echo "configure: failed program was:" >&5
5811   cat conftest.$ac_ext >&5
5812   rm -rf conftest*
5813   eval "ac_cv_lib_$ac_lib_var=no"
5814 fi
5815 rm -f conftest*
5816 xe_check_libs=""
5817
5818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5819   echo "$ac_t""yes" 1>&6
5820   with_msw=yes
5821 else
5822   echo "$ac_t""no" 1>&6
5823 fi
5824
5825
5826   if test "$with_msw" = "yes"; then
5827     { test "$extra_verbose" = "yes" && cat << \EOF
5828     Defining HAVE_MS_WINDOWS
5829 EOF
5830 cat >> confdefs.h <<\EOF
5831 #define HAVE_MS_WINDOWS 1
5832 EOF
5833 }
5834
5835     install_pp="$blddir/lib-src/installexe.sh"
5836     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
5837     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
5838     if test "$window_system" != x11; then
5839         window_system=msw
5840         test "$with_scrollbars" != "no" && with_scrollbars=msw \
5841             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5842    echo "    xemacs will be linked with \"scrollbar-msw.o\""
5843  fi
5844         test "$with_menubars"   != "no" && with_menubars=msw \
5845             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5846    echo "    xemacs will be linked with \"menubar-msw.o\""
5847  fi
5848         test "$with_toolbars"   != "no" && with_toolbars=msw \
5849             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5850    echo "    xemacs will be linked with \"toolbar-msw.o\""
5851  fi
5852         test "$with_dialogs"   != "no" && with_dialogs=msw \
5853             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
5854    echo "    xemacs will be linked with \"dialog-msw.o\""
5855  fi
5856     else
5857         test "$with_scrollbars"   != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5858    echo "    xemacs will be linked with \"scrollbar-msw.o\""
5859  fi
5860         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5861    echo "    xemacs will be linked with \"menubar-msw.o\""
5862  fi
5863         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5864    echo "    xemacs will be linked with \"toolbar-msw.o\""
5865  fi
5866         test "$with_dialogs"   != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
5867    echo "    xemacs will be linked with \"dialog-msw.o\""
5868  fi
5869     fi
5870         cat > conftest.$ac_ext <<EOF
5871 #line 5872 "configure"
5872 #include "confdefs.h"
5873 #include <fcntl.h>
5874     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
5875 EOF
5876 if { (eval echo configure:5877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5877 then
5878   { test "$extra_verbose" = "yes" && cat << \EOF
5879     Defining HAVE_MSG_SELECT
5880 EOF
5881 cat >> confdefs.h <<\EOF
5882 #define HAVE_MSG_SELECT 1
5883 EOF
5884 }
5885
5886 else
5887   conftest_rc="$?"
5888   echo "configure: failed program was:" >&5
5889   cat conftest.$ac_ext >&5
5890 fi
5891 rm -fr conftest*
5892     const_is_losing=no
5893     with_file_coding=yes
5894     use_minimal_tagbits=yes
5895     use_indexed_lrecord_implementation=yes
5896     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" &&  if test "$extra_verbose" = "yes"; then
5897    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\""
5898  fi
5899   fi
5900 fi
5901
5902
5903
5904 test -z "$window_system" && window_system="none"
5905
5906 if test "$window_system" = "none"; then
5907   for feature in menubars scrollbars toolbars dialogs dragndrop
5908   do
5909     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
5910        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
5911     fi
5912     eval "with_${feature}=no"
5913   done
5914 else
5915   test -z "$with_toolbars" && with_toolbars=yes
5916 fi
5917
5918 if test "$with_msw" != "yes"; then
5919   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
5920   do
5921     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
5922        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
5923     fi
5924     eval "with_${feature}=no"
5925   done
5926 else
5927   :
5928 fi
5929
5930 if test "$with_x11" != "yes"; then
5931             for feature in tooltalk cde offix session xim xmu \
5932                  xface
5933   do
5934     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
5935        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
5936     fi
5937     eval "with_${feature}=no"
5938   done
5939 fi
5940
5941 bitmapdir=
5942
5943 case "$window_system" in
5944   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
5945   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
5946   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
5947 esac
5948
5949 case "$x_libraries" in *X11R4* )
5950   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
5951   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
5952 esac
5953
5954 echo "checking for session-management option" 1>&6
5955 echo "configure:5956: checking for session-management option" >&5;
5956 if test "$with_session" != "no"; then
5957   { test "$extra_verbose" = "yes" && cat << \EOF
5958     Defining HAVE_SESSION
5959 EOF
5960 cat >> confdefs.h <<\EOF
5961 #define HAVE_SESSION 1
5962 EOF
5963 }
5964
5965 fi
5966
5967 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
5968 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
5969 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
5970 echo "configure:5971: checking for X11/Xauth.h" >&5
5971
5972 cat > conftest.$ac_ext <<EOF
5973 #line 5974 "configure"
5974 #include "confdefs.h"
5975 #include <X11/Xauth.h>
5976 EOF
5977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5978 { (eval echo configure:5979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5979 ac_err=`grep -v '^ *+' conftest.out`
5980 if test -z "$ac_err"; then
5981   rm -rf conftest*
5982   eval "ac_cv_header_$ac_safe=yes"
5983 else
5984   echo "$ac_err" >&5
5985   echo "configure: failed program was:" >&5
5986   cat conftest.$ac_ext >&5
5987   rm -rf conftest*
5988   eval "ac_cv_header_$ac_safe=no"
5989 fi
5990 rm -f conftest*
5991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5992   echo "$ac_t""yes" 1>&6
5993   :
5994 else
5995   echo "$ac_t""no" 1>&6
5996 with_xauth=no
5997 fi
5998  }
5999 test -z "$with_xauth" && { 
6000 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6001 echo "configure:6002: checking for XauGetAuthByAddr in -lXau" >&5
6002 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6003
6004 xe_check_libs=" -lXau "
6005 cat > conftest.$ac_ext <<EOF
6006 #line 6007 "configure"
6007 #include "confdefs.h"
6008 /* Override any gcc2 internal prototype to avoid an error.  */
6009 /* We use char because int might match the return type of a gcc2
6010     builtin and then its argument prototype would still apply.  */
6011 char XauGetAuthByAddr();
6012
6013 int main() {
6014 XauGetAuthByAddr()
6015 ; return 0; }
6016 EOF
6017 if { (eval echo configure:6018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6018   rm -rf conftest*
6019   eval "ac_cv_lib_$ac_lib_var=yes"
6020 else
6021   echo "configure: failed program was:" >&5
6022   cat conftest.$ac_ext >&5
6023   rm -rf conftest*
6024   eval "ac_cv_lib_$ac_lib_var=no"
6025 fi
6026 rm -f conftest*
6027 xe_check_libs=""
6028
6029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6030   echo "$ac_t""yes" 1>&6
6031   :
6032 else
6033   echo "$ac_t""no" 1>&6
6034 with_xauth=no
6035 fi
6036
6037  }
6038 test -z "$with_xauth" && with_xauth=yes
6039 if test "$with_xauth" = "yes"; then
6040   { test "$extra_verbose" = "yes" && cat << \EOF
6041     Defining HAVE_XAUTH
6042 EOF
6043 cat >> confdefs.h <<\EOF
6044 #define HAVE_XAUTH 1
6045 EOF
6046 }
6047
6048   
6049 T=""
6050 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
6051 libs_xauth="$T"
6052
6053 fi
6054
6055
6056
6057
6058 if test "$with_tooltalk" != "no" ; then
6059       for dir in "" "Tt/" "desktop/" ; do
6060     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6061 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6062 echo "configure:6063: checking for ${dir}tt_c.h" >&5
6063
6064 cat > conftest.$ac_ext <<EOF
6065 #line 6066 "configure"
6066 #include "confdefs.h"
6067 #include <${dir}tt_c.h>
6068 EOF
6069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6070 { (eval echo configure:6071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6071 ac_err=`grep -v '^ *+' conftest.out`
6072 if test -z "$ac_err"; then
6073   rm -rf conftest*
6074   eval "ac_cv_header_$ac_safe=yes"
6075 else
6076   echo "$ac_err" >&5
6077   echo "configure: failed program was:" >&5
6078   cat conftest.$ac_ext >&5
6079   rm -rf conftest*
6080   eval "ac_cv_header_$ac_safe=no"
6081 fi
6082 rm -f conftest*
6083 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6084   echo "$ac_t""yes" 1>&6
6085   tt_c_h_path="${dir}tt_c.h"; break
6086 else
6087   echo "$ac_t""no" 1>&6
6088 fi
6089
6090   done
6091   if test -z "$tt_c_h_path"; then
6092     if test "$with_tooltalk" = "yes"; then
6093       (echo "$progname: Usage error:"
6094 echo " " "Unable to find required tooltalk header files."
6095 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6096     fi
6097     with_tooltalk=no
6098   fi
6099 fi
6100 if test "$with_tooltalk" != "no" ; then
6101   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6102     
6103 xe_msg_checking="for tt_message_create in -ltt"
6104 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6105 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6106 echo "configure:6107: checking "$xe_msg_checking"" >&5
6107 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6108
6109 xe_check_libs=" -ltt $extra_libs"
6110 cat > conftest.$ac_ext <<EOF
6111 #line 6112 "configure"
6112 #include "confdefs.h"
6113 /* Override any gcc2 internal prototype to avoid an error.  */
6114 /* We use char because int might match the return type of a gcc2
6115     builtin and then its argument prototype would still apply.  */
6116 char tt_message_create();
6117
6118 int main() {
6119 tt_message_create()
6120 ; return 0; }
6121 EOF
6122 if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6123   rm -rf conftest*
6124   eval "ac_cv_lib_$ac_lib_var=yes"
6125 else
6126   echo "configure: failed program was:" >&5
6127   cat conftest.$ac_ext >&5
6128   rm -rf conftest*
6129   eval "ac_cv_lib_$ac_lib_var=no"
6130 fi
6131 rm -f conftest*
6132 xe_check_libs=""
6133
6134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6135   echo "$ac_t""yes" 1>&6
6136   tt_libs="-ltt $extra_libs"; break
6137 else
6138   echo "$ac_t""no" 1>&6
6139 :
6140 fi
6141
6142
6143   done
6144   if test -z "$tt_libs"; then
6145     if test "$with_tooltalk" = "yes"; then
6146       (echo "$progname: Usage error:"
6147 echo " " "Unable to find required tooltalk libraries."
6148 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6149     fi
6150     with_tooltalk=no
6151   fi
6152 fi
6153 test -z "$with_tooltalk" && with_tooltalk=yes
6154 if test "$with_tooltalk" = "yes"; then
6155   { test "$extra_verbose" = "yes" && cat << \EOF
6156     Defining TOOLTALK
6157 EOF
6158 cat >> confdefs.h <<\EOF
6159 #define TOOLTALK 1
6160 EOF
6161 }
6162
6163   { test "$extra_verbose" = "yes" && cat << EOF
6164     Defining TT_C_H_PATH = "$tt_c_h_path"
6165 EOF
6166 cat >> confdefs.h <<EOF
6167 #define TT_C_H_PATH "$tt_c_h_path"
6168 EOF
6169 }
6170
6171   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6172   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6173    echo "    xemacs will be linked with \"tooltalk.o\""
6174  fi
6175 fi
6176
6177 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6178 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6179 echo "configure:6180: checking for Dt/Dt.h" >&5
6180
6181 cat > conftest.$ac_ext <<EOF
6182 #line 6183 "configure"
6183 #include "confdefs.h"
6184 #include <Dt/Dt.h>
6185 EOF
6186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6187 { (eval echo configure:6188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6188 ac_err=`grep -v '^ *+' conftest.out`
6189 if test -z "$ac_err"; then
6190   rm -rf conftest*
6191   eval "ac_cv_header_$ac_safe=yes"
6192 else
6193   echo "$ac_err" >&5
6194   echo "configure: failed program was:" >&5
6195   cat conftest.$ac_ext >&5
6196   rm -rf conftest*
6197   eval "ac_cv_header_$ac_safe=no"
6198 fi
6199 rm -f conftest*
6200 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6201   echo "$ac_t""yes" 1>&6
6202   :
6203 else
6204   echo "$ac_t""no" 1>&6
6205 with_cde=no
6206 fi
6207  }
6208 test -z "$with_cde" && { 
6209 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6210 echo "configure:6211: checking for DtDndDragStart in -lDtSvc" >&5
6211 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6212
6213 xe_check_libs=" -lDtSvc "
6214 cat > conftest.$ac_ext <<EOF
6215 #line 6216 "configure"
6216 #include "confdefs.h"
6217 /* Override any gcc2 internal prototype to avoid an error.  */
6218 /* We use char because int might match the return type of a gcc2
6219     builtin and then its argument prototype would still apply.  */
6220 char DtDndDragStart();
6221
6222 int main() {
6223 DtDndDragStart()
6224 ; return 0; }
6225 EOF
6226 if { (eval echo configure:6227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6227   rm -rf conftest*
6228   eval "ac_cv_lib_$ac_lib_var=yes"
6229 else
6230   echo "configure: failed program was:" >&5
6231   cat conftest.$ac_ext >&5
6232   rm -rf conftest*
6233   eval "ac_cv_lib_$ac_lib_var=no"
6234 fi
6235 rm -f conftest*
6236 xe_check_libs=""
6237
6238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6239   echo "$ac_t""yes" 1>&6
6240   :
6241 else
6242   echo "$ac_t""no" 1>&6
6243 with_cde=no
6244 fi
6245
6246  }
6247 test -z "$with_cde" && with_cde=yes
6248 if test "$with_dragndrop" = no; then
6249   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6250   with_cde=no
6251 fi
6252 if test "$with_cde" = "yes" ; then
6253   { test "$extra_verbose" = "yes" && cat << \EOF
6254     Defining HAVE_CDE
6255 EOF
6256 cat >> confdefs.h <<\EOF
6257 #define HAVE_CDE 1
6258 EOF
6259 }
6260
6261   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6262   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6263   with_tooltalk=yes # CDE requires Tooltalk
6264   need_motif=yes    # CDE requires Motif
6265 fi
6266
6267 test "$window_system" != "x11" && with_offix=no
6268 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6269   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6270   with_offix=no
6271 fi
6272 if test "$with_dragndrop" = no; then
6273   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6274   with_offix=no
6275 fi
6276 if test "$with_cde" = yes; then
6277   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6278   with_offix=no
6279 fi
6280 test -z "$with_offix" && with_offix=no
6281 if test "$with_offix" = "yes"; then
6282   { test "$extra_verbose" = "yes" && cat << \EOF
6283     Defining HAVE_OFFIX_DND
6284 EOF
6285 cat >> confdefs.h <<\EOF
6286 #define HAVE_OFFIX_DND 1
6287 EOF
6288 }
6289
6290   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6291   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6292 fi
6293
6294 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6295 echo "configure:6296: checking if drag and drop API is needed" >&5
6296 if test "$with_dragndrop" != "no" ; then
6297   if test -n "$dragndrop_proto" ; then
6298     with_dragndrop=yes
6299     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6300     { test "$extra_verbose" = "yes" && cat << \EOF
6301     Defining HAVE_DRAGNDROP
6302 EOF
6303 cat >> confdefs.h <<\EOF
6304 #define HAVE_DRAGNDROP 1
6305 EOF
6306 }
6307
6308     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6309   else
6310     with_dragndrop=no
6311     echo "$ac_t""no" 1>&6
6312   fi
6313 fi
6314
6315 echo "checking for LDAP" 1>&6
6316 echo "configure:6317: checking for LDAP" >&5
6317 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6318 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6319 echo "configure:6320: checking for ldap.h" >&5
6320
6321 cat > conftest.$ac_ext <<EOF
6322 #line 6323 "configure"
6323 #include "confdefs.h"
6324 #include <ldap.h>
6325 EOF
6326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6327 { (eval echo configure:6328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6328 ac_err=`grep -v '^ *+' conftest.out`
6329 if test -z "$ac_err"; then
6330   rm -rf conftest*
6331   eval "ac_cv_header_$ac_safe=yes"
6332 else
6333   echo "$ac_err" >&5
6334   echo "configure: failed program was:" >&5
6335   cat conftest.$ac_ext >&5
6336   rm -rf conftest*
6337   eval "ac_cv_header_$ac_safe=no"
6338 fi
6339 rm -f conftest*
6340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6341   echo "$ac_t""yes" 1>&6
6342   :
6343 else
6344   echo "$ac_t""no" 1>&6
6345 with_ldap=no
6346 fi
6347  }
6348 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6349 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6350 echo "configure:6351: checking for lber.h" >&5
6351
6352 cat > conftest.$ac_ext <<EOF
6353 #line 6354 "configure"
6354 #include "confdefs.h"
6355 #include <lber.h>
6356 EOF
6357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6358 { (eval echo configure:6359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6359 ac_err=`grep -v '^ *+' conftest.out`
6360 if test -z "$ac_err"; then
6361   rm -rf conftest*
6362   eval "ac_cv_header_$ac_safe=yes"
6363 else
6364   echo "$ac_err" >&5
6365   echo "configure: failed program was:" >&5
6366   cat conftest.$ac_ext >&5
6367   rm -rf conftest*
6368   eval "ac_cv_header_$ac_safe=no"
6369 fi
6370 rm -f conftest*
6371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6372   echo "$ac_t""yes" 1>&6
6373   :
6374 else
6375   echo "$ac_t""no" 1>&6
6376 with_ldap=no
6377 fi
6378  }
6379 if test "$with_ldap" != "no"; then
6380   test -z "$with_umich_ldap" && { 
6381 xe_msg_checking="for ldap_open in -lldap"
6382 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6383 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6384 echo "configure:6385: checking "$xe_msg_checking"" >&5
6385 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6386
6387 xe_check_libs=" -lldap -llber"
6388 cat > conftest.$ac_ext <<EOF
6389 #line 6390 "configure"
6390 #include "confdefs.h"
6391 /* Override any gcc2 internal prototype to avoid an error.  */
6392 /* We use char because int might match the return type of a gcc2
6393     builtin and then its argument prototype would still apply.  */
6394 char ldap_open();
6395
6396 int main() {
6397 ldap_open()
6398 ; return 0; }
6399 EOF
6400 if { (eval echo configure:6401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6401   rm -rf conftest*
6402   eval "ac_cv_lib_$ac_lib_var=yes"
6403 else
6404   echo "configure: failed program was:" >&5
6405   cat conftest.$ac_ext >&5
6406   rm -rf conftest*
6407   eval "ac_cv_lib_$ac_lib_var=no"
6408 fi
6409 rm -f conftest*
6410 xe_check_libs=""
6411
6412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6413   echo "$ac_t""yes" 1>&6
6414   with_umich_ldap=yes
6415 else
6416   echo "$ac_t""no" 1>&6
6417 with_umich_ldap=no
6418 fi
6419
6420  }
6421   test "$with_umich_ldap" = "no" && { 
6422 echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6
6423 echo "configure:6424: checking for ldap_set_option in -lldap10" >&5
6424 ac_lib_var=`echo ldap10'_'ldap_set_option | sed 'y%./+-%__p_%'`
6425
6426 xe_check_libs=" -lldap10 "
6427 cat > conftest.$ac_ext <<EOF
6428 #line 6429 "configure"
6429 #include "confdefs.h"
6430 /* Override any gcc2 internal prototype to avoid an error.  */
6431 /* We use char because int might match the return type of a gcc2
6432     builtin and then its argument prototype would still apply.  */
6433 char ldap_set_option();
6434
6435 int main() {
6436 ldap_set_option()
6437 ; return 0; }
6438 EOF
6439 if { (eval echo configure:6440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6440   rm -rf conftest*
6441   eval "ac_cv_lib_$ac_lib_var=yes"
6442 else
6443   echo "configure: failed program was:" >&5
6444   cat conftest.$ac_ext >&5
6445   rm -rf conftest*
6446   eval "ac_cv_lib_$ac_lib_var=no"
6447 fi
6448 rm -f conftest*
6449 xe_check_libs=""
6450
6451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6452   echo "$ac_t""yes" 1>&6
6453   with_ns_ldap=yes
6454 else
6455   echo "$ac_t""no" 1>&6
6456 with_ns_ldap=no
6457 fi
6458
6459  }
6460   test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes
6461 fi
6462 if test "$with_ldap" = "yes"; then
6463   { test "$extra_verbose" = "yes" && cat << \EOF
6464     Defining HAVE_LDAP
6465 EOF
6466 cat >> confdefs.h <<\EOF
6467 #define HAVE_LDAP 1
6468 EOF
6469 }
6470
6471   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6472    echo "    xemacs will be linked with \"eldap.o\""
6473  fi
6474   if test "$with_umich_ldap" = "yes" ; then
6475     { test "$extra_verbose" = "yes" && cat << \EOF
6476     Defining HAVE_UMICH_LDAP
6477 EOF
6478 cat >> confdefs.h <<\EOF
6479 #define HAVE_UMICH_LDAP 1
6480 EOF
6481 }
6482
6483     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6484     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6485   elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then
6486     { test "$extra_verbose" = "yes" && cat << \EOF
6487     Defining HAVE_NS_LDAP
6488 EOF
6489 cat >> confdefs.h <<\EOF
6490 #define HAVE_NS_LDAP 1
6491 EOF
6492 }
6493
6494     LIBS="-lldap10 $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap10\" to \$LIBS"; fi
6495   elif test "$with_ldap" = "yes" ; then
6496     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6497   fi
6498 fi
6499
6500
6501 if test "$window_system" != "none"; then
6502   echo "checking for graphics libraries" 1>&6
6503 echo "configure:6504: checking for graphics libraries" >&5
6504
6505     xpm_problem=""
6506   if test -z "$with_xpm"; then
6507     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6508 echo "configure:6509: checking for Xpm - no older than 3.4f" >&5
6509     xe_check_libs=-lXpm
6510     cat > conftest.$ac_ext <<EOF
6511 #line 6512 "configure"
6512 #include "confdefs.h"
6513 #include <X11/xpm.h>
6514     int main(int c, char **v) {
6515     return c == 1 ? 0 :
6516       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6517       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6518 EOF
6519 if { (eval echo configure:6520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6520 then
6521   ./conftest dummy_arg; xpm_status=$?;
6522       if test "$xpm_status" = "0"; then
6523         with_xpm=yes;
6524       else
6525         with_xpm=no;
6526         if test "$xpm_status" = "1"; then
6527           xpm_problem="Xpm library version and header file version don't match!"
6528         elif test "$xpm_status" = "2"; then
6529           xpm_problem="Xpm library version is too old!"
6530         else
6531           xpm_problem="Internal xpm detection logic error!"
6532         fi
6533         echo "
6534 *** WARNING *** $xpm_problem
6535   I'm not touching that with a 10-foot pole!
6536   If you really want to use the installed version of Xpm, rerun
6537   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
6538     fi
6539 else
6540   conftest_rc="$?"
6541   echo "configure: failed program was:" >&5
6542   cat conftest.$ac_ext >&5
6543   rm -fr conftest*
6544   with_xpm=no
6545 fi
6546 rm -fr conftest*
6547     xe_check_libs=
6548     echo "$ac_t""$with_xpm" 1>&6
6549   fi
6550   if test "$with_xpm" = "yes"; then
6551     { test "$extra_verbose" = "yes" && cat << \EOF
6552     Defining HAVE_XPM
6553 EOF
6554 cat >> confdefs.h <<\EOF
6555 #define HAVE_XPM 1
6556 EOF
6557 }
6558
6559     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6560     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6561 echo "configure:6562: checking for \"FOR_MSW\" xpm" >&5
6562     xe_check_libs=-lXpm
6563     cat > conftest.$ac_ext <<EOF
6564 #line 6565 "configure"
6565 #include "confdefs.h"
6566
6567 int main() {
6568 XpmCreatePixmapFromData()
6569 ; return 0; }
6570 EOF
6571 if { (eval echo configure:6572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6572   rm -rf conftest*
6573   xpm_for_msw=no
6574 else
6575   echo "configure: failed program was:" >&5
6576   cat conftest.$ac_ext >&5
6577   rm -rf conftest*
6578   xpm_for_msw=yes
6579 fi
6580 rm -f conftest*
6581     xe_check_libs=
6582     echo "$ac_t""$xpm_for_msw" 1>&6
6583     if test "$xpm_for_msw" = "yes"; then
6584       { test "$extra_verbose" = "yes" && cat << \EOF
6585     Defining FOR_MSW
6586 EOF
6587 cat >> confdefs.h <<\EOF
6588 #define FOR_MSW 1
6589 EOF
6590 }
6591
6592     fi
6593   fi
6594
6595         if test "$with_gif" != "no"; then
6596     with_gif="yes"
6597     { test "$extra_verbose" = "yes" && cat << \EOF
6598     Defining HAVE_GIF
6599 EOF
6600 cat >> confdefs.h <<\EOF
6601 #define HAVE_GIF 1
6602 EOF
6603 }
6604
6605     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
6606    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
6607  fi
6608   fi
6609
6610       if test "$with_png $with_tiff" != "no no"; then
6611     
6612 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
6613 echo "configure:6614: checking for inflate in -lc" >&5
6614 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
6615
6616 xe_check_libs=" -lc "
6617 cat > conftest.$ac_ext <<EOF
6618 #line 6619 "configure"
6619 #include "confdefs.h"
6620 /* Override any gcc2 internal prototype to avoid an error.  */
6621 /* We use char because int might match the return type of a gcc2
6622     builtin and then its argument prototype would still apply.  */
6623 char inflate();
6624
6625 int main() {
6626 inflate()
6627 ; return 0; }
6628 EOF
6629 if { (eval echo configure:6630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6630   rm -rf conftest*
6631   eval "ac_cv_lib_$ac_lib_var=yes"
6632 else
6633   echo "configure: failed program was:" >&5
6634   cat conftest.$ac_ext >&5
6635   rm -rf conftest*
6636   eval "ac_cv_lib_$ac_lib_var=no"
6637 fi
6638 rm -f conftest*
6639 xe_check_libs=""
6640
6641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6642   echo "$ac_t""yes" 1>&6
6643   :
6644 else
6645   echo "$ac_t""no" 1>&6
6646
6647 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
6648 echo "configure:6649: checking for inflate in -lz" >&5
6649 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
6650
6651 xe_check_libs=" -lz "
6652 cat > conftest.$ac_ext <<EOF
6653 #line 6654 "configure"
6654 #include "confdefs.h"
6655 /* Override any gcc2 internal prototype to avoid an error.  */
6656 /* We use char because int might match the return type of a gcc2
6657     builtin and then its argument prototype would still apply.  */
6658 char inflate();
6659
6660 int main() {
6661 inflate()
6662 ; return 0; }
6663 EOF
6664 if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6665   rm -rf conftest*
6666   eval "ac_cv_lib_$ac_lib_var=yes"
6667 else
6668   echo "configure: failed program was:" >&5
6669   cat conftest.$ac_ext >&5
6670   rm -rf conftest*
6671   eval "ac_cv_lib_$ac_lib_var=no"
6672 fi
6673 rm -f conftest*
6674 xe_check_libs=""
6675
6676 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6677   echo "$ac_t""yes" 1>&6
6678   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
6679 else
6680   echo "$ac_t""no" 1>&6
6681
6682 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
6683 echo "configure:6684: checking for inflate in -lgz" >&5
6684 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
6685
6686 xe_check_libs=" -lgz "
6687 cat > conftest.$ac_ext <<EOF
6688 #line 6689 "configure"
6689 #include "confdefs.h"
6690 /* Override any gcc2 internal prototype to avoid an error.  */
6691 /* We use char because int might match the return type of a gcc2
6692     builtin and then its argument prototype would still apply.  */
6693 char inflate();
6694
6695 int main() {
6696 inflate()
6697 ; return 0; }
6698 EOF
6699 if { (eval echo configure:6700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6700   rm -rf conftest*
6701   eval "ac_cv_lib_$ac_lib_var=yes"
6702 else
6703   echo "configure: failed program was:" >&5
6704   cat conftest.$ac_ext >&5
6705   rm -rf conftest*
6706   eval "ac_cv_lib_$ac_lib_var=no"
6707 fi
6708 rm -f conftest*
6709 xe_check_libs=""
6710
6711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6712   echo "$ac_t""yes" 1>&6
6713   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
6714 else
6715   echo "$ac_t""no" 1>&6
6716 fi
6717
6718
6719 fi
6720
6721
6722 fi
6723
6724
6725   fi
6726
6727     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
6728 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
6729 echo "configure:6730: checking for jpeglib.h" >&5
6730
6731 cat > conftest.$ac_ext <<EOF
6732 #line 6733 "configure"
6733 #include "confdefs.h"
6734 #include <jpeglib.h>
6735 EOF
6736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6737 { (eval echo configure:6738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6738 ac_err=`grep -v '^ *+' conftest.out`
6739 if test -z "$ac_err"; then
6740   rm -rf conftest*
6741   eval "ac_cv_header_$ac_safe=yes"
6742 else
6743   echo "$ac_err" >&5
6744   echo "configure: failed program was:" >&5
6745   cat conftest.$ac_ext >&5
6746   rm -rf conftest*
6747   eval "ac_cv_header_$ac_safe=no"
6748 fi
6749 rm -f conftest*
6750 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6751   echo "$ac_t""yes" 1>&6
6752   :
6753 else
6754   echo "$ac_t""no" 1>&6
6755 with_jpeg=no
6756 fi
6757  }
6758   test -z "$with_jpeg" && { 
6759 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
6760 echo "configure:6761: checking for jpeg_destroy_decompress in -ljpeg" >&5
6761 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
6762
6763 xe_check_libs=" -ljpeg "
6764 cat > conftest.$ac_ext <<EOF
6765 #line 6766 "configure"
6766 #include "confdefs.h"
6767 /* Override any gcc2 internal prototype to avoid an error.  */
6768 /* We use char because int might match the return type of a gcc2
6769     builtin and then its argument prototype would still apply.  */
6770 char jpeg_destroy_decompress();
6771
6772 int main() {
6773 jpeg_destroy_decompress()
6774 ; return 0; }
6775 EOF
6776 if { (eval echo configure:6777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6777   rm -rf conftest*
6778   eval "ac_cv_lib_$ac_lib_var=yes"
6779 else
6780   echo "configure: failed program was:" >&5
6781   cat conftest.$ac_ext >&5
6782   rm -rf conftest*
6783   eval "ac_cv_lib_$ac_lib_var=no"
6784 fi
6785 rm -f conftest*
6786 xe_check_libs=""
6787
6788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6789   echo "$ac_t""yes" 1>&6
6790   :
6791 else
6792   echo "$ac_t""no" 1>&6
6793 with_jpeg=no
6794 fi
6795
6796  }
6797   test -z "$with_jpeg" && with_jpeg=yes
6798   if test "$with_jpeg" = "yes"; then
6799     { test "$extra_verbose" = "yes" && cat << \EOF
6800     Defining HAVE_JPEG
6801 EOF
6802 cat >> confdefs.h <<\EOF
6803 #define HAVE_JPEG 1
6804 EOF
6805 }
6806
6807     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
6808   fi
6809
6810     png_problem=""
6811   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
6812 echo "configure:6813: checking for pow" >&5
6813
6814 cat > conftest.$ac_ext <<EOF
6815 #line 6816 "configure"
6816 #include "confdefs.h"
6817 /* System header to define __stub macros and hopefully few prototypes,
6818     which can conflict with char pow(); below.  */
6819 #include <assert.h>
6820 /* Override any gcc2 internal prototype to avoid an error.  */
6821 /* We use char because int might match the return type of a gcc2
6822     builtin and then its argument prototype would still apply.  */
6823 char pow();
6824
6825 int main() {
6826
6827 /* The GNU C library defines this for functions which it implements
6828     to always fail with ENOSYS.  Some functions are actually named
6829     something starting with __ and the normal name is an alias.  */
6830 #if defined (__stub_pow) || defined (__stub___pow)
6831 choke me
6832 #else
6833 pow();
6834 #endif
6835
6836 ; return 0; }
6837 EOF
6838 if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6839   rm -rf conftest*
6840   eval "ac_cv_func_pow=yes"
6841 else
6842   echo "configure: failed program was:" >&5
6843   cat conftest.$ac_ext >&5
6844   rm -rf conftest*
6845   eval "ac_cv_func_pow=no"
6846 fi
6847 rm -f conftest*
6848
6849 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
6850   echo "$ac_t""yes" 1>&6
6851   :
6852 else
6853   echo "$ac_t""no" 1>&6
6854 with_png=no
6855 fi
6856  }
6857   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
6858 echo $ac_n "checking for png.h""... $ac_c" 1>&6
6859 echo "configure:6860: checking for png.h" >&5
6860
6861 cat > conftest.$ac_ext <<EOF
6862 #line 6863 "configure"
6863 #include "confdefs.h"
6864 #include <png.h>
6865 EOF
6866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6867 { (eval echo configure:6868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6868 ac_err=`grep -v '^ *+' conftest.out`
6869 if test -z "$ac_err"; then
6870   rm -rf conftest*
6871   eval "ac_cv_header_$ac_safe=yes"
6872 else
6873   echo "$ac_err" >&5
6874   echo "configure: failed program was:" >&5
6875   cat conftest.$ac_ext >&5
6876   rm -rf conftest*
6877   eval "ac_cv_header_$ac_safe=no"
6878 fi
6879 rm -f conftest*
6880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6881   echo "$ac_t""yes" 1>&6
6882   :
6883 else
6884   echo "$ac_t""no" 1>&6
6885 with_png=no
6886 fi
6887  }
6888   test -z "$with_png" && { 
6889 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
6890 echo "configure:6891: checking for png_read_image in -lpng" >&5
6891 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
6892
6893 xe_check_libs=" -lpng "
6894 cat > conftest.$ac_ext <<EOF
6895 #line 6896 "configure"
6896 #include "confdefs.h"
6897 /* Override any gcc2 internal prototype to avoid an error.  */
6898 /* We use char because int might match the return type of a gcc2
6899     builtin and then its argument prototype would still apply.  */
6900 char png_read_image();
6901
6902 int main() {
6903 png_read_image()
6904 ; return 0; }
6905 EOF
6906 if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6907   rm -rf conftest*
6908   eval "ac_cv_lib_$ac_lib_var=yes"
6909 else
6910   echo "configure: failed program was:" >&5
6911   cat conftest.$ac_ext >&5
6912   rm -rf conftest*
6913   eval "ac_cv_lib_$ac_lib_var=no"
6914 fi
6915 rm -f conftest*
6916 xe_check_libs=""
6917
6918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6919   echo "$ac_t""yes" 1>&6
6920   :
6921 else
6922   echo "$ac_t""no" 1>&6
6923 with_png=no
6924 fi
6925
6926  }
6927   if test -z "$with_png"; then
6928     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
6929 echo "configure:6930: checking for workable png version information" >&5
6930     xe_check_libs="-lpng -lz"
6931     cat > conftest.$ac_ext <<EOF
6932 #line 6933 "configure"
6933 #include "confdefs.h"
6934 #include <png.h>
6935     int main(int c, char **v) {
6936     if (c == 1) return 0;
6937     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
6938     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
6939 EOF
6940 if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6941 then
6942   ./conftest dummy_arg; png_status=$?;
6943       if test "$png_status" = "0"; then
6944         with_png=yes;
6945       else
6946         with_png=no;
6947         if test "$png_status" = "1"; then
6948           png_problem="PNG library version and header file don't match!"
6949         elif test "$png_status" = "2"; then
6950           png_problem="PNG library version too old (pre 1.0.2)!"
6951         fi
6952         echo "
6953 *** WARNING *** $png_problem
6954   I'm not touching that with a 10-foot pole!
6955   If you really want to use the installed version of libPNG, rerun
6956   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
6957     fi
6958 else
6959   conftest_rc="$?"
6960   echo "configure: failed program was:" >&5
6961   cat conftest.$ac_ext >&5
6962   rm -fr conftest*
6963   with_png=no
6964 fi
6965 rm -fr conftest*
6966     xe_check_libs=
6967     echo "$ac_t""$with_png" 1>&6
6968   fi
6969   if test "$with_png" = "yes"; then
6970     { test "$extra_verbose" = "yes" && cat << \EOF
6971     Defining HAVE_PNG
6972 EOF
6973 cat >> confdefs.h <<\EOF
6974 #define HAVE_PNG 1
6975 EOF
6976 }
6977
6978     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
6979   fi
6980
6981     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
6982 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
6983 echo "configure:6984: checking for tiffio.h" >&5
6984
6985 cat > conftest.$ac_ext <<EOF
6986 #line 6987 "configure"
6987 #include "confdefs.h"
6988 #include <tiffio.h>
6989 EOF
6990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6991 { (eval echo configure:6992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6992 ac_err=`grep -v '^ *+' conftest.out`
6993 if test -z "$ac_err"; then
6994   rm -rf conftest*
6995   eval "ac_cv_header_$ac_safe=yes"
6996 else
6997   echo "$ac_err" >&5
6998   echo "configure: failed program was:" >&5
6999   cat conftest.$ac_ext >&5
7000   rm -rf conftest*
7001   eval "ac_cv_header_$ac_safe=no"
7002 fi
7003 rm -f conftest*
7004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7005   echo "$ac_t""yes" 1>&6
7006   :
7007 else
7008   echo "$ac_t""no" 1>&6
7009 with_tiff=no
7010 fi
7011  }
7012   test -z "$with_tiff" && { 
7013 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7014 echo "configure:7015: checking for TIFFClientOpen in -ltiff" >&5
7015 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7016
7017 xe_check_libs=" -ltiff "
7018 cat > conftest.$ac_ext <<EOF
7019 #line 7020 "configure"
7020 #include "confdefs.h"
7021 /* Override any gcc2 internal prototype to avoid an error.  */
7022 /* We use char because int might match the return type of a gcc2
7023     builtin and then its argument prototype would still apply.  */
7024 char TIFFClientOpen();
7025
7026 int main() {
7027 TIFFClientOpen()
7028 ; return 0; }
7029 EOF
7030 if { (eval echo configure:7031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7031   rm -rf conftest*
7032   eval "ac_cv_lib_$ac_lib_var=yes"
7033 else
7034   echo "configure: failed program was:" >&5
7035   cat conftest.$ac_ext >&5
7036   rm -rf conftest*
7037   eval "ac_cv_lib_$ac_lib_var=no"
7038 fi
7039 rm -f conftest*
7040 xe_check_libs=""
7041
7042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7043   echo "$ac_t""yes" 1>&6
7044   :
7045 else
7046   echo "$ac_t""no" 1>&6
7047 with_tiff=no
7048 fi
7049
7050  }
7051   test -z "$with_tiff" && with_tiff=yes
7052   if test "$with_tiff" = "yes"; then
7053     { test "$extra_verbose" = "yes" && cat << \EOF
7054     Defining HAVE_TIFF
7055 EOF
7056 cat >> confdefs.h <<\EOF
7057 #define HAVE_TIFF 1
7058 EOF
7059 }
7060
7061     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7062   fi
7063 fi
7064
7065
7066 if test "$with_x11" = "yes"; then
7067
7068   echo "checking for X11 graphics libraries" 1>&6
7069 echo "configure:7070: checking for X11 graphics libraries" >&5
7070
7071     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7072 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7073 echo "configure:7074: checking for compface.h" >&5
7074
7075 cat > conftest.$ac_ext <<EOF
7076 #line 7077 "configure"
7077 #include "confdefs.h"
7078 #include <compface.h>
7079 EOF
7080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7081 { (eval echo configure:7082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7082 ac_err=`grep -v '^ *+' conftest.out`
7083 if test -z "$ac_err"; then
7084   rm -rf conftest*
7085   eval "ac_cv_header_$ac_safe=yes"
7086 else
7087   echo "$ac_err" >&5
7088   echo "configure: failed program was:" >&5
7089   cat conftest.$ac_ext >&5
7090   rm -rf conftest*
7091   eval "ac_cv_header_$ac_safe=no"
7092 fi
7093 rm -f conftest*
7094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7095   echo "$ac_t""yes" 1>&6
7096   :
7097 else
7098   echo "$ac_t""no" 1>&6
7099 with_xface=no
7100 fi
7101  }
7102   test -z "$with_xface" && { 
7103 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7104 echo "configure:7105: checking for UnGenFace in -lcompface" >&5
7105 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7106
7107 xe_check_libs=" -lcompface "
7108 cat > conftest.$ac_ext <<EOF
7109 #line 7110 "configure"
7110 #include "confdefs.h"
7111 /* Override any gcc2 internal prototype to avoid an error.  */
7112 /* We use char because int might match the return type of a gcc2
7113     builtin and then its argument prototype would still apply.  */
7114 char UnGenFace();
7115
7116 int main() {
7117 UnGenFace()
7118 ; return 0; }
7119 EOF
7120 if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7121   rm -rf conftest*
7122   eval "ac_cv_lib_$ac_lib_var=yes"
7123 else
7124   echo "configure: failed program was:" >&5
7125   cat conftest.$ac_ext >&5
7126   rm -rf conftest*
7127   eval "ac_cv_lib_$ac_lib_var=no"
7128 fi
7129 rm -f conftest*
7130 xe_check_libs=""
7131
7132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7133   echo "$ac_t""yes" 1>&6
7134   : 
7135 else
7136   echo "$ac_t""no" 1>&6
7137 with_xface=no
7138 fi
7139
7140  }
7141   test -z "$with_xface" && with_xface=yes
7142   if test "$with_xface" = "yes"; then
7143     { test "$extra_verbose" = "yes" && cat << \EOF
7144     Defining HAVE_XFACE
7145 EOF
7146 cat >> confdefs.h <<\EOF
7147 #define HAVE_XFACE 1
7148 EOF
7149 }
7150
7151     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7152   fi
7153
7154     
7155 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
7156 echo "configure:7157: checking for XawScrollbarSetThumb in -lXaw" >&5
7157 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7158
7159 xe_check_libs=" -lXaw "
7160 cat > conftest.$ac_ext <<EOF
7161 #line 7162 "configure"
7162 #include "confdefs.h"
7163 /* Override any gcc2 internal prototype to avoid an error.  */
7164 /* We use char because int might match the return type of a gcc2
7165     builtin and then its argument prototype would still apply.  */
7166 char XawScrollbarSetThumb();
7167
7168 int main() {
7169 XawScrollbarSetThumb()
7170 ; return 0; }
7171 EOF
7172 if { (eval echo configure:7173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7173   rm -rf conftest*
7174   eval "ac_cv_lib_$ac_lib_var=yes"
7175 else
7176   echo "configure: failed program was:" >&5
7177   cat conftest.$ac_ext >&5
7178   rm -rf conftest*
7179   eval "ac_cv_lib_$ac_lib_var=no"
7180 fi
7181 rm -f conftest*
7182 xe_check_libs=""
7183
7184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7185   echo "$ac_t""yes" 1>&6
7186   have_xaw=yes
7187 else
7188   echo "$ac_t""no" 1>&6
7189 have_xaw=no
7190 fi
7191
7192
7193                     
7194     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7195 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7196 echo "configure:7197: checking for Xm/Xm.h" >&5
7197
7198 cat > conftest.$ac_ext <<EOF
7199 #line 7200 "configure"
7200 #include "confdefs.h"
7201 #include <Xm/Xm.h>
7202 EOF
7203 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7204 { (eval echo configure:7205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7205 ac_err=`grep -v '^ *+' conftest.out`
7206 if test -z "$ac_err"; then
7207   rm -rf conftest*
7208   eval "ac_cv_header_$ac_safe=yes"
7209 else
7210   echo "$ac_err" >&5
7211   echo "configure: failed program was:" >&5
7212   cat conftest.$ac_ext >&5
7213   rm -rf conftest*
7214   eval "ac_cv_header_$ac_safe=no"
7215 fi
7216 rm -f conftest*
7217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7218   echo "$ac_t""yes" 1>&6
7219   
7220 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7221 echo "configure:7222: checking for XmStringFree in -lXm" >&5
7222 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7223
7224 xe_check_libs=" -lXm "
7225 cat > conftest.$ac_ext <<EOF
7226 #line 7227 "configure"
7227 #include "confdefs.h"
7228 /* Override any gcc2 internal prototype to avoid an error.  */
7229 /* We use char because int might match the return type of a gcc2
7230     builtin and then its argument prototype would still apply.  */
7231 char XmStringFree();
7232
7233 int main() {
7234 XmStringFree()
7235 ; return 0; }
7236 EOF
7237 if { (eval echo configure:7238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7238   rm -rf conftest*
7239   eval "ac_cv_lib_$ac_lib_var=yes"
7240 else
7241   echo "configure: failed program was:" >&5
7242   cat conftest.$ac_ext >&5
7243   rm -rf conftest*
7244   eval "ac_cv_lib_$ac_lib_var=no"
7245 fi
7246 rm -f conftest*
7247 xe_check_libs=""
7248
7249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7250   echo "$ac_t""yes" 1>&6
7251   have_motif=yes
7252 else
7253   echo "$ac_t""no" 1>&6
7254 have_motif=no
7255 fi
7256
7257
7258 else
7259   echo "$ac_t""no" 1>&6
7260 have_motif=no
7261 fi
7262
7263
7264   if test "$have_motif" = "yes"; then
7265         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
7266 echo "configure:7267: checking for Lesstif" >&5
7267     cat > conftest.$ac_ext <<EOF
7268 #line 7269 "configure"
7269 #include "confdefs.h"
7270 #include <Xm/Xm.h>
7271 #ifdef LESSTIF_VERSION
7272 yes
7273 #endif
7274
7275 EOF
7276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7277   egrep "yes" >/dev/null 2>&1; then
7278   rm -rf conftest*
7279   have_lesstif=yes
7280 else
7281   rm -rf conftest*
7282   have_lesstif=no
7283 fi
7284 rm -f conftest*
7285
7286   echo "$ac_t""$have_lesstif" 1>&6
7287   fi
7288
7289 fi 
7290
7291 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
7292   with_menubars="lucid" ;;
7293 esac
7294 case "$with_dialogs" in "" | "yes" | "lucid" )
7295   if   test "$have_motif" = "yes"; then with_dialogs="motif"
7296   elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
7297   else with_dialogs=no
7298   fi ;;
7299 esac
7300 case "$with_scrollbars" in "" | "yes" )
7301   with_scrollbars="lucid" ;;
7302 esac
7303
7304 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars"
7305
7306 case "$all_widgets" in *athena* )
7307   { test "$extra_verbose" = "yes" && cat << \EOF
7308     Defining LWLIB_USES_ATHENA
7309 EOF
7310 cat >> confdefs.h <<\EOF
7311 #define LWLIB_USES_ATHENA 1
7312 EOF
7313 }
7314
7315   { test "$extra_verbose" = "yes" && cat << \EOF
7316     Defining NEED_ATHENA
7317 EOF
7318 cat >> confdefs.h <<\EOF
7319 #define NEED_ATHENA 1
7320 EOF
7321 }
7322
7323   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7324   libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
7325 esac
7326
7327 case "$all_widgets" in *motif* )
7328   { test "$extra_verbose" = "yes" && cat << \EOF
7329     Defining LWLIB_USES_MOTIF
7330 EOF
7331 cat >> confdefs.h <<\EOF
7332 #define LWLIB_USES_MOTIF 1
7333 EOF
7334 }
7335
7336   { test "$extra_verbose" = "yes" && cat << \EOF
7337     Defining NEED_MOTIF
7338 EOF
7339 cat >> confdefs.h <<\EOF
7340 #define NEED_MOTIF 1
7341 EOF
7342 }
7343
7344   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
7345   need_motif=yes ;;
7346 esac
7347
7348 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7349 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7350 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
7351 case "$all_widgets" in *lucid* )
7352   { test "$extra_verbose" = "yes" && cat << \EOF
7353     Defining NEED_LUCID
7354 EOF
7355 cat >> confdefs.h <<\EOF
7356 #define NEED_LUCID 1
7357 EOF
7358 }
7359
7360   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
7361 esac
7362
7363
7364
7365 case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7366     Defining LWLIB_SCROLLBARS_ATHENA
7367 EOF
7368 cat >> confdefs.h <<\EOF
7369 #define LWLIB_SCROLLBARS_ATHENA 1
7370 EOF
7371 }
7372 ;; esac
7373 case "$with_dialogs"    in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7374     Defining LWLIB_DIALOGS_ATHENA
7375 EOF
7376 cat >> confdefs.h <<\EOF
7377 #define LWLIB_DIALOGS_ATHENA 1
7378 EOF
7379 }
7380    ;; esac
7381 test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7382     Defining LWLIB_SCROLLBARS_ATHENA3D
7383 EOF
7384 cat >> confdefs.h <<\EOF
7385 #define LWLIB_SCROLLBARS_ATHENA3D 1
7386 EOF
7387 }
7388
7389 test "$with_dialogs"    = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7390     Defining LWLIB_DIALOGS_ATHENA3D
7391 EOF
7392 cat >> confdefs.h <<\EOF
7393 #define LWLIB_DIALOGS_ATHENA3D 1
7394 EOF
7395 }
7396
7397
7398 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7399     Defining HAVE_MENUBARS
7400 EOF
7401 cat >> confdefs.h <<\EOF
7402 #define HAVE_MENUBARS 1
7403 EOF
7404 }
7405
7406 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7407     Defining HAVE_SCROLLBARS
7408 EOF
7409 cat >> confdefs.h <<\EOF
7410 #define HAVE_SCROLLBARS 1
7411 EOF
7412 }
7413
7414 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7415     Defining HAVE_DIALOGS
7416 EOF
7417 cat >> confdefs.h <<\EOF
7418 #define HAVE_DIALOGS 1
7419 EOF
7420 }
7421
7422 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7423     Defining HAVE_TOOLBARS
7424 EOF
7425 cat >> confdefs.h <<\EOF
7426 #define HAVE_TOOLBARS 1
7427 EOF
7428 }
7429
7430
7431 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7432     Defining LWLIB_MENUBARS_LUCID
7433 EOF
7434 cat >> confdefs.h <<\EOF
7435 #define LWLIB_MENUBARS_LUCID 1
7436 EOF
7437 }
7438
7439 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7440     Defining LWLIB_SCROLLBARS_LUCID
7441 EOF
7442 cat >> confdefs.h <<\EOF
7443 #define LWLIB_SCROLLBARS_LUCID 1
7444 EOF
7445 }
7446
7447
7448 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7449     Defining LWLIB_MENUBARS_MOTIF
7450 EOF
7451 cat >> confdefs.h <<\EOF
7452 #define LWLIB_MENUBARS_MOTIF 1
7453 EOF
7454 }
7455
7456 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7457     Defining LWLIB_SCROLLBARS_MOTIF
7458 EOF
7459 cat >> confdefs.h <<\EOF
7460 #define LWLIB_SCROLLBARS_MOTIF 1
7461 EOF
7462 }
7463
7464 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7465     Defining LWLIB_DIALOGS_MOTIF
7466 EOF
7467 cat >> confdefs.h <<\EOF
7468 #define LWLIB_DIALOGS_MOTIF 1
7469 EOF
7470 }
7471
7472
7473 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
7474    echo "    xemacs will be linked with \"menubar.o\""
7475  fi
7476 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
7477    echo "    xemacs will be linked with \"scrollbar.o\""
7478  fi
7479 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
7480    echo "    xemacs will be linked with \"dialog.o\""
7481  fi
7482 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
7483    echo "    xemacs will be linked with \"toolbar.o\""
7484  fi
7485 test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui.o" &&  if test "$extra_verbose" = "yes"; then
7486    echo "    xemacs will be linked with \"gui.o\""
7487  fi
7488
7489 if test "$with_x11" = "yes"; then
7490   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
7491    echo "    xemacs will be linked with \"menubar-x.o\""
7492  fi
7493   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7494    echo "    xemacs will be linked with \"scrollbar-x.o\""
7495  fi
7496   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
7497    echo "    xemacs will be linked with \"dialog-x.o\""
7498  fi
7499   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7500    echo "    xemacs will be linked with \"toolbar-x.o\""
7501  fi
7502   test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
7503    echo "    xemacs will be linked with \"gui-x.o\""
7504  fi
7505 else
7506   if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then
7507     echo "Attempt to Build NAS sound without X"
7508     echo "Please remove NAS configuration or build with X"
7509     exit 1
7510   fi
7511 fi
7512
7513 test "$use_minimal_tagbits" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
7514     Defining USE_MINIMAL_TAGBITS
7515 EOF
7516 cat >> confdefs.h <<\EOF
7517 #define USE_MINIMAL_TAGBITS 1
7518 EOF
7519 }
7520
7521 test "$use_indexed_lrecord_implementation" = "yes" && \
7522   { test "$extra_verbose" = "yes" && cat << \EOF
7523     Defining USE_INDEXED_LRECORD_IMPLEMENTATION
7524 EOF
7525 cat >> confdefs.h <<\EOF
7526 #define USE_INDEXED_LRECORD_IMPLEMENTATION 1
7527 EOF
7528 }
7529
7530
7531
7532 test -z "$with_mule" && with_mule=no
7533 test -z "$with_file_coding" && with_file_coding=no
7534
7535
7536 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
7537   { test "$extra_verbose" = "yes" && cat << \EOF
7538     Defining FILE_CODING
7539 EOF
7540 cat >> confdefs.h <<\EOF
7541 #define FILE_CODING 1
7542 EOF
7543 }
7544
7545   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7546    echo "    xemacs will be linked with \"file-coding.o\""
7547  fi
7548 fi
7549
7550 if test "$with_mule" = "yes" ; then
7551   echo "checking for Mule-related features" 1>&6
7552 echo "configure:7553: checking for Mule-related features" >&5
7553   { test "$extra_verbose" = "yes" && cat << \EOF
7554     Defining MULE
7555 EOF
7556 cat >> confdefs.h <<\EOF
7557 #define MULE 1
7558 EOF
7559 }
7560
7561   { test "$extra_verbose" = "yes" && cat << \EOF
7562     Defining FILE_CODING
7563 EOF
7564 cat >> confdefs.h <<\EOF
7565 #define FILE_CODING 1
7566 EOF
7567 }
7568
7569   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7570    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o\""
7571  fi
7572
7573     for ac_hdr in libintl.h
7574 do
7575 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7576 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7577 echo "configure:7578: checking for $ac_hdr" >&5
7578
7579 cat > conftest.$ac_ext <<EOF
7580 #line 7581 "configure"
7581 #include "confdefs.h"
7582 #include <$ac_hdr>
7583 EOF
7584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7585 { (eval echo configure:7586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7586 ac_err=`grep -v '^ *+' conftest.out`
7587 if test -z "$ac_err"; then
7588   rm -rf conftest*
7589   eval "ac_cv_header_$ac_safe=yes"
7590 else
7591   echo "$ac_err" >&5
7592   echo "configure: failed program was:" >&5
7593   cat conftest.$ac_ext >&5
7594   rm -rf conftest*
7595   eval "ac_cv_header_$ac_safe=no"
7596 fi
7597 rm -f conftest*
7598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7599   echo "$ac_t""yes" 1>&6
7600     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7601   { test "$extra_verbose" = "yes" && cat << EOF
7602     Defining $ac_tr_hdr
7603 EOF
7604 cat >> confdefs.h <<EOF
7605 #define $ac_tr_hdr 1
7606 EOF
7607 }
7608  
7609 else
7610   echo "$ac_t""no" 1>&6
7611 fi
7612 done
7613
7614   
7615 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
7616 echo "configure:7617: checking for strerror in -lintl" >&5
7617 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
7618
7619 xe_check_libs=" -lintl "
7620 cat > conftest.$ac_ext <<EOF
7621 #line 7622 "configure"
7622 #include "confdefs.h"
7623 /* Override any gcc2 internal prototype to avoid an error.  */
7624 /* We use char because int might match the return type of a gcc2
7625     builtin and then its argument prototype would still apply.  */
7626 char strerror();
7627
7628 int main() {
7629 strerror()
7630 ; return 0; }
7631 EOF
7632 if { (eval echo configure:7633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7633   rm -rf conftest*
7634   eval "ac_cv_lib_$ac_lib_var=yes"
7635 else
7636   echo "configure: failed program was:" >&5
7637   cat conftest.$ac_ext >&5
7638   rm -rf conftest*
7639   eval "ac_cv_lib_$ac_lib_var=no"
7640 fi
7641 rm -f conftest*
7642 xe_check_libs=""
7643
7644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7645   echo "$ac_t""yes" 1>&6
7646     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7647     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7648   { test "$extra_verbose" = "yes" && cat << EOF
7649     Defining $ac_tr_lib
7650 EOF
7651 cat >> confdefs.h <<EOF
7652 #define $ac_tr_lib 1
7653 EOF
7654 }
7655
7656   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
7657
7658 else
7659   echo "$ac_t""no" 1>&6
7660 fi
7661
7662
7663
7664   echo "checking for Mule input methods" 1>&6
7665 echo "configure:7666: checking for Mule input methods" >&5
7666         case "$with_xim" in "" | "yes" )
7667     echo "checking for XIM" 1>&6
7668 echo "configure:7669: checking for XIM" >&5
7669         if test "$have_lesstif" = "yes"; then with_xim=xlib
7670     else 
7671 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
7672 echo "configure:7673: checking for XmImMbLookupString in -lXm" >&5
7673 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
7674
7675 xe_check_libs=" -lXm "
7676 cat > conftest.$ac_ext <<EOF
7677 #line 7678 "configure"
7678 #include "confdefs.h"
7679 /* Override any gcc2 internal prototype to avoid an error.  */
7680 /* We use char because int might match the return type of a gcc2
7681     builtin and then its argument prototype would still apply.  */
7682 char XmImMbLookupString();
7683
7684 int main() {
7685 XmImMbLookupString()
7686 ; return 0; }
7687 EOF
7688 if { (eval echo configure:7689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7689   rm -rf conftest*
7690   eval "ac_cv_lib_$ac_lib_var=yes"
7691 else
7692   echo "configure: failed program was:" >&5
7693   cat conftest.$ac_ext >&5
7694   rm -rf conftest*
7695   eval "ac_cv_lib_$ac_lib_var=no"
7696 fi
7697 rm -f conftest*
7698 xe_check_libs=""
7699
7700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7701   echo "$ac_t""yes" 1>&6
7702   with_xim=motif
7703 else
7704   echo "$ac_t""no" 1>&6
7705 with_xim=xlib
7706 fi
7707
7708
7709     fi
7710   esac
7711   if test "$with_xim" != "no"; then
7712     { test "$extra_verbose" = "yes" && cat << \EOF
7713     Defining HAVE_XIM
7714 EOF
7715 cat >> confdefs.h <<\EOF
7716 #define HAVE_XIM 1
7717 EOF
7718 }
7719
7720     if test "$with_xim" = "xlib"; then
7721       { test "$extra_verbose" = "yes" && cat << \EOF
7722     Defining XIM_XLIB
7723 EOF
7724 cat >> confdefs.h <<\EOF
7725 #define XIM_XLIB 1
7726 EOF
7727 }
7728
7729       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
7730    echo "    xemacs will be linked with \"input-method-xlib.o\""
7731  fi
7732     fi
7733     if test "$with_xim" = "motif"; then
7734       { test "$extra_verbose" = "yes" && cat << \EOF
7735     Defining XIM_MOTIF
7736 EOF
7737 cat >> confdefs.h <<\EOF
7738 #define XIM_MOTIF 1
7739 EOF
7740 }
7741
7742       need_motif=yes
7743       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
7744    echo "    xemacs will be linked with \"input-method-motif.o\""
7745  fi
7746     fi
7747     if test "$with_xim" = "motif"; then
7748       with_xfs=no
7749     fi
7750   fi
7751
7752     if test "$with_xfs" = "yes" ; then
7753     echo "checking for XFontSet" 1>&6
7754 echo "configure:7755: checking for XFontSet" >&5
7755     
7756 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
7757 echo "configure:7758: checking for XmbDrawString in -lX11" >&5
7758 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
7759
7760 xe_check_libs=" -lX11 "
7761 cat > conftest.$ac_ext <<EOF
7762 #line 7763 "configure"
7763 #include "confdefs.h"
7764 /* Override any gcc2 internal prototype to avoid an error.  */
7765 /* We use char because int might match the return type of a gcc2
7766     builtin and then its argument prototype would still apply.  */
7767 char XmbDrawString();
7768
7769 int main() {
7770 XmbDrawString()
7771 ; return 0; }
7772 EOF
7773 if { (eval echo configure:7774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7774   rm -rf conftest*
7775   eval "ac_cv_lib_$ac_lib_var=yes"
7776 else
7777   echo "configure: failed program was:" >&5
7778   cat conftest.$ac_ext >&5
7779   rm -rf conftest*
7780   eval "ac_cv_lib_$ac_lib_var=no"
7781 fi
7782 rm -f conftest*
7783 xe_check_libs=""
7784
7785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7786   echo "$ac_t""yes" 1>&6
7787   :
7788 else
7789   echo "$ac_t""no" 1>&6
7790 with_xfs=no
7791 fi
7792
7793
7794     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
7795       { test "$extra_verbose" = "yes" && cat << \EOF
7796     Defining USE_XFONTSET
7797 EOF
7798 cat >> confdefs.h <<\EOF
7799 #define USE_XFONTSET 1
7800 EOF
7801 }
7802
7803       if test "$with_xim" = "no" ; then
7804         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
7805    echo "    xemacs will be linked with \"input-method-xfs.o\""
7806  fi
7807       fi
7808     fi
7809   fi 
7810     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
7811   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
7812 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
7813 echo "configure:7814: checking for wnn/jllib.h" >&5
7814
7815 cat > conftest.$ac_ext <<EOF
7816 #line 7817 "configure"
7817 #include "confdefs.h"
7818 #include <wnn/jllib.h>
7819 EOF
7820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7821 { (eval echo configure:7822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7822 ac_err=`grep -v '^ *+' conftest.out`
7823 if test -z "$ac_err"; then
7824   rm -rf conftest*
7825   eval "ac_cv_header_$ac_safe=yes"
7826 else
7827   echo "$ac_err" >&5
7828   echo "configure: failed program was:" >&5
7829   cat conftest.$ac_ext >&5
7830   rm -rf conftest*
7831   eval "ac_cv_header_$ac_safe=no"
7832 fi
7833 rm -f conftest*
7834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7835   echo "$ac_t""yes" 1>&6
7836   :
7837 else
7838   echo "$ac_t""no" 1>&6
7839 with_wnn=no
7840 fi
7841  }
7842     if test "$with_wnn" != "no"; then
7843     for ac_func in crypt
7844 do
7845 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7846 echo "configure:7847: checking for $ac_func" >&5
7847
7848 cat > conftest.$ac_ext <<EOF
7849 #line 7850 "configure"
7850 #include "confdefs.h"
7851 /* System header to define __stub macros and hopefully few prototypes,
7852     which can conflict with char $ac_func(); below.  */
7853 #include <assert.h>
7854 /* Override any gcc2 internal prototype to avoid an error.  */
7855 /* We use char because int might match the return type of a gcc2
7856     builtin and then its argument prototype would still apply.  */
7857 char $ac_func();
7858
7859 int main() {
7860
7861 /* The GNU C library defines this for functions which it implements
7862     to always fail with ENOSYS.  Some functions are actually named
7863     something starting with __ and the normal name is an alias.  */
7864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7865 choke me
7866 #else
7867 $ac_func();
7868 #endif
7869
7870 ; return 0; }
7871 EOF
7872 if { (eval echo configure:7873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7873   rm -rf conftest*
7874   eval "ac_cv_func_$ac_func=yes"
7875 else
7876   echo "configure: failed program was:" >&5
7877   cat conftest.$ac_ext >&5
7878   rm -rf conftest*
7879   eval "ac_cv_func_$ac_func=no"
7880 fi
7881 rm -f conftest*
7882
7883 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7884   echo "$ac_t""yes" 1>&6
7885     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7886   { test "$extra_verbose" = "yes" && cat << EOF
7887     Defining $ac_tr_func
7888 EOF
7889 cat >> confdefs.h <<EOF
7890 #define $ac_tr_func 1
7891 EOF
7892 }
7893  
7894 else
7895   echo "$ac_t""no" 1>&6
7896 fi
7897 done
7898
7899     test "$ac_cv_func_crypt" != "yes" && { 
7900 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
7901 echo "configure:7902: checking for crypt in -lcrypt" >&5
7902 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
7903
7904 xe_check_libs=" -lcrypt "
7905 cat > conftest.$ac_ext <<EOF
7906 #line 7907 "configure"
7907 #include "confdefs.h"
7908 /* Override any gcc2 internal prototype to avoid an error.  */
7909 /* We use char because int might match the return type of a gcc2
7910     builtin and then its argument prototype would still apply.  */
7911 char crypt();
7912
7913 int main() {
7914 crypt()
7915 ; return 0; }
7916 EOF
7917 if { (eval echo configure:7918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7918   rm -rf conftest*
7919   eval "ac_cv_lib_$ac_lib_var=yes"
7920 else
7921   echo "configure: failed program was:" >&5
7922   cat conftest.$ac_ext >&5
7923   rm -rf conftest*
7924   eval "ac_cv_lib_$ac_lib_var=no"
7925 fi
7926 rm -f conftest*
7927 xe_check_libs=""
7928
7929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7930   echo "$ac_t""yes" 1>&6
7931     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7932     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7933   { test "$extra_verbose" = "yes" && cat << EOF
7934     Defining $ac_tr_lib
7935 EOF
7936 cat >> confdefs.h <<EOF
7937 #define $ac_tr_lib 1
7938 EOF
7939 }
7940
7941   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
7942
7943 else
7944   echo "$ac_t""no" 1>&6
7945 fi
7946
7947  }
7948   fi
7949     test -z "$with_wnn" && { 
7950 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
7951 echo "configure:7952: checking for jl_dic_list_e in -lwnn" >&5
7952 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
7953
7954 xe_check_libs=" -lwnn "
7955 cat > conftest.$ac_ext <<EOF
7956 #line 7957 "configure"
7957 #include "confdefs.h"
7958 /* Override any gcc2 internal prototype to avoid an error.  */
7959 /* We use char because int might match the return type of a gcc2
7960     builtin and then its argument prototype would still apply.  */
7961 char jl_dic_list_e();
7962
7963 int main() {
7964 jl_dic_list_e()
7965 ; return 0; }
7966 EOF
7967 if { (eval echo configure:7968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7968   rm -rf conftest*
7969   eval "ac_cv_lib_$ac_lib_var=yes"
7970 else
7971   echo "configure: failed program was:" >&5
7972   cat conftest.$ac_ext >&5
7973   rm -rf conftest*
7974   eval "ac_cv_lib_$ac_lib_var=no"
7975 fi
7976 rm -f conftest*
7977 xe_check_libs=""
7978
7979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7980   echo "$ac_t""yes" 1>&6
7981   :
7982 else
7983   echo "$ac_t""no" 1>&6
7984 with_wnn=no
7985 fi
7986
7987  }
7988   test -z "$with_wnn" && with_wnn=yes
7989   if test "$with_wnn" = "yes"; then
7990     { test "$extra_verbose" = "yes" && cat << \EOF
7991     Defining HAVE_WNN
7992 EOF
7993 cat >> confdefs.h <<\EOF
7994 #define HAVE_WNN 1
7995 EOF
7996 }
7997
7998     libs_x="-lwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lwnn\" to \$libs_x"; fi
7999     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
8000    echo "    xemacs will be linked with \"mule-wnnfns.o\""
8001  fi
8002     if test "$with_wnn6" != "no"; then
8003       
8004 echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6
8005 echo "configure:8006: checking for jl_fi_dic_list in -lwnn" >&5
8006 ac_lib_var=`echo wnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
8007
8008 xe_check_libs=" -lwnn "
8009 cat > conftest.$ac_ext <<EOF
8010 #line 8011 "configure"
8011 #include "confdefs.h"
8012 /* Override any gcc2 internal prototype to avoid an error.  */
8013 /* We use char because int might match the return type of a gcc2
8014     builtin and then its argument prototype would still apply.  */
8015 char jl_fi_dic_list();
8016
8017 int main() {
8018 jl_fi_dic_list()
8019 ; return 0; }
8020 EOF
8021 if { (eval echo configure:8022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8022   rm -rf conftest*
8023   eval "ac_cv_lib_$ac_lib_var=yes"
8024 else
8025   echo "configure: failed program was:" >&5
8026   cat conftest.$ac_ext >&5
8027   rm -rf conftest*
8028   eval "ac_cv_lib_$ac_lib_var=no"
8029 fi
8030 rm -f conftest*
8031 xe_check_libs=""
8032
8033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8034   echo "$ac_t""yes" 1>&6
8035   with_wnn6=yes
8036 else
8037   echo "$ac_t""no" 1>&6
8038 fi
8039
8040
8041       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
8042     Defining WNN6
8043 EOF
8044 cat >> confdefs.h <<\EOF
8045 #define WNN6 1
8046 EOF
8047 }
8048
8049     fi
8050   fi
8051
8052     canna_includes_found=no
8053   if test "$with_canna" != "no"; then
8054     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8055 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8056 echo "configure:8057: checking for canna/jrkanji.h" >&5
8057
8058 cat > conftest.$ac_ext <<EOF
8059 #line 8060 "configure"
8060 #include "confdefs.h"
8061 #include <canna/jrkanji.h>
8062 EOF
8063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8064 { (eval echo configure:8065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8065 ac_err=`grep -v '^ *+' conftest.out`
8066 if test -z "$ac_err"; then
8067   rm -rf conftest*
8068   eval "ac_cv_header_$ac_safe=yes"
8069 else
8070   echo "$ac_err" >&5
8071   echo "configure: failed program was:" >&5
8072   cat conftest.$ac_ext >&5
8073   rm -rf conftest*
8074   eval "ac_cv_header_$ac_safe=no"
8075 fi
8076 rm -f conftest*
8077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8078   echo "$ac_t""yes" 1>&6
8079   canna_includes_found=yes
8080 else
8081   echo "$ac_t""no" 1>&6
8082 fi
8083
8084   fi
8085   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
8086       -d "/usr/local/canna/include"; then
8087     save_c_switch_site="$c_switch_site"
8088     c_switch_site="$c_switch_site -I/usr/local/canna/include"
8089     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8090 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8091 echo "configure:8092: checking for canna/jrkanji.h" >&5
8092
8093 cat > conftest.$ac_ext <<EOF
8094 #line 8095 "configure"
8095 #include "confdefs.h"
8096 #include <canna/jrkanji.h>
8097 EOF
8098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8099 { (eval echo configure:8100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8100 ac_err=`grep -v '^ *+' conftest.out`
8101 if test -z "$ac_err"; then
8102   rm -rf conftest*
8103   eval "ac_cv_header_$ac_safe=yes"
8104 else
8105   echo "$ac_err" >&5
8106   echo "configure: failed program was:" >&5
8107   cat conftest.$ac_ext >&5
8108   rm -rf conftest*
8109   eval "ac_cv_header_$ac_safe=no"
8110 fi
8111 rm -f conftest*
8112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8113   echo "$ac_t""yes" 1>&6
8114   canna_includes_found=yes
8115 else
8116   echo "$ac_t""no" 1>&6
8117 fi
8118
8119     if test "$canna_includes_found" != "yes"; then
8120       c_switch_site="$save_c_switch_site"
8121       with_canna="no"
8122     fi
8123   fi
8124
8125   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
8126 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
8127 echo "configure:8128: checking for canna/RK.h" >&5
8128
8129 cat > conftest.$ac_ext <<EOF
8130 #line 8131 "configure"
8131 #include "confdefs.h"
8132 #include <canna/RK.h>
8133 EOF
8134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8135 { (eval echo configure:8136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8136 ac_err=`grep -v '^ *+' conftest.out`
8137 if test -z "$ac_err"; then
8138   rm -rf conftest*
8139   eval "ac_cv_header_$ac_safe=yes"
8140 else
8141   echo "$ac_err" >&5
8142   echo "configure: failed program was:" >&5
8143   cat conftest.$ac_ext >&5
8144   rm -rf conftest*
8145   eval "ac_cv_header_$ac_safe=no"
8146 fi
8147 rm -f conftest*
8148 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8149   echo "$ac_t""yes" 1>&6
8150   :
8151 else
8152   echo "$ac_t""no" 1>&6
8153 with_canna=no
8154 fi
8155  }
8156   test -z "$with_canna" && { 
8157 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
8158 echo "configure:8159: checking for RkBgnBun in -lRKC" >&5
8159 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
8160
8161 xe_check_libs=" -lRKC "
8162 cat > conftest.$ac_ext <<EOF
8163 #line 8164 "configure"
8164 #include "confdefs.h"
8165 /* Override any gcc2 internal prototype to avoid an error.  */
8166 /* We use char because int might match the return type of a gcc2
8167     builtin and then its argument prototype would still apply.  */
8168 char RkBgnBun();
8169
8170 int main() {
8171 RkBgnBun()
8172 ; return 0; }
8173 EOF
8174 if { (eval echo configure:8175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8175   rm -rf conftest*
8176   eval "ac_cv_lib_$ac_lib_var=yes"
8177 else
8178   echo "configure: failed program was:" >&5
8179   cat conftest.$ac_ext >&5
8180   rm -rf conftest*
8181   eval "ac_cv_lib_$ac_lib_var=no"
8182 fi
8183 rm -f conftest*
8184 xe_check_libs=""
8185
8186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8187   echo "$ac_t""yes" 1>&6
8188   :
8189 else
8190   echo "$ac_t""no" 1>&6
8191 with_canna=no
8192 fi
8193
8194  }
8195   test -z "$with_canna" && { 
8196 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
8197 echo "configure:8198: checking for jrKanjiControl in -lcanna" >&5
8198 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
8199
8200 xe_check_libs=" -lcanna "
8201 cat > conftest.$ac_ext <<EOF
8202 #line 8203 "configure"
8203 #include "confdefs.h"
8204 /* Override any gcc2 internal prototype to avoid an error.  */
8205 /* We use char because int might match the return type of a gcc2
8206     builtin and then its argument prototype would still apply.  */
8207 char jrKanjiControl();
8208
8209 int main() {
8210 jrKanjiControl()
8211 ; return 0; }
8212 EOF
8213 if { (eval echo configure:8214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8214   rm -rf conftest*
8215   eval "ac_cv_lib_$ac_lib_var=yes"
8216 else
8217   echo "configure: failed program was:" >&5
8218   cat conftest.$ac_ext >&5
8219   rm -rf conftest*
8220   eval "ac_cv_lib_$ac_lib_var=no"
8221 fi
8222 rm -f conftest*
8223 xe_check_libs=""
8224
8225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8226   echo "$ac_t""yes" 1>&6
8227   :
8228 else
8229   echo "$ac_t""no" 1>&6
8230 with_canna=no
8231 fi
8232
8233  }
8234   test -z "$with_canna" && with_canna=yes
8235   if test "$with_canna" = "yes"; then
8236     { test "$extra_verbose" = "yes" && cat << \EOF
8237     Defining HAVE_CANNA
8238 EOF
8239 cat >> confdefs.h <<\EOF
8240 #define HAVE_CANNA 1
8241 EOF
8242 }
8243
8244     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
8245     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
8246    echo "    xemacs will be linked with \"mule-canna.o\""
8247  fi
8248   fi
8249
8250 else   for feature in xim canna wnn; do
8251     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
8252       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
8253     fi
8254     eval "with_${feature}=no"
8255   done
8256 fi 
8257
8258 if test "$need_motif" = "yes" ; then
8259   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
8260     
8261 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
8262 echo "configure:8263: checking for layout_object_getvalue in -li18n" >&5
8263 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
8264
8265 xe_check_libs=" -li18n "
8266 cat > conftest.$ac_ext <<EOF
8267 #line 8268 "configure"
8268 #include "confdefs.h"
8269 /* Override any gcc2 internal prototype to avoid an error.  */
8270 /* We use char because int might match the return type of a gcc2
8271     builtin and then its argument prototype would still apply.  */
8272 char layout_object_getvalue();
8273
8274 int main() {
8275 layout_object_getvalue()
8276 ; return 0; }
8277 EOF
8278 if { (eval echo configure:8279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8279   rm -rf conftest*
8280   eval "ac_cv_lib_$ac_lib_var=yes"
8281 else
8282   echo "configure: failed program was:" >&5
8283   cat conftest.$ac_ext >&5
8284   rm -rf conftest*
8285   eval "ac_cv_lib_$ac_lib_var=no"
8286 fi
8287 rm -f conftest*
8288 xe_check_libs=""
8289
8290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8291   echo "$ac_t""yes" 1>&6
8292   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
8293 else
8294   echo "$ac_t""no" 1>&6
8295 fi
8296
8297
8298   
8299 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
8300     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8301   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8302   
8303         runpath="" runpath_dirs=""
8304   if test -n "$LD_RUN_PATH"; then
8305     runpath="$LD_RUN_PATH"
8306   elif test "$GCC" = "yes"; then
8307         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
8308     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
8309     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
8310     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
8311       case "$arg" in P,* | -L* | -R* )
8312         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
8313           {
8314 xe_runpath_dir="$dir"
8315   test "$xe_runpath_dir" != "/lib"     -a \
8316         "$xe_runpath_dir" != "/usr/lib" -a \
8317         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8318   eval "$xe_add_unique_runpath_dir"
8319 }
8320         done ;;
8321       esac
8322     done
8323     ld_switch_run="$ld_switch_run_save"
8324     rm -f conftest*
8325   else
8326         for arg in $ld_switch_site $ld_switch_x_site; do
8327       case "$arg" in -L*) {
8328 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
8329   test "$xe_runpath_dir" != "/lib"     -a \
8330         "$xe_runpath_dir" != "/usr/lib" -a \
8331         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8332   eval "$xe_add_unique_runpath_dir"
8333 };; esac
8334     done
8335         if test "$opsys $need_motif" = "sol2 yes"; then
8336       xe_runpath_dir="/opt/SUNWdt/lib";
8337       eval "$xe_add_unique_runpath_dir";
8338     fi
8339   fi 
8340   if test -n "$runpath"; then
8341     ld_switch_run="${dash_r}${runpath}"
8342     
8343 if test "$GCC" = "yes"; then
8344   set x $ld_switch_run; shift; ld_switch_run=""
8345   while test -n "$1"; do
8346     case $1 in
8347       -L  | -l  | -u         ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
8348       -L* | -l* | -u* | -Wl* ) ld_switch_run="$ld_switch_run $1" ;;
8349       -Xlinker* ) ;;
8350       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
8351     esac
8352     shift
8353   done
8354 fi
8355     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
8356   fi
8357 fi
8358
8359 fi
8360
8361 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf
8362 do
8363 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8364 echo "configure:8365: checking for $ac_func" >&5
8365
8366 cat > conftest.$ac_ext <<EOF
8367 #line 8368 "configure"
8368 #include "confdefs.h"
8369 /* System header to define __stub macros and hopefully few prototypes,
8370     which can conflict with char $ac_func(); below.  */
8371 #include <assert.h>
8372 /* Override any gcc2 internal prototype to avoid an error.  */
8373 /* We use char because int might match the return type of a gcc2
8374     builtin and then its argument prototype would still apply.  */
8375 char $ac_func();
8376
8377 int main() {
8378
8379 /* The GNU C library defines this for functions which it implements
8380     to always fail with ENOSYS.  Some functions are actually named
8381     something starting with __ and the normal name is an alias.  */
8382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8383 choke me
8384 #else
8385 $ac_func();
8386 #endif
8387
8388 ; return 0; }
8389 EOF
8390 if { (eval echo configure:8391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8391   rm -rf conftest*
8392   eval "ac_cv_func_$ac_func=yes"
8393 else
8394   echo "configure: failed program was:" >&5
8395   cat conftest.$ac_ext >&5
8396   rm -rf conftest*
8397   eval "ac_cv_func_$ac_func=no"
8398 fi
8399 rm -f conftest*
8400
8401 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8402   echo "$ac_t""yes" 1>&6
8403     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8404   { test "$extra_verbose" = "yes" && cat << EOF
8405     Defining $ac_tr_func
8406 EOF
8407 cat >> confdefs.h <<EOF
8408 #define $ac_tr_func 1
8409 EOF
8410 }
8411  
8412 else
8413   echo "$ac_t""no" 1>&6
8414 fi
8415 done
8416
8417
8418
8419 case "$opsys" in
8420   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8421    echo "    xemacs will be linked with \"realpath.o\""
8422  fi ;;
8423   * )
8424     for ac_func in realpath
8425 do
8426 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8427 echo "configure:8428: checking for $ac_func" >&5
8428
8429 cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432 /* System header to define __stub macros and hopefully few prototypes,
8433     which can conflict with char $ac_func(); below.  */
8434 #include <assert.h>
8435 /* Override any gcc2 internal prototype to avoid an error.  */
8436 /* We use char because int might match the return type of a gcc2
8437     builtin and then its argument prototype would still apply.  */
8438 char $ac_func();
8439
8440 int main() {
8441
8442 /* The GNU C library defines this for functions which it implements
8443     to always fail with ENOSYS.  Some functions are actually named
8444     something starting with __ and the normal name is an alias.  */
8445 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8446 choke me
8447 #else
8448 $ac_func();
8449 #endif
8450
8451 ; return 0; }
8452 EOF
8453 if { (eval echo configure:8454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8454   rm -rf conftest*
8455   eval "ac_cv_func_$ac_func=yes"
8456 else
8457   echo "configure: failed program was:" >&5
8458   cat conftest.$ac_ext >&5
8459   rm -rf conftest*
8460   eval "ac_cv_func_$ac_func=no"
8461 fi
8462 rm -f conftest*
8463
8464 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8465   echo "$ac_t""yes" 1>&6
8466     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8467   { test "$extra_verbose" = "yes" && cat << EOF
8468     Defining $ac_tr_func
8469 EOF
8470 cat >> confdefs.h <<EOF
8471 #define $ac_tr_func 1
8472 EOF
8473 }
8474  
8475 else
8476   echo "$ac_t""no" 1>&6
8477 fi
8478 done
8479
8480     test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8481    echo "    xemacs will be linked with \"realpath.o\""
8482  fi ;;
8483 esac
8484
8485 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
8486 echo "configure:8487: checking whether netdb declares h_errno" >&5
8487 cat > conftest.$ac_ext <<EOF
8488 #line 8489 "configure"
8489 #include "confdefs.h"
8490 #include <netdb.h>
8491 int main() {
8492 return h_errno;
8493 ; return 0; }
8494 EOF
8495 if { (eval echo configure:8496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8496   rm -rf conftest*
8497   echo "$ac_t""yes" 1>&6
8498    { test "$extra_verbose" = "yes" && cat << \EOF
8499     Defining HAVE_H_ERRNO
8500 EOF
8501 cat >> confdefs.h <<\EOF
8502 #define HAVE_H_ERRNO 1
8503 EOF
8504 }
8505
8506 else
8507   echo "configure: failed program was:" >&5
8508   cat conftest.$ac_ext >&5
8509   rm -rf conftest*
8510   echo "$ac_t""no" 1>&6
8511 fi
8512 rm -f conftest*
8513
8514 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
8515 echo "configure:8516: checking for sigsetjmp" >&5
8516 cat > conftest.$ac_ext <<EOF
8517 #line 8518 "configure"
8518 #include "confdefs.h"
8519 #include <setjmp.h>
8520 int main() {
8521 sigjmp_buf bar; sigsetjmp (bar, 0);
8522 ; return 0; }
8523 EOF
8524 if { (eval echo configure:8525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8525   rm -rf conftest*
8526   echo "$ac_t""yes" 1>&6
8527    { test "$extra_verbose" = "yes" && cat << \EOF
8528     Defining HAVE_SIGSETJMP
8529 EOF
8530 cat >> confdefs.h <<\EOF
8531 #define HAVE_SIGSETJMP 1
8532 EOF
8533 }
8534
8535 else
8536   echo "configure: failed program was:" >&5
8537   cat conftest.$ac_ext >&5
8538   rm -rf conftest*
8539   echo "$ac_t""no" 1>&6
8540 fi
8541 rm -f conftest*
8542
8543 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
8544 echo "configure:8545: checking whether localtime caches TZ" >&5
8545
8546 if test "$ac_cv_func_tzset" = "yes"; then
8547 cat > conftest.$ac_ext <<EOF
8548 #line 8549 "configure"
8549 #include "confdefs.h"
8550 #include <time.h>
8551 #if STDC_HEADERS
8552 # include <stdlib.h>
8553 #endif
8554 extern char **environ;
8555 unset_TZ ()
8556 {
8557   char **from, **to;
8558   for (to = from = environ; (*to = *from); from++)
8559     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
8560       to++;
8561 }
8562 char TZ_GMT0[] = "TZ=GMT0";
8563 char TZ_PST8[] = "TZ=PST8";
8564 main()
8565 {
8566   time_t now = time ((time_t *) 0);
8567   int hour_GMT0, hour_unset;
8568   if (putenv (TZ_GMT0) != 0)
8569     exit (1);
8570   hour_GMT0 = localtime (&now)->tm_hour;
8571   unset_TZ ();
8572   hour_unset = localtime (&now)->tm_hour;
8573   if (putenv (TZ_PST8) != 0)
8574     exit (1);
8575   if (localtime (&now)->tm_hour == hour_GMT0)
8576     exit (1);
8577   unset_TZ ();
8578   if (localtime (&now)->tm_hour != hour_unset)
8579     exit (1);
8580   exit (0);
8581 }
8582 EOF
8583 if { (eval echo configure:8584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8584 then
8585   emacs_cv_localtime_cache=no
8586 else
8587   conftest_rc="$?"
8588   echo "configure: failed program was:" >&5
8589   cat conftest.$ac_ext >&5
8590   rm -fr conftest*
8591   emacs_cv_localtime_cache=yes
8592 fi
8593 rm -fr conftest*
8594 else
8595         # If we lack tzset, report that localtime does not cache TZ,
8596         # since we can't invalidate the cache if we don't have tzset.
8597         emacs_cv_localtime_cache=no
8598 fi
8599 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
8600 if test $emacs_cv_localtime_cache = yes; then
8601   { test "$extra_verbose" = "yes" && cat << \EOF
8602     Defining LOCALTIME_CACHE
8603 EOF
8604 cat >> confdefs.h <<\EOF
8605 #define LOCALTIME_CACHE 1
8606 EOF
8607 }
8608
8609 fi
8610
8611 if test "$HAVE_TIMEVAL" = "yes"; then
8612 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
8613 echo "configure:8614: checking whether gettimeofday accepts one or two arguments" >&5
8614 cat > conftest.$ac_ext <<EOF
8615 #line 8616 "configure"
8616 #include "confdefs.h"
8617
8618 #ifdef TIME_WITH_SYS_TIME
8619 #include <sys/time.h>
8620 #include <time.h>
8621 #else
8622 #ifdef HAVE_SYS_TIME_H
8623 #include <sys/time.h>
8624 #else
8625 #include <time.h>
8626 #endif
8627 #endif
8628   
8629 int main() {
8630
8631   struct timeval time;
8632   struct timezone dummy;
8633   gettimeofday (&time, &dummy);
8634
8635 ; return 0; }
8636 EOF
8637 if { (eval echo configure:8638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8638   rm -rf conftest*
8639   echo "$ac_t""two" 1>&6
8640 else
8641   echo "configure: failed program was:" >&5
8642   cat conftest.$ac_ext >&5
8643   rm -rf conftest*
8644   echo "$ac_t""one" 1>&6
8645    { test "$extra_verbose" = "yes" && cat << \EOF
8646     Defining GETTIMEOFDAY_ONE_ARGUMENT
8647 EOF
8648 cat >> confdefs.h <<\EOF
8649 #define GETTIMEOFDAY_ONE_ARGUMENT 1
8650 EOF
8651 }
8652
8653 fi
8654 rm -f conftest*
8655 fi
8656
8657
8658 echo $ac_n "checking for inline""... $ac_c" 1>&6
8659 echo "configure:8660: checking for inline" >&5
8660
8661 ac_cv_c_inline=no
8662 for ac_kw in inline __inline__ __inline; do
8663   cat > conftest.$ac_ext <<EOF
8664 #line 8665 "configure"
8665 #include "confdefs.h"
8666
8667 int main() {
8668 } $ac_kw foo() {
8669 ; return 0; }
8670 EOF
8671 if { (eval echo configure:8672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8672   rm -rf conftest*
8673   ac_cv_c_inline=$ac_kw; break
8674 else
8675   echo "configure: failed program was:" >&5
8676   cat conftest.$ac_ext >&5
8677 fi
8678 rm -f conftest*
8679 done
8680
8681
8682 echo "$ac_t""$ac_cv_c_inline" 1>&6
8683 case "$ac_cv_c_inline" in
8684   inline | yes) ;;
8685   no) { test "$extra_verbose" = "yes" && cat << \EOF
8686     Defining inline = 
8687 EOF
8688 cat >> confdefs.h <<\EOF
8689 #define inline 
8690 EOF
8691 }
8692  ;;
8693   *)  { test "$extra_verbose" = "yes" && cat << EOF
8694     Defining inline = $ac_cv_c_inline
8695 EOF
8696 cat >> confdefs.h <<EOF
8697 #define inline $ac_cv_c_inline
8698 EOF
8699 }
8700  ;;
8701 esac
8702
8703 if test "$ac_cv_c_inline" != "no"; then
8704   { test "$extra_verbose" = "yes" && cat << \EOF
8705     Defining HAVE_INLINE
8706 EOF
8707 cat >> confdefs.h <<\EOF
8708 #define HAVE_INLINE 1
8709 EOF
8710 }
8711
8712   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
8713    echo "    xemacs will be linked with \"inline.o\""
8714  fi
8715 fi
8716
8717
8718 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8719 # for constant arguments.  Useless!
8720 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
8721 echo "configure:8722: checking for working alloca.h" >&5
8722
8723 cat > conftest.$ac_ext <<EOF
8724 #line 8725 "configure"
8725 #include "confdefs.h"
8726 #include <alloca.h>
8727 int main() {
8728 char *p = alloca(2 * sizeof(int));
8729 ; return 0; }
8730 EOF
8731 if { (eval echo configure:8732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8732   rm -rf conftest*
8733   ac_cv_header_alloca_h=yes
8734 else
8735   echo "configure: failed program was:" >&5
8736   cat conftest.$ac_ext >&5
8737   rm -rf conftest*
8738   ac_cv_header_alloca_h=no
8739 fi
8740 rm -f conftest*
8741
8742 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
8743 if test $ac_cv_header_alloca_h = yes; then
8744   { test "$extra_verbose" = "yes" && cat << \EOF
8745     Defining HAVE_ALLOCA_H
8746 EOF
8747 cat >> confdefs.h <<\EOF
8748 #define HAVE_ALLOCA_H 1
8749 EOF
8750 }
8751
8752 fi
8753
8754 echo $ac_n "checking for alloca""... $ac_c" 1>&6
8755 echo "configure:8756: checking for alloca" >&5
8756
8757 cat > conftest.$ac_ext <<EOF
8758 #line 8759 "configure"
8759 #include "confdefs.h"
8760
8761 #ifdef __GNUC__
8762 # define alloca __builtin_alloca
8763 #else
8764 # if HAVE_ALLOCA_H
8765 #  include <alloca.h>
8766 # else
8767 #  ifdef _AIX
8768  #pragma alloca
8769 #  else
8770 #   ifndef alloca /* predefined by HP cc +Olibcalls */
8771 char *alloca ();
8772 #   endif
8773 #  endif
8774 # endif
8775 #endif
8776
8777 int main() {
8778 char *p = (char *) alloca(1);
8779 ; return 0; }
8780 EOF
8781 if { (eval echo configure:8782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8782   rm -rf conftest*
8783   ac_cv_func_alloca_works=yes
8784 else
8785   echo "configure: failed program was:" >&5
8786   cat conftest.$ac_ext >&5
8787   rm -rf conftest*
8788   ac_cv_func_alloca_works=no
8789 fi
8790 rm -f conftest*
8791
8792 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
8793 if test $ac_cv_func_alloca_works = yes; then
8794   { test "$extra_verbose" = "yes" && cat << \EOF
8795     Defining HAVE_ALLOCA
8796 EOF
8797 cat >> confdefs.h <<\EOF
8798 #define HAVE_ALLOCA 1
8799 EOF
8800 }
8801
8802 fi
8803
8804 if test $ac_cv_func_alloca_works = no; then
8805   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8806   # that cause trouble.  Some versions do not even contain alloca or
8807   # contain a buggy version.  If you still want to use their alloca,
8808   # use ar to extract alloca.o from them instead of compiling alloca.c.
8809   ALLOCA=alloca.o
8810   { test "$extra_verbose" = "yes" && cat << \EOF
8811     Defining C_ALLOCA
8812 EOF
8813 cat >> confdefs.h <<\EOF
8814 #define C_ALLOCA 1
8815 EOF
8816 }
8817
8818
8819 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
8820 echo "configure:8821: checking whether alloca needs Cray hooks" >&5
8821
8822 cat > conftest.$ac_ext <<EOF
8823 #line 8824 "configure"
8824 #include "confdefs.h"
8825 #if defined(CRAY) && ! defined(CRAY2)
8826 webecray
8827 #else
8828 wenotbecray
8829 #endif
8830
8831 EOF
8832 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8833   egrep "webecray" >/dev/null 2>&1; then
8834   rm -rf conftest*
8835   ac_cv_os_cray=yes
8836 else
8837   rm -rf conftest*
8838   ac_cv_os_cray=no
8839 fi
8840 rm -f conftest*
8841
8842
8843 echo "$ac_t""$ac_cv_os_cray" 1>&6
8844 if test $ac_cv_os_cray = yes; then
8845 for ac_func in _getb67 GETB67 getb67; do
8846   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8847 echo "configure:8848: checking for $ac_func" >&5
8848
8849 cat > conftest.$ac_ext <<EOF
8850 #line 8851 "configure"
8851 #include "confdefs.h"
8852 /* System header to define __stub macros and hopefully few prototypes,
8853     which can conflict with char $ac_func(); below.  */
8854 #include <assert.h>
8855 /* Override any gcc2 internal prototype to avoid an error.  */
8856 /* We use char because int might match the return type of a gcc2
8857     builtin and then its argument prototype would still apply.  */
8858 char $ac_func();
8859
8860 int main() {
8861
8862 /* The GNU C library defines this for functions which it implements
8863     to always fail with ENOSYS.  Some functions are actually named
8864     something starting with __ and the normal name is an alias.  */
8865 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8866 choke me
8867 #else
8868 $ac_func();
8869 #endif
8870
8871 ; return 0; }
8872 EOF
8873 if { (eval echo configure:8874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8874   rm -rf conftest*
8875   eval "ac_cv_func_$ac_func=yes"
8876 else
8877   echo "configure: failed program was:" >&5
8878   cat conftest.$ac_ext >&5
8879   rm -rf conftest*
8880   eval "ac_cv_func_$ac_func=no"
8881 fi
8882 rm -f conftest*
8883
8884 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8885   echo "$ac_t""yes" 1>&6
8886   { test "$extra_verbose" = "yes" && cat << EOF
8887     Defining CRAY_STACKSEG_END = $ac_func
8888 EOF
8889 cat >> confdefs.h <<EOF
8890 #define CRAY_STACKSEG_END $ac_func
8891 EOF
8892 }
8893
8894   break
8895 else
8896   echo "$ac_t""no" 1>&6
8897 fi
8898
8899 done
8900 fi
8901
8902 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
8903 echo "configure:8904: checking stack direction for C alloca" >&5
8904
8905 cat > conftest.$ac_ext <<EOF
8906 #line 8907 "configure"
8907 #include "confdefs.h"
8908 find_stack_direction ()
8909 {
8910   static char *addr = 0;
8911   auto char dummy;
8912   if (addr == 0)
8913     {
8914       addr = &dummy;
8915       return find_stack_direction ();
8916     }
8917   else
8918     return (&dummy > addr) ? 1 : -1;
8919 }
8920 main ()
8921 {
8922   exit (find_stack_direction() < 0);
8923 }
8924 EOF
8925 if { (eval echo configure:8926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8926 then
8927   ac_cv_c_stack_direction=1
8928 else
8929   conftest_rc="$?"
8930   echo "configure: failed program was:" >&5
8931   cat conftest.$ac_ext >&5
8932   rm -fr conftest*
8933   ac_cv_c_stack_direction=-1
8934 fi
8935 rm -fr conftest*
8936
8937 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
8938 { test "$extra_verbose" = "yes" && cat << EOF
8939     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
8940 EOF
8941 cat >> confdefs.h <<EOF
8942 #define STACK_DIRECTION $ac_cv_c_stack_direction
8943 EOF
8944 }
8945
8946 fi
8947
8948 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
8949    echo "    xemacs will be linked with \"$ALLOCA\""
8950  fi
8951
8952 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
8953 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
8954 echo "configure:8955: checking for vfork.h" >&5
8955
8956 cat > conftest.$ac_ext <<EOF
8957 #line 8958 "configure"
8958 #include "confdefs.h"
8959 #include <vfork.h>
8960 EOF
8961 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8962 { (eval echo configure:8963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8963 ac_err=`grep -v '^ *+' conftest.out`
8964 if test -z "$ac_err"; then
8965   rm -rf conftest*
8966   eval "ac_cv_header_$ac_safe=yes"
8967 else
8968   echo "$ac_err" >&5
8969   echo "configure: failed program was:" >&5
8970   cat conftest.$ac_ext >&5
8971   rm -rf conftest*
8972   eval "ac_cv_header_$ac_safe=no"
8973 fi
8974 rm -f conftest*
8975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8976   echo "$ac_t""yes" 1>&6
8977   { test "$extra_verbose" = "yes" && cat << \EOF
8978     Defining HAVE_VFORK_H
8979 EOF
8980 cat >> confdefs.h <<\EOF
8981 #define HAVE_VFORK_H 1
8982 EOF
8983 }
8984
8985 else
8986   echo "$ac_t""no" 1>&6
8987 fi
8988
8989 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
8990 echo "configure:8991: checking for working vfork" >&5
8991
8992 cat > conftest.$ac_ext <<EOF
8993 #line 8994 "configure"
8994 #include "confdefs.h"
8995 /* Thanks to Paul Eggert for this test.  */
8996 #include <stdio.h>
8997 #include <sys/types.h>
8998 #include <sys/stat.h>
8999 #ifdef HAVE_UNISTD_H
9000 #include <unistd.h>
9001 #endif
9002 #ifdef HAVE_VFORK_H
9003 #include <vfork.h>
9004 #endif
9005 /* On some sparc systems, changes by the child to local and incoming
9006    argument registers are propagated back to the parent.
9007    The compiler is told about this with #include <vfork.h>,
9008    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9009    Test for this by using a static variable whose address
9010    is put into a register that is clobbered by the vfork.  */
9011 static
9012 #ifdef __cplusplus
9013 sparc_address_test (int arg)
9014 #else
9015 sparc_address_test (arg) int arg;
9016 #endif
9017 {
9018   static pid_t child;
9019   if (!child) {
9020     child = vfork ();
9021     if (child < 0) {
9022       perror ("vfork");
9023       _exit(2);
9024     }
9025     if (!child) {
9026       arg = getpid();
9027       write(-1, "", 0);
9028       _exit (arg);
9029     }
9030   }
9031 }
9032 main() {
9033   pid_t parent = getpid ();
9034   pid_t child;
9035
9036   sparc_address_test ();
9037
9038   child = vfork ();
9039
9040   if (child == 0) {
9041     /* Here is another test for sparc vfork register problems.
9042        This test uses lots of local variables, at least
9043        as many local variables as main has allocated so far
9044        including compiler temporaries.  4 locals are enough for
9045        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9046        A buggy compiler should reuse the register of parent
9047        for one of the local variables, since it will think that
9048        parent can't possibly be used any more in this routine.
9049        Assigning to the local variable will thus munge parent
9050        in the parent process.  */
9051     pid_t
9052       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9053       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9054     /* Convince the compiler that p..p7 are live; otherwise, it might
9055        use the same hardware register for all 8 local variables.  */
9056     if (p != p1 || p != p2 || p != p3 || p != p4
9057         || p != p5 || p != p6 || p != p7)
9058       _exit(1);
9059
9060     /* On some systems (e.g. IRIX 3.3),
9061        vfork doesn't separate parent from child file descriptors.
9062        If the child closes a descriptor before it execs or exits,
9063        this munges the parent's descriptor as well.
9064        Test for this by closing stdout in the child.  */
9065     _exit(close(fileno(stdout)) != 0);
9066   } else {
9067     int status;
9068     struct stat st;
9069
9070     while (wait(&status) != child)
9071       ;
9072     exit(
9073          /* Was there some problem with vforking?  */
9074          child < 0
9075
9076          /* Did the child fail?  (This shouldn't happen.)  */
9077          || status
9078
9079          /* Did the vfork/compiler bug occur?  */
9080          || parent != getpid()
9081
9082          /* Did the file descriptor bug occur?  */
9083          || fstat(fileno(stdout), &st) != 0
9084          );
9085   }
9086 }
9087 EOF
9088 if { (eval echo configure:9089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9089 then
9090   ac_cv_func_vfork_works=yes
9091 else
9092   conftest_rc="$?"
9093   echo "configure: failed program was:" >&5
9094   cat conftest.$ac_ext >&5
9095   rm -fr conftest*
9096   ac_cv_func_vfork_works=no
9097 fi
9098 rm -fr conftest*
9099
9100 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9101 if test $ac_cv_func_vfork_works = no; then
9102   { test "$extra_verbose" = "yes" && cat << \EOF
9103     Defining vfork = fork
9104 EOF
9105 cat >> confdefs.h <<\EOF
9106 #define vfork fork
9107 EOF
9108 }
9109
9110 fi
9111
9112
9113 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
9114 echo "configure:9115: checking for working strcoll" >&5
9115
9116 cat > conftest.$ac_ext <<EOF
9117 #line 9118 "configure"
9118 #include "confdefs.h"
9119 #include <string.h>
9120 main ()
9121 {
9122   exit (strcoll ("abc", "def") >= 0 ||
9123         strcoll ("ABC", "DEF") >= 0 ||
9124         strcoll ("123", "456") >= 0);
9125 }
9126 EOF
9127 if { (eval echo configure:9128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9128 then
9129   ac_cv_func_strcoll_works=yes
9130 else
9131   conftest_rc="$?"
9132   echo "configure: failed program was:" >&5
9133   cat conftest.$ac_ext >&5
9134   rm -fr conftest*
9135   ac_cv_func_strcoll_works=no
9136 fi
9137 rm -fr conftest*
9138
9139 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
9140 if test $ac_cv_func_strcoll_works = yes; then
9141   { test "$extra_verbose" = "yes" && cat << \EOF
9142     Defining HAVE_STRCOLL
9143 EOF
9144 cat >> confdefs.h <<\EOF
9145 #define HAVE_STRCOLL 1
9146 EOF
9147 }
9148
9149 fi
9150
9151
9152 for ac_func in getpgrp
9153 do
9154 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9155 echo "configure:9156: checking for $ac_func" >&5
9156
9157 cat > conftest.$ac_ext <<EOF
9158 #line 9159 "configure"
9159 #include "confdefs.h"
9160 /* System header to define __stub macros and hopefully few prototypes,
9161     which can conflict with char $ac_func(); below.  */
9162 #include <assert.h>
9163 /* Override any gcc2 internal prototype to avoid an error.  */
9164 /* We use char because int might match the return type of a gcc2
9165     builtin and then its argument prototype would still apply.  */
9166 char $ac_func();
9167
9168 int main() {
9169
9170 /* The GNU C library defines this for functions which it implements
9171     to always fail with ENOSYS.  Some functions are actually named
9172     something starting with __ and the normal name is an alias.  */
9173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9174 choke me
9175 #else
9176 $ac_func();
9177 #endif
9178
9179 ; return 0; }
9180 EOF
9181 if { (eval echo configure:9182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9182   rm -rf conftest*
9183   eval "ac_cv_func_$ac_func=yes"
9184 else
9185   echo "configure: failed program was:" >&5
9186   cat conftest.$ac_ext >&5
9187   rm -rf conftest*
9188   eval "ac_cv_func_$ac_func=no"
9189 fi
9190 rm -f conftest*
9191
9192 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9193   echo "$ac_t""yes" 1>&6
9194     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9195   { test "$extra_verbose" = "yes" && cat << EOF
9196     Defining $ac_tr_func
9197 EOF
9198 cat >> confdefs.h <<EOF
9199 #define $ac_tr_func 1
9200 EOF
9201 }
9202  
9203 else
9204   echo "$ac_t""no" 1>&6
9205 fi
9206 done
9207
9208 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
9209 echo "configure:9210: checking whether getpgrp takes no argument" >&5
9210
9211 cat > conftest.$ac_ext <<EOF
9212 #line 9213 "configure"
9213 #include "confdefs.h"
9214
9215 /*
9216  * If this system has a BSD-style getpgrp(),
9217  * which takes a pid argument, exit unsuccessfully.
9218  *
9219  * Snarfed from Chet Ramey's bash pgrp.c test program
9220  */
9221 #include <stdio.h>
9222 #include <sys/types.h>
9223
9224 int     pid;
9225 int     pg1, pg2, pg3, pg4;
9226 int     ng, np, s, child;
9227
9228 main()
9229 {
9230         pid = getpid();
9231         pg1 = getpgrp(0);
9232         pg2 = getpgrp();
9233         pg3 = getpgrp(pid);
9234         pg4 = getpgrp(1);
9235
9236         /*
9237          * If all of these values are the same, it's pretty sure that
9238          * we're on a system that ignores getpgrp's first argument.
9239          */
9240         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
9241                 exit(0);
9242
9243         child = fork();
9244         if (child < 0)
9245                 exit(1);
9246         else if (child == 0) {
9247                 np = getpid();
9248                 /*
9249                  * If this is Sys V, this will not work; pgrp will be
9250                  * set to np because setpgrp just changes a pgrp to be
9251                  * the same as the pid.
9252                  */
9253                 setpgrp(np, pg1);
9254                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
9255                 if (ng == pg1) {
9256                         exit(1);
9257                 } else {
9258                         exit(0);
9259                 }
9260         } else {
9261                 wait(&s);
9262                 exit(s>>8);
9263         }
9264 }
9265
9266 EOF
9267 if { (eval echo configure:9268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9268 then
9269   ac_cv_func_getpgrp_void=yes
9270 else
9271   conftest_rc="$?"
9272   echo "configure: failed program was:" >&5
9273   cat conftest.$ac_ext >&5
9274   rm -fr conftest*
9275   ac_cv_func_getpgrp_void=no
9276 fi
9277 rm -fr conftest*
9278
9279
9280 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
9281 if test $ac_cv_func_getpgrp_void = yes; then
9282   { test "$extra_verbose" = "yes" && cat << \EOF
9283     Defining GETPGRP_VOID
9284 EOF
9285 cat >> confdefs.h <<\EOF
9286 #define GETPGRP_VOID 1
9287 EOF
9288 }
9289
9290 fi
9291
9292
9293 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9294 echo "configure:9295: checking for working mmap" >&5
9295 case "$opsys" in ultrix* ) have_mmap=no ;; *)
9296 cat > conftest.$ac_ext <<EOF
9297 #line 9298 "configure"
9298 #include "confdefs.h"
9299 #include <stdio.h>
9300 #include <unistd.h>
9301 #include <fcntl.h>
9302 #include <sys/mman.h>
9303
9304 #ifndef MAP_VARIABLE
9305 #define MAP_VARIABLE 0
9306 #endif
9307
9308 #ifndef MAP_FAILED
9309 #define MAP_FAILED -1
9310 #endif
9311
9312 int main (int argc, char *argv[])
9313 {
9314   int fd = -1;
9315   caddr_t p;
9316 #ifndef MAP_ANONYMOUS
9317   fd = open ("/dev/zero", O_RDWR);
9318   if (fd < 0)
9319     return 1;
9320 #define MAP_ANONYMOUS 0
9321 #endif
9322   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
9323            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
9324            fd, 0) != (void *) MAP_FAILED)
9325     return 0;
9326   perror ("conftest: mmap failed");
9327   return 1;
9328 }
9329 EOF
9330 if { (eval echo configure:9331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9331 then
9332   have_mmap=yes
9333 else
9334   conftest_rc="$?"
9335   echo "configure: failed program was:" >&5
9336   cat conftest.$ac_ext >&5
9337   rm -fr conftest*
9338   have_mmap=no
9339 fi
9340 rm -fr conftest* ;;
9341 esac
9342 echo "$ac_t""$have_mmap" 1>&6
9343 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9344     Defining HAVE_MMAP
9345 EOF
9346 cat >> confdefs.h <<\EOF
9347 #define HAVE_MMAP 1
9348 EOF
9349 }
9350
9351 for ac_hdr in unistd.h
9352 do
9353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9355 echo "configure:9356: checking for $ac_hdr" >&5
9356
9357 cat > conftest.$ac_ext <<EOF
9358 #line 9359 "configure"
9359 #include "confdefs.h"
9360 #include <$ac_hdr>
9361 EOF
9362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9363 { (eval echo configure:9364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9364 ac_err=`grep -v '^ *+' conftest.out`
9365 if test -z "$ac_err"; then
9366   rm -rf conftest*
9367   eval "ac_cv_header_$ac_safe=yes"
9368 else
9369   echo "$ac_err" >&5
9370   echo "configure: failed program was:" >&5
9371   cat conftest.$ac_ext >&5
9372   rm -rf conftest*
9373   eval "ac_cv_header_$ac_safe=no"
9374 fi
9375 rm -f conftest*
9376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9377   echo "$ac_t""yes" 1>&6
9378     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9379   { test "$extra_verbose" = "yes" && cat << EOF
9380     Defining $ac_tr_hdr
9381 EOF
9382 cat >> confdefs.h <<EOF
9383 #define $ac_tr_hdr 1
9384 EOF
9385 }
9386  
9387 else
9388   echo "$ac_t""no" 1>&6
9389 fi
9390 done
9391
9392 for ac_func in getpagesize
9393 do
9394 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9395 echo "configure:9396: checking for $ac_func" >&5
9396
9397 cat > conftest.$ac_ext <<EOF
9398 #line 9399 "configure"
9399 #include "confdefs.h"
9400 /* System header to define __stub macros and hopefully few prototypes,
9401     which can conflict with char $ac_func(); below.  */
9402 #include <assert.h>
9403 /* Override any gcc2 internal prototype to avoid an error.  */
9404 /* We use char because int might match the return type of a gcc2
9405     builtin and then its argument prototype would still apply.  */
9406 char $ac_func();
9407
9408 int main() {
9409
9410 /* The GNU C library defines this for functions which it implements
9411     to always fail with ENOSYS.  Some functions are actually named
9412     something starting with __ and the normal name is an alias.  */
9413 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9414 choke me
9415 #else
9416 $ac_func();
9417 #endif
9418
9419 ; return 0; }
9420 EOF
9421 if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9422   rm -rf conftest*
9423   eval "ac_cv_func_$ac_func=yes"
9424 else
9425   echo "configure: failed program was:" >&5
9426   cat conftest.$ac_ext >&5
9427   rm -rf conftest*
9428   eval "ac_cv_func_$ac_func=no"
9429 fi
9430 rm -f conftest*
9431
9432 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9433   echo "$ac_t""yes" 1>&6
9434     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9435   { test "$extra_verbose" = "yes" && cat << EOF
9436     Defining $ac_tr_func
9437 EOF
9438 cat >> confdefs.h <<EOF
9439 #define $ac_tr_func 1
9440 EOF
9441 }
9442  
9443 else
9444   echo "$ac_t""no" 1>&6
9445 fi
9446 done
9447
9448 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9449 echo "configure:9450: checking for working mmap" >&5
9450
9451 cat > conftest.$ac_ext <<EOF
9452 #line 9453 "configure"
9453 #include "confdefs.h"
9454
9455 /* Thanks to Mike Haertel and Jim Avera for this test.
9456    Here is a matrix of mmap possibilities:
9457         mmap private not fixed
9458         mmap private fixed at somewhere currently unmapped
9459         mmap private fixed at somewhere already mapped
9460         mmap shared not fixed
9461         mmap shared fixed at somewhere currently unmapped
9462         mmap shared fixed at somewhere already mapped
9463    For private mappings, we should verify that changes cannot be read()
9464    back from the file, nor mmap's back from the file at a different
9465    address.  (There have been systems where private was not correctly
9466    implemented like the infamous i386 svr4.0, and systems where the
9467    VM page cache was not coherent with the filesystem buffer cache
9468    like early versions of FreeBSD and possibly contemporary NetBSD.)
9469    For shared mappings, we should conversely verify that changes get
9470    propogated back to all the places they're supposed to be.
9471
9472    Grep wants private fixed already mapped.
9473    The main things grep needs to know about mmap are:
9474    * does it exist and is it safe to write into the mmap'd area
9475    * how to use it (BSD variants)  */
9476 #include <sys/types.h>
9477 #include <fcntl.h>
9478 #include <sys/mman.h>
9479
9480 /* This mess was copied from the GNU getpagesize.h.  */
9481 #ifndef HAVE_GETPAGESIZE
9482 # ifdef HAVE_UNISTD_H
9483 #  include <unistd.h>
9484 # endif
9485
9486 /* Assume that all systems that can run configure have sys/param.h.  */
9487 # ifndef HAVE_SYS_PARAM_H
9488 #  define HAVE_SYS_PARAM_H 1
9489 # endif
9490
9491 # ifdef _SC_PAGESIZE
9492 #  define getpagesize() sysconf(_SC_PAGESIZE)
9493 # else /* no _SC_PAGESIZE */
9494 #  ifdef HAVE_SYS_PARAM_H
9495 #   include <sys/param.h>
9496 #   ifdef EXEC_PAGESIZE
9497 #    define getpagesize() EXEC_PAGESIZE
9498 #   else /* no EXEC_PAGESIZE */
9499 #    ifdef NBPG
9500 #     define getpagesize() NBPG * CLSIZE
9501 #     ifndef CLSIZE
9502 #      define CLSIZE 1
9503 #     endif /* no CLSIZE */
9504 #    else /* no NBPG */
9505 #     ifdef NBPC
9506 #      define getpagesize() NBPC
9507 #     else /* no NBPC */
9508 #      ifdef PAGESIZE
9509 #       define getpagesize() PAGESIZE
9510 #      endif /* PAGESIZE */
9511 #     endif /* no NBPC */
9512 #    endif /* no NBPG */
9513 #   endif /* no EXEC_PAGESIZE */
9514 #  else /* no HAVE_SYS_PARAM_H */
9515 #   define getpagesize() 8192   /* punt totally */
9516 #  endif /* no HAVE_SYS_PARAM_H */
9517 # endif /* no _SC_PAGESIZE */
9518
9519 #endif /* no HAVE_GETPAGESIZE */
9520
9521 #ifdef __cplusplus
9522 extern "C" { void *malloc(unsigned); }
9523 #else
9524 char *malloc();
9525 #endif
9526
9527 int
9528 main()
9529 {
9530         char *data, *data2, *data3;
9531         int i, pagesize;
9532         int fd;
9533
9534         pagesize = getpagesize();
9535
9536         /*
9537          * First, make a file with some known garbage in it.
9538          */
9539         data = malloc(pagesize);
9540         if (!data)
9541                 exit(1);
9542         for (i = 0; i < pagesize; ++i)
9543                 *(data + i) = rand();
9544         umask(0);
9545         fd = creat("conftestmmap", 0600);
9546         if (fd < 0)
9547                 exit(1);
9548         if (write(fd, data, pagesize) != pagesize)
9549                 exit(1);
9550         close(fd);
9551
9552         /*
9553          * Next, try to mmap the file at a fixed address which
9554          * already has something else allocated at it.  If we can,
9555          * also make sure that we see the same garbage.
9556          */
9557         fd = open("conftestmmap", O_RDWR);
9558         if (fd < 0)
9559                 exit(1);
9560         data2 = malloc(2 * pagesize);
9561         if (!data2)
9562                 exit(1);
9563         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
9564         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
9565             MAP_PRIVATE | MAP_FIXED, fd, 0L))
9566                 exit(1);
9567         for (i = 0; i < pagesize; ++i)
9568                 if (*(data + i) != *(data2 + i))
9569                         exit(1);
9570
9571         /*
9572          * Finally, make sure that changes to the mapped area
9573          * do not percolate back to the file as seen by read().
9574          * (This is a bug on some variants of i386 svr4.0.)
9575          */
9576         for (i = 0; i < pagesize; ++i)
9577                 *(data2 + i) = *(data2 + i) + 1;
9578         data3 = malloc(pagesize);
9579         if (!data3)
9580                 exit(1);
9581         if (read(fd, data3, pagesize) != pagesize)
9582                 exit(1);
9583         for (i = 0; i < pagesize; ++i)
9584                 if (*(data + i) != *(data3 + i))
9585                         exit(1);
9586         close(fd);
9587         unlink("conftestmmap");
9588         exit(0);
9589 }
9590
9591 EOF
9592 if { (eval echo configure:9593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9593 then
9594   ac_cv_func_mmap_fixed_mapped=yes
9595 else
9596   conftest_rc="$?"
9597   echo "configure: failed program was:" >&5
9598   cat conftest.$ac_ext >&5
9599   rm -fr conftest*
9600   ac_cv_func_mmap_fixed_mapped=no
9601 fi
9602 rm -fr conftest*
9603
9604 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
9605 if test $ac_cv_func_mmap_fixed_mapped = yes; then
9606   { test "$extra_verbose" = "yes" && cat << \EOF
9607     Defining HAVE_MMAP
9608 EOF
9609 cat >> confdefs.h <<\EOF
9610 #define HAVE_MMAP 1
9611 EOF
9612 }
9613
9614 fi
9615
9616
9617 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
9618 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
9619 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9620     Defining REL_ALLOC
9621 EOF
9622 cat >> confdefs.h <<\EOF
9623 #define REL_ALLOC 1
9624 EOF
9625 }
9626
9627
9628 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
9629 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
9630 echo "configure:9631: checking for termios.h" >&5
9631
9632 cat > conftest.$ac_ext <<EOF
9633 #line 9634 "configure"
9634 #include "confdefs.h"
9635 #include <termios.h>
9636 EOF
9637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9638 { (eval echo configure:9639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9639 ac_err=`grep -v '^ *+' conftest.out`
9640 if test -z "$ac_err"; then
9641   rm -rf conftest*
9642   eval "ac_cv_header_$ac_safe=yes"
9643 else
9644   echo "$ac_err" >&5
9645   echo "configure: failed program was:" >&5
9646   cat conftest.$ac_ext >&5
9647   rm -rf conftest*
9648   eval "ac_cv_header_$ac_safe=no"
9649 fi
9650 rm -f conftest*
9651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9652   echo "$ac_t""yes" 1>&6
9653   { test "$extra_verbose" = "yes" && cat << \EOF
9654     Defining HAVE_TERMIOS
9655 EOF
9656 cat >> confdefs.h <<\EOF
9657 #define HAVE_TERMIOS 1
9658 EOF
9659 }
9660
9661   { test "$extra_verbose" = "yes" && cat << \EOF
9662     Defining SIGNALS_VIA_CHARACTERS
9663 EOF
9664 cat >> confdefs.h <<\EOF
9665 #define SIGNALS_VIA_CHARACTERS 1
9666 EOF
9667 }
9668
9669   { test "$extra_verbose" = "yes" && cat << \EOF
9670     Defining NO_TERMIO
9671 EOF
9672 cat >> confdefs.h <<\EOF
9673 #define NO_TERMIO 1
9674 EOF
9675 }
9676
9677 else
9678   echo "$ac_t""no" 1>&6
9679 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
9680 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
9681 echo "configure:9682: checking for termio.h" >&5
9682
9683 cat > conftest.$ac_ext <<EOF
9684 #line 9685 "configure"
9685 #include "confdefs.h"
9686 #include <termio.h>
9687 EOF
9688 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9689 { (eval echo configure:9690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9690 ac_err=`grep -v '^ *+' conftest.out`
9691 if test -z "$ac_err"; then
9692   rm -rf conftest*
9693   eval "ac_cv_header_$ac_safe=yes"
9694 else
9695   echo "$ac_err" >&5
9696   echo "configure: failed program was:" >&5
9697   cat conftest.$ac_ext >&5
9698   rm -rf conftest*
9699   eval "ac_cv_header_$ac_safe=no"
9700 fi
9701 rm -f conftest*
9702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9703   echo "$ac_t""yes" 1>&6
9704   { test "$extra_verbose" = "yes" && cat << \EOF
9705     Defining HAVE_TERMIO
9706 EOF
9707 cat >> confdefs.h <<\EOF
9708 #define HAVE_TERMIO 1
9709 EOF
9710 }
9711
9712 else
9713   echo "$ac_t""no" 1>&6
9714 fi
9715
9716 fi
9717
9718
9719
9720 echo $ac_n "checking for socket""... $ac_c" 1>&6
9721 echo "configure:9722: checking for socket" >&5
9722
9723 cat > conftest.$ac_ext <<EOF
9724 #line 9725 "configure"
9725 #include "confdefs.h"
9726 /* System header to define __stub macros and hopefully few prototypes,
9727     which can conflict with char socket(); below.  */
9728 #include <assert.h>
9729 /* Override any gcc2 internal prototype to avoid an error.  */
9730 /* We use char because int might match the return type of a gcc2
9731     builtin and then its argument prototype would still apply.  */
9732 char socket();
9733
9734 int main() {
9735
9736 /* The GNU C library defines this for functions which it implements
9737     to always fail with ENOSYS.  Some functions are actually named
9738     something starting with __ and the normal name is an alias.  */
9739 #if defined (__stub_socket) || defined (__stub___socket)
9740 choke me
9741 #else
9742 socket();
9743 #endif
9744
9745 ; return 0; }
9746 EOF
9747 if { (eval echo configure:9748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9748   rm -rf conftest*
9749   eval "ac_cv_func_socket=yes"
9750 else
9751   echo "configure: failed program was:" >&5
9752   cat conftest.$ac_ext >&5
9753   rm -rf conftest*
9754   eval "ac_cv_func_socket=no"
9755 fi
9756 rm -f conftest*
9757
9758 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9759   echo "$ac_t""yes" 1>&6
9760   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
9761 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
9762 echo "configure:9763: checking for netinet/in.h" >&5
9763
9764 cat > conftest.$ac_ext <<EOF
9765 #line 9766 "configure"
9766 #include "confdefs.h"
9767 #include <netinet/in.h>
9768 EOF
9769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9770 { (eval echo configure:9771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9771 ac_err=`grep -v '^ *+' conftest.out`
9772 if test -z "$ac_err"; then
9773   rm -rf conftest*
9774   eval "ac_cv_header_$ac_safe=yes"
9775 else
9776   echo "$ac_err" >&5
9777   echo "configure: failed program was:" >&5
9778   cat conftest.$ac_ext >&5
9779   rm -rf conftest*
9780   eval "ac_cv_header_$ac_safe=no"
9781 fi
9782 rm -f conftest*
9783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9784   echo "$ac_t""yes" 1>&6
9785   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
9786 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
9787 echo "configure:9788: checking for arpa/inet.h" >&5
9788
9789 cat > conftest.$ac_ext <<EOF
9790 #line 9791 "configure"
9791 #include "confdefs.h"
9792 #include <arpa/inet.h>
9793 EOF
9794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9795 { (eval echo configure:9796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9796 ac_err=`grep -v '^ *+' conftest.out`
9797 if test -z "$ac_err"; then
9798   rm -rf conftest*
9799   eval "ac_cv_header_$ac_safe=yes"
9800 else
9801   echo "$ac_err" >&5
9802   echo "configure: failed program was:" >&5
9803   cat conftest.$ac_ext >&5
9804   rm -rf conftest*
9805   eval "ac_cv_header_$ac_safe=no"
9806 fi
9807 rm -f conftest*
9808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9809   echo "$ac_t""yes" 1>&6
9810   
9811   { test "$extra_verbose" = "yes" && cat << \EOF
9812     Defining HAVE_SOCKETS
9813 EOF
9814 cat >> confdefs.h <<\EOF
9815 #define HAVE_SOCKETS 1
9816 EOF
9817 }
9818
9819       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
9820 echo "configure:9821: checking "for sun_len member in struct sockaddr_un"" >&5
9821       cat > conftest.$ac_ext <<EOF
9822 #line 9823 "configure"
9823 #include "confdefs.h"
9824
9825 #include <sys/types.h>
9826 #include <sys/socket.h>
9827 #include <sys/un.h>
9828       
9829 int main() {
9830 static struct sockaddr_un x; x.sun_len = 1;
9831 ; return 0; }
9832 EOF
9833 if { (eval echo configure:9834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9834   rm -rf conftest*
9835   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
9836     Defining HAVE_SOCKADDR_SUN_LEN
9837 EOF
9838 cat >> confdefs.h <<\EOF
9839 #define HAVE_SOCKADDR_SUN_LEN 1
9840 EOF
9841 }
9842
9843 else
9844   echo "configure: failed program was:" >&5
9845   cat conftest.$ac_ext >&5
9846   rm -rf conftest*
9847   echo "$ac_t""no" 1>&6
9848 fi
9849 rm -f conftest*
9850       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
9851 echo "configure:9852: checking "for ip_mreq struct in netinet/in.h"" >&5
9852       cat > conftest.$ac_ext <<EOF
9853 #line 9854 "configure"
9854 #include "confdefs.h"
9855
9856 #include <sys/types.h>
9857 #include <netinet/in.h>
9858       
9859 int main() {
9860 static struct ip_mreq x;
9861 ; return 0; }
9862 EOF
9863 if { (eval echo configure:9864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9864   rm -rf conftest*
9865   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
9866     Defining HAVE_MULTICAST
9867 EOF
9868 cat >> confdefs.h <<\EOF
9869 #define HAVE_MULTICAST 1
9870 EOF
9871 }
9872
9873 else
9874   echo "configure: failed program was:" >&5
9875   cat conftest.$ac_ext >&5
9876   rm -rf conftest*
9877   echo "$ac_t""no" 1>&6
9878 fi
9879 rm -f conftest*
9880 else
9881   echo "$ac_t""no" 1>&6
9882 fi
9883
9884 else
9885   echo "$ac_t""no" 1>&6
9886 fi
9887
9888 else
9889   echo "$ac_t""no" 1>&6
9890 fi
9891
9892
9893 echo $ac_n "checking for msgget""... $ac_c" 1>&6
9894 echo "configure:9895: checking for msgget" >&5
9895
9896 cat > conftest.$ac_ext <<EOF
9897 #line 9898 "configure"
9898 #include "confdefs.h"
9899 /* System header to define __stub macros and hopefully few prototypes,
9900     which can conflict with char msgget(); below.  */
9901 #include <assert.h>
9902 /* Override any gcc2 internal prototype to avoid an error.  */
9903 /* We use char because int might match the return type of a gcc2
9904     builtin and then its argument prototype would still apply.  */
9905 char msgget();
9906
9907 int main() {
9908
9909 /* The GNU C library defines this for functions which it implements
9910     to always fail with ENOSYS.  Some functions are actually named
9911     something starting with __ and the normal name is an alias.  */
9912 #if defined (__stub_msgget) || defined (__stub___msgget)
9913 choke me
9914 #else
9915 msgget();
9916 #endif
9917
9918 ; return 0; }
9919 EOF
9920 if { (eval echo configure:9921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9921   rm -rf conftest*
9922   eval "ac_cv_func_msgget=yes"
9923 else
9924   echo "configure: failed program was:" >&5
9925   cat conftest.$ac_ext >&5
9926   rm -rf conftest*
9927   eval "ac_cv_func_msgget=no"
9928 fi
9929 rm -f conftest*
9930
9931 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
9932   echo "$ac_t""yes" 1>&6
9933   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
9934 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
9935 echo "configure:9936: checking for sys/ipc.h" >&5
9936
9937 cat > conftest.$ac_ext <<EOF
9938 #line 9939 "configure"
9939 #include "confdefs.h"
9940 #include <sys/ipc.h>
9941 EOF
9942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9943 { (eval echo configure:9944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9944 ac_err=`grep -v '^ *+' conftest.out`
9945 if test -z "$ac_err"; then
9946   rm -rf conftest*
9947   eval "ac_cv_header_$ac_safe=yes"
9948 else
9949   echo "$ac_err" >&5
9950   echo "configure: failed program was:" >&5
9951   cat conftest.$ac_ext >&5
9952   rm -rf conftest*
9953   eval "ac_cv_header_$ac_safe=no"
9954 fi
9955 rm -f conftest*
9956 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9957   echo "$ac_t""yes" 1>&6
9958   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
9959 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
9960 echo "configure:9961: checking for sys/msg.h" >&5
9961
9962 cat > conftest.$ac_ext <<EOF
9963 #line 9964 "configure"
9964 #include "confdefs.h"
9965 #include <sys/msg.h>
9966 EOF
9967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9968 { (eval echo configure:9969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9969 ac_err=`grep -v '^ *+' conftest.out`
9970 if test -z "$ac_err"; then
9971   rm -rf conftest*
9972   eval "ac_cv_header_$ac_safe=yes"
9973 else
9974   echo "$ac_err" >&5
9975   echo "configure: failed program was:" >&5
9976   cat conftest.$ac_ext >&5
9977   rm -rf conftest*
9978   eval "ac_cv_header_$ac_safe=no"
9979 fi
9980 rm -f conftest*
9981 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9982   echo "$ac_t""yes" 1>&6
9983   { test "$extra_verbose" = "yes" && cat << \EOF
9984     Defining HAVE_SYSVIPC
9985 EOF
9986 cat >> confdefs.h <<\EOF
9987 #define HAVE_SYSVIPC 1
9988 EOF
9989 }
9990
9991 else
9992   echo "$ac_t""no" 1>&6
9993 fi
9994
9995 else
9996   echo "$ac_t""no" 1>&6
9997 fi
9998
9999 else
10000   echo "$ac_t""no" 1>&6
10001 fi
10002
10003
10004 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10005 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10006 echo "configure:10007: checking for dirent.h" >&5
10007
10008 cat > conftest.$ac_ext <<EOF
10009 #line 10010 "configure"
10010 #include "confdefs.h"
10011 #include <dirent.h>
10012 EOF
10013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10014 { (eval echo configure:10015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10015 ac_err=`grep -v '^ *+' conftest.out`
10016 if test -z "$ac_err"; then
10017   rm -rf conftest*
10018   eval "ac_cv_header_$ac_safe=yes"
10019 else
10020   echo "$ac_err" >&5
10021   echo "configure: failed program was:" >&5
10022   cat conftest.$ac_ext >&5
10023   rm -rf conftest*
10024   eval "ac_cv_header_$ac_safe=no"
10025 fi
10026 rm -f conftest*
10027 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10028   echo "$ac_t""yes" 1>&6
10029   { test "$extra_verbose" = "yes" && cat << \EOF
10030     Defining SYSV_SYSTEM_DIR
10031 EOF
10032 cat >> confdefs.h <<\EOF
10033 #define SYSV_SYSTEM_DIR 1
10034 EOF
10035 }
10036
10037 else
10038   echo "$ac_t""no" 1>&6
10039 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
10040 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
10041 echo "configure:10042: checking for sys/dir.h" >&5
10042
10043 cat > conftest.$ac_ext <<EOF
10044 #line 10045 "configure"
10045 #include "confdefs.h"
10046 #include <sys/dir.h>
10047 EOF
10048 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10049 { (eval echo configure:10050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10050 ac_err=`grep -v '^ *+' conftest.out`
10051 if test -z "$ac_err"; then
10052   rm -rf conftest*
10053   eval "ac_cv_header_$ac_safe=yes"
10054 else
10055   echo "$ac_err" >&5
10056   echo "configure: failed program was:" >&5
10057   cat conftest.$ac_ext >&5
10058   rm -rf conftest*
10059   eval "ac_cv_header_$ac_safe=no"
10060 fi
10061 rm -f conftest*
10062 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10063   echo "$ac_t""yes" 1>&6
10064   :
10065 else
10066   echo "$ac_t""no" 1>&6
10067 { test "$extra_verbose" = "yes" && cat << \EOF
10068     Defining NONSYSTEM_DIR_LIBRARY
10069 EOF
10070 cat >> confdefs.h <<\EOF
10071 #define NONSYSTEM_DIR_LIBRARY 1
10072 EOF
10073 }
10074
10075 fi
10076
10077 fi
10078
10079
10080 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
10081 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
10082 echo "configure:10083: checking for nlist.h" >&5
10083
10084 cat > conftest.$ac_ext <<EOF
10085 #line 10086 "configure"
10086 #include "confdefs.h"
10087 #include <nlist.h>
10088 EOF
10089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10090 { (eval echo configure:10091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10091 ac_err=`grep -v '^ *+' conftest.out`
10092 if test -z "$ac_err"; then
10093   rm -rf conftest*
10094   eval "ac_cv_header_$ac_safe=yes"
10095 else
10096   echo "$ac_err" >&5
10097   echo "configure: failed program was:" >&5
10098   cat conftest.$ac_ext >&5
10099   rm -rf conftest*
10100   eval "ac_cv_header_$ac_safe=no"
10101 fi
10102 rm -f conftest*
10103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10104   echo "$ac_t""yes" 1>&6
10105   { test "$extra_verbose" = "yes" && cat << \EOF
10106     Defining NLIST_STRUCT
10107 EOF
10108 cat >> confdefs.h <<\EOF
10109 #define NLIST_STRUCT 1
10110 EOF
10111 }
10112
10113 else
10114   echo "$ac_t""no" 1>&6
10115 fi
10116
10117
10118
10119 echo "checking "for sound support"" 1>&6
10120 echo "configure:10121: checking "for sound support"" >&5
10121 case "$with_sound" in
10122   native | both ) with_native_sound=yes;;
10123   nas    | no   ) with_native_sound=no;;
10124 esac
10125 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
10126
10127 if test "$with_native_sound" != "no"; then
10128     if test -n "$native_sound_lib"; then
10129     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
10130 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
10131 echo "configure:10132: checking for multimedia/audio_device.h" >&5
10132
10133 cat > conftest.$ac_ext <<EOF
10134 #line 10135 "configure"
10135 #include "confdefs.h"
10136 #include <multimedia/audio_device.h>
10137 EOF
10138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10139 { (eval echo configure:10140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10140 ac_err=`grep -v '^ *+' conftest.out`
10141 if test -z "$ac_err"; then
10142   rm -rf conftest*
10143   eval "ac_cv_header_$ac_safe=yes"
10144 else
10145   echo "$ac_err" >&5
10146   echo "configure: failed program was:" >&5
10147   cat conftest.$ac_ext >&5
10148   rm -rf conftest*
10149   eval "ac_cv_header_$ac_safe=no"
10150 fi
10151 rm -f conftest*
10152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10153   echo "$ac_t""yes" 1>&6
10154   sound_found=yes sound_cflags=""
10155       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10156    echo "    xemacs will be linked with \"sunplay.o\""
10157  fi
10158 else
10159   echo "$ac_t""no" 1>&6
10160 fi
10161
10162   fi
10163
10164     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
10165     sound_found=yes
10166     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10167    echo "    xemacs will be linked with \"sunplay.o\""
10168  fi
10169     if test -d "/usr/demo/SOUND/include"
10170       then sound_cflags="-I/usr/demo/SOUND/include"
10171       else sound_cflags="-I/usr/demo/SOUND"
10172     fi
10173     if test -z "$native_sound_lib" ; then
10174       if test -r "/usr/demo/SOUND/lib/libaudio.a"
10175         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
10176         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
10177       fi
10178     fi
10179   fi
10180
10181     if test -z "$sound_found"; then
10182     case "$canonical" in
10183     *-sgi-* )
10184       if test -z "$native_sound_lib"; then
10185         
10186 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
10187 echo "configure:10188: checking for ALopenport in -laudio" >&5
10188 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
10189
10190 xe_check_libs=" -laudio "
10191 cat > conftest.$ac_ext <<EOF
10192 #line 10193 "configure"
10193 #include "confdefs.h"
10194 /* Override any gcc2 internal prototype to avoid an error.  */
10195 /* We use char because int might match the return type of a gcc2
10196     builtin and then its argument prototype would still apply.  */
10197 char ALopenport();
10198
10199 int main() {
10200 ALopenport()
10201 ; return 0; }
10202 EOF
10203 if { (eval echo configure:10204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10204   rm -rf conftest*
10205   eval "ac_cv_lib_$ac_lib_var=yes"
10206 else
10207   echo "configure: failed program was:" >&5
10208   cat conftest.$ac_ext >&5
10209   rm -rf conftest*
10210   eval "ac_cv_lib_$ac_lib_var=no"
10211 fi
10212 rm -f conftest*
10213 xe_check_libs=""
10214
10215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10216   echo "$ac_t""yes" 1>&6
10217   native_sound_lib="-laudio"
10218 else
10219   echo "$ac_t""no" 1>&6
10220 fi
10221
10222
10223       fi
10224       if test -n "$native_sound_lib"; then
10225         sound_found=yes sound_cflags=""
10226         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
10227    echo "    xemacs will be linked with \"sgiplay.o\""
10228  fi
10229       fi ;;
10230     hppa*-hp-hpux* )
10231       if test -z "$native_sound_lib"; then
10232         
10233 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
10234 echo "configure:10235: checking for AOpenAudio in -lAlib" >&5
10235 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
10236
10237 xe_check_libs=" -lAlib "
10238 cat > conftest.$ac_ext <<EOF
10239 #line 10240 "configure"
10240 #include "confdefs.h"
10241 /* Override any gcc2 internal prototype to avoid an error.  */
10242 /* We use char because int might match the return type of a gcc2
10243     builtin and then its argument prototype would still apply.  */
10244 char AOpenAudio();
10245
10246 int main() {
10247 AOpenAudio()
10248 ; return 0; }
10249 EOF
10250 if { (eval echo configure:10251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10251   rm -rf conftest*
10252   eval "ac_cv_lib_$ac_lib_var=yes"
10253 else
10254   echo "configure: failed program was:" >&5
10255   cat conftest.$ac_ext >&5
10256   rm -rf conftest*
10257   eval "ac_cv_lib_$ac_lib_var=no"
10258 fi
10259 rm -f conftest*
10260 xe_check_libs=""
10261
10262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10263   echo "$ac_t""yes" 1>&6
10264   native_sound_lib="-lAlib"
10265 else
10266   echo "$ac_t""no" 1>&6
10267 fi
10268
10269
10270       fi
10271       if test -n "$native_sound_lib"; then
10272         sound_found=yes
10273         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
10274    echo "    xemacs will be linked with \"hpplay.o\""
10275  fi
10276         if test "$GCC" = "yes" # Kludge city
10277           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
10278           else sound_cflags="+e -I/usr/audio/examples"
10279         fi
10280       fi ;;
10281     esac
10282   fi
10283
10284     if test -z "$sound_found"; then
10285     for dir in "machine" "sys" "linux"; do
10286       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
10287 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
10288 echo "configure:10289: checking for ${dir}/soundcard.h" >&5
10289
10290 cat > conftest.$ac_ext <<EOF
10291 #line 10292 "configure"
10292 #include "confdefs.h"
10293 #include <${dir}/soundcard.h>
10294 EOF
10295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10296 { (eval echo configure:10297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10297 ac_err=`grep -v '^ *+' conftest.out`
10298 if test -z "$ac_err"; then
10299   rm -rf conftest*
10300   eval "ac_cv_header_$ac_safe=yes"
10301 else
10302   echo "$ac_err" >&5
10303   echo "configure: failed program was:" >&5
10304   cat conftest.$ac_ext >&5
10305   rm -rf conftest*
10306   eval "ac_cv_header_$ac_safe=no"
10307 fi
10308 rm -f conftest*
10309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10310   echo "$ac_t""yes" 1>&6
10311   sound_found=yes
10312         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
10313    echo "    xemacs will be linked with \"linuxplay.o\""
10314  fi
10315         { test "$extra_verbose" = "yes" && cat << EOF
10316     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
10317 EOF
10318 cat >> confdefs.h <<EOF
10319 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
10320 EOF
10321 }
10322
10323         break
10324 else
10325   echo "$ac_t""no" 1>&6
10326 fi
10327
10328     done
10329   fi
10330
10331   test "$sound_found" = "yes" && with_native_sound=yes
10332 fi
10333
10334 if test -z "$with_sound"; then
10335   if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then
10336     with_sound=native
10337   fi
10338 fi
10339
10340 if test "$with_native_sound" = "yes"; then
10341   { test "$extra_verbose" = "yes" && cat << \EOF
10342     Defining HAVE_NATIVE_SOUND
10343 EOF
10344 cat >> confdefs.h <<\EOF
10345 #define HAVE_NATIVE_SOUND 1
10346 EOF
10347 }
10348
10349   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
10350 fi
10351
10352 case "$with_sound" in both | nas )
10353   { test "$extra_verbose" = "yes" && cat << \EOF
10354     Defining HAVE_NAS_SOUND
10355 EOF
10356 cat >> confdefs.h <<\EOF
10357 #define HAVE_NAS_SOUND 1
10358 EOF
10359 }
10360
10361   extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
10362    echo "    xemacs will be linked with \"nas.o\""
10363  fi
10364   libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
10365       cat > conftest.$ac_ext <<EOF
10366 #line 10367 "configure"
10367 #include "confdefs.h"
10368 #include <audio/Xtutil.h>
10369 EOF
10370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10371   egrep "AuXtErrorJump" >/dev/null 2>&1; then
10372   :
10373 else
10374   rm -rf conftest*
10375   { test "$extra_verbose" = "yes" && cat << \EOF
10376     Defining NAS_NO_ERROR_JUMP
10377 EOF
10378 cat >> confdefs.h <<\EOF
10379 #define NAS_NO_ERROR_JUMP 1
10380 EOF
10381 }
10382
10383 fi
10384 rm -f conftest*
10385
10386 esac
10387
10388
10389 test -z "$with_tty" && with_tty=yes
10390
10391 if test "$with_tty" = "yes"  ; then
10392   echo "checking for TTY-related features" 1>&6
10393 echo "configure:10394: checking for TTY-related features" >&5
10394   { test "$extra_verbose" = "yes" && cat << \EOF
10395     Defining HAVE_TTY
10396 EOF
10397 cat >> confdefs.h <<\EOF
10398 #define HAVE_TTY 1
10399 EOF
10400 }
10401
10402   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
10403    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\""
10404  fi
10405
10406     if test -z "$with_ncurses"; then
10407     
10408 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
10409 echo "configure:10410: checking for tgetent in -lncurses" >&5
10410 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
10411
10412 xe_check_libs=" -lncurses "
10413 cat > conftest.$ac_ext <<EOF
10414 #line 10415 "configure"
10415 #include "confdefs.h"
10416 /* Override any gcc2 internal prototype to avoid an error.  */
10417 /* We use char because int might match the return type of a gcc2
10418     builtin and then its argument prototype would still apply.  */
10419 char tgetent();
10420
10421 int main() {
10422 tgetent()
10423 ; return 0; }
10424 EOF
10425 if { (eval echo configure:10426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10426   rm -rf conftest*
10427   eval "ac_cv_lib_$ac_lib_var=yes"
10428 else
10429   echo "configure: failed program was:" >&5
10430   cat conftest.$ac_ext >&5
10431   rm -rf conftest*
10432   eval "ac_cv_lib_$ac_lib_var=no"
10433 fi
10434 rm -f conftest*
10435 xe_check_libs=""
10436
10437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10438   echo "$ac_t""yes" 1>&6
10439   with_ncurses=yes
10440 else
10441   echo "$ac_t""no" 1>&6
10442 with_ncurses=no
10443 fi
10444
10445
10446   fi
10447   if test "$with_ncurses" = "yes"; then
10448     { test "$extra_verbose" = "yes" && cat << \EOF
10449     Defining HAVE_NCURSES
10450 EOF
10451 cat >> confdefs.h <<\EOF
10452 #define HAVE_NCURSES 1
10453 EOF
10454 }
10455
10456     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
10457 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
10458 echo "configure:10459: checking for ncurses/curses.h" >&5
10459
10460 cat > conftest.$ac_ext <<EOF
10461 #line 10462 "configure"
10462 #include "confdefs.h"
10463 #include <ncurses/curses.h>
10464 EOF
10465 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10466 { (eval echo configure:10467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10467 ac_err=`grep -v '^ *+' conftest.out`
10468 if test -z "$ac_err"; then
10469   rm -rf conftest*
10470   eval "ac_cv_header_$ac_safe=yes"
10471 else
10472   echo "$ac_err" >&5
10473   echo "configure: failed program was:" >&5
10474   cat conftest.$ac_ext >&5
10475   rm -rf conftest*
10476   eval "ac_cv_header_$ac_safe=no"
10477 fi
10478 rm -f conftest*
10479 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10480   echo "$ac_t""yes" 1>&6
10481   curses_h_path=ncurses/curses.h
10482 else
10483   echo "$ac_t""no" 1>&6
10484 fi
10485
10486     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
10487 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
10488 echo "configure:10489: checking for ncurses/term.h" >&5
10489
10490 cat > conftest.$ac_ext <<EOF
10491 #line 10492 "configure"
10492 #include "confdefs.h"
10493 #include <ncurses/term.h>
10494 EOF
10495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10496 { (eval echo configure:10497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10497 ac_err=`grep -v '^ *+' conftest.out`
10498 if test -z "$ac_err"; then
10499   rm -rf conftest*
10500   eval "ac_cv_header_$ac_safe=yes"
10501 else
10502   echo "$ac_err" >&5
10503   echo "configure: failed program was:" >&5
10504   cat conftest.$ac_ext >&5
10505   rm -rf conftest*
10506   eval "ac_cv_header_$ac_safe=no"
10507 fi
10508 rm -f conftest*
10509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10510   echo "$ac_t""yes" 1>&6
10511   term_h_path=ncurses/term.h
10512 else
10513   echo "$ac_t""no" 1>&6
10514 fi
10515
10516     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
10517    echo "    xemacs will be linked with \"terminfo.o\""
10518  fi
10519     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
10520
10521     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
10522                         save_c_switch_site="$c_switch_site"
10523       c_switch_site="$c_switch_site -I/usr/include/ncurses"
10524       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
10525 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
10526 echo "configure:10527: checking for ncurses/curses.h" >&5
10527
10528 cat > conftest.$ac_ext <<EOF
10529 #line 10530 "configure"
10530 #include "confdefs.h"
10531 #include <ncurses/curses.h>
10532 EOF
10533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10534 { (eval echo configure:10535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10535 ac_err=`grep -v '^ *+' conftest.out`
10536 if test -z "$ac_err"; then
10537   rm -rf conftest*
10538   eval "ac_cv_header_$ac_safe=yes"
10539 else
10540   echo "$ac_err" >&5
10541   echo "configure: failed program was:" >&5
10542   cat conftest.$ac_ext >&5
10543   rm -rf conftest*
10544   eval "ac_cv_header_$ac_safe=no"
10545 fi
10546 rm -f conftest*
10547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10548   echo "$ac_t""yes" 1>&6
10549   curses_h_path=ncurses/curses.h
10550 else
10551   echo "$ac_t""no" 1>&6
10552 fi
10553
10554       if test "$ac_cv_header_ncurses_curses_h" = "yes"
10555         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
10556         else c_switch_site="$save_c_switch_site"
10557       fi
10558     fi
10559   else         if test "$have_terminfo" = "yes"; then
10560       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
10561    echo "    xemacs will be linked with \"terminfo.o\""
10562  fi
10563       if test -n "$libs_termcap"; then
10564         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
10565       else
10566         for lib in curses termlib termcap; do
10567           
10568 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
10569 echo "configure:10570: checking for tgetent in -l$lib" >&5
10570 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
10571
10572 xe_check_libs=" -l$lib "
10573 cat > conftest.$ac_ext <<EOF
10574 #line 10575 "configure"
10575 #include "confdefs.h"
10576 /* Override any gcc2 internal prototype to avoid an error.  */
10577 /* We use char because int might match the return type of a gcc2
10578     builtin and then its argument prototype would still apply.  */
10579 char tgetent();
10580
10581 int main() {
10582 tgetent()
10583 ; return 0; }
10584 EOF
10585 if { (eval echo configure:10586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10586   rm -rf conftest*
10587   eval "ac_cv_lib_$ac_lib_var=yes"
10588 else
10589   echo "configure: failed program was:" >&5
10590   cat conftest.$ac_ext >&5
10591   rm -rf conftest*
10592   eval "ac_cv_lib_$ac_lib_var=no"
10593 fi
10594 rm -f conftest*
10595 xe_check_libs=""
10596
10597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10598   echo "$ac_t""yes" 1>&6
10599   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
10600 else
10601   echo "$ac_t""no" 1>&6
10602 fi
10603
10604
10605         done
10606       fi
10607     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
10608    echo "    xemacs will be linked with \"tparam.o\""
10609  fi
10610                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
10611       if test -n "$libs_termcap"; then
10612         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
10613       else
10614         
10615 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
10616 echo "configure:10617: checking for tgetent in -lcurses" >&5
10617 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
10618
10619 xe_check_libs=" -lcurses "
10620 cat > conftest.$ac_ext <<EOF
10621 #line 10622 "configure"
10622 #include "confdefs.h"
10623 /* Override any gcc2 internal prototype to avoid an error.  */
10624 /* We use char because int might match the return type of a gcc2
10625     builtin and then its argument prototype would still apply.  */
10626 char tgetent();
10627
10628 int main() {
10629 tgetent()
10630 ; return 0; }
10631 EOF
10632 if { (eval echo configure:10633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10633   rm -rf conftest*
10634   eval "ac_cv_lib_$ac_lib_var=yes"
10635 else
10636   echo "configure: failed program was:" >&5
10637   cat conftest.$ac_ext >&5
10638   rm -rf conftest*
10639   eval "ac_cv_lib_$ac_lib_var=no"
10640 fi
10641 rm -f conftest*
10642 xe_check_libs=""
10643
10644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10645   echo "$ac_t""yes" 1>&6
10646   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
10647 else
10648   echo "$ac_t""no" 1>&6
10649 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
10650 echo "configure:10651: checking for tgetent in -ltermcap" >&5
10651 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
10652
10653 xe_check_libs=" -ltermcap "
10654 cat > conftest.$ac_ext <<EOF
10655 #line 10656 "configure"
10656 #include "confdefs.h"
10657 /* Override any gcc2 internal prototype to avoid an error.  */
10658 /* We use char because int might match the return type of a gcc2
10659     builtin and then its argument prototype would still apply.  */
10660 char tgetent();
10661
10662 int main() {
10663 tgetent()
10664 ; return 0; }
10665 EOF
10666 if { (eval echo configure:10667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10667   rm -rf conftest*
10668   eval "ac_cv_lib_$ac_lib_var=yes"
10669 else
10670   echo "configure: failed program was:" >&5
10671   cat conftest.$ac_ext >&5
10672   rm -rf conftest*
10673   eval "ac_cv_lib_$ac_lib_var=no"
10674 fi
10675 rm -f conftest*
10676 xe_check_libs=""
10677
10678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10679   echo "$ac_t""yes" 1>&6
10680   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
10681 else
10682   echo "$ac_t""no" 1>&6
10683 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
10684    echo "    xemacs will be linked with \"termcap.o\""
10685  fi
10686 fi
10687
10688
10689 fi
10690
10691
10692       fi
10693     fi
10694   fi
10695   { test "$extra_verbose" = "yes" && cat << EOF
10696     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
10697 EOF
10698 cat >> confdefs.h <<EOF
10699 #define CURSES_H_PATH "${curses_h_path-curses.h}"
10700 EOF
10701 }
10702
10703   { test "$extra_verbose" = "yes" && cat << EOF
10704     Defining TERM_H_PATH = "${term_h_path-term.h}"
10705 EOF
10706 cat >> confdefs.h <<EOF
10707 #define TERM_H_PATH "${term_h_path-term.h}"
10708 EOF
10709 }
10710
10711
10712     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
10713 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
10714 echo "configure:10715: checking for gpm.h" >&5
10715
10716 cat > conftest.$ac_ext <<EOF
10717 #line 10718 "configure"
10718 #include "confdefs.h"
10719 #include <gpm.h>
10720 EOF
10721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10722 { (eval echo configure:10723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10723 ac_err=`grep -v '^ *+' conftest.out`
10724 if test -z "$ac_err"; then
10725   rm -rf conftest*
10726   eval "ac_cv_header_$ac_safe=yes"
10727 else
10728   echo "$ac_err" >&5
10729   echo "configure: failed program was:" >&5
10730   cat conftest.$ac_ext >&5
10731   rm -rf conftest*
10732   eval "ac_cv_header_$ac_safe=no"
10733 fi
10734 rm -f conftest*
10735 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10736   echo "$ac_t""yes" 1>&6
10737   :
10738 else
10739   echo "$ac_t""no" 1>&6
10740 with_gpm=no
10741 fi
10742  }
10743   test -z "$with_gpm" && { 
10744 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
10745 echo "configure:10746: checking for Gpm_Open in -lgpm" >&5
10746 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
10747
10748 xe_check_libs=" -lgpm "
10749 cat > conftest.$ac_ext <<EOF
10750 #line 10751 "configure"
10751 #include "confdefs.h"
10752 /* Override any gcc2 internal prototype to avoid an error.  */
10753 /* We use char because int might match the return type of a gcc2
10754     builtin and then its argument prototype would still apply.  */
10755 char Gpm_Open();
10756
10757 int main() {
10758 Gpm_Open()
10759 ; return 0; }
10760 EOF
10761 if { (eval echo configure:10762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10762   rm -rf conftest*
10763   eval "ac_cv_lib_$ac_lib_var=yes"
10764 else
10765   echo "configure: failed program was:" >&5
10766   cat conftest.$ac_ext >&5
10767   rm -rf conftest*
10768   eval "ac_cv_lib_$ac_lib_var=no"
10769 fi
10770 rm -f conftest*
10771 xe_check_libs=""
10772
10773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10774   echo "$ac_t""yes" 1>&6
10775   with_gpm=yes
10776 else
10777   echo "$ac_t""no" 1>&6
10778 with_gpm=no
10779 fi
10780
10781  }
10782   if test "$with_gpm" = "yes"; then
10783     { test "$extra_verbose" = "yes" && cat << \EOF
10784     Defining HAVE_GPM
10785 EOF
10786 cat >> confdefs.h <<\EOF
10787 #define HAVE_GPM 1
10788 EOF
10789 }
10790
10791     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
10792    echo "    xemacs will be linked with \"gpmevent.o\""
10793  fi
10794     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
10795   fi
10796
10797 else   for feature in ncurses gpm; do
10798     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10799       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
10800     fi
10801     eval "with_${feature}=no"
10802   done
10803 fi 
10804 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
10805    echo "    xemacs will be linked with \"event-unixoid.o\""
10806  fi
10807
10808
10809 echo "checking for database support" 1>&6
10810 echo "configure:10811: checking for database support" >&5
10811
10812 if test "$with_database_gnudbm" != "no"; then
10813   for ac_hdr in ndbm.h
10814 do
10815 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10816 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10817 echo "configure:10818: checking for $ac_hdr" >&5
10818
10819 cat > conftest.$ac_ext <<EOF
10820 #line 10821 "configure"
10821 #include "confdefs.h"
10822 #include <$ac_hdr>
10823 EOF
10824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10825 { (eval echo configure:10826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10826 ac_err=`grep -v '^ *+' conftest.out`
10827 if test -z "$ac_err"; then
10828   rm -rf conftest*
10829   eval "ac_cv_header_$ac_safe=yes"
10830 else
10831   echo "$ac_err" >&5
10832   echo "configure: failed program was:" >&5
10833   cat conftest.$ac_ext >&5
10834   rm -rf conftest*
10835   eval "ac_cv_header_$ac_safe=no"
10836 fi
10837 rm -f conftest*
10838 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10839   echo "$ac_t""yes" 1>&6
10840     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10841   { test "$extra_verbose" = "yes" && cat << EOF
10842     Defining $ac_tr_hdr
10843 EOF
10844 cat >> confdefs.h <<EOF
10845 #define $ac_tr_hdr 1
10846 EOF
10847 }
10848  have_ndbm_h=yes
10849 else
10850   echo "$ac_t""no" 1>&6
10851 fi
10852 done
10853
10854   if test "$have_ndbm_h" = "yes"; then
10855     
10856 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
10857 echo "configure:10858: checking for dbm_open in -lgdbm" >&5
10858 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
10859
10860 xe_check_libs=" -lgdbm "
10861 cat > conftest.$ac_ext <<EOF
10862 #line 10863 "configure"
10863 #include "confdefs.h"
10864 /* Override any gcc2 internal prototype to avoid an error.  */
10865 /* We use char because int might match the return type of a gcc2
10866     builtin and then its argument prototype would still apply.  */
10867 char dbm_open();
10868
10869 int main() {
10870 dbm_open()
10871 ; return 0; }
10872 EOF
10873 if { (eval echo configure:10874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10874   rm -rf conftest*
10875   eval "ac_cv_lib_$ac_lib_var=yes"
10876 else
10877   echo "configure: failed program was:" >&5
10878   cat conftest.$ac_ext >&5
10879   rm -rf conftest*
10880   eval "ac_cv_lib_$ac_lib_var=no"
10881 fi
10882 rm -f conftest*
10883 xe_check_libs=""
10884
10885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10886   echo "$ac_t""yes" 1>&6
10887   with_database_gnudbm=yes have_libgdbm=yes
10888 else
10889   echo "$ac_t""no" 1>&6
10890 fi
10891
10892
10893   fi
10894   if test "$with_database_gnudbm" != "yes"; then
10895     echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
10896 echo "configure:10897: checking for dbm_open" >&5
10897
10898 cat > conftest.$ac_ext <<EOF
10899 #line 10900 "configure"
10900 #include "confdefs.h"
10901 /* System header to define __stub macros and hopefully few prototypes,
10902     which can conflict with char dbm_open(); below.  */
10903 #include <assert.h>
10904 /* Override any gcc2 internal prototype to avoid an error.  */
10905 /* We use char because int might match the return type of a gcc2
10906     builtin and then its argument prototype would still apply.  */
10907 char dbm_open();
10908
10909 int main() {
10910
10911 /* The GNU C library defines this for functions which it implements
10912     to always fail with ENOSYS.  Some functions are actually named
10913     something starting with __ and the normal name is an alias.  */
10914 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
10915 choke me
10916 #else
10917 dbm_open();
10918 #endif
10919
10920 ; return 0; }
10921 EOF
10922 if { (eval echo configure:10923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10923   rm -rf conftest*
10924   eval "ac_cv_func_dbm_open=yes"
10925 else
10926   echo "configure: failed program was:" >&5
10927   cat conftest.$ac_ext >&5
10928   rm -rf conftest*
10929   eval "ac_cv_func_dbm_open=no"
10930 fi
10931 rm -f conftest*
10932
10933 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
10934   echo "$ac_t""yes" 1>&6
10935   with_database_gnudbm=yes
10936 else
10937   echo "$ac_t""no" 1>&6
10938 fi
10939
10940       fi
10941   if test "$with_database_gnudbm" = "yes"; then
10942     { test "$extra_verbose" = "yes" && cat << \EOF
10943     Defining HAVE_DBM
10944 EOF
10945 cat >> confdefs.h <<\EOF
10946 #define HAVE_DBM 1
10947 EOF
10948 }
10949
10950     test "$have_libgdbm" = "yes" && LIBS="-lgdbm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdbm\" to \$LIBS"; fi
10951     with_database_dbm=no
10952   else with_database_gnudbm=no
10953   fi
10954 fi
10955
10956 if test "$with_database_dbm" != "no"; then
10957   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
10958 echo "configure:10959: checking for dbm_open" >&5
10959
10960 cat > conftest.$ac_ext <<EOF
10961 #line 10962 "configure"
10962 #include "confdefs.h"
10963 /* System header to define __stub macros and hopefully few prototypes,
10964     which can conflict with char dbm_open(); below.  */
10965 #include <assert.h>
10966 /* Override any gcc2 internal prototype to avoid an error.  */
10967 /* We use char because int might match the return type of a gcc2
10968     builtin and then its argument prototype would still apply.  */
10969 char dbm_open();
10970
10971 int main() {
10972
10973 /* The GNU C library defines this for functions which it implements
10974     to always fail with ENOSYS.  Some functions are actually named
10975     something starting with __ and the normal name is an alias.  */
10976 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
10977 choke me
10978 #else
10979 dbm_open();
10980 #endif
10981
10982 ; return 0; }
10983 EOF
10984 if { (eval echo configure:10985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10985   rm -rf conftest*
10986   eval "ac_cv_func_dbm_open=yes"
10987 else
10988   echo "configure: failed program was:" >&5
10989   cat conftest.$ac_ext >&5
10990   rm -rf conftest*
10991   eval "ac_cv_func_dbm_open=no"
10992 fi
10993 rm -f conftest*
10994
10995 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
10996   echo "$ac_t""yes" 1>&6
10997   with_database_dbm=yes need_libdbm=no
10998 else
10999   echo "$ac_t""no" 1>&6
11000 fi
11001
11002   if test "$need_libdbm" != "no"; then
11003     
11004 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11005 echo "configure:11006: checking for dbm_open in -ldbm" >&5
11006 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
11007
11008 xe_check_libs=" -ldbm "
11009 cat > conftest.$ac_ext <<EOF
11010 #line 11011 "configure"
11011 #include "confdefs.h"
11012 /* Override any gcc2 internal prototype to avoid an error.  */
11013 /* We use char because int might match the return type of a gcc2
11014     builtin and then its argument prototype would still apply.  */
11015 char dbm_open();
11016
11017 int main() {
11018 dbm_open()
11019 ; return 0; }
11020 EOF
11021 if { (eval echo configure:11022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11022   rm -rf conftest*
11023   eval "ac_cv_lib_$ac_lib_var=yes"
11024 else
11025   echo "configure: failed program was:" >&5
11026   cat conftest.$ac_ext >&5
11027   rm -rf conftest*
11028   eval "ac_cv_lib_$ac_lib_var=no"
11029 fi
11030 rm -f conftest*
11031 xe_check_libs=""
11032
11033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11034   echo "$ac_t""yes" 1>&6
11035   with_database_dbm=yes need_libdbm=yes
11036 else
11037   echo "$ac_t""no" 1>&6
11038 fi
11039
11040
11041   fi
11042   if test "$with_database_dbm" = "yes"; then
11043     { test "$extra_verbose" = "yes" && cat << \EOF
11044     Defining HAVE_DBM
11045 EOF
11046 cat >> confdefs.h <<\EOF
11047 #define HAVE_DBM 1
11048 EOF
11049 }
11050
11051     test "$need_libdbm" = "yes" && LIBS="-ldbm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldbm\" to \$LIBS"; fi
11052   else with_database_dbm=no
11053   fi
11054 fi
11055
11056 if test "$with_database_berkdb" != "no"; then
11057   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
11058 echo "configure:11059: checking for Berkeley db.h" >&5
11059   for path in "db/db.h" "db.h"; do
11060     cat > conftest.$ac_ext <<EOF
11061 #line 11062 "configure"
11062 #include "confdefs.h"
11063 #ifdef HAVE_INTTYPES_H
11064 #define __BIT_TYPES_DEFINED__
11065 #include <inttypes.h>
11066 typedef uint8_t  u_int8_t;
11067 typedef uint16_t u_int16_t;
11068 typedef uint32_t u_int32_t;
11069 #ifdef WE_DONT_NEED_QUADS
11070 typedef uint64_t u_int64_t;
11071 #endif
11072 #endif
11073 #include <$path>
11074
11075 int main() {
11076
11077 ; return 0; }
11078 EOF
11079 if { (eval echo configure:11080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11080   rm -rf conftest*
11081   db_h_path="$path"; break
11082 else
11083   echo "configure: failed program was:" >&5
11084   cat conftest.$ac_ext >&5
11085 fi
11086 rm -f conftest*
11087   done
11088   if test -z "$db_h_path"
11089   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
11090   else echo "$ac_t""$db_h_path" 1>&6
11091   fi
11092
11093   if test "$with_database_berkdb" != "no"; then
11094     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
11095 echo "configure:11096: checking for Berkeley DB version" >&5
11096     cat > conftest.$ac_ext <<EOF
11097 #line 11098 "configure"
11098 #include "confdefs.h"
11099 #include <$db_h_path>
11100 #if DB_VERSION_MAJOR > 1
11101 yes
11102 #endif
11103
11104 EOF
11105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11106   egrep "yes" >/dev/null 2>&1; then
11107   rm -rf conftest*
11108   echo "$ac_t""2" 1>&6; dbfunc=db_open
11109 else
11110   rm -rf conftest*
11111   echo "$ac_t""1" 1>&6; dbfunc=dbopen
11112 fi
11113 rm -f conftest*
11114
11115     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
11116 echo "configure:11117: checking for $dbfunc" >&5
11117
11118 cat > conftest.$ac_ext <<EOF
11119 #line 11120 "configure"
11120 #include "confdefs.h"
11121 /* System header to define __stub macros and hopefully few prototypes,
11122     which can conflict with char $dbfunc(); below.  */
11123 #include <assert.h>
11124 /* Override any gcc2 internal prototype to avoid an error.  */
11125 /* We use char because int might match the return type of a gcc2
11126     builtin and then its argument prototype would still apply.  */
11127 char $dbfunc();
11128
11129 int main() {
11130
11131 /* The GNU C library defines this for functions which it implements
11132     to always fail with ENOSYS.  Some functions are actually named
11133     something starting with __ and the normal name is an alias.  */
11134 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
11135 choke me
11136 #else
11137 $dbfunc();
11138 #endif
11139
11140 ; return 0; }
11141 EOF
11142 if { (eval echo configure:11143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11143   rm -rf conftest*
11144   eval "ac_cv_func_$dbfunc=yes"
11145 else
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148   rm -rf conftest*
11149   eval "ac_cv_func_$dbfunc=no"
11150 fi
11151 rm -f conftest*
11152
11153 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
11154   echo "$ac_t""yes" 1>&6
11155   with_database_berkdb=yes need_libdb=no
11156 else
11157   echo "$ac_t""no" 1>&6
11158
11159     
11160 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
11161 echo "configure:11162: checking for $dbfunc in -ldb" >&5
11162 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
11163
11164 xe_check_libs=" -ldb "
11165 cat > conftest.$ac_ext <<EOF
11166 #line 11167 "configure"
11167 #include "confdefs.h"
11168 /* Override any gcc2 internal prototype to avoid an error.  */
11169 /* We use char because int might match the return type of a gcc2
11170     builtin and then its argument prototype would still apply.  */
11171 char $dbfunc();
11172
11173 int main() {
11174 $dbfunc()
11175 ; return 0; }
11176 EOF
11177 if { (eval echo configure:11178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11178   rm -rf conftest*
11179   eval "ac_cv_lib_$ac_lib_var=yes"
11180 else
11181   echo "configure: failed program was:" >&5
11182   cat conftest.$ac_ext >&5
11183   rm -rf conftest*
11184   eval "ac_cv_lib_$ac_lib_var=no"
11185 fi
11186 rm -f conftest*
11187 xe_check_libs=""
11188
11189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11190   echo "$ac_t""yes" 1>&6
11191   with_database_berkdb=yes need_libdb=yes
11192 else
11193   echo "$ac_t""no" 1>&6
11194 fi
11195
11196
11197 fi
11198
11199   fi
11200
11201   if test "$with_database_berkdb" = "yes"; then
11202     { test "$extra_verbose" = "yes" && cat << EOF
11203     Defining DB_H_PATH = "$db_h_path"
11204 EOF
11205 cat >> confdefs.h <<EOF
11206 #define DB_H_PATH "$db_h_path"
11207 EOF
11208 }
11209
11210     { test "$extra_verbose" = "yes" && cat << \EOF
11211     Defining HAVE_BERKELEY_DB
11212 EOF
11213 cat >> confdefs.h <<\EOF
11214 #define HAVE_BERKELEY_DB 1
11215 EOF
11216 }
11217
11218     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
11219   else with_database_berkdb=no
11220   fi
11221 fi
11222
11223 if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
11224      != "no no no"; then
11225   { test "$extra_verbose" = "yes" && cat << \EOF
11226     Defining HAVE_DATABASE
11227 EOF
11228 cat >> confdefs.h <<\EOF
11229 #define HAVE_DATABASE 1
11230 EOF
11231 }
11232
11233   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
11234    echo "    xemacs will be linked with \"database.o\""
11235  fi
11236 fi
11237
11238 if test "$with_socks" = "yes"; then
11239   
11240 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
11241 echo "configure:11242: checking for SOCKSinit in -lsocks" >&5
11242 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
11243
11244 xe_check_libs=" -lsocks "
11245 cat > conftest.$ac_ext <<EOF
11246 #line 11247 "configure"
11247 #include "confdefs.h"
11248 /* Override any gcc2 internal prototype to avoid an error.  */
11249 /* We use char because int might match the return type of a gcc2
11250     builtin and then its argument prototype would still apply.  */
11251 char SOCKSinit();
11252
11253 int main() {
11254 SOCKSinit()
11255 ; return 0; }
11256 EOF
11257 if { (eval echo configure:11258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11258   rm -rf conftest*
11259   eval "ac_cv_lib_$ac_lib_var=yes"
11260 else
11261   echo "configure: failed program was:" >&5
11262   cat conftest.$ac_ext >&5
11263   rm -rf conftest*
11264   eval "ac_cv_lib_$ac_lib_var=no"
11265 fi
11266 rm -f conftest*
11267 xe_check_libs=""
11268
11269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11270   echo "$ac_t""yes" 1>&6
11271     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11272     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11273   { test "$extra_verbose" = "yes" && cat << EOF
11274     Defining $ac_tr_lib
11275 EOF
11276 cat >> confdefs.h <<EOF
11277 #define $ac_tr_lib 1
11278 EOF
11279 }
11280
11281   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
11282
11283 else
11284   echo "$ac_t""no" 1>&6
11285 fi
11286
11287
11288   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
11289     Defining HAVE_SOCKS
11290 EOF
11291 cat >> confdefs.h <<\EOF
11292 #define HAVE_SOCKS 1
11293 EOF
11294 }
11295
11296 fi
11297
11298 if test "$usage_tracking" = "yes"; then
11299   { test "$extra_verbose" = "yes" && cat << \EOF
11300     Defining USAGE_TRACKING
11301 EOF
11302 cat >> confdefs.h <<\EOF
11303 #define USAGE_TRACKING 1
11304 EOF
11305 }
11306
11307   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
11308 fi
11309
11310 test -z "$with_shlib" && test "$opsys $machine" = "cygwin32 intel386" && with_shlib=no
11311
11312 for ac_hdr in dlfcn.h
11313 do
11314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11316 echo "configure:11317: checking for $ac_hdr" >&5
11317
11318 cat > conftest.$ac_ext <<EOF
11319 #line 11320 "configure"
11320 #include "confdefs.h"
11321 #include <$ac_hdr>
11322 EOF
11323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11324 { (eval echo configure:11325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11325 ac_err=`grep -v '^ *+' conftest.out`
11326 if test -z "$ac_err"; then
11327   rm -rf conftest*
11328   eval "ac_cv_header_$ac_safe=yes"
11329 else
11330   echo "$ac_err" >&5
11331   echo "configure: failed program was:" >&5
11332   cat conftest.$ac_ext >&5
11333   rm -rf conftest*
11334   eval "ac_cv_header_$ac_safe=no"
11335 fi
11336 rm -f conftest*
11337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11338   echo "$ac_t""yes" 1>&6
11339     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11340   { test "$extra_verbose" = "yes" && cat << EOF
11341     Defining $ac_tr_hdr
11342 EOF
11343 cat >> confdefs.h <<EOF
11344 #define $ac_tr_hdr 1
11345 EOF
11346 }
11347  have_dlfcn=yes
11348 else
11349   echo "$ac_t""no" 1>&6
11350 fi
11351 done
11352
11353 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11354 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
11355 echo "configure:11356: checking for dlopen in -ldl" >&5
11356 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
11357
11358 xe_check_libs=" -ldl "
11359 cat > conftest.$ac_ext <<EOF
11360 #line 11361 "configure"
11361 #include "confdefs.h"
11362 /* Override any gcc2 internal prototype to avoid an error.  */
11363 /* We use char because int might match the return type of a gcc2
11364     builtin and then its argument prototype would still apply.  */
11365 char dlopen();
11366
11367 int main() {
11368 dlopen()
11369 ; return 0; }
11370 EOF
11371 if { (eval echo configure:11372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11372   rm -rf conftest*
11373   eval "ac_cv_lib_$ac_lib_var=yes"
11374 else
11375   echo "configure: failed program was:" >&5
11376   cat conftest.$ac_ext >&5
11377   rm -rf conftest*
11378   eval "ac_cv_lib_$ac_lib_var=no"
11379 fi
11380 rm -f conftest*
11381 xe_check_libs=""
11382
11383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11384   echo "$ac_t""yes" 1>&6
11385   { test "$extra_verbose" = "yes" && cat << \EOF
11386     Defining HAVE_DLOPEN
11387 EOF
11388 cat >> confdefs.h <<\EOF
11389 #define HAVE_DLOPEN 1
11390 EOF
11391 }
11392  DLL_LIB=dl;  with_shlib=yes
11393 else
11394   echo "$ac_t""no" 1>&6
11395 fi
11396
11397  }
11398 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11399 echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6
11400 echo "configure:11401: checking for _dlopen in -lc" >&5
11401 ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'`
11402
11403 xe_check_libs=" -lc "
11404 cat > conftest.$ac_ext <<EOF
11405 #line 11406 "configure"
11406 #include "confdefs.h"
11407 /* Override any gcc2 internal prototype to avoid an error.  */
11408 /* We use char because int might match the return type of a gcc2
11409     builtin and then its argument prototype would still apply.  */
11410 char _dlopen();
11411
11412 int main() {
11413 _dlopen()
11414 ; return 0; }
11415 EOF
11416 if { (eval echo configure:11417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11417   rm -rf conftest*
11418   eval "ac_cv_lib_$ac_lib_var=yes"
11419 else
11420   echo "configure: failed program was:" >&5
11421   cat conftest.$ac_ext >&5
11422   rm -rf conftest*
11423   eval "ac_cv_lib_$ac_lib_var=no"
11424 fi
11425 rm -f conftest*
11426 xe_check_libs=""
11427
11428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11429   echo "$ac_t""yes" 1>&6
11430   { test "$extra_verbose" = "yes" && cat << \EOF
11431     Defining HAVE_DLOPEN
11432 EOF
11433 cat >> confdefs.h <<\EOF
11434 #define HAVE_DLOPEN 1
11435 EOF
11436 }
11437  DLL_LIB=;   with_shlib=yes
11438 else
11439   echo "$ac_t""no" 1>&6
11440 fi
11441
11442  }
11443 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11444 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
11445 echo "configure:11446: checking for dlopen in -lc" >&5
11446 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
11447
11448 xe_check_libs=" -lc "
11449 cat > conftest.$ac_ext <<EOF
11450 #line 11451 "configure"
11451 #include "confdefs.h"
11452 /* Override any gcc2 internal prototype to avoid an error.  */
11453 /* We use char because int might match the return type of a gcc2
11454     builtin and then its argument prototype would still apply.  */
11455 char dlopen();
11456
11457 int main() {
11458 dlopen()
11459 ; return 0; }
11460 EOF
11461 if { (eval echo configure:11462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11462   rm -rf conftest*
11463   eval "ac_cv_lib_$ac_lib_var=yes"
11464 else
11465   echo "configure: failed program was:" >&5
11466   cat conftest.$ac_ext >&5
11467   rm -rf conftest*
11468   eval "ac_cv_lib_$ac_lib_var=no"
11469 fi
11470 rm -f conftest*
11471 xe_check_libs=""
11472
11473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11474   echo "$ac_t""yes" 1>&6
11475   { test "$extra_verbose" = "yes" && cat << \EOF
11476     Defining HAVE_DLOPEN
11477 EOF
11478 cat >> confdefs.h <<\EOF
11479 #define HAVE_DLOPEN 1
11480 EOF
11481 }
11482  DLL_LIB=;   with_shlib=yes
11483 else
11484   echo "$ac_t""no" 1>&6
11485 fi
11486
11487  }
11488 test -z "$with_shlib" && { 
11489 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
11490 echo "configure:11491: checking for shl_load in -ldld" >&5
11491 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
11492
11493 xe_check_libs=" -ldld "
11494 cat > conftest.$ac_ext <<EOF
11495 #line 11496 "configure"
11496 #include "confdefs.h"
11497 /* Override any gcc2 internal prototype to avoid an error.  */
11498 /* We use char because int might match the return type of a gcc2
11499     builtin and then its argument prototype would still apply.  */
11500 char shl_load();
11501
11502 int main() {
11503 shl_load()
11504 ; return 0; }
11505 EOF
11506 if { (eval echo configure:11507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11507   rm -rf conftest*
11508   eval "ac_cv_lib_$ac_lib_var=yes"
11509 else
11510   echo "configure: failed program was:" >&5
11511   cat conftest.$ac_ext >&5
11512   rm -rf conftest*
11513   eval "ac_cv_lib_$ac_lib_var=no"
11514 fi
11515 rm -f conftest*
11516 xe_check_libs=""
11517
11518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11519   echo "$ac_t""yes" 1>&6
11520   { test "$extra_verbose" = "yes" && cat << \EOF
11521     Defining HAVE_SHL_LOAD
11522 EOF
11523 cat >> confdefs.h <<\EOF
11524 #define HAVE_SHL_LOAD 1
11525 EOF
11526 }
11527  DLL_LIB=dld; with_shlib=yes
11528 else
11529   echo "$ac_t""no" 1>&6
11530 fi
11531
11532  }
11533 test -z "$with_shlib" && { 
11534 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
11535 echo "configure:11536: checking for dld_init in -ldld" >&5
11536 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
11537
11538 xe_check_libs=" -ldld "
11539 cat > conftest.$ac_ext <<EOF
11540 #line 11541 "configure"
11541 #include "confdefs.h"
11542 /* Override any gcc2 internal prototype to avoid an error.  */
11543 /* We use char because int might match the return type of a gcc2
11544     builtin and then its argument prototype would still apply.  */
11545 char dld_init();
11546
11547 int main() {
11548 dld_init()
11549 ; return 0; }
11550 EOF
11551 if { (eval echo configure:11552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11552   rm -rf conftest*
11553   eval "ac_cv_lib_$ac_lib_var=yes"
11554 else
11555   echo "configure: failed program was:" >&5
11556   cat conftest.$ac_ext >&5
11557   rm -rf conftest*
11558   eval "ac_cv_lib_$ac_lib_var=no"
11559 fi
11560 rm -f conftest*
11561 xe_check_libs=""
11562
11563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11564   echo "$ac_t""yes" 1>&6
11565   { test "$extra_verbose" = "yes" && cat << \EOF
11566     Defining HAVE_DLD_INIT
11567 EOF
11568 cat >> confdefs.h <<\EOF
11569 #define HAVE_DLD_INIT 1
11570 EOF
11571 }
11572  DLL_LIB=dld; with_shlib=yes
11573 else
11574   echo "$ac_t""no" 1>&6
11575 fi
11576
11577  }
11578 if test "$with_shlib" = "yes"; then
11579   { test "$extra_verbose" = "yes" && cat << \EOF
11580     Defining HAVE_SHLIB
11581 EOF
11582 cat >> confdefs.h <<\EOF
11583 #define HAVE_SHLIB 1
11584 EOF
11585 }
11586
11587   extra_objs="$extra_objs sysdll.o" &&  if test "$extra_verbose" = "yes"; then
11588    echo "    xemacs will be linked with \"sysdll.o\""
11589  fi
11590   extra_objs="$extra_objs dll.o" &&  if test "$extra_verbose" = "yes"; then
11591    echo "    xemacs will be linked with \"dll.o\""
11592  fi
11593   test ! -z "$DLL_LIB" && LIBS="-l${DLL_LIB} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${DLL_LIB}\" to \$LIBS"; fi
11594   
11595 dll_ld="ld"
11596 dll_lflags="-shared"
11597 dll_cflags="-r"
11598 dll_oflags="-o "
11599
11600 echo $ac_n "checking how to build a shared library""... $ac_c" 1>&6
11601 echo "configure:11602: checking how to build a shared library" >&5
11602 case `uname -rs` in
11603         UNIX_SV*|UNIX_System_V*)
11604                 dll_lflags="-G"
11605                 dll_cflags=-Kpic
11606                 dll_ld="ld"
11607                 ;;
11608         BSD/OS*)
11609                 dll_cflags=
11610                 dll_lflags="-r"
11611                 dll_ld="shlicc2"
11612                 ;;
11613         FreeBSD*2*)
11614                 dll_lflags="-Bshareable"
11615                 dll_cflags="-fPIC -DPIC"
11616                 dll_ld=ld
11617                 ;;
11618         SunOS*4.*)
11619                 dll_cflags="-P"
11620                 dll_lflags="-dp -assert pure-text -assert nodefinitions"
11621                 ;;
11622         SunOS*5.*)
11623                 dll_ld="cc"
11624                 dll_cflags="-KPIC"
11625                 dll_lflags="-G"
11626                 dll_oflags="-W0,-y-o -W0,-y"
11627                 ;;      
11628         IRIX*5.*|IRIX*6.*)
11629                 dll_cflags="-KPIC"
11630                 ;;
11631         OSF1*)
11632                 ;;
11633         HP-UX*)
11634                 dll_ld="ld"
11635                 dll_lflags="-b"
11636                 dll_cflags="+z"
11637                 ;;
11638         SCO_SV*)
11639                 dll_ld="ld"
11640                 dll_lflags="-G"
11641                 dll_cflags="-Kpic"
11642                 ;;
11643         AIX*)
11644                 dll_lflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:\${@:.ell=.exp} -b noentry -lc"
11645                 dll_ld="ld"
11646                 ;;
11647         *)
11648                 ;;
11649         esac
11650
11651         if test "$GCC" = "yes" ; then
11652                 dll_cflags="-fPIC"
11653                 case `uname -rs` in
11654                 SunOS*5.*)
11655                         dll_ld="ld"
11656                         dll_oflags="-o "
11657                         dll_lflags="-G"
11658                         ;;
11659                 SCO_SV*)
11660                         dll_ld="ld"
11661                         dll_lflags="-G"
11662                         dll_cflags="-b elf"
11663                         ;;
11664                 FreeBSD*)
11665                         dll_cflags="-DDLSYM_NEEDS_UNDERSCORE -DPIC -fPIC"
11666                         dll_lflags="-Bshareable"
11667                         dll_ld=ld
11668                         ;;
11669                 BSD/OS*)
11670                         dll_cflags=
11671                         dll_lflags="-r"
11672                         dll_ld="shlicc2"
11673                         ;;
11674                 UNIX_SV*)
11675                         dll_cflags="-fPIC"
11676                         ;;
11677                 *)
11678                         dll_ld="$CC"
11679                         dll_lflags="-shared"
11680                 esac
11681         fi
11682
11683         echo "$ac_t"""lflags: $dll_lflags cflags: $dll_cflags"" 1>&6
11684
11685
11686
11687
11688
11689   for ac_func in dlerror
11690 do
11691 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11692 echo "configure:11693: checking for $ac_func" >&5
11693
11694 cat > conftest.$ac_ext <<EOF
11695 #line 11696 "configure"
11696 #include "confdefs.h"
11697 /* System header to define __stub macros and hopefully few prototypes,
11698     which can conflict with char $ac_func(); below.  */
11699 #include <assert.h>
11700 /* Override any gcc2 internal prototype to avoid an error.  */
11701 /* We use char because int might match the return type of a gcc2
11702     builtin and then its argument prototype would still apply.  */
11703 char $ac_func();
11704
11705 int main() {
11706
11707 /* The GNU C library defines this for functions which it implements
11708     to always fail with ENOSYS.  Some functions are actually named
11709     something starting with __ and the normal name is an alias.  */
11710 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11711 choke me
11712 #else
11713 $ac_func();
11714 #endif
11715
11716 ; return 0; }
11717 EOF
11718 if { (eval echo configure:11719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11719   rm -rf conftest*
11720   eval "ac_cv_func_$ac_func=yes"
11721 else
11722   echo "configure: failed program was:" >&5
11723   cat conftest.$ac_ext >&5
11724   rm -rf conftest*
11725   eval "ac_cv_func_$ac_func=no"
11726 fi
11727 rm -f conftest*
11728
11729 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11730   echo "$ac_t""yes" 1>&6
11731     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11732   { test "$extra_verbose" = "yes" && cat << EOF
11733     Defining $ac_tr_func
11734 EOF
11735 cat >> confdefs.h <<EOF
11736 #define $ac_tr_func 1
11737 EOF
11738 }
11739  
11740 else
11741   echo "$ac_t""no" 1>&6
11742 fi
11743 done
11744
11745   ld_dynamic_link_flags=
11746     case "$opsys" in
11747   hpux*)  ld_dynamic_link_flags="-Wl,-E" ;;
11748   linux*) ld_dynamic_link_flags="-rdynamic" ;;
11749   *) ;;
11750   esac
11751 fi
11752
11753 cat > conftest.$ac_ext <<EOF
11754 #line 11755 "configure"
11755 #include "confdefs.h"
11756 int main(int c,char *v[]){return 0;}
11757 EOF
11758 if { (eval echo configure:11759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11759 then
11760   :
11761 else
11762   conftest_rc="$?"
11763   echo "configure: failed program was:" >&5
11764   cat conftest.$ac_ext >&5
11765   rm -fr conftest*
11766   
11767   echo ""
11768   echo "*** PANIC *** The C compiler can no longer build working executables."
11769   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
11770   echo "*** PANIC *** The most likely reason for this problem is that configure"
11771   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
11772   echo "*** PANIC *** found at run time."
11773   echo "*** PANIC ***"
11774   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
11775   echo "*** PANIC *** On other systems, try telling configure where to find the"
11776   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
11777   echo "*** PANIC ***"
11778   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
11779   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
11780   echo "*** PANIC *** on your system.  Don't do that."
11781   exit 1
11782 fi
11783 rm -fr conftest*
11784
11785
11786 { test "$extra_verbose" = "yes" && cat << \EOF
11787     Defining HAVE_UNIX_PROCESSES
11788 EOF
11789 cat >> confdefs.h <<\EOF
11790 #define HAVE_UNIX_PROCESSES 1
11791 EOF
11792 }
11793
11794 extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
11795    echo "    xemacs will be linked with \"process-unix.o\""
11796  fi
11797
11798
11799
11800 T=""
11801 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11802 CFLAGS="$T"
11803
11804
11805 T=""
11806 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11807 extra_objs="$T"
11808
11809
11810 T=""
11811 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
11812 c_switch_general="$T"
11813
11814
11815 T=""
11816 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11817 c_switch_window_system="$T"
11818
11819
11820 T=""
11821 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11822 c_switch_all="$T"
11823
11824
11825 T=""
11826 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
11827 ld_switch_general="$T"
11828
11829
11830 T=""
11831 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11832 ld_switch_window_system="$T"
11833
11834
11835 T=""
11836 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11837 ld_switch_all="$T"
11838
11839
11840 T=""
11841 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11842 ld_libs_general="$T"
11843
11844
11845 T=""
11846 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
11847 ld_libs_window_system="$T"
11848
11849
11850 T=""
11851 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11852 ld_libs_all="$T"
11853
11854
11855
11856 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
11857 internal_makefile_list="Makefile"
11858 SUBDIR_MAKEFILES=''
11859 test -d lock || mkdir lock
11860 for dir in $MAKE_SUBDIR; do
11861   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
11862         test -d "$d" || mkdir "$d"; cd "$d"
11863       done ) ;;
11864    * ) test -d "$dir" || mkdir "$dir" ;;
11865   esac
11866   
11867 T=""
11868 for W in $SUBDIR_MAKEFILES $dir/Makefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11869 SUBDIR_MAKEFILES="$T"
11870
11871   
11872 T=""
11873 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11874 internal_makefile_list="$T"
11875
11876 done
11877
11878
11879
11880
11881 for dir in src/s src/m; do
11882   if test ! -d "$dir" ; then
11883     echo Making symbolic link to "$srcdir/$dir"
11884     ${LN_S} "$srcdir/$dir" "$dir"
11885   fi
11886 done
11887
11888 if test "$extra_verbose" = "yes"; then
11889   echo ""
11890   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
11891   echo ""
11892 fi
11893
11894 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
11895   echo "creating src/gdbinit"; echo ""
11896   echo "source $srcdir/src/gdbinit" > src/gdbinit
11897 fi
11898
11899 if test "$__SUNPRO_C" = "yes"; then
11900   echo "creating .sbinit"; echo ""
11901   ( echo "# For use with Sun WorkShop's Source browser."
11902     echo "# See sbquery(1) and sbinit(4) for more information"
11903     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
11904   ) > .sbinit
11905 fi
11906
11907 rm -f core
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924 PREFIX=$prefix
11925 while true; do
11926   case "$PREFIX" in
11927     *\$* ) eval "PREFIX=$PREFIX" ;;
11928     *) break ;;
11929   esac
11930 done
11931
11932
11933
11934 EXEC_PREFIX=$exec_prefix
11935 while true; do
11936   case "$EXEC_PREFIX" in
11937     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
11938     *) break ;;
11939   esac
11940 done
11941
11942
11943
11944
11945 INFODIR=$infodir
11946 while true; do
11947   case "$INFODIR" in
11948     *\$* ) eval "INFODIR=$INFODIR" ;;
11949     *) break ;;
11950   esac
11951 done
11952
11953
11954
11955
11956 INFOPATH=$infopath
11957 while true; do
11958   case "$INFOPATH" in
11959     *\$* ) eval "INFOPATH=$INFOPATH" ;;
11960     *) break ;;
11961   esac
11962 done
11963
11964
11965
11966
11967 PACKAGE_PATH=$package_path
11968 while true; do
11969   case "$PACKAGE_PATH" in
11970     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
11971     *) break ;;
11972   esac
11973 done
11974
11975
11976
11977
11978 LISPDIR=$lispdir
11979 while true; do
11980   case "$LISPDIR" in
11981     *\$* ) eval "LISPDIR=$LISPDIR" ;;
11982     *) break ;;
11983   esac
11984 done
11985
11986
11987
11988
11989
11990 ETCDIR=$etcdir
11991 while true; do
11992   case "$ETCDIR" in
11993     *\$* ) eval "ETCDIR=$ETCDIR" ;;
11994     *) break ;;
11995   esac
11996 done
11997
11998
11999
12000
12001 LOCKDIR=$lockdir
12002 while true; do
12003   case "$LOCKDIR" in
12004     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
12005     *) break ;;
12006   esac
12007 done
12008
12009
12010
12011
12012 ARCHLIBDIR=$archlibdir
12013 while true; do
12014   case "$ARCHLIBDIR" in
12015     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
12016     *) break ;;
12017   esac
12018 done
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
12041
12042
12043
12044
12045
12046
12047
12048 # The default is yes
12049 if test "$with_site_lisp" = "no"; then
12050   { test "$extra_verbose" = "yes" && cat << \EOF
12051     Defining INHIBIT_SITE_LISP
12052 EOF
12053 cat >> confdefs.h <<\EOF
12054 #define INHIBIT_SITE_LISP 1
12055 EOF
12056 }
12057
12058 fi
12059
12060
12061 T=""
12062 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12063 ac_configure_args="$T"
12064
12065 { test "$extra_verbose" = "yes" && cat << EOF
12066     Defining EMACS_CONFIGURATION = "$canonical"
12067 EOF
12068 cat >> confdefs.h <<EOF
12069 #define EMACS_CONFIGURATION "$canonical"
12070 EOF
12071 }
12072
12073 { test "$extra_verbose" = "yes" && cat << EOF
12074     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
12075 EOF
12076 cat >> confdefs.h <<EOF
12077 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
12078 EOF
12079 }
12080
12081 { test "$extra_verbose" = "yes" && cat << EOF
12082     Defining config_machfile = "$machfile"
12083 EOF
12084 cat >> confdefs.h <<EOF
12085 #define config_machfile "$machfile"
12086 EOF
12087 }
12088
12089 { test "$extra_verbose" = "yes" && cat << EOF
12090     Defining config_opsysfile = "$opsysfile"
12091 EOF
12092 cat >> confdefs.h <<EOF
12093 #define config_opsysfile "$opsysfile"
12094 EOF
12095 }
12096
12097
12098
12099 null_string=""
12100 { test "$extra_verbose" = "yes" && cat << EOF
12101     Defining LD_SWITCH_X_SITE = $null_string
12102 EOF
12103 cat >> confdefs.h <<EOF
12104 #define LD_SWITCH_X_SITE $null_string
12105 EOF
12106 }
12107
12108 { test "$extra_verbose" = "yes" && cat << EOF
12109     Defining LD_SWITCH_X_SITE_AUX = $null_string
12110 EOF
12111 cat >> confdefs.h <<EOF
12112 #define LD_SWITCH_X_SITE_AUX $null_string
12113 EOF
12114 }
12115
12116 { test "$extra_verbose" = "yes" && cat << EOF
12117     Defining C_SWITCH_X_SITE = $null_string
12118 EOF
12119 cat >> confdefs.h <<EOF
12120 #define C_SWITCH_X_SITE $null_string
12121 EOF
12122 }
12123
12124 { test "$extra_verbose" = "yes" && cat << EOF
12125     Defining LD_SWITCH_SITE = $null_string
12126 EOF
12127 cat >> confdefs.h <<EOF
12128 #define LD_SWITCH_SITE $null_string
12129 EOF
12130 }
12131
12132 { test "$extra_verbose" = "yes" && cat << EOF
12133     Defining C_SWITCH_SITE = $null_string
12134 EOF
12135 cat >> confdefs.h <<EOF
12136 #define C_SWITCH_SITE $null_string
12137 EOF
12138 }
12139
12140
12141
12142 test -n "$puresize" && { test "$extra_verbose" = "yes" && cat << EOF
12143     Defining RAW_PURESIZE = $puresize
12144 EOF
12145 cat >> confdefs.h <<EOF
12146 #define RAW_PURESIZE $puresize
12147 EOF
12148 }
12149
12150
12151 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
12152     Defining GNU_MALLOC
12153 EOF
12154 cat >> confdefs.h <<\EOF
12155 #define GNU_MALLOC 1
12156 EOF
12157 }
12158
12159 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
12160     Defining USE_SYSTEM_MALLOC
12161 EOF
12162 cat >> confdefs.h <<\EOF
12163 #define USE_SYSTEM_MALLOC 1
12164 EOF
12165 }
12166
12167 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
12168     Defining USE_DEBUG_MALLOC
12169 EOF
12170 cat >> confdefs.h <<\EOF
12171 #define USE_DEBUG_MALLOC 1
12172 EOF
12173 }
12174
12175                                               { test "$extra_verbose" = "yes" && cat << \EOF
12176     Defining USE_SYSTEM_MALLOC
12177 EOF
12178 cat >> confdefs.h <<\EOF
12179 #define USE_SYSTEM_MALLOC 1
12180 EOF
12181 }
12182
12183 fi
12184 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12185     Defining I18N3
12186 EOF
12187 cat >> confdefs.h <<\EOF
12188 #define I18N3 1
12189 EOF
12190 }
12191
12192 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12193     Defining USE_GCC
12194 EOF
12195 cat >> confdefs.h <<\EOF
12196 #define USE_GCC 1
12197 EOF
12198 }
12199
12200 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12201     Defining EXTERNAL_WIDGET
12202 EOF
12203 cat >> confdefs.h <<\EOF
12204 #define EXTERNAL_WIDGET 1
12205 EOF
12206 }
12207
12208 test "$with_gnu_make"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12209     Defining USE_GNU_MAKE
12210 EOF
12211 cat >> confdefs.h <<\EOF
12212 #define USE_GNU_MAKE 1
12213 EOF
12214 }
12215
12216 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12217     Defining NO_DOC_FILE
12218 EOF
12219 cat >> confdefs.h <<\EOF
12220 #define NO_DOC_FILE 1
12221 EOF
12222 }
12223
12224 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12225     Defining QUANTIFY
12226 EOF
12227 cat >> confdefs.h <<\EOF
12228 #define QUANTIFY 1
12229 EOF
12230 }
12231
12232 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12233     Defining MAIL_USE_POP
12234 EOF
12235 cat >> confdefs.h <<\EOF
12236 #define MAIL_USE_POP 1
12237 EOF
12238 }
12239
12240 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12241     Defining KERBEROS
12242 EOF
12243 cat >> confdefs.h <<\EOF
12244 #define KERBEROS 1
12245 EOF
12246 }
12247
12248 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12249     Defining HESIOD
12250 EOF
12251 cat >> confdefs.h <<\EOF
12252 #define HESIOD 1
12253 EOF
12254 }
12255
12256 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12257     Defining USE_UNION_TYPE
12258 EOF
12259 cat >> confdefs.h <<\EOF
12260 #define USE_UNION_TYPE 1
12261 EOF
12262 }
12263
12264
12265
12266 (
12267 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
12268 else
12269   echo "uname -a: `uname -a`"
12270 fi
12271 echo ""
12272 echo "$0 $quoted_arguments"
12273 ) > Installation
12274
12275 xemacs_betaname=""
12276 test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}"
12277
12278 (
12279 echo "
12280
12281 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
12282
12283   Where should the build process find the source code?    $srcdir
12284   What installation prefix should install use?            $prefix
12285   What operating system and machine description files should XEmacs use?
12286         \`$opsysfile' and \`$machfile'
12287   What compiler should XEmacs be built with?              $CC $CFLAGS
12288   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
12289   Should XEmacs use the relocating allocator for buffers? $rel_alloc
12290   What window system should XEmacs use?                   ${window_system}"
12291 if test "$with_x11" = "yes"; then
12292   echo "  Where do we find X Windows header files?                $x_includes"
12293   echo "  Where do we find X Windows libraries?                   $x_libraries"
12294 fi
12295 if test -n "$site_includes"; then
12296   echo "  Additional header files:                                $site_includes"
12297 fi
12298 if test -n "$site_libraries"; then
12299   echo "  Additional libraries:                                   $site_libraries"
12300 fi
12301 if test -n "$site_prefixes"; then
12302   echo "  Additional prefixes:                                    $site_prefixes"
12303 fi
12304 if test -n "$runpath"; then
12305   echo "  Runtime library search path:                            $runpath"
12306 fi
12307 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
12308 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
12309 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
12310 if test "$with_xmu" != yes -a "$with_x11" = yes; then
12311   echo "  No Xmu; substituting equivalent routines."
12312 fi
12313
12314 if test "$with_xpm" = yes; then
12315   echo "  Compiling in support for XPM images."
12316 elif test "$with_x11" = yes; then
12317   echo "  --------------------------------------------------------------------"
12318   echo "  WARNING: Compiling without XPM support."
12319   if test "$xpm_problem" != ""; then
12320     echo "  Reason: $xpm_problem"
12321   fi
12322   echo "  WARNING: You should strongly consider installing XPM."
12323   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
12324   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
12325   echo "  --------------------------------------------------------------------"
12326 fi
12327 if test "$with_png" = yes; then
12328   echo "  Compiling in support for PNG image handling."
12329 elif test "$window_system" != "none"; then
12330   echo "  --------------------------------------------------------------------"
12331   echo "  WARNING: Compiling without PNG image support."
12332   if test "$png_problem" != ""; then
12333     echo "  Reason: $png_problem"
12334   fi
12335   echo "  WARNING: You should strongly consider installing the PNG libraries."
12336   echo "  WARNING: Otherwise certain images and glyphs may not display."
12337   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
12338   echo "  --------------------------------------------------------------------"
12339 fi
12340 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
12341 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
12342 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
12343 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
12344 case "$with_sound" in
12345   nas    ) echo "  Compiling in network sound (NAS) support." ;;
12346   native ) echo "  Compiling in native sound support." ;;
12347   both   ) echo "  Compiling in both network and native sound support." ;;
12348 esac
12349 test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously"
12350
12351 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
12352 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
12353 test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
12354
12355 test "$with_umich_ldap"      = yes && echo "  Compiling in support for LDAP (UMich libs)."
12356 test "$with_ns_ldap"         = yes && echo "  Compiling in support for LDAP (Netscape SDK)."
12357 test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo "  Compiling in support for LDAP (Generic)."
12358
12359 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
12360 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
12361
12362 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
12363 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
12364 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
12365 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
12366 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
12367 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
12368 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
12369 if test "$with_wnn" = yes; then
12370   echo "  Compiling in support for the WNN input method on Mule."
12371   test "$with_wnn6" = yes && echo "    Using WNN version 6."
12372 fi
12373 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
12374
12375 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
12376 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
12377 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
12378 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
12379 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
12380 test "$with_session"  != no && echo "  Compiling in support for proper session-management."
12381 case "$with_menubars" in
12382   lucid ) echo "  Using Lucid menubars." ;;
12383   motif ) echo "  Using Motif menubars."
12384           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
12385           echo "             We recommend using the Lucid menubar instead."
12386           echo "             Re-run configure with --with-menubars='lucid'." ;;
12387 esac
12388 case "$with_scrollbars" in
12389   lucid    ) echo "  Using Lucid scrollbars."     ;;
12390   motif    ) echo "  Using Motif scrollbars."     ;;
12391   athena   ) echo "  Using Athena scrollbars."    ;;
12392   athena3d ) echo "  Using Athena-3d scrollbars." ;;
12393 esac
12394 case "$with_dialogs" in
12395   motif    ) echo "  Using Motif dialog boxes."     ;;
12396   athena   ) echo "  Using Athena dialog boxes."    ;;
12397   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
12398 esac
12399 test "$with_shlib" = "yes" && echo "  Compiling in DLL support."
12400 test "$with_clash_detection" = yes && \
12401   echo "  Clash detection will use \"$lockdir\" for locking files."
12402 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
12403 test "$with_pop"        = yes && echo "  Using POP for mail access"
12404 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication"
12405 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host"
12406 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
12407 test "$use_minimal_tagbits" = yes && echo "  Using Lisp_Objects with minimal tagbits."
12408 test "$use_indexed_lrecord_implementation" = yes && echo "  Using indexed lrecord implementation."
12409 test "$debug"              = yes && echo "  Compiling in extra code for debugging."
12410 test "$memory_usage_stats" = yes && echo "  Compiling in code for checking XEmacs memory usage."
12411 test "$usage_tracking"     = yes && echo "  Compiling with usage tracking active (Sun internal)."
12412 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
12413   != "no no no no no"; then
12414   echo "  WARNING: ---------------------------------------------------------"
12415   echo "  WARNING: Compiling in support for runtime error checking."
12416   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
12417   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
12418   echo "  WARNING: ---------------------------------------------------------"
12419 fi
12420 echo ""
12421 ) | tee -a Installation
12422 echo ""
12423
12424 echo '(setq Installation-string "' > Installation.el
12425 sed 's/"/\\"/g' Installation >> Installation.el
12426 echo '")' >> Installation.el
12427
12428
12429
12430 # Remove any trailing slashes in these variables.
12431 test -n "$prefix" &&
12432   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
12433 test -n "$exec_prefix" &&
12434   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
12435
12436
12437 for file in $internal_makefile_list; do
12438   test "$file" = src/Makefile.in && \
12439     file="src/Makefile.in:src/Makefile.in.in:src/depend"
12440   ac_output_files="${ac_output_files+$ac_output_files }$file"
12441 done
12442 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
12443
12444 trap '' 1 2 15
12445
12446 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12447
12448 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12449 # Let make expand exec_prefix.
12450 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12451
12452 # Any assignment to VPATH causes Sun make to only execute
12453 # the first set of double-colon rules, so remove it if not needed.
12454 # If there is a colon in the path, we need to keep it.
12455 if test "x$srcdir" = x.; then
12456   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12457 fi
12458
12459 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12460
12461 DEFS=-DHAVE_CONFIG_H
12462
12463 # Without the "./", some shells look in PATH for config.status.
12464 : ${CONFIG_STATUS=./config.status}
12465
12466 echo creating $CONFIG_STATUS
12467 rm -f $CONFIG_STATUS
12468 cat > $CONFIG_STATUS <<EOF
12469 #! /bin/sh
12470 # Generated automatically by configure.
12471 # Run this file to recreate the current configuration.
12472 # This directory was configured as follows,
12473 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12474 #
12475 # $0 $ac_configure_args
12476 #
12477 # Compiler output produced by configure, useful for debugging
12478 # configure, is in ./config.log if it exists.
12479
12480 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12481 for ac_option
12482 do
12483   case "\$ac_option" in
12484   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12485     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12486     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12487   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12488     echo "$CONFIG_STATUS generated by autoconf version 2.12"
12489     exit 0 ;;
12490   -help | --help | --hel | --he | --h)
12491     echo "\$ac_cs_usage"; exit 0 ;;
12492   *) echo "\$ac_cs_usage"; exit 1 ;;
12493   esac
12494 done
12495
12496 ac_given_srcdir=$srcdir
12497 ac_given_INSTALL="$INSTALL"
12498
12499 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12500 EOF
12501 cat >> $CONFIG_STATUS <<EOF
12502
12503 # Protect against being on the right side of a sed subst in config.status.
12504 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12505  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12506 $ac_vpsub
12507 $extrasub
12508 s%@CFLAGS@%$CFLAGS%g
12509 s%@CPPFLAGS@%$CPPFLAGS%g
12510 s%@CXXFLAGS@%$CXXFLAGS%g
12511 s%@DEFS@%$DEFS%g
12512 s%@LDFLAGS@%$LDFLAGS%g
12513 s%@LIBS@%$LIBS%g
12514 s%@exec_prefix@%$exec_prefix%g
12515 s%@prefix@%$prefix%g
12516 s%@program_transform_name@%$program_transform_name%g
12517 s%@bindir@%$bindir%g
12518 s%@sbindir@%$sbindir%g
12519 s%@libexecdir@%$libexecdir%g
12520 s%@datadir@%$datadir%g
12521 s%@sysconfdir@%$sysconfdir%g
12522 s%@sharedstatedir@%$sharedstatedir%g
12523 s%@localstatedir@%$localstatedir%g
12524 s%@libdir@%$libdir%g
12525 s%@includedir@%$includedir%g
12526 s%@oldincludedir@%$oldincludedir%g
12527 s%@infodir@%$infodir%g
12528 s%@mandir@%$mandir%g
12529 s%@LN_S@%$LN_S%g
12530 s%@blddir@%$blddir%g
12531 s%@CC@%$CC%g
12532 s%@CPP@%$CPP%g
12533 s%@start_flags@%$start_flags%g
12534 s%@ld_switch_shared@%$ld_switch_shared%g
12535 s%@start_files@%$start_files%g
12536 s%@ld@%$ld%g
12537 s%@lib_gcc@%$lib_gcc%g
12538 s%@RANLIB@%$RANLIB%g
12539 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12540 s%@INSTALL_DATA@%$INSTALL_DATA%g
12541 s%@YACC@%$YACC%g
12542 s%@SET_MAKE@%$SET_MAKE%g
12543 s%@X_CFLAGS@%$X_CFLAGS%g
12544 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
12545 s%@X_LIBS@%$X_LIBS%g
12546 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
12547 s%@install_pp@%$install_pp%g
12548 s%@libs_xauth@%$libs_xauth%g
12549 s%@dnd_objs@%$dnd_objs%g
12550 s%@lwlib_objs@%$lwlib_objs%g
12551 s%@ALLOCA@%$ALLOCA%g
12552 s%@dll_ld@%$dll_ld%g
12553 s%@dll_cflags@%$dll_cflags%g
12554 s%@dll_oflags@%$dll_oflags%g
12555 s%@dll_lflags@%$dll_lflags%g
12556 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
12557 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
12558 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
12559 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
12560 s%@PROGNAME@%$PROGNAME%g
12561 s%@version@%$version%g
12562 s%@configuration@%$configuration%g
12563 s%@canonical@%$canonical%g
12564 s%@srcdir@%$srcdir%g
12565 s%@pkgdir@%$pkgdir%g
12566 s%@statedir@%$statedir%g
12567 s%@PREFIX@%$PREFIX%g
12568 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
12569 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
12570 s%@INFODIR@%$INFODIR%g
12571 s%@infopath@%$infopath%g
12572 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
12573 s%@INFOPATH@%$INFOPATH%g
12574 s%@package_path@%$package_path%g
12575 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
12576 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
12577 s%@lispdir@%$lispdir%g
12578 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
12579 s%@LISPDIR@%$LISPDIR%g
12580 s%@etcdir@%$etcdir%g
12581 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
12582 s%@ETCDIR@%$ETCDIR%g
12583 s%@lockdir@%$lockdir%g
12584 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
12585 s%@LOCKDIR@%$LOCKDIR%g
12586 s%@archlibdir@%$archlibdir%g
12587 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
12588 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
12589 s%@docdir@%$docdir%g
12590 s%@bitmapdir@%$bitmapdir%g
12591 s%@extra_objs@%$extra_objs%g
12592 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
12593 s%@machfile@%$machfile%g
12594 s%@opsysfile@%$opsysfile%g
12595 s%@c_switch_general@%$c_switch_general%g
12596 s%@c_switch_window_system@%$c_switch_window_system%g
12597 s%@c_switch_all@%$c_switch_all%g
12598 s%@ld_switch_general@%$ld_switch_general%g
12599 s%@ld_switch_window_system@%$ld_switch_window_system%g
12600 s%@ld_switch_all@%$ld_switch_all%g
12601 s%@ld_libs_general@%$ld_libs_general%g
12602 s%@ld_libs_window_system@%$ld_libs_window_system%g
12603 s%@ld_libs_all@%$ld_libs_all%g
12604 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
12605 s%@native_sound_lib@%$native_sound_lib%g
12606 s%@sound_cflags@%$sound_cflags%g
12607 s%@dynodump_arch@%$dynodump_arch%g
12608 s%@internal_makefile_list@%$internal_makefile_list%g
12609
12610 CEOF
12611 EOF
12612
12613 cat >> $CONFIG_STATUS <<\EOF
12614
12615 # Split the substitutions into bite-sized pieces for seds with
12616 # small command number limits, like on Digital OSF/1 and HP-UX.
12617 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12618 ac_file=1 # Number of current file.
12619 ac_beg=1 # First line for current file.
12620 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12621 ac_more_lines=:
12622 ac_sed_cmds=""
12623 while $ac_more_lines; do
12624   if test $ac_beg -gt 1; then
12625     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12626   else
12627     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12628   fi
12629   if test ! -s conftest.s$ac_file; then
12630     ac_more_lines=false
12631     rm -f conftest.s$ac_file
12632   else
12633     if test -z "$ac_sed_cmds"; then
12634       ac_sed_cmds="sed -f conftest.s$ac_file"
12635     else
12636       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12637     fi
12638     ac_file=`expr $ac_file + 1`
12639     ac_beg=$ac_end
12640     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12641   fi
12642 done
12643 if test -z "$ac_sed_cmds"; then
12644   ac_sed_cmds=cat
12645 fi
12646 EOF
12647
12648 cat >> $CONFIG_STATUS <<EOF
12649
12650 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
12651 EOF
12652 cat >> $CONFIG_STATUS <<\EOF
12653 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12654   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12655   case "$ac_file" in
12656   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12657        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12658   *) ac_file_in="${ac_file}.in" ;;
12659   esac
12660
12661   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12662
12663   # Remove last slash and all that follows it.  Not all systems have dirname.
12664   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12665   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12666     # The file is in a subdirectory.
12667     test ! -d "$ac_dir" && mkdir "$ac_dir"
12668     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12669     # A "../" for each directory in $ac_dir_suffix.
12670     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12671   else
12672     ac_dir_suffix= ac_dots=
12673   fi
12674
12675   case "$ac_given_srcdir" in
12676   .)  srcdir=.
12677       if test -z "$ac_dots"; then top_srcdir=.
12678       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12679   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12680   *) # Relative path.
12681     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12682     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12683   esac
12684
12685   case "$ac_given_INSTALL" in
12686   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12687   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12688   esac
12689
12690   echo creating "$ac_file"
12691   rm -f "$ac_file"
12692   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12693   case "$ac_file" in
12694   *Makefile*) ac_comsub="1i\\
12695 # $configure_input" ;;
12696   *) ac_comsub= ;;
12697   esac
12698
12699   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12700   sed -e "$ac_comsub
12701 s%@configure_input@%$configure_input%g
12702 s%@srcdir@%$srcdir%g
12703 s%@top_srcdir@%$top_srcdir%g
12704 s%@INSTALL@%$INSTALL%g
12705 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12706 fi; done
12707 rm -f conftest.s*
12708
12709 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12710 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12711 #
12712 # ac_d sets the value in "#define NAME VALUE" lines.
12713 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12714 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12715 ac_dC='\3'
12716 ac_dD='%g'
12717 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12718 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12719 ac_uB='\([      ]\)%\1#\2define\3'
12720 ac_uC=' '
12721 ac_uD='\4%g'
12722 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12723 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12724 ac_eB='$%\1#\2define\3'
12725 ac_eC=' '
12726 ac_eD='%g'
12727
12728 if test "${CONFIG_HEADERS+set}" != set; then
12729 EOF
12730 cat >> $CONFIG_STATUS <<EOF
12731   CONFIG_HEADERS="src/config.h lwlib/config.h"
12732 EOF
12733 cat >> $CONFIG_STATUS <<\EOF
12734 fi
12735 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12736   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12737   case "$ac_file" in
12738   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12739        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12740   *) ac_file_in="${ac_file}.in" ;;
12741   esac
12742
12743   echo creating $ac_file
12744
12745   rm -f conftest.frag conftest.in conftest.out
12746   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12747   cat $ac_file_inputs > conftest.in
12748
12749 EOF
12750
12751 # Transform confdefs.h into a sed script conftest.vals that substitutes
12752 # the proper values into config.h.in to produce config.h.  And first:
12753 # Protect against being on the right side of a sed subst in config.status.
12754 # Protect against being in an unquoted here document in config.status.
12755 rm -f conftest.vals
12756 cat > conftest.hdr <<\EOF
12757 s/[\\&%]/\\&/g
12758 s%[\\$`]%\\&%g
12759 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12760 s%ac_d%ac_u%gp
12761 s%ac_u%ac_e%gp
12762 EOF
12763 sed -n -f conftest.hdr confdefs.h > conftest.vals
12764 rm -f conftest.hdr
12765
12766 # This sed command replaces #undef with comments.  This is necessary, for
12767 # example, in the case of _POSIX_SOURCE, which is predefined and required
12768 # on some systems where configure will not decide to define it.
12769 cat >> conftest.vals <<\EOF
12770 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12771 EOF
12772
12773 # Break up conftest.vals because some shells have a limit on
12774 # the size of here documents, and old seds have small limits too.
12775
12776 rm -f conftest.tail
12777 while :
12778 do
12779   ac_lines=`grep -c . conftest.vals`
12780   # grep -c gives empty output for an empty file on some AIX systems.
12781   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12782   # Write a limited-size here document to conftest.frag.
12783   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12784   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12785   echo 'CEOF
12786   sed -f conftest.frag conftest.in > conftest.out
12787   rm -f conftest.in
12788   mv conftest.out conftest.in
12789 ' >> $CONFIG_STATUS
12790   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12791   rm -f conftest.vals
12792   mv conftest.tail conftest.vals
12793 done
12794 rm -f conftest.vals
12795
12796 cat >> $CONFIG_STATUS <<\EOF
12797   rm -f conftest.frag conftest.h
12798   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12799   cat conftest.in >> conftest.h
12800   rm -f conftest.in
12801   if cmp -s $ac_file conftest.h 2>/dev/null; then
12802     echo "$ac_file is unchanged"
12803     rm -f conftest.h
12804   else
12805     # Remove last slash and all that follows it.  Not all systems have dirname.
12806       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12807       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12808       # The file is in a subdirectory.
12809       test ! -d "$ac_dir" && mkdir "$ac_dir"
12810     fi
12811     rm -f $ac_file
12812     mv conftest.h $ac_file
12813   fi
12814 fi; done
12815
12816 EOF
12817 cat >> $CONFIG_STATUS <<EOF
12818 CPP="$CPP"
12819  CPPFLAGS="$CPPFLAGS"
12820  top_srcdir="$srcdir"
12821  MAKE_SUBDIR="$MAKE_SUBDIR"
12822
12823 EOF
12824 cat >> $CONFIG_STATUS <<\EOF
12825 for dir in $MAKE_SUBDIR; do
12826   echo creating $dir/Makefile
12827   (
12828     cd $dir
12829     rm -f junk.c
12830     < Makefile.in \
12831       sed -e '/^# Generated/d' \
12832           -e 's%/\*\*/#.*%%' \
12833           -e 's/^ *# */#/' \
12834           -e '/^##/d' \
12835           -e '/^#/ {
12836 p
12837 d
12838 }'        -e '/./ {
12839 s/\([\"]\)/\\\1/g
12840 s/^/"/
12841 s/$/"/
12842 }'  > junk.c;
12843     $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp;
12844     < junk.cpp                          \
12845       sed -e 's/^#.*//'                 \
12846         -e 's/^[        ][      ]*$//'  \
12847         -e 's/^ /       /'                      \
12848         | sed -n -e '/^..*$/p'          \
12849         | sed '/^"/ {
12850 s/\\\([\"]\)/\1/g
12851 s/^[    ]*"//
12852 s/"[    ]*$//
12853 }'      > Makefile.new
12854     chmod 444 Makefile.new
12855     mv -f Makefile.new Makefile
12856     rm -f junk.c junk.cpp
12857 )
12858 done
12859
12860 sed < config.status >> lib-src/config.values \
12861   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
12862   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
12863   -e 's/^\([^ ]*\) $/\1 ""/' \
12864   -e 's/ 1$/ t/'
12865
12866
12867 exit 0
12868 EOF
12869 chmod +x $CONFIG_STATUS
12870 rm -fr confdefs* $ac_clean_files
12871 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12872