XEmacs 21.2.11
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 1998, 1999 J. Kean Johnston.
11
12 ### Don't edit this script!
13 ### This script was automatically generated by the `autoconf' program
14 ### from the file `./configure.in'.
15 ### To rebuild it, execute the command
16 ###     autoconf
17 ### in the this directory.  You must have autoconf version 2.12 or later.
18
19 ### This file is part of XEmacs.
20
21 ### XEmacs is free software; you can redistribute it and/or modify it
22 ### under the terms of the GNU General Public License as published by
23 ### the Free Software Foundation; either version 2, or (at your
24 ### option) any later version.
25
26 ### XEmacs is distributed in the hope that it will be useful, but
27 ### WITHOUT ANY WARRANTY; without even the implied warranty of
28 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29 ### General Public License for more details.
30
31 ### You should have received a copy of the GNU General Public License
32 ### along with XEmacs; see the file COPYING.  If not, write to the Free
33 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34 ### 02111-1307, USA.
35
36 ### For usage, run `./configure --help'
37 ### For more detailed information on building and installing XEmacs,
38 ### read the file `INSTALL'.
39 ###
40 ### If configure succeeds, it leaves its status in config.status.
41 ### A log of configuration tests can be found in config.log.
42 ### If configure fails after disturbing the status quo,
43 ###     config.status is removed.
44
45 ac_help="$ac_help
46   --with-x                use the X Window System"
47
48
49
50 if test -n "$ZSH_VERSION"; then
51     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
52   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
53   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
54   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
55       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
56 elif test -n "$BASH_VERSION"; then
57     set -o posix
58   unset CDPATH
59 else
60   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
61 fi
62
63 exec_prefix=NONE
64 host=NONE
65 no_create=
66 nonopt=NONE
67 no_recursion=
68 prefix=NONE
69 program_prefix=NONE
70 program_suffix=NONE
71 program_transform_name=s,x,x,
72 silent=
73 site=
74 srcdir=
75 target=NONE
76 verbose=
77 x_includes=NONE
78 x_libraries=NONE
79
80 bindir='${exec_prefix}/bin'
81 sbindir='${exec_prefix}/sbin'
82 libexecdir='${exec_prefix}/libexec'
83 datadir='${prefix}/share'
84 sysconfdir='${prefix}/etc'
85 sharedstatedir='${prefix}/com'
86 localstatedir='${prefix}/var'
87 libdir='${{exec_prefix}}/lib'
88 includedir='${prefix}/include'
89 oldincludedir='/usr/include'
90 infodir='${prefix}/info'
91 mandir='${prefix}/man'
92
93 subdirs=
94 MFLAGS= MAKEFLAGS=
95 ac_max_here_lines=12
96
97 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
98
99 # File descriptor usage:
100 # 0 standard input
101 # 1 file creation
102 # 2 errors and warnings
103 # 3 some systems may open it to /dev/tty
104 # 4 used on the Kubota Titan
105 # 6 checking for... messages and results
106 # 5 compiler messages saved in config.log
107 if test "$silent" = yes; then
108   exec 6>/dev/null
109 else
110   exec 6>&1
111 fi
112 exec 5>./config.log
113
114 echo "\
115 This file contains any messages produced by compilers while
116 running configure, to aid debugging if configure makes a mistake.
117 " 1>&5
118
119 # Strip out --no-create and --no-recursion so they do not pile up.
120 # Also quote any args containing shell metacharacters.
121 ac_configure_args=
122 for ac_arg
123 do
124   case "$ac_arg" in
125   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
126   | --no-cr | --no-c) ;;
127   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
128   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
129   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
130   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
131   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
132   esac
133 done
134
135 # NLS nuisances.
136 # Only set these to C if already set.  These must not be set unconditionally
137 # because not all systems understand e.g. LANG=C (notably SCO).
138 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
139 # Non-C LC_CTYPE values break the ctype check.
140 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
141 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
142 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
143 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
144
145 # confdefs.h avoids OS command line length limits that DEFS can exceed.
146 rm -rf conftest* confdefs.h
147 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
148 echo > confdefs.h
149
150 # A filename unique to this package, relative to the directory that
151 # configure is in, which we can look for to find out if srcdir is correct.
152 ac_unique_file=src/lisp.h
153
154 # Find the source files, if location was not specified.
155 if test -z "$srcdir"; then
156   ac_srcdir_defaulted=yes
157   # Try the directory containing this script, then its parent.
158   ac_prog=$0
159   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
160   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
161   srcdir=$ac_confdir
162   if test ! -r $srcdir/$ac_unique_file; then
163     srcdir=..
164   fi
165 else
166   ac_srcdir_defaulted=no
167 fi
168 if test ! -r $srcdir/$ac_unique_file; then
169   if test "$ac_srcdir_defaulted" = yes; then
170     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
171   else
172     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
173   fi
174 fi
175 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
176
177 # Prefer explicitly selected file to automatically selected ones.
178 if test -z "$CONFIG_SITE"; then
179   if test "x$prefix" != xNONE; then
180     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
181   else
182     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
183   fi
184 fi
185 for ac_site_file in $CONFIG_SITE; do
186   if test -r "$ac_site_file"; then
187     echo "loading site script $ac_site_file"
188     . "$ac_site_file"
189   fi
190 done
191
192
193 ac_ext=c
194 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
195 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
196 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
197 ac_cpp='$CPP '"$xe_cppflags"
198 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
199 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
200 cross_compiling=no
201
202 ac_exeext=
203 ac_objext=o
204 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
205   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
206   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
207     ac_n= ac_c='
208 ' ac_t='        '
209   else
210     ac_n=-n ac_c= ac_t=
211   fi
212 else
213   ac_n= ac_c='\c' ac_t=
214 fi
215
216
217 progname="`echo $0 | sed 's:^\./\./:\./:'`"
218
219
220 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
221 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
222
223 prefix='/usr/local'
224 exec_prefix='${prefix}'
225 bindir='${exec_prefix}/bin'
226 datadir='${prefix}/lib'
227 statedir='${prefix}/lib'
228 libdir='${exec_prefix}/lib'
229 mandir='${prefix}/man/man1'
230 infodir='${datadir}/${PROGNAME}-${version}/info'
231 infopath=''
232 install_pp=''
233 lispdir='${datadir}/${PROGNAME}-${version}/lisp'
234 moduledir='${datadir}/${PROGNAME}-${version}/${configuration}/modules'
235 sitelispdir='${datadir}/xemacs/site-lisp'
236 sitemoduledir='${datadir}/xemacs/site-modules'
237 pkgdir='${datadir}/${PROGNAME}-${version}/lisp'
238 package_path=''
239 etcdir='${datadir}/${PROGNAME}-${version}/etc'
240 lockdir='${statedir}/${PROGNAME}/lock'
241 archlibdir='${datadir}/${PROGNAME}-${version}/${configuration}'
242 with_site_lisp='no'
243 with_site_modules='yes'
244 with_menubars=''
245 with_scrollbars=''
246 with_dialogs=''
247 with_file_coding=''
248 puresize=''
249 cpp='' cppflags='' libs='' ldflags=''
250 dynamic=''
251 with_x11=''
252 with_msw=''
253 rel_alloc='default'
254 with_system_malloc='default'
255 with_dlmalloc='default'
256 native_sound_lib=''
257 use_assertions="yes"
258 with_toolbars=""
259 with_tty=""
260 use_union_type="no"
261 with_dnet=""
262
263
264
265
266 arguments="$@"
267
268 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
269 quoted_arguments=
270 for i in "$@"; do
271    case "$i" in
272    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
273    | --no-cr | --no-c) ;;
274    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
275    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
276    *)
277    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
278    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
279    esac
280 done
281
282 while test $# != 0; do
283   arg="$1"; shift
284   case "$arg" in
285     --no-create|--no-recursion) ;;
286         -* )
287             case "$arg" in
288         -*=*)
289           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
290           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
291           valomitted=no
292         ;;
293                                                                           -*)
294                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
295           val="yes" valomitted=yes
296         ;;
297       esac
298
299             optname="$opt"
300       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
301
302             case "${valomitted}-${opt}" in yes-without_* )
303         opt=`echo $opt | sed 's/without/with/'`
304         valomitted="no" val="no" ;;
305       esac
306
307             case "$opt" in
308
309         with_site_lisp  | \
310     with_site_modules | \
311         with_x          | \
312         with_x11        | \
313         with_msw        | \
314         with_gcc        | \
315         dynamic         | \
316         with_ncurses    | \
317         with_dnet       | \
318         with_socks      | \
319         with_dragndrop  | \
320         with_cde        | \
321         with_offix      | \
322         with_gpm        | \
323         with_xpm        | \
324         with_xface      | \
325         with_gif        | \
326         with_jpeg       | \
327         with_png        | \
328         with_tiff       | \
329         with_session    | \
330         with_xmu        | \
331         with_purify     | \
332         with_quantify   | \
333         with_toolbars   | \
334         with_tty        | \
335         with_xfs        | \
336         with_i18n3      | \
337         with_mule       | \
338         with_file_coding| \
339         with_canna      | \
340         with_wnn        | \
341         with_wnn6       | \
342         with_workshop   | \
343         with_sparcworks | \
344         with_tooltalk   | \
345         with_ldap       | \
346         with_pop        | \
347         with_kerberos   | \
348         with_hesiod     | \
349         with_dnet       | \
350         with_infodock   | \
351         external_widget | \
352         verbose         | \
353         extra_verbose   | \
354         const_is_losing | \
355         usage_tracking  | \
356         use_union_type  | \
357         debug           | \
358         use_assertions  | \
359         gung_ho         | \
360         use_minimal_tagbits                     | \
361         use_indexed_lrecord_implementation      | \
362         memory_usage_stats | \
363         with_clash_detection | \
364         with_shlib | \
365         no_doc_file )
366                   case "$val" in
367             y | ye | yes )      val=yes ;;
368             n | no )            val=no  ;;
369             * ) (echo "$progname: Usage error:"
370 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
371 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
372           esac
373           eval "$opt=\"$val\"" ;;
374
375
376                         srcdir          | \
377         compiler        | \
378         cflags          | \
379         cpp             | \
380         cppflags        | \
381         libs            | \
382         ldflags         | \
383         puresize        | \
384         cache_file      | \
385         native_sound_lib| \
386         site_lisp       | \
387         x_includes      | \
388         x_libraries     | \
389         site_includes   | \
390         site_libraries  | \
391         site_prefixes   | \
392         site_runtime_libraries )
393                   if test "$valomitted" = "yes" ; then
394                     if test "$#" = 0 ; then
395               (echo "$progname: Usage error:"
396 echo " " "The \`--$optname' option requires a value."
397 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
398             fi
399             val="$1"; shift
400           fi
401           eval "$opt=\"$val\""
402         ;;
403
404                 rel_alloc | \
405         with_dlmalloc | \
406         with_debug_malloc  | use_debug_malloc | \
407         with_system_malloc | use_system_malloc )
408           case "$val" in
409             y | ye | yes )      val=yes ;;
410             n | no )            val=no  ;;
411             d | de | def | defa | defau | defaul | default ) val=default ;;
412             * ) (echo "$progname: Usage error:"
413 echo " " "The \`--$optname' option requires one of these values:
414   \`yes', \`no', or \`default'."
415 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
416           esac
417           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
418           eval "$opt=\"$val\""
419         ;;
420
421                 "with_database" )
422           with_database_berkdb=no
423           with_database_dbm=no
424           with_database_gnudbm=no
425           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
426             case "$x" in
427                 no ) ;;
428                 b | be | ber | berk | berkd | berkdb )  with_database_berkdb=yes ;;
429                 d | db | dbm )                          with_database_dbm=yes    ;;
430                 g | gn | gnu | gnud | gnudb | gnudbm )  with_database_gnudbm=yes ;;
431                 * ) (echo "$progname: Usage error:"
432 echo " " "The \`--$optname' option value
433   must be either \`no' or a comma-separated list
434   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
435 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
436             esac
437           done
438           if test "$with_database_dbm"    = "yes" -a \
439                   "$with_database_gnudbm" = "yes"; then
440           (echo "$progname: Usage error:"
441 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
442   with the \`--$optname' option."
443 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
444           fi
445         ;;
446
447                 "with_sound" )
448                           case "$val" in
449             y | ye | yes )                      val=native ;;
450             n | no | non | none )               val=no;;
451             na | nat | nati | nativ | native )  val=native  ;;
452             ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas  ;;
453             b | bo | bot | both )               val=both;;
454             * ) (echo "$progname: Usage error:"
455 echo " " "The \`--$optname' option must have one of these values:
456   \`native', \`nas', \`both', or \`none'."
457 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
458           esac
459           eval "$opt=\"$val\""
460         ;;
461
462                 "with_xim" )
463           case "$val" in
464             y | ye | yes )                val=yes   ;;
465             n | no | non | none )         val=no    ;;
466             x | xl | xli | xlib )         val=xlib  ;;
467             m | mo | mot | moti | motif ) val=motif ;;
468             * ) (echo "$progname: Usage error:"
469 echo " " "The \`--$optname' option must have one of these values:
470   \`motif', \`xlib', \`yes', or \`no'."
471 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
472           esac
473           eval "$opt=\"$val\""
474         ;;
475
476                 "mail_locking" )
477           case "$val" in
478             lockf )     val=lockf ;;
479             flock )     val=flock ;;
480             file )      val=file  ;;
481             * ) (echo "$progname: Usage error:"
482 echo " " "The \`--$optname' option must have one of these values:
483   \`lockf', \`flock', or \`file'."
484 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
485           esac
486           eval "$opt=\"$val\""
487         ;;
488
489                 "error_checking" )
490                           
491           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
492             case "$x" in
493                       n | no | non | none ) new_default=no ;;
494               a | al | all )        new_default=yes ;;
495
496               extents )       error_check_extents=yes ;;
497               noextents )     error_check_extents=no ;;
498
499               typecheck )     error_check_typecheck=yes ;;
500               notypecheck )   error_check_typecheck=no ;;
501
502               bufpos )        error_check_bufpos=yes ;;
503               nobufpos )      error_check_bufpos=no ;;
504
505               gc )            error_check_gc=yes ;;
506               nogc )          error_check_gc=no ;;
507
508               malloc )        error_check_malloc=yes ;;
509               nomalloc )      error_check_malloc=no ;;
510
511               * ) bogus_error_check=yes ;;
512             esac
513             if test "$bogus_error_check" -o \
514                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
515                 if test "$error_check_default" = yes ; then
516                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'."
517                 else
518                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'."
519                 fi
520                 (echo "$progname: Usage error:"
521 echo " " "Valid types for the \`--$optname' option are:
522   $types."
523 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
524             elif test -n "$new_default" ; then
525                 error_check_extents=$new_default
526                 error_check_typecheck=$new_default
527                 error_check_bufpos=$new_default
528                 error_check_gc=$new_default
529                 error_check_malloc=$new_default
530                 new_default=    # reset this
531             fi
532             echeck_notfirst=true
533           done
534         ;;
535
536                                 
537                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
538         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
539         archlibdir | docdir | package_path )
540                    if test "$valomitted" = "yes"; then
541              if test "$#" = 0; then
542                  (echo "$progname: Usage error:"
543 echo " " "The \`--$optname' option requires a value."
544 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
545              fi
546              val="$1"; shift
547            fi
548            eval "$opt=\"$val\""
549
550                            case "$opt" in
551              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
552     Defining LISPDIR_USER_DEFINED
553 EOF
554 cat >> confdefs.h <<\EOF
555 #define LISPDIR_USER_DEFINED 1
556 EOF
557 }
558  ;;
559              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
560     Defining SITELISPDIR_USER_DEFINED
561 EOF
562 cat >> confdefs.h <<\EOF
563 #define SITELISPDIR_USER_DEFINED 1
564 EOF
565 }
566  ;;
567              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
568     Defining MODULEDIR_USER_DEFINED
569 EOF
570 cat >> confdefs.h <<\EOF
571 #define MODULEDIR_USER_DEFINED 1
572 EOF
573 }
574  ;;
575              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
576     Defining ETCDIR_USER_DEFINED
577 EOF
578 cat >> confdefs.h <<\EOF
579 #define ETCDIR_USER_DEFINED 1
580 EOF
581 }
582  ;;
583              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
584     Defining INFODIR_USER_DEFINED
585 EOF
586 cat >> confdefs.h <<\EOF
587 #define INFODIR_USER_DEFINED 1
588 EOF
589 }
590  ;;
591              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
592     Defining INFOPATH_USER_DEFINED
593 EOF
594 cat >> confdefs.h <<\EOF
595 #define INFOPATH_USER_DEFINED 1
596 EOF
597 }
598  ;;
599              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
600     Defining PACKAGE_PATH_USER_DEFINED
601 EOF
602 cat >> confdefs.h <<\EOF
603 #define PACKAGE_PATH_USER_DEFINED 1
604 EOF
605 }
606  ;;
607              datadir )
608                 { test "$extra_verbose" = "yes" && cat << \EOF
609     Defining INFODIR_USER_DEFINED
610 EOF
611 cat >> confdefs.h <<\EOF
612 #define INFODIR_USER_DEFINED 1
613 EOF
614 }
615
616                 { test "$extra_verbose" = "yes" && cat << \EOF
617     Defining LISPDIR_USER_DEFINED
618 EOF
619 cat >> confdefs.h <<\EOF
620 #define LISPDIR_USER_DEFINED 1
621 EOF
622 }
623
624             { test "$extra_verbose" = "yes" && cat << \EOF
625     Defining MODULEDIR_USER_DEFINED
626 EOF
627 cat >> confdefs.h <<\EOF
628 #define MODULEDIR_USER_DEFINED 1
629 EOF
630 }
631
632                 { test "$extra_verbose" = "yes" && cat << \EOF
633     Defining ETCDIR_USER_DEFINED
634 EOF
635 cat >> confdefs.h <<\EOF
636 #define ETCDIR_USER_DEFINED 1
637 EOF
638 }
639  ;;
640              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
641     Defining LOCKDIR_USER_DEFINED
642 EOF
643 cat >> confdefs.h <<\EOF
644 #define LOCKDIR_USER_DEFINED 1
645 EOF
646 }
647  ;;
648              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
649     Defining ARCHLIBDIR_USER_DEFINED
650 EOF
651 cat >> confdefs.h <<\EOF
652 #define ARCHLIBDIR_USER_DEFINED 1
653 EOF
654 }
655  ;;
656            esac
657         ;;
658
659                 "no_create" ) ;;
660
661                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
662
663                 "with_menubars"   | \
664         "with_scrollbars" | \
665         "with_dialogs" )
666           case "$val" in
667             l | lu | luc | luci | lucid )               val=lucid  ;;
668             m | mo | mot | moti | motif )               val=motif  ;;
669             athena3d | athena-3d )                      val=athena3d ;;
670             a | at | ath | athe | athen | athena )      val=athena ;;
671             n | no | non | none )                       val=no ;;
672             * ) (echo "$progname: Usage error:"
673 echo " " "The \`--$optname' option must have one of these values:
674   \`lucid', \`motif', \`athena', \`athena3d', or \`no'."
675 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
676           esac
677           eval "$opt=\"$val\""
678         ;;
679
680                 "run_in_place"  | \
681         "with_gnu_make" )
682           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
683         ;;
684
685                 * ) (echo "$progname: Usage error:"
686 echo " " "Unrecognized option: $arg"
687 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
688
689       esac
690     ;;
691
692         *-*-*) configuration="$arg" ;;
693
694         *) (echo "$progname: Usage error:"
695 echo " " "Unrecognized argument: $arg"
696 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
697
698   esac
699 done
700
701
702 test -n "$cpp"      && CPP="$cpp"
703 test -n "$cppflags" && CPPFLAGS="$cppflags"
704 test -n "$libs"     && LIBS="$libs"
705 test -n "$ldflags"  && LDFLAGS="$ldflags"
706
707 eval set x "$quoted_arguments"; shift
708
709 test "$extra_verbose" = "yes" && verbose=yes
710
711 test -n "$with_x" && with_x11="$with_x"
712
713 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
714   test "$with_system_malloc" = "default" && with_system_malloc=yes
715 fi
716
717 if test -n "$gung_ho"; then
718   test -z "$use_minimal_tagbits" && use_minimal_tagbits="$gung_ho"
719   test -z "$use_indexed_lrecord_implementation" && \
720     use_indexed_lrecord_implementation="$gung_ho"
721 fi
722 if test "$use_minimal_tagbits" = "no"; then
723   test "$with_dlmalloc" = "yes" && \
724     (echo "$progname: Usage error:"
725 echo " " "--with-dlmalloc requires --use-minimal-tagbits"
726 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
727   with_dlmalloc=no
728 fi
729
730
731
732 if test "$with_cde $with_tooltalk" = "yes no"; then
733   (echo "$progname: Usage error:"
734 echo " " "--with-cde requires --with-tooltalk"
735 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
736 elif test "$with_tooltalk" = "no" ; then with_cde=no
737 elif test "$with_cde" = "yes"; then with_tooltalk=yes
738 fi
739
740
741 case "$srcdir" in
742
743     "" )
744     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
745       if test -f "$dir/src/lisp.h" -a \
746               -f "$dir/lisp/version.el" ; then
747         srcdir="$dir"
748         break
749       fi
750     done
751     if test -z "$srcdir" ; then
752       (echo "$progname: Usage error:"
753 echo " " "Neither the current directory nor its parent seem to
754   contain the XEmacs sources.  If you do not want to build XEmacs in its
755   source tree, you should run \`$progname' in the directory in which
756   you wish to build XEmacs, using the \`--srcdir' option to say where the
757   sources may be found."
758 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
759     fi
760   ;;
761
762     * )
763     if test ! -f "$srcdir/src/lisp.h" -o \
764             ! -f "$srcdir/lisp/version.el" ; then
765       (echo "$progname: Usage error:"
766 echo " " "The directory specified with the \`--srcdir' option,
767   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
768   either run the \`$progname' script at the top of the XEmacs source
769   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
770 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
771     fi
772   ;;
773 esac
774
775 if test -z "$configuration"; then
776     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
777   if test -z "$configuration"; then
778     (echo "$progname: Usage error:"
779 echo " " "XEmacs has not been ported to this host type.
780 Try explicitly specifying the CONFIGURATION when rerunning configure."
781 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
782   fi
783 fi
784
785 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
786 echo "configure:787: checking whether ln -s works" >&5
787
788 rm -f conftestdata
789 if ln -s X conftestdata 2>/dev/null
790 then
791   rm -f conftestdata
792   ac_cv_prog_LN_S="ln -s"
793 else
794   ac_cv_prog_LN_S=ln
795 fi
796 LN_S="$ac_cv_prog_LN_S"
797 if test "$ac_cv_prog_LN_S" = "ln -s"; then
798   echo "$ac_t""yes" 1>&6
799 else
800   echo "$ac_t""no" 1>&6
801 fi
802
803
804 for dir in lisp etc man info; do
805   if test ! -d "$dir" ; then
806     echo Making symbolic link to "$srcdir/$dir"
807     ${LN_S} "$srcdir/$dir" "$dir"
808   fi
809 done
810
811
812 absolute_pwd="`pwd`";
813 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
814 then blddir="$PWD"
815 else blddir="$absolute_pwd"; if test -d "/net"; then
816   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
817   blddir=`echo "$blddir" | \
818    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
819 fi
820 fi
821
822
823 case "$srcdir" in
824   /* ) ;;
825   .  ) srcdir="$blddir" ;;
826   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
827   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
828   srcdir=`echo "$srcdir" | \
829    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
830 fi ;;
831 esac
832
833 if test `pwd` != `sh -c cd $srcdir && pwd`  \
834    && test -f "$srcdir/src/config.h"; then
835   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
836    echo "   as a build directory right now; it has been configured in its own"
837    echo "   right.  To configure in another directory as well, you MUST"
838    echo "   use GNU make.  If you do not have GNU make, then you must"
839    echo "   now do \`make distclean' in $srcdir,"
840    echo "   and then run $progname again.") >&2
841   extrasub='/^VPATH[     ]*=/c\
842 vpath %.c $(srcdir)\
843 vpath %.h $(srcdir)\
844 vpath %.y $(srcdir)\
845 vpath %.l $(srcdir)\
846 vpath %.s $(srcdir)\
847 vpath %.in $(srcdir)'
848 fi
849
850 . "$srcdir/version.sh" || exit 1;
851 if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
852 : "${extra_verbose=$beta}"
853 version="${emacs_major_version}.${emacs_minor_version}"
854 { test "$extra_verbose" = "yes" && cat << EOF
855     Defining EMACS_MAJOR_VERSION = $emacs_major_version
856 EOF
857 cat >> confdefs.h <<EOF
858 #define EMACS_MAJOR_VERSION $emacs_major_version
859 EOF
860 }
861
862 { test "$extra_verbose" = "yes" && cat << EOF
863     Defining EMACS_MINOR_VERSION = $emacs_minor_version
864 EOF
865 cat >> confdefs.h <<EOF
866 #define EMACS_MINOR_VERSION $emacs_minor_version
867 EOF
868 }
869
870 if test -n "$emacs_beta_version"; then
871   version="${version}-b${emacs_beta_version}"
872   { test "$extra_verbose" = "yes" && cat << EOF
873     Defining EMACS_BETA_VERSION = $emacs_beta_version
874 EOF
875 cat >> confdefs.h <<EOF
876 #define EMACS_BETA_VERSION $emacs_beta_version
877 EOF
878 }
879
880 fi
881 { test "$extra_verbose" = "yes" && cat << EOF
882     Defining XEMACS_CODENAME = "$xemacs_codename"
883 EOF
884 cat >> confdefs.h <<EOF
885 #define XEMACS_CODENAME "$xemacs_codename"
886 EOF
887 }
888
889 { test "$extra_verbose" = "yes" && cat << EOF
890     Defining EMACS_VERSION = "$version"
891 EOF
892 cat >> confdefs.h <<EOF
893 #define EMACS_VERSION "$version"
894 EOF
895 }
896
897
898 if test "$with_infodock" = "yes"; then
899   if test ! -f ../ID-INSTALL; then
900     echo "Cannot build InfoDock without InfoDock sources"
901     with_infodock=no
902   fi
903 fi
904
905 if test "$with_infodock" = "yes"; then
906       { test "$extra_verbose" = "yes" && cat << EOF
907     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
908 EOF
909 cat >> confdefs.h <<EOF
910 #define INFODOCK_MAJOR_VERSION $infodock_major_version
911 EOF
912 }
913
914   { test "$extra_verbose" = "yes" && cat << EOF
915     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
916 EOF
917 cat >> confdefs.h <<EOF
918 #define INFODOCK_MINOR_VERSION $infodock_minor_version
919 EOF
920 }
921
922   { test "$extra_verbose" = "yes" && cat << EOF
923     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define INFODOCK_BUILD_VERSION $infodock_build_version
927 EOF
928 }
929
930   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
931   PROGNAME=infodock
932   CPPFLAGS="$CPPFLAGS -DINFODOCK"
933 else
934   PROGNAME=xemacs
935 fi
936
937 if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
938 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
939     Defining ERROR_CHECK_EXTENTS
940 EOF
941 cat >> confdefs.h <<\EOF
942 #define ERROR_CHECK_EXTENTS 1
943 EOF
944 }
945
946 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
947     Defining ERROR_CHECK_TYPECHECK
948 EOF
949 cat >> confdefs.h <<\EOF
950 #define ERROR_CHECK_TYPECHECK 1
951 EOF
952 }
953
954 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
955     Defining ERROR_CHECK_BUFPOS
956 EOF
957 cat >> confdefs.h <<\EOF
958 #define ERROR_CHECK_BUFPOS 1
959 EOF
960 }
961
962 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
963     Defining ERROR_CHECK_GC
964 EOF
965 cat >> confdefs.h <<\EOF
966 #define ERROR_CHECK_GC 1
967 EOF
968 }
969
970 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
971     Defining ERROR_CHECK_MALLOC
972 EOF
973 cat >> confdefs.h <<\EOF
974 #define ERROR_CHECK_MALLOC 1
975 EOF
976 }
977
978 if test "${debug:=$beta}" = "yes"; then
979   use_assertions=yes memory_usage_stats=yes
980   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
981    echo "    xemacs will be linked with \"debug.o\""
982  fi
983   { test "$extra_verbose" = "yes" && cat << \EOF
984     Defining DEBUG_XEMACS
985 EOF
986 cat >> confdefs.h <<\EOF
987 #define DEBUG_XEMACS 1
988 EOF
989 }
990
991 fi
992 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
993     Defining USE_ASSERTIONS
994 EOF
995 cat >> confdefs.h <<\EOF
996 #define USE_ASSERTIONS 1
997 EOF
998 }
999
1000 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1001     Defining MEMORY_USAGE_STATS
1002 EOF
1003 cat >> confdefs.h <<\EOF
1004 #define MEMORY_USAGE_STATS 1
1005 EOF
1006 }
1007
1008
1009
1010 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1011 echo "configure:1012: checking "host system type"" >&5
1012 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1013 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1014 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1015 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1016 echo "$ac_t""$configuration" 1>&6
1017
1018
1019
1020
1021
1022 machine='' opsys=''
1023
1024 case "$canonical" in
1025   sparc-*-*        ) machine=sparc ;;
1026   alpha*-*-*       ) machine=alpha ;;
1027   vax-*-*          ) machine=vax ;;
1028   mips-dec-*       ) machine=pmax ;;
1029   mips-sgi-*       ) machine=iris4d ;;
1030   romp-ibm-*       ) machine=ibmrt ;;
1031   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1032   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1033   powerpc*-*       ) machine=powerpc ;;
1034   hppa-*-*         ) machine=hp800 ;;
1035   m88k-dg-*        ) machine=aviion ;;
1036   m68*-sony-*      ) machine=news ;;
1037   mips-sony-*      ) machine=news-risc ;;
1038   clipper-*        ) machine=clipper ;;
1039   arm-*            ) machine=arm ;;
1040   ns32k-*          ) machine=ns32000 ;;
1041 esac
1042
1043 case "$canonical" in
1044   *-*-linux*    ) opsys=linux ;;
1045   *-*-netbsd*   ) opsys=netbsd ;;
1046   *-*-openbsd*  ) opsys=openbsd ;;
1047   *-*-nextstep* ) opsys=nextstep ;;
1048   *-*-vms       ) opsys=vms ;;
1049
1050     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1051   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1052   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1053   *-dec-osf3*                ) opsys=decosf3-1 ;;
1054   *-dec-osf4*                ) opsys=decosf4-0 ;;
1055
1056     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1057   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1058   *-*-ultrix* )         opsys=ultrix4-3 ;;
1059
1060     *-*-aix3.1*  ) opsys=aix3-1 ;;
1061   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1062   *-*-aix3*    ) opsys=aix3-2   ;;
1063   *-*-aix4.0*  ) opsys=aix4     ;;
1064   *-*-aix4.1*  ) opsys=aix4-1   ;;
1065   *-*-aix4*    ) opsys=aix4-2   ;;
1066
1067     *-gnu* )                    opsys=gnu    ;;
1068   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1069   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1070   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1071   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1072   *-*-aos*   )                  opsys=bsd4-3 ;;
1073   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1074   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1075   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1076   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1077   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1078   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1079         if test -z "$NON_GNU_CPP" ; then
1080           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1081             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1082           done
1083         fi
1084         opsys=usg5-4-2 ;;
1085     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1086     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1087 esac
1088
1089 case "$canonical" in
1090
1091     *-*-netbsd* )
1092     case "$canonical" in
1093       i[3-9]86-*-netbsd*) machine=intel386 ;;
1094       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1095                                             machine=hp9000s300 ;;
1096       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1097       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1098     esac
1099   ;;
1100
1101     *-*-openbsd* )
1102     case "${canonical}" in
1103       i386-*-openbsd*)          machine=intel386 ;;
1104       m68k-*-openbsd*)          machine=hp9000s300 ;;
1105       mipsel-*-openbsd*)        machine=pmax ;;
1106      esac
1107    ;;
1108
1109     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1110   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1111
1112     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1113   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1114
1115     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1116
1117     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1118
1119     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1120
1121     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1122
1123     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1124
1125     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1126   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1127   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1128
1129   
1130     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1131
1132     *-convex-bsd* | *-convex-convexos* )
1133     machine=convex opsys=bsd4-3
1134     NON_GNU_CPP="cc -E -P"
1135   ;;
1136
1137     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1138
1139     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1140   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1141   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1142   m88k-dg-dgux*                           ) opsys=dgux     ;;
1143
1144     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1145   m88k-motorola-sysv4* )
1146                     machine=delta88k opsys=usg5-4-2
1147   ;;
1148   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1149
1150     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1151   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1152
1153     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1154
1155     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1156   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1157   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1158
1159       m88k-harris-cxux* )
1160         case "`uname -r`" in
1161        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1162        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1163     esac
1164     NON_GNU_CPP="/lib/cpp"
1165   ;;
1166     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1167     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1168
1169     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1170
1171     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1172
1173     *-hp-hpux* )
1174         case "$canonical" in
1175       m68*  ) machine=hp9000s300 ;;
1176       hppa* ) machine=hp800      ;;
1177     esac
1178
1179     case "$canonical" in
1180       *-hp-hpux7*  )  opsys=hpux   ;;
1181       *-hp-hpux8*  )  opsys=hpux8  ;;
1182       *-hp-hpux9*  )  opsys=hpux9  ;;
1183       *-hp-hpux10* )  opsys=hpux10 ;;
1184       *-hp-hpux11* )  opsys=hpux11 ;;
1185       *            )  opsys=hpux   ;;
1186     esac
1187
1188         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1189    echo "    xemacs will be linked with \"strcat.o\""
1190  fi ;; esac
1191
1192     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1193         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1194     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1195
1196     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1197   ;;
1198
1199     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1200   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1201
1202     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1203   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1204   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1205   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1206   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1207   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1208
1209     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1210   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1211
1212     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1213
1214     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1215
1216     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1217
1218     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1219
1220       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1221
1222     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1223
1224     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1225
1226     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1227
1228     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1229
1230         mips-mips-usg* ) machine=mips4 ;;
1231   mips-mips-riscos4 )
1232     machine=mips4
1233     NON_GNU_CC="cc -systype bsd43"
1234     NON_GNU_CPP="cc -systype bsd43 -E"
1235     case "$canonical" in
1236       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1237       mips-mips-riscos5* ) opsys=riscos5 ;;
1238     esac
1239   ;;
1240   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1241   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1242
1243     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1244
1245     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1246
1247     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1248   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1249
1250     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1251
1252     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1253
1254     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1255
1256     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1257
1258     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1259   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1260
1261     mips-siemens-sysv* | mips-sni-sysv*)
1262     machine=mips-siemens opsys=usg5-4
1263     NON_GNU_CC=/usr/ccs/bin/cc
1264     NON_GNU_CPP=/usr/ccs/lib/cpp
1265   ;;
1266
1267     mips-nec-sysv*)
1268     machine=mips-nec
1269     NON_GNU_CC=/usr/ccs/bin/cc
1270     NON_GNU_CPP=/usr/ccs/lib/cpp
1271   ;;
1272
1273       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1274   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1275     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1276   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1277   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1278   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1279   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1280   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1281   mips-sgi-irix*      ) opsys=irix5-0 ;;
1282
1283     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1284   *-sony-news* ) opsys=newsos5 ;;
1285
1286     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1287
1288     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1289         case "$canonical" in
1290       m68*-sunos1* )             machine=sun1     ;;
1291       m68*-sunos2* )             machine=sun2     ;;
1292       m68* )                     machine=sun3     ;;
1293       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1294       i*86-*-* )                 machine=intel386 ;;
1295       rs6000* )                  machine=rs6000   ;;
1296     esac
1297
1298         case "$canonical" in *-sunos5*)
1299       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1300     esac
1301
1302                     case "$canonical" in
1303       *-sunos4* )
1304         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1305         : ;;
1306       *-solaris2* )
1307         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1308         RANLIB=':' ;;
1309     esac
1310
1311     case "$canonical" in
1312       *-solaris*          )
1313         opsys=sol2
1314         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1315         { test "$extra_verbose" = "yes" && cat << EOF
1316     Defining OS_RELEASE = $os_release
1317 EOF
1318 cat >> confdefs.h <<EOF
1319 #define OS_RELEASE $os_release
1320 EOF
1321 }
1322  ;;
1323
1324             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1325       *-sunos4.0*         ) opsys=sunos4-0      ;;
1326       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1327       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1328       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1329       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1330       *-mach*             ) opsys=mach-bsd4-3   ;;
1331       *                   ) opsys=bsd4-2        ;;
1332     esac
1333
1334     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1335
1336         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1337   ;;
1338
1339     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1340
1341     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1342   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1343
1344     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1345
1346     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1347
1348     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1349       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1350
1351     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1352
1353     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1354
1355     vax-dec-* )
1356     case "$canonical" in
1357       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1358       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1359       *-mach* )                         opsys=mach-bsd4-3 ;;
1360     esac
1361   ;;
1362
1363     ns16k-whitechapel-* ) machine=mg1 ;;
1364
1365     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1366
1367     i[3-9]86-*-* )
1368     machine=intel386
1369     case "$canonical" in
1370       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1371       *-isc2.2* )               opsys=isc2-2 ;;
1372       *-isc4.0* )               opsys=isc4-0 ;;
1373       *-isc4.* )                opsys=isc4-1
1374                                 GCC_TEST_OPTIONS=-posix
1375                                 NON_GCC_TEST_OPTIONS=-Xp
1376                                 ;;
1377       *-isc* )                  opsys=isc3-0 ;;
1378       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1379       *-esix* )                 opsys=esix ;;
1380       *-mach* )                 opsys=mach-bsd4-3 ;;
1381       *-xenix* )                opsys=xenix ;;
1382       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1383       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1384       *-bsdi4* )                opsys=bsdos4 ;;
1385       *-bsdi3* )                opsys=bsdos3 ;;
1386       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1387       *-bsdi2* )                opsys=bsdos2 ;;
1388       *-sco3.2v5* )             opsys=sco5 ;
1389                                                         if test "$dynamic" = "yes" ; then
1390                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1391         else
1392                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1393         fi ;;
1394       *-386bsd* )               opsys=386bsd ;;
1395       *-freebsd* )              opsys=freebsd ;;
1396       *-nextstep* )             opsys=nextstep ;;
1397       *-pc-cygwin32 )           opsys=cygwin32 ;;
1398           esac
1399   ;;
1400
1401     m68k-*-linux* ) machine=m68k opsys=linux ;;
1402
1403 esac
1404
1405 if test -z "$machine" -o -z "$opsys"; then
1406   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1407    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1408   ) >&2
1409   exit 1
1410 fi
1411
1412 if test -z "$dynamic"; then
1413   case "$opsys" in
1414     hpux* | sunos4* ) dynamic=no ;;
1415     *) dynamic=yes ;;
1416   esac
1417 fi
1418 if test "$dynamic" = "yes"; then
1419   case "$opsys" in
1420     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1421     decosf* ) ld_call_shared="-call_shared" ;;
1422   esac
1423 else   case "$opsys" in
1424     sol2 )
1425       echo "Static linking is not supported on Solaris 2."
1426       echo "Rerun configure without specifying --dynamic=no."
1427       exit 1 ;;
1428     linux   ) ld_call_shared="-Bstatic" ;;
1429     decosf* ) ld_call_shared="-non_shared" ;;
1430   esac
1431 fi
1432
1433 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1434
1435 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1436 { test "$extra_verbose" = "yes" && cat << EOF
1437     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1438 EOF
1439 cat >> confdefs.h <<EOF
1440 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1441 EOF
1442 }
1443
1444
1445 machfile="m/${machine}.h"
1446 opsysfile="s/${opsys}.h"
1447
1448
1449 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1450 if test "$with_workshop $with_tooltalk" = "yes no"; then
1451   (echo "$progname: Usage error:"
1452 echo " " "--with-workshop requires --with-tooltalk"
1453 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1454 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1455 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1456 fi
1457
1458 if test "$with_workshop" = "yes"; then
1459   { test "$extra_verbose" = "yes" && cat << \EOF
1460     Defining SUNPRO
1461 EOF
1462 cat >> confdefs.h <<\EOF
1463 #define SUNPRO 1
1464 EOF
1465 }
1466
1467   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1468    echo "    xemacs will be linked with \"sunpro.o\""
1469  fi
1470 fi
1471
1472 if test "$with_clash_detection" = "yes"; then
1473   { test "$extra_verbose" = "yes" && cat << \EOF
1474     Defining CLASH_DETECTION
1475 EOF
1476 cat >> confdefs.h <<\EOF
1477 #define CLASH_DETECTION 1
1478 EOF
1479 }
1480
1481   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1482    echo "    xemacs will be linked with \"filelock.o\""
1483  fi
1484 fi
1485
1486 test -n "$compiler" && CC="$compiler"
1487 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1488 fi
1489
1490 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1491 if test "${CFLAGS-unset}" != unset
1492   then cflags_specified=yes;
1493   else cflags_specified=no;
1494 fi
1495
1496 xe_save_CFLAGS="$CFLAGS"
1497
1498 # Extract the first word of "gcc", so it can be a program name with args.
1499 set dummy gcc; ac_word=$2
1500 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1501 echo "configure:1502: checking for $ac_word" >&5
1502
1503 if test -n "$CC"; then
1504   ac_cv_prog_CC="$CC" # Let the user override the test.
1505 else
1506   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1507   ac_dummy="$PATH"
1508   for ac_dir in $ac_dummy; do
1509     test -z "$ac_dir" && ac_dir=.
1510     if test -f $ac_dir/$ac_word; then
1511       ac_cv_prog_CC="gcc"
1512       break
1513     fi
1514   done
1515   IFS="$ac_save_ifs"
1516 fi
1517 CC="$ac_cv_prog_CC"
1518 if test -n "$CC"; then
1519   echo "$ac_t""$CC" 1>&6
1520 else
1521   echo "$ac_t""no" 1>&6
1522 fi
1523
1524 if test -z "$CC"; then
1525   # Extract the first word of "cc", so it can be a program name with args.
1526 set dummy cc; ac_word=$2
1527 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1528 echo "configure:1529: checking for $ac_word" >&5
1529
1530 if test -n "$CC"; then
1531   ac_cv_prog_CC="$CC" # Let the user override the test.
1532 else
1533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1534   ac_prog_rejected=no
1535   ac_dummy="$PATH"
1536   for ac_dir in $ac_dummy; do
1537     test -z "$ac_dir" && ac_dir=.
1538     if test -f $ac_dir/$ac_word; then
1539       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1540         ac_prog_rejected=yes
1541         continue
1542       fi
1543       ac_cv_prog_CC="cc"
1544       break
1545     fi
1546   done
1547   IFS="$ac_save_ifs"
1548 if test $ac_prog_rejected = yes; then
1549   # We found a bogon in the path, so make sure we never use it.
1550   set dummy $ac_cv_prog_CC
1551   shift
1552   if test $# -gt 0; then
1553     # We chose a different compiler from the bogus one.
1554     # However, it has the same basename, so the bogon will be chosen
1555     # first if we set CC to just the basename; use the full file name.
1556     shift
1557     set dummy "$ac_dir/$ac_word" "$@"
1558     shift
1559     ac_cv_prog_CC="$@"
1560   fi
1561 fi
1562 fi
1563 CC="$ac_cv_prog_CC"
1564 if test -n "$CC"; then
1565   echo "$ac_t""$CC" 1>&6
1566 else
1567   echo "$ac_t""no" 1>&6
1568 fi
1569
1570   if test -z "$CC"; then
1571     case "`uname -s`" in
1572     *win32* | *WIN32*)
1573       # Extract the first word of "cl", so it can be a program name with args.
1574 set dummy cl; ac_word=$2
1575 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1576 echo "configure:1577: checking for $ac_word" >&5
1577
1578 if test -n "$CC"; then
1579   ac_cv_prog_CC="$CC" # Let the user override the test.
1580 else
1581   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1582   ac_dummy="$PATH"
1583   for ac_dir in $ac_dummy; do
1584     test -z "$ac_dir" && ac_dir=.
1585     if test -f $ac_dir/$ac_word; then
1586       ac_cv_prog_CC="cl"
1587       break
1588     fi
1589   done
1590   IFS="$ac_save_ifs"
1591 fi
1592 CC="$ac_cv_prog_CC"
1593 if test -n "$CC"; then
1594   echo "$ac_t""$CC" 1>&6
1595 else
1596   echo "$ac_t""no" 1>&6
1597 fi
1598  ;;
1599     esac
1600   fi
1601   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1602 fi
1603
1604 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1605 echo "configure:1606: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1606
1607 ac_ext=c
1608 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1609 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1610 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1611 ac_cpp='$CPP '"$xe_cppflags"
1612 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1613 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1614 cross_compiling=no
1615
1616 cat > conftest.$ac_ext << EOF
1617
1618 #line 1619 "configure"
1619 #include "confdefs.h"
1620
1621 main(){return(0);}
1622 EOF
1623 if { (eval echo configure:1624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1624   ac_cv_prog_cc_works=yes
1625   # If we can't run a trivial program, we are probably using a cross compiler.
1626   if (./conftest; exit) 2>/dev/null; then
1627     ac_cv_prog_cc_cross=no
1628   else
1629     ac_cv_prog_cc_cross=yes
1630   fi
1631 else
1632   echo "configure: failed program was:" >&5
1633   cat conftest.$ac_ext >&5
1634   ac_cv_prog_cc_works=no
1635 fi
1636 rm -fr conftest*
1637 ac_ext=c
1638 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1639 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1640 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1641 ac_cpp='$CPP '"$xe_cppflags"
1642 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1643 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1644 cross_compiling=no
1645
1646 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1647 if test $ac_cv_prog_cc_works = no; then
1648   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1649 fi
1650 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1651 echo "configure:1652: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1652 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1653 cross_compiling=$ac_cv_prog_cc_cross
1654
1655 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1656 echo "configure:1657: checking whether we are using GNU C" >&5
1657
1658 cat > conftest.c <<EOF
1659 #ifdef __GNUC__
1660   yes;
1661 #endif
1662 EOF
1663 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1664   ac_cv_prog_gcc=yes
1665 else
1666   ac_cv_prog_gcc=no
1667 fi
1668
1669 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1670
1671 if test $ac_cv_prog_gcc = yes; then
1672   GCC=yes
1673 else
1674   GCC=
1675 fi
1676
1677 ac_test_CFLAGS="${CFLAGS+set}"
1678 ac_save_CFLAGS="$CFLAGS"
1679 CFLAGS=
1680 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1681 echo "configure:1682: checking whether ${CC-cc} accepts -g" >&5
1682
1683 echo 'void f(){}' > conftest.c
1684 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1685   ac_cv_prog_cc_g=yes
1686 else
1687   ac_cv_prog_cc_g=no
1688 fi
1689 rm -f conftest*
1690
1691
1692 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1693 if test "$ac_test_CFLAGS" = set; then
1694   CFLAGS="$ac_save_CFLAGS"
1695 elif test $ac_cv_prog_cc_g = yes; then
1696   if test "$GCC" = yes; then
1697     CFLAGS="-g -O2"
1698   else
1699     CFLAGS="-g"
1700   fi
1701 else
1702   if test "$GCC" = yes; then
1703     CFLAGS="-O2"
1704   else
1705     CFLAGS=
1706   fi
1707 fi
1708  
1709 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1710   CC=${NON_GNU_CC-cc}
1711   # Extract the first word of "gcc", so it can be a program name with args.
1712 set dummy gcc; ac_word=$2
1713 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1714 echo "configure:1715: checking for $ac_word" >&5
1715
1716 if test -n "$CC"; then
1717   ac_cv_prog_CC="$CC" # Let the user override the test.
1718 else
1719   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1720   ac_dummy="$PATH"
1721   for ac_dir in $ac_dummy; do
1722     test -z "$ac_dir" && ac_dir=.
1723     if test -f $ac_dir/$ac_word; then
1724       ac_cv_prog_CC="gcc"
1725       break
1726     fi
1727   done
1728   IFS="$ac_save_ifs"
1729 fi
1730 CC="$ac_cv_prog_CC"
1731 if test -n "$CC"; then
1732   echo "$ac_t""$CC" 1>&6
1733 else
1734   echo "$ac_t""no" 1>&6
1735 fi
1736
1737 if test -z "$CC"; then
1738   # Extract the first word of "cc", so it can be a program name with args.
1739 set dummy cc; ac_word=$2
1740 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1741 echo "configure:1742: checking for $ac_word" >&5
1742
1743 if test -n "$CC"; then
1744   ac_cv_prog_CC="$CC" # Let the user override the test.
1745 else
1746   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1747   ac_prog_rejected=no
1748   ac_dummy="$PATH"
1749   for ac_dir in $ac_dummy; do
1750     test -z "$ac_dir" && ac_dir=.
1751     if test -f $ac_dir/$ac_word; then
1752       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1753         ac_prog_rejected=yes
1754         continue
1755       fi
1756       ac_cv_prog_CC="cc"
1757       break
1758     fi
1759   done
1760   IFS="$ac_save_ifs"
1761 if test $ac_prog_rejected = yes; then
1762   # We found a bogon in the path, so make sure we never use it.
1763   set dummy $ac_cv_prog_CC
1764   shift
1765   if test $# -gt 0; then
1766     # We chose a different compiler from the bogus one.
1767     # However, it has the same basename, so the bogon will be chosen
1768     # first if we set CC to just the basename; use the full file name.
1769     shift
1770     set dummy "$ac_dir/$ac_word" "$@"
1771     shift
1772     ac_cv_prog_CC="$@"
1773   fi
1774 fi
1775 fi
1776 CC="$ac_cv_prog_CC"
1777 if test -n "$CC"; then
1778   echo "$ac_t""$CC" 1>&6
1779 else
1780   echo "$ac_t""no" 1>&6
1781 fi
1782
1783   if test -z "$CC"; then
1784     case "`uname -s`" in
1785     *win32* | *WIN32*)
1786       # Extract the first word of "cl", so it can be a program name with args.
1787 set dummy cl; ac_word=$2
1788 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1789 echo "configure:1790: checking for $ac_word" >&5
1790
1791 if test -n "$CC"; then
1792   ac_cv_prog_CC="$CC" # Let the user override the test.
1793 else
1794   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1795   ac_dummy="$PATH"
1796   for ac_dir in $ac_dummy; do
1797     test -z "$ac_dir" && ac_dir=.
1798     if test -f $ac_dir/$ac_word; then
1799       ac_cv_prog_CC="cl"
1800       break
1801     fi
1802   done
1803   IFS="$ac_save_ifs"
1804 fi
1805 CC="$ac_cv_prog_CC"
1806 if test -n "$CC"; then
1807   echo "$ac_t""$CC" 1>&6
1808 else
1809   echo "$ac_t""no" 1>&6
1810 fi
1811  ;;
1812     esac
1813   fi
1814   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1815 fi
1816
1817 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1818 echo "configure:1819: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1819
1820 ac_ext=c
1821 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1822 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1823 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1824 ac_cpp='$CPP '"$xe_cppflags"
1825 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1826 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1827 cross_compiling=no
1828
1829 cat > conftest.$ac_ext << EOF
1830
1831 #line 1832 "configure"
1832 #include "confdefs.h"
1833
1834 main(){return(0);}
1835 EOF
1836 if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1837   ac_cv_prog_cc_works=yes
1838   # If we can't run a trivial program, we are probably using a cross compiler.
1839   if (./conftest; exit) 2>/dev/null; then
1840     ac_cv_prog_cc_cross=no
1841   else
1842     ac_cv_prog_cc_cross=yes
1843   fi
1844 else
1845   echo "configure: failed program was:" >&5
1846   cat conftest.$ac_ext >&5
1847   ac_cv_prog_cc_works=no
1848 fi
1849 rm -fr conftest*
1850 ac_ext=c
1851 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1852 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1853 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1854 ac_cpp='$CPP '"$xe_cppflags"
1855 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1856 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1857 cross_compiling=no
1858
1859 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1860 if test $ac_cv_prog_cc_works = no; then
1861   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1862 fi
1863 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1864 echo "configure:1865: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1865 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1866 cross_compiling=$ac_cv_prog_cc_cross
1867
1868 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1869 echo "configure:1870: checking whether we are using GNU C" >&5
1870
1871 cat > conftest.c <<EOF
1872 #ifdef __GNUC__
1873   yes;
1874 #endif
1875 EOF
1876 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1877   ac_cv_prog_gcc=yes
1878 else
1879   ac_cv_prog_gcc=no
1880 fi
1881
1882 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1883
1884 if test $ac_cv_prog_gcc = yes; then
1885   GCC=yes
1886 else
1887   GCC=
1888 fi
1889
1890 ac_test_CFLAGS="${CFLAGS+set}"
1891 ac_save_CFLAGS="$CFLAGS"
1892 CFLAGS=
1893 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1894 echo "configure:1895: checking whether ${CC-cc} accepts -g" >&5
1895
1896 echo 'void f(){}' > conftest.c
1897 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1898   ac_cv_prog_cc_g=yes
1899 else
1900   ac_cv_prog_cc_g=no
1901 fi
1902 rm -f conftest*
1903
1904
1905 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1906 if test "$ac_test_CFLAGS" = set; then
1907   CFLAGS="$ac_save_CFLAGS"
1908 elif test $ac_cv_prog_cc_g = yes; then
1909   if test "$GCC" = yes; then
1910     CFLAGS="-g -O2"
1911   else
1912     CFLAGS="-g"
1913   fi
1914 else
1915   if test "$GCC" = yes; then
1916     CFLAGS="-O2"
1917   else
1918     CFLAGS=
1919   fi
1920 fi
1921
1922 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1923   CC=gcc
1924   # Extract the first word of "gcc", so it can be a program name with args.
1925 set dummy gcc; ac_word=$2
1926 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1927 echo "configure:1928: checking for $ac_word" >&5
1928
1929 if test -n "$CC"; then
1930   ac_cv_prog_CC="$CC" # Let the user override the test.
1931 else
1932   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1933   ac_dummy="$PATH"
1934   for ac_dir in $ac_dummy; do
1935     test -z "$ac_dir" && ac_dir=.
1936     if test -f $ac_dir/$ac_word; then
1937       ac_cv_prog_CC="gcc"
1938       break
1939     fi
1940   done
1941   IFS="$ac_save_ifs"
1942 fi
1943 CC="$ac_cv_prog_CC"
1944 if test -n "$CC"; then
1945   echo "$ac_t""$CC" 1>&6
1946 else
1947   echo "$ac_t""no" 1>&6
1948 fi
1949
1950 if test -z "$CC"; then
1951   # Extract the first word of "cc", so it can be a program name with args.
1952 set dummy cc; ac_word=$2
1953 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1954 echo "configure:1955: checking for $ac_word" >&5
1955
1956 if test -n "$CC"; then
1957   ac_cv_prog_CC="$CC" # Let the user override the test.
1958 else
1959   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1960   ac_prog_rejected=no
1961   ac_dummy="$PATH"
1962   for ac_dir in $ac_dummy; do
1963     test -z "$ac_dir" && ac_dir=.
1964     if test -f $ac_dir/$ac_word; then
1965       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1966         ac_prog_rejected=yes
1967         continue
1968       fi
1969       ac_cv_prog_CC="cc"
1970       break
1971     fi
1972   done
1973   IFS="$ac_save_ifs"
1974 if test $ac_prog_rejected = yes; then
1975   # We found a bogon in the path, so make sure we never use it.
1976   set dummy $ac_cv_prog_CC
1977   shift
1978   if test $# -gt 0; then
1979     # We chose a different compiler from the bogus one.
1980     # However, it has the same basename, so the bogon will be chosen
1981     # first if we set CC to just the basename; use the full file name.
1982     shift
1983     set dummy "$ac_dir/$ac_word" "$@"
1984     shift
1985     ac_cv_prog_CC="$@"
1986   fi
1987 fi
1988 fi
1989 CC="$ac_cv_prog_CC"
1990 if test -n "$CC"; then
1991   echo "$ac_t""$CC" 1>&6
1992 else
1993   echo "$ac_t""no" 1>&6
1994 fi
1995
1996   if test -z "$CC"; then
1997     case "`uname -s`" in
1998     *win32* | *WIN32*)
1999       # Extract the first word of "cl", so it can be a program name with args.
2000 set dummy cl; ac_word=$2
2001 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2002 echo "configure:2003: checking for $ac_word" >&5
2003
2004 if test -n "$CC"; then
2005   ac_cv_prog_CC="$CC" # Let the user override the test.
2006 else
2007   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2008   ac_dummy="$PATH"
2009   for ac_dir in $ac_dummy; do
2010     test -z "$ac_dir" && ac_dir=.
2011     if test -f $ac_dir/$ac_word; then
2012       ac_cv_prog_CC="cl"
2013       break
2014     fi
2015   done
2016   IFS="$ac_save_ifs"
2017 fi
2018 CC="$ac_cv_prog_CC"
2019 if test -n "$CC"; then
2020   echo "$ac_t""$CC" 1>&6
2021 else
2022   echo "$ac_t""no" 1>&6
2023 fi
2024  ;;
2025     esac
2026   fi
2027   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2028 fi
2029
2030 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2031 echo "configure:2032: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2032
2033 ac_ext=c
2034 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2035 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2036 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2037 ac_cpp='$CPP '"$xe_cppflags"
2038 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2039 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2040 cross_compiling=no
2041
2042 cat > conftest.$ac_ext << EOF
2043
2044 #line 2045 "configure"
2045 #include "confdefs.h"
2046
2047 main(){return(0);}
2048 EOF
2049 if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2050   ac_cv_prog_cc_works=yes
2051   # If we can't run a trivial program, we are probably using a cross compiler.
2052   if (./conftest; exit) 2>/dev/null; then
2053     ac_cv_prog_cc_cross=no
2054   else
2055     ac_cv_prog_cc_cross=yes
2056   fi
2057 else
2058   echo "configure: failed program was:" >&5
2059   cat conftest.$ac_ext >&5
2060   ac_cv_prog_cc_works=no
2061 fi
2062 rm -fr conftest*
2063 ac_ext=c
2064 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2065 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2066 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2067 ac_cpp='$CPP '"$xe_cppflags"
2068 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2069 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2070 cross_compiling=no
2071
2072 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2073 if test $ac_cv_prog_cc_works = no; then
2074   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2075 fi
2076 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2077 echo "configure:2078: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2078 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2079 cross_compiling=$ac_cv_prog_cc_cross
2080
2081 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2082 echo "configure:2083: checking whether we are using GNU C" >&5
2083
2084 cat > conftest.c <<EOF
2085 #ifdef __GNUC__
2086   yes;
2087 #endif
2088 EOF
2089 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2090   ac_cv_prog_gcc=yes
2091 else
2092   ac_cv_prog_gcc=no
2093 fi
2094
2095 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2096
2097 if test $ac_cv_prog_gcc = yes; then
2098   GCC=yes
2099 else
2100   GCC=
2101 fi
2102
2103 ac_test_CFLAGS="${CFLAGS+set}"
2104 ac_save_CFLAGS="$CFLAGS"
2105 CFLAGS=
2106 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2107 echo "configure:2108: checking whether ${CC-cc} accepts -g" >&5
2108
2109 echo 'void f(){}' > conftest.c
2110 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2111   ac_cv_prog_cc_g=yes
2112 else
2113   ac_cv_prog_cc_g=no
2114 fi
2115 rm -f conftest*
2116
2117
2118 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2119 if test "$ac_test_CFLAGS" = set; then
2120   CFLAGS="$ac_save_CFLAGS"
2121 elif test $ac_cv_prog_cc_g = yes; then
2122   if test "$GCC" = yes; then
2123     CFLAGS="-g -O2"
2124   else
2125     CFLAGS="-g"
2126   fi
2127 else
2128   if test "$GCC" = yes; then
2129     CFLAGS="-O2"
2130   else
2131     CFLAGS=
2132   fi
2133 fi
2134
2135 fi
2136 CFLAGS="$xe_save_CFLAGS"
2137
2138
2139 test -n "$CPP" -a -d "$CPP" && CPP=
2140
2141 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2142
2143 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2144 echo "configure:2145: checking how to run the C preprocessor" >&5
2145 # On Suns, sometimes $CPP names a directory.
2146 if test -n "$CPP" && test -d "$CPP"; then
2147   CPP=
2148 fi
2149 if test -z "$CPP"; then
2150
2151   # This must be in double quotes, not single quotes, because CPP may get
2152   # substituted into the Makefile and "${CC-cc}" will confuse make.
2153   CPP="${CC-cc} -E"
2154   # On the NeXT, cc -E runs the code through the compiler's parser,
2155   # not just through cpp.
2156   cat > conftest.$ac_ext <<EOF
2157 #line 2158 "configure"
2158 #include "confdefs.h"
2159 #include <assert.h>
2160 Syntax Error
2161 EOF
2162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2163 { (eval echo configure:2164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2165 if test -z "$ac_err"; then
2166   :
2167 else
2168   echo "$ac_err" >&5
2169   echo "configure: failed program was:" >&5
2170   cat conftest.$ac_ext >&5
2171   rm -rf conftest*
2172   CPP="${CC-cc} -E -traditional-cpp"
2173   cat > conftest.$ac_ext <<EOF
2174 #line 2175 "configure"
2175 #include "confdefs.h"
2176 #include <assert.h>
2177 Syntax Error
2178 EOF
2179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2180 { (eval echo configure:2181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2182 if test -z "$ac_err"; then
2183   :
2184 else
2185   echo "$ac_err" >&5
2186   echo "configure: failed program was:" >&5
2187   cat conftest.$ac_ext >&5
2188   rm -rf conftest*
2189   CPP="${CC-cc} -nologo -E"
2190   cat > conftest.$ac_ext <<EOF
2191 #line 2192 "configure"
2192 #include "confdefs.h"
2193 #include <assert.h>
2194 Syntax Error
2195 EOF
2196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2197 { (eval echo configure:2198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2199 if test -z "$ac_err"; then
2200   :
2201 else
2202   echo "$ac_err" >&5
2203   echo "configure: failed program was:" >&5
2204   cat conftest.$ac_ext >&5
2205   rm -rf conftest*
2206   CPP=/lib/cpp
2207 fi
2208 rm -f conftest*
2209 fi
2210 rm -f conftest*
2211 fi
2212 rm -f conftest*
2213   ac_cv_prog_CPP="$CPP"
2214   CPP="$ac_cv_prog_CPP"
2215 else
2216   ac_cv_prog_CPP="$CPP"
2217 fi
2218 echo "$ac_t""$CPP" 1>&6
2219
2220
2221 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2222 echo "configure:2223: checking for AIX" >&5
2223 cat > conftest.$ac_ext <<EOF
2224 #line 2225 "configure"
2225 #include "confdefs.h"
2226 #ifdef _AIX
2227   yes
2228 #endif
2229
2230 EOF
2231 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2232   egrep "yes" >/dev/null 2>&1; then
2233   rm -rf conftest*
2234   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2235     Defining _ALL_SOURCE
2236 EOF
2237 cat >> confdefs.h <<\EOF
2238 #define _ALL_SOURCE 1
2239 EOF
2240 }
2241
2242 else
2243   rm -rf conftest*
2244   echo "$ac_t""no" 1>&6
2245 fi
2246 rm -f conftest*
2247
2248
2249
2250 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2251 echo "configure:2252: checking for GNU libc" >&5
2252 cat > conftest.$ac_ext <<EOF
2253 #line 2254 "configure"
2254 #include "confdefs.h"
2255 #include <features.h>
2256 int main() {
2257
2258 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2259 #error Not a GNU libc system :-(
2260 ******* ======= ******** &&&&&&&&
2261 #endif
2262
2263 ; return 0; }
2264 EOF
2265 if { (eval echo configure:2266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2266   rm -rf conftest*
2267   have_glibc=yes
2268 else
2269   echo "configure: failed program was:" >&5
2270   cat conftest.$ac_ext >&5
2271   rm -rf conftest*
2272   have_glibc=no
2273 fi
2274 rm -f conftest*
2275 echo "$ac_t""$have_glibc" 1>&6
2276 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2277     Defining _GNU_SOURCE
2278 EOF
2279 cat >> confdefs.h <<\EOF
2280 #define _GNU_SOURCE 1
2281 EOF
2282 }
2283
2284
2285
2286 cat > conftest.$ac_ext <<EOF
2287 #line 2288 "configure"
2288 #include "confdefs.h"
2289 int main () {
2290 #if defined __SUNPRO_C
2291 return 11;
2292 #elif defined __DECC
2293 return 12;
2294 #else
2295 return 0;
2296 #endif
2297 }
2298 EOF
2299 if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2300 then
2301   :
2302 else
2303   conftest_rc="$?"
2304   echo "configure: failed program was:" >&5
2305   cat conftest.$ac_ext >&5
2306   rm -fr conftest*
2307   case "$conftest_rc" in
2308   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2309   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2310 esac
2311 fi
2312 rm -fr conftest*
2313
2314
2315
2316
2317 echo "Extracting information from the machine- and system-dependent headers..."
2318
2319 tempcname="conftest.c"
2320
2321
2322
2323 cat > $tempcname <<EOF
2324 #define NOT_C_CODE
2325 #define C_SWITCH_SITE
2326 #define C_SWITCH_X_SITE
2327 #define LD_SWITCH_SITE
2328 #define LD_SWITCH_X_SITE
2329 #define LD_SWITCH_X_SITE_AUX
2330 #define OS_RELEASE $os_release
2331 #include "$srcdir/src/$opsysfile"
2332 #include "$srcdir/src/$machfile"
2333
2334 #ifndef LIBS_MACHINE
2335 #define LIBS_MACHINE
2336 #endif
2337 configure___ libs_machine=LIBS_MACHINE
2338
2339 #ifndef LIBS_SYSTEM
2340 #define LIBS_SYSTEM
2341 #endif
2342 configure___ libs_system=LIBS_SYSTEM
2343
2344 #ifndef LIBS_TERMCAP
2345 #define LIBS_TERMCAP
2346 #endif
2347 configure___ libs_termcap=LIBS_TERMCAP
2348
2349 #ifndef LIB_STANDARD
2350 #define LIB_STANDARD
2351 #endif
2352 configure___ libs_standard=LIB_STANDARD
2353
2354
2355 #ifndef OBJECTS_MACHINE
2356 #define OBJECTS_MACHINE
2357 #endif
2358 configure___ objects_machine=OBJECTS_MACHINE
2359
2360 #ifndef OBJECTS_SYSTEM
2361 #define OBJECTS_SYSTEM
2362 #endif
2363 configure___ objects_system=OBJECTS_SYSTEM
2364
2365
2366 #ifndef C_SWITCH_MACHINE
2367 #define C_SWITCH_MACHINE
2368 #endif
2369 configure___ c_switch_machine=C_SWITCH_MACHINE
2370
2371 #ifndef C_SWITCH_SYSTEM
2372 #define C_SWITCH_SYSTEM
2373 #endif
2374 configure___ c_switch_system=C_SWITCH_SYSTEM
2375
2376
2377 #ifndef LD_SWITCH_MACHINE
2378 #define LD_SWITCH_MACHINE
2379 #endif
2380 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2381
2382 #ifndef LD_SWITCH_SYSTEM
2383 #define LD_SWITCH_SYSTEM
2384 #endif
2385 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2386
2387
2388 #ifndef UNEXEC
2389 #define UNEXEC "unexec.o"
2390 #endif
2391 configure___ unexec=UNEXEC
2392
2393
2394 #ifndef LD_SWITCH_SHARED
2395 #define LD_SWITCH_SHARED "-c"
2396 #endif
2397 configure___ ld_switch_shared=LD_SWITCH_SHARED
2398
2399
2400 #ifdef ORDINARY_LINK
2401 #define LD "\$(CC) \$(CFLAGS)"
2402 #else /* no ORDINARY LINK */
2403 #ifdef COFF_ENCAPSULATE
2404 #define LD "\$(CC) -nostdlib"
2405 #else /* not COFF_ENCAPSULATE */
2406 #ifdef LINKER
2407 #define LD LINKER
2408 #else /* ! defined (LINKER) */
2409 #define LD "ld"
2410 #endif /* ! defined (LINKER) */
2411 #endif /* ! defined (COFF_ENCAPSULATE) */
2412 #endif /* not ORDINARY_LINK */
2413 configure___ ld=LD
2414
2415 #ifndef LIB_GCC
2416 #define LIB_GCC
2417 #endif
2418 configure___ lib_gcc=LIB_GCC
2419
2420 #ifndef LD_TEXT_START_ADDR
2421 #define LD_TEXT_START_ADDR
2422 #endif
2423 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2424
2425
2426 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2427 #ifdef NO_REMAP
2428 #ifdef COFF_ENCAPSULATE
2429 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2430 #else /* ! defined (COFF_ENCAPSULATE) */
2431 #define START_FILES "pre-crt0.o /lib/crt0.o"
2432 #endif /* ! defined (COFF_ENCAPSULATE) */
2433 #else /* ! defined (NO_REMAP) */
2434 #define START_FILES "ecrt0.o"
2435 #endif /* ! defined (NO_REMAP) */
2436 #endif /* no ORDINARY_LINK */
2437 #ifndef START_FILES
2438 #define START_FILES
2439 #endif
2440 configure___ start_files=START_FILES
2441
2442 #ifdef ORDINARY_LINK
2443 configure___ ordinary_link=yes
2444 #else
2445 configure___ ordinary_link=no
2446 #endif
2447
2448 #ifdef SYSTEM_MALLOC
2449 configure___ system_malloc=yes
2450 #else
2451 configure___ system_malloc=no
2452 #endif
2453
2454 #ifdef TERMINFO
2455 configure___ have_terminfo=yes
2456 #else
2457 configure___ have_terminfo=no
2458 #endif
2459
2460 #ifdef MAIL_USE_FLOCK
2461 configure___ mail_use_flock=yes
2462 #else
2463 configure___ mail_use_flock=no
2464 #endif
2465
2466 #ifdef MAIL_USE_LOCKF
2467 configure___ mail_use_lockf=yes
2468 #else
2469 configure___ mail_use_lockf=no
2470 #endif
2471
2472 EOF
2473
2474 CPP=`eval "echo $CPP $CPPFLAGS"`
2475 eval `$CPP -Isrc $tempcname \
2476         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2477
2478 rm $tempcname
2479
2480 test "$extra_verbose" = "yes" && \
2481   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 ""
2482
2483 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2484
2485 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2486
2487 if test "$cflags_specified" = "no"; then
2488       if   test "$GCC" = "yes"; then
2489     CFLAGS="-g -O3 -Wall -Wno-switch"
2490                           elif test "$__SUNPRO_C" = "yes"; then
2491     case "$opsys" in
2492       sol2    ) CFLAGS="-v -xO4" ;;
2493       sunos4* ) CFLAGS="-xO2";;
2494     esac
2495   elif test "$__DECC" = "yes"; then
2496     CFLAGS="-O3"
2497   elif test "$CC" = "xlc"; then
2498     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2499     else
2500     CFLAGS="-O" ;  fi
2501 fi
2502
2503
2504 if test "$GCC" = "yes"; then
2505   set x $ld_switch_system; shift; ld_switch_system=""
2506   while test -n "$1"; do
2507     case $1 in
2508       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2509       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2510       -Xlinker* ) ;;
2511       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2512     esac
2513     shift
2514   done
2515 fi
2516
2517 if test "$GCC" = "yes"; then
2518   set x $ld_switch_machine; shift; ld_switch_machine=""
2519   while test -n "$1"; do
2520     case $1 in
2521       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2522       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2523       -Xlinker* ) ;;
2524       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2525     esac
2526     shift
2527   done
2528 fi
2529
2530 if test "$GCC" = "yes"; then
2531   set x $LDFLAGS; shift; LDFLAGS=""
2532   while test -n "$1"; do
2533     case $1 in
2534       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2535       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2536       -Xlinker* ) ;;
2537       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2538     esac
2539     shift
2540   done
2541 fi
2542
2543 if test "$GCC" = "yes"; then
2544   set x $ld_call_shared; shift; ld_call_shared=""
2545   while test -n "$1"; do
2546     case $1 in
2547       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2548       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2549       -Xlinker* ) ;;
2550       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2551     esac
2552     shift
2553   done
2554 fi
2555
2556 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2557    echo "    xemacs will be linked with \"$objects_machine\""
2558  fi
2559 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2560    echo "    xemacs will be linked with \"$objects_system\""
2561  fi
2562 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2563    echo "    xemacs will be linked with \"$unexec\""
2564  fi
2565
2566 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2567 echo "configure:2568: checking for dynodump" >&5
2568 if test "$unexec" != "unexsol2.o"; then
2569   echo "$ac_t""no" 1>&6
2570 else
2571   echo "$ac_t""yes" 1>&6
2572   { test "$extra_verbose" = "yes" && cat << \EOF
2573     Defining DYNODUMP
2574 EOF
2575 cat >> confdefs.h <<\EOF
2576 #define DYNODUMP 1
2577 EOF
2578 }
2579
2580   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2581   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2582   case "$machine" in
2583     sparc   ) dynodump_arch=sparc ;;
2584     *86*    ) dynodump_arch=i386  ;;
2585     powerpc ) dynodump_arch=ppc   ;;
2586   esac
2587     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
2588 fi
2589
2590
2591 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2592
2593 if test "$unexec" = "unexaix.o"; then
2594   if   test "$dynamic" = "no"; then
2595   start_flags="-Wl,-bnso,-bnodelcsect"
2596   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2597   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2598     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2599   done
2600   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2601     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2602   done
2603   
2604 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2605 echo "configure:2606: checking for terminateAndUnload in -lC" >&5
2606 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2607
2608 xe_check_libs=" -lC "
2609 cat > conftest.$ac_ext <<EOF
2610 #line 2611 "configure"
2611 #include "confdefs.h"
2612 /* Override any gcc2 internal prototype to avoid an error.  */
2613 /* We use char because int might match the return type of a gcc2
2614     builtin and then its argument prototype would still apply.  */
2615 char terminateAndUnload();
2616
2617 int main() {
2618 terminateAndUnload()
2619 ; return 0; }
2620 EOF
2621 if { (eval echo configure:2622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2622   rm -rf conftest*
2623   eval "ac_cv_lib_$ac_lib_var=yes"
2624 else
2625   echo "configure: failed program was:" >&5
2626   cat conftest.$ac_ext >&5
2627   rm -rf conftest*
2628   eval "ac_cv_lib_$ac_lib_var=no"
2629 fi
2630 rm -f conftest*
2631 xe_check_libs=""
2632
2633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2634   echo "$ac_t""yes" 1>&6
2635   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2636 else
2637   echo "$ac_t""no" 1>&6
2638 fi
2639
2640
2641   fi
2642 elif test -n "$ld_text_start_addr"; then
2643   start_flags="-T $ld_text_start_addr -e __start"
2644 fi
2645
2646
2647
2648
2649 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2650  test -z "$linker" &&  linker='$(CC) -nostdlib'
2651  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2652 fi
2653 test "$GCC" != "yes" && lib_gcc=
2654
2655
2656
2657
2658
2659 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2660 if test -n "$site_libraries"; then
2661   for arg in $site_libraries; do
2662     case "$arg" in
2663      -* ) ;;
2664      * ) test -d "$arg" || \
2665            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2666        arg="-L${arg}" ;;
2667     esac
2668     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2669   done
2670 fi
2671
2672 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2673 if test -n "$site_includes"; then
2674   for arg in $site_includes; do
2675     case "$arg" in
2676       -* ) ;;
2677       * ) test -d "$arg" || \
2678            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2679       arg="-I${arg}" ;;
2680     esac
2681     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2682   done
2683 fi
2684
2685 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2686 if test -n "$site_prefixes"; then
2687   for dir in $site_prefixes; do
2688     inc_dir="${dir}/include"
2689     lib_dir="${dir}/lib"
2690     if test ! -d "$dir"; then
2691       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2692     elif test ! -d "$inc_dir"; then
2693       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$inc_dir'" >&2; exit 1; }
2694     elif test ! -d "$lib_dir"; then
2695       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2696     else
2697       c_switch_site="$c_switch_site "-I$inc_dir"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-I$inc_dir"\" to \$c_switch_site"; fi
2698       ld_switch_site="$ld_switch_site "-L$lib_dir"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-L$lib_dir"\" to \$ld_switch_site"; fi
2699     fi
2700   done
2701 fi
2702
2703
2704 for dir in "/usr/ccs/lib"; do
2705   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
2706 done
2707
2708 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2709 if test -n "$site_runtime_libraries"; then
2710   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2711   export LD_RUN_PATH
2712 fi
2713
2714
2715 if   test "$dynamic" = "no"; then add_runtime_path=no
2716 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2717 else case "$opsys" in
2718        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2719        * ) add_runtime_path=no ;;
2720      esac
2721 fi
2722
2723 if test "$add_runtime_path" = "yes"; then
2724       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2725 echo "configure:2726: checking "for runtime libraries flag"" >&5
2726   case "$opsys" in
2727     sol2 ) dash_r="-R" ;;
2728     decosf* | linux* | irix*) dash_r="-rpath " ;;
2729     *)
2730       dash_r=""
2731       for try_dash_r in "-R" "-R " "-rpath "; do
2732         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2733         
2734 if test "$GCC" = "yes"; then
2735   set x $xe_check_libs; shift; xe_check_libs=""
2736   while test -n "$1"; do
2737     case $1 in
2738       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2739       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2740       -Xlinker* ) ;;
2741       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2742     esac
2743     shift
2744   done
2745 fi
2746         cat > conftest.$ac_ext <<EOF
2747 #line 2748 "configure"
2748 #include "confdefs.h"
2749
2750 int main() {
2751
2752 ; return 0; }
2753 EOF
2754 if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2755   rm -rf conftest*
2756   dash_r="$try_dash_r"
2757 else
2758   echo "configure: failed program was:" >&5
2759   cat conftest.$ac_ext >&5
2760 fi
2761 rm -f conftest*
2762         xe_check_libs=""
2763         test -n "$dash_r" && break
2764       done ;;
2765   esac
2766   if test -n "$dash_r";
2767     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2768     else echo "$ac_t""NONE" 1>&6
2769   fi
2770 fi
2771
2772 xe_add_unique_runpath_dir='
2773   xe_add_p=yes
2774   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2775   done
2776   if test "$xe_add_p" = "yes"; then
2777     test -n "$runpath" && runpath="${runpath}:"
2778     runpath="${runpath}${xe_runpath_dir}"
2779     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2780   fi'
2781
2782
2783
2784
2785 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2786     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2787   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2788   
2789         runpath="" runpath_dirs=""
2790   if test -n "$LD_RUN_PATH"; then
2791     runpath="$LD_RUN_PATH"
2792   elif test "$GCC" = "yes"; then
2793         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2794     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2795     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2796     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2797       case "$arg" in P,* | -L* | -R* )
2798         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2799           {
2800 xe_runpath_dir="$dir"
2801   test "$xe_runpath_dir" != "/lib"     -a \
2802         "$xe_runpath_dir" != "/usr/lib" -a \
2803         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2804   eval "$xe_add_unique_runpath_dir"
2805 }
2806         done ;;
2807       esac
2808     done
2809     ld_switch_run="$ld_switch_run_save"
2810     rm -f conftest*
2811   else
2812         for arg in $ld_switch_site $ld_switch_x_site; do
2813       case "$arg" in -L*) {
2814 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2815   test "$xe_runpath_dir" != "/lib"     -a \
2816         "$xe_runpath_dir" != "/usr/lib" -a \
2817         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2818   eval "$xe_add_unique_runpath_dir"
2819 };; esac
2820     done
2821         if test "$opsys $need_motif" = "sol2 yes"; then
2822       xe_runpath_dir="/opt/SUNWdt/lib";
2823       eval "$xe_add_unique_runpath_dir";
2824     fi
2825   fi 
2826   if test -n "$runpath"; then
2827     ld_switch_run="${dash_r}${runpath}"
2828     
2829 if test "$GCC" = "yes"; then
2830   set x $ld_switch_run; shift; ld_switch_run=""
2831   while test -n "$1"; do
2832     case $1 in
2833       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2834       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2835       -Xlinker* ) ;;
2836       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2837     esac
2838     shift
2839   done
2840 fi
2841     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2842   fi
2843 fi
2844
2845
2846
2847
2848 GNU_MALLOC=yes
2849 if test "$with_dlmalloc" != "no"; then
2850         doug_lea_malloc=yes
2851 else
2852         doug_lea_malloc=no
2853 fi
2854 after_morecore_hook_exists=yes
2855 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2856 echo "configure:2857: checking for malloc_get_state" >&5
2857
2858 cat > conftest.$ac_ext <<EOF
2859 #line 2860 "configure"
2860 #include "confdefs.h"
2861 /* System header to define __stub macros and hopefully few prototypes,
2862     which can conflict with char malloc_get_state(); below.  */
2863 #include <assert.h>
2864 /* Override any gcc2 internal prototype to avoid an error.  */
2865 /* We use char because int might match the return type of a gcc2
2866     builtin and then its argument prototype would still apply.  */
2867 char malloc_get_state();
2868
2869 int main() {
2870
2871 /* The GNU C library defines this for functions which it implements
2872     to always fail with ENOSYS.  Some functions are actually named
2873     something starting with __ and the normal name is an alias.  */
2874 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2875 choke me
2876 #else
2877 malloc_get_state();
2878 #endif
2879
2880 ; return 0; }
2881 EOF
2882 if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2883   rm -rf conftest*
2884   eval "ac_cv_func_malloc_get_state=yes"
2885 else
2886   echo "configure: failed program was:" >&5
2887   cat conftest.$ac_ext >&5
2888   rm -rf conftest*
2889   eval "ac_cv_func_malloc_get_state=no"
2890 fi
2891 rm -f conftest*
2892
2893 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2894   echo "$ac_t""yes" 1>&6
2895   :
2896 else
2897   echo "$ac_t""no" 1>&6
2898 doug_lea_malloc=no
2899 fi
2900
2901 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2902 echo "configure:2903: checking for malloc_set_state" >&5
2903
2904 cat > conftest.$ac_ext <<EOF
2905 #line 2906 "configure"
2906 #include "confdefs.h"
2907 /* System header to define __stub macros and hopefully few prototypes,
2908     which can conflict with char malloc_set_state(); below.  */
2909 #include <assert.h>
2910 /* Override any gcc2 internal prototype to avoid an error.  */
2911 /* We use char because int might match the return type of a gcc2
2912     builtin and then its argument prototype would still apply.  */
2913 char malloc_set_state();
2914
2915 int main() {
2916
2917 /* The GNU C library defines this for functions which it implements
2918     to always fail with ENOSYS.  Some functions are actually named
2919     something starting with __ and the normal name is an alias.  */
2920 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
2921 choke me
2922 #else
2923 malloc_set_state();
2924 #endif
2925
2926 ; return 0; }
2927 EOF
2928 if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2929   rm -rf conftest*
2930   eval "ac_cv_func_malloc_set_state=yes"
2931 else
2932   echo "configure: failed program was:" >&5
2933   cat conftest.$ac_ext >&5
2934   rm -rf conftest*
2935   eval "ac_cv_func_malloc_set_state=no"
2936 fi
2937 rm -f conftest*
2938
2939 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
2940   echo "$ac_t""yes" 1>&6
2941   :
2942 else
2943   echo "$ac_t""no" 1>&6
2944 doug_lea_malloc=no
2945 fi
2946
2947 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
2948 echo "configure:2949: checking whether __after_morecore_hook exists" >&5
2949 cat > conftest.$ac_ext <<EOF
2950 #line 2951 "configure"
2951 #include "confdefs.h"
2952 extern void (* __after_morecore_hook)();
2953 int main() {
2954 __after_morecore_hook = 0
2955 ; return 0; }
2956 EOF
2957 if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2958   rm -rf conftest*
2959   echo "$ac_t""yes" 1>&6
2960 else
2961   echo "configure: failed program was:" >&5
2962   cat conftest.$ac_ext >&5
2963   rm -rf conftest*
2964   echo "$ac_t""no" 1>&6
2965    after_morecore_hook_exists=no
2966 fi
2967 rm -f conftest*
2968 if test "$system_malloc" = "yes" ; then
2969   GNU_MALLOC=no
2970   GNU_MALLOC_reason="
2971   (The GNU allocators don't work with this system configuration)."
2972 elif test "$with_system_malloc" = "yes" ; then
2973   GNU_MALLOC=no
2974   GNU_MALLOC_reason="
2975   (User chose not to use GNU allocators)."
2976 elif test "$with_debug_malloc" = "yes" ; then
2977   GNU_MALLOC=no
2978   GNU_MALLOC_reason="
2979   (User chose to use Debugging Malloc)."
2980 fi
2981
2982 if test "$doug_lea_malloc" = "yes" ; then
2983   if test "$GNU_MALLOC" = yes ; then
2984     GNU_MALLOC_reason="
2985   (Using Doug Lea's new malloc from the GNU C Library.)"
2986   fi
2987   { test "$extra_verbose" = "yes" && cat << \EOF
2988     Defining DOUG_LEA_MALLOC
2989 EOF
2990 cat >> confdefs.h <<\EOF
2991 #define DOUG_LEA_MALLOC 1
2992 EOF
2993 }
2994
2995   if test "$after_morecore_hook_exists" = "no" ; then
2996     GNU_MALLOC_reason="
2997   (Using Doug Lea's new malloc from the Linux C Library.)"
2998     { test "$extra_verbose" = "yes" && cat << \EOF
2999     Defining _NO_MALLOC_WARNING_
3000 EOF
3001 cat >> confdefs.h <<\EOF
3002 #define _NO_MALLOC_WARNING_ 1
3003 EOF
3004 }
3005
3006   fi
3007   use_minimal_tagbits=yes
3008 fi
3009
3010
3011
3012
3013 # Extract the first word of "ranlib", so it can be a program name with args.
3014 set dummy ranlib; ac_word=$2
3015 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3016 echo "configure:3017: checking for $ac_word" >&5
3017
3018 if test -n "$RANLIB"; then
3019   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3020 else
3021   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3022   ac_dummy="$PATH"
3023   for ac_dir in $ac_dummy; do
3024     test -z "$ac_dir" && ac_dir=.
3025     if test -f $ac_dir/$ac_word; then
3026       ac_cv_prog_RANLIB="ranlib"
3027       break
3028     fi
3029   done
3030   IFS="$ac_save_ifs"
3031   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3032 fi
3033 RANLIB="$ac_cv_prog_RANLIB"
3034 if test -n "$RANLIB"; then
3035   echo "$ac_t""$RANLIB" 1>&6
3036 else
3037   echo "$ac_t""no" 1>&6
3038 fi
3039
3040 ac_aux_dir=
3041 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3042   if test -f $ac_dir/install-sh; then
3043     ac_aux_dir=$ac_dir
3044     ac_install_sh="$ac_aux_dir/install-sh -c"
3045     break
3046   elif test -f $ac_dir/install.sh; then
3047     ac_aux_dir=$ac_dir
3048     ac_install_sh="$ac_aux_dir/install.sh -c"
3049     break
3050   fi
3051 done
3052 if test -z "$ac_aux_dir"; then
3053   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3054 fi
3055 ac_config_guess=$ac_aux_dir/config.guess
3056 ac_config_sub=$ac_aux_dir/config.sub
3057 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3058
3059 # Find a good install program.  We prefer a C program (faster),
3060 # so one script is as good as another.  But avoid the broken or
3061 # incompatible versions:
3062 # SysV /etc/install, /usr/sbin/install
3063 # SunOS /usr/etc/install
3064 # IRIX /sbin/install
3065 # AIX /bin/install
3066 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3067 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3068 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3069 # ./install, which can be erroneously created by make from ./install.sh.
3070 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3071 echo "configure:3072: checking for a BSD compatible install" >&5
3072 if test -z "$INSTALL"; then
3073
3074   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3075   for ac_dir in $PATH; do
3076     # Account for people who put trailing slashes in PATH elements.
3077     case "$ac_dir/" in
3078     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3079     *)
3080       # OSF1 and SCO ODT 3.0 have their own names for install.
3081       # Don't use installbsd from OSF since it installs stuff as root
3082       # by default.
3083       for ac_prog in ginstall scoinst install; do
3084         if test -f $ac_dir/$ac_prog; then
3085           if test $ac_prog = install &&
3086             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3087             # AIX install.  It has an incompatible calling convention.
3088             :
3089           else
3090             ac_cv_path_install="$ac_dir/$ac_prog -c"
3091             break 2
3092           fi
3093         fi
3094       done
3095       ;;
3096     esac
3097   done
3098   IFS="$ac_save_IFS"
3099
3100   if test "${ac_cv_path_install+set}" = set; then
3101     INSTALL="$ac_cv_path_install"
3102   else
3103     # As a last resort, use the slow shell script.  We don't cache a
3104     # path for INSTALL within a source directory, because that will
3105     # break other packages using the cache if that directory is
3106     # removed, or if the path is relative.
3107     INSTALL="$ac_install_sh"
3108   fi
3109 fi
3110 echo "$ac_t""$INSTALL" 1>&6
3111
3112 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3113 # It thinks the first close brace ends the variable substitution.
3114 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3115
3116 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3117
3118 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3119
3120 for ac_prog in 'bison -y' byacc
3121 do
3122 # Extract the first word of "$ac_prog", so it can be a program name with args.
3123 set dummy $ac_prog; ac_word=$2
3124 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3125 echo "configure:3126: checking for $ac_word" >&5
3126
3127 if test -n "$YACC"; then
3128   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3129 else
3130   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3131   ac_dummy="$PATH"
3132   for ac_dir in $ac_dummy; do
3133     test -z "$ac_dir" && ac_dir=.
3134     if test -f $ac_dir/$ac_word; then
3135       ac_cv_prog_YACC="$ac_prog"
3136       break
3137     fi
3138   done
3139   IFS="$ac_save_ifs"
3140 fi
3141 YACC="$ac_cv_prog_YACC"
3142 if test -n "$YACC"; then
3143   echo "$ac_t""$YACC" 1>&6
3144 else
3145   echo "$ac_t""no" 1>&6
3146 fi
3147
3148 test -n "$YACC" && break
3149 done
3150 test -n "$YACC" || YACC="yacc"
3151
3152
3153 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3154 do
3155 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3156 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3157 echo "configure:3158: checking for $ac_hdr" >&5
3158
3159 cat > conftest.$ac_ext <<EOF
3160 #line 3161 "configure"
3161 #include "confdefs.h"
3162 #include <$ac_hdr>
3163 EOF
3164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3165 { (eval echo configure:3166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3166 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3167 if test -z "$ac_err"; then
3168   rm -rf conftest*
3169   eval "ac_cv_header_$ac_safe=yes"
3170 else
3171   echo "$ac_err" >&5
3172   echo "configure: failed program was:" >&5
3173   cat conftest.$ac_ext >&5
3174   rm -rf conftest*
3175   eval "ac_cv_header_$ac_safe=no"
3176 fi
3177 rm -f conftest*
3178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3179   echo "$ac_t""yes" 1>&6
3180     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3181   { test "$extra_verbose" = "yes" && cat << EOF
3182     Defining $ac_tr_hdr
3183 EOF
3184 cat >> confdefs.h <<EOF
3185 #define $ac_tr_hdr 1
3186 EOF
3187 }
3188  
3189 else
3190   echo "$ac_t""no" 1>&6
3191 fi
3192 done
3193
3194 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3195 do
3196 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3197 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3198 echo "configure:3199: checking for $ac_hdr" >&5
3199
3200 cat > conftest.$ac_ext <<EOF
3201 #line 3202 "configure"
3202 #include "confdefs.h"
3203 #include <$ac_hdr>
3204 EOF
3205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3206 { (eval echo configure:3207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3208 if test -z "$ac_err"; then
3209   rm -rf conftest*
3210   eval "ac_cv_header_$ac_safe=yes"
3211 else
3212   echo "$ac_err" >&5
3213   echo "configure: failed program was:" >&5
3214   cat conftest.$ac_ext >&5
3215   rm -rf conftest*
3216   eval "ac_cv_header_$ac_safe=no"
3217 fi
3218 rm -f conftest*
3219 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3220   echo "$ac_t""yes" 1>&6
3221     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3222   { test "$extra_verbose" = "yes" && cat << EOF
3223     Defining $ac_tr_hdr
3224 EOF
3225 cat >> confdefs.h <<EOF
3226 #define $ac_tr_hdr 1
3227 EOF
3228 }
3229  
3230 else
3231   echo "$ac_t""no" 1>&6
3232 fi
3233 done
3234
3235 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3236 do
3237 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3238 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3239 echo "configure:3240: checking for $ac_hdr" >&5
3240
3241 cat > conftest.$ac_ext <<EOF
3242 #line 3243 "configure"
3243 #include "confdefs.h"
3244 #include <$ac_hdr>
3245 EOF
3246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3247 { (eval echo configure:3248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3249 if test -z "$ac_err"; then
3250   rm -rf conftest*
3251   eval "ac_cv_header_$ac_safe=yes"
3252 else
3253   echo "$ac_err" >&5
3254   echo "configure: failed program was:" >&5
3255   cat conftest.$ac_ext >&5
3256   rm -rf conftest*
3257   eval "ac_cv_header_$ac_safe=no"
3258 fi
3259 rm -f conftest*
3260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3261   echo "$ac_t""yes" 1>&6
3262     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3263   { test "$extra_verbose" = "yes" && cat << EOF
3264     Defining $ac_tr_hdr
3265 EOF
3266 cat >> confdefs.h <<EOF
3267 #define $ac_tr_hdr 1
3268 EOF
3269 }
3270  
3271 else
3272   echo "$ac_t""no" 1>&6
3273 fi
3274 done
3275
3276 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3277 echo "configure:3278: checking for sys/wait.h that is POSIX.1 compatible" >&5
3278
3279 cat > conftest.$ac_ext <<EOF
3280 #line 3281 "configure"
3281 #include "confdefs.h"
3282 #include <sys/types.h>
3283 #include <sys/wait.h>
3284 #ifndef WEXITSTATUS
3285 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3286 #endif
3287 #ifndef WIFEXITED
3288 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3289 #endif
3290 int main() {
3291 int s;
3292 wait (&s);
3293 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3294 ; return 0; }
3295 EOF
3296 if { (eval echo configure:3297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3297   rm -rf conftest*
3298   ac_cv_header_sys_wait_h=yes
3299 else
3300   echo "configure: failed program was:" >&5
3301   cat conftest.$ac_ext >&5
3302   rm -rf conftest*
3303   ac_cv_header_sys_wait_h=no
3304 fi
3305 rm -f conftest*
3306
3307 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3308 if test $ac_cv_header_sys_wait_h = yes; then
3309   { test "$extra_verbose" = "yes" && cat << \EOF
3310     Defining HAVE_SYS_WAIT_H
3311 EOF
3312 cat >> confdefs.h <<\EOF
3313 #define HAVE_SYS_WAIT_H 1
3314 EOF
3315 }
3316
3317 fi
3318
3319 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3320 echo "configure:3321: checking for ANSI C header files" >&5
3321
3322 cat > conftest.$ac_ext <<EOF
3323 #line 3324 "configure"
3324 #include "confdefs.h"
3325 #include <stdlib.h>
3326 #include <stdarg.h>
3327 #include <string.h>
3328 #include <float.h>
3329 EOF
3330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3331 { (eval echo configure:3332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3333 if test -z "$ac_err"; then
3334   rm -rf conftest*
3335   ac_cv_header_stdc=yes
3336 else
3337   echo "$ac_err" >&5
3338   echo "configure: failed program was:" >&5
3339   cat conftest.$ac_ext >&5
3340   rm -rf conftest*
3341   ac_cv_header_stdc=no
3342 fi
3343 rm -f conftest*
3344
3345 if test $ac_cv_header_stdc = yes; then
3346   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3347 cat > conftest.$ac_ext <<EOF
3348 #line 3349 "configure"
3349 #include "confdefs.h"
3350 #include <string.h>
3351 EOF
3352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3353   egrep "memchr" >/dev/null 2>&1; then
3354   :
3355 else
3356   rm -rf conftest*
3357   ac_cv_header_stdc=no
3358 fi
3359 rm -f conftest*
3360
3361 fi
3362
3363 if test $ac_cv_header_stdc = yes; then
3364   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3365 cat > conftest.$ac_ext <<EOF
3366 #line 3367 "configure"
3367 #include "confdefs.h"
3368 #include <stdlib.h>
3369 EOF
3370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3371   egrep "free" >/dev/null 2>&1; then
3372   :
3373 else
3374   rm -rf conftest*
3375   ac_cv_header_stdc=no
3376 fi
3377 rm -f conftest*
3378
3379 fi
3380
3381 if test $ac_cv_header_stdc = yes; then
3382   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3383 cat > conftest.$ac_ext <<EOF
3384 #line 3385 "configure"
3385 #include "confdefs.h"
3386 #include <ctype.h>
3387 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3388 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3389 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3390 int main () { int i; for (i = 0; i < 256; i++)
3391 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3392 exit (0); }
3393
3394 EOF
3395 if { (eval echo configure:3396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3396 then
3397   :
3398 else
3399   conftest_rc="$?"
3400   echo "configure: failed program was:" >&5
3401   cat conftest.$ac_ext >&5
3402   rm -fr conftest*
3403   ac_cv_header_stdc=no
3404 fi
3405 rm -fr conftest*
3406 fi
3407
3408 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3409 if test $ac_cv_header_stdc = yes; then
3410   { test "$extra_verbose" = "yes" && cat << \EOF
3411     Defining STDC_HEADERS
3412 EOF
3413 cat >> confdefs.h <<\EOF
3414 #define STDC_HEADERS 1
3415 EOF
3416 }
3417
3418 fi
3419
3420 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3421 echo "configure:3422: checking whether time.h and sys/time.h may both be included" >&5
3422
3423 cat > conftest.$ac_ext <<EOF
3424 #line 3425 "configure"
3425 #include "confdefs.h"
3426 #include <sys/types.h>
3427 #include <sys/time.h>
3428 #include <time.h>
3429 int main() {
3430 struct tm *tp;
3431 ; return 0; }
3432 EOF
3433 if { (eval echo configure:3434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3434   rm -rf conftest*
3435   ac_cv_header_time=yes
3436 else
3437   echo "configure: failed program was:" >&5
3438   cat conftest.$ac_ext >&5
3439   rm -rf conftest*
3440   ac_cv_header_time=no
3441 fi
3442 rm -f conftest*
3443
3444 echo "$ac_t""$ac_cv_header_time" 1>&6
3445 if test $ac_cv_header_time = yes; then
3446   { test "$extra_verbose" = "yes" && cat << \EOF
3447     Defining TIME_WITH_SYS_TIME
3448 EOF
3449 cat >> confdefs.h <<\EOF
3450 #define TIME_WITH_SYS_TIME 1
3451 EOF
3452 }
3453
3454 fi
3455
3456 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3457 echo "configure:3458: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3458
3459 cat > conftest.$ac_ext <<EOF
3460 #line 3461 "configure"
3461 #include "confdefs.h"
3462 #include <sys/types.h>
3463 #include <signal.h>
3464 /* NetBSD declares sys_siglist in unistd.h.  */
3465 #ifdef HAVE_UNISTD_H
3466 #include <unistd.h>
3467 #endif
3468 int main() {
3469 char *msg = *(sys_siglist + 1);
3470 ; return 0; }
3471 EOF
3472 if { (eval echo configure:3473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3473   rm -rf conftest*
3474   ac_cv_decl_sys_siglist=yes
3475 else
3476   echo "configure: failed program was:" >&5
3477   cat conftest.$ac_ext >&5
3478   rm -rf conftest*
3479   ac_cv_decl_sys_siglist=no
3480 fi
3481 rm -f conftest*
3482
3483 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3484 if test $ac_cv_decl_sys_siglist = yes; then
3485   { test "$extra_verbose" = "yes" && cat << \EOF
3486     Defining SYS_SIGLIST_DECLARED
3487 EOF
3488 cat >> confdefs.h <<\EOF
3489 #define SYS_SIGLIST_DECLARED 1
3490 EOF
3491 }
3492
3493 fi
3494
3495
3496 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3497 echo "configure:3498: checking for struct utimbuf" >&5
3498 cat > conftest.$ac_ext <<EOF
3499 #line 3500 "configure"
3500 #include "confdefs.h"
3501 #ifdef TIME_WITH_SYS_TIME
3502 #include <sys/time.h>
3503 #include <time.h>
3504 #else
3505 #ifdef HAVE_SYS_TIME_H
3506 #include <sys/time.h>
3507 #else
3508 #include <time.h>
3509 #endif
3510 #endif
3511 #ifdef HAVE_UTIME_H
3512 #include <utime.h>
3513 #endif
3514 int main() {
3515 static struct utimbuf x; x.actime = x.modtime;
3516 ; return 0; }
3517 EOF
3518 if { (eval echo configure:3519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3519   rm -rf conftest*
3520   echo "$ac_t""yes" 1>&6
3521    { test "$extra_verbose" = "yes" && cat << \EOF
3522     Defining HAVE_STRUCT_UTIMBUF
3523 EOF
3524 cat >> confdefs.h <<\EOF
3525 #define HAVE_STRUCT_UTIMBUF 1
3526 EOF
3527 }
3528
3529 else
3530   echo "configure: failed program was:" >&5
3531   cat conftest.$ac_ext >&5
3532   rm -rf conftest*
3533   echo "$ac_t""no" 1>&6
3534 fi
3535 rm -f conftest*
3536
3537 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3538 echo "configure:3539: checking return type of signal handlers" >&5
3539
3540 cat > conftest.$ac_ext <<EOF
3541 #line 3542 "configure"
3542 #include "confdefs.h"
3543 #include <sys/types.h>
3544 #include <signal.h>
3545 #ifdef signal
3546 #undef signal
3547 #endif
3548 #ifdef __cplusplus
3549 extern "C" void (*signal (int, void (*)(int)))(int);
3550 #else
3551 void (*signal ()) ();
3552 #endif
3553
3554 int main() {
3555 int i;
3556 ; return 0; }
3557 EOF
3558 if { (eval echo configure:3559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3559   rm -rf conftest*
3560   ac_cv_type_signal=void
3561 else
3562   echo "configure: failed program was:" >&5
3563   cat conftest.$ac_ext >&5
3564   rm -rf conftest*
3565   ac_cv_type_signal=int
3566 fi
3567 rm -f conftest*
3568
3569 echo "$ac_t""$ac_cv_type_signal" 1>&6
3570 { test "$extra_verbose" = "yes" && cat << EOF
3571     Defining RETSIGTYPE = $ac_cv_type_signal
3572 EOF
3573 cat >> confdefs.h <<EOF
3574 #define RETSIGTYPE $ac_cv_type_signal
3575 EOF
3576 }
3577
3578
3579 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3580 echo "configure:3581: checking for size_t" >&5
3581
3582 cat > conftest.$ac_ext <<EOF
3583 #line 3584 "configure"
3584 #include "confdefs.h"
3585 #include <sys/types.h>
3586 #if STDC_HEADERS
3587 #include <stdlib.h>
3588 #include <stddef.h>
3589 #endif
3590 EOF
3591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3592   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3593   rm -rf conftest*
3594   ac_cv_type_size_t=yes
3595 else
3596   rm -rf conftest*
3597   ac_cv_type_size_t=no
3598 fi
3599 rm -f conftest*
3600
3601 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3602 if test $ac_cv_type_size_t = no; then
3603   { test "$extra_verbose" = "yes" && cat << \EOF
3604     Defining size_t = unsigned
3605 EOF
3606 cat >> confdefs.h <<\EOF
3607 #define size_t unsigned
3608 EOF
3609 }
3610
3611 fi
3612
3613 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3614 echo "configure:3615: checking for pid_t" >&5
3615
3616 cat > conftest.$ac_ext <<EOF
3617 #line 3618 "configure"
3618 #include "confdefs.h"
3619 #include <sys/types.h>
3620 #if STDC_HEADERS
3621 #include <stdlib.h>
3622 #include <stddef.h>
3623 #endif
3624 EOF
3625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3626   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3627   rm -rf conftest*
3628   ac_cv_type_pid_t=yes
3629 else
3630   rm -rf conftest*
3631   ac_cv_type_pid_t=no
3632 fi
3633 rm -f conftest*
3634
3635 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3636 if test $ac_cv_type_pid_t = no; then
3637   { test "$extra_verbose" = "yes" && cat << \EOF
3638     Defining pid_t = int
3639 EOF
3640 cat >> confdefs.h <<\EOF
3641 #define pid_t int
3642 EOF
3643 }
3644
3645 fi
3646
3647 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3648 echo "configure:3649: checking for uid_t in sys/types.h" >&5
3649
3650 cat > conftest.$ac_ext <<EOF
3651 #line 3652 "configure"
3652 #include "confdefs.h"
3653 #include <sys/types.h>
3654 EOF
3655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3656   egrep "uid_t" >/dev/null 2>&1; then
3657   rm -rf conftest*
3658   ac_cv_type_uid_t=yes
3659 else
3660   rm -rf conftest*
3661   ac_cv_type_uid_t=no
3662 fi
3663 rm -f conftest*
3664
3665
3666 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3667 if test $ac_cv_type_uid_t = no; then
3668   { test "$extra_verbose" = "yes" && cat << \EOF
3669     Defining uid_t = int
3670 EOF
3671 cat >> confdefs.h <<\EOF
3672 #define uid_t int
3673 EOF
3674 }
3675
3676   { test "$extra_verbose" = "yes" && cat << \EOF
3677     Defining gid_t = int
3678 EOF
3679 cat >> confdefs.h <<\EOF
3680 #define gid_t int
3681 EOF
3682 }
3683
3684 fi
3685
3686 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3687 echo "configure:3688: checking for mode_t" >&5
3688
3689 cat > conftest.$ac_ext <<EOF
3690 #line 3691 "configure"
3691 #include "confdefs.h"
3692 #include <sys/types.h>
3693 #if STDC_HEADERS
3694 #include <stdlib.h>
3695 #include <stddef.h>
3696 #endif
3697 EOF
3698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3699   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3700   rm -rf conftest*
3701   ac_cv_type_mode_t=yes
3702 else
3703   rm -rf conftest*
3704   ac_cv_type_mode_t=no
3705 fi
3706 rm -f conftest*
3707
3708 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3709 if test $ac_cv_type_mode_t = no; then
3710   { test "$extra_verbose" = "yes" && cat << \EOF
3711     Defining mode_t = int
3712 EOF
3713 cat >> confdefs.h <<\EOF
3714 #define mode_t int
3715 EOF
3716 }
3717
3718 fi
3719
3720 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3721 echo "configure:3722: checking for off_t" >&5
3722
3723 cat > conftest.$ac_ext <<EOF
3724 #line 3725 "configure"
3725 #include "confdefs.h"
3726 #include <sys/types.h>
3727 #if STDC_HEADERS
3728 #include <stdlib.h>
3729 #include <stddef.h>
3730 #endif
3731 EOF
3732 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3733   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3734   rm -rf conftest*
3735   ac_cv_type_off_t=yes
3736 else
3737   rm -rf conftest*
3738   ac_cv_type_off_t=no
3739 fi
3740 rm -f conftest*
3741
3742 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3743 if test $ac_cv_type_off_t = no; then
3744   { test "$extra_verbose" = "yes" && cat << \EOF
3745     Defining off_t = long
3746 EOF
3747 cat >> confdefs.h <<\EOF
3748 #define off_t long
3749 EOF
3750 }
3751
3752 fi
3753
3754
3755 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3756 echo "configure:3757: checking for struct timeval" >&5
3757 cat > conftest.$ac_ext <<EOF
3758 #line 3759 "configure"
3759 #include "confdefs.h"
3760 #ifdef TIME_WITH_SYS_TIME
3761 #include <sys/time.h>
3762 #include <time.h>
3763 #else
3764 #ifdef HAVE_SYS_TIME_H
3765 #include <sys/time.h>
3766 #else
3767 #include <time.h>
3768 #endif
3769 #endif
3770 int main() {
3771 static struct timeval x; x.tv_sec = x.tv_usec;
3772 ; return 0; }
3773 EOF
3774 if { (eval echo configure:3775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3775   rm -rf conftest*
3776   echo "$ac_t""yes" 1>&6
3777   HAVE_TIMEVAL=yes
3778   { test "$extra_verbose" = "yes" && cat << \EOF
3779     Defining HAVE_TIMEVAL
3780 EOF
3781 cat >> confdefs.h <<\EOF
3782 #define HAVE_TIMEVAL 1
3783 EOF
3784 }
3785
3786 else
3787   echo "configure: failed program was:" >&5
3788   cat conftest.$ac_ext >&5
3789   rm -rf conftest*
3790   echo "$ac_t""no" 1>&6
3791    HAVE_TIMEVAL=no
3792 fi
3793 rm -f conftest*
3794
3795 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3796 echo "configure:3797: checking whether struct tm is in sys/time.h or time.h" >&5
3797
3798 cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801 #include <sys/types.h>
3802 #include <time.h>
3803 int main() {
3804 struct tm *tp; tp->tm_sec;
3805 ; return 0; }
3806 EOF
3807 if { (eval echo configure:3808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3808   rm -rf conftest*
3809   ac_cv_struct_tm=time.h
3810 else
3811   echo "configure: failed program was:" >&5
3812   cat conftest.$ac_ext >&5
3813   rm -rf conftest*
3814   ac_cv_struct_tm=sys/time.h
3815 fi
3816 rm -f conftest*
3817
3818 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3819 if test $ac_cv_struct_tm = sys/time.h; then
3820   { test "$extra_verbose" = "yes" && cat << \EOF
3821     Defining TM_IN_SYS_TIME
3822 EOF
3823 cat >> confdefs.h <<\EOF
3824 #define TM_IN_SYS_TIME 1
3825 EOF
3826 }
3827
3828 fi
3829
3830 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3831 echo "configure:3832: checking for tm_zone in struct tm" >&5
3832
3833 cat > conftest.$ac_ext <<EOF
3834 #line 3835 "configure"
3835 #include "confdefs.h"
3836 #include <sys/types.h>
3837 #include <$ac_cv_struct_tm>
3838 int main() {
3839 struct tm tm; tm.tm_zone;
3840 ; return 0; }
3841 EOF
3842 if { (eval echo configure:3843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3843   rm -rf conftest*
3844   ac_cv_struct_tm_zone=yes
3845 else
3846   echo "configure: failed program was:" >&5
3847   cat conftest.$ac_ext >&5
3848   rm -rf conftest*
3849   ac_cv_struct_tm_zone=no
3850 fi
3851 rm -f conftest*
3852
3853 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3854 if test "$ac_cv_struct_tm_zone" = yes; then
3855   { test "$extra_verbose" = "yes" && cat << \EOF
3856     Defining HAVE_TM_ZONE
3857 EOF
3858 cat >> confdefs.h <<\EOF
3859 #define HAVE_TM_ZONE 1
3860 EOF
3861 }
3862
3863 else
3864   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3865 echo "configure:3866: checking for tzname" >&5
3866
3867 cat > conftest.$ac_ext <<EOF
3868 #line 3869 "configure"
3869 #include "confdefs.h"
3870 #include <time.h>
3871 #ifndef tzname /* For SGI.  */
3872 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3873 #endif
3874 int main() {
3875 atoi(*tzname);
3876 ; return 0; }
3877 EOF
3878 if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3879   rm -rf conftest*
3880   ac_cv_var_tzname=yes
3881 else
3882   echo "configure: failed program was:" >&5
3883   cat conftest.$ac_ext >&5
3884   rm -rf conftest*
3885   ac_cv_var_tzname=no
3886 fi
3887 rm -f conftest*
3888
3889 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3890   if test $ac_cv_var_tzname = yes; then
3891     { test "$extra_verbose" = "yes" && cat << \EOF
3892     Defining HAVE_TZNAME
3893 EOF
3894 cat >> confdefs.h <<\EOF
3895 #define HAVE_TZNAME 1
3896 EOF
3897 }
3898
3899   fi
3900 fi
3901
3902
3903 echo $ac_n "checking for working const""... $ac_c" 1>&6
3904 echo "configure:3905: checking for working const" >&5
3905
3906 cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909
3910 int main() {
3911
3912 /* Ultrix mips cc rejects this.  */
3913 typedef int charset[2]; const charset x;
3914 /* SunOS 4.1.1 cc rejects this.  */
3915 char const *const *ccp;
3916 char **p;
3917 /* NEC SVR4.0.2 mips cc rejects this.  */
3918 struct point {int x, y;};
3919 static struct point const zero = {0,0};
3920 /* AIX XL C 1.02.0.0 rejects this.
3921    It does not let you subtract one const X* pointer from another in an arm
3922    of an if-expression whose if-part is not a constant expression */
3923 const char *g = "string";
3924 ccp = &g + (g ? g-g : 0);
3925 /* HPUX 7.0 cc rejects these. */
3926 ++ccp;
3927 p = (char**) ccp;
3928 ccp = (char const *const *) p;
3929 { /* SCO 3.2v4 cc rejects this.  */
3930   char *t;
3931   char const *s = 0 ? (char *) 0 : (char const *) 0;
3932
3933   *t++ = 0;
3934 }
3935 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3936   int x[] = {25, 17};
3937   const int *foo = &x[0];
3938   ++foo;
3939 }
3940 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3941   typedef const int *iptr;
3942   iptr p = 0;
3943   ++p;
3944 }
3945 { /* AIX XL C 1.02.0.0 rejects this saying
3946      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3947   struct s { int j; const int *ap[3]; };
3948   struct s *b; b->j = 5;
3949 }
3950 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3951   const int foo = 10;
3952 }
3953
3954 ; return 0; }
3955 EOF
3956 if { (eval echo configure:3957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3957   rm -rf conftest*
3958   ac_cv_c_const=yes
3959 else
3960   echo "configure: failed program was:" >&5
3961   cat conftest.$ac_ext >&5
3962   rm -rf conftest*
3963   ac_cv_c_const=no
3964 fi
3965 rm -f conftest*
3966
3967 echo "$ac_t""$ac_cv_c_const" 1>&6
3968 if test $ac_cv_c_const = no; then
3969   { test "$extra_verbose" = "yes" && cat << \EOF
3970     Defining const = 
3971 EOF
3972 cat >> confdefs.h <<\EOF
3973 #define const 
3974 EOF
3975 }
3976
3977 fi
3978
3979
3980 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3981 echo "configure:3982: checking whether ${MAKE-make} sets \${MAKE}" >&5
3982 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3983
3984 cat > conftestmake <<\EOF
3985 all:
3986         @echo 'ac_maketemp="${MAKE}"'
3987 EOF
3988 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3989 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3990 if test -n "$ac_maketemp"; then
3991   eval ac_cv_prog_make_${ac_make}_set=yes
3992 else
3993   eval ac_cv_prog_make_${ac_make}_set=no
3994 fi
3995 rm -f conftestmake
3996 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3997   echo "$ac_t""yes" 1>&6
3998   SET_MAKE=
3999 else
4000   echo "$ac_t""no" 1>&6
4001   SET_MAKE="MAKE=${MAKE-make}"
4002 fi
4003
4004
4005 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4006 echo "configure:4007: checking whether byte ordering is bigendian" >&5
4007
4008 ac_cv_c_bigendian=unknown
4009 # See if sys/param.h defines the BYTE_ORDER macro.
4010 cat > conftest.$ac_ext <<EOF
4011 #line 4012 "configure"
4012 #include "confdefs.h"
4013 #include <sys/types.h>
4014 #include <sys/param.h>
4015 int main() {
4016
4017 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4018  bogus endian macros
4019 #endif
4020 ; return 0; }
4021 EOF
4022 if { (eval echo configure:4023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4023   rm -rf conftest*
4024   # It does; now see whether it defined to BIG_ENDIAN or not.
4025 cat > conftest.$ac_ext <<EOF
4026 #line 4027 "configure"
4027 #include "confdefs.h"
4028 #include <sys/types.h>
4029 #include <sys/param.h>
4030 int main() {
4031
4032 #if BYTE_ORDER != BIG_ENDIAN
4033  not big endian
4034 #endif
4035 ; return 0; }
4036 EOF
4037 if { (eval echo configure:4038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4038   rm -rf conftest*
4039   ac_cv_c_bigendian=yes
4040 else
4041   echo "configure: failed program was:" >&5
4042   cat conftest.$ac_ext >&5
4043   rm -rf conftest*
4044   ac_cv_c_bigendian=no
4045 fi
4046 rm -f conftest*
4047 else
4048   echo "configure: failed program was:" >&5
4049   cat conftest.$ac_ext >&5
4050 fi
4051 rm -f conftest*
4052 if test $ac_cv_c_bigendian = unknown; then
4053 cat > conftest.$ac_ext <<EOF
4054 #line 4055 "configure"
4055 #include "confdefs.h"
4056 main () {
4057   /* Are we little or big endian?  From Harbison&Steele.  */
4058   union
4059   {
4060     long l;
4061     char c[sizeof (long)];
4062   } u;
4063   u.l = 1;
4064   exit (u.c[sizeof (long) - 1] == 1);
4065 }
4066 EOF
4067 if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4068 then
4069   ac_cv_c_bigendian=no
4070 else
4071   conftest_rc="$?"
4072   echo "configure: failed program was:" >&5
4073   cat conftest.$ac_ext >&5
4074   rm -fr conftest*
4075   ac_cv_c_bigendian=yes
4076 fi
4077 rm -fr conftest*
4078 fi
4079
4080 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4081 if test $ac_cv_c_bigendian = yes; then
4082   { test "$extra_verbose" = "yes" && cat << \EOF
4083     Defining WORDS_BIGENDIAN
4084 EOF
4085 cat >> confdefs.h <<\EOF
4086 #define WORDS_BIGENDIAN 1
4087 EOF
4088 }
4089
4090 fi
4091
4092
4093 echo $ac_n "checking size of short""... $ac_c" 1>&6
4094 echo "configure:4095: checking size of short" >&5
4095
4096 cat > conftest.$ac_ext <<EOF
4097 #line 4098 "configure"
4098 #include "confdefs.h"
4099 #include <stdio.h>
4100 main()
4101 {
4102   FILE *f=fopen("conftestval", "w");
4103   if (!f) exit(1);
4104   fprintf(f, "%d\n", sizeof(short));
4105   exit(0);
4106 }
4107 EOF
4108 if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4109 then
4110   ac_cv_sizeof_short=`cat conftestval`
4111 else
4112   conftest_rc="$?"
4113   echo "configure: failed program was:" >&5
4114   cat conftest.$ac_ext >&5
4115   rm -fr conftest*
4116   ac_cv_sizeof_short=0
4117 fi
4118 rm -fr conftest*
4119 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4120 { test "$extra_verbose" = "yes" && cat << EOF
4121     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4122 EOF
4123 cat >> confdefs.h <<EOF
4124 #define SIZEOF_SHORT $ac_cv_sizeof_short
4125 EOF
4126 }
4127
4128
4129 if test "$ac_cv_sizeof_short" = 0; then
4130   echo ""
4131   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4132   echo "*** PANIC *** Please examine config.log for compilation errors."
4133   exit 1
4134 fi
4135 echo $ac_n "checking size of int""... $ac_c" 1>&6
4136 echo "configure:4137: checking size of int" >&5
4137
4138 cat > conftest.$ac_ext <<EOF
4139 #line 4140 "configure"
4140 #include "confdefs.h"
4141 #include <stdio.h>
4142 main()
4143 {
4144   FILE *f=fopen("conftestval", "w");
4145   if (!f) exit(1);
4146   fprintf(f, "%d\n", sizeof(int));
4147   exit(0);
4148 }
4149 EOF
4150 if { (eval echo configure:4151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4151 then
4152   ac_cv_sizeof_int=`cat conftestval`
4153 else
4154   conftest_rc="$?"
4155   echo "configure: failed program was:" >&5
4156   cat conftest.$ac_ext >&5
4157   rm -fr conftest*
4158   ac_cv_sizeof_int=0
4159 fi
4160 rm -fr conftest*
4161 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4162 { test "$extra_verbose" = "yes" && cat << EOF
4163     Defining SIZEOF_INT = $ac_cv_sizeof_int
4164 EOF
4165 cat >> confdefs.h <<EOF
4166 #define SIZEOF_INT $ac_cv_sizeof_int
4167 EOF
4168 }
4169
4170
4171 echo $ac_n "checking size of long""... $ac_c" 1>&6
4172 echo "configure:4173: checking size of long" >&5
4173
4174 cat > conftest.$ac_ext <<EOF
4175 #line 4176 "configure"
4176 #include "confdefs.h"
4177 #include <stdio.h>
4178 main()
4179 {
4180   FILE *f=fopen("conftestval", "w");
4181   if (!f) exit(1);
4182   fprintf(f, "%d\n", sizeof(long));
4183   exit(0);
4184 }
4185 EOF
4186 if { (eval echo configure:4187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4187 then
4188   ac_cv_sizeof_long=`cat conftestval`
4189 else
4190   conftest_rc="$?"
4191   echo "configure: failed program was:" >&5
4192   cat conftest.$ac_ext >&5
4193   rm -fr conftest*
4194   ac_cv_sizeof_long=0
4195 fi
4196 rm -fr conftest*
4197 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4198 { test "$extra_verbose" = "yes" && cat << EOF
4199     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4200 EOF
4201 cat >> confdefs.h <<EOF
4202 #define SIZEOF_LONG $ac_cv_sizeof_long
4203 EOF
4204 }
4205
4206
4207 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4208 echo "configure:4209: checking size of long long" >&5
4209
4210 cat > conftest.$ac_ext <<EOF
4211 #line 4212 "configure"
4212 #include "confdefs.h"
4213 #include <stdio.h>
4214 main()
4215 {
4216   FILE *f=fopen("conftestval", "w");
4217   if (!f) exit(1);
4218   fprintf(f, "%d\n", sizeof(long long));
4219   exit(0);
4220 }
4221 EOF
4222 if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4223 then
4224   ac_cv_sizeof_long_long=`cat conftestval`
4225 else
4226   conftest_rc="$?"
4227   echo "configure: failed program was:" >&5
4228   cat conftest.$ac_ext >&5
4229   rm -fr conftest*
4230   ac_cv_sizeof_long_long=0
4231 fi
4232 rm -fr conftest*
4233 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4234 { test "$extra_verbose" = "yes" && cat << EOF
4235     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4236 EOF
4237 cat >> confdefs.h <<EOF
4238 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4239 EOF
4240 }
4241
4242
4243 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4244 echo "configure:4245: checking size of void *" >&5
4245
4246 cat > conftest.$ac_ext <<EOF
4247 #line 4248 "configure"
4248 #include "confdefs.h"
4249 #include <stdio.h>
4250 main()
4251 {
4252   FILE *f=fopen("conftestval", "w");
4253   if (!f) exit(1);
4254   fprintf(f, "%d\n", sizeof(void *));
4255   exit(0);
4256 }
4257 EOF
4258 if { (eval echo configure:4259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4259 then
4260   ac_cv_sizeof_void_p=`cat conftestval`
4261 else
4262   conftest_rc="$?"
4263   echo "configure: failed program was:" >&5
4264   cat conftest.$ac_ext >&5
4265   rm -fr conftest*
4266   ac_cv_sizeof_void_p=0
4267 fi
4268 rm -fr conftest*
4269 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4270 { test "$extra_verbose" = "yes" && cat << EOF
4271     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4272 EOF
4273 cat >> confdefs.h <<EOF
4274 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4275 EOF
4276 }
4277
4278
4279
4280 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4281 echo "configure:4282: checking for long file names" >&5
4282
4283 ac_cv_sys_long_file_names=yes
4284 # Test for long file names in all the places we know might matter:
4285 #      .                the current directory, where building will happen
4286 #      $prefix/lib      where we will be installing things
4287 #      $exec_prefix/lib likewise
4288 # eval it to expand exec_prefix.
4289 #      $TMPDIR          if set, where it might want to write temporary files
4290 # if $TMPDIR is not set:
4291 #      /tmp             where it might want to write temporary files
4292 #      /var/tmp         likewise
4293 #      /usr/tmp         likewise
4294 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4295   ac_tmpdirs="$TMPDIR"
4296 else
4297   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4298 fi
4299 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4300   test -d $ac_dir || continue
4301   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4302   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4303   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4304   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4305   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4306     ac_cv_sys_long_file_names=no
4307     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4308     break
4309   fi
4310   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4311 done
4312
4313 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4314 if test $ac_cv_sys_long_file_names = yes; then
4315   { test "$extra_verbose" = "yes" && cat << \EOF
4316     Defining HAVE_LONG_FILE_NAMES
4317 EOF
4318 cat >> confdefs.h <<\EOF
4319 #define HAVE_LONG_FILE_NAMES 1
4320 EOF
4321 }
4322
4323 fi
4324
4325
4326
4327 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4328 echo "configure:4329: checking for sin in -lm" >&5
4329 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4330
4331 xe_check_libs=" -lm "
4332 cat > conftest.$ac_ext <<EOF
4333 #line 4334 "configure"
4334 #include "confdefs.h"
4335 /* Override any gcc2 internal prototype to avoid an error.  */
4336 /* We use char because int might match the return type of a gcc2
4337     builtin and then its argument prototype would still apply.  */
4338 char sin();
4339
4340 int main() {
4341 sin()
4342 ; return 0; }
4343 EOF
4344 if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4345   rm -rf conftest*
4346   eval "ac_cv_lib_$ac_lib_var=yes"
4347 else
4348   echo "configure: failed program was:" >&5
4349   cat conftest.$ac_ext >&5
4350   rm -rf conftest*
4351   eval "ac_cv_lib_$ac_lib_var=no"
4352 fi
4353 rm -f conftest*
4354 xe_check_libs=""
4355
4356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4357   echo "$ac_t""yes" 1>&6
4358     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4359     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4360   { test "$extra_verbose" = "yes" && cat << EOF
4361     Defining $ac_tr_lib
4362 EOF
4363 cat >> confdefs.h <<EOF
4364 #define $ac_tr_lib 1
4365 EOF
4366 }
4367
4368   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4369
4370 else
4371   echo "$ac_t""no" 1>&6
4372 fi
4373
4374
4375
4376 { test "$extra_verbose" = "yes" && cat << \EOF
4377     Defining LISP_FLOAT_TYPE
4378 EOF
4379 cat >> confdefs.h <<\EOF
4380 #define LISP_FLOAT_TYPE 1
4381 EOF
4382 }
4383
4384
4385 cat > conftest.$ac_ext <<EOF
4386 #line 4387 "configure"
4387 #include "confdefs.h"
4388 #include <math.h>
4389 int main() {
4390 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4391 ; return 0; }
4392 EOF
4393 if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4394   rm -rf conftest*
4395   { test "$extra_verbose" = "yes" && cat << \EOF
4396     Defining HAVE_INVERSE_HYPERBOLIC
4397 EOF
4398 cat >> confdefs.h <<\EOF
4399 #define HAVE_INVERSE_HYPERBOLIC 1
4400 EOF
4401 }
4402
4403 else
4404   echo "configure: failed program was:" >&5
4405   cat conftest.$ac_ext >&5
4406 fi
4407 rm -f conftest*
4408
4409 echo "checking type of mail spool file locking" 1>&6
4410 echo "configure:4411: checking type of mail spool file locking" >&5
4411 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4412 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4413 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4414     Defining REAL_MAIL_USE_LOCKF
4415 EOF
4416 cat >> confdefs.h <<\EOF
4417 #define REAL_MAIL_USE_LOCKF 1
4418 EOF
4419 }
4420
4421 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4422     Defining REAL_MAIL_USE_FLOCK
4423 EOF
4424 cat >> confdefs.h <<\EOF
4425 #define REAL_MAIL_USE_FLOCK 1
4426 EOF
4427 }
4428
4429 else mail_locking="dot-locking"
4430 fi
4431
4432
4433 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
4434 echo "configure:4435: checking for kstat_open in -lkstat" >&5
4435 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
4436
4437 xe_check_libs=" -lkstat "
4438 cat > conftest.$ac_ext <<EOF
4439 #line 4440 "configure"
4440 #include "confdefs.h"
4441 /* Override any gcc2 internal prototype to avoid an error.  */
4442 /* We use char because int might match the return type of a gcc2
4443     builtin and then its argument prototype would still apply.  */
4444 char kstat_open();
4445
4446 int main() {
4447 kstat_open()
4448 ; return 0; }
4449 EOF
4450 if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4451   rm -rf conftest*
4452   eval "ac_cv_lib_$ac_lib_var=yes"
4453 else
4454   echo "configure: failed program was:" >&5
4455   cat conftest.$ac_ext >&5
4456   rm -rf conftest*
4457   eval "ac_cv_lib_$ac_lib_var=no"
4458 fi
4459 rm -f conftest*
4460 xe_check_libs=""
4461
4462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4463   echo "$ac_t""yes" 1>&6
4464     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4465     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4466   { test "$extra_verbose" = "yes" && cat << EOF
4467     Defining $ac_tr_lib
4468 EOF
4469 cat >> confdefs.h <<EOF
4470 #define $ac_tr_lib 1
4471 EOF
4472 }
4473
4474   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
4475
4476 else
4477   echo "$ac_t""no" 1>&6
4478 fi
4479
4480
4481
4482
4483 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
4484 echo "configure:4485: checking for kvm_read in -lkvm" >&5
4485 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
4486
4487 xe_check_libs=" -lkvm "
4488 cat > conftest.$ac_ext <<EOF
4489 #line 4490 "configure"
4490 #include "confdefs.h"
4491 /* Override any gcc2 internal prototype to avoid an error.  */
4492 /* We use char because int might match the return type of a gcc2
4493     builtin and then its argument prototype would still apply.  */
4494 char kvm_read();
4495
4496 int main() {
4497 kvm_read()
4498 ; return 0; }
4499 EOF
4500 if { (eval echo configure:4501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4501   rm -rf conftest*
4502   eval "ac_cv_lib_$ac_lib_var=yes"
4503 else
4504   echo "configure: failed program was:" >&5
4505   cat conftest.$ac_ext >&5
4506   rm -rf conftest*
4507   eval "ac_cv_lib_$ac_lib_var=no"
4508 fi
4509 rm -f conftest*
4510 xe_check_libs=""
4511
4512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4513   echo "$ac_t""yes" 1>&6
4514     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4515     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4516   { test "$extra_verbose" = "yes" && cat << EOF
4517     Defining $ac_tr_lib
4518 EOF
4519 cat >> confdefs.h <<EOF
4520 #define $ac_tr_lib 1
4521 EOF
4522 }
4523
4524   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
4525
4526 else
4527   echo "$ac_t""no" 1>&6
4528 fi
4529
4530
4531
4532 case "$opsys" in decosf*)
4533   
4534 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4535 echo "configure:4536: checking for cma_open in -lpthreads" >&5
4536 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4537
4538 xe_check_libs=" -lpthreads "
4539 cat > conftest.$ac_ext <<EOF
4540 #line 4541 "configure"
4541 #include "confdefs.h"
4542 /* Override any gcc2 internal prototype to avoid an error.  */
4543 /* We use char because int might match the return type of a gcc2
4544     builtin and then its argument prototype would still apply.  */
4545 char cma_open();
4546
4547 int main() {
4548 cma_open()
4549 ; return 0; }
4550 EOF
4551 if { (eval echo configure:4552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4552   rm -rf conftest*
4553   eval "ac_cv_lib_$ac_lib_var=yes"
4554 else
4555   echo "configure: failed program was:" >&5
4556   cat conftest.$ac_ext >&5
4557   rm -rf conftest*
4558   eval "ac_cv_lib_$ac_lib_var=no"
4559 fi
4560 rm -f conftest*
4561 xe_check_libs=""
4562
4563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4564   echo "$ac_t""yes" 1>&6
4565     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4566     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4567   { test "$extra_verbose" = "yes" && cat << EOF
4568     Defining $ac_tr_lib
4569 EOF
4570 cat >> confdefs.h <<EOF
4571 #define $ac_tr_lib 1
4572 EOF
4573 }
4574
4575   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4576
4577 else
4578   echo "$ac_t""no" 1>&6
4579 fi
4580
4581
4582   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4583     c_switch_site="$c_switch_site -threads" ;;
4584 esac
4585
4586 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4587 echo "configure:4588: checking whether the -xildoff compiler flag is required" >&5
4588 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4589   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4590     then echo "$ac_t""no" 1>&6;
4591     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
4592   fi
4593   else echo "$ac_t""no" 1>&6
4594 fi
4595
4596 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4597   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4598 echo "configure:4599: checking for \"-z ignore\" linker flag" >&5
4599   case "`ld -h 2>&1`" in
4600     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4601       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4602     *) echo "$ac_t""no" 1>&6 ;;
4603   esac
4604 fi
4605
4606
4607 echo "checking "for specified window system"" 1>&6
4608 echo "configure:4609: checking "for specified window system"" >&5
4609
4610 if test "$with_x11" != "no"; then
4611     test "$x_includes $x_libraries" != "NONE NONE" && \
4612    window_system=x11 with_x11=yes
4613
4614         
4615       if test "$x_includes $x_libraries" = "NONE NONE" \
4616     -a -n "$OPENWINHOME" \
4617     -a "$OPENWINHOME" != "/usr/openwin" \
4618     -a -d "$OPENWINHOME"; then
4619       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4620       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4621       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4622   fi
4623
4624   if test "$x_includes" = "NONE"; then
4625                     for dir in "/usr/X11" "/usr/X11R6"; do
4626       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4627     done
4628   fi
4629
4630   if test "$x_libraries" = "NONE"; then
4631     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4632       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4633     done
4634   fi
4635
4636   # If we find X, set shell vars x_includes and x_libraries to the
4637 # paths, otherwise set no_x=yes.
4638 # Uses ac_ vars as temps to allow command line to override cache and checks.
4639 # --without-x overrides everything else, but does not touch the cache.
4640 echo $ac_n "checking for X""... $ac_c" 1>&6
4641 echo "configure:4642: checking for X" >&5
4642
4643 # Check whether --with-x or --without-x was given.
4644 if test "${with_x+set}" = set; then
4645   withval="$with_x"
4646   :
4647 fi
4648
4649 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4650 if test "x$with_x" = xno; then
4651   # The user explicitly disabled X.
4652   have_x=disabled
4653 else
4654   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4655     # Both variables are already set.
4656     have_x=yes
4657   else
4658
4659 # One or both of the vars are not set, and there is no cached value.
4660 ac_x_includes=NO ac_x_libraries=NO
4661 rm -fr conftestdir
4662 if mkdir conftestdir; then
4663   cd conftestdir
4664   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4665   cat > Imakefile <<'EOF'
4666 acfindx:
4667         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4668 EOF
4669   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4670     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4671     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4672     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4673     for ac_extension in a so sl; do
4674       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4675         test -f $ac_im_libdir/libX11.$ac_extension; then
4676         ac_im_usrlibdir=$ac_im_libdir; break
4677       fi
4678     done
4679     # Screen out bogus values from the imake configuration.  They are
4680     # bogus both because they are the default anyway, and because
4681     # using them would break gcc on systems where it needs fixed includes.
4682     case "$ac_im_incroot" in
4683         /usr/include) ;;
4684         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4685     esac
4686     case "$ac_im_usrlibdir" in
4687         /usr/lib | /lib) ;;
4688         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4689     esac
4690   fi
4691   cd ..
4692   rm -fr conftestdir
4693 fi
4694
4695 if test "$ac_x_includes" = NO; then
4696   # Guess where to find include files, by looking for this one X11 .h file.
4697   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4698
4699   # First, try using that file with no special directory specified.
4700 cat > conftest.$ac_ext <<EOF
4701 #line 4702 "configure"
4702 #include "confdefs.h"
4703 #include <$x_direct_test_include>
4704 EOF
4705 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4706 { (eval echo configure:4707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4707 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4708 if test -z "$ac_err"; then
4709   rm -rf conftest*
4710   # We can compile using X headers with no special include directory.
4711 ac_x_includes=
4712 else
4713   echo "$ac_err" >&5
4714   echo "configure: failed program was:" >&5
4715   cat conftest.$ac_ext >&5
4716   rm -rf conftest*
4717   # Look for the header file in a standard set of common directories.
4718 # Check X11 before X11Rn because it is often a symlink to the current release.
4719   for ac_dir in               \
4720     /usr/X11/include          \
4721     /usr/X11R6/include        \
4722     /usr/X11R5/include        \
4723     /usr/X11R4/include        \
4724                               \
4725     /usr/include/X11          \
4726     /usr/include/X11R6        \
4727     /usr/include/X11R5        \
4728     /usr/include/X11R4        \
4729                               \
4730     /usr/local/X11/include    \
4731     /usr/local/X11R6/include  \
4732     /usr/local/X11R5/include  \
4733     /usr/local/X11R4/include  \
4734                               \
4735     /usr/local/include/X11    \
4736     /usr/local/include/X11R6  \
4737     /usr/local/include/X11R5  \
4738     /usr/local/include/X11R4  \
4739                               \
4740     /usr/X386/include         \
4741     /usr/x386/include         \
4742     /usr/XFree86/include/X11  \
4743                               \
4744     /usr/include              \
4745     /usr/local/include        \
4746     /usr/unsupported/include  \
4747     /usr/athena/include       \
4748     /usr/local/x11r5/include  \
4749     /usr/lpp/Xamples/include  \
4750                               \
4751     /usr/openwin/include      \
4752     /usr/openwin/share/include \
4753     ; \
4754   do
4755     if test -r "$ac_dir/$x_direct_test_include"; then
4756       ac_x_includes=$ac_dir
4757       break
4758     fi
4759   done
4760 fi
4761 rm -f conftest*
4762 fi # $ac_x_includes = NO
4763
4764 if test "$ac_x_libraries" = NO; then
4765   # Check for the libraries.
4766
4767   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4768   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4769
4770   # See if we find them without any special options.
4771   # Don't add to $LIBS permanently.
4772   ac_save_LIBS="$LIBS"
4773   LIBS="-l$x_direct_test_library $LIBS"
4774 cat > conftest.$ac_ext <<EOF
4775 #line 4776 "configure"
4776 #include "confdefs.h"
4777
4778 int main() {
4779 ${x_direct_test_function}()
4780 ; return 0; }
4781 EOF
4782 if { (eval echo configure:4783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4783   rm -rf conftest*
4784   LIBS="$ac_save_LIBS"
4785 # We can link X programs with no special library path.
4786 ac_x_libraries=
4787 else
4788   echo "configure: failed program was:" >&5
4789   cat conftest.$ac_ext >&5
4790   rm -rf conftest*
4791   LIBS="$ac_save_LIBS"
4792 # First see if replacing the include by lib works.
4793 # Check X11 before X11Rn because it is often a symlink to the current release.
4794 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4795     /usr/X11/lib          \
4796     /usr/X11R6/lib        \
4797     /usr/X11R5/lib        \
4798     /usr/X11R4/lib        \
4799                           \
4800     /usr/lib/X11          \
4801     /usr/lib/X11R6        \
4802     /usr/lib/X11R5        \
4803     /usr/lib/X11R4        \
4804                           \
4805     /usr/local/X11/lib    \
4806     /usr/local/X11R6/lib  \
4807     /usr/local/X11R5/lib  \
4808     /usr/local/X11R4/lib  \
4809                           \
4810     /usr/local/lib/X11    \
4811     /usr/local/lib/X11R6  \
4812     /usr/local/lib/X11R5  \
4813     /usr/local/lib/X11R4  \
4814                           \
4815     /usr/X386/lib         \
4816     /usr/x386/lib         \
4817     /usr/XFree86/lib/X11  \
4818                           \
4819     /usr/lib              \
4820     /usr/local/lib        \
4821     /usr/unsupported/lib  \
4822     /usr/athena/lib       \
4823     /usr/local/x11r5/lib  \
4824     /usr/lpp/Xamples/lib  \
4825     /lib/usr/lib/X11      \
4826                           \
4827     /usr/openwin/lib      \
4828     /usr/openwin/share/lib \
4829     ; \
4830 do
4831   for ac_extension in a so sl; do
4832     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4833       ac_x_libraries=$ac_dir
4834       break 2
4835     fi
4836   done
4837 done
4838 fi
4839 rm -f conftest*
4840 fi # $ac_x_libraries = NO
4841
4842 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4843   # Didn't find X anywhere.  Cache the known absence of X.
4844   ac_cv_have_x="have_x=no"
4845 else
4846   # Record where we found X for the cache.
4847   ac_cv_have_x="have_x=yes \
4848                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4849 fi
4850   fi
4851   eval "$ac_cv_have_x"
4852 fi # $with_x != no
4853
4854 if test "$have_x" != yes; then
4855   echo "$ac_t""$have_x" 1>&6
4856   no_x=yes
4857 else
4858   # If each of the values was on the command line, it overrides each guess.
4859   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4860   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4861   # Update the cache value to reflect the command line values.
4862   ac_cv_have_x="have_x=yes \
4863                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4864   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4865 fi
4866
4867 if test "$no_x" = yes; then
4868   # Not all programs may use this symbol, but it does not hurt to define it.
4869   { test "$extra_verbose" = "yes" && cat << \EOF
4870     Defining X_DISPLAY_MISSING
4871 EOF
4872 cat >> confdefs.h <<\EOF
4873 #define X_DISPLAY_MISSING 1
4874 EOF
4875 }
4876
4877   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4878 else
4879   if test -n "$x_includes"; then
4880     X_CFLAGS="$X_CFLAGS -I$x_includes"
4881   fi
4882
4883   # It would also be nice to do this for all -L options, not just this one.
4884   if test -n "$x_libraries"; then
4885     X_LIBS="$X_LIBS -L$x_libraries"
4886     # For Solaris; some versions of Sun CC require a space after -R and
4887     # others require no space.  Words are not sufficient . . . .
4888     case "`(uname -sr) 2>/dev/null`" in
4889     "SunOS 5"*)
4890       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4891 echo "configure:4892: checking whether -R must be followed by a space" >&5
4892       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4893       cat > conftest.$ac_ext <<EOF
4894 #line 4895 "configure"
4895 #include "confdefs.h"
4896
4897 int main() {
4898
4899 ; return 0; }
4900 EOF
4901 if { (eval echo configure:4902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4902   rm -rf conftest*
4903   ac_R_nospace=yes
4904 else
4905   echo "configure: failed program was:" >&5
4906   cat conftest.$ac_ext >&5
4907   rm -rf conftest*
4908   ac_R_nospace=no
4909 fi
4910 rm -f conftest*
4911       if test $ac_R_nospace = yes; then
4912         echo "$ac_t""no" 1>&6
4913         X_LIBS="$X_LIBS -R$x_libraries"
4914       else
4915         LIBS="$ac_xsave_LIBS -R $x_libraries"
4916         cat > conftest.$ac_ext <<EOF
4917 #line 4918 "configure"
4918 #include "confdefs.h"
4919
4920 int main() {
4921
4922 ; return 0; }
4923 EOF
4924 if { (eval echo configure:4925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4925   rm -rf conftest*
4926   ac_R_space=yes
4927 else
4928   echo "configure: failed program was:" >&5
4929   cat conftest.$ac_ext >&5
4930   rm -rf conftest*
4931   ac_R_space=no
4932 fi
4933 rm -f conftest*
4934         if test $ac_R_space = yes; then
4935           echo "$ac_t""yes" 1>&6
4936           X_LIBS="$X_LIBS -R $x_libraries"
4937         else
4938           echo "$ac_t""neither works" 1>&6
4939         fi
4940       fi
4941       LIBS="$ac_xsave_LIBS"
4942     esac
4943   fi
4944
4945   # Check for system-dependent libraries X programs must link with.
4946   # Do this before checking for the system-independent R6 libraries
4947   # (-lICE), since we may need -lsocket or whatever for X linking.
4948
4949   if test "$ISC" = yes; then
4950     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4951   else
4952     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4953     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4954     # the Alpha needs dnet_stub (dnet does not exist).
4955     if test "$with_dnet" = "no" ; then
4956 ac_cv_lib_dnet_dnet_ntoa=no
4957 else
4958
4959 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4960 echo "configure:4961: checking for dnet_ntoa in -ldnet" >&5
4961 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4962
4963 xe_check_libs=" -ldnet "
4964 cat > conftest.$ac_ext <<EOF
4965 #line 4966 "configure"
4966 #include "confdefs.h"
4967 /* Override any gcc2 internal prototype to avoid an error.  */
4968 /* We use char because int might match the return type of a gcc2
4969     builtin and then its argument prototype would still apply.  */
4970 char dnet_ntoa();
4971
4972 int main() {
4973 dnet_ntoa()
4974 ; return 0; }
4975 EOF
4976 if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4977   rm -rf conftest*
4978   eval "ac_cv_lib_$ac_lib_var=yes"
4979 else
4980   echo "configure: failed program was:" >&5
4981   cat conftest.$ac_ext >&5
4982   rm -rf conftest*
4983   eval "ac_cv_lib_$ac_lib_var=no"
4984 fi
4985 rm -f conftest*
4986 xe_check_libs=""
4987
4988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4989   echo "$ac_t""yes" 1>&6
4990   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4991 else
4992   echo "$ac_t""no" 1>&6
4993 fi
4994
4995 fi
4996
4997     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4998       
4999 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5000 echo "configure:5001: checking for dnet_ntoa in -ldnet_stub" >&5
5001 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5002
5003 xe_check_libs=" -ldnet_stub "
5004 cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007 /* Override any gcc2 internal prototype to avoid an error.  */
5008 /* We use char because int might match the return type of a gcc2
5009     builtin and then its argument prototype would still apply.  */
5010 char dnet_ntoa();
5011
5012 int main() {
5013 dnet_ntoa()
5014 ; return 0; }
5015 EOF
5016 if { (eval echo configure:5017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5017   rm -rf conftest*
5018   eval "ac_cv_lib_$ac_lib_var=yes"
5019 else
5020   echo "configure: failed program was:" >&5
5021   cat conftest.$ac_ext >&5
5022   rm -rf conftest*
5023   eval "ac_cv_lib_$ac_lib_var=no"
5024 fi
5025 rm -f conftest*
5026 xe_check_libs=""
5027
5028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5029   echo "$ac_t""yes" 1>&6
5030   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5031 else
5032   echo "$ac_t""no" 1>&6
5033 fi
5034
5035
5036     fi
5037
5038     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5039     # to get the SysV transport functions.
5040     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5041     # needs -lnsl.
5042     # The nsl library prevents programs from opening the X display
5043     # on Irix 5.2, according to dickey@clark.net.
5044     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5045 echo "configure:5046: checking for gethostbyname" >&5
5046
5047 cat > conftest.$ac_ext <<EOF
5048 #line 5049 "configure"
5049 #include "confdefs.h"
5050 /* System header to define __stub macros and hopefully few prototypes,
5051     which can conflict with char gethostbyname(); below.  */
5052 #include <assert.h>
5053 /* Override any gcc2 internal prototype to avoid an error.  */
5054 /* We use char because int might match the return type of a gcc2
5055     builtin and then its argument prototype would still apply.  */
5056 char gethostbyname();
5057
5058 int main() {
5059
5060 /* The GNU C library defines this for functions which it implements
5061     to always fail with ENOSYS.  Some functions are actually named
5062     something starting with __ and the normal name is an alias.  */
5063 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5064 choke me
5065 #else
5066 gethostbyname();
5067 #endif
5068
5069 ; return 0; }
5070 EOF
5071 if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5072   rm -rf conftest*
5073   eval "ac_cv_func_gethostbyname=yes"
5074 else
5075   echo "configure: failed program was:" >&5
5076   cat conftest.$ac_ext >&5
5077   rm -rf conftest*
5078   eval "ac_cv_func_gethostbyname=no"
5079 fi
5080 rm -f conftest*
5081
5082 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5083   echo "$ac_t""yes" 1>&6
5084   :
5085 else
5086   echo "$ac_t""no" 1>&6
5087 fi
5088
5089     if test $ac_cv_func_gethostbyname = no; then
5090       
5091 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5092 echo "configure:5093: checking for gethostbyname in -lnsl" >&5
5093 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5094
5095 xe_check_libs=" -lnsl "
5096 cat > conftest.$ac_ext <<EOF
5097 #line 5098 "configure"
5098 #include "confdefs.h"
5099 /* Override any gcc2 internal prototype to avoid an error.  */
5100 /* We use char because int might match the return type of a gcc2
5101     builtin and then its argument prototype would still apply.  */
5102 char gethostbyname();
5103
5104 int main() {
5105 gethostbyname()
5106 ; return 0; }
5107 EOF
5108 if { (eval echo configure:5109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5109   rm -rf conftest*
5110   eval "ac_cv_lib_$ac_lib_var=yes"
5111 else
5112   echo "configure: failed program was:" >&5
5113   cat conftest.$ac_ext >&5
5114   rm -rf conftest*
5115   eval "ac_cv_lib_$ac_lib_var=no"
5116 fi
5117 rm -f conftest*
5118 xe_check_libs=""
5119
5120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5121   echo "$ac_t""yes" 1>&6
5122   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5123 else
5124   echo "$ac_t""no" 1>&6
5125 fi
5126
5127
5128     fi
5129
5130     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5131     # socket/setsockopt and other routines are undefined under SCO ODT
5132     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5133     # on later versions), says simon@lia.di.epfl.ch: it contains
5134     # gethostby* variants that don't use the nameserver (or something).
5135     # -lsocket must be given before -lnsl if both are needed.
5136     # We assume that if connect needs -lnsl, so does gethostbyname.
5137     echo $ac_n "checking for connect""... $ac_c" 1>&6
5138 echo "configure:5139: checking for connect" >&5
5139
5140 cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5143 /* System header to define __stub macros and hopefully few prototypes,
5144     which can conflict with char connect(); below.  */
5145 #include <assert.h>
5146 /* Override any gcc2 internal prototype to avoid an error.  */
5147 /* We use char because int might match the return type of a gcc2
5148     builtin and then its argument prototype would still apply.  */
5149 char connect();
5150
5151 int main() {
5152
5153 /* The GNU C library defines this for functions which it implements
5154     to always fail with ENOSYS.  Some functions are actually named
5155     something starting with __ and the normal name is an alias.  */
5156 #if defined (__stub_connect) || defined (__stub___connect)
5157 choke me
5158 #else
5159 connect();
5160 #endif
5161
5162 ; return 0; }
5163 EOF
5164 if { (eval echo configure:5165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5165   rm -rf conftest*
5166   eval "ac_cv_func_connect=yes"
5167 else
5168   echo "configure: failed program was:" >&5
5169   cat conftest.$ac_ext >&5
5170   rm -rf conftest*
5171   eval "ac_cv_func_connect=no"
5172 fi
5173 rm -f conftest*
5174
5175 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5176   echo "$ac_t""yes" 1>&6
5177   :
5178 else
5179   echo "$ac_t""no" 1>&6
5180 fi
5181
5182     if test $ac_cv_func_connect = no; then
5183       
5184 xe_msg_checking="for connect in -lsocket"
5185 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5186 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5187 echo "configure:5188: checking "$xe_msg_checking"" >&5
5188 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5189
5190 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5191 cat > conftest.$ac_ext <<EOF
5192 #line 5193 "configure"
5193 #include "confdefs.h"
5194 /* Override any gcc2 internal prototype to avoid an error.  */
5195 /* We use char because int might match the return type of a gcc2
5196     builtin and then its argument prototype would still apply.  */
5197 char connect();
5198
5199 int main() {
5200 connect()
5201 ; return 0; }
5202 EOF
5203 if { (eval echo configure:5204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5204   rm -rf conftest*
5205   eval "ac_cv_lib_$ac_lib_var=yes"
5206 else
5207   echo "configure: failed program was:" >&5
5208   cat conftest.$ac_ext >&5
5209   rm -rf conftest*
5210   eval "ac_cv_lib_$ac_lib_var=no"
5211 fi
5212 rm -f conftest*
5213 xe_check_libs=""
5214
5215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5216   echo "$ac_t""yes" 1>&6
5217   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5218 else
5219   echo "$ac_t""no" 1>&6
5220 fi
5221
5222
5223     fi
5224
5225     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5226     echo $ac_n "checking for remove""... $ac_c" 1>&6
5227 echo "configure:5228: checking for remove" >&5
5228
5229 cat > conftest.$ac_ext <<EOF
5230 #line 5231 "configure"
5231 #include "confdefs.h"
5232 /* System header to define __stub macros and hopefully few prototypes,
5233     which can conflict with char remove(); below.  */
5234 #include <assert.h>
5235 /* Override any gcc2 internal prototype to avoid an error.  */
5236 /* We use char because int might match the return type of a gcc2
5237     builtin and then its argument prototype would still apply.  */
5238 char remove();
5239
5240 int main() {
5241
5242 /* The GNU C library defines this for functions which it implements
5243     to always fail with ENOSYS.  Some functions are actually named
5244     something starting with __ and the normal name is an alias.  */
5245 #if defined (__stub_remove) || defined (__stub___remove)
5246 choke me
5247 #else
5248 remove();
5249 #endif
5250
5251 ; return 0; }
5252 EOF
5253 if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5254   rm -rf conftest*
5255   eval "ac_cv_func_remove=yes"
5256 else
5257   echo "configure: failed program was:" >&5
5258   cat conftest.$ac_ext >&5
5259   rm -rf conftest*
5260   eval "ac_cv_func_remove=no"
5261 fi
5262 rm -f conftest*
5263
5264 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5265   echo "$ac_t""yes" 1>&6
5266   :
5267 else
5268   echo "$ac_t""no" 1>&6
5269 fi
5270
5271     if test $ac_cv_func_remove = no; then
5272       
5273 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5274 echo "configure:5275: checking for remove in -lposix" >&5
5275 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5276
5277 xe_check_libs=" -lposix "
5278 cat > conftest.$ac_ext <<EOF
5279 #line 5280 "configure"
5280 #include "confdefs.h"
5281 /* Override any gcc2 internal prototype to avoid an error.  */
5282 /* We use char because int might match the return type of a gcc2
5283     builtin and then its argument prototype would still apply.  */
5284 char remove();
5285
5286 int main() {
5287 remove()
5288 ; return 0; }
5289 EOF
5290 if { (eval echo configure:5291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5291   rm -rf conftest*
5292   eval "ac_cv_lib_$ac_lib_var=yes"
5293 else
5294   echo "configure: failed program was:" >&5
5295   cat conftest.$ac_ext >&5
5296   rm -rf conftest*
5297   eval "ac_cv_lib_$ac_lib_var=no"
5298 fi
5299 rm -f conftest*
5300 xe_check_libs=""
5301
5302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5303   echo "$ac_t""yes" 1>&6
5304   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5305 else
5306   echo "$ac_t""no" 1>&6
5307 fi
5308
5309
5310     fi
5311
5312     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5313     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5314 echo "configure:5315: checking for shmat" >&5
5315
5316 cat > conftest.$ac_ext <<EOF
5317 #line 5318 "configure"
5318 #include "confdefs.h"
5319 /* System header to define __stub macros and hopefully few prototypes,
5320     which can conflict with char shmat(); below.  */
5321 #include <assert.h>
5322 /* Override any gcc2 internal prototype to avoid an error.  */
5323 /* We use char because int might match the return type of a gcc2
5324     builtin and then its argument prototype would still apply.  */
5325 char shmat();
5326
5327 int main() {
5328
5329 /* The GNU C library defines this for functions which it implements
5330     to always fail with ENOSYS.  Some functions are actually named
5331     something starting with __ and the normal name is an alias.  */
5332 #if defined (__stub_shmat) || defined (__stub___shmat)
5333 choke me
5334 #else
5335 shmat();
5336 #endif
5337
5338 ; return 0; }
5339 EOF
5340 if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5341   rm -rf conftest*
5342   eval "ac_cv_func_shmat=yes"
5343 else
5344   echo "configure: failed program was:" >&5
5345   cat conftest.$ac_ext >&5
5346   rm -rf conftest*
5347   eval "ac_cv_func_shmat=no"
5348 fi
5349 rm -f conftest*
5350
5351 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5352   echo "$ac_t""yes" 1>&6
5353   :
5354 else
5355   echo "$ac_t""no" 1>&6
5356 fi
5357
5358     if test $ac_cv_func_shmat = no; then
5359       
5360 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5361 echo "configure:5362: checking for shmat in -lipc" >&5
5362 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5363
5364 xe_check_libs=" -lipc "
5365 cat > conftest.$ac_ext <<EOF
5366 #line 5367 "configure"
5367 #include "confdefs.h"
5368 /* Override any gcc2 internal prototype to avoid an error.  */
5369 /* We use char because int might match the return type of a gcc2
5370     builtin and then its argument prototype would still apply.  */
5371 char shmat();
5372
5373 int main() {
5374 shmat()
5375 ; return 0; }
5376 EOF
5377 if { (eval echo configure:5378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5378   rm -rf conftest*
5379   eval "ac_cv_lib_$ac_lib_var=yes"
5380 else
5381   echo "configure: failed program was:" >&5
5382   cat conftest.$ac_ext >&5
5383   rm -rf conftest*
5384   eval "ac_cv_lib_$ac_lib_var=no"
5385 fi
5386 rm -f conftest*
5387 xe_check_libs=""
5388
5389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5390   echo "$ac_t""yes" 1>&6
5391   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5392 else
5393   echo "$ac_t""no" 1>&6
5394 fi
5395
5396
5397     fi
5398   fi
5399
5400   # Check for libraries that X11R6 Xt/Xaw programs need.
5401   ac_save_LDFLAGS="$LDFLAGS"
5402   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5403   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5404   # check for ICE first), but we must link in the order -lSM -lICE or
5405   # we get undefined symbols.  So assume we have SM if we have ICE.
5406   # These have to be linked with before -lX11, unlike the other
5407   # libraries we check for below, so use a different variable.
5408   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5409   
5410 xe_msg_checking="for IceConnectionNumber in -lICE"
5411 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5412 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5413 echo "configure:5414: checking "$xe_msg_checking"" >&5
5414 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5415
5416 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5417 cat > conftest.$ac_ext <<EOF
5418 #line 5419 "configure"
5419 #include "confdefs.h"
5420 /* Override any gcc2 internal prototype to avoid an error.  */
5421 /* We use char because int might match the return type of a gcc2
5422     builtin and then its argument prototype would still apply.  */
5423 char IceConnectionNumber();
5424
5425 int main() {
5426 IceConnectionNumber()
5427 ; return 0; }
5428 EOF
5429 if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5430   rm -rf conftest*
5431   eval "ac_cv_lib_$ac_lib_var=yes"
5432 else
5433   echo "configure: failed program was:" >&5
5434   cat conftest.$ac_ext >&5
5435   rm -rf conftest*
5436   eval "ac_cv_lib_$ac_lib_var=no"
5437 fi
5438 rm -f conftest*
5439 xe_check_libs=""
5440
5441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5442   echo "$ac_t""yes" 1>&6
5443   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5444 else
5445   echo "$ac_t""no" 1>&6
5446 fi
5447
5448
5449   LDFLAGS="$ac_save_LDFLAGS"
5450
5451 fi
5452  # Autoconf claims to find X library and include dirs for us.
5453   if test "$no_x" = "yes"
5454   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5455   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5456   fi
5457 fi
5458
5459 case "$with_x11" in
5460   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5461   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5462 esac
5463
5464 if test "$with_x11" = "yes"; then
5465   { test "$extra_verbose" = "yes" && cat << \EOF
5466     Defining HAVE_X_WINDOWS
5467 EOF
5468 cat >> confdefs.h <<\EOF
5469 #define HAVE_X_WINDOWS 1
5470 EOF
5471 }
5472
5473   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5474   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5475
5476       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5477     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5478     if test -d "$lib_dir" -a -d "$inc_dir"; then
5479       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5480         x_libraries="$lib_dir $x_libraries"
5481         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5482       esac
5483       case "$x_includes" in "$inc_dir"* ) ;; *)
5484         x_includes="$inc_dir $x_includes"
5485         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5486       esac
5487       break;       fi
5488   done
5489
5490     for rel in "X11R6" "X11R5" "X11R4"; do
5491     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5492     if test -d "$lib_dir" -a -d "$inc_dir"; then
5493       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5494         x_libraries="$x_libraries $lib_dir"
5495         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5496       esac
5497       case "$x_includes" in "$inc_dir"* ) ;; *)
5498         x_includes="$x_includes $inc_dir"
5499         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5500       esac
5501       break;     fi
5502   done
5503
5504     if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS -L/usr/shlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi
5505
5506   ld_switch_x_site="$X_LIBS"
5507
5508   
5509 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5510     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5511   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5512   
5513         runpath="" runpath_dirs=""
5514   if test -n "$LD_RUN_PATH"; then
5515     runpath="$LD_RUN_PATH"
5516   elif test "$GCC" = "yes"; then
5517         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5518     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5519     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5520     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5521       case "$arg" in P,* | -L* | -R* )
5522         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5523           {
5524 xe_runpath_dir="$dir"
5525   test "$xe_runpath_dir" != "/lib"     -a \
5526         "$xe_runpath_dir" != "/usr/lib" -a \
5527         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5528   eval "$xe_add_unique_runpath_dir"
5529 }
5530         done ;;
5531       esac
5532     done
5533     ld_switch_run="$ld_switch_run_save"
5534     rm -f conftest*
5535   else
5536         for arg in $ld_switch_site $ld_switch_x_site; do
5537       case "$arg" in -L*) {
5538 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5539   test "$xe_runpath_dir" != "/lib"     -a \
5540         "$xe_runpath_dir" != "/usr/lib" -a \
5541         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5542   eval "$xe_add_unique_runpath_dir"
5543 };; esac
5544     done
5545         if test "$opsys $need_motif" = "sol2 yes"; then
5546       xe_runpath_dir="/opt/SUNWdt/lib";
5547       eval "$xe_add_unique_runpath_dir";
5548     fi
5549   fi 
5550   if test -n "$runpath"; then
5551     ld_switch_run="${dash_r}${runpath}"
5552     
5553 if test "$GCC" = "yes"; then
5554   set x $ld_switch_run; shift; ld_switch_run=""
5555   while test -n "$1"; do
5556     case $1 in
5557       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5558       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5559       -Xlinker* ) ;;
5560       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5561     esac
5562     shift
5563   done
5564 fi
5565     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5566   fi
5567 fi
5568
5569
5570   if test "$extra_verbose" = "yes"; then
5571     echo; echo "X11 compilation variables:"
5572     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5573     echo
5574   fi
5575
5576             bitmapdirs=
5577   if test "$x_includes" != NONE; then
5578     for i in $x_includes; do
5579       if test -d "$i/bitmaps"; then
5580         bitmapdirs="$i/bitmaps:$bitmapdirs"
5581       fi
5582       if test -d "$i/X11/bitmaps"; then
5583         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5584       fi
5585     done
5586     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5587   fi
5588   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5589     Defining BITMAPDIR = "$bitmapdirs"
5590 EOF
5591 cat >> confdefs.h <<EOF
5592 #define BITMAPDIR "$bitmapdirs"
5593 EOF
5594 }
5595
5596
5597     echo "checking for X defines extracted by xmkmf" 1>&6
5598 echo "configure:5599: checking for X defines extracted by xmkmf" >&5
5599   rm -fr conftestdir
5600   if mkdir conftestdir; then
5601     cd conftestdir
5602     cat > Imakefile <<'EOF'
5603 xetest:
5604         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5605 EOF
5606     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5607       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5608       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5609     fi
5610     cd ..
5611     rm -fr conftestdir
5612     for word in $xmkmf_defines; do
5613       case "$word" in
5614         -D*=* ) ;;
5615         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5616               { test "$extra_verbose" = "yes" && cat << EOF
5617     Defining $word
5618 EOF
5619 cat >> confdefs.h <<EOF
5620 #define $word 1
5621 EOF
5622 }
5623  ;;
5624       esac
5625     done
5626   fi
5627
5628     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5629 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5630 echo "configure:5631: checking for X11/Intrinsic.h" >&5
5631
5632 cat > conftest.$ac_ext <<EOF
5633 #line 5634 "configure"
5634 #include "confdefs.h"
5635 #include <X11/Intrinsic.h>
5636 EOF
5637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5638 { (eval echo configure:5639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5640 if test -z "$ac_err"; then
5641   rm -rf conftest*
5642   eval "ac_cv_header_$ac_safe=yes"
5643 else
5644   echo "$ac_err" >&5
5645   echo "configure: failed program was:" >&5
5646   cat conftest.$ac_ext >&5
5647   rm -rf conftest*
5648   eval "ac_cv_header_$ac_safe=no"
5649 fi
5650 rm -f conftest*
5651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5652   echo "$ac_t""yes" 1>&6
5653   :
5654 else
5655   echo "$ac_t""no" 1>&6
5656 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5657 fi
5658
5659
5660       
5661 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5662 echo "configure:5663: checking for XOpenDisplay in -lX11" >&5
5663 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5664
5665 xe_check_libs=" -lX11 "
5666 cat > conftest.$ac_ext <<EOF
5667 #line 5668 "configure"
5668 #include "confdefs.h"
5669 /* Override any gcc2 internal prototype to avoid an error.  */
5670 /* We use char because int might match the return type of a gcc2
5671     builtin and then its argument prototype would still apply.  */
5672 char XOpenDisplay();
5673
5674 int main() {
5675 XOpenDisplay()
5676 ; return 0; }
5677 EOF
5678 if { (eval echo configure:5679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5679   rm -rf conftest*
5680   eval "ac_cv_lib_$ac_lib_var=yes"
5681 else
5682   echo "configure: failed program was:" >&5
5683   cat conftest.$ac_ext >&5
5684   rm -rf conftest*
5685   eval "ac_cv_lib_$ac_lib_var=no"
5686 fi
5687 rm -f conftest*
5688 xe_check_libs=""
5689
5690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5691   echo "$ac_t""yes" 1>&6
5692   have_lib_x11=yes
5693 else
5694   echo "$ac_t""no" 1>&6
5695 fi
5696
5697
5698   if test "$have_lib_x11" != "yes"; then
5699     
5700 xe_msg_checking="for XGetFontProperty in -lX11"
5701 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5702 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5703 echo "configure:5704: checking "$xe_msg_checking"" >&5
5704 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5705
5706 xe_check_libs=" -lX11 -b i486-linuxaout"
5707 cat > conftest.$ac_ext <<EOF
5708 #line 5709 "configure"
5709 #include "confdefs.h"
5710 /* Override any gcc2 internal prototype to avoid an error.  */
5711 /* We use char because int might match the return type of a gcc2
5712     builtin and then its argument prototype would still apply.  */
5713 char XGetFontProperty();
5714
5715 int main() {
5716 XGetFontProperty()
5717 ; return 0; }
5718 EOF
5719 if { (eval echo configure:5720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5720   rm -rf conftest*
5721   eval "ac_cv_lib_$ac_lib_var=yes"
5722 else
5723   echo "configure: failed program was:" >&5
5724   cat conftest.$ac_ext >&5
5725   rm -rf conftest*
5726   eval "ac_cv_lib_$ac_lib_var=no"
5727 fi
5728 rm -f conftest*
5729 xe_check_libs=""
5730
5731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5732   echo "$ac_t""yes" 1>&6
5733   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5734 else
5735   echo "$ac_t""no" 1>&6
5736 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5737 fi
5738
5739
5740   fi
5741   libs_x="-lX11"
5742   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5743
5744     
5745 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5746 echo "configure:5747: checking for XShapeSelectInput in -lXext" >&5
5747 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5748
5749 xe_check_libs=" -lXext "
5750 cat > conftest.$ac_ext <<EOF
5751 #line 5752 "configure"
5752 #include "confdefs.h"
5753 /* Override any gcc2 internal prototype to avoid an error.  */
5754 /* We use char because int might match the return type of a gcc2
5755     builtin and then its argument prototype would still apply.  */
5756 char XShapeSelectInput();
5757
5758 int main() {
5759 XShapeSelectInput()
5760 ; return 0; }
5761 EOF
5762 if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5763   rm -rf conftest*
5764   eval "ac_cv_lib_$ac_lib_var=yes"
5765 else
5766   echo "configure: failed program was:" >&5
5767   cat conftest.$ac_ext >&5
5768   rm -rf conftest*
5769   eval "ac_cv_lib_$ac_lib_var=no"
5770 fi
5771 rm -f conftest*
5772 xe_check_libs=""
5773
5774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5775   echo "$ac_t""yes" 1>&6
5776   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5777 else
5778   echo "$ac_t""no" 1>&6
5779 fi
5780
5781
5782
5783     
5784 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5785 echo "configure:5786: checking for XtOpenDisplay in -lXt" >&5
5786 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5787
5788 xe_check_libs=" -lXt "
5789 cat > conftest.$ac_ext <<EOF
5790 #line 5791 "configure"
5791 #include "confdefs.h"
5792 /* Override any gcc2 internal prototype to avoid an error.  */
5793 /* We use char because int might match the return type of a gcc2
5794     builtin and then its argument prototype would still apply.  */
5795 char XtOpenDisplay();
5796
5797 int main() {
5798 XtOpenDisplay()
5799 ; return 0; }
5800 EOF
5801 if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5802   rm -rf conftest*
5803   eval "ac_cv_lib_$ac_lib_var=yes"
5804 else
5805   echo "configure: failed program was:" >&5
5806   cat conftest.$ac_ext >&5
5807   rm -rf conftest*
5808   eval "ac_cv_lib_$ac_lib_var=no"
5809 fi
5810 rm -f conftest*
5811 xe_check_libs=""
5812
5813 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5814   echo "$ac_t""yes" 1>&6
5815   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5816 else
5817   echo "$ac_t""no" 1>&6
5818 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5819 fi
5820
5821
5822
5823   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5824 echo "configure:5825: checking the version of X11 being used" >&5
5825   cat > conftest.$ac_ext <<EOF
5826 #line 5827 "configure"
5827 #include "confdefs.h"
5828 #include <X11/Intrinsic.h>
5829     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5830 EOF
5831 if { (eval echo configure:5832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5832 then
5833   ./conftest foobar; x11_release=$?
5834 else
5835   conftest_rc="$?"
5836   echo "configure: failed program was:" >&5
5837   cat conftest.$ac_ext >&5
5838   rm -fr conftest*
5839   x11_release=4
5840 fi
5841 rm -fr conftest*
5842   echo "$ac_t""R${x11_release}" 1>&6
5843   { test "$extra_verbose" = "yes" && cat << EOF
5844     Defining THIS_IS_X11R${x11_release}
5845 EOF
5846 cat >> confdefs.h <<EOF
5847 #define THIS_IS_X11R${x11_release} 1
5848 EOF
5849 }
5850
5851
5852   for ac_hdr in X11/Xlocale.h
5853 do
5854 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5855 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5856 echo "configure:5857: checking for $ac_hdr" >&5
5857
5858 cat > conftest.$ac_ext <<EOF
5859 #line 5860 "configure"
5860 #include "confdefs.h"
5861 #include <$ac_hdr>
5862 EOF
5863 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5864 { (eval echo configure:5865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5865 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5866 if test -z "$ac_err"; then
5867   rm -rf conftest*
5868   eval "ac_cv_header_$ac_safe=yes"
5869 else
5870   echo "$ac_err" >&5
5871   echo "configure: failed program was:" >&5
5872   cat conftest.$ac_ext >&5
5873   rm -rf conftest*
5874   eval "ac_cv_header_$ac_safe=no"
5875 fi
5876 rm -f conftest*
5877 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5878   echo "$ac_t""yes" 1>&6
5879     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5880   { test "$extra_verbose" = "yes" && cat << EOF
5881     Defining $ac_tr_hdr
5882 EOF
5883 cat >> confdefs.h <<EOF
5884 #define $ac_tr_hdr 1
5885 EOF
5886 }
5887  
5888 else
5889   echo "$ac_t""no" 1>&6
5890 fi
5891 done
5892
5893
5894     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5895 echo "configure:5896: checking for XFree86" >&5
5896   if test -d "/usr/X386/include" -o \
5897           -f "/etc/XF86Config"    -o \
5898           -f "/etc/X11/XF86Config" -o \
5899           -f "/usr/X11R6/lib/X11/XF86Config"; then
5900     echo "$ac_t""yes" 1>&6
5901     { test "$extra_verbose" = "yes" && cat << \EOF
5902     Defining HAVE_XFREE386
5903 EOF
5904 cat >> confdefs.h <<\EOF
5905 #define HAVE_XFREE386 1
5906 EOF
5907 }
5908
5909   else
5910     echo "$ac_t""no" 1>&6
5911   fi
5912
5913     test -z "$with_xmu" && { 
5914 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5915 echo "configure:5916: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5916 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5917
5918 xe_check_libs=" -lXmu "
5919 cat > conftest.$ac_ext <<EOF
5920 #line 5921 "configure"
5921 #include "confdefs.h"
5922 /* Override any gcc2 internal prototype to avoid an error.  */
5923 /* We use char because int might match the return type of a gcc2
5924     builtin and then its argument prototype would still apply.  */
5925 char XmuReadBitmapDataFromFile();
5926
5927 int main() {
5928 XmuReadBitmapDataFromFile()
5929 ; return 0; }
5930 EOF
5931 if { (eval echo configure:5932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5932   rm -rf conftest*
5933   eval "ac_cv_lib_$ac_lib_var=yes"
5934 else
5935   echo "configure: failed program was:" >&5
5936   cat conftest.$ac_ext >&5
5937   rm -rf conftest*
5938   eval "ac_cv_lib_$ac_lib_var=no"
5939 fi
5940 rm -f conftest*
5941 xe_check_libs=""
5942
5943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5944   echo "$ac_t""yes" 1>&6
5945   with_xmu=yes
5946 else
5947   echo "$ac_t""no" 1>&6
5948 with_xmu=no
5949 fi
5950
5951  }
5952   if test "$with_xmu" = "no"; then
5953     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
5954    echo "    xemacs will be linked with \"xmu.o\""
5955  fi
5956   else
5957     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
5958     { test "$extra_verbose" = "yes" && cat << \EOF
5959     Defining HAVE_XMU
5960 EOF
5961 cat >> confdefs.h <<\EOF
5962 #define HAVE_XMU 1
5963 EOF
5964 }
5965
5966   fi
5967
5968       
5969 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
5970 echo "configure:5971: checking for main in -lXbsd" >&5
5971 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
5972
5973 xe_check_libs=" -lXbsd "
5974 cat > conftest.$ac_ext <<EOF
5975 #line 5976 "configure"
5976 #include "confdefs.h"
5977
5978 int main() {
5979 main()
5980 ; return 0; }
5981 EOF
5982 if { (eval echo configure:5983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5983   rm -rf conftest*
5984   eval "ac_cv_lib_$ac_lib_var=yes"
5985 else
5986   echo "configure: failed program was:" >&5
5987   cat conftest.$ac_ext >&5
5988   rm -rf conftest*
5989   eval "ac_cv_lib_$ac_lib_var=no"
5990 fi
5991 rm -f conftest*
5992 xe_check_libs=""
5993
5994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5995   echo "$ac_t""yes" 1>&6
5996   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
5997 else
5998   echo "$ac_t""no" 1>&6
5999 fi
6000
6001
6002
6003     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6004         if test "$GCC" = "yes"; then
6005       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6006       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6007     else
6008       case "$CC" in
6009         "xlc" ) CC="xlc_r" ;;
6010         "xlC" ) CC="xlC_r" ;;
6011         "cc"  ) CC="cc_r" ;;
6012       esac
6013     fi
6014   fi
6015
6016 fi 
6017 if test "$with_msw" != "no"; then
6018   echo "checking for MS-Windows" 1>&6
6019 echo "configure:6020: checking for MS-Windows" >&5
6020   
6021 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6022 echo "configure:6023: checking for main in -lgdi32" >&5
6023 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6024
6025 xe_check_libs=" -lgdi32 "
6026 cat > conftest.$ac_ext <<EOF
6027 #line 6028 "configure"
6028 #include "confdefs.h"
6029
6030 int main() {
6031 main()
6032 ; return 0; }
6033 EOF
6034 if { (eval echo configure:6035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6035   rm -rf conftest*
6036   eval "ac_cv_lib_$ac_lib_var=yes"
6037 else
6038   echo "configure: failed program was:" >&5
6039   cat conftest.$ac_ext >&5
6040   rm -rf conftest*
6041   eval "ac_cv_lib_$ac_lib_var=no"
6042 fi
6043 rm -f conftest*
6044 xe_check_libs=""
6045
6046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6047   echo "$ac_t""yes" 1>&6
6048   with_msw=yes
6049 else
6050   echo "$ac_t""no" 1>&6
6051 fi
6052
6053
6054   if test "$with_msw" = "yes"; then
6055     { test "$extra_verbose" = "yes" && cat << \EOF
6056     Defining HAVE_MS_WINDOWS
6057 EOF
6058 cat >> confdefs.h <<\EOF
6059 #define HAVE_MS_WINDOWS 1
6060 EOF
6061 }
6062
6063     install_pp="$blddir/lib-src/installexe.sh"
6064     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
6065     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6066     if test "$window_system" != x11; then
6067         window_system=msw
6068         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6069             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6070    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6071  fi
6072         test "$with_menubars"   != "no" && with_menubars=msw \
6073             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6074    echo "    xemacs will be linked with \"menubar-msw.o\""
6075  fi
6076         test "$with_toolbars"   != "no" && with_toolbars=msw \
6077             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6078    echo "    xemacs will be linked with \"toolbar-msw.o\""
6079  fi
6080         test "$with_dialogs"   != "no" && with_dialogs=msw \
6081             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6082    echo "    xemacs will be linked with \"dialog-msw.o\""
6083  fi
6084     else
6085         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6086    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6087  fi
6088         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6089    echo "    xemacs will be linked with \"menubar-msw.o\""
6090  fi
6091         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6092    echo "    xemacs will be linked with \"toolbar-msw.o\""
6093  fi
6094         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6095    echo "    xemacs will be linked with \"dialog-msw.o\""
6096  fi
6097     fi
6098         cat > conftest.$ac_ext <<EOF
6099 #line 6100 "configure"
6100 #include "confdefs.h"
6101 #include <fcntl.h>
6102     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6103 EOF
6104 if { (eval echo configure:6105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6105 then
6106   { test "$extra_verbose" = "yes" && cat << \EOF
6107     Defining HAVE_MSG_SELECT
6108 EOF
6109 cat >> confdefs.h <<\EOF
6110 #define HAVE_MSG_SELECT 1
6111 EOF
6112 }
6113
6114 else
6115   conftest_rc="$?"
6116   echo "configure: failed program was:" >&5
6117   cat conftest.$ac_ext >&5
6118 fi
6119 rm -fr conftest*
6120     const_is_losing=no
6121     with_file_coding=yes
6122     use_minimal_tagbits=yes
6123     use_indexed_lrecord_implementation=yes
6124     extra_objs="$extra_objs console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o gui-msw.o" &&  if test "$extra_verbose" = "yes"; then
6125    echo "    xemacs will be linked with \"console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o gui-msw.o\""
6126  fi
6127   fi
6128 fi
6129
6130
6131
6132 test -z "$window_system" && window_system="none"
6133
6134 if test "$window_system" = "none"; then
6135   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6136   do
6137     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6138        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6139     fi
6140     eval "with_${feature}=no"
6141   done
6142 else
6143   test -z "$with_toolbars" && with_toolbars=yes
6144 fi
6145
6146 if test "$with_msw" != "yes"; then
6147   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6148   do
6149     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6150        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6151     fi
6152     eval "with_${feature}=no"
6153   done
6154 else
6155   :
6156 fi
6157
6158 if test "$with_x11" != "yes"; then
6159             for feature in tooltalk cde offix session xim xmu
6160   do
6161     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6162        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6163     fi
6164     eval "with_${feature}=no"
6165   done
6166 fi
6167
6168 bitmapdir=
6169
6170 case "$window_system" in
6171   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6172   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6173   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6174 esac
6175
6176 case "$x_libraries" in *X11R4* )
6177   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6178   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6179 esac
6180
6181 echo "checking for session-management option" 1>&6
6182 echo "configure:6183: checking for session-management option" >&5;
6183 if test "$with_session" != "no"; then
6184   { test "$extra_verbose" = "yes" && cat << \EOF
6185     Defining HAVE_SESSION
6186 EOF
6187 cat >> confdefs.h <<\EOF
6188 #define HAVE_SESSION 1
6189 EOF
6190 }
6191
6192 fi
6193
6194 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6195 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6196 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6197 echo "configure:6198: checking for X11/Xauth.h" >&5
6198
6199 cat > conftest.$ac_ext <<EOF
6200 #line 6201 "configure"
6201 #include "confdefs.h"
6202 #include <X11/Xauth.h>
6203 EOF
6204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6205 { (eval echo configure:6206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6207 if test -z "$ac_err"; then
6208   rm -rf conftest*
6209   eval "ac_cv_header_$ac_safe=yes"
6210 else
6211   echo "$ac_err" >&5
6212   echo "configure: failed program was:" >&5
6213   cat conftest.$ac_ext >&5
6214   rm -rf conftest*
6215   eval "ac_cv_header_$ac_safe=no"
6216 fi
6217 rm -f conftest*
6218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6219   echo "$ac_t""yes" 1>&6
6220   :
6221 else
6222   echo "$ac_t""no" 1>&6
6223 with_xauth=no
6224 fi
6225  }
6226 test -z "$with_xauth" && { 
6227 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6228 echo "configure:6229: checking for XauGetAuthByAddr in -lXau" >&5
6229 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6230
6231 xe_check_libs=" -lXau "
6232 cat > conftest.$ac_ext <<EOF
6233 #line 6234 "configure"
6234 #include "confdefs.h"
6235 /* Override any gcc2 internal prototype to avoid an error.  */
6236 /* We use char because int might match the return type of a gcc2
6237     builtin and then its argument prototype would still apply.  */
6238 char XauGetAuthByAddr();
6239
6240 int main() {
6241 XauGetAuthByAddr()
6242 ; return 0; }
6243 EOF
6244 if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6245   rm -rf conftest*
6246   eval "ac_cv_lib_$ac_lib_var=yes"
6247 else
6248   echo "configure: failed program was:" >&5
6249   cat conftest.$ac_ext >&5
6250   rm -rf conftest*
6251   eval "ac_cv_lib_$ac_lib_var=no"
6252 fi
6253 rm -f conftest*
6254 xe_check_libs=""
6255
6256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6257   echo "$ac_t""yes" 1>&6
6258   :
6259 else
6260   echo "$ac_t""no" 1>&6
6261 with_xauth=no
6262 fi
6263
6264  }
6265 test -z "$with_xauth" && with_xauth=yes
6266 if test "$with_xauth" = "yes"; then
6267   { test "$extra_verbose" = "yes" && cat << \EOF
6268     Defining HAVE_XAUTH
6269 EOF
6270 cat >> confdefs.h <<\EOF
6271 #define HAVE_XAUTH 1
6272 EOF
6273 }
6274
6275   
6276 T=""
6277 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
6278 libs_xauth="$T"
6279
6280 fi
6281
6282
6283
6284
6285 if test "$with_tooltalk" != "no" ; then
6286       for dir in "" "Tt/" "desktop/" ; do
6287     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6288 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6289 echo "configure:6290: checking for ${dir}tt_c.h" >&5
6290
6291 cat > conftest.$ac_ext <<EOF
6292 #line 6293 "configure"
6293 #include "confdefs.h"
6294 #include <${dir}tt_c.h>
6295 EOF
6296 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6297 { (eval echo configure:6298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6298 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6299 if test -z "$ac_err"; then
6300   rm -rf conftest*
6301   eval "ac_cv_header_$ac_safe=yes"
6302 else
6303   echo "$ac_err" >&5
6304   echo "configure: failed program was:" >&5
6305   cat conftest.$ac_ext >&5
6306   rm -rf conftest*
6307   eval "ac_cv_header_$ac_safe=no"
6308 fi
6309 rm -f conftest*
6310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6311   echo "$ac_t""yes" 1>&6
6312   tt_c_h_path="${dir}tt_c.h"; break
6313 else
6314   echo "$ac_t""no" 1>&6
6315 fi
6316
6317   done
6318   if test -z "$tt_c_h_path"; then
6319     if test "$with_tooltalk" = "yes"; then
6320       (echo "$progname: Usage error:"
6321 echo " " "Unable to find required tooltalk header files."
6322 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6323     fi
6324     with_tooltalk=no
6325   fi
6326 fi
6327 if test "$with_tooltalk" != "no" ; then
6328   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6329     
6330 xe_msg_checking="for tt_message_create in -ltt"
6331 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6332 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6333 echo "configure:6334: checking "$xe_msg_checking"" >&5
6334 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6335
6336 xe_check_libs=" -ltt $extra_libs"
6337 cat > conftest.$ac_ext <<EOF
6338 #line 6339 "configure"
6339 #include "confdefs.h"
6340 /* Override any gcc2 internal prototype to avoid an error.  */
6341 /* We use char because int might match the return type of a gcc2
6342     builtin and then its argument prototype would still apply.  */
6343 char tt_message_create();
6344
6345 int main() {
6346 tt_message_create()
6347 ; return 0; }
6348 EOF
6349 if { (eval echo configure:6350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6350   rm -rf conftest*
6351   eval "ac_cv_lib_$ac_lib_var=yes"
6352 else
6353   echo "configure: failed program was:" >&5
6354   cat conftest.$ac_ext >&5
6355   rm -rf conftest*
6356   eval "ac_cv_lib_$ac_lib_var=no"
6357 fi
6358 rm -f conftest*
6359 xe_check_libs=""
6360
6361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6362   echo "$ac_t""yes" 1>&6
6363   tt_libs="-ltt $extra_libs"; break
6364 else
6365   echo "$ac_t""no" 1>&6
6366 :
6367 fi
6368
6369
6370   done
6371   if test -z "$tt_libs"; then
6372     if test "$with_tooltalk" = "yes"; then
6373       (echo "$progname: Usage error:"
6374 echo " " "Unable to find required tooltalk libraries."
6375 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6376     fi
6377     with_tooltalk=no
6378   fi
6379 fi
6380 test -z "$with_tooltalk" && with_tooltalk=yes
6381 if test "$with_tooltalk" = "yes"; then
6382   { test "$extra_verbose" = "yes" && cat << \EOF
6383     Defining TOOLTALK
6384 EOF
6385 cat >> confdefs.h <<\EOF
6386 #define TOOLTALK 1
6387 EOF
6388 }
6389
6390   { test "$extra_verbose" = "yes" && cat << EOF
6391     Defining TT_C_H_PATH = "$tt_c_h_path"
6392 EOF
6393 cat >> confdefs.h <<EOF
6394 #define TT_C_H_PATH "$tt_c_h_path"
6395 EOF
6396 }
6397
6398   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6399   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6400    echo "    xemacs will be linked with \"tooltalk.o\""
6401  fi
6402 fi
6403
6404 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6405 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6406 echo "configure:6407: checking for Dt/Dt.h" >&5
6407
6408 cat > conftest.$ac_ext <<EOF
6409 #line 6410 "configure"
6410 #include "confdefs.h"
6411 #include <Dt/Dt.h>
6412 EOF
6413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6414 { (eval echo configure:6415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6416 if test -z "$ac_err"; then
6417   rm -rf conftest*
6418   eval "ac_cv_header_$ac_safe=yes"
6419 else
6420   echo "$ac_err" >&5
6421   echo "configure: failed program was:" >&5
6422   cat conftest.$ac_ext >&5
6423   rm -rf conftest*
6424   eval "ac_cv_header_$ac_safe=no"
6425 fi
6426 rm -f conftest*
6427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6428   echo "$ac_t""yes" 1>&6
6429   :
6430 else
6431   echo "$ac_t""no" 1>&6
6432 with_cde=no
6433 fi
6434  }
6435 test -z "$with_cde" && { 
6436 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6437 echo "configure:6438: checking for DtDndDragStart in -lDtSvc" >&5
6438 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6439
6440 xe_check_libs=" -lDtSvc "
6441 cat > conftest.$ac_ext <<EOF
6442 #line 6443 "configure"
6443 #include "confdefs.h"
6444 /* Override any gcc2 internal prototype to avoid an error.  */
6445 /* We use char because int might match the return type of a gcc2
6446     builtin and then its argument prototype would still apply.  */
6447 char DtDndDragStart();
6448
6449 int main() {
6450 DtDndDragStart()
6451 ; return 0; }
6452 EOF
6453 if { (eval echo configure:6454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6454   rm -rf conftest*
6455   eval "ac_cv_lib_$ac_lib_var=yes"
6456 else
6457   echo "configure: failed program was:" >&5
6458   cat conftest.$ac_ext >&5
6459   rm -rf conftest*
6460   eval "ac_cv_lib_$ac_lib_var=no"
6461 fi
6462 rm -f conftest*
6463 xe_check_libs=""
6464
6465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6466   echo "$ac_t""yes" 1>&6
6467   :
6468 else
6469   echo "$ac_t""no" 1>&6
6470 with_cde=no
6471 fi
6472
6473  }
6474 test -z "$with_cde" && with_cde=yes
6475 if test "$with_dragndrop" = no; then
6476   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6477   with_cde=no
6478 fi
6479 if test "$with_cde" = "yes" ; then
6480   { test "$extra_verbose" = "yes" && cat << \EOF
6481     Defining HAVE_CDE
6482 EOF
6483 cat >> confdefs.h <<\EOF
6484 #define HAVE_CDE 1
6485 EOF
6486 }
6487
6488   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6489   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6490   with_tooltalk=yes # CDE requires Tooltalk
6491   need_motif=yes    # CDE requires Motif
6492 fi
6493
6494 test "$window_system" != "x11" && with_offix=no
6495 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6496   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6497   with_offix=no
6498 fi
6499 if test "$with_dragndrop" = no; then
6500   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6501   with_offix=no
6502 fi
6503 if test "$with_cde" = yes; then
6504   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6505   with_offix=no
6506 fi
6507 test -z "$with_offix" && with_offix=no
6508 if test "$with_offix" = "yes"; then
6509   { test "$extra_verbose" = "yes" && cat << \EOF
6510     Defining HAVE_OFFIX_DND
6511 EOF
6512 cat >> confdefs.h <<\EOF
6513 #define HAVE_OFFIX_DND 1
6514 EOF
6515 }
6516
6517   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6518   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6519 fi
6520
6521 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6522 echo "configure:6523: checking if drag and drop API is needed" >&5
6523 if test "$with_dragndrop" != "no" ; then
6524   if test -n "$dragndrop_proto" ; then
6525     with_dragndrop=yes
6526     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6527     { test "$extra_verbose" = "yes" && cat << \EOF
6528     Defining HAVE_DRAGNDROP
6529 EOF
6530 cat >> confdefs.h <<\EOF
6531 #define HAVE_DRAGNDROP 1
6532 EOF
6533 }
6534
6535     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6536   else
6537     with_dragndrop=no
6538     echo "$ac_t""no" 1>&6
6539   fi
6540 fi
6541
6542 echo "checking for LDAP" 1>&6
6543 echo "configure:6544: checking for LDAP" >&5
6544 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6545 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6546 echo "configure:6547: checking for ldap.h" >&5
6547
6548 cat > conftest.$ac_ext <<EOF
6549 #line 6550 "configure"
6550 #include "confdefs.h"
6551 #include <ldap.h>
6552 EOF
6553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6554 { (eval echo configure:6555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6556 if test -z "$ac_err"; then
6557   rm -rf conftest*
6558   eval "ac_cv_header_$ac_safe=yes"
6559 else
6560   echo "$ac_err" >&5
6561   echo "configure: failed program was:" >&5
6562   cat conftest.$ac_ext >&5
6563   rm -rf conftest*
6564   eval "ac_cv_header_$ac_safe=no"
6565 fi
6566 rm -f conftest*
6567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6568   echo "$ac_t""yes" 1>&6
6569   :
6570 else
6571   echo "$ac_t""no" 1>&6
6572 with_ldap=no
6573 fi
6574  }
6575 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6576 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6577 echo "configure:6578: checking for lber.h" >&5
6578
6579 cat > conftest.$ac_ext <<EOF
6580 #line 6581 "configure"
6581 #include "confdefs.h"
6582 #include <lber.h>
6583 EOF
6584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6585 { (eval echo configure:6586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6587 if test -z "$ac_err"; then
6588   rm -rf conftest*
6589   eval "ac_cv_header_$ac_safe=yes"
6590 else
6591   echo "$ac_err" >&5
6592   echo "configure: failed program was:" >&5
6593   cat conftest.$ac_ext >&5
6594   rm -rf conftest*
6595   eval "ac_cv_header_$ac_safe=no"
6596 fi
6597 rm -f conftest*
6598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6599   echo "$ac_t""yes" 1>&6
6600   :
6601 else
6602   echo "$ac_t""no" 1>&6
6603 with_ldap=no
6604 fi
6605  }
6606 if test "$with_ldap" != "no"; then
6607   test -z "$with_umich_ldap" && { 
6608 xe_msg_checking="for ldap_open in -lldap"
6609 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6610 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6611 echo "configure:6612: checking "$xe_msg_checking"" >&5
6612 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6613
6614 xe_check_libs=" -lldap -llber"
6615 cat > conftest.$ac_ext <<EOF
6616 #line 6617 "configure"
6617 #include "confdefs.h"
6618 /* Override any gcc2 internal prototype to avoid an error.  */
6619 /* We use char because int might match the return type of a gcc2
6620     builtin and then its argument prototype would still apply.  */
6621 char ldap_open();
6622
6623 int main() {
6624 ldap_open()
6625 ; return 0; }
6626 EOF
6627 if { (eval echo configure:6628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6628   rm -rf conftest*
6629   eval "ac_cv_lib_$ac_lib_var=yes"
6630 else
6631   echo "configure: failed program was:" >&5
6632   cat conftest.$ac_ext >&5
6633   rm -rf conftest*
6634   eval "ac_cv_lib_$ac_lib_var=no"
6635 fi
6636 rm -f conftest*
6637 xe_check_libs=""
6638
6639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6640   echo "$ac_t""yes" 1>&6
6641   with_umich_ldap=yes
6642 else
6643   echo "$ac_t""no" 1>&6
6644 with_umich_ldap=no
6645 fi
6646
6647  }
6648   test "$with_umich_ldap" = "no" && { 
6649 echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6
6650 echo "configure:6651: checking for ldap_set_option in -lldap10" >&5
6651 ac_lib_var=`echo ldap10'_'ldap_set_option | sed 'y%./+-%__p_%'`
6652
6653 xe_check_libs=" -lldap10 "
6654 cat > conftest.$ac_ext <<EOF
6655 #line 6656 "configure"
6656 #include "confdefs.h"
6657 /* Override any gcc2 internal prototype to avoid an error.  */
6658 /* We use char because int might match the return type of a gcc2
6659     builtin and then its argument prototype would still apply.  */
6660 char ldap_set_option();
6661
6662 int main() {
6663 ldap_set_option()
6664 ; return 0; }
6665 EOF
6666 if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6667   rm -rf conftest*
6668   eval "ac_cv_lib_$ac_lib_var=yes"
6669 else
6670   echo "configure: failed program was:" >&5
6671   cat conftest.$ac_ext >&5
6672   rm -rf conftest*
6673   eval "ac_cv_lib_$ac_lib_var=no"
6674 fi
6675 rm -f conftest*
6676 xe_check_libs=""
6677
6678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6679   echo "$ac_t""yes" 1>&6
6680   with_ns_ldap=yes
6681 else
6682   echo "$ac_t""no" 1>&6
6683 with_ns_ldap=no
6684 fi
6685
6686  }
6687   test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes
6688 fi
6689 if test "$with_ldap" = "yes"; then
6690   { test "$extra_verbose" = "yes" && cat << \EOF
6691     Defining HAVE_LDAP
6692 EOF
6693 cat >> confdefs.h <<\EOF
6694 #define HAVE_LDAP 1
6695 EOF
6696 }
6697
6698   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6699    echo "    xemacs will be linked with \"eldap.o\""
6700  fi
6701   if test "$with_umich_ldap" = "yes" ; then
6702     { test "$extra_verbose" = "yes" && cat << \EOF
6703     Defining HAVE_UMICH_LDAP
6704 EOF
6705 cat >> confdefs.h <<\EOF
6706 #define HAVE_UMICH_LDAP 1
6707 EOF
6708 }
6709
6710     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6711     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6712   elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then
6713     { test "$extra_verbose" = "yes" && cat << \EOF
6714     Defining HAVE_NS_LDAP
6715 EOF
6716 cat >> confdefs.h <<\EOF
6717 #define HAVE_NS_LDAP 1
6718 EOF
6719 }
6720
6721     LIBS="-lldap10 $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap10\" to \$LIBS"; fi
6722   elif test "$with_ldap" = "yes" ; then
6723     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6724   fi
6725 fi
6726
6727
6728 if test "$window_system" != "none"; then
6729   echo "checking for graphics libraries" 1>&6
6730 echo "configure:6731: checking for graphics libraries" >&5
6731
6732     xpm_problem=""
6733   if test -z "$with_xpm"; then
6734     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6735 echo "configure:6736: checking for Xpm - no older than 3.4f" >&5
6736     xe_check_libs=-lXpm
6737     cat > conftest.$ac_ext <<EOF
6738 #line 6739 "configure"
6739 #include "confdefs.h"
6740 #include <X11/xpm.h>
6741     int main(int c, char **v) {
6742     return c == 1 ? 0 :
6743       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6744       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6745 EOF
6746 if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6747 then
6748   ./conftest dummy_arg; xpm_status=$?;
6749       if test "$xpm_status" = "0"; then
6750         with_xpm=yes;
6751       else
6752         with_xpm=no;
6753         if test "$xpm_status" = "1"; then
6754           xpm_problem="Xpm library version and header file version don't match!"
6755         elif test "$xpm_status" = "2"; then
6756           xpm_problem="Xpm library version is too old!"
6757         else
6758           xpm_problem="Internal xpm detection logic error!"
6759         fi
6760         echo "
6761 *** WARNING *** $xpm_problem
6762   I'm not touching that with a 10-foot pole!
6763   If you really want to use the installed version of Xpm, rerun
6764   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
6765     fi
6766 else
6767   conftest_rc="$?"
6768   echo "configure: failed program was:" >&5
6769   cat conftest.$ac_ext >&5
6770   rm -fr conftest*
6771   with_xpm=no
6772 fi
6773 rm -fr conftest*
6774     xe_check_libs=
6775     echo "$ac_t""$with_xpm" 1>&6
6776   fi
6777   if test "$with_xpm" = "yes"; then
6778     { test "$extra_verbose" = "yes" && cat << \EOF
6779     Defining HAVE_XPM
6780 EOF
6781 cat >> confdefs.h <<\EOF
6782 #define HAVE_XPM 1
6783 EOF
6784 }
6785
6786     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6787     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6788 echo "configure:6789: checking for \"FOR_MSW\" xpm" >&5
6789     xe_check_libs=-lXpm
6790     cat > conftest.$ac_ext <<EOF
6791 #line 6792 "configure"
6792 #include "confdefs.h"
6793
6794 int main() {
6795 XpmCreatePixmapFromData()
6796 ; return 0; }
6797 EOF
6798 if { (eval echo configure:6799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6799   rm -rf conftest*
6800   xpm_for_msw=no
6801 else
6802   echo "configure: failed program was:" >&5
6803   cat conftest.$ac_ext >&5
6804   rm -rf conftest*
6805   xpm_for_msw=yes
6806 fi
6807 rm -f conftest*
6808     xe_check_libs=
6809     echo "$ac_t""$xpm_for_msw" 1>&6
6810     if test "$xpm_for_msw" = "yes"; then
6811       { test "$extra_verbose" = "yes" && cat << \EOF
6812     Defining FOR_MSW
6813 EOF
6814 cat >> confdefs.h <<\EOF
6815 #define FOR_MSW 1
6816 EOF
6817 }
6818
6819     fi
6820   fi
6821
6822     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
6823 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
6824 echo "configure:6825: checking for compface.h" >&5
6825
6826 cat > conftest.$ac_ext <<EOF
6827 #line 6828 "configure"
6828 #include "confdefs.h"
6829 #include <compface.h>
6830 EOF
6831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6832 { (eval echo configure:6833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6834 if test -z "$ac_err"; then
6835   rm -rf conftest*
6836   eval "ac_cv_header_$ac_safe=yes"
6837 else
6838   echo "$ac_err" >&5
6839   echo "configure: failed program was:" >&5
6840   cat conftest.$ac_ext >&5
6841   rm -rf conftest*
6842   eval "ac_cv_header_$ac_safe=no"
6843 fi
6844 rm -f conftest*
6845 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6846   echo "$ac_t""yes" 1>&6
6847   :
6848 else
6849   echo "$ac_t""no" 1>&6
6850 with_xface=no
6851 fi
6852  }
6853   test -z "$with_xface" && { 
6854 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
6855 echo "configure:6856: checking for UnGenFace in -lcompface" >&5
6856 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
6857
6858 xe_check_libs=" -lcompface "
6859 cat > conftest.$ac_ext <<EOF
6860 #line 6861 "configure"
6861 #include "confdefs.h"
6862 /* Override any gcc2 internal prototype to avoid an error.  */
6863 /* We use char because int might match the return type of a gcc2
6864     builtin and then its argument prototype would still apply.  */
6865 char UnGenFace();
6866
6867 int main() {
6868 UnGenFace()
6869 ; return 0; }
6870 EOF
6871 if { (eval echo configure:6872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6872   rm -rf conftest*
6873   eval "ac_cv_lib_$ac_lib_var=yes"
6874 else
6875   echo "configure: failed program was:" >&5
6876   cat conftest.$ac_ext >&5
6877   rm -rf conftest*
6878   eval "ac_cv_lib_$ac_lib_var=no"
6879 fi
6880 rm -f conftest*
6881 xe_check_libs=""
6882
6883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6884   echo "$ac_t""yes" 1>&6
6885   : 
6886 else
6887   echo "$ac_t""no" 1>&6
6888 with_xface=no
6889 fi
6890
6891  }
6892   test -z "$with_xface" && with_xface=yes
6893   if test "$with_xface" = "yes"; then
6894     { test "$extra_verbose" = "yes" && cat << \EOF
6895     Defining HAVE_XFACE
6896 EOF
6897 cat >> confdefs.h <<\EOF
6898 #define HAVE_XFACE 1
6899 EOF
6900 }
6901
6902     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
6903   fi
6904
6905         if test "$with_gif" != "no"; then
6906     with_gif="yes"
6907     { test "$extra_verbose" = "yes" && cat << \EOF
6908     Defining HAVE_GIF
6909 EOF
6910 cat >> confdefs.h <<\EOF
6911 #define HAVE_GIF 1
6912 EOF
6913 }
6914
6915     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
6916    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
6917  fi
6918   fi
6919
6920       if test "$with_png $with_tiff" != "no no"; then
6921     
6922 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
6923 echo "configure:6924: checking for inflate in -lc" >&5
6924 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
6925
6926 xe_check_libs=" -lc "
6927 cat > conftest.$ac_ext <<EOF
6928 #line 6929 "configure"
6929 #include "confdefs.h"
6930 /* Override any gcc2 internal prototype to avoid an error.  */
6931 /* We use char because int might match the return type of a gcc2
6932     builtin and then its argument prototype would still apply.  */
6933 char inflate();
6934
6935 int main() {
6936 inflate()
6937 ; return 0; }
6938 EOF
6939 if { (eval echo configure:6940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6940   rm -rf conftest*
6941   eval "ac_cv_lib_$ac_lib_var=yes"
6942 else
6943   echo "configure: failed program was:" >&5
6944   cat conftest.$ac_ext >&5
6945   rm -rf conftest*
6946   eval "ac_cv_lib_$ac_lib_var=no"
6947 fi
6948 rm -f conftest*
6949 xe_check_libs=""
6950
6951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6952   echo "$ac_t""yes" 1>&6
6953   :
6954 else
6955   echo "$ac_t""no" 1>&6
6956
6957 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
6958 echo "configure:6959: checking for inflate in -lz" >&5
6959 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
6960
6961 xe_check_libs=" -lz "
6962 cat > conftest.$ac_ext <<EOF
6963 #line 6964 "configure"
6964 #include "confdefs.h"
6965 /* Override any gcc2 internal prototype to avoid an error.  */
6966 /* We use char because int might match the return type of a gcc2
6967     builtin and then its argument prototype would still apply.  */
6968 char inflate();
6969
6970 int main() {
6971 inflate()
6972 ; return 0; }
6973 EOF
6974 if { (eval echo configure:6975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6975   rm -rf conftest*
6976   eval "ac_cv_lib_$ac_lib_var=yes"
6977 else
6978   echo "configure: failed program was:" >&5
6979   cat conftest.$ac_ext >&5
6980   rm -rf conftest*
6981   eval "ac_cv_lib_$ac_lib_var=no"
6982 fi
6983 rm -f conftest*
6984 xe_check_libs=""
6985
6986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6987   echo "$ac_t""yes" 1>&6
6988   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
6989 else
6990   echo "$ac_t""no" 1>&6
6991
6992 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
6993 echo "configure:6994: checking for inflate in -lgz" >&5
6994 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
6995
6996 xe_check_libs=" -lgz "
6997 cat > conftest.$ac_ext <<EOF
6998 #line 6999 "configure"
6999 #include "confdefs.h"
7000 /* Override any gcc2 internal prototype to avoid an error.  */
7001 /* We use char because int might match the return type of a gcc2
7002     builtin and then its argument prototype would still apply.  */
7003 char inflate();
7004
7005 int main() {
7006 inflate()
7007 ; return 0; }
7008 EOF
7009 if { (eval echo configure:7010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7010   rm -rf conftest*
7011   eval "ac_cv_lib_$ac_lib_var=yes"
7012 else
7013   echo "configure: failed program was:" >&5
7014   cat conftest.$ac_ext >&5
7015   rm -rf conftest*
7016   eval "ac_cv_lib_$ac_lib_var=no"
7017 fi
7018 rm -f conftest*
7019 xe_check_libs=""
7020
7021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7022   echo "$ac_t""yes" 1>&6
7023   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7024 else
7025   echo "$ac_t""no" 1>&6
7026 fi
7027
7028
7029 fi
7030
7031
7032 fi
7033
7034
7035   fi
7036
7037     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7038 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7039 echo "configure:7040: checking for jpeglib.h" >&5
7040
7041 cat > conftest.$ac_ext <<EOF
7042 #line 7043 "configure"
7043 #include "confdefs.h"
7044 #include <jpeglib.h>
7045 EOF
7046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7047 { (eval echo configure:7048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7049 if test -z "$ac_err"; then
7050   rm -rf conftest*
7051   eval "ac_cv_header_$ac_safe=yes"
7052 else
7053   echo "$ac_err" >&5
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   eval "ac_cv_header_$ac_safe=no"
7058 fi
7059 rm -f conftest*
7060 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7061   echo "$ac_t""yes" 1>&6
7062   :
7063 else
7064   echo "$ac_t""no" 1>&6
7065 with_jpeg=no
7066 fi
7067  }
7068   test -z "$with_jpeg" && { 
7069 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7070 echo "configure:7071: checking for jpeg_destroy_decompress in -ljpeg" >&5
7071 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7072
7073 xe_check_libs=" -ljpeg "
7074 cat > conftest.$ac_ext <<EOF
7075 #line 7076 "configure"
7076 #include "confdefs.h"
7077 /* Override any gcc2 internal prototype to avoid an error.  */
7078 /* We use char because int might match the return type of a gcc2
7079     builtin and then its argument prototype would still apply.  */
7080 char jpeg_destroy_decompress();
7081
7082 int main() {
7083 jpeg_destroy_decompress()
7084 ; return 0; }
7085 EOF
7086 if { (eval echo configure:7087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7087   rm -rf conftest*
7088   eval "ac_cv_lib_$ac_lib_var=yes"
7089 else
7090   echo "configure: failed program was:" >&5
7091   cat conftest.$ac_ext >&5
7092   rm -rf conftest*
7093   eval "ac_cv_lib_$ac_lib_var=no"
7094 fi
7095 rm -f conftest*
7096 xe_check_libs=""
7097
7098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7099   echo "$ac_t""yes" 1>&6
7100   :
7101 else
7102   echo "$ac_t""no" 1>&6
7103 with_jpeg=no
7104 fi
7105
7106  }
7107   test -z "$with_jpeg" && with_jpeg=yes
7108   if test "$with_jpeg" = "yes"; then
7109     { test "$extra_verbose" = "yes" && cat << \EOF
7110     Defining HAVE_JPEG
7111 EOF
7112 cat >> confdefs.h <<\EOF
7113 #define HAVE_JPEG 1
7114 EOF
7115 }
7116
7117     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7118   fi
7119
7120     png_problem=""
7121   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7122 echo "configure:7123: checking for pow" >&5
7123
7124 cat > conftest.$ac_ext <<EOF
7125 #line 7126 "configure"
7126 #include "confdefs.h"
7127 /* System header to define __stub macros and hopefully few prototypes,
7128     which can conflict with char pow(); below.  */
7129 #include <assert.h>
7130 /* Override any gcc2 internal prototype to avoid an error.  */
7131 /* We use char because int might match the return type of a gcc2
7132     builtin and then its argument prototype would still apply.  */
7133 char pow();
7134
7135 int main() {
7136
7137 /* The GNU C library defines this for functions which it implements
7138     to always fail with ENOSYS.  Some functions are actually named
7139     something starting with __ and the normal name is an alias.  */
7140 #if defined (__stub_pow) || defined (__stub___pow)
7141 choke me
7142 #else
7143 pow();
7144 #endif
7145
7146 ; return 0; }
7147 EOF
7148 if { (eval echo configure:7149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7149   rm -rf conftest*
7150   eval "ac_cv_func_pow=yes"
7151 else
7152   echo "configure: failed program was:" >&5
7153   cat conftest.$ac_ext >&5
7154   rm -rf conftest*
7155   eval "ac_cv_func_pow=no"
7156 fi
7157 rm -f conftest*
7158
7159 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7160   echo "$ac_t""yes" 1>&6
7161   :
7162 else
7163   echo "$ac_t""no" 1>&6
7164 with_png=no
7165 fi
7166  }
7167   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7168 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7169 echo "configure:7170: checking for png.h" >&5
7170
7171 cat > conftest.$ac_ext <<EOF
7172 #line 7173 "configure"
7173 #include "confdefs.h"
7174 #include <png.h>
7175 EOF
7176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7177 { (eval echo configure:7178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7179 if test -z "$ac_err"; then
7180   rm -rf conftest*
7181   eval "ac_cv_header_$ac_safe=yes"
7182 else
7183   echo "$ac_err" >&5
7184   echo "configure: failed program was:" >&5
7185   cat conftest.$ac_ext >&5
7186   rm -rf conftest*
7187   eval "ac_cv_header_$ac_safe=no"
7188 fi
7189 rm -f conftest*
7190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7191   echo "$ac_t""yes" 1>&6
7192   :
7193 else
7194   echo "$ac_t""no" 1>&6
7195 with_png=no
7196 fi
7197  }
7198   test -z "$with_png" && { 
7199 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7200 echo "configure:7201: checking for png_read_image in -lpng" >&5
7201 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7202
7203 xe_check_libs=" -lpng "
7204 cat > conftest.$ac_ext <<EOF
7205 #line 7206 "configure"
7206 #include "confdefs.h"
7207 /* Override any gcc2 internal prototype to avoid an error.  */
7208 /* We use char because int might match the return type of a gcc2
7209     builtin and then its argument prototype would still apply.  */
7210 char png_read_image();
7211
7212 int main() {
7213 png_read_image()
7214 ; return 0; }
7215 EOF
7216 if { (eval echo configure:7217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7217   rm -rf conftest*
7218   eval "ac_cv_lib_$ac_lib_var=yes"
7219 else
7220   echo "configure: failed program was:" >&5
7221   cat conftest.$ac_ext >&5
7222   rm -rf conftest*
7223   eval "ac_cv_lib_$ac_lib_var=no"
7224 fi
7225 rm -f conftest*
7226 xe_check_libs=""
7227
7228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7229   echo "$ac_t""yes" 1>&6
7230   :
7231 else
7232   echo "$ac_t""no" 1>&6
7233 with_png=no
7234 fi
7235
7236  }
7237   if test -z "$with_png"; then
7238     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7239 echo "configure:7240: checking for workable png version information" >&5
7240     xe_check_libs="-lpng -lz"
7241     cat > conftest.$ac_ext <<EOF
7242 #line 7243 "configure"
7243 #include "confdefs.h"
7244 #include <png.h>
7245     int main(int c, char **v) {
7246     if (c == 1) return 0;
7247     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7248     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7249 EOF
7250 if { (eval echo configure:7251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7251 then
7252   ./conftest dummy_arg; png_status=$?;
7253       if test "$png_status" = "0"; then
7254         with_png=yes;
7255       else
7256         with_png=no;
7257         if test "$png_status" = "1"; then
7258           png_problem="PNG library version and header file don't match!"
7259         elif test "$png_status" = "2"; then
7260           png_problem="PNG library version too old (pre 1.0.2)!"
7261         fi
7262         echo "
7263 *** WARNING *** $png_problem
7264   I'm not touching that with a 10-foot pole!
7265   If you really want to use the installed version of libPNG, rerun
7266   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7267     fi
7268 else
7269   conftest_rc="$?"
7270   echo "configure: failed program was:" >&5
7271   cat conftest.$ac_ext >&5
7272   rm -fr conftest*
7273   with_png=no
7274 fi
7275 rm -fr conftest*
7276     xe_check_libs=
7277     echo "$ac_t""$with_png" 1>&6
7278   fi
7279   if test "$with_png" = "yes"; then
7280     { test "$extra_verbose" = "yes" && cat << \EOF
7281     Defining HAVE_PNG
7282 EOF
7283 cat >> confdefs.h <<\EOF
7284 #define HAVE_PNG 1
7285 EOF
7286 }
7287
7288     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7289   fi
7290
7291     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7292 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7293 echo "configure:7294: checking for tiffio.h" >&5
7294
7295 cat > conftest.$ac_ext <<EOF
7296 #line 7297 "configure"
7297 #include "confdefs.h"
7298 #include <tiffio.h>
7299 EOF
7300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7301 { (eval echo configure:7302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7303 if test -z "$ac_err"; then
7304   rm -rf conftest*
7305   eval "ac_cv_header_$ac_safe=yes"
7306 else
7307   echo "$ac_err" >&5
7308   echo "configure: failed program was:" >&5
7309   cat conftest.$ac_ext >&5
7310   rm -rf conftest*
7311   eval "ac_cv_header_$ac_safe=no"
7312 fi
7313 rm -f conftest*
7314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7315   echo "$ac_t""yes" 1>&6
7316   :
7317 else
7318   echo "$ac_t""no" 1>&6
7319 with_tiff=no
7320 fi
7321  }
7322   test -z "$with_tiff" && { 
7323 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7324 echo "configure:7325: checking for TIFFClientOpen in -ltiff" >&5
7325 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7326
7327 xe_check_libs=" -ltiff "
7328 cat > conftest.$ac_ext <<EOF
7329 #line 7330 "configure"
7330 #include "confdefs.h"
7331 /* Override any gcc2 internal prototype to avoid an error.  */
7332 /* We use char because int might match the return type of a gcc2
7333     builtin and then its argument prototype would still apply.  */
7334 char TIFFClientOpen();
7335
7336 int main() {
7337 TIFFClientOpen()
7338 ; return 0; }
7339 EOF
7340 if { (eval echo configure:7341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7341   rm -rf conftest*
7342   eval "ac_cv_lib_$ac_lib_var=yes"
7343 else
7344   echo "configure: failed program was:" >&5
7345   cat conftest.$ac_ext >&5
7346   rm -rf conftest*
7347   eval "ac_cv_lib_$ac_lib_var=no"
7348 fi
7349 rm -f conftest*
7350 xe_check_libs=""
7351
7352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7353   echo "$ac_t""yes" 1>&6
7354   :
7355 else
7356   echo "$ac_t""no" 1>&6
7357 with_tiff=no
7358 fi
7359
7360  }
7361   test -z "$with_tiff" && with_tiff=yes
7362   if test "$with_tiff" = "yes"; then
7363     { test "$extra_verbose" = "yes" && cat << \EOF
7364     Defining HAVE_TIFF
7365 EOF
7366 cat >> confdefs.h <<\EOF
7367 #define HAVE_TIFF 1
7368 EOF
7369 }
7370
7371     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7372   fi
7373 fi
7374
7375
7376 if test "$with_x11" = "yes"; then
7377
7378   echo "checking for X11 graphics libraries" 1>&6
7379 echo "configure:7380: checking for X11 graphics libraries" >&5
7380
7381     
7382 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
7383 echo "configure:7384: checking for XawScrollbarSetThumb in -lXaw" >&5
7384 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7385
7386 xe_check_libs=" -lXaw "
7387 cat > conftest.$ac_ext <<EOF
7388 #line 7389 "configure"
7389 #include "confdefs.h"
7390 /* Override any gcc2 internal prototype to avoid an error.  */
7391 /* We use char because int might match the return type of a gcc2
7392     builtin and then its argument prototype would still apply.  */
7393 char XawScrollbarSetThumb();
7394
7395 int main() {
7396 XawScrollbarSetThumb()
7397 ; return 0; }
7398 EOF
7399 if { (eval echo configure:7400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7400   rm -rf conftest*
7401   eval "ac_cv_lib_$ac_lib_var=yes"
7402 else
7403   echo "configure: failed program was:" >&5
7404   cat conftest.$ac_ext >&5
7405   rm -rf conftest*
7406   eval "ac_cv_lib_$ac_lib_var=no"
7407 fi
7408 rm -f conftest*
7409 xe_check_libs=""
7410
7411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7412   echo "$ac_t""yes" 1>&6
7413   have_xaw=yes
7414 else
7415   echo "$ac_t""no" 1>&6
7416 have_xaw=no
7417 fi
7418
7419
7420                     
7421     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7422 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7423 echo "configure:7424: checking for Xm/Xm.h" >&5
7424
7425 cat > conftest.$ac_ext <<EOF
7426 #line 7427 "configure"
7427 #include "confdefs.h"
7428 #include <Xm/Xm.h>
7429 EOF
7430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7431 { (eval echo configure:7432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7433 if test -z "$ac_err"; then
7434   rm -rf conftest*
7435   eval "ac_cv_header_$ac_safe=yes"
7436 else
7437   echo "$ac_err" >&5
7438   echo "configure: failed program was:" >&5
7439   cat conftest.$ac_ext >&5
7440   rm -rf conftest*
7441   eval "ac_cv_header_$ac_safe=no"
7442 fi
7443 rm -f conftest*
7444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7445   echo "$ac_t""yes" 1>&6
7446   
7447 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7448 echo "configure:7449: checking for XmStringFree in -lXm" >&5
7449 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7450
7451 xe_check_libs=" -lXm "
7452 cat > conftest.$ac_ext <<EOF
7453 #line 7454 "configure"
7454 #include "confdefs.h"
7455 /* Override any gcc2 internal prototype to avoid an error.  */
7456 /* We use char because int might match the return type of a gcc2
7457     builtin and then its argument prototype would still apply.  */
7458 char XmStringFree();
7459
7460 int main() {
7461 XmStringFree()
7462 ; return 0; }
7463 EOF
7464 if { (eval echo configure:7465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7465   rm -rf conftest*
7466   eval "ac_cv_lib_$ac_lib_var=yes"
7467 else
7468   echo "configure: failed program was:" >&5
7469   cat conftest.$ac_ext >&5
7470   rm -rf conftest*
7471   eval "ac_cv_lib_$ac_lib_var=no"
7472 fi
7473 rm -f conftest*
7474 xe_check_libs=""
7475
7476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7477   echo "$ac_t""yes" 1>&6
7478   have_motif=yes
7479 else
7480   echo "$ac_t""no" 1>&6
7481 have_motif=no
7482 fi
7483
7484
7485 else
7486   echo "$ac_t""no" 1>&6
7487 have_motif=no
7488 fi
7489
7490
7491   if test "$have_motif" = "yes"; then
7492         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
7493 echo "configure:7494: checking for Lesstif" >&5
7494     cat > conftest.$ac_ext <<EOF
7495 #line 7496 "configure"
7496 #include "confdefs.h"
7497 #include <Xm/Xm.h>
7498 #ifdef LESSTIF_VERSION
7499 yes
7500 #endif
7501
7502 EOF
7503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7504   egrep "yes" >/dev/null 2>&1; then
7505   rm -rf conftest*
7506   have_lesstif=yes
7507 else
7508   rm -rf conftest*
7509   have_lesstif=no
7510 fi
7511 rm -f conftest*
7512
7513   echo "$ac_t""$have_lesstif" 1>&6
7514   fi
7515
7516 fi 
7517
7518 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
7519   with_menubars="lucid" ;;
7520 esac
7521 case "$with_dialogs" in "" | "yes" | "lucid" )
7522   if   test "$have_motif" = "yes"; then with_dialogs="motif"
7523   elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
7524   else with_dialogs=no
7525   fi ;;
7526 esac
7527 case "$with_scrollbars" in "" | "yes" )
7528   with_scrollbars="lucid" ;;
7529 esac
7530
7531 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars"
7532
7533 case "$all_widgets" in *athena* )
7534   { test "$extra_verbose" = "yes" && cat << \EOF
7535     Defining LWLIB_USES_ATHENA
7536 EOF
7537 cat >> confdefs.h <<\EOF
7538 #define LWLIB_USES_ATHENA 1
7539 EOF
7540 }
7541
7542   { test "$extra_verbose" = "yes" && cat << \EOF
7543     Defining NEED_ATHENA
7544 EOF
7545 cat >> confdefs.h <<\EOF
7546 #define NEED_ATHENA 1
7547 EOF
7548 }
7549
7550   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7551   libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
7552 esac
7553
7554 case "$all_widgets" in *motif* )
7555   { test "$extra_verbose" = "yes" && cat << \EOF
7556     Defining LWLIB_USES_MOTIF
7557 EOF
7558 cat >> confdefs.h <<\EOF
7559 #define LWLIB_USES_MOTIF 1
7560 EOF
7561 }
7562
7563   { test "$extra_verbose" = "yes" && cat << \EOF
7564     Defining NEED_MOTIF
7565 EOF
7566 cat >> confdefs.h <<\EOF
7567 #define NEED_MOTIF 1
7568 EOF
7569 }
7570
7571   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
7572   need_motif=yes ;;
7573 esac
7574
7575 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7576 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7577 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
7578 case "$all_widgets" in *lucid* )
7579   { test "$extra_verbose" = "yes" && cat << \EOF
7580     Defining NEED_LUCID
7581 EOF
7582 cat >> confdefs.h <<\EOF
7583 #define NEED_LUCID 1
7584 EOF
7585 }
7586
7587   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
7588 esac
7589
7590
7591
7592 case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7593     Defining LWLIB_SCROLLBARS_ATHENA
7594 EOF
7595 cat >> confdefs.h <<\EOF
7596 #define LWLIB_SCROLLBARS_ATHENA 1
7597 EOF
7598 }
7599 ;; esac
7600 case "$with_dialogs"    in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7601     Defining LWLIB_DIALOGS_ATHENA
7602 EOF
7603 cat >> confdefs.h <<\EOF
7604 #define LWLIB_DIALOGS_ATHENA 1
7605 EOF
7606 }
7607    ;; esac
7608 test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7609     Defining LWLIB_SCROLLBARS_ATHENA3D
7610 EOF
7611 cat >> confdefs.h <<\EOF
7612 #define LWLIB_SCROLLBARS_ATHENA3D 1
7613 EOF
7614 }
7615
7616 test "$with_dialogs"    = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7617     Defining LWLIB_DIALOGS_ATHENA3D
7618 EOF
7619 cat >> confdefs.h <<\EOF
7620 #define LWLIB_DIALOGS_ATHENA3D 1
7621 EOF
7622 }
7623
7624
7625 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7626     Defining HAVE_MENUBARS
7627 EOF
7628 cat >> confdefs.h <<\EOF
7629 #define HAVE_MENUBARS 1
7630 EOF
7631 }
7632
7633 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7634     Defining HAVE_SCROLLBARS
7635 EOF
7636 cat >> confdefs.h <<\EOF
7637 #define HAVE_SCROLLBARS 1
7638 EOF
7639 }
7640
7641 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7642     Defining HAVE_DIALOGS
7643 EOF
7644 cat >> confdefs.h <<\EOF
7645 #define HAVE_DIALOGS 1
7646 EOF
7647 }
7648
7649 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7650     Defining HAVE_TOOLBARS
7651 EOF
7652 cat >> confdefs.h <<\EOF
7653 #define HAVE_TOOLBARS 1
7654 EOF
7655 }
7656
7657
7658 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7659     Defining LWLIB_MENUBARS_LUCID
7660 EOF
7661 cat >> confdefs.h <<\EOF
7662 #define LWLIB_MENUBARS_LUCID 1
7663 EOF
7664 }
7665
7666 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7667     Defining LWLIB_SCROLLBARS_LUCID
7668 EOF
7669 cat >> confdefs.h <<\EOF
7670 #define LWLIB_SCROLLBARS_LUCID 1
7671 EOF
7672 }
7673
7674
7675 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7676     Defining LWLIB_MENUBARS_MOTIF
7677 EOF
7678 cat >> confdefs.h <<\EOF
7679 #define LWLIB_MENUBARS_MOTIF 1
7680 EOF
7681 }
7682
7683 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7684     Defining LWLIB_SCROLLBARS_MOTIF
7685 EOF
7686 cat >> confdefs.h <<\EOF
7687 #define LWLIB_SCROLLBARS_MOTIF 1
7688 EOF
7689 }
7690
7691 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7692     Defining LWLIB_DIALOGS_MOTIF
7693 EOF
7694 cat >> confdefs.h <<\EOF
7695 #define LWLIB_DIALOGS_MOTIF 1
7696 EOF
7697 }
7698
7699
7700 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
7701    echo "    xemacs will be linked with \"menubar.o\""
7702  fi
7703 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
7704    echo "    xemacs will be linked with \"scrollbar.o\""
7705  fi
7706 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
7707    echo "    xemacs will be linked with \"dialog.o\""
7708  fi
7709 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
7710    echo "    xemacs will be linked with \"toolbar.o\""
7711  fi
7712
7713 if test "$with_x11" = "yes"; then
7714   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
7715    echo "    xemacs will be linked with \"menubar-x.o\""
7716  fi
7717   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7718    echo "    xemacs will be linked with \"scrollbar-x.o\""
7719  fi
7720   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
7721    echo "    xemacs will be linked with \"dialog-x.o\""
7722  fi
7723   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7724    echo "    xemacs will be linked with \"toolbar-x.o\""
7725  fi
7726   test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
7727    echo "    xemacs will be linked with \"gui-x.o\""
7728  fi
7729 else
7730   if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then
7731     echo "Attempt to Build NAS sound without X"
7732     echo "Please remove NAS configuration or build with X"
7733     exit 1
7734   fi
7735 fi
7736
7737 test "$use_minimal_tagbits" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
7738     Defining USE_MINIMAL_TAGBITS
7739 EOF
7740 cat >> confdefs.h <<\EOF
7741 #define USE_MINIMAL_TAGBITS 1
7742 EOF
7743 }
7744
7745 test "$use_indexed_lrecord_implementation" = "yes" && \
7746   { test "$extra_verbose" = "yes" && cat << \EOF
7747     Defining USE_INDEXED_LRECORD_IMPLEMENTATION
7748 EOF
7749 cat >> confdefs.h <<\EOF
7750 #define USE_INDEXED_LRECORD_IMPLEMENTATION 1
7751 EOF
7752 }
7753
7754
7755
7756 test -z "$with_mule" && with_mule=no
7757 test -z "$with_file_coding" && with_file_coding=no
7758
7759
7760 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
7761   { test "$extra_verbose" = "yes" && cat << \EOF
7762     Defining FILE_CODING
7763 EOF
7764 cat >> confdefs.h <<\EOF
7765 #define FILE_CODING 1
7766 EOF
7767 }
7768
7769   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7770    echo "    xemacs will be linked with \"file-coding.o\""
7771  fi
7772 fi
7773
7774 if test "$with_mule" = "yes" ; then
7775   echo "checking for Mule-related features" 1>&6
7776 echo "configure:7777: checking for Mule-related features" >&5
7777   { test "$extra_verbose" = "yes" && cat << \EOF
7778     Defining MULE
7779 EOF
7780 cat >> confdefs.h <<\EOF
7781 #define MULE 1
7782 EOF
7783 }
7784
7785   { test "$extra_verbose" = "yes" && cat << \EOF
7786     Defining FILE_CODING
7787 EOF
7788 cat >> confdefs.h <<\EOF
7789 #define FILE_CODING 1
7790 EOF
7791 }
7792
7793   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7794    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o\""
7795  fi
7796
7797     for ac_hdr in libintl.h
7798 do
7799 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7800 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7801 echo "configure:7802: checking for $ac_hdr" >&5
7802
7803 cat > conftest.$ac_ext <<EOF
7804 #line 7805 "configure"
7805 #include "confdefs.h"
7806 #include <$ac_hdr>
7807 EOF
7808 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7809 { (eval echo configure:7810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7810 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7811 if test -z "$ac_err"; then
7812   rm -rf conftest*
7813   eval "ac_cv_header_$ac_safe=yes"
7814 else
7815   echo "$ac_err" >&5
7816   echo "configure: failed program was:" >&5
7817   cat conftest.$ac_ext >&5
7818   rm -rf conftest*
7819   eval "ac_cv_header_$ac_safe=no"
7820 fi
7821 rm -f conftest*
7822 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7823   echo "$ac_t""yes" 1>&6
7824     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7825   { test "$extra_verbose" = "yes" && cat << EOF
7826     Defining $ac_tr_hdr
7827 EOF
7828 cat >> confdefs.h <<EOF
7829 #define $ac_tr_hdr 1
7830 EOF
7831 }
7832  
7833 else
7834   echo "$ac_t""no" 1>&6
7835 fi
7836 done
7837
7838   
7839 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
7840 echo "configure:7841: checking for strerror in -lintl" >&5
7841 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
7842
7843 xe_check_libs=" -lintl "
7844 cat > conftest.$ac_ext <<EOF
7845 #line 7846 "configure"
7846 #include "confdefs.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 strerror();
7851
7852 int main() {
7853 strerror()
7854 ; return 0; }
7855 EOF
7856 if { (eval echo configure:7857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7857   rm -rf conftest*
7858   eval "ac_cv_lib_$ac_lib_var=yes"
7859 else
7860   echo "configure: failed program was:" >&5
7861   cat conftest.$ac_ext >&5
7862   rm -rf conftest*
7863   eval "ac_cv_lib_$ac_lib_var=no"
7864 fi
7865 rm -f conftest*
7866 xe_check_libs=""
7867
7868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7869   echo "$ac_t""yes" 1>&6
7870     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7871     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7872   { test "$extra_verbose" = "yes" && cat << EOF
7873     Defining $ac_tr_lib
7874 EOF
7875 cat >> confdefs.h <<EOF
7876 #define $ac_tr_lib 1
7877 EOF
7878 }
7879
7880   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
7881
7882 else
7883   echo "$ac_t""no" 1>&6
7884 fi
7885
7886
7887
7888   echo "checking for Mule input methods" 1>&6
7889 echo "configure:7890: checking for Mule input methods" >&5
7890         case "$with_xim" in "" | "yes" )
7891     echo "checking for XIM" 1>&6
7892 echo "configure:7893: checking for XIM" >&5
7893     
7894 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
7895 echo "configure:7896: checking for XOpenIM in -lX11" >&5
7896 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
7897
7898 xe_check_libs=" -lX11 "
7899 cat > conftest.$ac_ext <<EOF
7900 #line 7901 "configure"
7901 #include "confdefs.h"
7902 /* Override any gcc2 internal prototype to avoid an error.  */
7903 /* We use char because int might match the return type of a gcc2
7904     builtin and then its argument prototype would still apply.  */
7905 char XOpenIM();
7906
7907 int main() {
7908 XOpenIM()
7909 ; return 0; }
7910 EOF
7911 if { (eval echo configure:7912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7912   rm -rf conftest*
7913   eval "ac_cv_lib_$ac_lib_var=yes"
7914 else
7915   echo "configure: failed program was:" >&5
7916   cat conftest.$ac_ext >&5
7917   rm -rf conftest*
7918   eval "ac_cv_lib_$ac_lib_var=no"
7919 fi
7920 rm -f conftest*
7921 xe_check_libs=""
7922
7923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7924   echo "$ac_t""yes" 1>&6
7925   with_xim=xlib
7926 else
7927   echo "$ac_t""no" 1>&6
7928 with_xim=no
7929 fi
7930
7931
7932         if test "$have_motif $have_lesstif" = "yes no"; then
7933       
7934 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
7935 echo "configure:7936: checking for XmImMbLookupString in -lXm" >&5
7936 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
7937
7938 xe_check_libs=" -lXm "
7939 cat > conftest.$ac_ext <<EOF
7940 #line 7941 "configure"
7941 #include "confdefs.h"
7942 /* Override any gcc2 internal prototype to avoid an error.  */
7943 /* We use char because int might match the return type of a gcc2
7944     builtin and then its argument prototype would still apply.  */
7945 char XmImMbLookupString();
7946
7947 int main() {
7948 XmImMbLookupString()
7949 ; return 0; }
7950 EOF
7951 if { (eval echo configure:7952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7952   rm -rf conftest*
7953   eval "ac_cv_lib_$ac_lib_var=yes"
7954 else
7955   echo "configure: failed program was:" >&5
7956   cat conftest.$ac_ext >&5
7957   rm -rf conftest*
7958   eval "ac_cv_lib_$ac_lib_var=no"
7959 fi
7960 rm -f conftest*
7961 xe_check_libs=""
7962
7963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7964   echo "$ac_t""yes" 1>&6
7965   with_xim=motif
7966 else
7967   echo "$ac_t""no" 1>&6
7968 fi
7969
7970
7971     fi ;;
7972   esac
7973   if test "$with_xim" != "no"; then
7974     { test "$extra_verbose" = "yes" && cat << \EOF
7975     Defining HAVE_XIM
7976 EOF
7977 cat >> confdefs.h <<\EOF
7978 #define HAVE_XIM 1
7979 EOF
7980 }
7981
7982     if test "$with_xim" = "xlib"; then
7983       { test "$extra_verbose" = "yes" && cat << \EOF
7984     Defining XIM_XLIB
7985 EOF
7986 cat >> confdefs.h <<\EOF
7987 #define XIM_XLIB 1
7988 EOF
7989 }
7990
7991       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
7992    echo "    xemacs will be linked with \"input-method-xlib.o\""
7993  fi
7994     fi
7995     if test "$with_xim" = "motif"; then
7996       { test "$extra_verbose" = "yes" && cat << \EOF
7997     Defining XIM_MOTIF
7998 EOF
7999 cat >> confdefs.h <<\EOF
8000 #define XIM_MOTIF 1
8001 EOF
8002 }
8003
8004       need_motif=yes
8005       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8006    echo "    xemacs will be linked with \"input-method-motif.o\""
8007  fi
8008     fi
8009     if test "$with_xim" = "motif"; then
8010       with_xfs=no
8011     fi
8012   fi
8013
8014     if test "$with_xfs" = "yes" ; then
8015     echo "checking for XFontSet" 1>&6
8016 echo "configure:8017: checking for XFontSet" >&5
8017     
8018 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8019 echo "configure:8020: checking for XmbDrawString in -lX11" >&5
8020 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8021
8022 xe_check_libs=" -lX11 "
8023 cat > conftest.$ac_ext <<EOF
8024 #line 8025 "configure"
8025 #include "confdefs.h"
8026 /* Override any gcc2 internal prototype to avoid an error.  */
8027 /* We use char because int might match the return type of a gcc2
8028     builtin and then its argument prototype would still apply.  */
8029 char XmbDrawString();
8030
8031 int main() {
8032 XmbDrawString()
8033 ; return 0; }
8034 EOF
8035 if { (eval echo configure:8036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8036   rm -rf conftest*
8037   eval "ac_cv_lib_$ac_lib_var=yes"
8038 else
8039   echo "configure: failed program was:" >&5
8040   cat conftest.$ac_ext >&5
8041   rm -rf conftest*
8042   eval "ac_cv_lib_$ac_lib_var=no"
8043 fi
8044 rm -f conftest*
8045 xe_check_libs=""
8046
8047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8048   echo "$ac_t""yes" 1>&6
8049   :
8050 else
8051   echo "$ac_t""no" 1>&6
8052 with_xfs=no
8053 fi
8054
8055
8056     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8057       { test "$extra_verbose" = "yes" && cat << \EOF
8058     Defining USE_XFONTSET
8059 EOF
8060 cat >> confdefs.h <<\EOF
8061 #define USE_XFONTSET 1
8062 EOF
8063 }
8064
8065       if test "$with_xim" = "no" ; then
8066         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8067    echo "    xemacs will be linked with \"input-method-xfs.o\""
8068  fi
8069       fi
8070     fi
8071   fi 
8072     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8073   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8074 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8075 echo "configure:8076: checking for wnn/jllib.h" >&5
8076
8077 cat > conftest.$ac_ext <<EOF
8078 #line 8079 "configure"
8079 #include "confdefs.h"
8080 #include <wnn/jllib.h>
8081 EOF
8082 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8083 { (eval echo configure:8084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8084 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8085 if test -z "$ac_err"; then
8086   rm -rf conftest*
8087   eval "ac_cv_header_$ac_safe=yes"
8088 else
8089   echo "$ac_err" >&5
8090   echo "configure: failed program was:" >&5
8091   cat conftest.$ac_ext >&5
8092   rm -rf conftest*
8093   eval "ac_cv_header_$ac_safe=no"
8094 fi
8095 rm -f conftest*
8096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8097   echo "$ac_t""yes" 1>&6
8098   :
8099 else
8100   echo "$ac_t""no" 1>&6
8101 with_wnn=no
8102 fi
8103  }
8104     if test "$with_wnn" != "no"; then
8105     for ac_func in crypt
8106 do
8107 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8108 echo "configure:8109: checking for $ac_func" >&5
8109
8110 cat > conftest.$ac_ext <<EOF
8111 #line 8112 "configure"
8112 #include "confdefs.h"
8113 /* System header to define __stub macros and hopefully few prototypes,
8114     which can conflict with char $ac_func(); below.  */
8115 #include <assert.h>
8116 /* Override any gcc2 internal prototype to avoid an error.  */
8117 /* We use char because int might match the return type of a gcc2
8118     builtin and then its argument prototype would still apply.  */
8119 char $ac_func();
8120
8121 int main() {
8122
8123 /* The GNU C library defines this for functions which it implements
8124     to always fail with ENOSYS.  Some functions are actually named
8125     something starting with __ and the normal name is an alias.  */
8126 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8127 choke me
8128 #else
8129 $ac_func();
8130 #endif
8131
8132 ; return 0; }
8133 EOF
8134 if { (eval echo configure:8135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8135   rm -rf conftest*
8136   eval "ac_cv_func_$ac_func=yes"
8137 else
8138   echo "configure: failed program was:" >&5
8139   cat conftest.$ac_ext >&5
8140   rm -rf conftest*
8141   eval "ac_cv_func_$ac_func=no"
8142 fi
8143 rm -f conftest*
8144
8145 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8146   echo "$ac_t""yes" 1>&6
8147     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8148   { test "$extra_verbose" = "yes" && cat << EOF
8149     Defining $ac_tr_func
8150 EOF
8151 cat >> confdefs.h <<EOF
8152 #define $ac_tr_func 1
8153 EOF
8154 }
8155  
8156 else
8157   echo "$ac_t""no" 1>&6
8158 fi
8159 done
8160
8161     test "$ac_cv_func_crypt" != "yes" && { 
8162 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8163 echo "configure:8164: checking for crypt in -lcrypt" >&5
8164 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8165
8166 xe_check_libs=" -lcrypt "
8167 cat > conftest.$ac_ext <<EOF
8168 #line 8169 "configure"
8169 #include "confdefs.h"
8170 /* Override any gcc2 internal prototype to avoid an error.  */
8171 /* We use char because int might match the return type of a gcc2
8172     builtin and then its argument prototype would still apply.  */
8173 char crypt();
8174
8175 int main() {
8176 crypt()
8177 ; return 0; }
8178 EOF
8179 if { (eval echo configure:8180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8180   rm -rf conftest*
8181   eval "ac_cv_lib_$ac_lib_var=yes"
8182 else
8183   echo "configure: failed program was:" >&5
8184   cat conftest.$ac_ext >&5
8185   rm -rf conftest*
8186   eval "ac_cv_lib_$ac_lib_var=no"
8187 fi
8188 rm -f conftest*
8189 xe_check_libs=""
8190
8191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8192   echo "$ac_t""yes" 1>&6
8193     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8194     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8195   { test "$extra_verbose" = "yes" && cat << EOF
8196     Defining $ac_tr_lib
8197 EOF
8198 cat >> confdefs.h <<EOF
8199 #define $ac_tr_lib 1
8200 EOF
8201 }
8202
8203   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
8204
8205 else
8206   echo "$ac_t""no" 1>&6
8207 fi
8208
8209  }
8210   fi
8211     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
8212     
8213 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
8214 echo "configure:8215: checking for jl_dic_list_e in -lwnn" >&5
8215 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8216
8217 xe_check_libs=" -lwnn "
8218 cat > conftest.$ac_ext <<EOF
8219 #line 8220 "configure"
8220 #include "confdefs.h"
8221 /* Override any gcc2 internal prototype to avoid an error.  */
8222 /* We use char because int might match the return type of a gcc2
8223     builtin and then its argument prototype would still apply.  */
8224 char jl_dic_list_e();
8225
8226 int main() {
8227 jl_dic_list_e()
8228 ; return 0; }
8229 EOF
8230 if { (eval echo configure:8231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8231   rm -rf conftest*
8232   eval "ac_cv_lib_$ac_lib_var=yes"
8233 else
8234   echo "configure: failed program was:" >&5
8235   cat conftest.$ac_ext >&5
8236   rm -rf conftest*
8237   eval "ac_cv_lib_$ac_lib_var=no"
8238 fi
8239 rm -f conftest*
8240 xe_check_libs=""
8241
8242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8243   echo "$ac_t""yes" 1>&6
8244   libwnn=wnn
8245 else
8246   echo "$ac_t""no" 1>&6
8247 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
8248 echo "configure:8249: checking for jl_dic_list_e in -lwnn4" >&5
8249 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8250
8251 xe_check_libs=" -lwnn4 "
8252 cat > conftest.$ac_ext <<EOF
8253 #line 8254 "configure"
8254 #include "confdefs.h"
8255 /* Override any gcc2 internal prototype to avoid an error.  */
8256 /* We use char because int might match the return type of a gcc2
8257     builtin and then its argument prototype would still apply.  */
8258 char jl_dic_list_e();
8259
8260 int main() {
8261 jl_dic_list_e()
8262 ; return 0; }
8263 EOF
8264 if { (eval echo configure:8265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8265   rm -rf conftest*
8266   eval "ac_cv_lib_$ac_lib_var=yes"
8267 else
8268   echo "configure: failed program was:" >&5
8269   cat conftest.$ac_ext >&5
8270   rm -rf conftest*
8271   eval "ac_cv_lib_$ac_lib_var=no"
8272 fi
8273 rm -f conftest*
8274 xe_check_libs=""
8275
8276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8277   echo "$ac_t""yes" 1>&6
8278   libwnn=wnn4
8279 else
8280   echo "$ac_t""no" 1>&6
8281 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
8282 echo "configure:8283: checking for jl_dic_list_e in -lwnn6" >&5
8283 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8284
8285 xe_check_libs=" -lwnn6 "
8286 cat > conftest.$ac_ext <<EOF
8287 #line 8288 "configure"
8288 #include "confdefs.h"
8289 /* Override any gcc2 internal prototype to avoid an error.  */
8290 /* We use char because int might match the return type of a gcc2
8291     builtin and then its argument prototype would still apply.  */
8292 char jl_dic_list_e();
8293
8294 int main() {
8295 jl_dic_list_e()
8296 ; return 0; }
8297 EOF
8298 if { (eval echo configure:8299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8299   rm -rf conftest*
8300   eval "ac_cv_lib_$ac_lib_var=yes"
8301 else
8302   echo "configure: failed program was:" >&5
8303   cat conftest.$ac_ext >&5
8304   rm -rf conftest*
8305   eval "ac_cv_lib_$ac_lib_var=no"
8306 fi
8307 rm -f conftest*
8308 xe_check_libs=""
8309
8310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8311   echo "$ac_t""yes" 1>&6
8312   libwnn=wnn6
8313 else
8314   echo "$ac_t""no" 1>&6
8315 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
8316 echo "configure:8317: checking for dic_list_e in -lwnn6_fromsrc" >&5
8317 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
8318
8319 xe_check_libs=" -lwnn6_fromsrc "
8320 cat > conftest.$ac_ext <<EOF
8321 #line 8322 "configure"
8322 #include "confdefs.h"
8323 /* Override any gcc2 internal prototype to avoid an error.  */
8324 /* We use char because int might match the return type of a gcc2
8325     builtin and then its argument prototype would still apply.  */
8326 char dic_list_e();
8327
8328 int main() {
8329 dic_list_e()
8330 ; return 0; }
8331 EOF
8332 if { (eval echo configure:8333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8333   rm -rf conftest*
8334   eval "ac_cv_lib_$ac_lib_var=yes"
8335 else
8336   echo "configure: failed program was:" >&5
8337   cat conftest.$ac_ext >&5
8338   rm -rf conftest*
8339   eval "ac_cv_lib_$ac_lib_var=no"
8340 fi
8341 rm -f conftest*
8342 xe_check_libs=""
8343
8344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8345   echo "$ac_t""yes" 1>&6
8346   libwnn=wnn6_fromsrc
8347 else
8348   echo "$ac_t""no" 1>&6
8349 with_wnn=no
8350 fi
8351
8352
8353 fi
8354
8355
8356 fi
8357
8358
8359 fi
8360
8361
8362   fi
8363   test -z "$with_wnn" && with_wnn=yes
8364   if test "$with_wnn" = "yes"; then
8365     { test "$extra_verbose" = "yes" && cat << \EOF
8366     Defining HAVE_WNN
8367 EOF
8368 cat >> confdefs.h <<\EOF
8369 #define HAVE_WNN 1
8370 EOF
8371 }
8372
8373     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
8374     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
8375    echo "    xemacs will be linked with \"mule-wnnfns.o\""
8376  fi
8377     if test "$with_wnn6" != "no"; then
8378       
8379 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
8380 echo "configure:8381: checking for jl_fi_dic_list in -l$libwnn" >&5
8381 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
8382
8383 xe_check_libs=" -l$libwnn "
8384 cat > conftest.$ac_ext <<EOF
8385 #line 8386 "configure"
8386 #include "confdefs.h"
8387 /* Override any gcc2 internal prototype to avoid an error.  */
8388 /* We use char because int might match the return type of a gcc2
8389     builtin and then its argument prototype would still apply.  */
8390 char jl_fi_dic_list();
8391
8392 int main() {
8393 jl_fi_dic_list()
8394 ; return 0; }
8395 EOF
8396 if { (eval echo configure:8397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8397   rm -rf conftest*
8398   eval "ac_cv_lib_$ac_lib_var=yes"
8399 else
8400   echo "configure: failed program was:" >&5
8401   cat conftest.$ac_ext >&5
8402   rm -rf conftest*
8403   eval "ac_cv_lib_$ac_lib_var=no"
8404 fi
8405 rm -f conftest*
8406 xe_check_libs=""
8407
8408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8409   echo "$ac_t""yes" 1>&6
8410   with_wnn6=yes
8411 else
8412   echo "$ac_t""no" 1>&6
8413 fi
8414
8415
8416       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
8417     Defining WNN6
8418 EOF
8419 cat >> confdefs.h <<\EOF
8420 #define WNN6 1
8421 EOF
8422 }
8423
8424     fi
8425   fi
8426
8427     canna_includes_found=no
8428   if test "$with_canna" != "no"; then
8429     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8430 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8431 echo "configure:8432: checking for canna/jrkanji.h" >&5
8432
8433 cat > conftest.$ac_ext <<EOF
8434 #line 8435 "configure"
8435 #include "confdefs.h"
8436 #include <canna/jrkanji.h>
8437 EOF
8438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8439 { (eval echo configure:8440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8441 if test -z "$ac_err"; then
8442   rm -rf conftest*
8443   eval "ac_cv_header_$ac_safe=yes"
8444 else
8445   echo "$ac_err" >&5
8446   echo "configure: failed program was:" >&5
8447   cat conftest.$ac_ext >&5
8448   rm -rf conftest*
8449   eval "ac_cv_header_$ac_safe=no"
8450 fi
8451 rm -f conftest*
8452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8453   echo "$ac_t""yes" 1>&6
8454   canna_includes_found=yes
8455 else
8456   echo "$ac_t""no" 1>&6
8457 fi
8458
8459   fi
8460   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
8461       -d "/usr/local/canna/include"; then
8462     save_c_switch_site="$c_switch_site"
8463     c_switch_site="$c_switch_site -I/usr/local/canna/include"
8464     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8465 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8466 echo "configure:8467: checking for canna/jrkanji.h" >&5
8467
8468 cat > conftest.$ac_ext <<EOF
8469 #line 8470 "configure"
8470 #include "confdefs.h"
8471 #include <canna/jrkanji.h>
8472 EOF
8473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8474 { (eval echo configure:8475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8476 if test -z "$ac_err"; then
8477   rm -rf conftest*
8478   eval "ac_cv_header_$ac_safe=yes"
8479 else
8480   echo "$ac_err" >&5
8481   echo "configure: failed program was:" >&5
8482   cat conftest.$ac_ext >&5
8483   rm -rf conftest*
8484   eval "ac_cv_header_$ac_safe=no"
8485 fi
8486 rm -f conftest*
8487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8488   echo "$ac_t""yes" 1>&6
8489   canna_includes_found=yes
8490 else
8491   echo "$ac_t""no" 1>&6
8492 fi
8493
8494     if test "$canna_includes_found" != "yes"; then
8495       c_switch_site="$save_c_switch_site"
8496       with_canna="no"
8497     fi
8498   fi
8499
8500   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
8501 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
8502 echo "configure:8503: checking for canna/RK.h" >&5
8503
8504 cat > conftest.$ac_ext <<EOF
8505 #line 8506 "configure"
8506 #include "confdefs.h"
8507 #include <canna/RK.h>
8508 EOF
8509 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8510 { (eval echo configure:8511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8511 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8512 if test -z "$ac_err"; then
8513   rm -rf conftest*
8514   eval "ac_cv_header_$ac_safe=yes"
8515 else
8516   echo "$ac_err" >&5
8517   echo "configure: failed program was:" >&5
8518   cat conftest.$ac_ext >&5
8519   rm -rf conftest*
8520   eval "ac_cv_header_$ac_safe=no"
8521 fi
8522 rm -f conftest*
8523 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8524   echo "$ac_t""yes" 1>&6
8525   :
8526 else
8527   echo "$ac_t""no" 1>&6
8528 with_canna=no
8529 fi
8530  }
8531   test -z "$with_canna" && { 
8532 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
8533 echo "configure:8534: checking for RkBgnBun in -lRKC" >&5
8534 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
8535
8536 xe_check_libs=" -lRKC "
8537 cat > conftest.$ac_ext <<EOF
8538 #line 8539 "configure"
8539 #include "confdefs.h"
8540 /* Override any gcc2 internal prototype to avoid an error.  */
8541 /* We use char because int might match the return type of a gcc2
8542     builtin and then its argument prototype would still apply.  */
8543 char RkBgnBun();
8544
8545 int main() {
8546 RkBgnBun()
8547 ; return 0; }
8548 EOF
8549 if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8550   rm -rf conftest*
8551   eval "ac_cv_lib_$ac_lib_var=yes"
8552 else
8553   echo "configure: failed program was:" >&5
8554   cat conftest.$ac_ext >&5
8555   rm -rf conftest*
8556   eval "ac_cv_lib_$ac_lib_var=no"
8557 fi
8558 rm -f conftest*
8559 xe_check_libs=""
8560
8561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8562   echo "$ac_t""yes" 1>&6
8563   :
8564 else
8565   echo "$ac_t""no" 1>&6
8566 with_canna=no
8567 fi
8568
8569  }
8570   test -z "$with_canna" && { 
8571 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
8572 echo "configure:8573: checking for jrKanjiControl in -lcanna" >&5
8573 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
8574
8575 xe_check_libs=" -lcanna "
8576 cat > conftest.$ac_ext <<EOF
8577 #line 8578 "configure"
8578 #include "confdefs.h"
8579 /* Override any gcc2 internal prototype to avoid an error.  */
8580 /* We use char because int might match the return type of a gcc2
8581     builtin and then its argument prototype would still apply.  */
8582 char jrKanjiControl();
8583
8584 int main() {
8585 jrKanjiControl()
8586 ; return 0; }
8587 EOF
8588 if { (eval echo configure:8589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8589   rm -rf conftest*
8590   eval "ac_cv_lib_$ac_lib_var=yes"
8591 else
8592   echo "configure: failed program was:" >&5
8593   cat conftest.$ac_ext >&5
8594   rm -rf conftest*
8595   eval "ac_cv_lib_$ac_lib_var=no"
8596 fi
8597 rm -f conftest*
8598 xe_check_libs=""
8599
8600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8601   echo "$ac_t""yes" 1>&6
8602   :
8603 else
8604   echo "$ac_t""no" 1>&6
8605 with_canna=no
8606 fi
8607
8608  }
8609   test -z "$with_canna" && with_canna=yes
8610   if test "$with_canna" = "yes"; then
8611     { test "$extra_verbose" = "yes" && cat << \EOF
8612     Defining HAVE_CANNA
8613 EOF
8614 cat >> confdefs.h <<\EOF
8615 #define HAVE_CANNA 1
8616 EOF
8617 }
8618
8619     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
8620     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
8621    echo "    xemacs will be linked with \"mule-canna.o\""
8622  fi
8623   fi
8624
8625 else   for feature in xim canna wnn; do
8626     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
8627       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
8628     fi
8629     eval "with_${feature}=no"
8630   done
8631 fi 
8632
8633 if test "$need_motif" = "yes" ; then
8634   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
8635     
8636 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
8637 echo "configure:8638: checking for layout_object_getvalue in -li18n" >&5
8638 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
8639
8640 xe_check_libs=" -li18n "
8641 cat > conftest.$ac_ext <<EOF
8642 #line 8643 "configure"
8643 #include "confdefs.h"
8644 /* Override any gcc2 internal prototype to avoid an error.  */
8645 /* We use char because int might match the return type of a gcc2
8646     builtin and then its argument prototype would still apply.  */
8647 char layout_object_getvalue();
8648
8649 int main() {
8650 layout_object_getvalue()
8651 ; return 0; }
8652 EOF
8653 if { (eval echo configure:8654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8654   rm -rf conftest*
8655   eval "ac_cv_lib_$ac_lib_var=yes"
8656 else
8657   echo "configure: failed program was:" >&5
8658   cat conftest.$ac_ext >&5
8659   rm -rf conftest*
8660   eval "ac_cv_lib_$ac_lib_var=no"
8661 fi
8662 rm -f conftest*
8663 xe_check_libs=""
8664
8665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8666   echo "$ac_t""yes" 1>&6
8667   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
8668 else
8669   echo "$ac_t""no" 1>&6
8670 fi
8671
8672
8673   
8674 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
8675     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8676   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8677   
8678         runpath="" runpath_dirs=""
8679   if test -n "$LD_RUN_PATH"; then
8680     runpath="$LD_RUN_PATH"
8681   elif test "$GCC" = "yes"; then
8682         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
8683     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
8684     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
8685     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
8686       case "$arg" in P,* | -L* | -R* )
8687         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
8688           {
8689 xe_runpath_dir="$dir"
8690   test "$xe_runpath_dir" != "/lib"     -a \
8691         "$xe_runpath_dir" != "/usr/lib" -a \
8692         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8693   eval "$xe_add_unique_runpath_dir"
8694 }
8695         done ;;
8696       esac
8697     done
8698     ld_switch_run="$ld_switch_run_save"
8699     rm -f conftest*
8700   else
8701         for arg in $ld_switch_site $ld_switch_x_site; do
8702       case "$arg" in -L*) {
8703 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
8704   test "$xe_runpath_dir" != "/lib"     -a \
8705         "$xe_runpath_dir" != "/usr/lib" -a \
8706         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8707   eval "$xe_add_unique_runpath_dir"
8708 };; esac
8709     done
8710         if test "$opsys $need_motif" = "sol2 yes"; then
8711       xe_runpath_dir="/opt/SUNWdt/lib";
8712       eval "$xe_add_unique_runpath_dir";
8713     fi
8714   fi 
8715   if test -n "$runpath"; then
8716     ld_switch_run="${dash_r}${runpath}"
8717     
8718 if test "$GCC" = "yes"; then
8719   set x $ld_switch_run; shift; ld_switch_run=""
8720   while test -n "$1"; do
8721     case $1 in
8722       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
8723       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
8724       -Xlinker* ) ;;
8725       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
8726     esac
8727     shift
8728   done
8729 fi
8730     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
8731   fi
8732 fi
8733
8734 fi
8735
8736 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
8737 do
8738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8739 echo "configure:8740: checking for $ac_func" >&5
8740
8741 cat > conftest.$ac_ext <<EOF
8742 #line 8743 "configure"
8743 #include "confdefs.h"
8744 /* System header to define __stub macros and hopefully few prototypes,
8745     which can conflict with char $ac_func(); below.  */
8746 #include <assert.h>
8747 /* Override any gcc2 internal prototype to avoid an error.  */
8748 /* We use char because int might match the return type of a gcc2
8749     builtin and then its argument prototype would still apply.  */
8750 char $ac_func();
8751
8752 int main() {
8753
8754 /* The GNU C library defines this for functions which it implements
8755     to always fail with ENOSYS.  Some functions are actually named
8756     something starting with __ and the normal name is an alias.  */
8757 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8758 choke me
8759 #else
8760 $ac_func();
8761 #endif
8762
8763 ; return 0; }
8764 EOF
8765 if { (eval echo configure:8766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8766   rm -rf conftest*
8767   eval "ac_cv_func_$ac_func=yes"
8768 else
8769   echo "configure: failed program was:" >&5
8770   cat conftest.$ac_ext >&5
8771   rm -rf conftest*
8772   eval "ac_cv_func_$ac_func=no"
8773 fi
8774 rm -f conftest*
8775
8776 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8777   echo "$ac_t""yes" 1>&6
8778     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8779   { test "$extra_verbose" = "yes" && cat << EOF
8780     Defining $ac_tr_func
8781 EOF
8782 cat >> confdefs.h <<EOF
8783 #define $ac_tr_func 1
8784 EOF
8785 }
8786  
8787 else
8788   echo "$ac_t""no" 1>&6
8789 fi
8790 done
8791
8792
8793
8794 case "$opsys" in
8795   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8796    echo "    xemacs will be linked with \"realpath.o\""
8797  fi ;;
8798   * )
8799     case "$canonical" in
8800       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8801    echo "    xemacs will be linked with \"realpath.o\""
8802  fi ;;
8803       * ) for ac_func in realpath
8804 do
8805 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8806 echo "configure:8807: checking for $ac_func" >&5
8807
8808 cat > conftest.$ac_ext <<EOF
8809 #line 8810 "configure"
8810 #include "confdefs.h"
8811 /* System header to define __stub macros and hopefully few prototypes,
8812     which can conflict with char $ac_func(); below.  */
8813 #include <assert.h>
8814 /* Override any gcc2 internal prototype to avoid an error.  */
8815 /* We use char because int might match the return type of a gcc2
8816     builtin and then its argument prototype would still apply.  */
8817 char $ac_func();
8818
8819 int main() {
8820
8821 /* The GNU C library defines this for functions which it implements
8822     to always fail with ENOSYS.  Some functions are actually named
8823     something starting with __ and the normal name is an alias.  */
8824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8825 choke me
8826 #else
8827 $ac_func();
8828 #endif
8829
8830 ; return 0; }
8831 EOF
8832 if { (eval echo configure:8833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8833   rm -rf conftest*
8834   eval "ac_cv_func_$ac_func=yes"
8835 else
8836   echo "configure: failed program was:" >&5
8837   cat conftest.$ac_ext >&5
8838   rm -rf conftest*
8839   eval "ac_cv_func_$ac_func=no"
8840 fi
8841 rm -f conftest*
8842
8843 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8844   echo "$ac_t""yes" 1>&6
8845     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8846   { test "$extra_verbose" = "yes" && cat << EOF
8847     Defining $ac_tr_func
8848 EOF
8849 cat >> confdefs.h <<EOF
8850 #define $ac_tr_func 1
8851 EOF
8852 }
8853  
8854 else
8855   echo "$ac_t""no" 1>&6
8856 fi
8857 done
8858
8859           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8860    echo "    xemacs will be linked with \"realpath.o\""
8861  fi ;;
8862     esac ;;
8863 esac
8864
8865 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
8866 echo "configure:8867: checking whether netdb declares h_errno" >&5
8867 cat > conftest.$ac_ext <<EOF
8868 #line 8869 "configure"
8869 #include "confdefs.h"
8870 #include <netdb.h>
8871 int main() {
8872 return h_errno;
8873 ; return 0; }
8874 EOF
8875 if { (eval echo configure:8876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8876   rm -rf conftest*
8877   echo "$ac_t""yes" 1>&6
8878    { test "$extra_verbose" = "yes" && cat << \EOF
8879     Defining HAVE_H_ERRNO
8880 EOF
8881 cat >> confdefs.h <<\EOF
8882 #define HAVE_H_ERRNO 1
8883 EOF
8884 }
8885
8886 else
8887   echo "configure: failed program was:" >&5
8888   cat conftest.$ac_ext >&5
8889   rm -rf conftest*
8890   echo "$ac_t""no" 1>&6
8891 fi
8892 rm -f conftest*
8893
8894 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
8895 echo "configure:8896: checking for sigsetjmp" >&5
8896 cat > conftest.$ac_ext <<EOF
8897 #line 8898 "configure"
8898 #include "confdefs.h"
8899 #include <setjmp.h>
8900 int main() {
8901 sigjmp_buf bar; sigsetjmp (bar, 0);
8902 ; return 0; }
8903 EOF
8904 if { (eval echo configure:8905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8905   rm -rf conftest*
8906   echo "$ac_t""yes" 1>&6
8907    { test "$extra_verbose" = "yes" && cat << \EOF
8908     Defining HAVE_SIGSETJMP
8909 EOF
8910 cat >> confdefs.h <<\EOF
8911 #define HAVE_SIGSETJMP 1
8912 EOF
8913 }
8914
8915 else
8916   echo "configure: failed program was:" >&5
8917   cat conftest.$ac_ext >&5
8918   rm -rf conftest*
8919   echo "$ac_t""no" 1>&6
8920 fi
8921 rm -f conftest*
8922
8923 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
8924 echo "configure:8925: checking whether localtime caches TZ" >&5
8925
8926 if test "$ac_cv_func_tzset" = "yes"; then
8927 cat > conftest.$ac_ext <<EOF
8928 #line 8929 "configure"
8929 #include "confdefs.h"
8930 #include <time.h>
8931 #if STDC_HEADERS
8932 # include <stdlib.h>
8933 #endif
8934 extern char **environ;
8935 unset_TZ ()
8936 {
8937   char **from, **to;
8938   for (to = from = environ; (*to = *from); from++)
8939     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
8940       to++;
8941 }
8942 char TZ_GMT0[] = "TZ=GMT0";
8943 char TZ_PST8[] = "TZ=PST8";
8944 main()
8945 {
8946   time_t now = time ((time_t *) 0);
8947   int hour_GMT0, hour_unset;
8948   if (putenv (TZ_GMT0) != 0)
8949     exit (1);
8950   hour_GMT0 = localtime (&now)->tm_hour;
8951   unset_TZ ();
8952   hour_unset = localtime (&now)->tm_hour;
8953   if (putenv (TZ_PST8) != 0)
8954     exit (1);
8955   if (localtime (&now)->tm_hour == hour_GMT0)
8956     exit (1);
8957   unset_TZ ();
8958   if (localtime (&now)->tm_hour != hour_unset)
8959     exit (1);
8960   exit (0);
8961 }
8962 EOF
8963 if { (eval echo configure:8964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8964 then
8965   emacs_cv_localtime_cache=no
8966 else
8967   conftest_rc="$?"
8968   echo "configure: failed program was:" >&5
8969   cat conftest.$ac_ext >&5
8970   rm -fr conftest*
8971   emacs_cv_localtime_cache=yes
8972 fi
8973 rm -fr conftest*
8974 else
8975         # If we lack tzset, report that localtime does not cache TZ,
8976         # since we can't invalidate the cache if we don't have tzset.
8977         emacs_cv_localtime_cache=no
8978 fi
8979 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
8980 if test $emacs_cv_localtime_cache = yes; then
8981   { test "$extra_verbose" = "yes" && cat << \EOF
8982     Defining LOCALTIME_CACHE
8983 EOF
8984 cat >> confdefs.h <<\EOF
8985 #define LOCALTIME_CACHE 1
8986 EOF
8987 }
8988
8989 fi
8990
8991 if test "$HAVE_TIMEVAL" = "yes"; then
8992 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
8993 echo "configure:8994: checking whether gettimeofday accepts one or two arguments" >&5
8994 cat > conftest.$ac_ext <<EOF
8995 #line 8996 "configure"
8996 #include "confdefs.h"
8997
8998 #ifdef TIME_WITH_SYS_TIME
8999 #include <sys/time.h>
9000 #include <time.h>
9001 #else
9002 #ifdef HAVE_SYS_TIME_H
9003 #include <sys/time.h>
9004 #else
9005 #include <time.h>
9006 #endif
9007 #endif
9008   
9009 int main() {
9010
9011   struct timeval time;
9012   struct timezone dummy;
9013   gettimeofday (&time, &dummy);
9014
9015 ; return 0; }
9016 EOF
9017 if { (eval echo configure:9018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9018   rm -rf conftest*
9019   echo "$ac_t""two" 1>&6
9020 else
9021   echo "configure: failed program was:" >&5
9022   cat conftest.$ac_ext >&5
9023   rm -rf conftest*
9024   echo "$ac_t""one" 1>&6
9025    { test "$extra_verbose" = "yes" && cat << \EOF
9026     Defining GETTIMEOFDAY_ONE_ARGUMENT
9027 EOF
9028 cat >> confdefs.h <<\EOF
9029 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9030 EOF
9031 }
9032
9033 fi
9034 rm -f conftest*
9035 fi
9036
9037
9038 echo $ac_n "checking for inline""... $ac_c" 1>&6
9039 echo "configure:9040: checking for inline" >&5
9040
9041 ac_cv_c_inline=no
9042 for ac_kw in inline __inline__ __inline; do
9043   cat > conftest.$ac_ext <<EOF
9044 #line 9045 "configure"
9045 #include "confdefs.h"
9046
9047 int main() {
9048 } $ac_kw foo() {
9049 ; return 0; }
9050 EOF
9051 if { (eval echo configure:9052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9052   rm -rf conftest*
9053   ac_cv_c_inline=$ac_kw; break
9054 else
9055   echo "configure: failed program was:" >&5
9056   cat conftest.$ac_ext >&5
9057 fi
9058 rm -f conftest*
9059 done
9060
9061
9062 echo "$ac_t""$ac_cv_c_inline" 1>&6
9063 case "$ac_cv_c_inline" in
9064   inline | yes) ;;
9065   no) { test "$extra_verbose" = "yes" && cat << \EOF
9066     Defining inline = 
9067 EOF
9068 cat >> confdefs.h <<\EOF
9069 #define inline 
9070 EOF
9071 }
9072  ;;
9073   *)  { test "$extra_verbose" = "yes" && cat << EOF
9074     Defining inline = $ac_cv_c_inline
9075 EOF
9076 cat >> confdefs.h <<EOF
9077 #define inline $ac_cv_c_inline
9078 EOF
9079 }
9080  ;;
9081 esac
9082
9083 if test "$ac_cv_c_inline" != "no"; then
9084   { test "$extra_verbose" = "yes" && cat << \EOF
9085     Defining HAVE_INLINE
9086 EOF
9087 cat >> confdefs.h <<\EOF
9088 #define HAVE_INLINE 1
9089 EOF
9090 }
9091
9092   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
9093    echo "    xemacs will be linked with \"inline.o\""
9094  fi
9095 fi
9096
9097
9098 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9099 # for constant arguments.  Useless!
9100 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9101 echo "configure:9102: checking for working alloca.h" >&5
9102
9103 cat > conftest.$ac_ext <<EOF
9104 #line 9105 "configure"
9105 #include "confdefs.h"
9106 #include <alloca.h>
9107 int main() {
9108 char *p = alloca(2 * sizeof(int));
9109 ; return 0; }
9110 EOF
9111 if { (eval echo configure:9112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9112   rm -rf conftest*
9113   ac_cv_header_alloca_h=yes
9114 else
9115   echo "configure: failed program was:" >&5
9116   cat conftest.$ac_ext >&5
9117   rm -rf conftest*
9118   ac_cv_header_alloca_h=no
9119 fi
9120 rm -f conftest*
9121
9122 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9123 if test $ac_cv_header_alloca_h = yes; then
9124   { test "$extra_verbose" = "yes" && cat << \EOF
9125     Defining HAVE_ALLOCA_H
9126 EOF
9127 cat >> confdefs.h <<\EOF
9128 #define HAVE_ALLOCA_H 1
9129 EOF
9130 }
9131
9132 fi
9133
9134 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9135 echo "configure:9136: checking for alloca" >&5
9136
9137 cat > conftest.$ac_ext <<EOF
9138 #line 9139 "configure"
9139 #include "confdefs.h"
9140
9141 #ifdef __GNUC__
9142 # define alloca __builtin_alloca
9143 #else
9144 # ifdef _MSC_VER
9145 #  include <malloc.h>
9146 #  define alloca _alloca
9147 # else
9148 #  if HAVE_ALLOCA_H
9149 #   include <alloca.h>
9150 #  else
9151 #   ifdef _AIX
9152  #pragma alloca
9153 #   else
9154 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9155 char *alloca ();
9156 #    endif
9157 #   endif
9158 #  endif
9159 # endif
9160 #endif
9161
9162 int main() {
9163 char *p = (char *) alloca(1);
9164 ; return 0; }
9165 EOF
9166 if { (eval echo configure:9167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9167   rm -rf conftest*
9168   ac_cv_func_alloca_works=yes
9169 else
9170   echo "configure: failed program was:" >&5
9171   cat conftest.$ac_ext >&5
9172   rm -rf conftest*
9173   ac_cv_func_alloca_works=no
9174 fi
9175 rm -f conftest*
9176
9177 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
9178 if test $ac_cv_func_alloca_works = yes; then
9179   { test "$extra_verbose" = "yes" && cat << \EOF
9180     Defining HAVE_ALLOCA
9181 EOF
9182 cat >> confdefs.h <<\EOF
9183 #define HAVE_ALLOCA 1
9184 EOF
9185 }
9186
9187 fi
9188
9189 if test $ac_cv_func_alloca_works = no; then
9190   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9191   # that cause trouble.  Some versions do not even contain alloca or
9192   # contain a buggy version.  If you still want to use their alloca,
9193   # use ar to extract alloca.o from them instead of compiling alloca.c.
9194   ALLOCA=alloca.${ac_objext}
9195   { test "$extra_verbose" = "yes" && cat << \EOF
9196     Defining C_ALLOCA
9197 EOF
9198 cat >> confdefs.h <<\EOF
9199 #define C_ALLOCA 1
9200 EOF
9201 }
9202
9203
9204 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9205 echo "configure:9206: checking whether alloca needs Cray hooks" >&5
9206
9207 cat > conftest.$ac_ext <<EOF
9208 #line 9209 "configure"
9209 #include "confdefs.h"
9210 #if defined(CRAY) && ! defined(CRAY2)
9211 webecray
9212 #else
9213 wenotbecray
9214 #endif
9215
9216 EOF
9217 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9218   egrep "webecray" >/dev/null 2>&1; then
9219   rm -rf conftest*
9220   ac_cv_os_cray=yes
9221 else
9222   rm -rf conftest*
9223   ac_cv_os_cray=no
9224 fi
9225 rm -f conftest*
9226
9227
9228 echo "$ac_t""$ac_cv_os_cray" 1>&6
9229 if test $ac_cv_os_cray = yes; then
9230 for ac_func in _getb67 GETB67 getb67; do
9231   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9232 echo "configure:9233: checking for $ac_func" >&5
9233
9234 cat > conftest.$ac_ext <<EOF
9235 #line 9236 "configure"
9236 #include "confdefs.h"
9237 /* System header to define __stub macros and hopefully few prototypes,
9238     which can conflict with char $ac_func(); below.  */
9239 #include <assert.h>
9240 /* Override any gcc2 internal prototype to avoid an error.  */
9241 /* We use char because int might match the return type of a gcc2
9242     builtin and then its argument prototype would still apply.  */
9243 char $ac_func();
9244
9245 int main() {
9246
9247 /* The GNU C library defines this for functions which it implements
9248     to always fail with ENOSYS.  Some functions are actually named
9249     something starting with __ and the normal name is an alias.  */
9250 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9251 choke me
9252 #else
9253 $ac_func();
9254 #endif
9255
9256 ; return 0; }
9257 EOF
9258 if { (eval echo configure:9259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9259   rm -rf conftest*
9260   eval "ac_cv_func_$ac_func=yes"
9261 else
9262   echo "configure: failed program was:" >&5
9263   cat conftest.$ac_ext >&5
9264   rm -rf conftest*
9265   eval "ac_cv_func_$ac_func=no"
9266 fi
9267 rm -f conftest*
9268
9269 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9270   echo "$ac_t""yes" 1>&6
9271   { test "$extra_verbose" = "yes" && cat << EOF
9272     Defining CRAY_STACKSEG_END = $ac_func
9273 EOF
9274 cat >> confdefs.h <<EOF
9275 #define CRAY_STACKSEG_END $ac_func
9276 EOF
9277 }
9278
9279   break
9280 else
9281   echo "$ac_t""no" 1>&6
9282 fi
9283
9284 done
9285 fi
9286
9287 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9288 echo "configure:9289: checking stack direction for C alloca" >&5
9289
9290 cat > conftest.$ac_ext <<EOF
9291 #line 9292 "configure"
9292 #include "confdefs.h"
9293 find_stack_direction ()
9294 {
9295   static char *addr = 0;
9296   auto char dummy;
9297   if (addr == 0)
9298     {
9299       addr = &dummy;
9300       return find_stack_direction ();
9301     }
9302   else
9303     return (&dummy > addr) ? 1 : -1;
9304 }
9305 main ()
9306 {
9307   exit (find_stack_direction() < 0);
9308 }
9309 EOF
9310 if { (eval echo configure:9311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9311 then
9312   ac_cv_c_stack_direction=1
9313 else
9314   conftest_rc="$?"
9315   echo "configure: failed program was:" >&5
9316   cat conftest.$ac_ext >&5
9317   rm -fr conftest*
9318   ac_cv_c_stack_direction=-1
9319 fi
9320 rm -fr conftest*
9321
9322 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
9323 { test "$extra_verbose" = "yes" && cat << EOF
9324     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
9325 EOF
9326 cat >> confdefs.h <<EOF
9327 #define STACK_DIRECTION $ac_cv_c_stack_direction
9328 EOF
9329 }
9330
9331 fi
9332
9333 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
9334    echo "    xemacs will be linked with \"$ALLOCA\""
9335  fi
9336
9337 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
9338 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9339 echo "configure:9340: checking for vfork.h" >&5
9340
9341 cat > conftest.$ac_ext <<EOF
9342 #line 9343 "configure"
9343 #include "confdefs.h"
9344 #include <vfork.h>
9345 EOF
9346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9347 { (eval echo configure:9348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9349 if test -z "$ac_err"; then
9350   rm -rf conftest*
9351   eval "ac_cv_header_$ac_safe=yes"
9352 else
9353   echo "$ac_err" >&5
9354   echo "configure: failed program was:" >&5
9355   cat conftest.$ac_ext >&5
9356   rm -rf conftest*
9357   eval "ac_cv_header_$ac_safe=no"
9358 fi
9359 rm -f conftest*
9360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9361   echo "$ac_t""yes" 1>&6
9362   { test "$extra_verbose" = "yes" && cat << \EOF
9363     Defining HAVE_VFORK_H
9364 EOF
9365 cat >> confdefs.h <<\EOF
9366 #define HAVE_VFORK_H 1
9367 EOF
9368 }
9369
9370 else
9371   echo "$ac_t""no" 1>&6
9372 fi
9373
9374 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9375 echo "configure:9376: checking for working vfork" >&5
9376
9377 cat > conftest.$ac_ext <<EOF
9378 #line 9379 "configure"
9379 #include "confdefs.h"
9380 /* Thanks to Paul Eggert for this test.  */
9381 #include <stdio.h>
9382 #include <sys/types.h>
9383 #include <sys/stat.h>
9384 #ifdef HAVE_UNISTD_H
9385 #include <unistd.h>
9386 #endif
9387 #ifdef HAVE_VFORK_H
9388 #include <vfork.h>
9389 #endif
9390 /* On some sparc systems, changes by the child to local and incoming
9391    argument registers are propagated back to the parent.
9392    The compiler is told about this with #include <vfork.h>,
9393    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9394    Test for this by using a static variable whose address
9395    is put into a register that is clobbered by the vfork.  */
9396 static
9397 #ifdef __cplusplus
9398 sparc_address_test (int arg)
9399 #else
9400 sparc_address_test (arg) int arg;
9401 #endif
9402 {
9403   static pid_t child;
9404   if (!child) {
9405     child = vfork ();
9406     if (child < 0) {
9407       perror ("vfork");
9408       _exit(2);
9409     }
9410     if (!child) {
9411       arg = getpid();
9412       write(-1, "", 0);
9413       _exit (arg);
9414     }
9415   }
9416 }
9417 main() {
9418   pid_t parent = getpid ();
9419   pid_t child;
9420
9421   sparc_address_test ();
9422
9423   child = vfork ();
9424
9425   if (child == 0) {
9426     /* Here is another test for sparc vfork register problems.
9427        This test uses lots of local variables, at least
9428        as many local variables as main has allocated so far
9429        including compiler temporaries.  4 locals are enough for
9430        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9431        A buggy compiler should reuse the register of parent
9432        for one of the local variables, since it will think that
9433        parent can't possibly be used any more in this routine.
9434        Assigning to the local variable will thus munge parent
9435        in the parent process.  */
9436     pid_t
9437       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9438       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9439     /* Convince the compiler that p..p7 are live; otherwise, it might
9440        use the same hardware register for all 8 local variables.  */
9441     if (p != p1 || p != p2 || p != p3 || p != p4
9442         || p != p5 || p != p6 || p != p7)
9443       _exit(1);
9444
9445     /* On some systems (e.g. IRIX 3.3),
9446        vfork doesn't separate parent from child file descriptors.
9447        If the child closes a descriptor before it execs or exits,
9448        this munges the parent's descriptor as well.
9449        Test for this by closing stdout in the child.  */
9450     _exit(close(fileno(stdout)) != 0);
9451   } else {
9452     int status;
9453     struct stat st;
9454
9455     while (wait(&status) != child)
9456       ;
9457     exit(
9458          /* Was there some problem with vforking?  */
9459          child < 0
9460
9461          /* Did the child fail?  (This shouldn't happen.)  */
9462          || status
9463
9464          /* Did the vfork/compiler bug occur?  */
9465          || parent != getpid()
9466
9467          /* Did the file descriptor bug occur?  */
9468          || fstat(fileno(stdout), &st) != 0
9469          );
9470   }
9471 }
9472 EOF
9473 if { (eval echo configure:9474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9474 then
9475   ac_cv_func_vfork_works=yes
9476 else
9477   conftest_rc="$?"
9478   echo "configure: failed program was:" >&5
9479   cat conftest.$ac_ext >&5
9480   rm -fr conftest*
9481   ac_cv_func_vfork_works=no
9482 fi
9483 rm -fr conftest*
9484
9485 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9486 if test $ac_cv_func_vfork_works = no; then
9487   { test "$extra_verbose" = "yes" && cat << \EOF
9488     Defining vfork = fork
9489 EOF
9490 cat >> confdefs.h <<\EOF
9491 #define vfork fork
9492 EOF
9493 }
9494
9495 fi
9496
9497
9498 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
9499 echo "configure:9500: checking for working strcoll" >&5
9500
9501 cat > conftest.$ac_ext <<EOF
9502 #line 9503 "configure"
9503 #include "confdefs.h"
9504 #include <string.h>
9505 main ()
9506 {
9507   exit (strcoll ("abc", "def") >= 0 ||
9508         strcoll ("ABC", "DEF") >= 0 ||
9509         strcoll ("123", "456") >= 0);
9510 }
9511 EOF
9512 if { (eval echo configure:9513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9513 then
9514   ac_cv_func_strcoll_works=yes
9515 else
9516   conftest_rc="$?"
9517   echo "configure: failed program was:" >&5
9518   cat conftest.$ac_ext >&5
9519   rm -fr conftest*
9520   ac_cv_func_strcoll_works=no
9521 fi
9522 rm -fr conftest*
9523
9524 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
9525 if test $ac_cv_func_strcoll_works = yes; then
9526   { test "$extra_verbose" = "yes" && cat << \EOF
9527     Defining HAVE_STRCOLL
9528 EOF
9529 cat >> confdefs.h <<\EOF
9530 #define HAVE_STRCOLL 1
9531 EOF
9532 }
9533
9534 fi
9535
9536
9537 for ac_func in getpgrp
9538 do
9539 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9540 echo "configure:9541: checking for $ac_func" >&5
9541
9542 cat > conftest.$ac_ext <<EOF
9543 #line 9544 "configure"
9544 #include "confdefs.h"
9545 /* System header to define __stub macros and hopefully few prototypes,
9546     which can conflict with char $ac_func(); below.  */
9547 #include <assert.h>
9548 /* Override any gcc2 internal prototype to avoid an error.  */
9549 /* We use char because int might match the return type of a gcc2
9550     builtin and then its argument prototype would still apply.  */
9551 char $ac_func();
9552
9553 int main() {
9554
9555 /* The GNU C library defines this for functions which it implements
9556     to always fail with ENOSYS.  Some functions are actually named
9557     something starting with __ and the normal name is an alias.  */
9558 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9559 choke me
9560 #else
9561 $ac_func();
9562 #endif
9563
9564 ; return 0; }
9565 EOF
9566 if { (eval echo configure:9567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9567   rm -rf conftest*
9568   eval "ac_cv_func_$ac_func=yes"
9569 else
9570   echo "configure: failed program was:" >&5
9571   cat conftest.$ac_ext >&5
9572   rm -rf conftest*
9573   eval "ac_cv_func_$ac_func=no"
9574 fi
9575 rm -f conftest*
9576
9577 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9578   echo "$ac_t""yes" 1>&6
9579     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9580   { test "$extra_verbose" = "yes" && cat << EOF
9581     Defining $ac_tr_func
9582 EOF
9583 cat >> confdefs.h <<EOF
9584 #define $ac_tr_func 1
9585 EOF
9586 }
9587  
9588 else
9589   echo "$ac_t""no" 1>&6
9590 fi
9591 done
9592
9593 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
9594 echo "configure:9595: checking whether getpgrp takes no argument" >&5
9595
9596 cat > conftest.$ac_ext <<EOF
9597 #line 9598 "configure"
9598 #include "confdefs.h"
9599
9600 /*
9601  * If this system has a BSD-style getpgrp(),
9602  * which takes a pid argument, exit unsuccessfully.
9603  *
9604  * Snarfed from Chet Ramey's bash pgrp.c test program
9605  */
9606 #include <stdio.h>
9607 #include <sys/types.h>
9608
9609 int     pid;
9610 int     pg1, pg2, pg3, pg4;
9611 int     ng, np, s, child;
9612
9613 main()
9614 {
9615         pid = getpid();
9616         pg1 = getpgrp(0);
9617         pg2 = getpgrp();
9618         pg3 = getpgrp(pid);
9619         pg4 = getpgrp(1);
9620
9621         /*
9622          * If all of these values are the same, it's pretty sure that
9623          * we're on a system that ignores getpgrp's first argument.
9624          */
9625         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
9626                 exit(0);
9627
9628         child = fork();
9629         if (child < 0)
9630                 exit(1);
9631         else if (child == 0) {
9632                 np = getpid();
9633                 /*
9634                  * If this is Sys V, this will not work; pgrp will be
9635                  * set to np because setpgrp just changes a pgrp to be
9636                  * the same as the pid.
9637                  */
9638                 setpgrp(np, pg1);
9639                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
9640                 if (ng == pg1) {
9641                         exit(1);
9642                 } else {
9643                         exit(0);
9644                 }
9645         } else {
9646                 wait(&s);
9647                 exit(s>>8);
9648         }
9649 }
9650
9651 EOF
9652 if { (eval echo configure:9653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9653 then
9654   ac_cv_func_getpgrp_void=yes
9655 else
9656   conftest_rc="$?"
9657   echo "configure: failed program was:" >&5
9658   cat conftest.$ac_ext >&5
9659   rm -fr conftest*
9660   ac_cv_func_getpgrp_void=no
9661 fi
9662 rm -fr conftest*
9663
9664
9665 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
9666 if test $ac_cv_func_getpgrp_void = yes; then
9667   { test "$extra_verbose" = "yes" && cat << \EOF
9668     Defining GETPGRP_VOID
9669 EOF
9670 cat >> confdefs.h <<\EOF
9671 #define GETPGRP_VOID 1
9672 EOF
9673 }
9674
9675 fi
9676
9677
9678 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9679 echo "configure:9680: checking for working mmap" >&5
9680 case "$opsys" in ultrix* ) have_mmap=no ;; *)
9681 cat > conftest.$ac_ext <<EOF
9682 #line 9683 "configure"
9683 #include "confdefs.h"
9684 #include <stdio.h>
9685 #include <unistd.h>
9686 #include <fcntl.h>
9687 #include <sys/mman.h>
9688
9689 #ifndef MAP_VARIABLE
9690 #define MAP_VARIABLE 0
9691 #endif
9692
9693 #ifndef MAP_FAILED
9694 #define MAP_FAILED -1
9695 #endif
9696
9697 int main (int argc, char *argv[])
9698 {
9699   int fd = -1;
9700   caddr_t p;
9701 #ifndef MAP_ANONYMOUS
9702   fd = open ("/dev/zero", O_RDWR);
9703   if (fd < 0)
9704     return 1;
9705 #define MAP_ANONYMOUS 0
9706 #endif
9707   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
9708            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
9709            fd, 0) != (void *) MAP_FAILED)
9710     return 0;
9711   perror ("conftest: mmap failed");
9712   return 1;
9713 }
9714 EOF
9715 if { (eval echo configure:9716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9716 then
9717   have_mmap=yes
9718 else
9719   conftest_rc="$?"
9720   echo "configure: failed program was:" >&5
9721   cat conftest.$ac_ext >&5
9722   rm -fr conftest*
9723   have_mmap=no
9724 fi
9725 rm -fr conftest* ;;
9726 esac
9727 echo "$ac_t""$have_mmap" 1>&6
9728 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9729     Defining HAVE_MMAP
9730 EOF
9731 cat >> confdefs.h <<\EOF
9732 #define HAVE_MMAP 1
9733 EOF
9734 }
9735
9736 for ac_hdr in unistd.h
9737 do
9738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9740 echo "configure:9741: checking for $ac_hdr" >&5
9741
9742 cat > conftest.$ac_ext <<EOF
9743 #line 9744 "configure"
9744 #include "confdefs.h"
9745 #include <$ac_hdr>
9746 EOF
9747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9748 { (eval echo configure:9749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9750 if test -z "$ac_err"; then
9751   rm -rf conftest*
9752   eval "ac_cv_header_$ac_safe=yes"
9753 else
9754   echo "$ac_err" >&5
9755   echo "configure: failed program was:" >&5
9756   cat conftest.$ac_ext >&5
9757   rm -rf conftest*
9758   eval "ac_cv_header_$ac_safe=no"
9759 fi
9760 rm -f conftest*
9761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9762   echo "$ac_t""yes" 1>&6
9763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9764   { test "$extra_verbose" = "yes" && cat << EOF
9765     Defining $ac_tr_hdr
9766 EOF
9767 cat >> confdefs.h <<EOF
9768 #define $ac_tr_hdr 1
9769 EOF
9770 }
9771  
9772 else
9773   echo "$ac_t""no" 1>&6
9774 fi
9775 done
9776
9777 for ac_func in getpagesize
9778 do
9779 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9780 echo "configure:9781: checking for $ac_func" >&5
9781
9782 cat > conftest.$ac_ext <<EOF
9783 #line 9784 "configure"
9784 #include "confdefs.h"
9785 /* System header to define __stub macros and hopefully few prototypes,
9786     which can conflict with char $ac_func(); below.  */
9787 #include <assert.h>
9788 /* Override any gcc2 internal prototype to avoid an error.  */
9789 /* We use char because int might match the return type of a gcc2
9790     builtin and then its argument prototype would still apply.  */
9791 char $ac_func();
9792
9793 int main() {
9794
9795 /* The GNU C library defines this for functions which it implements
9796     to always fail with ENOSYS.  Some functions are actually named
9797     something starting with __ and the normal name is an alias.  */
9798 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9799 choke me
9800 #else
9801 $ac_func();
9802 #endif
9803
9804 ; return 0; }
9805 EOF
9806 if { (eval echo configure:9807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9807   rm -rf conftest*
9808   eval "ac_cv_func_$ac_func=yes"
9809 else
9810   echo "configure: failed program was:" >&5
9811   cat conftest.$ac_ext >&5
9812   rm -rf conftest*
9813   eval "ac_cv_func_$ac_func=no"
9814 fi
9815 rm -f conftest*
9816
9817 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9818   echo "$ac_t""yes" 1>&6
9819     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9820   { test "$extra_verbose" = "yes" && cat << EOF
9821     Defining $ac_tr_func
9822 EOF
9823 cat >> confdefs.h <<EOF
9824 #define $ac_tr_func 1
9825 EOF
9826 }
9827  
9828 else
9829   echo "$ac_t""no" 1>&6
9830 fi
9831 done
9832
9833 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9834 echo "configure:9835: checking for working mmap" >&5
9835
9836 cat > conftest.$ac_ext <<EOF
9837 #line 9838 "configure"
9838 #include "confdefs.h"
9839
9840 /* Thanks to Mike Haertel and Jim Avera for this test.
9841    Here is a matrix of mmap possibilities:
9842         mmap private not fixed
9843         mmap private fixed at somewhere currently unmapped
9844         mmap private fixed at somewhere already mapped
9845         mmap shared not fixed
9846         mmap shared fixed at somewhere currently unmapped
9847         mmap shared fixed at somewhere already mapped
9848    For private mappings, we should verify that changes cannot be read()
9849    back from the file, nor mmap's back from the file at a different
9850    address.  (There have been systems where private was not correctly
9851    implemented like the infamous i386 svr4.0, and systems where the
9852    VM page cache was not coherent with the filesystem buffer cache
9853    like early versions of FreeBSD and possibly contemporary NetBSD.)
9854    For shared mappings, we should conversely verify that changes get
9855    propogated back to all the places they're supposed to be.
9856
9857    Grep wants private fixed already mapped.
9858    The main things grep needs to know about mmap are:
9859    * does it exist and is it safe to write into the mmap'd area
9860    * how to use it (BSD variants)  */
9861 #include <sys/types.h>
9862 #include <fcntl.h>
9863 #include <sys/mman.h>
9864
9865 /* This mess was copied from the GNU getpagesize.h.  */
9866 #ifndef HAVE_GETPAGESIZE
9867 # ifdef HAVE_UNISTD_H
9868 #  include <unistd.h>
9869 # endif
9870
9871 /* Assume that all systems that can run configure have sys/param.h.  */
9872 # ifndef HAVE_SYS_PARAM_H
9873 #  define HAVE_SYS_PARAM_H 1
9874 # endif
9875
9876 # ifdef _SC_PAGESIZE
9877 #  define getpagesize() sysconf(_SC_PAGESIZE)
9878 # else /* no _SC_PAGESIZE */
9879 #  ifdef HAVE_SYS_PARAM_H
9880 #   include <sys/param.h>
9881 #   ifdef EXEC_PAGESIZE
9882 #    define getpagesize() EXEC_PAGESIZE
9883 #   else /* no EXEC_PAGESIZE */
9884 #    ifdef NBPG
9885 #     define getpagesize() NBPG * CLSIZE
9886 #     ifndef CLSIZE
9887 #      define CLSIZE 1
9888 #     endif /* no CLSIZE */
9889 #    else /* no NBPG */
9890 #     ifdef NBPC
9891 #      define getpagesize() NBPC
9892 #     else /* no NBPC */
9893 #      ifdef PAGESIZE
9894 #       define getpagesize() PAGESIZE
9895 #      endif /* PAGESIZE */
9896 #     endif /* no NBPC */
9897 #    endif /* no NBPG */
9898 #   endif /* no EXEC_PAGESIZE */
9899 #  else /* no HAVE_SYS_PARAM_H */
9900 #   define getpagesize() 8192   /* punt totally */
9901 #  endif /* no HAVE_SYS_PARAM_H */
9902 # endif /* no _SC_PAGESIZE */
9903
9904 #endif /* no HAVE_GETPAGESIZE */
9905
9906 #ifdef __cplusplus
9907 extern "C" { void *malloc(unsigned); }
9908 #else
9909 char *malloc();
9910 #endif
9911
9912 int
9913 main()
9914 {
9915         char *data, *data2, *data3;
9916         int i, pagesize;
9917         int fd;
9918
9919         pagesize = getpagesize();
9920
9921         /*
9922          * First, make a file with some known garbage in it.
9923          */
9924         data = malloc(pagesize);
9925         if (!data)
9926                 exit(1);
9927         for (i = 0; i < pagesize; ++i)
9928                 *(data + i) = rand();
9929         umask(0);
9930         fd = creat("conftestmmap", 0600);
9931         if (fd < 0)
9932                 exit(1);
9933         if (write(fd, data, pagesize) != pagesize)
9934                 exit(1);
9935         close(fd);
9936
9937         /*
9938          * Next, try to mmap the file at a fixed address which
9939          * already has something else allocated at it.  If we can,
9940          * also make sure that we see the same garbage.
9941          */
9942         fd = open("conftestmmap", O_RDWR);
9943         if (fd < 0)
9944                 exit(1);
9945         data2 = malloc(2 * pagesize);
9946         if (!data2)
9947                 exit(1);
9948         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
9949         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
9950             MAP_PRIVATE | MAP_FIXED, fd, 0L))
9951                 exit(1);
9952         for (i = 0; i < pagesize; ++i)
9953                 if (*(data + i) != *(data2 + i))
9954                         exit(1);
9955
9956         /*
9957          * Finally, make sure that changes to the mapped area
9958          * do not percolate back to the file as seen by read().
9959          * (This is a bug on some variants of i386 svr4.0.)
9960          */
9961         for (i = 0; i < pagesize; ++i)
9962                 *(data2 + i) = *(data2 + i) + 1;
9963         data3 = malloc(pagesize);
9964         if (!data3)
9965                 exit(1);
9966         if (read(fd, data3, pagesize) != pagesize)
9967                 exit(1);
9968         for (i = 0; i < pagesize; ++i)
9969                 if (*(data + i) != *(data3 + i))
9970                         exit(1);
9971         close(fd);
9972         unlink("conftestmmap");
9973         exit(0);
9974 }
9975
9976 EOF
9977 if { (eval echo configure:9978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9978 then
9979   ac_cv_func_mmap_fixed_mapped=yes
9980 else
9981   conftest_rc="$?"
9982   echo "configure: failed program was:" >&5
9983   cat conftest.$ac_ext >&5
9984   rm -fr conftest*
9985   ac_cv_func_mmap_fixed_mapped=no
9986 fi
9987 rm -fr conftest*
9988
9989 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
9990 if test $ac_cv_func_mmap_fixed_mapped = yes; then
9991   { test "$extra_verbose" = "yes" && cat << \EOF
9992     Defining HAVE_MMAP
9993 EOF
9994 cat >> confdefs.h <<\EOF
9995 #define HAVE_MMAP 1
9996 EOF
9997 }
9998
9999 fi
10000
10001
10002 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10003 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10004 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10005     Defining REL_ALLOC
10006 EOF
10007 cat >> confdefs.h <<\EOF
10008 #define REL_ALLOC 1
10009 EOF
10010 }
10011
10012
10013 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10014 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10015 echo "configure:10016: checking for termios.h" >&5
10016
10017 cat > conftest.$ac_ext <<EOF
10018 #line 10019 "configure"
10019 #include "confdefs.h"
10020 #include <termios.h>
10021 EOF
10022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10023 { (eval echo configure:10024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10025 if test -z "$ac_err"; then
10026   rm -rf conftest*
10027   eval "ac_cv_header_$ac_safe=yes"
10028 else
10029   echo "$ac_err" >&5
10030   echo "configure: failed program was:" >&5
10031   cat conftest.$ac_ext >&5
10032   rm -rf conftest*
10033   eval "ac_cv_header_$ac_safe=no"
10034 fi
10035 rm -f conftest*
10036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10037   echo "$ac_t""yes" 1>&6
10038   { test "$extra_verbose" = "yes" && cat << \EOF
10039     Defining HAVE_TERMIOS
10040 EOF
10041 cat >> confdefs.h <<\EOF
10042 #define HAVE_TERMIOS 1
10043 EOF
10044 }
10045
10046   { test "$extra_verbose" = "yes" && cat << \EOF
10047     Defining SIGNALS_VIA_CHARACTERS
10048 EOF
10049 cat >> confdefs.h <<\EOF
10050 #define SIGNALS_VIA_CHARACTERS 1
10051 EOF
10052 }
10053
10054   { test "$extra_verbose" = "yes" && cat << \EOF
10055     Defining NO_TERMIO
10056 EOF
10057 cat >> confdefs.h <<\EOF
10058 #define NO_TERMIO 1
10059 EOF
10060 }
10061
10062 else
10063   echo "$ac_t""no" 1>&6
10064 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10065 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10066 echo "configure:10067: checking for termio.h" >&5
10067
10068 cat > conftest.$ac_ext <<EOF
10069 #line 10070 "configure"
10070 #include "confdefs.h"
10071 #include <termio.h>
10072 EOF
10073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10074 { (eval echo configure:10075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10076 if test -z "$ac_err"; then
10077   rm -rf conftest*
10078   eval "ac_cv_header_$ac_safe=yes"
10079 else
10080   echo "$ac_err" >&5
10081   echo "configure: failed program was:" >&5
10082   cat conftest.$ac_ext >&5
10083   rm -rf conftest*
10084   eval "ac_cv_header_$ac_safe=no"
10085 fi
10086 rm -f conftest*
10087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10088   echo "$ac_t""yes" 1>&6
10089   { test "$extra_verbose" = "yes" && cat << \EOF
10090     Defining HAVE_TERMIO
10091 EOF
10092 cat >> confdefs.h <<\EOF
10093 #define HAVE_TERMIO 1
10094 EOF
10095 }
10096
10097 else
10098   echo "$ac_t""no" 1>&6
10099 fi
10100
10101 fi
10102
10103
10104
10105 echo $ac_n "checking for socket""... $ac_c" 1>&6
10106 echo "configure:10107: checking for socket" >&5
10107
10108 cat > conftest.$ac_ext <<EOF
10109 #line 10110 "configure"
10110 #include "confdefs.h"
10111 /* System header to define __stub macros and hopefully few prototypes,
10112     which can conflict with char socket(); below.  */
10113 #include <assert.h>
10114 /* Override any gcc2 internal prototype to avoid an error.  */
10115 /* We use char because int might match the return type of a gcc2
10116     builtin and then its argument prototype would still apply.  */
10117 char socket();
10118
10119 int main() {
10120
10121 /* The GNU C library defines this for functions which it implements
10122     to always fail with ENOSYS.  Some functions are actually named
10123     something starting with __ and the normal name is an alias.  */
10124 #if defined (__stub_socket) || defined (__stub___socket)
10125 choke me
10126 #else
10127 socket();
10128 #endif
10129
10130 ; return 0; }
10131 EOF
10132 if { (eval echo configure:10133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10133   rm -rf conftest*
10134   eval "ac_cv_func_socket=yes"
10135 else
10136   echo "configure: failed program was:" >&5
10137   cat conftest.$ac_ext >&5
10138   rm -rf conftest*
10139   eval "ac_cv_func_socket=no"
10140 fi
10141 rm -f conftest*
10142
10143 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10144   echo "$ac_t""yes" 1>&6
10145   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10146 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10147 echo "configure:10148: checking for netinet/in.h" >&5
10148
10149 cat > conftest.$ac_ext <<EOF
10150 #line 10151 "configure"
10151 #include "confdefs.h"
10152 #include <netinet/in.h>
10153 EOF
10154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10155 { (eval echo configure:10156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10157 if test -z "$ac_err"; then
10158   rm -rf conftest*
10159   eval "ac_cv_header_$ac_safe=yes"
10160 else
10161   echo "$ac_err" >&5
10162   echo "configure: failed program was:" >&5
10163   cat conftest.$ac_ext >&5
10164   rm -rf conftest*
10165   eval "ac_cv_header_$ac_safe=no"
10166 fi
10167 rm -f conftest*
10168 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10169   echo "$ac_t""yes" 1>&6
10170   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10171 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10172 echo "configure:10173: checking for arpa/inet.h" >&5
10173
10174 cat > conftest.$ac_ext <<EOF
10175 #line 10176 "configure"
10176 #include "confdefs.h"
10177 #include <arpa/inet.h>
10178 EOF
10179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10180 { (eval echo configure:10181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10182 if test -z "$ac_err"; then
10183   rm -rf conftest*
10184   eval "ac_cv_header_$ac_safe=yes"
10185 else
10186   echo "$ac_err" >&5
10187   echo "configure: failed program was:" >&5
10188   cat conftest.$ac_ext >&5
10189   rm -rf conftest*
10190   eval "ac_cv_header_$ac_safe=no"
10191 fi
10192 rm -f conftest*
10193 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10194   echo "$ac_t""yes" 1>&6
10195   
10196   { test "$extra_verbose" = "yes" && cat << \EOF
10197     Defining HAVE_SOCKETS
10198 EOF
10199 cat >> confdefs.h <<\EOF
10200 #define HAVE_SOCKETS 1
10201 EOF
10202 }
10203
10204       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10205 echo "configure:10206: checking "for sun_len member in struct sockaddr_un"" >&5
10206       cat > conftest.$ac_ext <<EOF
10207 #line 10208 "configure"
10208 #include "confdefs.h"
10209
10210 #include <sys/types.h>
10211 #include <sys/socket.h>
10212 #include <sys/un.h>
10213       
10214 int main() {
10215 static struct sockaddr_un x; x.sun_len = 1;
10216 ; return 0; }
10217 EOF
10218 if { (eval echo configure:10219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10219   rm -rf conftest*
10220   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10221     Defining HAVE_SOCKADDR_SUN_LEN
10222 EOF
10223 cat >> confdefs.h <<\EOF
10224 #define HAVE_SOCKADDR_SUN_LEN 1
10225 EOF
10226 }
10227
10228 else
10229   echo "configure: failed program was:" >&5
10230   cat conftest.$ac_ext >&5
10231   rm -rf conftest*
10232   echo "$ac_t""no" 1>&6
10233 fi
10234 rm -f conftest*
10235       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10236 echo "configure:10237: checking "for ip_mreq struct in netinet/in.h"" >&5
10237       cat > conftest.$ac_ext <<EOF
10238 #line 10239 "configure"
10239 #include "confdefs.h"
10240
10241 #include <sys/types.h>
10242 #include <netinet/in.h>
10243       
10244 int main() {
10245 static struct ip_mreq x;
10246 ; return 0; }
10247 EOF
10248 if { (eval echo configure:10249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10249   rm -rf conftest*
10250   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10251     Defining HAVE_MULTICAST
10252 EOF
10253 cat >> confdefs.h <<\EOF
10254 #define HAVE_MULTICAST 1
10255 EOF
10256 }
10257
10258 else
10259   echo "configure: failed program was:" >&5
10260   cat conftest.$ac_ext >&5
10261   rm -rf conftest*
10262   echo "$ac_t""no" 1>&6
10263 fi
10264 rm -f conftest*
10265 else
10266   echo "$ac_t""no" 1>&6
10267 fi
10268
10269 else
10270   echo "$ac_t""no" 1>&6
10271 fi
10272
10273 else
10274   echo "$ac_t""no" 1>&6
10275 fi
10276
10277
10278 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10279 echo "configure:10280: checking for msgget" >&5
10280
10281 cat > conftest.$ac_ext <<EOF
10282 #line 10283 "configure"
10283 #include "confdefs.h"
10284 /* System header to define __stub macros and hopefully few prototypes,
10285     which can conflict with char msgget(); below.  */
10286 #include <assert.h>
10287 /* Override any gcc2 internal prototype to avoid an error.  */
10288 /* We use char because int might match the return type of a gcc2
10289     builtin and then its argument prototype would still apply.  */
10290 char msgget();
10291
10292 int main() {
10293
10294 /* The GNU C library defines this for functions which it implements
10295     to always fail with ENOSYS.  Some functions are actually named
10296     something starting with __ and the normal name is an alias.  */
10297 #if defined (__stub_msgget) || defined (__stub___msgget)
10298 choke me
10299 #else
10300 msgget();
10301 #endif
10302
10303 ; return 0; }
10304 EOF
10305 if { (eval echo configure:10306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10306   rm -rf conftest*
10307   eval "ac_cv_func_msgget=yes"
10308 else
10309   echo "configure: failed program was:" >&5
10310   cat conftest.$ac_ext >&5
10311   rm -rf conftest*
10312   eval "ac_cv_func_msgget=no"
10313 fi
10314 rm -f conftest*
10315
10316 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10317   echo "$ac_t""yes" 1>&6
10318   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10319 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10320 echo "configure:10321: checking for sys/ipc.h" >&5
10321
10322 cat > conftest.$ac_ext <<EOF
10323 #line 10324 "configure"
10324 #include "confdefs.h"
10325 #include <sys/ipc.h>
10326 EOF
10327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10328 { (eval echo configure:10329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10330 if test -z "$ac_err"; then
10331   rm -rf conftest*
10332   eval "ac_cv_header_$ac_safe=yes"
10333 else
10334   echo "$ac_err" >&5
10335   echo "configure: failed program was:" >&5
10336   cat conftest.$ac_ext >&5
10337   rm -rf conftest*
10338   eval "ac_cv_header_$ac_safe=no"
10339 fi
10340 rm -f conftest*
10341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10342   echo "$ac_t""yes" 1>&6
10343   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10344 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10345 echo "configure:10346: checking for sys/msg.h" >&5
10346
10347 cat > conftest.$ac_ext <<EOF
10348 #line 10349 "configure"
10349 #include "confdefs.h"
10350 #include <sys/msg.h>
10351 EOF
10352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10353 { (eval echo configure:10354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10355 if test -z "$ac_err"; then
10356   rm -rf conftest*
10357   eval "ac_cv_header_$ac_safe=yes"
10358 else
10359   echo "$ac_err" >&5
10360   echo "configure: failed program was:" >&5
10361   cat conftest.$ac_ext >&5
10362   rm -rf conftest*
10363   eval "ac_cv_header_$ac_safe=no"
10364 fi
10365 rm -f conftest*
10366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10367   echo "$ac_t""yes" 1>&6
10368   { test "$extra_verbose" = "yes" && cat << \EOF
10369     Defining HAVE_SYSVIPC
10370 EOF
10371 cat >> confdefs.h <<\EOF
10372 #define HAVE_SYSVIPC 1
10373 EOF
10374 }
10375
10376 else
10377   echo "$ac_t""no" 1>&6
10378 fi
10379
10380 else
10381   echo "$ac_t""no" 1>&6
10382 fi
10383
10384 else
10385   echo "$ac_t""no" 1>&6
10386 fi
10387
10388
10389 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10390 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10391 echo "configure:10392: checking for dirent.h" >&5
10392
10393 cat > conftest.$ac_ext <<EOF
10394 #line 10395 "configure"
10395 #include "confdefs.h"
10396 #include <dirent.h>
10397 EOF
10398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10399 { (eval echo configure:10400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10401 if test -z "$ac_err"; then
10402   rm -rf conftest*
10403   eval "ac_cv_header_$ac_safe=yes"
10404 else
10405   echo "$ac_err" >&5
10406   echo "configure: failed program was:" >&5
10407   cat conftest.$ac_ext >&5
10408   rm -rf conftest*
10409   eval "ac_cv_header_$ac_safe=no"
10410 fi
10411 rm -f conftest*
10412 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10413   echo "$ac_t""yes" 1>&6
10414   { test "$extra_verbose" = "yes" && cat << \EOF
10415     Defining SYSV_SYSTEM_DIR
10416 EOF
10417 cat >> confdefs.h <<\EOF
10418 #define SYSV_SYSTEM_DIR 1
10419 EOF
10420 }
10421
10422 else
10423   echo "$ac_t""no" 1>&6
10424 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
10425 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
10426 echo "configure:10427: checking for sys/dir.h" >&5
10427
10428 cat > conftest.$ac_ext <<EOF
10429 #line 10430 "configure"
10430 #include "confdefs.h"
10431 #include <sys/dir.h>
10432 EOF
10433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10434 { (eval echo configure:10435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10436 if test -z "$ac_err"; then
10437   rm -rf conftest*
10438   eval "ac_cv_header_$ac_safe=yes"
10439 else
10440   echo "$ac_err" >&5
10441   echo "configure: failed program was:" >&5
10442   cat conftest.$ac_ext >&5
10443   rm -rf conftest*
10444   eval "ac_cv_header_$ac_safe=no"
10445 fi
10446 rm -f conftest*
10447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10448   echo "$ac_t""yes" 1>&6
10449   :
10450 else
10451   echo "$ac_t""no" 1>&6
10452 { test "$extra_verbose" = "yes" && cat << \EOF
10453     Defining NONSYSTEM_DIR_LIBRARY
10454 EOF
10455 cat >> confdefs.h <<\EOF
10456 #define NONSYSTEM_DIR_LIBRARY 1
10457 EOF
10458 }
10459
10460 fi
10461
10462 fi
10463
10464
10465 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
10466 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
10467 echo "configure:10468: checking for nlist.h" >&5
10468
10469 cat > conftest.$ac_ext <<EOF
10470 #line 10471 "configure"
10471 #include "confdefs.h"
10472 #include <nlist.h>
10473 EOF
10474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10475 { (eval echo configure:10476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10477 if test -z "$ac_err"; then
10478   rm -rf conftest*
10479   eval "ac_cv_header_$ac_safe=yes"
10480 else
10481   echo "$ac_err" >&5
10482   echo "configure: failed program was:" >&5
10483   cat conftest.$ac_ext >&5
10484   rm -rf conftest*
10485   eval "ac_cv_header_$ac_safe=no"
10486 fi
10487 rm -f conftest*
10488 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10489   echo "$ac_t""yes" 1>&6
10490   { test "$extra_verbose" = "yes" && cat << \EOF
10491     Defining NLIST_STRUCT
10492 EOF
10493 cat >> confdefs.h <<\EOF
10494 #define NLIST_STRUCT 1
10495 EOF
10496 }
10497
10498 else
10499   echo "$ac_t""no" 1>&6
10500 fi
10501
10502
10503
10504 echo "checking "for sound support"" 1>&6
10505 echo "configure:10506: checking "for sound support"" >&5
10506 case "$with_sound" in
10507   native | both ) with_native_sound=yes;;
10508   nas    | no   ) with_native_sound=no;;
10509 esac
10510 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
10511
10512 if test "$with_native_sound" != "no"; then
10513     if test -n "$native_sound_lib"; then
10514     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
10515 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
10516 echo "configure:10517: checking for multimedia/audio_device.h" >&5
10517
10518 cat > conftest.$ac_ext <<EOF
10519 #line 10520 "configure"
10520 #include "confdefs.h"
10521 #include <multimedia/audio_device.h>
10522 EOF
10523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10524 { (eval echo configure:10525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10526 if test -z "$ac_err"; then
10527   rm -rf conftest*
10528   eval "ac_cv_header_$ac_safe=yes"
10529 else
10530   echo "$ac_err" >&5
10531   echo "configure: failed program was:" >&5
10532   cat conftest.$ac_ext >&5
10533   rm -rf conftest*
10534   eval "ac_cv_header_$ac_safe=no"
10535 fi
10536 rm -f conftest*
10537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10538   echo "$ac_t""yes" 1>&6
10539   sound_found=yes sound_cflags=""
10540       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10541    echo "    xemacs will be linked with \"sunplay.o\""
10542  fi
10543 else
10544   echo "$ac_t""no" 1>&6
10545 fi
10546
10547   fi
10548
10549     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
10550     sound_found=yes
10551     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10552    echo "    xemacs will be linked with \"sunplay.o\""
10553  fi
10554     if test -d "/usr/demo/SOUND/include"
10555       then sound_cflags="-I/usr/demo/SOUND/include"
10556       else sound_cflags="-I/usr/demo/SOUND"
10557     fi
10558     if test -z "$native_sound_lib" ; then
10559       if test -r "/usr/demo/SOUND/lib/libaudio.a"
10560         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
10561         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
10562       fi
10563     fi
10564   fi
10565
10566     if test -z "$sound_found"; then
10567     case "$canonical" in
10568     *-sgi-* )
10569       if test -z "$native_sound_lib"; then
10570         
10571 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
10572 echo "configure:10573: checking for ALopenport in -laudio" >&5
10573 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
10574
10575 xe_check_libs=" -laudio "
10576 cat > conftest.$ac_ext <<EOF
10577 #line 10578 "configure"
10578 #include "confdefs.h"
10579 /* Override any gcc2 internal prototype to avoid an error.  */
10580 /* We use char because int might match the return type of a gcc2
10581     builtin and then its argument prototype would still apply.  */
10582 char ALopenport();
10583
10584 int main() {
10585 ALopenport()
10586 ; return 0; }
10587 EOF
10588 if { (eval echo configure:10589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10589   rm -rf conftest*
10590   eval "ac_cv_lib_$ac_lib_var=yes"
10591 else
10592   echo "configure: failed program was:" >&5
10593   cat conftest.$ac_ext >&5
10594   rm -rf conftest*
10595   eval "ac_cv_lib_$ac_lib_var=no"
10596 fi
10597 rm -f conftest*
10598 xe_check_libs=""
10599
10600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10601   echo "$ac_t""yes" 1>&6
10602   native_sound_lib="-laudio"
10603 else
10604   echo "$ac_t""no" 1>&6
10605 fi
10606
10607
10608       fi
10609       if test -n "$native_sound_lib"; then
10610         sound_found=yes sound_cflags=""
10611         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
10612    echo "    xemacs will be linked with \"sgiplay.o\""
10613  fi
10614       fi ;;
10615     hppa*-hp-hpux* )
10616       if test -z "$native_sound_lib"; then
10617         
10618 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
10619 echo "configure:10620: checking for AOpenAudio in -lAlib" >&5
10620 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
10621
10622 xe_check_libs=" -lAlib "
10623 cat > conftest.$ac_ext <<EOF
10624 #line 10625 "configure"
10625 #include "confdefs.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 AOpenAudio();
10630
10631 int main() {
10632 AOpenAudio()
10633 ; return 0; }
10634 EOF
10635 if { (eval echo configure:10636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10636   rm -rf conftest*
10637   eval "ac_cv_lib_$ac_lib_var=yes"
10638 else
10639   echo "configure: failed program was:" >&5
10640   cat conftest.$ac_ext >&5
10641   rm -rf conftest*
10642   eval "ac_cv_lib_$ac_lib_var=no"
10643 fi
10644 rm -f conftest*
10645 xe_check_libs=""
10646
10647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10648   echo "$ac_t""yes" 1>&6
10649   native_sound_lib="-lAlib"
10650 else
10651   echo "$ac_t""no" 1>&6
10652 fi
10653
10654
10655       fi
10656       if test -n "$native_sound_lib"; then
10657         sound_found=yes
10658         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
10659    echo "    xemacs will be linked with \"hpplay.o\""
10660  fi
10661         if test "$GCC" = "yes" # Kludge city
10662           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
10663           else sound_cflags="+e -I/usr/audio/examples"
10664         fi
10665       fi ;;
10666     esac
10667   fi
10668
10669     if test -z "$sound_found"; then
10670     for dir in "machine" "sys" "linux"; do
10671       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
10672 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
10673 echo "configure:10674: checking for ${dir}/soundcard.h" >&5
10674
10675 cat > conftest.$ac_ext <<EOF
10676 #line 10677 "configure"
10677 #include "confdefs.h"
10678 #include <${dir}/soundcard.h>
10679 EOF
10680 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10681 { (eval echo configure:10682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10682 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10683 if test -z "$ac_err"; then
10684   rm -rf conftest*
10685   eval "ac_cv_header_$ac_safe=yes"
10686 else
10687   echo "$ac_err" >&5
10688   echo "configure: failed program was:" >&5
10689   cat conftest.$ac_ext >&5
10690   rm -rf conftest*
10691   eval "ac_cv_header_$ac_safe=no"
10692 fi
10693 rm -f conftest*
10694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10695   echo "$ac_t""yes" 1>&6
10696   sound_found=yes
10697         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
10698    echo "    xemacs will be linked with \"linuxplay.o\""
10699  fi
10700         { test "$extra_verbose" = "yes" && cat << EOF
10701     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
10702 EOF
10703 cat >> confdefs.h <<EOF
10704 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
10705 EOF
10706 }
10707
10708         break
10709 else
10710   echo "$ac_t""no" 1>&6
10711 fi
10712
10713     done
10714   fi
10715
10716   test "$sound_found" = "yes" && with_native_sound=yes
10717 fi
10718
10719 if test -z "$with_sound"; then
10720   if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then
10721     with_sound=native
10722   fi
10723 fi
10724
10725 if test "$with_native_sound" = "yes"; then
10726   { test "$extra_verbose" = "yes" && cat << \EOF
10727     Defining HAVE_NATIVE_SOUND
10728 EOF
10729 cat >> confdefs.h <<\EOF
10730 #define HAVE_NATIVE_SOUND 1
10731 EOF
10732 }
10733
10734   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
10735 fi
10736
10737 case "$with_sound" in both | nas )
10738   { test "$extra_verbose" = "yes" && cat << \EOF
10739     Defining HAVE_NAS_SOUND
10740 EOF
10741 cat >> confdefs.h <<\EOF
10742 #define HAVE_NAS_SOUND 1
10743 EOF
10744 }
10745
10746   extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
10747    echo "    xemacs will be linked with \"nas.o\""
10748  fi
10749   libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
10750       cat > conftest.$ac_ext <<EOF
10751 #line 10752 "configure"
10752 #include "confdefs.h"
10753 #include <audio/Xtutil.h>
10754 EOF
10755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10756   egrep "AuXtErrorJump" >/dev/null 2>&1; then
10757   :
10758 else
10759   rm -rf conftest*
10760   { test "$extra_verbose" = "yes" && cat << \EOF
10761     Defining NAS_NO_ERROR_JUMP
10762 EOF
10763 cat >> confdefs.h <<\EOF
10764 #define NAS_NO_ERROR_JUMP 1
10765 EOF
10766 }
10767
10768 fi
10769 rm -f conftest*
10770
10771 esac
10772
10773
10774 test -z "$with_tty" && with_tty=yes
10775
10776 if test "$with_tty" = "yes"  ; then
10777   echo "checking for TTY-related features" 1>&6
10778 echo "configure:10779: checking for TTY-related features" >&5
10779   { test "$extra_verbose" = "yes" && cat << \EOF
10780     Defining HAVE_TTY
10781 EOF
10782 cat >> confdefs.h <<\EOF
10783 #define HAVE_TTY 1
10784 EOF
10785 }
10786
10787   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
10788    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\""
10789  fi
10790
10791     if test -z "$with_ncurses"; then
10792     
10793 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
10794 echo "configure:10795: checking for tgetent in -lncurses" >&5
10795 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
10796
10797 xe_check_libs=" -lncurses "
10798 cat > conftest.$ac_ext <<EOF
10799 #line 10800 "configure"
10800 #include "confdefs.h"
10801 /* Override any gcc2 internal prototype to avoid an error.  */
10802 /* We use char because int might match the return type of a gcc2
10803     builtin and then its argument prototype would still apply.  */
10804 char tgetent();
10805
10806 int main() {
10807 tgetent()
10808 ; return 0; }
10809 EOF
10810 if { (eval echo configure:10811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10811   rm -rf conftest*
10812   eval "ac_cv_lib_$ac_lib_var=yes"
10813 else
10814   echo "configure: failed program was:" >&5
10815   cat conftest.$ac_ext >&5
10816   rm -rf conftest*
10817   eval "ac_cv_lib_$ac_lib_var=no"
10818 fi
10819 rm -f conftest*
10820 xe_check_libs=""
10821
10822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10823   echo "$ac_t""yes" 1>&6
10824   with_ncurses=yes
10825 else
10826   echo "$ac_t""no" 1>&6
10827 with_ncurses=no
10828 fi
10829
10830
10831   fi
10832   if test "$with_ncurses" = "yes"; then
10833     { test "$extra_verbose" = "yes" && cat << \EOF
10834     Defining HAVE_NCURSES
10835 EOF
10836 cat >> confdefs.h <<\EOF
10837 #define HAVE_NCURSES 1
10838 EOF
10839 }
10840
10841     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
10842 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
10843 echo "configure:10844: checking for ncurses/curses.h" >&5
10844
10845 cat > conftest.$ac_ext <<EOF
10846 #line 10847 "configure"
10847 #include "confdefs.h"
10848 #include <ncurses/curses.h>
10849 EOF
10850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10851 { (eval echo configure:10852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10853 if test -z "$ac_err"; then
10854   rm -rf conftest*
10855   eval "ac_cv_header_$ac_safe=yes"
10856 else
10857   echo "$ac_err" >&5
10858   echo "configure: failed program was:" >&5
10859   cat conftest.$ac_ext >&5
10860   rm -rf conftest*
10861   eval "ac_cv_header_$ac_safe=no"
10862 fi
10863 rm -f conftest*
10864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10865   echo "$ac_t""yes" 1>&6
10866   curses_h_path=ncurses/curses.h
10867 else
10868   echo "$ac_t""no" 1>&6
10869 fi
10870
10871     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
10872 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
10873 echo "configure:10874: checking for ncurses/term.h" >&5
10874
10875 cat > conftest.$ac_ext <<EOF
10876 #line 10877 "configure"
10877 #include "confdefs.h"
10878 #include <ncurses/term.h>
10879 EOF
10880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10881 { (eval echo configure:10882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10882 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10883 if test -z "$ac_err"; then
10884   rm -rf conftest*
10885   eval "ac_cv_header_$ac_safe=yes"
10886 else
10887   echo "$ac_err" >&5
10888   echo "configure: failed program was:" >&5
10889   cat conftest.$ac_ext >&5
10890   rm -rf conftest*
10891   eval "ac_cv_header_$ac_safe=no"
10892 fi
10893 rm -f conftest*
10894 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10895   echo "$ac_t""yes" 1>&6
10896   term_h_path=ncurses/term.h
10897 else
10898   echo "$ac_t""no" 1>&6
10899 fi
10900
10901     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
10902    echo "    xemacs will be linked with \"terminfo.o\""
10903  fi
10904     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
10905
10906     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
10907                         save_c_switch_site="$c_switch_site"
10908       c_switch_site="$c_switch_site -I/usr/include/ncurses"
10909       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
10910 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
10911 echo "configure:10912: checking for ncurses/curses.h" >&5
10912
10913 cat > conftest.$ac_ext <<EOF
10914 #line 10915 "configure"
10915 #include "confdefs.h"
10916 #include <ncurses/curses.h>
10917 EOF
10918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10919 { (eval echo configure:10920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10921 if test -z "$ac_err"; then
10922   rm -rf conftest*
10923   eval "ac_cv_header_$ac_safe=yes"
10924 else
10925   echo "$ac_err" >&5
10926   echo "configure: failed program was:" >&5
10927   cat conftest.$ac_ext >&5
10928   rm -rf conftest*
10929   eval "ac_cv_header_$ac_safe=no"
10930 fi
10931 rm -f conftest*
10932 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10933   echo "$ac_t""yes" 1>&6
10934   curses_h_path=ncurses/curses.h
10935 else
10936   echo "$ac_t""no" 1>&6
10937 fi
10938
10939       if test "$ac_cv_header_ncurses_curses_h" = "yes"
10940         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
10941         else c_switch_site="$save_c_switch_site"
10942       fi
10943     fi
10944   else         if test "$have_terminfo" = "yes"; then
10945       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
10946    echo "    xemacs will be linked with \"terminfo.o\""
10947  fi
10948       if test -n "$libs_termcap"; then
10949         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
10950       else
10951         for lib in curses termlib termcap; do
10952           
10953 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
10954 echo "configure:10955: checking for tgetent in -l$lib" >&5
10955 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
10956
10957 xe_check_libs=" -l$lib "
10958 cat > conftest.$ac_ext <<EOF
10959 #line 10960 "configure"
10960 #include "confdefs.h"
10961 /* Override any gcc2 internal prototype to avoid an error.  */
10962 /* We use char because int might match the return type of a gcc2
10963     builtin and then its argument prototype would still apply.  */
10964 char tgetent();
10965
10966 int main() {
10967 tgetent()
10968 ; return 0; }
10969 EOF
10970 if { (eval echo configure:10971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10971   rm -rf conftest*
10972   eval "ac_cv_lib_$ac_lib_var=yes"
10973 else
10974   echo "configure: failed program was:" >&5
10975   cat conftest.$ac_ext >&5
10976   rm -rf conftest*
10977   eval "ac_cv_lib_$ac_lib_var=no"
10978 fi
10979 rm -f conftest*
10980 xe_check_libs=""
10981
10982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10983   echo "$ac_t""yes" 1>&6
10984   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
10985 else
10986   echo "$ac_t""no" 1>&6
10987 fi
10988
10989
10990         done
10991       fi
10992     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
10993    echo "    xemacs will be linked with \"tparam.o\""
10994  fi
10995                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
10996       if test -n "$libs_termcap"; then
10997         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
10998       else
10999         
11000 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11001 echo "configure:11002: checking for tgetent in -lcurses" >&5
11002 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11003
11004 xe_check_libs=" -lcurses "
11005 cat > conftest.$ac_ext <<EOF
11006 #line 11007 "configure"
11007 #include "confdefs.h"
11008 /* Override any gcc2 internal prototype to avoid an error.  */
11009 /* We use char because int might match the return type of a gcc2
11010     builtin and then its argument prototype would still apply.  */
11011 char tgetent();
11012
11013 int main() {
11014 tgetent()
11015 ; return 0; }
11016 EOF
11017 if { (eval echo configure:11018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11018   rm -rf conftest*
11019   eval "ac_cv_lib_$ac_lib_var=yes"
11020 else
11021   echo "configure: failed program was:" >&5
11022   cat conftest.$ac_ext >&5
11023   rm -rf conftest*
11024   eval "ac_cv_lib_$ac_lib_var=no"
11025 fi
11026 rm -f conftest*
11027 xe_check_libs=""
11028
11029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11030   echo "$ac_t""yes" 1>&6
11031   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11032 else
11033   echo "$ac_t""no" 1>&6
11034 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11035 echo "configure:11036: checking for tgetent in -ltermcap" >&5
11036 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11037
11038 xe_check_libs=" -ltermcap "
11039 cat > conftest.$ac_ext <<EOF
11040 #line 11041 "configure"
11041 #include "confdefs.h"
11042 /* Override any gcc2 internal prototype to avoid an error.  */
11043 /* We use char because int might match the return type of a gcc2
11044     builtin and then its argument prototype would still apply.  */
11045 char tgetent();
11046
11047 int main() {
11048 tgetent()
11049 ; return 0; }
11050 EOF
11051 if { (eval echo configure:11052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11052   rm -rf conftest*
11053   eval "ac_cv_lib_$ac_lib_var=yes"
11054 else
11055   echo "configure: failed program was:" >&5
11056   cat conftest.$ac_ext >&5
11057   rm -rf conftest*
11058   eval "ac_cv_lib_$ac_lib_var=no"
11059 fi
11060 rm -f conftest*
11061 xe_check_libs=""
11062
11063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11064   echo "$ac_t""yes" 1>&6
11065   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11066 else
11067   echo "$ac_t""no" 1>&6
11068 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11069    echo "    xemacs will be linked with \"termcap.o\""
11070  fi
11071 fi
11072
11073
11074 fi
11075
11076
11077       fi
11078     fi
11079   fi
11080   { test "$extra_verbose" = "yes" && cat << EOF
11081     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11082 EOF
11083 cat >> confdefs.h <<EOF
11084 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11085 EOF
11086 }
11087
11088   { test "$extra_verbose" = "yes" && cat << EOF
11089     Defining TERM_H_PATH = "${term_h_path-term.h}"
11090 EOF
11091 cat >> confdefs.h <<EOF
11092 #define TERM_H_PATH "${term_h_path-term.h}"
11093 EOF
11094 }
11095
11096
11097     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11098 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11099 echo "configure:11100: checking for gpm.h" >&5
11100
11101 cat > conftest.$ac_ext <<EOF
11102 #line 11103 "configure"
11103 #include "confdefs.h"
11104 #include <gpm.h>
11105 EOF
11106 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11107 { (eval echo configure:11108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11108 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11109 if test -z "$ac_err"; then
11110   rm -rf conftest*
11111   eval "ac_cv_header_$ac_safe=yes"
11112 else
11113   echo "$ac_err" >&5
11114   echo "configure: failed program was:" >&5
11115   cat conftest.$ac_ext >&5
11116   rm -rf conftest*
11117   eval "ac_cv_header_$ac_safe=no"
11118 fi
11119 rm -f conftest*
11120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11121   echo "$ac_t""yes" 1>&6
11122   :
11123 else
11124   echo "$ac_t""no" 1>&6
11125 with_gpm=no
11126 fi
11127  }
11128   test -z "$with_gpm" && { 
11129 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11130 echo "configure:11131: checking for Gpm_Open in -lgpm" >&5
11131 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11132
11133 xe_check_libs=" -lgpm "
11134 cat > conftest.$ac_ext <<EOF
11135 #line 11136 "configure"
11136 #include "confdefs.h"
11137 /* Override any gcc2 internal prototype to avoid an error.  */
11138 /* We use char because int might match the return type of a gcc2
11139     builtin and then its argument prototype would still apply.  */
11140 char Gpm_Open();
11141
11142 int main() {
11143 Gpm_Open()
11144 ; return 0; }
11145 EOF
11146 if { (eval echo configure:11147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11147   rm -rf conftest*
11148   eval "ac_cv_lib_$ac_lib_var=yes"
11149 else
11150   echo "configure: failed program was:" >&5
11151   cat conftest.$ac_ext >&5
11152   rm -rf conftest*
11153   eval "ac_cv_lib_$ac_lib_var=no"
11154 fi
11155 rm -f conftest*
11156 xe_check_libs=""
11157
11158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11159   echo "$ac_t""yes" 1>&6
11160   with_gpm=yes
11161 else
11162   echo "$ac_t""no" 1>&6
11163 with_gpm=no
11164 fi
11165
11166  }
11167   if test "$with_gpm" = "yes"; then
11168     { test "$extra_verbose" = "yes" && cat << \EOF
11169     Defining HAVE_GPM
11170 EOF
11171 cat >> confdefs.h <<\EOF
11172 #define HAVE_GPM 1
11173 EOF
11174 }
11175
11176     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
11177    echo "    xemacs will be linked with \"gpmevent.o\""
11178  fi
11179     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
11180   fi
11181
11182 else   for feature in ncurses gpm; do
11183     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11184       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
11185     fi
11186     eval "with_${feature}=no"
11187   done
11188 fi 
11189 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
11190    echo "    xemacs will be linked with \"event-unixoid.o\""
11191  fi
11192
11193
11194 test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
11195   != "no no no" && echo "checking for database support" 1>&6
11196 echo "configure:11197: checking for database support" >&5
11197
11198 if test "$with_database_gnudbm $with_database_dbm" != "no no"; then
11199   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
11200 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
11201 echo "configure:11202: checking for ndbm.h" >&5
11202
11203 cat > conftest.$ac_ext <<EOF
11204 #line 11205 "configure"
11205 #include "confdefs.h"
11206 #include <ndbm.h>
11207 EOF
11208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11209 { (eval echo configure:11210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11211 if test -z "$ac_err"; then
11212   rm -rf conftest*
11213   eval "ac_cv_header_$ac_safe=yes"
11214 else
11215   echo "$ac_err" >&5
11216   echo "configure: failed program was:" >&5
11217   cat conftest.$ac_ext >&5
11218   rm -rf conftest*
11219   eval "ac_cv_header_$ac_safe=no"
11220 fi
11221 rm -f conftest*
11222 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11223   echo "$ac_t""yes" 1>&6
11224   :
11225 else
11226   echo "$ac_t""no" 1>&6
11227
11228     test "$with_database_gnudbm" = "yes" -o \
11229          "$with_database_dbm"    = "yes" && \
11230       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11231     with_database_gnudbm=no with_database_dbm=no
11232 fi
11233
11234 fi
11235
11236 if test "$with_database_gnudbm" != "no"; then
11237   
11238 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
11239 echo "configure:11240: checking for dbm_open in -lgdbm" >&5
11240 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
11241
11242 xe_check_libs=" -lgdbm "
11243 cat > conftest.$ac_ext <<EOF
11244 #line 11245 "configure"
11245 #include "confdefs.h"
11246 /* Override any gcc2 internal prototype to avoid an error.  */
11247 /* We use char because int might match the return type of a gcc2
11248     builtin and then its argument prototype would still apply.  */
11249 char dbm_open();
11250
11251 int main() {
11252 dbm_open()
11253 ; return 0; }
11254 EOF
11255 if { (eval echo configure:11256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11256   rm -rf conftest*
11257   eval "ac_cv_lib_$ac_lib_var=yes"
11258 else
11259   echo "configure: failed program was:" >&5
11260   cat conftest.$ac_ext >&5
11261   rm -rf conftest*
11262   eval "ac_cv_lib_$ac_lib_var=no"
11263 fi
11264 rm -f conftest*
11265 xe_check_libs=""
11266
11267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11268   echo "$ac_t""yes" 1>&6
11269   with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm
11270 else
11271   echo "$ac_t""no" 1>&6
11272 if test "$with_database_gnudbm" = "yes"; then
11273      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
11274    fi
11275    with_database_gnudbm=no
11276 fi
11277
11278
11279 fi
11280
11281 if test "$with_database_dbm" != "no"; then
11282   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11283 echo "configure:11284: checking for dbm_open" >&5
11284
11285 cat > conftest.$ac_ext <<EOF
11286 #line 11287 "configure"
11287 #include "confdefs.h"
11288 /* System header to define __stub macros and hopefully few prototypes,
11289     which can conflict with char dbm_open(); below.  */
11290 #include <assert.h>
11291 /* Override any gcc2 internal prototype to avoid an error.  */
11292 /* We use char because int might match the return type of a gcc2
11293     builtin and then its argument prototype would still apply.  */
11294 char dbm_open();
11295
11296 int main() {
11297
11298 /* The GNU C library defines this for functions which it implements
11299     to always fail with ENOSYS.  Some functions are actually named
11300     something starting with __ and the normal name is an alias.  */
11301 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11302 choke me
11303 #else
11304 dbm_open();
11305 #endif
11306
11307 ; return 0; }
11308 EOF
11309 if { (eval echo configure:11310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11310   rm -rf conftest*
11311   eval "ac_cv_func_dbm_open=yes"
11312 else
11313   echo "configure: failed program was:" >&5
11314   cat conftest.$ac_ext >&5
11315   rm -rf conftest*
11316   eval "ac_cv_func_dbm_open=no"
11317 fi
11318 rm -f conftest*
11319
11320 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11321   echo "$ac_t""yes" 1>&6
11322   with_database_dbm=yes libdbm=
11323 else
11324   echo "$ac_t""no" 1>&6
11325
11326     
11327 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11328 echo "configure:11329: checking for dbm_open in -ldbm" >&5
11329 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
11330
11331 xe_check_libs=" -ldbm "
11332 cat > conftest.$ac_ext <<EOF
11333 #line 11334 "configure"
11334 #include "confdefs.h"
11335 /* Override any gcc2 internal prototype to avoid an error.  */
11336 /* We use char because int might match the return type of a gcc2
11337     builtin and then its argument prototype would still apply.  */
11338 char dbm_open();
11339
11340 int main() {
11341 dbm_open()
11342 ; return 0; }
11343 EOF
11344 if { (eval echo configure:11345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11345   rm -rf conftest*
11346   eval "ac_cv_lib_$ac_lib_var=yes"
11347 else
11348   echo "configure: failed program was:" >&5
11349   cat conftest.$ac_ext >&5
11350   rm -rf conftest*
11351   eval "ac_cv_lib_$ac_lib_var=no"
11352 fi
11353 rm -f conftest*
11354 xe_check_libs=""
11355
11356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11357   echo "$ac_t""yes" 1>&6
11358   with_database_dbm=yes libdbm=-ldbm
11359 else
11360   echo "$ac_t""no" 1>&6
11361 test "$with_database_dbm" = "yes" && \
11362         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11363       with_database_dbm=no
11364 fi
11365
11366
11367 fi
11368
11369 fi
11370
11371 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
11372 test "$with_database_gnudbm" = "yes" -o \
11373      "$with_database_dbm"    = "yes" && \
11374   { test "$extra_verbose" = "yes" && cat << \EOF
11375     Defining HAVE_DBM
11376 EOF
11377 cat >> confdefs.h <<\EOF
11378 #define HAVE_DBM 1
11379 EOF
11380 }
11381
11382
11383 if test "$with_database_berkdb" != "no"; then
11384   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
11385 echo "configure:11386: checking for Berkeley db.h" >&5
11386   for path in "db/db.h" "db.h"; do
11387     cat > conftest.$ac_ext <<EOF
11388 #line 11389 "configure"
11389 #include "confdefs.h"
11390 #ifdef HAVE_INTTYPES_H
11391 #define __BIT_TYPES_DEFINED__
11392 #include <inttypes.h>
11393 typedef uint8_t  u_int8_t;
11394 typedef uint16_t u_int16_t;
11395 typedef uint32_t u_int32_t;
11396 #ifdef WE_DONT_NEED_QUADS
11397 typedef uint64_t u_int64_t;
11398 #endif
11399 #endif
11400 #include <$path>
11401
11402 int main() {
11403
11404 ; return 0; }
11405 EOF
11406 if { (eval echo configure:11407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11407   rm -rf conftest*
11408   db_h_path="$path"; break
11409 else
11410   echo "configure: failed program was:" >&5
11411   cat conftest.$ac_ext >&5
11412 fi
11413 rm -f conftest*
11414   done
11415   if test -z "$db_h_path"
11416   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
11417   else echo "$ac_t""$db_h_path" 1>&6
11418   fi
11419
11420   if test "$with_database_berkdb" != "no"; then
11421     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
11422 echo "configure:11423: checking for Berkeley DB version" >&5
11423     cat > conftest.$ac_ext <<EOF
11424 #line 11425 "configure"
11425 #include "confdefs.h"
11426 #include <$db_h_path>
11427 #if DB_VERSION_MAJOR > 1
11428 yes
11429 #endif
11430
11431 EOF
11432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11433   egrep "yes" >/dev/null 2>&1; then
11434   rm -rf conftest*
11435   echo "$ac_t""2" 1>&6; dbfunc=db_open
11436 else
11437   rm -rf conftest*
11438   echo "$ac_t""1" 1>&6; dbfunc=dbopen
11439 fi
11440 rm -f conftest*
11441
11442     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
11443 echo "configure:11444: checking for $dbfunc" >&5
11444
11445 cat > conftest.$ac_ext <<EOF
11446 #line 11447 "configure"
11447 #include "confdefs.h"
11448 /* System header to define __stub macros and hopefully few prototypes,
11449     which can conflict with char $dbfunc(); below.  */
11450 #include <assert.h>
11451 /* Override any gcc2 internal prototype to avoid an error.  */
11452 /* We use char because int might match the return type of a gcc2
11453     builtin and then its argument prototype would still apply.  */
11454 char $dbfunc();
11455
11456 int main() {
11457
11458 /* The GNU C library defines this for functions which it implements
11459     to always fail with ENOSYS.  Some functions are actually named
11460     something starting with __ and the normal name is an alias.  */
11461 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
11462 choke me
11463 #else
11464 $dbfunc();
11465 #endif
11466
11467 ; return 0; }
11468 EOF
11469 if { (eval echo configure:11470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11470   rm -rf conftest*
11471   eval "ac_cv_func_$dbfunc=yes"
11472 else
11473   echo "configure: failed program was:" >&5
11474   cat conftest.$ac_ext >&5
11475   rm -rf conftest*
11476   eval "ac_cv_func_$dbfunc=no"
11477 fi
11478 rm -f conftest*
11479
11480 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
11481   echo "$ac_t""yes" 1>&6
11482   with_database_berkdb=yes need_libdb=no
11483 else
11484   echo "$ac_t""no" 1>&6
11485
11486     
11487 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
11488 echo "configure:11489: checking for $dbfunc in -ldb" >&5
11489 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
11490
11491 xe_check_libs=" -ldb "
11492 cat > conftest.$ac_ext <<EOF
11493 #line 11494 "configure"
11494 #include "confdefs.h"
11495 /* Override any gcc2 internal prototype to avoid an error.  */
11496 /* We use char because int might match the return type of a gcc2
11497     builtin and then its argument prototype would still apply.  */
11498 char $dbfunc();
11499
11500 int main() {
11501 $dbfunc()
11502 ; return 0; }
11503 EOF
11504 if { (eval echo configure:11505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11505   rm -rf conftest*
11506   eval "ac_cv_lib_$ac_lib_var=yes"
11507 else
11508   echo "configure: failed program was:" >&5
11509   cat conftest.$ac_ext >&5
11510   rm -rf conftest*
11511   eval "ac_cv_lib_$ac_lib_var=no"
11512 fi
11513 rm -f conftest*
11514 xe_check_libs=""
11515
11516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11517   echo "$ac_t""yes" 1>&6
11518   with_database_berkdb=yes need_libdb=yes
11519 else
11520   echo "$ac_t""no" 1>&6
11521 fi
11522
11523
11524 fi
11525
11526   fi
11527
11528   if test "$with_database_berkdb" = "yes"; then
11529     { test "$extra_verbose" = "yes" && cat << EOF
11530     Defining DB_H_PATH = "$db_h_path"
11531 EOF
11532 cat >> confdefs.h <<EOF
11533 #define DB_H_PATH "$db_h_path"
11534 EOF
11535 }
11536
11537     { test "$extra_verbose" = "yes" && cat << \EOF
11538     Defining HAVE_BERKELEY_DB
11539 EOF
11540 cat >> confdefs.h <<\EOF
11541 #define HAVE_BERKELEY_DB 1
11542 EOF
11543 }
11544
11545     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
11546   else with_database_berkdb=no
11547   fi
11548 fi
11549
11550 if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
11551      != "no no no"; then
11552   { test "$extra_verbose" = "yes" && cat << \EOF
11553     Defining HAVE_DATABASE
11554 EOF
11555 cat >> confdefs.h <<\EOF
11556 #define HAVE_DATABASE 1
11557 EOF
11558 }
11559
11560   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
11561    echo "    xemacs will be linked with \"database.o\""
11562  fi
11563 fi
11564
11565 if test "$with_socks" = "yes"; then
11566   
11567 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
11568 echo "configure:11569: checking for SOCKSinit in -lsocks" >&5
11569 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
11570
11571 xe_check_libs=" -lsocks "
11572 cat > conftest.$ac_ext <<EOF
11573 #line 11574 "configure"
11574 #include "confdefs.h"
11575 /* Override any gcc2 internal prototype to avoid an error.  */
11576 /* We use char because int might match the return type of a gcc2
11577     builtin and then its argument prototype would still apply.  */
11578 char SOCKSinit();
11579
11580 int main() {
11581 SOCKSinit()
11582 ; return 0; }
11583 EOF
11584 if { (eval echo configure:11585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11585   rm -rf conftest*
11586   eval "ac_cv_lib_$ac_lib_var=yes"
11587 else
11588   echo "configure: failed program was:" >&5
11589   cat conftest.$ac_ext >&5
11590   rm -rf conftest*
11591   eval "ac_cv_lib_$ac_lib_var=no"
11592 fi
11593 rm -f conftest*
11594 xe_check_libs=""
11595
11596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11597   echo "$ac_t""yes" 1>&6
11598     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11599     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11600   { test "$extra_verbose" = "yes" && cat << EOF
11601     Defining $ac_tr_lib
11602 EOF
11603 cat >> confdefs.h <<EOF
11604 #define $ac_tr_lib 1
11605 EOF
11606 }
11607
11608   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
11609
11610 else
11611   echo "$ac_t""no" 1>&6
11612 fi
11613
11614
11615   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
11616     Defining HAVE_SOCKS
11617 EOF
11618 cat >> confdefs.h <<\EOF
11619 #define HAVE_SOCKS 1
11620 EOF
11621 }
11622
11623 fi
11624
11625 if test "$usage_tracking" = "yes"; then
11626   { test "$extra_verbose" = "yes" && cat << \EOF
11627     Defining USAGE_TRACKING
11628 EOF
11629 cat >> confdefs.h <<\EOF
11630 #define USAGE_TRACKING 1
11631 EOF
11632 }
11633
11634   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
11635 fi
11636
11637 for ac_hdr in dlfcn.h
11638 do
11639 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11640 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11641 echo "configure:11642: checking for $ac_hdr" >&5
11642
11643 cat > conftest.$ac_ext <<EOF
11644 #line 11645 "configure"
11645 #include "confdefs.h"
11646 #include <$ac_hdr>
11647 EOF
11648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11649 { (eval echo configure:11650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11651 if test -z "$ac_err"; then
11652   rm -rf conftest*
11653   eval "ac_cv_header_$ac_safe=yes"
11654 else
11655   echo "$ac_err" >&5
11656   echo "configure: failed program was:" >&5
11657   cat conftest.$ac_ext >&5
11658   rm -rf conftest*
11659   eval "ac_cv_header_$ac_safe=no"
11660 fi
11661 rm -f conftest*
11662 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11663   echo "$ac_t""yes" 1>&6
11664     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11665   { test "$extra_verbose" = "yes" && cat << EOF
11666     Defining $ac_tr_hdr
11667 EOF
11668 cat >> confdefs.h <<EOF
11669 #define $ac_tr_hdr 1
11670 EOF
11671 }
11672  have_dlfcn=yes
11673   { test "$extra_verbose" = "yes" && cat << \EOF
11674     Defining HAVE_DLFCN_H
11675 EOF
11676 cat >> confdefs.h <<\EOF
11677 #define HAVE_DLFCN_H 1
11678 EOF
11679 }
11680
11681 else
11682   echo "$ac_t""no" 1>&6
11683 fi
11684 done
11685
11686 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11687 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
11688 echo "configure:11689: checking for dlopen in -ldl" >&5
11689 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
11690
11691 xe_check_libs=" -ldl "
11692 cat > conftest.$ac_ext <<EOF
11693 #line 11694 "configure"
11694 #include "confdefs.h"
11695 /* Override any gcc2 internal prototype to avoid an error.  */
11696 /* We use char because int might match the return type of a gcc2
11697     builtin and then its argument prototype would still apply.  */
11698 char dlopen();
11699
11700 int main() {
11701 dlopen()
11702 ; return 0; }
11703 EOF
11704 if { (eval echo configure:11705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11705   rm -rf conftest*
11706   eval "ac_cv_lib_$ac_lib_var=yes"
11707 else
11708   echo "configure: failed program was:" >&5
11709   cat conftest.$ac_ext >&5
11710   rm -rf conftest*
11711   eval "ac_cv_lib_$ac_lib_var=no"
11712 fi
11713 rm -f conftest*
11714 xe_check_libs=""
11715
11716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11717   echo "$ac_t""yes" 1>&6
11718   { test "$extra_verbose" = "yes" && cat << \EOF
11719     Defining HAVE_DLOPEN
11720 EOF
11721 cat >> confdefs.h <<\EOF
11722 #define HAVE_DLOPEN 1
11723 EOF
11724 }
11725  DLL_LIB=dl;  with_shlib=yes
11726 else
11727   echo "$ac_t""no" 1>&6
11728 fi
11729
11730  }
11731 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11732 echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6
11733 echo "configure:11734: checking for _dlopen in -lc" >&5
11734 ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'`
11735
11736 xe_check_libs=" -lc "
11737 cat > conftest.$ac_ext <<EOF
11738 #line 11739 "configure"
11739 #include "confdefs.h"
11740 /* Override any gcc2 internal prototype to avoid an error.  */
11741 /* We use char because int might match the return type of a gcc2
11742     builtin and then its argument prototype would still apply.  */
11743 char _dlopen();
11744
11745 int main() {
11746 _dlopen()
11747 ; return 0; }
11748 EOF
11749 if { (eval echo configure:11750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11750   rm -rf conftest*
11751   eval "ac_cv_lib_$ac_lib_var=yes"
11752 else
11753   echo "configure: failed program was:" >&5
11754   cat conftest.$ac_ext >&5
11755   rm -rf conftest*
11756   eval "ac_cv_lib_$ac_lib_var=no"
11757 fi
11758 rm -f conftest*
11759 xe_check_libs=""
11760
11761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11762   echo "$ac_t""yes" 1>&6
11763   { test "$extra_verbose" = "yes" && cat << \EOF
11764     Defining HAVE_DLOPEN
11765 EOF
11766 cat >> confdefs.h <<\EOF
11767 #define HAVE_DLOPEN 1
11768 EOF
11769 }
11770  DLL_LIB=;   with_shlib=yes
11771 else
11772   echo "$ac_t""no" 1>&6
11773 fi
11774
11775  }
11776 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11777 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
11778 echo "configure:11779: checking for dlopen in -lc" >&5
11779 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
11780
11781 xe_check_libs=" -lc "
11782 cat > conftest.$ac_ext <<EOF
11783 #line 11784 "configure"
11784 #include "confdefs.h"
11785 /* Override any gcc2 internal prototype to avoid an error.  */
11786 /* We use char because int might match the return type of a gcc2
11787     builtin and then its argument prototype would still apply.  */
11788 char dlopen();
11789
11790 int main() {
11791 dlopen()
11792 ; return 0; }
11793 EOF
11794 if { (eval echo configure:11795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11795   rm -rf conftest*
11796   eval "ac_cv_lib_$ac_lib_var=yes"
11797 else
11798   echo "configure: failed program was:" >&5
11799   cat conftest.$ac_ext >&5
11800   rm -rf conftest*
11801   eval "ac_cv_lib_$ac_lib_var=no"
11802 fi
11803 rm -f conftest*
11804 xe_check_libs=""
11805
11806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11807   echo "$ac_t""yes" 1>&6
11808   { test "$extra_verbose" = "yes" && cat << \EOF
11809     Defining HAVE_DLOPEN
11810 EOF
11811 cat >> confdefs.h <<\EOF
11812 #define HAVE_DLOPEN 1
11813 EOF
11814 }
11815  DLL_LIB=;   with_shlib=yes
11816 else
11817   echo "$ac_t""no" 1>&6
11818 fi
11819
11820  }
11821 test -z "$with_shlib" && { 
11822 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
11823 echo "configure:11824: checking for shl_load in -ldld" >&5
11824 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
11825
11826 xe_check_libs=" -ldld "
11827 cat > conftest.$ac_ext <<EOF
11828 #line 11829 "configure"
11829 #include "confdefs.h"
11830 /* Override any gcc2 internal prototype to avoid an error.  */
11831 /* We use char because int might match the return type of a gcc2
11832     builtin and then its argument prototype would still apply.  */
11833 char shl_load();
11834
11835 int main() {
11836 shl_load()
11837 ; return 0; }
11838 EOF
11839 if { (eval echo configure:11840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11840   rm -rf conftest*
11841   eval "ac_cv_lib_$ac_lib_var=yes"
11842 else
11843   echo "configure: failed program was:" >&5
11844   cat conftest.$ac_ext >&5
11845   rm -rf conftest*
11846   eval "ac_cv_lib_$ac_lib_var=no"
11847 fi
11848 rm -f conftest*
11849 xe_check_libs=""
11850
11851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11852   echo "$ac_t""yes" 1>&6
11853   { test "$extra_verbose" = "yes" && cat << \EOF
11854     Defining HAVE_SHL_LOAD
11855 EOF
11856 cat >> confdefs.h <<\EOF
11857 #define HAVE_SHL_LOAD 1
11858 EOF
11859 }
11860  DLL_LIB=dld; with_shlib=yes
11861 else
11862   echo "$ac_t""no" 1>&6
11863 fi
11864
11865  }
11866 test -z "$with_shlib" && { 
11867 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
11868 echo "configure:11869: checking for dld_init in -ldld" >&5
11869 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
11870
11871 xe_check_libs=" -ldld "
11872 cat > conftest.$ac_ext <<EOF
11873 #line 11874 "configure"
11874 #include "confdefs.h"
11875 /* Override any gcc2 internal prototype to avoid an error.  */
11876 /* We use char because int might match the return type of a gcc2
11877     builtin and then its argument prototype would still apply.  */
11878 char dld_init();
11879
11880 int main() {
11881 dld_init()
11882 ; return 0; }
11883 EOF
11884 if { (eval echo configure:11885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11885   rm -rf conftest*
11886   eval "ac_cv_lib_$ac_lib_var=yes"
11887 else
11888   echo "configure: failed program was:" >&5
11889   cat conftest.$ac_ext >&5
11890   rm -rf conftest*
11891   eval "ac_cv_lib_$ac_lib_var=no"
11892 fi
11893 rm -f conftest*
11894 xe_check_libs=""
11895
11896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11897   echo "$ac_t""yes" 1>&6
11898   { test "$extra_verbose" = "yes" && cat << \EOF
11899     Defining HAVE_DLD_INIT
11900 EOF
11901 cat >> confdefs.h <<\EOF
11902 #define HAVE_DLD_INIT 1
11903 EOF
11904 }
11905  DLL_LIB=dld; with_shlib=yes
11906 else
11907   echo "$ac_t""no" 1>&6
11908 fi
11909
11910  }
11911 if test "$with_shlib" = "yes"; then
11912   
11913 dll_ld=
11914 dll_ldflags=
11915 dll_cflags=
11916 dll_post=
11917 dll_ldo="-o"
11918 ld_dynamic_link_flags=
11919 xehost=$canonical
11920 xealias=$internal_configuration
11921
11922 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
11923 echo "configure:11924: checking how to build dynamic libraries for ${xehost}" >&5
11924 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
11925 case "$xehost" in
11926 *-*-linux-gnu*) ;;
11927 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
11928 esac
11929
11930 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
11931 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
11932 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
11933
11934 case "$xehost_os" in
11935 aix3*)
11936   # AIX sometimes has problems with the GCC collect2 program.  For some
11937   # reason, if we set the COLLECT_NAMES environment variable, the problems
11938   # vanish in a puff of smoke.
11939   if test "${COLLECT_NAMES+set}" != set; then
11940     COLLECT_NAMES=
11941     export COLLECT_NAMES
11942   fi
11943   ;;
11944 esac
11945
11946 # Now see if the compiler is really GCC.
11947 if test "$GCC" = "yes"; then
11948   XEGCC=yes
11949 else
11950   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
11951 echo "configure:11952: checking checking whether we are using GNU C" >&5
11952   cat > conftest.$ac_ext <<EOF
11953 #line 11954 "configure"
11954 #include "confdefs.h"
11955
11956 #ifdef __GNUC__
11957   yes;
11958 #endif
11959
11960 EOF
11961 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11962   egrep "yes" >/dev/null 2>&1; then
11963   rm -rf conftest*
11964   XEGCC=yes
11965 else
11966   rm -rf conftest*
11967   XEGCC=no
11968 fi
11969 rm -f conftest*
11970
11971   echo "$ac_t""${XEGCC}" 1>&6
11972 fi
11973
11974 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
11975 echo "configure:11976: checking how to produce PIC code" >&5
11976 wl=
11977
11978 can_build_shared=yes
11979 if test "$XEGCC" = yes; then
11980   wl='-Wl,'
11981
11982   case "$xehost_os" in
11983   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
11984     # PIC is the default for these OSes.
11985     ;;
11986
11987   os2*)
11988     # We can build DLLs from non-PIC.
11989     ;;
11990   amigaos*)
11991     # FIXME: we need at least 68020 code to build shared libraries, but
11992     # adding the `-m68020' flag to GCC prevents building anything better,
11993     # like `-m68040'.
11994     dll_cflags='-m68020 -resident32 -malways-restore-a4'
11995     ;;
11996   *)
11997     dll_cflags='-fPIC'
11998     ;;
11999   esac
12000 else
12001   # PORTME Check for PIC flags for the system compiler.
12002   case "$xehost_os" in
12003   hpux9* | hpux10*)
12004     # Is there a better link_static_flag that works with the bundled CC?
12005     wl='-Wl,'
12006     dll_cflags='+Z'
12007     ;;
12008
12009   irix5* | irix6*)
12010     wl='-Wl,'
12011     # PIC (with -KPIC) is the default.
12012     ;;
12013
12014   os2*)
12015     # We can build DLLs from non-PIC.
12016     ;;
12017
12018   osf3* | osf4*)
12019     # All OSF/1 code is PIC.
12020     wl='-Wl,'
12021     ;;
12022
12023   sco3.2v5*)
12024     dll_cflags='-belf -Kpic'
12025     wl='-Wl,'
12026     ;;
12027
12028   unixware*)
12029     dll_cflags="-KPIC"
12030     wl="-Wl,"
12031     ;;
12032
12033   sysv4*)
12034     dll_cflags="-KPIC"
12035     wl="-Wl,"
12036     ;;
12037
12038   sysv5*)
12039     dll_cflags="-KPIC"
12040     wl="-Wl,"
12041     ;;
12042
12043   solaris2*)
12044     dll_cflags='-KPIC'
12045     wl='-Wl,'
12046     ;;
12047
12048   sunos4*)
12049     dll_cflags='-PIC'
12050     wl='-Qoption ld '
12051     ;;
12052
12053   uts4*)
12054     dll_cflags='-pic'
12055     ;;
12056
12057   *)
12058     can_build_shared=no
12059     ;;
12060   esac
12061 fi
12062
12063 if test -n "$dll_cflags"; then
12064   echo "$ac_t""${dll_cflags}" 1>&6
12065   
12066   # Check to make sure the dll_cflags actually works.
12067   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12068 echo "configure:12069: checking if PIC flag ${dll_cflags} really works" >&5
12069   save_CFLAGS="$CFLAGS"
12070   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12071   cat > conftest.$ac_ext <<EOF
12072 #line 12073 "configure"
12073 #include "confdefs.h"
12074
12075 int main() {
12076 int x=0;
12077 ; return 0; }
12078 EOF
12079 if { (eval echo configure:12080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12080   rm -rf conftest*
12081   
12082     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12083     # reports no error.  So, we need to grep stderr for (Bundled).
12084     if grep '(Bundled)' config.log >/dev/null; then
12085       echo "$ac_t""no" 1>&6
12086       can_build_shared=no
12087       dll_cflags=
12088     else
12089       echo "$ac_t""yes" 1>&6
12090     fi
12091 else
12092   echo "configure: failed program was:" >&5
12093   cat conftest.$ac_ext >&5
12094   rm -rf conftest*
12095   echo "$ac_t""no" 1>&6
12096     can_build_shared=no
12097     dll_cflags=
12098 fi
12099 rm -f conftest*
12100   CFLAGS="$save_CFLAGS"
12101 else
12102   echo "$ac_t""none" 1>&6
12103 fi
12104
12105 if test "$can_build_shared" = "yes"; then
12106 cc_produces_so=no
12107 xldf=
12108 xcldf=
12109 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12110 echo "configure:12111: checking if C compiler can produce shared libraries" >&5
12111 if test "$XEGCC" = yes; then
12112   xcldf="-shared"
12113   xldf="-shared"
12114 else # Not using GCC
12115   case "$xehost_os" in
12116     aix3* | aix4*)
12117       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12118       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12119       ;;
12120
12121     freebsd2* | netbsd* | openbsd*)
12122       xldf="-Bshareable"
12123       xcldf="${wl}-Bshareable"
12124       ;;
12125
12126     freebsd3*)
12127       xcldf="-shared"
12128       ;;
12129
12130     hpux*)
12131       xldf="-b +s"
12132       xcldf="${wl}-b ${wl}+s"
12133       ;;
12134
12135     irix5* | irix6* | osf3* | osf4*)
12136       xcldf="${wl}-shared"
12137       xldf="-shared"
12138       ;;
12139
12140     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12141       xcldf="-G"
12142       xldf="-G"
12143       ;;
12144
12145     sunos4*)
12146       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12147       xldf="-assert pure-text -Bstatic"
12148       ;;
12149   esac
12150 fi # End if if we are using gcc
12151
12152 if test -n "$xcldf"; then
12153   save_LDFLAGS=$LDFLAGS
12154   save_LIBS=$LIBS
12155   save_xe_libs=$xe_libs
12156   LDFLAGS="$xcldf $LDFLAGS"
12157   LIBS=
12158   xe_libs=
12159   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12160   cat > conftest.$ac_ext <<EOF
12161 #line 12162 "configure"
12162 #include "confdefs.h"
12163
12164 int main() {
12165 int x=0;
12166 ; return 0; }
12167 EOF
12168 if { (eval echo configure:12169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12169   rm -rf conftest*
12170   cc_produces_so=yes
12171 else
12172   echo "configure: failed program was:" >&5
12173   cat conftest.$ac_ext >&5
12174   rm -rf conftest*
12175   cc_produces_so=no
12176 fi
12177 rm -f conftest*
12178   LDFLAGS=$save_LDFLAGS
12179   LIBS=$save_LIBS
12180   xe_libs=$save_xe_libs
12181   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12182 else
12183   cc_produces_so=no
12184 fi
12185 echo "$ac_t""${cc_produces_so}" 1>&6
12186
12187 LTLD=$LD
12188 if test -z "$LTLD"; then
12189   ac_prog=ld
12190   if test "$XEGCC" = yes; then
12191     # Check if gcc -print-prog-name=ld gives a path.
12192     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12193 echo "configure:12194: checking for ld used by GCC" >&5
12194     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12195     case "$ac_prog" in
12196     # Accept absolute paths.
12197     /*)
12198       if test -z "$LTLD"; then
12199         case "$ac_prog" in
12200           *gcc-lib*) LTLD="$CC"
12201                      ;;
12202           *)         LTLD="$ac_prog"
12203                      ;;
12204         esac
12205       fi
12206       ;;
12207     "")
12208       # If it fails, then pretend we aren't using GCC.
12209       ac_prog=ld
12210       ;;
12211     *)
12212       # If it is relative, then search for the first ld in PATH.
12213       with_gnu_ld=unknown
12214       ;;
12215     esac
12216   else
12217     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12218 echo "configure:12219: checking for GNU ld" >&5
12219   fi
12220
12221   if test -z "$LTLD"; then
12222     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12223     for ac_dir in $PATH; do
12224       test -z "$ac_dir" && ac_dir=.
12225       if test -f "$ac_dir/$ac_prog"; then
12226         LTLD="$ac_dir/$ac_prog"
12227         # Check to see if the program is GNU ld.  I'd rather use --version,
12228         # but apparently some GNU ld's only accept -v.
12229         # Break only if it was the GNU/non-GNU ld that we prefer.
12230         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12231           xe_gnu_ld=yes
12232         else
12233           xe_gnu_ld=no
12234         fi
12235       fi
12236     done
12237     IFS="$ac_save_ifs"
12238   fi
12239
12240   if test -n "$LTLD"; then
12241     echo "$ac_t""${LTLD}" 1>&6
12242   else
12243     echo "$ac_t""no" 1>&6
12244   fi
12245
12246   if test -z "$LTLD" -a "$cc_produces_so" = no; then
12247     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
12248     exit 1
12249   fi
12250 fi
12251
12252 ld_dynamic_link_flags=
12253
12254 # Check to see if it really is or isn't GNU ld.
12255 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
12256 echo "configure:12257: checking if the linker is GNU ld" >&5
12257 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12258 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
12259   xe_gnu_ld=yes
12260 else
12261   xe_gnu_ld=no
12262 fi
12263 echo "$ac_t""${xe_gnu_ld}" 1>&6
12264
12265 case "$xehost_os" in
12266   amigaos* | sunos4*)
12267     # On these operating systems, we should treat GNU ld like the system ld.
12268     gnu_ld_acts_native=yes
12269     ;;
12270   *)
12271     gnu_ld_acts_native=no
12272     ;;
12273 esac
12274
12275 if test "$cc_produces_so" = "yes"; then
12276   dll_ld=$CC
12277   dll_ldflags=$xcldf
12278   can_build_shared=yes
12279 else
12280   # OK - only NOW do we futz about with ld.
12281   # See if the linker supports building shared libraries.
12282   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
12283 echo "configure:12284: checking whether the linker supports shared libraries" >&5
12284   dll_ld=$CC
12285   dll_ldflags=$LDFLAGS
12286   ld_shlibs=yes
12287   can_build_shared=yes
12288   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
12289     # See if GNU ld supports shared libraries.
12290     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12291       dll_ld=$CC
12292       dll_ldflags="-shared"
12293       ld_shlibs=yes
12294     else
12295       ld_shlibs=no
12296     fi
12297   else
12298     # PORTME fill in a description of your system's linker (not GNU ld)
12299     case "$xehost_os" in
12300     aix3*)
12301       dll_ld=$LTLD
12302       dll_ldflags=$xldf
12303       ;;
12304
12305     aix4*)
12306       dll_ldflags=$xcldf
12307       ;;
12308
12309     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12310     # support.  Future versions do this automatically, but an explicit c++rt0.o
12311     # doesn't break anything, and helps significantly (at the cost of a little
12312     # extra space).
12313     freebsd2.2*)
12314       dll_ld=$LTLD
12315       dll_ldflags=$xldf
12316       dll_post="/usr/lib/c++rt0.o"
12317       ;;
12318
12319     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
12320     freebsd2*)
12321       dll_ld=$LTLD
12322       dll_ldflags="-Bshareable"
12323       ;;
12324
12325     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
12326     freebsd3*)
12327       dll_ldflags="-shared"
12328       ;;
12329
12330     hpux*)
12331       dll_ld=$LTLD
12332       dll_ldflags=$xldf
12333       ;;
12334
12335     irix5* | irix6*)
12336       dll_ld=$LTLD
12337       dll_ldflags=$xldf
12338       ;;
12339
12340     netbsd*)
12341       # Tested with NetBSD 1.2 ld
12342       dll_ld=$LTLD
12343       dll_ldflags=$xldf
12344       ;;
12345
12346     openbsd*)
12347       dll_ld=$LTLD
12348       dll_ldflags=$xldf
12349       ;;
12350
12351     osf3* | osf4*)
12352       dll_ld=$LTLD
12353       dll_ldflags=$xldf
12354       ;;
12355
12356     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
12357     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
12358       dll_ld=$LTLD
12359       case "$dll_ld" in
12360         *gcc*) dll_ldflags="-shared"
12361                dll_ld=$CC
12362                ;;
12363         *)     dll_ldflags="-G"
12364                ;;
12365       esac
12366       ;;
12367
12368     sunos4*)
12369       if test "$XEGCC" = yes; then
12370         dll_ld=$CC
12371       else
12372         dll_ld=$LTLD
12373       fi
12374       dll_ldflags=$xldf
12375       ;;
12376
12377     uts4*)
12378       dll_ld=$LTLD
12379       dll_ldflags="-G"
12380       ;;
12381
12382     bsdi*)
12383       dll_ldflags="-r"
12384       dll_ld="shlicc2"
12385       ;;
12386
12387     *)
12388       ld_shlibs=no
12389       can_build_shared=no
12390       ;;
12391     esac
12392   fi
12393   echo "$ac_t""${ld_shlibs}" 1>&6
12394   if test "$ld_shlibs" = "no"; then
12395     can_build_shared=no
12396   fi
12397 fi # End of if cc_produces_so = no
12398
12399
12400 if test "$xe_gnu_ld" = yes; then
12401   if test "$ld_shlibs" = yes; then
12402     ld_dynamic_link_flags="${wl}-export-dynamic"
12403   fi
12404 fi
12405
12406 if test -z "$ld_dynamic_link_flags"; then
12407   case "$xehost_os" in
12408   aix3*)
12409     ld_dynamic_link_flags=
12410     ;;
12411
12412   aix4*)
12413     ld_dynamic_link_flags=
12414     ;;
12415
12416   freebsd2.2*)
12417     ld_dynamic_link_flags=
12418     ;;
12419
12420   freebsd2*)
12421     ld_dynamic_link_flags=
12422     ;;
12423
12424   freebsd3*)
12425     ld_dynamic_link_flags=
12426     ;;
12427
12428   hpux*)
12429     ld_dynamic_link_flags="${wl}-E"
12430     ;;
12431
12432   irix5* | irix6*)
12433     ld_dynamic_link_flags=
12434     ;;
12435
12436   netbsd*)
12437     ld_dynamic_link_flags=
12438     ;;
12439
12440   openbsd*)
12441     ld_dynamic_link_flags=
12442     ;;
12443
12444   osf3* | osf4*)
12445     ld_dynamic_link_flags=
12446     ;;
12447
12448   sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
12449     ld_dynamic_link_flags="${wl}-Bexport"
12450     ;;
12451
12452   sunos4*)
12453     ld_dynamic_link_flags=
12454     ;;
12455
12456   uts4*)
12457     ld_dynamic_link_flags=
12458     ;;
12459
12460   bsdi*)
12461     ld_dynamic_link_flags=
12462     ;;
12463
12464   esac
12465 fi # End of if -z ld_dynamic_link_flags
12466 fi # End of if test "$can_build_shared" = "yes"
12467
12468
12469
12470
12471
12472
12473
12474
12475   if test "$can_build_shared" = "yes"; then
12476     { test "$extra_verbose" = "yes" && cat << \EOF
12477     Defining HAVE_SHLIB
12478 EOF
12479 cat >> confdefs.h <<\EOF
12480 #define HAVE_SHLIB 1
12481 EOF
12482 }
12483
12484     extra_objs="$extra_objs sysdll.o" &&  if test "$extra_verbose" = "yes"; then
12485    echo "    xemacs will be linked with \"sysdll.o\""
12486  fi
12487     extra_objs="$extra_objs emodules.o" &&  if test "$extra_verbose" = "yes"; then
12488    echo "    xemacs will be linked with \"emodules.o\""
12489  fi
12490     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
12491     test ! -z "$DLL_LIB" && LIBS="-l${DLL_LIB} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${DLL_LIB}\" to \$LIBS"; fi
12492     for ac_func in dlerror _dlerror
12493 do
12494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12495 echo "configure:12496: checking for $ac_func" >&5
12496
12497 cat > conftest.$ac_ext <<EOF
12498 #line 12499 "configure"
12499 #include "confdefs.h"
12500 /* System header to define __stub macros and hopefully few prototypes,
12501     which can conflict with char $ac_func(); below.  */
12502 #include <assert.h>
12503 /* Override any gcc2 internal prototype to avoid an error.  */
12504 /* We use char because int might match the return type of a gcc2
12505     builtin and then its argument prototype would still apply.  */
12506 char $ac_func();
12507
12508 int main() {
12509
12510 /* The GNU C library defines this for functions which it implements
12511     to always fail with ENOSYS.  Some functions are actually named
12512     something starting with __ and the normal name is an alias.  */
12513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12514 choke me
12515 #else
12516 $ac_func();
12517 #endif
12518
12519 ; return 0; }
12520 EOF
12521 if { (eval echo configure:12522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12522   rm -rf conftest*
12523   eval "ac_cv_func_$ac_func=yes"
12524 else
12525   echo "configure: failed program was:" >&5
12526   cat conftest.$ac_ext >&5
12527   rm -rf conftest*
12528   eval "ac_cv_func_$ac_func=no"
12529 fi
12530 rm -f conftest*
12531
12532 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12533   echo "$ac_t""yes" 1>&6
12534     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12535   { test "$extra_verbose" = "yes" && cat << EOF
12536     Defining $ac_tr_func
12537 EOF
12538 cat >> confdefs.h <<EOF
12539 #define $ac_tr_func 1
12540 EOF
12541 }
12542  
12543 else
12544   echo "$ac_t""no" 1>&6
12545 fi
12546 done
12547
12548   else
12549     echo "configure: warning: disabling shared library support" 1>&2
12550     with_shlib=no
12551   fi
12552 fi
12553
12554 cat > conftest.$ac_ext <<EOF
12555 #line 12556 "configure"
12556 #include "confdefs.h"
12557 int main(int c,char *v[]){return 0;}
12558 EOF
12559 if { (eval echo configure:12560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12560 then
12561   :
12562 else
12563   conftest_rc="$?"
12564   echo "configure: failed program was:" >&5
12565   cat conftest.$ac_ext >&5
12566   rm -fr conftest*
12567   
12568   echo ""
12569   echo "*** PANIC *** The C compiler can no longer build working executables."
12570   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
12571   echo "*** PANIC *** The most likely reason for this problem is that configure"
12572   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
12573   echo "*** PANIC *** found at run time."
12574   echo "*** PANIC ***"
12575   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
12576   echo "*** PANIC *** On other systems, try telling configure where to find the"
12577   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
12578   echo "*** PANIC ***"
12579   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
12580   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
12581   echo "*** PANIC *** on your system.  Don't do that."
12582   exit 1
12583 fi
12584 rm -fr conftest*
12585
12586
12587 { test "$extra_verbose" = "yes" && cat << \EOF
12588     Defining HAVE_UNIX_PROCESSES
12589 EOF
12590 cat >> confdefs.h <<\EOF
12591 #define HAVE_UNIX_PROCESSES 1
12592 EOF
12593 }
12594
12595 extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
12596    echo "    xemacs will be linked with \"process-unix.o\""
12597  fi
12598
12599
12600
12601 T=""
12602 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12603 CFLAGS="$T"
12604
12605
12606 T=""
12607 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12608 extra_objs="$T"
12609
12610
12611 T=""
12612 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
12613 c_switch_general="$T"
12614
12615
12616 T=""
12617 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12618 c_switch_window_system="$T"
12619
12620
12621 T=""
12622 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12623 c_switch_all="$T"
12624
12625
12626 T=""
12627 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
12628 ld_switch_general="$T"
12629
12630
12631 T=""
12632 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12633 ld_switch_window_system="$T"
12634
12635
12636 T=""
12637 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12638 ld_switch_all="$T"
12639
12640
12641 T=""
12642 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12643 ld_libs_general="$T"
12644
12645
12646 T=""
12647 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
12648 ld_libs_window_system="$T"
12649
12650
12651 T=""
12652 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12653 ld_libs_all="$T"
12654
12655
12656
12657 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
12658 internal_makefile_list="Makefile.in"
12659 SUBDIR_MAKEFILES=''
12660 test -d lock || mkdir lock
12661 for dir in $MAKE_SUBDIR; do
12662   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
12663         test -d "$d" || mkdir "$d"; cd "$d"
12664       done ) ;;
12665    * ) test -d "$dir" || mkdir "$dir" ;;
12666   esac
12667   
12668 T=""
12669 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12670 SUBDIR_MAKEFILES="$T"
12671
12672   
12673 T=""
12674 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12675 internal_makefile_list="$T"
12676
12677 done
12678
12679
12680
12681
12682 for dir in src/s src/m; do
12683   if test ! -d "$dir" ; then
12684     echo Making symbolic link to "$srcdir/$dir"
12685     ${LN_S} "$srcdir/$dir" "$dir"
12686   fi
12687 done
12688
12689 if test "$extra_verbose" = "yes"; then
12690   echo ""
12691   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
12692   echo ""
12693 fi
12694
12695 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
12696   echo "creating src/gdbinit"; echo ""
12697   echo "source $srcdir/src/gdbinit" > src/gdbinit
12698 fi
12699
12700 if test "$__SUNPRO_C" = "yes"; then
12701   echo "creating .sbinit"; echo ""
12702   ( echo "# For use with Sun WorkShop's Source browser."
12703     echo "# See sbquery(1) and sbinit(4) for more information"
12704     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
12705   ) > .sbinit
12706 fi
12707
12708 rm -f core
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725 PREFIX=$prefix
12726 while true; do
12727   case "$PREFIX" in
12728     *\$* ) eval "PREFIX=$PREFIX" ;;
12729     *) break ;;
12730   esac
12731 done
12732
12733
12734
12735 EXEC_PREFIX=$exec_prefix
12736 while true; do
12737   case "$EXEC_PREFIX" in
12738     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
12739     *) break ;;
12740   esac
12741 done
12742
12743
12744
12745
12746 INFODIR=$infodir
12747 while true; do
12748   case "$INFODIR" in
12749     *\$* ) eval "INFODIR=$INFODIR" ;;
12750     *) break ;;
12751   esac
12752 done
12753
12754
12755
12756
12757 INFOPATH=$infopath
12758 while true; do
12759   case "$INFOPATH" in
12760     *\$* ) eval "INFOPATH=$INFOPATH" ;;
12761     *) break ;;
12762   esac
12763 done
12764
12765
12766
12767
12768 PACKAGE_PATH=$package_path
12769 while true; do
12770   case "$PACKAGE_PATH" in
12771     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
12772     *) break ;;
12773   esac
12774 done
12775
12776
12777
12778
12779 LISPDIR=$lispdir
12780 while true; do
12781   case "$LISPDIR" in
12782     *\$* ) eval "LISPDIR=$LISPDIR" ;;
12783     *) break ;;
12784   esac
12785 done
12786
12787
12788
12789
12790 MODULEDIR=$moduledir
12791 while true; do
12792   case "$MODULEDIR" in
12793     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
12794     *) break ;;
12795   esac
12796 done
12797
12798
12799
12800
12801 SITELISPDIR=$sitelispdir
12802 while true; do
12803   case "$SITELISPDIR" in
12804     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
12805     *) break ;;
12806   esac
12807 done
12808
12809
12810
12811
12812 SITEMODULEDIR=$sitemoduledir
12813 while true; do
12814   case "$SITEMODULEDIR" in
12815     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
12816     *) break ;;
12817   esac
12818 done
12819
12820
12821
12822
12823 ETCDIR=$etcdir
12824 while true; do
12825   case "$ETCDIR" in
12826     *\$* ) eval "ETCDIR=$ETCDIR" ;;
12827     *) break ;;
12828   esac
12829 done
12830
12831
12832
12833
12834 LOCKDIR=$lockdir
12835 while true; do
12836   case "$LOCKDIR" in
12837     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
12838     *) break ;;
12839   esac
12840 done
12841
12842
12843
12844
12845 ARCHLIBDIR=$archlibdir
12846 while true; do
12847   case "$ARCHLIBDIR" in
12848     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
12849     *) break ;;
12850   esac
12851 done
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
12873
12874
12875
12876
12877
12878
12879
12880 : ${XEMACS_CC:=$CC}
12881
12882
12883
12884 if test "$with_site_lisp" = "no"; then
12885   { test "$extra_verbose" = "yes" && cat << \EOF
12886     Defining INHIBIT_SITE_LISP
12887 EOF
12888 cat >> confdefs.h <<\EOF
12889 #define INHIBIT_SITE_LISP 1
12890 EOF
12891 }
12892
12893 fi
12894 if test "$with_site_modules" = "no"; then
12895   { test "$extra_verbose" = "yes" && cat << \EOF
12896     Defining INHIBIT_SITE_MODULES
12897 EOF
12898 cat >> confdefs.h <<\EOF
12899 #define INHIBIT_SITE_MODULES 1
12900 EOF
12901 }
12902
12903 fi
12904
12905
12906 T=""
12907 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12908 ac_configure_args="$T"
12909
12910 { test "$extra_verbose" = "yes" && cat << EOF
12911     Defining EMACS_CONFIGURATION = "$canonical"
12912 EOF
12913 cat >> confdefs.h <<EOF
12914 #define EMACS_CONFIGURATION "$canonical"
12915 EOF
12916 }
12917
12918 { test "$extra_verbose" = "yes" && cat << EOF
12919     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
12920 EOF
12921 cat >> confdefs.h <<EOF
12922 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
12923 EOF
12924 }
12925
12926 { test "$extra_verbose" = "yes" && cat << EOF
12927     Defining config_machfile = "$machfile"
12928 EOF
12929 cat >> confdefs.h <<EOF
12930 #define config_machfile "$machfile"
12931 EOF
12932 }
12933
12934 { test "$extra_verbose" = "yes" && cat << EOF
12935     Defining config_opsysfile = "$opsysfile"
12936 EOF
12937 cat >> confdefs.h <<EOF
12938 #define config_opsysfile "$opsysfile"
12939 EOF
12940 }
12941
12942
12943
12944 null_string=""
12945 { test "$extra_verbose" = "yes" && cat << EOF
12946     Defining LD_SWITCH_X_SITE = $null_string
12947 EOF
12948 cat >> confdefs.h <<EOF
12949 #define LD_SWITCH_X_SITE $null_string
12950 EOF
12951 }
12952
12953 { test "$extra_verbose" = "yes" && cat << EOF
12954     Defining LD_SWITCH_X_SITE_AUX = $null_string
12955 EOF
12956 cat >> confdefs.h <<EOF
12957 #define LD_SWITCH_X_SITE_AUX $null_string
12958 EOF
12959 }
12960
12961 { test "$extra_verbose" = "yes" && cat << EOF
12962     Defining C_SWITCH_X_SITE = $null_string
12963 EOF
12964 cat >> confdefs.h <<EOF
12965 #define C_SWITCH_X_SITE $null_string
12966 EOF
12967 }
12968
12969 { test "$extra_verbose" = "yes" && cat << EOF
12970     Defining LD_SWITCH_SITE = $null_string
12971 EOF
12972 cat >> confdefs.h <<EOF
12973 #define LD_SWITCH_SITE $null_string
12974 EOF
12975 }
12976
12977 { test "$extra_verbose" = "yes" && cat << EOF
12978     Defining C_SWITCH_SITE = $null_string
12979 EOF
12980 cat >> confdefs.h <<EOF
12981 #define C_SWITCH_SITE $null_string
12982 EOF
12983 }
12984
12985
12986
12987 test -n "$puresize" && { test "$extra_verbose" = "yes" && cat << EOF
12988     Defining RAW_PURESIZE = $puresize
12989 EOF
12990 cat >> confdefs.h <<EOF
12991 #define RAW_PURESIZE $puresize
12992 EOF
12993 }
12994
12995
12996 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
12997     Defining GNU_MALLOC
12998 EOF
12999 cat >> confdefs.h <<\EOF
13000 #define GNU_MALLOC 1
13001 EOF
13002 }
13003
13004 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13005     Defining USE_SYSTEM_MALLOC
13006 EOF
13007 cat >> confdefs.h <<\EOF
13008 #define USE_SYSTEM_MALLOC 1
13009 EOF
13010 }
13011
13012 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13013     Defining USE_DEBUG_MALLOC
13014 EOF
13015 cat >> confdefs.h <<\EOF
13016 #define USE_DEBUG_MALLOC 1
13017 EOF
13018 }
13019
13020                                               { test "$extra_verbose" = "yes" && cat << \EOF
13021     Defining USE_SYSTEM_MALLOC
13022 EOF
13023 cat >> confdefs.h <<\EOF
13024 #define USE_SYSTEM_MALLOC 1
13025 EOF
13026 }
13027
13028 fi
13029 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13030     Defining I18N3
13031 EOF
13032 cat >> confdefs.h <<\EOF
13033 #define I18N3 1
13034 EOF
13035 }
13036
13037 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13038     Defining USE_GCC
13039 EOF
13040 cat >> confdefs.h <<\EOF
13041 #define USE_GCC 1
13042 EOF
13043 }
13044
13045 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13046     Defining EXTERNAL_WIDGET
13047 EOF
13048 cat >> confdefs.h <<\EOF
13049 #define EXTERNAL_WIDGET 1
13050 EOF
13051 }
13052
13053 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13054     Defining NO_DOC_FILE
13055 EOF
13056 cat >> confdefs.h <<\EOF
13057 #define NO_DOC_FILE 1
13058 EOF
13059 }
13060
13061 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13062     Defining PURIFY
13063 EOF
13064 cat >> confdefs.h <<\EOF
13065 #define PURIFY 1
13066 EOF
13067 }
13068
13069 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13070     Defining QUANTIFY
13071 EOF
13072 cat >> confdefs.h <<\EOF
13073 #define QUANTIFY 1
13074 EOF
13075 }
13076
13077 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13078     Defining MAIL_USE_POP
13079 EOF
13080 cat >> confdefs.h <<\EOF
13081 #define MAIL_USE_POP 1
13082 EOF
13083 }
13084
13085 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13086     Defining KERBEROS
13087 EOF
13088 cat >> confdefs.h <<\EOF
13089 #define KERBEROS 1
13090 EOF
13091 }
13092
13093 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13094     Defining HESIOD
13095 EOF
13096 cat >> confdefs.h <<\EOF
13097 #define HESIOD 1
13098 EOF
13099 }
13100
13101 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13102     Defining USE_UNION_TYPE
13103 EOF
13104 cat >> confdefs.h <<\EOF
13105 #define USE_UNION_TYPE 1
13106 EOF
13107 }
13108
13109
13110
13111 (
13112 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13113 else
13114   echo "uname -a: `uname -a`"
13115 fi
13116 echo ""
13117 echo "$0 $quoted_arguments"
13118 ) > Installation
13119
13120 xemacs_betaname=""
13121 test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}"
13122
13123 (
13124 echo "
13125
13126 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13127
13128   Where should the build process find the source code?    $srcdir
13129   What installation prefix should install use?            $prefix
13130   What operating system and machine description files should XEmacs use?
13131         \`$opsysfile' and \`$machfile'
13132   What compiler should XEmacs be built with?              $CC $CFLAGS
13133   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13134   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13135   What window system should XEmacs use?                   ${window_system}"
13136 if test "$with_x11" = "yes"; then
13137   echo "  Where do we find X Windows header files?                $x_includes"
13138   echo "  Where do we find X Windows libraries?                   $x_libraries"
13139 fi
13140 if test -n "$site_includes"; then
13141   echo "  Additional header files:                                $site_includes"
13142 fi
13143 if test -n "$site_libraries"; then
13144   echo "  Additional libraries:                                   $site_libraries"
13145 fi
13146 if test -n "$site_prefixes"; then
13147   echo "  Additional prefixes:                                    $site_prefixes"
13148 fi
13149 if test -n "$runpath"; then
13150   echo "  Runtime library search path:                            $runpath"
13151 fi
13152 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13153 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13154 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13155 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13156   echo "  No Xmu; substituting equivalent routines."
13157 fi
13158
13159 if test "$with_xpm" = yes; then
13160   echo "  Compiling in support for XPM images."
13161 elif test "$with_x11" = yes; then
13162   echo "  --------------------------------------------------------------------"
13163   echo "  WARNING: Compiling without XPM support."
13164   if test "$xpm_problem" != ""; then
13165     echo "  Reason: $xpm_problem"
13166   fi
13167   echo "  WARNING: You should strongly consider installing XPM."
13168   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13169   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13170   echo "  --------------------------------------------------------------------"
13171 fi
13172 if test "$with_png" = yes; then
13173   echo "  Compiling in support for PNG image handling."
13174 elif test "$window_system" != "none"; then
13175   echo "  --------------------------------------------------------------------"
13176   echo "  WARNING: Compiling without PNG image support."
13177   if test "$png_problem" != ""; then
13178     echo "  Reason: $png_problem"
13179   fi
13180   echo "  WARNING: You should strongly consider installing the PNG libraries."
13181   echo "  WARNING: Otherwise certain images and glyphs may not display."
13182   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13183   echo "  --------------------------------------------------------------------"
13184 fi
13185 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
13186 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
13187 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
13188 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
13189 case "$with_sound" in
13190   nas    ) echo "  Compiling in network sound (NAS) support." ;;
13191   native ) echo "  Compiling in native sound support." ;;
13192   both   ) echo "  Compiling in both network and native sound support." ;;
13193 esac
13194 test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously."
13195
13196 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
13197 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
13198 test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
13199
13200 test "$with_umich_ldap"      = yes && echo "  Compiling in support for LDAP (UMich libs)."
13201 test "$with_ns_ldap"         = yes && echo "  Compiling in support for LDAP (Netscape SDK)."
13202 test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo "  Compiling in support for LDAP (Generic)."
13203
13204 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
13205 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
13206
13207 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
13208 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
13209 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
13210 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
13211 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
13212 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
13213 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
13214 if test "$with_wnn" = yes; then
13215   echo "  Compiling in support for the WNN input method on Mule."
13216   test "$with_wnn6" = yes && echo "    Using WNN version 6."
13217 fi
13218 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
13219
13220 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
13221 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
13222 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
13223 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
13224 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
13225 test "$with_session"  != no && echo "  Compiling in support for proper session-management."
13226 case "$with_menubars" in
13227   lucid ) echo "  Using Lucid menubars." ;;
13228   motif ) echo "  Using Motif menubars."
13229           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
13230           echo "             We recommend using the Lucid menubar instead."
13231           echo "             Re-run configure with --with-menubars='lucid'." ;;
13232 esac
13233 case "$with_scrollbars" in
13234   lucid    ) echo "  Using Lucid scrollbars."     ;;
13235   motif    ) echo "  Using Motif scrollbars."     ;;
13236   athena   ) echo "  Using Athena scrollbars."    ;;
13237   athena3d ) echo "  Using Athena-3d scrollbars." ;;
13238 esac
13239 case "$with_dialogs" in
13240   motif    )
13241     echo "  Using Motif dialog boxes."
13242     if test "$unexec" = "unexaix.o" -a `uname -v` = 4 -a `uname -r` -ge 3; then
13243       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
13244       echo "             We recommend using the Athena dialog boxes instead."
13245       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
13246       echo "             Read the PROBLEMS file for more information."
13247     fi  
13248     ;;
13249   athena   ) echo "  Using Athena dialog boxes."    ;;
13250   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
13251 esac
13252 test "$with_shlib" = "yes" && echo "  Compiling in DLL support."
13253 test "$with_clash_detection" = yes && \
13254   echo "  Clash detection will use \"$lockdir\" for locking files."
13255 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
13256 test "$with_pop"        = yes && echo "  Using POP for mail access."
13257 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
13258 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
13259 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
13260 test "$use_minimal_tagbits" = yes && echo "  Using Lisp_Objects with minimal tagbits."
13261 test "$use_indexed_lrecord_implementation" = yes && echo "  Using indexed lrecord implementation."
13262 test "$debug"              = yes && echo "  Compiling in extra code for debugging."
13263 test "$memory_usage_stats" = yes && echo "  Compiling in code for checking XEmacs memory usage."
13264 test "$usage_tracking"     = yes && echo "  Compiling with usage tracking active (Sun internal)."
13265 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
13266   != "no no no no no"; then
13267   echo "  WARNING: ---------------------------------------------------------"
13268   echo "  WARNING: Compiling in support for runtime error checking."
13269   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
13270   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
13271   echo "  WARNING: ---------------------------------------------------------"
13272 fi
13273 echo ""
13274 ) | tee -a Installation
13275 echo ""
13276
13277 echo '(setq Installation-string "' > Installation.el
13278 sed 's/"/\\"/g' Installation >> Installation.el
13279 echo '")' >> Installation.el
13280
13281
13282 # Remove any trailing slashes in these variables.
13283 test -n "$prefix" &&
13284   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13285 test -n "$exec_prefix" &&
13286   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13287
13288
13289 for file in $internal_makefile_list; do
13290   test "$file" = src/Makefile.in && \
13291     file="src/Makefile.in:src/Makefile.in.in:src/depend"
13292   ac_output_files="${ac_output_files+$ac_output_files }$file"
13293 done
13294 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
13295 if test "$with_shlib" = "yes"; then
13296   ac_output_files="$ac_output_files lib-src/ellcc.h"
13297 fi
13298
13299 trap '' 1 2 15
13300
13301 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13302
13303 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13304 # Let make expand exec_prefix.
13305 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13306
13307 # Any assignment to VPATH causes Sun make to only execute
13308 # the first set of double-colon rules, so remove it if not needed.
13309 # If there is a colon in the path, we need to keep it.
13310 if test "x$srcdir" = x.; then
13311   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13312 fi
13313
13314 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13315
13316 DEFS=-DHAVE_CONFIG_H
13317
13318 # Without the "./", some shells look in PATH for config.status.
13319 : ${CONFIG_STATUS=./config.status}
13320
13321 echo creating $CONFIG_STATUS
13322 rm -f $CONFIG_STATUS
13323 cat > $CONFIG_STATUS <<EOF
13324 #! /bin/sh
13325 # Generated automatically by configure.
13326 # Run this file to recreate the current configuration.
13327 # This directory was configured as follows,
13328 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13329 #
13330 # $0 $ac_configure_args
13331 #
13332 # Compiler output produced by configure, useful for debugging
13333 # configure, is in ./config.log if it exists.
13334
13335 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13336 for ac_option
13337 do
13338   case "\$ac_option" in
13339   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13340     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13341     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13342   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13343     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13344     exit 0 ;;
13345   -help | --help | --hel | --he | --h)
13346     echo "\$ac_cs_usage"; exit 0 ;;
13347   *) echo "\$ac_cs_usage"; exit 1 ;;
13348   esac
13349 done
13350
13351 ac_given_srcdir=$srcdir
13352 ac_given_INSTALL="$INSTALL"
13353
13354 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13355 EOF
13356 cat >> $CONFIG_STATUS <<EOF
13357
13358 # Protect against being on the right side of a sed subst in config.status.
13359 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13360  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13361 $ac_vpsub
13362 $extrasub
13363 s%@SHELL@%$SHELL%g
13364 s%@CFLAGS@%$CFLAGS%g
13365 s%@CPPFLAGS@%$CPPFLAGS%g
13366 s%@CXXFLAGS@%$CXXFLAGS%g
13367 s%@FFLAGS@%$FFLAGS%g
13368 s%@DEFS@%$DEFS%g
13369 s%@LDFLAGS@%$LDFLAGS%g
13370 s%@LIBS@%$LIBS%g
13371 s%@exec_prefix@%$exec_prefix%g
13372 s%@prefix@%$prefix%g
13373 s%@program_transform_name@%$program_transform_name%g
13374 s%@bindir@%$bindir%g
13375 s%@sbindir@%$sbindir%g
13376 s%@libexecdir@%$libexecdir%g
13377 s%@datadir@%$datadir%g
13378 s%@sysconfdir@%$sysconfdir%g
13379 s%@sharedstatedir@%$sharedstatedir%g
13380 s%@localstatedir@%$localstatedir%g
13381 s%@libdir@%$libdir%g
13382 s%@includedir@%$includedir%g
13383 s%@oldincludedir@%$oldincludedir%g
13384 s%@infodir@%$infodir%g
13385 s%@mandir@%$mandir%g
13386 s%@LN_S@%$LN_S%g
13387 s%@blddir@%$blddir%g
13388 s%@CC@%$CC%g
13389 s%@CPP@%$CPP%g
13390 s%@start_flags@%$start_flags%g
13391 s%@ld_switch_shared@%$ld_switch_shared%g
13392 s%@start_files@%$start_files%g
13393 s%@ld@%$ld%g
13394 s%@lib_gcc@%$lib_gcc%g
13395 s%@RANLIB@%$RANLIB%g
13396 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13397 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13398 s%@INSTALL_DATA@%$INSTALL_DATA%g
13399 s%@YACC@%$YACC%g
13400 s%@SET_MAKE@%$SET_MAKE%g
13401 s%@X_CFLAGS@%$X_CFLAGS%g
13402 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
13403 s%@X_LIBS@%$X_LIBS%g
13404 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
13405 s%@install_pp@%$install_pp%g
13406 s%@libs_xauth@%$libs_xauth%g
13407 s%@dnd_objs@%$dnd_objs%g
13408 s%@lwlib_objs@%$lwlib_objs%g
13409 s%@ALLOCA@%$ALLOCA%g
13410 s%@dll_ld@%$dll_ld%g
13411 s%@dll_cflags@%$dll_cflags%g
13412 s%@dll_ldflags@%$dll_ldflags%g
13413 s%@dll_post@%$dll_post%g
13414 s%@dll_ldo@%$dll_ldo%g
13415 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
13416 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
13417 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
13418 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
13419 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
13420 s%@PROGNAME@%$PROGNAME%g
13421 s%@version@%$version%g
13422 s%@configuration@%$configuration%g
13423 s%@canonical@%$canonical%g
13424 s%@srcdir@%$srcdir%g
13425 s%@pkgdir@%$pkgdir%g
13426 s%@statedir@%$statedir%g
13427 s%@PREFIX@%$PREFIX%g
13428 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
13429 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
13430 s%@INFODIR@%$INFODIR%g
13431 s%@infopath@%$infopath%g
13432 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
13433 s%@INFOPATH@%$INFOPATH%g
13434 s%@package_path@%$package_path%g
13435 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
13436 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
13437 s%@lispdir@%$lispdir%g
13438 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
13439 s%@LISPDIR@%$LISPDIR%g
13440 s%@moduledir@%$moduledir%g
13441 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
13442 s%@MODULEDIR@%$MODULEDIR%g
13443 s%@sitelispdir@%$sitelispdir%g
13444 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
13445 s%@SITELISPDIR@%$SITELISPDIR%g
13446 s%@sitemoduledir@%$sitemoduledir%g
13447 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
13448 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
13449 s%@etcdir@%$etcdir%g
13450 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
13451 s%@ETCDIR@%$ETCDIR%g
13452 s%@lockdir@%$lockdir%g
13453 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
13454 s%@LOCKDIR@%$LOCKDIR%g
13455 s%@archlibdir@%$archlibdir%g
13456 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
13457 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
13458 s%@docdir@%$docdir%g
13459 s%@bitmapdir@%$bitmapdir%g
13460 s%@extra_objs@%$extra_objs%g
13461 s%@machfile@%$machfile%g
13462 s%@opsysfile@%$opsysfile%g
13463 s%@c_switch_general@%$c_switch_general%g
13464 s%@c_switch_window_system@%$c_switch_window_system%g
13465 s%@c_switch_all@%$c_switch_all%g
13466 s%@ld_switch_general@%$ld_switch_general%g
13467 s%@ld_switch_window_system@%$ld_switch_window_system%g
13468 s%@ld_switch_all@%$ld_switch_all%g
13469 s%@ld_libs_general@%$ld_libs_general%g
13470 s%@ld_libs_window_system@%$ld_libs_window_system%g
13471 s%@ld_libs_all@%$ld_libs_all%g
13472 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
13473 s%@native_sound_lib@%$native_sound_lib%g
13474 s%@sound_cflags@%$sound_cflags%g
13475 s%@dynodump_arch@%$dynodump_arch%g
13476 s%@XEMACS_CC@%$XEMACS_CC%g
13477 s%@internal_makefile_list@%$internal_makefile_list%g
13478
13479 CEOF
13480 EOF
13481
13482 cat >> $CONFIG_STATUS <<\EOF
13483
13484 # Split the substitutions into bite-sized pieces for seds with
13485 # small command number limits, like on Digital OSF/1 and HP-UX.
13486 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13487 ac_file=1 # Number of current file.
13488 ac_beg=1 # First line for current file.
13489 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13490 ac_more_lines=:
13491 ac_sed_cmds=""
13492 while $ac_more_lines; do
13493   if test $ac_beg -gt 1; then
13494     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13495   else
13496     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13497   fi
13498   if test ! -s conftest.s$ac_file; then
13499     ac_more_lines=false
13500     rm -f conftest.s$ac_file
13501   else
13502     if test -z "$ac_sed_cmds"; then
13503       ac_sed_cmds="sed -f conftest.s$ac_file"
13504     else
13505       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13506     fi
13507     ac_file=`expr $ac_file + 1`
13508     ac_beg=$ac_end
13509     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13510   fi
13511 done
13512 if test -z "$ac_sed_cmds"; then
13513   ac_sed_cmds=cat
13514 fi
13515 EOF
13516
13517 cat >> $CONFIG_STATUS <<EOF
13518
13519 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
13520 EOF
13521 cat >> $CONFIG_STATUS <<\EOF
13522 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13523   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13524   case "$ac_file" in
13525   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13526        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13527   *) ac_file_in="${ac_file}.in" ;;
13528   esac
13529
13530   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13531
13532   # Remove last slash and all that follows it.  Not all systems have dirname.
13533   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13534   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13535     # The file is in a subdirectory.
13536     test ! -d "$ac_dir" && mkdir "$ac_dir"
13537     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13538     # A "../" for each directory in $ac_dir_suffix.
13539     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13540   else
13541     ac_dir_suffix= ac_dots=
13542   fi
13543
13544   case "$ac_given_srcdir" in
13545   .)  srcdir=.
13546       if test -z "$ac_dots"; then top_srcdir=.
13547       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13548   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13549   *) # Relative path.
13550     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13551     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13552   esac
13553
13554   case "$ac_given_INSTALL" in
13555   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13556   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13557   esac
13558
13559   echo creating "$ac_file"
13560   rm -f "$ac_file"
13561   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13562   case "$ac_file" in
13563   *Makefile*) ac_comsub="1i\\
13564 # $configure_input" ;;
13565   *) ac_comsub= ;;
13566   esac
13567
13568   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13569   sed -e "$ac_comsub
13570 s%@configure_input@%$configure_input%g
13571 s%@srcdir@%$srcdir%g
13572 s%@top_srcdir@%$top_srcdir%g
13573 s%@INSTALL@%$INSTALL%g
13574 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13575 fi; done
13576 rm -f conftest.s*
13577
13578 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13579 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13580 #
13581 # ac_d sets the value in "#define NAME VALUE" lines.
13582 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13583 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13584 ac_dC='\3'
13585 ac_dD='%g'
13586 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13587 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13588 ac_uB='\([      ]\)%\1#\2define\3'
13589 ac_uC=' '
13590 ac_uD='\4%g'
13591 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13592 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13593 ac_eB='$%\1#\2define\3'
13594 ac_eC=' '
13595 ac_eD='%g'
13596
13597 if test "${CONFIG_HEADERS+set}" != set; then
13598 EOF
13599 cat >> $CONFIG_STATUS <<EOF
13600   CONFIG_HEADERS="src/config.h lwlib/config.h"
13601 EOF
13602 cat >> $CONFIG_STATUS <<\EOF
13603 fi
13604 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13605   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13606   case "$ac_file" in
13607   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13608        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13609   *) ac_file_in="${ac_file}.in" ;;
13610   esac
13611
13612   echo creating $ac_file
13613
13614   rm -f conftest.frag conftest.in conftest.out
13615   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13616   cat $ac_file_inputs > conftest.in
13617
13618 EOF
13619
13620 # Transform confdefs.h into a sed script conftest.vals that substitutes
13621 # the proper values into config.h.in to produce config.h.  And first:
13622 # Protect against being on the right side of a sed subst in config.status.
13623 # Protect against being in an unquoted here document in config.status.
13624 rm -f conftest.vals
13625 cat > conftest.hdr <<\EOF
13626 s/[\\&%]/\\&/g
13627 s%[\\$`]%\\&%g
13628 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13629 s%ac_d%ac_u%gp
13630 s%ac_u%ac_e%gp
13631 EOF
13632 sed -n -f conftest.hdr confdefs.h > conftest.vals
13633 rm -f conftest.hdr
13634
13635 # This sed command replaces #undef with comments.  This is necessary, for
13636 # example, in the case of _POSIX_SOURCE, which is predefined and required
13637 # on some systems where configure will not decide to define it.
13638 cat >> conftest.vals <<\EOF
13639 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13640 EOF
13641
13642 # Break up conftest.vals because some shells have a limit on
13643 # the size of here documents, and old seds have small limits too.
13644
13645 rm -f conftest.tail
13646 while :
13647 do
13648   ac_lines=`grep -c . conftest.vals`
13649   # grep -c gives empty output for an empty file on some AIX systems.
13650   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13651   # Write a limited-size here document to conftest.frag.
13652   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13653   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13654   echo 'CEOF
13655   sed -f conftest.frag conftest.in > conftest.out
13656   rm -f conftest.in
13657   mv conftest.out conftest.in
13658 ' >> $CONFIG_STATUS
13659   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13660   rm -f conftest.vals
13661   mv conftest.tail conftest.vals
13662 done
13663 rm -f conftest.vals
13664
13665 cat >> $CONFIG_STATUS <<\EOF
13666   rm -f conftest.frag conftest.h
13667   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13668   cat conftest.in >> conftest.h
13669   rm -f conftest.in
13670   if cmp -s $ac_file conftest.h 2>/dev/null; then
13671     echo "$ac_file is unchanged"
13672     rm -f conftest.h
13673   else
13674     # Remove last slash and all that follows it.  Not all systems have dirname.
13675       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13676       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13677       # The file is in a subdirectory.
13678       test ! -d "$ac_dir" && mkdir "$ac_dir"
13679     fi
13680     rm -f $ac_file
13681     mv conftest.h $ac_file
13682   fi
13683 fi; done
13684
13685 EOF
13686 cat >> $CONFIG_STATUS <<EOF
13687 CPP="$CPP"
13688  top_srcdir="$srcdir"
13689  MAKE_SUBDIR="$MAKE_SUBDIR"
13690
13691 EOF
13692 cat >> $CONFIG_STATUS <<\EOF
13693 for dir in . $MAKE_SUBDIR; do
13694   (
13695     cd $dir
13696     rm -f junk.c
13697     < Makefile.in \
13698       sed -e '/^# Generated/d' \
13699           -e 's%/\*\*/#.*%%' \
13700           -e 's/^ *# */#/' \
13701           -e '/^##/d' \
13702           -e '/^#/ {
13703 p
13704 d
13705 }'        \
13706           -e '/./ {
13707 s/\([\"]\)/\\\1/g
13708 s/^/"/
13709 s/$/"/
13710 }'  > junk.c;
13711
13712
13713
13714     echo creating $dir/Makefile
13715 $CPP -I. -I${top_srcdir}/src  junk.c \
13716   | sed -e 's/^\#.*//'          \
13717         -e 's/^[        ][      ]*$//'\
13718         -e 's/^ /       /'              \
13719   | sed -n -e '/^..*$/p'        \
13720   | sed '/^\"/ {
13721         s/\\\([\"]\)/\1/g
13722         s/^[    ]*\"//
13723         s/\"[   ]*$//
13724 }' > Makefile.new
13725     chmod 444 Makefile.new
13726     mv -f Makefile.new Makefile
13727
13728     echo creating $dir/GNUmakefile
13729 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
13730   | sed -e 's/^\#.*//'          \
13731         -e 's/^[        ][      ]*$//'\
13732         -e 's/^ /       /'              \
13733   | sed -n -e '/^..*$/p'        \
13734   | sed '/^\"/ {
13735         s/\\\([\"]\)/\1/g
13736         s/^[    ]*\"//
13737         s/\"[   ]*$//
13738 }' > Makefile.new
13739     chmod 444 Makefile.new
13740     mv -f Makefile.new GNUmakefile
13741
13742     rm -f junk.c
13743   )
13744 done
13745
13746 sed < config.status >> lib-src/config.values \
13747   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
13748   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
13749   -e 's/^\([^ ]*\) $/\1 ""/' \
13750   -e 's/ 1$/ t/'
13751
13752
13753 exit 0
13754 EOF
13755 chmod +x $CONFIG_STATUS
13756 rm -fr confdefs* $ac_clean_files
13757 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1