Contents in latest XEmacs 21.2 at 1999-06-24-19.
[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 docdir='${archlibdir}'
243 with_site_lisp='no'
244 with_site_modules='yes'
245 with_menubars=''
246 with_scrollbars=''
247 with_dialogs=''
248 with_file_coding=''
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_wmcommand  | \
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         memory_usage_stats | \
360         with_clash_detection | \
361         with_shlib | \
362         no_doc_file )
363                   case "$val" in
364             y | ye | yes )      val=yes ;;
365             n | no )            val=no  ;;
366             * ) (echo "$progname: Usage error:"
367 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
368 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
369           esac
370           eval "$opt=\"$val\"" ;;
371
372
373                         srcdir          | \
374         compiler        | \
375         cflags          | \
376         cpp             | \
377         cppflags        | \
378         libs            | \
379         ldflags         | \
380         cache_file      | \
381         native_sound_lib| \
382         site_lisp       | \
383         x_includes      | \
384         x_libraries     | \
385         site_includes   | \
386         site_libraries  | \
387         site_prefixes   | \
388         site_runtime_libraries )
389                   if test "$valomitted" = "yes" ; then
390                     if test "$#" = 0 ; then
391               (echo "$progname: Usage error:"
392 echo " " "The \`--$optname' option requires a value."
393 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
394             fi
395             val="$1"; shift
396           fi
397           eval "$opt=\"$val\""
398         ;;
399
400                 rel_alloc | \
401         with_dlmalloc | \
402         with_debug_malloc  | use_debug_malloc | \
403         with_system_malloc | use_system_malloc )
404           case "$val" in
405             y | ye | yes )      val=yes ;;
406             n | no )            val=no  ;;
407             d | de | def | defa | defau | defaul | default ) val=default ;;
408             * ) (echo "$progname: Usage error:"
409 echo " " "The \`--$optname' option requires one of these values:
410   \`yes', \`no', or \`default'."
411 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
412           esac
413           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
414           eval "$opt=\"$val\""
415         ;;
416
417                 "with_database" )
418           with_database_berkdb=no
419           with_database_dbm=no
420           with_database_gnudbm=no
421           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
422             case "$x" in
423                 no ) ;;
424                 b | be | ber | berk | berkd | berkdb )  with_database_berkdb=yes ;;
425                 d | db | dbm )                          with_database_dbm=yes    ;;
426                 g | gn | gnu | gnud | gnudb | gnudbm )  with_database_gnudbm=yes ;;
427                 * ) (echo "$progname: Usage error:"
428 echo " " "The \`--$optname' option value
429   must be either \`no' or a comma-separated list
430   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
431 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
432             esac
433           done
434           if test "$with_database_dbm"    = "yes" -a \
435                   "$with_database_gnudbm" = "yes"; then
436           (echo "$progname: Usage error:"
437 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
438   with the \`--$optname' option."
439 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
440           fi
441         ;;
442
443                 "with_sound" )
444                           case "$val" in
445             y | ye | yes )                      val=native ;;
446             n | no | non | none )               val=no;;
447             na | nat | nati | nativ | native )  val=native  ;;
448             ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas  ;;
449             b | bo | bot | both )               val=both;;
450             * ) (echo "$progname: Usage error:"
451 echo " " "The \`--$optname' option must have one of these values:
452   \`native', \`nas', \`both', or \`none'."
453 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
454           esac
455           eval "$opt=\"$val\""
456         ;;
457
458                 "with_xim" )
459           case "$val" in
460             y | ye | yes )                val=yes   ;;
461             n | no | non | none )         val=no    ;;
462             x | xl | xli | xlib )         val=xlib  ;;
463             m | mo | mot | moti | motif ) val=motif ;;
464             * ) (echo "$progname: Usage error:"
465 echo " " "The \`--$optname' option must have one of these values:
466   \`motif', \`xlib', \`yes', or \`no'."
467 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
468           esac
469           eval "$opt=\"$val\""
470         ;;
471
472                 "mail_locking" )
473           case "$val" in
474             lockf )     val=lockf ;;
475             flock )     val=flock ;;
476             file )      val=file  ;;
477             * ) (echo "$progname: Usage error:"
478 echo " " "The \`--$optname' option must have one of these values:
479   \`lockf', \`flock', or \`file'."
480 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
481           esac
482           eval "$opt=\"$val\""
483         ;;
484
485                 "error_checking" )
486                           
487           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
488             case "$x" in
489                       n | no | non | none ) new_default=no ;;
490               a | al | all )        new_default=yes ;;
491
492               extents )       error_check_extents=yes ;;
493               noextents )     error_check_extents=no ;;
494
495               typecheck )     error_check_typecheck=yes ;;
496               notypecheck )   error_check_typecheck=no ;;
497
498               bufpos )        error_check_bufpos=yes ;;
499               nobufpos )      error_check_bufpos=no ;;
500
501               gc )            error_check_gc=yes ;;
502               nogc )          error_check_gc=no ;;
503
504               malloc )        error_check_malloc=yes ;;
505               nomalloc )      error_check_malloc=no ;;
506
507               byte_code )     error_check_byte_code=yes ;;
508               nobyte_code )   error_check_byte_code=no ;;
509
510               * ) bogus_error_check=yes ;;
511             esac
512             if test "$bogus_error_check" -o \
513                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
514                 if test "$error_check_default" = yes ; then
515                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
516                 else
517                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
518                 fi
519                 (echo "$progname: Usage error:"
520 echo " " "Valid types for the \`--$optname' option are:
521   $types."
522 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
523             elif test -n "$new_default" ; then
524                 error_check_extents=$new_default
525                 error_check_typecheck=$new_default
526                 error_check_bufpos=$new_default
527                 error_check_gc=$new_default
528                 error_check_malloc=$new_default
529                 error_check_byte_code=$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              prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
552     Defining PREFIX_USER_DEFINED
553 EOF
554 cat >> confdefs.h <<\EOF
555 #define PREFIX_USER_DEFINED 1
556 EOF
557 }
558  ;;
559              exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
560     Defining EXEC_PREFIX_USER_DEFINED
561 EOF
562 cat >> confdefs.h <<\EOF
563 #define EXEC_PREFIX_USER_DEFINED 1
564 EOF
565 }
566  ;;
567              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
568     Defining LISPDIR_USER_DEFINED
569 EOF
570 cat >> confdefs.h <<\EOF
571 #define LISPDIR_USER_DEFINED 1
572 EOF
573 }
574  ;;
575              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
576     Defining SITELISPDIR_USER_DEFINED
577 EOF
578 cat >> confdefs.h <<\EOF
579 #define SITELISPDIR_USER_DEFINED 1
580 EOF
581 }
582  ;;
583              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
584     Defining MODULEDIR_USER_DEFINED
585 EOF
586 cat >> confdefs.h <<\EOF
587 #define MODULEDIR_USER_DEFINED 1
588 EOF
589 }
590  ;;
591              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
592     Defining ETCDIR_USER_DEFINED
593 EOF
594 cat >> confdefs.h <<\EOF
595 #define ETCDIR_USER_DEFINED 1
596 EOF
597 }
598  ;;
599              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
600     Defining INFODIR_USER_DEFINED
601 EOF
602 cat >> confdefs.h <<\EOF
603 #define INFODIR_USER_DEFINED 1
604 EOF
605 }
606  ;;
607              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
608     Defining INFOPATH_USER_DEFINED
609 EOF
610 cat >> confdefs.h <<\EOF
611 #define INFOPATH_USER_DEFINED 1
612 EOF
613 }
614  ;;
615              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
616     Defining PACKAGE_PATH_USER_DEFINED
617 EOF
618 cat >> confdefs.h <<\EOF
619 #define PACKAGE_PATH_USER_DEFINED 1
620 EOF
621 }
622  ;;
623              datadir )
624                 { test "$extra_verbose" = "yes" && cat << \EOF
625     Defining INFODIR_USER_DEFINED
626 EOF
627 cat >> confdefs.h <<\EOF
628 #define INFODIR_USER_DEFINED 1
629 EOF
630 }
631
632                 { test "$extra_verbose" = "yes" && cat << \EOF
633     Defining LISPDIR_USER_DEFINED
634 EOF
635 cat >> confdefs.h <<\EOF
636 #define LISPDIR_USER_DEFINED 1
637 EOF
638 }
639
640             { test "$extra_verbose" = "yes" && cat << \EOF
641     Defining MODULEDIR_USER_DEFINED
642 EOF
643 cat >> confdefs.h <<\EOF
644 #define MODULEDIR_USER_DEFINED 1
645 EOF
646 }
647
648                 { test "$extra_verbose" = "yes" && cat << \EOF
649     Defining ETCDIR_USER_DEFINED
650 EOF
651 cat >> confdefs.h <<\EOF
652 #define ETCDIR_USER_DEFINED 1
653 EOF
654 }
655  ;;
656              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
657     Defining LOCKDIR_USER_DEFINED
658 EOF
659 cat >> confdefs.h <<\EOF
660 #define LOCKDIR_USER_DEFINED 1
661 EOF
662 }
663  ;;
664              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
665     Defining DOCDIR_USER_DEFINED
666 EOF
667 cat >> confdefs.h <<\EOF
668 #define DOCDIR_USER_DEFINED 1
669 EOF
670 }
671  ;;
672              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
673     Defining ARCHLIBDIR_USER_DEFINED
674 EOF
675 cat >> confdefs.h <<\EOF
676 #define ARCHLIBDIR_USER_DEFINED 1
677 EOF
678 }
679  ;;
680            esac
681         ;;
682
683                 "no_create" ) ;;
684
685                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
686
687                 "with_menubars"   | \
688         "with_scrollbars" | \
689         "with_dialogs" )
690           case "$val" in
691             l | lu | luc | luci | lucid )               val=lucid  ;;
692             m | mo | mot | moti | motif )               val=motif  ;;
693             athena3d | athena-3d )                      val=athena3d ;;
694             a | at | ath | athe | athen | athena )      val=athena ;;
695             n | no | non | none )                       val=no ;;
696             * ) (echo "$progname: Usage error:"
697 echo " " "The \`--$optname' option must have one of these values:
698   \`lucid', \`motif', \`athena', \`athena3d', or \`no'."
699 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
700           esac
701           eval "$opt=\"$val\""
702         ;;
703
704                 "run_in_place"  | \
705         "with_gnu_make" )
706           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
707         ;;
708
709                 * ) (echo "$progname: Usage error:"
710 echo " " "Unrecognized option: $arg"
711 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
712
713       esac
714     ;;
715
716         *-*-*) configuration="$arg" ;;
717
718         *) (echo "$progname: Usage error:"
719 echo " " "Unrecognized argument: $arg"
720 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
721
722   esac
723 done
724
725
726 test -n "$cpp"      && CPP="$cpp"
727 test -n "$cppflags" && CPPFLAGS="$cppflags"
728 test -n "$libs"     && LIBS="$libs"
729 test -n "$ldflags"  && LDFLAGS="$ldflags"
730
731 eval set x "$quoted_arguments"; shift
732
733 test "$extra_verbose" = "yes" && verbose=yes
734
735 test -n "$with_x" && with_x11="$with_x"
736
737 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
738   test "$with_system_malloc" = "default" && with_system_malloc=yes
739 fi
740
741
742
743 if test "$with_cde $with_tooltalk" = "yes no"; then
744   (echo "$progname: Usage error:"
745 echo " " "--with-cde requires --with-tooltalk"
746 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
747 elif test "$with_tooltalk" = "no" ; then with_cde=no
748 elif test "$with_cde" = "yes"; then with_tooltalk=yes
749 fi
750
751
752 case "$srcdir" in
753
754     "" )
755     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
756       if test -f "$dir/src/lisp.h" -a \
757               -f "$dir/lisp/version.el" ; then
758         srcdir="$dir"
759         break
760       fi
761     done
762     if test -z "$srcdir" ; then
763       (echo "$progname: Usage error:"
764 echo " " "Neither the current directory nor its parent seem to
765   contain the XEmacs sources.  If you do not want to build XEmacs in its
766   source tree, you should run \`$progname' in the directory in which
767   you wish to build XEmacs, using the \`--srcdir' option to say where the
768   sources may be found."
769 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
770     fi
771   ;;
772
773     * )
774     if test ! -f "$srcdir/src/lisp.h" -o \
775             ! -f "$srcdir/lisp/version.el" ; then
776       (echo "$progname: Usage error:"
777 echo " " "The directory specified with the \`--srcdir' option,
778   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
779   either run the \`$progname' script at the top of the XEmacs source
780   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
781 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
782     fi
783   ;;
784 esac
785
786 if test -z "$configuration"; then
787     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
788   if test -z "$configuration"; then
789     (echo "$progname: Usage error:"
790 echo " " "XEmacs has not been ported to this host type.
791 Try explicitly specifying the CONFIGURATION when rerunning configure."
792 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
793   fi
794 fi
795
796 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
797 echo "configure:798: checking whether ln -s works" >&5
798
799 rm -f conftestdata
800 if ln -s X conftestdata 2>/dev/null
801 then
802   rm -f conftestdata
803   ac_cv_prog_LN_S="ln -s"
804 else
805   ac_cv_prog_LN_S=ln
806 fi
807 LN_S="$ac_cv_prog_LN_S"
808 if test "$ac_cv_prog_LN_S" = "ln -s"; then
809   echo "$ac_t""yes" 1>&6
810 else
811   echo "$ac_t""no" 1>&6
812 fi
813
814
815 for dir in lisp etc man info; do
816   if test ! -d "$dir" ; then
817     echo Making symbolic link to "$srcdir/$dir"
818     ${LN_S} "$srcdir/$dir" "$dir"
819   fi
820 done
821
822
823 absolute_pwd="`pwd`";
824 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
825 then blddir="$PWD"
826 else blddir="$absolute_pwd"; if test -d "/net"; then
827   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
828   blddir=`echo "$blddir" | \
829    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
830 fi
831 fi
832
833
834 case "$srcdir" in
835   /* ) ;;
836   .  ) srcdir="$blddir" ;;
837   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
838   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
839   srcdir=`echo "$srcdir" | \
840    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
841 fi ;;
842 esac
843
844 if test `pwd` != `sh -c cd $srcdir && pwd`  \
845    && test -f "$srcdir/src/config.h"; then
846   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
847    echo "   as a build directory right now; it has been configured in its own"
848    echo "   right.  To configure in another directory as well, you MUST"
849    echo "   use GNU make.  If you do not have GNU make, then you must"
850    echo "   now do \`make distclean' in $srcdir,"
851    echo "   and then run $progname again.") >&2
852   extrasub='/^VPATH[     ]*=/c\
853 vpath %.c $(srcdir)\
854 vpath %.h $(srcdir)\
855 vpath %.y $(srcdir)\
856 vpath %.l $(srcdir)\
857 vpath %.s $(srcdir)\
858 vpath %.in $(srcdir)'
859 fi
860
861 . "$srcdir/version.sh" || exit 1;
862 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
863 : "${extra_verbose=$beta}"
864 version="${emacs_major_version}.${emacs_minor_version}"
865 { test "$extra_verbose" = "yes" && cat << EOF
866     Defining EMACS_MAJOR_VERSION = $emacs_major_version
867 EOF
868 cat >> confdefs.h <<EOF
869 #define EMACS_MAJOR_VERSION $emacs_major_version
870 EOF
871 }
872
873 { test "$extra_verbose" = "yes" && cat << EOF
874     Defining EMACS_MINOR_VERSION = $emacs_minor_version
875 EOF
876 cat >> confdefs.h <<EOF
877 #define EMACS_MINOR_VERSION $emacs_minor_version
878 EOF
879 }
880
881 if test -n "$emacs_beta_version" ; then
882   if test "$beta" = "yes"; then
883         version="${version}-b${emacs_beta_version}"
884         { test "$extra_verbose" = "yes" && cat << EOF
885     Defining EMACS_BETA_VERSION = $emacs_beta_version
886 EOF
887 cat >> confdefs.h <<EOF
888 #define EMACS_BETA_VERSION $emacs_beta_version
889 EOF
890 }
891
892   else
893         version="${version}.${emacs_beta_version}"
894         { test "$extra_verbose" = "yes" && cat << EOF
895     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
896 EOF
897 cat >> confdefs.h <<EOF
898 #define EMACS_PATCH_LEVEL $emacs_beta_version
899 EOF
900 }
901
902   fi
903 fi
904 { test "$extra_verbose" = "yes" && cat << EOF
905     Defining XEMACS_CODENAME = "$xemacs_codename"
906 EOF
907 cat >> confdefs.h <<EOF
908 #define XEMACS_CODENAME "$xemacs_codename"
909 EOF
910 }
911
912 { test "$extra_verbose" = "yes" && cat << EOF
913     Defining EMACS_VERSION = "$version"
914 EOF
915 cat >> confdefs.h <<EOF
916 #define EMACS_VERSION "$version"
917 EOF
918 }
919
920
921 if test "$with_infodock" = "yes"; then
922   if test ! -f ../ID-INSTALL; then
923     echo "Cannot build InfoDock without InfoDock sources"
924     with_infodock=no
925   fi
926 fi
927
928 if test "$with_infodock" = "yes"; then
929       { test "$extra_verbose" = "yes" && cat << EOF
930     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
931 EOF
932 cat >> confdefs.h <<EOF
933 #define INFODOCK_MAJOR_VERSION $infodock_major_version
934 EOF
935 }
936
937   { test "$extra_verbose" = "yes" && cat << EOF
938     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
939 EOF
940 cat >> confdefs.h <<EOF
941 #define INFODOCK_MINOR_VERSION $infodock_minor_version
942 EOF
943 }
944
945   { test "$extra_verbose" = "yes" && cat << EOF
946     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
947 EOF
948 cat >> confdefs.h <<EOF
949 #define INFODOCK_BUILD_VERSION $infodock_build_version
950 EOF
951 }
952
953   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
954   PROGNAME=infodock
955   CPPFLAGS="$CPPFLAGS -DINFODOCK"
956 else
957   PROGNAME=xemacs
958 fi
959
960 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
961 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
962     Defining ERROR_CHECK_EXTENTS
963 EOF
964 cat >> confdefs.h <<\EOF
965 #define ERROR_CHECK_EXTENTS 1
966 EOF
967 }
968
969 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
970     Defining ERROR_CHECK_TYPECHECK
971 EOF
972 cat >> confdefs.h <<\EOF
973 #define ERROR_CHECK_TYPECHECK 1
974 EOF
975 }
976
977 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
978     Defining ERROR_CHECK_BUFPOS
979 EOF
980 cat >> confdefs.h <<\EOF
981 #define ERROR_CHECK_BUFPOS 1
982 EOF
983 }
984
985 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
986     Defining ERROR_CHECK_GC
987 EOF
988 cat >> confdefs.h <<\EOF
989 #define ERROR_CHECK_GC 1
990 EOF
991 }
992
993 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
994     Defining ERROR_CHECK_MALLOC
995 EOF
996 cat >> confdefs.h <<\EOF
997 #define ERROR_CHECK_MALLOC 1
998 EOF
999 }
1000
1001 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1002     Defining ERROR_CHECK_BYTE_CODE
1003 EOF
1004 cat >> confdefs.h <<\EOF
1005 #define ERROR_CHECK_BYTE_CODE 1
1006 EOF
1007 }
1008
1009 if test "${debug:=$beta}" = "yes"; then
1010   use_assertions=yes memory_usage_stats=yes
1011   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1012    echo "    xemacs will be linked with \"debug.o\""
1013  fi
1014   { test "$extra_verbose" = "yes" && cat << \EOF
1015     Defining DEBUG_XEMACS
1016 EOF
1017 cat >> confdefs.h <<\EOF
1018 #define DEBUG_XEMACS 1
1019 EOF
1020 }
1021
1022 fi
1023 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1024     Defining USE_ASSERTIONS
1025 EOF
1026 cat >> confdefs.h <<\EOF
1027 #define USE_ASSERTIONS 1
1028 EOF
1029 }
1030
1031 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1032     Defining MEMORY_USAGE_STATS
1033 EOF
1034 cat >> confdefs.h <<\EOF
1035 #define MEMORY_USAGE_STATS 1
1036 EOF
1037 }
1038
1039
1040
1041 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1042 echo "configure:1043: checking "host system type"" >&5
1043 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1044 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1045 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1046 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1047 echo "$ac_t""$configuration" 1>&6
1048
1049
1050
1051
1052
1053 machine='' opsys=''
1054
1055 case "$canonical" in
1056   sparc-*-*        ) machine=sparc ;;
1057   alpha*-*-*       ) machine=alpha ;;
1058   vax-*-*          ) machine=vax ;;
1059   mips-dec-*       ) machine=pmax ;;
1060   mips-sgi-*       ) machine=iris4d ;;
1061   romp-ibm-*       ) machine=ibmrt ;;
1062   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1063   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1064   powerpc*-*       ) machine=powerpc ;;
1065   hppa-*-*         ) machine=hp800 ;;
1066   m88k-dg-*        ) machine=aviion ;;
1067   m68*-sony-*      ) machine=news ;;
1068   mips-sony-*      ) machine=news-risc ;;
1069   clipper-*        ) machine=clipper ;;
1070   arm-*            ) machine=arm ;;
1071   ns32k-*          ) machine=ns32000 ;;
1072 esac
1073
1074 case "$canonical" in
1075   *-*-linux*    ) opsys=linux ;;
1076   *-*-netbsd*   ) opsys=netbsd ;;
1077   *-*-openbsd*  ) opsys=openbsd ;;
1078   *-*-nextstep* ) opsys=nextstep ;;
1079   *-*-vms       ) opsys=vms ;;
1080
1081     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1082   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1083   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1084   *-dec-osf3*                ) opsys=decosf3-1 ;;
1085   *-dec-osf4*                ) opsys=decosf4-0 ;;
1086
1087     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1088   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1089   *-*-ultrix* )         opsys=ultrix4-3 ;;
1090
1091     *-*-aix3.1*  ) opsys=aix3-1 ;;
1092   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1093   *-*-aix3*    ) opsys=aix3-2   ;;
1094   *-*-aix4.0*  ) opsys=aix4     ;;
1095   *-*-aix4.1*  ) opsys=aix4-1   ;;
1096   *-*-aix4*    ) opsys=aix4-2   ;;
1097
1098     *-gnu* )                    opsys=gnu    ;;
1099   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1100   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1101   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1102   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1103   *-*-aos*   )                  opsys=bsd4-3 ;;
1104   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1105   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1106   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1107   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1108   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1109   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1110         if test -z "$NON_GNU_CPP" ; then
1111           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1112             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1113           done
1114         fi
1115         opsys=usg5-4-2 ;;
1116     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1117     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1118 esac
1119
1120 case "$canonical" in
1121
1122     *-*-netbsd* )
1123     case "$canonical" in
1124       i[3-9]86-*-netbsd*) machine=intel386 ;;
1125       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1126                                             machine=hp9000s300 ;;
1127       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1128       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1129     esac
1130   ;;
1131
1132     *-*-openbsd* )
1133     case "${canonical}" in
1134       i386-*-openbsd*)          machine=intel386 ;;
1135       m68k-*-openbsd*)          machine=hp9000s300 ;;
1136       mipsel-*-openbsd*)        machine=pmax ;;
1137      esac
1138    ;;
1139
1140     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1141   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1142
1143     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1144   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1145
1146     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1147
1148     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1149
1150     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1151
1152     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1153
1154     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1155
1156     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1157   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1158   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1159
1160   
1161     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1162
1163     *-convex-bsd* | *-convex-convexos* )
1164     machine=convex opsys=bsd4-3
1165     NON_GNU_CPP="cc -E -P"
1166   ;;
1167
1168     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1169
1170     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1171   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1172   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1173   m88k-dg-dgux*                           ) opsys=dgux     ;;
1174
1175     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1176   m88k-motorola-sysv4* )
1177                     machine=delta88k opsys=usg5-4-2
1178   ;;
1179   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1180
1181     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1182   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1183
1184     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1185
1186     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1187   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1188   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1189
1190       m88k-harris-cxux* )
1191         case "`uname -r`" in
1192        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1193        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1194     esac
1195     NON_GNU_CPP="/lib/cpp"
1196   ;;
1197     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1198     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1199
1200     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1201
1202     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1203
1204     *-hp-hpux* )
1205         case "$canonical" in
1206       m68*  ) machine=hp9000s300 ;;
1207       hppa* ) machine=hp800      ;;
1208     esac
1209
1210     case "$canonical" in
1211       *-hp-hpux7*  )  opsys=hpux   ;;
1212       *-hp-hpux8*  )  opsys=hpux8  ;;
1213       *-hp-hpux9*  )  opsys=hpux9  ;;
1214       *-hp-hpux10* )  opsys=hpux10 ;;
1215       *-hp-hpux11* )  opsys=hpux11 ;;
1216       *            )  opsys=hpux   ;;
1217     esac
1218
1219         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1220    echo "    xemacs will be linked with \"strcat.o\""
1221  fi ;; esac
1222
1223     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1224         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1225     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1226
1227     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1228   ;;
1229
1230     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1231   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1232
1233     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1234   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1235   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1236   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1237   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1238   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1239
1240     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1241   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1242
1243     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1244
1245     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1246
1247     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1248
1249     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1250
1251       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1252
1253     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1254
1255     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1256
1257     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1258
1259     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1260
1261         mips-mips-usg* ) machine=mips4 ;;
1262   mips-mips-riscos4 )
1263     machine=mips4
1264     NON_GNU_CC="cc -systype bsd43"
1265     NON_GNU_CPP="cc -systype bsd43 -E"
1266     case "$canonical" in
1267       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1268       mips-mips-riscos5* ) opsys=riscos5 ;;
1269     esac
1270   ;;
1271   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1272   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1273
1274     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1275
1276     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1277
1278     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1279   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1280
1281     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1282
1283     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1284
1285     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1286
1287     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1288
1289     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1290   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1291
1292     mips-siemens-sysv* | mips-sni-sysv*)
1293     machine=mips-siemens opsys=usg5-4
1294     NON_GNU_CC=/usr/ccs/bin/cc
1295     NON_GNU_CPP=/usr/ccs/lib/cpp
1296   ;;
1297
1298     mips-nec-sysv*)
1299     machine=mips-nec
1300     NON_GNU_CC=/usr/ccs/bin/cc
1301     NON_GNU_CPP=/usr/ccs/lib/cpp
1302   ;;
1303
1304       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1305   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1306     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1307   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1308   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1309   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1310   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1311   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1312   mips-sgi-irix*      ) opsys=irix5-0 ;;
1313
1314     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1315   *-sony-news* ) opsys=newsos5 ;;
1316
1317     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1318
1319     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1320         case "$canonical" in
1321       m68*-sunos1* )             machine=sun1     ;;
1322       m68*-sunos2* )             machine=sun2     ;;
1323       m68* )                     machine=sun3     ;;
1324       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1325       i*86-*-* )                 machine=intel386 ;;
1326       rs6000* )                  machine=rs6000   ;;
1327     esac
1328
1329         case "$canonical" in *-sunos5*)
1330       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1331     esac
1332
1333                     case "$canonical" in
1334       *-sunos4* )
1335         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1336         : ;;
1337       *-solaris2* )
1338         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1339         RANLIB=':' ;;
1340     esac
1341
1342     case "$canonical" in
1343       *-solaris*          )
1344         opsys=sol2
1345         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1346         { test "$extra_verbose" = "yes" && cat << EOF
1347     Defining OS_RELEASE = $os_release
1348 EOF
1349 cat >> confdefs.h <<EOF
1350 #define OS_RELEASE $os_release
1351 EOF
1352 }
1353  ;;
1354
1355             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1356       *-sunos4.0*         ) opsys=sunos4-0      ;;
1357       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1358       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1359       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1360       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1361       *-mach*             ) opsys=mach-bsd4-3   ;;
1362       *                   ) opsys=bsd4-2        ;;
1363     esac
1364
1365     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1366
1367         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1368   ;;
1369
1370     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1371
1372     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1373   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1374
1375     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1376
1377     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1378
1379     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1380       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1381
1382     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1383
1384     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1385
1386     vax-dec-* )
1387     case "$canonical" in
1388       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1389       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1390       *-mach* )                         opsys=mach-bsd4-3 ;;
1391     esac
1392   ;;
1393
1394     ns16k-whitechapel-* ) machine=mg1 ;;
1395
1396     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1397
1398     i[3-9]86-*-* )
1399     machine=intel386
1400     case "$canonical" in
1401       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1402       *-isc2.2* )               opsys=isc2-2 ;;
1403       *-isc4.0* )               opsys=isc4-0 ;;
1404       *-isc4.* )                opsys=isc4-1
1405                                 GCC_TEST_OPTIONS=-posix
1406                                 NON_GCC_TEST_OPTIONS=-Xp
1407                                 ;;
1408       *-isc* )                  opsys=isc3-0 ;;
1409       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1410       *-esix* )                 opsys=esix ;;
1411       *-mach* )                 opsys=mach-bsd4-3 ;;
1412       *-xenix* )                opsys=xenix ;;
1413       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1414       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1415       *-bsdi4* )                opsys=bsdos4 ;;
1416       *-bsdi3* )                opsys=bsdos3 ;;
1417       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1418       *-bsdi2* )                opsys=bsdos2 ;;
1419       *-sco3.2v5* )             opsys=sco5 ;
1420                                                         if test "$dynamic" = "yes" ; then
1421                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1422         else
1423                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1424         fi ;;
1425       *-386bsd* )               opsys=386bsd ;;
1426       *-freebsd* )              opsys=freebsd ;;
1427       *-nextstep* )             opsys=nextstep ;;
1428       *-pc-cygwin* )            opsys=cygwin32 ;;
1429       *-pc-mingw* )             opsys=mingw32 ;
1430                                 test -z "$with_tty" && with_tty="no";;
1431           esac
1432   ;;
1433
1434     m68k-*-linux* ) machine=m68k opsys=linux ;;
1435
1436 esac
1437
1438 if test -z "$machine" -o -z "$opsys"; then
1439   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1440    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1441   ) >&2
1442   exit 1
1443 fi
1444
1445 if test -z "$dynamic"; then
1446   case "$opsys" in
1447     hpux* | sunos4* ) dynamic=no ;;
1448     *) dynamic=yes ;;
1449   esac
1450 fi
1451 if test "$dynamic" = "yes"; then
1452   case "$opsys" in
1453     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1454     decosf* ) ld_call_shared="-call_shared" ;;
1455   esac
1456 else   case "$opsys" in
1457     sol2 )
1458       echo "Static linking is not supported on Solaris 2."
1459       echo "Rerun configure without specifying --dynamic=no."
1460       exit 1 ;;
1461     linux   ) ld_call_shared="-Bstatic" ;;
1462     decosf* ) ld_call_shared="-non_shared" ;;
1463   esac
1464 fi
1465
1466 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1467
1468 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1469 { test "$extra_verbose" = "yes" && cat << EOF
1470     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1471 EOF
1472 cat >> confdefs.h <<EOF
1473 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1474 EOF
1475 }
1476
1477
1478 machfile="m/${machine}.h"
1479 opsysfile="s/${opsys}.h"
1480
1481
1482 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1483 if test "$with_workshop $with_tooltalk" = "yes no"; then
1484   (echo "$progname: Usage error:"
1485 echo " " "--with-workshop requires --with-tooltalk"
1486 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1487 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1488 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1489 fi
1490
1491 if test "$with_workshop" = "yes"; then
1492   { test "$extra_verbose" = "yes" && cat << \EOF
1493     Defining SUNPRO
1494 EOF
1495 cat >> confdefs.h <<\EOF
1496 #define SUNPRO 1
1497 EOF
1498 }
1499
1500   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1501    echo "    xemacs will be linked with \"sunpro.o\""
1502  fi
1503 fi
1504
1505 if test "$with_clash_detection" = "yes"; then
1506   { test "$extra_verbose" = "yes" && cat << \EOF
1507     Defining CLASH_DETECTION
1508 EOF
1509 cat >> confdefs.h <<\EOF
1510 #define CLASH_DETECTION 1
1511 EOF
1512 }
1513
1514   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1515    echo "    xemacs will be linked with \"filelock.o\""
1516  fi
1517 fi
1518
1519 test -n "$compiler" && CC="$compiler"
1520 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1521 fi
1522
1523 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1524 if test "${CFLAGS-unset}" != unset
1525   then cflags_specified=yes;
1526   else cflags_specified=no;
1527 fi
1528
1529 xe_save_CFLAGS="$CFLAGS"
1530
1531 # Extract the first word of "gcc", so it can be a program name with args.
1532 set dummy gcc; ac_word=$2
1533 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1534 echo "configure:1535: checking for $ac_word" >&5
1535
1536 if test -n "$CC"; then
1537   ac_cv_prog_CC="$CC" # Let the user override the test.
1538 else
1539   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1540   ac_dummy="$PATH"
1541   for ac_dir in $ac_dummy; do
1542     test -z "$ac_dir" && ac_dir=.
1543     if test -f $ac_dir/$ac_word; then
1544       ac_cv_prog_CC="gcc"
1545       break
1546     fi
1547   done
1548   IFS="$ac_save_ifs"
1549 fi
1550 CC="$ac_cv_prog_CC"
1551 if test -n "$CC"; then
1552   echo "$ac_t""$CC" 1>&6
1553 else
1554   echo "$ac_t""no" 1>&6
1555 fi
1556
1557 if test -z "$CC"; then
1558   # Extract the first word of "cc", so it can be a program name with args.
1559 set dummy cc; ac_word=$2
1560 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1561 echo "configure:1562: checking for $ac_word" >&5
1562
1563 if test -n "$CC"; then
1564   ac_cv_prog_CC="$CC" # Let the user override the test.
1565 else
1566   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1567   ac_prog_rejected=no
1568   ac_dummy="$PATH"
1569   for ac_dir in $ac_dummy; do
1570     test -z "$ac_dir" && ac_dir=.
1571     if test -f $ac_dir/$ac_word; then
1572       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1573         ac_prog_rejected=yes
1574         continue
1575       fi
1576       ac_cv_prog_CC="cc"
1577       break
1578     fi
1579   done
1580   IFS="$ac_save_ifs"
1581 if test $ac_prog_rejected = yes; then
1582   # We found a bogon in the path, so make sure we never use it.
1583   set dummy $ac_cv_prog_CC
1584   shift
1585   if test $# -gt 0; then
1586     # We chose a different compiler from the bogus one.
1587     # However, it has the same basename, so the bogon will be chosen
1588     # first if we set CC to just the basename; use the full file name.
1589     shift
1590     set dummy "$ac_dir/$ac_word" "$@"
1591     shift
1592     ac_cv_prog_CC="$@"
1593   fi
1594 fi
1595 fi
1596 CC="$ac_cv_prog_CC"
1597 if test -n "$CC"; then
1598   echo "$ac_t""$CC" 1>&6
1599 else
1600   echo "$ac_t""no" 1>&6
1601 fi
1602
1603   if test -z "$CC"; then
1604     case "`uname -s`" in
1605     *win32* | *WIN32*)
1606       # Extract the first word of "cl", so it can be a program name with args.
1607 set dummy cl; ac_word=$2
1608 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1609 echo "configure:1610: checking for $ac_word" >&5
1610
1611 if test -n "$CC"; then
1612   ac_cv_prog_CC="$CC" # Let the user override the test.
1613 else
1614   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1615   ac_dummy="$PATH"
1616   for ac_dir in $ac_dummy; do
1617     test -z "$ac_dir" && ac_dir=.
1618     if test -f $ac_dir/$ac_word; then
1619       ac_cv_prog_CC="cl"
1620       break
1621     fi
1622   done
1623   IFS="$ac_save_ifs"
1624 fi
1625 CC="$ac_cv_prog_CC"
1626 if test -n "$CC"; then
1627   echo "$ac_t""$CC" 1>&6
1628 else
1629   echo "$ac_t""no" 1>&6
1630 fi
1631  ;;
1632     esac
1633   fi
1634   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1635 fi
1636
1637 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1638 echo "configure:1639: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1639
1640 ac_ext=c
1641 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1642 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1643 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1644 ac_cpp='$CPP '"$xe_cppflags"
1645 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1646 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1647 cross_compiling=no
1648
1649 cat > conftest.$ac_ext << EOF
1650
1651 #line 1652 "configure"
1652 #include "confdefs.h"
1653
1654 main(){return(0);}
1655 EOF
1656 if { (eval echo configure:1657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1657   ac_cv_prog_cc_works=yes
1658   # If we can't run a trivial program, we are probably using a cross compiler.
1659   if (./conftest; exit) 2>/dev/null; then
1660     ac_cv_prog_cc_cross=no
1661   else
1662     ac_cv_prog_cc_cross=yes
1663   fi
1664 else
1665   echo "configure: failed program was:" >&5
1666   cat conftest.$ac_ext >&5
1667   ac_cv_prog_cc_works=no
1668 fi
1669 rm -fr conftest*
1670 ac_ext=c
1671 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1672 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1673 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1674 ac_cpp='$CPP '"$xe_cppflags"
1675 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1676 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1677 cross_compiling=no
1678
1679 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1680 if test $ac_cv_prog_cc_works = no; then
1681   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1682 fi
1683 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1684 echo "configure:1685: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1685 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1686 cross_compiling=$ac_cv_prog_cc_cross
1687
1688 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1689 echo "configure:1690: checking whether we are using GNU C" >&5
1690
1691 cat > conftest.c <<EOF
1692 #ifdef __GNUC__
1693   yes;
1694 #endif
1695 EOF
1696 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1697   ac_cv_prog_gcc=yes
1698 else
1699   ac_cv_prog_gcc=no
1700 fi
1701
1702 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1703
1704 if test $ac_cv_prog_gcc = yes; then
1705   GCC=yes
1706 else
1707   GCC=
1708 fi
1709
1710 ac_test_CFLAGS="${CFLAGS+set}"
1711 ac_save_CFLAGS="$CFLAGS"
1712 CFLAGS=
1713 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1714 echo "configure:1715: checking whether ${CC-cc} accepts -g" >&5
1715
1716 echo 'void f(){}' > conftest.c
1717 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1718   ac_cv_prog_cc_g=yes
1719 else
1720   ac_cv_prog_cc_g=no
1721 fi
1722 rm -f conftest*
1723
1724
1725 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1726 if test "$ac_test_CFLAGS" = set; then
1727   CFLAGS="$ac_save_CFLAGS"
1728 elif test $ac_cv_prog_cc_g = yes; then
1729   if test "$GCC" = yes; then
1730     CFLAGS="-g -O2"
1731   else
1732     CFLAGS="-g"
1733   fi
1734 else
1735   if test "$GCC" = yes; then
1736     CFLAGS="-O2"
1737   else
1738     CFLAGS=
1739   fi
1740 fi
1741  
1742 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1743   CC=${NON_GNU_CC-cc}
1744   # Extract the first word of "gcc", so it can be a program name with args.
1745 set dummy gcc; ac_word=$2
1746 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1747 echo "configure:1748: checking for $ac_word" >&5
1748
1749 if test -n "$CC"; then
1750   ac_cv_prog_CC="$CC" # Let the user override the test.
1751 else
1752   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1753   ac_dummy="$PATH"
1754   for ac_dir in $ac_dummy; do
1755     test -z "$ac_dir" && ac_dir=.
1756     if test -f $ac_dir/$ac_word; then
1757       ac_cv_prog_CC="gcc"
1758       break
1759     fi
1760   done
1761   IFS="$ac_save_ifs"
1762 fi
1763 CC="$ac_cv_prog_CC"
1764 if test -n "$CC"; then
1765   echo "$ac_t""$CC" 1>&6
1766 else
1767   echo "$ac_t""no" 1>&6
1768 fi
1769
1770 if test -z "$CC"; then
1771   # Extract the first word of "cc", so it can be a program name with args.
1772 set dummy cc; ac_word=$2
1773 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1774 echo "configure:1775: checking for $ac_word" >&5
1775
1776 if test -n "$CC"; then
1777   ac_cv_prog_CC="$CC" # Let the user override the test.
1778 else
1779   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1780   ac_prog_rejected=no
1781   ac_dummy="$PATH"
1782   for ac_dir in $ac_dummy; do
1783     test -z "$ac_dir" && ac_dir=.
1784     if test -f $ac_dir/$ac_word; then
1785       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1786         ac_prog_rejected=yes
1787         continue
1788       fi
1789       ac_cv_prog_CC="cc"
1790       break
1791     fi
1792   done
1793   IFS="$ac_save_ifs"
1794 if test $ac_prog_rejected = yes; then
1795   # We found a bogon in the path, so make sure we never use it.
1796   set dummy $ac_cv_prog_CC
1797   shift
1798   if test $# -gt 0; then
1799     # We chose a different compiler from the bogus one.
1800     # However, it has the same basename, so the bogon will be chosen
1801     # first if we set CC to just the basename; use the full file name.
1802     shift
1803     set dummy "$ac_dir/$ac_word" "$@"
1804     shift
1805     ac_cv_prog_CC="$@"
1806   fi
1807 fi
1808 fi
1809 CC="$ac_cv_prog_CC"
1810 if test -n "$CC"; then
1811   echo "$ac_t""$CC" 1>&6
1812 else
1813   echo "$ac_t""no" 1>&6
1814 fi
1815
1816   if test -z "$CC"; then
1817     case "`uname -s`" in
1818     *win32* | *WIN32*)
1819       # Extract the first word of "cl", so it can be a program name with args.
1820 set dummy cl; ac_word=$2
1821 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1822 echo "configure:1823: checking for $ac_word" >&5
1823
1824 if test -n "$CC"; then
1825   ac_cv_prog_CC="$CC" # Let the user override the test.
1826 else
1827   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1828   ac_dummy="$PATH"
1829   for ac_dir in $ac_dummy; do
1830     test -z "$ac_dir" && ac_dir=.
1831     if test -f $ac_dir/$ac_word; then
1832       ac_cv_prog_CC="cl"
1833       break
1834     fi
1835   done
1836   IFS="$ac_save_ifs"
1837 fi
1838 CC="$ac_cv_prog_CC"
1839 if test -n "$CC"; then
1840   echo "$ac_t""$CC" 1>&6
1841 else
1842   echo "$ac_t""no" 1>&6
1843 fi
1844  ;;
1845     esac
1846   fi
1847   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1848 fi
1849
1850 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1851 echo "configure:1852: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1852
1853 ac_ext=c
1854 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1855 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1856 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1857 ac_cpp='$CPP '"$xe_cppflags"
1858 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1859 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1860 cross_compiling=no
1861
1862 cat > conftest.$ac_ext << EOF
1863
1864 #line 1865 "configure"
1865 #include "confdefs.h"
1866
1867 main(){return(0);}
1868 EOF
1869 if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1870   ac_cv_prog_cc_works=yes
1871   # If we can't run a trivial program, we are probably using a cross compiler.
1872   if (./conftest; exit) 2>/dev/null; then
1873     ac_cv_prog_cc_cross=no
1874   else
1875     ac_cv_prog_cc_cross=yes
1876   fi
1877 else
1878   echo "configure: failed program was:" >&5
1879   cat conftest.$ac_ext >&5
1880   ac_cv_prog_cc_works=no
1881 fi
1882 rm -fr conftest*
1883 ac_ext=c
1884 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1885 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1886 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1887 ac_cpp='$CPP '"$xe_cppflags"
1888 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1889 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1890 cross_compiling=no
1891
1892 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1893 if test $ac_cv_prog_cc_works = no; then
1894   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1895 fi
1896 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1897 echo "configure:1898: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1898 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1899 cross_compiling=$ac_cv_prog_cc_cross
1900
1901 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1902 echo "configure:1903: checking whether we are using GNU C" >&5
1903
1904 cat > conftest.c <<EOF
1905 #ifdef __GNUC__
1906   yes;
1907 #endif
1908 EOF
1909 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1910   ac_cv_prog_gcc=yes
1911 else
1912   ac_cv_prog_gcc=no
1913 fi
1914
1915 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1916
1917 if test $ac_cv_prog_gcc = yes; then
1918   GCC=yes
1919 else
1920   GCC=
1921 fi
1922
1923 ac_test_CFLAGS="${CFLAGS+set}"
1924 ac_save_CFLAGS="$CFLAGS"
1925 CFLAGS=
1926 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1927 echo "configure:1928: checking whether ${CC-cc} accepts -g" >&5
1928
1929 echo 'void f(){}' > conftest.c
1930 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1931   ac_cv_prog_cc_g=yes
1932 else
1933   ac_cv_prog_cc_g=no
1934 fi
1935 rm -f conftest*
1936
1937
1938 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1939 if test "$ac_test_CFLAGS" = set; then
1940   CFLAGS="$ac_save_CFLAGS"
1941 elif test $ac_cv_prog_cc_g = yes; then
1942   if test "$GCC" = yes; then
1943     CFLAGS="-g -O2"
1944   else
1945     CFLAGS="-g"
1946   fi
1947 else
1948   if test "$GCC" = yes; then
1949     CFLAGS="-O2"
1950   else
1951     CFLAGS=
1952   fi
1953 fi
1954
1955 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1956   CC=gcc
1957   # Extract the first word of "gcc", so it can be a program name with args.
1958 set dummy gcc; ac_word=$2
1959 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1960 echo "configure:1961: checking for $ac_word" >&5
1961
1962 if test -n "$CC"; then
1963   ac_cv_prog_CC="$CC" # Let the user override the test.
1964 else
1965   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1966   ac_dummy="$PATH"
1967   for ac_dir in $ac_dummy; do
1968     test -z "$ac_dir" && ac_dir=.
1969     if test -f $ac_dir/$ac_word; then
1970       ac_cv_prog_CC="gcc"
1971       break
1972     fi
1973   done
1974   IFS="$ac_save_ifs"
1975 fi
1976 CC="$ac_cv_prog_CC"
1977 if test -n "$CC"; then
1978   echo "$ac_t""$CC" 1>&6
1979 else
1980   echo "$ac_t""no" 1>&6
1981 fi
1982
1983 if test -z "$CC"; then
1984   # Extract the first word of "cc", so it can be a program name with args.
1985 set dummy cc; ac_word=$2
1986 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1987 echo "configure:1988: checking for $ac_word" >&5
1988
1989 if test -n "$CC"; then
1990   ac_cv_prog_CC="$CC" # Let the user override the test.
1991 else
1992   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1993   ac_prog_rejected=no
1994   ac_dummy="$PATH"
1995   for ac_dir in $ac_dummy; do
1996     test -z "$ac_dir" && ac_dir=.
1997     if test -f $ac_dir/$ac_word; then
1998       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1999         ac_prog_rejected=yes
2000         continue
2001       fi
2002       ac_cv_prog_CC="cc"
2003       break
2004     fi
2005   done
2006   IFS="$ac_save_ifs"
2007 if test $ac_prog_rejected = yes; then
2008   # We found a bogon in the path, so make sure we never use it.
2009   set dummy $ac_cv_prog_CC
2010   shift
2011   if test $# -gt 0; then
2012     # We chose a different compiler from the bogus one.
2013     # However, it has the same basename, so the bogon will be chosen
2014     # first if we set CC to just the basename; use the full file name.
2015     shift
2016     set dummy "$ac_dir/$ac_word" "$@"
2017     shift
2018     ac_cv_prog_CC="$@"
2019   fi
2020 fi
2021 fi
2022 CC="$ac_cv_prog_CC"
2023 if test -n "$CC"; then
2024   echo "$ac_t""$CC" 1>&6
2025 else
2026   echo "$ac_t""no" 1>&6
2027 fi
2028
2029   if test -z "$CC"; then
2030     case "`uname -s`" in
2031     *win32* | *WIN32*)
2032       # Extract the first word of "cl", so it can be a program name with args.
2033 set dummy cl; ac_word=$2
2034 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2035 echo "configure:2036: checking for $ac_word" >&5
2036
2037 if test -n "$CC"; then
2038   ac_cv_prog_CC="$CC" # Let the user override the test.
2039 else
2040   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2041   ac_dummy="$PATH"
2042   for ac_dir in $ac_dummy; do
2043     test -z "$ac_dir" && ac_dir=.
2044     if test -f $ac_dir/$ac_word; then
2045       ac_cv_prog_CC="cl"
2046       break
2047     fi
2048   done
2049   IFS="$ac_save_ifs"
2050 fi
2051 CC="$ac_cv_prog_CC"
2052 if test -n "$CC"; then
2053   echo "$ac_t""$CC" 1>&6
2054 else
2055   echo "$ac_t""no" 1>&6
2056 fi
2057  ;;
2058     esac
2059   fi
2060   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2061 fi
2062
2063 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2064 echo "configure:2065: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2065
2066 ac_ext=c
2067 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2068 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2069 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2070 ac_cpp='$CPP '"$xe_cppflags"
2071 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2072 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2073 cross_compiling=no
2074
2075 cat > conftest.$ac_ext << EOF
2076
2077 #line 2078 "configure"
2078 #include "confdefs.h"
2079
2080 main(){return(0);}
2081 EOF
2082 if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2083   ac_cv_prog_cc_works=yes
2084   # If we can't run a trivial program, we are probably using a cross compiler.
2085   if (./conftest; exit) 2>/dev/null; then
2086     ac_cv_prog_cc_cross=no
2087   else
2088     ac_cv_prog_cc_cross=yes
2089   fi
2090 else
2091   echo "configure: failed program was:" >&5
2092   cat conftest.$ac_ext >&5
2093   ac_cv_prog_cc_works=no
2094 fi
2095 rm -fr conftest*
2096 ac_ext=c
2097 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2098 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2099 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2100 ac_cpp='$CPP '"$xe_cppflags"
2101 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2102 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2103 cross_compiling=no
2104
2105 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2106 if test $ac_cv_prog_cc_works = no; then
2107   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2108 fi
2109 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2110 echo "configure:2111: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2111 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2112 cross_compiling=$ac_cv_prog_cc_cross
2113
2114 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2115 echo "configure:2116: checking whether we are using GNU C" >&5
2116
2117 cat > conftest.c <<EOF
2118 #ifdef __GNUC__
2119   yes;
2120 #endif
2121 EOF
2122 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2123   ac_cv_prog_gcc=yes
2124 else
2125   ac_cv_prog_gcc=no
2126 fi
2127
2128 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2129
2130 if test $ac_cv_prog_gcc = yes; then
2131   GCC=yes
2132 else
2133   GCC=
2134 fi
2135
2136 ac_test_CFLAGS="${CFLAGS+set}"
2137 ac_save_CFLAGS="$CFLAGS"
2138 CFLAGS=
2139 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2140 echo "configure:2141: checking whether ${CC-cc} accepts -g" >&5
2141
2142 echo 'void f(){}' > conftest.c
2143 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2144   ac_cv_prog_cc_g=yes
2145 else
2146   ac_cv_prog_cc_g=no
2147 fi
2148 rm -f conftest*
2149
2150
2151 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2152 if test "$ac_test_CFLAGS" = set; then
2153   CFLAGS="$ac_save_CFLAGS"
2154 elif test $ac_cv_prog_cc_g = yes; then
2155   if test "$GCC" = yes; then
2156     CFLAGS="-g -O2"
2157   else
2158     CFLAGS="-g"
2159   fi
2160 else
2161   if test "$GCC" = yes; then
2162     CFLAGS="-O2"
2163   else
2164     CFLAGS=
2165   fi
2166 fi
2167
2168 fi
2169 CFLAGS="$xe_save_CFLAGS"
2170
2171
2172 test -n "$CPP" -a -d "$CPP" && CPP=
2173
2174 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2175
2176 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2177 echo "configure:2178: checking how to run the C preprocessor" >&5
2178 # On Suns, sometimes $CPP names a directory.
2179 if test -n "$CPP" && test -d "$CPP"; then
2180   CPP=
2181 fi
2182 if test -z "$CPP"; then
2183
2184   # This must be in double quotes, not single quotes, because CPP may get
2185   # substituted into the Makefile and "${CC-cc}" will confuse make.
2186   CPP="${CC-cc} -E"
2187   # On the NeXT, cc -E runs the code through the compiler's parser,
2188   # not just through cpp.
2189   cat > conftest.$ac_ext <<EOF
2190 #line 2191 "configure"
2191 #include "confdefs.h"
2192 #include <assert.h>
2193 Syntax Error
2194 EOF
2195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2196 { (eval echo configure:2197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2198 if test -z "$ac_err"; then
2199   :
2200 else
2201   echo "$ac_err" >&5
2202   echo "configure: failed program was:" >&5
2203   cat conftest.$ac_ext >&5
2204   rm -rf conftest*
2205   CPP="${CC-cc} -E -traditional-cpp"
2206   cat > conftest.$ac_ext <<EOF
2207 #line 2208 "configure"
2208 #include "confdefs.h"
2209 #include <assert.h>
2210 Syntax Error
2211 EOF
2212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2213 { (eval echo configure:2214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2215 if test -z "$ac_err"; then
2216   :
2217 else
2218   echo "$ac_err" >&5
2219   echo "configure: failed program was:" >&5
2220   cat conftest.$ac_ext >&5
2221   rm -rf conftest*
2222   CPP="${CC-cc} -nologo -E"
2223   cat > conftest.$ac_ext <<EOF
2224 #line 2225 "configure"
2225 #include "confdefs.h"
2226 #include <assert.h>
2227 Syntax Error
2228 EOF
2229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2230 { (eval echo configure:2231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2232 if test -z "$ac_err"; then
2233   :
2234 else
2235   echo "$ac_err" >&5
2236   echo "configure: failed program was:" >&5
2237   cat conftest.$ac_ext >&5
2238   rm -rf conftest*
2239   CPP=/lib/cpp
2240 fi
2241 rm -f conftest*
2242 fi
2243 rm -f conftest*
2244 fi
2245 rm -f conftest*
2246   ac_cv_prog_CPP="$CPP"
2247   CPP="$ac_cv_prog_CPP"
2248 else
2249   ac_cv_prog_CPP="$CPP"
2250 fi
2251 echo "$ac_t""$CPP" 1>&6
2252
2253
2254 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2255 echo "configure:2256: checking for AIX" >&5
2256 cat > conftest.$ac_ext <<EOF
2257 #line 2258 "configure"
2258 #include "confdefs.h"
2259 #ifdef _AIX
2260   yes
2261 #endif
2262
2263 EOF
2264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2265   egrep "yes" >/dev/null 2>&1; then
2266   rm -rf conftest*
2267   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2268     Defining _ALL_SOURCE
2269 EOF
2270 cat >> confdefs.h <<\EOF
2271 #define _ALL_SOURCE 1
2272 EOF
2273 }
2274
2275 else
2276   rm -rf conftest*
2277   echo "$ac_t""no" 1>&6
2278 fi
2279 rm -f conftest*
2280
2281
2282
2283 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2284 echo "configure:2285: checking for GNU libc" >&5
2285 cat > conftest.$ac_ext <<EOF
2286 #line 2287 "configure"
2287 #include "confdefs.h"
2288 #include <features.h>
2289 int main() {
2290
2291 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2292 #error Not a GNU libc system :-(
2293 ******* ======= ******** &&&&&&&&
2294 #endif
2295
2296 ; return 0; }
2297 EOF
2298 if { (eval echo configure:2299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2299   rm -rf conftest*
2300   have_glibc=yes
2301 else
2302   echo "configure: failed program was:" >&5
2303   cat conftest.$ac_ext >&5
2304   rm -rf conftest*
2305   have_glibc=no
2306 fi
2307 rm -f conftest*
2308 echo "$ac_t""$have_glibc" 1>&6
2309 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2310     Defining _GNU_SOURCE
2311 EOF
2312 cat >> confdefs.h <<\EOF
2313 #define _GNU_SOURCE 1
2314 EOF
2315 }
2316
2317
2318
2319 cat > conftest.$ac_ext <<EOF
2320 #line 2321 "configure"
2321 #include "confdefs.h"
2322 int main () {
2323 #if defined __SUNPRO_C
2324 return 11;
2325 #elif defined __DECC
2326 return 12;
2327 #else
2328 return 0;
2329 #endif
2330 }
2331 EOF
2332 if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2333 then
2334   :
2335 else
2336   conftest_rc="$?"
2337   echo "configure: failed program was:" >&5
2338   cat conftest.$ac_ext >&5
2339   rm -fr conftest*
2340   case "$conftest_rc" in
2341   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2342   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2343 esac
2344 fi
2345 rm -fr conftest*
2346
2347
2348
2349
2350 echo "Extracting information from the machine- and system-dependent headers..."
2351
2352 tempcname="conftest.c"
2353
2354
2355
2356 cat > $tempcname <<EOF
2357 #define NOT_C_CODE
2358 #define C_SWITCH_SITE
2359 #define C_SWITCH_X_SITE
2360 #define LD_SWITCH_SITE
2361 #define LD_SWITCH_X_SITE
2362 #define LD_SWITCH_X_SITE_AUX
2363 #define OS_RELEASE $os_release
2364 #include "$srcdir/src/$opsysfile"
2365 #include "$srcdir/src/$machfile"
2366
2367 #ifndef LIBS_MACHINE
2368 #define LIBS_MACHINE
2369 #endif
2370 configure___ libs_machine=LIBS_MACHINE
2371
2372 #ifndef LIBS_SYSTEM
2373 #define LIBS_SYSTEM
2374 #endif
2375 configure___ libs_system=LIBS_SYSTEM
2376
2377 #ifndef LIBS_TERMCAP
2378 #define LIBS_TERMCAP
2379 #endif
2380 configure___ libs_termcap=LIBS_TERMCAP
2381
2382 #ifndef LIB_STANDARD
2383 #define LIB_STANDARD
2384 #endif
2385 configure___ libs_standard=LIB_STANDARD
2386
2387
2388 #ifndef OBJECTS_MACHINE
2389 #define OBJECTS_MACHINE
2390 #endif
2391 configure___ objects_machine=OBJECTS_MACHINE
2392
2393 #ifndef OBJECTS_SYSTEM
2394 #define OBJECTS_SYSTEM
2395 #endif
2396 configure___ objects_system=OBJECTS_SYSTEM
2397
2398
2399 #ifndef C_SWITCH_MACHINE
2400 #define C_SWITCH_MACHINE
2401 #endif
2402 configure___ c_switch_machine=C_SWITCH_MACHINE
2403
2404 #ifndef C_SWITCH_SYSTEM
2405 #define C_SWITCH_SYSTEM
2406 #endif
2407 configure___ c_switch_system=C_SWITCH_SYSTEM
2408
2409
2410 #ifndef LD_SWITCH_MACHINE
2411 #define LD_SWITCH_MACHINE
2412 #endif
2413 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2414
2415 #ifndef LD_SWITCH_SYSTEM
2416 #define LD_SWITCH_SYSTEM
2417 #endif
2418 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2419
2420
2421 #ifndef UNEXEC
2422 #define UNEXEC "unexec.o"
2423 #endif
2424 configure___ unexec=UNEXEC
2425
2426
2427 #ifndef LD_SWITCH_SHARED
2428 #define LD_SWITCH_SHARED "-c"
2429 #endif
2430 configure___ ld_switch_shared=LD_SWITCH_SHARED
2431
2432
2433 #ifdef ORDINARY_LINK
2434 #define LD "\$(CC) \$(CFLAGS)"
2435 #else /* no ORDINARY LINK */
2436 #ifdef COFF_ENCAPSULATE
2437 #define LD "\$(CC) -nostdlib"
2438 #else /* not COFF_ENCAPSULATE */
2439 #ifdef LINKER
2440 #define LD LINKER
2441 #else /* ! defined (LINKER) */
2442 #define LD "ld"
2443 #endif /* ! defined (LINKER) */
2444 #endif /* ! defined (COFF_ENCAPSULATE) */
2445 #endif /* not ORDINARY_LINK */
2446 configure___ ld=LD
2447
2448 #ifndef LIB_GCC
2449 #define LIB_GCC
2450 #endif
2451 configure___ lib_gcc=LIB_GCC
2452
2453 #ifndef LD_TEXT_START_ADDR
2454 #define LD_TEXT_START_ADDR
2455 #endif
2456 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2457
2458
2459 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2460 #ifdef NO_REMAP
2461 #ifdef COFF_ENCAPSULATE
2462 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2463 #else /* ! defined (COFF_ENCAPSULATE) */
2464 #define START_FILES "pre-crt0.o /lib/crt0.o"
2465 #endif /* ! defined (COFF_ENCAPSULATE) */
2466 #else /* ! defined (NO_REMAP) */
2467 #define START_FILES "ecrt0.o"
2468 #endif /* ! defined (NO_REMAP) */
2469 #endif /* no ORDINARY_LINK */
2470 #ifndef START_FILES
2471 #define START_FILES
2472 #endif
2473 configure___ start_files=START_FILES
2474
2475 #ifdef ORDINARY_LINK
2476 configure___ ordinary_link=yes
2477 #else
2478 configure___ ordinary_link=no
2479 #endif
2480
2481 #ifdef SYSTEM_MALLOC
2482 configure___ system_malloc=yes
2483 #else
2484 configure___ system_malloc=no
2485 #endif
2486
2487 #ifdef TERMINFO
2488 configure___ have_terminfo=yes
2489 #else
2490 configure___ have_terminfo=no
2491 #endif
2492
2493 #ifdef MAIL_USE_FLOCK
2494 configure___ mail_use_flock=yes
2495 #else
2496 configure___ mail_use_flock=no
2497 #endif
2498
2499 #ifdef MAIL_USE_LOCKF
2500 configure___ mail_use_lockf=yes
2501 #else
2502 configure___ mail_use_lockf=no
2503 #endif
2504
2505 #ifdef HAVE_WIN32_PROCESSES
2506 configure___ win32_processes=yes
2507 #else
2508 configure___ win32_processes=no
2509 #endif
2510
2511 EOF
2512
2513 CPP=`eval "echo $CPP $CPPFLAGS"`
2514 eval `$CPP -Isrc $tempcname \
2515         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2516
2517 rm $tempcname
2518
2519 test "$extra_verbose" = "yes" && \
2520   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 ""
2521
2522 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2523
2524 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2525
2526 if test "$cflags_specified" = "no"; then
2527       if   test "$GCC" = "yes"; then
2528     CFLAGS="-g -O3 -Wall -Wno-switch"
2529               elif test "$__SUNPRO_C" = "yes"; then
2530     case "$opsys" in
2531       sol2    ) CFLAGS="-v -xO4" ;;
2532       sunos4* ) CFLAGS="-xO2";;
2533     esac
2534   elif test "$__DECC" = "yes"; then
2535     CFLAGS="-O3"
2536   elif test "$CC" = "xlc"; then
2537     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2538     else
2539     CFLAGS="-O" ;  fi
2540 fi
2541
2542
2543 if test "$GCC" = "yes"; then
2544   set x $ld_switch_system; shift; ld_switch_system=""
2545   while test -n "$1"; do
2546     case $1 in
2547       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2548       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2549       -Xlinker* ) ;;
2550       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2551     esac
2552     shift
2553   done
2554 fi
2555
2556 if test "$GCC" = "yes"; then
2557   set x $ld_switch_machine; shift; ld_switch_machine=""
2558   while test -n "$1"; do
2559     case $1 in
2560       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2561       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2562       -Xlinker* ) ;;
2563       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2564     esac
2565     shift
2566   done
2567 fi
2568
2569 if test "$GCC" = "yes"; then
2570   set x $LDFLAGS; shift; LDFLAGS=""
2571   while test -n "$1"; do
2572     case $1 in
2573       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2574       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2575       -Xlinker* ) ;;
2576       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2577     esac
2578     shift
2579   done
2580 fi
2581
2582 if test "$GCC" = "yes"; then
2583   set x $ld_call_shared; shift; ld_call_shared=""
2584   while test -n "$1"; do
2585     case $1 in
2586       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2587       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2588       -Xlinker* ) ;;
2589       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2590     esac
2591     shift
2592   done
2593 fi
2594
2595 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2596    echo "    xemacs will be linked with \"$objects_machine\""
2597  fi
2598 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2599    echo "    xemacs will be linked with \"$objects_system\""
2600  fi
2601 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2602    echo "    xemacs will be linked with \"$unexec\""
2603  fi
2604
2605 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2606 echo "configure:2607: checking for dynodump" >&5
2607 if test "$unexec" != "unexsol2.o"; then
2608   echo "$ac_t""no" 1>&6
2609 else
2610   echo "$ac_t""yes" 1>&6
2611   { test "$extra_verbose" = "yes" && cat << \EOF
2612     Defining DYNODUMP
2613 EOF
2614 cat >> confdefs.h <<\EOF
2615 #define DYNODUMP 1
2616 EOF
2617 }
2618
2619   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2620   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2621   case "$machine" in
2622     sparc   ) dynodump_arch=sparc ;;
2623     *86*    ) dynodump_arch=i386  ;;
2624     powerpc ) dynodump_arch=ppc   ;;
2625   esac
2626     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
2627 fi
2628
2629
2630 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2631
2632 if test "$unexec" = "unexaix.o"; then
2633   if   test "$dynamic" = "no"; then
2634   start_flags="-Wl,-bnso,-bnodelcsect"
2635   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2636   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2637     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2638   done
2639   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2640     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2641   done
2642   
2643 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2644 echo "configure:2645: checking for terminateAndUnload in -lC" >&5
2645 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2646
2647 xe_check_libs=" -lC "
2648 cat > conftest.$ac_ext <<EOF
2649 #line 2650 "configure"
2650 #include "confdefs.h"
2651 /* Override any gcc2 internal prototype to avoid an error.  */
2652 /* We use char because int might match the return type of a gcc2
2653     builtin and then its argument prototype would still apply.  */
2654 char terminateAndUnload();
2655
2656 int main() {
2657 terminateAndUnload()
2658 ; return 0; }
2659 EOF
2660 if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2661   rm -rf conftest*
2662   eval "ac_cv_lib_$ac_lib_var=yes"
2663 else
2664   echo "configure: failed program was:" >&5
2665   cat conftest.$ac_ext >&5
2666   rm -rf conftest*
2667   eval "ac_cv_lib_$ac_lib_var=no"
2668 fi
2669 rm -f conftest*
2670 xe_check_libs=""
2671
2672 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2673   echo "$ac_t""yes" 1>&6
2674   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2675 else
2676   echo "$ac_t""no" 1>&6
2677 fi
2678
2679
2680   fi
2681 elif test -n "$ld_text_start_addr"; then
2682   start_flags="-T $ld_text_start_addr -e __start"
2683 fi
2684
2685
2686
2687
2688 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2689  test -z "$linker" &&  linker='$(CC) -nostdlib'
2690  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2691 fi
2692 test "$GCC" != "yes" && lib_gcc=
2693
2694
2695
2696
2697
2698 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2699 if test -n "$site_libraries"; then
2700   for arg in $site_libraries; do
2701     case "$arg" in
2702      -* ) ;;
2703      * ) test -d "$arg" || \
2704            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2705        arg="-L${arg}" ;;
2706     esac
2707     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2708   done
2709 fi
2710
2711 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2712 if test -n "$site_includes"; then
2713   for arg in $site_includes; do
2714     case "$arg" in
2715       -* ) ;;
2716       * ) test -d "$arg" || \
2717            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2718       arg="-I${arg}" ;;
2719     esac
2720     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2721   done
2722 fi
2723
2724 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2725 if test -n "$site_prefixes"; then
2726   for dir in $site_prefixes; do
2727     lib_dir="${dir}/lib"
2728     inc_dir="${dir}/include"
2729     if test ! -d "$dir"; then
2730       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2731     elif test ! -d "$lib_dir"; then
2732       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2733     else
2734       if test -d "$inc_dir"; then
2735         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
2736       fi
2737       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
2738     fi
2739   done
2740 fi
2741
2742
2743 for dir in "/usr/ccs/lib"; do
2744   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
2745 done
2746
2747 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2748 if test -n "$site_runtime_libraries"; then
2749   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2750   export LD_RUN_PATH
2751 fi
2752
2753
2754 if   test "$dynamic" = "no"; then add_runtime_path=no
2755 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2756 else case "$opsys" in
2757        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2758        * ) add_runtime_path=no ;;
2759      esac
2760 fi
2761
2762 if test "$add_runtime_path" = "yes"; then
2763       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2764 echo "configure:2765: checking "for runtime libraries flag"" >&5
2765   case "$opsys" in
2766     sol2 ) dash_r="-R" ;;
2767     decosf* | linux* | irix*) dash_r="-rpath " ;;
2768     *)
2769       dash_r=""
2770       for try_dash_r in "-R" "-R " "-rpath "; do
2771         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2772         
2773 if test "$GCC" = "yes"; then
2774   set x $xe_check_libs; shift; xe_check_libs=""
2775   while test -n "$1"; do
2776     case $1 in
2777       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2778       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2779       -Xlinker* ) ;;
2780       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2781     esac
2782     shift
2783   done
2784 fi
2785         cat > conftest.$ac_ext <<EOF
2786 #line 2787 "configure"
2787 #include "confdefs.h"
2788
2789 int main() {
2790
2791 ; return 0; }
2792 EOF
2793 if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2794   rm -rf conftest*
2795   dash_r="$try_dash_r"
2796 else
2797   echo "configure: failed program was:" >&5
2798   cat conftest.$ac_ext >&5
2799 fi
2800 rm -f conftest*
2801         xe_check_libs=""
2802         test -n "$dash_r" && break
2803       done ;;
2804   esac
2805   if test -n "$dash_r";
2806     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2807     else echo "$ac_t""NONE" 1>&6
2808   fi
2809 fi
2810
2811 xe_add_unique_runpath_dir='
2812   xe_add_p=yes
2813   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2814   done
2815   if test "$xe_add_p" = "yes"; then
2816     test -n "$runpath" && runpath="${runpath}:"
2817     runpath="${runpath}${xe_runpath_dir}"
2818     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2819   fi'
2820
2821
2822
2823
2824 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2825     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2826   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2827   
2828         runpath="" runpath_dirs=""
2829   if test -n "$LD_RUN_PATH"; then
2830     runpath="$LD_RUN_PATH"
2831   elif test "$GCC" = "yes"; then
2832         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2833     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2834     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2835     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2836       case "$arg" in P,* | -L* | -R* )
2837         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2838           {
2839 xe_runpath_dir="$dir"
2840   test "$xe_runpath_dir" != "/lib"     -a \
2841         "$xe_runpath_dir" != "/usr/lib" -a \
2842         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2843   eval "$xe_add_unique_runpath_dir"
2844 }
2845         done ;;
2846       esac
2847     done
2848     ld_switch_run="$ld_switch_run_save"
2849     rm -f conftest*
2850   else
2851         for arg in $ld_switch_site $ld_switch_x_site; do
2852       case "$arg" in -L*) {
2853 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2854   test "$xe_runpath_dir" != "/lib"     -a \
2855         "$xe_runpath_dir" != "/usr/lib" -a \
2856         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2857   eval "$xe_add_unique_runpath_dir"
2858 };; esac
2859     done
2860         if test "$opsys $need_motif" = "sol2 yes"; then
2861       xe_runpath_dir="/opt/SUNWdt/lib";
2862       eval "$xe_add_unique_runpath_dir";
2863     fi
2864   fi 
2865   if test -n "$runpath"; then
2866     ld_switch_run="${dash_r}${runpath}"
2867     
2868 if test "$GCC" = "yes"; then
2869   set x $ld_switch_run; shift; ld_switch_run=""
2870   while test -n "$1"; do
2871     case $1 in
2872       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2873       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2874       -Xlinker* ) ;;
2875       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2876     esac
2877     shift
2878   done
2879 fi
2880     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2881   fi
2882 fi
2883
2884
2885
2886
2887 GNU_MALLOC=yes
2888 if test "$with_dlmalloc" != "no"; then
2889         doug_lea_malloc=yes
2890 else
2891         doug_lea_malloc=no
2892 fi
2893 after_morecore_hook_exists=yes
2894 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2895 echo "configure:2896: checking for malloc_get_state" >&5
2896
2897 cat > conftest.$ac_ext <<EOF
2898 #line 2899 "configure"
2899 #include "confdefs.h"
2900 /* System header to define __stub macros and hopefully few prototypes,
2901     which can conflict with char malloc_get_state(); below.  */
2902 #include <assert.h>
2903 /* Override any gcc2 internal prototype to avoid an error.  */
2904 /* We use char because int might match the return type of a gcc2
2905     builtin and then its argument prototype would still apply.  */
2906 char malloc_get_state();
2907
2908 int main() {
2909
2910 /* The GNU C library defines this for functions which it implements
2911     to always fail with ENOSYS.  Some functions are actually named
2912     something starting with __ and the normal name is an alias.  */
2913 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2914 choke me
2915 #else
2916 malloc_get_state();
2917 #endif
2918
2919 ; return 0; }
2920 EOF
2921 if { (eval echo configure:2922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2922   rm -rf conftest*
2923   eval "ac_cv_func_malloc_get_state=yes"
2924 else
2925   echo "configure: failed program was:" >&5
2926   cat conftest.$ac_ext >&5
2927   rm -rf conftest*
2928   eval "ac_cv_func_malloc_get_state=no"
2929 fi
2930 rm -f conftest*
2931
2932 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2933   echo "$ac_t""yes" 1>&6
2934   :
2935 else
2936   echo "$ac_t""no" 1>&6
2937 doug_lea_malloc=no
2938 fi
2939
2940 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2941 echo "configure:2942: checking for malloc_set_state" >&5
2942
2943 cat > conftest.$ac_ext <<EOF
2944 #line 2945 "configure"
2945 #include "confdefs.h"
2946 /* System header to define __stub macros and hopefully few prototypes,
2947     which can conflict with char malloc_set_state(); below.  */
2948 #include <assert.h>
2949 /* Override any gcc2 internal prototype to avoid an error.  */
2950 /* We use char because int might match the return type of a gcc2
2951     builtin and then its argument prototype would still apply.  */
2952 char malloc_set_state();
2953
2954 int main() {
2955
2956 /* The GNU C library defines this for functions which it implements
2957     to always fail with ENOSYS.  Some functions are actually named
2958     something starting with __ and the normal name is an alias.  */
2959 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
2960 choke me
2961 #else
2962 malloc_set_state();
2963 #endif
2964
2965 ; return 0; }
2966 EOF
2967 if { (eval echo configure:2968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2968   rm -rf conftest*
2969   eval "ac_cv_func_malloc_set_state=yes"
2970 else
2971   echo "configure: failed program was:" >&5
2972   cat conftest.$ac_ext >&5
2973   rm -rf conftest*
2974   eval "ac_cv_func_malloc_set_state=no"
2975 fi
2976 rm -f conftest*
2977
2978 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
2979   echo "$ac_t""yes" 1>&6
2980   :
2981 else
2982   echo "$ac_t""no" 1>&6
2983 doug_lea_malloc=no
2984 fi
2985
2986 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
2987 echo "configure:2988: checking whether __after_morecore_hook exists" >&5
2988 cat > conftest.$ac_ext <<EOF
2989 #line 2990 "configure"
2990 #include "confdefs.h"
2991 extern void (* __after_morecore_hook)();
2992 int main() {
2993 __after_morecore_hook = 0
2994 ; return 0; }
2995 EOF
2996 if { (eval echo configure:2997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2997   rm -rf conftest*
2998   echo "$ac_t""yes" 1>&6
2999 else
3000   echo "configure: failed program was:" >&5
3001   cat conftest.$ac_ext >&5
3002   rm -rf conftest*
3003   echo "$ac_t""no" 1>&6
3004    after_morecore_hook_exists=no
3005 fi
3006 rm -f conftest*
3007 if test "$system_malloc" = "yes" ; then
3008   GNU_MALLOC=no
3009   GNU_MALLOC_reason="
3010   (The GNU allocators don't work with this system configuration)."
3011 elif test "$with_system_malloc" = "yes" ; then
3012   GNU_MALLOC=no
3013   GNU_MALLOC_reason="
3014   (User chose not to use GNU allocators)."
3015 elif test "$with_debug_malloc" = "yes" ; then
3016   GNU_MALLOC=no
3017   GNU_MALLOC_reason="
3018   (User chose to use Debugging Malloc)."
3019 fi
3020
3021 if test "$doug_lea_malloc" = "yes" ; then
3022   if test "$GNU_MALLOC" = yes ; then
3023     GNU_MALLOC_reason="
3024   (Using Doug Lea's new malloc from the GNU C Library.)"
3025   fi
3026   { test "$extra_verbose" = "yes" && cat << \EOF
3027     Defining DOUG_LEA_MALLOC
3028 EOF
3029 cat >> confdefs.h <<\EOF
3030 #define DOUG_LEA_MALLOC 1
3031 EOF
3032 }
3033
3034   if test "$after_morecore_hook_exists" = "no" ; then
3035     GNU_MALLOC_reason="
3036   (Using Doug Lea's new malloc from the Linux C Library.)"
3037     { test "$extra_verbose" = "yes" && cat << \EOF
3038     Defining _NO_MALLOC_WARNING_
3039 EOF
3040 cat >> confdefs.h <<\EOF
3041 #define _NO_MALLOC_WARNING_ 1
3042 EOF
3043 }
3044
3045   fi
3046   use_minimal_tagbits=yes
3047 fi
3048
3049
3050
3051
3052 # Extract the first word of "ranlib", so it can be a program name with args.
3053 set dummy ranlib; ac_word=$2
3054 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3055 echo "configure:3056: checking for $ac_word" >&5
3056
3057 if test -n "$RANLIB"; then
3058   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3059 else
3060   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3061   ac_dummy="$PATH"
3062   for ac_dir in $ac_dummy; do
3063     test -z "$ac_dir" && ac_dir=.
3064     if test -f $ac_dir/$ac_word; then
3065       ac_cv_prog_RANLIB="ranlib"
3066       break
3067     fi
3068   done
3069   IFS="$ac_save_ifs"
3070   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3071 fi
3072 RANLIB="$ac_cv_prog_RANLIB"
3073 if test -n "$RANLIB"; then
3074   echo "$ac_t""$RANLIB" 1>&6
3075 else
3076   echo "$ac_t""no" 1>&6
3077 fi
3078
3079 ac_aux_dir=
3080 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3081   if test -f $ac_dir/install-sh; then
3082     ac_aux_dir=$ac_dir
3083     ac_install_sh="$ac_aux_dir/install-sh -c"
3084     break
3085   elif test -f $ac_dir/install.sh; then
3086     ac_aux_dir=$ac_dir
3087     ac_install_sh="$ac_aux_dir/install.sh -c"
3088     break
3089   fi
3090 done
3091 if test -z "$ac_aux_dir"; then
3092   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3093 fi
3094 ac_config_guess=$ac_aux_dir/config.guess
3095 ac_config_sub=$ac_aux_dir/config.sub
3096 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3097
3098 # Find a good install program.  We prefer a C program (faster),
3099 # so one script is as good as another.  But avoid the broken or
3100 # incompatible versions:
3101 # SysV /etc/install, /usr/sbin/install
3102 # SunOS /usr/etc/install
3103 # IRIX /sbin/install
3104 # AIX /bin/install
3105 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3106 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3107 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3108 # ./install, which can be erroneously created by make from ./install.sh.
3109 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3110 echo "configure:3111: checking for a BSD compatible install" >&5
3111 if test -z "$INSTALL"; then
3112
3113   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3114   for ac_dir in $PATH; do
3115     # Account for people who put trailing slashes in PATH elements.
3116     case "$ac_dir/" in
3117     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3118     *)
3119       # OSF1 and SCO ODT 3.0 have their own names for install.
3120       # Don't use installbsd from OSF since it installs stuff as root
3121       # by default.
3122       for ac_prog in ginstall scoinst install; do
3123         if test -f $ac_dir/$ac_prog; then
3124           if test $ac_prog = install &&
3125             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3126             # AIX install.  It has an incompatible calling convention.
3127             :
3128           else
3129             ac_cv_path_install="$ac_dir/$ac_prog -c"
3130             break 2
3131           fi
3132         fi
3133       done
3134       ;;
3135     esac
3136   done
3137   IFS="$ac_save_IFS"
3138
3139   if test "${ac_cv_path_install+set}" = set; then
3140     INSTALL="$ac_cv_path_install"
3141   else
3142     # As a last resort, use the slow shell script.  We don't cache a
3143     # path for INSTALL within a source directory, because that will
3144     # break other packages using the cache if that directory is
3145     # removed, or if the path is relative.
3146     INSTALL="$ac_install_sh"
3147   fi
3148 fi
3149 echo "$ac_t""$INSTALL" 1>&6
3150
3151 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3152 # It thinks the first close brace ends the variable substitution.
3153 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3154
3155 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3156
3157 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3158
3159 for ac_prog in 'bison -y' byacc
3160 do
3161 # Extract the first word of "$ac_prog", so it can be a program name with args.
3162 set dummy $ac_prog; ac_word=$2
3163 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3164 echo "configure:3165: checking for $ac_word" >&5
3165
3166 if test -n "$YACC"; then
3167   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3168 else
3169   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3170   ac_dummy="$PATH"
3171   for ac_dir in $ac_dummy; do
3172     test -z "$ac_dir" && ac_dir=.
3173     if test -f $ac_dir/$ac_word; then
3174       ac_cv_prog_YACC="$ac_prog"
3175       break
3176     fi
3177   done
3178   IFS="$ac_save_ifs"
3179 fi
3180 YACC="$ac_cv_prog_YACC"
3181 if test -n "$YACC"; then
3182   echo "$ac_t""$YACC" 1>&6
3183 else
3184   echo "$ac_t""no" 1>&6
3185 fi
3186
3187 test -n "$YACC" && break
3188 done
3189 test -n "$YACC" || YACC="yacc"
3190
3191
3192 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3193 do
3194 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3195 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3196 echo "configure:3197: checking for $ac_hdr" >&5
3197
3198 cat > conftest.$ac_ext <<EOF
3199 #line 3200 "configure"
3200 #include "confdefs.h"
3201 #include <$ac_hdr>
3202 EOF
3203 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3204 { (eval echo configure:3205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3205 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3206 if test -z "$ac_err"; then
3207   rm -rf conftest*
3208   eval "ac_cv_header_$ac_safe=yes"
3209 else
3210   echo "$ac_err" >&5
3211   echo "configure: failed program was:" >&5
3212   cat conftest.$ac_ext >&5
3213   rm -rf conftest*
3214   eval "ac_cv_header_$ac_safe=no"
3215 fi
3216 rm -f conftest*
3217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3218   echo "$ac_t""yes" 1>&6
3219     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3220   { test "$extra_verbose" = "yes" && cat << EOF
3221     Defining $ac_tr_hdr
3222 EOF
3223 cat >> confdefs.h <<EOF
3224 #define $ac_tr_hdr 1
3225 EOF
3226 }
3227  
3228 else
3229   echo "$ac_t""no" 1>&6
3230 fi
3231 done
3232
3233 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3234 do
3235 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3236 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3237 echo "configure:3238: checking for $ac_hdr" >&5
3238
3239 cat > conftest.$ac_ext <<EOF
3240 #line 3241 "configure"
3241 #include "confdefs.h"
3242 #include <$ac_hdr>
3243 EOF
3244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3245 { (eval echo configure:3246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3247 if test -z "$ac_err"; then
3248   rm -rf conftest*
3249   eval "ac_cv_header_$ac_safe=yes"
3250 else
3251   echo "$ac_err" >&5
3252   echo "configure: failed program was:" >&5
3253   cat conftest.$ac_ext >&5
3254   rm -rf conftest*
3255   eval "ac_cv_header_$ac_safe=no"
3256 fi
3257 rm -f conftest*
3258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3259   echo "$ac_t""yes" 1>&6
3260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3261   { test "$extra_verbose" = "yes" && cat << EOF
3262     Defining $ac_tr_hdr
3263 EOF
3264 cat >> confdefs.h <<EOF
3265 #define $ac_tr_hdr 1
3266 EOF
3267 }
3268  
3269 else
3270   echo "$ac_t""no" 1>&6
3271 fi
3272 done
3273
3274 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3275 do
3276 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3277 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3278 echo "configure:3279: checking for $ac_hdr" >&5
3279
3280 cat > conftest.$ac_ext <<EOF
3281 #line 3282 "configure"
3282 #include "confdefs.h"
3283 #include <$ac_hdr>
3284 EOF
3285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3286 { (eval echo configure:3287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3288 if test -z "$ac_err"; then
3289   rm -rf conftest*
3290   eval "ac_cv_header_$ac_safe=yes"
3291 else
3292   echo "$ac_err" >&5
3293   echo "configure: failed program was:" >&5
3294   cat conftest.$ac_ext >&5
3295   rm -rf conftest*
3296   eval "ac_cv_header_$ac_safe=no"
3297 fi
3298 rm -f conftest*
3299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3300   echo "$ac_t""yes" 1>&6
3301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3302   { test "$extra_verbose" = "yes" && cat << EOF
3303     Defining $ac_tr_hdr
3304 EOF
3305 cat >> confdefs.h <<EOF
3306 #define $ac_tr_hdr 1
3307 EOF
3308 }
3309  
3310 else
3311   echo "$ac_t""no" 1>&6
3312 fi
3313 done
3314
3315 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3316 echo "configure:3317: checking for sys/wait.h that is POSIX.1 compatible" >&5
3317
3318 cat > conftest.$ac_ext <<EOF
3319 #line 3320 "configure"
3320 #include "confdefs.h"
3321 #include <sys/types.h>
3322 #include <sys/wait.h>
3323 #ifndef WEXITSTATUS
3324 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3325 #endif
3326 #ifndef WIFEXITED
3327 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3328 #endif
3329 int main() {
3330 int s;
3331 wait (&s);
3332 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3333 ; return 0; }
3334 EOF
3335 if { (eval echo configure:3336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3336   rm -rf conftest*
3337   ac_cv_header_sys_wait_h=yes
3338 else
3339   echo "configure: failed program was:" >&5
3340   cat conftest.$ac_ext >&5
3341   rm -rf conftest*
3342   ac_cv_header_sys_wait_h=no
3343 fi
3344 rm -f conftest*
3345
3346 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3347 if test $ac_cv_header_sys_wait_h = yes; then
3348   { test "$extra_verbose" = "yes" && cat << \EOF
3349     Defining HAVE_SYS_WAIT_H
3350 EOF
3351 cat >> confdefs.h <<\EOF
3352 #define HAVE_SYS_WAIT_H 1
3353 EOF
3354 }
3355
3356 fi
3357
3358 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3359 echo "configure:3360: checking for ANSI C header files" >&5
3360
3361 cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364 #include <stdlib.h>
3365 #include <stdarg.h>
3366 #include <string.h>
3367 #include <float.h>
3368 EOF
3369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3370 { (eval echo configure:3371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3372 if test -z "$ac_err"; then
3373   rm -rf conftest*
3374   ac_cv_header_stdc=yes
3375 else
3376   echo "$ac_err" >&5
3377   echo "configure: failed program was:" >&5
3378   cat conftest.$ac_ext >&5
3379   rm -rf conftest*
3380   ac_cv_header_stdc=no
3381 fi
3382 rm -f conftest*
3383
3384 if test $ac_cv_header_stdc = yes; then
3385   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3386 cat > conftest.$ac_ext <<EOF
3387 #line 3388 "configure"
3388 #include "confdefs.h"
3389 #include <string.h>
3390 EOF
3391 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3392   egrep "memchr" >/dev/null 2>&1; then
3393   :
3394 else
3395   rm -rf conftest*
3396   ac_cv_header_stdc=no
3397 fi
3398 rm -f conftest*
3399
3400 fi
3401
3402 if test $ac_cv_header_stdc = yes; then
3403   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3404 cat > conftest.$ac_ext <<EOF
3405 #line 3406 "configure"
3406 #include "confdefs.h"
3407 #include <stdlib.h>
3408 EOF
3409 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3410   egrep "free" >/dev/null 2>&1; then
3411   :
3412 else
3413   rm -rf conftest*
3414   ac_cv_header_stdc=no
3415 fi
3416 rm -f conftest*
3417
3418 fi
3419
3420 if test $ac_cv_header_stdc = yes; then
3421   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3422 cat > conftest.$ac_ext <<EOF
3423 #line 3424 "configure"
3424 #include "confdefs.h"
3425 #include <ctype.h>
3426 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3427 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3428 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3429 int main () { int i; for (i = 0; i < 256; i++)
3430 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3431 exit (0); }
3432
3433 EOF
3434 if { (eval echo configure:3435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3435 then
3436   :
3437 else
3438   conftest_rc="$?"
3439   echo "configure: failed program was:" >&5
3440   cat conftest.$ac_ext >&5
3441   rm -fr conftest*
3442   ac_cv_header_stdc=no
3443 fi
3444 rm -fr conftest*
3445 fi
3446
3447 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3448 if test $ac_cv_header_stdc = yes; then
3449   { test "$extra_verbose" = "yes" && cat << \EOF
3450     Defining STDC_HEADERS
3451 EOF
3452 cat >> confdefs.h <<\EOF
3453 #define STDC_HEADERS 1
3454 EOF
3455 }
3456
3457 fi
3458
3459 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3460 echo "configure:3461: checking whether time.h and sys/time.h may both be included" >&5
3461
3462 cat > conftest.$ac_ext <<EOF
3463 #line 3464 "configure"
3464 #include "confdefs.h"
3465 #include <sys/types.h>
3466 #include <sys/time.h>
3467 #include <time.h>
3468 int main() {
3469 struct tm *tp;
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_header_time=yes
3475 else
3476   echo "configure: failed program was:" >&5
3477   cat conftest.$ac_ext >&5
3478   rm -rf conftest*
3479   ac_cv_header_time=no
3480 fi
3481 rm -f conftest*
3482
3483 echo "$ac_t""$ac_cv_header_time" 1>&6
3484 if test $ac_cv_header_time = yes; then
3485   { test "$extra_verbose" = "yes" && cat << \EOF
3486     Defining TIME_WITH_SYS_TIME
3487 EOF
3488 cat >> confdefs.h <<\EOF
3489 #define TIME_WITH_SYS_TIME 1
3490 EOF
3491 }
3492
3493 fi
3494
3495 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3496 echo "configure:3497: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3497
3498 cat > conftest.$ac_ext <<EOF
3499 #line 3500 "configure"
3500 #include "confdefs.h"
3501 #include <sys/types.h>
3502 #include <signal.h>
3503 /* NetBSD declares sys_siglist in unistd.h.  */
3504 #ifdef HAVE_UNISTD_H
3505 #include <unistd.h>
3506 #endif
3507 int main() {
3508 char *msg = *(sys_siglist + 1);
3509 ; return 0; }
3510 EOF
3511 if { (eval echo configure:3512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3512   rm -rf conftest*
3513   ac_cv_decl_sys_siglist=yes
3514 else
3515   echo "configure: failed program was:" >&5
3516   cat conftest.$ac_ext >&5
3517   rm -rf conftest*
3518   ac_cv_decl_sys_siglist=no
3519 fi
3520 rm -f conftest*
3521
3522 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3523 if test $ac_cv_decl_sys_siglist = yes; then
3524   { test "$extra_verbose" = "yes" && cat << \EOF
3525     Defining SYS_SIGLIST_DECLARED
3526 EOF
3527 cat >> confdefs.h <<\EOF
3528 #define SYS_SIGLIST_DECLARED 1
3529 EOF
3530 }
3531
3532 fi
3533
3534
3535 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3536 echo "configure:3537: checking for struct utimbuf" >&5
3537 cat > conftest.$ac_ext <<EOF
3538 #line 3539 "configure"
3539 #include "confdefs.h"
3540 #ifdef TIME_WITH_SYS_TIME
3541 #include <sys/time.h>
3542 #include <time.h>
3543 #else
3544 #ifdef HAVE_SYS_TIME_H
3545 #include <sys/time.h>
3546 #else
3547 #include <time.h>
3548 #endif
3549 #endif
3550 #ifdef HAVE_UTIME_H
3551 #include <utime.h>
3552 #endif
3553 int main() {
3554 static struct utimbuf x; x.actime = x.modtime;
3555 ; return 0; }
3556 EOF
3557 if { (eval echo configure:3558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3558   rm -rf conftest*
3559   echo "$ac_t""yes" 1>&6
3560    { test "$extra_verbose" = "yes" && cat << \EOF
3561     Defining HAVE_STRUCT_UTIMBUF
3562 EOF
3563 cat >> confdefs.h <<\EOF
3564 #define HAVE_STRUCT_UTIMBUF 1
3565 EOF
3566 }
3567
3568 else
3569   echo "configure: failed program was:" >&5
3570   cat conftest.$ac_ext >&5
3571   rm -rf conftest*
3572   echo "$ac_t""no" 1>&6
3573 fi
3574 rm -f conftest*
3575
3576 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3577 echo "configure:3578: checking return type of signal handlers" >&5
3578
3579 cat > conftest.$ac_ext <<EOF
3580 #line 3581 "configure"
3581 #include "confdefs.h"
3582 #include <sys/types.h>
3583 #include <signal.h>
3584 #ifdef signal
3585 #undef signal
3586 #endif
3587 #ifdef __cplusplus
3588 extern "C" void (*signal (int, void (*)(int)))(int);
3589 #else
3590 void (*signal ()) ();
3591 #endif
3592
3593 int main() {
3594 int i;
3595 ; return 0; }
3596 EOF
3597 if { (eval echo configure:3598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3598   rm -rf conftest*
3599   ac_cv_type_signal=void
3600 else
3601   echo "configure: failed program was:" >&5
3602   cat conftest.$ac_ext >&5
3603   rm -rf conftest*
3604   ac_cv_type_signal=int
3605 fi
3606 rm -f conftest*
3607
3608 echo "$ac_t""$ac_cv_type_signal" 1>&6
3609 { test "$extra_verbose" = "yes" && cat << EOF
3610     Defining RETSIGTYPE = $ac_cv_type_signal
3611 EOF
3612 cat >> confdefs.h <<EOF
3613 #define RETSIGTYPE $ac_cv_type_signal
3614 EOF
3615 }
3616
3617
3618 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3619 echo "configure:3620: checking for size_t" >&5
3620
3621 cat > conftest.$ac_ext <<EOF
3622 #line 3623 "configure"
3623 #include "confdefs.h"
3624 #include <sys/types.h>
3625 #if STDC_HEADERS
3626 #include <stdlib.h>
3627 #include <stddef.h>
3628 #endif
3629 EOF
3630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3631   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3632   rm -rf conftest*
3633   ac_cv_type_size_t=yes
3634 else
3635   rm -rf conftest*
3636   ac_cv_type_size_t=no
3637 fi
3638 rm -f conftest*
3639
3640 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3641 if test $ac_cv_type_size_t = no; then
3642   { test "$extra_verbose" = "yes" && cat << \EOF
3643     Defining size_t = unsigned
3644 EOF
3645 cat >> confdefs.h <<\EOF
3646 #define size_t unsigned
3647 EOF
3648 }
3649
3650 fi
3651
3652 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3653 echo "configure:3654: checking for pid_t" >&5
3654
3655 cat > conftest.$ac_ext <<EOF
3656 #line 3657 "configure"
3657 #include "confdefs.h"
3658 #include <sys/types.h>
3659 #if STDC_HEADERS
3660 #include <stdlib.h>
3661 #include <stddef.h>
3662 #endif
3663 EOF
3664 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3665   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3666   rm -rf conftest*
3667   ac_cv_type_pid_t=yes
3668 else
3669   rm -rf conftest*
3670   ac_cv_type_pid_t=no
3671 fi
3672 rm -f conftest*
3673
3674 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3675 if test $ac_cv_type_pid_t = no; then
3676   { test "$extra_verbose" = "yes" && cat << \EOF
3677     Defining pid_t = int
3678 EOF
3679 cat >> confdefs.h <<\EOF
3680 #define pid_t int
3681 EOF
3682 }
3683
3684 fi
3685
3686 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3687 echo "configure:3688: checking for uid_t in sys/types.h" >&5
3688
3689 cat > conftest.$ac_ext <<EOF
3690 #line 3691 "configure"
3691 #include "confdefs.h"
3692 #include <sys/types.h>
3693 EOF
3694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3695   egrep "uid_t" >/dev/null 2>&1; then
3696   rm -rf conftest*
3697   ac_cv_type_uid_t=yes
3698 else
3699   rm -rf conftest*
3700   ac_cv_type_uid_t=no
3701 fi
3702 rm -f conftest*
3703
3704
3705 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3706 if test $ac_cv_type_uid_t = no; then
3707   { test "$extra_verbose" = "yes" && cat << \EOF
3708     Defining uid_t = int
3709 EOF
3710 cat >> confdefs.h <<\EOF
3711 #define uid_t int
3712 EOF
3713 }
3714
3715   { test "$extra_verbose" = "yes" && cat << \EOF
3716     Defining gid_t = int
3717 EOF
3718 cat >> confdefs.h <<\EOF
3719 #define gid_t int
3720 EOF
3721 }
3722
3723 fi
3724
3725 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3726 echo "configure:3727: checking for mode_t" >&5
3727
3728 cat > conftest.$ac_ext <<EOF
3729 #line 3730 "configure"
3730 #include "confdefs.h"
3731 #include <sys/types.h>
3732 #if STDC_HEADERS
3733 #include <stdlib.h>
3734 #include <stddef.h>
3735 #endif
3736 EOF
3737 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3738   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3739   rm -rf conftest*
3740   ac_cv_type_mode_t=yes
3741 else
3742   rm -rf conftest*
3743   ac_cv_type_mode_t=no
3744 fi
3745 rm -f conftest*
3746
3747 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3748 if test $ac_cv_type_mode_t = no; then
3749   { test "$extra_verbose" = "yes" && cat << \EOF
3750     Defining mode_t = int
3751 EOF
3752 cat >> confdefs.h <<\EOF
3753 #define mode_t int
3754 EOF
3755 }
3756
3757 fi
3758
3759 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3760 echo "configure:3761: checking for off_t" >&5
3761
3762 cat > conftest.$ac_ext <<EOF
3763 #line 3764 "configure"
3764 #include "confdefs.h"
3765 #include <sys/types.h>
3766 #if STDC_HEADERS
3767 #include <stdlib.h>
3768 #include <stddef.h>
3769 #endif
3770 EOF
3771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3772   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3773   rm -rf conftest*
3774   ac_cv_type_off_t=yes
3775 else
3776   rm -rf conftest*
3777   ac_cv_type_off_t=no
3778 fi
3779 rm -f conftest*
3780
3781 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3782 if test $ac_cv_type_off_t = no; then
3783   { test "$extra_verbose" = "yes" && cat << \EOF
3784     Defining off_t = long
3785 EOF
3786 cat >> confdefs.h <<\EOF
3787 #define off_t long
3788 EOF
3789 }
3790
3791 fi
3792
3793
3794 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3795 echo "configure:3796: checking for struct timeval" >&5
3796 cat > conftest.$ac_ext <<EOF
3797 #line 3798 "configure"
3798 #include "confdefs.h"
3799 #ifdef TIME_WITH_SYS_TIME
3800 #include <sys/time.h>
3801 #include <time.h>
3802 #else
3803 #ifdef HAVE_SYS_TIME_H
3804 #include <sys/time.h>
3805 #else
3806 #include <time.h>
3807 #endif
3808 #endif
3809 int main() {
3810 static struct timeval x; x.tv_sec = x.tv_usec;
3811 ; return 0; }
3812 EOF
3813 if { (eval echo configure:3814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3814   rm -rf conftest*
3815   echo "$ac_t""yes" 1>&6
3816   HAVE_TIMEVAL=yes
3817   { test "$extra_verbose" = "yes" && cat << \EOF
3818     Defining HAVE_TIMEVAL
3819 EOF
3820 cat >> confdefs.h <<\EOF
3821 #define HAVE_TIMEVAL 1
3822 EOF
3823 }
3824
3825 else
3826   echo "configure: failed program was:" >&5
3827   cat conftest.$ac_ext >&5
3828   rm -rf conftest*
3829   echo "$ac_t""no" 1>&6
3830    HAVE_TIMEVAL=no
3831 fi
3832 rm -f conftest*
3833
3834 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3835 echo "configure:3836: checking whether struct tm is in sys/time.h or time.h" >&5
3836
3837 cat > conftest.$ac_ext <<EOF
3838 #line 3839 "configure"
3839 #include "confdefs.h"
3840 #include <sys/types.h>
3841 #include <time.h>
3842 int main() {
3843 struct tm *tp; tp->tm_sec;
3844 ; return 0; }
3845 EOF
3846 if { (eval echo configure:3847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3847   rm -rf conftest*
3848   ac_cv_struct_tm=time.h
3849 else
3850   echo "configure: failed program was:" >&5
3851   cat conftest.$ac_ext >&5
3852   rm -rf conftest*
3853   ac_cv_struct_tm=sys/time.h
3854 fi
3855 rm -f conftest*
3856
3857 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3858 if test $ac_cv_struct_tm = sys/time.h; then
3859   { test "$extra_verbose" = "yes" && cat << \EOF
3860     Defining TM_IN_SYS_TIME
3861 EOF
3862 cat >> confdefs.h <<\EOF
3863 #define TM_IN_SYS_TIME 1
3864 EOF
3865 }
3866
3867 fi
3868
3869 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3870 echo "configure:3871: checking for tm_zone in struct tm" >&5
3871
3872 cat > conftest.$ac_ext <<EOF
3873 #line 3874 "configure"
3874 #include "confdefs.h"
3875 #include <sys/types.h>
3876 #include <$ac_cv_struct_tm>
3877 int main() {
3878 struct tm tm; tm.tm_zone;
3879 ; return 0; }
3880 EOF
3881 if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3882   rm -rf conftest*
3883   ac_cv_struct_tm_zone=yes
3884 else
3885   echo "configure: failed program was:" >&5
3886   cat conftest.$ac_ext >&5
3887   rm -rf conftest*
3888   ac_cv_struct_tm_zone=no
3889 fi
3890 rm -f conftest*
3891
3892 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3893 if test "$ac_cv_struct_tm_zone" = yes; then
3894   { test "$extra_verbose" = "yes" && cat << \EOF
3895     Defining HAVE_TM_ZONE
3896 EOF
3897 cat >> confdefs.h <<\EOF
3898 #define HAVE_TM_ZONE 1
3899 EOF
3900 }
3901
3902 else
3903   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3904 echo "configure:3905: checking for tzname" >&5
3905
3906 cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909 #include <time.h>
3910 #ifndef tzname /* For SGI.  */
3911 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3912 #endif
3913 int main() {
3914 atoi(*tzname);
3915 ; return 0; }
3916 EOF
3917 if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3918   rm -rf conftest*
3919   ac_cv_var_tzname=yes
3920 else
3921   echo "configure: failed program was:" >&5
3922   cat conftest.$ac_ext >&5
3923   rm -rf conftest*
3924   ac_cv_var_tzname=no
3925 fi
3926 rm -f conftest*
3927
3928 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3929   if test $ac_cv_var_tzname = yes; then
3930     { test "$extra_verbose" = "yes" && cat << \EOF
3931     Defining HAVE_TZNAME
3932 EOF
3933 cat >> confdefs.h <<\EOF
3934 #define HAVE_TZNAME 1
3935 EOF
3936 }
3937
3938   fi
3939 fi
3940
3941
3942 echo $ac_n "checking for working const""... $ac_c" 1>&6
3943 echo "configure:3944: checking for working const" >&5
3944
3945 cat > conftest.$ac_ext <<EOF
3946 #line 3947 "configure"
3947 #include "confdefs.h"
3948
3949 int main() {
3950
3951 /* Ultrix mips cc rejects this.  */
3952 typedef int charset[2]; const charset x;
3953 /* SunOS 4.1.1 cc rejects this.  */
3954 char const *const *ccp;
3955 char **p;
3956 /* NEC SVR4.0.2 mips cc rejects this.  */
3957 struct point {int x, y;};
3958 static struct point const zero = {0,0};
3959 /* AIX XL C 1.02.0.0 rejects this.
3960    It does not let you subtract one const X* pointer from another in an arm
3961    of an if-expression whose if-part is not a constant expression */
3962 const char *g = "string";
3963 ccp = &g + (g ? g-g : 0);
3964 /* HPUX 7.0 cc rejects these. */
3965 ++ccp;
3966 p = (char**) ccp;
3967 ccp = (char const *const *) p;
3968 { /* SCO 3.2v4 cc rejects this.  */
3969   char *t;
3970   char const *s = 0 ? (char *) 0 : (char const *) 0;
3971
3972   *t++ = 0;
3973 }
3974 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3975   int x[] = {25, 17};
3976   const int *foo = &x[0];
3977   ++foo;
3978 }
3979 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3980   typedef const int *iptr;
3981   iptr p = 0;
3982   ++p;
3983 }
3984 { /* AIX XL C 1.02.0.0 rejects this saying
3985      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3986   struct s { int j; const int *ap[3]; };
3987   struct s *b; b->j = 5;
3988 }
3989 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3990   const int foo = 10;
3991 }
3992
3993 ; return 0; }
3994 EOF
3995 if { (eval echo configure:3996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3996   rm -rf conftest*
3997   ac_cv_c_const=yes
3998 else
3999   echo "configure: failed program was:" >&5
4000   cat conftest.$ac_ext >&5
4001   rm -rf conftest*
4002   ac_cv_c_const=no
4003 fi
4004 rm -f conftest*
4005
4006 echo "$ac_t""$ac_cv_c_const" 1>&6
4007 if test $ac_cv_c_const = no; then
4008   { test "$extra_verbose" = "yes" && cat << \EOF
4009     Defining const = 
4010 EOF
4011 cat >> confdefs.h <<\EOF
4012 #define const 
4013 EOF
4014 }
4015
4016 fi
4017
4018
4019 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4020 echo "configure:4021: checking whether ${MAKE-make} sets \${MAKE}" >&5
4021 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4022
4023 cat > conftestmake <<\EOF
4024 all:
4025         @echo 'ac_maketemp="${MAKE}"'
4026 EOF
4027 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4028 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4029 if test -n "$ac_maketemp"; then
4030   eval ac_cv_prog_make_${ac_make}_set=yes
4031 else
4032   eval ac_cv_prog_make_${ac_make}_set=no
4033 fi
4034 rm -f conftestmake
4035 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4036   echo "$ac_t""yes" 1>&6
4037   SET_MAKE=
4038 else
4039   echo "$ac_t""no" 1>&6
4040   SET_MAKE="MAKE=${MAKE-make}"
4041 fi
4042
4043
4044 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4045 echo "configure:4046: checking whether byte ordering is bigendian" >&5
4046
4047 ac_cv_c_bigendian=unknown
4048 # See if sys/param.h defines the BYTE_ORDER macro.
4049 cat > conftest.$ac_ext <<EOF
4050 #line 4051 "configure"
4051 #include "confdefs.h"
4052 #include <sys/types.h>
4053 #include <sys/param.h>
4054 int main() {
4055
4056 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4057  bogus endian macros
4058 #endif
4059 ; return 0; }
4060 EOF
4061 if { (eval echo configure:4062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4062   rm -rf conftest*
4063   # It does; now see whether it defined to BIG_ENDIAN or not.
4064 cat > conftest.$ac_ext <<EOF
4065 #line 4066 "configure"
4066 #include "confdefs.h"
4067 #include <sys/types.h>
4068 #include <sys/param.h>
4069 int main() {
4070
4071 #if BYTE_ORDER != BIG_ENDIAN
4072  not big endian
4073 #endif
4074 ; return 0; }
4075 EOF
4076 if { (eval echo configure:4077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4077   rm -rf conftest*
4078   ac_cv_c_bigendian=yes
4079 else
4080   echo "configure: failed program was:" >&5
4081   cat conftest.$ac_ext >&5
4082   rm -rf conftest*
4083   ac_cv_c_bigendian=no
4084 fi
4085 rm -f conftest*
4086 else
4087   echo "configure: failed program was:" >&5
4088   cat conftest.$ac_ext >&5
4089 fi
4090 rm -f conftest*
4091 if test $ac_cv_c_bigendian = unknown; then
4092 cat > conftest.$ac_ext <<EOF
4093 #line 4094 "configure"
4094 #include "confdefs.h"
4095 main () {
4096   /* Are we little or big endian?  From Harbison&Steele.  */
4097   union
4098   {
4099     long l;
4100     char c[sizeof (long)];
4101   } u;
4102   u.l = 1;
4103   exit (u.c[sizeof (long) - 1] == 1);
4104 }
4105 EOF
4106 if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4107 then
4108   ac_cv_c_bigendian=no
4109 else
4110   conftest_rc="$?"
4111   echo "configure: failed program was:" >&5
4112   cat conftest.$ac_ext >&5
4113   rm -fr conftest*
4114   ac_cv_c_bigendian=yes
4115 fi
4116 rm -fr conftest*
4117 fi
4118
4119 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4120 if test $ac_cv_c_bigendian = yes; then
4121   { test "$extra_verbose" = "yes" && cat << \EOF
4122     Defining WORDS_BIGENDIAN
4123 EOF
4124 cat >> confdefs.h <<\EOF
4125 #define WORDS_BIGENDIAN 1
4126 EOF
4127 }
4128
4129 fi
4130
4131
4132 echo $ac_n "checking size of short""... $ac_c" 1>&6
4133 echo "configure:4134: checking size of short" >&5
4134
4135 cat > conftest.$ac_ext <<EOF
4136 #line 4137 "configure"
4137 #include "confdefs.h"
4138 #include <stdio.h>
4139 main()
4140 {
4141   FILE *f=fopen("conftestval", "w");
4142   if (!f) exit(1);
4143   fprintf(f, "%d\n", sizeof(short));
4144   exit(0);
4145 }
4146 EOF
4147 if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4148 then
4149   ac_cv_sizeof_short=`cat conftestval`
4150 else
4151   conftest_rc="$?"
4152   echo "configure: failed program was:" >&5
4153   cat conftest.$ac_ext >&5
4154   rm -fr conftest*
4155   ac_cv_sizeof_short=0
4156 fi
4157 rm -fr conftest*
4158 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4159 { test "$extra_verbose" = "yes" && cat << EOF
4160     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4161 EOF
4162 cat >> confdefs.h <<EOF
4163 #define SIZEOF_SHORT $ac_cv_sizeof_short
4164 EOF
4165 }
4166
4167
4168 if test "$ac_cv_sizeof_short" = 0; then
4169   echo ""
4170   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4171   echo "*** PANIC *** Please examine config.log for compilation errors."
4172   exit 1
4173 fi
4174 echo $ac_n "checking size of int""... $ac_c" 1>&6
4175 echo "configure:4176: checking size of int" >&5
4176
4177 cat > conftest.$ac_ext <<EOF
4178 #line 4179 "configure"
4179 #include "confdefs.h"
4180 #include <stdio.h>
4181 main()
4182 {
4183   FILE *f=fopen("conftestval", "w");
4184   if (!f) exit(1);
4185   fprintf(f, "%d\n", sizeof(int));
4186   exit(0);
4187 }
4188 EOF
4189 if { (eval echo configure:4190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4190 then
4191   ac_cv_sizeof_int=`cat conftestval`
4192 else
4193   conftest_rc="$?"
4194   echo "configure: failed program was:" >&5
4195   cat conftest.$ac_ext >&5
4196   rm -fr conftest*
4197   ac_cv_sizeof_int=0
4198 fi
4199 rm -fr conftest*
4200 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4201 { test "$extra_verbose" = "yes" && cat << EOF
4202     Defining SIZEOF_INT = $ac_cv_sizeof_int
4203 EOF
4204 cat >> confdefs.h <<EOF
4205 #define SIZEOF_INT $ac_cv_sizeof_int
4206 EOF
4207 }
4208
4209
4210 echo $ac_n "checking size of long""... $ac_c" 1>&6
4211 echo "configure:4212: checking size of long" >&5
4212
4213 cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216 #include <stdio.h>
4217 main()
4218 {
4219   FILE *f=fopen("conftestval", "w");
4220   if (!f) exit(1);
4221   fprintf(f, "%d\n", sizeof(long));
4222   exit(0);
4223 }
4224 EOF
4225 if { (eval echo configure:4226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4226 then
4227   ac_cv_sizeof_long=`cat conftestval`
4228 else
4229   conftest_rc="$?"
4230   echo "configure: failed program was:" >&5
4231   cat conftest.$ac_ext >&5
4232   rm -fr conftest*
4233   ac_cv_sizeof_long=0
4234 fi
4235 rm -fr conftest*
4236 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4237 { test "$extra_verbose" = "yes" && cat << EOF
4238     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4239 EOF
4240 cat >> confdefs.h <<EOF
4241 #define SIZEOF_LONG $ac_cv_sizeof_long
4242 EOF
4243 }
4244
4245
4246 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4247 echo "configure:4248: checking size of long long" >&5
4248
4249 cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4252 #include <stdio.h>
4253 main()
4254 {
4255   FILE *f=fopen("conftestval", "w");
4256   if (!f) exit(1);
4257   fprintf(f, "%d\n", sizeof(long long));
4258   exit(0);
4259 }
4260 EOF
4261 if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4262 then
4263   ac_cv_sizeof_long_long=`cat conftestval`
4264 else
4265   conftest_rc="$?"
4266   echo "configure: failed program was:" >&5
4267   cat conftest.$ac_ext >&5
4268   rm -fr conftest*
4269   ac_cv_sizeof_long_long=0
4270 fi
4271 rm -fr conftest*
4272 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4273 { test "$extra_verbose" = "yes" && cat << EOF
4274     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4275 EOF
4276 cat >> confdefs.h <<EOF
4277 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4278 EOF
4279 }
4280
4281
4282 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4283 echo "configure:4284: checking size of void *" >&5
4284
4285 cat > conftest.$ac_ext <<EOF
4286 #line 4287 "configure"
4287 #include "confdefs.h"
4288 #include <stdio.h>
4289 main()
4290 {
4291   FILE *f=fopen("conftestval", "w");
4292   if (!f) exit(1);
4293   fprintf(f, "%d\n", sizeof(void *));
4294   exit(0);
4295 }
4296 EOF
4297 if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4298 then
4299   ac_cv_sizeof_void_p=`cat conftestval`
4300 else
4301   conftest_rc="$?"
4302   echo "configure: failed program was:" >&5
4303   cat conftest.$ac_ext >&5
4304   rm -fr conftest*
4305   ac_cv_sizeof_void_p=0
4306 fi
4307 rm -fr conftest*
4308 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4309 { test "$extra_verbose" = "yes" && cat << EOF
4310     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4311 EOF
4312 cat >> confdefs.h <<EOF
4313 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4314 EOF
4315 }
4316
4317
4318
4319 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4320 echo "configure:4321: checking for long file names" >&5
4321
4322 ac_cv_sys_long_file_names=yes
4323 # Test for long file names in all the places we know might matter:
4324 #      .                the current directory, where building will happen
4325 #      $prefix/lib      where we will be installing things
4326 #      $exec_prefix/lib likewise
4327 # eval it to expand exec_prefix.
4328 #      $TMPDIR          if set, where it might want to write temporary files
4329 # if $TMPDIR is not set:
4330 #      /tmp             where it might want to write temporary files
4331 #      /var/tmp         likewise
4332 #      /usr/tmp         likewise
4333 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4334   ac_tmpdirs="$TMPDIR"
4335 else
4336   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4337 fi
4338 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4339   test -d $ac_dir || continue
4340   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4341   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4342   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4343   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4344   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4345     ac_cv_sys_long_file_names=no
4346     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4347     break
4348   fi
4349   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4350 done
4351
4352 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4353 if test $ac_cv_sys_long_file_names = yes; then
4354   { test "$extra_verbose" = "yes" && cat << \EOF
4355     Defining HAVE_LONG_FILE_NAMES
4356 EOF
4357 cat >> confdefs.h <<\EOF
4358 #define HAVE_LONG_FILE_NAMES 1
4359 EOF
4360 }
4361
4362 fi
4363
4364
4365 echo $ac_n "checking for sin""... $ac_c" 1>&6
4366 echo "configure:4367: checking for sin" >&5
4367
4368 cat > conftest.$ac_ext <<EOF
4369 #line 4370 "configure"
4370 #include "confdefs.h"
4371 /* System header to define __stub macros and hopefully few prototypes,
4372     which can conflict with char sin(); below.  */
4373 #include <assert.h>
4374 /* Override any gcc2 internal prototype to avoid an error.  */
4375 /* We use char because int might match the return type of a gcc2
4376     builtin and then its argument prototype would still apply.  */
4377 char sin();
4378
4379 int main() {
4380
4381 /* The GNU C library defines this for functions which it implements
4382     to always fail with ENOSYS.  Some functions are actually named
4383     something starting with __ and the normal name is an alias.  */
4384 #if defined (__stub_sin) || defined (__stub___sin)
4385 choke me
4386 #else
4387 sin();
4388 #endif
4389
4390 ; return 0; }
4391 EOF
4392 if { (eval echo configure:4393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4393   rm -rf conftest*
4394   eval "ac_cv_func_sin=yes"
4395 else
4396   echo "configure: failed program was:" >&5
4397   cat conftest.$ac_ext >&5
4398   rm -rf conftest*
4399   eval "ac_cv_func_sin=no"
4400 fi
4401 rm -f conftest*
4402
4403 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4404   echo "$ac_t""yes" 1>&6
4405   :
4406 else
4407   echo "$ac_t""no" 1>&6
4408
4409 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4410 echo "configure:4411: checking for sin in -lm" >&5
4411 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4412
4413 xe_check_libs=" -lm "
4414 cat > conftest.$ac_ext <<EOF
4415 #line 4416 "configure"
4416 #include "confdefs.h"
4417 /* Override any gcc2 internal prototype to avoid an error.  */
4418 /* We use char because int might match the return type of a gcc2
4419     builtin and then its argument prototype would still apply.  */
4420 char sin();
4421
4422 int main() {
4423 sin()
4424 ; return 0; }
4425 EOF
4426 if { (eval echo configure:4427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4427   rm -rf conftest*
4428   eval "ac_cv_lib_$ac_lib_var=yes"
4429 else
4430   echo "configure: failed program was:" >&5
4431   cat conftest.$ac_ext >&5
4432   rm -rf conftest*
4433   eval "ac_cv_lib_$ac_lib_var=no"
4434 fi
4435 rm -f conftest*
4436 xe_check_libs=""
4437
4438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4439   echo "$ac_t""yes" 1>&6
4440     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4441     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4442   { test "$extra_verbose" = "yes" && cat << EOF
4443     Defining $ac_tr_lib
4444 EOF
4445 cat >> confdefs.h <<EOF
4446 #define $ac_tr_lib 1
4447 EOF
4448 }
4449
4450   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4451
4452 else
4453   echo "$ac_t""no" 1>&6
4454 fi
4455
4456
4457 fi
4458
4459
4460 { test "$extra_verbose" = "yes" && cat << \EOF
4461     Defining LISP_FLOAT_TYPE
4462 EOF
4463 cat >> confdefs.h <<\EOF
4464 #define LISP_FLOAT_TYPE 1
4465 EOF
4466 }
4467
4468
4469 cat > conftest.$ac_ext <<EOF
4470 #line 4471 "configure"
4471 #include "confdefs.h"
4472 #include <math.h>
4473 int main() {
4474 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4475 ; return 0; }
4476 EOF
4477 if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4478   rm -rf conftest*
4479   { test "$extra_verbose" = "yes" && cat << \EOF
4480     Defining HAVE_INVERSE_HYPERBOLIC
4481 EOF
4482 cat >> confdefs.h <<\EOF
4483 #define HAVE_INVERSE_HYPERBOLIC 1
4484 EOF
4485 }
4486
4487 else
4488   echo "configure: failed program was:" >&5
4489   cat conftest.$ac_ext >&5
4490 fi
4491 rm -f conftest*
4492
4493 echo "checking type of mail spool file locking" 1>&6
4494 echo "configure:4495: checking type of mail spool file locking" >&5
4495 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4496 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4497 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4498     Defining REAL_MAIL_USE_LOCKF
4499 EOF
4500 cat >> confdefs.h <<\EOF
4501 #define REAL_MAIL_USE_LOCKF 1
4502 EOF
4503 }
4504
4505 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4506     Defining REAL_MAIL_USE_FLOCK
4507 EOF
4508 cat >> confdefs.h <<\EOF
4509 #define REAL_MAIL_USE_FLOCK 1
4510 EOF
4511 }
4512
4513 else mail_locking="dot-locking"
4514 fi
4515
4516 case "$opsys" in decosf*)
4517   
4518 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4519 echo "configure:4520: checking for cma_open in -lpthreads" >&5
4520 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4521
4522 xe_check_libs=" -lpthreads "
4523 cat > conftest.$ac_ext <<EOF
4524 #line 4525 "configure"
4525 #include "confdefs.h"
4526 /* Override any gcc2 internal prototype to avoid an error.  */
4527 /* We use char because int might match the return type of a gcc2
4528     builtin and then its argument prototype would still apply.  */
4529 char cma_open();
4530
4531 int main() {
4532 cma_open()
4533 ; return 0; }
4534 EOF
4535 if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4536   rm -rf conftest*
4537   eval "ac_cv_lib_$ac_lib_var=yes"
4538 else
4539   echo "configure: failed program was:" >&5
4540   cat conftest.$ac_ext >&5
4541   rm -rf conftest*
4542   eval "ac_cv_lib_$ac_lib_var=no"
4543 fi
4544 rm -f conftest*
4545 xe_check_libs=""
4546
4547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4548   echo "$ac_t""yes" 1>&6
4549     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4550     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4551   { test "$extra_verbose" = "yes" && cat << EOF
4552     Defining $ac_tr_lib
4553 EOF
4554 cat >> confdefs.h <<EOF
4555 #define $ac_tr_lib 1
4556 EOF
4557 }
4558
4559   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4560
4561 else
4562   echo "$ac_t""no" 1>&6
4563 fi
4564
4565
4566   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4567     c_switch_site="$c_switch_site -threads" ;;
4568 esac
4569
4570 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4571 echo "configure:4572: checking whether the -xildoff compiler flag is required" >&5
4572 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4573   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4574     then echo "$ac_t""no" 1>&6;
4575     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
4576   fi
4577   else echo "$ac_t""no" 1>&6
4578 fi
4579
4580 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4581   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4582 echo "configure:4583: checking for \"-z ignore\" linker flag" >&5
4583   case "`ld -h 2>&1`" in
4584     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4585       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4586     *) echo "$ac_t""no" 1>&6 ;;
4587   esac
4588 fi
4589
4590
4591 echo "checking "for specified window system"" 1>&6
4592 echo "configure:4593: checking "for specified window system"" >&5
4593
4594 if test "$with_x11" != "no"; then
4595     test "$x_includes $x_libraries" != "NONE NONE" && \
4596    window_system=x11 with_x11=yes
4597
4598         
4599       if test "$x_includes $x_libraries" = "NONE NONE" \
4600     -a -n "$OPENWINHOME" \
4601     -a "$OPENWINHOME" != "/usr/openwin" \
4602     -a -d "$OPENWINHOME"; then
4603       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4604       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4605       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4606   fi
4607
4608   if test "$x_includes" = "NONE"; then
4609                     for dir in "/usr/X11" "/usr/X11R6"; do
4610       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4611     done
4612   fi
4613
4614   if test "$x_libraries" = "NONE"; then
4615     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4616       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4617     done
4618   fi
4619
4620   # If we find X, set shell vars x_includes and x_libraries to the
4621 # paths, otherwise set no_x=yes.
4622 # Uses ac_ vars as temps to allow command line to override cache and checks.
4623 # --without-x overrides everything else, but does not touch the cache.
4624 echo $ac_n "checking for X""... $ac_c" 1>&6
4625 echo "configure:4626: checking for X" >&5
4626
4627 # Check whether --with-x or --without-x was given.
4628 if test "${with_x+set}" = set; then
4629   withval="$with_x"
4630   :
4631 fi
4632
4633 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4634 if test "x$with_x" = xno; then
4635   # The user explicitly disabled X.
4636   have_x=disabled
4637 else
4638   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4639     # Both variables are already set.
4640     have_x=yes
4641   else
4642
4643 # One or both of the vars are not set, and there is no cached value.
4644 ac_x_includes=NO ac_x_libraries=NO
4645 rm -fr conftestdir
4646 if mkdir conftestdir; then
4647   cd conftestdir
4648   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4649   cat > Imakefile <<'EOF'
4650 acfindx:
4651         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4652 EOF
4653   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4654     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4655     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4656     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4657     for ac_extension in a so sl; do
4658       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4659         test -f $ac_im_libdir/libX11.$ac_extension; then
4660         ac_im_usrlibdir=$ac_im_libdir; break
4661       fi
4662     done
4663     # Screen out bogus values from the imake configuration.  They are
4664     # bogus both because they are the default anyway, and because
4665     # using them would break gcc on systems where it needs fixed includes.
4666     case "$ac_im_incroot" in
4667         /usr/include) ;;
4668         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4669     esac
4670     case "$ac_im_usrlibdir" in
4671         /usr/lib | /lib) ;;
4672         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4673     esac
4674   fi
4675   cd ..
4676   rm -fr conftestdir
4677 fi
4678
4679 if test "$ac_x_includes" = NO; then
4680   # Guess where to find include files, by looking for this one X11 .h file.
4681   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4682
4683   # First, try using that file with no special directory specified.
4684 cat > conftest.$ac_ext <<EOF
4685 #line 4686 "configure"
4686 #include "confdefs.h"
4687 #include <$x_direct_test_include>
4688 EOF
4689 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4690 { (eval echo configure:4691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4691 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4692 if test -z "$ac_err"; then
4693   rm -rf conftest*
4694   # We can compile using X headers with no special include directory.
4695 ac_x_includes=
4696 else
4697   echo "$ac_err" >&5
4698   echo "configure: failed program was:" >&5
4699   cat conftest.$ac_ext >&5
4700   rm -rf conftest*
4701   # Look for the header file in a standard set of common directories.
4702 # Check X11 before X11Rn because it is often a symlink to the current release.
4703   for ac_dir in               \
4704     /usr/X11/include          \
4705     /usr/X11R6/include        \
4706     /usr/X11R5/include        \
4707     /usr/X11R4/include        \
4708                               \
4709     /usr/include/X11          \
4710     /usr/include/X11R6        \
4711     /usr/include/X11R5        \
4712     /usr/include/X11R4        \
4713                               \
4714     /usr/local/X11/include    \
4715     /usr/local/X11R6/include  \
4716     /usr/local/X11R5/include  \
4717     /usr/local/X11R4/include  \
4718                               \
4719     /usr/local/include/X11    \
4720     /usr/local/include/X11R6  \
4721     /usr/local/include/X11R5  \
4722     /usr/local/include/X11R4  \
4723                               \
4724     /usr/X386/include         \
4725     /usr/x386/include         \
4726     /usr/XFree86/include/X11  \
4727                               \
4728     /usr/include              \
4729     /usr/local/include        \
4730     /usr/unsupported/include  \
4731     /usr/athena/include       \
4732     /usr/local/x11r5/include  \
4733     /usr/lpp/Xamples/include  \
4734                               \
4735     /usr/openwin/include      \
4736     /usr/openwin/share/include \
4737     ; \
4738   do
4739     if test -r "$ac_dir/$x_direct_test_include"; then
4740       ac_x_includes=$ac_dir
4741       break
4742     fi
4743   done
4744 fi
4745 rm -f conftest*
4746 fi # $ac_x_includes = NO
4747
4748 if test "$ac_x_libraries" = NO; then
4749   # Check for the libraries.
4750
4751   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4752   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4753
4754   # See if we find them without any special options.
4755   # Don't add to $LIBS permanently.
4756   ac_save_LIBS="$LIBS"
4757   LIBS="-l$x_direct_test_library $LIBS"
4758 cat > conftest.$ac_ext <<EOF
4759 #line 4760 "configure"
4760 #include "confdefs.h"
4761
4762 int main() {
4763 ${x_direct_test_function}()
4764 ; return 0; }
4765 EOF
4766 if { (eval echo configure:4767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4767   rm -rf conftest*
4768   LIBS="$ac_save_LIBS"
4769 # We can link X programs with no special library path.
4770 ac_x_libraries=
4771 else
4772   echo "configure: failed program was:" >&5
4773   cat conftest.$ac_ext >&5
4774   rm -rf conftest*
4775   LIBS="$ac_save_LIBS"
4776 # First see if replacing the include by lib works.
4777 # Check X11 before X11Rn because it is often a symlink to the current release.
4778 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4779     /usr/X11/lib          \
4780     /usr/X11R6/lib        \
4781     /usr/X11R5/lib        \
4782     /usr/X11R4/lib        \
4783                           \
4784     /usr/lib/X11          \
4785     /usr/lib/X11R6        \
4786     /usr/lib/X11R5        \
4787     /usr/lib/X11R4        \
4788                           \
4789     /usr/local/X11/lib    \
4790     /usr/local/X11R6/lib  \
4791     /usr/local/X11R5/lib  \
4792     /usr/local/X11R4/lib  \
4793                           \
4794     /usr/local/lib/X11    \
4795     /usr/local/lib/X11R6  \
4796     /usr/local/lib/X11R5  \
4797     /usr/local/lib/X11R4  \
4798                           \
4799     /usr/X386/lib         \
4800     /usr/x386/lib         \
4801     /usr/XFree86/lib/X11  \
4802                           \
4803     /usr/lib              \
4804     /usr/local/lib        \
4805     /usr/unsupported/lib  \
4806     /usr/athena/lib       \
4807     /usr/local/x11r5/lib  \
4808     /usr/lpp/Xamples/lib  \
4809     /lib/usr/lib/X11      \
4810                           \
4811     /usr/openwin/lib      \
4812     /usr/openwin/share/lib \
4813     ; \
4814 do
4815   for ac_extension in a so sl; do
4816     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4817       ac_x_libraries=$ac_dir
4818       break 2
4819     fi
4820   done
4821 done
4822 fi
4823 rm -f conftest*
4824 fi # $ac_x_libraries = NO
4825
4826 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4827   # Didn't find X anywhere.  Cache the known absence of X.
4828   ac_cv_have_x="have_x=no"
4829 else
4830   # Record where we found X for the cache.
4831   ac_cv_have_x="have_x=yes \
4832                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4833 fi
4834   fi
4835   eval "$ac_cv_have_x"
4836 fi # $with_x != no
4837
4838 if test "$have_x" != yes; then
4839   echo "$ac_t""$have_x" 1>&6
4840   no_x=yes
4841 else
4842   # If each of the values was on the command line, it overrides each guess.
4843   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4844   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4845   # Update the cache value to reflect the command line values.
4846   ac_cv_have_x="have_x=yes \
4847                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4848   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4849 fi
4850
4851 if test "$no_x" = yes; then
4852   # Not all programs may use this symbol, but it does not hurt to define it.
4853   { test "$extra_verbose" = "yes" && cat << \EOF
4854     Defining X_DISPLAY_MISSING
4855 EOF
4856 cat >> confdefs.h <<\EOF
4857 #define X_DISPLAY_MISSING 1
4858 EOF
4859 }
4860
4861   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4862 else
4863   if test -n "$x_includes"; then
4864     X_CFLAGS="$X_CFLAGS -I$x_includes"
4865   fi
4866
4867   # It would also be nice to do this for all -L options, not just this one.
4868   if test -n "$x_libraries"; then
4869     X_LIBS="$X_LIBS -L$x_libraries"
4870     # For Solaris; some versions of Sun CC require a space after -R and
4871     # others require no space.  Words are not sufficient . . . .
4872     case "`(uname -sr) 2>/dev/null`" in
4873     "SunOS 5"*)
4874       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4875 echo "configure:4876: checking whether -R must be followed by a space" >&5
4876       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4877       cat > conftest.$ac_ext <<EOF
4878 #line 4879 "configure"
4879 #include "confdefs.h"
4880
4881 int main() {
4882
4883 ; return 0; }
4884 EOF
4885 if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4886   rm -rf conftest*
4887   ac_R_nospace=yes
4888 else
4889   echo "configure: failed program was:" >&5
4890   cat conftest.$ac_ext >&5
4891   rm -rf conftest*
4892   ac_R_nospace=no
4893 fi
4894 rm -f conftest*
4895       if test $ac_R_nospace = yes; then
4896         echo "$ac_t""no" 1>&6
4897         X_LIBS="$X_LIBS -R$x_libraries"
4898       else
4899         LIBS="$ac_xsave_LIBS -R $x_libraries"
4900         cat > conftest.$ac_ext <<EOF
4901 #line 4902 "configure"
4902 #include "confdefs.h"
4903
4904 int main() {
4905
4906 ; return 0; }
4907 EOF
4908 if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4909   rm -rf conftest*
4910   ac_R_space=yes
4911 else
4912   echo "configure: failed program was:" >&5
4913   cat conftest.$ac_ext >&5
4914   rm -rf conftest*
4915   ac_R_space=no
4916 fi
4917 rm -f conftest*
4918         if test $ac_R_space = yes; then
4919           echo "$ac_t""yes" 1>&6
4920           X_LIBS="$X_LIBS -R $x_libraries"
4921         else
4922           echo "$ac_t""neither works" 1>&6
4923         fi
4924       fi
4925       LIBS="$ac_xsave_LIBS"
4926     esac
4927   fi
4928
4929   # Check for system-dependent libraries X programs must link with.
4930   # Do this before checking for the system-independent R6 libraries
4931   # (-lICE), since we may need -lsocket or whatever for X linking.
4932
4933   if test "$ISC" = yes; then
4934     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4935   else
4936     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4937     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4938     # the Alpha needs dnet_stub (dnet does not exist).
4939     if test "$with_dnet" = "no" ; then
4940 ac_cv_lib_dnet_dnet_ntoa=no
4941 else
4942
4943 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4944 echo "configure:4945: checking for dnet_ntoa in -ldnet" >&5
4945 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4946
4947 xe_check_libs=" -ldnet "
4948 cat > conftest.$ac_ext <<EOF
4949 #line 4950 "configure"
4950 #include "confdefs.h"
4951 /* Override any gcc2 internal prototype to avoid an error.  */
4952 /* We use char because int might match the return type of a gcc2
4953     builtin and then its argument prototype would still apply.  */
4954 char dnet_ntoa();
4955
4956 int main() {
4957 dnet_ntoa()
4958 ; return 0; }
4959 EOF
4960 if { (eval echo configure:4961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4961   rm -rf conftest*
4962   eval "ac_cv_lib_$ac_lib_var=yes"
4963 else
4964   echo "configure: failed program was:" >&5
4965   cat conftest.$ac_ext >&5
4966   rm -rf conftest*
4967   eval "ac_cv_lib_$ac_lib_var=no"
4968 fi
4969 rm -f conftest*
4970 xe_check_libs=""
4971
4972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4973   echo "$ac_t""yes" 1>&6
4974   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4975 else
4976   echo "$ac_t""no" 1>&6
4977 fi
4978
4979 fi
4980
4981     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4982       
4983 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4984 echo "configure:4985: checking for dnet_ntoa in -ldnet_stub" >&5
4985 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4986
4987 xe_check_libs=" -ldnet_stub "
4988 cat > conftest.$ac_ext <<EOF
4989 #line 4990 "configure"
4990 #include "confdefs.h"
4991 /* Override any gcc2 internal prototype to avoid an error.  */
4992 /* We use char because int might match the return type of a gcc2
4993     builtin and then its argument prototype would still apply.  */
4994 char dnet_ntoa();
4995
4996 int main() {
4997 dnet_ntoa()
4998 ; return 0; }
4999 EOF
5000 if { (eval echo configure:5001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5001   rm -rf conftest*
5002   eval "ac_cv_lib_$ac_lib_var=yes"
5003 else
5004   echo "configure: failed program was:" >&5
5005   cat conftest.$ac_ext >&5
5006   rm -rf conftest*
5007   eval "ac_cv_lib_$ac_lib_var=no"
5008 fi
5009 rm -f conftest*
5010 xe_check_libs=""
5011
5012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5013   echo "$ac_t""yes" 1>&6
5014   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5015 else
5016   echo "$ac_t""no" 1>&6
5017 fi
5018
5019
5020     fi
5021
5022     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5023     # to get the SysV transport functions.
5024     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5025     # needs -lnsl.
5026     # The nsl library prevents programs from opening the X display
5027     # on Irix 5.2, according to dickey@clark.net.
5028     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5029 echo "configure:5030: checking for gethostbyname" >&5
5030
5031 cat > conftest.$ac_ext <<EOF
5032 #line 5033 "configure"
5033 #include "confdefs.h"
5034 /* System header to define __stub macros and hopefully few prototypes,
5035     which can conflict with char gethostbyname(); below.  */
5036 #include <assert.h>
5037 /* Override any gcc2 internal prototype to avoid an error.  */
5038 /* We use char because int might match the return type of a gcc2
5039     builtin and then its argument prototype would still apply.  */
5040 char gethostbyname();
5041
5042 int main() {
5043
5044 /* The GNU C library defines this for functions which it implements
5045     to always fail with ENOSYS.  Some functions are actually named
5046     something starting with __ and the normal name is an alias.  */
5047 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5048 choke me
5049 #else
5050 gethostbyname();
5051 #endif
5052
5053 ; return 0; }
5054 EOF
5055 if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5056   rm -rf conftest*
5057   eval "ac_cv_func_gethostbyname=yes"
5058 else
5059   echo "configure: failed program was:" >&5
5060   cat conftest.$ac_ext >&5
5061   rm -rf conftest*
5062   eval "ac_cv_func_gethostbyname=no"
5063 fi
5064 rm -f conftest*
5065
5066 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5067   echo "$ac_t""yes" 1>&6
5068   :
5069 else
5070   echo "$ac_t""no" 1>&6
5071 fi
5072
5073     if test $ac_cv_func_gethostbyname = no; then
5074       
5075 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5076 echo "configure:5077: checking for gethostbyname in -lnsl" >&5
5077 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5078
5079 xe_check_libs=" -lnsl "
5080 cat > conftest.$ac_ext <<EOF
5081 #line 5082 "configure"
5082 #include "confdefs.h"
5083 /* Override any gcc2 internal prototype to avoid an error.  */
5084 /* We use char because int might match the return type of a gcc2
5085     builtin and then its argument prototype would still apply.  */
5086 char gethostbyname();
5087
5088 int main() {
5089 gethostbyname()
5090 ; return 0; }
5091 EOF
5092 if { (eval echo configure:5093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5093   rm -rf conftest*
5094   eval "ac_cv_lib_$ac_lib_var=yes"
5095 else
5096   echo "configure: failed program was:" >&5
5097   cat conftest.$ac_ext >&5
5098   rm -rf conftest*
5099   eval "ac_cv_lib_$ac_lib_var=no"
5100 fi
5101 rm -f conftest*
5102 xe_check_libs=""
5103
5104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5105   echo "$ac_t""yes" 1>&6
5106   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5107 else
5108   echo "$ac_t""no" 1>&6
5109 fi
5110
5111
5112     fi
5113
5114     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5115     # socket/setsockopt and other routines are undefined under SCO ODT
5116     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5117     # on later versions), says simon@lia.di.epfl.ch: it contains
5118     # gethostby* variants that don't use the nameserver (or something).
5119     # -lsocket must be given before -lnsl if both are needed.
5120     # We assume that if connect needs -lnsl, so does gethostbyname.
5121     echo $ac_n "checking for connect""... $ac_c" 1>&6
5122 echo "configure:5123: checking for connect" >&5
5123
5124 cat > conftest.$ac_ext <<EOF
5125 #line 5126 "configure"
5126 #include "confdefs.h"
5127 /* System header to define __stub macros and hopefully few prototypes,
5128     which can conflict with char connect(); below.  */
5129 #include <assert.h>
5130 /* Override any gcc2 internal prototype to avoid an error.  */
5131 /* We use char because int might match the return type of a gcc2
5132     builtin and then its argument prototype would still apply.  */
5133 char connect();
5134
5135 int main() {
5136
5137 /* The GNU C library defines this for functions which it implements
5138     to always fail with ENOSYS.  Some functions are actually named
5139     something starting with __ and the normal name is an alias.  */
5140 #if defined (__stub_connect) || defined (__stub___connect)
5141 choke me
5142 #else
5143 connect();
5144 #endif
5145
5146 ; return 0; }
5147 EOF
5148 if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5149   rm -rf conftest*
5150   eval "ac_cv_func_connect=yes"
5151 else
5152   echo "configure: failed program was:" >&5
5153   cat conftest.$ac_ext >&5
5154   rm -rf conftest*
5155   eval "ac_cv_func_connect=no"
5156 fi
5157 rm -f conftest*
5158
5159 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5160   echo "$ac_t""yes" 1>&6
5161   :
5162 else
5163   echo "$ac_t""no" 1>&6
5164 fi
5165
5166     if test $ac_cv_func_connect = no; then
5167       
5168 xe_msg_checking="for connect in -lsocket"
5169 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5170 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5171 echo "configure:5172: checking "$xe_msg_checking"" >&5
5172 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5173
5174 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5175 cat > conftest.$ac_ext <<EOF
5176 #line 5177 "configure"
5177 #include "confdefs.h"
5178 /* Override any gcc2 internal prototype to avoid an error.  */
5179 /* We use char because int might match the return type of a gcc2
5180     builtin and then its argument prototype would still apply.  */
5181 char connect();
5182
5183 int main() {
5184 connect()
5185 ; return 0; }
5186 EOF
5187 if { (eval echo configure:5188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5188   rm -rf conftest*
5189   eval "ac_cv_lib_$ac_lib_var=yes"
5190 else
5191   echo "configure: failed program was:" >&5
5192   cat conftest.$ac_ext >&5
5193   rm -rf conftest*
5194   eval "ac_cv_lib_$ac_lib_var=no"
5195 fi
5196 rm -f conftest*
5197 xe_check_libs=""
5198
5199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5200   echo "$ac_t""yes" 1>&6
5201   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5202 else
5203   echo "$ac_t""no" 1>&6
5204 fi
5205
5206
5207     fi
5208
5209     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5210     echo $ac_n "checking for remove""... $ac_c" 1>&6
5211 echo "configure:5212: checking for remove" >&5
5212
5213 cat > conftest.$ac_ext <<EOF
5214 #line 5215 "configure"
5215 #include "confdefs.h"
5216 /* System header to define __stub macros and hopefully few prototypes,
5217     which can conflict with char remove(); below.  */
5218 #include <assert.h>
5219 /* Override any gcc2 internal prototype to avoid an error.  */
5220 /* We use char because int might match the return type of a gcc2
5221     builtin and then its argument prototype would still apply.  */
5222 char remove();
5223
5224 int main() {
5225
5226 /* The GNU C library defines this for functions which it implements
5227     to always fail with ENOSYS.  Some functions are actually named
5228     something starting with __ and the normal name is an alias.  */
5229 #if defined (__stub_remove) || defined (__stub___remove)
5230 choke me
5231 #else
5232 remove();
5233 #endif
5234
5235 ; return 0; }
5236 EOF
5237 if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5238   rm -rf conftest*
5239   eval "ac_cv_func_remove=yes"
5240 else
5241   echo "configure: failed program was:" >&5
5242   cat conftest.$ac_ext >&5
5243   rm -rf conftest*
5244   eval "ac_cv_func_remove=no"
5245 fi
5246 rm -f conftest*
5247
5248 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5249   echo "$ac_t""yes" 1>&6
5250   :
5251 else
5252   echo "$ac_t""no" 1>&6
5253 fi
5254
5255     if test $ac_cv_func_remove = no; then
5256       
5257 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5258 echo "configure:5259: checking for remove in -lposix" >&5
5259 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5260
5261 xe_check_libs=" -lposix "
5262 cat > conftest.$ac_ext <<EOF
5263 #line 5264 "configure"
5264 #include "confdefs.h"
5265 /* Override any gcc2 internal prototype to avoid an error.  */
5266 /* We use char because int might match the return type of a gcc2
5267     builtin and then its argument prototype would still apply.  */
5268 char remove();
5269
5270 int main() {
5271 remove()
5272 ; return 0; }
5273 EOF
5274 if { (eval echo configure:5275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5275   rm -rf conftest*
5276   eval "ac_cv_lib_$ac_lib_var=yes"
5277 else
5278   echo "configure: failed program was:" >&5
5279   cat conftest.$ac_ext >&5
5280   rm -rf conftest*
5281   eval "ac_cv_lib_$ac_lib_var=no"
5282 fi
5283 rm -f conftest*
5284 xe_check_libs=""
5285
5286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5287   echo "$ac_t""yes" 1>&6
5288   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5289 else
5290   echo "$ac_t""no" 1>&6
5291 fi
5292
5293
5294     fi
5295
5296     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5297     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5298 echo "configure:5299: checking for shmat" >&5
5299
5300 cat > conftest.$ac_ext <<EOF
5301 #line 5302 "configure"
5302 #include "confdefs.h"
5303 /* System header to define __stub macros and hopefully few prototypes,
5304     which can conflict with char shmat(); below.  */
5305 #include <assert.h>
5306 /* Override any gcc2 internal prototype to avoid an error.  */
5307 /* We use char because int might match the return type of a gcc2
5308     builtin and then its argument prototype would still apply.  */
5309 char shmat();
5310
5311 int main() {
5312
5313 /* The GNU C library defines this for functions which it implements
5314     to always fail with ENOSYS.  Some functions are actually named
5315     something starting with __ and the normal name is an alias.  */
5316 #if defined (__stub_shmat) || defined (__stub___shmat)
5317 choke me
5318 #else
5319 shmat();
5320 #endif
5321
5322 ; return 0; }
5323 EOF
5324 if { (eval echo configure:5325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5325   rm -rf conftest*
5326   eval "ac_cv_func_shmat=yes"
5327 else
5328   echo "configure: failed program was:" >&5
5329   cat conftest.$ac_ext >&5
5330   rm -rf conftest*
5331   eval "ac_cv_func_shmat=no"
5332 fi
5333 rm -f conftest*
5334
5335 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5336   echo "$ac_t""yes" 1>&6
5337   :
5338 else
5339   echo "$ac_t""no" 1>&6
5340 fi
5341
5342     if test $ac_cv_func_shmat = no; then
5343       
5344 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5345 echo "configure:5346: checking for shmat in -lipc" >&5
5346 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5347
5348 xe_check_libs=" -lipc "
5349 cat > conftest.$ac_ext <<EOF
5350 #line 5351 "configure"
5351 #include "confdefs.h"
5352 /* Override any gcc2 internal prototype to avoid an error.  */
5353 /* We use char because int might match the return type of a gcc2
5354     builtin and then its argument prototype would still apply.  */
5355 char shmat();
5356
5357 int main() {
5358 shmat()
5359 ; return 0; }
5360 EOF
5361 if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5362   rm -rf conftest*
5363   eval "ac_cv_lib_$ac_lib_var=yes"
5364 else
5365   echo "configure: failed program was:" >&5
5366   cat conftest.$ac_ext >&5
5367   rm -rf conftest*
5368   eval "ac_cv_lib_$ac_lib_var=no"
5369 fi
5370 rm -f conftest*
5371 xe_check_libs=""
5372
5373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5374   echo "$ac_t""yes" 1>&6
5375   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5376 else
5377   echo "$ac_t""no" 1>&6
5378 fi
5379
5380
5381     fi
5382   fi
5383
5384   # Check for libraries that X11R6 Xt/Xaw programs need.
5385   ac_save_LDFLAGS="$LDFLAGS"
5386   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5387   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5388   # check for ICE first), but we must link in the order -lSM -lICE or
5389   # we get undefined symbols.  So assume we have SM if we have ICE.
5390   # These have to be linked with before -lX11, unlike the other
5391   # libraries we check for below, so use a different variable.
5392   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5393   
5394 xe_msg_checking="for IceConnectionNumber in -lICE"
5395 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5396 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5397 echo "configure:5398: checking "$xe_msg_checking"" >&5
5398 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5399
5400 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5401 cat > conftest.$ac_ext <<EOF
5402 #line 5403 "configure"
5403 #include "confdefs.h"
5404 /* Override any gcc2 internal prototype to avoid an error.  */
5405 /* We use char because int might match the return type of a gcc2
5406     builtin and then its argument prototype would still apply.  */
5407 char IceConnectionNumber();
5408
5409 int main() {
5410 IceConnectionNumber()
5411 ; return 0; }
5412 EOF
5413 if { (eval echo configure:5414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5414   rm -rf conftest*
5415   eval "ac_cv_lib_$ac_lib_var=yes"
5416 else
5417   echo "configure: failed program was:" >&5
5418   cat conftest.$ac_ext >&5
5419   rm -rf conftest*
5420   eval "ac_cv_lib_$ac_lib_var=no"
5421 fi
5422 rm -f conftest*
5423 xe_check_libs=""
5424
5425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5426   echo "$ac_t""yes" 1>&6
5427   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5428 else
5429   echo "$ac_t""no" 1>&6
5430 fi
5431
5432
5433   LDFLAGS="$ac_save_LDFLAGS"
5434
5435 fi
5436  # Autoconf claims to find X library and include dirs for us.
5437   if test "$no_x" = "yes"
5438   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5439   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5440   fi
5441 fi
5442
5443 case "$with_x11" in
5444   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5445   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5446 esac
5447
5448 if test "$with_x11" = "yes"; then
5449   { test "$extra_verbose" = "yes" && cat << \EOF
5450     Defining HAVE_X_WINDOWS
5451 EOF
5452 cat >> confdefs.h <<\EOF
5453 #define HAVE_X_WINDOWS 1
5454 EOF
5455 }
5456
5457   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5458   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5459
5460       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5461     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5462     if test -d "$lib_dir" -a -d "$inc_dir"; then
5463       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5464         x_libraries="$lib_dir $x_libraries"
5465         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5466       esac
5467       case "$x_includes" in "$inc_dir"* ) ;; *)
5468         x_includes="$inc_dir $x_includes"
5469         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5470       esac
5471       break;       fi
5472   done
5473
5474     for rel in "X11R6" "X11R5" "X11R4"; do
5475     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5476     if test -d "$lib_dir" -a -d "$inc_dir"; then
5477       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5478         x_libraries="$x_libraries $lib_dir"
5479         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5480       esac
5481       case "$x_includes" in "$inc_dir"* ) ;; *)
5482         x_includes="$x_includes $inc_dir"
5483         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5484       esac
5485       break;     fi
5486   done
5487
5488     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
5489
5490   ld_switch_x_site="$X_LIBS"
5491
5492   
5493 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5494     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5495   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5496   
5497         runpath="" runpath_dirs=""
5498   if test -n "$LD_RUN_PATH"; then
5499     runpath="$LD_RUN_PATH"
5500   elif test "$GCC" = "yes"; then
5501         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5502     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5503     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5504     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5505       case "$arg" in P,* | -L* | -R* )
5506         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5507           {
5508 xe_runpath_dir="$dir"
5509   test "$xe_runpath_dir" != "/lib"     -a \
5510         "$xe_runpath_dir" != "/usr/lib" -a \
5511         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5512   eval "$xe_add_unique_runpath_dir"
5513 }
5514         done ;;
5515       esac
5516     done
5517     ld_switch_run="$ld_switch_run_save"
5518     rm -f conftest*
5519   else
5520         for arg in $ld_switch_site $ld_switch_x_site; do
5521       case "$arg" in -L*) {
5522 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5523   test "$xe_runpath_dir" != "/lib"     -a \
5524         "$xe_runpath_dir" != "/usr/lib" -a \
5525         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5526   eval "$xe_add_unique_runpath_dir"
5527 };; esac
5528     done
5529         if test "$opsys $need_motif" = "sol2 yes"; then
5530       xe_runpath_dir="/opt/SUNWdt/lib";
5531       eval "$xe_add_unique_runpath_dir";
5532     fi
5533   fi 
5534   if test -n "$runpath"; then
5535     ld_switch_run="${dash_r}${runpath}"
5536     
5537 if test "$GCC" = "yes"; then
5538   set x $ld_switch_run; shift; ld_switch_run=""
5539   while test -n "$1"; do
5540     case $1 in
5541       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5542       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5543       -Xlinker* ) ;;
5544       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5545     esac
5546     shift
5547   done
5548 fi
5549     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5550   fi
5551 fi
5552
5553
5554   if test "$extra_verbose" = "yes"; then
5555     echo; echo "X11 compilation variables:"
5556     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5557     echo
5558   fi
5559
5560             bitmapdirs=
5561   if test "$x_includes" != NONE; then
5562     for i in $x_includes; do
5563       if test -d "$i/bitmaps"; then
5564         bitmapdirs="$i/bitmaps:$bitmapdirs"
5565       fi
5566       if test -d "$i/X11/bitmaps"; then
5567         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5568       fi
5569     done
5570     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5571   fi
5572   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5573     Defining BITMAPDIR = "$bitmapdirs"
5574 EOF
5575 cat >> confdefs.h <<EOF
5576 #define BITMAPDIR "$bitmapdirs"
5577 EOF
5578 }
5579
5580
5581     echo "checking for X defines extracted by xmkmf" 1>&6
5582 echo "configure:5583: checking for X defines extracted by xmkmf" >&5
5583   rm -fr conftestdir
5584   if mkdir conftestdir; then
5585     cd conftestdir
5586     cat > Imakefile <<'EOF'
5587 xetest:
5588         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5589 EOF
5590     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5591       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5592       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5593     fi
5594     cd ..
5595     rm -fr conftestdir
5596     for word in $xmkmf_defines; do
5597       case "$word" in
5598         -D*=* ) ;;
5599         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5600               { test "$extra_verbose" = "yes" && cat << EOF
5601     Defining $word
5602 EOF
5603 cat >> confdefs.h <<EOF
5604 #define $word 1
5605 EOF
5606 }
5607  ;;
5608       esac
5609     done
5610   fi
5611
5612     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5613 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5614 echo "configure:5615: checking for X11/Intrinsic.h" >&5
5615
5616 cat > conftest.$ac_ext <<EOF
5617 #line 5618 "configure"
5618 #include "confdefs.h"
5619 #include <X11/Intrinsic.h>
5620 EOF
5621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5622 { (eval echo configure:5623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5624 if test -z "$ac_err"; then
5625   rm -rf conftest*
5626   eval "ac_cv_header_$ac_safe=yes"
5627 else
5628   echo "$ac_err" >&5
5629   echo "configure: failed program was:" >&5
5630   cat conftest.$ac_ext >&5
5631   rm -rf conftest*
5632   eval "ac_cv_header_$ac_safe=no"
5633 fi
5634 rm -f conftest*
5635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5636   echo "$ac_t""yes" 1>&6
5637   :
5638 else
5639   echo "$ac_t""no" 1>&6
5640 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5641 fi
5642
5643
5644       
5645 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5646 echo "configure:5647: checking for XOpenDisplay in -lX11" >&5
5647 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5648
5649 xe_check_libs=" -lX11 "
5650 cat > conftest.$ac_ext <<EOF
5651 #line 5652 "configure"
5652 #include "confdefs.h"
5653 /* Override any gcc2 internal prototype to avoid an error.  */
5654 /* We use char because int might match the return type of a gcc2
5655     builtin and then its argument prototype would still apply.  */
5656 char XOpenDisplay();
5657
5658 int main() {
5659 XOpenDisplay()
5660 ; return 0; }
5661 EOF
5662 if { (eval echo configure:5663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5663   rm -rf conftest*
5664   eval "ac_cv_lib_$ac_lib_var=yes"
5665 else
5666   echo "configure: failed program was:" >&5
5667   cat conftest.$ac_ext >&5
5668   rm -rf conftest*
5669   eval "ac_cv_lib_$ac_lib_var=no"
5670 fi
5671 rm -f conftest*
5672 xe_check_libs=""
5673
5674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5675   echo "$ac_t""yes" 1>&6
5676   have_lib_x11=yes
5677 else
5678   echo "$ac_t""no" 1>&6
5679 fi
5680
5681
5682   if test "$have_lib_x11" != "yes"; then
5683     
5684 xe_msg_checking="for XGetFontProperty in -lX11"
5685 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5686 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5687 echo "configure:5688: checking "$xe_msg_checking"" >&5
5688 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5689
5690 xe_check_libs=" -lX11 -b i486-linuxaout"
5691 cat > conftest.$ac_ext <<EOF
5692 #line 5693 "configure"
5693 #include "confdefs.h"
5694 /* Override any gcc2 internal prototype to avoid an error.  */
5695 /* We use char because int might match the return type of a gcc2
5696     builtin and then its argument prototype would still apply.  */
5697 char XGetFontProperty();
5698
5699 int main() {
5700 XGetFontProperty()
5701 ; return 0; }
5702 EOF
5703 if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5704   rm -rf conftest*
5705   eval "ac_cv_lib_$ac_lib_var=yes"
5706 else
5707   echo "configure: failed program was:" >&5
5708   cat conftest.$ac_ext >&5
5709   rm -rf conftest*
5710   eval "ac_cv_lib_$ac_lib_var=no"
5711 fi
5712 rm -f conftest*
5713 xe_check_libs=""
5714
5715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5716   echo "$ac_t""yes" 1>&6
5717   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5718 else
5719   echo "$ac_t""no" 1>&6
5720 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5721 fi
5722
5723
5724   fi
5725   libs_x="-lX11"
5726   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5727
5728     
5729 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5730 echo "configure:5731: checking for XShapeSelectInput in -lXext" >&5
5731 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5732
5733 xe_check_libs=" -lXext "
5734 cat > conftest.$ac_ext <<EOF
5735 #line 5736 "configure"
5736 #include "confdefs.h"
5737 /* Override any gcc2 internal prototype to avoid an error.  */
5738 /* We use char because int might match the return type of a gcc2
5739     builtin and then its argument prototype would still apply.  */
5740 char XShapeSelectInput();
5741
5742 int main() {
5743 XShapeSelectInput()
5744 ; return 0; }
5745 EOF
5746 if { (eval echo configure:5747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5747   rm -rf conftest*
5748   eval "ac_cv_lib_$ac_lib_var=yes"
5749 else
5750   echo "configure: failed program was:" >&5
5751   cat conftest.$ac_ext >&5
5752   rm -rf conftest*
5753   eval "ac_cv_lib_$ac_lib_var=no"
5754 fi
5755 rm -f conftest*
5756 xe_check_libs=""
5757
5758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5759   echo "$ac_t""yes" 1>&6
5760   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5761 else
5762   echo "$ac_t""no" 1>&6
5763 fi
5764
5765
5766
5767     
5768 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5769 echo "configure:5770: checking for XtOpenDisplay in -lXt" >&5
5770 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5771
5772 xe_check_libs=" -lXt "
5773 cat > conftest.$ac_ext <<EOF
5774 #line 5775 "configure"
5775 #include "confdefs.h"
5776 /* Override any gcc2 internal prototype to avoid an error.  */
5777 /* We use char because int might match the return type of a gcc2
5778     builtin and then its argument prototype would still apply.  */
5779 char XtOpenDisplay();
5780
5781 int main() {
5782 XtOpenDisplay()
5783 ; return 0; }
5784 EOF
5785 if { (eval echo configure:5786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5786   rm -rf conftest*
5787   eval "ac_cv_lib_$ac_lib_var=yes"
5788 else
5789   echo "configure: failed program was:" >&5
5790   cat conftest.$ac_ext >&5
5791   rm -rf conftest*
5792   eval "ac_cv_lib_$ac_lib_var=no"
5793 fi
5794 rm -f conftest*
5795 xe_check_libs=""
5796
5797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5798   echo "$ac_t""yes" 1>&6
5799   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5800 else
5801   echo "$ac_t""no" 1>&6
5802 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5803 fi
5804
5805
5806
5807   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5808 echo "configure:5809: checking the version of X11 being used" >&5
5809   cat > conftest.$ac_ext <<EOF
5810 #line 5811 "configure"
5811 #include "confdefs.h"
5812 #include <X11/Intrinsic.h>
5813     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5814 EOF
5815 if { (eval echo configure:5816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5816 then
5817   ./conftest foobar; x11_release=$?
5818 else
5819   conftest_rc="$?"
5820   echo "configure: failed program was:" >&5
5821   cat conftest.$ac_ext >&5
5822   rm -fr conftest*
5823   x11_release=4
5824 fi
5825 rm -fr conftest*
5826   echo "$ac_t""R${x11_release}" 1>&6
5827   { test "$extra_verbose" = "yes" && cat << EOF
5828     Defining THIS_IS_X11R${x11_release}
5829 EOF
5830 cat >> confdefs.h <<EOF
5831 #define THIS_IS_X11R${x11_release} 1
5832 EOF
5833 }
5834
5835
5836   for ac_hdr in X11/Xlocale.h
5837 do
5838 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5839 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5840 echo "configure:5841: checking for $ac_hdr" >&5
5841
5842 cat > conftest.$ac_ext <<EOF
5843 #line 5844 "configure"
5844 #include "confdefs.h"
5845 #include <$ac_hdr>
5846 EOF
5847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5848 { (eval echo configure:5849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5850 if test -z "$ac_err"; then
5851   rm -rf conftest*
5852   eval "ac_cv_header_$ac_safe=yes"
5853 else
5854   echo "$ac_err" >&5
5855   echo "configure: failed program was:" >&5
5856   cat conftest.$ac_ext >&5
5857   rm -rf conftest*
5858   eval "ac_cv_header_$ac_safe=no"
5859 fi
5860 rm -f conftest*
5861 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5862   echo "$ac_t""yes" 1>&6
5863     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5864   { test "$extra_verbose" = "yes" && cat << EOF
5865     Defining $ac_tr_hdr
5866 EOF
5867 cat >> confdefs.h <<EOF
5868 #define $ac_tr_hdr 1
5869 EOF
5870 }
5871  
5872 else
5873   echo "$ac_t""no" 1>&6
5874 fi
5875 done
5876
5877
5878     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5879 echo "configure:5880: checking for XFree86" >&5
5880   if test -d "/usr/X386/include" -o \
5881           -f "/etc/XF86Config"    -o \
5882           -f "/etc/X11/XF86Config" -o \
5883           -f "/usr/X11R6/lib/X11/XF86Config"; then
5884     echo "$ac_t""yes" 1>&6
5885     { test "$extra_verbose" = "yes" && cat << \EOF
5886     Defining HAVE_XFREE386
5887 EOF
5888 cat >> confdefs.h <<\EOF
5889 #define HAVE_XFREE386 1
5890 EOF
5891 }
5892
5893   else
5894     echo "$ac_t""no" 1>&6
5895   fi
5896
5897     test -z "$with_xmu" && { 
5898 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5899 echo "configure:5900: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5900 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5901
5902 xe_check_libs=" -lXmu "
5903 cat > conftest.$ac_ext <<EOF
5904 #line 5905 "configure"
5905 #include "confdefs.h"
5906 /* Override any gcc2 internal prototype to avoid an error.  */
5907 /* We use char because int might match the return type of a gcc2
5908     builtin and then its argument prototype would still apply.  */
5909 char XmuReadBitmapDataFromFile();
5910
5911 int main() {
5912 XmuReadBitmapDataFromFile()
5913 ; return 0; }
5914 EOF
5915 if { (eval echo configure:5916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5916   rm -rf conftest*
5917   eval "ac_cv_lib_$ac_lib_var=yes"
5918 else
5919   echo "configure: failed program was:" >&5
5920   cat conftest.$ac_ext >&5
5921   rm -rf conftest*
5922   eval "ac_cv_lib_$ac_lib_var=no"
5923 fi
5924 rm -f conftest*
5925 xe_check_libs=""
5926
5927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5928   echo "$ac_t""yes" 1>&6
5929   with_xmu=yes
5930 else
5931   echo "$ac_t""no" 1>&6
5932 with_xmu=no
5933 fi
5934
5935  }
5936   if test "$with_xmu" = "no"; then
5937     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
5938    echo "    xemacs will be linked with \"xmu.o\""
5939  fi
5940   else
5941     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
5942     { test "$extra_verbose" = "yes" && cat << \EOF
5943     Defining HAVE_XMU
5944 EOF
5945 cat >> confdefs.h <<\EOF
5946 #define HAVE_XMU 1
5947 EOF
5948 }
5949
5950   fi
5951
5952       
5953 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
5954 echo "configure:5955: checking for main in -lXbsd" >&5
5955 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
5956
5957 xe_check_libs=" -lXbsd "
5958 cat > conftest.$ac_ext <<EOF
5959 #line 5960 "configure"
5960 #include "confdefs.h"
5961
5962 int main() {
5963 main()
5964 ; return 0; }
5965 EOF
5966 if { (eval echo configure:5967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5967   rm -rf conftest*
5968   eval "ac_cv_lib_$ac_lib_var=yes"
5969 else
5970   echo "configure: failed program was:" >&5
5971   cat conftest.$ac_ext >&5
5972   rm -rf conftest*
5973   eval "ac_cv_lib_$ac_lib_var=no"
5974 fi
5975 rm -f conftest*
5976 xe_check_libs=""
5977
5978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5979   echo "$ac_t""yes" 1>&6
5980   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
5981 else
5982   echo "$ac_t""no" 1>&6
5983 fi
5984
5985
5986
5987     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
5988         if test "$GCC" = "yes"; then
5989       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
5990       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
5991     else
5992       case "$CC" in
5993         "xlc" ) CC="xlc_r" ;;
5994         "xlC" ) CC="xlC_r" ;;
5995         "cc"  ) CC="cc_r" ;;
5996       esac
5997     fi
5998   fi
5999
6000 fi 
6001 if test "$with_msw" != "no"; then
6002   echo "checking for MS-Windows" 1>&6
6003 echo "configure:6004: checking for MS-Windows" >&5
6004   
6005 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6006 echo "configure:6007: checking for main in -lgdi32" >&5
6007 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6008
6009 xe_check_libs=" -lgdi32 "
6010 cat > conftest.$ac_ext <<EOF
6011 #line 6012 "configure"
6012 #include "confdefs.h"
6013
6014 int main() {
6015 main()
6016 ; return 0; }
6017 EOF
6018 if { (eval echo configure:6019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6019   rm -rf conftest*
6020   eval "ac_cv_lib_$ac_lib_var=yes"
6021 else
6022   echo "configure: failed program was:" >&5
6023   cat conftest.$ac_ext >&5
6024   rm -rf conftest*
6025   eval "ac_cv_lib_$ac_lib_var=no"
6026 fi
6027 rm -f conftest*
6028 xe_check_libs=""
6029
6030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6031   echo "$ac_t""yes" 1>&6
6032   with_msw=yes
6033 else
6034   echo "$ac_t""no" 1>&6
6035 fi
6036
6037
6038   if test "$with_msw" = "yes"; then
6039     { test "$extra_verbose" = "yes" && cat << \EOF
6040     Defining HAVE_MS_WINDOWS
6041 EOF
6042 cat >> confdefs.h <<\EOF
6043 #define HAVE_MS_WINDOWS 1
6044 EOF
6045 }
6046
6047     install_pp="$blddir/lib-src/installexe.sh"
6048     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
6049     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6050     if test "$window_system" != x11; then
6051         window_system=msw
6052         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6053             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6054    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6055  fi
6056         test "$with_menubars"   != "no" && with_menubars=msw \
6057             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6058    echo "    xemacs will be linked with \"menubar-msw.o\""
6059  fi
6060         test "$with_toolbars"   != "no" && with_toolbars=msw \
6061             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6062    echo "    xemacs will be linked with \"toolbar-msw.o\""
6063  fi
6064         test "$with_dialogs"   != "no" && with_dialogs=msw \
6065             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6066    echo "    xemacs will be linked with \"dialog-msw.o\""
6067  fi
6068     else
6069         test "$with_scrollbars" != "no" && 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" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6073    echo "    xemacs will be linked with \"menubar-msw.o\""
6074  fi
6075         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6076    echo "    xemacs will be linked with \"toolbar-msw.o\""
6077  fi
6078         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6079    echo "    xemacs will be linked with \"dialog-msw.o\""
6080  fi
6081     fi
6082         cat > conftest.$ac_ext <<EOF
6083 #line 6084 "configure"
6084 #include "confdefs.h"
6085 #include <fcntl.h>
6086     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6087 EOF
6088 if { (eval echo configure:6089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6089 then
6090   { test "$extra_verbose" = "yes" && cat << \EOF
6091     Defining HAVE_MSG_SELECT
6092 EOF
6093 cat >> confdefs.h <<\EOF
6094 #define HAVE_MSG_SELECT 1
6095 EOF
6096 }
6097
6098 else
6099   conftest_rc="$?"
6100   echo "configure: failed program was:" >&5
6101   cat conftest.$ac_ext >&5
6102 fi
6103 rm -fr conftest*
6104     const_is_losing=no
6105     with_file_coding=yes
6106     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
6107    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\""
6108  fi
6109   fi
6110 fi
6111
6112
6113
6114 test -z "$window_system" && window_system="none"
6115
6116 if test "$window_system" = "none"; then
6117   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6118   do
6119     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6120        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6121     fi
6122     eval "with_${feature}=no"
6123   done
6124 else
6125   test -z "$with_toolbars" && with_toolbars=yes
6126 fi
6127
6128 if test "$with_msw" != "yes"; then
6129   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6130   do
6131     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6132        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6133     fi
6134     eval "with_${feature}=no"
6135   done
6136 else
6137   :
6138 fi
6139
6140 if test "$with_x11" != "yes"; then
6141             for feature in tooltalk cde offix wmcommand xim xmu
6142   do
6143     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6144        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6145     fi
6146     eval "with_${feature}=no"
6147   done
6148 fi
6149
6150 bitmapdir=
6151
6152 case "$window_system" in
6153   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6154   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6155   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6156 esac
6157
6158 case "$x_libraries" in *X11R4* )
6159   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6160   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6161 esac
6162
6163 echo "checking for WM_COMMAND option" 1>&6
6164 echo "configure:6165: checking for WM_COMMAND option" >&5;
6165 if test "$with_wmcommand" != "no"; then
6166   { test "$extra_verbose" = "yes" && cat << \EOF
6167     Defining HAVE_WMCOMMAND
6168 EOF
6169 cat >> confdefs.h <<\EOF
6170 #define HAVE_WMCOMMAND 1
6171 EOF
6172 }
6173
6174 fi
6175
6176 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6177 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6178 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6179 echo "configure:6180: checking for X11/Xauth.h" >&5
6180
6181 cat > conftest.$ac_ext <<EOF
6182 #line 6183 "configure"
6183 #include "confdefs.h"
6184 #include <X11/Xauth.h>
6185 EOF
6186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6187 { (eval echo configure:6188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6189 if test -z "$ac_err"; then
6190   rm -rf conftest*
6191   eval "ac_cv_header_$ac_safe=yes"
6192 else
6193   echo "$ac_err" >&5
6194   echo "configure: failed program was:" >&5
6195   cat conftest.$ac_ext >&5
6196   rm -rf conftest*
6197   eval "ac_cv_header_$ac_safe=no"
6198 fi
6199 rm -f conftest*
6200 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6201   echo "$ac_t""yes" 1>&6
6202   :
6203 else
6204   echo "$ac_t""no" 1>&6
6205 with_xauth=no
6206 fi
6207  }
6208 test -z "$with_xauth" && { 
6209 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6210 echo "configure:6211: checking for XauGetAuthByAddr in -lXau" >&5
6211 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6212
6213 xe_check_libs=" -lXau "
6214 cat > conftest.$ac_ext <<EOF
6215 #line 6216 "configure"
6216 #include "confdefs.h"
6217 /* Override any gcc2 internal prototype to avoid an error.  */
6218 /* We use char because int might match the return type of a gcc2
6219     builtin and then its argument prototype would still apply.  */
6220 char XauGetAuthByAddr();
6221
6222 int main() {
6223 XauGetAuthByAddr()
6224 ; return 0; }
6225 EOF
6226 if { (eval echo configure:6227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6227   rm -rf conftest*
6228   eval "ac_cv_lib_$ac_lib_var=yes"
6229 else
6230   echo "configure: failed program was:" >&5
6231   cat conftest.$ac_ext >&5
6232   rm -rf conftest*
6233   eval "ac_cv_lib_$ac_lib_var=no"
6234 fi
6235 rm -f conftest*
6236 xe_check_libs=""
6237
6238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6239   echo "$ac_t""yes" 1>&6
6240   :
6241 else
6242   echo "$ac_t""no" 1>&6
6243 with_xauth=no
6244 fi
6245
6246  }
6247 test -z "$with_xauth" && with_xauth=yes
6248 if test "$with_xauth" = "yes"; then
6249   { test "$extra_verbose" = "yes" && cat << \EOF
6250     Defining HAVE_XAUTH
6251 EOF
6252 cat >> confdefs.h <<\EOF
6253 #define HAVE_XAUTH 1
6254 EOF
6255 }
6256
6257   
6258 T=""
6259 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
6260 libs_xauth="$T"
6261
6262 fi
6263
6264
6265
6266
6267 if test "$with_tooltalk" != "no" ; then
6268       for dir in "" "Tt/" "desktop/" ; do
6269     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6270 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6271 echo "configure:6272: checking for ${dir}tt_c.h" >&5
6272
6273 cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276 #include <${dir}tt_c.h>
6277 EOF
6278 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6279 { (eval echo configure:6280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6280 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6281 if test -z "$ac_err"; then
6282   rm -rf conftest*
6283   eval "ac_cv_header_$ac_safe=yes"
6284 else
6285   echo "$ac_err" >&5
6286   echo "configure: failed program was:" >&5
6287   cat conftest.$ac_ext >&5
6288   rm -rf conftest*
6289   eval "ac_cv_header_$ac_safe=no"
6290 fi
6291 rm -f conftest*
6292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6293   echo "$ac_t""yes" 1>&6
6294   tt_c_h_path="${dir}tt_c.h"; break
6295 else
6296   echo "$ac_t""no" 1>&6
6297 fi
6298
6299   done
6300   if test -z "$tt_c_h_path"; then
6301     if test "$with_tooltalk" = "yes"; then
6302       (echo "$progname: Usage error:"
6303 echo " " "Unable to find required tooltalk header files."
6304 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6305     fi
6306     with_tooltalk=no
6307   fi
6308 fi
6309 if test "$with_tooltalk" != "no" ; then
6310   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6311     
6312 xe_msg_checking="for tt_message_create in -ltt"
6313 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6314 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6315 echo "configure:6316: checking "$xe_msg_checking"" >&5
6316 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6317
6318 xe_check_libs=" -ltt $extra_libs"
6319 cat > conftest.$ac_ext <<EOF
6320 #line 6321 "configure"
6321 #include "confdefs.h"
6322 /* Override any gcc2 internal prototype to avoid an error.  */
6323 /* We use char because int might match the return type of a gcc2
6324     builtin and then its argument prototype would still apply.  */
6325 char tt_message_create();
6326
6327 int main() {
6328 tt_message_create()
6329 ; return 0; }
6330 EOF
6331 if { (eval echo configure:6332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6332   rm -rf conftest*
6333   eval "ac_cv_lib_$ac_lib_var=yes"
6334 else
6335   echo "configure: failed program was:" >&5
6336   cat conftest.$ac_ext >&5
6337   rm -rf conftest*
6338   eval "ac_cv_lib_$ac_lib_var=no"
6339 fi
6340 rm -f conftest*
6341 xe_check_libs=""
6342
6343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6344   echo "$ac_t""yes" 1>&6
6345   tt_libs="-ltt $extra_libs"; break
6346 else
6347   echo "$ac_t""no" 1>&6
6348 :
6349 fi
6350
6351
6352   done
6353   if test -z "$tt_libs"; then
6354     if test "$with_tooltalk" = "yes"; then
6355       (echo "$progname: Usage error:"
6356 echo " " "Unable to find required tooltalk libraries."
6357 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6358     fi
6359     with_tooltalk=no
6360   fi
6361 fi
6362 test -z "$with_tooltalk" && with_tooltalk=yes
6363 if test "$with_tooltalk" = "yes"; then
6364   { test "$extra_verbose" = "yes" && cat << \EOF
6365     Defining TOOLTALK
6366 EOF
6367 cat >> confdefs.h <<\EOF
6368 #define TOOLTALK 1
6369 EOF
6370 }
6371
6372   { test "$extra_verbose" = "yes" && cat << EOF
6373     Defining TT_C_H_PATH = "$tt_c_h_path"
6374 EOF
6375 cat >> confdefs.h <<EOF
6376 #define TT_C_H_PATH "$tt_c_h_path"
6377 EOF
6378 }
6379
6380   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6381   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6382    echo "    xemacs will be linked with \"tooltalk.o\""
6383  fi
6384 fi
6385
6386 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6387 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6388 echo "configure:6389: checking for Dt/Dt.h" >&5
6389
6390 cat > conftest.$ac_ext <<EOF
6391 #line 6392 "configure"
6392 #include "confdefs.h"
6393 #include <Dt/Dt.h>
6394 EOF
6395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6396 { (eval echo configure:6397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6397 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6398 if test -z "$ac_err"; then
6399   rm -rf conftest*
6400   eval "ac_cv_header_$ac_safe=yes"
6401 else
6402   echo "$ac_err" >&5
6403   echo "configure: failed program was:" >&5
6404   cat conftest.$ac_ext >&5
6405   rm -rf conftest*
6406   eval "ac_cv_header_$ac_safe=no"
6407 fi
6408 rm -f conftest*
6409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6410   echo "$ac_t""yes" 1>&6
6411   :
6412 else
6413   echo "$ac_t""no" 1>&6
6414 with_cde=no
6415 fi
6416  }
6417 test -z "$with_cde" && { 
6418 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6419 echo "configure:6420: checking for DtDndDragStart in -lDtSvc" >&5
6420 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6421
6422 xe_check_libs=" -lDtSvc "
6423 cat > conftest.$ac_ext <<EOF
6424 #line 6425 "configure"
6425 #include "confdefs.h"
6426 /* Override any gcc2 internal prototype to avoid an error.  */
6427 /* We use char because int might match the return type of a gcc2
6428     builtin and then its argument prototype would still apply.  */
6429 char DtDndDragStart();
6430
6431 int main() {
6432 DtDndDragStart()
6433 ; return 0; }
6434 EOF
6435 if { (eval echo configure:6436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6436   rm -rf conftest*
6437   eval "ac_cv_lib_$ac_lib_var=yes"
6438 else
6439   echo "configure: failed program was:" >&5
6440   cat conftest.$ac_ext >&5
6441   rm -rf conftest*
6442   eval "ac_cv_lib_$ac_lib_var=no"
6443 fi
6444 rm -f conftest*
6445 xe_check_libs=""
6446
6447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6448   echo "$ac_t""yes" 1>&6
6449   :
6450 else
6451   echo "$ac_t""no" 1>&6
6452 with_cde=no
6453 fi
6454
6455  }
6456 test -z "$with_cde" && with_cde=yes
6457 if test "$with_dragndrop" = no; then
6458   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6459   with_cde=no
6460 fi
6461 if test "$with_cde" = "yes" ; then
6462   { test "$extra_verbose" = "yes" && cat << \EOF
6463     Defining HAVE_CDE
6464 EOF
6465 cat >> confdefs.h <<\EOF
6466 #define HAVE_CDE 1
6467 EOF
6468 }
6469
6470   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6471   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6472   with_tooltalk=yes # CDE requires Tooltalk
6473   need_motif=yes    # CDE requires Motif
6474 fi
6475
6476 test "$window_system" != "x11" && with_offix=no
6477 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6478   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6479   with_offix=no
6480 fi
6481 if test "$with_dragndrop" = no; then
6482   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6483   with_offix=no
6484 fi
6485 if test "$with_cde" = yes; then
6486   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6487   with_offix=no
6488 fi
6489 test -z "$with_offix" && with_offix=no
6490 if test "$with_offix" = "yes"; then
6491   { test "$extra_verbose" = "yes" && cat << \EOF
6492     Defining HAVE_OFFIX_DND
6493 EOF
6494 cat >> confdefs.h <<\EOF
6495 #define HAVE_OFFIX_DND 1
6496 EOF
6497 }
6498
6499   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6500   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6501 fi
6502
6503 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6504 echo "configure:6505: checking if drag and drop API is needed" >&5
6505 if test "$with_dragndrop" != "no" ; then
6506   if test -n "$dragndrop_proto" ; then
6507     with_dragndrop=yes
6508     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6509     { test "$extra_verbose" = "yes" && cat << \EOF
6510     Defining HAVE_DRAGNDROP
6511 EOF
6512 cat >> confdefs.h <<\EOF
6513 #define HAVE_DRAGNDROP 1
6514 EOF
6515 }
6516
6517     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6518   else
6519     with_dragndrop=no
6520     echo "$ac_t""no" 1>&6
6521   fi
6522 fi
6523
6524 echo "checking for LDAP" 1>&6
6525 echo "configure:6526: checking for LDAP" >&5
6526 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6527 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6528 echo "configure:6529: checking for ldap.h" >&5
6529
6530 cat > conftest.$ac_ext <<EOF
6531 #line 6532 "configure"
6532 #include "confdefs.h"
6533 #include <ldap.h>
6534 EOF
6535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6536 { (eval echo configure:6537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6538 if test -z "$ac_err"; then
6539   rm -rf conftest*
6540   eval "ac_cv_header_$ac_safe=yes"
6541 else
6542   echo "$ac_err" >&5
6543   echo "configure: failed program was:" >&5
6544   cat conftest.$ac_ext >&5
6545   rm -rf conftest*
6546   eval "ac_cv_header_$ac_safe=no"
6547 fi
6548 rm -f conftest*
6549 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6550   echo "$ac_t""yes" 1>&6
6551   :
6552 else
6553   echo "$ac_t""no" 1>&6
6554 with_ldap=no
6555 fi
6556  }
6557 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6558 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6559 echo "configure:6560: checking for lber.h" >&5
6560
6561 cat > conftest.$ac_ext <<EOF
6562 #line 6563 "configure"
6563 #include "confdefs.h"
6564 #include <lber.h>
6565 EOF
6566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6567 { (eval echo configure:6568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6569 if test -z "$ac_err"; then
6570   rm -rf conftest*
6571   eval "ac_cv_header_$ac_safe=yes"
6572 else
6573   echo "$ac_err" >&5
6574   echo "configure: failed program was:" >&5
6575   cat conftest.$ac_ext >&5
6576   rm -rf conftest*
6577   eval "ac_cv_header_$ac_safe=no"
6578 fi
6579 rm -f conftest*
6580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6581   echo "$ac_t""yes" 1>&6
6582   :
6583 else
6584   echo "$ac_t""no" 1>&6
6585 with_ldap=no
6586 fi
6587  }
6588 if test "$with_ldap" != "no"; then
6589   
6590 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6591 echo "configure:6592: checking for ldap_search in -lldap" >&5
6592 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6593
6594 xe_check_libs=" -lldap "
6595 cat > conftest.$ac_ext <<EOF
6596 #line 6597 "configure"
6597 #include "confdefs.h"
6598 /* Override any gcc2 internal prototype to avoid an error.  */
6599 /* We use char because int might match the return type of a gcc2
6600     builtin and then its argument prototype would still apply.  */
6601 char ldap_search();
6602
6603 int main() {
6604 ldap_search()
6605 ; return 0; }
6606 EOF
6607 if { (eval echo configure:6608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6608   rm -rf conftest*
6609   eval "ac_cv_lib_$ac_lib_var=yes"
6610 else
6611   echo "configure: failed program was:" >&5
6612   cat conftest.$ac_ext >&5
6613   rm -rf conftest*
6614   eval "ac_cv_lib_$ac_lib_var=no"
6615 fi
6616 rm -f conftest*
6617 xe_check_libs=""
6618
6619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6620   echo "$ac_t""yes" 1>&6
6621   with_ldap_nolber=yes
6622 else
6623   echo "$ac_t""no" 1>&6
6624 with_ldap_nolber=no
6625 fi
6626
6627
6628   test "$with_ldap_nolber" = "no" && { 
6629 xe_msg_checking="for ldap_open in -lldap"
6630 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6631 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6632 echo "configure:6633: checking "$xe_msg_checking"" >&5
6633 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6634
6635 xe_check_libs=" -lldap -llber"
6636 cat > conftest.$ac_ext <<EOF
6637 #line 6638 "configure"
6638 #include "confdefs.h"
6639 /* Override any gcc2 internal prototype to avoid an error.  */
6640 /* We use char because int might match the return type of a gcc2
6641     builtin and then its argument prototype would still apply.  */
6642 char ldap_open();
6643
6644 int main() {
6645 ldap_open()
6646 ; return 0; }
6647 EOF
6648 if { (eval echo configure:6649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6649   rm -rf conftest*
6650   eval "ac_cv_lib_$ac_lib_var=yes"
6651 else
6652   echo "configure: failed program was:" >&5
6653   cat conftest.$ac_ext >&5
6654   rm -rf conftest*
6655   eval "ac_cv_lib_$ac_lib_var=no"
6656 fi
6657 rm -f conftest*
6658 xe_check_libs=""
6659
6660 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6661   echo "$ac_t""yes" 1>&6
6662   with_ldap_lber=yes
6663 else
6664   echo "$ac_t""no" 1>&6
6665 with_ldap_lber=no
6666 fi
6667
6668  }
6669   test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" \) && with_ldap=yes
6670 fi
6671 if test "$with_ldap" = "yes"; then
6672   { test "$extra_verbose" = "yes" && cat << \EOF
6673     Defining HAVE_LDAP
6674 EOF
6675 cat >> confdefs.h <<\EOF
6676 #define HAVE_LDAP 1
6677 EOF
6678 }
6679
6680   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6681    echo "    xemacs will be linked with \"eldap.o\""
6682  fi
6683   if test "$with_ldap_nolber" = "yes" ; then
6684     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6685   else
6686     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6687     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6688   fi
6689   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
6690 do
6691 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6692 echo "configure:6693: checking for $ac_func" >&5
6693
6694 cat > conftest.$ac_ext <<EOF
6695 #line 6696 "configure"
6696 #include "confdefs.h"
6697 /* System header to define __stub macros and hopefully few prototypes,
6698     which can conflict with char $ac_func(); below.  */
6699 #include <assert.h>
6700 /* Override any gcc2 internal prototype to avoid an error.  */
6701 /* We use char because int might match the return type of a gcc2
6702     builtin and then its argument prototype would still apply.  */
6703 char $ac_func();
6704
6705 int main() {
6706
6707 /* The GNU C library defines this for functions which it implements
6708     to always fail with ENOSYS.  Some functions are actually named
6709     something starting with __ and the normal name is an alias.  */
6710 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6711 choke me
6712 #else
6713 $ac_func();
6714 #endif
6715
6716 ; return 0; }
6717 EOF
6718 if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6719   rm -rf conftest*
6720   eval "ac_cv_func_$ac_func=yes"
6721 else
6722   echo "configure: failed program was:" >&5
6723   cat conftest.$ac_ext >&5
6724   rm -rf conftest*
6725   eval "ac_cv_func_$ac_func=no"
6726 fi
6727 rm -f conftest*
6728
6729 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6730   echo "$ac_t""yes" 1>&6
6731     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6732   { test "$extra_verbose" = "yes" && cat << EOF
6733     Defining $ac_tr_func
6734 EOF
6735 cat >> confdefs.h <<EOF
6736 #define $ac_tr_func 1
6737 EOF
6738 }
6739  
6740 else
6741   echo "$ac_t""no" 1>&6
6742 fi
6743 done
6744
6745 fi
6746
6747
6748 if test "$window_system" != "none"; then
6749   echo "checking for graphics libraries" 1>&6
6750 echo "configure:6751: checking for graphics libraries" >&5
6751
6752     xpm_problem=""
6753   if test -z "$with_xpm"; then
6754     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6755 echo "configure:6756: checking for Xpm - no older than 3.4f" >&5
6756     xe_check_libs=-lXpm
6757     cat > conftest.$ac_ext <<EOF
6758 #line 6759 "configure"
6759 #include "confdefs.h"
6760 #include <X11/xpm.h>
6761     int main(int c, char **v) {
6762     return c == 1 ? 0 :
6763       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6764       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6765 EOF
6766 if { (eval echo configure:6767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6767 then
6768   ./conftest dummy_arg; xpm_status=$?;
6769       if test "$xpm_status" = "0"; then
6770         with_xpm=yes;
6771       else
6772         with_xpm=no;
6773         if test "$xpm_status" = "1"; then
6774           xpm_problem="Xpm library version and header file version don't match!"
6775         elif test "$xpm_status" = "2"; then
6776           xpm_problem="Xpm library version is too old!"
6777         else
6778           xpm_problem="Internal xpm detection logic error!"
6779         fi
6780         echo "
6781 *** WARNING *** $xpm_problem
6782   I'm not touching that with a 10-foot pole!
6783   If you really want to use the installed version of Xpm, rerun
6784   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
6785     fi
6786 else
6787   conftest_rc="$?"
6788   echo "configure: failed program was:" >&5
6789   cat conftest.$ac_ext >&5
6790   rm -fr conftest*
6791   with_xpm=no
6792 fi
6793 rm -fr conftest*
6794     xe_check_libs=
6795     echo "$ac_t""$with_xpm" 1>&6
6796   fi
6797   if test "$with_xpm" = "yes"; then
6798     { test "$extra_verbose" = "yes" && cat << \EOF
6799     Defining HAVE_XPM
6800 EOF
6801 cat >> confdefs.h <<\EOF
6802 #define HAVE_XPM 1
6803 EOF
6804 }
6805
6806     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6807     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6808 echo "configure:6809: checking for \"FOR_MSW\" xpm" >&5
6809     xe_check_libs=-lXpm
6810     cat > conftest.$ac_ext <<EOF
6811 #line 6812 "configure"
6812 #include "confdefs.h"
6813
6814 int main() {
6815 XpmCreatePixmapFromData()
6816 ; return 0; }
6817 EOF
6818 if { (eval echo configure:6819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6819   rm -rf conftest*
6820   xpm_for_msw=no
6821 else
6822   echo "configure: failed program was:" >&5
6823   cat conftest.$ac_ext >&5
6824   rm -rf conftest*
6825   xpm_for_msw=yes
6826 fi
6827 rm -f conftest*
6828     xe_check_libs=
6829     echo "$ac_t""$xpm_for_msw" 1>&6
6830     if test "$xpm_for_msw" = "yes"; then
6831       { test "$extra_verbose" = "yes" && cat << \EOF
6832     Defining FOR_MSW
6833 EOF
6834 cat >> confdefs.h <<\EOF
6835 #define FOR_MSW 1
6836 EOF
6837 }
6838
6839     fi
6840   fi
6841
6842     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
6843 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
6844 echo "configure:6845: checking for compface.h" >&5
6845
6846 cat > conftest.$ac_ext <<EOF
6847 #line 6848 "configure"
6848 #include "confdefs.h"
6849 #include <compface.h>
6850 EOF
6851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6852 { (eval echo configure:6853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6854 if test -z "$ac_err"; then
6855   rm -rf conftest*
6856   eval "ac_cv_header_$ac_safe=yes"
6857 else
6858   echo "$ac_err" >&5
6859   echo "configure: failed program was:" >&5
6860   cat conftest.$ac_ext >&5
6861   rm -rf conftest*
6862   eval "ac_cv_header_$ac_safe=no"
6863 fi
6864 rm -f conftest*
6865 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6866   echo "$ac_t""yes" 1>&6
6867   :
6868 else
6869   echo "$ac_t""no" 1>&6
6870 with_xface=no
6871 fi
6872  }
6873   test -z "$with_xface" && { 
6874 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
6875 echo "configure:6876: checking for UnGenFace in -lcompface" >&5
6876 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
6877
6878 xe_check_libs=" -lcompface "
6879 cat > conftest.$ac_ext <<EOF
6880 #line 6881 "configure"
6881 #include "confdefs.h"
6882 /* Override any gcc2 internal prototype to avoid an error.  */
6883 /* We use char because int might match the return type of a gcc2
6884     builtin and then its argument prototype would still apply.  */
6885 char UnGenFace();
6886
6887 int main() {
6888 UnGenFace()
6889 ; return 0; }
6890 EOF
6891 if { (eval echo configure:6892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6892   rm -rf conftest*
6893   eval "ac_cv_lib_$ac_lib_var=yes"
6894 else
6895   echo "configure: failed program was:" >&5
6896   cat conftest.$ac_ext >&5
6897   rm -rf conftest*
6898   eval "ac_cv_lib_$ac_lib_var=no"
6899 fi
6900 rm -f conftest*
6901 xe_check_libs=""
6902
6903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6904   echo "$ac_t""yes" 1>&6
6905   : 
6906 else
6907   echo "$ac_t""no" 1>&6
6908 with_xface=no
6909 fi
6910
6911  }
6912   test -z "$with_xface" && with_xface=yes
6913   if test "$with_xface" = "yes"; then
6914     { test "$extra_verbose" = "yes" && cat << \EOF
6915     Defining HAVE_XFACE
6916 EOF
6917 cat >> confdefs.h <<\EOF
6918 #define HAVE_XFACE 1
6919 EOF
6920 }
6921
6922     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
6923   fi
6924
6925         if test "$with_gif" != "no"; then
6926     with_gif="yes"
6927     { test "$extra_verbose" = "yes" && cat << \EOF
6928     Defining HAVE_GIF
6929 EOF
6930 cat >> confdefs.h <<\EOF
6931 #define HAVE_GIF 1
6932 EOF
6933 }
6934
6935     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
6936    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
6937  fi
6938   fi
6939
6940       if test "$with_png $with_tiff" != "no no"; then
6941     
6942 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
6943 echo "configure:6944: checking for inflate in -lc" >&5
6944 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
6945
6946 xe_check_libs=" -lc "
6947 cat > conftest.$ac_ext <<EOF
6948 #line 6949 "configure"
6949 #include "confdefs.h"
6950 /* Override any gcc2 internal prototype to avoid an error.  */
6951 /* We use char because int might match the return type of a gcc2
6952     builtin and then its argument prototype would still apply.  */
6953 char inflate();
6954
6955 int main() {
6956 inflate()
6957 ; return 0; }
6958 EOF
6959 if { (eval echo configure:6960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6960   rm -rf conftest*
6961   eval "ac_cv_lib_$ac_lib_var=yes"
6962 else
6963   echo "configure: failed program was:" >&5
6964   cat conftest.$ac_ext >&5
6965   rm -rf conftest*
6966   eval "ac_cv_lib_$ac_lib_var=no"
6967 fi
6968 rm -f conftest*
6969 xe_check_libs=""
6970
6971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6972   echo "$ac_t""yes" 1>&6
6973   :
6974 else
6975   echo "$ac_t""no" 1>&6
6976
6977 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
6978 echo "configure:6979: checking for inflate in -lz" >&5
6979 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
6980
6981 xe_check_libs=" -lz "
6982 cat > conftest.$ac_ext <<EOF
6983 #line 6984 "configure"
6984 #include "confdefs.h"
6985 /* Override any gcc2 internal prototype to avoid an error.  */
6986 /* We use char because int might match the return type of a gcc2
6987     builtin and then its argument prototype would still apply.  */
6988 char inflate();
6989
6990 int main() {
6991 inflate()
6992 ; return 0; }
6993 EOF
6994 if { (eval echo configure:6995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6995   rm -rf conftest*
6996   eval "ac_cv_lib_$ac_lib_var=yes"
6997 else
6998   echo "configure: failed program was:" >&5
6999   cat conftest.$ac_ext >&5
7000   rm -rf conftest*
7001   eval "ac_cv_lib_$ac_lib_var=no"
7002 fi
7003 rm -f conftest*
7004 xe_check_libs=""
7005
7006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7007   echo "$ac_t""yes" 1>&6
7008   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7009 else
7010   echo "$ac_t""no" 1>&6
7011
7012 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7013 echo "configure:7014: checking for inflate in -lgz" >&5
7014 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7015
7016 xe_check_libs=" -lgz "
7017 cat > conftest.$ac_ext <<EOF
7018 #line 7019 "configure"
7019 #include "confdefs.h"
7020 /* Override any gcc2 internal prototype to avoid an error.  */
7021 /* We use char because int might match the return type of a gcc2
7022     builtin and then its argument prototype would still apply.  */
7023 char inflate();
7024
7025 int main() {
7026 inflate()
7027 ; return 0; }
7028 EOF
7029 if { (eval echo configure:7030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7030   rm -rf conftest*
7031   eval "ac_cv_lib_$ac_lib_var=yes"
7032 else
7033   echo "configure: failed program was:" >&5
7034   cat conftest.$ac_ext >&5
7035   rm -rf conftest*
7036   eval "ac_cv_lib_$ac_lib_var=no"
7037 fi
7038 rm -f conftest*
7039 xe_check_libs=""
7040
7041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7042   echo "$ac_t""yes" 1>&6
7043   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7044 else
7045   echo "$ac_t""no" 1>&6
7046 fi
7047
7048
7049 fi
7050
7051
7052 fi
7053
7054
7055   fi
7056
7057     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7058 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7059 echo "configure:7060: checking for jpeglib.h" >&5
7060
7061 cat > conftest.$ac_ext <<EOF
7062 #line 7063 "configure"
7063 #include "confdefs.h"
7064 #include <jpeglib.h>
7065 EOF
7066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7067 { (eval echo configure:7068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7069 if test -z "$ac_err"; then
7070   rm -rf conftest*
7071   eval "ac_cv_header_$ac_safe=yes"
7072 else
7073   echo "$ac_err" >&5
7074   echo "configure: failed program was:" >&5
7075   cat conftest.$ac_ext >&5
7076   rm -rf conftest*
7077   eval "ac_cv_header_$ac_safe=no"
7078 fi
7079 rm -f conftest*
7080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7081   echo "$ac_t""yes" 1>&6
7082   :
7083 else
7084   echo "$ac_t""no" 1>&6
7085 with_jpeg=no
7086 fi
7087  }
7088   test -z "$with_jpeg" && { 
7089 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7090 echo "configure:7091: checking for jpeg_destroy_decompress in -ljpeg" >&5
7091 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7092
7093 xe_check_libs=" -ljpeg "
7094 cat > conftest.$ac_ext <<EOF
7095 #line 7096 "configure"
7096 #include "confdefs.h"
7097 /* Override any gcc2 internal prototype to avoid an error.  */
7098 /* We use char because int might match the return type of a gcc2
7099     builtin and then its argument prototype would still apply.  */
7100 char jpeg_destroy_decompress();
7101
7102 int main() {
7103 jpeg_destroy_decompress()
7104 ; return 0; }
7105 EOF
7106 if { (eval echo configure:7107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7107   rm -rf conftest*
7108   eval "ac_cv_lib_$ac_lib_var=yes"
7109 else
7110   echo "configure: failed program was:" >&5
7111   cat conftest.$ac_ext >&5
7112   rm -rf conftest*
7113   eval "ac_cv_lib_$ac_lib_var=no"
7114 fi
7115 rm -f conftest*
7116 xe_check_libs=""
7117
7118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7119   echo "$ac_t""yes" 1>&6
7120   :
7121 else
7122   echo "$ac_t""no" 1>&6
7123 with_jpeg=no
7124 fi
7125
7126  }
7127   test -z "$with_jpeg" && with_jpeg=yes
7128   if test "$with_jpeg" = "yes"; then
7129     { test "$extra_verbose" = "yes" && cat << \EOF
7130     Defining HAVE_JPEG
7131 EOF
7132 cat >> confdefs.h <<\EOF
7133 #define HAVE_JPEG 1
7134 EOF
7135 }
7136
7137     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7138   fi
7139
7140     png_problem=""
7141   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7142 echo "configure:7143: checking for pow" >&5
7143
7144 cat > conftest.$ac_ext <<EOF
7145 #line 7146 "configure"
7146 #include "confdefs.h"
7147 /* System header to define __stub macros and hopefully few prototypes,
7148     which can conflict with char pow(); below.  */
7149 #include <assert.h>
7150 /* Override any gcc2 internal prototype to avoid an error.  */
7151 /* We use char because int might match the return type of a gcc2
7152     builtin and then its argument prototype would still apply.  */
7153 char pow();
7154
7155 int main() {
7156
7157 /* The GNU C library defines this for functions which it implements
7158     to always fail with ENOSYS.  Some functions are actually named
7159     something starting with __ and the normal name is an alias.  */
7160 #if defined (__stub_pow) || defined (__stub___pow)
7161 choke me
7162 #else
7163 pow();
7164 #endif
7165
7166 ; return 0; }
7167 EOF
7168 if { (eval echo configure:7169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7169   rm -rf conftest*
7170   eval "ac_cv_func_pow=yes"
7171 else
7172   echo "configure: failed program was:" >&5
7173   cat conftest.$ac_ext >&5
7174   rm -rf conftest*
7175   eval "ac_cv_func_pow=no"
7176 fi
7177 rm -f conftest*
7178
7179 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7180   echo "$ac_t""yes" 1>&6
7181   :
7182 else
7183   echo "$ac_t""no" 1>&6
7184 with_png=no
7185 fi
7186  }
7187   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7188 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7189 echo "configure:7190: checking for png.h" >&5
7190
7191 cat > conftest.$ac_ext <<EOF
7192 #line 7193 "configure"
7193 #include "confdefs.h"
7194 #include <png.h>
7195 EOF
7196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7197 { (eval echo configure:7198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7199 if test -z "$ac_err"; then
7200   rm -rf conftest*
7201   eval "ac_cv_header_$ac_safe=yes"
7202 else
7203   echo "$ac_err" >&5
7204   echo "configure: failed program was:" >&5
7205   cat conftest.$ac_ext >&5
7206   rm -rf conftest*
7207   eval "ac_cv_header_$ac_safe=no"
7208 fi
7209 rm -f conftest*
7210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7211   echo "$ac_t""yes" 1>&6
7212   :
7213 else
7214   echo "$ac_t""no" 1>&6
7215 with_png=no
7216 fi
7217  }
7218   test -z "$with_png" && { 
7219 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7220 echo "configure:7221: checking for png_read_image in -lpng" >&5
7221 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7222
7223 xe_check_libs=" -lpng "
7224 cat > conftest.$ac_ext <<EOF
7225 #line 7226 "configure"
7226 #include "confdefs.h"
7227 /* Override any gcc2 internal prototype to avoid an error.  */
7228 /* We use char because int might match the return type of a gcc2
7229     builtin and then its argument prototype would still apply.  */
7230 char png_read_image();
7231
7232 int main() {
7233 png_read_image()
7234 ; return 0; }
7235 EOF
7236 if { (eval echo configure:7237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7237   rm -rf conftest*
7238   eval "ac_cv_lib_$ac_lib_var=yes"
7239 else
7240   echo "configure: failed program was:" >&5
7241   cat conftest.$ac_ext >&5
7242   rm -rf conftest*
7243   eval "ac_cv_lib_$ac_lib_var=no"
7244 fi
7245 rm -f conftest*
7246 xe_check_libs=""
7247
7248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7249   echo "$ac_t""yes" 1>&6
7250   :
7251 else
7252   echo "$ac_t""no" 1>&6
7253 with_png=no
7254 fi
7255
7256  }
7257   if test -z "$with_png"; then
7258     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7259 echo "configure:7260: checking for workable png version information" >&5
7260     xe_check_libs="-lpng -lz"
7261     cat > conftest.$ac_ext <<EOF
7262 #line 7263 "configure"
7263 #include "confdefs.h"
7264 #include <png.h>
7265     int main(int c, char **v) {
7266     if (c == 1) return 0;
7267     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7268     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7269 EOF
7270 if { (eval echo configure:7271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7271 then
7272   ./conftest dummy_arg; png_status=$?;
7273       if test "$png_status" = "0"; then
7274         with_png=yes;
7275       else
7276         with_png=no;
7277         if test "$png_status" = "1"; then
7278           png_problem="PNG library version and header file don't match!"
7279         elif test "$png_status" = "2"; then
7280           png_problem="PNG library version too old (pre 1.0.2)!"
7281         fi
7282         echo "
7283 *** WARNING *** $png_problem
7284   I'm not touching that with a 10-foot pole!
7285   If you really want to use the installed version of libPNG, rerun
7286   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7287     fi
7288 else
7289   conftest_rc="$?"
7290   echo "configure: failed program was:" >&5
7291   cat conftest.$ac_ext >&5
7292   rm -fr conftest*
7293   with_png=no
7294 fi
7295 rm -fr conftest*
7296     xe_check_libs=
7297     echo "$ac_t""$with_png" 1>&6
7298   fi
7299   if test "$with_png" = "yes"; then
7300     { test "$extra_verbose" = "yes" && cat << \EOF
7301     Defining HAVE_PNG
7302 EOF
7303 cat >> confdefs.h <<\EOF
7304 #define HAVE_PNG 1
7305 EOF
7306 }
7307
7308     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7309   fi
7310
7311     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7312 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7313 echo "configure:7314: checking for tiffio.h" >&5
7314
7315 cat > conftest.$ac_ext <<EOF
7316 #line 7317 "configure"
7317 #include "confdefs.h"
7318 #include <tiffio.h>
7319 EOF
7320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7321 { (eval echo configure:7322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7323 if test -z "$ac_err"; then
7324   rm -rf conftest*
7325   eval "ac_cv_header_$ac_safe=yes"
7326 else
7327   echo "$ac_err" >&5
7328   echo "configure: failed program was:" >&5
7329   cat conftest.$ac_ext >&5
7330   rm -rf conftest*
7331   eval "ac_cv_header_$ac_safe=no"
7332 fi
7333 rm -f conftest*
7334 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7335   echo "$ac_t""yes" 1>&6
7336   :
7337 else
7338   echo "$ac_t""no" 1>&6
7339 with_tiff=no
7340 fi
7341  }
7342   test -z "$with_tiff" && { 
7343 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7344 echo "configure:7345: checking for TIFFClientOpen in -ltiff" >&5
7345 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7346
7347 xe_check_libs=" -ltiff "
7348 cat > conftest.$ac_ext <<EOF
7349 #line 7350 "configure"
7350 #include "confdefs.h"
7351 /* Override any gcc2 internal prototype to avoid an error.  */
7352 /* We use char because int might match the return type of a gcc2
7353     builtin and then its argument prototype would still apply.  */
7354 char TIFFClientOpen();
7355
7356 int main() {
7357 TIFFClientOpen()
7358 ; return 0; }
7359 EOF
7360 if { (eval echo configure:7361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7361   rm -rf conftest*
7362   eval "ac_cv_lib_$ac_lib_var=yes"
7363 else
7364   echo "configure: failed program was:" >&5
7365   cat conftest.$ac_ext >&5
7366   rm -rf conftest*
7367   eval "ac_cv_lib_$ac_lib_var=no"
7368 fi
7369 rm -f conftest*
7370 xe_check_libs=""
7371
7372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7373   echo "$ac_t""yes" 1>&6
7374   :
7375 else
7376   echo "$ac_t""no" 1>&6
7377 with_tiff=no
7378 fi
7379
7380  }
7381   test -z "$with_tiff" && with_tiff=yes
7382   if test "$with_tiff" = "yes"; then
7383     { test "$extra_verbose" = "yes" && cat << \EOF
7384     Defining HAVE_TIFF
7385 EOF
7386 cat >> confdefs.h <<\EOF
7387 #define HAVE_TIFF 1
7388 EOF
7389 }
7390
7391     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7392   fi
7393 fi
7394
7395
7396 if test "$with_x11" = "yes"; then
7397
7398   echo "checking for X11 graphics libraries" 1>&6
7399 echo "configure:7400: checking for X11 graphics libraries" >&5
7400
7401     
7402 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
7403 echo "configure:7404: checking for XawScrollbarSetThumb in -lXaw" >&5
7404 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7405
7406 xe_check_libs=" -lXaw "
7407 cat > conftest.$ac_ext <<EOF
7408 #line 7409 "configure"
7409 #include "confdefs.h"
7410 /* Override any gcc2 internal prototype to avoid an error.  */
7411 /* We use char because int might match the return type of a gcc2
7412     builtin and then its argument prototype would still apply.  */
7413 char XawScrollbarSetThumb();
7414
7415 int main() {
7416 XawScrollbarSetThumb()
7417 ; return 0; }
7418 EOF
7419 if { (eval echo configure:7420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7420   rm -rf conftest*
7421   eval "ac_cv_lib_$ac_lib_var=yes"
7422 else
7423   echo "configure: failed program was:" >&5
7424   cat conftest.$ac_ext >&5
7425   rm -rf conftest*
7426   eval "ac_cv_lib_$ac_lib_var=no"
7427 fi
7428 rm -f conftest*
7429 xe_check_libs=""
7430
7431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7432   echo "$ac_t""yes" 1>&6
7433   have_xaw=yes
7434 else
7435   echo "$ac_t""no" 1>&6
7436 have_xaw=no
7437 fi
7438
7439
7440                     
7441     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7442 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7443 echo "configure:7444: checking for Xm/Xm.h" >&5
7444
7445 cat > conftest.$ac_ext <<EOF
7446 #line 7447 "configure"
7447 #include "confdefs.h"
7448 #include <Xm/Xm.h>
7449 EOF
7450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7451 { (eval echo configure:7452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7453 if test -z "$ac_err"; then
7454   rm -rf conftest*
7455   eval "ac_cv_header_$ac_safe=yes"
7456 else
7457   echo "$ac_err" >&5
7458   echo "configure: failed program was:" >&5
7459   cat conftest.$ac_ext >&5
7460   rm -rf conftest*
7461   eval "ac_cv_header_$ac_safe=no"
7462 fi
7463 rm -f conftest*
7464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7465   echo "$ac_t""yes" 1>&6
7466   
7467 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7468 echo "configure:7469: checking for XmStringFree in -lXm" >&5
7469 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7470
7471 xe_check_libs=" -lXm "
7472 cat > conftest.$ac_ext <<EOF
7473 #line 7474 "configure"
7474 #include "confdefs.h"
7475 /* Override any gcc2 internal prototype to avoid an error.  */
7476 /* We use char because int might match the return type of a gcc2
7477     builtin and then its argument prototype would still apply.  */
7478 char XmStringFree();
7479
7480 int main() {
7481 XmStringFree()
7482 ; return 0; }
7483 EOF
7484 if { (eval echo configure:7485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7485   rm -rf conftest*
7486   eval "ac_cv_lib_$ac_lib_var=yes"
7487 else
7488   echo "configure: failed program was:" >&5
7489   cat conftest.$ac_ext >&5
7490   rm -rf conftest*
7491   eval "ac_cv_lib_$ac_lib_var=no"
7492 fi
7493 rm -f conftest*
7494 xe_check_libs=""
7495
7496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7497   echo "$ac_t""yes" 1>&6
7498   have_motif=yes
7499 else
7500   echo "$ac_t""no" 1>&6
7501 have_motif=no
7502 fi
7503
7504
7505 else
7506   echo "$ac_t""no" 1>&6
7507 have_motif=no
7508 fi
7509
7510
7511   if test "$have_motif" = "yes"; then
7512         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
7513 echo "configure:7514: checking for Lesstif" >&5
7514     cat > conftest.$ac_ext <<EOF
7515 #line 7516 "configure"
7516 #include "confdefs.h"
7517 #include <Xm/Xm.h>
7518 #ifdef LESSTIF_VERSION
7519 yes
7520 #endif
7521
7522 EOF
7523 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7524   egrep "yes" >/dev/null 2>&1; then
7525   rm -rf conftest*
7526   have_lesstif=yes
7527 else
7528   rm -rf conftest*
7529   have_lesstif=no
7530 fi
7531 rm -f conftest*
7532
7533   echo "$ac_t""$have_lesstif" 1>&6
7534   fi
7535
7536 fi 
7537
7538 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
7539   with_menubars="lucid" ;;
7540 esac
7541 case "$with_dialogs" in "" | "yes" | "lucid" )
7542   if   test "$have_motif" = "yes"; then with_dialogs="motif"
7543   elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
7544   else with_dialogs=no
7545   fi ;;
7546 esac
7547 case "$with_scrollbars" in "" | "yes" )
7548   with_scrollbars="lucid" ;;
7549 esac
7550
7551 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars"
7552
7553 case "$all_widgets" in *athena* )
7554   { test "$extra_verbose" = "yes" && cat << \EOF
7555     Defining LWLIB_USES_ATHENA
7556 EOF
7557 cat >> confdefs.h <<\EOF
7558 #define LWLIB_USES_ATHENA 1
7559 EOF
7560 }
7561
7562   { test "$extra_verbose" = "yes" && cat << \EOF
7563     Defining NEED_ATHENA
7564 EOF
7565 cat >> confdefs.h <<\EOF
7566 #define NEED_ATHENA 1
7567 EOF
7568 }
7569
7570   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7571   libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
7572 esac
7573
7574 case "$all_widgets" in *motif* )
7575   { test "$extra_verbose" = "yes" && cat << \EOF
7576     Defining LWLIB_USES_MOTIF
7577 EOF
7578 cat >> confdefs.h <<\EOF
7579 #define LWLIB_USES_MOTIF 1
7580 EOF
7581 }
7582
7583   { test "$extra_verbose" = "yes" && cat << \EOF
7584     Defining NEED_MOTIF
7585 EOF
7586 cat >> confdefs.h <<\EOF
7587 #define NEED_MOTIF 1
7588 EOF
7589 }
7590
7591   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
7592   need_motif=yes ;;
7593 esac
7594
7595 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7596 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7597 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
7598 case "$all_widgets" in *lucid* )
7599   { test "$extra_verbose" = "yes" && cat << \EOF
7600     Defining NEED_LUCID
7601 EOF
7602 cat >> confdefs.h <<\EOF
7603 #define NEED_LUCID 1
7604 EOF
7605 }
7606
7607   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
7608 esac
7609
7610
7611
7612 case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7613     Defining LWLIB_SCROLLBARS_ATHENA
7614 EOF
7615 cat >> confdefs.h <<\EOF
7616 #define LWLIB_SCROLLBARS_ATHENA 1
7617 EOF
7618 }
7619 ;; esac
7620 case "$with_dialogs"    in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7621     Defining LWLIB_DIALOGS_ATHENA
7622 EOF
7623 cat >> confdefs.h <<\EOF
7624 #define LWLIB_DIALOGS_ATHENA 1
7625 EOF
7626 }
7627    ;; esac
7628 test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7629     Defining LWLIB_SCROLLBARS_ATHENA3D
7630 EOF
7631 cat >> confdefs.h <<\EOF
7632 #define LWLIB_SCROLLBARS_ATHENA3D 1
7633 EOF
7634 }
7635
7636 test "$with_dialogs"    = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7637     Defining LWLIB_DIALOGS_ATHENA3D
7638 EOF
7639 cat >> confdefs.h <<\EOF
7640 #define LWLIB_DIALOGS_ATHENA3D 1
7641 EOF
7642 }
7643
7644
7645 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7646     Defining HAVE_MENUBARS
7647 EOF
7648 cat >> confdefs.h <<\EOF
7649 #define HAVE_MENUBARS 1
7650 EOF
7651 }
7652
7653 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7654     Defining HAVE_SCROLLBARS
7655 EOF
7656 cat >> confdefs.h <<\EOF
7657 #define HAVE_SCROLLBARS 1
7658 EOF
7659 }
7660
7661 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7662     Defining HAVE_DIALOGS
7663 EOF
7664 cat >> confdefs.h <<\EOF
7665 #define HAVE_DIALOGS 1
7666 EOF
7667 }
7668
7669 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7670     Defining HAVE_TOOLBARS
7671 EOF
7672 cat >> confdefs.h <<\EOF
7673 #define HAVE_TOOLBARS 1
7674 EOF
7675 }
7676
7677
7678 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7679     Defining LWLIB_MENUBARS_LUCID
7680 EOF
7681 cat >> confdefs.h <<\EOF
7682 #define LWLIB_MENUBARS_LUCID 1
7683 EOF
7684 }
7685
7686 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7687     Defining LWLIB_SCROLLBARS_LUCID
7688 EOF
7689 cat >> confdefs.h <<\EOF
7690 #define LWLIB_SCROLLBARS_LUCID 1
7691 EOF
7692 }
7693
7694
7695 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7696     Defining LWLIB_MENUBARS_MOTIF
7697 EOF
7698 cat >> confdefs.h <<\EOF
7699 #define LWLIB_MENUBARS_MOTIF 1
7700 EOF
7701 }
7702
7703 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7704     Defining LWLIB_SCROLLBARS_MOTIF
7705 EOF
7706 cat >> confdefs.h <<\EOF
7707 #define LWLIB_SCROLLBARS_MOTIF 1
7708 EOF
7709 }
7710
7711 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7712     Defining LWLIB_DIALOGS_MOTIF
7713 EOF
7714 cat >> confdefs.h <<\EOF
7715 #define LWLIB_DIALOGS_MOTIF 1
7716 EOF
7717 }
7718
7719
7720 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
7721    echo "    xemacs will be linked with \"menubar.o\""
7722  fi
7723 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
7724    echo "    xemacs will be linked with \"scrollbar.o\""
7725  fi
7726 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
7727    echo "    xemacs will be linked with \"dialog.o\""
7728  fi
7729 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
7730    echo "    xemacs will be linked with \"toolbar.o\""
7731  fi
7732
7733 if test "$with_x11" = "yes"; then
7734   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
7735    echo "    xemacs will be linked with \"menubar-x.o\""
7736  fi
7737   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7738    echo "    xemacs will be linked with \"scrollbar-x.o\""
7739  fi
7740   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
7741    echo "    xemacs will be linked with \"dialog-x.o\""
7742  fi
7743   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7744    echo "    xemacs will be linked with \"toolbar-x.o\""
7745  fi
7746   test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
7747    echo "    xemacs will be linked with \"gui-x.o\""
7748  fi
7749 else
7750   if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then
7751     echo "Attempt to Build NAS sound without X"
7752     echo "Please remove NAS configuration or build with X"
7753     exit 1
7754   fi
7755 fi
7756
7757
7758 test -z "$with_mule" && with_mule=no
7759 test -z "$with_file_coding" && with_file_coding=no
7760
7761
7762 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
7763   { test "$extra_verbose" = "yes" && cat << \EOF
7764     Defining FILE_CODING
7765 EOF
7766 cat >> confdefs.h <<\EOF
7767 #define FILE_CODING 1
7768 EOF
7769 }
7770
7771   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7772    echo "    xemacs will be linked with \"file-coding.o\""
7773  fi
7774 fi
7775
7776 if test "$with_mule" = "yes" ; then
7777   echo "checking for Mule-related features" 1>&6
7778 echo "configure:7779: checking for Mule-related features" >&5
7779   { test "$extra_verbose" = "yes" && cat << \EOF
7780     Defining MULE
7781 EOF
7782 cat >> confdefs.h <<\EOF
7783 #define MULE 1
7784 EOF
7785 }
7786
7787   { test "$extra_verbose" = "yes" && cat << \EOF
7788     Defining FILE_CODING
7789 EOF
7790 cat >> confdefs.h <<\EOF
7791 #define FILE_CODING 1
7792 EOF
7793 }
7794
7795   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7796    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
7797  fi
7798
7799     for ac_hdr in libintl.h
7800 do
7801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7803 echo "configure:7804: checking for $ac_hdr" >&5
7804
7805 cat > conftest.$ac_ext <<EOF
7806 #line 7807 "configure"
7807 #include "confdefs.h"
7808 #include <$ac_hdr>
7809 EOF
7810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7811 { (eval echo configure:7812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7813 if test -z "$ac_err"; then
7814   rm -rf conftest*
7815   eval "ac_cv_header_$ac_safe=yes"
7816 else
7817   echo "$ac_err" >&5
7818   echo "configure: failed program was:" >&5
7819   cat conftest.$ac_ext >&5
7820   rm -rf conftest*
7821   eval "ac_cv_header_$ac_safe=no"
7822 fi
7823 rm -f conftest*
7824 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7825   echo "$ac_t""yes" 1>&6
7826     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7827   { test "$extra_verbose" = "yes" && cat << EOF
7828     Defining $ac_tr_hdr
7829 EOF
7830 cat >> confdefs.h <<EOF
7831 #define $ac_tr_hdr 1
7832 EOF
7833 }
7834  
7835 else
7836   echo "$ac_t""no" 1>&6
7837 fi
7838 done
7839
7840   
7841 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
7842 echo "configure:7843: checking for strerror in -lintl" >&5
7843 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
7844
7845 xe_check_libs=" -lintl "
7846 cat > conftest.$ac_ext <<EOF
7847 #line 7848 "configure"
7848 #include "confdefs.h"
7849 /* Override any gcc2 internal prototype to avoid an error.  */
7850 /* We use char because int might match the return type of a gcc2
7851     builtin and then its argument prototype would still apply.  */
7852 char strerror();
7853
7854 int main() {
7855 strerror()
7856 ; return 0; }
7857 EOF
7858 if { (eval echo configure:7859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7859   rm -rf conftest*
7860   eval "ac_cv_lib_$ac_lib_var=yes"
7861 else
7862   echo "configure: failed program was:" >&5
7863   cat conftest.$ac_ext >&5
7864   rm -rf conftest*
7865   eval "ac_cv_lib_$ac_lib_var=no"
7866 fi
7867 rm -f conftest*
7868 xe_check_libs=""
7869
7870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7871   echo "$ac_t""yes" 1>&6
7872     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7873     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7874   { test "$extra_verbose" = "yes" && cat << EOF
7875     Defining $ac_tr_lib
7876 EOF
7877 cat >> confdefs.h <<EOF
7878 #define $ac_tr_lib 1
7879 EOF
7880 }
7881
7882   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
7883
7884 else
7885   echo "$ac_t""no" 1>&6
7886 fi
7887
7888
7889
7890   echo "checking for Mule input methods" 1>&6
7891 echo "configure:7892: checking for Mule input methods" >&5
7892         case "$with_xim" in "" | "yes" )
7893     echo "checking for XIM" 1>&6
7894 echo "configure:7895: checking for XIM" >&5
7895     
7896 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
7897 echo "configure:7898: checking for XOpenIM in -lX11" >&5
7898 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
7899
7900 xe_check_libs=" -lX11 "
7901 cat > conftest.$ac_ext <<EOF
7902 #line 7903 "configure"
7903 #include "confdefs.h"
7904 /* Override any gcc2 internal prototype to avoid an error.  */
7905 /* We use char because int might match the return type of a gcc2
7906     builtin and then its argument prototype would still apply.  */
7907 char XOpenIM();
7908
7909 int main() {
7910 XOpenIM()
7911 ; return 0; }
7912 EOF
7913 if { (eval echo configure:7914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7914   rm -rf conftest*
7915   eval "ac_cv_lib_$ac_lib_var=yes"
7916 else
7917   echo "configure: failed program was:" >&5
7918   cat conftest.$ac_ext >&5
7919   rm -rf conftest*
7920   eval "ac_cv_lib_$ac_lib_var=no"
7921 fi
7922 rm -f conftest*
7923 xe_check_libs=""
7924
7925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7926   echo "$ac_t""yes" 1>&6
7927   with_xim=xlib
7928 else
7929   echo "$ac_t""no" 1>&6
7930 with_xim=no
7931 fi
7932
7933
7934         if test "$have_motif $have_lesstif" = "yes no"; then
7935       
7936 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
7937 echo "configure:7938: checking for XmImMbLookupString in -lXm" >&5
7938 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
7939
7940 xe_check_libs=" -lXm "
7941 cat > conftest.$ac_ext <<EOF
7942 #line 7943 "configure"
7943 #include "confdefs.h"
7944 /* Override any gcc2 internal prototype to avoid an error.  */
7945 /* We use char because int might match the return type of a gcc2
7946     builtin and then its argument prototype would still apply.  */
7947 char XmImMbLookupString();
7948
7949 int main() {
7950 XmImMbLookupString()
7951 ; return 0; }
7952 EOF
7953 if { (eval echo configure:7954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7954   rm -rf conftest*
7955   eval "ac_cv_lib_$ac_lib_var=yes"
7956 else
7957   echo "configure: failed program was:" >&5
7958   cat conftest.$ac_ext >&5
7959   rm -rf conftest*
7960   eval "ac_cv_lib_$ac_lib_var=no"
7961 fi
7962 rm -f conftest*
7963 xe_check_libs=""
7964
7965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7966   echo "$ac_t""yes" 1>&6
7967   with_xim=motif
7968 else
7969   echo "$ac_t""no" 1>&6
7970 fi
7971
7972
7973     fi ;;
7974   esac
7975   if test "$with_xim" != "no"; then
7976     { test "$extra_verbose" = "yes" && cat << \EOF
7977     Defining HAVE_XIM
7978 EOF
7979 cat >> confdefs.h <<\EOF
7980 #define HAVE_XIM 1
7981 EOF
7982 }
7983
7984     if test "$with_xim" = "xlib"; then
7985       { test "$extra_verbose" = "yes" && cat << \EOF
7986     Defining XIM_XLIB
7987 EOF
7988 cat >> confdefs.h <<\EOF
7989 #define XIM_XLIB 1
7990 EOF
7991 }
7992
7993       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
7994    echo "    xemacs will be linked with \"input-method-xlib.o\""
7995  fi
7996     fi
7997     if test "$with_xim" = "motif"; then
7998       { test "$extra_verbose" = "yes" && cat << \EOF
7999     Defining XIM_MOTIF
8000 EOF
8001 cat >> confdefs.h <<\EOF
8002 #define XIM_MOTIF 1
8003 EOF
8004 }
8005
8006       need_motif=yes
8007       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8008    echo "    xemacs will be linked with \"input-method-motif.o\""
8009  fi
8010     fi
8011     if test "$with_xim" = "motif"; then
8012       with_xfs=no
8013     fi
8014   fi
8015
8016     if test "$with_xfs" = "yes" ; then
8017     echo "checking for XFontSet" 1>&6
8018 echo "configure:8019: checking for XFontSet" >&5
8019     
8020 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8021 echo "configure:8022: checking for XmbDrawString in -lX11" >&5
8022 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8023
8024 xe_check_libs=" -lX11 "
8025 cat > conftest.$ac_ext <<EOF
8026 #line 8027 "configure"
8027 #include "confdefs.h"
8028 /* Override any gcc2 internal prototype to avoid an error.  */
8029 /* We use char because int might match the return type of a gcc2
8030     builtin and then its argument prototype would still apply.  */
8031 char XmbDrawString();
8032
8033 int main() {
8034 XmbDrawString()
8035 ; return 0; }
8036 EOF
8037 if { (eval echo configure:8038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8038   rm -rf conftest*
8039   eval "ac_cv_lib_$ac_lib_var=yes"
8040 else
8041   echo "configure: failed program was:" >&5
8042   cat conftest.$ac_ext >&5
8043   rm -rf conftest*
8044   eval "ac_cv_lib_$ac_lib_var=no"
8045 fi
8046 rm -f conftest*
8047 xe_check_libs=""
8048
8049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8050   echo "$ac_t""yes" 1>&6
8051   :
8052 else
8053   echo "$ac_t""no" 1>&6
8054 with_xfs=no
8055 fi
8056
8057
8058     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8059       { test "$extra_verbose" = "yes" && cat << \EOF
8060     Defining USE_XFONTSET
8061 EOF
8062 cat >> confdefs.h <<\EOF
8063 #define USE_XFONTSET 1
8064 EOF
8065 }
8066
8067       if test "$with_xim" = "no" ; then
8068         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8069    echo "    xemacs will be linked with \"input-method-xfs.o\""
8070  fi
8071       fi
8072     fi
8073   fi 
8074     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8075   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8076 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8077 echo "configure:8078: checking for wnn/jllib.h" >&5
8078
8079 cat > conftest.$ac_ext <<EOF
8080 #line 8081 "configure"
8081 #include "confdefs.h"
8082 #include <wnn/jllib.h>
8083 EOF
8084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8085 { (eval echo configure:8086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8087 if test -z "$ac_err"; then
8088   rm -rf conftest*
8089   eval "ac_cv_header_$ac_safe=yes"
8090 else
8091   echo "$ac_err" >&5
8092   echo "configure: failed program was:" >&5
8093   cat conftest.$ac_ext >&5
8094   rm -rf conftest*
8095   eval "ac_cv_header_$ac_safe=no"
8096 fi
8097 rm -f conftest*
8098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8099   echo "$ac_t""yes" 1>&6
8100   :
8101 else
8102   echo "$ac_t""no" 1>&6
8103 with_wnn=no
8104 fi
8105  }
8106     if test "$with_wnn" != "no"; then
8107     for ac_func in crypt
8108 do
8109 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8110 echo "configure:8111: checking for $ac_func" >&5
8111
8112 cat > conftest.$ac_ext <<EOF
8113 #line 8114 "configure"
8114 #include "confdefs.h"
8115 /* System header to define __stub macros and hopefully few prototypes,
8116     which can conflict with char $ac_func(); below.  */
8117 #include <assert.h>
8118 /* Override any gcc2 internal prototype to avoid an error.  */
8119 /* We use char because int might match the return type of a gcc2
8120     builtin and then its argument prototype would still apply.  */
8121 char $ac_func();
8122
8123 int main() {
8124
8125 /* The GNU C library defines this for functions which it implements
8126     to always fail with ENOSYS.  Some functions are actually named
8127     something starting with __ and the normal name is an alias.  */
8128 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8129 choke me
8130 #else
8131 $ac_func();
8132 #endif
8133
8134 ; return 0; }
8135 EOF
8136 if { (eval echo configure:8137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8137   rm -rf conftest*
8138   eval "ac_cv_func_$ac_func=yes"
8139 else
8140   echo "configure: failed program was:" >&5
8141   cat conftest.$ac_ext >&5
8142   rm -rf conftest*
8143   eval "ac_cv_func_$ac_func=no"
8144 fi
8145 rm -f conftest*
8146
8147 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8148   echo "$ac_t""yes" 1>&6
8149     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8150   { test "$extra_verbose" = "yes" && cat << EOF
8151     Defining $ac_tr_func
8152 EOF
8153 cat >> confdefs.h <<EOF
8154 #define $ac_tr_func 1
8155 EOF
8156 }
8157  
8158 else
8159   echo "$ac_t""no" 1>&6
8160 fi
8161 done
8162
8163     test "$ac_cv_func_crypt" != "yes" && { 
8164 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8165 echo "configure:8166: checking for crypt in -lcrypt" >&5
8166 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8167
8168 xe_check_libs=" -lcrypt "
8169 cat > conftest.$ac_ext <<EOF
8170 #line 8171 "configure"
8171 #include "confdefs.h"
8172 /* Override any gcc2 internal prototype to avoid an error.  */
8173 /* We use char because int might match the return type of a gcc2
8174     builtin and then its argument prototype would still apply.  */
8175 char crypt();
8176
8177 int main() {
8178 crypt()
8179 ; return 0; }
8180 EOF
8181 if { (eval echo configure:8182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8182   rm -rf conftest*
8183   eval "ac_cv_lib_$ac_lib_var=yes"
8184 else
8185   echo "configure: failed program was:" >&5
8186   cat conftest.$ac_ext >&5
8187   rm -rf conftest*
8188   eval "ac_cv_lib_$ac_lib_var=no"
8189 fi
8190 rm -f conftest*
8191 xe_check_libs=""
8192
8193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8194   echo "$ac_t""yes" 1>&6
8195     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8196     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8197   { test "$extra_verbose" = "yes" && cat << EOF
8198     Defining $ac_tr_lib
8199 EOF
8200 cat >> confdefs.h <<EOF
8201 #define $ac_tr_lib 1
8202 EOF
8203 }
8204
8205   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
8206
8207 else
8208   echo "$ac_t""no" 1>&6
8209 fi
8210
8211  }
8212   fi
8213     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
8214     
8215 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
8216 echo "configure:8217: checking for jl_dic_list_e in -lwnn" >&5
8217 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8218
8219 xe_check_libs=" -lwnn "
8220 cat > conftest.$ac_ext <<EOF
8221 #line 8222 "configure"
8222 #include "confdefs.h"
8223 /* Override any gcc2 internal prototype to avoid an error.  */
8224 /* We use char because int might match the return type of a gcc2
8225     builtin and then its argument prototype would still apply.  */
8226 char jl_dic_list_e();
8227
8228 int main() {
8229 jl_dic_list_e()
8230 ; return 0; }
8231 EOF
8232 if { (eval echo configure:8233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8233   rm -rf conftest*
8234   eval "ac_cv_lib_$ac_lib_var=yes"
8235 else
8236   echo "configure: failed program was:" >&5
8237   cat conftest.$ac_ext >&5
8238   rm -rf conftest*
8239   eval "ac_cv_lib_$ac_lib_var=no"
8240 fi
8241 rm -f conftest*
8242 xe_check_libs=""
8243
8244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8245   echo "$ac_t""yes" 1>&6
8246   libwnn=wnn
8247 else
8248   echo "$ac_t""no" 1>&6
8249 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
8250 echo "configure:8251: checking for jl_dic_list_e in -lwnn4" >&5
8251 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8252
8253 xe_check_libs=" -lwnn4 "
8254 cat > conftest.$ac_ext <<EOF
8255 #line 8256 "configure"
8256 #include "confdefs.h"
8257 /* Override any gcc2 internal prototype to avoid an error.  */
8258 /* We use char because int might match the return type of a gcc2
8259     builtin and then its argument prototype would still apply.  */
8260 char jl_dic_list_e();
8261
8262 int main() {
8263 jl_dic_list_e()
8264 ; return 0; }
8265 EOF
8266 if { (eval echo configure:8267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8267   rm -rf conftest*
8268   eval "ac_cv_lib_$ac_lib_var=yes"
8269 else
8270   echo "configure: failed program was:" >&5
8271   cat conftest.$ac_ext >&5
8272   rm -rf conftest*
8273   eval "ac_cv_lib_$ac_lib_var=no"
8274 fi
8275 rm -f conftest*
8276 xe_check_libs=""
8277
8278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8279   echo "$ac_t""yes" 1>&6
8280   libwnn=wnn4
8281 else
8282   echo "$ac_t""no" 1>&6
8283 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
8284 echo "configure:8285: checking for jl_dic_list_e in -lwnn6" >&5
8285 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8286
8287 xe_check_libs=" -lwnn6 "
8288 cat > conftest.$ac_ext <<EOF
8289 #line 8290 "configure"
8290 #include "confdefs.h"
8291 /* Override any gcc2 internal prototype to avoid an error.  */
8292 /* We use char because int might match the return type of a gcc2
8293     builtin and then its argument prototype would still apply.  */
8294 char jl_dic_list_e();
8295
8296 int main() {
8297 jl_dic_list_e()
8298 ; return 0; }
8299 EOF
8300 if { (eval echo configure:8301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8301   rm -rf conftest*
8302   eval "ac_cv_lib_$ac_lib_var=yes"
8303 else
8304   echo "configure: failed program was:" >&5
8305   cat conftest.$ac_ext >&5
8306   rm -rf conftest*
8307   eval "ac_cv_lib_$ac_lib_var=no"
8308 fi
8309 rm -f conftest*
8310 xe_check_libs=""
8311
8312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8313   echo "$ac_t""yes" 1>&6
8314   libwnn=wnn6
8315 else
8316   echo "$ac_t""no" 1>&6
8317 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
8318 echo "configure:8319: checking for dic_list_e in -lwnn6_fromsrc" >&5
8319 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
8320
8321 xe_check_libs=" -lwnn6_fromsrc "
8322 cat > conftest.$ac_ext <<EOF
8323 #line 8324 "configure"
8324 #include "confdefs.h"
8325 /* Override any gcc2 internal prototype to avoid an error.  */
8326 /* We use char because int might match the return type of a gcc2
8327     builtin and then its argument prototype would still apply.  */
8328 char dic_list_e();
8329
8330 int main() {
8331 dic_list_e()
8332 ; return 0; }
8333 EOF
8334 if { (eval echo configure:8335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8335   rm -rf conftest*
8336   eval "ac_cv_lib_$ac_lib_var=yes"
8337 else
8338   echo "configure: failed program was:" >&5
8339   cat conftest.$ac_ext >&5
8340   rm -rf conftest*
8341   eval "ac_cv_lib_$ac_lib_var=no"
8342 fi
8343 rm -f conftest*
8344 xe_check_libs=""
8345
8346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8347   echo "$ac_t""yes" 1>&6
8348   libwnn=wnn6_fromsrc
8349 else
8350   echo "$ac_t""no" 1>&6
8351 with_wnn=no
8352 fi
8353
8354
8355 fi
8356
8357
8358 fi
8359
8360
8361 fi
8362
8363
8364   fi
8365   test -z "$with_wnn" && with_wnn=yes
8366   if test "$with_wnn" = "yes"; then
8367     { test "$extra_verbose" = "yes" && cat << \EOF
8368     Defining HAVE_WNN
8369 EOF
8370 cat >> confdefs.h <<\EOF
8371 #define HAVE_WNN 1
8372 EOF
8373 }
8374
8375     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
8376     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
8377    echo "    xemacs will be linked with \"mule-wnnfns.o\""
8378  fi
8379     if test "$with_wnn6" != "no"; then
8380       
8381 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
8382 echo "configure:8383: checking for jl_fi_dic_list in -l$libwnn" >&5
8383 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
8384
8385 xe_check_libs=" -l$libwnn "
8386 cat > conftest.$ac_ext <<EOF
8387 #line 8388 "configure"
8388 #include "confdefs.h"
8389 /* Override any gcc2 internal prototype to avoid an error.  */
8390 /* We use char because int might match the return type of a gcc2
8391     builtin and then its argument prototype would still apply.  */
8392 char jl_fi_dic_list();
8393
8394 int main() {
8395 jl_fi_dic_list()
8396 ; return 0; }
8397 EOF
8398 if { (eval echo configure:8399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8399   rm -rf conftest*
8400   eval "ac_cv_lib_$ac_lib_var=yes"
8401 else
8402   echo "configure: failed program was:" >&5
8403   cat conftest.$ac_ext >&5
8404   rm -rf conftest*
8405   eval "ac_cv_lib_$ac_lib_var=no"
8406 fi
8407 rm -f conftest*
8408 xe_check_libs=""
8409
8410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8411   echo "$ac_t""yes" 1>&6
8412   with_wnn6=yes
8413 else
8414   echo "$ac_t""no" 1>&6
8415 fi
8416
8417
8418       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
8419     Defining WNN6
8420 EOF
8421 cat >> confdefs.h <<\EOF
8422 #define WNN6 1
8423 EOF
8424 }
8425
8426     fi
8427   fi
8428
8429     canna_includes_found=no
8430   if test "$with_canna" != "no"; then
8431     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8432 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8433 echo "configure:8434: checking for canna/jrkanji.h" >&5
8434
8435 cat > conftest.$ac_ext <<EOF
8436 #line 8437 "configure"
8437 #include "confdefs.h"
8438 #include <canna/jrkanji.h>
8439 EOF
8440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8441 { (eval echo configure:8442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8443 if test -z "$ac_err"; then
8444   rm -rf conftest*
8445   eval "ac_cv_header_$ac_safe=yes"
8446 else
8447   echo "$ac_err" >&5
8448   echo "configure: failed program was:" >&5
8449   cat conftest.$ac_ext >&5
8450   rm -rf conftest*
8451   eval "ac_cv_header_$ac_safe=no"
8452 fi
8453 rm -f conftest*
8454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8455   echo "$ac_t""yes" 1>&6
8456   canna_includes_found=yes
8457 else
8458   echo "$ac_t""no" 1>&6
8459 fi
8460
8461   fi
8462   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
8463       -d "/usr/local/canna/include"; then
8464     save_c_switch_site="$c_switch_site"
8465     c_switch_site="$c_switch_site -I/usr/local/canna/include"
8466     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8467 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8468 echo "configure:8469: checking for canna/jrkanji.h" >&5
8469
8470 cat > conftest.$ac_ext <<EOF
8471 #line 8472 "configure"
8472 #include "confdefs.h"
8473 #include <canna/jrkanji.h>
8474 EOF
8475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8476 { (eval echo configure:8477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8478 if test -z "$ac_err"; then
8479   rm -rf conftest*
8480   eval "ac_cv_header_$ac_safe=yes"
8481 else
8482   echo "$ac_err" >&5
8483   echo "configure: failed program was:" >&5
8484   cat conftest.$ac_ext >&5
8485   rm -rf conftest*
8486   eval "ac_cv_header_$ac_safe=no"
8487 fi
8488 rm -f conftest*
8489 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8490   echo "$ac_t""yes" 1>&6
8491   canna_includes_found=yes
8492 else
8493   echo "$ac_t""no" 1>&6
8494 fi
8495
8496     if test "$canna_includes_found" != "yes"; then
8497       c_switch_site="$save_c_switch_site"
8498       with_canna="no"
8499     fi
8500   fi
8501
8502   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
8503 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
8504 echo "configure:8505: checking for canna/RK.h" >&5
8505
8506 cat > conftest.$ac_ext <<EOF
8507 #line 8508 "configure"
8508 #include "confdefs.h"
8509 #include <canna/RK.h>
8510 EOF
8511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8512 { (eval echo configure:8513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8514 if test -z "$ac_err"; then
8515   rm -rf conftest*
8516   eval "ac_cv_header_$ac_safe=yes"
8517 else
8518   echo "$ac_err" >&5
8519   echo "configure: failed program was:" >&5
8520   cat conftest.$ac_ext >&5
8521   rm -rf conftest*
8522   eval "ac_cv_header_$ac_safe=no"
8523 fi
8524 rm -f conftest*
8525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8526   echo "$ac_t""yes" 1>&6
8527   :
8528 else
8529   echo "$ac_t""no" 1>&6
8530 with_canna=no
8531 fi
8532  }
8533   test -z "$with_canna" && { 
8534 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
8535 echo "configure:8536: checking for RkBgnBun in -lRKC" >&5
8536 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
8537
8538 xe_check_libs=" -lRKC "
8539 cat > conftest.$ac_ext <<EOF
8540 #line 8541 "configure"
8541 #include "confdefs.h"
8542 /* Override any gcc2 internal prototype to avoid an error.  */
8543 /* We use char because int might match the return type of a gcc2
8544     builtin and then its argument prototype would still apply.  */
8545 char RkBgnBun();
8546
8547 int main() {
8548 RkBgnBun()
8549 ; return 0; }
8550 EOF
8551 if { (eval echo configure:8552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8552   rm -rf conftest*
8553   eval "ac_cv_lib_$ac_lib_var=yes"
8554 else
8555   echo "configure: failed program was:" >&5
8556   cat conftest.$ac_ext >&5
8557   rm -rf conftest*
8558   eval "ac_cv_lib_$ac_lib_var=no"
8559 fi
8560 rm -f conftest*
8561 xe_check_libs=""
8562
8563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8564   echo "$ac_t""yes" 1>&6
8565   :
8566 else
8567   echo "$ac_t""no" 1>&6
8568 with_canna=no
8569 fi
8570
8571  }
8572   test -z "$with_canna" && { 
8573 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
8574 echo "configure:8575: checking for jrKanjiControl in -lcanna" >&5
8575 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
8576
8577 xe_check_libs=" -lcanna "
8578 cat > conftest.$ac_ext <<EOF
8579 #line 8580 "configure"
8580 #include "confdefs.h"
8581 /* Override any gcc2 internal prototype to avoid an error.  */
8582 /* We use char because int might match the return type of a gcc2
8583     builtin and then its argument prototype would still apply.  */
8584 char jrKanjiControl();
8585
8586 int main() {
8587 jrKanjiControl()
8588 ; return 0; }
8589 EOF
8590 if { (eval echo configure:8591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8591   rm -rf conftest*
8592   eval "ac_cv_lib_$ac_lib_var=yes"
8593 else
8594   echo "configure: failed program was:" >&5
8595   cat conftest.$ac_ext >&5
8596   rm -rf conftest*
8597   eval "ac_cv_lib_$ac_lib_var=no"
8598 fi
8599 rm -f conftest*
8600 xe_check_libs=""
8601
8602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8603   echo "$ac_t""yes" 1>&6
8604   :
8605 else
8606   echo "$ac_t""no" 1>&6
8607 with_canna=no
8608 fi
8609
8610  }
8611   test -z "$with_canna" && with_canna=yes
8612   if test "$with_canna" = "yes"; then
8613     { test "$extra_verbose" = "yes" && cat << \EOF
8614     Defining HAVE_CANNA
8615 EOF
8616 cat >> confdefs.h <<\EOF
8617 #define HAVE_CANNA 1
8618 EOF
8619 }
8620
8621     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
8622     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
8623    echo "    xemacs will be linked with \"mule-canna.o\""
8624  fi
8625   fi
8626
8627 else   for feature in xim canna wnn; do
8628     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
8629       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
8630     fi
8631     eval "with_${feature}=no"
8632   done
8633 fi 
8634
8635 if test "$need_motif" = "yes" ; then
8636   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
8637     
8638 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
8639 echo "configure:8640: checking for layout_object_getvalue in -li18n" >&5
8640 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
8641
8642 xe_check_libs=" -li18n "
8643 cat > conftest.$ac_ext <<EOF
8644 #line 8645 "configure"
8645 #include "confdefs.h"
8646 /* Override any gcc2 internal prototype to avoid an error.  */
8647 /* We use char because int might match the return type of a gcc2
8648     builtin and then its argument prototype would still apply.  */
8649 char layout_object_getvalue();
8650
8651 int main() {
8652 layout_object_getvalue()
8653 ; return 0; }
8654 EOF
8655 if { (eval echo configure:8656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8656   rm -rf conftest*
8657   eval "ac_cv_lib_$ac_lib_var=yes"
8658 else
8659   echo "configure: failed program was:" >&5
8660   cat conftest.$ac_ext >&5
8661   rm -rf conftest*
8662   eval "ac_cv_lib_$ac_lib_var=no"
8663 fi
8664 rm -f conftest*
8665 xe_check_libs=""
8666
8667 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8668   echo "$ac_t""yes" 1>&6
8669   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
8670 else
8671   echo "$ac_t""no" 1>&6
8672 fi
8673
8674
8675   
8676 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
8677     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8678   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8679   
8680         runpath="" runpath_dirs=""
8681   if test -n "$LD_RUN_PATH"; then
8682     runpath="$LD_RUN_PATH"
8683   elif test "$GCC" = "yes"; then
8684         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
8685     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
8686     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
8687     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
8688       case "$arg" in P,* | -L* | -R* )
8689         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
8690           {
8691 xe_runpath_dir="$dir"
8692   test "$xe_runpath_dir" != "/lib"     -a \
8693         "$xe_runpath_dir" != "/usr/lib" -a \
8694         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8695   eval "$xe_add_unique_runpath_dir"
8696 }
8697         done ;;
8698       esac
8699     done
8700     ld_switch_run="$ld_switch_run_save"
8701     rm -f conftest*
8702   else
8703         for arg in $ld_switch_site $ld_switch_x_site; do
8704       case "$arg" in -L*) {
8705 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
8706   test "$xe_runpath_dir" != "/lib"     -a \
8707         "$xe_runpath_dir" != "/usr/lib" -a \
8708         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8709   eval "$xe_add_unique_runpath_dir"
8710 };; esac
8711     done
8712         if test "$opsys $need_motif" = "sol2 yes"; then
8713       xe_runpath_dir="/opt/SUNWdt/lib";
8714       eval "$xe_add_unique_runpath_dir";
8715     fi
8716   fi 
8717   if test -n "$runpath"; then
8718     ld_switch_run="${dash_r}${runpath}"
8719     
8720 if test "$GCC" = "yes"; then
8721   set x $ld_switch_run; shift; ld_switch_run=""
8722   while test -n "$1"; do
8723     case $1 in
8724       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
8725       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
8726       -Xlinker* ) ;;
8727       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
8728     esac
8729     shift
8730   done
8731 fi
8732     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
8733   fi
8734 fi
8735
8736 fi
8737
8738 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
8739 do
8740 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8741 echo "configure:8742: checking for $ac_func" >&5
8742
8743 cat > conftest.$ac_ext <<EOF
8744 #line 8745 "configure"
8745 #include "confdefs.h"
8746 /* System header to define __stub macros and hopefully few prototypes,
8747     which can conflict with char $ac_func(); below.  */
8748 #include <assert.h>
8749 /* Override any gcc2 internal prototype to avoid an error.  */
8750 /* We use char because int might match the return type of a gcc2
8751     builtin and then its argument prototype would still apply.  */
8752 char $ac_func();
8753
8754 int main() {
8755
8756 /* The GNU C library defines this for functions which it implements
8757     to always fail with ENOSYS.  Some functions are actually named
8758     something starting with __ and the normal name is an alias.  */
8759 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8760 choke me
8761 #else
8762 $ac_func();
8763 #endif
8764
8765 ; return 0; }
8766 EOF
8767 if { (eval echo configure:8768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8768   rm -rf conftest*
8769   eval "ac_cv_func_$ac_func=yes"
8770 else
8771   echo "configure: failed program was:" >&5
8772   cat conftest.$ac_ext >&5
8773   rm -rf conftest*
8774   eval "ac_cv_func_$ac_func=no"
8775 fi
8776 rm -f conftest*
8777
8778 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8779   echo "$ac_t""yes" 1>&6
8780     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8781   { test "$extra_verbose" = "yes" && cat << EOF
8782     Defining $ac_tr_func
8783 EOF
8784 cat >> confdefs.h <<EOF
8785 #define $ac_tr_func 1
8786 EOF
8787 }
8788  
8789 else
8790   echo "$ac_t""no" 1>&6
8791 fi
8792 done
8793
8794
8795
8796 case "$opsys" in
8797   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8798    echo "    xemacs will be linked with \"realpath.o\""
8799  fi ;;
8800   * )
8801     case "$canonical" in
8802       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8803    echo "    xemacs will be linked with \"realpath.o\""
8804  fi ;;
8805       * ) for ac_func in realpath
8806 do
8807 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8808 echo "configure:8809: checking for $ac_func" >&5
8809
8810 cat > conftest.$ac_ext <<EOF
8811 #line 8812 "configure"
8812 #include "confdefs.h"
8813 /* System header to define __stub macros and hopefully few prototypes,
8814     which can conflict with char $ac_func(); below.  */
8815 #include <assert.h>
8816 /* Override any gcc2 internal prototype to avoid an error.  */
8817 /* We use char because int might match the return type of a gcc2
8818     builtin and then its argument prototype would still apply.  */
8819 char $ac_func();
8820
8821 int main() {
8822
8823 /* The GNU C library defines this for functions which it implements
8824     to always fail with ENOSYS.  Some functions are actually named
8825     something starting with __ and the normal name is an alias.  */
8826 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8827 choke me
8828 #else
8829 $ac_func();
8830 #endif
8831
8832 ; return 0; }
8833 EOF
8834 if { (eval echo configure:8835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8835   rm -rf conftest*
8836   eval "ac_cv_func_$ac_func=yes"
8837 else
8838   echo "configure: failed program was:" >&5
8839   cat conftest.$ac_ext >&5
8840   rm -rf conftest*
8841   eval "ac_cv_func_$ac_func=no"
8842 fi
8843 rm -f conftest*
8844
8845 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8846   echo "$ac_t""yes" 1>&6
8847     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8848   { test "$extra_verbose" = "yes" && cat << EOF
8849     Defining $ac_tr_func
8850 EOF
8851 cat >> confdefs.h <<EOF
8852 #define $ac_tr_func 1
8853 EOF
8854 }
8855  
8856 else
8857   echo "$ac_t""no" 1>&6
8858 fi
8859 done
8860
8861           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8862    echo "    xemacs will be linked with \"realpath.o\""
8863  fi ;;
8864     esac ;;
8865 esac
8866
8867 for ac_func in getloadavg
8868 do
8869 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8870 echo "configure:8871: checking for $ac_func" >&5
8871
8872 cat > conftest.$ac_ext <<EOF
8873 #line 8874 "configure"
8874 #include "confdefs.h"
8875 /* System header to define __stub macros and hopefully few prototypes,
8876     which can conflict with char $ac_func(); below.  */
8877 #include <assert.h>
8878 /* Override any gcc2 internal prototype to avoid an error.  */
8879 /* We use char because int might match the return type of a gcc2
8880     builtin and then its argument prototype would still apply.  */
8881 char $ac_func();
8882
8883 int main() {
8884
8885 /* The GNU C library defines this for functions which it implements
8886     to always fail with ENOSYS.  Some functions are actually named
8887     something starting with __ and the normal name is an alias.  */
8888 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8889 choke me
8890 #else
8891 $ac_func();
8892 #endif
8893
8894 ; return 0; }
8895 EOF
8896 if { (eval echo configure:8897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8897   rm -rf conftest*
8898   eval "ac_cv_func_$ac_func=yes"
8899 else
8900   echo "configure: failed program was:" >&5
8901   cat conftest.$ac_ext >&5
8902   rm -rf conftest*
8903   eval "ac_cv_func_$ac_func=no"
8904 fi
8905 rm -f conftest*
8906
8907 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8908   echo "$ac_t""yes" 1>&6
8909     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8910   { test "$extra_verbose" = "yes" && cat << EOF
8911     Defining $ac_tr_func
8912 EOF
8913 cat >> confdefs.h <<EOF
8914 #define $ac_tr_func 1
8915 EOF
8916 }
8917  
8918 else
8919   echo "$ac_t""no" 1>&6
8920 fi
8921 done
8922
8923
8924 if test "$ac_cv_func_getloadavg" != "yes"
8925 then
8926   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
8927    echo "    xemacs will be linked with \"getloadavg.o\""
8928  fi
8929
8930     
8931 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
8932 echo "configure:8933: checking for kstat_open in -lkstat" >&5
8933 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
8934
8935 xe_check_libs=" -lkstat "
8936 cat > conftest.$ac_ext <<EOF
8937 #line 8938 "configure"
8938 #include "confdefs.h"
8939 /* Override any gcc2 internal prototype to avoid an error.  */
8940 /* We use char because int might match the return type of a gcc2
8941     builtin and then its argument prototype would still apply.  */
8942 char kstat_open();
8943
8944 int main() {
8945 kstat_open()
8946 ; return 0; }
8947 EOF
8948 if { (eval echo configure:8949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8949   rm -rf conftest*
8950   eval "ac_cv_lib_$ac_lib_var=yes"
8951 else
8952   echo "configure: failed program was:" >&5
8953   cat conftest.$ac_ext >&5
8954   rm -rf conftest*
8955   eval "ac_cv_lib_$ac_lib_var=no"
8956 fi
8957 rm -f conftest*
8958 xe_check_libs=""
8959
8960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8961   echo "$ac_t""yes" 1>&6
8962     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8963     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8964   { test "$extra_verbose" = "yes" && cat << EOF
8965     Defining $ac_tr_lib
8966 EOF
8967 cat >> confdefs.h <<EOF
8968 #define $ac_tr_lib 1
8969 EOF
8970 }
8971
8972   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
8973
8974 else
8975   echo "$ac_t""no" 1>&6
8976 fi
8977
8978
8979
8980     
8981 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
8982 echo "configure:8983: checking for kvm_read in -lkvm" >&5
8983 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
8984
8985 xe_check_libs=" -lkvm "
8986 cat > conftest.$ac_ext <<EOF
8987 #line 8988 "configure"
8988 #include "confdefs.h"
8989 /* Override any gcc2 internal prototype to avoid an error.  */
8990 /* We use char because int might match the return type of a gcc2
8991     builtin and then its argument prototype would still apply.  */
8992 char kvm_read();
8993
8994 int main() {
8995 kvm_read()
8996 ; return 0; }
8997 EOF
8998 if { (eval echo configure:8999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8999   rm -rf conftest*
9000   eval "ac_cv_lib_$ac_lib_var=yes"
9001 else
9002   echo "configure: failed program was:" >&5
9003   cat conftest.$ac_ext >&5
9004   rm -rf conftest*
9005   eval "ac_cv_lib_$ac_lib_var=no"
9006 fi
9007 rm -f conftest*
9008 xe_check_libs=""
9009
9010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9011   echo "$ac_t""yes" 1>&6
9012     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9013     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9014   { test "$extra_verbose" = "yes" && cat << EOF
9015     Defining $ac_tr_lib
9016 EOF
9017 cat >> confdefs.h <<EOF
9018 #define $ac_tr_lib 1
9019 EOF
9020 }
9021
9022   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9023
9024 else
9025   echo "$ac_t""no" 1>&6
9026 fi
9027
9028
9029 fi
9030
9031 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9032 echo "configure:9033: checking whether netdb declares h_errno" >&5
9033 cat > conftest.$ac_ext <<EOF
9034 #line 9035 "configure"
9035 #include "confdefs.h"
9036 #include <netdb.h>
9037 int main() {
9038 return h_errno;
9039 ; return 0; }
9040 EOF
9041 if { (eval echo configure:9042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9042   rm -rf conftest*
9043   echo "$ac_t""yes" 1>&6
9044    { test "$extra_verbose" = "yes" && cat << \EOF
9045     Defining HAVE_H_ERRNO
9046 EOF
9047 cat >> confdefs.h <<\EOF
9048 #define HAVE_H_ERRNO 1
9049 EOF
9050 }
9051
9052 else
9053   echo "configure: failed program was:" >&5
9054   cat conftest.$ac_ext >&5
9055   rm -rf conftest*
9056   echo "$ac_t""no" 1>&6
9057 fi
9058 rm -f conftest*
9059
9060 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9061 echo "configure:9062: checking for sigsetjmp" >&5
9062 cat > conftest.$ac_ext <<EOF
9063 #line 9064 "configure"
9064 #include "confdefs.h"
9065 #include <setjmp.h>
9066 int main() {
9067 sigjmp_buf bar; sigsetjmp (bar, 0);
9068 ; return 0; }
9069 EOF
9070 if { (eval echo configure:9071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9071   rm -rf conftest*
9072   echo "$ac_t""yes" 1>&6
9073    { test "$extra_verbose" = "yes" && cat << \EOF
9074     Defining HAVE_SIGSETJMP
9075 EOF
9076 cat >> confdefs.h <<\EOF
9077 #define HAVE_SIGSETJMP 1
9078 EOF
9079 }
9080
9081 else
9082   echo "configure: failed program was:" >&5
9083   cat conftest.$ac_ext >&5
9084   rm -rf conftest*
9085   echo "$ac_t""no" 1>&6
9086 fi
9087 rm -f conftest*
9088
9089 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9090 echo "configure:9091: checking whether localtime caches TZ" >&5
9091
9092 if test "$ac_cv_func_tzset" = "yes"; then
9093 cat > conftest.$ac_ext <<EOF
9094 #line 9095 "configure"
9095 #include "confdefs.h"
9096 #include <time.h>
9097 #if STDC_HEADERS
9098 # include <stdlib.h>
9099 #endif
9100 extern char **environ;
9101 unset_TZ ()
9102 {
9103   char **from, **to;
9104   for (to = from = environ; (*to = *from); from++)
9105     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9106       to++;
9107 }
9108 char TZ_GMT0[] = "TZ=GMT0";
9109 char TZ_PST8[] = "TZ=PST8";
9110 main()
9111 {
9112   time_t now = time ((time_t *) 0);
9113   int hour_GMT0, hour_unset;
9114   if (putenv (TZ_GMT0) != 0)
9115     exit (1);
9116   hour_GMT0 = localtime (&now)->tm_hour;
9117   unset_TZ ();
9118   hour_unset = localtime (&now)->tm_hour;
9119   if (putenv (TZ_PST8) != 0)
9120     exit (1);
9121   if (localtime (&now)->tm_hour == hour_GMT0)
9122     exit (1);
9123   unset_TZ ();
9124   if (localtime (&now)->tm_hour != hour_unset)
9125     exit (1);
9126   exit (0);
9127 }
9128 EOF
9129 if { (eval echo configure:9130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9130 then
9131   emacs_cv_localtime_cache=no
9132 else
9133   conftest_rc="$?"
9134   echo "configure: failed program was:" >&5
9135   cat conftest.$ac_ext >&5
9136   rm -fr conftest*
9137   emacs_cv_localtime_cache=yes
9138 fi
9139 rm -fr conftest*
9140 else
9141         # If we lack tzset, report that localtime does not cache TZ,
9142         # since we can't invalidate the cache if we don't have tzset.
9143         emacs_cv_localtime_cache=no
9144 fi
9145 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9146 if test $emacs_cv_localtime_cache = yes; then
9147   { test "$extra_verbose" = "yes" && cat << \EOF
9148     Defining LOCALTIME_CACHE
9149 EOF
9150 cat >> confdefs.h <<\EOF
9151 #define LOCALTIME_CACHE 1
9152 EOF
9153 }
9154
9155 fi
9156
9157 if test "$HAVE_TIMEVAL" = "yes"; then
9158 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9159 echo "configure:9160: checking whether gettimeofday accepts one or two arguments" >&5
9160 cat > conftest.$ac_ext <<EOF
9161 #line 9162 "configure"
9162 #include "confdefs.h"
9163
9164 #ifdef TIME_WITH_SYS_TIME
9165 #include <sys/time.h>
9166 #include <time.h>
9167 #else
9168 #ifdef HAVE_SYS_TIME_H
9169 #include <sys/time.h>
9170 #else
9171 #include <time.h>
9172 #endif
9173 #endif
9174   
9175 int main() {
9176
9177   struct timeval time;
9178   struct timezone dummy;
9179   gettimeofday (&time, &dummy);
9180
9181 ; return 0; }
9182 EOF
9183 if { (eval echo configure:9184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9184   rm -rf conftest*
9185   echo "$ac_t""two" 1>&6
9186 else
9187   echo "configure: failed program was:" >&5
9188   cat conftest.$ac_ext >&5
9189   rm -rf conftest*
9190   echo "$ac_t""one" 1>&6
9191    { test "$extra_verbose" = "yes" && cat << \EOF
9192     Defining GETTIMEOFDAY_ONE_ARGUMENT
9193 EOF
9194 cat >> confdefs.h <<\EOF
9195 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9196 EOF
9197 }
9198
9199 fi
9200 rm -f conftest*
9201 fi
9202
9203
9204 echo $ac_n "checking for inline""... $ac_c" 1>&6
9205 echo "configure:9206: checking for inline" >&5
9206
9207 ac_cv_c_inline=no
9208 for ac_kw in inline __inline__ __inline; do
9209   cat > conftest.$ac_ext <<EOF
9210 #line 9211 "configure"
9211 #include "confdefs.h"
9212
9213 int main() {
9214 } $ac_kw foo() {
9215 ; return 0; }
9216 EOF
9217 if { (eval echo configure:9218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9218   rm -rf conftest*
9219   ac_cv_c_inline=$ac_kw; break
9220 else
9221   echo "configure: failed program was:" >&5
9222   cat conftest.$ac_ext >&5
9223 fi
9224 rm -f conftest*
9225 done
9226
9227
9228 echo "$ac_t""$ac_cv_c_inline" 1>&6
9229 case "$ac_cv_c_inline" in
9230   inline | yes) ;;
9231   no) { test "$extra_verbose" = "yes" && cat << \EOF
9232     Defining inline = 
9233 EOF
9234 cat >> confdefs.h <<\EOF
9235 #define inline 
9236 EOF
9237 }
9238  ;;
9239   *)  { test "$extra_verbose" = "yes" && cat << EOF
9240     Defining inline = $ac_cv_c_inline
9241 EOF
9242 cat >> confdefs.h <<EOF
9243 #define inline $ac_cv_c_inline
9244 EOF
9245 }
9246  ;;
9247 esac
9248
9249 if test "$ac_cv_c_inline" != "no"; then
9250   { test "$extra_verbose" = "yes" && cat << \EOF
9251     Defining HAVE_INLINE
9252 EOF
9253 cat >> confdefs.h <<\EOF
9254 #define HAVE_INLINE 1
9255 EOF
9256 }
9257
9258   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
9259    echo "    xemacs will be linked with \"inline.o\""
9260  fi
9261 fi
9262
9263
9264 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9265 # for constant arguments.  Useless!
9266 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9267 echo "configure:9268: checking for working alloca.h" >&5
9268
9269 cat > conftest.$ac_ext <<EOF
9270 #line 9271 "configure"
9271 #include "confdefs.h"
9272 #include <alloca.h>
9273 int main() {
9274 char *p = alloca(2 * sizeof(int));
9275 ; return 0; }
9276 EOF
9277 if { (eval echo configure:9278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9278   rm -rf conftest*
9279   ac_cv_header_alloca_h=yes
9280 else
9281   echo "configure: failed program was:" >&5
9282   cat conftest.$ac_ext >&5
9283   rm -rf conftest*
9284   ac_cv_header_alloca_h=no
9285 fi
9286 rm -f conftest*
9287
9288 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9289 if test $ac_cv_header_alloca_h = yes; then
9290   { test "$extra_verbose" = "yes" && cat << \EOF
9291     Defining HAVE_ALLOCA_H
9292 EOF
9293 cat >> confdefs.h <<\EOF
9294 #define HAVE_ALLOCA_H 1
9295 EOF
9296 }
9297
9298 fi
9299
9300 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9301 echo "configure:9302: checking for alloca" >&5
9302
9303 cat > conftest.$ac_ext <<EOF
9304 #line 9305 "configure"
9305 #include "confdefs.h"
9306
9307 #ifdef __GNUC__
9308 # define alloca __builtin_alloca
9309 #else
9310 # ifdef _MSC_VER
9311 #  include <malloc.h>
9312 #  define alloca _alloca
9313 # else
9314 #  if HAVE_ALLOCA_H
9315 #   include <alloca.h>
9316 #  else
9317 #   ifdef _AIX
9318  #pragma alloca
9319 #   else
9320 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9321 char *alloca ();
9322 #    endif
9323 #   endif
9324 #  endif
9325 # endif
9326 #endif
9327
9328 int main() {
9329 char *p = (char *) alloca(1);
9330 ; return 0; }
9331 EOF
9332 if { (eval echo configure:9333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9333   rm -rf conftest*
9334   ac_cv_func_alloca_works=yes
9335 else
9336   echo "configure: failed program was:" >&5
9337   cat conftest.$ac_ext >&5
9338   rm -rf conftest*
9339   ac_cv_func_alloca_works=no
9340 fi
9341 rm -f conftest*
9342
9343 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
9344 if test $ac_cv_func_alloca_works = yes; then
9345   { test "$extra_verbose" = "yes" && cat << \EOF
9346     Defining HAVE_ALLOCA
9347 EOF
9348 cat >> confdefs.h <<\EOF
9349 #define HAVE_ALLOCA 1
9350 EOF
9351 }
9352
9353 fi
9354
9355 if test $ac_cv_func_alloca_works = no; then
9356   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9357   # that cause trouble.  Some versions do not even contain alloca or
9358   # contain a buggy version.  If you still want to use their alloca,
9359   # use ar to extract alloca.o from them instead of compiling alloca.c.
9360   ALLOCA=alloca.${ac_objext}
9361   { test "$extra_verbose" = "yes" && cat << \EOF
9362     Defining C_ALLOCA
9363 EOF
9364 cat >> confdefs.h <<\EOF
9365 #define C_ALLOCA 1
9366 EOF
9367 }
9368
9369
9370 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9371 echo "configure:9372: checking whether alloca needs Cray hooks" >&5
9372
9373 cat > conftest.$ac_ext <<EOF
9374 #line 9375 "configure"
9375 #include "confdefs.h"
9376 #if defined(CRAY) && ! defined(CRAY2)
9377 webecray
9378 #else
9379 wenotbecray
9380 #endif
9381
9382 EOF
9383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9384   egrep "webecray" >/dev/null 2>&1; then
9385   rm -rf conftest*
9386   ac_cv_os_cray=yes
9387 else
9388   rm -rf conftest*
9389   ac_cv_os_cray=no
9390 fi
9391 rm -f conftest*
9392
9393
9394 echo "$ac_t""$ac_cv_os_cray" 1>&6
9395 if test $ac_cv_os_cray = yes; then
9396 for ac_func in _getb67 GETB67 getb67; do
9397   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9398 echo "configure:9399: checking for $ac_func" >&5
9399
9400 cat > conftest.$ac_ext <<EOF
9401 #line 9402 "configure"
9402 #include "confdefs.h"
9403 /* System header to define __stub macros and hopefully few prototypes,
9404     which can conflict with char $ac_func(); below.  */
9405 #include <assert.h>
9406 /* Override any gcc2 internal prototype to avoid an error.  */
9407 /* We use char because int might match the return type of a gcc2
9408     builtin and then its argument prototype would still apply.  */
9409 char $ac_func();
9410
9411 int main() {
9412
9413 /* The GNU C library defines this for functions which it implements
9414     to always fail with ENOSYS.  Some functions are actually named
9415     something starting with __ and the normal name is an alias.  */
9416 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9417 choke me
9418 #else
9419 $ac_func();
9420 #endif
9421
9422 ; return 0; }
9423 EOF
9424 if { (eval echo configure:9425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9425   rm -rf conftest*
9426   eval "ac_cv_func_$ac_func=yes"
9427 else
9428   echo "configure: failed program was:" >&5
9429   cat conftest.$ac_ext >&5
9430   rm -rf conftest*
9431   eval "ac_cv_func_$ac_func=no"
9432 fi
9433 rm -f conftest*
9434
9435 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9436   echo "$ac_t""yes" 1>&6
9437   { test "$extra_verbose" = "yes" && cat << EOF
9438     Defining CRAY_STACKSEG_END = $ac_func
9439 EOF
9440 cat >> confdefs.h <<EOF
9441 #define CRAY_STACKSEG_END $ac_func
9442 EOF
9443 }
9444
9445   break
9446 else
9447   echo "$ac_t""no" 1>&6
9448 fi
9449
9450 done
9451 fi
9452
9453 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9454 echo "configure:9455: checking stack direction for C alloca" >&5
9455
9456 cat > conftest.$ac_ext <<EOF
9457 #line 9458 "configure"
9458 #include "confdefs.h"
9459 find_stack_direction ()
9460 {
9461   static char *addr = 0;
9462   auto char dummy;
9463   if (addr == 0)
9464     {
9465       addr = &dummy;
9466       return find_stack_direction ();
9467     }
9468   else
9469     return (&dummy > addr) ? 1 : -1;
9470 }
9471 main ()
9472 {
9473   exit (find_stack_direction() < 0);
9474 }
9475 EOF
9476 if { (eval echo configure:9477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9477 then
9478   ac_cv_c_stack_direction=1
9479 else
9480   conftest_rc="$?"
9481   echo "configure: failed program was:" >&5
9482   cat conftest.$ac_ext >&5
9483   rm -fr conftest*
9484   ac_cv_c_stack_direction=-1
9485 fi
9486 rm -fr conftest*
9487
9488 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
9489 { test "$extra_verbose" = "yes" && cat << EOF
9490     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
9491 EOF
9492 cat >> confdefs.h <<EOF
9493 #define STACK_DIRECTION $ac_cv_c_stack_direction
9494 EOF
9495 }
9496
9497 fi
9498
9499 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
9500    echo "    xemacs will be linked with \"$ALLOCA\""
9501  fi
9502
9503 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
9504 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9505 echo "configure:9506: checking for vfork.h" >&5
9506
9507 cat > conftest.$ac_ext <<EOF
9508 #line 9509 "configure"
9509 #include "confdefs.h"
9510 #include <vfork.h>
9511 EOF
9512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9513 { (eval echo configure:9514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9515 if test -z "$ac_err"; then
9516   rm -rf conftest*
9517   eval "ac_cv_header_$ac_safe=yes"
9518 else
9519   echo "$ac_err" >&5
9520   echo "configure: failed program was:" >&5
9521   cat conftest.$ac_ext >&5
9522   rm -rf conftest*
9523   eval "ac_cv_header_$ac_safe=no"
9524 fi
9525 rm -f conftest*
9526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9527   echo "$ac_t""yes" 1>&6
9528   { test "$extra_verbose" = "yes" && cat << \EOF
9529     Defining HAVE_VFORK_H
9530 EOF
9531 cat >> confdefs.h <<\EOF
9532 #define HAVE_VFORK_H 1
9533 EOF
9534 }
9535
9536 else
9537   echo "$ac_t""no" 1>&6
9538 fi
9539
9540 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9541 echo "configure:9542: checking for working vfork" >&5
9542
9543 cat > conftest.$ac_ext <<EOF
9544 #line 9545 "configure"
9545 #include "confdefs.h"
9546 /* Thanks to Paul Eggert for this test.  */
9547 #include <stdio.h>
9548 #include <sys/types.h>
9549 #include <sys/stat.h>
9550 #ifdef HAVE_UNISTD_H
9551 #include <unistd.h>
9552 #endif
9553 #ifdef HAVE_VFORK_H
9554 #include <vfork.h>
9555 #endif
9556 /* On some sparc systems, changes by the child to local and incoming
9557    argument registers are propagated back to the parent.
9558    The compiler is told about this with #include <vfork.h>,
9559    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9560    Test for this by using a static variable whose address
9561    is put into a register that is clobbered by the vfork.  */
9562 static
9563 #ifdef __cplusplus
9564 sparc_address_test (int arg)
9565 #else
9566 sparc_address_test (arg) int arg;
9567 #endif
9568 {
9569   static pid_t child;
9570   if (!child) {
9571     child = vfork ();
9572     if (child < 0) {
9573       perror ("vfork");
9574       _exit(2);
9575     }
9576     if (!child) {
9577       arg = getpid();
9578       write(-1, "", 0);
9579       _exit (arg);
9580     }
9581   }
9582 }
9583 main() {
9584   pid_t parent = getpid ();
9585   pid_t child;
9586
9587   sparc_address_test ();
9588
9589   child = vfork ();
9590
9591   if (child == 0) {
9592     /* Here is another test for sparc vfork register problems.
9593        This test uses lots of local variables, at least
9594        as many local variables as main has allocated so far
9595        including compiler temporaries.  4 locals are enough for
9596        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9597        A buggy compiler should reuse the register of parent
9598        for one of the local variables, since it will think that
9599        parent can't possibly be used any more in this routine.
9600        Assigning to the local variable will thus munge parent
9601        in the parent process.  */
9602     pid_t
9603       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9604       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9605     /* Convince the compiler that p..p7 are live; otherwise, it might
9606        use the same hardware register for all 8 local variables.  */
9607     if (p != p1 || p != p2 || p != p3 || p != p4
9608         || p != p5 || p != p6 || p != p7)
9609       _exit(1);
9610
9611     /* On some systems (e.g. IRIX 3.3),
9612        vfork doesn't separate parent from child file descriptors.
9613        If the child closes a descriptor before it execs or exits,
9614        this munges the parent's descriptor as well.
9615        Test for this by closing stdout in the child.  */
9616     _exit(close(fileno(stdout)) != 0);
9617   } else {
9618     int status;
9619     struct stat st;
9620
9621     while (wait(&status) != child)
9622       ;
9623     exit(
9624          /* Was there some problem with vforking?  */
9625          child < 0
9626
9627          /* Did the child fail?  (This shouldn't happen.)  */
9628          || status
9629
9630          /* Did the vfork/compiler bug occur?  */
9631          || parent != getpid()
9632
9633          /* Did the file descriptor bug occur?  */
9634          || fstat(fileno(stdout), &st) != 0
9635          );
9636   }
9637 }
9638 EOF
9639 if { (eval echo configure:9640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9640 then
9641   ac_cv_func_vfork_works=yes
9642 else
9643   conftest_rc="$?"
9644   echo "configure: failed program was:" >&5
9645   cat conftest.$ac_ext >&5
9646   rm -fr conftest*
9647   ac_cv_func_vfork_works=no
9648 fi
9649 rm -fr conftest*
9650
9651 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9652 if test $ac_cv_func_vfork_works = no; then
9653   { test "$extra_verbose" = "yes" && cat << \EOF
9654     Defining vfork = fork
9655 EOF
9656 cat >> confdefs.h <<\EOF
9657 #define vfork fork
9658 EOF
9659 }
9660
9661 fi
9662
9663
9664 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
9665 echo "configure:9666: checking for working strcoll" >&5
9666
9667 cat > conftest.$ac_ext <<EOF
9668 #line 9669 "configure"
9669 #include "confdefs.h"
9670 #include <string.h>
9671 main ()
9672 {
9673   exit (strcoll ("abc", "def") >= 0 ||
9674         strcoll ("ABC", "DEF") >= 0 ||
9675         strcoll ("123", "456") >= 0);
9676 }
9677 EOF
9678 if { (eval echo configure:9679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9679 then
9680   ac_cv_func_strcoll_works=yes
9681 else
9682   conftest_rc="$?"
9683   echo "configure: failed program was:" >&5
9684   cat conftest.$ac_ext >&5
9685   rm -fr conftest*
9686   ac_cv_func_strcoll_works=no
9687 fi
9688 rm -fr conftest*
9689
9690 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
9691 if test $ac_cv_func_strcoll_works = yes; then
9692   { test "$extra_verbose" = "yes" && cat << \EOF
9693     Defining HAVE_STRCOLL
9694 EOF
9695 cat >> confdefs.h <<\EOF
9696 #define HAVE_STRCOLL 1
9697 EOF
9698 }
9699
9700 fi
9701
9702
9703 for ac_func in getpgrp
9704 do
9705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9706 echo "configure:9707: checking for $ac_func" >&5
9707
9708 cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 /* System header to define __stub macros and hopefully few prototypes,
9712     which can conflict with char $ac_func(); below.  */
9713 #include <assert.h>
9714 /* Override any gcc2 internal prototype to avoid an error.  */
9715 /* We use char because int might match the return type of a gcc2
9716     builtin and then its argument prototype would still apply.  */
9717 char $ac_func();
9718
9719 int main() {
9720
9721 /* The GNU C library defines this for functions which it implements
9722     to always fail with ENOSYS.  Some functions are actually named
9723     something starting with __ and the normal name is an alias.  */
9724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9725 choke me
9726 #else
9727 $ac_func();
9728 #endif
9729
9730 ; return 0; }
9731 EOF
9732 if { (eval echo configure:9733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9733   rm -rf conftest*
9734   eval "ac_cv_func_$ac_func=yes"
9735 else
9736   echo "configure: failed program was:" >&5
9737   cat conftest.$ac_ext >&5
9738   rm -rf conftest*
9739   eval "ac_cv_func_$ac_func=no"
9740 fi
9741 rm -f conftest*
9742
9743 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9744   echo "$ac_t""yes" 1>&6
9745     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9746   { test "$extra_verbose" = "yes" && cat << EOF
9747     Defining $ac_tr_func
9748 EOF
9749 cat >> confdefs.h <<EOF
9750 #define $ac_tr_func 1
9751 EOF
9752 }
9753  
9754 else
9755   echo "$ac_t""no" 1>&6
9756 fi
9757 done
9758
9759 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
9760 echo "configure:9761: checking whether getpgrp takes no argument" >&5
9761
9762 cat > conftest.$ac_ext <<EOF
9763 #line 9764 "configure"
9764 #include "confdefs.h"
9765
9766 /*
9767  * If this system has a BSD-style getpgrp(),
9768  * which takes a pid argument, exit unsuccessfully.
9769  *
9770  * Snarfed from Chet Ramey's bash pgrp.c test program
9771  */
9772 #include <stdio.h>
9773 #include <sys/types.h>
9774
9775 int     pid;
9776 int     pg1, pg2, pg3, pg4;
9777 int     ng, np, s, child;
9778
9779 main()
9780 {
9781         pid = getpid();
9782         pg1 = getpgrp(0);
9783         pg2 = getpgrp();
9784         pg3 = getpgrp(pid);
9785         pg4 = getpgrp(1);
9786
9787         /*
9788          * If all of these values are the same, it's pretty sure that
9789          * we're on a system that ignores getpgrp's first argument.
9790          */
9791         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
9792                 exit(0);
9793
9794         child = fork();
9795         if (child < 0)
9796                 exit(1);
9797         else if (child == 0) {
9798                 np = getpid();
9799                 /*
9800                  * If this is Sys V, this will not work; pgrp will be
9801                  * set to np because setpgrp just changes a pgrp to be
9802                  * the same as the pid.
9803                  */
9804                 setpgrp(np, pg1);
9805                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
9806                 if (ng == pg1) {
9807                         exit(1);
9808                 } else {
9809                         exit(0);
9810                 }
9811         } else {
9812                 wait(&s);
9813                 exit(s>>8);
9814         }
9815 }
9816
9817 EOF
9818 if { (eval echo configure:9819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9819 then
9820   ac_cv_func_getpgrp_void=yes
9821 else
9822   conftest_rc="$?"
9823   echo "configure: failed program was:" >&5
9824   cat conftest.$ac_ext >&5
9825   rm -fr conftest*
9826   ac_cv_func_getpgrp_void=no
9827 fi
9828 rm -fr conftest*
9829
9830
9831 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
9832 if test $ac_cv_func_getpgrp_void = yes; then
9833   { test "$extra_verbose" = "yes" && cat << \EOF
9834     Defining GETPGRP_VOID
9835 EOF
9836 cat >> confdefs.h <<\EOF
9837 #define GETPGRP_VOID 1
9838 EOF
9839 }
9840
9841 fi
9842
9843
9844 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9845 echo "configure:9846: checking for working mmap" >&5
9846 case "$opsys" in ultrix* ) have_mmap=no ;; *)
9847 cat > conftest.$ac_ext <<EOF
9848 #line 9849 "configure"
9849 #include "confdefs.h"
9850 #include <stdio.h>
9851 #include <unistd.h>
9852 #include <fcntl.h>
9853 #include <sys/mman.h>
9854
9855 #ifndef MAP_VARIABLE
9856 #define MAP_VARIABLE 0
9857 #endif
9858
9859 #ifndef MAP_FAILED
9860 #define MAP_FAILED -1
9861 #endif
9862
9863 int main (int argc, char *argv[])
9864 {
9865   int fd = -1;
9866   caddr_t p;
9867 #ifndef MAP_ANONYMOUS
9868   fd = open ("/dev/zero", O_RDWR);
9869   if (fd < 0)
9870     return 1;
9871 #define MAP_ANONYMOUS 0
9872 #endif
9873   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
9874            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
9875            fd, 0) != (void *) MAP_FAILED)
9876     return 0;
9877   perror ("conftest: mmap failed");
9878   return 1;
9879 }
9880 EOF
9881 if { (eval echo configure:9882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9882 then
9883   have_mmap=yes
9884 else
9885   conftest_rc="$?"
9886   echo "configure: failed program was:" >&5
9887   cat conftest.$ac_ext >&5
9888   rm -fr conftest*
9889   have_mmap=no
9890 fi
9891 rm -fr conftest* ;;
9892 esac
9893 echo "$ac_t""$have_mmap" 1>&6
9894 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9895     Defining HAVE_MMAP
9896 EOF
9897 cat >> confdefs.h <<\EOF
9898 #define HAVE_MMAP 1
9899 EOF
9900 }
9901
9902 for ac_hdr in unistd.h
9903 do
9904 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9905 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9906 echo "configure:9907: checking for $ac_hdr" >&5
9907
9908 cat > conftest.$ac_ext <<EOF
9909 #line 9910 "configure"
9910 #include "confdefs.h"
9911 #include <$ac_hdr>
9912 EOF
9913 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9914 { (eval echo configure:9915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9915 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9916 if test -z "$ac_err"; then
9917   rm -rf conftest*
9918   eval "ac_cv_header_$ac_safe=yes"
9919 else
9920   echo "$ac_err" >&5
9921   echo "configure: failed program was:" >&5
9922   cat conftest.$ac_ext >&5
9923   rm -rf conftest*
9924   eval "ac_cv_header_$ac_safe=no"
9925 fi
9926 rm -f conftest*
9927 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9928   echo "$ac_t""yes" 1>&6
9929     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9930   { test "$extra_verbose" = "yes" && cat << EOF
9931     Defining $ac_tr_hdr
9932 EOF
9933 cat >> confdefs.h <<EOF
9934 #define $ac_tr_hdr 1
9935 EOF
9936 }
9937  
9938 else
9939   echo "$ac_t""no" 1>&6
9940 fi
9941 done
9942
9943 for ac_func in getpagesize
9944 do
9945 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9946 echo "configure:9947: checking for $ac_func" >&5
9947
9948 cat > conftest.$ac_ext <<EOF
9949 #line 9950 "configure"
9950 #include "confdefs.h"
9951 /* System header to define __stub macros and hopefully few prototypes,
9952     which can conflict with char $ac_func(); below.  */
9953 #include <assert.h>
9954 /* Override any gcc2 internal prototype to avoid an error.  */
9955 /* We use char because int might match the return type of a gcc2
9956     builtin and then its argument prototype would still apply.  */
9957 char $ac_func();
9958
9959 int main() {
9960
9961 /* The GNU C library defines this for functions which it implements
9962     to always fail with ENOSYS.  Some functions are actually named
9963     something starting with __ and the normal name is an alias.  */
9964 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9965 choke me
9966 #else
9967 $ac_func();
9968 #endif
9969
9970 ; return 0; }
9971 EOF
9972 if { (eval echo configure:9973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9973   rm -rf conftest*
9974   eval "ac_cv_func_$ac_func=yes"
9975 else
9976   echo "configure: failed program was:" >&5
9977   cat conftest.$ac_ext >&5
9978   rm -rf conftest*
9979   eval "ac_cv_func_$ac_func=no"
9980 fi
9981 rm -f conftest*
9982
9983 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9984   echo "$ac_t""yes" 1>&6
9985     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9986   { test "$extra_verbose" = "yes" && cat << EOF
9987     Defining $ac_tr_func
9988 EOF
9989 cat >> confdefs.h <<EOF
9990 #define $ac_tr_func 1
9991 EOF
9992 }
9993  
9994 else
9995   echo "$ac_t""no" 1>&6
9996 fi
9997 done
9998
9999 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10000 echo "configure:10001: checking for working mmap" >&5
10001
10002 cat > conftest.$ac_ext <<EOF
10003 #line 10004 "configure"
10004 #include "confdefs.h"
10005
10006 /* Thanks to Mike Haertel and Jim Avera for this test.
10007    Here is a matrix of mmap possibilities:
10008         mmap private not fixed
10009         mmap private fixed at somewhere currently unmapped
10010         mmap private fixed at somewhere already mapped
10011         mmap shared not fixed
10012         mmap shared fixed at somewhere currently unmapped
10013         mmap shared fixed at somewhere already mapped
10014    For private mappings, we should verify that changes cannot be read()
10015    back from the file, nor mmap's back from the file at a different
10016    address.  (There have been systems where private was not correctly
10017    implemented like the infamous i386 svr4.0, and systems where the
10018    VM page cache was not coherent with the filesystem buffer cache
10019    like early versions of FreeBSD and possibly contemporary NetBSD.)
10020    For shared mappings, we should conversely verify that changes get
10021    propogated back to all the places they're supposed to be.
10022
10023    Grep wants private fixed already mapped.
10024    The main things grep needs to know about mmap are:
10025    * does it exist and is it safe to write into the mmap'd area
10026    * how to use it (BSD variants)  */
10027 #include <sys/types.h>
10028 #include <fcntl.h>
10029 #include <sys/mman.h>
10030
10031 /* This mess was copied from the GNU getpagesize.h.  */
10032 #ifndef HAVE_GETPAGESIZE
10033 # ifdef HAVE_UNISTD_H
10034 #  include <unistd.h>
10035 # endif
10036
10037 /* Assume that all systems that can run configure have sys/param.h.  */
10038 # ifndef HAVE_SYS_PARAM_H
10039 #  define HAVE_SYS_PARAM_H 1
10040 # endif
10041
10042 # ifdef _SC_PAGESIZE
10043 #  define getpagesize() sysconf(_SC_PAGESIZE)
10044 # else /* no _SC_PAGESIZE */
10045 #  ifdef HAVE_SYS_PARAM_H
10046 #   include <sys/param.h>
10047 #   ifdef EXEC_PAGESIZE
10048 #    define getpagesize() EXEC_PAGESIZE
10049 #   else /* no EXEC_PAGESIZE */
10050 #    ifdef NBPG
10051 #     define getpagesize() NBPG * CLSIZE
10052 #     ifndef CLSIZE
10053 #      define CLSIZE 1
10054 #     endif /* no CLSIZE */
10055 #    else /* no NBPG */
10056 #     ifdef NBPC
10057 #      define getpagesize() NBPC
10058 #     else /* no NBPC */
10059 #      ifdef PAGESIZE
10060 #       define getpagesize() PAGESIZE
10061 #      endif /* PAGESIZE */
10062 #     endif /* no NBPC */
10063 #    endif /* no NBPG */
10064 #   endif /* no EXEC_PAGESIZE */
10065 #  else /* no HAVE_SYS_PARAM_H */
10066 #   define getpagesize() 8192   /* punt totally */
10067 #  endif /* no HAVE_SYS_PARAM_H */
10068 # endif /* no _SC_PAGESIZE */
10069
10070 #endif /* no HAVE_GETPAGESIZE */
10071
10072 #ifdef __cplusplus
10073 extern "C" { void *malloc(unsigned); }
10074 #else
10075 char *malloc();
10076 #endif
10077
10078 int
10079 main()
10080 {
10081         char *data, *data2, *data3;
10082         int i, pagesize;
10083         int fd;
10084
10085         pagesize = getpagesize();
10086
10087         /*
10088          * First, make a file with some known garbage in it.
10089          */
10090         data = malloc(pagesize);
10091         if (!data)
10092                 exit(1);
10093         for (i = 0; i < pagesize; ++i)
10094                 *(data + i) = rand();
10095         umask(0);
10096         fd = creat("conftestmmap", 0600);
10097         if (fd < 0)
10098                 exit(1);
10099         if (write(fd, data, pagesize) != pagesize)
10100                 exit(1);
10101         close(fd);
10102
10103         /*
10104          * Next, try to mmap the file at a fixed address which
10105          * already has something else allocated at it.  If we can,
10106          * also make sure that we see the same garbage.
10107          */
10108         fd = open("conftestmmap", O_RDWR);
10109         if (fd < 0)
10110                 exit(1);
10111         data2 = malloc(2 * pagesize);
10112         if (!data2)
10113                 exit(1);
10114         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
10115         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
10116             MAP_PRIVATE | MAP_FIXED, fd, 0L))
10117                 exit(1);
10118         for (i = 0; i < pagesize; ++i)
10119                 if (*(data + i) != *(data2 + i))
10120                         exit(1);
10121
10122         /*
10123          * Finally, make sure that changes to the mapped area
10124          * do not percolate back to the file as seen by read().
10125          * (This is a bug on some variants of i386 svr4.0.)
10126          */
10127         for (i = 0; i < pagesize; ++i)
10128                 *(data2 + i) = *(data2 + i) + 1;
10129         data3 = malloc(pagesize);
10130         if (!data3)
10131                 exit(1);
10132         if (read(fd, data3, pagesize) != pagesize)
10133                 exit(1);
10134         for (i = 0; i < pagesize; ++i)
10135                 if (*(data + i) != *(data3 + i))
10136                         exit(1);
10137         close(fd);
10138         unlink("conftestmmap");
10139         exit(0);
10140 }
10141
10142 EOF
10143 if { (eval echo configure:10144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10144 then
10145   ac_cv_func_mmap_fixed_mapped=yes
10146 else
10147   conftest_rc="$?"
10148   echo "configure: failed program was:" >&5
10149   cat conftest.$ac_ext >&5
10150   rm -fr conftest*
10151   ac_cv_func_mmap_fixed_mapped=no
10152 fi
10153 rm -fr conftest*
10154
10155 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
10156 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10157   { test "$extra_verbose" = "yes" && cat << \EOF
10158     Defining HAVE_MMAP
10159 EOF
10160 cat >> confdefs.h <<\EOF
10161 #define HAVE_MMAP 1
10162 EOF
10163 }
10164
10165 fi
10166
10167
10168 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10169 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10170 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10171     Defining REL_ALLOC
10172 EOF
10173 cat >> confdefs.h <<\EOF
10174 #define REL_ALLOC 1
10175 EOF
10176 }
10177
10178
10179 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10180 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10181 echo "configure:10182: checking for termios.h" >&5
10182
10183 cat > conftest.$ac_ext <<EOF
10184 #line 10185 "configure"
10185 #include "confdefs.h"
10186 #include <termios.h>
10187 EOF
10188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10189 { (eval echo configure:10190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10191 if test -z "$ac_err"; then
10192   rm -rf conftest*
10193   eval "ac_cv_header_$ac_safe=yes"
10194 else
10195   echo "$ac_err" >&5
10196   echo "configure: failed program was:" >&5
10197   cat conftest.$ac_ext >&5
10198   rm -rf conftest*
10199   eval "ac_cv_header_$ac_safe=no"
10200 fi
10201 rm -f conftest*
10202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10203   echo "$ac_t""yes" 1>&6
10204   { test "$extra_verbose" = "yes" && cat << \EOF
10205     Defining HAVE_TERMIOS
10206 EOF
10207 cat >> confdefs.h <<\EOF
10208 #define HAVE_TERMIOS 1
10209 EOF
10210 }
10211
10212   { test "$extra_verbose" = "yes" && cat << \EOF
10213     Defining SIGNALS_VIA_CHARACTERS
10214 EOF
10215 cat >> confdefs.h <<\EOF
10216 #define SIGNALS_VIA_CHARACTERS 1
10217 EOF
10218 }
10219
10220   { test "$extra_verbose" = "yes" && cat << \EOF
10221     Defining NO_TERMIO
10222 EOF
10223 cat >> confdefs.h <<\EOF
10224 #define NO_TERMIO 1
10225 EOF
10226 }
10227
10228 else
10229   echo "$ac_t""no" 1>&6
10230 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10231 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10232 echo "configure:10233: checking for termio.h" >&5
10233
10234 cat > conftest.$ac_ext <<EOF
10235 #line 10236 "configure"
10236 #include "confdefs.h"
10237 #include <termio.h>
10238 EOF
10239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10240 { (eval echo configure:10241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10242 if test -z "$ac_err"; then
10243   rm -rf conftest*
10244   eval "ac_cv_header_$ac_safe=yes"
10245 else
10246   echo "$ac_err" >&5
10247   echo "configure: failed program was:" >&5
10248   cat conftest.$ac_ext >&5
10249   rm -rf conftest*
10250   eval "ac_cv_header_$ac_safe=no"
10251 fi
10252 rm -f conftest*
10253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10254   echo "$ac_t""yes" 1>&6
10255   { test "$extra_verbose" = "yes" && cat << \EOF
10256     Defining HAVE_TERMIO
10257 EOF
10258 cat >> confdefs.h <<\EOF
10259 #define HAVE_TERMIO 1
10260 EOF
10261 }
10262
10263 else
10264   echo "$ac_t""no" 1>&6
10265 fi
10266
10267 fi
10268
10269
10270
10271 echo $ac_n "checking for socket""... $ac_c" 1>&6
10272 echo "configure:10273: checking for socket" >&5
10273
10274 cat > conftest.$ac_ext <<EOF
10275 #line 10276 "configure"
10276 #include "confdefs.h"
10277 /* System header to define __stub macros and hopefully few prototypes,
10278     which can conflict with char socket(); below.  */
10279 #include <assert.h>
10280 /* Override any gcc2 internal prototype to avoid an error.  */
10281 /* We use char because int might match the return type of a gcc2
10282     builtin and then its argument prototype would still apply.  */
10283 char socket();
10284
10285 int main() {
10286
10287 /* The GNU C library defines this for functions which it implements
10288     to always fail with ENOSYS.  Some functions are actually named
10289     something starting with __ and the normal name is an alias.  */
10290 #if defined (__stub_socket) || defined (__stub___socket)
10291 choke me
10292 #else
10293 socket();
10294 #endif
10295
10296 ; return 0; }
10297 EOF
10298 if { (eval echo configure:10299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10299   rm -rf conftest*
10300   eval "ac_cv_func_socket=yes"
10301 else
10302   echo "configure: failed program was:" >&5
10303   cat conftest.$ac_ext >&5
10304   rm -rf conftest*
10305   eval "ac_cv_func_socket=no"
10306 fi
10307 rm -f conftest*
10308
10309 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10310   echo "$ac_t""yes" 1>&6
10311   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10312 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10313 echo "configure:10314: checking for netinet/in.h" >&5
10314
10315 cat > conftest.$ac_ext <<EOF
10316 #line 10317 "configure"
10317 #include "confdefs.h"
10318 #include <netinet/in.h>
10319 EOF
10320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10321 { (eval echo configure:10322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10323 if test -z "$ac_err"; then
10324   rm -rf conftest*
10325   eval "ac_cv_header_$ac_safe=yes"
10326 else
10327   echo "$ac_err" >&5
10328   echo "configure: failed program was:" >&5
10329   cat conftest.$ac_ext >&5
10330   rm -rf conftest*
10331   eval "ac_cv_header_$ac_safe=no"
10332 fi
10333 rm -f conftest*
10334 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10335   echo "$ac_t""yes" 1>&6
10336   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10337 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10338 echo "configure:10339: checking for arpa/inet.h" >&5
10339
10340 cat > conftest.$ac_ext <<EOF
10341 #line 10342 "configure"
10342 #include "confdefs.h"
10343 #include <arpa/inet.h>
10344 EOF
10345 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10346 { (eval echo configure:10347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10347 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10348 if test -z "$ac_err"; then
10349   rm -rf conftest*
10350   eval "ac_cv_header_$ac_safe=yes"
10351 else
10352   echo "$ac_err" >&5
10353   echo "configure: failed program was:" >&5
10354   cat conftest.$ac_ext >&5
10355   rm -rf conftest*
10356   eval "ac_cv_header_$ac_safe=no"
10357 fi
10358 rm -f conftest*
10359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10360   echo "$ac_t""yes" 1>&6
10361   
10362   { test "$extra_verbose" = "yes" && cat << \EOF
10363     Defining HAVE_SOCKETS
10364 EOF
10365 cat >> confdefs.h <<\EOF
10366 #define HAVE_SOCKETS 1
10367 EOF
10368 }
10369
10370       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10371 echo "configure:10372: checking "for sun_len member in struct sockaddr_un"" >&5
10372       cat > conftest.$ac_ext <<EOF
10373 #line 10374 "configure"
10374 #include "confdefs.h"
10375
10376 #include <sys/types.h>
10377 #include <sys/socket.h>
10378 #include <sys/un.h>
10379       
10380 int main() {
10381 static struct sockaddr_un x; x.sun_len = 1;
10382 ; return 0; }
10383 EOF
10384 if { (eval echo configure:10385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10385   rm -rf conftest*
10386   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10387     Defining HAVE_SOCKADDR_SUN_LEN
10388 EOF
10389 cat >> confdefs.h <<\EOF
10390 #define HAVE_SOCKADDR_SUN_LEN 1
10391 EOF
10392 }
10393
10394 else
10395   echo "configure: failed program was:" >&5
10396   cat conftest.$ac_ext >&5
10397   rm -rf conftest*
10398   echo "$ac_t""no" 1>&6
10399 fi
10400 rm -f conftest*
10401       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10402 echo "configure:10403: checking "for ip_mreq struct in netinet/in.h"" >&5
10403       cat > conftest.$ac_ext <<EOF
10404 #line 10405 "configure"
10405 #include "confdefs.h"
10406
10407 #include <sys/types.h>
10408 #include <netinet/in.h>
10409       
10410 int main() {
10411 static struct ip_mreq x;
10412 ; return 0; }
10413 EOF
10414 if { (eval echo configure:10415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10415   rm -rf conftest*
10416   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10417     Defining HAVE_MULTICAST
10418 EOF
10419 cat >> confdefs.h <<\EOF
10420 #define HAVE_MULTICAST 1
10421 EOF
10422 }
10423
10424 else
10425   echo "configure: failed program was:" >&5
10426   cat conftest.$ac_ext >&5
10427   rm -rf conftest*
10428   echo "$ac_t""no" 1>&6
10429 fi
10430 rm -f conftest*
10431 else
10432   echo "$ac_t""no" 1>&6
10433 fi
10434
10435 else
10436   echo "$ac_t""no" 1>&6
10437 fi
10438
10439 else
10440   echo "$ac_t""no" 1>&6
10441 fi
10442
10443
10444 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10445 echo "configure:10446: checking for msgget" >&5
10446
10447 cat > conftest.$ac_ext <<EOF
10448 #line 10449 "configure"
10449 #include "confdefs.h"
10450 /* System header to define __stub macros and hopefully few prototypes,
10451     which can conflict with char msgget(); below.  */
10452 #include <assert.h>
10453 /* Override any gcc2 internal prototype to avoid an error.  */
10454 /* We use char because int might match the return type of a gcc2
10455     builtin and then its argument prototype would still apply.  */
10456 char msgget();
10457
10458 int main() {
10459
10460 /* The GNU C library defines this for functions which it implements
10461     to always fail with ENOSYS.  Some functions are actually named
10462     something starting with __ and the normal name is an alias.  */
10463 #if defined (__stub_msgget) || defined (__stub___msgget)
10464 choke me
10465 #else
10466 msgget();
10467 #endif
10468
10469 ; return 0; }
10470 EOF
10471 if { (eval echo configure:10472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10472   rm -rf conftest*
10473   eval "ac_cv_func_msgget=yes"
10474 else
10475   echo "configure: failed program was:" >&5
10476   cat conftest.$ac_ext >&5
10477   rm -rf conftest*
10478   eval "ac_cv_func_msgget=no"
10479 fi
10480 rm -f conftest*
10481
10482 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10483   echo "$ac_t""yes" 1>&6
10484   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10485 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10486 echo "configure:10487: checking for sys/ipc.h" >&5
10487
10488 cat > conftest.$ac_ext <<EOF
10489 #line 10490 "configure"
10490 #include "confdefs.h"
10491 #include <sys/ipc.h>
10492 EOF
10493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10494 { (eval echo configure:10495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10496 if test -z "$ac_err"; then
10497   rm -rf conftest*
10498   eval "ac_cv_header_$ac_safe=yes"
10499 else
10500   echo "$ac_err" >&5
10501   echo "configure: failed program was:" >&5
10502   cat conftest.$ac_ext >&5
10503   rm -rf conftest*
10504   eval "ac_cv_header_$ac_safe=no"
10505 fi
10506 rm -f conftest*
10507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10508   echo "$ac_t""yes" 1>&6
10509   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10510 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10511 echo "configure:10512: checking for sys/msg.h" >&5
10512
10513 cat > conftest.$ac_ext <<EOF
10514 #line 10515 "configure"
10515 #include "confdefs.h"
10516 #include <sys/msg.h>
10517 EOF
10518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10519 { (eval echo configure:10520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10521 if test -z "$ac_err"; then
10522   rm -rf conftest*
10523   eval "ac_cv_header_$ac_safe=yes"
10524 else
10525   echo "$ac_err" >&5
10526   echo "configure: failed program was:" >&5
10527   cat conftest.$ac_ext >&5
10528   rm -rf conftest*
10529   eval "ac_cv_header_$ac_safe=no"
10530 fi
10531 rm -f conftest*
10532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10533   echo "$ac_t""yes" 1>&6
10534   { test "$extra_verbose" = "yes" && cat << \EOF
10535     Defining HAVE_SYSVIPC
10536 EOF
10537 cat >> confdefs.h <<\EOF
10538 #define HAVE_SYSVIPC 1
10539 EOF
10540 }
10541
10542 else
10543   echo "$ac_t""no" 1>&6
10544 fi
10545
10546 else
10547   echo "$ac_t""no" 1>&6
10548 fi
10549
10550 else
10551   echo "$ac_t""no" 1>&6
10552 fi
10553
10554
10555 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10556 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10557 echo "configure:10558: checking for dirent.h" >&5
10558
10559 cat > conftest.$ac_ext <<EOF
10560 #line 10561 "configure"
10561 #include "confdefs.h"
10562 #include <dirent.h>
10563 EOF
10564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10565 { (eval echo configure:10566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10567 if test -z "$ac_err"; then
10568   rm -rf conftest*
10569   eval "ac_cv_header_$ac_safe=yes"
10570 else
10571   echo "$ac_err" >&5
10572   echo "configure: failed program was:" >&5
10573   cat conftest.$ac_ext >&5
10574   rm -rf conftest*
10575   eval "ac_cv_header_$ac_safe=no"
10576 fi
10577 rm -f conftest*
10578 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10579   echo "$ac_t""yes" 1>&6
10580   { test "$extra_verbose" = "yes" && cat << \EOF
10581     Defining SYSV_SYSTEM_DIR
10582 EOF
10583 cat >> confdefs.h <<\EOF
10584 #define SYSV_SYSTEM_DIR 1
10585 EOF
10586 }
10587
10588 else
10589   echo "$ac_t""no" 1>&6
10590 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
10591 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
10592 echo "configure:10593: checking for sys/dir.h" >&5
10593
10594 cat > conftest.$ac_ext <<EOF
10595 #line 10596 "configure"
10596 #include "confdefs.h"
10597 #include <sys/dir.h>
10598 EOF
10599 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10600 { (eval echo configure:10601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10601 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10602 if test -z "$ac_err"; then
10603   rm -rf conftest*
10604   eval "ac_cv_header_$ac_safe=yes"
10605 else
10606   echo "$ac_err" >&5
10607   echo "configure: failed program was:" >&5
10608   cat conftest.$ac_ext >&5
10609   rm -rf conftest*
10610   eval "ac_cv_header_$ac_safe=no"
10611 fi
10612 rm -f conftest*
10613 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10614   echo "$ac_t""yes" 1>&6
10615   :
10616 else
10617   echo "$ac_t""no" 1>&6
10618 { test "$extra_verbose" = "yes" && cat << \EOF
10619     Defining NONSYSTEM_DIR_LIBRARY
10620 EOF
10621 cat >> confdefs.h <<\EOF
10622 #define NONSYSTEM_DIR_LIBRARY 1
10623 EOF
10624 }
10625
10626 fi
10627
10628 fi
10629
10630
10631 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
10632 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
10633 echo "configure:10634: checking for nlist.h" >&5
10634
10635 cat > conftest.$ac_ext <<EOF
10636 #line 10637 "configure"
10637 #include "confdefs.h"
10638 #include <nlist.h>
10639 EOF
10640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10641 { (eval echo configure:10642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10643 if test -z "$ac_err"; then
10644   rm -rf conftest*
10645   eval "ac_cv_header_$ac_safe=yes"
10646 else
10647   echo "$ac_err" >&5
10648   echo "configure: failed program was:" >&5
10649   cat conftest.$ac_ext >&5
10650   rm -rf conftest*
10651   eval "ac_cv_header_$ac_safe=no"
10652 fi
10653 rm -f conftest*
10654 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10655   echo "$ac_t""yes" 1>&6
10656   { test "$extra_verbose" = "yes" && cat << \EOF
10657     Defining NLIST_STRUCT
10658 EOF
10659 cat >> confdefs.h <<\EOF
10660 #define NLIST_STRUCT 1
10661 EOF
10662 }
10663
10664 else
10665   echo "$ac_t""no" 1>&6
10666 fi
10667
10668
10669
10670 echo "checking "for sound support"" 1>&6
10671 echo "configure:10672: checking "for sound support"" >&5
10672 case "$with_sound" in
10673   native | both ) with_native_sound=yes;;
10674   nas    | no   ) with_native_sound=no;;
10675 esac
10676 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
10677
10678 if test "$with_native_sound" != "no"; then
10679     if test -n "$native_sound_lib"; then
10680     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
10681 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
10682 echo "configure:10683: checking for multimedia/audio_device.h" >&5
10683
10684 cat > conftest.$ac_ext <<EOF
10685 #line 10686 "configure"
10686 #include "confdefs.h"
10687 #include <multimedia/audio_device.h>
10688 EOF
10689 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10690 { (eval echo configure:10691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10691 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10692 if test -z "$ac_err"; then
10693   rm -rf conftest*
10694   eval "ac_cv_header_$ac_safe=yes"
10695 else
10696   echo "$ac_err" >&5
10697   echo "configure: failed program was:" >&5
10698   cat conftest.$ac_ext >&5
10699   rm -rf conftest*
10700   eval "ac_cv_header_$ac_safe=no"
10701 fi
10702 rm -f conftest*
10703 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10704   echo "$ac_t""yes" 1>&6
10705   sound_found=yes sound_cflags=""
10706       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10707    echo "    xemacs will be linked with \"sunplay.o\""
10708  fi
10709 else
10710   echo "$ac_t""no" 1>&6
10711 fi
10712
10713   fi
10714
10715     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
10716     sound_found=yes
10717     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10718    echo "    xemacs will be linked with \"sunplay.o\""
10719  fi
10720     if test -d "/usr/demo/SOUND/include"
10721       then sound_cflags="-I/usr/demo/SOUND/include"
10722       else sound_cflags="-I/usr/demo/SOUND"
10723     fi
10724     if test -z "$native_sound_lib" ; then
10725       if test -r "/usr/demo/SOUND/lib/libaudio.a"
10726         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
10727         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
10728       fi
10729     fi
10730   fi
10731
10732     if test -z "$sound_found"; then
10733     case "$canonical" in
10734     *-sgi-* )
10735       if test -z "$native_sound_lib"; then
10736         
10737 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
10738 echo "configure:10739: checking for ALopenport in -laudio" >&5
10739 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
10740
10741 xe_check_libs=" -laudio "
10742 cat > conftest.$ac_ext <<EOF
10743 #line 10744 "configure"
10744 #include "confdefs.h"
10745 /* Override any gcc2 internal prototype to avoid an error.  */
10746 /* We use char because int might match the return type of a gcc2
10747     builtin and then its argument prototype would still apply.  */
10748 char ALopenport();
10749
10750 int main() {
10751 ALopenport()
10752 ; return 0; }
10753 EOF
10754 if { (eval echo configure:10755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10755   rm -rf conftest*
10756   eval "ac_cv_lib_$ac_lib_var=yes"
10757 else
10758   echo "configure: failed program was:" >&5
10759   cat conftest.$ac_ext >&5
10760   rm -rf conftest*
10761   eval "ac_cv_lib_$ac_lib_var=no"
10762 fi
10763 rm -f conftest*
10764 xe_check_libs=""
10765
10766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10767   echo "$ac_t""yes" 1>&6
10768   native_sound_lib="-laudio"
10769 else
10770   echo "$ac_t""no" 1>&6
10771 fi
10772
10773
10774       fi
10775       if test -n "$native_sound_lib"; then
10776         sound_found=yes sound_cflags=""
10777         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
10778    echo "    xemacs will be linked with \"sgiplay.o\""
10779  fi
10780       fi ;;
10781     hppa*-hp-hpux* )
10782       if test -z "$native_sound_lib"; then
10783         
10784 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
10785 echo "configure:10786: checking for AOpenAudio in -lAlib" >&5
10786 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
10787
10788 xe_check_libs=" -lAlib "
10789 cat > conftest.$ac_ext <<EOF
10790 #line 10791 "configure"
10791 #include "confdefs.h"
10792 /* Override any gcc2 internal prototype to avoid an error.  */
10793 /* We use char because int might match the return type of a gcc2
10794     builtin and then its argument prototype would still apply.  */
10795 char AOpenAudio();
10796
10797 int main() {
10798 AOpenAudio()
10799 ; return 0; }
10800 EOF
10801 if { (eval echo configure:10802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10802   rm -rf conftest*
10803   eval "ac_cv_lib_$ac_lib_var=yes"
10804 else
10805   echo "configure: failed program was:" >&5
10806   cat conftest.$ac_ext >&5
10807   rm -rf conftest*
10808   eval "ac_cv_lib_$ac_lib_var=no"
10809 fi
10810 rm -f conftest*
10811 xe_check_libs=""
10812
10813 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10814   echo "$ac_t""yes" 1>&6
10815   native_sound_lib="-lAlib"
10816 else
10817   echo "$ac_t""no" 1>&6
10818 fi
10819
10820
10821       fi
10822       if test -n "$native_sound_lib"; then
10823         sound_found=yes
10824         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
10825    echo "    xemacs will be linked with \"hpplay.o\""
10826  fi
10827         if test "$GCC" = "yes" # Kludge city
10828           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
10829           else sound_cflags="+e -I/usr/audio/examples"
10830         fi
10831       fi ;;
10832     esac
10833   fi
10834
10835     if test -z "$sound_found"; then
10836     for dir in "machine" "sys" "linux"; do
10837       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
10838 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
10839 echo "configure:10840: checking for ${dir}/soundcard.h" >&5
10840
10841 cat > conftest.$ac_ext <<EOF
10842 #line 10843 "configure"
10843 #include "confdefs.h"
10844 #include <${dir}/soundcard.h>
10845 EOF
10846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10847 { (eval echo configure:10848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10849 if test -z "$ac_err"; then
10850   rm -rf conftest*
10851   eval "ac_cv_header_$ac_safe=yes"
10852 else
10853   echo "$ac_err" >&5
10854   echo "configure: failed program was:" >&5
10855   cat conftest.$ac_ext >&5
10856   rm -rf conftest*
10857   eval "ac_cv_header_$ac_safe=no"
10858 fi
10859 rm -f conftest*
10860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10861   echo "$ac_t""yes" 1>&6
10862   sound_found=yes
10863         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
10864    echo "    xemacs will be linked with \"linuxplay.o\""
10865  fi
10866         { test "$extra_verbose" = "yes" && cat << EOF
10867     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
10868 EOF
10869 cat >> confdefs.h <<EOF
10870 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
10871 EOF
10872 }
10873
10874         break
10875 else
10876   echo "$ac_t""no" 1>&6
10877 fi
10878
10879     done
10880   fi
10881
10882   test "$sound_found" = "yes" && with_native_sound=yes
10883 fi
10884
10885 if test -z "$with_sound"; then
10886   if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then
10887     with_sound=native
10888   fi
10889 fi
10890
10891 if test "$with_native_sound" = "yes"; then
10892   { test "$extra_verbose" = "yes" && cat << \EOF
10893     Defining HAVE_NATIVE_SOUND
10894 EOF
10895 cat >> confdefs.h <<\EOF
10896 #define HAVE_NATIVE_SOUND 1
10897 EOF
10898 }
10899
10900   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
10901 fi
10902
10903 case "$with_sound" in both | nas )
10904   { test "$extra_verbose" = "yes" && cat << \EOF
10905     Defining HAVE_NAS_SOUND
10906 EOF
10907 cat >> confdefs.h <<\EOF
10908 #define HAVE_NAS_SOUND 1
10909 EOF
10910 }
10911
10912   extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
10913    echo "    xemacs will be linked with \"nas.o\""
10914  fi
10915   libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
10916       cat > conftest.$ac_ext <<EOF
10917 #line 10918 "configure"
10918 #include "confdefs.h"
10919 #include <audio/Xtutil.h>
10920 EOF
10921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10922   egrep "AuXtErrorJump" >/dev/null 2>&1; then
10923   :
10924 else
10925   rm -rf conftest*
10926   { test "$extra_verbose" = "yes" && cat << \EOF
10927     Defining NAS_NO_ERROR_JUMP
10928 EOF
10929 cat >> confdefs.h <<\EOF
10930 #define NAS_NO_ERROR_JUMP 1
10931 EOF
10932 }
10933
10934 fi
10935 rm -f conftest*
10936
10937 esac
10938
10939
10940 test -z "$with_tty" && with_tty=yes
10941
10942 if test "$with_tty" = "yes"  ; then
10943   echo "checking for TTY-related features" 1>&6
10944 echo "configure:10945: checking for TTY-related features" >&5
10945   { test "$extra_verbose" = "yes" && cat << \EOF
10946     Defining HAVE_TTY
10947 EOF
10948 cat >> confdefs.h <<\EOF
10949 #define HAVE_TTY 1
10950 EOF
10951 }
10952
10953   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
10954    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\""
10955  fi
10956
10957     if test -z "$with_ncurses"; then
10958     
10959 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
10960 echo "configure:10961: checking for tgetent in -lncurses" >&5
10961 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
10962
10963 xe_check_libs=" -lncurses "
10964 cat > conftest.$ac_ext <<EOF
10965 #line 10966 "configure"
10966 #include "confdefs.h"
10967 /* Override any gcc2 internal prototype to avoid an error.  */
10968 /* We use char because int might match the return type of a gcc2
10969     builtin and then its argument prototype would still apply.  */
10970 char tgetent();
10971
10972 int main() {
10973 tgetent()
10974 ; return 0; }
10975 EOF
10976 if { (eval echo configure:10977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10977   rm -rf conftest*
10978   eval "ac_cv_lib_$ac_lib_var=yes"
10979 else
10980   echo "configure: failed program was:" >&5
10981   cat conftest.$ac_ext >&5
10982   rm -rf conftest*
10983   eval "ac_cv_lib_$ac_lib_var=no"
10984 fi
10985 rm -f conftest*
10986 xe_check_libs=""
10987
10988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10989   echo "$ac_t""yes" 1>&6
10990   with_ncurses=yes
10991 else
10992   echo "$ac_t""no" 1>&6
10993 with_ncurses=no
10994 fi
10995
10996
10997   fi
10998   if test "$with_ncurses" = "yes"; then
10999     { test "$extra_verbose" = "yes" && cat << \EOF
11000     Defining HAVE_NCURSES
11001 EOF
11002 cat >> confdefs.h <<\EOF
11003 #define HAVE_NCURSES 1
11004 EOF
11005 }
11006
11007     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11008 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11009 echo "configure:11010: checking for ncurses/curses.h" >&5
11010
11011 cat > conftest.$ac_ext <<EOF
11012 #line 11013 "configure"
11013 #include "confdefs.h"
11014 #include <ncurses/curses.h>
11015 EOF
11016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11017 { (eval echo configure:11018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11019 if test -z "$ac_err"; then
11020   rm -rf conftest*
11021   eval "ac_cv_header_$ac_safe=yes"
11022 else
11023   echo "$ac_err" >&5
11024   echo "configure: failed program was:" >&5
11025   cat conftest.$ac_ext >&5
11026   rm -rf conftest*
11027   eval "ac_cv_header_$ac_safe=no"
11028 fi
11029 rm -f conftest*
11030 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11031   echo "$ac_t""yes" 1>&6
11032   curses_h_path=ncurses/curses.h
11033 else
11034   echo "$ac_t""no" 1>&6
11035 fi
11036
11037     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11038 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11039 echo "configure:11040: checking for ncurses/term.h" >&5
11040
11041 cat > conftest.$ac_ext <<EOF
11042 #line 11043 "configure"
11043 #include "confdefs.h"
11044 #include <ncurses/term.h>
11045 EOF
11046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11047 { (eval echo configure:11048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11049 if test -z "$ac_err"; then
11050   rm -rf conftest*
11051   eval "ac_cv_header_$ac_safe=yes"
11052 else
11053   echo "$ac_err" >&5
11054   echo "configure: failed program was:" >&5
11055   cat conftest.$ac_ext >&5
11056   rm -rf conftest*
11057   eval "ac_cv_header_$ac_safe=no"
11058 fi
11059 rm -f conftest*
11060 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11061   echo "$ac_t""yes" 1>&6
11062   term_h_path=ncurses/term.h
11063 else
11064   echo "$ac_t""no" 1>&6
11065 fi
11066
11067     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11068    echo "    xemacs will be linked with \"terminfo.o\""
11069  fi
11070     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11071
11072     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11073                         save_c_switch_site="$c_switch_site"
11074       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11075       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11076 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11077 echo "configure:11078: checking for ncurses/curses.h" >&5
11078
11079 cat > conftest.$ac_ext <<EOF
11080 #line 11081 "configure"
11081 #include "confdefs.h"
11082 #include <ncurses/curses.h>
11083 EOF
11084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11085 { (eval echo configure:11086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11087 if test -z "$ac_err"; then
11088   rm -rf conftest*
11089   eval "ac_cv_header_$ac_safe=yes"
11090 else
11091   echo "$ac_err" >&5
11092   echo "configure: failed program was:" >&5
11093   cat conftest.$ac_ext >&5
11094   rm -rf conftest*
11095   eval "ac_cv_header_$ac_safe=no"
11096 fi
11097 rm -f conftest*
11098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11099   echo "$ac_t""yes" 1>&6
11100   curses_h_path=ncurses/curses.h
11101 else
11102   echo "$ac_t""no" 1>&6
11103 fi
11104
11105       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11106         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11107         else c_switch_site="$save_c_switch_site"
11108       fi
11109     fi
11110   else         if test "$have_terminfo" = "yes"; then
11111       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11112    echo "    xemacs will be linked with \"terminfo.o\""
11113  fi
11114       if test -n "$libs_termcap"; then
11115         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11116       else
11117         for lib in curses termlib termcap; do
11118           
11119 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11120 echo "configure:11121: checking for tgetent in -l$lib" >&5
11121 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11122
11123 xe_check_libs=" -l$lib "
11124 cat > conftest.$ac_ext <<EOF
11125 #line 11126 "configure"
11126 #include "confdefs.h"
11127 /* Override any gcc2 internal prototype to avoid an error.  */
11128 /* We use char because int might match the return type of a gcc2
11129     builtin and then its argument prototype would still apply.  */
11130 char tgetent();
11131
11132 int main() {
11133 tgetent()
11134 ; return 0; }
11135 EOF
11136 if { (eval echo configure:11137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11137   rm -rf conftest*
11138   eval "ac_cv_lib_$ac_lib_var=yes"
11139 else
11140   echo "configure: failed program was:" >&5
11141   cat conftest.$ac_ext >&5
11142   rm -rf conftest*
11143   eval "ac_cv_lib_$ac_lib_var=no"
11144 fi
11145 rm -f conftest*
11146 xe_check_libs=""
11147
11148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11149   echo "$ac_t""yes" 1>&6
11150   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11151 else
11152   echo "$ac_t""no" 1>&6
11153 fi
11154
11155
11156         done
11157       fi
11158     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11159    echo "    xemacs will be linked with \"tparam.o\""
11160  fi
11161                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11162       if test -n "$libs_termcap"; then
11163         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11164       else
11165         
11166 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11167 echo "configure:11168: checking for tgetent in -lcurses" >&5
11168 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11169
11170 xe_check_libs=" -lcurses "
11171 cat > conftest.$ac_ext <<EOF
11172 #line 11173 "configure"
11173 #include "confdefs.h"
11174 /* Override any gcc2 internal prototype to avoid an error.  */
11175 /* We use char because int might match the return type of a gcc2
11176     builtin and then its argument prototype would still apply.  */
11177 char tgetent();
11178
11179 int main() {
11180 tgetent()
11181 ; return 0; }
11182 EOF
11183 if { (eval echo configure:11184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11184   rm -rf conftest*
11185   eval "ac_cv_lib_$ac_lib_var=yes"
11186 else
11187   echo "configure: failed program was:" >&5
11188   cat conftest.$ac_ext >&5
11189   rm -rf conftest*
11190   eval "ac_cv_lib_$ac_lib_var=no"
11191 fi
11192 rm -f conftest*
11193 xe_check_libs=""
11194
11195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11196   echo "$ac_t""yes" 1>&6
11197   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11198 else
11199   echo "$ac_t""no" 1>&6
11200 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11201 echo "configure:11202: checking for tgetent in -ltermcap" >&5
11202 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11203
11204 xe_check_libs=" -ltermcap "
11205 cat > conftest.$ac_ext <<EOF
11206 #line 11207 "configure"
11207 #include "confdefs.h"
11208 /* Override any gcc2 internal prototype to avoid an error.  */
11209 /* We use char because int might match the return type of a gcc2
11210     builtin and then its argument prototype would still apply.  */
11211 char tgetent();
11212
11213 int main() {
11214 tgetent()
11215 ; return 0; }
11216 EOF
11217 if { (eval echo configure:11218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11218   rm -rf conftest*
11219   eval "ac_cv_lib_$ac_lib_var=yes"
11220 else
11221   echo "configure: failed program was:" >&5
11222   cat conftest.$ac_ext >&5
11223   rm -rf conftest*
11224   eval "ac_cv_lib_$ac_lib_var=no"
11225 fi
11226 rm -f conftest*
11227 xe_check_libs=""
11228
11229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11230   echo "$ac_t""yes" 1>&6
11231   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11232 else
11233   echo "$ac_t""no" 1>&6
11234 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11235    echo "    xemacs will be linked with \"termcap.o\""
11236  fi
11237 fi
11238
11239
11240 fi
11241
11242
11243       fi
11244     fi
11245   fi
11246   { test "$extra_verbose" = "yes" && cat << EOF
11247     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11248 EOF
11249 cat >> confdefs.h <<EOF
11250 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11251 EOF
11252 }
11253
11254   { test "$extra_verbose" = "yes" && cat << EOF
11255     Defining TERM_H_PATH = "${term_h_path-term.h}"
11256 EOF
11257 cat >> confdefs.h <<EOF
11258 #define TERM_H_PATH "${term_h_path-term.h}"
11259 EOF
11260 }
11261
11262
11263     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11264 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11265 echo "configure:11266: checking for gpm.h" >&5
11266
11267 cat > conftest.$ac_ext <<EOF
11268 #line 11269 "configure"
11269 #include "confdefs.h"
11270 #include <gpm.h>
11271 EOF
11272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11273 { (eval echo configure:11274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11275 if test -z "$ac_err"; then
11276   rm -rf conftest*
11277   eval "ac_cv_header_$ac_safe=yes"
11278 else
11279   echo "$ac_err" >&5
11280   echo "configure: failed program was:" >&5
11281   cat conftest.$ac_ext >&5
11282   rm -rf conftest*
11283   eval "ac_cv_header_$ac_safe=no"
11284 fi
11285 rm -f conftest*
11286 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11287   echo "$ac_t""yes" 1>&6
11288   :
11289 else
11290   echo "$ac_t""no" 1>&6
11291 with_gpm=no
11292 fi
11293  }
11294   test -z "$with_gpm" && { 
11295 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11296 echo "configure:11297: checking for Gpm_Open in -lgpm" >&5
11297 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11298
11299 xe_check_libs=" -lgpm "
11300 cat > conftest.$ac_ext <<EOF
11301 #line 11302 "configure"
11302 #include "confdefs.h"
11303 /* Override any gcc2 internal prototype to avoid an error.  */
11304 /* We use char because int might match the return type of a gcc2
11305     builtin and then its argument prototype would still apply.  */
11306 char Gpm_Open();
11307
11308 int main() {
11309 Gpm_Open()
11310 ; return 0; }
11311 EOF
11312 if { (eval echo configure:11313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11313   rm -rf conftest*
11314   eval "ac_cv_lib_$ac_lib_var=yes"
11315 else
11316   echo "configure: failed program was:" >&5
11317   cat conftest.$ac_ext >&5
11318   rm -rf conftest*
11319   eval "ac_cv_lib_$ac_lib_var=no"
11320 fi
11321 rm -f conftest*
11322 xe_check_libs=""
11323
11324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11325   echo "$ac_t""yes" 1>&6
11326   with_gpm=yes
11327 else
11328   echo "$ac_t""no" 1>&6
11329 with_gpm=no
11330 fi
11331
11332  }
11333   if test "$with_gpm" = "yes"; then
11334     { test "$extra_verbose" = "yes" && cat << \EOF
11335     Defining HAVE_GPM
11336 EOF
11337 cat >> confdefs.h <<\EOF
11338 #define HAVE_GPM 1
11339 EOF
11340 }
11341
11342     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
11343    echo "    xemacs will be linked with \"gpmevent.o\""
11344  fi
11345     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
11346   fi
11347
11348 else   for feature in ncurses gpm; do
11349     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11350       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
11351     fi
11352     eval "with_${feature}=no"
11353   done
11354 fi 
11355 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
11356    echo "    xemacs will be linked with \"event-unixoid.o\""
11357  fi
11358
11359
11360 test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
11361   != "no no no" && echo "checking for database support" 1>&6
11362 echo "configure:11363: checking for database support" >&5
11363
11364 if test "$with_database_gnudbm $with_database_dbm" != "no no"; then
11365   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
11366 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
11367 echo "configure:11368: checking for ndbm.h" >&5
11368
11369 cat > conftest.$ac_ext <<EOF
11370 #line 11371 "configure"
11371 #include "confdefs.h"
11372 #include <ndbm.h>
11373 EOF
11374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11375 { (eval echo configure:11376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11377 if test -z "$ac_err"; then
11378   rm -rf conftest*
11379   eval "ac_cv_header_$ac_safe=yes"
11380 else
11381   echo "$ac_err" >&5
11382   echo "configure: failed program was:" >&5
11383   cat conftest.$ac_ext >&5
11384   rm -rf conftest*
11385   eval "ac_cv_header_$ac_safe=no"
11386 fi
11387 rm -f conftest*
11388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11389   echo "$ac_t""yes" 1>&6
11390   :
11391 else
11392   echo "$ac_t""no" 1>&6
11393
11394     test "$with_database_gnudbm" = "yes" -o \
11395          "$with_database_dbm"    = "yes" && \
11396       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11397     with_database_gnudbm=no with_database_dbm=no
11398 fi
11399
11400 fi
11401
11402 if test "$with_database_gnudbm" != "no"; then
11403   
11404 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
11405 echo "configure:11406: checking for dbm_open in -lgdbm" >&5
11406 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
11407
11408 xe_check_libs=" -lgdbm "
11409 cat > conftest.$ac_ext <<EOF
11410 #line 11411 "configure"
11411 #include "confdefs.h"
11412 /* Override any gcc2 internal prototype to avoid an error.  */
11413 /* We use char because int might match the return type of a gcc2
11414     builtin and then its argument prototype would still apply.  */
11415 char dbm_open();
11416
11417 int main() {
11418 dbm_open()
11419 ; return 0; }
11420 EOF
11421 if { (eval echo configure:11422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11422   rm -rf conftest*
11423   eval "ac_cv_lib_$ac_lib_var=yes"
11424 else
11425   echo "configure: failed program was:" >&5
11426   cat conftest.$ac_ext >&5
11427   rm -rf conftest*
11428   eval "ac_cv_lib_$ac_lib_var=no"
11429 fi
11430 rm -f conftest*
11431 xe_check_libs=""
11432
11433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11434   echo "$ac_t""yes" 1>&6
11435   with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm
11436 else
11437   echo "$ac_t""no" 1>&6
11438 if test "$with_database_gnudbm" = "yes"; then
11439      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
11440    fi
11441    with_database_gnudbm=no
11442 fi
11443
11444
11445 fi
11446
11447 if test "$with_database_dbm" != "no"; then
11448   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11449 echo "configure:11450: checking for dbm_open" >&5
11450
11451 cat > conftest.$ac_ext <<EOF
11452 #line 11453 "configure"
11453 #include "confdefs.h"
11454 /* System header to define __stub macros and hopefully few prototypes,
11455     which can conflict with char dbm_open(); below.  */
11456 #include <assert.h>
11457 /* Override any gcc2 internal prototype to avoid an error.  */
11458 /* We use char because int might match the return type of a gcc2
11459     builtin and then its argument prototype would still apply.  */
11460 char dbm_open();
11461
11462 int main() {
11463
11464 /* The GNU C library defines this for functions which it implements
11465     to always fail with ENOSYS.  Some functions are actually named
11466     something starting with __ and the normal name is an alias.  */
11467 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11468 choke me
11469 #else
11470 dbm_open();
11471 #endif
11472
11473 ; return 0; }
11474 EOF
11475 if { (eval echo configure:11476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11476   rm -rf conftest*
11477   eval "ac_cv_func_dbm_open=yes"
11478 else
11479   echo "configure: failed program was:" >&5
11480   cat conftest.$ac_ext >&5
11481   rm -rf conftest*
11482   eval "ac_cv_func_dbm_open=no"
11483 fi
11484 rm -f conftest*
11485
11486 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11487   echo "$ac_t""yes" 1>&6
11488   with_database_dbm=yes libdbm=
11489 else
11490   echo "$ac_t""no" 1>&6
11491
11492     
11493 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11494 echo "configure:11495: checking for dbm_open in -ldbm" >&5
11495 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
11496
11497 xe_check_libs=" -ldbm "
11498 cat > conftest.$ac_ext <<EOF
11499 #line 11500 "configure"
11500 #include "confdefs.h"
11501 /* Override any gcc2 internal prototype to avoid an error.  */
11502 /* We use char because int might match the return type of a gcc2
11503     builtin and then its argument prototype would still apply.  */
11504 char dbm_open();
11505
11506 int main() {
11507 dbm_open()
11508 ; return 0; }
11509 EOF
11510 if { (eval echo configure:11511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11511   rm -rf conftest*
11512   eval "ac_cv_lib_$ac_lib_var=yes"
11513 else
11514   echo "configure: failed program was:" >&5
11515   cat conftest.$ac_ext >&5
11516   rm -rf conftest*
11517   eval "ac_cv_lib_$ac_lib_var=no"
11518 fi
11519 rm -f conftest*
11520 xe_check_libs=""
11521
11522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11523   echo "$ac_t""yes" 1>&6
11524   with_database_dbm=yes libdbm=-ldbm
11525 else
11526   echo "$ac_t""no" 1>&6
11527 test "$with_database_dbm" = "yes" && \
11528         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11529       with_database_dbm=no
11530 fi
11531
11532
11533 fi
11534
11535 fi
11536
11537 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
11538 test "$with_database_gnudbm" = "yes" -o \
11539      "$with_database_dbm"    = "yes" && \
11540   { test "$extra_verbose" = "yes" && cat << \EOF
11541     Defining HAVE_DBM
11542 EOF
11543 cat >> confdefs.h <<\EOF
11544 #define HAVE_DBM 1
11545 EOF
11546 }
11547
11548
11549 if test "$with_database_berkdb" != "no"; then
11550   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
11551 echo "configure:11552: checking for Berkeley db.h" >&5
11552   for path in "db/db.h" "db.h"; do
11553     cat > conftest.$ac_ext <<EOF
11554 #line 11555 "configure"
11555 #include "confdefs.h"
11556 #ifdef HAVE_INTTYPES_H
11557 #define __BIT_TYPES_DEFINED__
11558 #include <inttypes.h>
11559 typedef uint8_t  u_int8_t;
11560 typedef uint16_t u_int16_t;
11561 typedef uint32_t u_int32_t;
11562 #ifdef WE_DONT_NEED_QUADS
11563 typedef uint64_t u_int64_t;
11564 #endif
11565 #endif
11566 #include <$path>
11567
11568 int main() {
11569
11570 ; return 0; }
11571 EOF
11572 if { (eval echo configure:11573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11573   rm -rf conftest*
11574   db_h_path="$path"; break
11575 else
11576   echo "configure: failed program was:" >&5
11577   cat conftest.$ac_ext >&5
11578 fi
11579 rm -f conftest*
11580   done
11581   if test -z "$db_h_path"
11582   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
11583   else echo "$ac_t""$db_h_path" 1>&6
11584   fi
11585
11586   if test "$with_database_berkdb" != "no"; then
11587     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
11588 echo "configure:11589: checking for Berkeley DB version" >&5
11589     cat > conftest.$ac_ext <<EOF
11590 #line 11591 "configure"
11591 #include "confdefs.h"
11592 #include <$db_h_path>
11593 #if DB_VERSION_MAJOR > 1
11594 yes
11595 #endif
11596
11597 EOF
11598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11599   egrep "yes" >/dev/null 2>&1; then
11600   rm -rf conftest*
11601   echo "$ac_t""2" 1>&6; dbfunc=db_open
11602 else
11603   rm -rf conftest*
11604   echo "$ac_t""1" 1>&6; dbfunc=dbopen
11605 fi
11606 rm -f conftest*
11607
11608     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
11609 echo "configure:11610: checking for $dbfunc" >&5
11610
11611 cat > conftest.$ac_ext <<EOF
11612 #line 11613 "configure"
11613 #include "confdefs.h"
11614 /* System header to define __stub macros and hopefully few prototypes,
11615     which can conflict with char $dbfunc(); below.  */
11616 #include <assert.h>
11617 /* Override any gcc2 internal prototype to avoid an error.  */
11618 /* We use char because int might match the return type of a gcc2
11619     builtin and then its argument prototype would still apply.  */
11620 char $dbfunc();
11621
11622 int main() {
11623
11624 /* The GNU C library defines this for functions which it implements
11625     to always fail with ENOSYS.  Some functions are actually named
11626     something starting with __ and the normal name is an alias.  */
11627 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
11628 choke me
11629 #else
11630 $dbfunc();
11631 #endif
11632
11633 ; return 0; }
11634 EOF
11635 if { (eval echo configure:11636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11636   rm -rf conftest*
11637   eval "ac_cv_func_$dbfunc=yes"
11638 else
11639   echo "configure: failed program was:" >&5
11640   cat conftest.$ac_ext >&5
11641   rm -rf conftest*
11642   eval "ac_cv_func_$dbfunc=no"
11643 fi
11644 rm -f conftest*
11645
11646 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
11647   echo "$ac_t""yes" 1>&6
11648   with_database_berkdb=yes need_libdb=no
11649 else
11650   echo "$ac_t""no" 1>&6
11651
11652     
11653 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
11654 echo "configure:11655: checking for $dbfunc in -ldb" >&5
11655 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
11656
11657 xe_check_libs=" -ldb "
11658 cat > conftest.$ac_ext <<EOF
11659 #line 11660 "configure"
11660 #include "confdefs.h"
11661 /* Override any gcc2 internal prototype to avoid an error.  */
11662 /* We use char because int might match the return type of a gcc2
11663     builtin and then its argument prototype would still apply.  */
11664 char $dbfunc();
11665
11666 int main() {
11667 $dbfunc()
11668 ; return 0; }
11669 EOF
11670 if { (eval echo configure:11671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11671   rm -rf conftest*
11672   eval "ac_cv_lib_$ac_lib_var=yes"
11673 else
11674   echo "configure: failed program was:" >&5
11675   cat conftest.$ac_ext >&5
11676   rm -rf conftest*
11677   eval "ac_cv_lib_$ac_lib_var=no"
11678 fi
11679 rm -f conftest*
11680 xe_check_libs=""
11681
11682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11683   echo "$ac_t""yes" 1>&6
11684   with_database_berkdb=yes need_libdb=yes
11685 else
11686   echo "$ac_t""no" 1>&6
11687 fi
11688
11689
11690 fi
11691
11692   fi
11693
11694   if test "$with_database_berkdb" = "yes"; then
11695     { test "$extra_verbose" = "yes" && cat << EOF
11696     Defining DB_H_PATH = "$db_h_path"
11697 EOF
11698 cat >> confdefs.h <<EOF
11699 #define DB_H_PATH "$db_h_path"
11700 EOF
11701 }
11702
11703     { test "$extra_verbose" = "yes" && cat << \EOF
11704     Defining HAVE_BERKELEY_DB
11705 EOF
11706 cat >> confdefs.h <<\EOF
11707 #define HAVE_BERKELEY_DB 1
11708 EOF
11709 }
11710
11711     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
11712   else with_database_berkdb=no
11713   fi
11714 fi
11715
11716 if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
11717      != "no no no"; then
11718   { test "$extra_verbose" = "yes" && cat << \EOF
11719     Defining HAVE_DATABASE
11720 EOF
11721 cat >> confdefs.h <<\EOF
11722 #define HAVE_DATABASE 1
11723 EOF
11724 }
11725
11726   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
11727    echo "    xemacs will be linked with \"database.o\""
11728  fi
11729 fi
11730
11731 if test "$with_socks" = "yes"; then
11732   
11733 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
11734 echo "configure:11735: checking for SOCKSinit in -lsocks" >&5
11735 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
11736
11737 xe_check_libs=" -lsocks "
11738 cat > conftest.$ac_ext <<EOF
11739 #line 11740 "configure"
11740 #include "confdefs.h"
11741 /* Override any gcc2 internal prototype to avoid an error.  */
11742 /* We use char because int might match the return type of a gcc2
11743     builtin and then its argument prototype would still apply.  */
11744 char SOCKSinit();
11745
11746 int main() {
11747 SOCKSinit()
11748 ; return 0; }
11749 EOF
11750 if { (eval echo configure:11751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11751   rm -rf conftest*
11752   eval "ac_cv_lib_$ac_lib_var=yes"
11753 else
11754   echo "configure: failed program was:" >&5
11755   cat conftest.$ac_ext >&5
11756   rm -rf conftest*
11757   eval "ac_cv_lib_$ac_lib_var=no"
11758 fi
11759 rm -f conftest*
11760 xe_check_libs=""
11761
11762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11763   echo "$ac_t""yes" 1>&6
11764     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11765     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11766   { test "$extra_verbose" = "yes" && cat << EOF
11767     Defining $ac_tr_lib
11768 EOF
11769 cat >> confdefs.h <<EOF
11770 #define $ac_tr_lib 1
11771 EOF
11772 }
11773
11774   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
11775
11776 else
11777   echo "$ac_t""no" 1>&6
11778 fi
11779
11780
11781   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
11782     Defining HAVE_SOCKS
11783 EOF
11784 cat >> confdefs.h <<\EOF
11785 #define HAVE_SOCKS 1
11786 EOF
11787 }
11788
11789 fi
11790
11791 if test "$usage_tracking" = "yes"; then
11792   { test "$extra_verbose" = "yes" && cat << \EOF
11793     Defining USAGE_TRACKING
11794 EOF
11795 cat >> confdefs.h <<\EOF
11796 #define USAGE_TRACKING 1
11797 EOF
11798 }
11799
11800   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
11801 fi
11802
11803 for ac_hdr in dlfcn.h
11804 do
11805 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11806 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11807 echo "configure:11808: checking for $ac_hdr" >&5
11808
11809 cat > conftest.$ac_ext <<EOF
11810 #line 11811 "configure"
11811 #include "confdefs.h"
11812 #include <$ac_hdr>
11813 EOF
11814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11815 { (eval echo configure:11816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11817 if test -z "$ac_err"; then
11818   rm -rf conftest*
11819   eval "ac_cv_header_$ac_safe=yes"
11820 else
11821   echo "$ac_err" >&5
11822   echo "configure: failed program was:" >&5
11823   cat conftest.$ac_ext >&5
11824   rm -rf conftest*
11825   eval "ac_cv_header_$ac_safe=no"
11826 fi
11827 rm -f conftest*
11828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11829   echo "$ac_t""yes" 1>&6
11830     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11831   { test "$extra_verbose" = "yes" && cat << EOF
11832     Defining $ac_tr_hdr
11833 EOF
11834 cat >> confdefs.h <<EOF
11835 #define $ac_tr_hdr 1
11836 EOF
11837 }
11838  have_dlfcn=yes
11839   { test "$extra_verbose" = "yes" && cat << \EOF
11840     Defining HAVE_DLFCN_H
11841 EOF
11842 cat >> confdefs.h <<\EOF
11843 #define HAVE_DLFCN_H 1
11844 EOF
11845 }
11846
11847 else
11848   echo "$ac_t""no" 1>&6
11849 fi
11850 done
11851
11852 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11853 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
11854 echo "configure:11855: checking for dlopen in -ldl" >&5
11855 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
11856
11857 xe_check_libs=" -ldl "
11858 cat > conftest.$ac_ext <<EOF
11859 #line 11860 "configure"
11860 #include "confdefs.h"
11861 /* Override any gcc2 internal prototype to avoid an error.  */
11862 /* We use char because int might match the return type of a gcc2
11863     builtin and then its argument prototype would still apply.  */
11864 char dlopen();
11865
11866 int main() {
11867 dlopen()
11868 ; return 0; }
11869 EOF
11870 if { (eval echo configure:11871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11871   rm -rf conftest*
11872   eval "ac_cv_lib_$ac_lib_var=yes"
11873 else
11874   echo "configure: failed program was:" >&5
11875   cat conftest.$ac_ext >&5
11876   rm -rf conftest*
11877   eval "ac_cv_lib_$ac_lib_var=no"
11878 fi
11879 rm -f conftest*
11880 xe_check_libs=""
11881
11882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11883   echo "$ac_t""yes" 1>&6
11884   { test "$extra_verbose" = "yes" && cat << \EOF
11885     Defining HAVE_DLOPEN
11886 EOF
11887 cat >> confdefs.h <<\EOF
11888 #define HAVE_DLOPEN 1
11889 EOF
11890 }
11891  DLL_LIB=dl;  with_shlib=yes
11892 else
11893   echo "$ac_t""no" 1>&6
11894 fi
11895
11896  }
11897 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11898 echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6
11899 echo "configure:11900: checking for _dlopen in -lc" >&5
11900 ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'`
11901
11902 xe_check_libs=" -lc "
11903 cat > conftest.$ac_ext <<EOF
11904 #line 11905 "configure"
11905 #include "confdefs.h"
11906 /* Override any gcc2 internal prototype to avoid an error.  */
11907 /* We use char because int might match the return type of a gcc2
11908     builtin and then its argument prototype would still apply.  */
11909 char _dlopen();
11910
11911 int main() {
11912 _dlopen()
11913 ; return 0; }
11914 EOF
11915 if { (eval echo configure:11916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11916   rm -rf conftest*
11917   eval "ac_cv_lib_$ac_lib_var=yes"
11918 else
11919   echo "configure: failed program was:" >&5
11920   cat conftest.$ac_ext >&5
11921   rm -rf conftest*
11922   eval "ac_cv_lib_$ac_lib_var=no"
11923 fi
11924 rm -f conftest*
11925 xe_check_libs=""
11926
11927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11928   echo "$ac_t""yes" 1>&6
11929   { test "$extra_verbose" = "yes" && cat << \EOF
11930     Defining HAVE_DLOPEN
11931 EOF
11932 cat >> confdefs.h <<\EOF
11933 #define HAVE_DLOPEN 1
11934 EOF
11935 }
11936  DLL_LIB=;   with_shlib=yes
11937 else
11938   echo "$ac_t""no" 1>&6
11939 fi
11940
11941  }
11942 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11943 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
11944 echo "configure:11945: checking for dlopen in -lc" >&5
11945 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
11946
11947 xe_check_libs=" -lc "
11948 cat > conftest.$ac_ext <<EOF
11949 #line 11950 "configure"
11950 #include "confdefs.h"
11951 /* Override any gcc2 internal prototype to avoid an error.  */
11952 /* We use char because int might match the return type of a gcc2
11953     builtin and then its argument prototype would still apply.  */
11954 char dlopen();
11955
11956 int main() {
11957 dlopen()
11958 ; return 0; }
11959 EOF
11960 if { (eval echo configure:11961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11961   rm -rf conftest*
11962   eval "ac_cv_lib_$ac_lib_var=yes"
11963 else
11964   echo "configure: failed program was:" >&5
11965   cat conftest.$ac_ext >&5
11966   rm -rf conftest*
11967   eval "ac_cv_lib_$ac_lib_var=no"
11968 fi
11969 rm -f conftest*
11970 xe_check_libs=""
11971
11972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11973   echo "$ac_t""yes" 1>&6
11974   { test "$extra_verbose" = "yes" && cat << \EOF
11975     Defining HAVE_DLOPEN
11976 EOF
11977 cat >> confdefs.h <<\EOF
11978 #define HAVE_DLOPEN 1
11979 EOF
11980 }
11981  DLL_LIB=;   with_shlib=yes
11982 else
11983   echo "$ac_t""no" 1>&6
11984 fi
11985
11986  }
11987 test -z "$with_shlib" && { 
11988 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
11989 echo "configure:11990: checking for shl_load in -ldld" >&5
11990 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
11991
11992 xe_check_libs=" -ldld "
11993 cat > conftest.$ac_ext <<EOF
11994 #line 11995 "configure"
11995 #include "confdefs.h"
11996 /* Override any gcc2 internal prototype to avoid an error.  */
11997 /* We use char because int might match the return type of a gcc2
11998     builtin and then its argument prototype would still apply.  */
11999 char shl_load();
12000
12001 int main() {
12002 shl_load()
12003 ; return 0; }
12004 EOF
12005 if { (eval echo configure:12006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12006   rm -rf conftest*
12007   eval "ac_cv_lib_$ac_lib_var=yes"
12008 else
12009   echo "configure: failed program was:" >&5
12010   cat conftest.$ac_ext >&5
12011   rm -rf conftest*
12012   eval "ac_cv_lib_$ac_lib_var=no"
12013 fi
12014 rm -f conftest*
12015 xe_check_libs=""
12016
12017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12018   echo "$ac_t""yes" 1>&6
12019   { test "$extra_verbose" = "yes" && cat << \EOF
12020     Defining HAVE_SHL_LOAD
12021 EOF
12022 cat >> confdefs.h <<\EOF
12023 #define HAVE_SHL_LOAD 1
12024 EOF
12025 }
12026  DLL_LIB=dld; with_shlib=yes
12027 else
12028   echo "$ac_t""no" 1>&6
12029 fi
12030
12031  }
12032 test -z "$with_shlib" && { 
12033 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12034 echo "configure:12035: checking for dld_init in -ldld" >&5
12035 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12036
12037 xe_check_libs=" -ldld "
12038 cat > conftest.$ac_ext <<EOF
12039 #line 12040 "configure"
12040 #include "confdefs.h"
12041 /* Override any gcc2 internal prototype to avoid an error.  */
12042 /* We use char because int might match the return type of a gcc2
12043     builtin and then its argument prototype would still apply.  */
12044 char dld_init();
12045
12046 int main() {
12047 dld_init()
12048 ; return 0; }
12049 EOF
12050 if { (eval echo configure:12051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12051   rm -rf conftest*
12052   eval "ac_cv_lib_$ac_lib_var=yes"
12053 else
12054   echo "configure: failed program was:" >&5
12055   cat conftest.$ac_ext >&5
12056   rm -rf conftest*
12057   eval "ac_cv_lib_$ac_lib_var=no"
12058 fi
12059 rm -f conftest*
12060 xe_check_libs=""
12061
12062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12063   echo "$ac_t""yes" 1>&6
12064   { test "$extra_verbose" = "yes" && cat << \EOF
12065     Defining HAVE_DLD_INIT
12066 EOF
12067 cat >> confdefs.h <<\EOF
12068 #define HAVE_DLD_INIT 1
12069 EOF
12070 }
12071  DLL_LIB=dld; with_shlib=yes
12072 else
12073   echo "$ac_t""no" 1>&6
12074 fi
12075
12076  }
12077 if test "$with_shlib" = "yes"; then
12078   
12079 dll_ld=
12080 dll_ldflags=
12081 dll_cflags=
12082 dll_post=
12083 dll_ldo="-o"
12084 ld_dynamic_link_flags=
12085 xehost=$canonical
12086 xealias=$internal_configuration
12087
12088 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12089 echo "configure:12090: checking how to build dynamic libraries for ${xehost}" >&5
12090 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12091 case "$xehost" in
12092 *-*-linux-gnu*) ;;
12093 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12094 esac
12095
12096 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12097 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12098 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12099
12100 case "$xehost_os" in
12101 aix3*)
12102   # AIX sometimes has problems with the GCC collect2 program.  For some
12103   # reason, if we set the COLLECT_NAMES environment variable, the problems
12104   # vanish in a puff of smoke.
12105   if test "${COLLECT_NAMES+set}" != set; then
12106     COLLECT_NAMES=
12107     export COLLECT_NAMES
12108   fi
12109   ;;
12110 esac
12111
12112 # Now see if the compiler is really GCC.
12113 if test "$GCC" = "yes"; then
12114   XEGCC=yes
12115 else
12116   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12117 echo "configure:12118: checking checking whether we are using GNU C" >&5
12118   cat > conftest.$ac_ext <<EOF
12119 #line 12120 "configure"
12120 #include "confdefs.h"
12121
12122 #ifdef __GNUC__
12123   yes;
12124 #endif
12125
12126 EOF
12127 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12128   egrep "yes" >/dev/null 2>&1; then
12129   rm -rf conftest*
12130   XEGCC=yes
12131 else
12132   rm -rf conftest*
12133   XEGCC=no
12134 fi
12135 rm -f conftest*
12136
12137   echo "$ac_t""${XEGCC}" 1>&6
12138 fi
12139
12140 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12141 echo "configure:12142: checking how to produce PIC code" >&5
12142 wl=
12143
12144 can_build_shared=yes
12145 if test "$XEGCC" = yes; then
12146   wl='-Wl,'
12147
12148   case "$xehost_os" in
12149   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12150     # PIC is the default for these OSes.
12151     ;;
12152
12153   os2*)
12154     # We can build DLLs from non-PIC.
12155     ;;
12156   amigaos*)
12157     # FIXME: we need at least 68020 code to build shared libraries, but
12158     # adding the `-m68020' flag to GCC prevents building anything better,
12159     # like `-m68040'.
12160     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12161     ;;
12162   *)
12163     dll_cflags='-fPIC'
12164     ;;
12165   esac
12166 else
12167   # PORTME Check for PIC flags for the system compiler.
12168   case "$xehost_os" in
12169   hpux9* | hpux10*)
12170     # Is there a better link_static_flag that works with the bundled CC?
12171     wl='-Wl,'
12172     dll_cflags='+Z'
12173     ;;
12174
12175   irix5* | irix6*)
12176     wl='-Wl,'
12177     # PIC (with -KPIC) is the default.
12178     ;;
12179
12180   os2*)
12181     # We can build DLLs from non-PIC.
12182     ;;
12183
12184   osf3* | osf4*)
12185     # All OSF/1 code is PIC.
12186     wl='-Wl,'
12187     ;;
12188
12189   sco3.2v5*)
12190     dll_cflags='-belf -Kpic'
12191     wl='-Wl,'
12192     ;;
12193
12194   unixware*)
12195     dll_cflags="-KPIC"
12196     wl="-Wl,"
12197     ;;
12198
12199   sysv4*)
12200     dll_cflags="-KPIC"
12201     wl="-Wl,"
12202     ;;
12203
12204   sysv5*)
12205     dll_cflags="-KPIC"
12206     wl="-Wl,"
12207     ;;
12208
12209   solaris2*)
12210     dll_cflags='-KPIC'
12211     wl='-Wl,'
12212     ;;
12213
12214   sunos4*)
12215     dll_cflags='-PIC'
12216     wl='-Qoption ld '
12217     ;;
12218
12219   uts4*)
12220     dll_cflags='-pic'
12221     ;;
12222
12223   *)
12224     can_build_shared=no
12225     ;;
12226   esac
12227 fi
12228
12229 if test -n "$dll_cflags"; then
12230   echo "$ac_t""${dll_cflags}" 1>&6
12231   
12232   # Check to make sure the dll_cflags actually works.
12233   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12234 echo "configure:12235: checking if PIC flag ${dll_cflags} really works" >&5
12235   save_CFLAGS="$CFLAGS"
12236   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12237   cat > conftest.$ac_ext <<EOF
12238 #line 12239 "configure"
12239 #include "confdefs.h"
12240
12241 int main() {
12242 int x=0;
12243 ; return 0; }
12244 EOF
12245 if { (eval echo configure:12246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12246   rm -rf conftest*
12247   
12248     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12249     # reports no error.  So, we need to grep stderr for (Bundled).
12250     if grep '(Bundled)' config.log >/dev/null; then
12251       echo "$ac_t""no" 1>&6
12252       can_build_shared=no
12253       dll_cflags=
12254     else
12255       echo "$ac_t""yes" 1>&6
12256     fi
12257 else
12258   echo "configure: failed program was:" >&5
12259   cat conftest.$ac_ext >&5
12260   rm -rf conftest*
12261   echo "$ac_t""no" 1>&6
12262     can_build_shared=no
12263     dll_cflags=
12264 fi
12265 rm -f conftest*
12266   CFLAGS="$save_CFLAGS"
12267 else
12268   echo "$ac_t""none" 1>&6
12269 fi
12270
12271 if test "$can_build_shared" = "yes"; then
12272 cc_produces_so=no
12273 xldf=
12274 xcldf=
12275 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12276 echo "configure:12277: checking if C compiler can produce shared libraries" >&5
12277 if test "$XEGCC" = yes; then
12278   xcldf="-shared"
12279   xldf="-shared"
12280 else # Not using GCC
12281   case "$xehost_os" in
12282     aix3* | aix4*)
12283       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12284       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12285       ;;
12286
12287     freebsd2* | netbsd* | openbsd*)
12288       xldf="-Bshareable"
12289       xcldf="${wl}-Bshareable"
12290       ;;
12291
12292     freebsd3*)
12293       xcldf="-shared"
12294       ;;
12295
12296     hpux*)
12297       xldf="-b +s"
12298       xcldf="${wl}-b ${wl}+s"
12299       ;;
12300
12301     irix5* | irix6* | osf3* | osf4*)
12302       xcldf="${wl}-shared"
12303       xldf="-shared"
12304       ;;
12305
12306     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12307       xcldf="-G"
12308       xldf="-G"
12309       ;;
12310
12311     sunos4*)
12312       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12313       xldf="-assert pure-text -Bstatic"
12314       ;;
12315   esac
12316 fi # End if if we are using gcc
12317
12318 if test -n "$xcldf"; then
12319   save_LDFLAGS=$LDFLAGS
12320   save_LIBS=$LIBS
12321   save_xe_libs=$xe_libs
12322   LDFLAGS="$xcldf $LDFLAGS"
12323   LIBS=
12324   xe_libs=
12325   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12326   cat > conftest.$ac_ext <<EOF
12327 #line 12328 "configure"
12328 #include "confdefs.h"
12329
12330 int main() {
12331 int x=0;
12332 ; return 0; }
12333 EOF
12334 if { (eval echo configure:12335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12335   rm -rf conftest*
12336   cc_produces_so=yes
12337 else
12338   echo "configure: failed program was:" >&5
12339   cat conftest.$ac_ext >&5
12340   rm -rf conftest*
12341   cc_produces_so=no
12342 fi
12343 rm -f conftest*
12344   LDFLAGS=$save_LDFLAGS
12345   LIBS=$save_LIBS
12346   xe_libs=$save_xe_libs
12347   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12348 else
12349   cc_produces_so=no
12350 fi
12351 echo "$ac_t""${cc_produces_so}" 1>&6
12352
12353 LTLD=$LD
12354 if test -z "$LTLD"; then
12355   ac_prog=ld
12356   if test "$XEGCC" = yes; then
12357     # Check if gcc -print-prog-name=ld gives a path.
12358     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12359 echo "configure:12360: checking for ld used by GCC" >&5
12360     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12361     case "$ac_prog" in
12362     # Accept absolute paths.
12363     /*)
12364       if test -z "$LTLD"; then
12365         case "$ac_prog" in
12366           *gcc-lib*) LTLD="$CC"
12367                      ;;
12368           *)         LTLD="$ac_prog"
12369                      ;;
12370         esac
12371       fi
12372       ;;
12373     "")
12374       # If it fails, then pretend we aren't using GCC.
12375       ac_prog=ld
12376       ;;
12377     *)
12378       # If it is relative, then search for the first ld in PATH.
12379       with_gnu_ld=unknown
12380       ;;
12381     esac
12382   else
12383     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12384 echo "configure:12385: checking for GNU ld" >&5
12385   fi
12386
12387   if test -z "$LTLD"; then
12388     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12389     for ac_dir in $PATH; do
12390       test -z "$ac_dir" && ac_dir=.
12391       if test -f "$ac_dir/$ac_prog"; then
12392         LTLD="$ac_dir/$ac_prog"
12393         # Check to see if the program is GNU ld.  I'd rather use --version,
12394         # but apparently some GNU ld's only accept -v.
12395         # Break only if it was the GNU/non-GNU ld that we prefer.
12396         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12397           xe_gnu_ld=yes
12398         else
12399           xe_gnu_ld=no
12400         fi
12401       fi
12402     done
12403     IFS="$ac_save_ifs"
12404   fi
12405
12406   if test -n "$LTLD"; then
12407     echo "$ac_t""${LTLD}" 1>&6
12408   else
12409     echo "$ac_t""no" 1>&6
12410   fi
12411
12412   if test -z "$LTLD" -a "$cc_produces_so" = no; then
12413     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
12414     exit 1
12415   fi
12416 fi
12417
12418 ld_dynamic_link_flags=
12419
12420 # Check to see if it really is or isn't GNU ld.
12421 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
12422 echo "configure:12423: checking if the linker is GNU ld" >&5
12423 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12424 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
12425   xe_gnu_ld=yes
12426 else
12427   xe_gnu_ld=no
12428 fi
12429 echo "$ac_t""${xe_gnu_ld}" 1>&6
12430
12431 case "$xehost_os" in
12432   amigaos* | sunos4*)
12433     # On these operating systems, we should treat GNU ld like the system ld.
12434     gnu_ld_acts_native=yes
12435     ;;
12436   *)
12437     gnu_ld_acts_native=no
12438     ;;
12439 esac
12440
12441 if test "$cc_produces_so" = "yes"; then
12442   dll_ld=$CC
12443   dll_ldflags=$xcldf
12444   can_build_shared=yes
12445 else
12446   # OK - only NOW do we futz about with ld.
12447   # See if the linker supports building shared libraries.
12448   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
12449 echo "configure:12450: checking whether the linker supports shared libraries" >&5
12450   dll_ld=$CC
12451   dll_ldflags=$LDFLAGS
12452   ld_shlibs=yes
12453   can_build_shared=yes
12454   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
12455     # See if GNU ld supports shared libraries.
12456     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12457       dll_ld=$CC
12458       dll_ldflags="-shared"
12459       ld_shlibs=yes
12460     else
12461       ld_shlibs=no
12462     fi
12463   else
12464     # PORTME fill in a description of your system's linker (not GNU ld)
12465     case "$xehost_os" in
12466     aix3*)
12467       dll_ld=$LTLD
12468       dll_ldflags=$xldf
12469       ;;
12470
12471     aix4*)
12472       dll_ldflags=$xcldf
12473       ;;
12474
12475     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12476     # support.  Future versions do this automatically, but an explicit c++rt0.o
12477     # doesn't break anything, and helps significantly (at the cost of a little
12478     # extra space).
12479     freebsd2.2*)
12480       dll_ld=$LTLD
12481       dll_ldflags=$xldf
12482       dll_post="/usr/lib/c++rt0.o"
12483       ;;
12484
12485     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
12486     freebsd2*)
12487       dll_ld=$LTLD
12488       dll_ldflags="-Bshareable"
12489       ;;
12490
12491     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
12492     freebsd3*)
12493       dll_ldflags="-shared"
12494       ;;
12495
12496     hpux*)
12497       dll_ld=$LTLD
12498       dll_ldflags=$xldf
12499       ;;
12500
12501     irix5* | irix6*)
12502       dll_ld=$LTLD
12503       dll_ldflags=$xldf
12504       ;;
12505
12506     netbsd*)
12507       # Tested with NetBSD 1.2 ld
12508       dll_ld=$LTLD
12509       dll_ldflags=$xldf
12510       ;;
12511
12512     openbsd*)
12513       dll_ld=$LTLD
12514       dll_ldflags=$xldf
12515       ;;
12516
12517     osf3* | osf4*)
12518       dll_ld=$LTLD
12519       dll_ldflags=$xldf
12520       ;;
12521
12522     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
12523     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
12524       dll_ld=$LTLD
12525       case "$dll_ld" in
12526         *gcc*) dll_ldflags="-shared"
12527                dll_ld=$CC
12528                ;;
12529         *)     dll_ldflags="-G"
12530                ;;
12531       esac
12532       ;;
12533
12534     sunos4*)
12535       if test "$XEGCC" = yes; then
12536         dll_ld=$CC
12537       else
12538         dll_ld=$LTLD
12539       fi
12540       dll_ldflags=$xldf
12541       ;;
12542
12543     uts4*)
12544       dll_ld=$LTLD
12545       dll_ldflags="-G"
12546       ;;
12547
12548     bsdi*)
12549       dll_ldflags="-r"
12550       dll_ld="shlicc2"
12551       ;;
12552
12553     *)
12554       ld_shlibs=no
12555       can_build_shared=no
12556       ;;
12557     esac
12558   fi
12559   echo "$ac_t""${ld_shlibs}" 1>&6
12560   if test "$ld_shlibs" = "no"; then
12561     can_build_shared=no
12562   fi
12563 fi # End of if cc_produces_so = no
12564
12565
12566 if test "$xe_gnu_ld" = yes; then
12567   if test "$ld_shlibs" = yes; then
12568     ld_dynamic_link_flags="${wl}-export-dynamic"
12569   fi
12570 fi
12571
12572 if test -z "$ld_dynamic_link_flags"; then
12573   case "$xehost_os" in
12574   aix3*)
12575     ld_dynamic_link_flags=
12576     ;;
12577
12578   aix4*)
12579     ld_dynamic_link_flags=
12580     ;;
12581
12582   freebsd2.2*)
12583     ld_dynamic_link_flags=
12584     ;;
12585
12586   freebsd2*)
12587     ld_dynamic_link_flags=
12588     ;;
12589
12590   freebsd3*)
12591     ld_dynamic_link_flags=
12592     ;;
12593
12594   hpux*)
12595     ld_dynamic_link_flags="${wl}-E"
12596     ;;
12597
12598   irix5* | irix6*)
12599     ld_dynamic_link_flags=
12600     ;;
12601
12602   netbsd*)
12603     ld_dynamic_link_flags=
12604     ;;
12605
12606   openbsd*)
12607     ld_dynamic_link_flags=
12608     ;;
12609
12610   osf3* | osf4*)
12611     ld_dynamic_link_flags=
12612     ;;
12613
12614   solaris2* | solaris7*)
12615     ld_dynamic_link_flags="${wl}-Bdynamic"
12616     ;;
12617
12618   sco3.2v5* | unixware* | sysv5* | sysv4*)
12619     ld_dynamic_link_flags="${wl}-Bexport"
12620     ;;
12621
12622   sunos4*)
12623     ld_dynamic_link_flags=
12624     ;;
12625
12626   uts4*)
12627     ld_dynamic_link_flags=
12628     ;;
12629
12630   bsdi*)
12631     ld_dynamic_link_flags=
12632     ;;
12633
12634   esac
12635 fi # End of if -z ld_dynamic_link_flags
12636 fi # End of if test "$can_build_shared" = "yes"
12637
12638
12639
12640
12641
12642
12643
12644
12645   if test "$can_build_shared" = "yes"; then
12646     { test "$extra_verbose" = "yes" && cat << \EOF
12647     Defining HAVE_SHLIB
12648 EOF
12649 cat >> confdefs.h <<\EOF
12650 #define HAVE_SHLIB 1
12651 EOF
12652 }
12653
12654     extra_objs="$extra_objs sysdll.o" &&  if test "$extra_verbose" = "yes"; then
12655    echo "    xemacs will be linked with \"sysdll.o\""
12656  fi
12657     extra_objs="$extra_objs emodules.o" &&  if test "$extra_verbose" = "yes"; then
12658    echo "    xemacs will be linked with \"emodules.o\""
12659  fi
12660     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
12661     test ! -z "$DLL_LIB" && LIBS="-l${DLL_LIB} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${DLL_LIB}\" to \$LIBS"; fi
12662     for ac_func in dlerror _dlerror
12663 do
12664 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12665 echo "configure:12666: checking for $ac_func" >&5
12666
12667 cat > conftest.$ac_ext <<EOF
12668 #line 12669 "configure"
12669 #include "confdefs.h"
12670 /* System header to define __stub macros and hopefully few prototypes,
12671     which can conflict with char $ac_func(); below.  */
12672 #include <assert.h>
12673 /* Override any gcc2 internal prototype to avoid an error.  */
12674 /* We use char because int might match the return type of a gcc2
12675     builtin and then its argument prototype would still apply.  */
12676 char $ac_func();
12677
12678 int main() {
12679
12680 /* The GNU C library defines this for functions which it implements
12681     to always fail with ENOSYS.  Some functions are actually named
12682     something starting with __ and the normal name is an alias.  */
12683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12684 choke me
12685 #else
12686 $ac_func();
12687 #endif
12688
12689 ; return 0; }
12690 EOF
12691 if { (eval echo configure:12692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12692   rm -rf conftest*
12693   eval "ac_cv_func_$ac_func=yes"
12694 else
12695   echo "configure: failed program was:" >&5
12696   cat conftest.$ac_ext >&5
12697   rm -rf conftest*
12698   eval "ac_cv_func_$ac_func=no"
12699 fi
12700 rm -f conftest*
12701
12702 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12703   echo "$ac_t""yes" 1>&6
12704     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12705   { test "$extra_verbose" = "yes" && cat << EOF
12706     Defining $ac_tr_func
12707 EOF
12708 cat >> confdefs.h <<EOF
12709 #define $ac_tr_func 1
12710 EOF
12711 }
12712  
12713 else
12714   echo "$ac_t""no" 1>&6
12715 fi
12716 done
12717
12718   else
12719     echo "configure: warning: disabling shared library support" 1>&2
12720     with_shlib=no
12721   fi
12722 fi
12723
12724 cat > conftest.$ac_ext <<EOF
12725 #line 12726 "configure"
12726 #include "confdefs.h"
12727 int main(int c,char *v[]){return 0;}
12728 EOF
12729 if { (eval echo configure:12730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12730 then
12731   :
12732 else
12733   conftest_rc="$?"
12734   echo "configure: failed program was:" >&5
12735   cat conftest.$ac_ext >&5
12736   rm -fr conftest*
12737   
12738   echo ""
12739   echo "*** PANIC *** The C compiler can no longer build working executables."
12740   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
12741   echo "*** PANIC *** The most likely reason for this problem is that configure"
12742   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
12743   echo "*** PANIC *** found at run time."
12744   echo "*** PANIC ***"
12745   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
12746   echo "*** PANIC *** On other systems, try telling configure where to find the"
12747   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
12748   echo "*** PANIC ***"
12749   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
12750   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
12751   echo "*** PANIC *** on your system.  Don't do that."
12752   exit 1
12753 fi
12754 rm -fr conftest*
12755
12756 if test "$win32_processes" = "yes"; then
12757   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
12758    echo "    xemacs will be linked with \"process-nt.o\""
12759  fi
12760 else
12761   { test "$extra_verbose" = "yes" && cat << \EOF
12762     Defining HAVE_UNIX_PROCESSES
12763 EOF
12764 cat >> confdefs.h <<\EOF
12765 #define HAVE_UNIX_PROCESSES 1
12766 EOF
12767 }
12768
12769   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
12770    echo "    xemacs will be linked with \"process-unix.o\""
12771  fi
12772 fi
12773
12774
12775
12776 T=""
12777 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12778 CFLAGS="$T"
12779
12780
12781 T=""
12782 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12783 extra_objs="$T"
12784
12785
12786 T=""
12787 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
12788 c_switch_general="$T"
12789
12790
12791 T=""
12792 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12793 c_switch_window_system="$T"
12794
12795
12796 T=""
12797 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12798 c_switch_all="$T"
12799
12800
12801 T=""
12802 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
12803 ld_switch_general="$T"
12804
12805
12806 T=""
12807 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12808 ld_switch_window_system="$T"
12809
12810
12811 T=""
12812 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12813 ld_switch_all="$T"
12814
12815
12816 T=""
12817 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12818 ld_libs_general="$T"
12819
12820
12821 T=""
12822 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
12823 ld_libs_window_system="$T"
12824
12825
12826 T=""
12827 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12828 ld_libs_all="$T"
12829
12830
12831
12832 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
12833 internal_makefile_list="Makefile.in"
12834 SUBDIR_MAKEFILES=''
12835 test -d lock || mkdir lock
12836 for dir in $MAKE_SUBDIR; do
12837   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
12838         test -d "$d" || mkdir "$d"; cd "$d"
12839       done ) ;;
12840    * ) test -d "$dir" || mkdir "$dir" ;;
12841   esac
12842   
12843 T=""
12844 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12845 SUBDIR_MAKEFILES="$T"
12846
12847   
12848 T=""
12849 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12850 internal_makefile_list="$T"
12851
12852 done
12853
12854
12855
12856
12857 for dir in src/s src/m; do
12858   if test ! -d "$dir" ; then
12859     echo Making symbolic link to "$srcdir/$dir"
12860     ${LN_S} "$srcdir/$dir" "$dir"
12861   fi
12862 done
12863
12864 if test "$extra_verbose" = "yes"; then
12865   echo ""
12866   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
12867   echo ""
12868 fi
12869
12870 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
12871   echo "creating src/gdbinit"; echo ""
12872   echo "source $srcdir/src/gdbinit" > src/gdbinit
12873 fi
12874
12875 if test "$__SUNPRO_C" = "yes"; then
12876   echo "creating .sbinit"; echo ""
12877   ( echo "# For use with Sun WorkShop's Source browser."
12878     echo "# See sbquery(1) and sbinit(4) for more information"
12879     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
12880   ) > .sbinit
12881 fi
12882
12883 rm -f core
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901 PREFIX=$prefix
12902 while true; do
12903   case "$PREFIX" in
12904     *\$* ) eval "PREFIX=$PREFIX" ;;
12905     *) break ;;
12906   esac
12907 done
12908
12909
12910
12911
12912 EXEC_PREFIX=$exec_prefix
12913 while true; do
12914   case "$EXEC_PREFIX" in
12915     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
12916     *) break ;;
12917   esac
12918 done
12919
12920
12921
12922
12923 INFODIR=$infodir
12924 while true; do
12925   case "$INFODIR" in
12926     *\$* ) eval "INFODIR=$INFODIR" ;;
12927     *) break ;;
12928   esac
12929 done
12930
12931
12932
12933
12934 INFOPATH=$infopath
12935 while true; do
12936   case "$INFOPATH" in
12937     *\$* ) eval "INFOPATH=$INFOPATH" ;;
12938     *) break ;;
12939   esac
12940 done
12941
12942
12943
12944
12945 PACKAGE_PATH=$package_path
12946 while true; do
12947   case "$PACKAGE_PATH" in
12948     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
12949     *) break ;;
12950   esac
12951 done
12952
12953
12954
12955
12956 LISPDIR=$lispdir
12957 while true; do
12958   case "$LISPDIR" in
12959     *\$* ) eval "LISPDIR=$LISPDIR" ;;
12960     *) break ;;
12961   esac
12962 done
12963
12964
12965
12966
12967 MODULEDIR=$moduledir
12968 while true; do
12969   case "$MODULEDIR" in
12970     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
12971     *) break ;;
12972   esac
12973 done
12974
12975
12976
12977
12978 SITELISPDIR=$sitelispdir
12979 while true; do
12980   case "$SITELISPDIR" in
12981     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
12982     *) break ;;
12983   esac
12984 done
12985
12986
12987
12988
12989 SITEMODULEDIR=$sitemoduledir
12990 while true; do
12991   case "$SITEMODULEDIR" in
12992     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
12993     *) break ;;
12994   esac
12995 done
12996
12997
12998
12999
13000 ETCDIR=$etcdir
13001 while true; do
13002   case "$ETCDIR" in
13003     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13004     *) break ;;
13005   esac
13006 done
13007
13008
13009
13010
13011 LOCKDIR=$lockdir
13012 while true; do
13013   case "$LOCKDIR" in
13014     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13015     *) break ;;
13016   esac
13017 done
13018
13019
13020
13021
13022 DOCDIR=$docdir
13023 while true; do
13024   case "$DOCDIR" in
13025     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13026     *) break ;;
13027   esac
13028 done
13029
13030
13031
13032
13033 ARCHLIBDIR=$archlibdir
13034 while true; do
13035   case "$ARCHLIBDIR" in
13036     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13037     *) break ;;
13038   esac
13039 done
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13061
13062
13063
13064
13065
13066
13067
13068 : ${XEMACS_CC:=$CC}
13069
13070
13071
13072 if test "$with_site_lisp" = "no"; then
13073   { test "$extra_verbose" = "yes" && cat << \EOF
13074     Defining INHIBIT_SITE_LISP
13075 EOF
13076 cat >> confdefs.h <<\EOF
13077 #define INHIBIT_SITE_LISP 1
13078 EOF
13079 }
13080
13081 fi
13082 if test "$with_site_modules" = "no"; then
13083   { test "$extra_verbose" = "yes" && cat << \EOF
13084     Defining INHIBIT_SITE_MODULES
13085 EOF
13086 cat >> confdefs.h <<\EOF
13087 #define INHIBIT_SITE_MODULES 1
13088 EOF
13089 }
13090
13091 fi
13092
13093
13094 T=""
13095 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13096 ac_configure_args="$T"
13097
13098 { test "$extra_verbose" = "yes" && cat << EOF
13099     Defining EMACS_CONFIGURATION = "$canonical"
13100 EOF
13101 cat >> confdefs.h <<EOF
13102 #define EMACS_CONFIGURATION "$canonical"
13103 EOF
13104 }
13105
13106 { test "$extra_verbose" = "yes" && cat << EOF
13107     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13108 EOF
13109 cat >> confdefs.h <<EOF
13110 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13111 EOF
13112 }
13113
13114 { test "$extra_verbose" = "yes" && cat << EOF
13115     Defining config_machfile = "$machfile"
13116 EOF
13117 cat >> confdefs.h <<EOF
13118 #define config_machfile "$machfile"
13119 EOF
13120 }
13121
13122 { test "$extra_verbose" = "yes" && cat << EOF
13123     Defining config_opsysfile = "$opsysfile"
13124 EOF
13125 cat >> confdefs.h <<EOF
13126 #define config_opsysfile "$opsysfile"
13127 EOF
13128 }
13129
13130
13131
13132 null_string=""
13133 { test "$extra_verbose" = "yes" && cat << EOF
13134     Defining LD_SWITCH_X_SITE = $null_string
13135 EOF
13136 cat >> confdefs.h <<EOF
13137 #define LD_SWITCH_X_SITE $null_string
13138 EOF
13139 }
13140
13141 { test "$extra_verbose" = "yes" && cat << EOF
13142     Defining LD_SWITCH_X_SITE_AUX = $null_string
13143 EOF
13144 cat >> confdefs.h <<EOF
13145 #define LD_SWITCH_X_SITE_AUX $null_string
13146 EOF
13147 }
13148
13149 { test "$extra_verbose" = "yes" && cat << EOF
13150     Defining C_SWITCH_X_SITE = $null_string
13151 EOF
13152 cat >> confdefs.h <<EOF
13153 #define C_SWITCH_X_SITE $null_string
13154 EOF
13155 }
13156
13157 { test "$extra_verbose" = "yes" && cat << EOF
13158     Defining LD_SWITCH_SITE = $null_string
13159 EOF
13160 cat >> confdefs.h <<EOF
13161 #define LD_SWITCH_SITE $null_string
13162 EOF
13163 }
13164
13165 { test "$extra_verbose" = "yes" && cat << EOF
13166     Defining C_SWITCH_SITE = $null_string
13167 EOF
13168 cat >> confdefs.h <<EOF
13169 #define C_SWITCH_SITE $null_string
13170 EOF
13171 }
13172
13173
13174
13175 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13176     Defining GNU_MALLOC
13177 EOF
13178 cat >> confdefs.h <<\EOF
13179 #define GNU_MALLOC 1
13180 EOF
13181 }
13182
13183 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13184     Defining USE_SYSTEM_MALLOC
13185 EOF
13186 cat >> confdefs.h <<\EOF
13187 #define USE_SYSTEM_MALLOC 1
13188 EOF
13189 }
13190
13191 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13192     Defining USE_DEBUG_MALLOC
13193 EOF
13194 cat >> confdefs.h <<\EOF
13195 #define USE_DEBUG_MALLOC 1
13196 EOF
13197 }
13198
13199                                               { test "$extra_verbose" = "yes" && cat << \EOF
13200     Defining USE_SYSTEM_MALLOC
13201 EOF
13202 cat >> confdefs.h <<\EOF
13203 #define USE_SYSTEM_MALLOC 1
13204 EOF
13205 }
13206
13207 fi
13208 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13209     Defining I18N3
13210 EOF
13211 cat >> confdefs.h <<\EOF
13212 #define I18N3 1
13213 EOF
13214 }
13215
13216 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13217     Defining USE_GCC
13218 EOF
13219 cat >> confdefs.h <<\EOF
13220 #define USE_GCC 1
13221 EOF
13222 }
13223
13224 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13225     Defining EXTERNAL_WIDGET
13226 EOF
13227 cat >> confdefs.h <<\EOF
13228 #define EXTERNAL_WIDGET 1
13229 EOF
13230 }
13231
13232 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13233     Defining NO_DOC_FILE
13234 EOF
13235 cat >> confdefs.h <<\EOF
13236 #define NO_DOC_FILE 1
13237 EOF
13238 }
13239
13240 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13241     Defining PURIFY
13242 EOF
13243 cat >> confdefs.h <<\EOF
13244 #define PURIFY 1
13245 EOF
13246 }
13247
13248 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13249     Defining QUANTIFY
13250 EOF
13251 cat >> confdefs.h <<\EOF
13252 #define QUANTIFY 1
13253 EOF
13254 }
13255
13256 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13257     Defining MAIL_USE_POP
13258 EOF
13259 cat >> confdefs.h <<\EOF
13260 #define MAIL_USE_POP 1
13261 EOF
13262 }
13263
13264 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13265     Defining KERBEROS
13266 EOF
13267 cat >> confdefs.h <<\EOF
13268 #define KERBEROS 1
13269 EOF
13270 }
13271
13272 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13273     Defining HESIOD
13274 EOF
13275 cat >> confdefs.h <<\EOF
13276 #define HESIOD 1
13277 EOF
13278 }
13279
13280 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13281     Defining USE_UNION_TYPE
13282 EOF
13283 cat >> confdefs.h <<\EOF
13284 #define USE_UNION_TYPE 1
13285 EOF
13286 }
13287
13288
13289
13290 (
13291 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13292 else
13293   echo "uname -a: `uname -a`"
13294 fi
13295 echo ""
13296 echo "$0 $quoted_arguments"
13297 ) > Installation
13298
13299 if test ! -z ${emacs_beta_version} ; then
13300   if test -z "${emacs_is_beta}" ; then
13301         xemacs_betaname=".${emacs_beta_version}"
13302   else
13303         xemacs_betaname="-b${emacs_beta_version}"
13304   fi
13305 else
13306   xemacs_betaname=""    
13307 fi
13308
13309 (
13310 echo "
13311
13312 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13313
13314   Where should the build process find the source code?    $srcdir
13315   What installation prefix should install use?            $prefix
13316   What operating system and machine description files should XEmacs use?
13317         \`$opsysfile' and \`$machfile'
13318   What compiler should XEmacs be built with?              $CC $CFLAGS
13319   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13320   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13321   What window system should XEmacs use?                   ${window_system}"
13322 if test "$with_x11" = "yes"; then
13323   echo "  Where do we find X Windows header files?                $x_includes"
13324   echo "  Where do we find X Windows libraries?                   $x_libraries"
13325 fi
13326 if test -n "$site_includes"; then
13327   echo "  Additional header files:                                $site_includes"
13328 fi
13329 if test -n "$site_libraries"; then
13330   echo "  Additional libraries:                                   $site_libraries"
13331 fi
13332 if test -n "$site_prefixes"; then
13333   echo "  Additional prefixes:                                    $site_prefixes"
13334 fi
13335 if test -n "$runpath"; then
13336   echo "  Runtime library search path:                            $runpath"
13337 fi
13338 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13339 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13340 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13341 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13342   echo "  No Xmu; substituting equivalent routines."
13343 fi
13344
13345 if test "$with_xpm" = yes; then
13346   echo "  Compiling in support for XPM images."
13347 elif test "$with_x11" = yes; then
13348   echo "  --------------------------------------------------------------------"
13349   echo "  WARNING: Compiling without XPM support."
13350   if test "$xpm_problem" != ""; then
13351     echo "  Reason: $xpm_problem"
13352   fi
13353   echo "  WARNING: You should strongly consider installing XPM."
13354   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13355   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13356   echo "  --------------------------------------------------------------------"
13357 fi
13358 if test "$with_png" = yes; then
13359   echo "  Compiling in support for PNG image handling."
13360 elif test "$window_system" != "none"; then
13361   echo "  --------------------------------------------------------------------"
13362   echo "  WARNING: Compiling without PNG image support."
13363   if test "$png_problem" != ""; then
13364     echo "  Reason: $png_problem"
13365   fi
13366   echo "  WARNING: You should strongly consider installing the PNG libraries."
13367   echo "  WARNING: Otherwise certain images and glyphs may not display."
13368   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13369   echo "  --------------------------------------------------------------------"
13370 fi
13371 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
13372 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
13373 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
13374 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
13375 case "$with_sound" in
13376   nas    ) echo "  Compiling in network sound (NAS) support." ;;
13377   native ) echo "  Compiling in native sound support." ;;
13378   both   ) echo "  Compiling in both network and native sound support." ;;
13379 esac
13380 test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously."
13381
13382 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
13383 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
13384 test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
13385
13386 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
13387
13388 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
13389 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
13390
13391 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
13392 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
13393 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
13394 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
13395 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
13396 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
13397 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
13398 if test "$with_wnn" = yes; then
13399   echo "  Compiling in support for the WNN input method on Mule."
13400   test "$with_wnn6" = yes && echo "    Using WNN version 6."
13401 fi
13402 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
13403
13404 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
13405 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
13406 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
13407 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
13408 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
13409 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
13410 case "$with_menubars" in
13411   lucid ) echo "  Using Lucid menubars." ;;
13412   motif ) echo "  Using Motif menubars."
13413           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
13414           echo "             We recommend using the Lucid menubar instead."
13415           echo "             Re-run configure with --with-menubars='lucid'." ;;
13416 esac
13417 case "$with_scrollbars" in
13418   lucid    ) echo "  Using Lucid scrollbars."     ;;
13419   motif    ) echo "  Using Motif scrollbars."     ;;
13420   athena   ) echo "  Using Athena scrollbars."    ;;
13421   athena3d ) echo "  Using Athena-3d scrollbars." ;;
13422 esac
13423 case "$with_dialogs" in
13424   motif    )
13425     echo "  Using Motif dialog boxes."
13426     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
13427       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
13428       echo "             We recommend using the Athena dialog boxes instead."
13429       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
13430       echo "             Read the PROBLEMS file for more information."
13431     fi; fi
13432     ;;
13433   athena   ) echo "  Using Athena dialog boxes."    ;;
13434   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
13435 esac
13436 test "$with_shlib" = "yes" && echo "  Compiling in DLL support."
13437 test "$with_clash_detection" = yes && \
13438   echo "  Clash detection will use \"$lockdir\" for locking files."
13439 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
13440 test "$with_pop"        = yes && echo "  Using POP for mail access."
13441 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
13442 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
13443 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
13444 test "$debug"              = yes && echo "  Compiling in extra code for debugging."
13445 test "$usage_tracking"     = yes && echo "  Compiling with usage tracking active (Sun internal)."
13446 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
13447   != "no no no no no"; then
13448   echo "  WARNING: ---------------------------------------------------------"
13449   echo "  WARNING: Compiling in support for runtime error checking."
13450   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
13451   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
13452   echo "  WARNING: ---------------------------------------------------------"
13453 fi
13454 echo ""
13455 ) | tee -a Installation
13456 echo ""
13457
13458
13459 # Remove any trailing slashes in these variables.
13460 test -n "$prefix" &&
13461   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13462 test -n "$exec_prefix" &&
13463   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13464
13465
13466 for file in $internal_makefile_list; do
13467   test "$file" = src/Makefile.in && \
13468     file="src/Makefile.in:src/Makefile.in.in:src/depend"
13469   ac_output_files="${ac_output_files+$ac_output_files }$file"
13470 done
13471 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
13472 if test "$with_shlib" = "yes"; then
13473   ac_output_files="$ac_output_files lib-src/ellcc.h"
13474 fi
13475
13476 trap '' 1 2 15
13477
13478 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13479
13480 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13481 # Let make expand exec_prefix.
13482 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13483
13484 # Any assignment to VPATH causes Sun make to only execute
13485 # the first set of double-colon rules, so remove it if not needed.
13486 # If there is a colon in the path, we need to keep it.
13487 if test "x$srcdir" = x.; then
13488   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13489 fi
13490
13491 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13492
13493 DEFS=-DHAVE_CONFIG_H
13494
13495 # Without the "./", some shells look in PATH for config.status.
13496 : ${CONFIG_STATUS=./config.status}
13497
13498 echo creating $CONFIG_STATUS
13499 rm -f $CONFIG_STATUS
13500 cat > $CONFIG_STATUS <<EOF
13501 #! /bin/sh
13502 # Generated automatically by configure.
13503 # Run this file to recreate the current configuration.
13504 # This directory was configured as follows,
13505 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13506 #
13507 # $0 $ac_configure_args
13508 #
13509 # Compiler output produced by configure, useful for debugging
13510 # configure, is in ./config.log if it exists.
13511
13512 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13513 for ac_option
13514 do
13515   case "\$ac_option" in
13516   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13517     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13518     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13519   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13520     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13521     exit 0 ;;
13522   -help | --help | --hel | --he | --h)
13523     echo "\$ac_cs_usage"; exit 0 ;;
13524   *) echo "\$ac_cs_usage"; exit 1 ;;
13525   esac
13526 done
13527
13528 ac_given_srcdir=$srcdir
13529 ac_given_INSTALL="$INSTALL"
13530
13531 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13532 EOF
13533 cat >> $CONFIG_STATUS <<EOF
13534
13535 # Protect against being on the right side of a sed subst in config.status.
13536 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13537  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13538 $ac_vpsub
13539 $extrasub
13540 s%@SHELL@%$SHELL%g
13541 s%@CFLAGS@%$CFLAGS%g
13542 s%@CPPFLAGS@%$CPPFLAGS%g
13543 s%@CXXFLAGS@%$CXXFLAGS%g
13544 s%@FFLAGS@%$FFLAGS%g
13545 s%@DEFS@%$DEFS%g
13546 s%@LDFLAGS@%$LDFLAGS%g
13547 s%@LIBS@%$LIBS%g
13548 s%@exec_prefix@%$exec_prefix%g
13549 s%@prefix@%$prefix%g
13550 s%@program_transform_name@%$program_transform_name%g
13551 s%@bindir@%$bindir%g
13552 s%@sbindir@%$sbindir%g
13553 s%@libexecdir@%$libexecdir%g
13554 s%@datadir@%$datadir%g
13555 s%@sysconfdir@%$sysconfdir%g
13556 s%@sharedstatedir@%$sharedstatedir%g
13557 s%@localstatedir@%$localstatedir%g
13558 s%@libdir@%$libdir%g
13559 s%@includedir@%$includedir%g
13560 s%@oldincludedir@%$oldincludedir%g
13561 s%@infodir@%$infodir%g
13562 s%@mandir@%$mandir%g
13563 s%@LN_S@%$LN_S%g
13564 s%@blddir@%$blddir%g
13565 s%@CC@%$CC%g
13566 s%@CPP@%$CPP%g
13567 s%@start_flags@%$start_flags%g
13568 s%@ld_switch_shared@%$ld_switch_shared%g
13569 s%@start_files@%$start_files%g
13570 s%@ld@%$ld%g
13571 s%@lib_gcc@%$lib_gcc%g
13572 s%@RANLIB@%$RANLIB%g
13573 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13574 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13575 s%@INSTALL_DATA@%$INSTALL_DATA%g
13576 s%@YACC@%$YACC%g
13577 s%@SET_MAKE@%$SET_MAKE%g
13578 s%@X_CFLAGS@%$X_CFLAGS%g
13579 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
13580 s%@X_LIBS@%$X_LIBS%g
13581 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
13582 s%@install_pp@%$install_pp%g
13583 s%@libs_xauth@%$libs_xauth%g
13584 s%@dnd_objs@%$dnd_objs%g
13585 s%@lwlib_objs@%$lwlib_objs%g
13586 s%@ALLOCA@%$ALLOCA%g
13587 s%@dll_ld@%$dll_ld%g
13588 s%@dll_cflags@%$dll_cflags%g
13589 s%@dll_ldflags@%$dll_ldflags%g
13590 s%@dll_post@%$dll_post%g
13591 s%@dll_ldo@%$dll_ldo%g
13592 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
13593 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
13594 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
13595 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
13596 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
13597 s%@PROGNAME@%$PROGNAME%g
13598 s%@version@%$version%g
13599 s%@configuration@%$configuration%g
13600 s%@canonical@%$canonical%g
13601 s%@srcdir@%$srcdir%g
13602 s%@pkgdir@%$pkgdir%g
13603 s%@statedir@%$statedir%g
13604 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
13605 s%@PREFIX@%$PREFIX%g
13606 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
13607 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
13608 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
13609 s%@INFODIR@%$INFODIR%g
13610 s%@infopath@%$infopath%g
13611 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
13612 s%@INFOPATH@%$INFOPATH%g
13613 s%@package_path@%$package_path%g
13614 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
13615 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
13616 s%@lispdir@%$lispdir%g
13617 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
13618 s%@LISPDIR@%$LISPDIR%g
13619 s%@moduledir@%$moduledir%g
13620 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
13621 s%@MODULEDIR@%$MODULEDIR%g
13622 s%@sitelispdir@%$sitelispdir%g
13623 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
13624 s%@SITELISPDIR@%$SITELISPDIR%g
13625 s%@sitemoduledir@%$sitemoduledir%g
13626 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
13627 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
13628 s%@etcdir@%$etcdir%g
13629 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
13630 s%@ETCDIR@%$ETCDIR%g
13631 s%@lockdir@%$lockdir%g
13632 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
13633 s%@LOCKDIR@%$LOCKDIR%g
13634 s%@docdir@%$docdir%g
13635 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
13636 s%@DOCDIR@%$DOCDIR%g
13637 s%@archlibdir@%$archlibdir%g
13638 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
13639 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
13640 s%@bitmapdir@%$bitmapdir%g
13641 s%@extra_objs@%$extra_objs%g
13642 s%@machfile@%$machfile%g
13643 s%@opsysfile@%$opsysfile%g
13644 s%@c_switch_general@%$c_switch_general%g
13645 s%@c_switch_window_system@%$c_switch_window_system%g
13646 s%@c_switch_all@%$c_switch_all%g
13647 s%@ld_switch_general@%$ld_switch_general%g
13648 s%@ld_switch_window_system@%$ld_switch_window_system%g
13649 s%@ld_switch_all@%$ld_switch_all%g
13650 s%@ld_libs_general@%$ld_libs_general%g
13651 s%@ld_libs_window_system@%$ld_libs_window_system%g
13652 s%@ld_libs_all@%$ld_libs_all%g
13653 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
13654 s%@native_sound_lib@%$native_sound_lib%g
13655 s%@sound_cflags@%$sound_cflags%g
13656 s%@dynodump_arch@%$dynodump_arch%g
13657 s%@XEMACS_CC@%$XEMACS_CC%g
13658 s%@internal_makefile_list@%$internal_makefile_list%g
13659
13660 CEOF
13661 EOF
13662
13663 cat >> $CONFIG_STATUS <<\EOF
13664
13665 # Split the substitutions into bite-sized pieces for seds with
13666 # small command number limits, like on Digital OSF/1 and HP-UX.
13667 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13668 ac_file=1 # Number of current file.
13669 ac_beg=1 # First line for current file.
13670 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13671 ac_more_lines=:
13672 ac_sed_cmds=""
13673 while $ac_more_lines; do
13674   if test $ac_beg -gt 1; then
13675     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13676   else
13677     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13678   fi
13679   if test ! -s conftest.s$ac_file; then
13680     ac_more_lines=false
13681     rm -f conftest.s$ac_file
13682   else
13683     if test -z "$ac_sed_cmds"; then
13684       ac_sed_cmds="sed -f conftest.s$ac_file"
13685     else
13686       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13687     fi
13688     ac_file=`expr $ac_file + 1`
13689     ac_beg=$ac_end
13690     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13691   fi
13692 done
13693 if test -z "$ac_sed_cmds"; then
13694   ac_sed_cmds=cat
13695 fi
13696 EOF
13697
13698 cat >> $CONFIG_STATUS <<EOF
13699
13700 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
13701 EOF
13702 cat >> $CONFIG_STATUS <<\EOF
13703 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13704   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13705   case "$ac_file" in
13706   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13707        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13708   *) ac_file_in="${ac_file}.in" ;;
13709   esac
13710
13711   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13712
13713   # Remove last slash and all that follows it.  Not all systems have dirname.
13714   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13715   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13716     # The file is in a subdirectory.
13717     test ! -d "$ac_dir" && mkdir "$ac_dir"
13718     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13719     # A "../" for each directory in $ac_dir_suffix.
13720     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13721   else
13722     ac_dir_suffix= ac_dots=
13723   fi
13724
13725   case "$ac_given_srcdir" in
13726   .)  srcdir=.
13727       if test -z "$ac_dots"; then top_srcdir=.
13728       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13729   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13730   *) # Relative path.
13731     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13732     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13733   esac
13734
13735   case "$ac_given_INSTALL" in
13736   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13737   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13738   esac
13739
13740   echo creating "$ac_file"
13741   rm -f "$ac_file"
13742   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13743   case "$ac_file" in
13744   *Makefile*) ac_comsub="1i\\
13745 # $configure_input" ;;
13746   *) ac_comsub= ;;
13747   esac
13748
13749   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13750   sed -e "$ac_comsub
13751 s%@configure_input@%$configure_input%g
13752 s%@srcdir@%$srcdir%g
13753 s%@top_srcdir@%$top_srcdir%g
13754 s%@INSTALL@%$INSTALL%g
13755 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13756 fi; done
13757 rm -f conftest.s*
13758
13759 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13760 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13761 #
13762 # ac_d sets the value in "#define NAME VALUE" lines.
13763 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13764 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13765 ac_dC='\3'
13766 ac_dD='%g'
13767 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13768 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13769 ac_uB='\([      ]\)%\1#\2define\3'
13770 ac_uC=' '
13771 ac_uD='\4%g'
13772 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13773 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13774 ac_eB='$%\1#\2define\3'
13775 ac_eC=' '
13776 ac_eD='%g'
13777
13778 if test "${CONFIG_HEADERS+set}" != set; then
13779 EOF
13780 cat >> $CONFIG_STATUS <<EOF
13781   CONFIG_HEADERS="src/config.h lwlib/config.h"
13782 EOF
13783 cat >> $CONFIG_STATUS <<\EOF
13784 fi
13785 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13786   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13787   case "$ac_file" in
13788   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13789        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13790   *) ac_file_in="${ac_file}.in" ;;
13791   esac
13792
13793   echo creating $ac_file
13794
13795   rm -f conftest.frag conftest.in conftest.out
13796   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13797   cat $ac_file_inputs > conftest.in
13798
13799 EOF
13800
13801 # Transform confdefs.h into a sed script conftest.vals that substitutes
13802 # the proper values into config.h.in to produce config.h.  And first:
13803 # Protect against being on the right side of a sed subst in config.status.
13804 # Protect against being in an unquoted here document in config.status.
13805 rm -f conftest.vals
13806 cat > conftest.hdr <<\EOF
13807 s/[\\&%]/\\&/g
13808 s%[\\$`]%\\&%g
13809 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13810 s%ac_d%ac_u%gp
13811 s%ac_u%ac_e%gp
13812 EOF
13813 sed -n -f conftest.hdr confdefs.h > conftest.vals
13814 rm -f conftest.hdr
13815
13816 # This sed command replaces #undef with comments.  This is necessary, for
13817 # example, in the case of _POSIX_SOURCE, which is predefined and required
13818 # on some systems where configure will not decide to define it.
13819 cat >> conftest.vals <<\EOF
13820 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13821 EOF
13822
13823 # Break up conftest.vals because some shells have a limit on
13824 # the size of here documents, and old seds have small limits too.
13825
13826 rm -f conftest.tail
13827 while :
13828 do
13829   ac_lines=`grep -c . conftest.vals`
13830   # grep -c gives empty output for an empty file on some AIX systems.
13831   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13832   # Write a limited-size here document to conftest.frag.
13833   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13834   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13835   echo 'CEOF
13836   sed -f conftest.frag conftest.in > conftest.out
13837   rm -f conftest.in
13838   mv conftest.out conftest.in
13839 ' >> $CONFIG_STATUS
13840   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13841   rm -f conftest.vals
13842   mv conftest.tail conftest.vals
13843 done
13844 rm -f conftest.vals
13845
13846 cat >> $CONFIG_STATUS <<\EOF
13847   rm -f conftest.frag conftest.h
13848   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13849   cat conftest.in >> conftest.h
13850   rm -f conftest.in
13851   if cmp -s $ac_file conftest.h 2>/dev/null; then
13852     echo "$ac_file is unchanged"
13853     rm -f conftest.h
13854   else
13855     # Remove last slash and all that follows it.  Not all systems have dirname.
13856       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13857       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13858       # The file is in a subdirectory.
13859       test ! -d "$ac_dir" && mkdir "$ac_dir"
13860     fi
13861     rm -f $ac_file
13862     mv conftest.h $ac_file
13863   fi
13864 fi; done
13865
13866 EOF
13867 cat >> $CONFIG_STATUS <<EOF
13868 CPP="$CPP"
13869  top_srcdir="$srcdir"
13870  MAKE_SUBDIR="$MAKE_SUBDIR"
13871
13872 EOF
13873 cat >> $CONFIG_STATUS <<\EOF
13874 for dir in . $MAKE_SUBDIR; do
13875   (
13876     cd $dir
13877     rm -f junk.c
13878     < Makefile.in \
13879       sed -e '/^# Generated/d' \
13880           -e 's%/\*\*/#.*%%' \
13881           -e 's/^ *# */#/' \
13882           -e '/^##/d' \
13883           -e '/^#/ {
13884 p
13885 d
13886 }'        \
13887           -e '/./ {
13888 s/\([\"]\)/\\\1/g
13889 s/^/"/
13890 s/$/"/
13891 }'  > junk.c;
13892
13893
13894
13895     echo creating $dir/Makefile
13896 $CPP -I. -I${top_srcdir}/src  junk.c \
13897   | sed -e 's/^\#.*//'          \
13898         -e 's/^[        ][      ]*$//'\
13899         -e 's/^ /       /'              \
13900   | sed -n -e '/^..*$/p'        \
13901   | sed '/^\"/ {
13902         s/\\\([\"]\)/\1/g
13903         s/^[    ]*\"//
13904         s/\"[   ]*$//
13905 }' > Makefile.new
13906     chmod 444 Makefile.new
13907     mv -f Makefile.new Makefile
13908
13909     echo creating $dir/GNUmakefile
13910 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
13911   | sed -e 's/^\#.*//'          \
13912         -e 's/^[        ][      ]*$//'\
13913         -e 's/^ /       /'              \
13914   | sed -n -e '/^..*$/p'        \
13915   | sed '/^\"/ {
13916         s/\\\([\"]\)/\1/g
13917         s/^[    ]*\"//
13918         s/\"[   ]*$//
13919 }' > Makefile.new
13920     chmod 444 Makefile.new
13921     mv -f Makefile.new GNUmakefile
13922
13923     rm -f junk.c
13924   )
13925 done
13926
13927 sed < config.status >> lib-src/config.values \
13928   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
13929   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
13930   -e 's/^\([^ ]*\) $/\1 ""/' \
13931   -e 's/ 1$/ t/'
13932
13933
13934 exit 0
13935 EOF
13936 chmod +x $CONFIG_STATUS
13937 rm -fr confdefs* $ac_clean_files
13938 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1