Initial revision
[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.2*  ) opsys=aix4-2   ;;
1038   *-*-aix4.1*  ) opsys=aix4-1   ;;
1039   *-*-aix4*    ) opsys=aix4     ;;
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 echo $ac_n "checking whether we are using SunPro C""... $ac_c" 1>&6
2085 echo "configure:2086: checking whether we are using SunPro C" >&5
2086 cat > conftest.$ac_ext <<EOF
2087 #line 2088 "configure"
2088 #include "confdefs.h"
2089
2090 int main() {
2091 #ifndef __SUNPRO_C
2092 #error Not a  SunPro compiler :-(
2093 ******* ======= ******** &&&&&&&&
2094 #endif
2095
2096 ; return 0; }
2097 EOF
2098 if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2099   rm -rf conftest*
2100   __sunpro_c=yes
2101 else
2102   echo "configure: failed program was:" >&5
2103   cat conftest.$ac_ext >&5
2104   rm -rf conftest*
2105   __sunpro_c=no
2106 fi
2107 rm -f conftest*
2108 echo "$ac_t""$__sunpro_c" 1>&6
2109
2110
2111
2112 echo "Extracting information from the machine- and system-dependent headers..."
2113
2114 tempcname="conftest.c"
2115
2116
2117
2118 cat > $tempcname <<EOF
2119 #define NOT_C_CODE
2120 #define C_SWITCH_SITE
2121 #define C_SWITCH_X_SITE
2122 #define LD_SWITCH_SITE
2123 #define LD_SWITCH_X_SITE
2124 #define LD_SWITCH_X_SITE_AUX
2125 #define OS_RELEASE $os_release
2126 #include "$srcdir/src/$opsysfile"
2127 #include "$srcdir/src/$machfile"
2128
2129 #ifndef LIBS_MACHINE
2130 #define LIBS_MACHINE
2131 #endif
2132 configure___ libs_machine=LIBS_MACHINE
2133
2134 #ifndef LIBS_SYSTEM
2135 #define LIBS_SYSTEM
2136 #endif
2137 configure___ libs_system=LIBS_SYSTEM
2138
2139 #ifndef LIBS_TERMCAP
2140 #define LIBS_TERMCAP
2141 #endif
2142 configure___ libs_termcap=LIBS_TERMCAP
2143
2144 #ifndef LIB_STANDARD
2145 #define LIB_STANDARD
2146 #endif
2147 configure___ libs_standard=LIB_STANDARD
2148
2149
2150 #ifndef OBJECTS_MACHINE
2151 #define OBJECTS_MACHINE
2152 #endif
2153 configure___ objects_machine=OBJECTS_MACHINE
2154
2155 #ifndef OBJECTS_SYSTEM
2156 #define OBJECTS_SYSTEM
2157 #endif
2158 configure___ objects_system=OBJECTS_SYSTEM
2159
2160
2161 #ifndef C_SWITCH_MACHINE
2162 #define C_SWITCH_MACHINE
2163 #endif
2164 configure___ c_switch_machine=C_SWITCH_MACHINE
2165
2166 #ifndef C_SWITCH_SYSTEM
2167 #define C_SWITCH_SYSTEM
2168 #endif
2169 configure___ c_switch_system=C_SWITCH_SYSTEM
2170
2171
2172 #ifndef LD_SWITCH_MACHINE
2173 #define LD_SWITCH_MACHINE
2174 #endif
2175 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2176
2177 #ifndef LD_SWITCH_SYSTEM
2178 #define LD_SWITCH_SYSTEM
2179 #endif
2180 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2181
2182
2183 #ifndef UNEXEC
2184 #define UNEXEC "unexec.o"
2185 #endif
2186 configure___ unexec=UNEXEC
2187
2188
2189 #ifndef LD_SWITCH_SHARED
2190 #define LD_SWITCH_SHARED "-c"
2191 #endif
2192 configure___ ld_switch_shared=LD_SWITCH_SHARED
2193
2194
2195 #ifdef ORDINARY_LINK
2196 #define LD "\$(CC) \$(CFLAGS)"
2197 #else /* no ORDINARY LINK */
2198 #ifdef COFF_ENCAPSULATE
2199 #define LD "\$(CC) -nostdlib"
2200 #else /* not COFF_ENCAPSULATE */
2201 #ifdef LINKER
2202 #define LD LINKER
2203 #else /* ! defined (LINKER) */
2204 #define LD "ld"
2205 #endif /* ! defined (LINKER) */
2206 #endif /* ! defined (COFF_ENCAPSULATE) */
2207 #endif /* not ORDINARY_LINK */
2208 configure___ ld=LD
2209
2210 #ifndef LIB_GCC
2211 #define LIB_GCC
2212 #endif
2213 configure___ lib_gcc=LIB_GCC
2214
2215 #ifndef LD_TEXT_START_ADDR
2216 #define LD_TEXT_START_ADDR
2217 #endif
2218 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2219
2220
2221 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2222 #ifdef NO_REMAP
2223 #ifdef COFF_ENCAPSULATE
2224 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2225 #else /* ! defined (COFF_ENCAPSULATE) */
2226 #define START_FILES "pre-crt0.o /lib/crt0.o"
2227 #endif /* ! defined (COFF_ENCAPSULATE) */
2228 #else /* ! defined (NO_REMAP) */
2229 #define START_FILES "ecrt0.o"
2230 #endif /* ! defined (NO_REMAP) */
2231 #endif /* no ORDINARY_LINK */
2232 #ifndef START_FILES
2233 #define START_FILES
2234 #endif
2235 configure___ start_files=START_FILES
2236
2237 #ifdef ORDINARY_LINK
2238 configure___ ordinary_link=yes
2239 #else
2240 configure___ ordinary_link=no
2241 #endif
2242
2243 #ifdef SYSTEM_MALLOC
2244 configure___ system_malloc=yes
2245 #else
2246 configure___ system_malloc=no
2247 #endif
2248
2249 #ifdef TERMINFO
2250 configure___ have_terminfo=yes
2251 #else
2252 configure___ have_terminfo=no
2253 #endif
2254
2255 #ifdef MAIL_USE_FLOCK
2256 configure___ mail_use_flock=yes
2257 #else
2258 configure___ mail_use_flock=no
2259 #endif
2260
2261 #ifdef MAIL_USE_LOCKF
2262 configure___ mail_use_lockf=yes
2263 #else
2264 configure___ mail_use_lockf=no
2265 #endif
2266
2267 EOF
2268
2269 CPP=`eval "echo $CPP"`
2270 eval `$CPP -Isrc $tempcname \
2271         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2272
2273 rm $tempcname
2274
2275 test "$extra_verbose" = "yes" && \
2276   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 ""
2277
2278 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2279
2280 if test "$cflags_specified" = "no"; then
2281       if   test "$GCC" = "yes"; then
2282     CFLAGS="-g -O3 -Wall -Wno-switch"
2283                     test "$opsys $machine" = "cygwin32 intel386" && \
2284       CFLAGS="-g -O2 -Wall -Wno-switch"
2285   elif test "$__sunpro_c" = "yes"; then
2286     case "$opsys" in
2287       sol2    ) CFLAGS="-v -xO4" ;;
2288       sunos4* ) CFLAGS="-xO2";;
2289     esac
2290   elif test "$CC" = "xlc"; then
2291     CFLAGS="-O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2292   else
2293         CFLAGS="-O" ;  fi
2294 fi
2295
2296
2297 if test "$GCC" = "yes"; then
2298   set x $ld_switch_system; shift; ld_switch_system=""
2299   while test -n "$1"; do
2300     case $1 in
2301       -L  | -l  | -u         ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2302       -L* | -l* | -u* | -Wl* ) ld_switch_system="$ld_switch_system $1" ;;
2303       -Xlinker* ) ;;
2304       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2305     esac
2306     shift
2307   done
2308 fi
2309
2310 if test "$GCC" = "yes"; then
2311   set x $ld_switch_machine; shift; ld_switch_machine=""
2312   while test -n "$1"; do
2313     case $1 in
2314       -L  | -l  | -u         ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2315       -L* | -l* | -u* | -Wl* ) ld_switch_machine="$ld_switch_machine $1" ;;
2316       -Xlinker* ) ;;
2317       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2318     esac
2319     shift
2320   done
2321 fi
2322
2323 if test "$GCC" = "yes"; then
2324   set x $LDFLAGS; shift; LDFLAGS=""
2325   while test -n "$1"; do
2326     case $1 in
2327       -L  | -l  | -u         ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2328       -L* | -l* | -u* | -Wl* ) LDFLAGS="$LDFLAGS $1" ;;
2329       -Xlinker* ) ;;
2330       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2331     esac
2332     shift
2333   done
2334 fi
2335
2336 if test "$GCC" = "yes"; then
2337   set x $ld_call_shared; shift; ld_call_shared=""
2338   while test -n "$1"; do
2339     case $1 in
2340       -L  | -l  | -u         ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2341       -L* | -l* | -u* | -Wl* ) ld_call_shared="$ld_call_shared $1" ;;
2342       -Xlinker* ) ;;
2343       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2344     esac
2345     shift
2346   done
2347 fi
2348
2349 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2350    echo "    xemacs will be linked with \"$objects_machine\""
2351  fi
2352 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2353    echo "    xemacs will be linked with \"$objects_system\""
2354  fi
2355 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2356    echo "    xemacs will be linked with \"$unexec\""
2357  fi
2358
2359 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2360 echo "configure:2361: checking for dynodump" >&5
2361 if test "$unexec" != "unexsol2.o"; then
2362   echo "$ac_t""no" 1>&6
2363 else
2364   echo "$ac_t""yes" 1>&6
2365   { test "$extra_verbose" = "yes" && cat << \EOF
2366     Defining DYNODUMP
2367 EOF
2368 cat >> confdefs.h <<\EOF
2369 #define DYNODUMP 1
2370 EOF
2371 }
2372
2373   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2374   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2375   case "$machine" in
2376     sparc   ) dynodump_arch=sparc ;;
2377     *86*    ) dynodump_arch=i386  ;;
2378     powerpc ) dynodump_arch=ppc   ;;
2379   esac
2380     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
2381 fi
2382
2383
2384 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2385
2386 if test "$unexec" = "unexaix.o"; then
2387   if   test "$dynamic" = "no"; then
2388   start_flags="-Wl,-bnso,-bnodelcsect"
2389   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2390   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2391     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2392   done
2393   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2394     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2395   done
2396   
2397 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2398 echo "configure:2399: checking for terminateAndUnload in -lC" >&5
2399 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2400
2401 xe_check_libs=" -lC "
2402 cat > conftest.$ac_ext <<EOF
2403 #line 2404 "configure"
2404 #include "confdefs.h"
2405 /* Override any gcc2 internal prototype to avoid an error.  */
2406 /* We use char because int might match the return type of a gcc2
2407     builtin and then its argument prototype would still apply.  */
2408 char terminateAndUnload();
2409
2410 int main() {
2411 terminateAndUnload()
2412 ; return 0; }
2413 EOF
2414 if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2415   rm -rf conftest*
2416   eval "ac_cv_lib_$ac_lib_var=yes"
2417 else
2418   echo "configure: failed program was:" >&5
2419   cat conftest.$ac_ext >&5
2420   rm -rf conftest*
2421   eval "ac_cv_lib_$ac_lib_var=no"
2422 fi
2423 rm -f conftest*
2424 xe_check_libs=""
2425
2426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2427   echo "$ac_t""yes" 1>&6
2428   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2429 else
2430   echo "$ac_t""no" 1>&6
2431 fi
2432
2433
2434   fi
2435 elif test -n "$ld_text_start_addr"; then
2436   start_flags="-T $ld_text_start_addr -e __start"
2437 fi
2438
2439
2440
2441
2442 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2443  test -z "$linker" &&  linker='$(CC) -nostdlib'
2444  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2445 fi
2446 test "$GCC" != "yes" && lib_gcc=
2447
2448
2449
2450
2451
2452 if test -n "$site_prefixes"; then
2453   for arg in $site_prefixes; do
2454     case "$arg" in
2455         -* ) ;;
2456         * ) argi="-I${arg}/include" ; argl="-L${arg}/lib" ;;
2457     esac
2458     c_switch_site="$c_switch_site $argi" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$argi\" to \$c_switch_site"; fi
2459     ld_switch_site="$ld_switch_site $argl" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$argl\" to \$ld_switch_site"; fi
2460   done
2461 fi
2462
2463 if test -n "$site_libraries"; then
2464   for arg in $site_libraries; do
2465     case "$arg" in -* ) ;; * ) arg="-L${arg}" ;; esac
2466     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2467   done
2468 fi
2469
2470 if test -n "$site_includes"; then
2471   for arg in $site_includes; do
2472     case "$arg" in -* ) ;; * ) arg="-I${arg}" ;; esac
2473     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2474   done
2475 fi
2476
2477
2478 for dir in "/usr/ccs/lib"; do
2479   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
2480 done
2481
2482 if test -n "$site_runtime_libraries"; then
2483   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2484   export LD_RUN_PATH
2485 fi
2486
2487
2488 if   test "$dynamic" = "no"; then add_runtime_path=no
2489 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2490 else case "$opsys" in
2491        sol2 | irix* | *bsd* ) add_runtime_path=yes ;;
2492        * ) add_runtime_path=no ;;
2493      esac
2494 fi
2495
2496 if test "$add_runtime_path" = "yes"; then
2497       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2498 echo "configure:2499: checking "for runtime libraries flag"" >&5
2499   dash_r=""
2500   for try_dash_r in "-R" "-R " "-rpath "; do
2501     xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2502     
2503 if test "$GCC" = "yes"; then
2504   set x $xe_check_libs; shift; xe_check_libs=""
2505   while test -n "$1"; do
2506     case $1 in
2507       -L  | -l  | -u         ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2508       -L* | -l* | -u* | -Wl* ) xe_check_libs="$xe_check_libs $1" ;;
2509       -Xlinker* ) ;;
2510       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2511     esac
2512     shift
2513   done
2514 fi
2515     cat > conftest.$ac_ext <<EOF
2516 #line 2517 "configure"
2517 #include "confdefs.h"
2518
2519 int main() {
2520
2521 ; return 0; }
2522 EOF
2523 if { (eval echo configure:2524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2524   rm -rf conftest*
2525   dash_r="$try_dash_r"
2526 else
2527   echo "configure: failed program was:" >&5
2528   cat conftest.$ac_ext >&5
2529 fi
2530 rm -f conftest*
2531     xe_check_libs=""
2532     test -n "$dash_r" && break
2533   done
2534   if test -n "$dash_r";
2535     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2536     else echo "$ac_t""NONE" 1>&6
2537   fi
2538 fi
2539
2540 xe_add_unique_runpath_dir='
2541   xe_add_p=yes
2542   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2543   done
2544   if test "$xe_add_p" = "yes"; then
2545     test -n "$runpath" && runpath="${runpath}:"
2546     runpath="${runpath}${xe_runpath_dir}"
2547     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2548   fi'
2549
2550
2551
2552
2553 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2554     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2555   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2556   
2557         runpath="" runpath_dirs=""
2558   if test -n "$LD_RUN_PATH"; then
2559     runpath="$LD_RUN_PATH"
2560   elif test "$GCC" = "yes"; then
2561         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2562     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2563     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2564     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2565       case "$arg" in P,* | -L* | -R* )
2566         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2567           {
2568 xe_runpath_dir="$dir"
2569   test "$xe_runpath_dir" != "/lib"     -a \
2570         "$xe_runpath_dir" != "/usr/lib" -a \
2571         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2572   eval "$xe_add_unique_runpath_dir"
2573 }
2574         done ;;
2575       esac
2576     done
2577     ld_switch_run="$ld_switch_run_save"
2578     rm -f conftest*
2579   else
2580         for arg in $ld_switch_site $ld_switch_x_site; do
2581       case "$arg" in -L*) {
2582 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2583   test "$xe_runpath_dir" != "/lib"     -a \
2584         "$xe_runpath_dir" != "/usr/lib" -a \
2585         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2586   eval "$xe_add_unique_runpath_dir"
2587 };; esac
2588     done
2589         if test "$opsys $need_motif" = "sol2 yes"; then
2590       xe_runpath_dir="/opt/SUNWdt/lib";
2591       eval "$xe_add_unique_runpath_dir";
2592     fi
2593   fi 
2594   if test -n "$runpath"; then
2595     ld_switch_run="${dash_r}${runpath}"
2596     
2597 if test "$GCC" = "yes"; then
2598   set x $ld_switch_run; shift; ld_switch_run=""
2599   while test -n "$1"; do
2600     case $1 in
2601       -L  | -l  | -u         ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2602       -L* | -l* | -u* | -Wl* ) ld_switch_run="$ld_switch_run $1" ;;
2603       -Xlinker* ) ;;
2604       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2605     esac
2606     shift
2607   done
2608 fi
2609     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2610   fi
2611 fi
2612
2613
2614
2615 GNU_MALLOC=yes
2616 if test "$with_dlmalloc" != "no"; then
2617         doug_lea_malloc=yes
2618 else
2619         doug_lea_malloc=no
2620 fi
2621 after_morecore_hook_exists=yes
2622 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2623 echo "configure:2624: checking for malloc_get_state" >&5
2624
2625 cat > conftest.$ac_ext <<EOF
2626 #line 2627 "configure"
2627 #include "confdefs.h"
2628 /* System header to define __stub macros and hopefully few prototypes,
2629     which can conflict with char malloc_get_state(); below.  */
2630 #include <assert.h>
2631 /* Override any gcc2 internal prototype to avoid an error.  */
2632 /* We use char because int might match the return type of a gcc2
2633     builtin and then its argument prototype would still apply.  */
2634 char malloc_get_state();
2635
2636 int main() {
2637
2638 /* The GNU C library defines this for functions which it implements
2639     to always fail with ENOSYS.  Some functions are actually named
2640     something starting with __ and the normal name is an alias.  */
2641 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2642 choke me
2643 #else
2644 malloc_get_state();
2645 #endif
2646
2647 ; return 0; }
2648 EOF
2649 if { (eval echo configure:2650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2650   rm -rf conftest*
2651   eval "ac_cv_func_malloc_get_state=yes"
2652 else
2653   echo "configure: failed program was:" >&5
2654   cat conftest.$ac_ext >&5
2655   rm -rf conftest*
2656   eval "ac_cv_func_malloc_get_state=no"
2657 fi
2658 rm -f conftest*
2659
2660 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2661   echo "$ac_t""yes" 1>&6
2662   :
2663 else
2664   echo "$ac_t""no" 1>&6
2665 doug_lea_malloc=no
2666 fi
2667
2668 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2669 echo "configure:2670: checking for malloc_set_state" >&5
2670
2671 cat > conftest.$ac_ext <<EOF
2672 #line 2673 "configure"
2673 #include "confdefs.h"
2674 /* System header to define __stub macros and hopefully few prototypes,
2675     which can conflict with char malloc_set_state(); below.  */
2676 #include <assert.h>
2677 /* Override any gcc2 internal prototype to avoid an error.  */
2678 /* We use char because int might match the return type of a gcc2
2679     builtin and then its argument prototype would still apply.  */
2680 char malloc_set_state();
2681
2682 int main() {
2683
2684 /* The GNU C library defines this for functions which it implements
2685     to always fail with ENOSYS.  Some functions are actually named
2686     something starting with __ and the normal name is an alias.  */
2687 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
2688 choke me
2689 #else
2690 malloc_set_state();
2691 #endif
2692
2693 ; return 0; }
2694 EOF
2695 if { (eval echo configure:2696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2696   rm -rf conftest*
2697   eval "ac_cv_func_malloc_set_state=yes"
2698 else
2699   echo "configure: failed program was:" >&5
2700   cat conftest.$ac_ext >&5
2701   rm -rf conftest*
2702   eval "ac_cv_func_malloc_set_state=no"
2703 fi
2704 rm -f conftest*
2705
2706 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
2707   echo "$ac_t""yes" 1>&6
2708   :
2709 else
2710   echo "$ac_t""no" 1>&6
2711 doug_lea_malloc=no
2712 fi
2713
2714 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
2715 echo "configure:2716: checking whether __after_morecore_hook exists" >&5
2716 cat > conftest.$ac_ext <<EOF
2717 #line 2718 "configure"
2718 #include "confdefs.h"
2719 extern void (* __after_morecore_hook)();
2720 int main() {
2721 __after_morecore_hook = 0
2722 ; return 0; }
2723 EOF
2724 if { (eval echo configure:2725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2725   rm -rf conftest*
2726   echo "$ac_t""yes" 1>&6
2727 else
2728   echo "configure: failed program was:" >&5
2729   cat conftest.$ac_ext >&5
2730   rm -rf conftest*
2731   echo "$ac_t""no" 1>&6
2732    after_morecore_hook_exists=no
2733 fi
2734 rm -f conftest*
2735 if test "$system_malloc" = "yes" ; then
2736   GNU_MALLOC=no
2737   GNU_MALLOC_reason="
2738   (The GNU allocators don't work with this system configuration)."
2739 elif test "$with_system_malloc" = "yes" ; then
2740   GNU_MALLOC=no
2741   GNU_MALLOC_reason="
2742   (User chose not to use GNU allocators)."
2743 elif test "$with_debug_malloc" = "yes" ; then
2744   GNU_MALLOC=no
2745   GNU_MALLOC_reason="
2746   (User chose to use Debugging Malloc)."
2747 fi
2748
2749 if test "$doug_lea_malloc" = "yes" ; then
2750   if test "$GNU_MALLOC" = yes ; then
2751     GNU_MALLOC_reason="
2752   (Using Doug Lea's new malloc from the GNU C Library.)"
2753   fi
2754   { test "$extra_verbose" = "yes" && cat << \EOF
2755     Defining DOUG_LEA_MALLOC
2756 EOF
2757 cat >> confdefs.h <<\EOF
2758 #define DOUG_LEA_MALLOC 1
2759 EOF
2760 }
2761
2762   if test "$after_morecore_hook_exists" = "no" ; then
2763     GNU_MALLOC_reason="
2764   (Using Doug Lea's new malloc from the Linux C Library.)"
2765     { test "$extra_verbose" = "yes" && cat << \EOF
2766     Defining _NO_MALLOC_WARNING_
2767 EOF
2768 cat >> confdefs.h <<\EOF
2769 #define _NO_MALLOC_WARNING_ 1
2770 EOF
2771 }
2772
2773   fi
2774   use_minimal_tagbits=yes
2775 fi
2776
2777
2778
2779
2780 # Extract the first word of "ranlib", so it can be a program name with args.
2781 set dummy ranlib; ac_word=$2
2782 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2783 echo "configure:2784: checking for $ac_word" >&5
2784
2785 if test -n "$RANLIB"; then
2786   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2787 else
2788   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2789   for ac_dir in $PATH; do
2790     test -z "$ac_dir" && ac_dir=.
2791     if test -f $ac_dir/$ac_word; then
2792       ac_cv_prog_RANLIB="ranlib"
2793       break
2794     fi
2795   done
2796   IFS="$ac_save_ifs"
2797   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2798 fi
2799 RANLIB="$ac_cv_prog_RANLIB"
2800 if test -n "$RANLIB"; then
2801   echo "$ac_t""$RANLIB" 1>&6
2802 else
2803   echo "$ac_t""no" 1>&6
2804 fi
2805
2806 ac_aux_dir=
2807 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2808   if test -f $ac_dir/install-sh; then
2809     ac_aux_dir=$ac_dir
2810     ac_install_sh="$ac_aux_dir/install-sh -c"
2811     break
2812   elif test -f $ac_dir/install.sh; then
2813     ac_aux_dir=$ac_dir
2814     ac_install_sh="$ac_aux_dir/install.sh -c"
2815     break
2816   fi
2817 done
2818 if test -z "$ac_aux_dir"; then
2819   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
2820 fi
2821 ac_config_guess=$ac_aux_dir/config.guess
2822 ac_config_sub=$ac_aux_dir/config.sub
2823 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
2824
2825 # Find a good install program.  We prefer a C program (faster),
2826 # so one script is as good as another.  But avoid the broken or
2827 # incompatible versions:
2828 # SysV /etc/install, /usr/sbin/install
2829 # SunOS /usr/etc/install
2830 # IRIX /sbin/install
2831 # AIX /bin/install
2832 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2833 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2834 # ./install, which can be erroneously created by make from ./install.sh.
2835 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2836 echo "configure:2837: checking for a BSD compatible install" >&5
2837 if test -z "$INSTALL"; then
2838
2839   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2840   for ac_dir in $PATH; do
2841     # Account for people who put trailing slashes in PATH elements.
2842     case "$ac_dir/" in
2843     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2844     *)
2845       # OSF1 and SCO ODT 3.0 have their own names for install.
2846       for ac_prog in ginstall installbsd scoinst install; do
2847         if test -f $ac_dir/$ac_prog; then
2848           if test $ac_prog = install &&
2849             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2850             # AIX install.  It has an incompatible calling convention.
2851             # OSF/1 installbsd also uses dspmsg, but is usable.
2852             :
2853           else
2854             ac_cv_path_install="$ac_dir/$ac_prog -c"
2855             break 2
2856           fi
2857         fi
2858       done
2859       ;;
2860     esac
2861   done
2862   IFS="$ac_save_IFS"
2863
2864   if test "${ac_cv_path_install+set}" = set; then
2865     INSTALL="$ac_cv_path_install"
2866   else
2867     # As a last resort, use the slow shell script.  We don't cache a
2868     # path for INSTALL within a source directory, because that will
2869     # break other packages using the cache if that directory is
2870     # removed, or if the path is relative.
2871     INSTALL="$ac_install_sh"
2872   fi
2873 fi
2874 echo "$ac_t""$INSTALL" 1>&6
2875
2876 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2877 # It thinks the first close brace ends the variable substitution.
2878 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2879
2880 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2881
2882 for ac_prog in 'bison -y' byacc
2883 do
2884 # Extract the first word of "$ac_prog", so it can be a program name with args.
2885 set dummy $ac_prog; ac_word=$2
2886 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2887 echo "configure:2888: checking for $ac_word" >&5
2888
2889 if test -n "$YACC"; then
2890   ac_cv_prog_YACC="$YACC" # Let the user override the test.
2891 else
2892   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2893   for ac_dir in $PATH; do
2894     test -z "$ac_dir" && ac_dir=.
2895     if test -f $ac_dir/$ac_word; then
2896       ac_cv_prog_YACC="$ac_prog"
2897       break
2898     fi
2899   done
2900   IFS="$ac_save_ifs"
2901 fi
2902 YACC="$ac_cv_prog_YACC"
2903 if test -n "$YACC"; then
2904   echo "$ac_t""$YACC" 1>&6
2905 else
2906   echo "$ac_t""no" 1>&6
2907 fi
2908
2909 test -n "$YACC" && break
2910 done
2911 test -n "$YACC" || YACC="yacc"
2912
2913
2914 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
2915 do
2916 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2917 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2918 echo "configure:2919: checking for $ac_hdr" >&5
2919
2920 cat > conftest.$ac_ext <<EOF
2921 #line 2922 "configure"
2922 #include "confdefs.h"
2923 #include <$ac_hdr>
2924 EOF
2925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2926 { (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2927 ac_err=`grep -v '^ *+' conftest.out`
2928 if test -z "$ac_err"; then
2929   rm -rf conftest*
2930   eval "ac_cv_header_$ac_safe=yes"
2931 else
2932   echo "$ac_err" >&5
2933   echo "configure: failed program was:" >&5
2934   cat conftest.$ac_ext >&5
2935   rm -rf conftest*
2936   eval "ac_cv_header_$ac_safe=no"
2937 fi
2938 rm -f conftest*
2939 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2940   echo "$ac_t""yes" 1>&6
2941     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2942   { test "$extra_verbose" = "yes" && cat << EOF
2943     Defining $ac_tr_hdr
2944 EOF
2945 cat >> confdefs.h <<EOF
2946 #define $ac_tr_hdr 1
2947 EOF
2948 }
2949  
2950 else
2951   echo "$ac_t""no" 1>&6
2952 fi
2953 done
2954
2955 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h
2956 do
2957 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2958 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2959 echo "configure:2960: checking for $ac_hdr" >&5
2960
2961 cat > conftest.$ac_ext <<EOF
2962 #line 2963 "configure"
2963 #include "confdefs.h"
2964 #include <$ac_hdr>
2965 EOF
2966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2967 { (eval echo configure:2968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2968 ac_err=`grep -v '^ *+' conftest.out`
2969 if test -z "$ac_err"; then
2970   rm -rf conftest*
2971   eval "ac_cv_header_$ac_safe=yes"
2972 else
2973   echo "$ac_err" >&5
2974   echo "configure: failed program was:" >&5
2975   cat conftest.$ac_ext >&5
2976   rm -rf conftest*
2977   eval "ac_cv_header_$ac_safe=no"
2978 fi
2979 rm -f conftest*
2980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2981   echo "$ac_t""yes" 1>&6
2982     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2983   { test "$extra_verbose" = "yes" && cat << EOF
2984     Defining $ac_tr_hdr
2985 EOF
2986 cat >> confdefs.h <<EOF
2987 #define $ac_tr_hdr 1
2988 EOF
2989 }
2990  
2991 else
2992   echo "$ac_t""no" 1>&6
2993 fi
2994 done
2995
2996 for ac_hdr in linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
2997 do
2998 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2999 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3000 echo "configure:3001: checking for $ac_hdr" >&5
3001
3002 cat > conftest.$ac_ext <<EOF
3003 #line 3004 "configure"
3004 #include "confdefs.h"
3005 #include <$ac_hdr>
3006 EOF
3007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3008 { (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3009 ac_err=`grep -v '^ *+' conftest.out`
3010 if test -z "$ac_err"; then
3011   rm -rf conftest*
3012   eval "ac_cv_header_$ac_safe=yes"
3013 else
3014   echo "$ac_err" >&5
3015   echo "configure: failed program was:" >&5
3016   cat conftest.$ac_ext >&5
3017   rm -rf conftest*
3018   eval "ac_cv_header_$ac_safe=no"
3019 fi
3020 rm -f conftest*
3021 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3022   echo "$ac_t""yes" 1>&6
3023     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3024   { test "$extra_verbose" = "yes" && cat << EOF
3025     Defining $ac_tr_hdr
3026 EOF
3027 cat >> confdefs.h <<EOF
3028 #define $ac_tr_hdr 1
3029 EOF
3030 }
3031  
3032 else
3033   echo "$ac_t""no" 1>&6
3034 fi
3035 done
3036
3037 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3038 echo "configure:3039: checking for sys/wait.h that is POSIX.1 compatible" >&5
3039
3040 cat > conftest.$ac_ext <<EOF
3041 #line 3042 "configure"
3042 #include "confdefs.h"
3043 #include <sys/types.h>
3044 #include <sys/wait.h>
3045 #ifndef WEXITSTATUS
3046 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3047 #endif
3048 #ifndef WIFEXITED
3049 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3050 #endif
3051 int main() {
3052 int s;
3053 wait (&s);
3054 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3055 ; return 0; }
3056 EOF
3057 if { (eval echo configure:3058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3058   rm -rf conftest*
3059   ac_cv_header_sys_wait_h=yes
3060 else
3061   echo "configure: failed program was:" >&5
3062   cat conftest.$ac_ext >&5
3063   rm -rf conftest*
3064   ac_cv_header_sys_wait_h=no
3065 fi
3066 rm -f conftest*
3067
3068 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3069 if test $ac_cv_header_sys_wait_h = yes; then
3070   { test "$extra_verbose" = "yes" && cat << \EOF
3071     Defining HAVE_SYS_WAIT_H
3072 EOF
3073 cat >> confdefs.h <<\EOF
3074 #define HAVE_SYS_WAIT_H 1
3075 EOF
3076 }
3077
3078 fi
3079
3080 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3081 echo "configure:3082: checking for ANSI C header files" >&5
3082
3083 cat > conftest.$ac_ext <<EOF
3084 #line 3085 "configure"
3085 #include "confdefs.h"
3086 #include <stdlib.h>
3087 #include <stdarg.h>
3088 #include <string.h>
3089 #include <float.h>
3090 EOF
3091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3092 { (eval echo configure:3093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3093 ac_err=`grep -v '^ *+' conftest.out`
3094 if test -z "$ac_err"; then
3095   rm -rf conftest*
3096   ac_cv_header_stdc=yes
3097 else
3098   echo "$ac_err" >&5
3099   echo "configure: failed program was:" >&5
3100   cat conftest.$ac_ext >&5
3101   rm -rf conftest*
3102   ac_cv_header_stdc=no
3103 fi
3104 rm -f conftest*
3105
3106 if test $ac_cv_header_stdc = yes; then
3107   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3108 cat > conftest.$ac_ext <<EOF
3109 #line 3110 "configure"
3110 #include "confdefs.h"
3111 #include <string.h>
3112 EOF
3113 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3114   egrep "memchr" >/dev/null 2>&1; then
3115   :
3116 else
3117   rm -rf conftest*
3118   ac_cv_header_stdc=no
3119 fi
3120 rm -f conftest*
3121
3122 fi
3123
3124 if test $ac_cv_header_stdc = yes; then
3125   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3126 cat > conftest.$ac_ext <<EOF
3127 #line 3128 "configure"
3128 #include "confdefs.h"
3129 #include <stdlib.h>
3130 EOF
3131 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3132   egrep "free" >/dev/null 2>&1; then
3133   :
3134 else
3135   rm -rf conftest*
3136   ac_cv_header_stdc=no
3137 fi
3138 rm -f conftest*
3139
3140 fi
3141
3142 if test $ac_cv_header_stdc = yes; then
3143   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3144 cat > conftest.$ac_ext <<EOF
3145 #line 3146 "configure"
3146 #include "confdefs.h"
3147 #include <ctype.h>
3148 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3149 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3150 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3151 int main () { int i; for (i = 0; i < 256; i++)
3152 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3153 exit (0); }
3154
3155 EOF
3156 if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
3157 then
3158   :
3159 else
3160   echo "configure: failed program was:" >&5
3161   cat conftest.$ac_ext >&5
3162   rm -fr conftest*
3163   ac_cv_header_stdc=no
3164 fi
3165 rm -fr conftest*
3166 fi
3167
3168 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3169 if test $ac_cv_header_stdc = yes; then
3170   { test "$extra_verbose" = "yes" && cat << \EOF
3171     Defining STDC_HEADERS
3172 EOF
3173 cat >> confdefs.h <<\EOF
3174 #define STDC_HEADERS 1
3175 EOF
3176 }
3177
3178 fi
3179
3180 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3181 echo "configure:3182: checking whether time.h and sys/time.h may both be included" >&5
3182
3183 cat > conftest.$ac_ext <<EOF
3184 #line 3185 "configure"
3185 #include "confdefs.h"
3186 #include <sys/types.h>
3187 #include <sys/time.h>
3188 #include <time.h>
3189 int main() {
3190 struct tm *tp;
3191 ; return 0; }
3192 EOF
3193 if { (eval echo configure:3194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3194   rm -rf conftest*
3195   ac_cv_header_time=yes
3196 else
3197   echo "configure: failed program was:" >&5
3198   cat conftest.$ac_ext >&5
3199   rm -rf conftest*
3200   ac_cv_header_time=no
3201 fi
3202 rm -f conftest*
3203
3204 echo "$ac_t""$ac_cv_header_time" 1>&6
3205 if test $ac_cv_header_time = yes; then
3206   { test "$extra_verbose" = "yes" && cat << \EOF
3207     Defining TIME_WITH_SYS_TIME
3208 EOF
3209 cat >> confdefs.h <<\EOF
3210 #define TIME_WITH_SYS_TIME 1
3211 EOF
3212 }
3213
3214 fi
3215
3216 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3217 echo "configure:3218: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3218
3219 cat > conftest.$ac_ext <<EOF
3220 #line 3221 "configure"
3221 #include "confdefs.h"
3222 #include <sys/types.h>
3223 #include <signal.h>
3224 /* NetBSD declares sys_siglist in unistd.h.  */
3225 #ifdef HAVE_UNISTD_H
3226 #include <unistd.h>
3227 #endif
3228 int main() {
3229 char *msg = *(sys_siglist + 1);
3230 ; return 0; }
3231 EOF
3232 if { (eval echo configure:3233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3233   rm -rf conftest*
3234   ac_cv_decl_sys_siglist=yes
3235 else
3236   echo "configure: failed program was:" >&5
3237   cat conftest.$ac_ext >&5
3238   rm -rf conftest*
3239   ac_cv_decl_sys_siglist=no
3240 fi
3241 rm -f conftest*
3242
3243 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3244 if test $ac_cv_decl_sys_siglist = yes; then
3245   { test "$extra_verbose" = "yes" && cat << \EOF
3246     Defining SYS_SIGLIST_DECLARED
3247 EOF
3248 cat >> confdefs.h <<\EOF
3249 #define SYS_SIGLIST_DECLARED 1
3250 EOF
3251 }
3252
3253 fi
3254
3255
3256 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3257 echo "configure:3258: checking for struct utimbuf" >&5
3258 cat > conftest.$ac_ext <<EOF
3259 #line 3260 "configure"
3260 #include "confdefs.h"
3261 #ifdef TIME_WITH_SYS_TIME
3262 #include <sys/time.h>
3263 #include <time.h>
3264 #else
3265 #ifdef HAVE_SYS_TIME_H
3266 #include <sys/time.h>
3267 #else
3268 #include <time.h>
3269 #endif
3270 #endif
3271 #ifdef HAVE_UTIME_H
3272 #include <utime.h>
3273 #endif
3274 int main() {
3275 static struct utimbuf x; x.actime = x.modtime;
3276 ; return 0; }
3277 EOF
3278 if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3279   rm -rf conftest*
3280   echo "$ac_t""yes" 1>&6
3281    { test "$extra_verbose" = "yes" && cat << \EOF
3282     Defining HAVE_STRUCT_UTIMBUF
3283 EOF
3284 cat >> confdefs.h <<\EOF
3285 #define HAVE_STRUCT_UTIMBUF 1
3286 EOF
3287 }
3288
3289 else
3290   echo "configure: failed program was:" >&5
3291   cat conftest.$ac_ext >&5
3292   rm -rf conftest*
3293   echo "$ac_t""no" 1>&6
3294 fi
3295 rm -f conftest*
3296
3297 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3298 echo "configure:3299: checking return type of signal handlers" >&5
3299
3300 cat > conftest.$ac_ext <<EOF
3301 #line 3302 "configure"
3302 #include "confdefs.h"
3303 #include <sys/types.h>
3304 #include <signal.h>
3305 #ifdef signal
3306 #undef signal
3307 #endif
3308 #ifdef __cplusplus
3309 extern "C" void (*signal (int, void (*)(int)))(int);
3310 #else
3311 void (*signal ()) ();
3312 #endif
3313
3314 int main() {
3315 int i;
3316 ; return 0; }
3317 EOF
3318 if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3319   rm -rf conftest*
3320   ac_cv_type_signal=void
3321 else
3322   echo "configure: failed program was:" >&5
3323   cat conftest.$ac_ext >&5
3324   rm -rf conftest*
3325   ac_cv_type_signal=int
3326 fi
3327 rm -f conftest*
3328
3329 echo "$ac_t""$ac_cv_type_signal" 1>&6
3330 { test "$extra_verbose" = "yes" && cat << EOF
3331     Defining RETSIGTYPE = $ac_cv_type_signal
3332 EOF
3333 cat >> confdefs.h <<EOF
3334 #define RETSIGTYPE $ac_cv_type_signal
3335 EOF
3336 }
3337
3338
3339 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3340 echo "configure:3341: checking for size_t" >&5
3341
3342 cat > conftest.$ac_ext <<EOF
3343 #line 3344 "configure"
3344 #include "confdefs.h"
3345 #include <sys/types.h>
3346 #if STDC_HEADERS
3347 #include <stdlib.h>
3348 #include <stddef.h>
3349 #endif
3350 EOF
3351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3352   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3353   rm -rf conftest*
3354   ac_cv_type_size_t=yes
3355 else
3356   rm -rf conftest*
3357   ac_cv_type_size_t=no
3358 fi
3359 rm -f conftest*
3360
3361 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3362 if test $ac_cv_type_size_t = no; then
3363   { test "$extra_verbose" = "yes" && cat << \EOF
3364     Defining size_t = unsigned
3365 EOF
3366 cat >> confdefs.h <<\EOF
3367 #define size_t unsigned
3368 EOF
3369 }
3370
3371 fi
3372
3373 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3374 echo "configure:3375: checking for pid_t" >&5
3375
3376 cat > conftest.$ac_ext <<EOF
3377 #line 3378 "configure"
3378 #include "confdefs.h"
3379 #include <sys/types.h>
3380 #if STDC_HEADERS
3381 #include <stdlib.h>
3382 #include <stddef.h>
3383 #endif
3384 EOF
3385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3386   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3387   rm -rf conftest*
3388   ac_cv_type_pid_t=yes
3389 else
3390   rm -rf conftest*
3391   ac_cv_type_pid_t=no
3392 fi
3393 rm -f conftest*
3394
3395 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3396 if test $ac_cv_type_pid_t = no; then
3397   { test "$extra_verbose" = "yes" && cat << \EOF
3398     Defining pid_t = int
3399 EOF
3400 cat >> confdefs.h <<\EOF
3401 #define pid_t int
3402 EOF
3403 }
3404
3405 fi
3406
3407 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3408 echo "configure:3409: checking for uid_t in sys/types.h" >&5
3409
3410 cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <sys/types.h>
3414 EOF
3415 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3416   egrep "uid_t" >/dev/null 2>&1; then
3417   rm -rf conftest*
3418   ac_cv_type_uid_t=yes
3419 else
3420   rm -rf conftest*
3421   ac_cv_type_uid_t=no
3422 fi
3423 rm -f conftest*
3424
3425
3426 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3427 if test $ac_cv_type_uid_t = no; then
3428   { test "$extra_verbose" = "yes" && cat << \EOF
3429     Defining uid_t = int
3430 EOF
3431 cat >> confdefs.h <<\EOF
3432 #define uid_t int
3433 EOF
3434 }
3435
3436   { test "$extra_verbose" = "yes" && cat << \EOF
3437     Defining gid_t = int
3438 EOF
3439 cat >> confdefs.h <<\EOF
3440 #define gid_t int
3441 EOF
3442 }
3443
3444 fi
3445
3446 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3447 echo "configure:3448: checking for mode_t" >&5
3448
3449 cat > conftest.$ac_ext <<EOF
3450 #line 3451 "configure"
3451 #include "confdefs.h"
3452 #include <sys/types.h>
3453 #if STDC_HEADERS
3454 #include <stdlib.h>
3455 #include <stddef.h>
3456 #endif
3457 EOF
3458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3459   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3460   rm -rf conftest*
3461   ac_cv_type_mode_t=yes
3462 else
3463   rm -rf conftest*
3464   ac_cv_type_mode_t=no
3465 fi
3466 rm -f conftest*
3467
3468 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3469 if test $ac_cv_type_mode_t = no; then
3470   { test "$extra_verbose" = "yes" && cat << \EOF
3471     Defining mode_t = int
3472 EOF
3473 cat >> confdefs.h <<\EOF
3474 #define mode_t int
3475 EOF
3476 }
3477
3478 fi
3479
3480 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3481 echo "configure:3482: checking for off_t" >&5
3482
3483 cat > conftest.$ac_ext <<EOF
3484 #line 3485 "configure"
3485 #include "confdefs.h"
3486 #include <sys/types.h>
3487 #if STDC_HEADERS
3488 #include <stdlib.h>
3489 #include <stddef.h>
3490 #endif
3491 EOF
3492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3493   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3494   rm -rf conftest*
3495   ac_cv_type_off_t=yes
3496 else
3497   rm -rf conftest*
3498   ac_cv_type_off_t=no
3499 fi
3500 rm -f conftest*
3501
3502 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3503 if test $ac_cv_type_off_t = no; then
3504   { test "$extra_verbose" = "yes" && cat << \EOF
3505     Defining off_t = long
3506 EOF
3507 cat >> confdefs.h <<\EOF
3508 #define off_t long
3509 EOF
3510 }
3511
3512 fi
3513
3514
3515 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3516 echo "configure:3517: checking for struct timeval" >&5
3517 cat > conftest.$ac_ext <<EOF
3518 #line 3519 "configure"
3519 #include "confdefs.h"
3520 #ifdef TIME_WITH_SYS_TIME
3521 #include <sys/time.h>
3522 #include <time.h>
3523 #else
3524 #ifdef HAVE_SYS_TIME_H
3525 #include <sys/time.h>
3526 #else
3527 #include <time.h>
3528 #endif
3529 #endif
3530 int main() {
3531 static struct timeval x; x.tv_sec = x.tv_usec;
3532 ; return 0; }
3533 EOF
3534 if { (eval echo configure:3535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3535   rm -rf conftest*
3536   echo "$ac_t""yes" 1>&6
3537   HAVE_TIMEVAL=yes
3538   { test "$extra_verbose" = "yes" && cat << \EOF
3539     Defining HAVE_TIMEVAL
3540 EOF
3541 cat >> confdefs.h <<\EOF
3542 #define HAVE_TIMEVAL 1
3543 EOF
3544 }
3545
3546 else
3547   echo "configure: failed program was:" >&5
3548   cat conftest.$ac_ext >&5
3549   rm -rf conftest*
3550   echo "$ac_t""no" 1>&6
3551    HAVE_TIMEVAL=no
3552 fi
3553 rm -f conftest*
3554
3555 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3556 echo "configure:3557: checking whether struct tm is in sys/time.h or time.h" >&5
3557
3558 cat > conftest.$ac_ext <<EOF
3559 #line 3560 "configure"
3560 #include "confdefs.h"
3561 #include <sys/types.h>
3562 #include <time.h>
3563 int main() {
3564 struct tm *tp; tp->tm_sec;
3565 ; return 0; }
3566 EOF
3567 if { (eval echo configure:3568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3568   rm -rf conftest*
3569   ac_cv_struct_tm=time.h
3570 else
3571   echo "configure: failed program was:" >&5
3572   cat conftest.$ac_ext >&5
3573   rm -rf conftest*
3574   ac_cv_struct_tm=sys/time.h
3575 fi
3576 rm -f conftest*
3577
3578 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3579 if test $ac_cv_struct_tm = sys/time.h; then
3580   { test "$extra_verbose" = "yes" && cat << \EOF
3581     Defining TM_IN_SYS_TIME
3582 EOF
3583 cat >> confdefs.h <<\EOF
3584 #define TM_IN_SYS_TIME 1
3585 EOF
3586 }
3587
3588 fi
3589
3590 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3591 echo "configure:3592: checking for tm_zone in struct tm" >&5
3592
3593 cat > conftest.$ac_ext <<EOF
3594 #line 3595 "configure"
3595 #include "confdefs.h"
3596 #include <sys/types.h>
3597 #include <$ac_cv_struct_tm>
3598 int main() {
3599 struct tm tm; tm.tm_zone;
3600 ; return 0; }
3601 EOF
3602 if { (eval echo configure:3603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3603   rm -rf conftest*
3604   ac_cv_struct_tm_zone=yes
3605 else
3606   echo "configure: failed program was:" >&5
3607   cat conftest.$ac_ext >&5
3608   rm -rf conftest*
3609   ac_cv_struct_tm_zone=no
3610 fi
3611 rm -f conftest*
3612
3613 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3614 if test "$ac_cv_struct_tm_zone" = yes; then
3615   { test "$extra_verbose" = "yes" && cat << \EOF
3616     Defining HAVE_TM_ZONE
3617 EOF
3618 cat >> confdefs.h <<\EOF
3619 #define HAVE_TM_ZONE 1
3620 EOF
3621 }
3622
3623 else
3624   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3625 echo "configure:3626: checking for tzname" >&5
3626
3627 cat > conftest.$ac_ext <<EOF
3628 #line 3629 "configure"
3629 #include "confdefs.h"
3630 #include <time.h>
3631 #ifndef tzname /* For SGI.  */
3632 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3633 #endif
3634 int main() {
3635 atoi(*tzname);
3636 ; return 0; }
3637 EOF
3638 if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3639   rm -rf conftest*
3640   ac_cv_var_tzname=yes
3641 else
3642   echo "configure: failed program was:" >&5
3643   cat conftest.$ac_ext >&5
3644   rm -rf conftest*
3645   ac_cv_var_tzname=no
3646 fi
3647 rm -f conftest*
3648
3649 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3650   if test $ac_cv_var_tzname = yes; then
3651     { test "$extra_verbose" = "yes" && cat << \EOF
3652     Defining HAVE_TZNAME
3653 EOF
3654 cat >> confdefs.h <<\EOF
3655 #define HAVE_TZNAME 1
3656 EOF
3657 }
3658
3659   fi
3660 fi
3661
3662
3663 echo $ac_n "checking for working const""... $ac_c" 1>&6
3664 echo "configure:3665: checking for working const" >&5
3665
3666 cat > conftest.$ac_ext <<EOF
3667 #line 3668 "configure"
3668 #include "confdefs.h"
3669
3670 int main() {
3671
3672 /* Ultrix mips cc rejects this.  */
3673 typedef int charset[2]; const charset x;
3674 /* SunOS 4.1.1 cc rejects this.  */
3675 char const *const *ccp;
3676 char **p;
3677 /* NEC SVR4.0.2 mips cc rejects this.  */
3678 struct point {int x, y;};
3679 static struct point const zero = {0,0};
3680 /* AIX XL C 1.02.0.0 rejects this.
3681    It does not let you subtract one const X* pointer from another in an arm
3682    of an if-expression whose if-part is not a constant expression */
3683 const char *g = "string";
3684 ccp = &g + (g ? g-g : 0);
3685 /* HPUX 7.0 cc rejects these. */
3686 ++ccp;
3687 p = (char**) ccp;
3688 ccp = (char const *const *) p;
3689 { /* SCO 3.2v4 cc rejects this.  */
3690   char *t;
3691   char const *s = 0 ? (char *) 0 : (char const *) 0;
3692
3693   *t++ = 0;
3694 }
3695 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3696   int x[] = {25, 17};
3697   const int *foo = &x[0];
3698   ++foo;
3699 }
3700 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3701   typedef const int *iptr;
3702   iptr p = 0;
3703   ++p;
3704 }
3705 { /* AIX XL C 1.02.0.0 rejects this saying
3706      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3707   struct s { int j; const int *ap[3]; };
3708   struct s *b; b->j = 5;
3709 }
3710 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3711   const int foo = 10;
3712 }
3713
3714 ; return 0; }
3715 EOF
3716 if { (eval echo configure:3717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3717   rm -rf conftest*
3718   ac_cv_c_const=yes
3719 else
3720   echo "configure: failed program was:" >&5
3721   cat conftest.$ac_ext >&5
3722   rm -rf conftest*
3723   ac_cv_c_const=no
3724 fi
3725 rm -f conftest*
3726
3727 echo "$ac_t""$ac_cv_c_const" 1>&6
3728 if test $ac_cv_c_const = no; then
3729   { test "$extra_verbose" = "yes" && cat << \EOF
3730     Defining const = 
3731 EOF
3732 cat >> confdefs.h <<\EOF
3733 #define const 
3734 EOF
3735 }
3736
3737 fi
3738
3739
3740 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3741 echo "configure:3742: checking whether ${MAKE-make} sets \${MAKE}" >&5
3742 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3743
3744 cat > conftestmake <<\EOF
3745 all:
3746         @echo 'ac_maketemp="${MAKE}"'
3747 EOF
3748 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3749 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3750 if test -n "$ac_maketemp"; then
3751   eval ac_cv_prog_make_${ac_make}_set=yes
3752 else
3753   eval ac_cv_prog_make_${ac_make}_set=no
3754 fi
3755 rm -f conftestmake
3756 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3757   echo "$ac_t""yes" 1>&6
3758   SET_MAKE=
3759 else
3760   echo "$ac_t""no" 1>&6
3761   SET_MAKE="MAKE=${MAKE-make}"
3762 fi
3763
3764
3765 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3766 echo "configure:3767: checking whether byte ordering is bigendian" >&5
3767
3768 ac_cv_c_bigendian=unknown
3769 # See if sys/param.h defines the BYTE_ORDER macro.
3770 cat > conftest.$ac_ext <<EOF
3771 #line 3772 "configure"
3772 #include "confdefs.h"
3773 #include <sys/types.h>
3774 #include <sys/param.h>
3775 int main() {
3776
3777 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3778  bogus endian macros
3779 #endif
3780 ; return 0; }
3781 EOF
3782 if { (eval echo configure:3783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3783   rm -rf conftest*
3784   # It does; now see whether it defined to BIG_ENDIAN or not.
3785 cat > conftest.$ac_ext <<EOF
3786 #line 3787 "configure"
3787 #include "confdefs.h"
3788 #include <sys/types.h>
3789 #include <sys/param.h>
3790 int main() {
3791
3792 #if BYTE_ORDER != BIG_ENDIAN
3793  not big endian
3794 #endif
3795 ; return 0; }
3796 EOF
3797 if { (eval echo configure:3798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3798   rm -rf conftest*
3799   ac_cv_c_bigendian=yes
3800 else
3801   echo "configure: failed program was:" >&5
3802   cat conftest.$ac_ext >&5
3803   rm -rf conftest*
3804   ac_cv_c_bigendian=no
3805 fi
3806 rm -f conftest*
3807 else
3808   echo "configure: failed program was:" >&5
3809   cat conftest.$ac_ext >&5
3810 fi
3811 rm -f conftest*
3812 if test $ac_cv_c_bigendian = unknown; then
3813 cat > conftest.$ac_ext <<EOF
3814 #line 3815 "configure"
3815 #include "confdefs.h"
3816 main () {
3817   /* Are we little or big endian?  From Harbison&Steele.  */
3818   union
3819   {
3820     long l;
3821     char c[sizeof (long)];
3822   } u;
3823   u.l = 1;
3824   exit (u.c[sizeof (long) - 1] == 1);
3825 }
3826 EOF
3827 if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
3828 then
3829   ac_cv_c_bigendian=no
3830 else
3831   echo "configure: failed program was:" >&5
3832   cat conftest.$ac_ext >&5
3833   rm -fr conftest*
3834   ac_cv_c_bigendian=yes
3835 fi
3836 rm -fr conftest*
3837 fi
3838
3839 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3840 if test $ac_cv_c_bigendian = yes; then
3841   { test "$extra_verbose" = "yes" && cat << \EOF
3842     Defining WORDS_BIGENDIAN
3843 EOF
3844 cat >> confdefs.h <<\EOF
3845 #define WORDS_BIGENDIAN 1
3846 EOF
3847 }
3848
3849 fi
3850
3851
3852 echo $ac_n "checking size of short""... $ac_c" 1>&6
3853 echo "configure:3854: checking size of short" >&5
3854
3855 cat > conftest.$ac_ext <<EOF
3856 #line 3857 "configure"
3857 #include "confdefs.h"
3858 #include <stdio.h>
3859 main()
3860 {
3861   FILE *f=fopen("conftestval", "w");
3862   if (!f) exit(1);
3863   fprintf(f, "%d\n", sizeof(short));
3864   exit(0);
3865 }
3866 EOF
3867 if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
3868 then
3869   ac_cv_sizeof_short=`cat conftestval`
3870 else
3871   echo "configure: failed program was:" >&5
3872   cat conftest.$ac_ext >&5
3873   rm -fr conftest*
3874   ac_cv_sizeof_short=0
3875 fi
3876 rm -fr conftest*
3877 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3878 { test "$extra_verbose" = "yes" && cat << EOF
3879     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
3880 EOF
3881 cat >> confdefs.h <<EOF
3882 #define SIZEOF_SHORT $ac_cv_sizeof_short
3883 EOF
3884 }
3885
3886
3887 if test "$ac_cv_sizeof_short" = 0; then
3888   echo ""
3889   echo "*** PANIC *** Configure tests are not working - compiler is broken."
3890   echo "*** PANIC *** Please examine config.log for compilation errors."
3891   exit 1
3892 fi
3893 echo $ac_n "checking size of int""... $ac_c" 1>&6
3894 echo "configure:3895: checking size of int" >&5
3895
3896 cat > conftest.$ac_ext <<EOF
3897 #line 3898 "configure"
3898 #include "confdefs.h"
3899 #include <stdio.h>
3900 main()
3901 {
3902   FILE *f=fopen("conftestval", "w");
3903   if (!f) exit(1);
3904   fprintf(f, "%d\n", sizeof(int));
3905   exit(0);
3906 }
3907 EOF
3908 if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
3909 then
3910   ac_cv_sizeof_int=`cat conftestval`
3911 else
3912   echo "configure: failed program was:" >&5
3913   cat conftest.$ac_ext >&5
3914   rm -fr conftest*
3915   ac_cv_sizeof_int=0
3916 fi
3917 rm -fr conftest*
3918 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3919 { test "$extra_verbose" = "yes" && cat << EOF
3920     Defining SIZEOF_INT = $ac_cv_sizeof_int
3921 EOF
3922 cat >> confdefs.h <<EOF
3923 #define SIZEOF_INT $ac_cv_sizeof_int
3924 EOF
3925 }
3926
3927
3928 echo $ac_n "checking size of long""... $ac_c" 1>&6
3929 echo "configure:3930: checking size of long" >&5
3930
3931 cat > conftest.$ac_ext <<EOF
3932 #line 3933 "configure"
3933 #include "confdefs.h"
3934 #include <stdio.h>
3935 main()
3936 {
3937   FILE *f=fopen("conftestval", "w");
3938   if (!f) exit(1);
3939   fprintf(f, "%d\n", sizeof(long));
3940   exit(0);
3941 }
3942 EOF
3943 if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
3944 then
3945   ac_cv_sizeof_long=`cat conftestval`
3946 else
3947   echo "configure: failed program was:" >&5
3948   cat conftest.$ac_ext >&5
3949   rm -fr conftest*
3950   ac_cv_sizeof_long=0
3951 fi
3952 rm -fr conftest*
3953 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3954 { test "$extra_verbose" = "yes" && cat << EOF
3955     Defining SIZEOF_LONG = $ac_cv_sizeof_long
3956 EOF
3957 cat >> confdefs.h <<EOF
3958 #define SIZEOF_LONG $ac_cv_sizeof_long
3959 EOF
3960 }
3961
3962
3963 echo $ac_n "checking size of long long""... $ac_c" 1>&6
3964 echo "configure:3965: checking size of long long" >&5
3965
3966 cat > conftest.$ac_ext <<EOF
3967 #line 3968 "configure"
3968 #include "confdefs.h"
3969 #include <stdio.h>
3970 main()
3971 {
3972   FILE *f=fopen("conftestval", "w");
3973   if (!f) exit(1);
3974   fprintf(f, "%d\n", sizeof(long long));
3975   exit(0);
3976 }
3977 EOF
3978 if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
3979 then
3980   ac_cv_sizeof_long_long=`cat conftestval`
3981 else
3982   echo "configure: failed program was:" >&5
3983   cat conftest.$ac_ext >&5
3984   rm -fr conftest*
3985   ac_cv_sizeof_long_long=0
3986 fi
3987 rm -fr conftest*
3988 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
3989 { test "$extra_verbose" = "yes" && cat << EOF
3990     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
3991 EOF
3992 cat >> confdefs.h <<EOF
3993 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
3994 EOF
3995 }
3996
3997
3998 echo $ac_n "checking size of void *""... $ac_c" 1>&6
3999 echo "configure:4000: checking size of void *" >&5
4000
4001 cat > conftest.$ac_ext <<EOF
4002 #line 4003 "configure"
4003 #include "confdefs.h"
4004 #include <stdio.h>
4005 main()
4006 {
4007   FILE *f=fopen("conftestval", "w");
4008   if (!f) exit(1);
4009   fprintf(f, "%d\n", sizeof(void *));
4010   exit(0);
4011 }
4012 EOF
4013 if { (eval echo configure:4014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
4014 then
4015   ac_cv_sizeof_void_p=`cat conftestval`
4016 else
4017   echo "configure: failed program was:" >&5
4018   cat conftest.$ac_ext >&5
4019   rm -fr conftest*
4020   ac_cv_sizeof_void_p=0
4021 fi
4022 rm -fr conftest*
4023 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4024 { test "$extra_verbose" = "yes" && cat << EOF
4025     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4026 EOF
4027 cat >> confdefs.h <<EOF
4028 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4029 EOF
4030 }
4031
4032
4033
4034 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4035 echo "configure:4036: checking for long file names" >&5
4036
4037 ac_cv_sys_long_file_names=yes
4038 # Test for long file names in all the places we know might matter:
4039 #      .                the current directory, where building will happen
4040 #      $prefix/lib      where we will be installing things
4041 #      $exec_prefix/lib likewise
4042 # eval it to expand exec_prefix.
4043 #      $TMPDIR          if set, where it might want to write temporary files
4044 # if $TMPDIR is not set:
4045 #      /tmp             where it might want to write temporary files
4046 #      /var/tmp         likewise
4047 #      /usr/tmp         likewise
4048 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4049   ac_tmpdirs="$TMPDIR"
4050 else
4051   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4052 fi
4053 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4054   test -d $ac_dir || continue
4055   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4056   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4057   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4058   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4059   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4060     ac_cv_sys_long_file_names=no
4061     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4062     break
4063   fi
4064   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4065 done
4066
4067 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4068 if test $ac_cv_sys_long_file_names = yes; then
4069   { test "$extra_verbose" = "yes" && cat << \EOF
4070     Defining HAVE_LONG_FILE_NAMES
4071 EOF
4072 cat >> confdefs.h <<\EOF
4073 #define HAVE_LONG_FILE_NAMES 1
4074 EOF
4075 }
4076
4077 fi
4078
4079
4080
4081 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4082 echo "configure:4083: checking for sin in -lm" >&5
4083 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4084
4085 xe_check_libs=" -lm "
4086 cat > conftest.$ac_ext <<EOF
4087 #line 4088 "configure"
4088 #include "confdefs.h"
4089 /* Override any gcc2 internal prototype to avoid an error.  */
4090 /* We use char because int might match the return type of a gcc2
4091     builtin and then its argument prototype would still apply.  */
4092 char sin();
4093
4094 int main() {
4095 sin()
4096 ; return 0; }
4097 EOF
4098 if { (eval echo configure:4099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4099   rm -rf conftest*
4100   eval "ac_cv_lib_$ac_lib_var=yes"
4101 else
4102   echo "configure: failed program was:" >&5
4103   cat conftest.$ac_ext >&5
4104   rm -rf conftest*
4105   eval "ac_cv_lib_$ac_lib_var=no"
4106 fi
4107 rm -f conftest*
4108 xe_check_libs=""
4109
4110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4111   echo "$ac_t""yes" 1>&6
4112     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4113     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4114   { test "$extra_verbose" = "yes" && cat << EOF
4115     Defining $ac_tr_lib
4116 EOF
4117 cat >> confdefs.h <<EOF
4118 #define $ac_tr_lib 1
4119 EOF
4120 }
4121
4122   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4123
4124 else
4125   echo "$ac_t""no" 1>&6
4126 fi
4127
4128
4129
4130 { test "$extra_verbose" = "yes" && cat << \EOF
4131     Defining LISP_FLOAT_TYPE
4132 EOF
4133 cat >> confdefs.h <<\EOF
4134 #define LISP_FLOAT_TYPE 1
4135 EOF
4136 }
4137
4138
4139 cat > conftest.$ac_ext <<EOF
4140 #line 4141 "configure"
4141 #include "confdefs.h"
4142 #include <math.h>
4143 int main() {
4144 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4145 ; return 0; }
4146 EOF
4147 if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4148   rm -rf conftest*
4149   { test "$extra_verbose" = "yes" && cat << \EOF
4150     Defining HAVE_INVERSE_HYPERBOLIC
4151 EOF
4152 cat >> confdefs.h <<\EOF
4153 #define HAVE_INVERSE_HYPERBOLIC 1
4154 EOF
4155 }
4156
4157 else
4158   echo "configure: failed program was:" >&5
4159   cat conftest.$ac_ext >&5
4160 fi
4161 rm -f conftest*
4162
4163 echo "checking type of mail spool file locking" 1>&6
4164 echo "configure:4165: checking type of mail spool file locking" >&5
4165 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4166 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4167 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4168     Defining REAL_MAIL_USE_LOCKF
4169 EOF
4170 cat >> confdefs.h <<\EOF
4171 #define REAL_MAIL_USE_LOCKF 1
4172 EOF
4173 }
4174
4175 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4176     Defining REAL_MAIL_USE_FLOCK
4177 EOF
4178 cat >> confdefs.h <<\EOF
4179 #define REAL_MAIL_USE_FLOCK 1
4180 EOF
4181 }
4182
4183 else mail_locking="dot-locking"
4184 fi
4185
4186
4187 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
4188 echo "configure:4189: checking for kstat_open in -lkstat" >&5
4189 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
4190
4191 xe_check_libs=" -lkstat "
4192 cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195 /* Override any gcc2 internal prototype to avoid an error.  */
4196 /* We use char because int might match the return type of a gcc2
4197     builtin and then its argument prototype would still apply.  */
4198 char kstat_open();
4199
4200 int main() {
4201 kstat_open()
4202 ; return 0; }
4203 EOF
4204 if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4205   rm -rf conftest*
4206   eval "ac_cv_lib_$ac_lib_var=yes"
4207 else
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   eval "ac_cv_lib_$ac_lib_var=no"
4212 fi
4213 rm -f conftest*
4214 xe_check_libs=""
4215
4216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4217   echo "$ac_t""yes" 1>&6
4218     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4219     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4220   { test "$extra_verbose" = "yes" && cat << EOF
4221     Defining $ac_tr_lib
4222 EOF
4223 cat >> confdefs.h <<EOF
4224 #define $ac_tr_lib 1
4225 EOF
4226 }
4227
4228   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
4229
4230 else
4231   echo "$ac_t""no" 1>&6
4232 fi
4233
4234
4235
4236
4237 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
4238 echo "configure:4239: checking for kvm_read in -lkvm" >&5
4239 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
4240
4241 xe_check_libs=" -lkvm "
4242 cat > conftest.$ac_ext <<EOF
4243 #line 4244 "configure"
4244 #include "confdefs.h"
4245 /* Override any gcc2 internal prototype to avoid an error.  */
4246 /* We use char because int might match the return type of a gcc2
4247     builtin and then its argument prototype would still apply.  */
4248 char kvm_read();
4249
4250 int main() {
4251 kvm_read()
4252 ; return 0; }
4253 EOF
4254 if { (eval echo configure:4255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4255   rm -rf conftest*
4256   eval "ac_cv_lib_$ac_lib_var=yes"
4257 else
4258   echo "configure: failed program was:" >&5
4259   cat conftest.$ac_ext >&5
4260   rm -rf conftest*
4261   eval "ac_cv_lib_$ac_lib_var=no"
4262 fi
4263 rm -f conftest*
4264 xe_check_libs=""
4265
4266 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4267   echo "$ac_t""yes" 1>&6
4268     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4269     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4270   { test "$extra_verbose" = "yes" && cat << EOF
4271     Defining $ac_tr_lib
4272 EOF
4273 cat >> confdefs.h <<EOF
4274 #define $ac_tr_lib 1
4275 EOF
4276 }
4277
4278   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
4279
4280 else
4281   echo "$ac_t""no" 1>&6
4282 fi
4283
4284
4285
4286 case "$opsys" in decosf*)
4287   
4288 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4289 echo "configure:4290: checking for cma_open in -lpthreads" >&5
4290 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4291
4292 xe_check_libs=" -lpthreads "
4293 cat > conftest.$ac_ext <<EOF
4294 #line 4295 "configure"
4295 #include "confdefs.h"
4296 /* Override any gcc2 internal prototype to avoid an error.  */
4297 /* We use char because int might match the return type of a gcc2
4298     builtin and then its argument prototype would still apply.  */
4299 char cma_open();
4300
4301 int main() {
4302 cma_open()
4303 ; return 0; }
4304 EOF
4305 if { (eval echo configure:4306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4306   rm -rf conftest*
4307   eval "ac_cv_lib_$ac_lib_var=yes"
4308 else
4309   echo "configure: failed program was:" >&5
4310   cat conftest.$ac_ext >&5
4311   rm -rf conftest*
4312   eval "ac_cv_lib_$ac_lib_var=no"
4313 fi
4314 rm -f conftest*
4315 xe_check_libs=""
4316
4317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4318   echo "$ac_t""yes" 1>&6
4319     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4320     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4321   { test "$extra_verbose" = "yes" && cat << EOF
4322     Defining $ac_tr_lib
4323 EOF
4324 cat >> confdefs.h <<EOF
4325 #define $ac_tr_lib 1
4326 EOF
4327 }
4328
4329   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4330
4331 else
4332   echo "$ac_t""no" 1>&6
4333 fi
4334
4335
4336   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4337     c_switch_site="$c_switch_site -threads" ;;
4338 esac
4339
4340 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4341 echo "configure:4342: checking whether the -xildoff compiler flag is required" >&5
4342 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4343   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4344     then echo "$ac_t""no" 1>&6;
4345     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
4346   fi
4347   else echo "$ac_t""no" 1>&6
4348 fi
4349
4350 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4351   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4352 echo "configure:4353: checking for \"-z ignore\" linker flag" >&5
4353   case "`ld -h 2>&1`" in
4354     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4355       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4356     *) echo "$ac_t""no" 1>&6 ;;
4357   esac
4358 fi
4359
4360
4361 echo "checking "for specified window system"" 1>&6
4362 echo "configure:4363: checking "for specified window system"" >&5
4363
4364 if test "$with_x11" != "no"; then
4365     test "$x_includes $x_libraries" != "NONE NONE" && \
4366    window_system=x11 with_x11=yes
4367
4368         
4369       if test "$x_includes $x_libraries" = "NONE NONE" \
4370     -a -n "$OPENWINHOME" \
4371     -a "$OPENWINHOME" != "/usr/openwin" \
4372     -a -d "$OPENWINHOME"; then
4373       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4374       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4375       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4376   fi
4377
4378   if test "$x_includes" = "NONE"; then
4379                     for dir in "/usr/X11" "/usr/X11R6"; do
4380       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4381     done
4382   fi
4383
4384   if test "$x_libraries" = "NONE"; then
4385     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4386       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4387     done
4388   fi
4389
4390   # If we find X, set shell vars x_includes and x_libraries to the
4391 # paths, otherwise set no_x=yes.
4392 # Uses ac_ vars as temps to allow command line to override cache and checks.
4393 # --without-x overrides everything else, but does not touch the cache.
4394 echo $ac_n "checking for X""... $ac_c" 1>&6
4395 echo "configure:4396: checking for X" >&5
4396
4397 # Check whether --with-x or --without-x was given.
4398 if test "${with_x+set}" = set; then
4399   withval="$with_x"
4400   :
4401 fi
4402
4403 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4404 if test "x$with_x" = xno; then
4405   # The user explicitly disabled X.
4406   have_x=disabled
4407 else
4408   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4409     # Both variables are already set.
4410     have_x=yes
4411   else
4412
4413 # One or both of the vars are not set, and there is no cached value.
4414 ac_x_includes=NO ac_x_libraries=NO
4415 rm -fr conftestdir
4416 if mkdir conftestdir; then
4417   cd conftestdir
4418   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4419   cat > Imakefile <<'EOF'
4420 acfindx:
4421         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4422 EOF
4423   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4424     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4425     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4426     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4427     for ac_extension in a so sl; do
4428       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4429         test -f $ac_im_libdir/libX11.$ac_extension; then
4430         ac_im_usrlibdir=$ac_im_libdir; break
4431       fi
4432     done
4433     # Screen out bogus values from the imake configuration.  They are
4434     # bogus both because they are the default anyway, and because
4435     # using them would break gcc on systems where it needs fixed includes.
4436     case "$ac_im_incroot" in
4437         /usr/include) ;;
4438         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4439     esac
4440     case "$ac_im_usrlibdir" in
4441         /usr/lib | /lib) ;;
4442         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4443     esac
4444   fi
4445   cd ..
4446   rm -fr conftestdir
4447 fi
4448
4449 if test "$ac_x_includes" = NO; then
4450   # Guess where to find include files, by looking for this one X11 .h file.
4451   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4452
4453   # First, try using that file with no special directory specified.
4454 cat > conftest.$ac_ext <<EOF
4455 #line 4456 "configure"
4456 #include "confdefs.h"
4457 #include <$x_direct_test_include>
4458 EOF
4459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4460 { (eval echo configure:4461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4461 ac_err=`grep -v '^ *+' conftest.out`
4462 if test -z "$ac_err"; then
4463   rm -rf conftest*
4464   # We can compile using X headers with no special include directory.
4465 ac_x_includes=
4466 else
4467   echo "$ac_err" >&5
4468   echo "configure: failed program was:" >&5
4469   cat conftest.$ac_ext >&5
4470   rm -rf conftest*
4471   # Look for the header file in a standard set of common directories.
4472 # Check X11 before X11Rn because it is often a symlink to the current release.
4473   for ac_dir in               \
4474     /usr/X11/include          \
4475     /usr/X11R6/include        \
4476     /usr/X11R5/include        \
4477     /usr/X11R4/include        \
4478                               \
4479     /usr/include/X11          \
4480     /usr/include/X11R6        \
4481     /usr/include/X11R5        \
4482     /usr/include/X11R4        \
4483                               \
4484     /usr/local/X11/include    \
4485     /usr/local/X11R6/include  \
4486     /usr/local/X11R5/include  \
4487     /usr/local/X11R4/include  \
4488                               \
4489     /usr/local/include/X11    \
4490     /usr/local/include/X11R6  \
4491     /usr/local/include/X11R5  \
4492     /usr/local/include/X11R4  \
4493                               \
4494     /usr/X386/include         \
4495     /usr/x386/include         \
4496     /usr/XFree86/include/X11  \
4497                               \
4498     /usr/include              \
4499     /usr/local/include        \
4500     /usr/unsupported/include  \
4501     /usr/athena/include       \
4502     /usr/local/x11r5/include  \
4503     /usr/lpp/Xamples/include  \
4504                               \
4505     /usr/openwin/include      \
4506     /usr/openwin/share/include \
4507     ; \
4508   do
4509     if test -r "$ac_dir/$x_direct_test_include"; then
4510       ac_x_includes=$ac_dir
4511       break
4512     fi
4513   done
4514 fi
4515 rm -f conftest*
4516 fi # $ac_x_includes = NO
4517
4518 if test "$ac_x_libraries" = NO; then
4519   # Check for the libraries.
4520
4521   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4522   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4523
4524   # See if we find them without any special options.
4525   # Don't add to $LIBS permanently.
4526   ac_save_LIBS="$LIBS"
4527   LIBS="-l$x_direct_test_library $LIBS"
4528 cat > conftest.$ac_ext <<EOF
4529 #line 4530 "configure"
4530 #include "confdefs.h"
4531
4532 int main() {
4533 ${x_direct_test_function}()
4534 ; return 0; }
4535 EOF
4536 if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4537   rm -rf conftest*
4538   LIBS="$ac_save_LIBS"
4539 # We can link X programs with no special library path.
4540 ac_x_libraries=
4541 else
4542   echo "configure: failed program was:" >&5
4543   cat conftest.$ac_ext >&5
4544   rm -rf conftest*
4545   LIBS="$ac_save_LIBS"
4546 # First see if replacing the include by lib works.
4547 # Check X11 before X11Rn because it is often a symlink to the current release.
4548 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4549     /usr/X11/lib          \
4550     /usr/X11R6/lib        \
4551     /usr/X11R5/lib        \
4552     /usr/X11R4/lib        \
4553                           \
4554     /usr/lib/X11          \
4555     /usr/lib/X11R6        \
4556     /usr/lib/X11R5        \
4557     /usr/lib/X11R4        \
4558                           \
4559     /usr/local/X11/lib    \
4560     /usr/local/X11R6/lib  \
4561     /usr/local/X11R5/lib  \
4562     /usr/local/X11R4/lib  \
4563                           \
4564     /usr/local/lib/X11    \
4565     /usr/local/lib/X11R6  \
4566     /usr/local/lib/X11R5  \
4567     /usr/local/lib/X11R4  \
4568                           \
4569     /usr/X386/lib         \
4570     /usr/x386/lib         \
4571     /usr/XFree86/lib/X11  \
4572                           \
4573     /usr/lib              \
4574     /usr/local/lib        \
4575     /usr/unsupported/lib  \
4576     /usr/athena/lib       \
4577     /usr/local/x11r5/lib  \
4578     /usr/lpp/Xamples/lib  \
4579     /lib/usr/lib/X11      \
4580                           \
4581     /usr/openwin/lib      \
4582     /usr/openwin/share/lib \
4583     ; \
4584 do
4585   for ac_extension in a so sl; do
4586     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4587       ac_x_libraries=$ac_dir
4588       break 2
4589     fi
4590   done
4591 done
4592 fi
4593 rm -f conftest*
4594 fi # $ac_x_libraries = NO
4595
4596 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4597   # Didn't find X anywhere.  Cache the known absence of X.
4598   ac_cv_have_x="have_x=no"
4599 else
4600   # Record where we found X for the cache.
4601   ac_cv_have_x="have_x=yes \
4602                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4603 fi
4604   fi
4605   eval "$ac_cv_have_x"
4606 fi # $with_x != no
4607
4608 if test "$have_x" != yes; then
4609   echo "$ac_t""$have_x" 1>&6
4610   no_x=yes
4611 else
4612   # If each of the values was on the command line, it overrides each guess.
4613   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4614   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4615   # Update the cache value to reflect the command line values.
4616   ac_cv_have_x="have_x=yes \
4617                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4618   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4619 fi
4620
4621 if test "$no_x" = yes; then
4622   # Not all programs may use this symbol, but it does not hurt to define it.
4623   { test "$extra_verbose" = "yes" && cat << \EOF
4624     Defining X_DISPLAY_MISSING
4625 EOF
4626 cat >> confdefs.h <<\EOF
4627 #define X_DISPLAY_MISSING 1
4628 EOF
4629 }
4630
4631   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4632 else
4633   if test -n "$x_includes"; then
4634     X_CFLAGS="$X_CFLAGS -I$x_includes"
4635   fi
4636
4637   # It would also be nice to do this for all -L options, not just this one.
4638   if test -n "$x_libraries"; then
4639     X_LIBS="$X_LIBS -L$x_libraries"
4640     # For Solaris; some versions of Sun CC require a space after -R and
4641     # others require no space.  Words are not sufficient . . . .
4642     case "`(uname -sr) 2>/dev/null`" in
4643     "SunOS 5"*)
4644       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4645 echo "configure:4646: checking whether -R must be followed by a space" >&5
4646       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4647       cat > conftest.$ac_ext <<EOF
4648 #line 4649 "configure"
4649 #include "confdefs.h"
4650
4651 int main() {
4652
4653 ; return 0; }
4654 EOF
4655 if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4656   rm -rf conftest*
4657   ac_R_nospace=yes
4658 else
4659   echo "configure: failed program was:" >&5
4660   cat conftest.$ac_ext >&5
4661   rm -rf conftest*
4662   ac_R_nospace=no
4663 fi
4664 rm -f conftest*
4665       if test $ac_R_nospace = yes; then
4666         echo "$ac_t""no" 1>&6
4667         X_LIBS="$X_LIBS -R$x_libraries"
4668       else
4669         LIBS="$ac_xsave_LIBS -R $x_libraries"
4670         cat > conftest.$ac_ext <<EOF
4671 #line 4672 "configure"
4672 #include "confdefs.h"
4673
4674 int main() {
4675
4676 ; return 0; }
4677 EOF
4678 if { (eval echo configure:4679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4679   rm -rf conftest*
4680   ac_R_space=yes
4681 else
4682   echo "configure: failed program was:" >&5
4683   cat conftest.$ac_ext >&5
4684   rm -rf conftest*
4685   ac_R_space=no
4686 fi
4687 rm -f conftest*
4688         if test $ac_R_space = yes; then
4689           echo "$ac_t""yes" 1>&6
4690           X_LIBS="$X_LIBS -R $x_libraries"
4691         else
4692           echo "$ac_t""neither works" 1>&6
4693         fi
4694       fi
4695       LIBS="$ac_xsave_LIBS"
4696     esac
4697   fi
4698
4699   # Check for system-dependent libraries X programs must link with.
4700   # Do this before checking for the system-independent R6 libraries
4701   # (-lICE), since we may need -lsocket or whatever for X linking.
4702
4703   if test "$ISC" = yes; then
4704     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4705   else
4706     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4707     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4708     # the Alpha needs dnet_stub (dnet does not exist).
4709     if test "$with_dnet" = "no" ; then
4710 ac_cv_lib_dnet_dnet_ntoa=no
4711 else
4712
4713 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4714 echo "configure:4715: checking for dnet_ntoa in -ldnet" >&5
4715 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4716
4717 xe_check_libs=" -ldnet "
4718 cat > conftest.$ac_ext <<EOF
4719 #line 4720 "configure"
4720 #include "confdefs.h"
4721 /* Override any gcc2 internal prototype to avoid an error.  */
4722 /* We use char because int might match the return type of a gcc2
4723     builtin and then its argument prototype would still apply.  */
4724 char dnet_ntoa();
4725
4726 int main() {
4727 dnet_ntoa()
4728 ; return 0; }
4729 EOF
4730 if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4731   rm -rf conftest*
4732   eval "ac_cv_lib_$ac_lib_var=yes"
4733 else
4734   echo "configure: failed program was:" >&5
4735   cat conftest.$ac_ext >&5
4736   rm -rf conftest*
4737   eval "ac_cv_lib_$ac_lib_var=no"
4738 fi
4739 rm -f conftest*
4740 xe_check_libs=""
4741
4742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4743   echo "$ac_t""yes" 1>&6
4744   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4745 else
4746   echo "$ac_t""no" 1>&6
4747 fi
4748
4749 fi
4750
4751     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4752       
4753 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4754 echo "configure:4755: checking for dnet_ntoa in -ldnet_stub" >&5
4755 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4756
4757 xe_check_libs=" -ldnet_stub "
4758 cat > conftest.$ac_ext <<EOF
4759 #line 4760 "configure"
4760 #include "confdefs.h"
4761 /* Override any gcc2 internal prototype to avoid an error.  */
4762 /* We use char because int might match the return type of a gcc2
4763     builtin and then its argument prototype would still apply.  */
4764 char dnet_ntoa();
4765
4766 int main() {
4767 dnet_ntoa()
4768 ; return 0; }
4769 EOF
4770 if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4771   rm -rf conftest*
4772   eval "ac_cv_lib_$ac_lib_var=yes"
4773 else
4774   echo "configure: failed program was:" >&5
4775   cat conftest.$ac_ext >&5
4776   rm -rf conftest*
4777   eval "ac_cv_lib_$ac_lib_var=no"
4778 fi
4779 rm -f conftest*
4780 xe_check_libs=""
4781
4782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4783   echo "$ac_t""yes" 1>&6
4784   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4785 else
4786   echo "$ac_t""no" 1>&6
4787 fi
4788
4789
4790     fi
4791
4792     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4793     # to get the SysV transport functions.
4794     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4795     # needs -lnsl.
4796     # The nsl library prevents programs from opening the X display
4797     # on Irix 5.2, according to dickey@clark.net.
4798     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4799 echo "configure:4800: checking for gethostbyname" >&5
4800
4801 cat > conftest.$ac_ext <<EOF
4802 #line 4803 "configure"
4803 #include "confdefs.h"
4804 /* System header to define __stub macros and hopefully few prototypes,
4805     which can conflict with char gethostbyname(); below.  */
4806 #include <assert.h>
4807 /* Override any gcc2 internal prototype to avoid an error.  */
4808 /* We use char because int might match the return type of a gcc2
4809     builtin and then its argument prototype would still apply.  */
4810 char gethostbyname();
4811
4812 int main() {
4813
4814 /* The GNU C library defines this for functions which it implements
4815     to always fail with ENOSYS.  Some functions are actually named
4816     something starting with __ and the normal name is an alias.  */
4817 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4818 choke me
4819 #else
4820 gethostbyname();
4821 #endif
4822
4823 ; return 0; }
4824 EOF
4825 if { (eval echo configure:4826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4826   rm -rf conftest*
4827   eval "ac_cv_func_gethostbyname=yes"
4828 else
4829   echo "configure: failed program was:" >&5
4830   cat conftest.$ac_ext >&5
4831   rm -rf conftest*
4832   eval "ac_cv_func_gethostbyname=no"
4833 fi
4834 rm -f conftest*
4835
4836 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4837   echo "$ac_t""yes" 1>&6
4838   :
4839 else
4840   echo "$ac_t""no" 1>&6
4841 fi
4842
4843     if test $ac_cv_func_gethostbyname = no; then
4844       
4845 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4846 echo "configure:4847: checking for gethostbyname in -lnsl" >&5
4847 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4848
4849 xe_check_libs=" -lnsl "
4850 cat > conftest.$ac_ext <<EOF
4851 #line 4852 "configure"
4852 #include "confdefs.h"
4853 /* Override any gcc2 internal prototype to avoid an error.  */
4854 /* We use char because int might match the return type of a gcc2
4855     builtin and then its argument prototype would still apply.  */
4856 char gethostbyname();
4857
4858 int main() {
4859 gethostbyname()
4860 ; return 0; }
4861 EOF
4862 if { (eval echo configure:4863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4863   rm -rf conftest*
4864   eval "ac_cv_lib_$ac_lib_var=yes"
4865 else
4866   echo "configure: failed program was:" >&5
4867   cat conftest.$ac_ext >&5
4868   rm -rf conftest*
4869   eval "ac_cv_lib_$ac_lib_var=no"
4870 fi
4871 rm -f conftest*
4872 xe_check_libs=""
4873
4874 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4875   echo "$ac_t""yes" 1>&6
4876   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4877 else
4878   echo "$ac_t""no" 1>&6
4879 fi
4880
4881
4882     fi
4883
4884     # lieder@skyler.mavd.honeywell.com says without -lsocket,
4885     # socket/setsockopt and other routines are undefined under SCO ODT
4886     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
4887     # on later versions), says simon@lia.di.epfl.ch: it contains
4888     # gethostby* variants that don't use the nameserver (or something).
4889     # -lsocket must be given before -lnsl if both are needed.
4890     # We assume that if connect needs -lnsl, so does gethostbyname.
4891     echo $ac_n "checking for connect""... $ac_c" 1>&6
4892 echo "configure:4893: checking for connect" >&5
4893
4894 cat > conftest.$ac_ext <<EOF
4895 #line 4896 "configure"
4896 #include "confdefs.h"
4897 /* System header to define __stub macros and hopefully few prototypes,
4898     which can conflict with char connect(); below.  */
4899 #include <assert.h>
4900 /* Override any gcc2 internal prototype to avoid an error.  */
4901 /* We use char because int might match the return type of a gcc2
4902     builtin and then its argument prototype would still apply.  */
4903 char connect();
4904
4905 int main() {
4906
4907 /* The GNU C library defines this for functions which it implements
4908     to always fail with ENOSYS.  Some functions are actually named
4909     something starting with __ and the normal name is an alias.  */
4910 #if defined (__stub_connect) || defined (__stub___connect)
4911 choke me
4912 #else
4913 connect();
4914 #endif
4915
4916 ; return 0; }
4917 EOF
4918 if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4919   rm -rf conftest*
4920   eval "ac_cv_func_connect=yes"
4921 else
4922   echo "configure: failed program was:" >&5
4923   cat conftest.$ac_ext >&5
4924   rm -rf conftest*
4925   eval "ac_cv_func_connect=no"
4926 fi
4927 rm -f conftest*
4928
4929 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4930   echo "$ac_t""yes" 1>&6
4931   :
4932 else
4933   echo "$ac_t""no" 1>&6
4934 fi
4935
4936     if test $ac_cv_func_connect = no; then
4937       
4938 xe_msg_checking="for connect in -lsocket"
4939 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
4940 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
4941 echo "configure:4942: checking "$xe_msg_checking"" >&5
4942 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4943
4944 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
4945 cat > conftest.$ac_ext <<EOF
4946 #line 4947 "configure"
4947 #include "confdefs.h"
4948 /* Override any gcc2 internal prototype to avoid an error.  */
4949 /* We use char because int might match the return type of a gcc2
4950     builtin and then its argument prototype would still apply.  */
4951 char connect();
4952
4953 int main() {
4954 connect()
4955 ; return 0; }
4956 EOF
4957 if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4958   rm -rf conftest*
4959   eval "ac_cv_lib_$ac_lib_var=yes"
4960 else
4961   echo "configure: failed program was:" >&5
4962   cat conftest.$ac_ext >&5
4963   rm -rf conftest*
4964   eval "ac_cv_lib_$ac_lib_var=no"
4965 fi
4966 rm -f conftest*
4967 xe_check_libs=""
4968
4969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4970   echo "$ac_t""yes" 1>&6
4971   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
4972 else
4973   echo "$ac_t""no" 1>&6
4974 fi
4975
4976
4977     fi
4978
4979     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
4980     echo $ac_n "checking for remove""... $ac_c" 1>&6
4981 echo "configure:4982: checking for remove" >&5
4982
4983 cat > conftest.$ac_ext <<EOF
4984 #line 4985 "configure"
4985 #include "confdefs.h"
4986 /* System header to define __stub macros and hopefully few prototypes,
4987     which can conflict with char remove(); below.  */
4988 #include <assert.h>
4989 /* Override any gcc2 internal prototype to avoid an error.  */
4990 /* We use char because int might match the return type of a gcc2
4991     builtin and then its argument prototype would still apply.  */
4992 char remove();
4993
4994 int main() {
4995
4996 /* The GNU C library defines this for functions which it implements
4997     to always fail with ENOSYS.  Some functions are actually named
4998     something starting with __ and the normal name is an alias.  */
4999 #if defined (__stub_remove) || defined (__stub___remove)
5000 choke me
5001 #else
5002 remove();
5003 #endif
5004
5005 ; return 0; }
5006 EOF
5007 if { (eval echo configure:5008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5008   rm -rf conftest*
5009   eval "ac_cv_func_remove=yes"
5010 else
5011   echo "configure: failed program was:" >&5
5012   cat conftest.$ac_ext >&5
5013   rm -rf conftest*
5014   eval "ac_cv_func_remove=no"
5015 fi
5016 rm -f conftest*
5017
5018 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5019   echo "$ac_t""yes" 1>&6
5020   :
5021 else
5022   echo "$ac_t""no" 1>&6
5023 fi
5024
5025     if test $ac_cv_func_remove = no; then
5026       
5027 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5028 echo "configure:5029: checking for remove in -lposix" >&5
5029 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5030
5031 xe_check_libs=" -lposix "
5032 cat > conftest.$ac_ext <<EOF
5033 #line 5034 "configure"
5034 #include "confdefs.h"
5035 /* Override any gcc2 internal prototype to avoid an error.  */
5036 /* We use char because int might match the return type of a gcc2
5037     builtin and then its argument prototype would still apply.  */
5038 char remove();
5039
5040 int main() {
5041 remove()
5042 ; return 0; }
5043 EOF
5044 if { (eval echo configure:5045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5045   rm -rf conftest*
5046   eval "ac_cv_lib_$ac_lib_var=yes"
5047 else
5048   echo "configure: failed program was:" >&5
5049   cat conftest.$ac_ext >&5
5050   rm -rf conftest*
5051   eval "ac_cv_lib_$ac_lib_var=no"
5052 fi
5053 rm -f conftest*
5054 xe_check_libs=""
5055
5056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5057   echo "$ac_t""yes" 1>&6
5058   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5059 else
5060   echo "$ac_t""no" 1>&6
5061 fi
5062
5063
5064     fi
5065
5066     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5067     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5068 echo "configure:5069: checking for shmat" >&5
5069
5070 cat > conftest.$ac_ext <<EOF
5071 #line 5072 "configure"
5072 #include "confdefs.h"
5073 /* System header to define __stub macros and hopefully few prototypes,
5074     which can conflict with char shmat(); below.  */
5075 #include <assert.h>
5076 /* Override any gcc2 internal prototype to avoid an error.  */
5077 /* We use char because int might match the return type of a gcc2
5078     builtin and then its argument prototype would still apply.  */
5079 char shmat();
5080
5081 int main() {
5082
5083 /* The GNU C library defines this for functions which it implements
5084     to always fail with ENOSYS.  Some functions are actually named
5085     something starting with __ and the normal name is an alias.  */
5086 #if defined (__stub_shmat) || defined (__stub___shmat)
5087 choke me
5088 #else
5089 shmat();
5090 #endif
5091
5092 ; return 0; }
5093 EOF
5094 if { (eval echo configure:5095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5095   rm -rf conftest*
5096   eval "ac_cv_func_shmat=yes"
5097 else
5098   echo "configure: failed program was:" >&5
5099   cat conftest.$ac_ext >&5
5100   rm -rf conftest*
5101   eval "ac_cv_func_shmat=no"
5102 fi
5103 rm -f conftest*
5104
5105 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5106   echo "$ac_t""yes" 1>&6
5107   :
5108 else
5109   echo "$ac_t""no" 1>&6
5110 fi
5111
5112     if test $ac_cv_func_shmat = no; then
5113       
5114 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5115 echo "configure:5116: checking for shmat in -lipc" >&5
5116 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5117
5118 xe_check_libs=" -lipc "
5119 cat > conftest.$ac_ext <<EOF
5120 #line 5121 "configure"
5121 #include "confdefs.h"
5122 /* Override any gcc2 internal prototype to avoid an error.  */
5123 /* We use char because int might match the return type of a gcc2
5124     builtin and then its argument prototype would still apply.  */
5125 char shmat();
5126
5127 int main() {
5128 shmat()
5129 ; return 0; }
5130 EOF
5131 if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5132   rm -rf conftest*
5133   eval "ac_cv_lib_$ac_lib_var=yes"
5134 else
5135   echo "configure: failed program was:" >&5
5136   cat conftest.$ac_ext >&5
5137   rm -rf conftest*
5138   eval "ac_cv_lib_$ac_lib_var=no"
5139 fi
5140 rm -f conftest*
5141 xe_check_libs=""
5142
5143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5144   echo "$ac_t""yes" 1>&6
5145   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5146 else
5147   echo "$ac_t""no" 1>&6
5148 fi
5149
5150
5151     fi
5152   fi
5153
5154   # Check for libraries that X11R6 Xt/Xaw programs need.
5155   ac_save_LDFLAGS="$LDFLAGS"
5156   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5157   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5158   # check for ICE first), but we must link in the order -lSM -lICE or
5159   # we get undefined symbols.  So assume we have SM if we have ICE.
5160   # These have to be linked with before -lX11, unlike the other
5161   # libraries we check for below, so use a different variable.
5162   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5163   
5164 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5165 echo "configure:5166: checking for IceConnectionNumber in -lICE" >&5
5166 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5167
5168 xe_check_libs=" -lICE "
5169 cat > conftest.$ac_ext <<EOF
5170 #line 5171 "configure"
5171 #include "confdefs.h"
5172 /* Override any gcc2 internal prototype to avoid an error.  */
5173 /* We use char because int might match the return type of a gcc2
5174     builtin and then its argument prototype would still apply.  */
5175 char IceConnectionNumber();
5176
5177 int main() {
5178 IceConnectionNumber()
5179 ; return 0; }
5180 EOF
5181 if { (eval echo configure:5182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5182   rm -rf conftest*
5183   eval "ac_cv_lib_$ac_lib_var=yes"
5184 else
5185   echo "configure: failed program was:" >&5
5186   cat conftest.$ac_ext >&5
5187   rm -rf conftest*
5188   eval "ac_cv_lib_$ac_lib_var=no"
5189 fi
5190 rm -f conftest*
5191 xe_check_libs=""
5192
5193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5194   echo "$ac_t""yes" 1>&6
5195   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5196 else
5197   echo "$ac_t""no" 1>&6
5198 fi
5199
5200
5201   LDFLAGS="$ac_save_LDFLAGS"
5202
5203 fi
5204  # Autoconf claims to find X library and include dirs for us.
5205   if test "$no_x" = "yes"
5206   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5207   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5208   fi
5209 fi
5210
5211 case "$with_x11" in
5212   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5213   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5214 esac
5215
5216 if test "$with_x11" = "yes"; then
5217   { test "$extra_verbose" = "yes" && cat << \EOF
5218     Defining HAVE_X_WINDOWS
5219 EOF
5220 cat >> confdefs.h <<\EOF
5221 #define HAVE_X_WINDOWS 1
5222 EOF
5223 }
5224
5225   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5226   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5227
5228       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5229     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5230     if test -d "$lib_dir" -a -d "$inc_dir"; then
5231       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5232         x_libraries="$lib_dir $x_libraries"
5233         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5234       esac
5235       case "$x_includes" in "$inc_dir"* ) ;; *)
5236         x_includes="$inc_dir $x_includes"
5237         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5238       esac
5239       break;       fi
5240   done
5241
5242     for rel in "X11R6" "X11R5" "X11R4"; do
5243     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5244     if test -d "$lib_dir" -a -d "$inc_dir"; then
5245       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5246         x_libraries="$x_libraries $lib_dir"
5247         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5248       esac
5249       case "$x_includes" in "$inc_dir"* ) ;; *)
5250         x_includes="$x_includes $inc_dir"
5251         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5252       esac
5253       break;     fi
5254   done
5255
5256   ld_switch_x_site="$X_LIBS"
5257
5258   
5259 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5260     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5261   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5262   
5263         runpath="" runpath_dirs=""
5264   if test -n "$LD_RUN_PATH"; then
5265     runpath="$LD_RUN_PATH"
5266   elif test "$GCC" = "yes"; then
5267         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5268     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5269     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5270     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5271       case "$arg" in P,* | -L* | -R* )
5272         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5273           {
5274 xe_runpath_dir="$dir"
5275   test "$xe_runpath_dir" != "/lib"     -a \
5276         "$xe_runpath_dir" != "/usr/lib" -a \
5277         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5278   eval "$xe_add_unique_runpath_dir"
5279 }
5280         done ;;
5281       esac
5282     done
5283     ld_switch_run="$ld_switch_run_save"
5284     rm -f conftest*
5285   else
5286         for arg in $ld_switch_site $ld_switch_x_site; do
5287       case "$arg" in -L*) {
5288 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5289   test "$xe_runpath_dir" != "/lib"     -a \
5290         "$xe_runpath_dir" != "/usr/lib" -a \
5291         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5292   eval "$xe_add_unique_runpath_dir"
5293 };; esac
5294     done
5295         if test "$opsys $need_motif" = "sol2 yes"; then
5296       xe_runpath_dir="/opt/SUNWdt/lib";
5297       eval "$xe_add_unique_runpath_dir";
5298     fi
5299   fi 
5300   if test -n "$runpath"; then
5301     ld_switch_run="${dash_r}${runpath}"
5302     
5303 if test "$GCC" = "yes"; then
5304   set x $ld_switch_run; shift; ld_switch_run=""
5305   while test -n "$1"; do
5306     case $1 in
5307       -L  | -l  | -u         ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5308       -L* | -l* | -u* | -Wl* ) ld_switch_run="$ld_switch_run $1" ;;
5309       -Xlinker* ) ;;
5310       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5311     esac
5312     shift
5313   done
5314 fi
5315     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5316   fi
5317 fi
5318
5319
5320   if test "$extra_verbose" = "yes"; then
5321     echo; echo "X11 compilation variables:"
5322     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5323     echo
5324   fi
5325
5326             bitmapdirs=
5327   if test "$x_includes" != NONE; then
5328     for i in $x_includes; do
5329       if test -d "$i/bitmaps"; then
5330         bitmapdirs="$i/bitmaps:$bitmapdirs"
5331       fi
5332       if test -d "$i/X11/bitmaps"; then
5333         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5334       fi
5335     done
5336     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5337   fi
5338   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5339     Defining BITMAPDIR = "$bitmapdirs"
5340 EOF
5341 cat >> confdefs.h <<EOF
5342 #define BITMAPDIR "$bitmapdirs"
5343 EOF
5344 }
5345
5346
5347     echo "checking for X defines extracted by xmkmf" 1>&6
5348 echo "configure:5349: checking for X defines extracted by xmkmf" >&5
5349   rm -fr conftestdir
5350   if mkdir conftestdir; then
5351     cd conftestdir
5352     cat > Imakefile <<'EOF'
5353 xetest:
5354         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5355 EOF
5356     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5357       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5358       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5359     fi
5360     cd ..
5361     rm -fr conftestdir
5362     for word in $xmkmf_defines; do
5363       case "$word" in
5364         -D*=* ) ;;
5365         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5366               { test "$extra_verbose" = "yes" && cat << EOF
5367     Defining $word
5368 EOF
5369 cat >> confdefs.h <<EOF
5370 #define $word 1
5371 EOF
5372 }
5373  ;;
5374       esac
5375     done
5376   fi
5377
5378     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5379 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5380 echo "configure:5381: checking for X11/Intrinsic.h" >&5
5381
5382 cat > conftest.$ac_ext <<EOF
5383 #line 5384 "configure"
5384 #include "confdefs.h"
5385 #include <X11/Intrinsic.h>
5386 EOF
5387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5388 { (eval echo configure:5389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5389 ac_err=`grep -v '^ *+' conftest.out`
5390 if test -z "$ac_err"; then
5391   rm -rf conftest*
5392   eval "ac_cv_header_$ac_safe=yes"
5393 else
5394   echo "$ac_err" >&5
5395   echo "configure: failed program was:" >&5
5396   cat conftest.$ac_ext >&5
5397   rm -rf conftest*
5398   eval "ac_cv_header_$ac_safe=no"
5399 fi
5400 rm -f conftest*
5401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5402   echo "$ac_t""yes" 1>&6
5403   :
5404 else
5405   echo "$ac_t""no" 1>&6
5406 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5407 fi
5408
5409
5410       
5411 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5412 echo "configure:5413: checking for XOpenDisplay in -lX11" >&5
5413 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5414
5415 xe_check_libs=" -lX11 "
5416 cat > conftest.$ac_ext <<EOF
5417 #line 5418 "configure"
5418 #include "confdefs.h"
5419 /* Override any gcc2 internal prototype to avoid an error.  */
5420 /* We use char because int might match the return type of a gcc2
5421     builtin and then its argument prototype would still apply.  */
5422 char XOpenDisplay();
5423
5424 int main() {
5425 XOpenDisplay()
5426 ; return 0; }
5427 EOF
5428 if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5429   rm -rf conftest*
5430   eval "ac_cv_lib_$ac_lib_var=yes"
5431 else
5432   echo "configure: failed program was:" >&5
5433   cat conftest.$ac_ext >&5
5434   rm -rf conftest*
5435   eval "ac_cv_lib_$ac_lib_var=no"
5436 fi
5437 rm -f conftest*
5438 xe_check_libs=""
5439
5440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5441   echo "$ac_t""yes" 1>&6
5442   have_lib_x11=yes
5443 else
5444   echo "$ac_t""no" 1>&6
5445 fi
5446
5447
5448   if test "$have_lib_x11" != "yes"; then
5449     
5450 xe_msg_checking="for XGetFontProperty in -lX11"
5451 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5452 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5453 echo "configure:5454: checking "$xe_msg_checking"" >&5
5454 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5455
5456 xe_check_libs=" -lX11 -b i486-linuxaout"
5457 cat > conftest.$ac_ext <<EOF
5458 #line 5459 "configure"
5459 #include "confdefs.h"
5460 /* Override any gcc2 internal prototype to avoid an error.  */
5461 /* We use char because int might match the return type of a gcc2
5462     builtin and then its argument prototype would still apply.  */
5463 char XGetFontProperty();
5464
5465 int main() {
5466 XGetFontProperty()
5467 ; return 0; }
5468 EOF
5469 if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5470   rm -rf conftest*
5471   eval "ac_cv_lib_$ac_lib_var=yes"
5472 else
5473   echo "configure: failed program was:" >&5
5474   cat conftest.$ac_ext >&5
5475   rm -rf conftest*
5476   eval "ac_cv_lib_$ac_lib_var=no"
5477 fi
5478 rm -f conftest*
5479 xe_check_libs=""
5480
5481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5482   echo "$ac_t""yes" 1>&6
5483   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5484 else
5485   echo "$ac_t""no" 1>&6
5486 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5487 fi
5488
5489
5490   fi
5491   libs_x="-lX11"
5492   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5493
5494     
5495 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5496 echo "configure:5497: checking for XShapeSelectInput in -lXext" >&5
5497 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5498
5499 xe_check_libs=" -lXext "
5500 cat > conftest.$ac_ext <<EOF
5501 #line 5502 "configure"
5502 #include "confdefs.h"
5503 /* Override any gcc2 internal prototype to avoid an error.  */
5504 /* We use char because int might match the return type of a gcc2
5505     builtin and then its argument prototype would still apply.  */
5506 char XShapeSelectInput();
5507
5508 int main() {
5509 XShapeSelectInput()
5510 ; return 0; }
5511 EOF
5512 if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5513   rm -rf conftest*
5514   eval "ac_cv_lib_$ac_lib_var=yes"
5515 else
5516   echo "configure: failed program was:" >&5
5517   cat conftest.$ac_ext >&5
5518   rm -rf conftest*
5519   eval "ac_cv_lib_$ac_lib_var=no"
5520 fi
5521 rm -f conftest*
5522 xe_check_libs=""
5523
5524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5525   echo "$ac_t""yes" 1>&6
5526   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5527 else
5528   echo "$ac_t""no" 1>&6
5529 fi
5530
5531
5532
5533     
5534 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5535 echo "configure:5536: checking for XtOpenDisplay in -lXt" >&5
5536 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5537
5538 xe_check_libs=" -lXt "
5539 cat > conftest.$ac_ext <<EOF
5540 #line 5541 "configure"
5541 #include "confdefs.h"
5542 /* Override any gcc2 internal prototype to avoid an error.  */
5543 /* We use char because int might match the return type of a gcc2
5544     builtin and then its argument prototype would still apply.  */
5545 char XtOpenDisplay();
5546
5547 int main() {
5548 XtOpenDisplay()
5549 ; return 0; }
5550 EOF
5551 if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5552   rm -rf conftest*
5553   eval "ac_cv_lib_$ac_lib_var=yes"
5554 else
5555   echo "configure: failed program was:" >&5
5556   cat conftest.$ac_ext >&5
5557   rm -rf conftest*
5558   eval "ac_cv_lib_$ac_lib_var=no"
5559 fi
5560 rm -f conftest*
5561 xe_check_libs=""
5562
5563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5564   echo "$ac_t""yes" 1>&6
5565   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5566 else
5567   echo "$ac_t""no" 1>&6
5568 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5569 fi
5570
5571
5572
5573   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5574 echo "configure:5575: checking the version of X11 being used" >&5
5575   cat > conftest.$ac_ext <<EOF
5576 #line 5577 "configure"
5577 #include "confdefs.h"
5578 #include <X11/Intrinsic.h>
5579     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5580 EOF
5581 if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
5582 then
5583   ./conftest foobar; x11_release=$?
5584 else
5585   echo "configure: failed program was:" >&5
5586   cat conftest.$ac_ext >&5
5587   rm -fr conftest*
5588   x11_release=4
5589 fi
5590 rm -fr conftest*
5591   echo "$ac_t""R${x11_release}" 1>&6
5592   { test "$extra_verbose" = "yes" && cat << EOF
5593     Defining THIS_IS_X11R${x11_release}
5594 EOF
5595 cat >> confdefs.h <<EOF
5596 #define THIS_IS_X11R${x11_release} 1
5597 EOF
5598 }
5599
5600
5601   for ac_hdr in X11/Xlocale.h
5602 do
5603 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5604 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5605 echo "configure:5606: checking for $ac_hdr" >&5
5606
5607 cat > conftest.$ac_ext <<EOF
5608 #line 5609 "configure"
5609 #include "confdefs.h"
5610 #include <$ac_hdr>
5611 EOF
5612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5613 { (eval echo configure:5614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5614 ac_err=`grep -v '^ *+' conftest.out`
5615 if test -z "$ac_err"; then
5616   rm -rf conftest*
5617   eval "ac_cv_header_$ac_safe=yes"
5618 else
5619   echo "$ac_err" >&5
5620   echo "configure: failed program was:" >&5
5621   cat conftest.$ac_ext >&5
5622   rm -rf conftest*
5623   eval "ac_cv_header_$ac_safe=no"
5624 fi
5625 rm -f conftest*
5626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5627   echo "$ac_t""yes" 1>&6
5628     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5629   { test "$extra_verbose" = "yes" && cat << EOF
5630     Defining $ac_tr_hdr
5631 EOF
5632 cat >> confdefs.h <<EOF
5633 #define $ac_tr_hdr 1
5634 EOF
5635 }
5636  
5637 else
5638   echo "$ac_t""no" 1>&6
5639 fi
5640 done
5641
5642
5643     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5644 echo "configure:5645: checking for XFree86" >&5
5645   if test -d "/usr/X386/include" -o \
5646           -f "/etc/XF86Config"    -o \
5647           -f "/etc/X11/XF86Config" -o \
5648           -f "/usr/X11R6/lib/X11/XF86Config"; then
5649     echo "$ac_t""yes" 1>&6
5650     { test "$extra_verbose" = "yes" && cat << \EOF
5651     Defining HAVE_XFREE386
5652 EOF
5653 cat >> confdefs.h <<\EOF
5654 #define HAVE_XFREE386 1
5655 EOF
5656 }
5657
5658   else
5659     echo "$ac_t""no" 1>&6
5660   fi
5661
5662     test -z "$with_xmu" && { 
5663 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5664 echo "configure:5665: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5665 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5666
5667 xe_check_libs=" -lXmu "
5668 cat > conftest.$ac_ext <<EOF
5669 #line 5670 "configure"
5670 #include "confdefs.h"
5671 /* Override any gcc2 internal prototype to avoid an error.  */
5672 /* We use char because int might match the return type of a gcc2
5673     builtin and then its argument prototype would still apply.  */
5674 char XmuReadBitmapDataFromFile();
5675
5676 int main() {
5677 XmuReadBitmapDataFromFile()
5678 ; return 0; }
5679 EOF
5680 if { (eval echo configure:5681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5681   rm -rf conftest*
5682   eval "ac_cv_lib_$ac_lib_var=yes"
5683 else
5684   echo "configure: failed program was:" >&5
5685   cat conftest.$ac_ext >&5
5686   rm -rf conftest*
5687   eval "ac_cv_lib_$ac_lib_var=no"
5688 fi
5689 rm -f conftest*
5690 xe_check_libs=""
5691
5692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5693   echo "$ac_t""yes" 1>&6
5694   with_xmu=yes
5695 else
5696   echo "$ac_t""no" 1>&6
5697 with_xmu=no
5698 fi
5699
5700  }
5701   if test "$with_xmu" = "no"; then
5702     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
5703    echo "    xemacs will be linked with \"xmu.o\""
5704  fi
5705   else
5706     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
5707     { test "$extra_verbose" = "yes" && cat << \EOF
5708     Defining HAVE_XMU
5709 EOF
5710 cat >> confdefs.h <<\EOF
5711 #define HAVE_XMU 1
5712 EOF
5713 }
5714
5715   fi
5716
5717       
5718 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
5719 echo "configure:5720: checking for main in -lXbsd" >&5
5720 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
5721
5722 xe_check_libs=" -lXbsd "
5723 cat > conftest.$ac_ext <<EOF
5724 #line 5725 "configure"
5725 #include "confdefs.h"
5726
5727 int main() {
5728 main()
5729 ; return 0; }
5730 EOF
5731 if { (eval echo configure:5732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5732   rm -rf conftest*
5733   eval "ac_cv_lib_$ac_lib_var=yes"
5734 else
5735   echo "configure: failed program was:" >&5
5736   cat conftest.$ac_ext >&5
5737   rm -rf conftest*
5738   eval "ac_cv_lib_$ac_lib_var=no"
5739 fi
5740 rm -f conftest*
5741 xe_check_libs=""
5742
5743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5744   echo "$ac_t""yes" 1>&6
5745   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
5746 else
5747   echo "$ac_t""no" 1>&6
5748 fi
5749
5750
5751
5752     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
5753         if test "$GCC" = "yes"; then
5754       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
5755       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
5756     else
5757       case "$CC" in
5758         "xlc" ) CC="xlc_r" ;;
5759         "xlC" ) CC="xlC_r" ;;
5760         "cc"  ) CC="cc_r" ;;
5761       esac
5762     fi
5763   fi
5764
5765 fi 
5766 if test "$with_msw" != "no"; then
5767   echo "checking for MS-Windows" 1>&6
5768 echo "configure:5769: checking for MS-Windows" >&5
5769   
5770 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
5771 echo "configure:5772: checking for main in -lgdi32" >&5
5772 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
5773
5774 xe_check_libs=" -lgdi32 "
5775 cat > conftest.$ac_ext <<EOF
5776 #line 5777 "configure"
5777 #include "confdefs.h"
5778
5779 int main() {
5780 main()
5781 ; return 0; }
5782 EOF
5783 if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5784   rm -rf conftest*
5785   eval "ac_cv_lib_$ac_lib_var=yes"
5786 else
5787   echo "configure: failed program was:" >&5
5788   cat conftest.$ac_ext >&5
5789   rm -rf conftest*
5790   eval "ac_cv_lib_$ac_lib_var=no"
5791 fi
5792 rm -f conftest*
5793 xe_check_libs=""
5794
5795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5796   echo "$ac_t""yes" 1>&6
5797   with_msw=yes
5798 else
5799   echo "$ac_t""no" 1>&6
5800 fi
5801
5802
5803   if test "$with_msw" = "yes"; then
5804     { test "$extra_verbose" = "yes" && cat << \EOF
5805     Defining HAVE_MS_WINDOWS
5806 EOF
5807 cat >> confdefs.h <<\EOF
5808 #define HAVE_MS_WINDOWS 1
5809 EOF
5810 }
5811
5812     install_pp="$blddir/lib-src/installexe.sh"
5813     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
5814     if test "$window_system" != x11; then
5815         window_system=msw
5816         test "$with_scrollbars" != "no" && with_scrollbars=msw \
5817             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5818    echo "    xemacs will be linked with \"scrollbar-msw.o\""
5819  fi
5820         test "$with_menubars"   != "no" && with_menubars=msw \
5821             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5822    echo "    xemacs will be linked with \"menubar-msw.o\""
5823  fi
5824         test "$with_toolbars"   != "no" && with_toolbars=msw \
5825             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5826    echo "    xemacs will be linked with \"toolbar-msw.o\""
5827  fi
5828         test "$with_dialogs"   != "no" && with_dialogs=msw \
5829             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
5830    echo "    xemacs will be linked with \"dialog-msw.o\""
5831  fi
5832     else
5833         test "$with_scrollbars"   != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5834    echo "    xemacs will be linked with \"scrollbar-msw.o\""
5835  fi
5836         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5837    echo "    xemacs will be linked with \"menubar-msw.o\""
5838  fi
5839         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5840    echo "    xemacs will be linked with \"toolbar-msw.o\""
5841  fi
5842         test "$with_dialogs"   != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
5843    echo "    xemacs will be linked with \"dialog-msw.o\""
5844  fi
5845     fi
5846         cat > conftest.$ac_ext <<EOF
5847 #line 5848 "configure"
5848 #include "confdefs.h"
5849 #include <fcntl.h>
5850     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
5851 EOF
5852 if { (eval echo configure:5853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
5853 then
5854   { test "$extra_verbose" = "yes" && cat << \EOF
5855     Defining HAVE_MSG_SELECT
5856 EOF
5857 cat >> confdefs.h <<\EOF
5858 #define HAVE_MSG_SELECT 1
5859 EOF
5860 }
5861
5862 else
5863   echo "configure: failed program was:" >&5
5864   cat conftest.$ac_ext >&5
5865 fi
5866 rm -fr conftest*
5867     const_is_losing=no
5868     with_file_coding=yes
5869     use_minimal_tagbits=yes
5870     use_indexed_lrecord_implementation=yes
5871     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
5872    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\""
5873  fi
5874   fi
5875 fi
5876
5877
5878
5879 test -z "$window_system" && window_system="none"
5880
5881 if test "$window_system" = "none"; then
5882   for feature in menubars scrollbars toolbars dialogs dragndrop
5883   do
5884     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
5885        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
5886     fi
5887     eval "with_${feature}=no"
5888   done
5889 else
5890   test -z "$with_toolbars" && with_toolbars=yes
5891 fi
5892
5893 if test "$with_msw" != "yes"; then
5894   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
5895   do
5896     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
5897        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
5898     fi
5899     eval "with_${feature}=no"
5900   done
5901 else
5902   :
5903 fi
5904
5905 if test "$with_x11" != "yes"; then
5906             for feature in tooltalk cde offix session xim xmu \
5907                  xface
5908   do
5909     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
5910        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
5911     fi
5912     eval "with_${feature}=no"
5913   done
5914 fi
5915
5916 bitmapdir=
5917
5918 case "$window_system" in
5919   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
5920   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
5921   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
5922 esac
5923
5924 case "$x_libraries" in *X11R4* )
5925   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
5926   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
5927 esac
5928
5929 echo "checking for session-management option" 1>&6
5930 echo "configure:5931: checking for session-management option" >&5;
5931 if test "$with_session" != "no"; then
5932   { test "$extra_verbose" = "yes" && cat << \EOF
5933     Defining HAVE_SESSION
5934 EOF
5935 cat >> confdefs.h <<\EOF
5936 #define HAVE_SESSION 1
5937 EOF
5938 }
5939
5940 fi
5941
5942 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
5943 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
5944 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
5945 echo "configure:5946: checking for X11/Xauth.h" >&5
5946
5947 cat > conftest.$ac_ext <<EOF
5948 #line 5949 "configure"
5949 #include "confdefs.h"
5950 #include <X11/Xauth.h>
5951 EOF
5952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5953 { (eval echo configure:5954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5954 ac_err=`grep -v '^ *+' conftest.out`
5955 if test -z "$ac_err"; then
5956   rm -rf conftest*
5957   eval "ac_cv_header_$ac_safe=yes"
5958 else
5959   echo "$ac_err" >&5
5960   echo "configure: failed program was:" >&5
5961   cat conftest.$ac_ext >&5
5962   rm -rf conftest*
5963   eval "ac_cv_header_$ac_safe=no"
5964 fi
5965 rm -f conftest*
5966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5967   echo "$ac_t""yes" 1>&6
5968   :
5969 else
5970   echo "$ac_t""no" 1>&6
5971 with_xauth=no
5972 fi
5973  }
5974 test -z "$with_xauth" && { 
5975 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
5976 echo "configure:5977: checking for XauGetAuthByAddr in -lXau" >&5
5977 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
5978
5979 xe_check_libs=" -lXau "
5980 cat > conftest.$ac_ext <<EOF
5981 #line 5982 "configure"
5982 #include "confdefs.h"
5983 /* Override any gcc2 internal prototype to avoid an error.  */
5984 /* We use char because int might match the return type of a gcc2
5985     builtin and then its argument prototype would still apply.  */
5986 char XauGetAuthByAddr();
5987
5988 int main() {
5989 XauGetAuthByAddr()
5990 ; return 0; }
5991 EOF
5992 if { (eval echo configure:5993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5993   rm -rf conftest*
5994   eval "ac_cv_lib_$ac_lib_var=yes"
5995 else
5996   echo "configure: failed program was:" >&5
5997   cat conftest.$ac_ext >&5
5998   rm -rf conftest*
5999   eval "ac_cv_lib_$ac_lib_var=no"
6000 fi
6001 rm -f conftest*
6002 xe_check_libs=""
6003
6004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6005   echo "$ac_t""yes" 1>&6
6006   :
6007 else
6008   echo "$ac_t""no" 1>&6
6009 with_xauth=no
6010 fi
6011
6012  }
6013 test -z "$with_xauth" && with_xauth=yes
6014 if test "$with_xauth" = "yes"; then
6015   { test "$extra_verbose" = "yes" && cat << \EOF
6016     Defining HAVE_XAUTH
6017 EOF
6018 cat >> confdefs.h <<\EOF
6019 #define HAVE_XAUTH 1
6020 EOF
6021 }
6022
6023   
6024 T=""
6025 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
6026 libs_xauth="$T"
6027
6028 fi
6029
6030
6031
6032
6033 if test "$with_tooltalk" != "no" ; then
6034       for dir in "" "Tt/" "desktop/" ; do
6035     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6036 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6037 echo "configure:6038: checking for ${dir}tt_c.h" >&5
6038
6039 cat > conftest.$ac_ext <<EOF
6040 #line 6041 "configure"
6041 #include "confdefs.h"
6042 #include <${dir}tt_c.h>
6043 EOF
6044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6045 { (eval echo configure:6046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6046 ac_err=`grep -v '^ *+' conftest.out`
6047 if test -z "$ac_err"; then
6048   rm -rf conftest*
6049   eval "ac_cv_header_$ac_safe=yes"
6050 else
6051   echo "$ac_err" >&5
6052   echo "configure: failed program was:" >&5
6053   cat conftest.$ac_ext >&5
6054   rm -rf conftest*
6055   eval "ac_cv_header_$ac_safe=no"
6056 fi
6057 rm -f conftest*
6058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6059   echo "$ac_t""yes" 1>&6
6060   tt_c_h_path="${dir}tt_c.h"; break
6061 else
6062   echo "$ac_t""no" 1>&6
6063 fi
6064
6065   done
6066   if test -z "$tt_c_h_path"; then
6067     if test "$with_tooltalk" = "yes"; then
6068       (echo "$progname: Usage error:"
6069 echo " " "Unable to find required tooltalk header files."
6070 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6071     fi
6072     with_tooltalk=no
6073   fi
6074 fi
6075 if test "$with_tooltalk" != "no" ; then
6076   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6077     
6078 xe_msg_checking="for tt_message_create in -ltt"
6079 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6080 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6081 echo "configure:6082: checking "$xe_msg_checking"" >&5
6082 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6083
6084 xe_check_libs=" -ltt $extra_libs"
6085 cat > conftest.$ac_ext <<EOF
6086 #line 6087 "configure"
6087 #include "confdefs.h"
6088 /* Override any gcc2 internal prototype to avoid an error.  */
6089 /* We use char because int might match the return type of a gcc2
6090     builtin and then its argument prototype would still apply.  */
6091 char tt_message_create();
6092
6093 int main() {
6094 tt_message_create()
6095 ; return 0; }
6096 EOF
6097 if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6098   rm -rf conftest*
6099   eval "ac_cv_lib_$ac_lib_var=yes"
6100 else
6101   echo "configure: failed program was:" >&5
6102   cat conftest.$ac_ext >&5
6103   rm -rf conftest*
6104   eval "ac_cv_lib_$ac_lib_var=no"
6105 fi
6106 rm -f conftest*
6107 xe_check_libs=""
6108
6109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6110   echo "$ac_t""yes" 1>&6
6111   tt_libs="-ltt $extra_libs"; break
6112 else
6113   echo "$ac_t""no" 1>&6
6114 :
6115 fi
6116
6117
6118   done
6119   if test -z "$tt_libs"; then
6120     if test "$with_tooltalk" = "yes"; then
6121       (echo "$progname: Usage error:"
6122 echo " " "Unable to find required tooltalk libraries."
6123 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6124     fi
6125     with_tooltalk=no
6126   fi
6127 fi
6128 test -z "$with_tooltalk" && with_tooltalk=yes
6129 if test "$with_tooltalk" = "yes"; then
6130   { test "$extra_verbose" = "yes" && cat << \EOF
6131     Defining TOOLTALK
6132 EOF
6133 cat >> confdefs.h <<\EOF
6134 #define TOOLTALK 1
6135 EOF
6136 }
6137
6138   { test "$extra_verbose" = "yes" && cat << EOF
6139     Defining TT_C_H_PATH = "$tt_c_h_path"
6140 EOF
6141 cat >> confdefs.h <<EOF
6142 #define TT_C_H_PATH "$tt_c_h_path"
6143 EOF
6144 }
6145
6146   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6147   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6148    echo "    xemacs will be linked with \"tooltalk.o\""
6149  fi
6150 fi
6151
6152 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6153 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6154 echo "configure:6155: checking for Dt/Dt.h" >&5
6155
6156 cat > conftest.$ac_ext <<EOF
6157 #line 6158 "configure"
6158 #include "confdefs.h"
6159 #include <Dt/Dt.h>
6160 EOF
6161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6162 { (eval echo configure:6163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6163 ac_err=`grep -v '^ *+' conftest.out`
6164 if test -z "$ac_err"; then
6165   rm -rf conftest*
6166   eval "ac_cv_header_$ac_safe=yes"
6167 else
6168   echo "$ac_err" >&5
6169   echo "configure: failed program was:" >&5
6170   cat conftest.$ac_ext >&5
6171   rm -rf conftest*
6172   eval "ac_cv_header_$ac_safe=no"
6173 fi
6174 rm -f conftest*
6175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6176   echo "$ac_t""yes" 1>&6
6177   :
6178 else
6179   echo "$ac_t""no" 1>&6
6180 with_cde=no
6181 fi
6182  }
6183 test -z "$with_cde" && { 
6184 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6185 echo "configure:6186: checking for DtDndDragStart in -lDtSvc" >&5
6186 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6187
6188 xe_check_libs=" -lDtSvc "
6189 cat > conftest.$ac_ext <<EOF
6190 #line 6191 "configure"
6191 #include "confdefs.h"
6192 /* Override any gcc2 internal prototype to avoid an error.  */
6193 /* We use char because int might match the return type of a gcc2
6194     builtin and then its argument prototype would still apply.  */
6195 char DtDndDragStart();
6196
6197 int main() {
6198 DtDndDragStart()
6199 ; return 0; }
6200 EOF
6201 if { (eval echo configure:6202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6202   rm -rf conftest*
6203   eval "ac_cv_lib_$ac_lib_var=yes"
6204 else
6205   echo "configure: failed program was:" >&5
6206   cat conftest.$ac_ext >&5
6207   rm -rf conftest*
6208   eval "ac_cv_lib_$ac_lib_var=no"
6209 fi
6210 rm -f conftest*
6211 xe_check_libs=""
6212
6213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6214   echo "$ac_t""yes" 1>&6
6215   :
6216 else
6217   echo "$ac_t""no" 1>&6
6218 with_cde=no
6219 fi
6220
6221  }
6222 test -z "$with_cde" && with_cde=yes
6223 if test "$with_dragndrop" = no; then
6224   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6225   with_cde=no
6226 fi
6227 if test "$with_cde" = "yes" ; then
6228   { test "$extra_verbose" = "yes" && cat << \EOF
6229     Defining HAVE_CDE
6230 EOF
6231 cat >> confdefs.h <<\EOF
6232 #define HAVE_CDE 1
6233 EOF
6234 }
6235
6236   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6237   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6238   with_tooltalk=yes # CDE requires Tooltalk
6239   need_motif=yes    # CDE requires Motif
6240 fi
6241
6242 test "$window_system" != "x11" && with_offix=no
6243 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6244   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6245   with_offix=no
6246 fi
6247 if test "$with_dragndrop" = no; then
6248   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6249   with_offix=no
6250 fi
6251 if test "$with_cde" = yes; then
6252   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6253   with_offix=no
6254 fi
6255 test -z "$with_offix" && with_offix=no
6256 if test "$with_offix" = "yes"; then
6257   { test "$extra_verbose" = "yes" && cat << \EOF
6258     Defining HAVE_OFFIX_DND
6259 EOF
6260 cat >> confdefs.h <<\EOF
6261 #define HAVE_OFFIX_DND 1
6262 EOF
6263 }
6264
6265   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6266   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6267 fi
6268
6269 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6270 echo "configure:6271: checking if drag and drop API is needed" >&5
6271 if test "$with_dragndrop" != "no" ; then
6272   if test -n "$dragndrop_proto" ; then
6273     with_dragndrop=yes
6274     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6275     { test "$extra_verbose" = "yes" && cat << \EOF
6276     Defining HAVE_DRAGNDROP
6277 EOF
6278 cat >> confdefs.h <<\EOF
6279 #define HAVE_DRAGNDROP 1
6280 EOF
6281 }
6282
6283     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6284   else
6285     with_dragndrop=no
6286     echo "$ac_t""no" 1>&6
6287   fi
6288 fi
6289
6290 echo "checking for LDAP" 1>&6
6291 echo "configure:6292: checking for LDAP" >&5
6292 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6293 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6294 echo "configure:6295: checking for ldap.h" >&5
6295
6296 cat > conftest.$ac_ext <<EOF
6297 #line 6298 "configure"
6298 #include "confdefs.h"
6299 #include <ldap.h>
6300 EOF
6301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6302 { (eval echo configure:6303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6303 ac_err=`grep -v '^ *+' conftest.out`
6304 if test -z "$ac_err"; then
6305   rm -rf conftest*
6306   eval "ac_cv_header_$ac_safe=yes"
6307 else
6308   echo "$ac_err" >&5
6309   echo "configure: failed program was:" >&5
6310   cat conftest.$ac_ext >&5
6311   rm -rf conftest*
6312   eval "ac_cv_header_$ac_safe=no"
6313 fi
6314 rm -f conftest*
6315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6316   echo "$ac_t""yes" 1>&6
6317   :
6318 else
6319   echo "$ac_t""no" 1>&6
6320 with_ldap=no
6321 fi
6322  }
6323 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6324 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6325 echo "configure:6326: checking for lber.h" >&5
6326
6327 cat > conftest.$ac_ext <<EOF
6328 #line 6329 "configure"
6329 #include "confdefs.h"
6330 #include <lber.h>
6331 EOF
6332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6333 { (eval echo configure:6334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6334 ac_err=`grep -v '^ *+' conftest.out`
6335 if test -z "$ac_err"; then
6336   rm -rf conftest*
6337   eval "ac_cv_header_$ac_safe=yes"
6338 else
6339   echo "$ac_err" >&5
6340   echo "configure: failed program was:" >&5
6341   cat conftest.$ac_ext >&5
6342   rm -rf conftest*
6343   eval "ac_cv_header_$ac_safe=no"
6344 fi
6345 rm -f conftest*
6346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6347   echo "$ac_t""yes" 1>&6
6348   :
6349 else
6350   echo "$ac_t""no" 1>&6
6351 with_ldap=no
6352 fi
6353  }
6354 if test "$with_ldap" != "no"; then
6355   test -z "$with_umich_ldap" && { 
6356 xe_msg_checking="for ldap_open in -lldap"
6357 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6358 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6359 echo "configure:6360: checking "$xe_msg_checking"" >&5
6360 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6361
6362 xe_check_libs=" -lldap -llber"
6363 cat > conftest.$ac_ext <<EOF
6364 #line 6365 "configure"
6365 #include "confdefs.h"
6366 /* Override any gcc2 internal prototype to avoid an error.  */
6367 /* We use char because int might match the return type of a gcc2
6368     builtin and then its argument prototype would still apply.  */
6369 char ldap_open();
6370
6371 int main() {
6372 ldap_open()
6373 ; return 0; }
6374 EOF
6375 if { (eval echo configure:6376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6376   rm -rf conftest*
6377   eval "ac_cv_lib_$ac_lib_var=yes"
6378 else
6379   echo "configure: failed program was:" >&5
6380   cat conftest.$ac_ext >&5
6381   rm -rf conftest*
6382   eval "ac_cv_lib_$ac_lib_var=no"
6383 fi
6384 rm -f conftest*
6385 xe_check_libs=""
6386
6387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6388   echo "$ac_t""yes" 1>&6
6389   with_umich_ldap=yes
6390 else
6391   echo "$ac_t""no" 1>&6
6392 with_umich_ldap=no
6393 fi
6394
6395  }
6396   test "$with_umich_ldap" = "no" && { 
6397 echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6
6398 echo "configure:6399: checking for ldap_set_option in -lldap10" >&5
6399 ac_lib_var=`echo ldap10'_'ldap_set_option | sed 'y%./+-%__p_%'`
6400
6401 xe_check_libs=" -lldap10 "
6402 cat > conftest.$ac_ext <<EOF
6403 #line 6404 "configure"
6404 #include "confdefs.h"
6405 /* Override any gcc2 internal prototype to avoid an error.  */
6406 /* We use char because int might match the return type of a gcc2
6407     builtin and then its argument prototype would still apply.  */
6408 char ldap_set_option();
6409
6410 int main() {
6411 ldap_set_option()
6412 ; return 0; }
6413 EOF
6414 if { (eval echo configure:6415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6415   rm -rf conftest*
6416   eval "ac_cv_lib_$ac_lib_var=yes"
6417 else
6418   echo "configure: failed program was:" >&5
6419   cat conftest.$ac_ext >&5
6420   rm -rf conftest*
6421   eval "ac_cv_lib_$ac_lib_var=no"
6422 fi
6423 rm -f conftest*
6424 xe_check_libs=""
6425
6426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6427   echo "$ac_t""yes" 1>&6
6428   with_ns_ldap=yes
6429 else
6430   echo "$ac_t""no" 1>&6
6431 with_ns_ldap=no
6432 fi
6433
6434  }
6435   test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes
6436 fi
6437 if test "$with_ldap" = "yes"; then
6438   { test "$extra_verbose" = "yes" && cat << \EOF
6439     Defining HAVE_LDAP
6440 EOF
6441 cat >> confdefs.h <<\EOF
6442 #define HAVE_LDAP 1
6443 EOF
6444 }
6445
6446   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6447    echo "    xemacs will be linked with \"eldap.o\""
6448  fi
6449   if test "$with_umich_ldap" = "yes" ; then
6450     { test "$extra_verbose" = "yes" && cat << \EOF
6451     Defining HAVE_UMICH_LDAP
6452 EOF
6453 cat >> confdefs.h <<\EOF
6454 #define HAVE_UMICH_LDAP 1
6455 EOF
6456 }
6457
6458     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6459     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6460   elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then
6461     { test "$extra_verbose" = "yes" && cat << \EOF
6462     Defining HAVE_NS_LDAP
6463 EOF
6464 cat >> confdefs.h <<\EOF
6465 #define HAVE_NS_LDAP 1
6466 EOF
6467 }
6468
6469     LIBS="-lldap10 $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap10\" to \$LIBS"; fi
6470   elif test "$with_ldap" = "yes" ; then
6471     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6472   fi
6473 fi
6474
6475
6476 if test "$window_system" != "none"; then
6477   echo "checking for graphics libraries" 1>&6
6478 echo "configure:6479: checking for graphics libraries" >&5
6479
6480     if test -z "$with_xpm"; then
6481     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6482 echo "configure:6483: checking for Xpm - no older than 3.4f" >&5
6483     xe_check_libs=-lXpm
6484     cat > conftest.$ac_ext <<EOF
6485 #line 6486 "configure"
6486 #include "confdefs.h"
6487 #include <X11/xpm.h>
6488     int main(int c, char **v) {
6489     return c == 1 ? 0 :
6490       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6491       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6492 EOF
6493 if { (eval echo configure:6494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
6494 then
6495   ./conftest dummy_arg; xpm_status=$?;
6496       if test "$?" = "0"; then
6497         with_xpm=yes;
6498       else
6499         with_xpm=no;
6500         if test "$?" = "1"; then
6501           xpm_problem="Xpm library version and header file version don't match!"
6502         elif test "$?" = "2"; then
6503           xpm_problem="Xpm library version is too old!"
6504         else
6505           xpm_problem="Internal xpm detection logic error!"
6506         fi
6507         echo "
6508 *** WARNING *** $problem
6509   I'm not touching that with a 10-foot pole!
6510   If you really want to use the installed version of Xpm, rerun
6511   configure --with-xpm=yes, but don't blame me if XEmacs crashes!"
6512     fi
6513 else
6514   echo "configure: failed program was:" >&5
6515   cat conftest.$ac_ext >&5
6516   rm -fr conftest*
6517   with_xpm=no
6518 fi
6519 rm -fr conftest*
6520     xe_check_libs=
6521     echo "$ac_t""$with_xpm" 1>&6
6522   fi
6523   if test "$with_xpm" = "yes"; then
6524     { test "$extra_verbose" = "yes" && cat << \EOF
6525     Defining HAVE_XPM
6526 EOF
6527 cat >> confdefs.h <<\EOF
6528 #define HAVE_XPM 1
6529 EOF
6530 }
6531
6532     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6533     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6534 echo "configure:6535: checking for \"FOR_MSW\" xpm" >&5
6535     xe_check_libs=-lXpm
6536     cat > conftest.$ac_ext <<EOF
6537 #line 6538 "configure"
6538 #include "confdefs.h"
6539
6540 int main() {
6541 XpmCreatePixmapFromData()
6542 ; return 0; }
6543 EOF
6544 if { (eval echo configure:6545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6545   rm -rf conftest*
6546   xpm_for_msw=no
6547 else
6548   echo "configure: failed program was:" >&5
6549   cat conftest.$ac_ext >&5
6550   rm -rf conftest*
6551   xpm_for_msw=yes
6552 fi
6553 rm -f conftest*
6554     xe_check_libs=
6555     echo "$ac_t""$xpm_for_msw" 1>&6
6556     if test "$xpm_for_msw" = "yes"; then
6557       { test "$extra_verbose" = "yes" && cat << \EOF
6558     Defining FOR_MSW
6559 EOF
6560 cat >> confdefs.h <<\EOF
6561 #define FOR_MSW 1
6562 EOF
6563 }
6564
6565     fi
6566   fi
6567
6568       if test "$with_png $with_tiff" != "no no"; then
6569     
6570 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
6571 echo "configure:6572: checking for inflate in -lc" >&5
6572 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
6573
6574 xe_check_libs=" -lc "
6575 cat > conftest.$ac_ext <<EOF
6576 #line 6577 "configure"
6577 #include "confdefs.h"
6578 /* Override any gcc2 internal prototype to avoid an error.  */
6579 /* We use char because int might match the return type of a gcc2
6580     builtin and then its argument prototype would still apply.  */
6581 char inflate();
6582
6583 int main() {
6584 inflate()
6585 ; return 0; }
6586 EOF
6587 if { (eval echo configure:6588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6588   rm -rf conftest*
6589   eval "ac_cv_lib_$ac_lib_var=yes"
6590 else
6591   echo "configure: failed program was:" >&5
6592   cat conftest.$ac_ext >&5
6593   rm -rf conftest*
6594   eval "ac_cv_lib_$ac_lib_var=no"
6595 fi
6596 rm -f conftest*
6597 xe_check_libs=""
6598
6599 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6600   echo "$ac_t""yes" 1>&6
6601   :
6602 else
6603   echo "$ac_t""no" 1>&6
6604
6605 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
6606 echo "configure:6607: checking for inflate in -lz" >&5
6607 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
6608
6609 xe_check_libs=" -lz "
6610 cat > conftest.$ac_ext <<EOF
6611 #line 6612 "configure"
6612 #include "confdefs.h"
6613 /* Override any gcc2 internal prototype to avoid an error.  */
6614 /* We use char because int might match the return type of a gcc2
6615     builtin and then its argument prototype would still apply.  */
6616 char inflate();
6617
6618 int main() {
6619 inflate()
6620 ; return 0; }
6621 EOF
6622 if { (eval echo configure:6623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6623   rm -rf conftest*
6624   eval "ac_cv_lib_$ac_lib_var=yes"
6625 else
6626   echo "configure: failed program was:" >&5
6627   cat conftest.$ac_ext >&5
6628   rm -rf conftest*
6629   eval "ac_cv_lib_$ac_lib_var=no"
6630 fi
6631 rm -f conftest*
6632 xe_check_libs=""
6633
6634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6635   echo "$ac_t""yes" 1>&6
6636   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
6637 else
6638   echo "$ac_t""no" 1>&6
6639
6640 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
6641 echo "configure:6642: checking for inflate in -lgz" >&5
6642 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
6643
6644 xe_check_libs=" -lgz "
6645 cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648 /* Override any gcc2 internal prototype to avoid an error.  */
6649 /* We use char because int might match the return type of a gcc2
6650     builtin and then its argument prototype would still apply.  */
6651 char inflate();
6652
6653 int main() {
6654 inflate()
6655 ; return 0; }
6656 EOF
6657 if { (eval echo configure:6658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6658   rm -rf conftest*
6659   eval "ac_cv_lib_$ac_lib_var=yes"
6660 else
6661   echo "configure: failed program was:" >&5
6662   cat conftest.$ac_ext >&5
6663   rm -rf conftest*
6664   eval "ac_cv_lib_$ac_lib_var=no"
6665 fi
6666 rm -f conftest*
6667 xe_check_libs=""
6668
6669 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6670   echo "$ac_t""yes" 1>&6
6671   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
6672 else
6673   echo "$ac_t""no" 1>&6
6674 fi
6675
6676
6677 fi
6678
6679
6680 fi
6681
6682
6683   fi
6684
6685     echo $ac_n "checking for gifreader""... $ac_c" 1>&6
6686 echo "configure:6687: checking for gifreader" >&5
6687   test -z "$with_gif" && { ac_safe=`echo "gifrlib.h" | sed 'y%./+-%__p_%'`
6688 echo $ac_n "checking for gifrlib.h""... $ac_c" 1>&6
6689 echo "configure:6690: checking for gifrlib.h" >&5
6690
6691 cat > conftest.$ac_ext <<EOF
6692 #line 6693 "configure"
6693 #include "confdefs.h"
6694 #include <gifrlib.h>
6695 EOF
6696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6697 { (eval echo configure:6698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6698 ac_err=`grep -v '^ *+' conftest.out`
6699 if test -z "$ac_err"; then
6700   rm -rf conftest*
6701   eval "ac_cv_header_$ac_safe=yes"
6702 else
6703   echo "$ac_err" >&5
6704   echo "configure: failed program was:" >&5
6705   cat conftest.$ac_ext >&5
6706   rm -rf conftest*
6707   eval "ac_cv_header_$ac_safe=no"
6708 fi
6709 rm -f conftest*
6710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6711   echo "$ac_t""yes" 1>&6
6712   :
6713 else
6714   echo "$ac_t""no" 1>&6
6715 with_gif=no
6716 fi
6717  }
6718   test -z "$with_gif" && { 
6719 echo $ac_n "checking for GetGifError in -lgifreader""... $ac_c" 1>&6
6720 echo "configure:6721: checking for GetGifError in -lgifreader" >&5
6721 ac_lib_var=`echo gifreader'_'GetGifError | sed 'y%./+-%__p_%'`
6722
6723 xe_check_libs=" -lgifreader "
6724 cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 /* Override any gcc2 internal prototype to avoid an error.  */
6728 /* We use char because int might match the return type of a gcc2
6729     builtin and then its argument prototype would still apply.  */
6730 char GetGifError();
6731
6732 int main() {
6733 GetGifError()
6734 ; return 0; }
6735 EOF
6736 if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6737   rm -rf conftest*
6738   eval "ac_cv_lib_$ac_lib_var=yes"
6739 else
6740   echo "configure: failed program was:" >&5
6741   cat conftest.$ac_ext >&5
6742   rm -rf conftest*
6743   eval "ac_cv_lib_$ac_lib_var=no"
6744 fi
6745 rm -f conftest*
6746 xe_check_libs=""
6747
6748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6749   echo "$ac_t""yes" 1>&6
6750   : 
6751 else
6752   echo "$ac_t""no" 1>&6
6753 with_gif=no
6754 fi
6755
6756  }
6757   test -z "$with_gif" && with_gif=yes
6758   if test "$with_gif" = "yes"; then
6759     { test "$extra_verbose" = "yes" && cat << \EOF
6760     Defining HAVE_GIF
6761 EOF
6762 cat >> confdefs.h <<\EOF
6763 #define HAVE_GIF 1
6764 EOF
6765 }
6766
6767     libs_x="-lgifreader $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgifreader\" to \$libs_x"; fi
6768   fi
6769
6770     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
6771 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
6772 echo "configure:6773: checking for jpeglib.h" >&5
6773
6774 cat > conftest.$ac_ext <<EOF
6775 #line 6776 "configure"
6776 #include "confdefs.h"
6777 #include <jpeglib.h>
6778 EOF
6779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6780 { (eval echo configure:6781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6781 ac_err=`grep -v '^ *+' conftest.out`
6782 if test -z "$ac_err"; then
6783   rm -rf conftest*
6784   eval "ac_cv_header_$ac_safe=yes"
6785 else
6786   echo "$ac_err" >&5
6787   echo "configure: failed program was:" >&5
6788   cat conftest.$ac_ext >&5
6789   rm -rf conftest*
6790   eval "ac_cv_header_$ac_safe=no"
6791 fi
6792 rm -f conftest*
6793 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6794   echo "$ac_t""yes" 1>&6
6795   :
6796 else
6797   echo "$ac_t""no" 1>&6
6798 with_jpeg=no
6799 fi
6800  }
6801   test -z "$with_jpeg" && { 
6802 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
6803 echo "configure:6804: checking for jpeg_destroy_decompress in -ljpeg" >&5
6804 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
6805
6806 xe_check_libs=" -ljpeg "
6807 cat > conftest.$ac_ext <<EOF
6808 #line 6809 "configure"
6809 #include "confdefs.h"
6810 /* Override any gcc2 internal prototype to avoid an error.  */
6811 /* We use char because int might match the return type of a gcc2
6812     builtin and then its argument prototype would still apply.  */
6813 char jpeg_destroy_decompress();
6814
6815 int main() {
6816 jpeg_destroy_decompress()
6817 ; return 0; }
6818 EOF
6819 if { (eval echo configure:6820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6820   rm -rf conftest*
6821   eval "ac_cv_lib_$ac_lib_var=yes"
6822 else
6823   echo "configure: failed program was:" >&5
6824   cat conftest.$ac_ext >&5
6825   rm -rf conftest*
6826   eval "ac_cv_lib_$ac_lib_var=no"
6827 fi
6828 rm -f conftest*
6829 xe_check_libs=""
6830
6831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6832   echo "$ac_t""yes" 1>&6
6833   :
6834 else
6835   echo "$ac_t""no" 1>&6
6836 with_jpeg=no
6837 fi
6838
6839  }
6840   test -z "$with_jpeg" && with_jpeg=yes
6841   if test "$with_jpeg" = "yes"; then
6842     { test "$extra_verbose" = "yes" && cat << \EOF
6843     Defining HAVE_JPEG
6844 EOF
6845 cat >> confdefs.h <<\EOF
6846 #define HAVE_JPEG 1
6847 EOF
6848 }
6849
6850     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
6851   fi
6852
6853     if test -z "$with_png"; then
6854     echo $ac_n "checking for png.h - no older than 0.96""... $ac_c" 1>&6
6855 echo "configure:6856: checking for png.h - no older than 0.96" >&5
6856     cat > conftest.$ac_ext <<EOF
6857 #line 6858 "configure"
6858 #include "confdefs.h"
6859 #include <png.h>
6860 #if PNG_LIBPNG_VER >= 96
6861 yes
6862 #endif
6863
6864 EOF
6865 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6866   egrep "yes" >/dev/null 2>&1; then
6867   rm -rf conftest*
6868   echo "$ac_t""yes" 1>&6
6869 else
6870   rm -rf conftest*
6871   echo "$ac_t""no" 1>&6; with_png=no
6872 fi
6873 rm -f conftest*
6874
6875   fi
6876   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
6877 echo "configure:6878: checking for pow" >&5
6878
6879 cat > conftest.$ac_ext <<EOF
6880 #line 6881 "configure"
6881 #include "confdefs.h"
6882 /* System header to define __stub macros and hopefully few prototypes,
6883     which can conflict with char pow(); below.  */
6884 #include <assert.h>
6885 /* Override any gcc2 internal prototype to avoid an error.  */
6886 /* We use char because int might match the return type of a gcc2
6887     builtin and then its argument prototype would still apply.  */
6888 char pow();
6889
6890 int main() {
6891
6892 /* The GNU C library defines this for functions which it implements
6893     to always fail with ENOSYS.  Some functions are actually named
6894     something starting with __ and the normal name is an alias.  */
6895 #if defined (__stub_pow) || defined (__stub___pow)
6896 choke me
6897 #else
6898 pow();
6899 #endif
6900
6901 ; return 0; }
6902 EOF
6903 if { (eval echo configure:6904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6904   rm -rf conftest*
6905   eval "ac_cv_func_pow=yes"
6906 else
6907   echo "configure: failed program was:" >&5
6908   cat conftest.$ac_ext >&5
6909   rm -rf conftest*
6910   eval "ac_cv_func_pow=no"
6911 fi
6912 rm -f conftest*
6913
6914 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
6915   echo "$ac_t""yes" 1>&6
6916   :
6917 else
6918   echo "$ac_t""no" 1>&6
6919 with_png=no
6920 fi
6921  }
6922   test -z "$with_png" && { 
6923 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
6924 echo "configure:6925: checking for png_read_image in -lpng" >&5
6925 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
6926
6927 xe_check_libs=" -lpng "
6928 cat > conftest.$ac_ext <<EOF
6929 #line 6930 "configure"
6930 #include "confdefs.h"
6931 /* Override any gcc2 internal prototype to avoid an error.  */
6932 /* We use char because int might match the return type of a gcc2
6933     builtin and then its argument prototype would still apply.  */
6934 char png_read_image();
6935
6936 int main() {
6937 png_read_image()
6938 ; return 0; }
6939 EOF
6940 if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6941   rm -rf conftest*
6942   eval "ac_cv_lib_$ac_lib_var=yes"
6943 else
6944   echo "configure: failed program was:" >&5
6945   cat conftest.$ac_ext >&5
6946   rm -rf conftest*
6947   eval "ac_cv_lib_$ac_lib_var=no"
6948 fi
6949 rm -f conftest*
6950 xe_check_libs=""
6951
6952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6953   echo "$ac_t""yes" 1>&6
6954   :
6955 else
6956   echo "$ac_t""no" 1>&6
6957 with_png=no
6958 fi
6959
6960  }
6961   test -z "$with_png" && with_png=yes
6962   if test "$with_png" = "yes"; then
6963     { test "$extra_verbose" = "yes" && cat << \EOF
6964     Defining HAVE_PNG
6965 EOF
6966 cat >> confdefs.h <<\EOF
6967 #define HAVE_PNG 1
6968 EOF
6969 }
6970
6971     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
6972   fi
6973
6974     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
6975 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
6976 echo "configure:6977: checking for tiffio.h" >&5
6977
6978 cat > conftest.$ac_ext <<EOF
6979 #line 6980 "configure"
6980 #include "confdefs.h"
6981 #include <tiffio.h>
6982 EOF
6983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6984 { (eval echo configure:6985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6985 ac_err=`grep -v '^ *+' conftest.out`
6986 if test -z "$ac_err"; then
6987   rm -rf conftest*
6988   eval "ac_cv_header_$ac_safe=yes"
6989 else
6990   echo "$ac_err" >&5
6991   echo "configure: failed program was:" >&5
6992   cat conftest.$ac_ext >&5
6993   rm -rf conftest*
6994   eval "ac_cv_header_$ac_safe=no"
6995 fi
6996 rm -f conftest*
6997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6998   echo "$ac_t""yes" 1>&6
6999   :
7000 else
7001   echo "$ac_t""no" 1>&6
7002 with_tiff=no
7003 fi
7004  }
7005   test -z "$with_tiff" && { 
7006 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7007 echo "configure:7008: checking for TIFFClientOpen in -ltiff" >&5
7008 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7009
7010 xe_check_libs=" -ltiff "
7011 cat > conftest.$ac_ext <<EOF
7012 #line 7013 "configure"
7013 #include "confdefs.h"
7014 /* Override any gcc2 internal prototype to avoid an error.  */
7015 /* We use char because int might match the return type of a gcc2
7016     builtin and then its argument prototype would still apply.  */
7017 char TIFFClientOpen();
7018
7019 int main() {
7020 TIFFClientOpen()
7021 ; return 0; }
7022 EOF
7023 if { (eval echo configure:7024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7024   rm -rf conftest*
7025   eval "ac_cv_lib_$ac_lib_var=yes"
7026 else
7027   echo "configure: failed program was:" >&5
7028   cat conftest.$ac_ext >&5
7029   rm -rf conftest*
7030   eval "ac_cv_lib_$ac_lib_var=no"
7031 fi
7032 rm -f conftest*
7033 xe_check_libs=""
7034
7035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7036   echo "$ac_t""yes" 1>&6
7037   :
7038 else
7039   echo "$ac_t""no" 1>&6
7040 with_tiff=no
7041 fi
7042
7043  }
7044   test -z "$with_tiff" && with_tiff=yes
7045   if test "$with_tiff" = "yes"; then
7046     { test "$extra_verbose" = "yes" && cat << \EOF
7047     Defining HAVE_TIFF
7048 EOF
7049 cat >> confdefs.h <<\EOF
7050 #define HAVE_TIFF 1
7051 EOF
7052 }
7053
7054     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7055   fi
7056 fi
7057
7058
7059 if test "$with_x11" = "yes"; then
7060
7061   echo "checking for X11 graphics libraries" 1>&6
7062 echo "configure:7063: checking for X11 graphics libraries" >&5
7063
7064     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7065 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7066 echo "configure:7067: checking for compface.h" >&5
7067
7068 cat > conftest.$ac_ext <<EOF
7069 #line 7070 "configure"
7070 #include "confdefs.h"
7071 #include <compface.h>
7072 EOF
7073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7074 { (eval echo configure:7075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7075 ac_err=`grep -v '^ *+' conftest.out`
7076 if test -z "$ac_err"; then
7077   rm -rf conftest*
7078   eval "ac_cv_header_$ac_safe=yes"
7079 else
7080   echo "$ac_err" >&5
7081   echo "configure: failed program was:" >&5
7082   cat conftest.$ac_ext >&5
7083   rm -rf conftest*
7084   eval "ac_cv_header_$ac_safe=no"
7085 fi
7086 rm -f conftest*
7087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7088   echo "$ac_t""yes" 1>&6
7089   :
7090 else
7091   echo "$ac_t""no" 1>&6
7092 with_xface=no
7093 fi
7094  }
7095   test -z "$with_xface" && { 
7096 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7097 echo "configure:7098: checking for UnGenFace in -lcompface" >&5
7098 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7099
7100 xe_check_libs=" -lcompface "
7101 cat > conftest.$ac_ext <<EOF
7102 #line 7103 "configure"
7103 #include "confdefs.h"
7104 /* Override any gcc2 internal prototype to avoid an error.  */
7105 /* We use char because int might match the return type of a gcc2
7106     builtin and then its argument prototype would still apply.  */
7107 char UnGenFace();
7108
7109 int main() {
7110 UnGenFace()
7111 ; return 0; }
7112 EOF
7113 if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7114   rm -rf conftest*
7115   eval "ac_cv_lib_$ac_lib_var=yes"
7116 else
7117   echo "configure: failed program was:" >&5
7118   cat conftest.$ac_ext >&5
7119   rm -rf conftest*
7120   eval "ac_cv_lib_$ac_lib_var=no"
7121 fi
7122 rm -f conftest*
7123 xe_check_libs=""
7124
7125 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7126   echo "$ac_t""yes" 1>&6
7127   : 
7128 else
7129   echo "$ac_t""no" 1>&6
7130 with_xface=no
7131 fi
7132
7133  }
7134   test -z "$with_xface" && with_xface=yes
7135   if test "$with_xface" = "yes"; then
7136     { test "$extra_verbose" = "yes" && cat << \EOF
7137     Defining HAVE_XFACE
7138 EOF
7139 cat >> confdefs.h <<\EOF
7140 #define HAVE_XFACE 1
7141 EOF
7142 }
7143
7144     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7145   fi
7146
7147     
7148 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
7149 echo "configure:7150: checking for XawScrollbarSetThumb in -lXaw" >&5
7150 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7151
7152 xe_check_libs=" -lXaw "
7153 cat > conftest.$ac_ext <<EOF
7154 #line 7155 "configure"
7155 #include "confdefs.h"
7156 /* Override any gcc2 internal prototype to avoid an error.  */
7157 /* We use char because int might match the return type of a gcc2
7158     builtin and then its argument prototype would still apply.  */
7159 char XawScrollbarSetThumb();
7160
7161 int main() {
7162 XawScrollbarSetThumb()
7163 ; return 0; }
7164 EOF
7165 if { (eval echo configure:7166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7166   rm -rf conftest*
7167   eval "ac_cv_lib_$ac_lib_var=yes"
7168 else
7169   echo "configure: failed program was:" >&5
7170   cat conftest.$ac_ext >&5
7171   rm -rf conftest*
7172   eval "ac_cv_lib_$ac_lib_var=no"
7173 fi
7174 rm -f conftest*
7175 xe_check_libs=""
7176
7177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7178   echo "$ac_t""yes" 1>&6
7179   have_xaw=yes
7180 else
7181   echo "$ac_t""no" 1>&6
7182 have_xaw=no
7183 fi
7184
7185
7186                     
7187     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7188 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7189 echo "configure:7190: checking for Xm/Xm.h" >&5
7190
7191 cat > conftest.$ac_ext <<EOF
7192 #line 7193 "configure"
7193 #include "confdefs.h"
7194 #include <Xm/Xm.h>
7195 EOF
7196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7197 { (eval echo configure:7198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7198 ac_err=`grep -v '^ *+' conftest.out`
7199 if test -z "$ac_err"; then
7200   rm -rf conftest*
7201   eval "ac_cv_header_$ac_safe=yes"
7202 else
7203   echo "$ac_err" >&5
7204   echo "configure: failed program was:" >&5
7205   cat conftest.$ac_ext >&5
7206   rm -rf conftest*
7207   eval "ac_cv_header_$ac_safe=no"
7208 fi
7209 rm -f conftest*
7210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7211   echo "$ac_t""yes" 1>&6
7212   
7213 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7214 echo "configure:7215: checking for XmStringFree in -lXm" >&5
7215 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7216
7217 xe_check_libs=" -lXm "
7218 cat > conftest.$ac_ext <<EOF
7219 #line 7220 "configure"
7220 #include "confdefs.h"
7221 /* Override any gcc2 internal prototype to avoid an error.  */
7222 /* We use char because int might match the return type of a gcc2
7223     builtin and then its argument prototype would still apply.  */
7224 char XmStringFree();
7225
7226 int main() {
7227 XmStringFree()
7228 ; return 0; }
7229 EOF
7230 if { (eval echo configure:7231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7231   rm -rf conftest*
7232   eval "ac_cv_lib_$ac_lib_var=yes"
7233 else
7234   echo "configure: failed program was:" >&5
7235   cat conftest.$ac_ext >&5
7236   rm -rf conftest*
7237   eval "ac_cv_lib_$ac_lib_var=no"
7238 fi
7239 rm -f conftest*
7240 xe_check_libs=""
7241
7242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7243   echo "$ac_t""yes" 1>&6
7244   have_motif=yes
7245 else
7246   echo "$ac_t""no" 1>&6
7247 have_motif=no
7248 fi
7249
7250
7251 else
7252   echo "$ac_t""no" 1>&6
7253 have_motif=no
7254 fi
7255
7256
7257   if test "$have_motif" = "yes"; then
7258         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
7259 echo "configure:7260: checking for Lesstif" >&5
7260     cat > conftest.$ac_ext <<EOF
7261 #line 7262 "configure"
7262 #include "confdefs.h"
7263 #include <Xm/Xm.h>
7264 #ifdef LESSTIF_VERSION
7265 yes
7266 #endif
7267
7268 EOF
7269 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7270   egrep "yes" >/dev/null 2>&1; then
7271   rm -rf conftest*
7272   have_lesstif=yes
7273 else
7274   rm -rf conftest*
7275   have_lesstif=no
7276 fi
7277 rm -f conftest*
7278
7279   echo "$ac_t""$have_lesstif" 1>&6
7280   fi
7281
7282 fi 
7283
7284 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
7285   with_menubars="lucid" ;;
7286 esac
7287 case "$with_dialogs" in "" | "yes" | "lucid" )
7288   if   test "$have_motif" = "yes"; then with_dialogs="motif"
7289   elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
7290   else with_dialogs=no
7291   fi ;;
7292 esac
7293 case "$with_scrollbars" in "" | "yes" )
7294   with_scrollbars="lucid" ;;
7295 esac
7296
7297 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars"
7298
7299 case "$all_widgets" in *athena* )
7300   { test "$extra_verbose" = "yes" && cat << \EOF
7301     Defining LWLIB_USES_ATHENA
7302 EOF
7303 cat >> confdefs.h <<\EOF
7304 #define LWLIB_USES_ATHENA 1
7305 EOF
7306 }
7307
7308   { test "$extra_verbose" = "yes" && cat << \EOF
7309     Defining NEED_ATHENA
7310 EOF
7311 cat >> confdefs.h <<\EOF
7312 #define NEED_ATHENA 1
7313 EOF
7314 }
7315
7316   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7317   libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
7318 esac
7319
7320 case "$all_widgets" in *motif* )
7321   { test "$extra_verbose" = "yes" && cat << \EOF
7322     Defining LWLIB_USES_MOTIF
7323 EOF
7324 cat >> confdefs.h <<\EOF
7325 #define LWLIB_USES_MOTIF 1
7326 EOF
7327 }
7328
7329   { test "$extra_verbose" = "yes" && cat << \EOF
7330     Defining NEED_MOTIF
7331 EOF
7332 cat >> confdefs.h <<\EOF
7333 #define NEED_MOTIF 1
7334 EOF
7335 }
7336
7337   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
7338   need_motif=yes ;;
7339 esac
7340
7341 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7342 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7343 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
7344 case "$all_widgets" in *lucid* )
7345   { test "$extra_verbose" = "yes" && cat << \EOF
7346     Defining NEED_LUCID
7347 EOF
7348 cat >> confdefs.h <<\EOF
7349 #define NEED_LUCID 1
7350 EOF
7351 }
7352
7353   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
7354 esac
7355
7356
7357
7358 case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7359     Defining LWLIB_SCROLLBARS_ATHENA
7360 EOF
7361 cat >> confdefs.h <<\EOF
7362 #define LWLIB_SCROLLBARS_ATHENA 1
7363 EOF
7364 }
7365 ;; esac
7366 case "$with_dialogs"    in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7367     Defining LWLIB_DIALOGS_ATHENA
7368 EOF
7369 cat >> confdefs.h <<\EOF
7370 #define LWLIB_DIALOGS_ATHENA 1
7371 EOF
7372 }
7373    ;; esac
7374 test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7375     Defining LWLIB_SCROLLBARS_ATHENA3D
7376 EOF
7377 cat >> confdefs.h <<\EOF
7378 #define LWLIB_SCROLLBARS_ATHENA3D 1
7379 EOF
7380 }
7381
7382 test "$with_dialogs"    = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7383     Defining LWLIB_DIALOGS_ATHENA3D
7384 EOF
7385 cat >> confdefs.h <<\EOF
7386 #define LWLIB_DIALOGS_ATHENA3D 1
7387 EOF
7388 }
7389
7390
7391 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7392     Defining HAVE_MENUBARS
7393 EOF
7394 cat >> confdefs.h <<\EOF
7395 #define HAVE_MENUBARS 1
7396 EOF
7397 }
7398
7399 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7400     Defining HAVE_SCROLLBARS
7401 EOF
7402 cat >> confdefs.h <<\EOF
7403 #define HAVE_SCROLLBARS 1
7404 EOF
7405 }
7406
7407 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7408     Defining HAVE_DIALOGS
7409 EOF
7410 cat >> confdefs.h <<\EOF
7411 #define HAVE_DIALOGS 1
7412 EOF
7413 }
7414
7415 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7416     Defining HAVE_TOOLBARS
7417 EOF
7418 cat >> confdefs.h <<\EOF
7419 #define HAVE_TOOLBARS 1
7420 EOF
7421 }
7422
7423
7424 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7425     Defining LWLIB_MENUBARS_LUCID
7426 EOF
7427 cat >> confdefs.h <<\EOF
7428 #define LWLIB_MENUBARS_LUCID 1
7429 EOF
7430 }
7431
7432 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7433     Defining LWLIB_SCROLLBARS_LUCID
7434 EOF
7435 cat >> confdefs.h <<\EOF
7436 #define LWLIB_SCROLLBARS_LUCID 1
7437 EOF
7438 }
7439
7440
7441 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7442     Defining LWLIB_MENUBARS_MOTIF
7443 EOF
7444 cat >> confdefs.h <<\EOF
7445 #define LWLIB_MENUBARS_MOTIF 1
7446 EOF
7447 }
7448
7449 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7450     Defining LWLIB_SCROLLBARS_MOTIF
7451 EOF
7452 cat >> confdefs.h <<\EOF
7453 #define LWLIB_SCROLLBARS_MOTIF 1
7454 EOF
7455 }
7456
7457 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7458     Defining LWLIB_DIALOGS_MOTIF
7459 EOF
7460 cat >> confdefs.h <<\EOF
7461 #define LWLIB_DIALOGS_MOTIF 1
7462 EOF
7463 }
7464
7465
7466 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
7467    echo "    xemacs will be linked with \"menubar.o\""
7468  fi
7469 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
7470    echo "    xemacs will be linked with \"scrollbar.o\""
7471  fi
7472 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
7473    echo "    xemacs will be linked with \"dialog.o\""
7474  fi
7475 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
7476    echo "    xemacs will be linked with \"toolbar.o\""
7477  fi
7478 test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui.o" &&  if test "$extra_verbose" = "yes"; then
7479    echo "    xemacs will be linked with \"gui.o\""
7480  fi
7481
7482 if test "$with_x11" = "yes"; then
7483   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
7484    echo "    xemacs will be linked with \"menubar-x.o\""
7485  fi
7486   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7487    echo "    xemacs will be linked with \"scrollbar-x.o\""
7488  fi
7489   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
7490    echo "    xemacs will be linked with \"dialog-x.o\""
7491  fi
7492   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7493    echo "    xemacs will be linked with \"toolbar-x.o\""
7494  fi
7495   test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
7496    echo "    xemacs will be linked with \"gui-x.o\""
7497  fi
7498 else
7499   if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then
7500     echo "Attempt to Build NAS sound without X"
7501     echo "Please remove NAS configuration or build with X"
7502     exit 1
7503   fi
7504 fi
7505
7506 test "$use_minimal_tagbits" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
7507     Defining USE_MINIMAL_TAGBITS
7508 EOF
7509 cat >> confdefs.h <<\EOF
7510 #define USE_MINIMAL_TAGBITS 1
7511 EOF
7512 }
7513
7514 test "$use_indexed_lrecord_implementation" = "yes" && \
7515   { test "$extra_verbose" = "yes" && cat << \EOF
7516     Defining USE_INDEXED_LRECORD_IMPLEMENTATION
7517 EOF
7518 cat >> confdefs.h <<\EOF
7519 #define USE_INDEXED_LRECORD_IMPLEMENTATION 1
7520 EOF
7521 }
7522
7523
7524
7525 test -z "$with_mule" && with_mule=no
7526 test -z "$with_file_coding" && with_file_coding=no
7527
7528
7529 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
7530   { test "$extra_verbose" = "yes" && cat << \EOF
7531     Defining FILE_CODING
7532 EOF
7533 cat >> confdefs.h <<\EOF
7534 #define FILE_CODING 1
7535 EOF
7536 }
7537
7538   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7539    echo "    xemacs will be linked with \"file-coding.o\""
7540  fi
7541 fi
7542
7543 if test "$with_mule" = "yes" ; then
7544   echo "checking for Mule-related features" 1>&6
7545 echo "configure:7546: checking for Mule-related features" >&5
7546   { test "$extra_verbose" = "yes" && cat << \EOF
7547     Defining MULE
7548 EOF
7549 cat >> confdefs.h <<\EOF
7550 #define MULE 1
7551 EOF
7552 }
7553
7554   { test "$extra_verbose" = "yes" && cat << \EOF
7555     Defining FILE_CODING
7556 EOF
7557 cat >> confdefs.h <<\EOF
7558 #define FILE_CODING 1
7559 EOF
7560 }
7561
7562   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7563    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o\""
7564  fi
7565
7566     for ac_hdr in libintl.h
7567 do
7568 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7569 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7570 echo "configure:7571: checking for $ac_hdr" >&5
7571
7572 cat > conftest.$ac_ext <<EOF
7573 #line 7574 "configure"
7574 #include "confdefs.h"
7575 #include <$ac_hdr>
7576 EOF
7577 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7578 { (eval echo configure:7579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7579 ac_err=`grep -v '^ *+' conftest.out`
7580 if test -z "$ac_err"; then
7581   rm -rf conftest*
7582   eval "ac_cv_header_$ac_safe=yes"
7583 else
7584   echo "$ac_err" >&5
7585   echo "configure: failed program was:" >&5
7586   cat conftest.$ac_ext >&5
7587   rm -rf conftest*
7588   eval "ac_cv_header_$ac_safe=no"
7589 fi
7590 rm -f conftest*
7591 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7592   echo "$ac_t""yes" 1>&6
7593     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7594   { test "$extra_verbose" = "yes" && cat << EOF
7595     Defining $ac_tr_hdr
7596 EOF
7597 cat >> confdefs.h <<EOF
7598 #define $ac_tr_hdr 1
7599 EOF
7600 }
7601  
7602 else
7603   echo "$ac_t""no" 1>&6
7604 fi
7605 done
7606
7607   
7608 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
7609 echo "configure:7610: checking for strerror in -lintl" >&5
7610 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
7611
7612 xe_check_libs=" -lintl "
7613 cat > conftest.$ac_ext <<EOF
7614 #line 7615 "configure"
7615 #include "confdefs.h"
7616 /* Override any gcc2 internal prototype to avoid an error.  */
7617 /* We use char because int might match the return type of a gcc2
7618     builtin and then its argument prototype would still apply.  */
7619 char strerror();
7620
7621 int main() {
7622 strerror()
7623 ; return 0; }
7624 EOF
7625 if { (eval echo configure:7626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7626   rm -rf conftest*
7627   eval "ac_cv_lib_$ac_lib_var=yes"
7628 else
7629   echo "configure: failed program was:" >&5
7630   cat conftest.$ac_ext >&5
7631   rm -rf conftest*
7632   eval "ac_cv_lib_$ac_lib_var=no"
7633 fi
7634 rm -f conftest*
7635 xe_check_libs=""
7636
7637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7638   echo "$ac_t""yes" 1>&6
7639     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7640     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7641   { test "$extra_verbose" = "yes" && cat << EOF
7642     Defining $ac_tr_lib
7643 EOF
7644 cat >> confdefs.h <<EOF
7645 #define $ac_tr_lib 1
7646 EOF
7647 }
7648
7649   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
7650
7651 else
7652   echo "$ac_t""no" 1>&6
7653 fi
7654
7655
7656
7657   echo "checking for Mule input methods" 1>&6
7658 echo "configure:7659: checking for Mule input methods" >&5
7659         case "$with_xim" in "" | "yes" )
7660     echo "checking for XIM" 1>&6
7661 echo "configure:7662: checking for XIM" >&5
7662         if test "$have_lesstif" = "yes"; then with_xim=xlib
7663     else 
7664 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
7665 echo "configure:7666: checking for XmImMbLookupString in -lXm" >&5
7666 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
7667
7668 xe_check_libs=" -lXm "
7669 cat > conftest.$ac_ext <<EOF
7670 #line 7671 "configure"
7671 #include "confdefs.h"
7672 /* Override any gcc2 internal prototype to avoid an error.  */
7673 /* We use char because int might match the return type of a gcc2
7674     builtin and then its argument prototype would still apply.  */
7675 char XmImMbLookupString();
7676
7677 int main() {
7678 XmImMbLookupString()
7679 ; return 0; }
7680 EOF
7681 if { (eval echo configure:7682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7682   rm -rf conftest*
7683   eval "ac_cv_lib_$ac_lib_var=yes"
7684 else
7685   echo "configure: failed program was:" >&5
7686   cat conftest.$ac_ext >&5
7687   rm -rf conftest*
7688   eval "ac_cv_lib_$ac_lib_var=no"
7689 fi
7690 rm -f conftest*
7691 xe_check_libs=""
7692
7693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7694   echo "$ac_t""yes" 1>&6
7695   with_xim=motif
7696 else
7697   echo "$ac_t""no" 1>&6
7698 with_xim=xlib
7699 fi
7700
7701
7702     fi
7703   esac
7704   if test "$with_xim" != "no"; then
7705     { test "$extra_verbose" = "yes" && cat << \EOF
7706     Defining HAVE_XIM
7707 EOF
7708 cat >> confdefs.h <<\EOF
7709 #define HAVE_XIM 1
7710 EOF
7711 }
7712
7713     if test "$with_xim" = "xlib"; then
7714       { test "$extra_verbose" = "yes" && cat << \EOF
7715     Defining XIM_XLIB
7716 EOF
7717 cat >> confdefs.h <<\EOF
7718 #define XIM_XLIB 1
7719 EOF
7720 }
7721
7722       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
7723    echo "    xemacs will be linked with \"input-method-xlib.o\""
7724  fi
7725     fi
7726     if test "$with_xim" = "motif"; then
7727       { test "$extra_verbose" = "yes" && cat << \EOF
7728     Defining XIM_MOTIF
7729 EOF
7730 cat >> confdefs.h <<\EOF
7731 #define XIM_MOTIF 1
7732 EOF
7733 }
7734
7735       need_motif=yes
7736       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
7737    echo "    xemacs will be linked with \"input-method-motif.o\""
7738  fi
7739     fi
7740     if test "$with_xim" = "motif"; then
7741       with_xfs=no
7742     fi
7743   fi
7744
7745     if test "$with_xfs" = "yes" ; then
7746     echo "checking for XFontSet" 1>&6
7747 echo "configure:7748: checking for XFontSet" >&5
7748     
7749 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
7750 echo "configure:7751: checking for XmbDrawString in -lX11" >&5
7751 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
7752
7753 xe_check_libs=" -lX11 "
7754 cat > conftest.$ac_ext <<EOF
7755 #line 7756 "configure"
7756 #include "confdefs.h"
7757 /* Override any gcc2 internal prototype to avoid an error.  */
7758 /* We use char because int might match the return type of a gcc2
7759     builtin and then its argument prototype would still apply.  */
7760 char XmbDrawString();
7761
7762 int main() {
7763 XmbDrawString()
7764 ; return 0; }
7765 EOF
7766 if { (eval echo configure:7767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7767   rm -rf conftest*
7768   eval "ac_cv_lib_$ac_lib_var=yes"
7769 else
7770   echo "configure: failed program was:" >&5
7771   cat conftest.$ac_ext >&5
7772   rm -rf conftest*
7773   eval "ac_cv_lib_$ac_lib_var=no"
7774 fi
7775 rm -f conftest*
7776 xe_check_libs=""
7777
7778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7779   echo "$ac_t""yes" 1>&6
7780   :
7781 else
7782   echo "$ac_t""no" 1>&6
7783 with_xfs=no
7784 fi
7785
7786
7787     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
7788       { test "$extra_verbose" = "yes" && cat << \EOF
7789     Defining USE_XFONTSET
7790 EOF
7791 cat >> confdefs.h <<\EOF
7792 #define USE_XFONTSET 1
7793 EOF
7794 }
7795
7796       if test "$with_xim" = "no" ; then
7797         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
7798    echo "    xemacs will be linked with \"input-method-xfs.o\""
7799  fi
7800       fi
7801     fi
7802   fi 
7803     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
7804   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
7805 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
7806 echo "configure:7807: checking for wnn/jllib.h" >&5
7807
7808 cat > conftest.$ac_ext <<EOF
7809 #line 7810 "configure"
7810 #include "confdefs.h"
7811 #include <wnn/jllib.h>
7812 EOF
7813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7814 { (eval echo configure:7815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7815 ac_err=`grep -v '^ *+' conftest.out`
7816 if test -z "$ac_err"; then
7817   rm -rf conftest*
7818   eval "ac_cv_header_$ac_safe=yes"
7819 else
7820   echo "$ac_err" >&5
7821   echo "configure: failed program was:" >&5
7822   cat conftest.$ac_ext >&5
7823   rm -rf conftest*
7824   eval "ac_cv_header_$ac_safe=no"
7825 fi
7826 rm -f conftest*
7827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7828   echo "$ac_t""yes" 1>&6
7829   :
7830 else
7831   echo "$ac_t""no" 1>&6
7832 with_wnn=no
7833 fi
7834  }
7835     if test "$with_wnn" != "no"; then
7836     for ac_func in crypt
7837 do
7838 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7839 echo "configure:7840: checking for $ac_func" >&5
7840
7841 cat > conftest.$ac_ext <<EOF
7842 #line 7843 "configure"
7843 #include "confdefs.h"
7844 /* System header to define __stub macros and hopefully few prototypes,
7845     which can conflict with char $ac_func(); below.  */
7846 #include <assert.h>
7847 /* Override any gcc2 internal prototype to avoid an error.  */
7848 /* We use char because int might match the return type of a gcc2
7849     builtin and then its argument prototype would still apply.  */
7850 char $ac_func();
7851
7852 int main() {
7853
7854 /* The GNU C library defines this for functions which it implements
7855     to always fail with ENOSYS.  Some functions are actually named
7856     something starting with __ and the normal name is an alias.  */
7857 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7858 choke me
7859 #else
7860 $ac_func();
7861 #endif
7862
7863 ; return 0; }
7864 EOF
7865 if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7866   rm -rf conftest*
7867   eval "ac_cv_func_$ac_func=yes"
7868 else
7869   echo "configure: failed program was:" >&5
7870   cat conftest.$ac_ext >&5
7871   rm -rf conftest*
7872   eval "ac_cv_func_$ac_func=no"
7873 fi
7874 rm -f conftest*
7875
7876 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7877   echo "$ac_t""yes" 1>&6
7878     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7879   { test "$extra_verbose" = "yes" && cat << EOF
7880     Defining $ac_tr_func
7881 EOF
7882 cat >> confdefs.h <<EOF
7883 #define $ac_tr_func 1
7884 EOF
7885 }
7886  
7887 else
7888   echo "$ac_t""no" 1>&6
7889 fi
7890 done
7891
7892     test "$ac_cv_func_crypt" != "yes" && { 
7893 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
7894 echo "configure:7895: checking for crypt in -lcrypt" >&5
7895 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
7896
7897 xe_check_libs=" -lcrypt "
7898 cat > conftest.$ac_ext <<EOF
7899 #line 7900 "configure"
7900 #include "confdefs.h"
7901 /* Override any gcc2 internal prototype to avoid an error.  */
7902 /* We use char because int might match the return type of a gcc2
7903     builtin and then its argument prototype would still apply.  */
7904 char crypt();
7905
7906 int main() {
7907 crypt()
7908 ; return 0; }
7909 EOF
7910 if { (eval echo configure:7911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7911   rm -rf conftest*
7912   eval "ac_cv_lib_$ac_lib_var=yes"
7913 else
7914   echo "configure: failed program was:" >&5
7915   cat conftest.$ac_ext >&5
7916   rm -rf conftest*
7917   eval "ac_cv_lib_$ac_lib_var=no"
7918 fi
7919 rm -f conftest*
7920 xe_check_libs=""
7921
7922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7923   echo "$ac_t""yes" 1>&6
7924     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7925     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7926   { test "$extra_verbose" = "yes" && cat << EOF
7927     Defining $ac_tr_lib
7928 EOF
7929 cat >> confdefs.h <<EOF
7930 #define $ac_tr_lib 1
7931 EOF
7932 }
7933
7934   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
7935
7936 else
7937   echo "$ac_t""no" 1>&6
7938 fi
7939
7940  }
7941   fi
7942     test -z "$with_wnn" && { 
7943 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
7944 echo "configure:7945: checking for jl_dic_list_e in -lwnn" >&5
7945 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
7946
7947 xe_check_libs=" -lwnn "
7948 cat > conftest.$ac_ext <<EOF
7949 #line 7950 "configure"
7950 #include "confdefs.h"
7951 /* Override any gcc2 internal prototype to avoid an error.  */
7952 /* We use char because int might match the return type of a gcc2
7953     builtin and then its argument prototype would still apply.  */
7954 char jl_dic_list_e();
7955
7956 int main() {
7957 jl_dic_list_e()
7958 ; return 0; }
7959 EOF
7960 if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7961   rm -rf conftest*
7962   eval "ac_cv_lib_$ac_lib_var=yes"
7963 else
7964   echo "configure: failed program was:" >&5
7965   cat conftest.$ac_ext >&5
7966   rm -rf conftest*
7967   eval "ac_cv_lib_$ac_lib_var=no"
7968 fi
7969 rm -f conftest*
7970 xe_check_libs=""
7971
7972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7973   echo "$ac_t""yes" 1>&6
7974   :
7975 else
7976   echo "$ac_t""no" 1>&6
7977 with_wnn=no
7978 fi
7979
7980  }
7981   test -z "$with_wnn" && with_wnn=yes
7982   if test "$with_wnn" = "yes"; then
7983     { test "$extra_verbose" = "yes" && cat << \EOF
7984     Defining HAVE_WNN
7985 EOF
7986 cat >> confdefs.h <<\EOF
7987 #define HAVE_WNN 1
7988 EOF
7989 }
7990
7991     libs_x="-lwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lwnn\" to \$libs_x"; fi
7992     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
7993    echo "    xemacs will be linked with \"mule-wnnfns.o\""
7994  fi
7995     if test "$with_wnn6" != "no"; then
7996       
7997 echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6
7998 echo "configure:7999: checking for jl_fi_dic_list in -lwnn" >&5
7999 ac_lib_var=`echo wnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
8000
8001 xe_check_libs=" -lwnn "
8002 cat > conftest.$ac_ext <<EOF
8003 #line 8004 "configure"
8004 #include "confdefs.h"
8005 /* Override any gcc2 internal prototype to avoid an error.  */
8006 /* We use char because int might match the return type of a gcc2
8007     builtin and then its argument prototype would still apply.  */
8008 char jl_fi_dic_list();
8009
8010 int main() {
8011 jl_fi_dic_list()
8012 ; return 0; }
8013 EOF
8014 if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8015   rm -rf conftest*
8016   eval "ac_cv_lib_$ac_lib_var=yes"
8017 else
8018   echo "configure: failed program was:" >&5
8019   cat conftest.$ac_ext >&5
8020   rm -rf conftest*
8021   eval "ac_cv_lib_$ac_lib_var=no"
8022 fi
8023 rm -f conftest*
8024 xe_check_libs=""
8025
8026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8027   echo "$ac_t""yes" 1>&6
8028   with_wnn6=yes
8029 else
8030   echo "$ac_t""no" 1>&6
8031 fi
8032
8033
8034       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
8035     Defining WNN6
8036 EOF
8037 cat >> confdefs.h <<\EOF
8038 #define WNN6 1
8039 EOF
8040 }
8041
8042     fi
8043   fi
8044
8045     canna_includes_found=no
8046   if test "$with_canna" != "no"; then
8047     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8048 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8049 echo "configure:8050: checking for canna/jrkanji.h" >&5
8050
8051 cat > conftest.$ac_ext <<EOF
8052 #line 8053 "configure"
8053 #include "confdefs.h"
8054 #include <canna/jrkanji.h>
8055 EOF
8056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8057 { (eval echo configure:8058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8058 ac_err=`grep -v '^ *+' conftest.out`
8059 if test -z "$ac_err"; then
8060   rm -rf conftest*
8061   eval "ac_cv_header_$ac_safe=yes"
8062 else
8063   echo "$ac_err" >&5
8064   echo "configure: failed program was:" >&5
8065   cat conftest.$ac_ext >&5
8066   rm -rf conftest*
8067   eval "ac_cv_header_$ac_safe=no"
8068 fi
8069 rm -f conftest*
8070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8071   echo "$ac_t""yes" 1>&6
8072   canna_includes_found=yes
8073 else
8074   echo "$ac_t""no" 1>&6
8075 fi
8076
8077   fi
8078   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
8079       -d "/usr/local/canna/include"; then
8080     save_c_switch_site="$c_switch_site"
8081     c_switch_site="$c_switch_site -I/usr/local/canna/include"
8082     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8083 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8084 echo "configure:8085: checking for canna/jrkanji.h" >&5
8085
8086 cat > conftest.$ac_ext <<EOF
8087 #line 8088 "configure"
8088 #include "confdefs.h"
8089 #include <canna/jrkanji.h>
8090 EOF
8091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8092 { (eval echo configure:8093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8093 ac_err=`grep -v '^ *+' conftest.out`
8094 if test -z "$ac_err"; then
8095   rm -rf conftest*
8096   eval "ac_cv_header_$ac_safe=yes"
8097 else
8098   echo "$ac_err" >&5
8099   echo "configure: failed program was:" >&5
8100   cat conftest.$ac_ext >&5
8101   rm -rf conftest*
8102   eval "ac_cv_header_$ac_safe=no"
8103 fi
8104 rm -f conftest*
8105 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8106   echo "$ac_t""yes" 1>&6
8107   canna_includes_found=yes
8108 else
8109   echo "$ac_t""no" 1>&6
8110 fi
8111
8112     if test "$canna_includes_found" != "yes"; then
8113       c_switch_site="$save_c_switch_site"
8114       with_canna="no"
8115     fi
8116   fi
8117
8118   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
8119 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
8120 echo "configure:8121: checking for canna/RK.h" >&5
8121
8122 cat > conftest.$ac_ext <<EOF
8123 #line 8124 "configure"
8124 #include "confdefs.h"
8125 #include <canna/RK.h>
8126 EOF
8127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8128 { (eval echo configure:8129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8129 ac_err=`grep -v '^ *+' conftest.out`
8130 if test -z "$ac_err"; then
8131   rm -rf conftest*
8132   eval "ac_cv_header_$ac_safe=yes"
8133 else
8134   echo "$ac_err" >&5
8135   echo "configure: failed program was:" >&5
8136   cat conftest.$ac_ext >&5
8137   rm -rf conftest*
8138   eval "ac_cv_header_$ac_safe=no"
8139 fi
8140 rm -f conftest*
8141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8142   echo "$ac_t""yes" 1>&6
8143   :
8144 else
8145   echo "$ac_t""no" 1>&6
8146 with_canna=no
8147 fi
8148  }
8149   test -z "$with_canna" && { 
8150 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
8151 echo "configure:8152: checking for RkBgnBun in -lRKC" >&5
8152 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
8153
8154 xe_check_libs=" -lRKC "
8155 cat > conftest.$ac_ext <<EOF
8156 #line 8157 "configure"
8157 #include "confdefs.h"
8158 /* Override any gcc2 internal prototype to avoid an error.  */
8159 /* We use char because int might match the return type of a gcc2
8160     builtin and then its argument prototype would still apply.  */
8161 char RkBgnBun();
8162
8163 int main() {
8164 RkBgnBun()
8165 ; return 0; }
8166 EOF
8167 if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8168   rm -rf conftest*
8169   eval "ac_cv_lib_$ac_lib_var=yes"
8170 else
8171   echo "configure: failed program was:" >&5
8172   cat conftest.$ac_ext >&5
8173   rm -rf conftest*
8174   eval "ac_cv_lib_$ac_lib_var=no"
8175 fi
8176 rm -f conftest*
8177 xe_check_libs=""
8178
8179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8180   echo "$ac_t""yes" 1>&6
8181   :
8182 else
8183   echo "$ac_t""no" 1>&6
8184 with_canna=no
8185 fi
8186
8187  }
8188   test -z "$with_canna" && { 
8189 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
8190 echo "configure:8191: checking for jrKanjiControl in -lcanna" >&5
8191 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
8192
8193 xe_check_libs=" -lcanna "
8194 cat > conftest.$ac_ext <<EOF
8195 #line 8196 "configure"
8196 #include "confdefs.h"
8197 /* Override any gcc2 internal prototype to avoid an error.  */
8198 /* We use char because int might match the return type of a gcc2
8199     builtin and then its argument prototype would still apply.  */
8200 char jrKanjiControl();
8201
8202 int main() {
8203 jrKanjiControl()
8204 ; return 0; }
8205 EOF
8206 if { (eval echo configure:8207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8207   rm -rf conftest*
8208   eval "ac_cv_lib_$ac_lib_var=yes"
8209 else
8210   echo "configure: failed program was:" >&5
8211   cat conftest.$ac_ext >&5
8212   rm -rf conftest*
8213   eval "ac_cv_lib_$ac_lib_var=no"
8214 fi
8215 rm -f conftest*
8216 xe_check_libs=""
8217
8218 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8219   echo "$ac_t""yes" 1>&6
8220   :
8221 else
8222   echo "$ac_t""no" 1>&6
8223 with_canna=no
8224 fi
8225
8226  }
8227   test -z "$with_canna" && with_canna=yes
8228   if test "$with_canna" = "yes"; then
8229     { test "$extra_verbose" = "yes" && cat << \EOF
8230     Defining HAVE_CANNA
8231 EOF
8232 cat >> confdefs.h <<\EOF
8233 #define HAVE_CANNA 1
8234 EOF
8235 }
8236
8237     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
8238     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
8239    echo "    xemacs will be linked with \"mule-canna.o\""
8240  fi
8241   fi
8242
8243 else   for feature in xim canna wnn; do
8244     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
8245       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
8246     fi
8247     eval "with_${feature}=no"
8248   done
8249 fi 
8250
8251 if test "$need_motif" = "yes" ; then
8252   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
8253     
8254 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
8255 echo "configure:8256: checking for layout_object_getvalue in -li18n" >&5
8256 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
8257
8258 xe_check_libs=" -li18n "
8259 cat > conftest.$ac_ext <<EOF
8260 #line 8261 "configure"
8261 #include "confdefs.h"
8262 /* Override any gcc2 internal prototype to avoid an error.  */
8263 /* We use char because int might match the return type of a gcc2
8264     builtin and then its argument prototype would still apply.  */
8265 char layout_object_getvalue();
8266
8267 int main() {
8268 layout_object_getvalue()
8269 ; return 0; }
8270 EOF
8271 if { (eval echo configure:8272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8272   rm -rf conftest*
8273   eval "ac_cv_lib_$ac_lib_var=yes"
8274 else
8275   echo "configure: failed program was:" >&5
8276   cat conftest.$ac_ext >&5
8277   rm -rf conftest*
8278   eval "ac_cv_lib_$ac_lib_var=no"
8279 fi
8280 rm -f conftest*
8281 xe_check_libs=""
8282
8283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8284   echo "$ac_t""yes" 1>&6
8285   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
8286 else
8287   echo "$ac_t""no" 1>&6
8288 fi
8289
8290
8291   
8292 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
8293     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8294   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8295   
8296         runpath="" runpath_dirs=""
8297   if test -n "$LD_RUN_PATH"; then
8298     runpath="$LD_RUN_PATH"
8299   elif test "$GCC" = "yes"; then
8300         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
8301     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
8302     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
8303     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
8304       case "$arg" in P,* | -L* | -R* )
8305         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
8306           {
8307 xe_runpath_dir="$dir"
8308   test "$xe_runpath_dir" != "/lib"     -a \
8309         "$xe_runpath_dir" != "/usr/lib" -a \
8310         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8311   eval "$xe_add_unique_runpath_dir"
8312 }
8313         done ;;
8314       esac
8315     done
8316     ld_switch_run="$ld_switch_run_save"
8317     rm -f conftest*
8318   else
8319         for arg in $ld_switch_site $ld_switch_x_site; do
8320       case "$arg" in -L*) {
8321 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
8322   test "$xe_runpath_dir" != "/lib"     -a \
8323         "$xe_runpath_dir" != "/usr/lib" -a \
8324         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8325   eval "$xe_add_unique_runpath_dir"
8326 };; esac
8327     done
8328         if test "$opsys $need_motif" = "sol2 yes"; then
8329       xe_runpath_dir="/opt/SUNWdt/lib";
8330       eval "$xe_add_unique_runpath_dir";
8331     fi
8332   fi 
8333   if test -n "$runpath"; then
8334     ld_switch_run="${dash_r}${runpath}"
8335     
8336 if test "$GCC" = "yes"; then
8337   set x $ld_switch_run; shift; ld_switch_run=""
8338   while test -n "$1"; do
8339     case $1 in
8340       -L  | -l  | -u         ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
8341       -L* | -l* | -u* | -Wl* ) ld_switch_run="$ld_switch_run $1" ;;
8342       -Xlinker* ) ;;
8343       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
8344     esac
8345     shift
8346   done
8347 fi
8348     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
8349   fi
8350 fi
8351
8352 fi
8353
8354 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
8355 do
8356 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8357 echo "configure:8358: checking for $ac_func" >&5
8358
8359 cat > conftest.$ac_ext <<EOF
8360 #line 8361 "configure"
8361 #include "confdefs.h"
8362 /* System header to define __stub macros and hopefully few prototypes,
8363     which can conflict with char $ac_func(); below.  */
8364 #include <assert.h>
8365 /* Override any gcc2 internal prototype to avoid an error.  */
8366 /* We use char because int might match the return type of a gcc2
8367     builtin and then its argument prototype would still apply.  */
8368 char $ac_func();
8369
8370 int main() {
8371
8372 /* The GNU C library defines this for functions which it implements
8373     to always fail with ENOSYS.  Some functions are actually named
8374     something starting with __ and the normal name is an alias.  */
8375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8376 choke me
8377 #else
8378 $ac_func();
8379 #endif
8380
8381 ; return 0; }
8382 EOF
8383 if { (eval echo configure:8384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8384   rm -rf conftest*
8385   eval "ac_cv_func_$ac_func=yes"
8386 else
8387   echo "configure: failed program was:" >&5
8388   cat conftest.$ac_ext >&5
8389   rm -rf conftest*
8390   eval "ac_cv_func_$ac_func=no"
8391 fi
8392 rm -f conftest*
8393
8394 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8395   echo "$ac_t""yes" 1>&6
8396     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8397   { test "$extra_verbose" = "yes" && cat << EOF
8398     Defining $ac_tr_func
8399 EOF
8400 cat >> confdefs.h <<EOF
8401 #define $ac_tr_func 1
8402 EOF
8403 }
8404  
8405 else
8406   echo "$ac_t""no" 1>&6
8407 fi
8408 done
8409
8410
8411
8412 case "$opsys" in
8413   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8414    echo "    xemacs will be linked with \"realpath.o\""
8415  fi ;;
8416   * )
8417     for ac_func in realpath
8418 do
8419 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8420 echo "configure:8421: checking for $ac_func" >&5
8421
8422 cat > conftest.$ac_ext <<EOF
8423 #line 8424 "configure"
8424 #include "confdefs.h"
8425 /* System header to define __stub macros and hopefully few prototypes,
8426     which can conflict with char $ac_func(); below.  */
8427 #include <assert.h>
8428 /* Override any gcc2 internal prototype to avoid an error.  */
8429 /* We use char because int might match the return type of a gcc2
8430     builtin and then its argument prototype would still apply.  */
8431 char $ac_func();
8432
8433 int main() {
8434
8435 /* The GNU C library defines this for functions which it implements
8436     to always fail with ENOSYS.  Some functions are actually named
8437     something starting with __ and the normal name is an alias.  */
8438 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8439 choke me
8440 #else
8441 $ac_func();
8442 #endif
8443
8444 ; return 0; }
8445 EOF
8446 if { (eval echo configure:8447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8447   rm -rf conftest*
8448   eval "ac_cv_func_$ac_func=yes"
8449 else
8450   echo "configure: failed program was:" >&5
8451   cat conftest.$ac_ext >&5
8452   rm -rf conftest*
8453   eval "ac_cv_func_$ac_func=no"
8454 fi
8455 rm -f conftest*
8456
8457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8458   echo "$ac_t""yes" 1>&6
8459     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8460   { test "$extra_verbose" = "yes" && cat << EOF
8461     Defining $ac_tr_func
8462 EOF
8463 cat >> confdefs.h <<EOF
8464 #define $ac_tr_func 1
8465 EOF
8466 }
8467  
8468 else
8469   echo "$ac_t""no" 1>&6
8470 fi
8471 done
8472
8473     test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8474    echo "    xemacs will be linked with \"realpath.o\""
8475  fi ;;
8476 esac
8477
8478 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
8479 echo "configure:8480: checking whether netdb declares h_errno" >&5
8480 cat > conftest.$ac_ext <<EOF
8481 #line 8482 "configure"
8482 #include "confdefs.h"
8483 #include <netdb.h>
8484 int main() {
8485 return h_errno;
8486 ; return 0; }
8487 EOF
8488 if { (eval echo configure:8489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8489   rm -rf conftest*
8490   echo "$ac_t""yes" 1>&6
8491    { test "$extra_verbose" = "yes" && cat << \EOF
8492     Defining HAVE_H_ERRNO
8493 EOF
8494 cat >> confdefs.h <<\EOF
8495 #define HAVE_H_ERRNO 1
8496 EOF
8497 }
8498
8499 else
8500   echo "configure: failed program was:" >&5
8501   cat conftest.$ac_ext >&5
8502   rm -rf conftest*
8503   echo "$ac_t""no" 1>&6
8504 fi
8505 rm -f conftest*
8506
8507 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
8508 echo "configure:8509: checking for sigsetjmp" >&5
8509 cat > conftest.$ac_ext <<EOF
8510 #line 8511 "configure"
8511 #include "confdefs.h"
8512 #include <setjmp.h>
8513 int main() {
8514 sigjmp_buf bar; sigsetjmp (bar, 0);
8515 ; return 0; }
8516 EOF
8517 if { (eval echo configure:8518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8518   rm -rf conftest*
8519   echo "$ac_t""yes" 1>&6
8520    { test "$extra_verbose" = "yes" && cat << \EOF
8521     Defining HAVE_SIGSETJMP
8522 EOF
8523 cat >> confdefs.h <<\EOF
8524 #define HAVE_SIGSETJMP 1
8525 EOF
8526 }
8527
8528 else
8529   echo "configure: failed program was:" >&5
8530   cat conftest.$ac_ext >&5
8531   rm -rf conftest*
8532   echo "$ac_t""no" 1>&6
8533 fi
8534 rm -f conftest*
8535
8536 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
8537 echo "configure:8538: checking whether localtime caches TZ" >&5
8538
8539 if test "$ac_cv_func_tzset" = "yes"; then
8540 cat > conftest.$ac_ext <<EOF
8541 #line 8542 "configure"
8542 #include "confdefs.h"
8543 #include <time.h>
8544 #if STDC_HEADERS
8545 # include <stdlib.h>
8546 #endif
8547 extern char **environ;
8548 unset_TZ ()
8549 {
8550   char **from, **to;
8551   for (to = from = environ; (*to = *from); from++)
8552     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
8553       to++;
8554 }
8555 char TZ_GMT0[] = "TZ=GMT0";
8556 char TZ_PST8[] = "TZ=PST8";
8557 main()
8558 {
8559   time_t now = time ((time_t *) 0);
8560   int hour_GMT0, hour_unset;
8561   if (putenv (TZ_GMT0) != 0)
8562     exit (1);
8563   hour_GMT0 = localtime (&now)->tm_hour;
8564   unset_TZ ();
8565   hour_unset = localtime (&now)->tm_hour;
8566   if (putenv (TZ_PST8) != 0)
8567     exit (1);
8568   if (localtime (&now)->tm_hour == hour_GMT0)
8569     exit (1);
8570   unset_TZ ();
8571   if (localtime (&now)->tm_hour != hour_unset)
8572     exit (1);
8573   exit (0);
8574 }
8575 EOF
8576 if { (eval echo configure:8577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
8577 then
8578   emacs_cv_localtime_cache=no
8579 else
8580   echo "configure: failed program was:" >&5
8581   cat conftest.$ac_ext >&5
8582   rm -fr conftest*
8583   emacs_cv_localtime_cache=yes
8584 fi
8585 rm -fr conftest*
8586 else
8587         # If we lack tzset, report that localtime does not cache TZ,
8588         # since we can't invalidate the cache if we don't have tzset.
8589         emacs_cv_localtime_cache=no
8590 fi
8591 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
8592 if test $emacs_cv_localtime_cache = yes; then
8593   { test "$extra_verbose" = "yes" && cat << \EOF
8594     Defining LOCALTIME_CACHE
8595 EOF
8596 cat >> confdefs.h <<\EOF
8597 #define LOCALTIME_CACHE 1
8598 EOF
8599 }
8600
8601 fi
8602
8603 if test "$HAVE_TIMEVAL" = "yes"; then
8604 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
8605 echo "configure:8606: checking whether gettimeofday accepts one or two arguments" >&5
8606 cat > conftest.$ac_ext <<EOF
8607 #line 8608 "configure"
8608 #include "confdefs.h"
8609
8610 #ifdef TIME_WITH_SYS_TIME
8611 #include <sys/time.h>
8612 #include <time.h>
8613 #else
8614 #ifdef HAVE_SYS_TIME_H
8615 #include <sys/time.h>
8616 #else
8617 #include <time.h>
8618 #endif
8619 #endif
8620   
8621 int main() {
8622
8623   struct timeval time;
8624   struct timezone dummy;
8625   gettimeofday (&time, &dummy);
8626
8627 ; return 0; }
8628 EOF
8629 if { (eval echo configure:8630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8630   rm -rf conftest*
8631   echo "$ac_t""two" 1>&6
8632 else
8633   echo "configure: failed program was:" >&5
8634   cat conftest.$ac_ext >&5
8635   rm -rf conftest*
8636   echo "$ac_t""one" 1>&6
8637    { test "$extra_verbose" = "yes" && cat << \EOF
8638     Defining GETTIMEOFDAY_ONE_ARGUMENT
8639 EOF
8640 cat >> confdefs.h <<\EOF
8641 #define GETTIMEOFDAY_ONE_ARGUMENT 1
8642 EOF
8643 }
8644
8645 fi
8646 rm -f conftest*
8647 fi
8648
8649
8650 echo $ac_n "checking for inline""... $ac_c" 1>&6
8651 echo "configure:8652: checking for inline" >&5
8652
8653 ac_cv_c_inline=no
8654 for ac_kw in inline __inline__ __inline; do
8655   cat > conftest.$ac_ext <<EOF
8656 #line 8657 "configure"
8657 #include "confdefs.h"
8658
8659 int main() {
8660 } $ac_kw foo() {
8661 ; return 0; }
8662 EOF
8663 if { (eval echo configure:8664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8664   rm -rf conftest*
8665   ac_cv_c_inline=$ac_kw; break
8666 else
8667   echo "configure: failed program was:" >&5
8668   cat conftest.$ac_ext >&5
8669 fi
8670 rm -f conftest*
8671 done
8672
8673
8674 echo "$ac_t""$ac_cv_c_inline" 1>&6
8675 case "$ac_cv_c_inline" in
8676   inline | yes) ;;
8677   no) { test "$extra_verbose" = "yes" && cat << \EOF
8678     Defining inline = 
8679 EOF
8680 cat >> confdefs.h <<\EOF
8681 #define inline 
8682 EOF
8683 }
8684  ;;
8685   *)  { test "$extra_verbose" = "yes" && cat << EOF
8686     Defining inline = $ac_cv_c_inline
8687 EOF
8688 cat >> confdefs.h <<EOF
8689 #define inline $ac_cv_c_inline
8690 EOF
8691 }
8692  ;;
8693 esac
8694
8695 if test "$ac_cv_c_inline" != "no"; then
8696   { test "$extra_verbose" = "yes" && cat << \EOF
8697     Defining HAVE_INLINE
8698 EOF
8699 cat >> confdefs.h <<\EOF
8700 #define HAVE_INLINE 1
8701 EOF
8702 }
8703
8704   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
8705    echo "    xemacs will be linked with \"inline.o\""
8706  fi
8707 fi
8708
8709
8710 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8711 # for constant arguments.  Useless!
8712 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
8713 echo "configure:8714: checking for working alloca.h" >&5
8714
8715 cat > conftest.$ac_ext <<EOF
8716 #line 8717 "configure"
8717 #include "confdefs.h"
8718 #include <alloca.h>
8719 int main() {
8720 char *p = alloca(2 * sizeof(int));
8721 ; return 0; }
8722 EOF
8723 if { (eval echo configure:8724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8724   rm -rf conftest*
8725   ac_cv_header_alloca_h=yes
8726 else
8727   echo "configure: failed program was:" >&5
8728   cat conftest.$ac_ext >&5
8729   rm -rf conftest*
8730   ac_cv_header_alloca_h=no
8731 fi
8732 rm -f conftest*
8733
8734 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
8735 if test $ac_cv_header_alloca_h = yes; then
8736   { test "$extra_verbose" = "yes" && cat << \EOF
8737     Defining HAVE_ALLOCA_H
8738 EOF
8739 cat >> confdefs.h <<\EOF
8740 #define HAVE_ALLOCA_H 1
8741 EOF
8742 }
8743
8744 fi
8745
8746 echo $ac_n "checking for alloca""... $ac_c" 1>&6
8747 echo "configure:8748: checking for alloca" >&5
8748
8749 cat > conftest.$ac_ext <<EOF
8750 #line 8751 "configure"
8751 #include "confdefs.h"
8752
8753 #ifdef __GNUC__
8754 # define alloca __builtin_alloca
8755 #else
8756 # if HAVE_ALLOCA_H
8757 #  include <alloca.h>
8758 # else
8759 #  ifdef _AIX
8760  #pragma alloca
8761 #  else
8762 #   ifndef alloca /* predefined by HP cc +Olibcalls */
8763 char *alloca ();
8764 #   endif
8765 #  endif
8766 # endif
8767 #endif
8768
8769 int main() {
8770 char *p = (char *) alloca(1);
8771 ; return 0; }
8772 EOF
8773 if { (eval echo configure:8774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8774   rm -rf conftest*
8775   ac_cv_func_alloca_works=yes
8776 else
8777   echo "configure: failed program was:" >&5
8778   cat conftest.$ac_ext >&5
8779   rm -rf conftest*
8780   ac_cv_func_alloca_works=no
8781 fi
8782 rm -f conftest*
8783
8784 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
8785 if test $ac_cv_func_alloca_works = yes; then
8786   { test "$extra_verbose" = "yes" && cat << \EOF
8787     Defining HAVE_ALLOCA
8788 EOF
8789 cat >> confdefs.h <<\EOF
8790 #define HAVE_ALLOCA 1
8791 EOF
8792 }
8793
8794 fi
8795
8796 if test $ac_cv_func_alloca_works = no; then
8797   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8798   # that cause trouble.  Some versions do not even contain alloca or
8799   # contain a buggy version.  If you still want to use their alloca,
8800   # use ar to extract alloca.o from them instead of compiling alloca.c.
8801   ALLOCA=alloca.o
8802   { test "$extra_verbose" = "yes" && cat << \EOF
8803     Defining C_ALLOCA
8804 EOF
8805 cat >> confdefs.h <<\EOF
8806 #define C_ALLOCA 1
8807 EOF
8808 }
8809
8810
8811 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
8812 echo "configure:8813: checking whether alloca needs Cray hooks" >&5
8813
8814 cat > conftest.$ac_ext <<EOF
8815 #line 8816 "configure"
8816 #include "confdefs.h"
8817 #if defined(CRAY) && ! defined(CRAY2)
8818 webecray
8819 #else
8820 wenotbecray
8821 #endif
8822
8823 EOF
8824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8825   egrep "webecray" >/dev/null 2>&1; then
8826   rm -rf conftest*
8827   ac_cv_os_cray=yes
8828 else
8829   rm -rf conftest*
8830   ac_cv_os_cray=no
8831 fi
8832 rm -f conftest*
8833
8834
8835 echo "$ac_t""$ac_cv_os_cray" 1>&6
8836 if test $ac_cv_os_cray = yes; then
8837 for ac_func in _getb67 GETB67 getb67; do
8838   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8839 echo "configure:8840: checking for $ac_func" >&5
8840
8841 cat > conftest.$ac_ext <<EOF
8842 #line 8843 "configure"
8843 #include "confdefs.h"
8844 /* System header to define __stub macros and hopefully few prototypes,
8845     which can conflict with char $ac_func(); below.  */
8846 #include <assert.h>
8847 /* Override any gcc2 internal prototype to avoid an error.  */
8848 /* We use char because int might match the return type of a gcc2
8849     builtin and then its argument prototype would still apply.  */
8850 char $ac_func();
8851
8852 int main() {
8853
8854 /* The GNU C library defines this for functions which it implements
8855     to always fail with ENOSYS.  Some functions are actually named
8856     something starting with __ and the normal name is an alias.  */
8857 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8858 choke me
8859 #else
8860 $ac_func();
8861 #endif
8862
8863 ; return 0; }
8864 EOF
8865 if { (eval echo configure:8866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8866   rm -rf conftest*
8867   eval "ac_cv_func_$ac_func=yes"
8868 else
8869   echo "configure: failed program was:" >&5
8870   cat conftest.$ac_ext >&5
8871   rm -rf conftest*
8872   eval "ac_cv_func_$ac_func=no"
8873 fi
8874 rm -f conftest*
8875
8876 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8877   echo "$ac_t""yes" 1>&6
8878   { test "$extra_verbose" = "yes" && cat << EOF
8879     Defining CRAY_STACKSEG_END = $ac_func
8880 EOF
8881 cat >> confdefs.h <<EOF
8882 #define CRAY_STACKSEG_END $ac_func
8883 EOF
8884 }
8885
8886   break
8887 else
8888   echo "$ac_t""no" 1>&6
8889 fi
8890
8891 done
8892 fi
8893
8894 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
8895 echo "configure:8896: checking stack direction for C alloca" >&5
8896
8897 cat > conftest.$ac_ext <<EOF
8898 #line 8899 "configure"
8899 #include "confdefs.h"
8900 find_stack_direction ()
8901 {
8902   static char *addr = 0;
8903   auto char dummy;
8904   if (addr == 0)
8905     {
8906       addr = &dummy;
8907       return find_stack_direction ();
8908     }
8909   else
8910     return (&dummy > addr) ? 1 : -1;
8911 }
8912 main ()
8913 {
8914   exit (find_stack_direction() < 0);
8915 }
8916 EOF
8917 if { (eval echo configure:8918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
8918 then
8919   ac_cv_c_stack_direction=1
8920 else
8921   echo "configure: failed program was:" >&5
8922   cat conftest.$ac_ext >&5
8923   rm -fr conftest*
8924   ac_cv_c_stack_direction=-1
8925 fi
8926 rm -fr conftest*
8927
8928 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
8929 { test "$extra_verbose" = "yes" && cat << EOF
8930     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
8931 EOF
8932 cat >> confdefs.h <<EOF
8933 #define STACK_DIRECTION $ac_cv_c_stack_direction
8934 EOF
8935 }
8936
8937 fi
8938
8939 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
8940    echo "    xemacs will be linked with \"$ALLOCA\""
8941  fi
8942
8943 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
8944 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
8945 echo "configure:8946: checking for vfork.h" >&5
8946
8947 cat > conftest.$ac_ext <<EOF
8948 #line 8949 "configure"
8949 #include "confdefs.h"
8950 #include <vfork.h>
8951 EOF
8952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8953 { (eval echo configure:8954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8954 ac_err=`grep -v '^ *+' conftest.out`
8955 if test -z "$ac_err"; then
8956   rm -rf conftest*
8957   eval "ac_cv_header_$ac_safe=yes"
8958 else
8959   echo "$ac_err" >&5
8960   echo "configure: failed program was:" >&5
8961   cat conftest.$ac_ext >&5
8962   rm -rf conftest*
8963   eval "ac_cv_header_$ac_safe=no"
8964 fi
8965 rm -f conftest*
8966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8967   echo "$ac_t""yes" 1>&6
8968   { test "$extra_verbose" = "yes" && cat << \EOF
8969     Defining HAVE_VFORK_H
8970 EOF
8971 cat >> confdefs.h <<\EOF
8972 #define HAVE_VFORK_H 1
8973 EOF
8974 }
8975
8976 else
8977   echo "$ac_t""no" 1>&6
8978 fi
8979
8980 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
8981 echo "configure:8982: checking for working vfork" >&5
8982
8983 cat > conftest.$ac_ext <<EOF
8984 #line 8985 "configure"
8985 #include "confdefs.h"
8986 /* Thanks to Paul Eggert for this test.  */
8987 #include <stdio.h>
8988 #include <sys/types.h>
8989 #include <sys/stat.h>
8990 #ifdef HAVE_UNISTD_H
8991 #include <unistd.h>
8992 #endif
8993 #ifdef HAVE_VFORK_H
8994 #include <vfork.h>
8995 #endif
8996 /* On some sparc systems, changes by the child to local and incoming
8997    argument registers are propagated back to the parent.
8998    The compiler is told about this with #include <vfork.h>,
8999    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9000    Test for this by using a static variable whose address
9001    is put into a register that is clobbered by the vfork.  */
9002 static
9003 #ifdef __cplusplus
9004 sparc_address_test (int arg)
9005 #else
9006 sparc_address_test (arg) int arg;
9007 #endif
9008 {
9009   static pid_t child;
9010   if (!child) {
9011     child = vfork ();
9012     if (child < 0) {
9013       perror ("vfork");
9014       _exit(2);
9015     }
9016     if (!child) {
9017       arg = getpid();
9018       write(-1, "", 0);
9019       _exit (arg);
9020     }
9021   }
9022 }
9023 main() {
9024   pid_t parent = getpid ();
9025   pid_t child;
9026
9027   sparc_address_test ();
9028
9029   child = vfork ();
9030
9031   if (child == 0) {
9032     /* Here is another test for sparc vfork register problems.
9033        This test uses lots of local variables, at least
9034        as many local variables as main has allocated so far
9035        including compiler temporaries.  4 locals are enough for
9036        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9037        A buggy compiler should reuse the register of parent
9038        for one of the local variables, since it will think that
9039        parent can't possibly be used any more in this routine.
9040        Assigning to the local variable will thus munge parent
9041        in the parent process.  */
9042     pid_t
9043       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9044       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9045     /* Convince the compiler that p..p7 are live; otherwise, it might
9046        use the same hardware register for all 8 local variables.  */
9047     if (p != p1 || p != p2 || p != p3 || p != p4
9048         || p != p5 || p != p6 || p != p7)
9049       _exit(1);
9050
9051     /* On some systems (e.g. IRIX 3.3),
9052        vfork doesn't separate parent from child file descriptors.
9053        If the child closes a descriptor before it execs or exits,
9054        this munges the parent's descriptor as well.
9055        Test for this by closing stdout in the child.  */
9056     _exit(close(fileno(stdout)) != 0);
9057   } else {
9058     int status;
9059     struct stat st;
9060
9061     while (wait(&status) != child)
9062       ;
9063     exit(
9064          /* Was there some problem with vforking?  */
9065          child < 0
9066
9067          /* Did the child fail?  (This shouldn't happen.)  */
9068          || status
9069
9070          /* Did the vfork/compiler bug occur?  */
9071          || parent != getpid()
9072
9073          /* Did the file descriptor bug occur?  */
9074          || fstat(fileno(stdout), &st) != 0
9075          );
9076   }
9077 }
9078 EOF
9079 if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
9080 then
9081   ac_cv_func_vfork_works=yes
9082 else
9083   echo "configure: failed program was:" >&5
9084   cat conftest.$ac_ext >&5
9085   rm -fr conftest*
9086   ac_cv_func_vfork_works=no
9087 fi
9088 rm -fr conftest*
9089
9090 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9091 if test $ac_cv_func_vfork_works = no; then
9092   { test "$extra_verbose" = "yes" && cat << \EOF
9093     Defining vfork = fork
9094 EOF
9095 cat >> confdefs.h <<\EOF
9096 #define vfork fork
9097 EOF
9098 }
9099
9100 fi
9101
9102
9103 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
9104 echo "configure:9105: checking for working strcoll" >&5
9105
9106 cat > conftest.$ac_ext <<EOF
9107 #line 9108 "configure"
9108 #include "confdefs.h"
9109 #include <string.h>
9110 main ()
9111 {
9112   exit (strcoll ("abc", "def") >= 0 ||
9113         strcoll ("ABC", "DEF") >= 0 ||
9114         strcoll ("123", "456") >= 0);
9115 }
9116 EOF
9117 if { (eval echo configure:9118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
9118 then
9119   ac_cv_func_strcoll_works=yes
9120 else
9121   echo "configure: failed program was:" >&5
9122   cat conftest.$ac_ext >&5
9123   rm -fr conftest*
9124   ac_cv_func_strcoll_works=no
9125 fi
9126 rm -fr conftest*
9127
9128 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
9129 if test $ac_cv_func_strcoll_works = yes; then
9130   { test "$extra_verbose" = "yes" && cat << \EOF
9131     Defining HAVE_STRCOLL
9132 EOF
9133 cat >> confdefs.h <<\EOF
9134 #define HAVE_STRCOLL 1
9135 EOF
9136 }
9137
9138 fi
9139
9140
9141 for ac_func in getpgrp
9142 do
9143 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9144 echo "configure:9145: checking for $ac_func" >&5
9145
9146 cat > conftest.$ac_ext <<EOF
9147 #line 9148 "configure"
9148 #include "confdefs.h"
9149 /* System header to define __stub macros and hopefully few prototypes,
9150     which can conflict with char $ac_func(); below.  */
9151 #include <assert.h>
9152 /* Override any gcc2 internal prototype to avoid an error.  */
9153 /* We use char because int might match the return type of a gcc2
9154     builtin and then its argument prototype would still apply.  */
9155 char $ac_func();
9156
9157 int main() {
9158
9159 /* The GNU C library defines this for functions which it implements
9160     to always fail with ENOSYS.  Some functions are actually named
9161     something starting with __ and the normal name is an alias.  */
9162 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9163 choke me
9164 #else
9165 $ac_func();
9166 #endif
9167
9168 ; return 0; }
9169 EOF
9170 if { (eval echo configure:9171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9171   rm -rf conftest*
9172   eval "ac_cv_func_$ac_func=yes"
9173 else
9174   echo "configure: failed program was:" >&5
9175   cat conftest.$ac_ext >&5
9176   rm -rf conftest*
9177   eval "ac_cv_func_$ac_func=no"
9178 fi
9179 rm -f conftest*
9180
9181 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9182   echo "$ac_t""yes" 1>&6
9183     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9184   { test "$extra_verbose" = "yes" && cat << EOF
9185     Defining $ac_tr_func
9186 EOF
9187 cat >> confdefs.h <<EOF
9188 #define $ac_tr_func 1
9189 EOF
9190 }
9191  
9192 else
9193   echo "$ac_t""no" 1>&6
9194 fi
9195 done
9196
9197 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
9198 echo "configure:9199: checking whether getpgrp takes no argument" >&5
9199
9200 cat > conftest.$ac_ext <<EOF
9201 #line 9202 "configure"
9202 #include "confdefs.h"
9203
9204 /*
9205  * If this system has a BSD-style getpgrp(),
9206  * which takes a pid argument, exit unsuccessfully.
9207  *
9208  * Snarfed from Chet Ramey's bash pgrp.c test program
9209  */
9210 #include <stdio.h>
9211 #include <sys/types.h>
9212
9213 int     pid;
9214 int     pg1, pg2, pg3, pg4;
9215 int     ng, np, s, child;
9216
9217 main()
9218 {
9219         pid = getpid();
9220         pg1 = getpgrp(0);
9221         pg2 = getpgrp();
9222         pg3 = getpgrp(pid);
9223         pg4 = getpgrp(1);
9224
9225         /*
9226          * If all of these values are the same, it's pretty sure that
9227          * we're on a system that ignores getpgrp's first argument.
9228          */
9229         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
9230                 exit(0);
9231
9232         child = fork();
9233         if (child < 0)
9234                 exit(1);
9235         else if (child == 0) {
9236                 np = getpid();
9237                 /*
9238                  * If this is Sys V, this will not work; pgrp will be
9239                  * set to np because setpgrp just changes a pgrp to be
9240                  * the same as the pid.
9241                  */
9242                 setpgrp(np, pg1);
9243                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
9244                 if (ng == pg1) {
9245                         exit(1);
9246                 } else {
9247                         exit(0);
9248                 }
9249         } else {
9250                 wait(&s);
9251                 exit(s>>8);
9252         }
9253 }
9254
9255 EOF
9256 if { (eval echo configure:9257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
9257 then
9258   ac_cv_func_getpgrp_void=yes
9259 else
9260   echo "configure: failed program was:" >&5
9261   cat conftest.$ac_ext >&5
9262   rm -fr conftest*
9263   ac_cv_func_getpgrp_void=no
9264 fi
9265 rm -fr conftest*
9266
9267
9268 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
9269 if test $ac_cv_func_getpgrp_void = yes; then
9270   { test "$extra_verbose" = "yes" && cat << \EOF
9271     Defining GETPGRP_VOID
9272 EOF
9273 cat >> confdefs.h <<\EOF
9274 #define GETPGRP_VOID 1
9275 EOF
9276 }
9277
9278 fi
9279
9280
9281 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9282 echo "configure:9283: checking for working mmap" >&5
9283 case "$opsys" in ultrix* ) have_mmap=no ;; *)
9284 cat > conftest.$ac_ext <<EOF
9285 #line 9286 "configure"
9286 #include "confdefs.h"
9287 #include <stdio.h>
9288 #include <unistd.h>
9289 #include <fcntl.h>
9290 #include <sys/mman.h>
9291
9292 #ifndef MAP_VARIABLE
9293 #define MAP_VARIABLE 0
9294 #endif
9295
9296 #ifndef MAP_FAILED
9297 #define MAP_FAILED -1
9298 #endif
9299
9300 int main (int argc, char *argv[])
9301 {
9302   int fd = -1;
9303   caddr_t p;
9304 #ifndef MAP_ANONYMOUS
9305   fd = open ("/dev/zero", O_RDWR);
9306   if (fd < 0)
9307     return 1;
9308 #define MAP_ANONYMOUS 0
9309 #endif
9310   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
9311            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
9312            fd, 0) != (void *) MAP_FAILED)
9313     return 0;
9314   perror ("conftest: mmap failed");
9315   return 1;
9316 }
9317 EOF
9318 if { (eval echo configure:9319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
9319 then
9320   have_mmap=yes
9321 else
9322   echo "configure: failed program was:" >&5
9323   cat conftest.$ac_ext >&5
9324   rm -fr conftest*
9325   have_mmap=no
9326 fi
9327 rm -fr conftest* ;;
9328 esac
9329 echo "$ac_t""$have_mmap" 1>&6
9330 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9331     Defining HAVE_MMAP
9332 EOF
9333 cat >> confdefs.h <<\EOF
9334 #define HAVE_MMAP 1
9335 EOF
9336 }
9337
9338
9339 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
9340 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
9341 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9342     Defining REL_ALLOC
9343 EOF
9344 cat >> confdefs.h <<\EOF
9345 #define REL_ALLOC 1
9346 EOF
9347 }
9348
9349
9350 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
9351 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
9352 echo "configure:9353: checking for termios.h" >&5
9353
9354 cat > conftest.$ac_ext <<EOF
9355 #line 9356 "configure"
9356 #include "confdefs.h"
9357 #include <termios.h>
9358 EOF
9359 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9360 { (eval echo configure:9361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9361 ac_err=`grep -v '^ *+' conftest.out`
9362 if test -z "$ac_err"; then
9363   rm -rf conftest*
9364   eval "ac_cv_header_$ac_safe=yes"
9365 else
9366   echo "$ac_err" >&5
9367   echo "configure: failed program was:" >&5
9368   cat conftest.$ac_ext >&5
9369   rm -rf conftest*
9370   eval "ac_cv_header_$ac_safe=no"
9371 fi
9372 rm -f conftest*
9373 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9374   echo "$ac_t""yes" 1>&6
9375   { test "$extra_verbose" = "yes" && cat << \EOF
9376     Defining HAVE_TERMIOS
9377 EOF
9378 cat >> confdefs.h <<\EOF
9379 #define HAVE_TERMIOS 1
9380 EOF
9381 }
9382
9383   { test "$extra_verbose" = "yes" && cat << \EOF
9384     Defining SIGNALS_VIA_CHARACTERS
9385 EOF
9386 cat >> confdefs.h <<\EOF
9387 #define SIGNALS_VIA_CHARACTERS 1
9388 EOF
9389 }
9390
9391   { test "$extra_verbose" = "yes" && cat << \EOF
9392     Defining NO_TERMIO
9393 EOF
9394 cat >> confdefs.h <<\EOF
9395 #define NO_TERMIO 1
9396 EOF
9397 }
9398
9399 else
9400   echo "$ac_t""no" 1>&6
9401 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
9402 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
9403 echo "configure:9404: checking for termio.h" >&5
9404
9405 cat > conftest.$ac_ext <<EOF
9406 #line 9407 "configure"
9407 #include "confdefs.h"
9408 #include <termio.h>
9409 EOF
9410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9411 { (eval echo configure:9412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9412 ac_err=`grep -v '^ *+' conftest.out`
9413 if test -z "$ac_err"; then
9414   rm -rf conftest*
9415   eval "ac_cv_header_$ac_safe=yes"
9416 else
9417   echo "$ac_err" >&5
9418   echo "configure: failed program was:" >&5
9419   cat conftest.$ac_ext >&5
9420   rm -rf conftest*
9421   eval "ac_cv_header_$ac_safe=no"
9422 fi
9423 rm -f conftest*
9424 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9425   echo "$ac_t""yes" 1>&6
9426   { test "$extra_verbose" = "yes" && cat << \EOF
9427     Defining HAVE_TERMIO
9428 EOF
9429 cat >> confdefs.h <<\EOF
9430 #define HAVE_TERMIO 1
9431 EOF
9432 }
9433
9434 else
9435   echo "$ac_t""no" 1>&6
9436 fi
9437
9438 fi
9439
9440
9441
9442 echo $ac_n "checking for socket""... $ac_c" 1>&6
9443 echo "configure:9444: checking for socket" >&5
9444
9445 cat > conftest.$ac_ext <<EOF
9446 #line 9447 "configure"
9447 #include "confdefs.h"
9448 /* System header to define __stub macros and hopefully few prototypes,
9449     which can conflict with char socket(); below.  */
9450 #include <assert.h>
9451 /* Override any gcc2 internal prototype to avoid an error.  */
9452 /* We use char because int might match the return type of a gcc2
9453     builtin and then its argument prototype would still apply.  */
9454 char socket();
9455
9456 int main() {
9457
9458 /* The GNU C library defines this for functions which it implements
9459     to always fail with ENOSYS.  Some functions are actually named
9460     something starting with __ and the normal name is an alias.  */
9461 #if defined (__stub_socket) || defined (__stub___socket)
9462 choke me
9463 #else
9464 socket();
9465 #endif
9466
9467 ; return 0; }
9468 EOF
9469 if { (eval echo configure:9470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9470   rm -rf conftest*
9471   eval "ac_cv_func_socket=yes"
9472 else
9473   echo "configure: failed program was:" >&5
9474   cat conftest.$ac_ext >&5
9475   rm -rf conftest*
9476   eval "ac_cv_func_socket=no"
9477 fi
9478 rm -f conftest*
9479
9480 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9481   echo "$ac_t""yes" 1>&6
9482   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
9483 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
9484 echo "configure:9485: checking for netinet/in.h" >&5
9485
9486 cat > conftest.$ac_ext <<EOF
9487 #line 9488 "configure"
9488 #include "confdefs.h"
9489 #include <netinet/in.h>
9490 EOF
9491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9492 { (eval echo configure:9493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9493 ac_err=`grep -v '^ *+' conftest.out`
9494 if test -z "$ac_err"; then
9495   rm -rf conftest*
9496   eval "ac_cv_header_$ac_safe=yes"
9497 else
9498   echo "$ac_err" >&5
9499   echo "configure: failed program was:" >&5
9500   cat conftest.$ac_ext >&5
9501   rm -rf conftest*
9502   eval "ac_cv_header_$ac_safe=no"
9503 fi
9504 rm -f conftest*
9505 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9506   echo "$ac_t""yes" 1>&6
9507   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
9508 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
9509 echo "configure:9510: checking for arpa/inet.h" >&5
9510
9511 cat > conftest.$ac_ext <<EOF
9512 #line 9513 "configure"
9513 #include "confdefs.h"
9514 #include <arpa/inet.h>
9515 EOF
9516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9517 { (eval echo configure:9518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9518 ac_err=`grep -v '^ *+' conftest.out`
9519 if test -z "$ac_err"; then
9520   rm -rf conftest*
9521   eval "ac_cv_header_$ac_safe=yes"
9522 else
9523   echo "$ac_err" >&5
9524   echo "configure: failed program was:" >&5
9525   cat conftest.$ac_ext >&5
9526   rm -rf conftest*
9527   eval "ac_cv_header_$ac_safe=no"
9528 fi
9529 rm -f conftest*
9530 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9531   echo "$ac_t""yes" 1>&6
9532   
9533   { test "$extra_verbose" = "yes" && cat << \EOF
9534     Defining HAVE_SOCKETS
9535 EOF
9536 cat >> confdefs.h <<\EOF
9537 #define HAVE_SOCKETS 1
9538 EOF
9539 }
9540
9541       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
9542 echo "configure:9543: checking "for sun_len member in struct sockaddr_un"" >&5
9543       cat > conftest.$ac_ext <<EOF
9544 #line 9545 "configure"
9545 #include "confdefs.h"
9546
9547 #include <sys/types.h>
9548 #include <sys/socket.h>
9549 #include <sys/un.h>
9550       
9551 int main() {
9552 static struct sockaddr_un x; x.sun_len = 1;
9553 ; return 0; }
9554 EOF
9555 if { (eval echo configure:9556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9556   rm -rf conftest*
9557   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
9558     Defining HAVE_SOCKADDR_SUN_LEN
9559 EOF
9560 cat >> confdefs.h <<\EOF
9561 #define HAVE_SOCKADDR_SUN_LEN 1
9562 EOF
9563 }
9564
9565 else
9566   echo "configure: failed program was:" >&5
9567   cat conftest.$ac_ext >&5
9568   rm -rf conftest*
9569   echo "$ac_t""no" 1>&6
9570 fi
9571 rm -f conftest*
9572       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
9573 echo "configure:9574: checking "for ip_mreq struct in netinet/in.h"" >&5
9574       cat > conftest.$ac_ext <<EOF
9575 #line 9576 "configure"
9576 #include "confdefs.h"
9577
9578 #include <sys/types.h>
9579 #include <netinet/in.h>
9580       
9581 int main() {
9582 static struct ip_mreq x;
9583 ; return 0; }
9584 EOF
9585 if { (eval echo configure:9586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9586   rm -rf conftest*
9587   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
9588     Defining HAVE_MULTICAST
9589 EOF
9590 cat >> confdefs.h <<\EOF
9591 #define HAVE_MULTICAST 1
9592 EOF
9593 }
9594
9595 else
9596   echo "configure: failed program was:" >&5
9597   cat conftest.$ac_ext >&5
9598   rm -rf conftest*
9599   echo "$ac_t""no" 1>&6
9600 fi
9601 rm -f conftest*
9602 else
9603   echo "$ac_t""no" 1>&6
9604 fi
9605
9606 else
9607   echo "$ac_t""no" 1>&6
9608 fi
9609
9610 else
9611   echo "$ac_t""no" 1>&6
9612 fi
9613
9614
9615 echo $ac_n "checking for msgget""... $ac_c" 1>&6
9616 echo "configure:9617: checking for msgget" >&5
9617
9618 cat > conftest.$ac_ext <<EOF
9619 #line 9620 "configure"
9620 #include "confdefs.h"
9621 /* System header to define __stub macros and hopefully few prototypes,
9622     which can conflict with char msgget(); below.  */
9623 #include <assert.h>
9624 /* Override any gcc2 internal prototype to avoid an error.  */
9625 /* We use char because int might match the return type of a gcc2
9626     builtin and then its argument prototype would still apply.  */
9627 char msgget();
9628
9629 int main() {
9630
9631 /* The GNU C library defines this for functions which it implements
9632     to always fail with ENOSYS.  Some functions are actually named
9633     something starting with __ and the normal name is an alias.  */
9634 #if defined (__stub_msgget) || defined (__stub___msgget)
9635 choke me
9636 #else
9637 msgget();
9638 #endif
9639
9640 ; return 0; }
9641 EOF
9642 if { (eval echo configure:9643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9643   rm -rf conftest*
9644   eval "ac_cv_func_msgget=yes"
9645 else
9646   echo "configure: failed program was:" >&5
9647   cat conftest.$ac_ext >&5
9648   rm -rf conftest*
9649   eval "ac_cv_func_msgget=no"
9650 fi
9651 rm -f conftest*
9652
9653 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
9654   echo "$ac_t""yes" 1>&6
9655   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
9656 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
9657 echo "configure:9658: checking for sys/ipc.h" >&5
9658
9659 cat > conftest.$ac_ext <<EOF
9660 #line 9661 "configure"
9661 #include "confdefs.h"
9662 #include <sys/ipc.h>
9663 EOF
9664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9665 { (eval echo configure:9666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9666 ac_err=`grep -v '^ *+' conftest.out`
9667 if test -z "$ac_err"; then
9668   rm -rf conftest*
9669   eval "ac_cv_header_$ac_safe=yes"
9670 else
9671   echo "$ac_err" >&5
9672   echo "configure: failed program was:" >&5
9673   cat conftest.$ac_ext >&5
9674   rm -rf conftest*
9675   eval "ac_cv_header_$ac_safe=no"
9676 fi
9677 rm -f conftest*
9678 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9679   echo "$ac_t""yes" 1>&6
9680   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
9681 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
9682 echo "configure:9683: checking for sys/msg.h" >&5
9683
9684 cat > conftest.$ac_ext <<EOF
9685 #line 9686 "configure"
9686 #include "confdefs.h"
9687 #include <sys/msg.h>
9688 EOF
9689 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9690 { (eval echo configure:9691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9691 ac_err=`grep -v '^ *+' conftest.out`
9692 if test -z "$ac_err"; then
9693   rm -rf conftest*
9694   eval "ac_cv_header_$ac_safe=yes"
9695 else
9696   echo "$ac_err" >&5
9697   echo "configure: failed program was:" >&5
9698   cat conftest.$ac_ext >&5
9699   rm -rf conftest*
9700   eval "ac_cv_header_$ac_safe=no"
9701 fi
9702 rm -f conftest*
9703 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9704   echo "$ac_t""yes" 1>&6
9705   { test "$extra_verbose" = "yes" && cat << \EOF
9706     Defining HAVE_SYSVIPC
9707 EOF
9708 cat >> confdefs.h <<\EOF
9709 #define HAVE_SYSVIPC 1
9710 EOF
9711 }
9712
9713 else
9714   echo "$ac_t""no" 1>&6
9715 fi
9716
9717 else
9718   echo "$ac_t""no" 1>&6
9719 fi
9720
9721 else
9722   echo "$ac_t""no" 1>&6
9723 fi
9724
9725
9726 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
9727 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
9728 echo "configure:9729: checking for dirent.h" >&5
9729
9730 cat > conftest.$ac_ext <<EOF
9731 #line 9732 "configure"
9732 #include "confdefs.h"
9733 #include <dirent.h>
9734 EOF
9735 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9736 { (eval echo configure:9737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9737 ac_err=`grep -v '^ *+' conftest.out`
9738 if test -z "$ac_err"; then
9739   rm -rf conftest*
9740   eval "ac_cv_header_$ac_safe=yes"
9741 else
9742   echo "$ac_err" >&5
9743   echo "configure: failed program was:" >&5
9744   cat conftest.$ac_ext >&5
9745   rm -rf conftest*
9746   eval "ac_cv_header_$ac_safe=no"
9747 fi
9748 rm -f conftest*
9749 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9750   echo "$ac_t""yes" 1>&6
9751   { test "$extra_verbose" = "yes" && cat << \EOF
9752     Defining SYSV_SYSTEM_DIR
9753 EOF
9754 cat >> confdefs.h <<\EOF
9755 #define SYSV_SYSTEM_DIR 1
9756 EOF
9757 }
9758
9759 else
9760   echo "$ac_t""no" 1>&6
9761 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
9762 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
9763 echo "configure:9764: checking for sys/dir.h" >&5
9764
9765 cat > conftest.$ac_ext <<EOF
9766 #line 9767 "configure"
9767 #include "confdefs.h"
9768 #include <sys/dir.h>
9769 EOF
9770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9771 { (eval echo configure:9772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9772 ac_err=`grep -v '^ *+' conftest.out`
9773 if test -z "$ac_err"; then
9774   rm -rf conftest*
9775   eval "ac_cv_header_$ac_safe=yes"
9776 else
9777   echo "$ac_err" >&5
9778   echo "configure: failed program was:" >&5
9779   cat conftest.$ac_ext >&5
9780   rm -rf conftest*
9781   eval "ac_cv_header_$ac_safe=no"
9782 fi
9783 rm -f conftest*
9784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9785   echo "$ac_t""yes" 1>&6
9786   :
9787 else
9788   echo "$ac_t""no" 1>&6
9789 { test "$extra_verbose" = "yes" && cat << \EOF
9790     Defining NONSYSTEM_DIR_LIBRARY
9791 EOF
9792 cat >> confdefs.h <<\EOF
9793 #define NONSYSTEM_DIR_LIBRARY 1
9794 EOF
9795 }
9796
9797 fi
9798
9799 fi
9800
9801
9802 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
9803 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
9804 echo "configure:9805: checking for nlist.h" >&5
9805
9806 cat > conftest.$ac_ext <<EOF
9807 #line 9808 "configure"
9808 #include "confdefs.h"
9809 #include <nlist.h>
9810 EOF
9811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9812 { (eval echo configure:9813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9813 ac_err=`grep -v '^ *+' conftest.out`
9814 if test -z "$ac_err"; then
9815   rm -rf conftest*
9816   eval "ac_cv_header_$ac_safe=yes"
9817 else
9818   echo "$ac_err" >&5
9819   echo "configure: failed program was:" >&5
9820   cat conftest.$ac_ext >&5
9821   rm -rf conftest*
9822   eval "ac_cv_header_$ac_safe=no"
9823 fi
9824 rm -f conftest*
9825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9826   echo "$ac_t""yes" 1>&6
9827   { test "$extra_verbose" = "yes" && cat << \EOF
9828     Defining NLIST_STRUCT
9829 EOF
9830 cat >> confdefs.h <<\EOF
9831 #define NLIST_STRUCT 1
9832 EOF
9833 }
9834
9835 else
9836   echo "$ac_t""no" 1>&6
9837 fi
9838
9839
9840
9841 echo "checking "for sound support"" 1>&6
9842 echo "configure:9843: checking "for sound support"" >&5
9843 case "$with_sound" in
9844   native | both ) with_native_sound=yes;;
9845   nas    | no   ) with_native_sound=no;;
9846 esac
9847 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
9848
9849 if test "$with_native_sound" != "no"; then
9850     if test -n "$native_sound_lib"; then
9851     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
9852 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
9853 echo "configure:9854: checking for multimedia/audio_device.h" >&5
9854
9855 cat > conftest.$ac_ext <<EOF
9856 #line 9857 "configure"
9857 #include "confdefs.h"
9858 #include <multimedia/audio_device.h>
9859 EOF
9860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9861 { (eval echo configure:9862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9862 ac_err=`grep -v '^ *+' conftest.out`
9863 if test -z "$ac_err"; then
9864   rm -rf conftest*
9865   eval "ac_cv_header_$ac_safe=yes"
9866 else
9867   echo "$ac_err" >&5
9868   echo "configure: failed program was:" >&5
9869   cat conftest.$ac_ext >&5
9870   rm -rf conftest*
9871   eval "ac_cv_header_$ac_safe=no"
9872 fi
9873 rm -f conftest*
9874 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9875   echo "$ac_t""yes" 1>&6
9876   sound_found=yes sound_cflags=""
9877       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
9878    echo "    xemacs will be linked with \"sunplay.o\""
9879  fi
9880 else
9881   echo "$ac_t""no" 1>&6
9882 fi
9883
9884   fi
9885
9886     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
9887     sound_found=yes
9888     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
9889    echo "    xemacs will be linked with \"sunplay.o\""
9890  fi
9891     if test -d "/usr/demo/SOUND/include"
9892       then sound_cflags="-I/usr/demo/SOUND/include"
9893       else sound_cflags="-I/usr/demo/SOUND"
9894     fi
9895     if test -z "$native_sound_lib" ; then
9896       if test -r "/usr/demo/SOUND/lib/libaudio.a"
9897         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
9898         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
9899       fi
9900     fi
9901   fi
9902
9903     if test -z "$sound_found"; then
9904     case "$canonical" in
9905     *-sgi-* )
9906       if test -z "$native_sound_lib"; then
9907         
9908 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
9909 echo "configure:9910: checking for ALopenport in -laudio" >&5
9910 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
9911
9912 xe_check_libs=" -laudio "
9913 cat > conftest.$ac_ext <<EOF
9914 #line 9915 "configure"
9915 #include "confdefs.h"
9916 /* Override any gcc2 internal prototype to avoid an error.  */
9917 /* We use char because int might match the return type of a gcc2
9918     builtin and then its argument prototype would still apply.  */
9919 char ALopenport();
9920
9921 int main() {
9922 ALopenport()
9923 ; return 0; }
9924 EOF
9925 if { (eval echo configure:9926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9926   rm -rf conftest*
9927   eval "ac_cv_lib_$ac_lib_var=yes"
9928 else
9929   echo "configure: failed program was:" >&5
9930   cat conftest.$ac_ext >&5
9931   rm -rf conftest*
9932   eval "ac_cv_lib_$ac_lib_var=no"
9933 fi
9934 rm -f conftest*
9935 xe_check_libs=""
9936
9937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9938   echo "$ac_t""yes" 1>&6
9939   native_sound_lib="-laudio"
9940 else
9941   echo "$ac_t""no" 1>&6
9942 fi
9943
9944
9945       fi
9946       if test -n "$native_sound_lib"; then
9947         sound_found=yes sound_cflags=""
9948         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
9949    echo "    xemacs will be linked with \"sgiplay.o\""
9950  fi
9951       fi ;;
9952     hppa*-hp-hpux* )
9953       if test -z "$native_sound_lib"; then
9954         
9955 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
9956 echo "configure:9957: checking for AOpenAudio in -lAlib" >&5
9957 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
9958
9959 xe_check_libs=" -lAlib "
9960 cat > conftest.$ac_ext <<EOF
9961 #line 9962 "configure"
9962 #include "confdefs.h"
9963 /* Override any gcc2 internal prototype to avoid an error.  */
9964 /* We use char because int might match the return type of a gcc2
9965     builtin and then its argument prototype would still apply.  */
9966 char AOpenAudio();
9967
9968 int main() {
9969 AOpenAudio()
9970 ; return 0; }
9971 EOF
9972 if { (eval echo configure:9973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9973   rm -rf conftest*
9974   eval "ac_cv_lib_$ac_lib_var=yes"
9975 else
9976   echo "configure: failed program was:" >&5
9977   cat conftest.$ac_ext >&5
9978   rm -rf conftest*
9979   eval "ac_cv_lib_$ac_lib_var=no"
9980 fi
9981 rm -f conftest*
9982 xe_check_libs=""
9983
9984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9985   echo "$ac_t""yes" 1>&6
9986   native_sound_lib="-lAlib"
9987 else
9988   echo "$ac_t""no" 1>&6
9989 fi
9990
9991
9992       fi
9993       if test -n "$native_sound_lib"; then
9994         sound_found=yes
9995         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
9996    echo "    xemacs will be linked with \"hpplay.o\""
9997  fi
9998         if test "$GCC" = "yes" # Kludge city
9999           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
10000           else sound_cflags="+e -I/usr/audio/examples"
10001         fi
10002       fi ;;
10003     esac
10004   fi
10005
10006     if test -z "$sound_found"; then
10007     for dir in "machine" "sys" "linux"; do
10008       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
10009 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
10010 echo "configure:10011: checking for ${dir}/soundcard.h" >&5
10011
10012 cat > conftest.$ac_ext <<EOF
10013 #line 10014 "configure"
10014 #include "confdefs.h"
10015 #include <${dir}/soundcard.h>
10016 EOF
10017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10018 { (eval echo configure:10019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10019 ac_err=`grep -v '^ *+' conftest.out`
10020 if test -z "$ac_err"; then
10021   rm -rf conftest*
10022   eval "ac_cv_header_$ac_safe=yes"
10023 else
10024   echo "$ac_err" >&5
10025   echo "configure: failed program was:" >&5
10026   cat conftest.$ac_ext >&5
10027   rm -rf conftest*
10028   eval "ac_cv_header_$ac_safe=no"
10029 fi
10030 rm -f conftest*
10031 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10032   echo "$ac_t""yes" 1>&6
10033   sound_found=yes
10034         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
10035    echo "    xemacs will be linked with \"linuxplay.o\""
10036  fi
10037         { test "$extra_verbose" = "yes" && cat << EOF
10038     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
10039 EOF
10040 cat >> confdefs.h <<EOF
10041 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
10042 EOF
10043 }
10044
10045         break
10046 else
10047   echo "$ac_t""no" 1>&6
10048 fi
10049
10050     done
10051   fi
10052
10053   test "$sound_found" = "yes" && with_native_sound=yes
10054 fi
10055
10056 if test -z "$with_sound"; then
10057   if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then
10058     with_sound=native
10059   fi
10060 fi
10061
10062 if test "$with_native_sound" = "yes"; then
10063   { test "$extra_verbose" = "yes" && cat << \EOF
10064     Defining HAVE_NATIVE_SOUND
10065 EOF
10066 cat >> confdefs.h <<\EOF
10067 #define HAVE_NATIVE_SOUND 1
10068 EOF
10069 }
10070
10071   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
10072 fi
10073
10074 case "$with_sound" in both | nas )
10075   { test "$extra_verbose" = "yes" && cat << \EOF
10076     Defining HAVE_NAS_SOUND
10077 EOF
10078 cat >> confdefs.h <<\EOF
10079 #define HAVE_NAS_SOUND 1
10080 EOF
10081 }
10082
10083   extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
10084    echo "    xemacs will be linked with \"nas.o\""
10085  fi
10086   libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
10087       cat > conftest.$ac_ext <<EOF
10088 #line 10089 "configure"
10089 #include "confdefs.h"
10090 #include <audio/Xtutil.h>
10091 EOF
10092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10093   egrep "AuXtErrorJump" >/dev/null 2>&1; then
10094   :
10095 else
10096   rm -rf conftest*
10097   { test "$extra_verbose" = "yes" && cat << \EOF
10098     Defining NAS_NO_ERROR_JUMP
10099 EOF
10100 cat >> confdefs.h <<\EOF
10101 #define NAS_NO_ERROR_JUMP 1
10102 EOF
10103 }
10104
10105 fi
10106 rm -f conftest*
10107
10108 esac
10109
10110
10111 test -z "$with_tty" && with_tty=yes
10112
10113 if test "$with_tty" = "yes"  ; then
10114   echo "checking for TTY-related features" 1>&6
10115 echo "configure:10116: checking for TTY-related features" >&5
10116   { test "$extra_verbose" = "yes" && cat << \EOF
10117     Defining HAVE_TTY
10118 EOF
10119 cat >> confdefs.h <<\EOF
10120 #define HAVE_TTY 1
10121 EOF
10122 }
10123
10124   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
10125    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\""
10126  fi
10127
10128     if test -z "$with_ncurses"; then
10129     
10130 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
10131 echo "configure:10132: checking for tgetent in -lncurses" >&5
10132 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
10133
10134 xe_check_libs=" -lncurses "
10135 cat > conftest.$ac_ext <<EOF
10136 #line 10137 "configure"
10137 #include "confdefs.h"
10138 /* Override any gcc2 internal prototype to avoid an error.  */
10139 /* We use char because int might match the return type of a gcc2
10140     builtin and then its argument prototype would still apply.  */
10141 char tgetent();
10142
10143 int main() {
10144 tgetent()
10145 ; return 0; }
10146 EOF
10147 if { (eval echo configure:10148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10148   rm -rf conftest*
10149   eval "ac_cv_lib_$ac_lib_var=yes"
10150 else
10151   echo "configure: failed program was:" >&5
10152   cat conftest.$ac_ext >&5
10153   rm -rf conftest*
10154   eval "ac_cv_lib_$ac_lib_var=no"
10155 fi
10156 rm -f conftest*
10157 xe_check_libs=""
10158
10159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10160   echo "$ac_t""yes" 1>&6
10161   with_ncurses=yes
10162 else
10163   echo "$ac_t""no" 1>&6
10164 with_ncurses=no
10165 fi
10166
10167
10168   fi
10169   if test "$with_ncurses" = "yes"; then
10170     { test "$extra_verbose" = "yes" && cat << \EOF
10171     Defining HAVE_NCURSES
10172 EOF
10173 cat >> confdefs.h <<\EOF
10174 #define HAVE_NCURSES 1
10175 EOF
10176 }
10177
10178     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
10179 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
10180 echo "configure:10181: checking for ncurses/curses.h" >&5
10181
10182 cat > conftest.$ac_ext <<EOF
10183 #line 10184 "configure"
10184 #include "confdefs.h"
10185 #include <ncurses/curses.h>
10186 EOF
10187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10188 { (eval echo configure:10189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10189 ac_err=`grep -v '^ *+' conftest.out`
10190 if test -z "$ac_err"; then
10191   rm -rf conftest*
10192   eval "ac_cv_header_$ac_safe=yes"
10193 else
10194   echo "$ac_err" >&5
10195   echo "configure: failed program was:" >&5
10196   cat conftest.$ac_ext >&5
10197   rm -rf conftest*
10198   eval "ac_cv_header_$ac_safe=no"
10199 fi
10200 rm -f conftest*
10201 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10202   echo "$ac_t""yes" 1>&6
10203   curses_h_path=ncurses/curses.h
10204 else
10205   echo "$ac_t""no" 1>&6
10206 fi
10207
10208     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
10209 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
10210 echo "configure:10211: checking for ncurses/term.h" >&5
10211
10212 cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215 #include <ncurses/term.h>
10216 EOF
10217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10218 { (eval echo configure:10219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10219 ac_err=`grep -v '^ *+' conftest.out`
10220 if test -z "$ac_err"; then
10221   rm -rf conftest*
10222   eval "ac_cv_header_$ac_safe=yes"
10223 else
10224   echo "$ac_err" >&5
10225   echo "configure: failed program was:" >&5
10226   cat conftest.$ac_ext >&5
10227   rm -rf conftest*
10228   eval "ac_cv_header_$ac_safe=no"
10229 fi
10230 rm -f conftest*
10231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10232   echo "$ac_t""yes" 1>&6
10233   term_h_path=ncurses/term.h
10234 else
10235   echo "$ac_t""no" 1>&6
10236 fi
10237
10238     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
10239    echo "    xemacs will be linked with \"terminfo.o\""
10240  fi
10241     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
10242
10243     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
10244                         save_c_switch_site="$c_switch_site"
10245       c_switch_site="$c_switch_site -I/usr/include/ncurses"
10246       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
10247 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
10248 echo "configure:10249: checking for ncurses/curses.h" >&5
10249
10250 cat > conftest.$ac_ext <<EOF
10251 #line 10252 "configure"
10252 #include "confdefs.h"
10253 #include <ncurses/curses.h>
10254 EOF
10255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10256 { (eval echo configure:10257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10257 ac_err=`grep -v '^ *+' conftest.out`
10258 if test -z "$ac_err"; then
10259   rm -rf conftest*
10260   eval "ac_cv_header_$ac_safe=yes"
10261 else
10262   echo "$ac_err" >&5
10263   echo "configure: failed program was:" >&5
10264   cat conftest.$ac_ext >&5
10265   rm -rf conftest*
10266   eval "ac_cv_header_$ac_safe=no"
10267 fi
10268 rm -f conftest*
10269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10270   echo "$ac_t""yes" 1>&6
10271   curses_h_path=ncurses/curses.h
10272 else
10273   echo "$ac_t""no" 1>&6
10274 fi
10275
10276       if test "$ac_cv_header_ncurses_curses_h" = "yes"
10277         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
10278         else c_switch_site="$save_c_switch_site"
10279       fi
10280     fi
10281   else         if test "$have_terminfo" = "yes"; then
10282       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
10283    echo "    xemacs will be linked with \"terminfo.o\""
10284  fi
10285       if test -n "$libs_termcap"; then
10286         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
10287       else
10288         for lib in curses termlib termcap; do
10289           
10290 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
10291 echo "configure:10292: checking for tgetent in -l$lib" >&5
10292 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
10293
10294 xe_check_libs=" -l$lib "
10295 cat > conftest.$ac_ext <<EOF
10296 #line 10297 "configure"
10297 #include "confdefs.h"
10298 /* Override any gcc2 internal prototype to avoid an error.  */
10299 /* We use char because int might match the return type of a gcc2
10300     builtin and then its argument prototype would still apply.  */
10301 char tgetent();
10302
10303 int main() {
10304 tgetent()
10305 ; return 0; }
10306 EOF
10307 if { (eval echo configure:10308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10308   rm -rf conftest*
10309   eval "ac_cv_lib_$ac_lib_var=yes"
10310 else
10311   echo "configure: failed program was:" >&5
10312   cat conftest.$ac_ext >&5
10313   rm -rf conftest*
10314   eval "ac_cv_lib_$ac_lib_var=no"
10315 fi
10316 rm -f conftest*
10317 xe_check_libs=""
10318
10319 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10320   echo "$ac_t""yes" 1>&6
10321   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
10322 else
10323   echo "$ac_t""no" 1>&6
10324 fi
10325
10326
10327         done
10328       fi
10329     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
10330    echo "    xemacs will be linked with \"tparam.o\""
10331  fi
10332                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
10333       if test -n "$libs_termcap"; then
10334         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
10335       else
10336         
10337 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
10338 echo "configure:10339: checking for tgetent in -lcurses" >&5
10339 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
10340
10341 xe_check_libs=" -lcurses "
10342 cat > conftest.$ac_ext <<EOF
10343 #line 10344 "configure"
10344 #include "confdefs.h"
10345 /* Override any gcc2 internal prototype to avoid an error.  */
10346 /* We use char because int might match the return type of a gcc2
10347     builtin and then its argument prototype would still apply.  */
10348 char tgetent();
10349
10350 int main() {
10351 tgetent()
10352 ; return 0; }
10353 EOF
10354 if { (eval echo configure:10355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10355   rm -rf conftest*
10356   eval "ac_cv_lib_$ac_lib_var=yes"
10357 else
10358   echo "configure: failed program was:" >&5
10359   cat conftest.$ac_ext >&5
10360   rm -rf conftest*
10361   eval "ac_cv_lib_$ac_lib_var=no"
10362 fi
10363 rm -f conftest*
10364 xe_check_libs=""
10365
10366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10367   echo "$ac_t""yes" 1>&6
10368   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
10369 else
10370   echo "$ac_t""no" 1>&6
10371 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
10372 echo "configure:10373: checking for tgetent in -ltermcap" >&5
10373 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
10374
10375 xe_check_libs=" -ltermcap "
10376 cat > conftest.$ac_ext <<EOF
10377 #line 10378 "configure"
10378 #include "confdefs.h"
10379 /* Override any gcc2 internal prototype to avoid an error.  */
10380 /* We use char because int might match the return type of a gcc2
10381     builtin and then its argument prototype would still apply.  */
10382 char tgetent();
10383
10384 int main() {
10385 tgetent()
10386 ; return 0; }
10387 EOF
10388 if { (eval echo configure:10389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10389   rm -rf conftest*
10390   eval "ac_cv_lib_$ac_lib_var=yes"
10391 else
10392   echo "configure: failed program was:" >&5
10393   cat conftest.$ac_ext >&5
10394   rm -rf conftest*
10395   eval "ac_cv_lib_$ac_lib_var=no"
10396 fi
10397 rm -f conftest*
10398 xe_check_libs=""
10399
10400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10401   echo "$ac_t""yes" 1>&6
10402   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
10403 else
10404   echo "$ac_t""no" 1>&6
10405 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
10406    echo "    xemacs will be linked with \"termcap.o\""
10407  fi
10408 fi
10409
10410
10411 fi
10412
10413
10414       fi
10415     fi
10416   fi
10417   { test "$extra_verbose" = "yes" && cat << EOF
10418     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
10419 EOF
10420 cat >> confdefs.h <<EOF
10421 #define CURSES_H_PATH "${curses_h_path-curses.h}"
10422 EOF
10423 }
10424
10425   { test "$extra_verbose" = "yes" && cat << EOF
10426     Defining TERM_H_PATH = "${term_h_path-term.h}"
10427 EOF
10428 cat >> confdefs.h <<EOF
10429 #define TERM_H_PATH "${term_h_path-term.h}"
10430 EOF
10431 }
10432
10433
10434     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
10435 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
10436 echo "configure:10437: checking for gpm.h" >&5
10437
10438 cat > conftest.$ac_ext <<EOF
10439 #line 10440 "configure"
10440 #include "confdefs.h"
10441 #include <gpm.h>
10442 EOF
10443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10444 { (eval echo configure:10445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10445 ac_err=`grep -v '^ *+' conftest.out`
10446 if test -z "$ac_err"; then
10447   rm -rf conftest*
10448   eval "ac_cv_header_$ac_safe=yes"
10449 else
10450   echo "$ac_err" >&5
10451   echo "configure: failed program was:" >&5
10452   cat conftest.$ac_ext >&5
10453   rm -rf conftest*
10454   eval "ac_cv_header_$ac_safe=no"
10455 fi
10456 rm -f conftest*
10457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10458   echo "$ac_t""yes" 1>&6
10459   :
10460 else
10461   echo "$ac_t""no" 1>&6
10462 with_gpm=no
10463 fi
10464  }
10465   test -z "$with_gpm" && { 
10466 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
10467 echo "configure:10468: checking for Gpm_Open in -lgpm" >&5
10468 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
10469
10470 xe_check_libs=" -lgpm "
10471 cat > conftest.$ac_ext <<EOF
10472 #line 10473 "configure"
10473 #include "confdefs.h"
10474 /* Override any gcc2 internal prototype to avoid an error.  */
10475 /* We use char because int might match the return type of a gcc2
10476     builtin and then its argument prototype would still apply.  */
10477 char Gpm_Open();
10478
10479 int main() {
10480 Gpm_Open()
10481 ; return 0; }
10482 EOF
10483 if { (eval echo configure:10484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10484   rm -rf conftest*
10485   eval "ac_cv_lib_$ac_lib_var=yes"
10486 else
10487   echo "configure: failed program was:" >&5
10488   cat conftest.$ac_ext >&5
10489   rm -rf conftest*
10490   eval "ac_cv_lib_$ac_lib_var=no"
10491 fi
10492 rm -f conftest*
10493 xe_check_libs=""
10494
10495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10496   echo "$ac_t""yes" 1>&6
10497   with_gpm=yes
10498 else
10499   echo "$ac_t""no" 1>&6
10500 with_gpm=no
10501 fi
10502
10503  }
10504   if test "$with_gpm" = "yes"; then
10505     { test "$extra_verbose" = "yes" && cat << \EOF
10506     Defining HAVE_GPM
10507 EOF
10508 cat >> confdefs.h <<\EOF
10509 #define HAVE_GPM 1
10510 EOF
10511 }
10512
10513     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
10514    echo "    xemacs will be linked with \"gpmevent.o\""
10515  fi
10516     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
10517   fi
10518
10519 else   for feature in ncurses gpm; do
10520     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10521       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
10522     fi
10523     eval "with_${feature}=no"
10524   done
10525 fi 
10526 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
10527    echo "    xemacs will be linked with \"event-unixoid.o\""
10528  fi
10529
10530
10531 echo "checking for database support" 1>&6
10532 echo "configure:10533: checking for database support" >&5
10533
10534 if test "$with_database_gnudbm" != "no"; then
10535   for ac_hdr in ndbm.h
10536 do
10537 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10538 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10539 echo "configure:10540: checking for $ac_hdr" >&5
10540
10541 cat > conftest.$ac_ext <<EOF
10542 #line 10543 "configure"
10543 #include "confdefs.h"
10544 #include <$ac_hdr>
10545 EOF
10546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10547 { (eval echo configure:10548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10548 ac_err=`grep -v '^ *+' conftest.out`
10549 if test -z "$ac_err"; then
10550   rm -rf conftest*
10551   eval "ac_cv_header_$ac_safe=yes"
10552 else
10553   echo "$ac_err" >&5
10554   echo "configure: failed program was:" >&5
10555   cat conftest.$ac_ext >&5
10556   rm -rf conftest*
10557   eval "ac_cv_header_$ac_safe=no"
10558 fi
10559 rm -f conftest*
10560 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10561   echo "$ac_t""yes" 1>&6
10562     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10563   { test "$extra_verbose" = "yes" && cat << EOF
10564     Defining $ac_tr_hdr
10565 EOF
10566 cat >> confdefs.h <<EOF
10567 #define $ac_tr_hdr 1
10568 EOF
10569 }
10570  have_ndbm_h=yes
10571 else
10572   echo "$ac_t""no" 1>&6
10573 fi
10574 done
10575
10576   if test "$have_ndbm_h" = "yes"; then
10577     
10578 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
10579 echo "configure:10580: checking for dbm_open in -lgdbm" >&5
10580 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
10581
10582 xe_check_libs=" -lgdbm "
10583 cat > conftest.$ac_ext <<EOF
10584 #line 10585 "configure"
10585 #include "confdefs.h"
10586 /* Override any gcc2 internal prototype to avoid an error.  */
10587 /* We use char because int might match the return type of a gcc2
10588     builtin and then its argument prototype would still apply.  */
10589 char dbm_open();
10590
10591 int main() {
10592 dbm_open()
10593 ; return 0; }
10594 EOF
10595 if { (eval echo configure:10596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10596   rm -rf conftest*
10597   eval "ac_cv_lib_$ac_lib_var=yes"
10598 else
10599   echo "configure: failed program was:" >&5
10600   cat conftest.$ac_ext >&5
10601   rm -rf conftest*
10602   eval "ac_cv_lib_$ac_lib_var=no"
10603 fi
10604 rm -f conftest*
10605 xe_check_libs=""
10606
10607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10608   echo "$ac_t""yes" 1>&6
10609   with_database_gnudbm=yes have_libgdbm=yes
10610 else
10611   echo "$ac_t""no" 1>&6
10612 fi
10613
10614
10615   fi
10616   if test "$with_database_gnudbm" != "yes"; then
10617     echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
10618 echo "configure:10619: checking for dbm_open" >&5
10619
10620 cat > conftest.$ac_ext <<EOF
10621 #line 10622 "configure"
10622 #include "confdefs.h"
10623 /* System header to define __stub macros and hopefully few prototypes,
10624     which can conflict with char dbm_open(); below.  */
10625 #include <assert.h>
10626 /* Override any gcc2 internal prototype to avoid an error.  */
10627 /* We use char because int might match the return type of a gcc2
10628     builtin and then its argument prototype would still apply.  */
10629 char dbm_open();
10630
10631 int main() {
10632
10633 /* The GNU C library defines this for functions which it implements
10634     to always fail with ENOSYS.  Some functions are actually named
10635     something starting with __ and the normal name is an alias.  */
10636 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
10637 choke me
10638 #else
10639 dbm_open();
10640 #endif
10641
10642 ; return 0; }
10643 EOF
10644 if { (eval echo configure:10645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10645   rm -rf conftest*
10646   eval "ac_cv_func_dbm_open=yes"
10647 else
10648   echo "configure: failed program was:" >&5
10649   cat conftest.$ac_ext >&5
10650   rm -rf conftest*
10651   eval "ac_cv_func_dbm_open=no"
10652 fi
10653 rm -f conftest*
10654
10655 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
10656   echo "$ac_t""yes" 1>&6
10657   with_database_gnudbm=yes
10658 else
10659   echo "$ac_t""no" 1>&6
10660 fi
10661
10662       fi
10663   if test "$with_database_gnudbm" = "yes"; then
10664     { test "$extra_verbose" = "yes" && cat << \EOF
10665     Defining HAVE_DBM
10666 EOF
10667 cat >> confdefs.h <<\EOF
10668 #define HAVE_DBM 1
10669 EOF
10670 }
10671
10672     test "$have_libgdbm" = "yes" && LIBS="-lgdbm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdbm\" to \$LIBS"; fi
10673     with_database_dbm=no
10674   else with_database_gnudbm=no
10675   fi
10676 fi
10677
10678 if test "$with_database_dbm" != "no"; then
10679   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
10680 echo "configure:10681: checking for dbm_open" >&5
10681
10682 cat > conftest.$ac_ext <<EOF
10683 #line 10684 "configure"
10684 #include "confdefs.h"
10685 /* System header to define __stub macros and hopefully few prototypes,
10686     which can conflict with char dbm_open(); below.  */
10687 #include <assert.h>
10688 /* Override any gcc2 internal prototype to avoid an error.  */
10689 /* We use char because int might match the return type of a gcc2
10690     builtin and then its argument prototype would still apply.  */
10691 char dbm_open();
10692
10693 int main() {
10694
10695 /* The GNU C library defines this for functions which it implements
10696     to always fail with ENOSYS.  Some functions are actually named
10697     something starting with __ and the normal name is an alias.  */
10698 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
10699 choke me
10700 #else
10701 dbm_open();
10702 #endif
10703
10704 ; return 0; }
10705 EOF
10706 if { (eval echo configure:10707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10707   rm -rf conftest*
10708   eval "ac_cv_func_dbm_open=yes"
10709 else
10710   echo "configure: failed program was:" >&5
10711   cat conftest.$ac_ext >&5
10712   rm -rf conftest*
10713   eval "ac_cv_func_dbm_open=no"
10714 fi
10715 rm -f conftest*
10716
10717 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
10718   echo "$ac_t""yes" 1>&6
10719   with_database_dbm=yes need_libdbm=no
10720 else
10721   echo "$ac_t""no" 1>&6
10722 fi
10723
10724   if test "$need_libdbm" != "no"; then
10725     
10726 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
10727 echo "configure:10728: checking for dbm_open in -ldbm" >&5
10728 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
10729
10730 xe_check_libs=" -ldbm "
10731 cat > conftest.$ac_ext <<EOF
10732 #line 10733 "configure"
10733 #include "confdefs.h"
10734 /* Override any gcc2 internal prototype to avoid an error.  */
10735 /* We use char because int might match the return type of a gcc2
10736     builtin and then its argument prototype would still apply.  */
10737 char dbm_open();
10738
10739 int main() {
10740 dbm_open()
10741 ; return 0; }
10742 EOF
10743 if { (eval echo configure:10744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10744   rm -rf conftest*
10745   eval "ac_cv_lib_$ac_lib_var=yes"
10746 else
10747   echo "configure: failed program was:" >&5
10748   cat conftest.$ac_ext >&5
10749   rm -rf conftest*
10750   eval "ac_cv_lib_$ac_lib_var=no"
10751 fi
10752 rm -f conftest*
10753 xe_check_libs=""
10754
10755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10756   echo "$ac_t""yes" 1>&6
10757   with_database_dbm=yes need_libdbm=yes
10758 else
10759   echo "$ac_t""no" 1>&6
10760 fi
10761
10762
10763   fi
10764   if test "$with_database_dbm" = "yes"; then
10765     { test "$extra_verbose" = "yes" && cat << \EOF
10766     Defining HAVE_DBM
10767 EOF
10768 cat >> confdefs.h <<\EOF
10769 #define HAVE_DBM 1
10770 EOF
10771 }
10772
10773     test "$need_libdbm" = "yes" && LIBS="-ldbm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldbm\" to \$LIBS"; fi
10774   else with_database_dbm=no
10775   fi
10776 fi
10777
10778 if test "$with_database_berkdb" != "no"; then
10779   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
10780 echo "configure:10781: checking for Berkeley db.h" >&5
10781   for path in "db/db.h" "db.h"; do
10782     cat > conftest.$ac_ext <<EOF
10783 #line 10784 "configure"
10784 #include "confdefs.h"
10785 #ifdef HAVE_INTTYPES_H
10786 #define __BIT_TYPES_DEFINED__
10787 #include <inttypes.h>
10788 typedef uint8_t  u_int8_t;
10789 typedef uint16_t u_int16_t;
10790 typedef uint32_t u_int32_t;
10791 #ifdef WE_DONT_NEED_QUADS
10792 typedef uint64_t u_int64_t;
10793 #endif
10794 #endif
10795 #include <$path>
10796
10797 int main() {
10798
10799 ; return 0; }
10800 EOF
10801 if { (eval echo configure:10802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10802   rm -rf conftest*
10803   db_h_path="$path"; break
10804 else
10805   echo "configure: failed program was:" >&5
10806   cat conftest.$ac_ext >&5
10807 fi
10808 rm -f conftest*
10809   done
10810   if test -z "$db_h_path" 
10811   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
10812   else echo "$ac_t""$db_h_path" 1>&6
10813   fi
10814
10815   if test "$with_database_berkdb" != "no"; then
10816     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
10817 echo "configure:10818: checking for Berkeley DB version" >&5
10818     cat > conftest.$ac_ext <<EOF
10819 #line 10820 "configure"
10820 #include "confdefs.h"
10821 #include <$db_h_path>
10822 #if DB_VERSION_MAJOR > 1
10823 yes
10824 #endif
10825
10826 EOF
10827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10828   egrep "yes" >/dev/null 2>&1; then
10829   rm -rf conftest*
10830   echo "$ac_t""2" 1>&6; dbfunc=db_open
10831 else
10832   rm -rf conftest*
10833   echo "$ac_t""1" 1>&6; dbfunc=dbopen
10834 fi
10835 rm -f conftest*
10836
10837     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
10838 echo "configure:10839: checking for $dbfunc" >&5
10839
10840 cat > conftest.$ac_ext <<EOF
10841 #line 10842 "configure"
10842 #include "confdefs.h"
10843 /* System header to define __stub macros and hopefully few prototypes,
10844     which can conflict with char $dbfunc(); below.  */
10845 #include <assert.h>
10846 /* Override any gcc2 internal prototype to avoid an error.  */
10847 /* We use char because int might match the return type of a gcc2
10848     builtin and then its argument prototype would still apply.  */
10849 char $dbfunc();
10850
10851 int main() {
10852
10853 /* The GNU C library defines this for functions which it implements
10854     to always fail with ENOSYS.  Some functions are actually named
10855     something starting with __ and the normal name is an alias.  */
10856 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
10857 choke me
10858 #else
10859 $dbfunc();
10860 #endif
10861
10862 ; return 0; }
10863 EOF
10864 if { (eval echo configure:10865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10865   rm -rf conftest*
10866   eval "ac_cv_func_$dbfunc=yes"
10867 else
10868   echo "configure: failed program was:" >&5
10869   cat conftest.$ac_ext >&5
10870   rm -rf conftest*
10871   eval "ac_cv_func_$dbfunc=no"
10872 fi
10873 rm -f conftest*
10874
10875 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
10876   echo "$ac_t""yes" 1>&6
10877   with_database_berkdb=yes need_libdb=no
10878 else
10879   echo "$ac_t""no" 1>&6
10880
10881     
10882 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
10883 echo "configure:10884: checking for $dbfunc in -ldb" >&5
10884 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
10885
10886 xe_check_libs=" -ldb "
10887 cat > conftest.$ac_ext <<EOF
10888 #line 10889 "configure"
10889 #include "confdefs.h"
10890 /* Override any gcc2 internal prototype to avoid an error.  */
10891 /* We use char because int might match the return type of a gcc2
10892     builtin and then its argument prototype would still apply.  */
10893 char $dbfunc();
10894
10895 int main() {
10896 $dbfunc()
10897 ; return 0; }
10898 EOF
10899 if { (eval echo configure:10900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10900   rm -rf conftest*
10901   eval "ac_cv_lib_$ac_lib_var=yes"
10902 else
10903   echo "configure: failed program was:" >&5
10904   cat conftest.$ac_ext >&5
10905   rm -rf conftest*
10906   eval "ac_cv_lib_$ac_lib_var=no"
10907 fi
10908 rm -f conftest*
10909 xe_check_libs=""
10910
10911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10912   echo "$ac_t""yes" 1>&6
10913   with_database_berkdb=yes need_libdb=yes
10914 else
10915   echo "$ac_t""no" 1>&6
10916 fi
10917
10918
10919 fi
10920
10921   fi
10922
10923   if test "$with_database_berkdb" = "yes"; then
10924     { test "$extra_verbose" = "yes" && cat << EOF
10925     Defining DB_H_PATH = "$db_h_path"
10926 EOF
10927 cat >> confdefs.h <<EOF
10928 #define DB_H_PATH "$db_h_path"
10929 EOF
10930 }
10931
10932     { test "$extra_verbose" = "yes" && cat << \EOF
10933     Defining HAVE_BERKELEY_DB
10934 EOF
10935 cat >> confdefs.h <<\EOF
10936 #define HAVE_BERKELEY_DB 1
10937 EOF
10938 }
10939
10940     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
10941   else with_database_berkdb=no
10942   fi
10943 fi
10944
10945 if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
10946      != "no no no"; then
10947   { test "$extra_verbose" = "yes" && cat << \EOF
10948     Defining HAVE_DATABASE
10949 EOF
10950 cat >> confdefs.h <<\EOF
10951 #define HAVE_DATABASE 1
10952 EOF
10953 }
10954
10955   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
10956    echo "    xemacs will be linked with \"database.o\""
10957  fi
10958 fi
10959
10960 if test "$with_socks" = "yes"; then
10961   
10962 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
10963 echo "configure:10964: checking for SOCKSinit in -lsocks" >&5
10964 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
10965
10966 xe_check_libs=" -lsocks "
10967 cat > conftest.$ac_ext <<EOF
10968 #line 10969 "configure"
10969 #include "confdefs.h"
10970 /* Override any gcc2 internal prototype to avoid an error.  */
10971 /* We use char because int might match the return type of a gcc2
10972     builtin and then its argument prototype would still apply.  */
10973 char SOCKSinit();
10974
10975 int main() {
10976 SOCKSinit()
10977 ; return 0; }
10978 EOF
10979 if { (eval echo configure:10980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10980   rm -rf conftest*
10981   eval "ac_cv_lib_$ac_lib_var=yes"
10982 else
10983   echo "configure: failed program was:" >&5
10984   cat conftest.$ac_ext >&5
10985   rm -rf conftest*
10986   eval "ac_cv_lib_$ac_lib_var=no"
10987 fi
10988 rm -f conftest*
10989 xe_check_libs=""
10990
10991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10992   echo "$ac_t""yes" 1>&6
10993     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10994     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10995   { test "$extra_verbose" = "yes" && cat << EOF
10996     Defining $ac_tr_lib
10997 EOF
10998 cat >> confdefs.h <<EOF
10999 #define $ac_tr_lib 1
11000 EOF
11001 }
11002
11003   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
11004
11005 else
11006   echo "$ac_t""no" 1>&6
11007 fi
11008
11009
11010   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
11011     Defining HAVE_SOCKS
11012 EOF
11013 cat >> confdefs.h <<\EOF
11014 #define HAVE_SOCKS 1
11015 EOF
11016 }
11017
11018 fi
11019
11020 if test "$usage_tracking" = "yes"; then
11021   { test "$extra_verbose" = "yes" && cat << \EOF
11022     Defining USAGE_TRACKING
11023 EOF
11024 cat >> confdefs.h <<\EOF
11025 #define USAGE_TRACKING 1
11026 EOF
11027 }
11028
11029   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
11030 fi
11031
11032 for ac_hdr in dlfcn.h
11033 do
11034 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11035 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11036 echo "configure:11037: checking for $ac_hdr" >&5
11037
11038 cat > conftest.$ac_ext <<EOF
11039 #line 11040 "configure"
11040 #include "confdefs.h"
11041 #include <$ac_hdr>
11042 EOF
11043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11044 { (eval echo configure:11045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11045 ac_err=`grep -v '^ *+' conftest.out`
11046 if test -z "$ac_err"; then
11047   rm -rf conftest*
11048   eval "ac_cv_header_$ac_safe=yes"
11049 else
11050   echo "$ac_err" >&5
11051   echo "configure: failed program was:" >&5
11052   cat conftest.$ac_ext >&5
11053   rm -rf conftest*
11054   eval "ac_cv_header_$ac_safe=no"
11055 fi
11056 rm -f conftest*
11057 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11058   echo "$ac_t""yes" 1>&6
11059     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11060   { test "$extra_verbose" = "yes" && cat << EOF
11061     Defining $ac_tr_hdr
11062 EOF
11063 cat >> confdefs.h <<EOF
11064 #define $ac_tr_hdr 1
11065 EOF
11066 }
11067  have_dlfcn=yes
11068 else
11069   echo "$ac_t""no" 1>&6
11070 fi
11071 done
11072
11073 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11074 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
11075 echo "configure:11076: checking for dlopen in -ldl" >&5
11076 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
11077
11078 xe_check_libs=" -ldl "
11079 cat > conftest.$ac_ext <<EOF
11080 #line 11081 "configure"
11081 #include "confdefs.h"
11082 /* Override any gcc2 internal prototype to avoid an error.  */
11083 /* We use char because int might match the return type of a gcc2
11084     builtin and then its argument prototype would still apply.  */
11085 char dlopen();
11086
11087 int main() {
11088 dlopen()
11089 ; return 0; }
11090 EOF
11091 if { (eval echo configure:11092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11092   rm -rf conftest*
11093   eval "ac_cv_lib_$ac_lib_var=yes"
11094 else
11095   echo "configure: failed program was:" >&5
11096   cat conftest.$ac_ext >&5
11097   rm -rf conftest*
11098   eval "ac_cv_lib_$ac_lib_var=no"
11099 fi
11100 rm -f conftest*
11101 xe_check_libs=""
11102
11103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11104   echo "$ac_t""yes" 1>&6
11105   { test "$extra_verbose" = "yes" && cat << \EOF
11106     Defining HAVE_DLOPEN
11107 EOF
11108 cat >> confdefs.h <<\EOF
11109 #define HAVE_DLOPEN 1
11110 EOF
11111 }
11112  DLL_LIB=dl;  with_shlib=yes
11113 else
11114   echo "$ac_t""no" 1>&6
11115 fi
11116
11117  }
11118 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11119 echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6
11120 echo "configure:11121: checking for _dlopen in -lc" >&5
11121 ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'`
11122
11123 xe_check_libs=" -lc "
11124 cat > conftest.$ac_ext <<EOF
11125 #line 11126 "configure"
11126 #include "confdefs.h"
11127 /* Override any gcc2 internal prototype to avoid an error.  */
11128 /* We use char because int might match the return type of a gcc2
11129     builtin and then its argument prototype would still apply.  */
11130 char _dlopen();
11131
11132 int main() {
11133 _dlopen()
11134 ; return 0; }
11135 EOF
11136 if { (eval echo configure:11137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11137   rm -rf conftest*
11138   eval "ac_cv_lib_$ac_lib_var=yes"
11139 else
11140   echo "configure: failed program was:" >&5
11141   cat conftest.$ac_ext >&5
11142   rm -rf conftest*
11143   eval "ac_cv_lib_$ac_lib_var=no"
11144 fi
11145 rm -f conftest*
11146 xe_check_libs=""
11147
11148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11149   echo "$ac_t""yes" 1>&6
11150   { test "$extra_verbose" = "yes" && cat << \EOF
11151     Defining HAVE_DLOPEN
11152 EOF
11153 cat >> confdefs.h <<\EOF
11154 #define HAVE_DLOPEN 1
11155 EOF
11156 }
11157  DLL_LIB=;   with_shlib=yes
11158 else
11159   echo "$ac_t""no" 1>&6
11160 fi
11161
11162  }
11163 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11164 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
11165 echo "configure:11166: checking for dlopen in -lc" >&5
11166 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
11167
11168 xe_check_libs=" -lc "
11169 cat > conftest.$ac_ext <<EOF
11170 #line 11171 "configure"
11171 #include "confdefs.h"
11172 /* Override any gcc2 internal prototype to avoid an error.  */
11173 /* We use char because int might match the return type of a gcc2
11174     builtin and then its argument prototype would still apply.  */
11175 char dlopen();
11176
11177 int main() {
11178 dlopen()
11179 ; return 0; }
11180 EOF
11181 if { (eval echo configure:11182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11182   rm -rf conftest*
11183   eval "ac_cv_lib_$ac_lib_var=yes"
11184 else
11185   echo "configure: failed program was:" >&5
11186   cat conftest.$ac_ext >&5
11187   rm -rf conftest*
11188   eval "ac_cv_lib_$ac_lib_var=no"
11189 fi
11190 rm -f conftest*
11191 xe_check_libs=""
11192
11193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11194   echo "$ac_t""yes" 1>&6
11195   { test "$extra_verbose" = "yes" && cat << \EOF
11196     Defining HAVE_DLOPEN
11197 EOF
11198 cat >> confdefs.h <<\EOF
11199 #define HAVE_DLOPEN 1
11200 EOF
11201 }
11202  DLL_LIB=;   with_shlib=yes
11203 else
11204   echo "$ac_t""no" 1>&6
11205 fi
11206
11207  }
11208 test -z "$with_shlib" && { 
11209 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
11210 echo "configure:11211: checking for shl_load in -ldld" >&5
11211 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
11212
11213 xe_check_libs=" -ldld "
11214 cat > conftest.$ac_ext <<EOF
11215 #line 11216 "configure"
11216 #include "confdefs.h"
11217 /* Override any gcc2 internal prototype to avoid an error.  */
11218 /* We use char because int might match the return type of a gcc2
11219     builtin and then its argument prototype would still apply.  */
11220 char shl_load();
11221
11222 int main() {
11223 shl_load()
11224 ; return 0; }
11225 EOF
11226 if { (eval echo configure:11227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11227   rm -rf conftest*
11228   eval "ac_cv_lib_$ac_lib_var=yes"
11229 else
11230   echo "configure: failed program was:" >&5
11231   cat conftest.$ac_ext >&5
11232   rm -rf conftest*
11233   eval "ac_cv_lib_$ac_lib_var=no"
11234 fi
11235 rm -f conftest*
11236 xe_check_libs=""
11237
11238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11239   echo "$ac_t""yes" 1>&6
11240   { test "$extra_verbose" = "yes" && cat << \EOF
11241     Defining HAVE_SHL_LOAD
11242 EOF
11243 cat >> confdefs.h <<\EOF
11244 #define HAVE_SHL_LOAD 1
11245 EOF
11246 }
11247  DLL_LIB=dld; with_shlib=yes
11248 else
11249   echo "$ac_t""no" 1>&6
11250 fi
11251
11252  }
11253 test -z "$with_shlib" && { 
11254 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
11255 echo "configure:11256: checking for dld_init in -ldld" >&5
11256 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
11257
11258 xe_check_libs=" -ldld "
11259 cat > conftest.$ac_ext <<EOF
11260 #line 11261 "configure"
11261 #include "confdefs.h"
11262 /* Override any gcc2 internal prototype to avoid an error.  */
11263 /* We use char because int might match the return type of a gcc2
11264     builtin and then its argument prototype would still apply.  */
11265 char dld_init();
11266
11267 int main() {
11268 dld_init()
11269 ; return 0; }
11270 EOF
11271 if { (eval echo configure:11272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11272   rm -rf conftest*
11273   eval "ac_cv_lib_$ac_lib_var=yes"
11274 else
11275   echo "configure: failed program was:" >&5
11276   cat conftest.$ac_ext >&5
11277   rm -rf conftest*
11278   eval "ac_cv_lib_$ac_lib_var=no"
11279 fi
11280 rm -f conftest*
11281 xe_check_libs=""
11282
11283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11284   echo "$ac_t""yes" 1>&6
11285   { test "$extra_verbose" = "yes" && cat << \EOF
11286     Defining HAVE_DLD_INIT
11287 EOF
11288 cat >> confdefs.h <<\EOF
11289 #define HAVE_DLD_INIT 1
11290 EOF
11291 }
11292  DLL_LIB=dld; with_shlib=yes
11293 else
11294   echo "$ac_t""no" 1>&6
11295 fi
11296
11297  }
11298 if test "$with_shlib" = "yes"; then
11299   { test "$extra_verbose" = "yes" && cat << \EOF
11300     Defining HAVE_SHLIB
11301 EOF
11302 cat >> confdefs.h <<\EOF
11303 #define HAVE_SHLIB 1
11304 EOF
11305 }
11306
11307   extra_objs="$extra_objs sysdll.o" &&  if test "$extra_verbose" = "yes"; then
11308    echo "    xemacs will be linked with \"sysdll.o\""
11309  fi
11310   extra_objs="$extra_objs dll.o" &&  if test "$extra_verbose" = "yes"; then
11311    echo "    xemacs will be linked with \"dll.o\""
11312  fi
11313   test ! -z "$DLL_LIB" && LIBS="-l${DLL_LIB} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${DLL_LIB}\" to \$LIBS"; fi
11314   
11315 dll_ld="ld"
11316 dll_lflags="-shared"
11317 dll_cflags="-r"
11318 dll_oflags="-o "
11319
11320 echo $ac_n "checking how to build a shared library""... $ac_c" 1>&6
11321 echo "configure:11322: checking how to build a shared library" >&5
11322 case `uname -rs` in
11323         UNIX_SV*|UNIX_System_V*)
11324                 dll_lflags="-G"
11325                 dll_cflags=-Kpic
11326                 dll_ld="ld"
11327                 ;;
11328         BSD/OS*)
11329                 dll_cflags=
11330                 dll_lflags="-r"
11331                 dll_ld="shlicc2"
11332                 ;;
11333         FreeBSD*2*)
11334                 dll_lflags="-Bshareable"
11335                 dll_cflags="-fPIC -DPIC"
11336                 dll_ld=ld
11337                 ;;
11338         SunOS*4.*)
11339                 dll_cflags="-P"
11340                 dll_lflags="-dp -assert pure-text -assert nodefinitions"
11341                 ;;
11342         SunOS*5.*)
11343                 dll_ld="cc"
11344                 dll_cflags="-KPIC"
11345                 dll_lflags="-G"
11346                 dll_oflags="-W0,-y-o -W0,-y"
11347                 ;;      
11348         IRIX*5.*|IRIX*6.*)
11349                 dll_cflags="-KPIC"
11350                 ;;
11351         OSF1*)
11352                 ;;
11353         HP-UX*)
11354                 dll_ld="ld"
11355                 dll_lflags="-b"
11356                 dll_cflags="+z"
11357                 ;;
11358         SCO_SV*)
11359                 dll_ld="ld"
11360                 dll_lflags="-G"
11361                 dll_cflags="-Kpic"
11362                 ;;
11363         AIX*)
11364                 dll_lflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:\${@:.ell=.exp} -b noentry -lc"
11365                 dll_ld="ld"
11366                 ;;
11367         *)
11368                 ;;
11369         esac
11370
11371         if test "$GCC" = "yes" ; then
11372                 dll_cflags="-fPIC"
11373                 case `uname -rs` in
11374                 SunOS*5.*)
11375                         dll_ld="ld"
11376                         dll_oflags="-o "
11377                         dll_lflags="-G"
11378                         ;;
11379                 SCO_SV*)
11380                         dll_ld="ld"
11381                         dll_lflags="-G"
11382                         dll_cflags="-b elf"
11383                         ;;
11384                 FreeBSD*)
11385                         dll_cflags="-DDLSYM_NEEDS_UNDERSCORE -DPIC -fPIC"
11386                         dll_lflags="-Bshareable"
11387                         dll_ld=ld
11388                         ;;
11389                 BSD/OS*)
11390                         dll_cflags=
11391                         dll_lflags="-r"
11392                         dll_ld="shlicc2"
11393                         ;;
11394                 UNIX_SV*)
11395                         dll_cflags="-fPIC"
11396                         ;;
11397                 *)
11398                         dll_ld="$CC"
11399                         dll_lflags="-shared"
11400                 esac
11401         fi
11402
11403         echo "$ac_t"""lflags: $dll_lflags cflags: $dll_cflags"" 1>&6
11404
11405
11406
11407
11408
11409   for ac_func in dlerror
11410 do
11411 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11412 echo "configure:11413: checking for $ac_func" >&5
11413
11414 cat > conftest.$ac_ext <<EOF
11415 #line 11416 "configure"
11416 #include "confdefs.h"
11417 /* System header to define __stub macros and hopefully few prototypes,
11418     which can conflict with char $ac_func(); below.  */
11419 #include <assert.h>
11420 /* Override any gcc2 internal prototype to avoid an error.  */
11421 /* We use char because int might match the return type of a gcc2
11422     builtin and then its argument prototype would still apply.  */
11423 char $ac_func();
11424
11425 int main() {
11426
11427 /* The GNU C library defines this for functions which it implements
11428     to always fail with ENOSYS.  Some functions are actually named
11429     something starting with __ and the normal name is an alias.  */
11430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11431 choke me
11432 #else
11433 $ac_func();
11434 #endif
11435
11436 ; return 0; }
11437 EOF
11438 if { (eval echo configure:11439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11439   rm -rf conftest*
11440   eval "ac_cv_func_$ac_func=yes"
11441 else
11442   echo "configure: failed program was:" >&5
11443   cat conftest.$ac_ext >&5
11444   rm -rf conftest*
11445   eval "ac_cv_func_$ac_func=no"
11446 fi
11447 rm -f conftest*
11448
11449 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11450   echo "$ac_t""yes" 1>&6
11451     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11452   { test "$extra_verbose" = "yes" && cat << EOF
11453     Defining $ac_tr_func
11454 EOF
11455 cat >> confdefs.h <<EOF
11456 #define $ac_tr_func 1
11457 EOF
11458 }
11459  
11460 else
11461   echo "$ac_t""no" 1>&6
11462 fi
11463 done
11464
11465   ld_dynamic_link_flags=
11466     case "$opsys" in
11467   hpux*)  ld_dynamic_link_flags="-Wl,-E" ;;
11468   linux*) ld_dynamic_link_flags="-rdynamic" ;;
11469   *) ;;
11470   esac
11471 fi
11472
11473 cat > conftest.$ac_ext <<EOF
11474 #line 11475 "configure"
11475 #include "confdefs.h"
11476 int main(int c,char *v[]){return 0;}
11477 EOF
11478 if { (eval echo configure:11479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
11479 then
11480   :
11481 else
11482   echo "configure: failed program was:" >&5
11483   cat conftest.$ac_ext >&5
11484   rm -fr conftest*
11485   
11486   echo ""
11487   echo "*** PANIC *** The C compiler can no longer build working executables."
11488   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
11489   echo "*** PANIC *** The most likely reason for this problem is that configure"
11490   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
11491   echo "*** PANIC *** found at run time."
11492   echo "*** PANIC ***"
11493   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
11494   echo "*** PANIC *** On other systems, try telling configure where to find the"
11495   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
11496   echo "*** PANIC ***"
11497   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
11498   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
11499   echo "*** PANIC *** on your system.  Don't do that."
11500   exit 1
11501 fi
11502 rm -fr conftest*
11503
11504
11505 { test "$extra_verbose" = "yes" && cat << \EOF
11506     Defining HAVE_UNIX_PROCESSES
11507 EOF
11508 cat >> confdefs.h <<\EOF
11509 #define HAVE_UNIX_PROCESSES 1
11510 EOF
11511 }
11512
11513 extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
11514    echo "    xemacs will be linked with \"process-unix.o\""
11515  fi
11516
11517
11518
11519 T=""
11520 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11521 CFLAGS="$T"
11522
11523
11524 T=""
11525 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11526 extra_objs="$T"
11527
11528
11529 T=""
11530 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
11531 c_switch_general="$T"
11532
11533
11534 T=""
11535 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11536 c_switch_window_system="$T"
11537
11538
11539 T=""
11540 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11541 c_switch_all="$T"
11542
11543
11544 T=""
11545 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
11546 ld_switch_general="$T"
11547
11548
11549 T=""
11550 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11551 ld_switch_window_system="$T"
11552
11553
11554 T=""
11555 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11556 ld_switch_all="$T"
11557
11558
11559 T=""
11560 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11561 ld_libs_general="$T"
11562
11563
11564 T=""
11565 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
11566 ld_libs_window_system="$T"
11567
11568
11569 T=""
11570 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11571 ld_libs_all="$T"
11572
11573
11574
11575 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
11576 internal_makefile_list="Makefile"
11577 SUBDIR_MAKEFILES=''
11578 test -d lock || mkdir lock
11579 for dir in $MAKE_SUBDIR; do
11580   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
11581         test -d "$d" || mkdir "$d"; cd "$d"
11582       done ) ;;
11583    * ) test -d "$dir" || mkdir "$dir" ;;
11584   esac
11585   
11586 T=""
11587 for W in $SUBDIR_MAKEFILES $dir/Makefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11588 SUBDIR_MAKEFILES="$T"
11589
11590   
11591 T=""
11592 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11593 internal_makefile_list="$T"
11594
11595 done
11596
11597
11598
11599
11600 for dir in src/s src/m; do
11601   if test ! -d "$dir" ; then
11602     echo Making symbolic link to "$srcdir/$dir"
11603     ${LN_S} "$srcdir/$dir" "$dir"
11604   fi
11605 done
11606
11607 if test "$extra_verbose" = "yes"; then
11608   echo ""
11609   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
11610   echo ""
11611 fi
11612
11613 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
11614   echo "creating src/gdbinit"; echo ""
11615   echo "source $srcdir/src/gdbinit" > src/gdbinit
11616 fi
11617
11618 if test "$__sunpro_c" = "yes"; then
11619   echo "creating .sbinit"; echo ""
11620   ( echo "# For use with Sun WorkShop's Source browser."
11621     echo "# See sbquery(1) and sbinit(4) for more information"
11622     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
11623   ) > .sbinit
11624 fi
11625
11626 rm -f core
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643 PREFIX=$prefix
11644 while true; do
11645   case "$PREFIX" in
11646     *\$* ) eval "PREFIX=$PREFIX" ;;
11647     *) break ;;
11648   esac
11649 done
11650
11651
11652
11653 EXEC_PREFIX=$exec_prefix
11654 while true; do
11655   case "$EXEC_PREFIX" in
11656     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
11657     *) break ;;
11658   esac
11659 done
11660
11661
11662
11663
11664 INFODIR=$infodir
11665 while true; do
11666   case "$INFODIR" in
11667     *\$* ) eval "INFODIR=$INFODIR" ;;
11668     *) break ;;
11669   esac
11670 done
11671
11672
11673
11674
11675 INFOPATH=$infopath
11676 while true; do
11677   case "$INFOPATH" in
11678     *\$* ) eval "INFOPATH=$INFOPATH" ;;
11679     *) break ;;
11680   esac
11681 done
11682
11683
11684
11685
11686 PACKAGE_PATH=$package_path
11687 while true; do
11688   case "$PACKAGE_PATH" in
11689     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
11690     *) break ;;
11691   esac
11692 done
11693
11694
11695
11696
11697 LISPDIR=$lispdir
11698 while true; do
11699   case "$LISPDIR" in
11700     *\$* ) eval "LISPDIR=$LISPDIR" ;;
11701     *) break ;;
11702   esac
11703 done
11704
11705
11706
11707
11708
11709 ETCDIR=$etcdir
11710 while true; do
11711   case "$ETCDIR" in
11712     *\$* ) eval "ETCDIR=$ETCDIR" ;;
11713     *) break ;;
11714   esac
11715 done
11716
11717
11718
11719
11720 LOCKDIR=$lockdir
11721 while true; do
11722   case "$LOCKDIR" in
11723     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
11724     *) break ;;
11725   esac
11726 done
11727
11728
11729
11730
11731 ARCHLIBDIR=$archlibdir
11732 while true; do
11733   case "$ARCHLIBDIR" in
11734     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
11735     *) break ;;
11736   esac
11737 done
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
11760
11761
11762
11763
11764
11765
11766
11767 # The default is yes
11768 if test "$with_site_lisp" = "no"; then
11769   { test "$extra_verbose" = "yes" && cat << \EOF
11770     Defining INHIBIT_SITE_LISP
11771 EOF
11772 cat >> confdefs.h <<\EOF
11773 #define INHIBIT_SITE_LISP 1
11774 EOF
11775 }
11776
11777 fi
11778
11779
11780 T=""
11781 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11782 ac_configure_args="$T"
11783
11784 { test "$extra_verbose" = "yes" && cat << EOF
11785     Defining EMACS_CONFIGURATION = "$canonical"
11786 EOF
11787 cat >> confdefs.h <<EOF
11788 #define EMACS_CONFIGURATION "$canonical"
11789 EOF
11790 }
11791
11792 { test "$extra_verbose" = "yes" && cat << EOF
11793     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
11794 EOF
11795 cat >> confdefs.h <<EOF
11796 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
11797 EOF
11798 }
11799
11800 { test "$extra_verbose" = "yes" && cat << EOF
11801     Defining config_machfile = "$machfile"
11802 EOF
11803 cat >> confdefs.h <<EOF
11804 #define config_machfile "$machfile"
11805 EOF
11806 }
11807
11808 { test "$extra_verbose" = "yes" && cat << EOF
11809     Defining config_opsysfile = "$opsysfile"
11810 EOF
11811 cat >> confdefs.h <<EOF
11812 #define config_opsysfile "$opsysfile"
11813 EOF
11814 }
11815
11816
11817
11818 null_string=""
11819 { test "$extra_verbose" = "yes" && cat << EOF
11820     Defining LD_SWITCH_X_SITE = $null_string
11821 EOF
11822 cat >> confdefs.h <<EOF
11823 #define LD_SWITCH_X_SITE $null_string
11824 EOF
11825 }
11826
11827 { test "$extra_verbose" = "yes" && cat << EOF
11828     Defining LD_SWITCH_X_SITE_AUX = $null_string
11829 EOF
11830 cat >> confdefs.h <<EOF
11831 #define LD_SWITCH_X_SITE_AUX $null_string
11832 EOF
11833 }
11834
11835 { test "$extra_verbose" = "yes" && cat << EOF
11836     Defining C_SWITCH_X_SITE = $null_string
11837 EOF
11838 cat >> confdefs.h <<EOF
11839 #define C_SWITCH_X_SITE $null_string
11840 EOF
11841 }
11842
11843 { test "$extra_verbose" = "yes" && cat << EOF
11844     Defining LD_SWITCH_SITE = $null_string
11845 EOF
11846 cat >> confdefs.h <<EOF
11847 #define LD_SWITCH_SITE $null_string
11848 EOF
11849 }
11850
11851 { test "$extra_verbose" = "yes" && cat << EOF
11852     Defining C_SWITCH_SITE = $null_string
11853 EOF
11854 cat >> confdefs.h <<EOF
11855 #define C_SWITCH_SITE $null_string
11856 EOF
11857 }
11858
11859
11860
11861 test -n "$puresize" && { test "$extra_verbose" = "yes" && cat << EOF
11862     Defining RAW_PURESIZE = $puresize
11863 EOF
11864 cat >> confdefs.h <<EOF
11865 #define RAW_PURESIZE $puresize
11866 EOF
11867 }
11868
11869
11870 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
11871     Defining GNU_MALLOC
11872 EOF
11873 cat >> confdefs.h <<\EOF
11874 #define GNU_MALLOC 1
11875 EOF
11876 }
11877
11878 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
11879     Defining USE_SYSTEM_MALLOC
11880 EOF
11881 cat >> confdefs.h <<\EOF
11882 #define USE_SYSTEM_MALLOC 1
11883 EOF
11884 }
11885
11886 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
11887     Defining USE_DEBUG_MALLOC
11888 EOF
11889 cat >> confdefs.h <<\EOF
11890 #define USE_DEBUG_MALLOC 1
11891 EOF
11892 }
11893
11894                                               { test "$extra_verbose" = "yes" && cat << \EOF
11895     Defining USE_SYSTEM_MALLOC
11896 EOF
11897 cat >> confdefs.h <<\EOF
11898 #define USE_SYSTEM_MALLOC 1
11899 EOF
11900 }
11901
11902 fi
11903 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11904     Defining I18N3
11905 EOF
11906 cat >> confdefs.h <<\EOF
11907 #define I18N3 1
11908 EOF
11909 }
11910
11911 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11912     Defining USE_GCC
11913 EOF
11914 cat >> confdefs.h <<\EOF
11915 #define USE_GCC 1
11916 EOF
11917 }
11918
11919 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11920     Defining EXTERNAL_WIDGET
11921 EOF
11922 cat >> confdefs.h <<\EOF
11923 #define EXTERNAL_WIDGET 1
11924 EOF
11925 }
11926
11927 test "$with_gnu_make"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11928     Defining USE_GNU_MAKE
11929 EOF
11930 cat >> confdefs.h <<\EOF
11931 #define USE_GNU_MAKE 1
11932 EOF
11933 }
11934
11935 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11936     Defining NO_DOC_FILE
11937 EOF
11938 cat >> confdefs.h <<\EOF
11939 #define NO_DOC_FILE 1
11940 EOF
11941 }
11942
11943 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11944     Defining QUANTIFY
11945 EOF
11946 cat >> confdefs.h <<\EOF
11947 #define QUANTIFY 1
11948 EOF
11949 }
11950
11951 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11952     Defining MAIL_USE_POP
11953 EOF
11954 cat >> confdefs.h <<\EOF
11955 #define MAIL_USE_POP 1
11956 EOF
11957 }
11958
11959 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11960     Defining KERBEROS
11961 EOF
11962 cat >> confdefs.h <<\EOF
11963 #define KERBEROS 1
11964 EOF
11965 }
11966
11967 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11968     Defining HESIOD
11969 EOF
11970 cat >> confdefs.h <<\EOF
11971 #define HESIOD 1
11972 EOF
11973 }
11974
11975 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11976     Defining USE_UNION_TYPE
11977 EOF
11978 cat >> confdefs.h <<\EOF
11979 #define USE_UNION_TYPE 1
11980 EOF
11981 }
11982
11983
11984
11985 (
11986 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
11987 else
11988   echo "uname -a: `uname -a`"
11989 fi
11990 echo ""
11991 echo "$0 $quoted_arguments"
11992 ) > Installation
11993
11994 xemacs_betaname=""
11995 test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}"
11996
11997 (
11998 echo "
11999
12000 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
12001
12002   Where should the build process find the source code?    $srcdir
12003   What installation prefix should install use?            $prefix
12004   What operating system and machine description files should XEmacs use?
12005         \`$opsysfile' and \`$machfile'
12006   What compiler should XEmacs be built with?              $CC $CFLAGS
12007   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
12008   Should XEmacs use the relocating allocator for buffers? $rel_alloc
12009   What window system should XEmacs use?                   ${window_system}"
12010 if test "$with_x11" = "yes"; then
12011   echo "  Where do we find X Windows header files?                $x_includes"
12012   echo "  Where do we find X Windows libraries?                   $x_libraries"
12013 fi
12014 if test -n "$site_includes"; then
12015   echo "  Additional header files:                                $site_includes"
12016 fi
12017 if test -n "$site_libraries"; then
12018   echo "  Additional libraries:                                   $site_libraries"
12019 fi
12020 if test -n "$site_prefixes"; then
12021   echo "  Additional prefixes:                                    $site_prefixes"
12022 fi
12023 if test -n "$runpath"; then
12024   echo "  Runtime library search path:                            $runpath"
12025 fi
12026 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
12027 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
12028 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
12029 if test "$with_xmu" != yes -a "$with_x11" = yes; then
12030   echo "  No Xmu; substituting equivalent routines."
12031 fi
12032
12033 if test "$with_xpm" = yes; then
12034   echo "  Compiling in support for XPM images."
12035 elif test "$with_x11" = yes; then
12036   echo "  --------------------------------------------------------------------"
12037   echo "  WARNING: Compiling without XPM support."
12038   echo "  WARNING: You should strongly considering installing XPM."
12039   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
12040   echo "  --------------------------------------------------------------------"
12041 fi
12042 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
12043 test "$with_gif"   = yes && echo "  Compiling in support for GIF image conversion."
12044 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image conversion."
12045 test "$with_png"   = yes && echo "  Compiling in support for PNG image conversion."
12046 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image conversion."
12047 case "$with_sound" in
12048   nas    ) echo "  Compiling in network sound (NAS) support." ;;
12049   native ) echo "  Compiling in native sound support." ;;
12050   both   ) echo "  Compiling in both network and native sound support." ;;
12051 esac
12052 test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously"
12053
12054 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
12055 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
12056 test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
12057
12058 test "$with_umich_ldap"      = yes && echo "  Compiling in support for LDAP (UMich libs)."
12059 test "$with_ns_ldap"         = yes && echo "  Compiling in support for LDAP (Netscape SDK)."
12060 test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo "  Compiling in support for LDAP (Generic)."
12061
12062 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
12063 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
12064
12065 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
12066 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
12067 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
12068 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
12069 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
12070 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
12071 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
12072 if test "$with_wnn" = yes; then
12073   echo "  Compiling in support for the WNN input method on Mule."
12074   test "$with_wnn6" = yes && echo "    Using WNN version 6."
12075 fi
12076 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
12077
12078 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
12079 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
12080 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
12081 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
12082 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
12083 test "$with_session"  != no && echo "  Compiling in support for proper session-management."
12084 case "$with_menubars" in
12085   lucid ) echo "  Using Lucid menubars." ;;
12086   motif ) echo "  Using Motif menubars."
12087           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
12088           echo "             We recommend using the Lucid menubar instead."
12089           echo "             Re-run configure with --with-menubars='lucid'." ;;
12090 esac
12091 case "$with_scrollbars" in
12092   lucid    ) echo "  Using Lucid scrollbars."     ;;
12093   motif    ) echo "  Using Motif scrollbars."     ;;
12094   athena   ) echo "  Using Athena scrollbars."    ;;
12095   athena3d ) echo "  Using Athena-3d scrollbars." ;;
12096 esac
12097 case "$with_dialogs" in
12098   motif    ) echo "  Using Motif dialog boxes."     ;;
12099   athena   ) echo "  Using Athena dialog boxes."    ;;
12100   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
12101 esac
12102 test "$with_shlib" = "yes" && echo "  Compiling in DLL support."
12103 test "$with_clash_detection" = yes && \
12104   echo "  Clash detection will use \"$lockdir\" for locking files."
12105 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
12106 test "$with_pop"        = yes && echo "  Using POP for mail access"
12107 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication"
12108 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host"
12109 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
12110 test "$use_minimal_tagbits" = yes && echo "  Using Lisp_Objects with minimal tagbits."
12111 test "$use_indexed_lrecord_implementation" = yes && echo "  Using indexed lrecord implementation."
12112 test "$debug"              = yes && echo "  Compiling in extra code for debugging."
12113 test "$memory_usage_stats" = yes && echo "  Compiling in code for checking XEmacs memory usage."
12114 test "$usage_tracking"     = yes && echo "  Compiling with usage tracking active (Sun internal)."
12115 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
12116   != "no no no no no"; then
12117   echo "  WARNING: ---------------------------------------------------------"
12118   echo "  WARNING: Compiling in support for runtime error checking."
12119   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
12120   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
12121   echo "  WARNING: ---------------------------------------------------------"
12122 fi
12123 echo ""
12124 ) | tee -a Installation
12125 echo ""
12126
12127 echo '(setq Installation-string "' > Installation.el
12128 sed 's/"/\\"/g' Installation >> Installation.el
12129 echo '")' >> Installation.el
12130
12131
12132
12133 # Remove any trailing slashes in these variables.
12134 test -n "$prefix" &&
12135   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
12136 test -n "$exec_prefix" &&
12137   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
12138
12139
12140 for file in $internal_makefile_list; do
12141   test "$file" = src/Makefile.in && \
12142     file="src/Makefile.in:src/Makefile.in.in:src/depend"
12143   ac_output_files="${ac_output_files+$ac_output_files }$file"
12144 done
12145 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
12146
12147 trap '' 1 2 15
12148
12149 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12150
12151 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12152 # Let make expand exec_prefix.
12153 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12154
12155 # Any assignment to VPATH causes Sun make to only execute
12156 # the first set of double-colon rules, so remove it if not needed.
12157 # If there is a colon in the path, we need to keep it.
12158 if test "x$srcdir" = x.; then
12159   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12160 fi
12161
12162 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12163
12164 DEFS=-DHAVE_CONFIG_H
12165
12166 # Without the "./", some shells look in PATH for config.status.
12167 : ${CONFIG_STATUS=./config.status}
12168
12169 echo creating $CONFIG_STATUS
12170 rm -f $CONFIG_STATUS
12171 cat > $CONFIG_STATUS <<EOF
12172 #! /bin/sh
12173 # Generated automatically by configure.
12174 # Run this file to recreate the current configuration.
12175 # This directory was configured as follows,
12176 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12177 #
12178 # $0 $ac_configure_args
12179 #
12180 # Compiler output produced by configure, useful for debugging
12181 # configure, is in ./config.log if it exists.
12182
12183 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12184 for ac_option
12185 do
12186   case "\$ac_option" in
12187   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12188     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12189     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12190   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12191     echo "$CONFIG_STATUS generated by autoconf version 2.12"
12192     exit 0 ;;
12193   -help | --help | --hel | --he | --h)
12194     echo "\$ac_cs_usage"; exit 0 ;;
12195   *) echo "\$ac_cs_usage"; exit 1 ;;
12196   esac
12197 done
12198
12199 ac_given_srcdir=$srcdir
12200 ac_given_INSTALL="$INSTALL"
12201
12202 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12203 EOF
12204 cat >> $CONFIG_STATUS <<EOF
12205
12206 # Protect against being on the right side of a sed subst in config.status.
12207 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12208  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12209 $ac_vpsub
12210 $extrasub
12211 s%@CFLAGS@%$CFLAGS%g
12212 s%@CPPFLAGS@%$CPPFLAGS%g
12213 s%@CXXFLAGS@%$CXXFLAGS%g
12214 s%@DEFS@%$DEFS%g
12215 s%@LDFLAGS@%$LDFLAGS%g
12216 s%@LIBS@%$LIBS%g
12217 s%@exec_prefix@%$exec_prefix%g
12218 s%@prefix@%$prefix%g
12219 s%@program_transform_name@%$program_transform_name%g
12220 s%@bindir@%$bindir%g
12221 s%@sbindir@%$sbindir%g
12222 s%@libexecdir@%$libexecdir%g
12223 s%@datadir@%$datadir%g
12224 s%@sysconfdir@%$sysconfdir%g
12225 s%@sharedstatedir@%$sharedstatedir%g
12226 s%@localstatedir@%$localstatedir%g
12227 s%@libdir@%$libdir%g
12228 s%@includedir@%$includedir%g
12229 s%@oldincludedir@%$oldincludedir%g
12230 s%@infodir@%$infodir%g
12231 s%@mandir@%$mandir%g
12232 s%@LN_S@%$LN_S%g
12233 s%@blddir@%$blddir%g
12234 s%@CC@%$CC%g
12235 s%@CPP@%$CPP%g
12236 s%@start_flags@%$start_flags%g
12237 s%@ld_switch_shared@%$ld_switch_shared%g
12238 s%@start_files@%$start_files%g
12239 s%@ld@%$ld%g
12240 s%@lib_gcc@%$lib_gcc%g
12241 s%@RANLIB@%$RANLIB%g
12242 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12243 s%@INSTALL_DATA@%$INSTALL_DATA%g
12244 s%@YACC@%$YACC%g
12245 s%@SET_MAKE@%$SET_MAKE%g
12246 s%@X_CFLAGS@%$X_CFLAGS%g
12247 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
12248 s%@X_LIBS@%$X_LIBS%g
12249 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
12250 s%@install_pp@%$install_pp%g
12251 s%@libs_xauth@%$libs_xauth%g
12252 s%@dnd_objs@%$dnd_objs%g
12253 s%@lwlib_objs@%$lwlib_objs%g
12254 s%@ALLOCA@%$ALLOCA%g
12255 s%@dll_ld@%$dll_ld%g
12256 s%@dll_cflags@%$dll_cflags%g
12257 s%@dll_oflags@%$dll_oflags%g
12258 s%@dll_lflags@%$dll_lflags%g
12259 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
12260 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
12261 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
12262 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
12263 s%@PROGNAME@%$PROGNAME%g
12264 s%@version@%$version%g
12265 s%@configuration@%$configuration%g
12266 s%@canonical@%$canonical%g
12267 s%@srcdir@%$srcdir%g
12268 s%@pkgdir@%$pkgdir%g
12269 s%@statedir@%$statedir%g
12270 s%@PREFIX@%$PREFIX%g
12271 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
12272 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
12273 s%@INFODIR@%$INFODIR%g
12274 s%@infopath@%$infopath%g
12275 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
12276 s%@INFOPATH@%$INFOPATH%g
12277 s%@package_path@%$package_path%g
12278 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
12279 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
12280 s%@lispdir@%$lispdir%g
12281 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
12282 s%@LISPDIR@%$LISPDIR%g
12283 s%@etcdir@%$etcdir%g
12284 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
12285 s%@ETCDIR@%$ETCDIR%g
12286 s%@lockdir@%$lockdir%g
12287 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
12288 s%@LOCKDIR@%$LOCKDIR%g
12289 s%@archlibdir@%$archlibdir%g
12290 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
12291 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
12292 s%@docdir@%$docdir%g
12293 s%@bitmapdir@%$bitmapdir%g
12294 s%@extra_objs@%$extra_objs%g
12295 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
12296 s%@machfile@%$machfile%g
12297 s%@opsysfile@%$opsysfile%g
12298 s%@c_switch_general@%$c_switch_general%g
12299 s%@c_switch_window_system@%$c_switch_window_system%g
12300 s%@c_switch_all@%$c_switch_all%g
12301 s%@ld_switch_general@%$ld_switch_general%g
12302 s%@ld_switch_window_system@%$ld_switch_window_system%g
12303 s%@ld_switch_all@%$ld_switch_all%g
12304 s%@ld_libs_general@%$ld_libs_general%g
12305 s%@ld_libs_window_system@%$ld_libs_window_system%g
12306 s%@ld_libs_all@%$ld_libs_all%g
12307 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
12308 s%@native_sound_lib@%$native_sound_lib%g
12309 s%@sound_cflags@%$sound_cflags%g
12310 s%@dynodump_arch@%$dynodump_arch%g
12311 s%@internal_makefile_list@%$internal_makefile_list%g
12312
12313 CEOF
12314 EOF
12315
12316 cat >> $CONFIG_STATUS <<\EOF
12317
12318 # Split the substitutions into bite-sized pieces for seds with
12319 # small command number limits, like on Digital OSF/1 and HP-UX.
12320 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12321 ac_file=1 # Number of current file.
12322 ac_beg=1 # First line for current file.
12323 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12324 ac_more_lines=:
12325 ac_sed_cmds=""
12326 while $ac_more_lines; do
12327   if test $ac_beg -gt 1; then
12328     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12329   else
12330     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12331   fi
12332   if test ! -s conftest.s$ac_file; then
12333     ac_more_lines=false
12334     rm -f conftest.s$ac_file
12335   else
12336     if test -z "$ac_sed_cmds"; then
12337       ac_sed_cmds="sed -f conftest.s$ac_file"
12338     else
12339       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12340     fi
12341     ac_file=`expr $ac_file + 1`
12342     ac_beg=$ac_end
12343     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12344   fi
12345 done
12346 if test -z "$ac_sed_cmds"; then
12347   ac_sed_cmds=cat
12348 fi
12349 EOF
12350
12351 cat >> $CONFIG_STATUS <<EOF
12352
12353 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
12354 EOF
12355 cat >> $CONFIG_STATUS <<\EOF
12356 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12357   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12358   case "$ac_file" in
12359   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12360        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12361   *) ac_file_in="${ac_file}.in" ;;
12362   esac
12363
12364   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12365
12366   # Remove last slash and all that follows it.  Not all systems have dirname.
12367   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12368   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12369     # The file is in a subdirectory.
12370     test ! -d "$ac_dir" && mkdir "$ac_dir"
12371     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12372     # A "../" for each directory in $ac_dir_suffix.
12373     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12374   else
12375     ac_dir_suffix= ac_dots=
12376   fi
12377
12378   case "$ac_given_srcdir" in
12379   .)  srcdir=.
12380       if test -z "$ac_dots"; then top_srcdir=.
12381       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12382   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12383   *) # Relative path.
12384     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12385     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12386   esac
12387
12388   case "$ac_given_INSTALL" in
12389   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12390   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12391   esac
12392
12393   echo creating "$ac_file"
12394   rm -f "$ac_file"
12395   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12396   case "$ac_file" in
12397   *Makefile*) ac_comsub="1i\\
12398 # $configure_input" ;;
12399   *) ac_comsub= ;;
12400   esac
12401
12402   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12403   sed -e "$ac_comsub
12404 s%@configure_input@%$configure_input%g
12405 s%@srcdir@%$srcdir%g
12406 s%@top_srcdir@%$top_srcdir%g
12407 s%@INSTALL@%$INSTALL%g
12408 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12409 fi; done
12410 rm -f conftest.s*
12411
12412 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12413 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12414 #
12415 # ac_d sets the value in "#define NAME VALUE" lines.
12416 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12417 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12418 ac_dC='\3'
12419 ac_dD='%g'
12420 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12421 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12422 ac_uB='\([      ]\)%\1#\2define\3'
12423 ac_uC=' '
12424 ac_uD='\4%g'
12425 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12426 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12427 ac_eB='$%\1#\2define\3'
12428 ac_eC=' '
12429 ac_eD='%g'
12430
12431 if test "${CONFIG_HEADERS+set}" != set; then
12432 EOF
12433 cat >> $CONFIG_STATUS <<EOF
12434   CONFIG_HEADERS="src/config.h lwlib/config.h"
12435 EOF
12436 cat >> $CONFIG_STATUS <<\EOF
12437 fi
12438 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12439   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12440   case "$ac_file" in
12441   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12442        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12443   *) ac_file_in="${ac_file}.in" ;;
12444   esac
12445
12446   echo creating $ac_file
12447
12448   rm -f conftest.frag conftest.in conftest.out
12449   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12450   cat $ac_file_inputs > conftest.in
12451
12452 EOF
12453
12454 # Transform confdefs.h into a sed script conftest.vals that substitutes
12455 # the proper values into config.h.in to produce config.h.  And first:
12456 # Protect against being on the right side of a sed subst in config.status.
12457 # Protect against being in an unquoted here document in config.status.
12458 rm -f conftest.vals
12459 cat > conftest.hdr <<\EOF
12460 s/[\\&%]/\\&/g
12461 s%[\\$`]%\\&%g
12462 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12463 s%ac_d%ac_u%gp
12464 s%ac_u%ac_e%gp
12465 EOF
12466 sed -n -f conftest.hdr confdefs.h > conftest.vals
12467 rm -f conftest.hdr
12468
12469 # This sed command replaces #undef with comments.  This is necessary, for
12470 # example, in the case of _POSIX_SOURCE, which is predefined and required
12471 # on some systems where configure will not decide to define it.
12472 cat >> conftest.vals <<\EOF
12473 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12474 EOF
12475
12476 # Break up conftest.vals because some shells have a limit on
12477 # the size of here documents, and old seds have small limits too.
12478
12479 rm -f conftest.tail
12480 while :
12481 do
12482   ac_lines=`grep -c . conftest.vals`
12483   # grep -c gives empty output for an empty file on some AIX systems.
12484   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12485   # Write a limited-size here document to conftest.frag.
12486   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12487   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12488   echo 'CEOF
12489   sed -f conftest.frag conftest.in > conftest.out
12490   rm -f conftest.in
12491   mv conftest.out conftest.in
12492 ' >> $CONFIG_STATUS
12493   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12494   rm -f conftest.vals
12495   mv conftest.tail conftest.vals
12496 done
12497 rm -f conftest.vals
12498
12499 cat >> $CONFIG_STATUS <<\EOF
12500   rm -f conftest.frag conftest.h
12501   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12502   cat conftest.in >> conftest.h
12503   rm -f conftest.in
12504   if cmp -s $ac_file conftest.h 2>/dev/null; then
12505     echo "$ac_file is unchanged"
12506     rm -f conftest.h
12507   else
12508     # Remove last slash and all that follows it.  Not all systems have dirname.
12509       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12510       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12511       # The file is in a subdirectory.
12512       test ! -d "$ac_dir" && mkdir "$ac_dir"
12513     fi
12514     rm -f $ac_file
12515     mv conftest.h $ac_file
12516   fi
12517 fi; done
12518
12519 EOF
12520 cat >> $CONFIG_STATUS <<EOF
12521 CPP="$CPP"
12522  CPPFLAGS="$CPPFLAGS"
12523  top_srcdir="$srcdir"
12524  MAKE_SUBDIR="$MAKE_SUBDIR"
12525
12526 EOF
12527 cat >> $CONFIG_STATUS <<\EOF
12528 for dir in $MAKE_SUBDIR; do
12529   echo creating $dir/Makefile
12530   (
12531     cd $dir
12532     rm -f junk.c
12533     < Makefile.in \
12534       sed -e '/^# Generated/d' \
12535           -e 's%/\*\*/#.*%%' \
12536           -e 's/^ *# */#/' \
12537           -e '/^##/d' \
12538           -e '/^#/ {
12539 p
12540 d
12541 }'        -e '/./ {
12542 s/\([\"]\)/\\\1/g
12543 s/^/"/
12544 s/$/"/
12545 }'  > junk.c;
12546     $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp;
12547     < junk.cpp                          \
12548       sed -e 's/^#.*//'                 \
12549         -e 's/^[        ][      ]*$//'  \
12550         -e 's/^ /       /'                      \
12551         | sed -n -e '/^..*$/p'          \
12552         | sed '/^"/ {
12553 s/\\\([\"]\)/\1/g
12554 s/^[    ]*"//
12555 s/"[    ]*$//
12556 }'      > Makefile.new
12557     chmod 444 Makefile.new
12558     mv -f Makefile.new Makefile
12559     rm -f junk.c junk.cpp
12560 )
12561 done
12562
12563 sed < config.status >> lib-src/config.values \
12564   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
12565   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
12566   -e 's/^\([^ ]*\) $/\1 ""/' \
12567   -e 's/ 1$/ t/'
12568
12569
12570 exit 0
12571 EOF
12572 chmod +x $CONFIG_STATUS
12573 rm -fr confdefs* $ac_clean_files
12574 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12575