Contents of release-21-2 at 1999-07-05-18.
[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_prefix='yes'
244 with_site_lisp='no'
245 with_site_modules='yes'
246 with_menubars=''
247 with_scrollbars=''
248 with_widgets=''
249 with_dialogs=''
250 with_file_coding=''
251 cpp='' cppflags='' libs='' ldflags=''
252 dynamic=''
253 with_x11=''
254 with_msw=''
255 rel_alloc='default'
256 with_system_malloc='default'
257 with_dlmalloc='default'
258 native_sound_lib=''
259 use_assertions="yes"
260 with_toolbars=""
261 with_tty=""
262 use_union_type="no"
263 with_dnet=""
264
265
266
267
268 arguments="$@"
269
270 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
271 quoted_arguments=
272 for i in "$@"; do
273    case "$i" in
274    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
275    | --no-cr | --no-c) ;;
276    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
277    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
278    *)
279    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
280    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
281    esac
282 done
283
284 while test $# != 0; do
285   arg="$1"; shift
286   case "$arg" in
287     --no-create|--no-recursion) ;;
288         -* )
289             case "$arg" in
290         -*=*)
291           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
292           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
293           valomitted=no
294         ;;
295                                                                           -*)
296                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
297           val="yes" valomitted=yes
298         ;;
299       esac
300
301             optname="$opt"
302       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
303
304             case "${valomitted}-${opt}" in yes-without_* )
305         opt=`echo $opt | sed 's/without/with/'`
306         valomitted="no" val="no" ;;
307       esac
308
309             case "$opt" in
310
311         with_site_lisp  | \
312         with_prefix     | \
313         with_site_modules | \
314         with_x          | \
315         with_x11        | \
316         with_msw        | \
317         with_gcc        | \
318         dynamic         | \
319         with_ncurses    | \
320         with_dnet       | \
321         with_socks      | \
322         with_dragndrop  | \
323         with_cde        | \
324         with_offix      | \
325         with_gpm        | \
326         with_xpm        | \
327         with_xface      | \
328         with_gif        | \
329         with_jpeg       | \
330         with_png        | \
331         with_tiff       | \
332         with_wmcommand  | \
333         with_xmu        | \
334         with_purify     | \
335         with_quantify   | \
336         with_toolbars   | \
337         with_tty        | \
338         with_xfs        | \
339         with_i18n3      | \
340         with_mule       | \
341         with_file_coding| \
342         with_canna      | \
343         with_wnn        | \
344         with_wnn6       | \
345         with_workshop   | \
346         with_sparcworks | \
347         with_tooltalk   | \
348         with_ldap       | \
349         with_pop        | \
350         with_kerberos   | \
351         with_hesiod     | \
352         with_dnet       | \
353         with_infodock   | \
354         external_widget | \
355         verbose         | \
356         extra_verbose   | \
357         const_is_losing | \
358         usage_tracking  | \
359         use_union_type  | \
360         debug           | \
361         use_assertions  | \
362         memory_usage_stats | \
363         with_clash_detection | \
364         with_shlib | \
365         no_doc_file )
366                   case "$val" in
367             y | ye | yes )      val=yes ;;
368             n | no )            val=no  ;;
369             * ) (echo "$progname: Usage error:"
370 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
371 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
372           esac
373           eval "$opt=\"$val\"" ;;
374
375
376                         srcdir          | \
377         compiler        | \
378         cflags          | \
379         cpp             | \
380         cppflags        | \
381         libs            | \
382         ldflags         | \
383         cache_file      | \
384         native_sound_lib| \
385         site_lisp       | \
386         x_includes      | \
387         x_libraries     | \
388         site_includes   | \
389         site_libraries  | \
390         site_prefixes   | \
391         site_runtime_libraries )
392                   if test "$valomitted" = "yes" ; then
393                     if test "$#" = 0 ; then
394               (echo "$progname: Usage error:"
395 echo " " "The \`--$optname' option requires a value."
396 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
397             fi
398             val="$1"; shift
399           fi
400           eval "$opt=\"$val\""
401         ;;
402
403                 rel_alloc | \
404         with_dlmalloc | \
405         with_debug_malloc  | use_debug_malloc | \
406         with_system_malloc | use_system_malloc )
407           case "$val" in
408             y | ye | yes )      val=yes ;;
409             n | no )            val=no  ;;
410             d | de | def | defa | defau | defaul | default ) val=default ;;
411             * ) (echo "$progname: Usage error:"
412 echo " " "The \`--$optname' option requires one of these values:
413   \`yes', \`no', or \`default'."
414 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
415           esac
416           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
417           eval "$opt=\"$val\""
418         ;;
419
420                 "with_database" )
421           with_database_berkdb=no
422           with_database_dbm=no
423           with_database_gnudbm=no
424           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
425             case "$x" in
426                 no ) ;;
427                 b | be | ber | berk | berkd | berkdb )  with_database_berkdb=yes ;;
428                 d | db | dbm )                          with_database_dbm=yes    ;;
429                 g | gn | gnu | gnud | gnudb | gnudbm )  with_database_gnudbm=yes ;;
430                 * ) (echo "$progname: Usage error:"
431 echo " " "The \`--$optname' option value
432   must be either \`no' or a comma-separated list
433   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
434 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
435             esac
436           done
437           if test "$with_database_dbm"    = "yes" -a \
438                   "$with_database_gnudbm" = "yes"; then
439           (echo "$progname: Usage error:"
440 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
441   with the \`--$optname' option."
442 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
443           fi
444         ;;
445
446                 "with_sound" )
447                           case "$val" in
448             y | ye | yes )                      val=native ;;
449             n | no | non | none )               val=no;;
450             na | nat | nati | nativ | native )  val=native  ;;
451             ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas  ;;
452             b | bo | bot | both )               val=both;;
453             * ) (echo "$progname: Usage error:"
454 echo " " "The \`--$optname' option must have one of these values:
455   \`native', \`nas', \`both', or \`none'."
456 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
457           esac
458           eval "$opt=\"$val\""
459         ;;
460
461                 "with_xim" )
462           case "$val" in
463             y | ye | yes )                val=yes   ;;
464             n | no | non | none )         val=no    ;;
465             x | xl | xli | xlib )         val=xlib  ;;
466             m | mo | mot | moti | motif ) val=motif ;;
467             * ) (echo "$progname: Usage error:"
468 echo " " "The \`--$optname' option must have one of these values:
469   \`motif', \`xlib', \`yes', or \`no'."
470 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
471           esac
472           eval "$opt=\"$val\""
473         ;;
474
475                 "mail_locking" )
476           case "$val" in
477             lockf )     val=lockf ;;
478             flock )     val=flock ;;
479             file )      val=file  ;;
480             * ) (echo "$progname: Usage error:"
481 echo " " "The \`--$optname' option must have one of these values:
482   \`lockf', \`flock', or \`file'."
483 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
484           esac
485           eval "$opt=\"$val\""
486         ;;
487
488                 "error_checking" )
489                           
490           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
491             case "$x" in
492                       n | no | non | none ) new_default=no ;;
493               a | al | all )        new_default=yes ;;
494
495               extents )       error_check_extents=yes ;;
496               noextents )     error_check_extents=no ;;
497
498               typecheck )     error_check_typecheck=yes ;;
499               notypecheck )   error_check_typecheck=no ;;
500
501               bufpos )        error_check_bufpos=yes ;;
502               nobufpos )      error_check_bufpos=no ;;
503
504               gc )            error_check_gc=yes ;;
505               nogc )          error_check_gc=no ;;
506
507               malloc )        error_check_malloc=yes ;;
508               nomalloc )      error_check_malloc=no ;;
509
510               byte_code )     error_check_byte_code=yes ;;
511               nobyte_code )   error_check_byte_code=no ;;
512
513               * ) bogus_error_check=yes ;;
514             esac
515             if test "$bogus_error_check" -o \
516                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
517                 if test "$error_check_default" = yes ; then
518                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
519                 else
520                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
521                 fi
522                 (echo "$progname: Usage error:"
523 echo " " "Valid types for the \`--$optname' option are:
524   $types."
525 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
526             elif test -n "$new_default" ; then
527                 error_check_extents=$new_default
528                 error_check_typecheck=$new_default
529                 error_check_bufpos=$new_default
530                 error_check_gc=$new_default
531                 error_check_malloc=$new_default
532                 error_check_byte_code=$new_default
533                 new_default=    # reset this
534             fi
535             echeck_notfirst=true
536           done
537         ;;
538
539                                 
540                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
541         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
542         archlibdir | docdir | package_path )
543                    if test "$valomitted" = "yes"; then
544              if test "$#" = 0; then
545                  (echo "$progname: Usage error:"
546 echo " " "The \`--$optname' option requires a value."
547 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
548              fi
549              val="$1"; shift
550            fi
551            eval "$opt=\"$val\""
552
553                            case "$opt" in
554                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
555     Defining EXEC_PREFIX_USER_DEFINED
556 EOF
557 cat >> confdefs.h <<\EOF
558 #define EXEC_PREFIX_USER_DEFINED 1
559 EOF
560 }
561  ;;
562              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
563     Defining LISPDIR_USER_DEFINED
564 EOF
565 cat >> confdefs.h <<\EOF
566 #define LISPDIR_USER_DEFINED 1
567 EOF
568 }
569  ;;
570              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
571     Defining SITELISPDIR_USER_DEFINED
572 EOF
573 cat >> confdefs.h <<\EOF
574 #define SITELISPDIR_USER_DEFINED 1
575 EOF
576 }
577  ;;
578              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
579     Defining MODULEDIR_USER_DEFINED
580 EOF
581 cat >> confdefs.h <<\EOF
582 #define MODULEDIR_USER_DEFINED 1
583 EOF
584 }
585  ;;
586              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
587     Defining ETCDIR_USER_DEFINED
588 EOF
589 cat >> confdefs.h <<\EOF
590 #define ETCDIR_USER_DEFINED 1
591 EOF
592 }
593  ;;
594              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
595     Defining INFODIR_USER_DEFINED
596 EOF
597 cat >> confdefs.h <<\EOF
598 #define INFODIR_USER_DEFINED 1
599 EOF
600 }
601  ;;
602              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
603     Defining INFOPATH_USER_DEFINED
604 EOF
605 cat >> confdefs.h <<\EOF
606 #define INFOPATH_USER_DEFINED 1
607 EOF
608 }
609  ;;
610              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
611     Defining PACKAGE_PATH_USER_DEFINED
612 EOF
613 cat >> confdefs.h <<\EOF
614 #define PACKAGE_PATH_USER_DEFINED 1
615 EOF
616 }
617  ;;
618              datadir )
619                 { test "$extra_verbose" = "yes" && cat << \EOF
620     Defining INFODIR_USER_DEFINED
621 EOF
622 cat >> confdefs.h <<\EOF
623 #define INFODIR_USER_DEFINED 1
624 EOF
625 }
626
627                 { test "$extra_verbose" = "yes" && cat << \EOF
628     Defining LISPDIR_USER_DEFINED
629 EOF
630 cat >> confdefs.h <<\EOF
631 #define LISPDIR_USER_DEFINED 1
632 EOF
633 }
634
635             { test "$extra_verbose" = "yes" && cat << \EOF
636     Defining MODULEDIR_USER_DEFINED
637 EOF
638 cat >> confdefs.h <<\EOF
639 #define MODULEDIR_USER_DEFINED 1
640 EOF
641 }
642
643                 { test "$extra_verbose" = "yes" && cat << \EOF
644     Defining ETCDIR_USER_DEFINED
645 EOF
646 cat >> confdefs.h <<\EOF
647 #define ETCDIR_USER_DEFINED 1
648 EOF
649 }
650  ;;
651              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
652     Defining LOCKDIR_USER_DEFINED
653 EOF
654 cat >> confdefs.h <<\EOF
655 #define LOCKDIR_USER_DEFINED 1
656 EOF
657 }
658  ;;
659              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
660     Defining DOCDIR_USER_DEFINED
661 EOF
662 cat >> confdefs.h <<\EOF
663 #define DOCDIR_USER_DEFINED 1
664 EOF
665 }
666  ;;
667              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
668     Defining ARCHLIBDIR_USER_DEFINED
669 EOF
670 cat >> confdefs.h <<\EOF
671 #define ARCHLIBDIR_USER_DEFINED 1
672 EOF
673 }
674  ;;
675            esac
676         ;;
677
678                 "no_create" ) ;;
679
680                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
681
682                 "with_menubars"   | \
683         "with_scrollbars" | \
684         "with_dialogs" | \
685         "with_widgets" )
686           case "$val" in
687             l | lu | luc | luci | lucid )               val=lucid  ;;
688             m | mo | mot | moti | motif )               val=motif  ;;
689             athena3d | athena-3d )                      val=athena3d ;;
690             a | at | ath | athe | athen | athena )      val=athena ;;
691             n | no | non | none )                       val=no ;;
692             * ) (echo "$progname: Usage error:"
693 echo " " "The \`--$optname' option must have one of these values:
694   \`lucid', \`motif', \`athena', \`athena3d', or \`no'."
695 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
696           esac
697           eval "$opt=\"$val\""
698         ;;
699
700                 "run_in_place"  | \
701         "with_gnu_make" )
702           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
703         ;;
704
705                 * ) (echo "$progname: Usage error:"
706 echo " " "Unrecognized option: $arg"
707 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
708
709       esac
710     ;;
711
712         *-*-*) configuration="$arg" ;;
713
714         *) (echo "$progname: Usage error:"
715 echo " " "Unrecognized argument: $arg"
716 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
717
718   esac
719 done
720
721
722 test -n "$cpp"      && CPP="$cpp"
723 test -n "$cppflags" && CPPFLAGS="$cppflags"
724 test -n "$libs"     && LIBS="$libs"
725 test -n "$ldflags"  && LDFLAGS="$ldflags"
726
727 eval set x "$quoted_arguments"; shift
728
729 test "$extra_verbose" = "yes" && verbose=yes
730
731 test -n "$with_x" && with_x11="$with_x"
732
733 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
734   test "$with_system_malloc" = "default" && with_system_malloc=yes
735 fi
736
737
738
739 if test "$with_cde $with_tooltalk" = "yes no"; then
740   (echo "$progname: Usage error:"
741 echo " " "--with-cde requires --with-tooltalk"
742 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
743 elif test "$with_tooltalk" = "no" ; then with_cde=no
744 elif test "$with_cde" = "yes"; then with_tooltalk=yes
745 fi
746
747
748 case "$srcdir" in
749
750     "" )
751     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
752       if test -f "$dir/src/lisp.h" -a \
753               -f "$dir/lisp/version.el" ; then
754         srcdir="$dir"
755         break
756       fi
757     done
758     if test -z "$srcdir" ; then
759       (echo "$progname: Usage error:"
760 echo " " "Neither the current directory nor its parent seem to
761   contain the XEmacs sources.  If you do not want to build XEmacs in its
762   source tree, you should run \`$progname' in the directory in which
763   you wish to build XEmacs, using the \`--srcdir' option to say where the
764   sources may be found."
765 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
766     fi
767   ;;
768
769     * )
770     if test ! -f "$srcdir/src/lisp.h" -o \
771             ! -f "$srcdir/lisp/version.el" ; then
772       (echo "$progname: Usage error:"
773 echo " " "The directory specified with the \`--srcdir' option,
774   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
775   either run the \`$progname' script at the top of the XEmacs source
776   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
777 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
778     fi
779   ;;
780 esac
781
782 if test -z "$configuration"; then
783     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
784   if test -z "$configuration"; then
785     (echo "$progname: Usage error:"
786 echo " " "XEmacs has not been ported to this host type.
787 Try explicitly specifying the CONFIGURATION when rerunning configure."
788 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
789   fi
790 fi
791
792 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
793 echo "configure:794: checking whether ln -s works" >&5
794
795 rm -f conftestdata
796 if ln -s X conftestdata 2>/dev/null
797 then
798   rm -f conftestdata
799   ac_cv_prog_LN_S="ln -s"
800 else
801   ac_cv_prog_LN_S=ln
802 fi
803 LN_S="$ac_cv_prog_LN_S"
804 if test "$ac_cv_prog_LN_S" = "ln -s"; then
805   echo "$ac_t""yes" 1>&6
806 else
807   echo "$ac_t""no" 1>&6
808 fi
809
810
811 for dir in lisp etc man info; do
812   if test ! -d "$dir" ; then
813     echo Making symbolic link to "$srcdir/$dir"
814     ${LN_S} "$srcdir/$dir" "$dir"
815   fi
816 done
817
818
819 absolute_pwd="`pwd`";
820 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
821 then blddir="$PWD"
822 else blddir="$absolute_pwd"; if test -d "/net"; then
823   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
824   blddir=`echo "$blddir" | \
825    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
826 fi
827 fi
828
829
830 case "$srcdir" in
831   /* ) ;;
832   .  ) srcdir="$blddir" ;;
833   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
834   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
835   srcdir=`echo "$srcdir" | \
836    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
837 fi ;;
838 esac
839
840 if test `pwd` != `sh -c cd $srcdir && pwd`  \
841    && test -f "$srcdir/src/config.h"; then
842   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
843    echo "   as a build directory right now; it has been configured in its own"
844    echo "   right.  To configure in another directory as well, you MUST"
845    echo "   use GNU make.  If you do not have GNU make, then you must"
846    echo "   now do \`make distclean' in $srcdir,"
847    echo "   and then run $progname again.") >&2
848   extrasub='/^VPATH[     ]*=/c\
849 vpath %.c $(srcdir)\
850 vpath %.h $(srcdir)\
851 vpath %.y $(srcdir)\
852 vpath %.l $(srcdir)\
853 vpath %.s $(srcdir)\
854 vpath %.in $(srcdir)'
855 fi
856
857 . "$srcdir/version.sh" || exit 1;
858 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
859 : "${extra_verbose=$beta}"
860 version="${emacs_major_version}.${emacs_minor_version}"
861 { test "$extra_verbose" = "yes" && cat << EOF
862     Defining EMACS_MAJOR_VERSION = $emacs_major_version
863 EOF
864 cat >> confdefs.h <<EOF
865 #define EMACS_MAJOR_VERSION $emacs_major_version
866 EOF
867 }
868
869 { test "$extra_verbose" = "yes" && cat << EOF
870     Defining EMACS_MINOR_VERSION = $emacs_minor_version
871 EOF
872 cat >> confdefs.h <<EOF
873 #define EMACS_MINOR_VERSION $emacs_minor_version
874 EOF
875 }
876
877 if test -n "$emacs_beta_version" ; then
878   if test "$beta" = "yes"; then
879         version="${version}-b${emacs_beta_version}"
880         { test "$extra_verbose" = "yes" && cat << EOF
881     Defining EMACS_BETA_VERSION = $emacs_beta_version
882 EOF
883 cat >> confdefs.h <<EOF
884 #define EMACS_BETA_VERSION $emacs_beta_version
885 EOF
886 }
887
888   else
889         version="${version}.${emacs_beta_version}"
890         { test "$extra_verbose" = "yes" && cat << EOF
891     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
892 EOF
893 cat >> confdefs.h <<EOF
894 #define EMACS_PATCH_LEVEL $emacs_beta_version
895 EOF
896 }
897
898   fi
899 fi
900 { test "$extra_verbose" = "yes" && cat << EOF
901     Defining XEMACS_CODENAME = "$xemacs_codename"
902 EOF
903 cat >> confdefs.h <<EOF
904 #define XEMACS_CODENAME "$xemacs_codename"
905 EOF
906 }
907
908 { test "$extra_verbose" = "yes" && cat << EOF
909     Defining EMACS_VERSION = "$version"
910 EOF
911 cat >> confdefs.h <<EOF
912 #define EMACS_VERSION "$version"
913 EOF
914 }
915
916
917 if test "$with_infodock" = "yes"; then
918   if test ! -f ../../ID-INSTALL; then
919     echo "Cannot build InfoDock without InfoDock sources"
920     with_infodock=no
921   fi
922 fi
923
924 if test "$with_infodock" = "yes"; then
925       { test "$extra_verbose" = "yes" && cat << EOF
926     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
927 EOF
928 cat >> confdefs.h <<EOF
929 #define INFODOCK_MAJOR_VERSION $infodock_major_version
930 EOF
931 }
932
933   { test "$extra_verbose" = "yes" && cat << EOF
934     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
935 EOF
936 cat >> confdefs.h <<EOF
937 #define INFODOCK_MINOR_VERSION $infodock_minor_version
938 EOF
939 }
940
941   { test "$extra_verbose" = "yes" && cat << EOF
942     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
943 EOF
944 cat >> confdefs.h <<EOF
945 #define INFODOCK_BUILD_VERSION $infodock_build_version
946 EOF
947 }
948
949   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
950   PROGNAME=infodock
951   CPPFLAGS="$CPPFLAGS -DINFODOCK"
952 else
953   PROGNAME=xemacs
954 fi
955
956 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
957 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
958     Defining ERROR_CHECK_EXTENTS
959 EOF
960 cat >> confdefs.h <<\EOF
961 #define ERROR_CHECK_EXTENTS 1
962 EOF
963 }
964
965 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
966     Defining ERROR_CHECK_TYPECHECK
967 EOF
968 cat >> confdefs.h <<\EOF
969 #define ERROR_CHECK_TYPECHECK 1
970 EOF
971 }
972
973 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
974     Defining ERROR_CHECK_BUFPOS
975 EOF
976 cat >> confdefs.h <<\EOF
977 #define ERROR_CHECK_BUFPOS 1
978 EOF
979 }
980
981 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
982     Defining ERROR_CHECK_GC
983 EOF
984 cat >> confdefs.h <<\EOF
985 #define ERROR_CHECK_GC 1
986 EOF
987 }
988
989 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
990     Defining ERROR_CHECK_MALLOC
991 EOF
992 cat >> confdefs.h <<\EOF
993 #define ERROR_CHECK_MALLOC 1
994 EOF
995 }
996
997 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
998     Defining ERROR_CHECK_BYTE_CODE
999 EOF
1000 cat >> confdefs.h <<\EOF
1001 #define ERROR_CHECK_BYTE_CODE 1
1002 EOF
1003 }
1004
1005 if test "${debug:=$beta}" = "yes"; then
1006   use_assertions=yes memory_usage_stats=yes
1007   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1008    echo "    xemacs will be linked with \"debug.o\""
1009  fi
1010   { test "$extra_verbose" = "yes" && cat << \EOF
1011     Defining DEBUG_XEMACS
1012 EOF
1013 cat >> confdefs.h <<\EOF
1014 #define DEBUG_XEMACS 1
1015 EOF
1016 }
1017
1018 fi
1019 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1020     Defining USE_ASSERTIONS
1021 EOF
1022 cat >> confdefs.h <<\EOF
1023 #define USE_ASSERTIONS 1
1024 EOF
1025 }
1026
1027 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1028     Defining MEMORY_USAGE_STATS
1029 EOF
1030 cat >> confdefs.h <<\EOF
1031 #define MEMORY_USAGE_STATS 1
1032 EOF
1033 }
1034
1035
1036
1037 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1038 echo "configure:1039: checking "host system type"" >&5
1039 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1040 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1041 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1042 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1043 echo "$ac_t""$configuration" 1>&6
1044
1045
1046
1047
1048
1049 machine='' opsys=''
1050
1051 case "$canonical" in
1052   sparc-*-*        ) machine=sparc ;;
1053   alpha*-*-*       ) machine=alpha ;;
1054   vax-*-*          ) machine=vax ;;
1055   mips-dec-*       ) machine=pmax ;;
1056   mips-sgi-*       ) machine=iris4d ;;
1057   romp-ibm-*       ) machine=ibmrt ;;
1058   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1059   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1060   powerpc*-*       ) machine=powerpc ;;
1061   hppa-*-*         ) machine=hp800 ;;
1062   m88k-dg-*        ) machine=aviion ;;
1063   m68*-sony-*      ) machine=news ;;
1064   mips-sony-*      ) machine=news-risc ;;
1065   clipper-*        ) machine=clipper ;;
1066   arm-*            ) machine=arm ;;
1067   ns32k-*          ) machine=ns32000 ;;
1068 esac
1069
1070 case "$canonical" in
1071   *-*-linux*    ) opsys=linux ;;
1072   *-*-netbsd*   ) opsys=netbsd ;;
1073   *-*-openbsd*  ) opsys=openbsd ;;
1074   *-*-nextstep* ) opsys=nextstep ;;
1075   *-*-vms       ) opsys=vms ;;
1076
1077     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1078   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1079   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1080   *-dec-osf3*                ) opsys=decosf3-1 ;;
1081   *-dec-osf4*                ) opsys=decosf4-0 ;;
1082
1083     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1084   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1085   *-*-ultrix* )         opsys=ultrix4-3 ;;
1086
1087     *-*-aix3.1*  ) opsys=aix3-1 ;;
1088   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1089   *-*-aix3*    ) opsys=aix3-2   ;;
1090   *-*-aix4.0*  ) opsys=aix4     ;;
1091   *-*-aix4.1*  ) opsys=aix4-1   ;;
1092   *-*-aix4*    ) opsys=aix4-2   ;;
1093
1094     *-gnu* )                    opsys=gnu    ;;
1095   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1096   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1097   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1098   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1099   *-*-aos*   )                  opsys=bsd4-3 ;;
1100   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1101   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1102   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1103   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1104   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1105   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1106         if test -z "$NON_GNU_CPP" ; then
1107           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1108             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1109           done
1110         fi
1111         opsys=usg5-4-2 ;;
1112     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1113     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1114 esac
1115
1116 case "$canonical" in
1117
1118     *-*-netbsd* )
1119     case "$canonical" in
1120       i[3-9]86-*-netbsd*) machine=intel386 ;;
1121       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1122                                             machine=hp9000s300 ;;
1123       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1124       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1125     esac
1126   ;;
1127
1128     *-*-openbsd* )
1129     case "${canonical}" in
1130       i386-*-openbsd*)          machine=intel386 ;;
1131       m68k-*-openbsd*)          machine=hp9000s300 ;;
1132       mipsel-*-openbsd*)        machine=pmax ;;
1133      esac
1134    ;;
1135
1136     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1137   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1138
1139     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1140   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1141
1142     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1143
1144     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1145
1146     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1147
1148     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1149
1150     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1151
1152     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1153   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1154   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1155
1156   
1157     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1158
1159     *-convex-bsd* | *-convex-convexos* )
1160     machine=convex opsys=bsd4-3
1161     NON_GNU_CPP="cc -E -P"
1162   ;;
1163
1164     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1165
1166     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1167   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1168   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1169   m88k-dg-dgux*                           ) opsys=dgux     ;;
1170
1171     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1172   m88k-motorola-sysv4* )
1173                     machine=delta88k opsys=usg5-4-2
1174   ;;
1175   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1176
1177     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1178   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1179
1180     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1181
1182     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1183   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1184   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1185
1186       m88k-harris-cxux* )
1187         case "`uname -r`" in
1188        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1189        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1190     esac
1191     NON_GNU_CPP="/lib/cpp"
1192   ;;
1193     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1194     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1195
1196     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1197
1198     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1199
1200     *-hp-hpux* )
1201         case "$canonical" in
1202       m68*  ) machine=hp9000s300 ;;
1203       hppa* ) machine=hp800      ;;
1204     esac
1205
1206     case "$canonical" in
1207       *-hp-hpux7*  )  opsys=hpux   ;;
1208       *-hp-hpux8*  )  opsys=hpux8  ;;
1209       *-hp-hpux9*  )  opsys=hpux9  ;;
1210       *-hp-hpux10* )  opsys=hpux10 ;;
1211       *-hp-hpux11* )  opsys=hpux11 ;;
1212       *            )  opsys=hpux   ;;
1213     esac
1214
1215         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1216    echo "    xemacs will be linked with \"strcat.o\""
1217  fi ;; esac
1218
1219     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1220         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1221     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1222
1223     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1224   ;;
1225
1226     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1227   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1228
1229     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1230   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1231   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1232   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1233   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1234   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1235
1236     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1237   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1238
1239     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1240
1241     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1242
1243     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1244
1245     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1246
1247       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1248
1249     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1250
1251     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1252
1253     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1254
1255     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1256
1257         mips-mips-usg* ) machine=mips4 ;;
1258   mips-mips-riscos4 )
1259     machine=mips4
1260     NON_GNU_CC="cc -systype bsd43"
1261     NON_GNU_CPP="cc -systype bsd43 -E"
1262     case "$canonical" in
1263       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1264       mips-mips-riscos5* ) opsys=riscos5 ;;
1265     esac
1266   ;;
1267   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1268   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1269
1270     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1271
1272     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1273
1274     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1275   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1276
1277     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1278
1279     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1280
1281     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1282
1283     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1284
1285     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1286   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1287
1288     mips-siemens-sysv* | mips-sni-sysv*)
1289     machine=mips-siemens opsys=usg5-4
1290     NON_GNU_CC=/usr/ccs/bin/cc
1291     NON_GNU_CPP=/usr/ccs/lib/cpp
1292   ;;
1293
1294     mips-nec-sysv*)
1295     machine=mips-nec
1296     NON_GNU_CC=/usr/ccs/bin/cc
1297     NON_GNU_CPP=/usr/ccs/lib/cpp
1298   ;;
1299
1300       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1301   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1302     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1303   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1304   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1305   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1306   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1307   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1308   mips-sgi-irix*      ) opsys=irix5-0 ;;
1309
1310     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1311   *-sony-news* ) opsys=newsos5 ;;
1312
1313     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1314
1315     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1316         case "$canonical" in
1317       m68*-sunos1* )             machine=sun1     ;;
1318       m68*-sunos2* )             machine=sun2     ;;
1319       m68* )                     machine=sun3     ;;
1320       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1321       i*86-*-* )                 machine=intel386 ;;
1322       rs6000* )                  machine=rs6000   ;;
1323     esac
1324
1325         case "$canonical" in *-sunos5*)
1326       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1327     esac
1328
1329                     case "$canonical" in
1330       *-sunos4* )
1331         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1332         : ;;
1333       *-solaris2* )
1334         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1335         RANLIB=':' ;;
1336     esac
1337
1338     case "$canonical" in
1339       *-solaris*          )
1340         opsys=sol2
1341         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1342         { test "$extra_verbose" = "yes" && cat << EOF
1343     Defining OS_RELEASE = $os_release
1344 EOF
1345 cat >> confdefs.h <<EOF
1346 #define OS_RELEASE $os_release
1347 EOF
1348 }
1349  ;;
1350
1351             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1352       *-sunos4.0*         ) opsys=sunos4-0      ;;
1353       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1354       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1355       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1356       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1357       *-mach*             ) opsys=mach-bsd4-3   ;;
1358       *                   ) opsys=bsd4-2        ;;
1359     esac
1360
1361     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1362
1363         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1364   ;;
1365
1366     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1367
1368     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1369   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1370
1371     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1372
1373     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1374
1375     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1376       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1377
1378     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1379
1380     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1381
1382     vax-dec-* )
1383     case "$canonical" in
1384       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1385       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1386       *-mach* )                         opsys=mach-bsd4-3 ;;
1387     esac
1388   ;;
1389
1390     ns16k-whitechapel-* ) machine=mg1 ;;
1391
1392     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1393
1394     i[3-9]86-*-* )
1395     machine=intel386
1396     case "$canonical" in
1397       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1398       *-isc2.2* )               opsys=isc2-2 ;;
1399       *-isc4.0* )               opsys=isc4-0 ;;
1400       *-isc4.* )                opsys=isc4-1
1401                                 GCC_TEST_OPTIONS=-posix
1402                                 NON_GCC_TEST_OPTIONS=-Xp
1403                                 ;;
1404       *-isc* )                  opsys=isc3-0 ;;
1405       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1406       *-esix* )                 opsys=esix ;;
1407       *-mach* )                 opsys=mach-bsd4-3 ;;
1408       *-xenix* )                opsys=xenix ;;
1409       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1410       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1411       *-bsdi4* )                opsys=bsdos4 ;;
1412       *-bsdi3* )                opsys=bsdos3 ;;
1413       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1414       *-bsdi2* )                opsys=bsdos2 ;;
1415       *-sco3.2v5* )             opsys=sco5 ;
1416                                                         if test "$dynamic" = "yes" ; then
1417                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1418         else
1419                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1420         fi ;;
1421       *-386bsd* )               opsys=386bsd ;;
1422       *-freebsd* )              opsys=freebsd ;;
1423       *-nextstep* )             opsys=nextstep ;;
1424       *-pc-cygwin* )            opsys=cygwin32 ;;
1425       *-pc-mingw* )             opsys=mingw32 ;
1426                                 test -z "$with_tty" && with_tty="no";;
1427           esac
1428   ;;
1429
1430     m68k-*-linux* ) machine=m68k opsys=linux ;;
1431
1432 esac
1433
1434 if test -z "$machine" -o -z "$opsys"; then
1435   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1436    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1437   ) >&2
1438   exit 1
1439 fi
1440
1441 if test -z "$dynamic"; then
1442   case "$opsys" in
1443     hpux* | sunos4* ) dynamic=no ;;
1444     *) dynamic=yes ;;
1445   esac
1446 fi
1447 if test "$dynamic" = "yes"; then
1448   case "$opsys" in
1449     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1450     decosf* ) ld_call_shared="-call_shared" ;;
1451   esac
1452 else   case "$opsys" in
1453     sol2 )
1454       echo "Static linking is not supported on Solaris 2."
1455       echo "Rerun configure without specifying --dynamic=no."
1456       exit 1 ;;
1457     linux   ) ld_call_shared="-Bstatic" ;;
1458     decosf* ) ld_call_shared="-non_shared" ;;
1459   esac
1460 fi
1461
1462 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1463
1464 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1465 { test "$extra_verbose" = "yes" && cat << EOF
1466     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1467 EOF
1468 cat >> confdefs.h <<EOF
1469 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1470 EOF
1471 }
1472
1473
1474 machfile="m/${machine}.h"
1475 opsysfile="s/${opsys}.h"
1476
1477
1478 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1479 if test "$with_workshop $with_tooltalk" = "yes no"; then
1480   (echo "$progname: Usage error:"
1481 echo " " "--with-workshop requires --with-tooltalk"
1482 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1483 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1484 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1485 fi
1486
1487 if test "$with_workshop" = "yes"; then
1488   { test "$extra_verbose" = "yes" && cat << \EOF
1489     Defining SUNPRO
1490 EOF
1491 cat >> confdefs.h <<\EOF
1492 #define SUNPRO 1
1493 EOF
1494 }
1495
1496   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1497    echo "    xemacs will be linked with \"sunpro.o\""
1498  fi
1499 fi
1500
1501 if test "$with_clash_detection" = "yes"; then
1502   { test "$extra_verbose" = "yes" && cat << \EOF
1503     Defining CLASH_DETECTION
1504 EOF
1505 cat >> confdefs.h <<\EOF
1506 #define CLASH_DETECTION 1
1507 EOF
1508 }
1509
1510   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1511    echo "    xemacs will be linked with \"filelock.o\""
1512  fi
1513 fi
1514
1515 test -n "$compiler" && CC="$compiler"
1516 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1517 fi
1518
1519 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1520 if test "${CFLAGS-unset}" != unset
1521   then cflags_specified=yes;
1522   else cflags_specified=no;
1523 fi
1524
1525 xe_save_CFLAGS="$CFLAGS"
1526
1527 # Extract the first word of "gcc", so it can be a program name with args.
1528 set dummy gcc; ac_word=$2
1529 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1530 echo "configure:1531: checking for $ac_word" >&5
1531
1532 if test -n "$CC"; then
1533   ac_cv_prog_CC="$CC" # Let the user override the test.
1534 else
1535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1536   ac_dummy="$PATH"
1537   for ac_dir in $ac_dummy; do
1538     test -z "$ac_dir" && ac_dir=.
1539     if test -f $ac_dir/$ac_word; then
1540       ac_cv_prog_CC="gcc"
1541       break
1542     fi
1543   done
1544   IFS="$ac_save_ifs"
1545 fi
1546 CC="$ac_cv_prog_CC"
1547 if test -n "$CC"; then
1548   echo "$ac_t""$CC" 1>&6
1549 else
1550   echo "$ac_t""no" 1>&6
1551 fi
1552
1553 if test -z "$CC"; then
1554   # Extract the first word of "cc", so it can be a program name with args.
1555 set dummy cc; ac_word=$2
1556 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1557 echo "configure:1558: checking for $ac_word" >&5
1558
1559 if test -n "$CC"; then
1560   ac_cv_prog_CC="$CC" # Let the user override the test.
1561 else
1562   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1563   ac_prog_rejected=no
1564   ac_dummy="$PATH"
1565   for ac_dir in $ac_dummy; do
1566     test -z "$ac_dir" && ac_dir=.
1567     if test -f $ac_dir/$ac_word; then
1568       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1569         ac_prog_rejected=yes
1570         continue
1571       fi
1572       ac_cv_prog_CC="cc"
1573       break
1574     fi
1575   done
1576   IFS="$ac_save_ifs"
1577 if test $ac_prog_rejected = yes; then
1578   # We found a bogon in the path, so make sure we never use it.
1579   set dummy $ac_cv_prog_CC
1580   shift
1581   if test $# -gt 0; then
1582     # We chose a different compiler from the bogus one.
1583     # However, it has the same basename, so the bogon will be chosen
1584     # first if we set CC to just the basename; use the full file name.
1585     shift
1586     set dummy "$ac_dir/$ac_word" "$@"
1587     shift
1588     ac_cv_prog_CC="$@"
1589   fi
1590 fi
1591 fi
1592 CC="$ac_cv_prog_CC"
1593 if test -n "$CC"; then
1594   echo "$ac_t""$CC" 1>&6
1595 else
1596   echo "$ac_t""no" 1>&6
1597 fi
1598
1599   if test -z "$CC"; then
1600     case "`uname -s`" in
1601     *win32* | *WIN32*)
1602       # Extract the first word of "cl", so it can be a program name with args.
1603 set dummy cl; ac_word=$2
1604 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1605 echo "configure:1606: checking for $ac_word" >&5
1606
1607 if test -n "$CC"; then
1608   ac_cv_prog_CC="$CC" # Let the user override the test.
1609 else
1610   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1611   ac_dummy="$PATH"
1612   for ac_dir in $ac_dummy; do
1613     test -z "$ac_dir" && ac_dir=.
1614     if test -f $ac_dir/$ac_word; then
1615       ac_cv_prog_CC="cl"
1616       break
1617     fi
1618   done
1619   IFS="$ac_save_ifs"
1620 fi
1621 CC="$ac_cv_prog_CC"
1622 if test -n "$CC"; then
1623   echo "$ac_t""$CC" 1>&6
1624 else
1625   echo "$ac_t""no" 1>&6
1626 fi
1627  ;;
1628     esac
1629   fi
1630   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1631 fi
1632
1633 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1634 echo "configure:1635: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1635
1636 ac_ext=c
1637 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1638 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1639 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1640 ac_cpp='$CPP '"$xe_cppflags"
1641 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1642 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1643 cross_compiling=no
1644
1645 cat > conftest.$ac_ext << EOF
1646
1647 #line 1648 "configure"
1648 #include "confdefs.h"
1649
1650 main(){return(0);}
1651 EOF
1652 if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1653   ac_cv_prog_cc_works=yes
1654   # If we can't run a trivial program, we are probably using a cross compiler.
1655   if (./conftest; exit) 2>/dev/null; then
1656     ac_cv_prog_cc_cross=no
1657   else
1658     ac_cv_prog_cc_cross=yes
1659   fi
1660 else
1661   echo "configure: failed program was:" >&5
1662   cat conftest.$ac_ext >&5
1663   ac_cv_prog_cc_works=no
1664 fi
1665 rm -fr conftest*
1666 ac_ext=c
1667 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1668 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1669 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1670 ac_cpp='$CPP '"$xe_cppflags"
1671 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1672 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1673 cross_compiling=no
1674
1675 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1676 if test $ac_cv_prog_cc_works = no; then
1677   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1678 fi
1679 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1680 echo "configure:1681: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1681 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1682 cross_compiling=$ac_cv_prog_cc_cross
1683
1684 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1685 echo "configure:1686: checking whether we are using GNU C" >&5
1686
1687 cat > conftest.c <<EOF
1688 #ifdef __GNUC__
1689   yes;
1690 #endif
1691 EOF
1692 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1693   ac_cv_prog_gcc=yes
1694 else
1695   ac_cv_prog_gcc=no
1696 fi
1697
1698 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1699
1700 if test $ac_cv_prog_gcc = yes; then
1701   GCC=yes
1702 else
1703   GCC=
1704 fi
1705
1706 ac_test_CFLAGS="${CFLAGS+set}"
1707 ac_save_CFLAGS="$CFLAGS"
1708 CFLAGS=
1709 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1710 echo "configure:1711: checking whether ${CC-cc} accepts -g" >&5
1711
1712 echo 'void f(){}' > conftest.c
1713 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1714   ac_cv_prog_cc_g=yes
1715 else
1716   ac_cv_prog_cc_g=no
1717 fi
1718 rm -f conftest*
1719
1720
1721 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1722 if test "$ac_test_CFLAGS" = set; then
1723   CFLAGS="$ac_save_CFLAGS"
1724 elif test $ac_cv_prog_cc_g = yes; then
1725   if test "$GCC" = yes; then
1726     CFLAGS="-g -O2"
1727   else
1728     CFLAGS="-g"
1729   fi
1730 else
1731   if test "$GCC" = yes; then
1732     CFLAGS="-O2"
1733   else
1734     CFLAGS=
1735   fi
1736 fi
1737  
1738 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1739   CC=${NON_GNU_CC-cc}
1740   # Extract the first word of "gcc", so it can be a program name with args.
1741 set dummy gcc; ac_word=$2
1742 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1743 echo "configure:1744: checking for $ac_word" >&5
1744
1745 if test -n "$CC"; then
1746   ac_cv_prog_CC="$CC" # Let the user override the test.
1747 else
1748   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1749   ac_dummy="$PATH"
1750   for ac_dir in $ac_dummy; do
1751     test -z "$ac_dir" && ac_dir=.
1752     if test -f $ac_dir/$ac_word; then
1753       ac_cv_prog_CC="gcc"
1754       break
1755     fi
1756   done
1757   IFS="$ac_save_ifs"
1758 fi
1759 CC="$ac_cv_prog_CC"
1760 if test -n "$CC"; then
1761   echo "$ac_t""$CC" 1>&6
1762 else
1763   echo "$ac_t""no" 1>&6
1764 fi
1765
1766 if test -z "$CC"; then
1767   # Extract the first word of "cc", so it can be a program name with args.
1768 set dummy cc; ac_word=$2
1769 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1770 echo "configure:1771: checking for $ac_word" >&5
1771
1772 if test -n "$CC"; then
1773   ac_cv_prog_CC="$CC" # Let the user override the test.
1774 else
1775   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1776   ac_prog_rejected=no
1777   ac_dummy="$PATH"
1778   for ac_dir in $ac_dummy; do
1779     test -z "$ac_dir" && ac_dir=.
1780     if test -f $ac_dir/$ac_word; then
1781       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1782         ac_prog_rejected=yes
1783         continue
1784       fi
1785       ac_cv_prog_CC="cc"
1786       break
1787     fi
1788   done
1789   IFS="$ac_save_ifs"
1790 if test $ac_prog_rejected = yes; then
1791   # We found a bogon in the path, so make sure we never use it.
1792   set dummy $ac_cv_prog_CC
1793   shift
1794   if test $# -gt 0; then
1795     # We chose a different compiler from the bogus one.
1796     # However, it has the same basename, so the bogon will be chosen
1797     # first if we set CC to just the basename; use the full file name.
1798     shift
1799     set dummy "$ac_dir/$ac_word" "$@"
1800     shift
1801     ac_cv_prog_CC="$@"
1802   fi
1803 fi
1804 fi
1805 CC="$ac_cv_prog_CC"
1806 if test -n "$CC"; then
1807   echo "$ac_t""$CC" 1>&6
1808 else
1809   echo "$ac_t""no" 1>&6
1810 fi
1811
1812   if test -z "$CC"; then
1813     case "`uname -s`" in
1814     *win32* | *WIN32*)
1815       # Extract the first word of "cl", so it can be a program name with args.
1816 set dummy cl; ac_word=$2
1817 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1818 echo "configure:1819: checking for $ac_word" >&5
1819
1820 if test -n "$CC"; then
1821   ac_cv_prog_CC="$CC" # Let the user override the test.
1822 else
1823   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1824   ac_dummy="$PATH"
1825   for ac_dir in $ac_dummy; do
1826     test -z "$ac_dir" && ac_dir=.
1827     if test -f $ac_dir/$ac_word; then
1828       ac_cv_prog_CC="cl"
1829       break
1830     fi
1831   done
1832   IFS="$ac_save_ifs"
1833 fi
1834 CC="$ac_cv_prog_CC"
1835 if test -n "$CC"; then
1836   echo "$ac_t""$CC" 1>&6
1837 else
1838   echo "$ac_t""no" 1>&6
1839 fi
1840  ;;
1841     esac
1842   fi
1843   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1844 fi
1845
1846 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1847 echo "configure:1848: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1848
1849 ac_ext=c
1850 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1851 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1852 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1853 ac_cpp='$CPP '"$xe_cppflags"
1854 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1855 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1856 cross_compiling=no
1857
1858 cat > conftest.$ac_ext << EOF
1859
1860 #line 1861 "configure"
1861 #include "confdefs.h"
1862
1863 main(){return(0);}
1864 EOF
1865 if { (eval echo configure:1866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1866   ac_cv_prog_cc_works=yes
1867   # If we can't run a trivial program, we are probably using a cross compiler.
1868   if (./conftest; exit) 2>/dev/null; then
1869     ac_cv_prog_cc_cross=no
1870   else
1871     ac_cv_prog_cc_cross=yes
1872   fi
1873 else
1874   echo "configure: failed program was:" >&5
1875   cat conftest.$ac_ext >&5
1876   ac_cv_prog_cc_works=no
1877 fi
1878 rm -fr conftest*
1879 ac_ext=c
1880 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1881 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1882 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1883 ac_cpp='$CPP '"$xe_cppflags"
1884 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1885 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1886 cross_compiling=no
1887
1888 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1889 if test $ac_cv_prog_cc_works = no; then
1890   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1891 fi
1892 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1893 echo "configure:1894: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1894 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1895 cross_compiling=$ac_cv_prog_cc_cross
1896
1897 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1898 echo "configure:1899: checking whether we are using GNU C" >&5
1899
1900 cat > conftest.c <<EOF
1901 #ifdef __GNUC__
1902   yes;
1903 #endif
1904 EOF
1905 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1906   ac_cv_prog_gcc=yes
1907 else
1908   ac_cv_prog_gcc=no
1909 fi
1910
1911 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1912
1913 if test $ac_cv_prog_gcc = yes; then
1914   GCC=yes
1915 else
1916   GCC=
1917 fi
1918
1919 ac_test_CFLAGS="${CFLAGS+set}"
1920 ac_save_CFLAGS="$CFLAGS"
1921 CFLAGS=
1922 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1923 echo "configure:1924: checking whether ${CC-cc} accepts -g" >&5
1924
1925 echo 'void f(){}' > conftest.c
1926 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1927   ac_cv_prog_cc_g=yes
1928 else
1929   ac_cv_prog_cc_g=no
1930 fi
1931 rm -f conftest*
1932
1933
1934 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1935 if test "$ac_test_CFLAGS" = set; then
1936   CFLAGS="$ac_save_CFLAGS"
1937 elif test $ac_cv_prog_cc_g = yes; then
1938   if test "$GCC" = yes; then
1939     CFLAGS="-g -O2"
1940   else
1941     CFLAGS="-g"
1942   fi
1943 else
1944   if test "$GCC" = yes; then
1945     CFLAGS="-O2"
1946   else
1947     CFLAGS=
1948   fi
1949 fi
1950
1951 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1952   CC=gcc
1953   # Extract the first word of "gcc", so it can be a program name with args.
1954 set dummy gcc; ac_word=$2
1955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1956 echo "configure:1957: checking for $ac_word" >&5
1957
1958 if test -n "$CC"; then
1959   ac_cv_prog_CC="$CC" # Let the user override the test.
1960 else
1961   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1962   ac_dummy="$PATH"
1963   for ac_dir in $ac_dummy; do
1964     test -z "$ac_dir" && ac_dir=.
1965     if test -f $ac_dir/$ac_word; then
1966       ac_cv_prog_CC="gcc"
1967       break
1968     fi
1969   done
1970   IFS="$ac_save_ifs"
1971 fi
1972 CC="$ac_cv_prog_CC"
1973 if test -n "$CC"; then
1974   echo "$ac_t""$CC" 1>&6
1975 else
1976   echo "$ac_t""no" 1>&6
1977 fi
1978
1979 if test -z "$CC"; then
1980   # Extract the first word of "cc", so it can be a program name with args.
1981 set dummy cc; ac_word=$2
1982 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1983 echo "configure:1984: checking for $ac_word" >&5
1984
1985 if test -n "$CC"; then
1986   ac_cv_prog_CC="$CC" # Let the user override the test.
1987 else
1988   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1989   ac_prog_rejected=no
1990   ac_dummy="$PATH"
1991   for ac_dir in $ac_dummy; do
1992     test -z "$ac_dir" && ac_dir=.
1993     if test -f $ac_dir/$ac_word; then
1994       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1995         ac_prog_rejected=yes
1996         continue
1997       fi
1998       ac_cv_prog_CC="cc"
1999       break
2000     fi
2001   done
2002   IFS="$ac_save_ifs"
2003 if test $ac_prog_rejected = yes; then
2004   # We found a bogon in the path, so make sure we never use it.
2005   set dummy $ac_cv_prog_CC
2006   shift
2007   if test $# -gt 0; then
2008     # We chose a different compiler from the bogus one.
2009     # However, it has the same basename, so the bogon will be chosen
2010     # first if we set CC to just the basename; use the full file name.
2011     shift
2012     set dummy "$ac_dir/$ac_word" "$@"
2013     shift
2014     ac_cv_prog_CC="$@"
2015   fi
2016 fi
2017 fi
2018 CC="$ac_cv_prog_CC"
2019 if test -n "$CC"; then
2020   echo "$ac_t""$CC" 1>&6
2021 else
2022   echo "$ac_t""no" 1>&6
2023 fi
2024
2025   if test -z "$CC"; then
2026     case "`uname -s`" in
2027     *win32* | *WIN32*)
2028       # Extract the first word of "cl", so it can be a program name with args.
2029 set dummy cl; ac_word=$2
2030 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2031 echo "configure:2032: checking for $ac_word" >&5
2032
2033 if test -n "$CC"; then
2034   ac_cv_prog_CC="$CC" # Let the user override the test.
2035 else
2036   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2037   ac_dummy="$PATH"
2038   for ac_dir in $ac_dummy; do
2039     test -z "$ac_dir" && ac_dir=.
2040     if test -f $ac_dir/$ac_word; then
2041       ac_cv_prog_CC="cl"
2042       break
2043     fi
2044   done
2045   IFS="$ac_save_ifs"
2046 fi
2047 CC="$ac_cv_prog_CC"
2048 if test -n "$CC"; then
2049   echo "$ac_t""$CC" 1>&6
2050 else
2051   echo "$ac_t""no" 1>&6
2052 fi
2053  ;;
2054     esac
2055   fi
2056   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2057 fi
2058
2059 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2060 echo "configure:2061: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2061
2062 ac_ext=c
2063 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2064 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2065 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2066 ac_cpp='$CPP '"$xe_cppflags"
2067 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2068 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2069 cross_compiling=no
2070
2071 cat > conftest.$ac_ext << EOF
2072
2073 #line 2074 "configure"
2074 #include "confdefs.h"
2075
2076 main(){return(0);}
2077 EOF
2078 if { (eval echo configure:2079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2079   ac_cv_prog_cc_works=yes
2080   # If we can't run a trivial program, we are probably using a cross compiler.
2081   if (./conftest; exit) 2>/dev/null; then
2082     ac_cv_prog_cc_cross=no
2083   else
2084     ac_cv_prog_cc_cross=yes
2085   fi
2086 else
2087   echo "configure: failed program was:" >&5
2088   cat conftest.$ac_ext >&5
2089   ac_cv_prog_cc_works=no
2090 fi
2091 rm -fr conftest*
2092 ac_ext=c
2093 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2094 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2095 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2096 ac_cpp='$CPP '"$xe_cppflags"
2097 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2098 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2099 cross_compiling=no
2100
2101 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2102 if test $ac_cv_prog_cc_works = no; then
2103   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2104 fi
2105 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2106 echo "configure:2107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2107 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2108 cross_compiling=$ac_cv_prog_cc_cross
2109
2110 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2111 echo "configure:2112: checking whether we are using GNU C" >&5
2112
2113 cat > conftest.c <<EOF
2114 #ifdef __GNUC__
2115   yes;
2116 #endif
2117 EOF
2118 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2119   ac_cv_prog_gcc=yes
2120 else
2121   ac_cv_prog_gcc=no
2122 fi
2123
2124 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2125
2126 if test $ac_cv_prog_gcc = yes; then
2127   GCC=yes
2128 else
2129   GCC=
2130 fi
2131
2132 ac_test_CFLAGS="${CFLAGS+set}"
2133 ac_save_CFLAGS="$CFLAGS"
2134 CFLAGS=
2135 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2136 echo "configure:2137: checking whether ${CC-cc} accepts -g" >&5
2137
2138 echo 'void f(){}' > conftest.c
2139 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2140   ac_cv_prog_cc_g=yes
2141 else
2142   ac_cv_prog_cc_g=no
2143 fi
2144 rm -f conftest*
2145
2146
2147 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2148 if test "$ac_test_CFLAGS" = set; then
2149   CFLAGS="$ac_save_CFLAGS"
2150 elif test $ac_cv_prog_cc_g = yes; then
2151   if test "$GCC" = yes; then
2152     CFLAGS="-g -O2"
2153   else
2154     CFLAGS="-g"
2155   fi
2156 else
2157   if test "$GCC" = yes; then
2158     CFLAGS="-O2"
2159   else
2160     CFLAGS=
2161   fi
2162 fi
2163
2164 fi
2165 CFLAGS="$xe_save_CFLAGS"
2166
2167
2168 test -n "$CPP" -a -d "$CPP" && CPP=
2169
2170 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2171
2172 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2173 echo "configure:2174: checking how to run the C preprocessor" >&5
2174 # On Suns, sometimes $CPP names a directory.
2175 if test -n "$CPP" && test -d "$CPP"; then
2176   CPP=
2177 fi
2178 if test -z "$CPP"; then
2179
2180   # This must be in double quotes, not single quotes, because CPP may get
2181   # substituted into the Makefile and "${CC-cc}" will confuse make.
2182   CPP="${CC-cc} -E"
2183   # On the NeXT, cc -E runs the code through the compiler's parser,
2184   # not just through cpp.
2185   cat > conftest.$ac_ext <<EOF
2186 #line 2187 "configure"
2187 #include "confdefs.h"
2188 #include <assert.h>
2189 Syntax Error
2190 EOF
2191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2192 { (eval echo configure:2193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2193 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2194 if test -z "$ac_err"; then
2195   :
2196 else
2197   echo "$ac_err" >&5
2198   echo "configure: failed program was:" >&5
2199   cat conftest.$ac_ext >&5
2200   rm -rf conftest*
2201   CPP="${CC-cc} -E -traditional-cpp"
2202   cat > conftest.$ac_ext <<EOF
2203 #line 2204 "configure"
2204 #include "confdefs.h"
2205 #include <assert.h>
2206 Syntax Error
2207 EOF
2208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2209 { (eval echo configure:2210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2211 if test -z "$ac_err"; then
2212   :
2213 else
2214   echo "$ac_err" >&5
2215   echo "configure: failed program was:" >&5
2216   cat conftest.$ac_ext >&5
2217   rm -rf conftest*
2218   CPP="${CC-cc} -nologo -E"
2219   cat > conftest.$ac_ext <<EOF
2220 #line 2221 "configure"
2221 #include "confdefs.h"
2222 #include <assert.h>
2223 Syntax Error
2224 EOF
2225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2226 { (eval echo configure:2227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2228 if test -z "$ac_err"; then
2229   :
2230 else
2231   echo "$ac_err" >&5
2232   echo "configure: failed program was:" >&5
2233   cat conftest.$ac_ext >&5
2234   rm -rf conftest*
2235   CPP=/lib/cpp
2236 fi
2237 rm -f conftest*
2238 fi
2239 rm -f conftest*
2240 fi
2241 rm -f conftest*
2242   ac_cv_prog_CPP="$CPP"
2243   CPP="$ac_cv_prog_CPP"
2244 else
2245   ac_cv_prog_CPP="$CPP"
2246 fi
2247 echo "$ac_t""$CPP" 1>&6
2248
2249
2250 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2251 echo "configure:2252: checking for AIX" >&5
2252 cat > conftest.$ac_ext <<EOF
2253 #line 2254 "configure"
2254 #include "confdefs.h"
2255 #ifdef _AIX
2256   yes
2257 #endif
2258
2259 EOF
2260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2261   egrep "yes" >/dev/null 2>&1; then
2262   rm -rf conftest*
2263   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2264     Defining _ALL_SOURCE
2265 EOF
2266 cat >> confdefs.h <<\EOF
2267 #define _ALL_SOURCE 1
2268 EOF
2269 }
2270
2271 else
2272   rm -rf conftest*
2273   echo "$ac_t""no" 1>&6
2274 fi
2275 rm -f conftest*
2276
2277
2278
2279 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2280 echo "configure:2281: checking for GNU libc" >&5
2281 cat > conftest.$ac_ext <<EOF
2282 #line 2283 "configure"
2283 #include "confdefs.h"
2284 #include <features.h>
2285 int main() {
2286
2287 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2288 #error Not a GNU libc system :-(
2289 ******* ======= ******** &&&&&&&&
2290 #endif
2291
2292 ; return 0; }
2293 EOF
2294 if { (eval echo configure:2295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2295   rm -rf conftest*
2296   have_glibc=yes
2297 else
2298   echo "configure: failed program was:" >&5
2299   cat conftest.$ac_ext >&5
2300   rm -rf conftest*
2301   have_glibc=no
2302 fi
2303 rm -f conftest*
2304 echo "$ac_t""$have_glibc" 1>&6
2305 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2306     Defining _GNU_SOURCE
2307 EOF
2308 cat >> confdefs.h <<\EOF
2309 #define _GNU_SOURCE 1
2310 EOF
2311 }
2312
2313
2314
2315 cat > conftest.$ac_ext <<EOF
2316 #line 2317 "configure"
2317 #include "confdefs.h"
2318 int main () {
2319 #if defined __SUNPRO_C
2320 return 11;
2321 #elif defined __DECC
2322 return 12;
2323 #else
2324 return 0;
2325 #endif
2326 }
2327 EOF
2328 if { (eval echo configure:2329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2329 then
2330   :
2331 else
2332   conftest_rc="$?"
2333   echo "configure: failed program was:" >&5
2334   cat conftest.$ac_ext >&5
2335   rm -fr conftest*
2336   case "$conftest_rc" in
2337   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2338   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2339 esac
2340 fi
2341 rm -fr conftest*
2342
2343
2344
2345
2346 echo "Extracting information from the machine- and system-dependent headers..."
2347
2348 tempcname="conftest.c"
2349
2350
2351
2352 cat > $tempcname <<EOF
2353 #define NOT_C_CODE
2354 #define C_SWITCH_SITE
2355 #define C_SWITCH_X_SITE
2356 #define LD_SWITCH_SITE
2357 #define LD_SWITCH_X_SITE
2358 #define LD_SWITCH_X_SITE_AUX
2359 #define OS_RELEASE $os_release
2360 #include "$srcdir/src/$opsysfile"
2361 #include "$srcdir/src/$machfile"
2362
2363 #ifndef LIBS_MACHINE
2364 #define LIBS_MACHINE
2365 #endif
2366 configure___ libs_machine=LIBS_MACHINE
2367
2368 #ifndef LIBS_SYSTEM
2369 #define LIBS_SYSTEM
2370 #endif
2371 configure___ libs_system=LIBS_SYSTEM
2372
2373 #ifndef LIBS_TERMCAP
2374 #define LIBS_TERMCAP
2375 #endif
2376 configure___ libs_termcap=LIBS_TERMCAP
2377
2378 #ifndef LIB_STANDARD
2379 #define LIB_STANDARD
2380 #endif
2381 configure___ libs_standard=LIB_STANDARD
2382
2383
2384 #ifndef OBJECTS_MACHINE
2385 #define OBJECTS_MACHINE
2386 #endif
2387 configure___ objects_machine=OBJECTS_MACHINE
2388
2389 #ifndef OBJECTS_SYSTEM
2390 #define OBJECTS_SYSTEM
2391 #endif
2392 configure___ objects_system=OBJECTS_SYSTEM
2393
2394
2395 #ifndef C_SWITCH_MACHINE
2396 #define C_SWITCH_MACHINE
2397 #endif
2398 configure___ c_switch_machine=C_SWITCH_MACHINE
2399
2400 #ifndef C_SWITCH_SYSTEM
2401 #define C_SWITCH_SYSTEM
2402 #endif
2403 configure___ c_switch_system=C_SWITCH_SYSTEM
2404
2405
2406 #ifndef LD_SWITCH_MACHINE
2407 #define LD_SWITCH_MACHINE
2408 #endif
2409 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2410
2411 #ifndef LD_SWITCH_SYSTEM
2412 #define LD_SWITCH_SYSTEM
2413 #endif
2414 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2415
2416
2417 #ifndef UNEXEC
2418 #define UNEXEC "unexec.o"
2419 #endif
2420 configure___ unexec=UNEXEC
2421
2422
2423 #ifndef LD_SWITCH_SHARED
2424 #define LD_SWITCH_SHARED "-c"
2425 #endif
2426 configure___ ld_switch_shared=LD_SWITCH_SHARED
2427
2428
2429 #ifdef ORDINARY_LINK
2430 #define LD "\$(CC) \$(CFLAGS)"
2431 #else /* no ORDINARY LINK */
2432 #ifdef COFF_ENCAPSULATE
2433 #define LD "\$(CC) -nostdlib"
2434 #else /* not COFF_ENCAPSULATE */
2435 #ifdef LINKER
2436 #define LD LINKER
2437 #else /* ! defined (LINKER) */
2438 #define LD "ld"
2439 #endif /* ! defined (LINKER) */
2440 #endif /* ! defined (COFF_ENCAPSULATE) */
2441 #endif /* not ORDINARY_LINK */
2442 configure___ ld=LD
2443
2444 #ifndef LIB_GCC
2445 #define LIB_GCC
2446 #endif
2447 configure___ lib_gcc=LIB_GCC
2448
2449 #ifndef LD_TEXT_START_ADDR
2450 #define LD_TEXT_START_ADDR
2451 #endif
2452 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2453
2454
2455 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2456 #ifdef NO_REMAP
2457 #ifdef COFF_ENCAPSULATE
2458 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2459 #else /* ! defined (COFF_ENCAPSULATE) */
2460 #define START_FILES "pre-crt0.o /lib/crt0.o"
2461 #endif /* ! defined (COFF_ENCAPSULATE) */
2462 #else /* ! defined (NO_REMAP) */
2463 #define START_FILES "ecrt0.o"
2464 #endif /* ! defined (NO_REMAP) */
2465 #endif /* no ORDINARY_LINK */
2466 #ifndef START_FILES
2467 #define START_FILES
2468 #endif
2469 configure___ start_files=START_FILES
2470
2471 #ifdef ORDINARY_LINK
2472 configure___ ordinary_link=yes
2473 #else
2474 configure___ ordinary_link=no
2475 #endif
2476
2477 #ifdef SYSTEM_MALLOC
2478 configure___ system_malloc=yes
2479 #else
2480 configure___ system_malloc=no
2481 #endif
2482
2483 #ifdef TERMINFO
2484 configure___ have_terminfo=yes
2485 #else
2486 configure___ have_terminfo=no
2487 #endif
2488
2489 #ifdef MAIL_USE_FLOCK
2490 configure___ mail_use_flock=yes
2491 #else
2492 configure___ mail_use_flock=no
2493 #endif
2494
2495 #ifdef MAIL_USE_LOCKF
2496 configure___ mail_use_lockf=yes
2497 #else
2498 configure___ mail_use_lockf=no
2499 #endif
2500
2501 #ifdef HAVE_WIN32_PROCESSES
2502 configure___ win32_processes=yes
2503 #else
2504 configure___ win32_processes=no
2505 #endif
2506
2507 EOF
2508
2509 CPP=`eval "echo $CPP $CPPFLAGS"`
2510 eval `$CPP -Isrc $tempcname \
2511         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2512
2513 rm $tempcname
2514
2515 test "$extra_verbose" = "yes" && \
2516   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 ""
2517
2518 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2519
2520 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2521
2522 if test "$cflags_specified" = "no"; then
2523       if   test "$GCC" = "yes"; then
2524     CFLAGS="-g -O3 -Wall -Wno-switch"
2525               elif test "$__SUNPRO_C" = "yes"; then
2526     case "$opsys" in
2527       sol2    ) CFLAGS="-v -xO4" ;;
2528       sunos4* ) CFLAGS="-xO2";;
2529     esac
2530   elif test "$__DECC" = "yes"; then
2531     CFLAGS="-O3"
2532   elif test "$CC" = "xlc"; then
2533     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2534     else
2535     CFLAGS="-O" ;  fi
2536 fi
2537
2538
2539 if test "$GCC" = "yes"; then
2540   set x $ld_switch_system; shift; ld_switch_system=""
2541   while test -n "$1"; do
2542     case $1 in
2543       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2544       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2545       -Xlinker* ) ;;
2546       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2547     esac
2548     shift
2549   done
2550 fi
2551
2552 if test "$GCC" = "yes"; then
2553   set x $ld_switch_machine; shift; ld_switch_machine=""
2554   while test -n "$1"; do
2555     case $1 in
2556       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2557       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2558       -Xlinker* ) ;;
2559       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2560     esac
2561     shift
2562   done
2563 fi
2564
2565 if test "$GCC" = "yes"; then
2566   set x $LDFLAGS; shift; LDFLAGS=""
2567   while test -n "$1"; do
2568     case $1 in
2569       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2570       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2571       -Xlinker* ) ;;
2572       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2573     esac
2574     shift
2575   done
2576 fi
2577
2578 if test "$GCC" = "yes"; then
2579   set x $ld_call_shared; shift; ld_call_shared=""
2580   while test -n "$1"; do
2581     case $1 in
2582       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2583       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2584       -Xlinker* ) ;;
2585       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2586     esac
2587     shift
2588   done
2589 fi
2590
2591 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2592    echo "    xemacs will be linked with \"$objects_machine\""
2593  fi
2594 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2595    echo "    xemacs will be linked with \"$objects_system\""
2596  fi
2597 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2598    echo "    xemacs will be linked with \"$unexec\""
2599  fi
2600
2601 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2602 echo "configure:2603: checking for dynodump" >&5
2603 if test "$unexec" != "unexsol2.o"; then
2604   echo "$ac_t""no" 1>&6
2605 else
2606   echo "$ac_t""yes" 1>&6
2607   { test "$extra_verbose" = "yes" && cat << \EOF
2608     Defining DYNODUMP
2609 EOF
2610 cat >> confdefs.h <<\EOF
2611 #define DYNODUMP 1
2612 EOF
2613 }
2614
2615   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2616   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2617   case "$machine" in
2618     sparc   ) dynodump_arch=sparc ;;
2619     *86*    ) dynodump_arch=i386  ;;
2620     powerpc ) dynodump_arch=ppc   ;;
2621   esac
2622     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
2623 fi
2624
2625
2626 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2627
2628 if test "$unexec" = "unexaix.o"; then
2629   if   test "$dynamic" = "no"; then
2630   start_flags="-Wl,-bnso,-bnodelcsect"
2631   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2632   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2633     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2634   done
2635   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2636     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2637   done
2638   
2639 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2640 echo "configure:2641: checking for terminateAndUnload in -lC" >&5
2641 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2642
2643 xe_check_libs=" -lC "
2644 cat > conftest.$ac_ext <<EOF
2645 #line 2646 "configure"
2646 #include "confdefs.h"
2647 /* Override any gcc2 internal prototype to avoid an error.  */
2648 /* We use char because int might match the return type of a gcc2
2649     builtin and then its argument prototype would still apply.  */
2650 char terminateAndUnload();
2651
2652 int main() {
2653 terminateAndUnload()
2654 ; return 0; }
2655 EOF
2656 if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2657   rm -rf conftest*
2658   eval "ac_cv_lib_$ac_lib_var=yes"
2659 else
2660   echo "configure: failed program was:" >&5
2661   cat conftest.$ac_ext >&5
2662   rm -rf conftest*
2663   eval "ac_cv_lib_$ac_lib_var=no"
2664 fi
2665 rm -f conftest*
2666 xe_check_libs=""
2667
2668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2669   echo "$ac_t""yes" 1>&6
2670   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2671 else
2672   echo "$ac_t""no" 1>&6
2673 fi
2674
2675
2676   fi
2677 elif test -n "$ld_text_start_addr"; then
2678   start_flags="-T $ld_text_start_addr -e __start"
2679 fi
2680
2681
2682
2683
2684 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2685  test -z "$linker" &&  linker='$(CC) -nostdlib'
2686  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2687 fi
2688 test "$GCC" != "yes" && lib_gcc=
2689
2690
2691
2692
2693
2694 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2695 if test -n "$site_libraries"; then
2696   for arg in $site_libraries; do
2697     case "$arg" in
2698      -* ) ;;
2699      * ) test -d "$arg" || \
2700            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2701        arg="-L${arg}" ;;
2702     esac
2703     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2704   done
2705 fi
2706
2707 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2708 if test -n "$site_includes"; then
2709   for arg in $site_includes; do
2710     case "$arg" in
2711       -* ) ;;
2712       * ) test -d "$arg" || \
2713            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2714       arg="-I${arg}" ;;
2715     esac
2716     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2717   done
2718 fi
2719
2720 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2721 if test -n "$site_prefixes"; then
2722   for dir in $site_prefixes; do
2723     lib_dir="${dir}/lib"
2724     inc_dir="${dir}/include"
2725     if test ! -d "$dir"; then
2726       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2727     elif test ! -d "$lib_dir"; then
2728       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2729     else
2730       if test -d "$inc_dir"; then
2731         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
2732       fi
2733       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
2734     fi
2735   done
2736 fi
2737
2738
2739 for dir in "/usr/ccs/lib"; do
2740   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
2741 done
2742
2743 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2744 if test -n "$site_runtime_libraries"; then
2745   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2746   export LD_RUN_PATH
2747 fi
2748
2749
2750 if   test "$dynamic" = "no"; then add_runtime_path=no
2751 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2752 else case "$opsys" in
2753        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2754        * ) add_runtime_path=no ;;
2755      esac
2756 fi
2757
2758 if test "$add_runtime_path" = "yes"; then
2759       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2760 echo "configure:2761: checking "for runtime libraries flag"" >&5
2761   case "$opsys" in
2762     sol2 ) dash_r="-R" ;;
2763     decosf* | linux* | irix*) dash_r="-rpath " ;;
2764     *)
2765       dash_r=""
2766       for try_dash_r in "-R" "-R " "-rpath "; do
2767         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2768         
2769 if test "$GCC" = "yes"; then
2770   set x $xe_check_libs; shift; xe_check_libs=""
2771   while test -n "$1"; do
2772     case $1 in
2773       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2774       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2775       -Xlinker* ) ;;
2776       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2777     esac
2778     shift
2779   done
2780 fi
2781         cat > conftest.$ac_ext <<EOF
2782 #line 2783 "configure"
2783 #include "confdefs.h"
2784
2785 int main() {
2786
2787 ; return 0; }
2788 EOF
2789 if { (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2790   rm -rf conftest*
2791   dash_r="$try_dash_r"
2792 else
2793   echo "configure: failed program was:" >&5
2794   cat conftest.$ac_ext >&5
2795 fi
2796 rm -f conftest*
2797         xe_check_libs=""
2798         test -n "$dash_r" && break
2799       done ;;
2800   esac
2801   if test -n "$dash_r";
2802     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2803     else echo "$ac_t""NONE" 1>&6
2804   fi
2805 fi
2806
2807 xe_add_unique_runpath_dir='
2808   xe_add_p=yes
2809   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2810   done
2811   if test "$xe_add_p" = "yes"; then
2812     test -n "$runpath" && runpath="${runpath}:"
2813     runpath="${runpath}${xe_runpath_dir}"
2814     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2815   fi'
2816
2817
2818
2819
2820 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2821     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2822   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2823   
2824         runpath="" runpath_dirs=""
2825   if test -n "$LD_RUN_PATH"; then
2826     runpath="$LD_RUN_PATH"
2827   elif test "$GCC" = "yes"; then
2828         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2829     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2830     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2831     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2832       case "$arg" in P,* | -L* | -R* )
2833         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2834           {
2835 xe_runpath_dir="$dir"
2836   test "$xe_runpath_dir" != "/lib"     -a \
2837         "$xe_runpath_dir" != "/usr/lib" -a \
2838         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2839   eval "$xe_add_unique_runpath_dir"
2840 }
2841         done ;;
2842       esac
2843     done
2844     ld_switch_run="$ld_switch_run_save"
2845     rm -f conftest*
2846   else
2847         for arg in $ld_switch_site $ld_switch_x_site; do
2848       case "$arg" in -L*) {
2849 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2850   test "$xe_runpath_dir" != "/lib"     -a \
2851         "$xe_runpath_dir" != "/usr/lib" -a \
2852         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2853   eval "$xe_add_unique_runpath_dir"
2854 };; esac
2855     done
2856         if test "$opsys $need_motif" = "sol2 yes"; then
2857       xe_runpath_dir="/opt/SUNWdt/lib";
2858       eval "$xe_add_unique_runpath_dir";
2859     fi
2860   fi 
2861   if test -n "$runpath"; then
2862     ld_switch_run="${dash_r}${runpath}"
2863     
2864 if test "$GCC" = "yes"; then
2865   set x $ld_switch_run; shift; ld_switch_run=""
2866   while test -n "$1"; do
2867     case $1 in
2868       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2869       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2870       -Xlinker* ) ;;
2871       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2872     esac
2873     shift
2874   done
2875 fi
2876     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2877   fi
2878 fi
2879
2880
2881
2882
2883 GNU_MALLOC=yes
2884 if test "$with_dlmalloc" != "no"; then
2885         doug_lea_malloc=yes
2886 else
2887         doug_lea_malloc=no
2888 fi
2889 after_morecore_hook_exists=yes
2890 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2891 echo "configure:2892: checking for malloc_get_state" >&5
2892
2893 cat > conftest.$ac_ext <<EOF
2894 #line 2895 "configure"
2895 #include "confdefs.h"
2896 /* System header to define __stub macros and hopefully few prototypes,
2897     which can conflict with char malloc_get_state(); below.  */
2898 #include <assert.h>
2899 /* Override any gcc2 internal prototype to avoid an error.  */
2900 /* We use char because int might match the return type of a gcc2
2901     builtin and then its argument prototype would still apply.  */
2902 char malloc_get_state();
2903
2904 int main() {
2905
2906 /* The GNU C library defines this for functions which it implements
2907     to always fail with ENOSYS.  Some functions are actually named
2908     something starting with __ and the normal name is an alias.  */
2909 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2910 choke me
2911 #else
2912 malloc_get_state();
2913 #endif
2914
2915 ; return 0; }
2916 EOF
2917 if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2918   rm -rf conftest*
2919   eval "ac_cv_func_malloc_get_state=yes"
2920 else
2921   echo "configure: failed program was:" >&5
2922   cat conftest.$ac_ext >&5
2923   rm -rf conftest*
2924   eval "ac_cv_func_malloc_get_state=no"
2925 fi
2926 rm -f conftest*
2927
2928 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2929   echo "$ac_t""yes" 1>&6
2930   :
2931 else
2932   echo "$ac_t""no" 1>&6
2933 doug_lea_malloc=no
2934 fi
2935
2936 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2937 echo "configure:2938: checking for malloc_set_state" >&5
2938
2939 cat > conftest.$ac_ext <<EOF
2940 #line 2941 "configure"
2941 #include "confdefs.h"
2942 /* System header to define __stub macros and hopefully few prototypes,
2943     which can conflict with char malloc_set_state(); below.  */
2944 #include <assert.h>
2945 /* Override any gcc2 internal prototype to avoid an error.  */
2946 /* We use char because int might match the return type of a gcc2
2947     builtin and then its argument prototype would still apply.  */
2948 char malloc_set_state();
2949
2950 int main() {
2951
2952 /* The GNU C library defines this for functions which it implements
2953     to always fail with ENOSYS.  Some functions are actually named
2954     something starting with __ and the normal name is an alias.  */
2955 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
2956 choke me
2957 #else
2958 malloc_set_state();
2959 #endif
2960
2961 ; return 0; }
2962 EOF
2963 if { (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2964   rm -rf conftest*
2965   eval "ac_cv_func_malloc_set_state=yes"
2966 else
2967   echo "configure: failed program was:" >&5
2968   cat conftest.$ac_ext >&5
2969   rm -rf conftest*
2970   eval "ac_cv_func_malloc_set_state=no"
2971 fi
2972 rm -f conftest*
2973
2974 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
2975   echo "$ac_t""yes" 1>&6
2976   :
2977 else
2978   echo "$ac_t""no" 1>&6
2979 doug_lea_malloc=no
2980 fi
2981
2982 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
2983 echo "configure:2984: checking whether __after_morecore_hook exists" >&5
2984 cat > conftest.$ac_ext <<EOF
2985 #line 2986 "configure"
2986 #include "confdefs.h"
2987 extern void (* __after_morecore_hook)();
2988 int main() {
2989 __after_morecore_hook = 0
2990 ; return 0; }
2991 EOF
2992 if { (eval echo configure:2993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2993   rm -rf conftest*
2994   echo "$ac_t""yes" 1>&6
2995 else
2996   echo "configure: failed program was:" >&5
2997   cat conftest.$ac_ext >&5
2998   rm -rf conftest*
2999   echo "$ac_t""no" 1>&6
3000    after_morecore_hook_exists=no
3001 fi
3002 rm -f conftest*
3003 if test "$system_malloc" = "yes" ; then
3004   GNU_MALLOC=no
3005   GNU_MALLOC_reason="
3006   (The GNU allocators don't work with this system configuration)."
3007 elif test "$with_system_malloc" = "yes" ; then
3008   GNU_MALLOC=no
3009   GNU_MALLOC_reason="
3010   (User chose not to use GNU allocators)."
3011 elif test "$with_debug_malloc" = "yes" ; then
3012   GNU_MALLOC=no
3013   GNU_MALLOC_reason="
3014   (User chose to use Debugging Malloc)."
3015 fi
3016
3017 if test "$doug_lea_malloc" = "yes" ; then
3018   if test "$GNU_MALLOC" = yes ; then
3019     GNU_MALLOC_reason="
3020   (Using Doug Lea's new malloc from the GNU C Library.)"
3021   fi
3022   { test "$extra_verbose" = "yes" && cat << \EOF
3023     Defining DOUG_LEA_MALLOC
3024 EOF
3025 cat >> confdefs.h <<\EOF
3026 #define DOUG_LEA_MALLOC 1
3027 EOF
3028 }
3029
3030   if test "$after_morecore_hook_exists" = "no" ; then
3031     GNU_MALLOC_reason="
3032   (Using Doug Lea's new malloc from the Linux C Library.)"
3033     { test "$extra_verbose" = "yes" && cat << \EOF
3034     Defining _NO_MALLOC_WARNING_
3035 EOF
3036 cat >> confdefs.h <<\EOF
3037 #define _NO_MALLOC_WARNING_ 1
3038 EOF
3039 }
3040
3041   fi
3042   use_minimal_tagbits=yes
3043 fi
3044
3045
3046
3047
3048 # Extract the first word of "ranlib", so it can be a program name with args.
3049 set dummy ranlib; ac_word=$2
3050 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3051 echo "configure:3052: checking for $ac_word" >&5
3052
3053 if test -n "$RANLIB"; then
3054   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3055 else
3056   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3057   ac_dummy="$PATH"
3058   for ac_dir in $ac_dummy; do
3059     test -z "$ac_dir" && ac_dir=.
3060     if test -f $ac_dir/$ac_word; then
3061       ac_cv_prog_RANLIB="ranlib"
3062       break
3063     fi
3064   done
3065   IFS="$ac_save_ifs"
3066   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3067 fi
3068 RANLIB="$ac_cv_prog_RANLIB"
3069 if test -n "$RANLIB"; then
3070   echo "$ac_t""$RANLIB" 1>&6
3071 else
3072   echo "$ac_t""no" 1>&6
3073 fi
3074
3075 ac_aux_dir=
3076 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3077   if test -f $ac_dir/install-sh; then
3078     ac_aux_dir=$ac_dir
3079     ac_install_sh="$ac_aux_dir/install-sh -c"
3080     break
3081   elif 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   fi
3086 done
3087 if test -z "$ac_aux_dir"; then
3088   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3089 fi
3090 ac_config_guess=$ac_aux_dir/config.guess
3091 ac_config_sub=$ac_aux_dir/config.sub
3092 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3093
3094 # Find a good install program.  We prefer a C program (faster),
3095 # so one script is as good as another.  But avoid the broken or
3096 # incompatible versions:
3097 # SysV /etc/install, /usr/sbin/install
3098 # SunOS /usr/etc/install
3099 # IRIX /sbin/install
3100 # AIX /bin/install
3101 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3102 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3103 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3104 # ./install, which can be erroneously created by make from ./install.sh.
3105 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3106 echo "configure:3107: checking for a BSD compatible install" >&5
3107 if test -z "$INSTALL"; then
3108
3109   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3110   for ac_dir in $PATH; do
3111     # Account for people who put trailing slashes in PATH elements.
3112     case "$ac_dir/" in
3113     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3114     *)
3115       # OSF1 and SCO ODT 3.0 have their own names for install.
3116       # Don't use installbsd from OSF since it installs stuff as root
3117       # by default.
3118       for ac_prog in ginstall scoinst install; do
3119         if test -f $ac_dir/$ac_prog; then
3120           if test $ac_prog = install &&
3121             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3122             # AIX install.  It has an incompatible calling convention.
3123             :
3124           else
3125             ac_cv_path_install="$ac_dir/$ac_prog -c"
3126             break 2
3127           fi
3128         fi
3129       done
3130       ;;
3131     esac
3132   done
3133   IFS="$ac_save_IFS"
3134
3135   if test "${ac_cv_path_install+set}" = set; then
3136     INSTALL="$ac_cv_path_install"
3137   else
3138     # As a last resort, use the slow shell script.  We don't cache a
3139     # path for INSTALL within a source directory, because that will
3140     # break other packages using the cache if that directory is
3141     # removed, or if the path is relative.
3142     INSTALL="$ac_install_sh"
3143   fi
3144 fi
3145 echo "$ac_t""$INSTALL" 1>&6
3146
3147 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3148 # It thinks the first close brace ends the variable substitution.
3149 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3150
3151 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3152
3153 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3154
3155 for ac_prog in 'bison -y' byacc
3156 do
3157 # Extract the first word of "$ac_prog", so it can be a program name with args.
3158 set dummy $ac_prog; ac_word=$2
3159 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3160 echo "configure:3161: checking for $ac_word" >&5
3161
3162 if test -n "$YACC"; then
3163   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3164 else
3165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3166   ac_dummy="$PATH"
3167   for ac_dir in $ac_dummy; do
3168     test -z "$ac_dir" && ac_dir=.
3169     if test -f $ac_dir/$ac_word; then
3170       ac_cv_prog_YACC="$ac_prog"
3171       break
3172     fi
3173   done
3174   IFS="$ac_save_ifs"
3175 fi
3176 YACC="$ac_cv_prog_YACC"
3177 if test -n "$YACC"; then
3178   echo "$ac_t""$YACC" 1>&6
3179 else
3180   echo "$ac_t""no" 1>&6
3181 fi
3182
3183 test -n "$YACC" && break
3184 done
3185 test -n "$YACC" || YACC="yacc"
3186
3187
3188 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3189 do
3190 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3191 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3192 echo "configure:3193: checking for $ac_hdr" >&5
3193
3194 cat > conftest.$ac_ext <<EOF
3195 #line 3196 "configure"
3196 #include "confdefs.h"
3197 #include <$ac_hdr>
3198 EOF
3199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3200 { (eval echo configure:3201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3202 if test -z "$ac_err"; then
3203   rm -rf conftest*
3204   eval "ac_cv_header_$ac_safe=yes"
3205 else
3206   echo "$ac_err" >&5
3207   echo "configure: failed program was:" >&5
3208   cat conftest.$ac_ext >&5
3209   rm -rf conftest*
3210   eval "ac_cv_header_$ac_safe=no"
3211 fi
3212 rm -f conftest*
3213 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3214   echo "$ac_t""yes" 1>&6
3215     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3216   { test "$extra_verbose" = "yes" && cat << EOF
3217     Defining $ac_tr_hdr
3218 EOF
3219 cat >> confdefs.h <<EOF
3220 #define $ac_tr_hdr 1
3221 EOF
3222 }
3223  
3224 else
3225   echo "$ac_t""no" 1>&6
3226 fi
3227 done
3228
3229 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3230 do
3231 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3232 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3233 echo "configure:3234: checking for $ac_hdr" >&5
3234
3235 cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238 #include <$ac_hdr>
3239 EOF
3240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3241 { (eval echo configure:3242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3243 if test -z "$ac_err"; then
3244   rm -rf conftest*
3245   eval "ac_cv_header_$ac_safe=yes"
3246 else
3247   echo "$ac_err" >&5
3248   echo "configure: failed program was:" >&5
3249   cat conftest.$ac_ext >&5
3250   rm -rf conftest*
3251   eval "ac_cv_header_$ac_safe=no"
3252 fi
3253 rm -f conftest*
3254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3255   echo "$ac_t""yes" 1>&6
3256     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3257   { test "$extra_verbose" = "yes" && cat << EOF
3258     Defining $ac_tr_hdr
3259 EOF
3260 cat >> confdefs.h <<EOF
3261 #define $ac_tr_hdr 1
3262 EOF
3263 }
3264  
3265 else
3266   echo "$ac_t""no" 1>&6
3267 fi
3268 done
3269
3270 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3271 do
3272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3274 echo "configure:3275: checking for $ac_hdr" >&5
3275
3276 cat > conftest.$ac_ext <<EOF
3277 #line 3278 "configure"
3278 #include "confdefs.h"
3279 #include <$ac_hdr>
3280 EOF
3281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3282 { (eval echo configure:3283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3284 if test -z "$ac_err"; then
3285   rm -rf conftest*
3286   eval "ac_cv_header_$ac_safe=yes"
3287 else
3288   echo "$ac_err" >&5
3289   echo "configure: failed program was:" >&5
3290   cat conftest.$ac_ext >&5
3291   rm -rf conftest*
3292   eval "ac_cv_header_$ac_safe=no"
3293 fi
3294 rm -f conftest*
3295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3296   echo "$ac_t""yes" 1>&6
3297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3298   { test "$extra_verbose" = "yes" && cat << EOF
3299     Defining $ac_tr_hdr
3300 EOF
3301 cat >> confdefs.h <<EOF
3302 #define $ac_tr_hdr 1
3303 EOF
3304 }
3305  
3306 else
3307   echo "$ac_t""no" 1>&6
3308 fi
3309 done
3310
3311 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3312 echo "configure:3313: checking for sys/wait.h that is POSIX.1 compatible" >&5
3313
3314 cat > conftest.$ac_ext <<EOF
3315 #line 3316 "configure"
3316 #include "confdefs.h"
3317 #include <sys/types.h>
3318 #include <sys/wait.h>
3319 #ifndef WEXITSTATUS
3320 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3321 #endif
3322 #ifndef WIFEXITED
3323 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3324 #endif
3325 int main() {
3326 int s;
3327 wait (&s);
3328 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3329 ; return 0; }
3330 EOF
3331 if { (eval echo configure:3332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3332   rm -rf conftest*
3333   ac_cv_header_sys_wait_h=yes
3334 else
3335   echo "configure: failed program was:" >&5
3336   cat conftest.$ac_ext >&5
3337   rm -rf conftest*
3338   ac_cv_header_sys_wait_h=no
3339 fi
3340 rm -f conftest*
3341
3342 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3343 if test $ac_cv_header_sys_wait_h = yes; then
3344   { test "$extra_verbose" = "yes" && cat << \EOF
3345     Defining HAVE_SYS_WAIT_H
3346 EOF
3347 cat >> confdefs.h <<\EOF
3348 #define HAVE_SYS_WAIT_H 1
3349 EOF
3350 }
3351
3352 fi
3353
3354 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3355 echo "configure:3356: checking for ANSI C header files" >&5
3356
3357 cat > conftest.$ac_ext <<EOF
3358 #line 3359 "configure"
3359 #include "confdefs.h"
3360 #include <stdlib.h>
3361 #include <stdarg.h>
3362 #include <string.h>
3363 #include <float.h>
3364 EOF
3365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3366 { (eval echo configure:3367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3368 if test -z "$ac_err"; then
3369   rm -rf conftest*
3370   ac_cv_header_stdc=yes
3371 else
3372   echo "$ac_err" >&5
3373   echo "configure: failed program was:" >&5
3374   cat conftest.$ac_ext >&5
3375   rm -rf conftest*
3376   ac_cv_header_stdc=no
3377 fi
3378 rm -f conftest*
3379
3380 if test $ac_cv_header_stdc = yes; then
3381   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3382 cat > conftest.$ac_ext <<EOF
3383 #line 3384 "configure"
3384 #include "confdefs.h"
3385 #include <string.h>
3386 EOF
3387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3388   egrep "memchr" >/dev/null 2>&1; then
3389   :
3390 else
3391   rm -rf conftest*
3392   ac_cv_header_stdc=no
3393 fi
3394 rm -f conftest*
3395
3396 fi
3397
3398 if test $ac_cv_header_stdc = yes; then
3399   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3400 cat > conftest.$ac_ext <<EOF
3401 #line 3402 "configure"
3402 #include "confdefs.h"
3403 #include <stdlib.h>
3404 EOF
3405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3406   egrep "free" >/dev/null 2>&1; then
3407   :
3408 else
3409   rm -rf conftest*
3410   ac_cv_header_stdc=no
3411 fi
3412 rm -f conftest*
3413
3414 fi
3415
3416 if test $ac_cv_header_stdc = yes; then
3417   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3418 cat > conftest.$ac_ext <<EOF
3419 #line 3420 "configure"
3420 #include "confdefs.h"
3421 #include <ctype.h>
3422 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3423 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3424 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3425 int main () { int i; for (i = 0; i < 256; i++)
3426 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3427 exit (0); }
3428
3429 EOF
3430 if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3431 then
3432   :
3433 else
3434   conftest_rc="$?"
3435   echo "configure: failed program was:" >&5
3436   cat conftest.$ac_ext >&5
3437   rm -fr conftest*
3438   ac_cv_header_stdc=no
3439 fi
3440 rm -fr conftest*
3441 fi
3442
3443 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3444 if test $ac_cv_header_stdc = yes; then
3445   { test "$extra_verbose" = "yes" && cat << \EOF
3446     Defining STDC_HEADERS
3447 EOF
3448 cat >> confdefs.h <<\EOF
3449 #define STDC_HEADERS 1
3450 EOF
3451 }
3452
3453 fi
3454
3455 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3456 echo "configure:3457: checking whether time.h and sys/time.h may both be included" >&5
3457
3458 cat > conftest.$ac_ext <<EOF
3459 #line 3460 "configure"
3460 #include "confdefs.h"
3461 #include <sys/types.h>
3462 #include <sys/time.h>
3463 #include <time.h>
3464 int main() {
3465 struct tm *tp;
3466 ; return 0; }
3467 EOF
3468 if { (eval echo configure:3469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3469   rm -rf conftest*
3470   ac_cv_header_time=yes
3471 else
3472   echo "configure: failed program was:" >&5
3473   cat conftest.$ac_ext >&5
3474   rm -rf conftest*
3475   ac_cv_header_time=no
3476 fi
3477 rm -f conftest*
3478
3479 echo "$ac_t""$ac_cv_header_time" 1>&6
3480 if test $ac_cv_header_time = yes; then
3481   { test "$extra_verbose" = "yes" && cat << \EOF
3482     Defining TIME_WITH_SYS_TIME
3483 EOF
3484 cat >> confdefs.h <<\EOF
3485 #define TIME_WITH_SYS_TIME 1
3486 EOF
3487 }
3488
3489 fi
3490
3491 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3492 echo "configure:3493: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3493
3494 cat > conftest.$ac_ext <<EOF
3495 #line 3496 "configure"
3496 #include "confdefs.h"
3497 #include <sys/types.h>
3498 #include <signal.h>
3499 /* NetBSD declares sys_siglist in unistd.h.  */
3500 #ifdef HAVE_UNISTD_H
3501 #include <unistd.h>
3502 #endif
3503 int main() {
3504 char *msg = *(sys_siglist + 1);
3505 ; return 0; }
3506 EOF
3507 if { (eval echo configure:3508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3508   rm -rf conftest*
3509   ac_cv_decl_sys_siglist=yes
3510 else
3511   echo "configure: failed program was:" >&5
3512   cat conftest.$ac_ext >&5
3513   rm -rf conftest*
3514   ac_cv_decl_sys_siglist=no
3515 fi
3516 rm -f conftest*
3517
3518 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3519 if test $ac_cv_decl_sys_siglist = yes; then
3520   { test "$extra_verbose" = "yes" && cat << \EOF
3521     Defining SYS_SIGLIST_DECLARED
3522 EOF
3523 cat >> confdefs.h <<\EOF
3524 #define SYS_SIGLIST_DECLARED 1
3525 EOF
3526 }
3527
3528 fi
3529
3530
3531 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3532 echo "configure:3533: checking for struct utimbuf" >&5
3533 cat > conftest.$ac_ext <<EOF
3534 #line 3535 "configure"
3535 #include "confdefs.h"
3536 #ifdef TIME_WITH_SYS_TIME
3537 #include <sys/time.h>
3538 #include <time.h>
3539 #else
3540 #ifdef HAVE_SYS_TIME_H
3541 #include <sys/time.h>
3542 #else
3543 #include <time.h>
3544 #endif
3545 #endif
3546 #ifdef HAVE_UTIME_H
3547 #include <utime.h>
3548 #endif
3549 int main() {
3550 static struct utimbuf x; x.actime = x.modtime;
3551 ; return 0; }
3552 EOF
3553 if { (eval echo configure:3554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3554   rm -rf conftest*
3555   echo "$ac_t""yes" 1>&6
3556    { test "$extra_verbose" = "yes" && cat << \EOF
3557     Defining HAVE_STRUCT_UTIMBUF
3558 EOF
3559 cat >> confdefs.h <<\EOF
3560 #define HAVE_STRUCT_UTIMBUF 1
3561 EOF
3562 }
3563
3564 else
3565   echo "configure: failed program was:" >&5
3566   cat conftest.$ac_ext >&5
3567   rm -rf conftest*
3568   echo "$ac_t""no" 1>&6
3569 fi
3570 rm -f conftest*
3571
3572 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3573 echo "configure:3574: checking return type of signal handlers" >&5
3574
3575 cat > conftest.$ac_ext <<EOF
3576 #line 3577 "configure"
3577 #include "confdefs.h"
3578 #include <sys/types.h>
3579 #include <signal.h>
3580 #ifdef signal
3581 #undef signal
3582 #endif
3583 #ifdef __cplusplus
3584 extern "C" void (*signal (int, void (*)(int)))(int);
3585 #else
3586 void (*signal ()) ();
3587 #endif
3588
3589 int main() {
3590 int i;
3591 ; return 0; }
3592 EOF
3593 if { (eval echo configure:3594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3594   rm -rf conftest*
3595   ac_cv_type_signal=void
3596 else
3597   echo "configure: failed program was:" >&5
3598   cat conftest.$ac_ext >&5
3599   rm -rf conftest*
3600   ac_cv_type_signal=int
3601 fi
3602 rm -f conftest*
3603
3604 echo "$ac_t""$ac_cv_type_signal" 1>&6
3605 { test "$extra_verbose" = "yes" && cat << EOF
3606     Defining RETSIGTYPE = $ac_cv_type_signal
3607 EOF
3608 cat >> confdefs.h <<EOF
3609 #define RETSIGTYPE $ac_cv_type_signal
3610 EOF
3611 }
3612
3613
3614 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3615 echo "configure:3616: checking for size_t" >&5
3616
3617 cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 #include <sys/types.h>
3621 #if STDC_HEADERS
3622 #include <stdlib.h>
3623 #include <stddef.h>
3624 #endif
3625 EOF
3626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3627   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3628   rm -rf conftest*
3629   ac_cv_type_size_t=yes
3630 else
3631   rm -rf conftest*
3632   ac_cv_type_size_t=no
3633 fi
3634 rm -f conftest*
3635
3636 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3637 if test $ac_cv_type_size_t = no; then
3638   { test "$extra_verbose" = "yes" && cat << \EOF
3639     Defining size_t = unsigned
3640 EOF
3641 cat >> confdefs.h <<\EOF
3642 #define size_t unsigned
3643 EOF
3644 }
3645
3646 fi
3647
3648 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3649 echo "configure:3650: checking for pid_t" >&5
3650
3651 cat > conftest.$ac_ext <<EOF
3652 #line 3653 "configure"
3653 #include "confdefs.h"
3654 #include <sys/types.h>
3655 #if STDC_HEADERS
3656 #include <stdlib.h>
3657 #include <stddef.h>
3658 #endif
3659 EOF
3660 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3661   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3662   rm -rf conftest*
3663   ac_cv_type_pid_t=yes
3664 else
3665   rm -rf conftest*
3666   ac_cv_type_pid_t=no
3667 fi
3668 rm -f conftest*
3669
3670 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3671 if test $ac_cv_type_pid_t = no; then
3672   { test "$extra_verbose" = "yes" && cat << \EOF
3673     Defining pid_t = int
3674 EOF
3675 cat >> confdefs.h <<\EOF
3676 #define pid_t int
3677 EOF
3678 }
3679
3680 fi
3681
3682 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3683 echo "configure:3684: checking for uid_t in sys/types.h" >&5
3684
3685 cat > conftest.$ac_ext <<EOF
3686 #line 3687 "configure"
3687 #include "confdefs.h"
3688 #include <sys/types.h>
3689 EOF
3690 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3691   egrep "uid_t" >/dev/null 2>&1; then
3692   rm -rf conftest*
3693   ac_cv_type_uid_t=yes
3694 else
3695   rm -rf conftest*
3696   ac_cv_type_uid_t=no
3697 fi
3698 rm -f conftest*
3699
3700
3701 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3702 if test $ac_cv_type_uid_t = no; then
3703   { test "$extra_verbose" = "yes" && cat << \EOF
3704     Defining uid_t = int
3705 EOF
3706 cat >> confdefs.h <<\EOF
3707 #define uid_t int
3708 EOF
3709 }
3710
3711   { test "$extra_verbose" = "yes" && cat << \EOF
3712     Defining gid_t = int
3713 EOF
3714 cat >> confdefs.h <<\EOF
3715 #define gid_t int
3716 EOF
3717 }
3718
3719 fi
3720
3721 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3722 echo "configure:3723: checking for mode_t" >&5
3723
3724 cat > conftest.$ac_ext <<EOF
3725 #line 3726 "configure"
3726 #include "confdefs.h"
3727 #include <sys/types.h>
3728 #if STDC_HEADERS
3729 #include <stdlib.h>
3730 #include <stddef.h>
3731 #endif
3732 EOF
3733 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3734   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3735   rm -rf conftest*
3736   ac_cv_type_mode_t=yes
3737 else
3738   rm -rf conftest*
3739   ac_cv_type_mode_t=no
3740 fi
3741 rm -f conftest*
3742
3743 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3744 if test $ac_cv_type_mode_t = no; then
3745   { test "$extra_verbose" = "yes" && cat << \EOF
3746     Defining mode_t = int
3747 EOF
3748 cat >> confdefs.h <<\EOF
3749 #define mode_t int
3750 EOF
3751 }
3752
3753 fi
3754
3755 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3756 echo "configure:3757: checking for off_t" >&5
3757
3758 cat > conftest.$ac_ext <<EOF
3759 #line 3760 "configure"
3760 #include "confdefs.h"
3761 #include <sys/types.h>
3762 #if STDC_HEADERS
3763 #include <stdlib.h>
3764 #include <stddef.h>
3765 #endif
3766 EOF
3767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3768   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3769   rm -rf conftest*
3770   ac_cv_type_off_t=yes
3771 else
3772   rm -rf conftest*
3773   ac_cv_type_off_t=no
3774 fi
3775 rm -f conftest*
3776
3777 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3778 if test $ac_cv_type_off_t = no; then
3779   { test "$extra_verbose" = "yes" && cat << \EOF
3780     Defining off_t = long
3781 EOF
3782 cat >> confdefs.h <<\EOF
3783 #define off_t long
3784 EOF
3785 }
3786
3787 fi
3788
3789
3790 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3791 echo "configure:3792: checking for struct timeval" >&5
3792 cat > conftest.$ac_ext <<EOF
3793 #line 3794 "configure"
3794 #include "confdefs.h"
3795 #ifdef TIME_WITH_SYS_TIME
3796 #include <sys/time.h>
3797 #include <time.h>
3798 #else
3799 #ifdef HAVE_SYS_TIME_H
3800 #include <sys/time.h>
3801 #else
3802 #include <time.h>
3803 #endif
3804 #endif
3805 int main() {
3806 static struct timeval x; x.tv_sec = x.tv_usec;
3807 ; return 0; }
3808 EOF
3809 if { (eval echo configure:3810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3810   rm -rf conftest*
3811   echo "$ac_t""yes" 1>&6
3812   HAVE_TIMEVAL=yes
3813   { test "$extra_verbose" = "yes" && cat << \EOF
3814     Defining HAVE_TIMEVAL
3815 EOF
3816 cat >> confdefs.h <<\EOF
3817 #define HAVE_TIMEVAL 1
3818 EOF
3819 }
3820
3821 else
3822   echo "configure: failed program was:" >&5
3823   cat conftest.$ac_ext >&5
3824   rm -rf conftest*
3825   echo "$ac_t""no" 1>&6
3826    HAVE_TIMEVAL=no
3827 fi
3828 rm -f conftest*
3829
3830 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3831 echo "configure:3832: checking whether struct tm is in sys/time.h or time.h" >&5
3832
3833 cat > conftest.$ac_ext <<EOF
3834 #line 3835 "configure"
3835 #include "confdefs.h"
3836 #include <sys/types.h>
3837 #include <time.h>
3838 int main() {
3839 struct tm *tp; tp->tm_sec;
3840 ; return 0; }
3841 EOF
3842 if { (eval echo configure:3843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3843   rm -rf conftest*
3844   ac_cv_struct_tm=time.h
3845 else
3846   echo "configure: failed program was:" >&5
3847   cat conftest.$ac_ext >&5
3848   rm -rf conftest*
3849   ac_cv_struct_tm=sys/time.h
3850 fi
3851 rm -f conftest*
3852
3853 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3854 if test $ac_cv_struct_tm = sys/time.h; then
3855   { test "$extra_verbose" = "yes" && cat << \EOF
3856     Defining TM_IN_SYS_TIME
3857 EOF
3858 cat >> confdefs.h <<\EOF
3859 #define TM_IN_SYS_TIME 1
3860 EOF
3861 }
3862
3863 fi
3864
3865 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3866 echo "configure:3867: checking for tm_zone in struct tm" >&5
3867
3868 cat > conftest.$ac_ext <<EOF
3869 #line 3870 "configure"
3870 #include "confdefs.h"
3871 #include <sys/types.h>
3872 #include <$ac_cv_struct_tm>
3873 int main() {
3874 struct tm tm; tm.tm_zone;
3875 ; return 0; }
3876 EOF
3877 if { (eval echo configure:3878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3878   rm -rf conftest*
3879   ac_cv_struct_tm_zone=yes
3880 else
3881   echo "configure: failed program was:" >&5
3882   cat conftest.$ac_ext >&5
3883   rm -rf conftest*
3884   ac_cv_struct_tm_zone=no
3885 fi
3886 rm -f conftest*
3887
3888 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3889 if test "$ac_cv_struct_tm_zone" = yes; then
3890   { test "$extra_verbose" = "yes" && cat << \EOF
3891     Defining HAVE_TM_ZONE
3892 EOF
3893 cat >> confdefs.h <<\EOF
3894 #define HAVE_TM_ZONE 1
3895 EOF
3896 }
3897
3898 else
3899   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3900 echo "configure:3901: checking for tzname" >&5
3901
3902 cat > conftest.$ac_ext <<EOF
3903 #line 3904 "configure"
3904 #include "confdefs.h"
3905 #include <time.h>
3906 #ifndef tzname /* For SGI.  */
3907 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3908 #endif
3909 int main() {
3910 atoi(*tzname);
3911 ; return 0; }
3912 EOF
3913 if { (eval echo configure:3914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3914   rm -rf conftest*
3915   ac_cv_var_tzname=yes
3916 else
3917   echo "configure: failed program was:" >&5
3918   cat conftest.$ac_ext >&5
3919   rm -rf conftest*
3920   ac_cv_var_tzname=no
3921 fi
3922 rm -f conftest*
3923
3924 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3925   if test $ac_cv_var_tzname = yes; then
3926     { test "$extra_verbose" = "yes" && cat << \EOF
3927     Defining HAVE_TZNAME
3928 EOF
3929 cat >> confdefs.h <<\EOF
3930 #define HAVE_TZNAME 1
3931 EOF
3932 }
3933
3934   fi
3935 fi
3936
3937
3938 echo $ac_n "checking for working const""... $ac_c" 1>&6
3939 echo "configure:3940: checking for working const" >&5
3940
3941 cat > conftest.$ac_ext <<EOF
3942 #line 3943 "configure"
3943 #include "confdefs.h"
3944
3945 int main() {
3946
3947 /* Ultrix mips cc rejects this.  */
3948 typedef int charset[2]; const charset x;
3949 /* SunOS 4.1.1 cc rejects this.  */
3950 char const *const *ccp;
3951 char **p;
3952 /* NEC SVR4.0.2 mips cc rejects this.  */
3953 struct point {int x, y;};
3954 static struct point const zero = {0,0};
3955 /* AIX XL C 1.02.0.0 rejects this.
3956    It does not let you subtract one const X* pointer from another in an arm
3957    of an if-expression whose if-part is not a constant expression */
3958 const char *g = "string";
3959 ccp = &g + (g ? g-g : 0);
3960 /* HPUX 7.0 cc rejects these. */
3961 ++ccp;
3962 p = (char**) ccp;
3963 ccp = (char const *const *) p;
3964 { /* SCO 3.2v4 cc rejects this.  */
3965   char *t;
3966   char const *s = 0 ? (char *) 0 : (char const *) 0;
3967
3968   *t++ = 0;
3969 }
3970 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3971   int x[] = {25, 17};
3972   const int *foo = &x[0];
3973   ++foo;
3974 }
3975 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3976   typedef const int *iptr;
3977   iptr p = 0;
3978   ++p;
3979 }
3980 { /* AIX XL C 1.02.0.0 rejects this saying
3981      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3982   struct s { int j; const int *ap[3]; };
3983   struct s *b; b->j = 5;
3984 }
3985 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3986   const int foo = 10;
3987 }
3988
3989 ; return 0; }
3990 EOF
3991 if { (eval echo configure:3992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3992   rm -rf conftest*
3993   ac_cv_c_const=yes
3994 else
3995   echo "configure: failed program was:" >&5
3996   cat conftest.$ac_ext >&5
3997   rm -rf conftest*
3998   ac_cv_c_const=no
3999 fi
4000 rm -f conftest*
4001
4002 echo "$ac_t""$ac_cv_c_const" 1>&6
4003 if test $ac_cv_c_const = no; then
4004   { test "$extra_verbose" = "yes" && cat << \EOF
4005     Defining const = 
4006 EOF
4007 cat >> confdefs.h <<\EOF
4008 #define const 
4009 EOF
4010 }
4011
4012 fi
4013
4014
4015 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4016 echo "configure:4017: checking whether ${MAKE-make} sets \${MAKE}" >&5
4017 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4018
4019 cat > conftestmake <<\EOF
4020 all:
4021         @echo 'ac_maketemp="${MAKE}"'
4022 EOF
4023 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4024 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4025 if test -n "$ac_maketemp"; then
4026   eval ac_cv_prog_make_${ac_make}_set=yes
4027 else
4028   eval ac_cv_prog_make_${ac_make}_set=no
4029 fi
4030 rm -f conftestmake
4031 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4032   echo "$ac_t""yes" 1>&6
4033   SET_MAKE=
4034 else
4035   echo "$ac_t""no" 1>&6
4036   SET_MAKE="MAKE=${MAKE-make}"
4037 fi
4038
4039
4040 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4041 echo "configure:4042: checking whether byte ordering is bigendian" >&5
4042
4043 ac_cv_c_bigendian=unknown
4044 # See if sys/param.h defines the BYTE_ORDER macro.
4045 cat > conftest.$ac_ext <<EOF
4046 #line 4047 "configure"
4047 #include "confdefs.h"
4048 #include <sys/types.h>
4049 #include <sys/param.h>
4050 int main() {
4051
4052 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4053  bogus endian macros
4054 #endif
4055 ; return 0; }
4056 EOF
4057 if { (eval echo configure:4058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4058   rm -rf conftest*
4059   # It does; now see whether it defined to BIG_ENDIAN or not.
4060 cat > conftest.$ac_ext <<EOF
4061 #line 4062 "configure"
4062 #include "confdefs.h"
4063 #include <sys/types.h>
4064 #include <sys/param.h>
4065 int main() {
4066
4067 #if BYTE_ORDER != BIG_ENDIAN
4068  not big endian
4069 #endif
4070 ; return 0; }
4071 EOF
4072 if { (eval echo configure:4073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4073   rm -rf conftest*
4074   ac_cv_c_bigendian=yes
4075 else
4076   echo "configure: failed program was:" >&5
4077   cat conftest.$ac_ext >&5
4078   rm -rf conftest*
4079   ac_cv_c_bigendian=no
4080 fi
4081 rm -f conftest*
4082 else
4083   echo "configure: failed program was:" >&5
4084   cat conftest.$ac_ext >&5
4085 fi
4086 rm -f conftest*
4087 if test $ac_cv_c_bigendian = unknown; then
4088 cat > conftest.$ac_ext <<EOF
4089 #line 4090 "configure"
4090 #include "confdefs.h"
4091 main () {
4092   /* Are we little or big endian?  From Harbison&Steele.  */
4093   union
4094   {
4095     long l;
4096     char c[sizeof (long)];
4097   } u;
4098   u.l = 1;
4099   exit (u.c[sizeof (long) - 1] == 1);
4100 }
4101 EOF
4102 if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4103 then
4104   ac_cv_c_bigendian=no
4105 else
4106   conftest_rc="$?"
4107   echo "configure: failed program was:" >&5
4108   cat conftest.$ac_ext >&5
4109   rm -fr conftest*
4110   ac_cv_c_bigendian=yes
4111 fi
4112 rm -fr conftest*
4113 fi
4114
4115 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4116 if test $ac_cv_c_bigendian = yes; then
4117   { test "$extra_verbose" = "yes" && cat << \EOF
4118     Defining WORDS_BIGENDIAN
4119 EOF
4120 cat >> confdefs.h <<\EOF
4121 #define WORDS_BIGENDIAN 1
4122 EOF
4123 }
4124
4125 fi
4126
4127
4128 echo $ac_n "checking size of short""... $ac_c" 1>&6
4129 echo "configure:4130: checking size of short" >&5
4130
4131 cat > conftest.$ac_ext <<EOF
4132 #line 4133 "configure"
4133 #include "confdefs.h"
4134 #include <stdio.h>
4135 main()
4136 {
4137   FILE *f=fopen("conftestval", "w");
4138   if (!f) exit(1);
4139   fprintf(f, "%d\n", sizeof(short));
4140   exit(0);
4141 }
4142 EOF
4143 if { (eval echo configure:4144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4144 then
4145   ac_cv_sizeof_short=`cat conftestval`
4146 else
4147   conftest_rc="$?"
4148   echo "configure: failed program was:" >&5
4149   cat conftest.$ac_ext >&5
4150   rm -fr conftest*
4151   ac_cv_sizeof_short=0
4152 fi
4153 rm -fr conftest*
4154 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4155 { test "$extra_verbose" = "yes" && cat << EOF
4156     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4157 EOF
4158 cat >> confdefs.h <<EOF
4159 #define SIZEOF_SHORT $ac_cv_sizeof_short
4160 EOF
4161 }
4162
4163
4164 if test "$ac_cv_sizeof_short" = 0; then
4165   echo ""
4166   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4167   echo "*** PANIC *** Please examine config.log for compilation errors."
4168   exit 1
4169 fi
4170 echo $ac_n "checking size of int""... $ac_c" 1>&6
4171 echo "configure:4172: checking size of int" >&5
4172
4173 cat > conftest.$ac_ext <<EOF
4174 #line 4175 "configure"
4175 #include "confdefs.h"
4176 #include <stdio.h>
4177 main()
4178 {
4179   FILE *f=fopen("conftestval", "w");
4180   if (!f) exit(1);
4181   fprintf(f, "%d\n", sizeof(int));
4182   exit(0);
4183 }
4184 EOF
4185 if { (eval echo configure:4186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4186 then
4187   ac_cv_sizeof_int=`cat conftestval`
4188 else
4189   conftest_rc="$?"
4190   echo "configure: failed program was:" >&5
4191   cat conftest.$ac_ext >&5
4192   rm -fr conftest*
4193   ac_cv_sizeof_int=0
4194 fi
4195 rm -fr conftest*
4196 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4197 { test "$extra_verbose" = "yes" && cat << EOF
4198     Defining SIZEOF_INT = $ac_cv_sizeof_int
4199 EOF
4200 cat >> confdefs.h <<EOF
4201 #define SIZEOF_INT $ac_cv_sizeof_int
4202 EOF
4203 }
4204
4205
4206 echo $ac_n "checking size of long""... $ac_c" 1>&6
4207 echo "configure:4208: checking size of long" >&5
4208
4209 cat > conftest.$ac_ext <<EOF
4210 #line 4211 "configure"
4211 #include "confdefs.h"
4212 #include <stdio.h>
4213 main()
4214 {
4215   FILE *f=fopen("conftestval", "w");
4216   if (!f) exit(1);
4217   fprintf(f, "%d\n", sizeof(long));
4218   exit(0);
4219 }
4220 EOF
4221 if { (eval echo configure:4222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4222 then
4223   ac_cv_sizeof_long=`cat conftestval`
4224 else
4225   conftest_rc="$?"
4226   echo "configure: failed program was:" >&5
4227   cat conftest.$ac_ext >&5
4228   rm -fr conftest*
4229   ac_cv_sizeof_long=0
4230 fi
4231 rm -fr conftest*
4232 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4233 { test "$extra_verbose" = "yes" && cat << EOF
4234     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4235 EOF
4236 cat >> confdefs.h <<EOF
4237 #define SIZEOF_LONG $ac_cv_sizeof_long
4238 EOF
4239 }
4240
4241
4242 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4243 echo "configure:4244: checking size of long long" >&5
4244
4245 cat > conftest.$ac_ext <<EOF
4246 #line 4247 "configure"
4247 #include "confdefs.h"
4248 #include <stdio.h>
4249 main()
4250 {
4251   FILE *f=fopen("conftestval", "w");
4252   if (!f) exit(1);
4253   fprintf(f, "%d\n", sizeof(long long));
4254   exit(0);
4255 }
4256 EOF
4257 if { (eval echo configure:4258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4258 then
4259   ac_cv_sizeof_long_long=`cat conftestval`
4260 else
4261   conftest_rc="$?"
4262   echo "configure: failed program was:" >&5
4263   cat conftest.$ac_ext >&5
4264   rm -fr conftest*
4265   ac_cv_sizeof_long_long=0
4266 fi
4267 rm -fr conftest*
4268 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4269 { test "$extra_verbose" = "yes" && cat << EOF
4270     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4271 EOF
4272 cat >> confdefs.h <<EOF
4273 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4274 EOF
4275 }
4276
4277
4278 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4279 echo "configure:4280: checking size of void *" >&5
4280
4281 cat > conftest.$ac_ext <<EOF
4282 #line 4283 "configure"
4283 #include "confdefs.h"
4284 #include <stdio.h>
4285 main()
4286 {
4287   FILE *f=fopen("conftestval", "w");
4288   if (!f) exit(1);
4289   fprintf(f, "%d\n", sizeof(void *));
4290   exit(0);
4291 }
4292 EOF
4293 if { (eval echo configure:4294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4294 then
4295   ac_cv_sizeof_void_p=`cat conftestval`
4296 else
4297   conftest_rc="$?"
4298   echo "configure: failed program was:" >&5
4299   cat conftest.$ac_ext >&5
4300   rm -fr conftest*
4301   ac_cv_sizeof_void_p=0
4302 fi
4303 rm -fr conftest*
4304 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4305 { test "$extra_verbose" = "yes" && cat << EOF
4306     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4307 EOF
4308 cat >> confdefs.h <<EOF
4309 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4310 EOF
4311 }
4312
4313
4314
4315 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4316 echo "configure:4317: checking for long file names" >&5
4317
4318 ac_cv_sys_long_file_names=yes
4319 # Test for long file names in all the places we know might matter:
4320 #      .                the current directory, where building will happen
4321 #      $prefix/lib      where we will be installing things
4322 #      $exec_prefix/lib likewise
4323 # eval it to expand exec_prefix.
4324 #      $TMPDIR          if set, where it might want to write temporary files
4325 # if $TMPDIR is not set:
4326 #      /tmp             where it might want to write temporary files
4327 #      /var/tmp         likewise
4328 #      /usr/tmp         likewise
4329 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4330   ac_tmpdirs="$TMPDIR"
4331 else
4332   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4333 fi
4334 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4335   test -d $ac_dir || continue
4336   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4337   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4338   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4339   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4340   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4341     ac_cv_sys_long_file_names=no
4342     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4343     break
4344   fi
4345   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4346 done
4347
4348 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4349 if test $ac_cv_sys_long_file_names = yes; then
4350   { test "$extra_verbose" = "yes" && cat << \EOF
4351     Defining HAVE_LONG_FILE_NAMES
4352 EOF
4353 cat >> confdefs.h <<\EOF
4354 #define HAVE_LONG_FILE_NAMES 1
4355 EOF
4356 }
4357
4358 fi
4359
4360
4361 echo $ac_n "checking for sin""... $ac_c" 1>&6
4362 echo "configure:4363: checking for sin" >&5
4363
4364 cat > conftest.$ac_ext <<EOF
4365 #line 4366 "configure"
4366 #include "confdefs.h"
4367 /* System header to define __stub macros and hopefully few prototypes,
4368     which can conflict with char sin(); below.  */
4369 #include <assert.h>
4370 /* Override any gcc2 internal prototype to avoid an error.  */
4371 /* We use char because int might match the return type of a gcc2
4372     builtin and then its argument prototype would still apply.  */
4373 char sin();
4374
4375 int main() {
4376
4377 /* The GNU C library defines this for functions which it implements
4378     to always fail with ENOSYS.  Some functions are actually named
4379     something starting with __ and the normal name is an alias.  */
4380 #if defined (__stub_sin) || defined (__stub___sin)
4381 choke me
4382 #else
4383 sin();
4384 #endif
4385
4386 ; return 0; }
4387 EOF
4388 if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4389   rm -rf conftest*
4390   eval "ac_cv_func_sin=yes"
4391 else
4392   echo "configure: failed program was:" >&5
4393   cat conftest.$ac_ext >&5
4394   rm -rf conftest*
4395   eval "ac_cv_func_sin=no"
4396 fi
4397 rm -f conftest*
4398
4399 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4400   echo "$ac_t""yes" 1>&6
4401   :
4402 else
4403   echo "$ac_t""no" 1>&6
4404
4405 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4406 echo "configure:4407: checking for sin in -lm" >&5
4407 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4408
4409 xe_check_libs=" -lm "
4410 cat > conftest.$ac_ext <<EOF
4411 #line 4412 "configure"
4412 #include "confdefs.h"
4413 /* Override any gcc2 internal prototype to avoid an error.  */
4414 /* We use char because int might match the return type of a gcc2
4415     builtin and then its argument prototype would still apply.  */
4416 char sin();
4417
4418 int main() {
4419 sin()
4420 ; return 0; }
4421 EOF
4422 if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4423   rm -rf conftest*
4424   eval "ac_cv_lib_$ac_lib_var=yes"
4425 else
4426   echo "configure: failed program was:" >&5
4427   cat conftest.$ac_ext >&5
4428   rm -rf conftest*
4429   eval "ac_cv_lib_$ac_lib_var=no"
4430 fi
4431 rm -f conftest*
4432 xe_check_libs=""
4433
4434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4435   echo "$ac_t""yes" 1>&6
4436     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4437     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4438   { test "$extra_verbose" = "yes" && cat << EOF
4439     Defining $ac_tr_lib
4440 EOF
4441 cat >> confdefs.h <<EOF
4442 #define $ac_tr_lib 1
4443 EOF
4444 }
4445
4446   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4447
4448 else
4449   echo "$ac_t""no" 1>&6
4450 fi
4451
4452
4453 fi
4454
4455
4456 { test "$extra_verbose" = "yes" && cat << \EOF
4457     Defining LISP_FLOAT_TYPE
4458 EOF
4459 cat >> confdefs.h <<\EOF
4460 #define LISP_FLOAT_TYPE 1
4461 EOF
4462 }
4463
4464
4465 cat > conftest.$ac_ext <<EOF
4466 #line 4467 "configure"
4467 #include "confdefs.h"
4468 #include <math.h>
4469 int main() {
4470 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4471 ; return 0; }
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4474   rm -rf conftest*
4475   { test "$extra_verbose" = "yes" && cat << \EOF
4476     Defining HAVE_INVERSE_HYPERBOLIC
4477 EOF
4478 cat >> confdefs.h <<\EOF
4479 #define HAVE_INVERSE_HYPERBOLIC 1
4480 EOF
4481 }
4482
4483 else
4484   echo "configure: failed program was:" >&5
4485   cat conftest.$ac_ext >&5
4486 fi
4487 rm -f conftest*
4488
4489 echo "checking type of mail spool file locking" 1>&6
4490 echo "configure:4491: checking type of mail spool file locking" >&5
4491 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4492 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4493 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4494     Defining REAL_MAIL_USE_LOCKF
4495 EOF
4496 cat >> confdefs.h <<\EOF
4497 #define REAL_MAIL_USE_LOCKF 1
4498 EOF
4499 }
4500
4501 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4502     Defining REAL_MAIL_USE_FLOCK
4503 EOF
4504 cat >> confdefs.h <<\EOF
4505 #define REAL_MAIL_USE_FLOCK 1
4506 EOF
4507 }
4508
4509 else mail_locking="dot-locking"
4510 fi
4511
4512 case "$opsys" in decosf*)
4513   
4514 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4515 echo "configure:4516: checking for cma_open in -lpthreads" >&5
4516 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4517
4518 xe_check_libs=" -lpthreads "
4519 cat > conftest.$ac_ext <<EOF
4520 #line 4521 "configure"
4521 #include "confdefs.h"
4522 /* Override any gcc2 internal prototype to avoid an error.  */
4523 /* We use char because int might match the return type of a gcc2
4524     builtin and then its argument prototype would still apply.  */
4525 char cma_open();
4526
4527 int main() {
4528 cma_open()
4529 ; return 0; }
4530 EOF
4531 if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4532   rm -rf conftest*
4533   eval "ac_cv_lib_$ac_lib_var=yes"
4534 else
4535   echo "configure: failed program was:" >&5
4536   cat conftest.$ac_ext >&5
4537   rm -rf conftest*
4538   eval "ac_cv_lib_$ac_lib_var=no"
4539 fi
4540 rm -f conftest*
4541 xe_check_libs=""
4542
4543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4544   echo "$ac_t""yes" 1>&6
4545     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4546     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4547   { test "$extra_verbose" = "yes" && cat << EOF
4548     Defining $ac_tr_lib
4549 EOF
4550 cat >> confdefs.h <<EOF
4551 #define $ac_tr_lib 1
4552 EOF
4553 }
4554
4555   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4556
4557 else
4558   echo "$ac_t""no" 1>&6
4559 fi
4560
4561
4562   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4563     c_switch_site="$c_switch_site -threads" ;;
4564 esac
4565
4566 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4567 echo "configure:4568: checking whether the -xildoff compiler flag is required" >&5
4568 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4569   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4570     then echo "$ac_t""no" 1>&6;
4571     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
4572   fi
4573   else echo "$ac_t""no" 1>&6
4574 fi
4575
4576 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4577   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4578 echo "configure:4579: checking for \"-z ignore\" linker flag" >&5
4579   case "`ld -h 2>&1`" in
4580     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4581       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4582     *) echo "$ac_t""no" 1>&6 ;;
4583   esac
4584 fi
4585
4586
4587 echo "checking "for specified window system"" 1>&6
4588 echo "configure:4589: checking "for specified window system"" >&5
4589
4590 if test "$with_x11" != "no"; then
4591     test "$x_includes $x_libraries" != "NONE NONE" && \
4592    window_system=x11 with_x11=yes
4593
4594         
4595       if test "$x_includes $x_libraries" = "NONE NONE" \
4596     -a -n "$OPENWINHOME" \
4597     -a "$OPENWINHOME" != "/usr/openwin" \
4598     -a -d "$OPENWINHOME"; then
4599       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4600       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4601       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4602   fi
4603
4604   if test "$x_includes" = "NONE"; then
4605                     for dir in "/usr/X11" "/usr/X11R6"; do
4606       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4607     done
4608   fi
4609
4610   if test "$x_libraries" = "NONE"; then
4611     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4612       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4613     done
4614   fi
4615
4616   # If we find X, set shell vars x_includes and x_libraries to the
4617 # paths, otherwise set no_x=yes.
4618 # Uses ac_ vars as temps to allow command line to override cache and checks.
4619 # --without-x overrides everything else, but does not touch the cache.
4620 echo $ac_n "checking for X""... $ac_c" 1>&6
4621 echo "configure:4622: checking for X" >&5
4622
4623 # Check whether --with-x or --without-x was given.
4624 if test "${with_x+set}" = set; then
4625   withval="$with_x"
4626   :
4627 fi
4628
4629 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4630 if test "x$with_x" = xno; then
4631   # The user explicitly disabled X.
4632   have_x=disabled
4633 else
4634   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4635     # Both variables are already set.
4636     have_x=yes
4637   else
4638
4639 # One or both of the vars are not set, and there is no cached value.
4640 ac_x_includes=NO ac_x_libraries=NO
4641 rm -fr conftestdir
4642 if mkdir conftestdir; then
4643   cd conftestdir
4644   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4645   cat > Imakefile <<'EOF'
4646 acfindx:
4647         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4648 EOF
4649   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4650     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4651     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4652     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4653     for ac_extension in a so sl; do
4654       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4655         test -f $ac_im_libdir/libX11.$ac_extension; then
4656         ac_im_usrlibdir=$ac_im_libdir; break
4657       fi
4658     done
4659     # Screen out bogus values from the imake configuration.  They are
4660     # bogus both because they are the default anyway, and because
4661     # using them would break gcc on systems where it needs fixed includes.
4662     case "$ac_im_incroot" in
4663         /usr/include) ;;
4664         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4665     esac
4666     case "$ac_im_usrlibdir" in
4667         /usr/lib | /lib) ;;
4668         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4669     esac
4670   fi
4671   cd ..
4672   rm -fr conftestdir
4673 fi
4674
4675 if test "$ac_x_includes" = NO; then
4676   # Guess where to find include files, by looking for this one X11 .h file.
4677   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4678
4679   # First, try using that file with no special directory specified.
4680 cat > conftest.$ac_ext <<EOF
4681 #line 4682 "configure"
4682 #include "confdefs.h"
4683 #include <$x_direct_test_include>
4684 EOF
4685 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4686 { (eval echo configure:4687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4687 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4688 if test -z "$ac_err"; then
4689   rm -rf conftest*
4690   # We can compile using X headers with no special include directory.
4691 ac_x_includes=
4692 else
4693   echo "$ac_err" >&5
4694   echo "configure: failed program was:" >&5
4695   cat conftest.$ac_ext >&5
4696   rm -rf conftest*
4697   # Look for the header file in a standard set of common directories.
4698 # Check X11 before X11Rn because it is often a symlink to the current release.
4699   for ac_dir in               \
4700     /usr/X11/include          \
4701     /usr/X11R6/include        \
4702     /usr/X11R5/include        \
4703     /usr/X11R4/include        \
4704                               \
4705     /usr/include/X11          \
4706     /usr/include/X11R6        \
4707     /usr/include/X11R5        \
4708     /usr/include/X11R4        \
4709                               \
4710     /usr/local/X11/include    \
4711     /usr/local/X11R6/include  \
4712     /usr/local/X11R5/include  \
4713     /usr/local/X11R4/include  \
4714                               \
4715     /usr/local/include/X11    \
4716     /usr/local/include/X11R6  \
4717     /usr/local/include/X11R5  \
4718     /usr/local/include/X11R4  \
4719                               \
4720     /usr/X386/include         \
4721     /usr/x386/include         \
4722     /usr/XFree86/include/X11  \
4723                               \
4724     /usr/include              \
4725     /usr/local/include        \
4726     /usr/unsupported/include  \
4727     /usr/athena/include       \
4728     /usr/local/x11r5/include  \
4729     /usr/lpp/Xamples/include  \
4730                               \
4731     /usr/openwin/include      \
4732     /usr/openwin/share/include \
4733     ; \
4734   do
4735     if test -r "$ac_dir/$x_direct_test_include"; then
4736       ac_x_includes=$ac_dir
4737       break
4738     fi
4739   done
4740 fi
4741 rm -f conftest*
4742 fi # $ac_x_includes = NO
4743
4744 if test "$ac_x_libraries" = NO; then
4745   # Check for the libraries.
4746
4747   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4748   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4749
4750   # See if we find them without any special options.
4751   # Don't add to $LIBS permanently.
4752   ac_save_LIBS="$LIBS"
4753   LIBS="-l$x_direct_test_library $LIBS"
4754 cat > conftest.$ac_ext <<EOF
4755 #line 4756 "configure"
4756 #include "confdefs.h"
4757
4758 int main() {
4759 ${x_direct_test_function}()
4760 ; return 0; }
4761 EOF
4762 if { (eval echo configure:4763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4763   rm -rf conftest*
4764   LIBS="$ac_save_LIBS"
4765 # We can link X programs with no special library path.
4766 ac_x_libraries=
4767 else
4768   echo "configure: failed program was:" >&5
4769   cat conftest.$ac_ext >&5
4770   rm -rf conftest*
4771   LIBS="$ac_save_LIBS"
4772 # First see if replacing the include by lib works.
4773 # Check X11 before X11Rn because it is often a symlink to the current release.
4774 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4775     /usr/X11/lib          \
4776     /usr/X11R6/lib        \
4777     /usr/X11R5/lib        \
4778     /usr/X11R4/lib        \
4779                           \
4780     /usr/lib/X11          \
4781     /usr/lib/X11R6        \
4782     /usr/lib/X11R5        \
4783     /usr/lib/X11R4        \
4784                           \
4785     /usr/local/X11/lib    \
4786     /usr/local/X11R6/lib  \
4787     /usr/local/X11R5/lib  \
4788     /usr/local/X11R4/lib  \
4789                           \
4790     /usr/local/lib/X11    \
4791     /usr/local/lib/X11R6  \
4792     /usr/local/lib/X11R5  \
4793     /usr/local/lib/X11R4  \
4794                           \
4795     /usr/X386/lib         \
4796     /usr/x386/lib         \
4797     /usr/XFree86/lib/X11  \
4798                           \
4799     /usr/lib              \
4800     /usr/local/lib        \
4801     /usr/unsupported/lib  \
4802     /usr/athena/lib       \
4803     /usr/local/x11r5/lib  \
4804     /usr/lpp/Xamples/lib  \
4805     /lib/usr/lib/X11      \
4806                           \
4807     /usr/openwin/lib      \
4808     /usr/openwin/share/lib \
4809     ; \
4810 do
4811   for ac_extension in a so sl; do
4812     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4813       ac_x_libraries=$ac_dir
4814       break 2
4815     fi
4816   done
4817 done
4818 fi
4819 rm -f conftest*
4820 fi # $ac_x_libraries = NO
4821
4822 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4823   # Didn't find X anywhere.  Cache the known absence of X.
4824   ac_cv_have_x="have_x=no"
4825 else
4826   # Record where we found X for the cache.
4827   ac_cv_have_x="have_x=yes \
4828                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4829 fi
4830   fi
4831   eval "$ac_cv_have_x"
4832 fi # $with_x != no
4833
4834 if test "$have_x" != yes; then
4835   echo "$ac_t""$have_x" 1>&6
4836   no_x=yes
4837 else
4838   # If each of the values was on the command line, it overrides each guess.
4839   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4840   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4841   # Update the cache value to reflect the command line values.
4842   ac_cv_have_x="have_x=yes \
4843                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4844   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4845 fi
4846
4847 if test "$no_x" = yes; then
4848   # Not all programs may use this symbol, but it does not hurt to define it.
4849   { test "$extra_verbose" = "yes" && cat << \EOF
4850     Defining X_DISPLAY_MISSING
4851 EOF
4852 cat >> confdefs.h <<\EOF
4853 #define X_DISPLAY_MISSING 1
4854 EOF
4855 }
4856
4857   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4858 else
4859   if test -n "$x_includes"; then
4860     X_CFLAGS="$X_CFLAGS -I$x_includes"
4861   fi
4862
4863   # It would also be nice to do this for all -L options, not just this one.
4864   if test -n "$x_libraries"; then
4865     X_LIBS="$X_LIBS -L$x_libraries"
4866     # For Solaris; some versions of Sun CC require a space after -R and
4867     # others require no space.  Words are not sufficient . . . .
4868     case "`(uname -sr) 2>/dev/null`" in
4869     "SunOS 5"*)
4870       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4871 echo "configure:4872: checking whether -R must be followed by a space" >&5
4872       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4873       cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876
4877 int main() {
4878
4879 ; return 0; }
4880 EOF
4881 if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4882   rm -rf conftest*
4883   ac_R_nospace=yes
4884 else
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887   rm -rf conftest*
4888   ac_R_nospace=no
4889 fi
4890 rm -f conftest*
4891       if test $ac_R_nospace = yes; then
4892         echo "$ac_t""no" 1>&6
4893         X_LIBS="$X_LIBS -R$x_libraries"
4894       else
4895         LIBS="$ac_xsave_LIBS -R $x_libraries"
4896         cat > conftest.$ac_ext <<EOF
4897 #line 4898 "configure"
4898 #include "confdefs.h"
4899
4900 int main() {
4901
4902 ; return 0; }
4903 EOF
4904 if { (eval echo configure:4905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4905   rm -rf conftest*
4906   ac_R_space=yes
4907 else
4908   echo "configure: failed program was:" >&5
4909   cat conftest.$ac_ext >&5
4910   rm -rf conftest*
4911   ac_R_space=no
4912 fi
4913 rm -f conftest*
4914         if test $ac_R_space = yes; then
4915           echo "$ac_t""yes" 1>&6
4916           X_LIBS="$X_LIBS -R $x_libraries"
4917         else
4918           echo "$ac_t""neither works" 1>&6
4919         fi
4920       fi
4921       LIBS="$ac_xsave_LIBS"
4922     esac
4923   fi
4924
4925   # Check for system-dependent libraries X programs must link with.
4926   # Do this before checking for the system-independent R6 libraries
4927   # (-lICE), since we may need -lsocket or whatever for X linking.
4928
4929   if test "$ISC" = yes; then
4930     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4931   else
4932     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4933     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4934     # the Alpha needs dnet_stub (dnet does not exist).
4935     if test "$with_dnet" = "no" ; then
4936 ac_cv_lib_dnet_dnet_ntoa=no
4937 else
4938
4939 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4940 echo "configure:4941: checking for dnet_ntoa in -ldnet" >&5
4941 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4942
4943 xe_check_libs=" -ldnet "
4944 cat > conftest.$ac_ext <<EOF
4945 #line 4946 "configure"
4946 #include "confdefs.h"
4947 /* Override any gcc2 internal prototype to avoid an error.  */
4948 /* We use char because int might match the return type of a gcc2
4949     builtin and then its argument prototype would still apply.  */
4950 char dnet_ntoa();
4951
4952 int main() {
4953 dnet_ntoa()
4954 ; return 0; }
4955 EOF
4956 if { (eval echo configure:4957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4957   rm -rf conftest*
4958   eval "ac_cv_lib_$ac_lib_var=yes"
4959 else
4960   echo "configure: failed program was:" >&5
4961   cat conftest.$ac_ext >&5
4962   rm -rf conftest*
4963   eval "ac_cv_lib_$ac_lib_var=no"
4964 fi
4965 rm -f conftest*
4966 xe_check_libs=""
4967
4968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4969   echo "$ac_t""yes" 1>&6
4970   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4971 else
4972   echo "$ac_t""no" 1>&6
4973 fi
4974
4975 fi
4976
4977     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4978       
4979 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4980 echo "configure:4981: checking for dnet_ntoa in -ldnet_stub" >&5
4981 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4982
4983 xe_check_libs=" -ldnet_stub "
4984 cat > conftest.$ac_ext <<EOF
4985 #line 4986 "configure"
4986 #include "confdefs.h"
4987 /* Override any gcc2 internal prototype to avoid an error.  */
4988 /* We use char because int might match the return type of a gcc2
4989     builtin and then its argument prototype would still apply.  */
4990 char dnet_ntoa();
4991
4992 int main() {
4993 dnet_ntoa()
4994 ; return 0; }
4995 EOF
4996 if { (eval echo configure:4997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4997   rm -rf conftest*
4998   eval "ac_cv_lib_$ac_lib_var=yes"
4999 else
5000   echo "configure: failed program was:" >&5
5001   cat conftest.$ac_ext >&5
5002   rm -rf conftest*
5003   eval "ac_cv_lib_$ac_lib_var=no"
5004 fi
5005 rm -f conftest*
5006 xe_check_libs=""
5007
5008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5009   echo "$ac_t""yes" 1>&6
5010   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5011 else
5012   echo "$ac_t""no" 1>&6
5013 fi
5014
5015
5016     fi
5017
5018     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5019     # to get the SysV transport functions.
5020     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5021     # needs -lnsl.
5022     # The nsl library prevents programs from opening the X display
5023     # on Irix 5.2, according to dickey@clark.net.
5024     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5025 echo "configure:5026: checking for gethostbyname" >&5
5026
5027 cat > conftest.$ac_ext <<EOF
5028 #line 5029 "configure"
5029 #include "confdefs.h"
5030 /* System header to define __stub macros and hopefully few prototypes,
5031     which can conflict with char gethostbyname(); below.  */
5032 #include <assert.h>
5033 /* Override any gcc2 internal prototype to avoid an error.  */
5034 /* We use char because int might match the return type of a gcc2
5035     builtin and then its argument prototype would still apply.  */
5036 char gethostbyname();
5037
5038 int main() {
5039
5040 /* The GNU C library defines this for functions which it implements
5041     to always fail with ENOSYS.  Some functions are actually named
5042     something starting with __ and the normal name is an alias.  */
5043 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5044 choke me
5045 #else
5046 gethostbyname();
5047 #endif
5048
5049 ; return 0; }
5050 EOF
5051 if { (eval echo configure:5052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5052   rm -rf conftest*
5053   eval "ac_cv_func_gethostbyname=yes"
5054 else
5055   echo "configure: failed program was:" >&5
5056   cat conftest.$ac_ext >&5
5057   rm -rf conftest*
5058   eval "ac_cv_func_gethostbyname=no"
5059 fi
5060 rm -f conftest*
5061
5062 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5063   echo "$ac_t""yes" 1>&6
5064   :
5065 else
5066   echo "$ac_t""no" 1>&6
5067 fi
5068
5069     if test $ac_cv_func_gethostbyname = no; then
5070       
5071 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5072 echo "configure:5073: checking for gethostbyname in -lnsl" >&5
5073 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5074
5075 xe_check_libs=" -lnsl "
5076 cat > conftest.$ac_ext <<EOF
5077 #line 5078 "configure"
5078 #include "confdefs.h"
5079 /* Override any gcc2 internal prototype to avoid an error.  */
5080 /* We use char because int might match the return type of a gcc2
5081     builtin and then its argument prototype would still apply.  */
5082 char gethostbyname();
5083
5084 int main() {
5085 gethostbyname()
5086 ; return 0; }
5087 EOF
5088 if { (eval echo configure:5089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5089   rm -rf conftest*
5090   eval "ac_cv_lib_$ac_lib_var=yes"
5091 else
5092   echo "configure: failed program was:" >&5
5093   cat conftest.$ac_ext >&5
5094   rm -rf conftest*
5095   eval "ac_cv_lib_$ac_lib_var=no"
5096 fi
5097 rm -f conftest*
5098 xe_check_libs=""
5099
5100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5101   echo "$ac_t""yes" 1>&6
5102   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5103 else
5104   echo "$ac_t""no" 1>&6
5105 fi
5106
5107
5108     fi
5109
5110     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5111     # socket/setsockopt and other routines are undefined under SCO ODT
5112     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5113     # on later versions), says simon@lia.di.epfl.ch: it contains
5114     # gethostby* variants that don't use the nameserver (or something).
5115     # -lsocket must be given before -lnsl if both are needed.
5116     # We assume that if connect needs -lnsl, so does gethostbyname.
5117     echo $ac_n "checking for connect""... $ac_c" 1>&6
5118 echo "configure:5119: checking for connect" >&5
5119
5120 cat > conftest.$ac_ext <<EOF
5121 #line 5122 "configure"
5122 #include "confdefs.h"
5123 /* System header to define __stub macros and hopefully few prototypes,
5124     which can conflict with char connect(); below.  */
5125 #include <assert.h>
5126 /* Override any gcc2 internal prototype to avoid an error.  */
5127 /* We use char because int might match the return type of a gcc2
5128     builtin and then its argument prototype would still apply.  */
5129 char connect();
5130
5131 int main() {
5132
5133 /* The GNU C library defines this for functions which it implements
5134     to always fail with ENOSYS.  Some functions are actually named
5135     something starting with __ and the normal name is an alias.  */
5136 #if defined (__stub_connect) || defined (__stub___connect)
5137 choke me
5138 #else
5139 connect();
5140 #endif
5141
5142 ; return 0; }
5143 EOF
5144 if { (eval echo configure:5145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5145   rm -rf conftest*
5146   eval "ac_cv_func_connect=yes"
5147 else
5148   echo "configure: failed program was:" >&5
5149   cat conftest.$ac_ext >&5
5150   rm -rf conftest*
5151   eval "ac_cv_func_connect=no"
5152 fi
5153 rm -f conftest*
5154
5155 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5156   echo "$ac_t""yes" 1>&6
5157   :
5158 else
5159   echo "$ac_t""no" 1>&6
5160 fi
5161
5162     if test $ac_cv_func_connect = no; then
5163       
5164 xe_msg_checking="for connect in -lsocket"
5165 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5166 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5167 echo "configure:5168: checking "$xe_msg_checking"" >&5
5168 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5169
5170 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5171 cat > conftest.$ac_ext <<EOF
5172 #line 5173 "configure"
5173 #include "confdefs.h"
5174 /* Override any gcc2 internal prototype to avoid an error.  */
5175 /* We use char because int might match the return type of a gcc2
5176     builtin and then its argument prototype would still apply.  */
5177 char connect();
5178
5179 int main() {
5180 connect()
5181 ; return 0; }
5182 EOF
5183 if { (eval echo configure:5184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5184   rm -rf conftest*
5185   eval "ac_cv_lib_$ac_lib_var=yes"
5186 else
5187   echo "configure: failed program was:" >&5
5188   cat conftest.$ac_ext >&5
5189   rm -rf conftest*
5190   eval "ac_cv_lib_$ac_lib_var=no"
5191 fi
5192 rm -f conftest*
5193 xe_check_libs=""
5194
5195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5196   echo "$ac_t""yes" 1>&6
5197   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5198 else
5199   echo "$ac_t""no" 1>&6
5200 fi
5201
5202
5203     fi
5204
5205     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5206     echo $ac_n "checking for remove""... $ac_c" 1>&6
5207 echo "configure:5208: checking for remove" >&5
5208
5209 cat > conftest.$ac_ext <<EOF
5210 #line 5211 "configure"
5211 #include "confdefs.h"
5212 /* System header to define __stub macros and hopefully few prototypes,
5213     which can conflict with char remove(); below.  */
5214 #include <assert.h>
5215 /* Override any gcc2 internal prototype to avoid an error.  */
5216 /* We use char because int might match the return type of a gcc2
5217     builtin and then its argument prototype would still apply.  */
5218 char remove();
5219
5220 int main() {
5221
5222 /* The GNU C library defines this for functions which it implements
5223     to always fail with ENOSYS.  Some functions are actually named
5224     something starting with __ and the normal name is an alias.  */
5225 #if defined (__stub_remove) || defined (__stub___remove)
5226 choke me
5227 #else
5228 remove();
5229 #endif
5230
5231 ; return 0; }
5232 EOF
5233 if { (eval echo configure:5234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5234   rm -rf conftest*
5235   eval "ac_cv_func_remove=yes"
5236 else
5237   echo "configure: failed program was:" >&5
5238   cat conftest.$ac_ext >&5
5239   rm -rf conftest*
5240   eval "ac_cv_func_remove=no"
5241 fi
5242 rm -f conftest*
5243
5244 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5245   echo "$ac_t""yes" 1>&6
5246   :
5247 else
5248   echo "$ac_t""no" 1>&6
5249 fi
5250
5251     if test $ac_cv_func_remove = no; then
5252       
5253 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5254 echo "configure:5255: checking for remove in -lposix" >&5
5255 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5256
5257 xe_check_libs=" -lposix "
5258 cat > conftest.$ac_ext <<EOF
5259 #line 5260 "configure"
5260 #include "confdefs.h"
5261 /* Override any gcc2 internal prototype to avoid an error.  */
5262 /* We use char because int might match the return type of a gcc2
5263     builtin and then its argument prototype would still apply.  */
5264 char remove();
5265
5266 int main() {
5267 remove()
5268 ; return 0; }
5269 EOF
5270 if { (eval echo configure:5271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5271   rm -rf conftest*
5272   eval "ac_cv_lib_$ac_lib_var=yes"
5273 else
5274   echo "configure: failed program was:" >&5
5275   cat conftest.$ac_ext >&5
5276   rm -rf conftest*
5277   eval "ac_cv_lib_$ac_lib_var=no"
5278 fi
5279 rm -f conftest*
5280 xe_check_libs=""
5281
5282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5283   echo "$ac_t""yes" 1>&6
5284   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5285 else
5286   echo "$ac_t""no" 1>&6
5287 fi
5288
5289
5290     fi
5291
5292     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5293     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5294 echo "configure:5295: checking for shmat" >&5
5295
5296 cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299 /* System header to define __stub macros and hopefully few prototypes,
5300     which can conflict with char shmat(); below.  */
5301 #include <assert.h>
5302 /* Override any gcc2 internal prototype to avoid an error.  */
5303 /* We use char because int might match the return type of a gcc2
5304     builtin and then its argument prototype would still apply.  */
5305 char shmat();
5306
5307 int main() {
5308
5309 /* The GNU C library defines this for functions which it implements
5310     to always fail with ENOSYS.  Some functions are actually named
5311     something starting with __ and the normal name is an alias.  */
5312 #if defined (__stub_shmat) || defined (__stub___shmat)
5313 choke me
5314 #else
5315 shmat();
5316 #endif
5317
5318 ; return 0; }
5319 EOF
5320 if { (eval echo configure:5321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5321   rm -rf conftest*
5322   eval "ac_cv_func_shmat=yes"
5323 else
5324   echo "configure: failed program was:" >&5
5325   cat conftest.$ac_ext >&5
5326   rm -rf conftest*
5327   eval "ac_cv_func_shmat=no"
5328 fi
5329 rm -f conftest*
5330
5331 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5332   echo "$ac_t""yes" 1>&6
5333   :
5334 else
5335   echo "$ac_t""no" 1>&6
5336 fi
5337
5338     if test $ac_cv_func_shmat = no; then
5339       
5340 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5341 echo "configure:5342: checking for shmat in -lipc" >&5
5342 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5343
5344 xe_check_libs=" -lipc "
5345 cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348 /* Override any gcc2 internal prototype to avoid an error.  */
5349 /* We use char because int might match the return type of a gcc2
5350     builtin and then its argument prototype would still apply.  */
5351 char shmat();
5352
5353 int main() {
5354 shmat()
5355 ; return 0; }
5356 EOF
5357 if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5358   rm -rf conftest*
5359   eval "ac_cv_lib_$ac_lib_var=yes"
5360 else
5361   echo "configure: failed program was:" >&5
5362   cat conftest.$ac_ext >&5
5363   rm -rf conftest*
5364   eval "ac_cv_lib_$ac_lib_var=no"
5365 fi
5366 rm -f conftest*
5367 xe_check_libs=""
5368
5369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5370   echo "$ac_t""yes" 1>&6
5371   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5372 else
5373   echo "$ac_t""no" 1>&6
5374 fi
5375
5376
5377     fi
5378   fi
5379
5380   # Check for libraries that X11R6 Xt/Xaw programs need.
5381   ac_save_LDFLAGS="$LDFLAGS"
5382   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5383   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5384   # check for ICE first), but we must link in the order -lSM -lICE or
5385   # we get undefined symbols.  So assume we have SM if we have ICE.
5386   # These have to be linked with before -lX11, unlike the other
5387   # libraries we check for below, so use a different variable.
5388   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5389   
5390 xe_msg_checking="for IceConnectionNumber in -lICE"
5391 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5392 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5393 echo "configure:5394: checking "$xe_msg_checking"" >&5
5394 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5395
5396 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5397 cat > conftest.$ac_ext <<EOF
5398 #line 5399 "configure"
5399 #include "confdefs.h"
5400 /* Override any gcc2 internal prototype to avoid an error.  */
5401 /* We use char because int might match the return type of a gcc2
5402     builtin and then its argument prototype would still apply.  */
5403 char IceConnectionNumber();
5404
5405 int main() {
5406 IceConnectionNumber()
5407 ; return 0; }
5408 EOF
5409 if { (eval echo configure:5410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5410   rm -rf conftest*
5411   eval "ac_cv_lib_$ac_lib_var=yes"
5412 else
5413   echo "configure: failed program was:" >&5
5414   cat conftest.$ac_ext >&5
5415   rm -rf conftest*
5416   eval "ac_cv_lib_$ac_lib_var=no"
5417 fi
5418 rm -f conftest*
5419 xe_check_libs=""
5420
5421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5422   echo "$ac_t""yes" 1>&6
5423   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5424 else
5425   echo "$ac_t""no" 1>&6
5426 fi
5427
5428
5429   LDFLAGS="$ac_save_LDFLAGS"
5430
5431 fi
5432  # Autoconf claims to find X library and include dirs for us.
5433   if test "$no_x" = "yes"
5434   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5435   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5436   fi
5437 fi
5438
5439 case "$with_x11" in
5440   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5441   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5442 esac
5443
5444 if test "$with_x11" = "yes"; then
5445   { test "$extra_verbose" = "yes" && cat << \EOF
5446     Defining HAVE_X_WINDOWS
5447 EOF
5448 cat >> confdefs.h <<\EOF
5449 #define HAVE_X_WINDOWS 1
5450 EOF
5451 }
5452
5453   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5454   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5455
5456       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5457     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5458     if test -d "$lib_dir" -a -d "$inc_dir"; then
5459       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5460         x_libraries="$lib_dir $x_libraries"
5461         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5462       esac
5463       case "$x_includes" in "$inc_dir"* ) ;; *)
5464         x_includes="$inc_dir $x_includes"
5465         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5466       esac
5467       break;       fi
5468   done
5469
5470     for rel in "X11R6" "X11R5" "X11R4"; do
5471     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5472     if test -d "$lib_dir" -a -d "$inc_dir"; then
5473       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5474         x_libraries="$x_libraries $lib_dir"
5475         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5476       esac
5477       case "$x_includes" in "$inc_dir"* ) ;; *)
5478         x_includes="$x_includes $inc_dir"
5479         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5480       esac
5481       break;     fi
5482   done
5483
5484     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
5485
5486   ld_switch_x_site="$X_LIBS"
5487
5488   
5489 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5490     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5491   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5492   
5493         runpath="" runpath_dirs=""
5494   if test -n "$LD_RUN_PATH"; then
5495     runpath="$LD_RUN_PATH"
5496   elif test "$GCC" = "yes"; then
5497         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5498     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5499     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5500     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5501       case "$arg" in P,* | -L* | -R* )
5502         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5503           {
5504 xe_runpath_dir="$dir"
5505   test "$xe_runpath_dir" != "/lib"     -a \
5506         "$xe_runpath_dir" != "/usr/lib" -a \
5507         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5508   eval "$xe_add_unique_runpath_dir"
5509 }
5510         done ;;
5511       esac
5512     done
5513     ld_switch_run="$ld_switch_run_save"
5514     rm -f conftest*
5515   else
5516         for arg in $ld_switch_site $ld_switch_x_site; do
5517       case "$arg" in -L*) {
5518 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5519   test "$xe_runpath_dir" != "/lib"     -a \
5520         "$xe_runpath_dir" != "/usr/lib" -a \
5521         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5522   eval "$xe_add_unique_runpath_dir"
5523 };; esac
5524     done
5525         if test "$opsys $need_motif" = "sol2 yes"; then
5526       xe_runpath_dir="/opt/SUNWdt/lib";
5527       eval "$xe_add_unique_runpath_dir";
5528     fi
5529   fi 
5530   if test -n "$runpath"; then
5531     ld_switch_run="${dash_r}${runpath}"
5532     
5533 if test "$GCC" = "yes"; then
5534   set x $ld_switch_run; shift; ld_switch_run=""
5535   while test -n "$1"; do
5536     case $1 in
5537       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5538       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5539       -Xlinker* ) ;;
5540       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5541     esac
5542     shift
5543   done
5544 fi
5545     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5546   fi
5547 fi
5548
5549
5550   if test "$extra_verbose" = "yes"; then
5551     echo; echo "X11 compilation variables:"
5552     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5553     echo
5554   fi
5555
5556             bitmapdirs=
5557   if test "$x_includes" != NONE; then
5558     for i in $x_includes; do
5559       if test -d "$i/bitmaps"; then
5560         bitmapdirs="$i/bitmaps:$bitmapdirs"
5561       fi
5562       if test -d "$i/X11/bitmaps"; then
5563         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5564       fi
5565     done
5566     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5567   fi
5568   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5569     Defining BITMAPDIR = "$bitmapdirs"
5570 EOF
5571 cat >> confdefs.h <<EOF
5572 #define BITMAPDIR "$bitmapdirs"
5573 EOF
5574 }
5575
5576
5577     echo "checking for X defines extracted by xmkmf" 1>&6
5578 echo "configure:5579: checking for X defines extracted by xmkmf" >&5
5579   rm -fr conftestdir
5580   if mkdir conftestdir; then
5581     cd conftestdir
5582     cat > Imakefile <<'EOF'
5583 xetest:
5584         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5585 EOF
5586     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5587       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5588       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5589     fi
5590     cd ..
5591     rm -fr conftestdir
5592     for word in $xmkmf_defines; do
5593       case "$word" in
5594         -D*=* ) ;;
5595         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5596               { test "$extra_verbose" = "yes" && cat << EOF
5597     Defining $word
5598 EOF
5599 cat >> confdefs.h <<EOF
5600 #define $word 1
5601 EOF
5602 }
5603  ;;
5604       esac
5605     done
5606   fi
5607
5608     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5609 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5610 echo "configure:5611: checking for X11/Intrinsic.h" >&5
5611
5612 cat > conftest.$ac_ext <<EOF
5613 #line 5614 "configure"
5614 #include "confdefs.h"
5615 #include <X11/Intrinsic.h>
5616 EOF
5617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5618 { (eval echo configure:5619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5620 if test -z "$ac_err"; then
5621   rm -rf conftest*
5622   eval "ac_cv_header_$ac_safe=yes"
5623 else
5624   echo "$ac_err" >&5
5625   echo "configure: failed program was:" >&5
5626   cat conftest.$ac_ext >&5
5627   rm -rf conftest*
5628   eval "ac_cv_header_$ac_safe=no"
5629 fi
5630 rm -f conftest*
5631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5632   echo "$ac_t""yes" 1>&6
5633   :
5634 else
5635   echo "$ac_t""no" 1>&6
5636 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5637 fi
5638
5639
5640       
5641 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5642 echo "configure:5643: checking for XOpenDisplay in -lX11" >&5
5643 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5644
5645 xe_check_libs=" -lX11 "
5646 cat > conftest.$ac_ext <<EOF
5647 #line 5648 "configure"
5648 #include "confdefs.h"
5649 /* Override any gcc2 internal prototype to avoid an error.  */
5650 /* We use char because int might match the return type of a gcc2
5651     builtin and then its argument prototype would still apply.  */
5652 char XOpenDisplay();
5653
5654 int main() {
5655 XOpenDisplay()
5656 ; return 0; }
5657 EOF
5658 if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5659   rm -rf conftest*
5660   eval "ac_cv_lib_$ac_lib_var=yes"
5661 else
5662   echo "configure: failed program was:" >&5
5663   cat conftest.$ac_ext >&5
5664   rm -rf conftest*
5665   eval "ac_cv_lib_$ac_lib_var=no"
5666 fi
5667 rm -f conftest*
5668 xe_check_libs=""
5669
5670 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5671   echo "$ac_t""yes" 1>&6
5672   have_lib_x11=yes
5673 else
5674   echo "$ac_t""no" 1>&6
5675 fi
5676
5677
5678   if test "$have_lib_x11" != "yes"; then
5679     
5680 xe_msg_checking="for XGetFontProperty in -lX11"
5681 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5682 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5683 echo "configure:5684: checking "$xe_msg_checking"" >&5
5684 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5685
5686 xe_check_libs=" -lX11 -b i486-linuxaout"
5687 cat > conftest.$ac_ext <<EOF
5688 #line 5689 "configure"
5689 #include "confdefs.h"
5690 /* Override any gcc2 internal prototype to avoid an error.  */
5691 /* We use char because int might match the return type of a gcc2
5692     builtin and then its argument prototype would still apply.  */
5693 char XGetFontProperty();
5694
5695 int main() {
5696 XGetFontProperty()
5697 ; return 0; }
5698 EOF
5699 if { (eval echo configure:5700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5700   rm -rf conftest*
5701   eval "ac_cv_lib_$ac_lib_var=yes"
5702 else
5703   echo "configure: failed program was:" >&5
5704   cat conftest.$ac_ext >&5
5705   rm -rf conftest*
5706   eval "ac_cv_lib_$ac_lib_var=no"
5707 fi
5708 rm -f conftest*
5709 xe_check_libs=""
5710
5711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5712   echo "$ac_t""yes" 1>&6
5713   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5714 else
5715   echo "$ac_t""no" 1>&6
5716 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5717 fi
5718
5719
5720   fi
5721   libs_x="-lX11"
5722   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5723
5724     
5725 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5726 echo "configure:5727: checking for XShapeSelectInput in -lXext" >&5
5727 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5728
5729 xe_check_libs=" -lXext "
5730 cat > conftest.$ac_ext <<EOF
5731 #line 5732 "configure"
5732 #include "confdefs.h"
5733 /* Override any gcc2 internal prototype to avoid an error.  */
5734 /* We use char because int might match the return type of a gcc2
5735     builtin and then its argument prototype would still apply.  */
5736 char XShapeSelectInput();
5737
5738 int main() {
5739 XShapeSelectInput()
5740 ; return 0; }
5741 EOF
5742 if { (eval echo configure:5743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5743   rm -rf conftest*
5744   eval "ac_cv_lib_$ac_lib_var=yes"
5745 else
5746   echo "configure: failed program was:" >&5
5747   cat conftest.$ac_ext >&5
5748   rm -rf conftest*
5749   eval "ac_cv_lib_$ac_lib_var=no"
5750 fi
5751 rm -f conftest*
5752 xe_check_libs=""
5753
5754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5755   echo "$ac_t""yes" 1>&6
5756   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5757 else
5758   echo "$ac_t""no" 1>&6
5759 fi
5760
5761
5762
5763     
5764 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5765 echo "configure:5766: checking for XtOpenDisplay in -lXt" >&5
5766 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5767
5768 xe_check_libs=" -lXt "
5769 cat > conftest.$ac_ext <<EOF
5770 #line 5771 "configure"
5771 #include "confdefs.h"
5772 /* Override any gcc2 internal prototype to avoid an error.  */
5773 /* We use char because int might match the return type of a gcc2
5774     builtin and then its argument prototype would still apply.  */
5775 char XtOpenDisplay();
5776
5777 int main() {
5778 XtOpenDisplay()
5779 ; return 0; }
5780 EOF
5781 if { (eval echo configure:5782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5782   rm -rf conftest*
5783   eval "ac_cv_lib_$ac_lib_var=yes"
5784 else
5785   echo "configure: failed program was:" >&5
5786   cat conftest.$ac_ext >&5
5787   rm -rf conftest*
5788   eval "ac_cv_lib_$ac_lib_var=no"
5789 fi
5790 rm -f conftest*
5791 xe_check_libs=""
5792
5793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5794   echo "$ac_t""yes" 1>&6
5795   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5796 else
5797   echo "$ac_t""no" 1>&6
5798 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5799 fi
5800
5801
5802
5803   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5804 echo "configure:5805: checking the version of X11 being used" >&5
5805   cat > conftest.$ac_ext <<EOF
5806 #line 5807 "configure"
5807 #include "confdefs.h"
5808 #include <X11/Intrinsic.h>
5809     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5810 EOF
5811 if { (eval echo configure:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5812 then
5813   ./conftest foobar; x11_release=$?
5814 else
5815   conftest_rc="$?"
5816   echo "configure: failed program was:" >&5
5817   cat conftest.$ac_ext >&5
5818   rm -fr conftest*
5819   x11_release=4
5820 fi
5821 rm -fr conftest*
5822   echo "$ac_t""R${x11_release}" 1>&6
5823   { test "$extra_verbose" = "yes" && cat << EOF
5824     Defining THIS_IS_X11R${x11_release}
5825 EOF
5826 cat >> confdefs.h <<EOF
5827 #define THIS_IS_X11R${x11_release} 1
5828 EOF
5829 }
5830
5831
5832   for ac_hdr in X11/Xlocale.h
5833 do
5834 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5835 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5836 echo "configure:5837: checking for $ac_hdr" >&5
5837
5838 cat > conftest.$ac_ext <<EOF
5839 #line 5840 "configure"
5840 #include "confdefs.h"
5841 #include <$ac_hdr>
5842 EOF
5843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5844 { (eval echo configure:5845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5846 if test -z "$ac_err"; then
5847   rm -rf conftest*
5848   eval "ac_cv_header_$ac_safe=yes"
5849 else
5850   echo "$ac_err" >&5
5851   echo "configure: failed program was:" >&5
5852   cat conftest.$ac_ext >&5
5853   rm -rf conftest*
5854   eval "ac_cv_header_$ac_safe=no"
5855 fi
5856 rm -f conftest*
5857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5858   echo "$ac_t""yes" 1>&6
5859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5860   { test "$extra_verbose" = "yes" && cat << EOF
5861     Defining $ac_tr_hdr
5862 EOF
5863 cat >> confdefs.h <<EOF
5864 #define $ac_tr_hdr 1
5865 EOF
5866 }
5867  
5868 else
5869   echo "$ac_t""no" 1>&6
5870 fi
5871 done
5872
5873
5874     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5875 echo "configure:5876: checking for XFree86" >&5
5876   if test -d "/usr/X386/include" -o \
5877           -f "/etc/XF86Config"    -o \
5878           -f "/etc/X11/XF86Config" -o \
5879           -f "/usr/X11R6/lib/X11/XF86Config"; then
5880     echo "$ac_t""yes" 1>&6
5881     { test "$extra_verbose" = "yes" && cat << \EOF
5882     Defining HAVE_XFREE386
5883 EOF
5884 cat >> confdefs.h <<\EOF
5885 #define HAVE_XFREE386 1
5886 EOF
5887 }
5888
5889   else
5890     echo "$ac_t""no" 1>&6
5891   fi
5892
5893     test -z "$with_xmu" && { 
5894 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5895 echo "configure:5896: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5896 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5897
5898 xe_check_libs=" -lXmu "
5899 cat > conftest.$ac_ext <<EOF
5900 #line 5901 "configure"
5901 #include "confdefs.h"
5902 /* Override any gcc2 internal prototype to avoid an error.  */
5903 /* We use char because int might match the return type of a gcc2
5904     builtin and then its argument prototype would still apply.  */
5905 char XmuReadBitmapDataFromFile();
5906
5907 int main() {
5908 XmuReadBitmapDataFromFile()
5909 ; return 0; }
5910 EOF
5911 if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5912   rm -rf conftest*
5913   eval "ac_cv_lib_$ac_lib_var=yes"
5914 else
5915   echo "configure: failed program was:" >&5
5916   cat conftest.$ac_ext >&5
5917   rm -rf conftest*
5918   eval "ac_cv_lib_$ac_lib_var=no"
5919 fi
5920 rm -f conftest*
5921 xe_check_libs=""
5922
5923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5924   echo "$ac_t""yes" 1>&6
5925   with_xmu=yes
5926 else
5927   echo "$ac_t""no" 1>&6
5928 with_xmu=no
5929 fi
5930
5931  }
5932   if test "$with_xmu" = "no"; then
5933     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
5934    echo "    xemacs will be linked with \"xmu.o\""
5935  fi
5936   else
5937     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
5938     { test "$extra_verbose" = "yes" && cat << \EOF
5939     Defining HAVE_XMU
5940 EOF
5941 cat >> confdefs.h <<\EOF
5942 #define HAVE_XMU 1
5943 EOF
5944 }
5945
5946   fi
5947
5948       
5949 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
5950 echo "configure:5951: checking for main in -lXbsd" >&5
5951 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
5952
5953 xe_check_libs=" -lXbsd "
5954 cat > conftest.$ac_ext <<EOF
5955 #line 5956 "configure"
5956 #include "confdefs.h"
5957
5958 int main() {
5959 main()
5960 ; return 0; }
5961 EOF
5962 if { (eval echo configure:5963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5963   rm -rf conftest*
5964   eval "ac_cv_lib_$ac_lib_var=yes"
5965 else
5966   echo "configure: failed program was:" >&5
5967   cat conftest.$ac_ext >&5
5968   rm -rf conftest*
5969   eval "ac_cv_lib_$ac_lib_var=no"
5970 fi
5971 rm -f conftest*
5972 xe_check_libs=""
5973
5974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5975   echo "$ac_t""yes" 1>&6
5976   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
5977 else
5978   echo "$ac_t""no" 1>&6
5979 fi
5980
5981
5982
5983     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
5984         if test "$GCC" = "yes"; then
5985       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
5986       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
5987     else
5988       case "$CC" in
5989         "xlc" ) CC="xlc_r" ;;
5990         "xlC" ) CC="xlC_r" ;;
5991         "cc"  ) CC="cc_r" ;;
5992       esac
5993     fi
5994   fi
5995
5996 fi 
5997 if test "$with_msw" != "no"; then
5998   echo "checking for MS-Windows" 1>&6
5999 echo "configure:6000: checking for MS-Windows" >&5
6000   
6001 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6002 echo "configure:6003: checking for main in -lgdi32" >&5
6003 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6004
6005 xe_check_libs=" -lgdi32 "
6006 cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6009
6010 int main() {
6011 main()
6012 ; return 0; }
6013 EOF
6014 if { (eval echo configure:6015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6015   rm -rf conftest*
6016   eval "ac_cv_lib_$ac_lib_var=yes"
6017 else
6018   echo "configure: failed program was:" >&5
6019   cat conftest.$ac_ext >&5
6020   rm -rf conftest*
6021   eval "ac_cv_lib_$ac_lib_var=no"
6022 fi
6023 rm -f conftest*
6024 xe_check_libs=""
6025
6026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6027   echo "$ac_t""yes" 1>&6
6028   with_msw=yes
6029 else
6030   echo "$ac_t""no" 1>&6
6031 fi
6032
6033
6034   if test "$with_msw" = "yes"; then
6035     { test "$extra_verbose" = "yes" && cat << \EOF
6036     Defining HAVE_MS_WINDOWS
6037 EOF
6038 cat >> confdefs.h <<\EOF
6039 #define HAVE_MS_WINDOWS 1
6040 EOF
6041 }
6042
6043     install_pp="$blddir/lib-src/installexe.sh"
6044     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
6045     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6046     if test "$window_system" != x11; then
6047         window_system=msw
6048         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6049             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6050    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6051  fi
6052         test "$with_menubars"   != "no" && with_menubars=msw \
6053             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6054    echo "    xemacs will be linked with \"menubar-msw.o\""
6055  fi
6056         test "$with_toolbars"   != "no" && with_toolbars=msw \
6057             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6058    echo "    xemacs will be linked with \"toolbar-msw.o\""
6059  fi
6060         test "$with_dialogs"   != "no" && with_dialogs=msw \
6061             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6062    echo "    xemacs will be linked with \"dialog-msw.o\""
6063  fi
6064     else
6065         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6066    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6067  fi
6068         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6069    echo "    xemacs will be linked with \"menubar-msw.o\""
6070  fi
6071         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6072    echo "    xemacs will be linked with \"toolbar-msw.o\""
6073  fi
6074         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6075    echo "    xemacs will be linked with \"dialog-msw.o\""
6076  fi
6077     fi
6078         cat > conftest.$ac_ext <<EOF
6079 #line 6080 "configure"
6080 #include "confdefs.h"
6081 #include <fcntl.h>
6082     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6083 EOF
6084 if { (eval echo configure:6085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6085 then
6086   { test "$extra_verbose" = "yes" && cat << \EOF
6087     Defining HAVE_MSG_SELECT
6088 EOF
6089 cat >> confdefs.h <<\EOF
6090 #define HAVE_MSG_SELECT 1
6091 EOF
6092 }
6093
6094 else
6095   conftest_rc="$?"
6096   echo "configure: failed program was:" >&5
6097   cat conftest.$ac_ext >&5
6098 fi
6099 rm -fr conftest*
6100     const_is_losing=no
6101     with_file_coding=yes
6102     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
6103    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\""
6104  fi
6105   fi
6106 fi
6107
6108
6109
6110 test -z "$window_system" && window_system="none"
6111
6112 if test "$window_system" = "none"; then
6113   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6114   do
6115     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6116        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6117     fi
6118     eval "with_${feature}=no"
6119   done
6120 else
6121   test -z "$with_toolbars" && with_toolbars=yes
6122 fi
6123
6124 if test "$with_msw" != "yes"; then
6125   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6126   do
6127     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6128        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6129     fi
6130     eval "with_${feature}=no"
6131   done
6132 else
6133   :
6134 fi
6135
6136 if test "$with_x11" != "yes"; then
6137             for feature in tooltalk cde offix wmcommand xim xmu
6138   do
6139     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6140        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6141     fi
6142     eval "with_${feature}=no"
6143   done
6144 fi
6145
6146 bitmapdir=
6147
6148 case "$window_system" in
6149   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6150   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6151   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6152 esac
6153
6154 case "$x_libraries" in *X11R4* )
6155   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6156   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6157 esac
6158
6159 echo "checking for WM_COMMAND option" 1>&6
6160 echo "configure:6161: checking for WM_COMMAND option" >&5;
6161 if test "$with_wmcommand" != "no"; then
6162   { test "$extra_verbose" = "yes" && cat << \EOF
6163     Defining HAVE_WMCOMMAND
6164 EOF
6165 cat >> confdefs.h <<\EOF
6166 #define HAVE_WMCOMMAND 1
6167 EOF
6168 }
6169
6170 fi
6171
6172 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6173 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6174 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6175 echo "configure:6176: checking for X11/Xauth.h" >&5
6176
6177 cat > conftest.$ac_ext <<EOF
6178 #line 6179 "configure"
6179 #include "confdefs.h"
6180 #include <X11/Xauth.h>
6181 EOF
6182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6183 { (eval echo configure:6184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6185 if test -z "$ac_err"; then
6186   rm -rf conftest*
6187   eval "ac_cv_header_$ac_safe=yes"
6188 else
6189   echo "$ac_err" >&5
6190   echo "configure: failed program was:" >&5
6191   cat conftest.$ac_ext >&5
6192   rm -rf conftest*
6193   eval "ac_cv_header_$ac_safe=no"
6194 fi
6195 rm -f conftest*
6196 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6197   echo "$ac_t""yes" 1>&6
6198   :
6199 else
6200   echo "$ac_t""no" 1>&6
6201 with_xauth=no
6202 fi
6203  }
6204 test -z "$with_xauth" && { 
6205 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6206 echo "configure:6207: checking for XauGetAuthByAddr in -lXau" >&5
6207 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6208
6209 xe_check_libs=" -lXau "
6210 cat > conftest.$ac_ext <<EOF
6211 #line 6212 "configure"
6212 #include "confdefs.h"
6213 /* Override any gcc2 internal prototype to avoid an error.  */
6214 /* We use char because int might match the return type of a gcc2
6215     builtin and then its argument prototype would still apply.  */
6216 char XauGetAuthByAddr();
6217
6218 int main() {
6219 XauGetAuthByAddr()
6220 ; return 0; }
6221 EOF
6222 if { (eval echo configure:6223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6223   rm -rf conftest*
6224   eval "ac_cv_lib_$ac_lib_var=yes"
6225 else
6226   echo "configure: failed program was:" >&5
6227   cat conftest.$ac_ext >&5
6228   rm -rf conftest*
6229   eval "ac_cv_lib_$ac_lib_var=no"
6230 fi
6231 rm -f conftest*
6232 xe_check_libs=""
6233
6234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6235   echo "$ac_t""yes" 1>&6
6236   :
6237 else
6238   echo "$ac_t""no" 1>&6
6239 with_xauth=no
6240 fi
6241
6242  }
6243 test -z "$with_xauth" && with_xauth=yes
6244 if test "$with_xauth" = "yes"; then
6245   { test "$extra_verbose" = "yes" && cat << \EOF
6246     Defining HAVE_XAUTH
6247 EOF
6248 cat >> confdefs.h <<\EOF
6249 #define HAVE_XAUTH 1
6250 EOF
6251 }
6252
6253   
6254 T=""
6255 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
6256 libs_xauth="$T"
6257
6258 fi
6259
6260
6261
6262
6263 if test "$with_tooltalk" != "no" ; then
6264       for dir in "" "Tt/" "desktop/" ; do
6265     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6266 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6267 echo "configure:6268: checking for ${dir}tt_c.h" >&5
6268
6269 cat > conftest.$ac_ext <<EOF
6270 #line 6271 "configure"
6271 #include "confdefs.h"
6272 #include <${dir}tt_c.h>
6273 EOF
6274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6275 { (eval echo configure:6276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6277 if test -z "$ac_err"; then
6278   rm -rf conftest*
6279   eval "ac_cv_header_$ac_safe=yes"
6280 else
6281   echo "$ac_err" >&5
6282   echo "configure: failed program was:" >&5
6283   cat conftest.$ac_ext >&5
6284   rm -rf conftest*
6285   eval "ac_cv_header_$ac_safe=no"
6286 fi
6287 rm -f conftest*
6288 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6289   echo "$ac_t""yes" 1>&6
6290   tt_c_h_path="${dir}tt_c.h"; break
6291 else
6292   echo "$ac_t""no" 1>&6
6293 fi
6294
6295   done
6296   if test -z "$tt_c_h_path"; then
6297     if test "$with_tooltalk" = "yes"; then
6298       (echo "$progname: Usage error:"
6299 echo " " "Unable to find required tooltalk header files."
6300 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6301     fi
6302     with_tooltalk=no
6303   fi
6304 fi
6305 if test "$with_tooltalk" != "no" ; then
6306   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6307     
6308 xe_msg_checking="for tt_message_create in -ltt"
6309 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6310 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6311 echo "configure:6312: checking "$xe_msg_checking"" >&5
6312 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6313
6314 xe_check_libs=" -ltt $extra_libs"
6315 cat > conftest.$ac_ext <<EOF
6316 #line 6317 "configure"
6317 #include "confdefs.h"
6318 /* Override any gcc2 internal prototype to avoid an error.  */
6319 /* We use char because int might match the return type of a gcc2
6320     builtin and then its argument prototype would still apply.  */
6321 char tt_message_create();
6322
6323 int main() {
6324 tt_message_create()
6325 ; return 0; }
6326 EOF
6327 if { (eval echo configure:6328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6328   rm -rf conftest*
6329   eval "ac_cv_lib_$ac_lib_var=yes"
6330 else
6331   echo "configure: failed program was:" >&5
6332   cat conftest.$ac_ext >&5
6333   rm -rf conftest*
6334   eval "ac_cv_lib_$ac_lib_var=no"
6335 fi
6336 rm -f conftest*
6337 xe_check_libs=""
6338
6339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6340   echo "$ac_t""yes" 1>&6
6341   tt_libs="-ltt $extra_libs"; break
6342 else
6343   echo "$ac_t""no" 1>&6
6344 :
6345 fi
6346
6347
6348   done
6349   if test -z "$tt_libs"; then
6350     if test "$with_tooltalk" = "yes"; then
6351       (echo "$progname: Usage error:"
6352 echo " " "Unable to find required tooltalk libraries."
6353 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6354     fi
6355     with_tooltalk=no
6356   fi
6357 fi
6358 test -z "$with_tooltalk" && with_tooltalk=yes
6359 if test "$with_tooltalk" = "yes"; then
6360   { test "$extra_verbose" = "yes" && cat << \EOF
6361     Defining TOOLTALK
6362 EOF
6363 cat >> confdefs.h <<\EOF
6364 #define TOOLTALK 1
6365 EOF
6366 }
6367
6368   { test "$extra_verbose" = "yes" && cat << EOF
6369     Defining TT_C_H_PATH = "$tt_c_h_path"
6370 EOF
6371 cat >> confdefs.h <<EOF
6372 #define TT_C_H_PATH "$tt_c_h_path"
6373 EOF
6374 }
6375
6376   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6377   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6378    echo "    xemacs will be linked with \"tooltalk.o\""
6379  fi
6380 fi
6381
6382 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6383 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6384 echo "configure:6385: checking for Dt/Dt.h" >&5
6385
6386 cat > conftest.$ac_ext <<EOF
6387 #line 6388 "configure"
6388 #include "confdefs.h"
6389 #include <Dt/Dt.h>
6390 EOF
6391 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6392 { (eval echo configure:6393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6393 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6394 if test -z "$ac_err"; then
6395   rm -rf conftest*
6396   eval "ac_cv_header_$ac_safe=yes"
6397 else
6398   echo "$ac_err" >&5
6399   echo "configure: failed program was:" >&5
6400   cat conftest.$ac_ext >&5
6401   rm -rf conftest*
6402   eval "ac_cv_header_$ac_safe=no"
6403 fi
6404 rm -f conftest*
6405 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6406   echo "$ac_t""yes" 1>&6
6407   :
6408 else
6409   echo "$ac_t""no" 1>&6
6410 with_cde=no
6411 fi
6412  }
6413 test -z "$with_cde" && { 
6414 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6415 echo "configure:6416: checking for DtDndDragStart in -lDtSvc" >&5
6416 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6417
6418 xe_check_libs=" -lDtSvc "
6419 cat > conftest.$ac_ext <<EOF
6420 #line 6421 "configure"
6421 #include "confdefs.h"
6422 /* Override any gcc2 internal prototype to avoid an error.  */
6423 /* We use char because int might match the return type of a gcc2
6424     builtin and then its argument prototype would still apply.  */
6425 char DtDndDragStart();
6426
6427 int main() {
6428 DtDndDragStart()
6429 ; return 0; }
6430 EOF
6431 if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6432   rm -rf conftest*
6433   eval "ac_cv_lib_$ac_lib_var=yes"
6434 else
6435   echo "configure: failed program was:" >&5
6436   cat conftest.$ac_ext >&5
6437   rm -rf conftest*
6438   eval "ac_cv_lib_$ac_lib_var=no"
6439 fi
6440 rm -f conftest*
6441 xe_check_libs=""
6442
6443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6444   echo "$ac_t""yes" 1>&6
6445   :
6446 else
6447   echo "$ac_t""no" 1>&6
6448 with_cde=no
6449 fi
6450
6451  }
6452 test -z "$with_cde" && with_cde=yes
6453 if test "$with_dragndrop" = no; then
6454   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6455   with_cde=no
6456 fi
6457 if test "$with_cde" = "yes" ; then
6458   { test "$extra_verbose" = "yes" && cat << \EOF
6459     Defining HAVE_CDE
6460 EOF
6461 cat >> confdefs.h <<\EOF
6462 #define HAVE_CDE 1
6463 EOF
6464 }
6465
6466   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6467   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6468   with_tooltalk=yes # CDE requires Tooltalk
6469   need_motif=yes    # CDE requires Motif
6470 fi
6471
6472 test "$window_system" != "x11" && with_offix=no
6473 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6474   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6475   with_offix=no
6476 fi
6477 if test "$with_dragndrop" = no; then
6478   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6479   with_offix=no
6480 fi
6481 if test "$with_cde" = yes; then
6482   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6483   with_offix=no
6484 fi
6485 test -z "$with_offix" && with_offix=no
6486 if test "$with_offix" = "yes"; then
6487   { test "$extra_verbose" = "yes" && cat << \EOF
6488     Defining HAVE_OFFIX_DND
6489 EOF
6490 cat >> confdefs.h <<\EOF
6491 #define HAVE_OFFIX_DND 1
6492 EOF
6493 }
6494
6495   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6496   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6497 fi
6498
6499 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6500 echo "configure:6501: checking if drag and drop API is needed" >&5
6501 if test "$with_dragndrop" != "no" ; then
6502   if test -n "$dragndrop_proto" ; then
6503     with_dragndrop=yes
6504     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6505     { test "$extra_verbose" = "yes" && cat << \EOF
6506     Defining HAVE_DRAGNDROP
6507 EOF
6508 cat >> confdefs.h <<\EOF
6509 #define HAVE_DRAGNDROP 1
6510 EOF
6511 }
6512
6513     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6514   else
6515     with_dragndrop=no
6516     echo "$ac_t""no" 1>&6
6517   fi
6518 fi
6519
6520 echo "checking for LDAP" 1>&6
6521 echo "configure:6522: checking for LDAP" >&5
6522 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6523 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6524 echo "configure:6525: checking for ldap.h" >&5
6525
6526 cat > conftest.$ac_ext <<EOF
6527 #line 6528 "configure"
6528 #include "confdefs.h"
6529 #include <ldap.h>
6530 EOF
6531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6532 { (eval echo configure:6533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6534 if test -z "$ac_err"; then
6535   rm -rf conftest*
6536   eval "ac_cv_header_$ac_safe=yes"
6537 else
6538   echo "$ac_err" >&5
6539   echo "configure: failed program was:" >&5
6540   cat conftest.$ac_ext >&5
6541   rm -rf conftest*
6542   eval "ac_cv_header_$ac_safe=no"
6543 fi
6544 rm -f conftest*
6545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6546   echo "$ac_t""yes" 1>&6
6547   :
6548 else
6549   echo "$ac_t""no" 1>&6
6550 with_ldap=no
6551 fi
6552  }
6553 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6554 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6555 echo "configure:6556: checking for lber.h" >&5
6556
6557 cat > conftest.$ac_ext <<EOF
6558 #line 6559 "configure"
6559 #include "confdefs.h"
6560 #include <lber.h>
6561 EOF
6562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6563 { (eval echo configure:6564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6565 if test -z "$ac_err"; then
6566   rm -rf conftest*
6567   eval "ac_cv_header_$ac_safe=yes"
6568 else
6569   echo "$ac_err" >&5
6570   echo "configure: failed program was:" >&5
6571   cat conftest.$ac_ext >&5
6572   rm -rf conftest*
6573   eval "ac_cv_header_$ac_safe=no"
6574 fi
6575 rm -f conftest*
6576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6577   echo "$ac_t""yes" 1>&6
6578   :
6579 else
6580   echo "$ac_t""no" 1>&6
6581 with_ldap=no
6582 fi
6583  }
6584 if test "$with_ldap" != "no"; then
6585   
6586 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6587 echo "configure:6588: checking for ldap_search in -lldap" >&5
6588 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6589
6590 xe_check_libs=" -lldap "
6591 cat > conftest.$ac_ext <<EOF
6592 #line 6593 "configure"
6593 #include "confdefs.h"
6594 /* Override any gcc2 internal prototype to avoid an error.  */
6595 /* We use char because int might match the return type of a gcc2
6596     builtin and then its argument prototype would still apply.  */
6597 char ldap_search();
6598
6599 int main() {
6600 ldap_search()
6601 ; return 0; }
6602 EOF
6603 if { (eval echo configure:6604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6604   rm -rf conftest*
6605   eval "ac_cv_lib_$ac_lib_var=yes"
6606 else
6607   echo "configure: failed program was:" >&5
6608   cat conftest.$ac_ext >&5
6609   rm -rf conftest*
6610   eval "ac_cv_lib_$ac_lib_var=no"
6611 fi
6612 rm -f conftest*
6613 xe_check_libs=""
6614
6615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6616   echo "$ac_t""yes" 1>&6
6617   with_ldap_nolber=yes
6618 else
6619   echo "$ac_t""no" 1>&6
6620 with_ldap_nolber=no
6621 fi
6622
6623
6624   test "$with_ldap_nolber" = "no" && { 
6625 xe_msg_checking="for ldap_open in -lldap"
6626 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6627 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6628 echo "configure:6629: checking "$xe_msg_checking"" >&5
6629 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6630
6631 xe_check_libs=" -lldap -llber"
6632 cat > conftest.$ac_ext <<EOF
6633 #line 6634 "configure"
6634 #include "confdefs.h"
6635 /* Override any gcc2 internal prototype to avoid an error.  */
6636 /* We use char because int might match the return type of a gcc2
6637     builtin and then its argument prototype would still apply.  */
6638 char ldap_open();
6639
6640 int main() {
6641 ldap_open()
6642 ; return 0; }
6643 EOF
6644 if { (eval echo configure:6645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6645   rm -rf conftest*
6646   eval "ac_cv_lib_$ac_lib_var=yes"
6647 else
6648   echo "configure: failed program was:" >&5
6649   cat conftest.$ac_ext >&5
6650   rm -rf conftest*
6651   eval "ac_cv_lib_$ac_lib_var=no"
6652 fi
6653 rm -f conftest*
6654 xe_check_libs=""
6655
6656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6657   echo "$ac_t""yes" 1>&6
6658   with_ldap_lber=yes
6659 else
6660   echo "$ac_t""no" 1>&6
6661 with_ldap_lber=no
6662 fi
6663
6664  }
6665   test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" \) && with_ldap=yes
6666 fi
6667 if test "$with_ldap" = "yes"; then
6668   { test "$extra_verbose" = "yes" && cat << \EOF
6669     Defining HAVE_LDAP
6670 EOF
6671 cat >> confdefs.h <<\EOF
6672 #define HAVE_LDAP 1
6673 EOF
6674 }
6675
6676   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6677    echo "    xemacs will be linked with \"eldap.o\""
6678  fi
6679   if test "$with_ldap_nolber" = "yes" ; then
6680     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6681   else
6682     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6683     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6684   fi
6685   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
6686 do
6687 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6688 echo "configure:6689: checking for $ac_func" >&5
6689
6690 cat > conftest.$ac_ext <<EOF
6691 #line 6692 "configure"
6692 #include "confdefs.h"
6693 /* System header to define __stub macros and hopefully few prototypes,
6694     which can conflict with char $ac_func(); below.  */
6695 #include <assert.h>
6696 /* Override any gcc2 internal prototype to avoid an error.  */
6697 /* We use char because int might match the return type of a gcc2
6698     builtin and then its argument prototype would still apply.  */
6699 char $ac_func();
6700
6701 int main() {
6702
6703 /* The GNU C library defines this for functions which it implements
6704     to always fail with ENOSYS.  Some functions are actually named
6705     something starting with __ and the normal name is an alias.  */
6706 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6707 choke me
6708 #else
6709 $ac_func();
6710 #endif
6711
6712 ; return 0; }
6713 EOF
6714 if { (eval echo configure:6715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6715   rm -rf conftest*
6716   eval "ac_cv_func_$ac_func=yes"
6717 else
6718   echo "configure: failed program was:" >&5
6719   cat conftest.$ac_ext >&5
6720   rm -rf conftest*
6721   eval "ac_cv_func_$ac_func=no"
6722 fi
6723 rm -f conftest*
6724
6725 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6726   echo "$ac_t""yes" 1>&6
6727     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6728   { test "$extra_verbose" = "yes" && cat << EOF
6729     Defining $ac_tr_func
6730 EOF
6731 cat >> confdefs.h <<EOF
6732 #define $ac_tr_func 1
6733 EOF
6734 }
6735  
6736 else
6737   echo "$ac_t""no" 1>&6
6738 fi
6739 done
6740
6741 fi
6742
6743
6744 if test "$window_system" != "none"; then
6745   echo "checking for graphics libraries" 1>&6
6746 echo "configure:6747: checking for graphics libraries" >&5
6747
6748     xpm_problem=""
6749   if test -z "$with_xpm"; then
6750     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6751 echo "configure:6752: checking for Xpm - no older than 3.4f" >&5
6752     xe_check_libs=-lXpm
6753     cat > conftest.$ac_ext <<EOF
6754 #line 6755 "configure"
6755 #include "confdefs.h"
6756 #include <X11/xpm.h>
6757     int main(int c, char **v) {
6758     return c == 1 ? 0 :
6759       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6760       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6761 EOF
6762 if { (eval echo configure:6763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6763 then
6764   ./conftest dummy_arg; xpm_status=$?;
6765       if test "$xpm_status" = "0"; then
6766         with_xpm=yes;
6767       else
6768         with_xpm=no;
6769         if test "$xpm_status" = "1"; then
6770           xpm_problem="Xpm library version and header file version don't match!"
6771         elif test "$xpm_status" = "2"; then
6772           xpm_problem="Xpm library version is too old!"
6773         else
6774           xpm_problem="Internal xpm detection logic error!"
6775         fi
6776         echo "
6777 *** WARNING *** $xpm_problem
6778   I'm not touching that with a 10-foot pole!
6779   If you really want to use the installed version of Xpm, rerun
6780   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
6781     fi
6782 else
6783   conftest_rc="$?"
6784   echo "configure: failed program was:" >&5
6785   cat conftest.$ac_ext >&5
6786   rm -fr conftest*
6787   with_xpm=no
6788 fi
6789 rm -fr conftest*
6790     xe_check_libs=
6791     echo "$ac_t""$with_xpm" 1>&6
6792   fi
6793   if test "$with_xpm" = "yes"; then
6794     { test "$extra_verbose" = "yes" && cat << \EOF
6795     Defining HAVE_XPM
6796 EOF
6797 cat >> confdefs.h <<\EOF
6798 #define HAVE_XPM 1
6799 EOF
6800 }
6801
6802     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6803     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6804 echo "configure:6805: checking for \"FOR_MSW\" xpm" >&5
6805     xe_check_libs=-lXpm
6806     cat > conftest.$ac_ext <<EOF
6807 #line 6808 "configure"
6808 #include "confdefs.h"
6809
6810 int main() {
6811 XpmCreatePixmapFromData()
6812 ; return 0; }
6813 EOF
6814 if { (eval echo configure:6815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6815   rm -rf conftest*
6816   xpm_for_msw=no
6817 else
6818   echo "configure: failed program was:" >&5
6819   cat conftest.$ac_ext >&5
6820   rm -rf conftest*
6821   xpm_for_msw=yes
6822 fi
6823 rm -f conftest*
6824     xe_check_libs=
6825     echo "$ac_t""$xpm_for_msw" 1>&6
6826     if test "$xpm_for_msw" = "yes"; then
6827       { test "$extra_verbose" = "yes" && cat << \EOF
6828     Defining FOR_MSW
6829 EOF
6830 cat >> confdefs.h <<\EOF
6831 #define FOR_MSW 1
6832 EOF
6833 }
6834
6835     fi
6836   fi
6837
6838     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
6839 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
6840 echo "configure:6841: checking for compface.h" >&5
6841
6842 cat > conftest.$ac_ext <<EOF
6843 #line 6844 "configure"
6844 #include "confdefs.h"
6845 #include <compface.h>
6846 EOF
6847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6848 { (eval echo configure:6849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6850 if test -z "$ac_err"; then
6851   rm -rf conftest*
6852   eval "ac_cv_header_$ac_safe=yes"
6853 else
6854   echo "$ac_err" >&5
6855   echo "configure: failed program was:" >&5
6856   cat conftest.$ac_ext >&5
6857   rm -rf conftest*
6858   eval "ac_cv_header_$ac_safe=no"
6859 fi
6860 rm -f conftest*
6861 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6862   echo "$ac_t""yes" 1>&6
6863   :
6864 else
6865   echo "$ac_t""no" 1>&6
6866 with_xface=no
6867 fi
6868  }
6869   test -z "$with_xface" && { 
6870 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
6871 echo "configure:6872: checking for UnGenFace in -lcompface" >&5
6872 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
6873
6874 xe_check_libs=" -lcompface "
6875 cat > conftest.$ac_ext <<EOF
6876 #line 6877 "configure"
6877 #include "confdefs.h"
6878 /* Override any gcc2 internal prototype to avoid an error.  */
6879 /* We use char because int might match the return type of a gcc2
6880     builtin and then its argument prototype would still apply.  */
6881 char UnGenFace();
6882
6883 int main() {
6884 UnGenFace()
6885 ; return 0; }
6886 EOF
6887 if { (eval echo configure:6888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6888   rm -rf conftest*
6889   eval "ac_cv_lib_$ac_lib_var=yes"
6890 else
6891   echo "configure: failed program was:" >&5
6892   cat conftest.$ac_ext >&5
6893   rm -rf conftest*
6894   eval "ac_cv_lib_$ac_lib_var=no"
6895 fi
6896 rm -f conftest*
6897 xe_check_libs=""
6898
6899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6900   echo "$ac_t""yes" 1>&6
6901   : 
6902 else
6903   echo "$ac_t""no" 1>&6
6904 with_xface=no
6905 fi
6906
6907  }
6908   test -z "$with_xface" && with_xface=yes
6909   if test "$with_xface" = "yes"; then
6910     { test "$extra_verbose" = "yes" && cat << \EOF
6911     Defining HAVE_XFACE
6912 EOF
6913 cat >> confdefs.h <<\EOF
6914 #define HAVE_XFACE 1
6915 EOF
6916 }
6917
6918     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
6919   fi
6920
6921         if test "$with_gif" != "no"; then
6922     with_gif="yes"
6923     { test "$extra_verbose" = "yes" && cat << \EOF
6924     Defining HAVE_GIF
6925 EOF
6926 cat >> confdefs.h <<\EOF
6927 #define HAVE_GIF 1
6928 EOF
6929 }
6930
6931     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
6932    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
6933  fi
6934   fi
6935
6936       if test "$with_png $with_tiff" != "no no"; then
6937     
6938 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
6939 echo "configure:6940: checking for inflate in -lc" >&5
6940 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
6941
6942 xe_check_libs=" -lc "
6943 cat > conftest.$ac_ext <<EOF
6944 #line 6945 "configure"
6945 #include "confdefs.h"
6946 /* Override any gcc2 internal prototype to avoid an error.  */
6947 /* We use char because int might match the return type of a gcc2
6948     builtin and then its argument prototype would still apply.  */
6949 char inflate();
6950
6951 int main() {
6952 inflate()
6953 ; return 0; }
6954 EOF
6955 if { (eval echo configure:6956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6956   rm -rf conftest*
6957   eval "ac_cv_lib_$ac_lib_var=yes"
6958 else
6959   echo "configure: failed program was:" >&5
6960   cat conftest.$ac_ext >&5
6961   rm -rf conftest*
6962   eval "ac_cv_lib_$ac_lib_var=no"
6963 fi
6964 rm -f conftest*
6965 xe_check_libs=""
6966
6967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6968   echo "$ac_t""yes" 1>&6
6969   :
6970 else
6971   echo "$ac_t""no" 1>&6
6972
6973 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
6974 echo "configure:6975: checking for inflate in -lz" >&5
6975 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
6976
6977 xe_check_libs=" -lz "
6978 cat > conftest.$ac_ext <<EOF
6979 #line 6980 "configure"
6980 #include "confdefs.h"
6981 /* Override any gcc2 internal prototype to avoid an error.  */
6982 /* We use char because int might match the return type of a gcc2
6983     builtin and then its argument prototype would still apply.  */
6984 char inflate();
6985
6986 int main() {
6987 inflate()
6988 ; return 0; }
6989 EOF
6990 if { (eval echo configure:6991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6991   rm -rf conftest*
6992   eval "ac_cv_lib_$ac_lib_var=yes"
6993 else
6994   echo "configure: failed program was:" >&5
6995   cat conftest.$ac_ext >&5
6996   rm -rf conftest*
6997   eval "ac_cv_lib_$ac_lib_var=no"
6998 fi
6999 rm -f conftest*
7000 xe_check_libs=""
7001
7002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7003   echo "$ac_t""yes" 1>&6
7004   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7005 else
7006   echo "$ac_t""no" 1>&6
7007
7008 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7009 echo "configure:7010: checking for inflate in -lgz" >&5
7010 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7011
7012 xe_check_libs=" -lgz "
7013 cat > conftest.$ac_ext <<EOF
7014 #line 7015 "configure"
7015 #include "confdefs.h"
7016 /* Override any gcc2 internal prototype to avoid an error.  */
7017 /* We use char because int might match the return type of a gcc2
7018     builtin and then its argument prototype would still apply.  */
7019 char inflate();
7020
7021 int main() {
7022 inflate()
7023 ; return 0; }
7024 EOF
7025 if { (eval echo configure:7026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7026   rm -rf conftest*
7027   eval "ac_cv_lib_$ac_lib_var=yes"
7028 else
7029   echo "configure: failed program was:" >&5
7030   cat conftest.$ac_ext >&5
7031   rm -rf conftest*
7032   eval "ac_cv_lib_$ac_lib_var=no"
7033 fi
7034 rm -f conftest*
7035 xe_check_libs=""
7036
7037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7038   echo "$ac_t""yes" 1>&6
7039   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7040 else
7041   echo "$ac_t""no" 1>&6
7042 fi
7043
7044
7045 fi
7046
7047
7048 fi
7049
7050
7051   fi
7052
7053     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7054 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7055 echo "configure:7056: checking for jpeglib.h" >&5
7056
7057 cat > conftest.$ac_ext <<EOF
7058 #line 7059 "configure"
7059 #include "confdefs.h"
7060 #include <jpeglib.h>
7061 EOF
7062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7063 { (eval echo configure:7064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7065 if test -z "$ac_err"; then
7066   rm -rf conftest*
7067   eval "ac_cv_header_$ac_safe=yes"
7068 else
7069   echo "$ac_err" >&5
7070   echo "configure: failed program was:" >&5
7071   cat conftest.$ac_ext >&5
7072   rm -rf conftest*
7073   eval "ac_cv_header_$ac_safe=no"
7074 fi
7075 rm -f conftest*
7076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7077   echo "$ac_t""yes" 1>&6
7078   :
7079 else
7080   echo "$ac_t""no" 1>&6
7081 with_jpeg=no
7082 fi
7083  }
7084   test -z "$with_jpeg" && { 
7085 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7086 echo "configure:7087: checking for jpeg_destroy_decompress in -ljpeg" >&5
7087 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7088
7089 xe_check_libs=" -ljpeg "
7090 cat > conftest.$ac_ext <<EOF
7091 #line 7092 "configure"
7092 #include "confdefs.h"
7093 /* Override any gcc2 internal prototype to avoid an error.  */
7094 /* We use char because int might match the return type of a gcc2
7095     builtin and then its argument prototype would still apply.  */
7096 char jpeg_destroy_decompress();
7097
7098 int main() {
7099 jpeg_destroy_decompress()
7100 ; return 0; }
7101 EOF
7102 if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7103   rm -rf conftest*
7104   eval "ac_cv_lib_$ac_lib_var=yes"
7105 else
7106   echo "configure: failed program was:" >&5
7107   cat conftest.$ac_ext >&5
7108   rm -rf conftest*
7109   eval "ac_cv_lib_$ac_lib_var=no"
7110 fi
7111 rm -f conftest*
7112 xe_check_libs=""
7113
7114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7115   echo "$ac_t""yes" 1>&6
7116   :
7117 else
7118   echo "$ac_t""no" 1>&6
7119 with_jpeg=no
7120 fi
7121
7122  }
7123   test -z "$with_jpeg" && with_jpeg=yes
7124   if test "$with_jpeg" = "yes"; then
7125     { test "$extra_verbose" = "yes" && cat << \EOF
7126     Defining HAVE_JPEG
7127 EOF
7128 cat >> confdefs.h <<\EOF
7129 #define HAVE_JPEG 1
7130 EOF
7131 }
7132
7133     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7134   fi
7135
7136     png_problem=""
7137   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7138 echo "configure:7139: checking for pow" >&5
7139
7140 cat > conftest.$ac_ext <<EOF
7141 #line 7142 "configure"
7142 #include "confdefs.h"
7143 /* System header to define __stub macros and hopefully few prototypes,
7144     which can conflict with char pow(); below.  */
7145 #include <assert.h>
7146 /* Override any gcc2 internal prototype to avoid an error.  */
7147 /* We use char because int might match the return type of a gcc2
7148     builtin and then its argument prototype would still apply.  */
7149 char pow();
7150
7151 int main() {
7152
7153 /* The GNU C library defines this for functions which it implements
7154     to always fail with ENOSYS.  Some functions are actually named
7155     something starting with __ and the normal name is an alias.  */
7156 #if defined (__stub_pow) || defined (__stub___pow)
7157 choke me
7158 #else
7159 pow();
7160 #endif
7161
7162 ; return 0; }
7163 EOF
7164 if { (eval echo configure:7165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7165   rm -rf conftest*
7166   eval "ac_cv_func_pow=yes"
7167 else
7168   echo "configure: failed program was:" >&5
7169   cat conftest.$ac_ext >&5
7170   rm -rf conftest*
7171   eval "ac_cv_func_pow=no"
7172 fi
7173 rm -f conftest*
7174
7175 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7176   echo "$ac_t""yes" 1>&6
7177   :
7178 else
7179   echo "$ac_t""no" 1>&6
7180 with_png=no
7181 fi
7182  }
7183   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7184 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7185 echo "configure:7186: checking for png.h" >&5
7186
7187 cat > conftest.$ac_ext <<EOF
7188 #line 7189 "configure"
7189 #include "confdefs.h"
7190 #include <png.h>
7191 EOF
7192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7193 { (eval echo configure:7194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7195 if test -z "$ac_err"; then
7196   rm -rf conftest*
7197   eval "ac_cv_header_$ac_safe=yes"
7198 else
7199   echo "$ac_err" >&5
7200   echo "configure: failed program was:" >&5
7201   cat conftest.$ac_ext >&5
7202   rm -rf conftest*
7203   eval "ac_cv_header_$ac_safe=no"
7204 fi
7205 rm -f conftest*
7206 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7207   echo "$ac_t""yes" 1>&6
7208   :
7209 else
7210   echo "$ac_t""no" 1>&6
7211 with_png=no
7212 fi
7213  }
7214   test -z "$with_png" && { 
7215 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7216 echo "configure:7217: checking for png_read_image in -lpng" >&5
7217 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7218
7219 xe_check_libs=" -lpng "
7220 cat > conftest.$ac_ext <<EOF
7221 #line 7222 "configure"
7222 #include "confdefs.h"
7223 /* Override any gcc2 internal prototype to avoid an error.  */
7224 /* We use char because int might match the return type of a gcc2
7225     builtin and then its argument prototype would still apply.  */
7226 char png_read_image();
7227
7228 int main() {
7229 png_read_image()
7230 ; return 0; }
7231 EOF
7232 if { (eval echo configure:7233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7233   rm -rf conftest*
7234   eval "ac_cv_lib_$ac_lib_var=yes"
7235 else
7236   echo "configure: failed program was:" >&5
7237   cat conftest.$ac_ext >&5
7238   rm -rf conftest*
7239   eval "ac_cv_lib_$ac_lib_var=no"
7240 fi
7241 rm -f conftest*
7242 xe_check_libs=""
7243
7244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7245   echo "$ac_t""yes" 1>&6
7246   :
7247 else
7248   echo "$ac_t""no" 1>&6
7249 with_png=no
7250 fi
7251
7252  }
7253   if test -z "$with_png"; then
7254     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7255 echo "configure:7256: checking for workable png version information" >&5
7256     xe_check_libs="-lpng -lz"
7257     cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260 #include <png.h>
7261     int main(int c, char **v) {
7262     if (c == 1) return 0;
7263     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7264     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7265 EOF
7266 if { (eval echo configure:7267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7267 then
7268   ./conftest dummy_arg; png_status=$?;
7269       if test "$png_status" = "0"; then
7270         with_png=yes;
7271       else
7272         with_png=no;
7273         if test "$png_status" = "1"; then
7274           png_problem="PNG library version and header file don't match!"
7275         elif test "$png_status" = "2"; then
7276           png_problem="PNG library version too old (pre 1.0.2)!"
7277         fi
7278         echo "
7279 *** WARNING *** $png_problem
7280   I'm not touching that with a 10-foot pole!
7281   If you really want to use the installed version of libPNG, rerun
7282   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7283     fi
7284 else
7285   conftest_rc="$?"
7286   echo "configure: failed program was:" >&5
7287   cat conftest.$ac_ext >&5
7288   rm -fr conftest*
7289   with_png=no
7290 fi
7291 rm -fr conftest*
7292     xe_check_libs=
7293     echo "$ac_t""$with_png" 1>&6
7294   fi
7295   if test "$with_png" = "yes"; then
7296     { test "$extra_verbose" = "yes" && cat << \EOF
7297     Defining HAVE_PNG
7298 EOF
7299 cat >> confdefs.h <<\EOF
7300 #define HAVE_PNG 1
7301 EOF
7302 }
7303
7304     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7305   fi
7306
7307     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7308 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7309 echo "configure:7310: checking for tiffio.h" >&5
7310
7311 cat > conftest.$ac_ext <<EOF
7312 #line 7313 "configure"
7313 #include "confdefs.h"
7314 #include <tiffio.h>
7315 EOF
7316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7317 { (eval echo configure:7318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7319 if test -z "$ac_err"; then
7320   rm -rf conftest*
7321   eval "ac_cv_header_$ac_safe=yes"
7322 else
7323   echo "$ac_err" >&5
7324   echo "configure: failed program was:" >&5
7325   cat conftest.$ac_ext >&5
7326   rm -rf conftest*
7327   eval "ac_cv_header_$ac_safe=no"
7328 fi
7329 rm -f conftest*
7330 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7331   echo "$ac_t""yes" 1>&6
7332   :
7333 else
7334   echo "$ac_t""no" 1>&6
7335 with_tiff=no
7336 fi
7337  }
7338   test -z "$with_tiff" && { 
7339 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7340 echo "configure:7341: checking for TIFFClientOpen in -ltiff" >&5
7341 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7342
7343 xe_check_libs=" -ltiff "
7344 cat > conftest.$ac_ext <<EOF
7345 #line 7346 "configure"
7346 #include "confdefs.h"
7347 /* Override any gcc2 internal prototype to avoid an error.  */
7348 /* We use char because int might match the return type of a gcc2
7349     builtin and then its argument prototype would still apply.  */
7350 char TIFFClientOpen();
7351
7352 int main() {
7353 TIFFClientOpen()
7354 ; return 0; }
7355 EOF
7356 if { (eval echo configure:7357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7357   rm -rf conftest*
7358   eval "ac_cv_lib_$ac_lib_var=yes"
7359 else
7360   echo "configure: failed program was:" >&5
7361   cat conftest.$ac_ext >&5
7362   rm -rf conftest*
7363   eval "ac_cv_lib_$ac_lib_var=no"
7364 fi
7365 rm -f conftest*
7366 xe_check_libs=""
7367
7368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7369   echo "$ac_t""yes" 1>&6
7370   :
7371 else
7372   echo "$ac_t""no" 1>&6
7373 with_tiff=no
7374 fi
7375
7376  }
7377   test -z "$with_tiff" && with_tiff=yes
7378   if test "$with_tiff" = "yes"; then
7379     { test "$extra_verbose" = "yes" && cat << \EOF
7380     Defining HAVE_TIFF
7381 EOF
7382 cat >> confdefs.h <<\EOF
7383 #define HAVE_TIFF 1
7384 EOF
7385 }
7386
7387     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7388   fi
7389 fi
7390
7391
7392 if test "$with_x11" = "yes"; then
7393
7394   echo "checking for X11 graphics libraries" 1>&6
7395 echo "configure:7396: checking for X11 graphics libraries" >&5
7396
7397     
7398 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
7399 echo "configure:7400: checking for XawScrollbarSetThumb in -lXaw" >&5
7400 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7401
7402 xe_check_libs=" -lXaw "
7403 cat > conftest.$ac_ext <<EOF
7404 #line 7405 "configure"
7405 #include "confdefs.h"
7406 /* Override any gcc2 internal prototype to avoid an error.  */
7407 /* We use char because int might match the return type of a gcc2
7408     builtin and then its argument prototype would still apply.  */
7409 char XawScrollbarSetThumb();
7410
7411 int main() {
7412 XawScrollbarSetThumb()
7413 ; return 0; }
7414 EOF
7415 if { (eval echo configure:7416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7416   rm -rf conftest*
7417   eval "ac_cv_lib_$ac_lib_var=yes"
7418 else
7419   echo "configure: failed program was:" >&5
7420   cat conftest.$ac_ext >&5
7421   rm -rf conftest*
7422   eval "ac_cv_lib_$ac_lib_var=no"
7423 fi
7424 rm -f conftest*
7425 xe_check_libs=""
7426
7427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7428   echo "$ac_t""yes" 1>&6
7429   have_xaw=yes
7430 else
7431   echo "$ac_t""no" 1>&6
7432 have_xaw=no
7433 fi
7434
7435
7436                     
7437     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7438 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7439 echo "configure:7440: checking for Xm/Xm.h" >&5
7440
7441 cat > conftest.$ac_ext <<EOF
7442 #line 7443 "configure"
7443 #include "confdefs.h"
7444 #include <Xm/Xm.h>
7445 EOF
7446 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7447 { (eval echo configure:7448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7448 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7449 if test -z "$ac_err"; then
7450   rm -rf conftest*
7451   eval "ac_cv_header_$ac_safe=yes"
7452 else
7453   echo "$ac_err" >&5
7454   echo "configure: failed program was:" >&5
7455   cat conftest.$ac_ext >&5
7456   rm -rf conftest*
7457   eval "ac_cv_header_$ac_safe=no"
7458 fi
7459 rm -f conftest*
7460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7461   echo "$ac_t""yes" 1>&6
7462   
7463 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7464 echo "configure:7465: checking for XmStringFree in -lXm" >&5
7465 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7466
7467 xe_check_libs=" -lXm "
7468 cat > conftest.$ac_ext <<EOF
7469 #line 7470 "configure"
7470 #include "confdefs.h"
7471 /* Override any gcc2 internal prototype to avoid an error.  */
7472 /* We use char because int might match the return type of a gcc2
7473     builtin and then its argument prototype would still apply.  */
7474 char XmStringFree();
7475
7476 int main() {
7477 XmStringFree()
7478 ; return 0; }
7479 EOF
7480 if { (eval echo configure:7481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7481   rm -rf conftest*
7482   eval "ac_cv_lib_$ac_lib_var=yes"
7483 else
7484   echo "configure: failed program was:" >&5
7485   cat conftest.$ac_ext >&5
7486   rm -rf conftest*
7487   eval "ac_cv_lib_$ac_lib_var=no"
7488 fi
7489 rm -f conftest*
7490 xe_check_libs=""
7491
7492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7493   echo "$ac_t""yes" 1>&6
7494   have_motif=yes
7495 else
7496   echo "$ac_t""no" 1>&6
7497 have_motif=no
7498 fi
7499
7500
7501 else
7502   echo "$ac_t""no" 1>&6
7503 have_motif=no
7504 fi
7505
7506
7507   if test "$have_motif" = "yes"; then
7508         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
7509 echo "configure:7510: checking for Lesstif" >&5
7510     cat > conftest.$ac_ext <<EOF
7511 #line 7512 "configure"
7512 #include "confdefs.h"
7513 #include <Xm/Xm.h>
7514 #ifdef LESSTIF_VERSION
7515 yes
7516 #endif
7517
7518 EOF
7519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7520   egrep "yes" >/dev/null 2>&1; then
7521   rm -rf conftest*
7522   have_lesstif=yes
7523 else
7524   rm -rf conftest*
7525   have_lesstif=no
7526 fi
7527 rm -f conftest*
7528
7529   echo "$ac_t""$have_lesstif" 1>&6
7530   fi
7531
7532 fi 
7533
7534 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
7535   with_menubars="lucid" ;;
7536 esac
7537 case "$with_dialogs" in "" | "yes" | "lucid" )
7538   if   test "$have_motif" = "yes"; then with_dialogs="motif"
7539   elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
7540   else with_dialogs=no
7541   fi ;;
7542 esac
7543 case "$with_scrollbars" in "" | "yes" )
7544   with_scrollbars="lucid" ;;
7545 esac
7546 case "$with_widgets" in "" | "yes" )
7547   if   test "$have_motif" = "yes"; then with_widgets="motif"
7548   else with_widgets=no
7549   fi ;;
7550 esac
7551
7552 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
7553
7554 case "$all_widgets" in *athena* )
7555   { test "$extra_verbose" = "yes" && cat << \EOF
7556     Defining LWLIB_USES_ATHENA
7557 EOF
7558 cat >> confdefs.h <<\EOF
7559 #define LWLIB_USES_ATHENA 1
7560 EOF
7561 }
7562
7563   { test "$extra_verbose" = "yes" && cat << \EOF
7564     Defining NEED_ATHENA
7565 EOF
7566 cat >> confdefs.h <<\EOF
7567 #define NEED_ATHENA 1
7568 EOF
7569 }
7570
7571   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7572   libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
7573 esac
7574
7575 case "$all_widgets" in *motif* )
7576   { test "$extra_verbose" = "yes" && cat << \EOF
7577     Defining LWLIB_USES_MOTIF
7578 EOF
7579 cat >> confdefs.h <<\EOF
7580 #define LWLIB_USES_MOTIF 1
7581 EOF
7582 }
7583
7584   { test "$extra_verbose" = "yes" && cat << \EOF
7585     Defining NEED_MOTIF
7586 EOF
7587 cat >> confdefs.h <<\EOF
7588 #define NEED_MOTIF 1
7589 EOF
7590 }
7591
7592   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
7593   need_motif=yes ;;
7594 esac
7595
7596 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7597 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7598 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
7599 case "$all_widgets" in *lucid* )
7600   { test "$extra_verbose" = "yes" && cat << \EOF
7601     Defining NEED_LUCID
7602 EOF
7603 cat >> confdefs.h <<\EOF
7604 #define NEED_LUCID 1
7605 EOF
7606 }
7607
7608   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
7609 esac
7610
7611
7612
7613 case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7614     Defining LWLIB_SCROLLBARS_ATHENA
7615 EOF
7616 cat >> confdefs.h <<\EOF
7617 #define LWLIB_SCROLLBARS_ATHENA 1
7618 EOF
7619 }
7620 ;; esac
7621 case "$with_dialogs"    in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7622     Defining LWLIB_DIALOGS_ATHENA
7623 EOF
7624 cat >> confdefs.h <<\EOF
7625 #define LWLIB_DIALOGS_ATHENA 1
7626 EOF
7627 }
7628    ;; esac
7629 test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7630     Defining LWLIB_SCROLLBARS_ATHENA3D
7631 EOF
7632 cat >> confdefs.h <<\EOF
7633 #define LWLIB_SCROLLBARS_ATHENA3D 1
7634 EOF
7635 }
7636
7637 test "$with_dialogs"    = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7638     Defining LWLIB_DIALOGS_ATHENA3D
7639 EOF
7640 cat >> confdefs.h <<\EOF
7641 #define LWLIB_DIALOGS_ATHENA3D 1
7642 EOF
7643 }
7644
7645
7646 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7647     Defining HAVE_MENUBARS
7648 EOF
7649 cat >> confdefs.h <<\EOF
7650 #define HAVE_MENUBARS 1
7651 EOF
7652 }
7653
7654 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7655     Defining HAVE_SCROLLBARS
7656 EOF
7657 cat >> confdefs.h <<\EOF
7658 #define HAVE_SCROLLBARS 1
7659 EOF
7660 }
7661
7662 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7663     Defining HAVE_DIALOGS
7664 EOF
7665 cat >> confdefs.h <<\EOF
7666 #define HAVE_DIALOGS 1
7667 EOF
7668 }
7669
7670 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7671     Defining HAVE_TOOLBARS
7672 EOF
7673 cat >> confdefs.h <<\EOF
7674 #define HAVE_TOOLBARS 1
7675 EOF
7676 }
7677
7678
7679 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7680     Defining LWLIB_MENUBARS_LUCID
7681 EOF
7682 cat >> confdefs.h <<\EOF
7683 #define LWLIB_MENUBARS_LUCID 1
7684 EOF
7685 }
7686
7687 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7688     Defining LWLIB_SCROLLBARS_LUCID
7689 EOF
7690 cat >> confdefs.h <<\EOF
7691 #define LWLIB_SCROLLBARS_LUCID 1
7692 EOF
7693 }
7694
7695
7696 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7697     Defining LWLIB_MENUBARS_MOTIF
7698 EOF
7699 cat >> confdefs.h <<\EOF
7700 #define LWLIB_MENUBARS_MOTIF 1
7701 EOF
7702 }
7703
7704 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7705     Defining LWLIB_SCROLLBARS_MOTIF
7706 EOF
7707 cat >> confdefs.h <<\EOF
7708 #define LWLIB_SCROLLBARS_MOTIF 1
7709 EOF
7710 }
7711
7712 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7713     Defining LWLIB_DIALOGS_MOTIF
7714 EOF
7715 cat >> confdefs.h <<\EOF
7716 #define LWLIB_DIALOGS_MOTIF 1
7717 EOF
7718 }
7719
7720
7721 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
7722    echo "    xemacs will be linked with \"menubar.o\""
7723  fi
7724 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
7725    echo "    xemacs will be linked with \"scrollbar.o\""
7726  fi
7727 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
7728    echo "    xemacs will be linked with \"dialog.o\""
7729  fi
7730 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
7731    echo "    xemacs will be linked with \"toolbar.o\""
7732  fi
7733
7734 if test "$with_x11" = "yes"; then
7735   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
7736    echo "    xemacs will be linked with \"menubar-x.o\""
7737  fi
7738   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7739    echo "    xemacs will be linked with \"scrollbar-x.o\""
7740  fi
7741   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
7742    echo "    xemacs will be linked with \"dialog-x.o\""
7743  fi
7744   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7745    echo "    xemacs will be linked with \"toolbar-x.o\""
7746  fi
7747   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
7748    echo "    xemacs will be linked with \"gui-x.o\""
7749  fi
7750 else
7751   if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then
7752     echo "Attempt to Build NAS sound without X"
7753     echo "Please remove NAS configuration or build with X"
7754     exit 1
7755   fi
7756 fi
7757
7758
7759 test -z "$with_mule" && with_mule=no
7760 test -z "$with_file_coding" && with_file_coding=no
7761
7762
7763 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
7764   { test "$extra_verbose" = "yes" && cat << \EOF
7765     Defining FILE_CODING
7766 EOF
7767 cat >> confdefs.h <<\EOF
7768 #define FILE_CODING 1
7769 EOF
7770 }
7771
7772   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7773    echo "    xemacs will be linked with \"file-coding.o\""
7774  fi
7775 fi
7776
7777 if test "$with_mule" = "yes" ; then
7778   echo "checking for Mule-related features" 1>&6
7779 echo "configure:7780: checking for Mule-related features" >&5
7780   { test "$extra_verbose" = "yes" && cat << \EOF
7781     Defining MULE
7782 EOF
7783 cat >> confdefs.h <<\EOF
7784 #define MULE 1
7785 EOF
7786 }
7787
7788   { test "$extra_verbose" = "yes" && cat << \EOF
7789     Defining FILE_CODING
7790 EOF
7791 cat >> confdefs.h <<\EOF
7792 #define FILE_CODING 1
7793 EOF
7794 }
7795
7796   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7797    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
7798  fi
7799
7800     for ac_hdr in libintl.h
7801 do
7802 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7803 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7804 echo "configure:7805: checking for $ac_hdr" >&5
7805
7806 cat > conftest.$ac_ext <<EOF
7807 #line 7808 "configure"
7808 #include "confdefs.h"
7809 #include <$ac_hdr>
7810 EOF
7811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7812 { (eval echo configure:7813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7814 if test -z "$ac_err"; then
7815   rm -rf conftest*
7816   eval "ac_cv_header_$ac_safe=yes"
7817 else
7818   echo "$ac_err" >&5
7819   echo "configure: failed program was:" >&5
7820   cat conftest.$ac_ext >&5
7821   rm -rf conftest*
7822   eval "ac_cv_header_$ac_safe=no"
7823 fi
7824 rm -f conftest*
7825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7826   echo "$ac_t""yes" 1>&6
7827     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7828   { test "$extra_verbose" = "yes" && cat << EOF
7829     Defining $ac_tr_hdr
7830 EOF
7831 cat >> confdefs.h <<EOF
7832 #define $ac_tr_hdr 1
7833 EOF
7834 }
7835  
7836 else
7837   echo "$ac_t""no" 1>&6
7838 fi
7839 done
7840
7841   
7842 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
7843 echo "configure:7844: checking for strerror in -lintl" >&5
7844 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
7845
7846 xe_check_libs=" -lintl "
7847 cat > conftest.$ac_ext <<EOF
7848 #line 7849 "configure"
7849 #include "confdefs.h"
7850 /* Override any gcc2 internal prototype to avoid an error.  */
7851 /* We use char because int might match the return type of a gcc2
7852     builtin and then its argument prototype would still apply.  */
7853 char strerror();
7854
7855 int main() {
7856 strerror()
7857 ; return 0; }
7858 EOF
7859 if { (eval echo configure:7860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7860   rm -rf conftest*
7861   eval "ac_cv_lib_$ac_lib_var=yes"
7862 else
7863   echo "configure: failed program was:" >&5
7864   cat conftest.$ac_ext >&5
7865   rm -rf conftest*
7866   eval "ac_cv_lib_$ac_lib_var=no"
7867 fi
7868 rm -f conftest*
7869 xe_check_libs=""
7870
7871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7872   echo "$ac_t""yes" 1>&6
7873     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7874     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7875   { test "$extra_verbose" = "yes" && cat << EOF
7876     Defining $ac_tr_lib
7877 EOF
7878 cat >> confdefs.h <<EOF
7879 #define $ac_tr_lib 1
7880 EOF
7881 }
7882
7883   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
7884
7885 else
7886   echo "$ac_t""no" 1>&6
7887 fi
7888
7889
7890
7891   echo "checking for Mule input methods" 1>&6
7892 echo "configure:7893: checking for Mule input methods" >&5
7893         case "$with_xim" in "" | "yes" )
7894     echo "checking for XIM" 1>&6
7895 echo "configure:7896: checking for XIM" >&5
7896     
7897 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
7898 echo "configure:7899: checking for XOpenIM in -lX11" >&5
7899 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
7900
7901 xe_check_libs=" -lX11 "
7902 cat > conftest.$ac_ext <<EOF
7903 #line 7904 "configure"
7904 #include "confdefs.h"
7905 /* Override any gcc2 internal prototype to avoid an error.  */
7906 /* We use char because int might match the return type of a gcc2
7907     builtin and then its argument prototype would still apply.  */
7908 char XOpenIM();
7909
7910 int main() {
7911 XOpenIM()
7912 ; return 0; }
7913 EOF
7914 if { (eval echo configure:7915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7915   rm -rf conftest*
7916   eval "ac_cv_lib_$ac_lib_var=yes"
7917 else
7918   echo "configure: failed program was:" >&5
7919   cat conftest.$ac_ext >&5
7920   rm -rf conftest*
7921   eval "ac_cv_lib_$ac_lib_var=no"
7922 fi
7923 rm -f conftest*
7924 xe_check_libs=""
7925
7926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7927   echo "$ac_t""yes" 1>&6
7928   with_xim=xlib
7929 else
7930   echo "$ac_t""no" 1>&6
7931 with_xim=no
7932 fi
7933
7934
7935         if test "$have_motif $have_lesstif" = "yes no"; then
7936       
7937 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
7938 echo "configure:7939: checking for XmImMbLookupString in -lXm" >&5
7939 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
7940
7941 xe_check_libs=" -lXm "
7942 cat > conftest.$ac_ext <<EOF
7943 #line 7944 "configure"
7944 #include "confdefs.h"
7945 /* Override any gcc2 internal prototype to avoid an error.  */
7946 /* We use char because int might match the return type of a gcc2
7947     builtin and then its argument prototype would still apply.  */
7948 char XmImMbLookupString();
7949
7950 int main() {
7951 XmImMbLookupString()
7952 ; return 0; }
7953 EOF
7954 if { (eval echo configure:7955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7955   rm -rf conftest*
7956   eval "ac_cv_lib_$ac_lib_var=yes"
7957 else
7958   echo "configure: failed program was:" >&5
7959   cat conftest.$ac_ext >&5
7960   rm -rf conftest*
7961   eval "ac_cv_lib_$ac_lib_var=no"
7962 fi
7963 rm -f conftest*
7964 xe_check_libs=""
7965
7966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7967   echo "$ac_t""yes" 1>&6
7968   with_xim=motif
7969 else
7970   echo "$ac_t""no" 1>&6
7971 fi
7972
7973
7974     fi ;;
7975   esac
7976   if test "$with_xim" != "no"; then
7977     { test "$extra_verbose" = "yes" && cat << \EOF
7978     Defining HAVE_XIM
7979 EOF
7980 cat >> confdefs.h <<\EOF
7981 #define HAVE_XIM 1
7982 EOF
7983 }
7984
7985     if test "$with_xim" = "xlib"; then
7986       { test "$extra_verbose" = "yes" && cat << \EOF
7987     Defining XIM_XLIB
7988 EOF
7989 cat >> confdefs.h <<\EOF
7990 #define XIM_XLIB 1
7991 EOF
7992 }
7993
7994       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
7995    echo "    xemacs will be linked with \"input-method-xlib.o\""
7996  fi
7997     fi
7998     if test "$with_xim" = "motif"; then
7999       { test "$extra_verbose" = "yes" && cat << \EOF
8000     Defining XIM_MOTIF
8001 EOF
8002 cat >> confdefs.h <<\EOF
8003 #define XIM_MOTIF 1
8004 EOF
8005 }
8006
8007       need_motif=yes
8008       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8009    echo "    xemacs will be linked with \"input-method-motif.o\""
8010  fi
8011     fi
8012     if test "$with_xim" = "motif"; then
8013       with_xfs=no
8014     fi
8015   fi
8016
8017     if test "$with_xfs" = "yes" ; then
8018     echo "checking for XFontSet" 1>&6
8019 echo "configure:8020: checking for XFontSet" >&5
8020     
8021 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8022 echo "configure:8023: checking for XmbDrawString in -lX11" >&5
8023 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8024
8025 xe_check_libs=" -lX11 "
8026 cat > conftest.$ac_ext <<EOF
8027 #line 8028 "configure"
8028 #include "confdefs.h"
8029 /* Override any gcc2 internal prototype to avoid an error.  */
8030 /* We use char because int might match the return type of a gcc2
8031     builtin and then its argument prototype would still apply.  */
8032 char XmbDrawString();
8033
8034 int main() {
8035 XmbDrawString()
8036 ; return 0; }
8037 EOF
8038 if { (eval echo configure:8039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8039   rm -rf conftest*
8040   eval "ac_cv_lib_$ac_lib_var=yes"
8041 else
8042   echo "configure: failed program was:" >&5
8043   cat conftest.$ac_ext >&5
8044   rm -rf conftest*
8045   eval "ac_cv_lib_$ac_lib_var=no"
8046 fi
8047 rm -f conftest*
8048 xe_check_libs=""
8049
8050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8051   echo "$ac_t""yes" 1>&6
8052   :
8053 else
8054   echo "$ac_t""no" 1>&6
8055 with_xfs=no
8056 fi
8057
8058
8059     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8060       { test "$extra_verbose" = "yes" && cat << \EOF
8061     Defining USE_XFONTSET
8062 EOF
8063 cat >> confdefs.h <<\EOF
8064 #define USE_XFONTSET 1
8065 EOF
8066 }
8067
8068       if test "$with_xim" = "no" ; then
8069         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8070    echo "    xemacs will be linked with \"input-method-xfs.o\""
8071  fi
8072       fi
8073     fi
8074   fi 
8075     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8076   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8077 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8078 echo "configure:8079: checking for wnn/jllib.h" >&5
8079
8080 cat > conftest.$ac_ext <<EOF
8081 #line 8082 "configure"
8082 #include "confdefs.h"
8083 #include <wnn/jllib.h>
8084 EOF
8085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8086 { (eval echo configure:8087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8088 if test -z "$ac_err"; then
8089   rm -rf conftest*
8090   eval "ac_cv_header_$ac_safe=yes"
8091 else
8092   echo "$ac_err" >&5
8093   echo "configure: failed program was:" >&5
8094   cat conftest.$ac_ext >&5
8095   rm -rf conftest*
8096   eval "ac_cv_header_$ac_safe=no"
8097 fi
8098 rm -f conftest*
8099 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8100   echo "$ac_t""yes" 1>&6
8101   :
8102 else
8103   echo "$ac_t""no" 1>&6
8104 with_wnn=no
8105 fi
8106  }
8107     if test "$with_wnn" != "no"; then
8108     for ac_func in crypt
8109 do
8110 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8111 echo "configure:8112: checking for $ac_func" >&5
8112
8113 cat > conftest.$ac_ext <<EOF
8114 #line 8115 "configure"
8115 #include "confdefs.h"
8116 /* System header to define __stub macros and hopefully few prototypes,
8117     which can conflict with char $ac_func(); below.  */
8118 #include <assert.h>
8119 /* Override any gcc2 internal prototype to avoid an error.  */
8120 /* We use char because int might match the return type of a gcc2
8121     builtin and then its argument prototype would still apply.  */
8122 char $ac_func();
8123
8124 int main() {
8125
8126 /* The GNU C library defines this for functions which it implements
8127     to always fail with ENOSYS.  Some functions are actually named
8128     something starting with __ and the normal name is an alias.  */
8129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8130 choke me
8131 #else
8132 $ac_func();
8133 #endif
8134
8135 ; return 0; }
8136 EOF
8137 if { (eval echo configure:8138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8138   rm -rf conftest*
8139   eval "ac_cv_func_$ac_func=yes"
8140 else
8141   echo "configure: failed program was:" >&5
8142   cat conftest.$ac_ext >&5
8143   rm -rf conftest*
8144   eval "ac_cv_func_$ac_func=no"
8145 fi
8146 rm -f conftest*
8147
8148 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8149   echo "$ac_t""yes" 1>&6
8150     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8151   { test "$extra_verbose" = "yes" && cat << EOF
8152     Defining $ac_tr_func
8153 EOF
8154 cat >> confdefs.h <<EOF
8155 #define $ac_tr_func 1
8156 EOF
8157 }
8158  
8159 else
8160   echo "$ac_t""no" 1>&6
8161 fi
8162 done
8163
8164     test "$ac_cv_func_crypt" != "yes" && { 
8165 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8166 echo "configure:8167: checking for crypt in -lcrypt" >&5
8167 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8168
8169 xe_check_libs=" -lcrypt "
8170 cat > conftest.$ac_ext <<EOF
8171 #line 8172 "configure"
8172 #include "confdefs.h"
8173 /* Override any gcc2 internal prototype to avoid an error.  */
8174 /* We use char because int might match the return type of a gcc2
8175     builtin and then its argument prototype would still apply.  */
8176 char crypt();
8177
8178 int main() {
8179 crypt()
8180 ; return 0; }
8181 EOF
8182 if { (eval echo configure:8183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8183   rm -rf conftest*
8184   eval "ac_cv_lib_$ac_lib_var=yes"
8185 else
8186   echo "configure: failed program was:" >&5
8187   cat conftest.$ac_ext >&5
8188   rm -rf conftest*
8189   eval "ac_cv_lib_$ac_lib_var=no"
8190 fi
8191 rm -f conftest*
8192 xe_check_libs=""
8193
8194 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8195   echo "$ac_t""yes" 1>&6
8196     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8197     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8198   { test "$extra_verbose" = "yes" && cat << EOF
8199     Defining $ac_tr_lib
8200 EOF
8201 cat >> confdefs.h <<EOF
8202 #define $ac_tr_lib 1
8203 EOF
8204 }
8205
8206   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
8207
8208 else
8209   echo "$ac_t""no" 1>&6
8210 fi
8211
8212  }
8213   fi
8214     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
8215     
8216 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
8217 echo "configure:8218: checking for jl_dic_list_e in -lwnn" >&5
8218 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8219
8220 xe_check_libs=" -lwnn "
8221 cat > conftest.$ac_ext <<EOF
8222 #line 8223 "configure"
8223 #include "confdefs.h"
8224 /* Override any gcc2 internal prototype to avoid an error.  */
8225 /* We use char because int might match the return type of a gcc2
8226     builtin and then its argument prototype would still apply.  */
8227 char jl_dic_list_e();
8228
8229 int main() {
8230 jl_dic_list_e()
8231 ; return 0; }
8232 EOF
8233 if { (eval echo configure:8234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8234   rm -rf conftest*
8235   eval "ac_cv_lib_$ac_lib_var=yes"
8236 else
8237   echo "configure: failed program was:" >&5
8238   cat conftest.$ac_ext >&5
8239   rm -rf conftest*
8240   eval "ac_cv_lib_$ac_lib_var=no"
8241 fi
8242 rm -f conftest*
8243 xe_check_libs=""
8244
8245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8246   echo "$ac_t""yes" 1>&6
8247   libwnn=wnn
8248 else
8249   echo "$ac_t""no" 1>&6
8250 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
8251 echo "configure:8252: checking for jl_dic_list_e in -lwnn4" >&5
8252 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8253
8254 xe_check_libs=" -lwnn4 "
8255 cat > conftest.$ac_ext <<EOF
8256 #line 8257 "configure"
8257 #include "confdefs.h"
8258 /* Override any gcc2 internal prototype to avoid an error.  */
8259 /* We use char because int might match the return type of a gcc2
8260     builtin and then its argument prototype would still apply.  */
8261 char jl_dic_list_e();
8262
8263 int main() {
8264 jl_dic_list_e()
8265 ; return 0; }
8266 EOF
8267 if { (eval echo configure:8268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8268   rm -rf conftest*
8269   eval "ac_cv_lib_$ac_lib_var=yes"
8270 else
8271   echo "configure: failed program was:" >&5
8272   cat conftest.$ac_ext >&5
8273   rm -rf conftest*
8274   eval "ac_cv_lib_$ac_lib_var=no"
8275 fi
8276 rm -f conftest*
8277 xe_check_libs=""
8278
8279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8280   echo "$ac_t""yes" 1>&6
8281   libwnn=wnn4
8282 else
8283   echo "$ac_t""no" 1>&6
8284 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
8285 echo "configure:8286: checking for jl_dic_list_e in -lwnn6" >&5
8286 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8287
8288 xe_check_libs=" -lwnn6 "
8289 cat > conftest.$ac_ext <<EOF
8290 #line 8291 "configure"
8291 #include "confdefs.h"
8292 /* Override any gcc2 internal prototype to avoid an error.  */
8293 /* We use char because int might match the return type of a gcc2
8294     builtin and then its argument prototype would still apply.  */
8295 char jl_dic_list_e();
8296
8297 int main() {
8298 jl_dic_list_e()
8299 ; return 0; }
8300 EOF
8301 if { (eval echo configure:8302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8302   rm -rf conftest*
8303   eval "ac_cv_lib_$ac_lib_var=yes"
8304 else
8305   echo "configure: failed program was:" >&5
8306   cat conftest.$ac_ext >&5
8307   rm -rf conftest*
8308   eval "ac_cv_lib_$ac_lib_var=no"
8309 fi
8310 rm -f conftest*
8311 xe_check_libs=""
8312
8313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8314   echo "$ac_t""yes" 1>&6
8315   libwnn=wnn6
8316 else
8317   echo "$ac_t""no" 1>&6
8318 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
8319 echo "configure:8320: checking for dic_list_e in -lwnn6_fromsrc" >&5
8320 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
8321
8322 xe_check_libs=" -lwnn6_fromsrc "
8323 cat > conftest.$ac_ext <<EOF
8324 #line 8325 "configure"
8325 #include "confdefs.h"
8326 /* Override any gcc2 internal prototype to avoid an error.  */
8327 /* We use char because int might match the return type of a gcc2
8328     builtin and then its argument prototype would still apply.  */
8329 char dic_list_e();
8330
8331 int main() {
8332 dic_list_e()
8333 ; return 0; }
8334 EOF
8335 if { (eval echo configure:8336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8336   rm -rf conftest*
8337   eval "ac_cv_lib_$ac_lib_var=yes"
8338 else
8339   echo "configure: failed program was:" >&5
8340   cat conftest.$ac_ext >&5
8341   rm -rf conftest*
8342   eval "ac_cv_lib_$ac_lib_var=no"
8343 fi
8344 rm -f conftest*
8345 xe_check_libs=""
8346
8347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8348   echo "$ac_t""yes" 1>&6
8349   libwnn=wnn6_fromsrc
8350 else
8351   echo "$ac_t""no" 1>&6
8352 with_wnn=no
8353 fi
8354
8355
8356 fi
8357
8358
8359 fi
8360
8361
8362 fi
8363
8364
8365   fi
8366   test -z "$with_wnn" && with_wnn=yes
8367   if test "$with_wnn" = "yes"; then
8368     { test "$extra_verbose" = "yes" && cat << \EOF
8369     Defining HAVE_WNN
8370 EOF
8371 cat >> confdefs.h <<\EOF
8372 #define HAVE_WNN 1
8373 EOF
8374 }
8375
8376     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
8377     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
8378    echo "    xemacs will be linked with \"mule-wnnfns.o\""
8379  fi
8380     if test "$with_wnn6" != "no"; then
8381       
8382 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
8383 echo "configure:8384: checking for jl_fi_dic_list in -l$libwnn" >&5
8384 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
8385
8386 xe_check_libs=" -l$libwnn "
8387 cat > conftest.$ac_ext <<EOF
8388 #line 8389 "configure"
8389 #include "confdefs.h"
8390 /* Override any gcc2 internal prototype to avoid an error.  */
8391 /* We use char because int might match the return type of a gcc2
8392     builtin and then its argument prototype would still apply.  */
8393 char jl_fi_dic_list();
8394
8395 int main() {
8396 jl_fi_dic_list()
8397 ; return 0; }
8398 EOF
8399 if { (eval echo configure:8400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8400   rm -rf conftest*
8401   eval "ac_cv_lib_$ac_lib_var=yes"
8402 else
8403   echo "configure: failed program was:" >&5
8404   cat conftest.$ac_ext >&5
8405   rm -rf conftest*
8406   eval "ac_cv_lib_$ac_lib_var=no"
8407 fi
8408 rm -f conftest*
8409 xe_check_libs=""
8410
8411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8412   echo "$ac_t""yes" 1>&6
8413   with_wnn6=yes
8414 else
8415   echo "$ac_t""no" 1>&6
8416 fi
8417
8418
8419       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
8420     Defining WNN6
8421 EOF
8422 cat >> confdefs.h <<\EOF
8423 #define WNN6 1
8424 EOF
8425 }
8426
8427     fi
8428   fi
8429
8430     canna_includes_found=no
8431   if test "$with_canna" != "no"; then
8432     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8433 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8434 echo "configure:8435: checking for canna/jrkanji.h" >&5
8435
8436 cat > conftest.$ac_ext <<EOF
8437 #line 8438 "configure"
8438 #include "confdefs.h"
8439 #include <canna/jrkanji.h>
8440 EOF
8441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8442 { (eval echo configure:8443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8444 if test -z "$ac_err"; then
8445   rm -rf conftest*
8446   eval "ac_cv_header_$ac_safe=yes"
8447 else
8448   echo "$ac_err" >&5
8449   echo "configure: failed program was:" >&5
8450   cat conftest.$ac_ext >&5
8451   rm -rf conftest*
8452   eval "ac_cv_header_$ac_safe=no"
8453 fi
8454 rm -f conftest*
8455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8456   echo "$ac_t""yes" 1>&6
8457   canna_includes_found=yes
8458 else
8459   echo "$ac_t""no" 1>&6
8460 fi
8461
8462   fi
8463   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
8464       -d "/usr/local/canna/include"; then
8465     save_c_switch_site="$c_switch_site"
8466     c_switch_site="$c_switch_site -I/usr/local/canna/include"
8467     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8468 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8469 echo "configure:8470: checking for canna/jrkanji.h" >&5
8470
8471 cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474 #include <canna/jrkanji.h>
8475 EOF
8476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8477 { (eval echo configure:8478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8479 if test -z "$ac_err"; then
8480   rm -rf conftest*
8481   eval "ac_cv_header_$ac_safe=yes"
8482 else
8483   echo "$ac_err" >&5
8484   echo "configure: failed program was:" >&5
8485   cat conftest.$ac_ext >&5
8486   rm -rf conftest*
8487   eval "ac_cv_header_$ac_safe=no"
8488 fi
8489 rm -f conftest*
8490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8491   echo "$ac_t""yes" 1>&6
8492   canna_includes_found=yes
8493 else
8494   echo "$ac_t""no" 1>&6
8495 fi
8496
8497     if test "$canna_includes_found" != "yes"; then
8498       c_switch_site="$save_c_switch_site"
8499       with_canna="no"
8500     fi
8501   fi
8502
8503   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
8504 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
8505 echo "configure:8506: checking for canna/RK.h" >&5
8506
8507 cat > conftest.$ac_ext <<EOF
8508 #line 8509 "configure"
8509 #include "confdefs.h"
8510 #include <canna/RK.h>
8511 EOF
8512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8513 { (eval echo configure:8514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8515 if test -z "$ac_err"; then
8516   rm -rf conftest*
8517   eval "ac_cv_header_$ac_safe=yes"
8518 else
8519   echo "$ac_err" >&5
8520   echo "configure: failed program was:" >&5
8521   cat conftest.$ac_ext >&5
8522   rm -rf conftest*
8523   eval "ac_cv_header_$ac_safe=no"
8524 fi
8525 rm -f conftest*
8526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8527   echo "$ac_t""yes" 1>&6
8528   :
8529 else
8530   echo "$ac_t""no" 1>&6
8531 with_canna=no
8532 fi
8533  }
8534   test -z "$with_canna" && { 
8535 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
8536 echo "configure:8537: checking for RkBgnBun in -lRKC" >&5
8537 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
8538
8539 xe_check_libs=" -lRKC "
8540 cat > conftest.$ac_ext <<EOF
8541 #line 8542 "configure"
8542 #include "confdefs.h"
8543 /* Override any gcc2 internal prototype to avoid an error.  */
8544 /* We use char because int might match the return type of a gcc2
8545     builtin and then its argument prototype would still apply.  */
8546 char RkBgnBun();
8547
8548 int main() {
8549 RkBgnBun()
8550 ; return 0; }
8551 EOF
8552 if { (eval echo configure:8553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8553   rm -rf conftest*
8554   eval "ac_cv_lib_$ac_lib_var=yes"
8555 else
8556   echo "configure: failed program was:" >&5
8557   cat conftest.$ac_ext >&5
8558   rm -rf conftest*
8559   eval "ac_cv_lib_$ac_lib_var=no"
8560 fi
8561 rm -f conftest*
8562 xe_check_libs=""
8563
8564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8565   echo "$ac_t""yes" 1>&6
8566   :
8567 else
8568   echo "$ac_t""no" 1>&6
8569 with_canna=no
8570 fi
8571
8572  }
8573   test -z "$with_canna" && { 
8574 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
8575 echo "configure:8576: checking for jrKanjiControl in -lcanna" >&5
8576 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
8577
8578 xe_check_libs=" -lcanna "
8579 cat > conftest.$ac_ext <<EOF
8580 #line 8581 "configure"
8581 #include "confdefs.h"
8582 /* Override any gcc2 internal prototype to avoid an error.  */
8583 /* We use char because int might match the return type of a gcc2
8584     builtin and then its argument prototype would still apply.  */
8585 char jrKanjiControl();
8586
8587 int main() {
8588 jrKanjiControl()
8589 ; return 0; }
8590 EOF
8591 if { (eval echo configure:8592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8592   rm -rf conftest*
8593   eval "ac_cv_lib_$ac_lib_var=yes"
8594 else
8595   echo "configure: failed program was:" >&5
8596   cat conftest.$ac_ext >&5
8597   rm -rf conftest*
8598   eval "ac_cv_lib_$ac_lib_var=no"
8599 fi
8600 rm -f conftest*
8601 xe_check_libs=""
8602
8603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8604   echo "$ac_t""yes" 1>&6
8605   :
8606 else
8607   echo "$ac_t""no" 1>&6
8608 with_canna=no
8609 fi
8610
8611  }
8612   test -z "$with_canna" && with_canna=yes
8613   if test "$with_canna" = "yes"; then
8614     { test "$extra_verbose" = "yes" && cat << \EOF
8615     Defining HAVE_CANNA
8616 EOF
8617 cat >> confdefs.h <<\EOF
8618 #define HAVE_CANNA 1
8619 EOF
8620 }
8621
8622     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
8623     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
8624    echo "    xemacs will be linked with \"mule-canna.o\""
8625  fi
8626   fi
8627
8628 else   for feature in xim canna wnn; do
8629     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
8630       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
8631     fi
8632     eval "with_${feature}=no"
8633   done
8634 fi 
8635
8636 if test "$need_motif" = "yes" ; then
8637   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
8638     
8639 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
8640 echo "configure:8641: checking for layout_object_getvalue in -li18n" >&5
8641 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
8642
8643 xe_check_libs=" -li18n "
8644 cat > conftest.$ac_ext <<EOF
8645 #line 8646 "configure"
8646 #include "confdefs.h"
8647 /* Override any gcc2 internal prototype to avoid an error.  */
8648 /* We use char because int might match the return type of a gcc2
8649     builtin and then its argument prototype would still apply.  */
8650 char layout_object_getvalue();
8651
8652 int main() {
8653 layout_object_getvalue()
8654 ; return 0; }
8655 EOF
8656 if { (eval echo configure:8657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8657   rm -rf conftest*
8658   eval "ac_cv_lib_$ac_lib_var=yes"
8659 else
8660   echo "configure: failed program was:" >&5
8661   cat conftest.$ac_ext >&5
8662   rm -rf conftest*
8663   eval "ac_cv_lib_$ac_lib_var=no"
8664 fi
8665 rm -f conftest*
8666 xe_check_libs=""
8667
8668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8669   echo "$ac_t""yes" 1>&6
8670   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
8671 else
8672   echo "$ac_t""no" 1>&6
8673 fi
8674
8675
8676   
8677 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
8678     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8679   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8680   
8681         runpath="" runpath_dirs=""
8682   if test -n "$LD_RUN_PATH"; then
8683     runpath="$LD_RUN_PATH"
8684   elif test "$GCC" = "yes"; then
8685         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
8686     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
8687     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
8688     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
8689       case "$arg" in P,* | -L* | -R* )
8690         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
8691           {
8692 xe_runpath_dir="$dir"
8693   test "$xe_runpath_dir" != "/lib"     -a \
8694         "$xe_runpath_dir" != "/usr/lib" -a \
8695         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8696   eval "$xe_add_unique_runpath_dir"
8697 }
8698         done ;;
8699       esac
8700     done
8701     ld_switch_run="$ld_switch_run_save"
8702     rm -f conftest*
8703   else
8704         for arg in $ld_switch_site $ld_switch_x_site; do
8705       case "$arg" in -L*) {
8706 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
8707   test "$xe_runpath_dir" != "/lib"     -a \
8708         "$xe_runpath_dir" != "/usr/lib" -a \
8709         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8710   eval "$xe_add_unique_runpath_dir"
8711 };; esac
8712     done
8713         if test "$opsys $need_motif" = "sol2 yes"; then
8714       xe_runpath_dir="/opt/SUNWdt/lib";
8715       eval "$xe_add_unique_runpath_dir";
8716     fi
8717   fi 
8718   if test -n "$runpath"; then
8719     ld_switch_run="${dash_r}${runpath}"
8720     
8721 if test "$GCC" = "yes"; then
8722   set x $ld_switch_run; shift; ld_switch_run=""
8723   while test -n "$1"; do
8724     case $1 in
8725       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
8726       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
8727       -Xlinker* ) ;;
8728       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
8729     esac
8730     shift
8731   done
8732 fi
8733     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
8734   fi
8735 fi
8736
8737 fi
8738
8739 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
8740 do
8741 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8742 echo "configure:8743: checking for $ac_func" >&5
8743
8744 cat > conftest.$ac_ext <<EOF
8745 #line 8746 "configure"
8746 #include "confdefs.h"
8747 /* System header to define __stub macros and hopefully few prototypes,
8748     which can conflict with char $ac_func(); below.  */
8749 #include <assert.h>
8750 /* Override any gcc2 internal prototype to avoid an error.  */
8751 /* We use char because int might match the return type of a gcc2
8752     builtin and then its argument prototype would still apply.  */
8753 char $ac_func();
8754
8755 int main() {
8756
8757 /* The GNU C library defines this for functions which it implements
8758     to always fail with ENOSYS.  Some functions are actually named
8759     something starting with __ and the normal name is an alias.  */
8760 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8761 choke me
8762 #else
8763 $ac_func();
8764 #endif
8765
8766 ; return 0; }
8767 EOF
8768 if { (eval echo configure:8769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8769   rm -rf conftest*
8770   eval "ac_cv_func_$ac_func=yes"
8771 else
8772   echo "configure: failed program was:" >&5
8773   cat conftest.$ac_ext >&5
8774   rm -rf conftest*
8775   eval "ac_cv_func_$ac_func=no"
8776 fi
8777 rm -f conftest*
8778
8779 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8780   echo "$ac_t""yes" 1>&6
8781     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8782   { test "$extra_verbose" = "yes" && cat << EOF
8783     Defining $ac_tr_func
8784 EOF
8785 cat >> confdefs.h <<EOF
8786 #define $ac_tr_func 1
8787 EOF
8788 }
8789  
8790 else
8791   echo "$ac_t""no" 1>&6
8792 fi
8793 done
8794
8795
8796
8797 case "$opsys" in
8798   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8799    echo "    xemacs will be linked with \"realpath.o\""
8800  fi ;;
8801   * )
8802     case "$canonical" in
8803       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8804    echo "    xemacs will be linked with \"realpath.o\""
8805  fi ;;
8806       * ) for ac_func in realpath
8807 do
8808 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8809 echo "configure:8810: checking for $ac_func" >&5
8810
8811 cat > conftest.$ac_ext <<EOF
8812 #line 8813 "configure"
8813 #include "confdefs.h"
8814 /* System header to define __stub macros and hopefully few prototypes,
8815     which can conflict with char $ac_func(); below.  */
8816 #include <assert.h>
8817 /* Override any gcc2 internal prototype to avoid an error.  */
8818 /* We use char because int might match the return type of a gcc2
8819     builtin and then its argument prototype would still apply.  */
8820 char $ac_func();
8821
8822 int main() {
8823
8824 /* The GNU C library defines this for functions which it implements
8825     to always fail with ENOSYS.  Some functions are actually named
8826     something starting with __ and the normal name is an alias.  */
8827 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8828 choke me
8829 #else
8830 $ac_func();
8831 #endif
8832
8833 ; return 0; }
8834 EOF
8835 if { (eval echo configure:8836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8836   rm -rf conftest*
8837   eval "ac_cv_func_$ac_func=yes"
8838 else
8839   echo "configure: failed program was:" >&5
8840   cat conftest.$ac_ext >&5
8841   rm -rf conftest*
8842   eval "ac_cv_func_$ac_func=no"
8843 fi
8844 rm -f conftest*
8845
8846 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8847   echo "$ac_t""yes" 1>&6
8848     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8849   { test "$extra_verbose" = "yes" && cat << EOF
8850     Defining $ac_tr_func
8851 EOF
8852 cat >> confdefs.h <<EOF
8853 #define $ac_tr_func 1
8854 EOF
8855 }
8856  
8857 else
8858   echo "$ac_t""no" 1>&6
8859 fi
8860 done
8861
8862           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8863    echo "    xemacs will be linked with \"realpath.o\""
8864  fi ;;
8865     esac ;;
8866 esac
8867
8868 for ac_func in getloadavg
8869 do
8870 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8871 echo "configure:8872: checking for $ac_func" >&5
8872
8873 cat > conftest.$ac_ext <<EOF
8874 #line 8875 "configure"
8875 #include "confdefs.h"
8876 /* System header to define __stub macros and hopefully few prototypes,
8877     which can conflict with char $ac_func(); below.  */
8878 #include <assert.h>
8879 /* Override any gcc2 internal prototype to avoid an error.  */
8880 /* We use char because int might match the return type of a gcc2
8881     builtin and then its argument prototype would still apply.  */
8882 char $ac_func();
8883
8884 int main() {
8885
8886 /* The GNU C library defines this for functions which it implements
8887     to always fail with ENOSYS.  Some functions are actually named
8888     something starting with __ and the normal name is an alias.  */
8889 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8890 choke me
8891 #else
8892 $ac_func();
8893 #endif
8894
8895 ; return 0; }
8896 EOF
8897 if { (eval echo configure:8898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8898   rm -rf conftest*
8899   eval "ac_cv_func_$ac_func=yes"
8900 else
8901   echo "configure: failed program was:" >&5
8902   cat conftest.$ac_ext >&5
8903   rm -rf conftest*
8904   eval "ac_cv_func_$ac_func=no"
8905 fi
8906 rm -f conftest*
8907
8908 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8909   echo "$ac_t""yes" 1>&6
8910     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8911   { test "$extra_verbose" = "yes" && cat << EOF
8912     Defining $ac_tr_func
8913 EOF
8914 cat >> confdefs.h <<EOF
8915 #define $ac_tr_func 1
8916 EOF
8917 }
8918  
8919 else
8920   echo "$ac_t""no" 1>&6
8921 fi
8922 done
8923
8924
8925 if test "$ac_cv_func_getloadavg" != "yes"
8926 then
8927   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
8928    echo "    xemacs will be linked with \"getloadavg.o\""
8929  fi
8930
8931     
8932 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
8933 echo "configure:8934: checking for kstat_open in -lkstat" >&5
8934 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
8935
8936 xe_check_libs=" -lkstat "
8937 cat > conftest.$ac_ext <<EOF
8938 #line 8939 "configure"
8939 #include "confdefs.h"
8940 /* Override any gcc2 internal prototype to avoid an error.  */
8941 /* We use char because int might match the return type of a gcc2
8942     builtin and then its argument prototype would still apply.  */
8943 char kstat_open();
8944
8945 int main() {
8946 kstat_open()
8947 ; return 0; }
8948 EOF
8949 if { (eval echo configure:8950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8950   rm -rf conftest*
8951   eval "ac_cv_lib_$ac_lib_var=yes"
8952 else
8953   echo "configure: failed program was:" >&5
8954   cat conftest.$ac_ext >&5
8955   rm -rf conftest*
8956   eval "ac_cv_lib_$ac_lib_var=no"
8957 fi
8958 rm -f conftest*
8959 xe_check_libs=""
8960
8961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8962   echo "$ac_t""yes" 1>&6
8963     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8964     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8965   { test "$extra_verbose" = "yes" && cat << EOF
8966     Defining $ac_tr_lib
8967 EOF
8968 cat >> confdefs.h <<EOF
8969 #define $ac_tr_lib 1
8970 EOF
8971 }
8972
8973   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
8974
8975 else
8976   echo "$ac_t""no" 1>&6
8977 fi
8978
8979
8980
8981     
8982 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
8983 echo "configure:8984: checking for kvm_read in -lkvm" >&5
8984 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
8985
8986 xe_check_libs=" -lkvm "
8987 cat > conftest.$ac_ext <<EOF
8988 #line 8989 "configure"
8989 #include "confdefs.h"
8990 /* Override any gcc2 internal prototype to avoid an error.  */
8991 /* We use char because int might match the return type of a gcc2
8992     builtin and then its argument prototype would still apply.  */
8993 char kvm_read();
8994
8995 int main() {
8996 kvm_read()
8997 ; return 0; }
8998 EOF
8999 if { (eval echo configure:9000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9000   rm -rf conftest*
9001   eval "ac_cv_lib_$ac_lib_var=yes"
9002 else
9003   echo "configure: failed program was:" >&5
9004   cat conftest.$ac_ext >&5
9005   rm -rf conftest*
9006   eval "ac_cv_lib_$ac_lib_var=no"
9007 fi
9008 rm -f conftest*
9009 xe_check_libs=""
9010
9011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9012   echo "$ac_t""yes" 1>&6
9013     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9014     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9015   { test "$extra_verbose" = "yes" && cat << EOF
9016     Defining $ac_tr_lib
9017 EOF
9018 cat >> confdefs.h <<EOF
9019 #define $ac_tr_lib 1
9020 EOF
9021 }
9022
9023   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9024
9025 else
9026   echo "$ac_t""no" 1>&6
9027 fi
9028
9029
9030 fi
9031
9032 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9033 echo "configure:9034: checking whether netdb declares h_errno" >&5
9034 cat > conftest.$ac_ext <<EOF
9035 #line 9036 "configure"
9036 #include "confdefs.h"
9037 #include <netdb.h>
9038 int main() {
9039 return h_errno;
9040 ; return 0; }
9041 EOF
9042 if { (eval echo configure:9043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9043   rm -rf conftest*
9044   echo "$ac_t""yes" 1>&6
9045    { test "$extra_verbose" = "yes" && cat << \EOF
9046     Defining HAVE_H_ERRNO
9047 EOF
9048 cat >> confdefs.h <<\EOF
9049 #define HAVE_H_ERRNO 1
9050 EOF
9051 }
9052
9053 else
9054   echo "configure: failed program was:" >&5
9055   cat conftest.$ac_ext >&5
9056   rm -rf conftest*
9057   echo "$ac_t""no" 1>&6
9058 fi
9059 rm -f conftest*
9060
9061 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9062 echo "configure:9063: checking for sigsetjmp" >&5
9063 cat > conftest.$ac_ext <<EOF
9064 #line 9065 "configure"
9065 #include "confdefs.h"
9066 #include <setjmp.h>
9067 int main() {
9068 sigjmp_buf bar; sigsetjmp (bar, 0);
9069 ; return 0; }
9070 EOF
9071 if { (eval echo configure:9072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9072   rm -rf conftest*
9073   echo "$ac_t""yes" 1>&6
9074    { test "$extra_verbose" = "yes" && cat << \EOF
9075     Defining HAVE_SIGSETJMP
9076 EOF
9077 cat >> confdefs.h <<\EOF
9078 #define HAVE_SIGSETJMP 1
9079 EOF
9080 }
9081
9082 else
9083   echo "configure: failed program was:" >&5
9084   cat conftest.$ac_ext >&5
9085   rm -rf conftest*
9086   echo "$ac_t""no" 1>&6
9087 fi
9088 rm -f conftest*
9089
9090 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9091 echo "configure:9092: checking whether localtime caches TZ" >&5
9092
9093 if test "$ac_cv_func_tzset" = "yes"; then
9094 cat > conftest.$ac_ext <<EOF
9095 #line 9096 "configure"
9096 #include "confdefs.h"
9097 #include <time.h>
9098 #if STDC_HEADERS
9099 # include <stdlib.h>
9100 #endif
9101 extern char **environ;
9102 unset_TZ ()
9103 {
9104   char **from, **to;
9105   for (to = from = environ; (*to = *from); from++)
9106     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9107       to++;
9108 }
9109 char TZ_GMT0[] = "TZ=GMT0";
9110 char TZ_PST8[] = "TZ=PST8";
9111 main()
9112 {
9113   time_t now = time ((time_t *) 0);
9114   int hour_GMT0, hour_unset;
9115   if (putenv (TZ_GMT0) != 0)
9116     exit (1);
9117   hour_GMT0 = localtime (&now)->tm_hour;
9118   unset_TZ ();
9119   hour_unset = localtime (&now)->tm_hour;
9120   if (putenv (TZ_PST8) != 0)
9121     exit (1);
9122   if (localtime (&now)->tm_hour == hour_GMT0)
9123     exit (1);
9124   unset_TZ ();
9125   if (localtime (&now)->tm_hour != hour_unset)
9126     exit (1);
9127   exit (0);
9128 }
9129 EOF
9130 if { (eval echo configure:9131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9131 then
9132   emacs_cv_localtime_cache=no
9133 else
9134   conftest_rc="$?"
9135   echo "configure: failed program was:" >&5
9136   cat conftest.$ac_ext >&5
9137   rm -fr conftest*
9138   emacs_cv_localtime_cache=yes
9139 fi
9140 rm -fr conftest*
9141 else
9142         # If we lack tzset, report that localtime does not cache TZ,
9143         # since we can't invalidate the cache if we don't have tzset.
9144         emacs_cv_localtime_cache=no
9145 fi
9146 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9147 if test $emacs_cv_localtime_cache = yes; then
9148   { test "$extra_verbose" = "yes" && cat << \EOF
9149     Defining LOCALTIME_CACHE
9150 EOF
9151 cat >> confdefs.h <<\EOF
9152 #define LOCALTIME_CACHE 1
9153 EOF
9154 }
9155
9156 fi
9157
9158 if test "$HAVE_TIMEVAL" = "yes"; then
9159 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9160 echo "configure:9161: checking whether gettimeofday accepts one or two arguments" >&5
9161 cat > conftest.$ac_ext <<EOF
9162 #line 9163 "configure"
9163 #include "confdefs.h"
9164
9165 #ifdef TIME_WITH_SYS_TIME
9166 #include <sys/time.h>
9167 #include <time.h>
9168 #else
9169 #ifdef HAVE_SYS_TIME_H
9170 #include <sys/time.h>
9171 #else
9172 #include <time.h>
9173 #endif
9174 #endif
9175   
9176 int main() {
9177
9178   struct timeval time;
9179   struct timezone dummy;
9180   gettimeofday (&time, &dummy);
9181
9182 ; return 0; }
9183 EOF
9184 if { (eval echo configure:9185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9185   rm -rf conftest*
9186   echo "$ac_t""two" 1>&6
9187 else
9188   echo "configure: failed program was:" >&5
9189   cat conftest.$ac_ext >&5
9190   rm -rf conftest*
9191   echo "$ac_t""one" 1>&6
9192    { test "$extra_verbose" = "yes" && cat << \EOF
9193     Defining GETTIMEOFDAY_ONE_ARGUMENT
9194 EOF
9195 cat >> confdefs.h <<\EOF
9196 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9197 EOF
9198 }
9199
9200 fi
9201 rm -f conftest*
9202 fi
9203
9204
9205 echo $ac_n "checking for inline""... $ac_c" 1>&6
9206 echo "configure:9207: checking for inline" >&5
9207
9208 ac_cv_c_inline=no
9209 for ac_kw in inline __inline__ __inline; do
9210   cat > conftest.$ac_ext <<EOF
9211 #line 9212 "configure"
9212 #include "confdefs.h"
9213
9214 int main() {
9215 } $ac_kw foo() {
9216 ; return 0; }
9217 EOF
9218 if { (eval echo configure:9219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9219   rm -rf conftest*
9220   ac_cv_c_inline=$ac_kw; break
9221 else
9222   echo "configure: failed program was:" >&5
9223   cat conftest.$ac_ext >&5
9224 fi
9225 rm -f conftest*
9226 done
9227
9228
9229 echo "$ac_t""$ac_cv_c_inline" 1>&6
9230 case "$ac_cv_c_inline" in
9231   inline | yes) ;;
9232   no) { test "$extra_verbose" = "yes" && cat << \EOF
9233     Defining inline = 
9234 EOF
9235 cat >> confdefs.h <<\EOF
9236 #define inline 
9237 EOF
9238 }
9239  ;;
9240   *)  { test "$extra_verbose" = "yes" && cat << EOF
9241     Defining inline = $ac_cv_c_inline
9242 EOF
9243 cat >> confdefs.h <<EOF
9244 #define inline $ac_cv_c_inline
9245 EOF
9246 }
9247  ;;
9248 esac
9249
9250 if test "$ac_cv_c_inline" != "no"; then
9251   { test "$extra_verbose" = "yes" && cat << \EOF
9252     Defining HAVE_INLINE
9253 EOF
9254 cat >> confdefs.h <<\EOF
9255 #define HAVE_INLINE 1
9256 EOF
9257 }
9258
9259   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
9260    echo "    xemacs will be linked with \"inline.o\""
9261  fi
9262 fi
9263
9264
9265 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9266 # for constant arguments.  Useless!
9267 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9268 echo "configure:9269: checking for working alloca.h" >&5
9269
9270 cat > conftest.$ac_ext <<EOF
9271 #line 9272 "configure"
9272 #include "confdefs.h"
9273 #include <alloca.h>
9274 int main() {
9275 char *p = alloca(2 * sizeof(int));
9276 ; return 0; }
9277 EOF
9278 if { (eval echo configure:9279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9279   rm -rf conftest*
9280   ac_cv_header_alloca_h=yes
9281 else
9282   echo "configure: failed program was:" >&5
9283   cat conftest.$ac_ext >&5
9284   rm -rf conftest*
9285   ac_cv_header_alloca_h=no
9286 fi
9287 rm -f conftest*
9288
9289 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9290 if test $ac_cv_header_alloca_h = yes; then
9291   { test "$extra_verbose" = "yes" && cat << \EOF
9292     Defining HAVE_ALLOCA_H
9293 EOF
9294 cat >> confdefs.h <<\EOF
9295 #define HAVE_ALLOCA_H 1
9296 EOF
9297 }
9298
9299 fi
9300
9301 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9302 echo "configure:9303: checking for alloca" >&5
9303
9304 cat > conftest.$ac_ext <<EOF
9305 #line 9306 "configure"
9306 #include "confdefs.h"
9307
9308 #ifdef __GNUC__
9309 # define alloca __builtin_alloca
9310 #else
9311 # ifdef _MSC_VER
9312 #  include <malloc.h>
9313 #  define alloca _alloca
9314 # else
9315 #  if HAVE_ALLOCA_H
9316 #   include <alloca.h>
9317 #  else
9318 #   ifdef _AIX
9319  #pragma alloca
9320 #   else
9321 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9322 char *alloca ();
9323 #    endif
9324 #   endif
9325 #  endif
9326 # endif
9327 #endif
9328
9329 int main() {
9330 char *p = (char *) alloca(1);
9331 ; return 0; }
9332 EOF
9333 if { (eval echo configure:9334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9334   rm -rf conftest*
9335   ac_cv_func_alloca_works=yes
9336 else
9337   echo "configure: failed program was:" >&5
9338   cat conftest.$ac_ext >&5
9339   rm -rf conftest*
9340   ac_cv_func_alloca_works=no
9341 fi
9342 rm -f conftest*
9343
9344 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
9345 if test $ac_cv_func_alloca_works = yes; then
9346   { test "$extra_verbose" = "yes" && cat << \EOF
9347     Defining HAVE_ALLOCA
9348 EOF
9349 cat >> confdefs.h <<\EOF
9350 #define HAVE_ALLOCA 1
9351 EOF
9352 }
9353
9354 fi
9355
9356 if test $ac_cv_func_alloca_works = no; then
9357   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9358   # that cause trouble.  Some versions do not even contain alloca or
9359   # contain a buggy version.  If you still want to use their alloca,
9360   # use ar to extract alloca.o from them instead of compiling alloca.c.
9361   ALLOCA=alloca.${ac_objext}
9362   { test "$extra_verbose" = "yes" && cat << \EOF
9363     Defining C_ALLOCA
9364 EOF
9365 cat >> confdefs.h <<\EOF
9366 #define C_ALLOCA 1
9367 EOF
9368 }
9369
9370
9371 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9372 echo "configure:9373: checking whether alloca needs Cray hooks" >&5
9373
9374 cat > conftest.$ac_ext <<EOF
9375 #line 9376 "configure"
9376 #include "confdefs.h"
9377 #if defined(CRAY) && ! defined(CRAY2)
9378 webecray
9379 #else
9380 wenotbecray
9381 #endif
9382
9383 EOF
9384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9385   egrep "webecray" >/dev/null 2>&1; then
9386   rm -rf conftest*
9387   ac_cv_os_cray=yes
9388 else
9389   rm -rf conftest*
9390   ac_cv_os_cray=no
9391 fi
9392 rm -f conftest*
9393
9394
9395 echo "$ac_t""$ac_cv_os_cray" 1>&6
9396 if test $ac_cv_os_cray = yes; then
9397 for ac_func in _getb67 GETB67 getb67; do
9398   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9399 echo "configure:9400: checking for $ac_func" >&5
9400
9401 cat > conftest.$ac_ext <<EOF
9402 #line 9403 "configure"
9403 #include "confdefs.h"
9404 /* System header to define __stub macros and hopefully few prototypes,
9405     which can conflict with char $ac_func(); below.  */
9406 #include <assert.h>
9407 /* Override any gcc2 internal prototype to avoid an error.  */
9408 /* We use char because int might match the return type of a gcc2
9409     builtin and then its argument prototype would still apply.  */
9410 char $ac_func();
9411
9412 int main() {
9413
9414 /* The GNU C library defines this for functions which it implements
9415     to always fail with ENOSYS.  Some functions are actually named
9416     something starting with __ and the normal name is an alias.  */
9417 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9418 choke me
9419 #else
9420 $ac_func();
9421 #endif
9422
9423 ; return 0; }
9424 EOF
9425 if { (eval echo configure:9426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9426   rm -rf conftest*
9427   eval "ac_cv_func_$ac_func=yes"
9428 else
9429   echo "configure: failed program was:" >&5
9430   cat conftest.$ac_ext >&5
9431   rm -rf conftest*
9432   eval "ac_cv_func_$ac_func=no"
9433 fi
9434 rm -f conftest*
9435
9436 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9437   echo "$ac_t""yes" 1>&6
9438   { test "$extra_verbose" = "yes" && cat << EOF
9439     Defining CRAY_STACKSEG_END = $ac_func
9440 EOF
9441 cat >> confdefs.h <<EOF
9442 #define CRAY_STACKSEG_END $ac_func
9443 EOF
9444 }
9445
9446   break
9447 else
9448   echo "$ac_t""no" 1>&6
9449 fi
9450
9451 done
9452 fi
9453
9454 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9455 echo "configure:9456: checking stack direction for C alloca" >&5
9456
9457 cat > conftest.$ac_ext <<EOF
9458 #line 9459 "configure"
9459 #include "confdefs.h"
9460 find_stack_direction ()
9461 {
9462   static char *addr = 0;
9463   auto char dummy;
9464   if (addr == 0)
9465     {
9466       addr = &dummy;
9467       return find_stack_direction ();
9468     }
9469   else
9470     return (&dummy > addr) ? 1 : -1;
9471 }
9472 main ()
9473 {
9474   exit (find_stack_direction() < 0);
9475 }
9476 EOF
9477 if { (eval echo configure:9478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9478 then
9479   ac_cv_c_stack_direction=1
9480 else
9481   conftest_rc="$?"
9482   echo "configure: failed program was:" >&5
9483   cat conftest.$ac_ext >&5
9484   rm -fr conftest*
9485   ac_cv_c_stack_direction=-1
9486 fi
9487 rm -fr conftest*
9488
9489 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
9490 { test "$extra_verbose" = "yes" && cat << EOF
9491     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
9492 EOF
9493 cat >> confdefs.h <<EOF
9494 #define STACK_DIRECTION $ac_cv_c_stack_direction
9495 EOF
9496 }
9497
9498 fi
9499
9500 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
9501    echo "    xemacs will be linked with \"$ALLOCA\""
9502  fi
9503
9504 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
9505 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9506 echo "configure:9507: checking for vfork.h" >&5
9507
9508 cat > conftest.$ac_ext <<EOF
9509 #line 9510 "configure"
9510 #include "confdefs.h"
9511 #include <vfork.h>
9512 EOF
9513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9514 { (eval echo configure:9515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9516 if test -z "$ac_err"; then
9517   rm -rf conftest*
9518   eval "ac_cv_header_$ac_safe=yes"
9519 else
9520   echo "$ac_err" >&5
9521   echo "configure: failed program was:" >&5
9522   cat conftest.$ac_ext >&5
9523   rm -rf conftest*
9524   eval "ac_cv_header_$ac_safe=no"
9525 fi
9526 rm -f conftest*
9527 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9528   echo "$ac_t""yes" 1>&6
9529   { test "$extra_verbose" = "yes" && cat << \EOF
9530     Defining HAVE_VFORK_H
9531 EOF
9532 cat >> confdefs.h <<\EOF
9533 #define HAVE_VFORK_H 1
9534 EOF
9535 }
9536
9537 else
9538   echo "$ac_t""no" 1>&6
9539 fi
9540
9541 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9542 echo "configure:9543: checking for working vfork" >&5
9543
9544 cat > conftest.$ac_ext <<EOF
9545 #line 9546 "configure"
9546 #include "confdefs.h"
9547 /* Thanks to Paul Eggert for this test.  */
9548 #include <stdio.h>
9549 #include <sys/types.h>
9550 #include <sys/stat.h>
9551 #ifdef HAVE_UNISTD_H
9552 #include <unistd.h>
9553 #endif
9554 #ifdef HAVE_VFORK_H
9555 #include <vfork.h>
9556 #endif
9557 /* On some sparc systems, changes by the child to local and incoming
9558    argument registers are propagated back to the parent.
9559    The compiler is told about this with #include <vfork.h>,
9560    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9561    Test for this by using a static variable whose address
9562    is put into a register that is clobbered by the vfork.  */
9563 static
9564 #ifdef __cplusplus
9565 sparc_address_test (int arg)
9566 #else
9567 sparc_address_test (arg) int arg;
9568 #endif
9569 {
9570   static pid_t child;
9571   if (!child) {
9572     child = vfork ();
9573     if (child < 0) {
9574       perror ("vfork");
9575       _exit(2);
9576     }
9577     if (!child) {
9578       arg = getpid();
9579       write(-1, "", 0);
9580       _exit (arg);
9581     }
9582   }
9583 }
9584 main() {
9585   pid_t parent = getpid ();
9586   pid_t child;
9587
9588   sparc_address_test ();
9589
9590   child = vfork ();
9591
9592   if (child == 0) {
9593     /* Here is another test for sparc vfork register problems.
9594        This test uses lots of local variables, at least
9595        as many local variables as main has allocated so far
9596        including compiler temporaries.  4 locals are enough for
9597        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9598        A buggy compiler should reuse the register of parent
9599        for one of the local variables, since it will think that
9600        parent can't possibly be used any more in this routine.
9601        Assigning to the local variable will thus munge parent
9602        in the parent process.  */
9603     pid_t
9604       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9605       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9606     /* Convince the compiler that p..p7 are live; otherwise, it might
9607        use the same hardware register for all 8 local variables.  */
9608     if (p != p1 || p != p2 || p != p3 || p != p4
9609         || p != p5 || p != p6 || p != p7)
9610       _exit(1);
9611
9612     /* On some systems (e.g. IRIX 3.3),
9613        vfork doesn't separate parent from child file descriptors.
9614        If the child closes a descriptor before it execs or exits,
9615        this munges the parent's descriptor as well.
9616        Test for this by closing stdout in the child.  */
9617     _exit(close(fileno(stdout)) != 0);
9618   } else {
9619     int status;
9620     struct stat st;
9621
9622     while (wait(&status) != child)
9623       ;
9624     exit(
9625          /* Was there some problem with vforking?  */
9626          child < 0
9627
9628          /* Did the child fail?  (This shouldn't happen.)  */
9629          || status
9630
9631          /* Did the vfork/compiler bug occur?  */
9632          || parent != getpid()
9633
9634          /* Did the file descriptor bug occur?  */
9635          || fstat(fileno(stdout), &st) != 0
9636          );
9637   }
9638 }
9639 EOF
9640 if { (eval echo configure:9641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9641 then
9642   ac_cv_func_vfork_works=yes
9643 else
9644   conftest_rc="$?"
9645   echo "configure: failed program was:" >&5
9646   cat conftest.$ac_ext >&5
9647   rm -fr conftest*
9648   ac_cv_func_vfork_works=no
9649 fi
9650 rm -fr conftest*
9651
9652 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9653 if test $ac_cv_func_vfork_works = no; then
9654   { test "$extra_verbose" = "yes" && cat << \EOF
9655     Defining vfork = fork
9656 EOF
9657 cat >> confdefs.h <<\EOF
9658 #define vfork fork
9659 EOF
9660 }
9661
9662 fi
9663
9664
9665 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
9666 echo "configure:9667: checking for working strcoll" >&5
9667
9668 cat > conftest.$ac_ext <<EOF
9669 #line 9670 "configure"
9670 #include "confdefs.h"
9671 #include <string.h>
9672 main ()
9673 {
9674   exit (strcoll ("abc", "def") >= 0 ||
9675         strcoll ("ABC", "DEF") >= 0 ||
9676         strcoll ("123", "456") >= 0);
9677 }
9678 EOF
9679 if { (eval echo configure:9680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9680 then
9681   ac_cv_func_strcoll_works=yes
9682 else
9683   conftest_rc="$?"
9684   echo "configure: failed program was:" >&5
9685   cat conftest.$ac_ext >&5
9686   rm -fr conftest*
9687   ac_cv_func_strcoll_works=no
9688 fi
9689 rm -fr conftest*
9690
9691 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
9692 if test $ac_cv_func_strcoll_works = yes; then
9693   { test "$extra_verbose" = "yes" && cat << \EOF
9694     Defining HAVE_STRCOLL
9695 EOF
9696 cat >> confdefs.h <<\EOF
9697 #define HAVE_STRCOLL 1
9698 EOF
9699 }
9700
9701 fi
9702
9703
9704 for ac_func in getpgrp
9705 do
9706 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9707 echo "configure:9708: checking for $ac_func" >&5
9708
9709 cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 /* System header to define __stub macros and hopefully few prototypes,
9713     which can conflict with char $ac_func(); below.  */
9714 #include <assert.h>
9715 /* Override any gcc2 internal prototype to avoid an error.  */
9716 /* We use char because int might match the return type of a gcc2
9717     builtin and then its argument prototype would still apply.  */
9718 char $ac_func();
9719
9720 int main() {
9721
9722 /* The GNU C library defines this for functions which it implements
9723     to always fail with ENOSYS.  Some functions are actually named
9724     something starting with __ and the normal name is an alias.  */
9725 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9726 choke me
9727 #else
9728 $ac_func();
9729 #endif
9730
9731 ; return 0; }
9732 EOF
9733 if { (eval echo configure:9734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9734   rm -rf conftest*
9735   eval "ac_cv_func_$ac_func=yes"
9736 else
9737   echo "configure: failed program was:" >&5
9738   cat conftest.$ac_ext >&5
9739   rm -rf conftest*
9740   eval "ac_cv_func_$ac_func=no"
9741 fi
9742 rm -f conftest*
9743
9744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9745   echo "$ac_t""yes" 1>&6
9746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9747   { test "$extra_verbose" = "yes" && cat << EOF
9748     Defining $ac_tr_func
9749 EOF
9750 cat >> confdefs.h <<EOF
9751 #define $ac_tr_func 1
9752 EOF
9753 }
9754  
9755 else
9756   echo "$ac_t""no" 1>&6
9757 fi
9758 done
9759
9760 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
9761 echo "configure:9762: checking whether getpgrp takes no argument" >&5
9762
9763 cat > conftest.$ac_ext <<EOF
9764 #line 9765 "configure"
9765 #include "confdefs.h"
9766
9767 /*
9768  * If this system has a BSD-style getpgrp(),
9769  * which takes a pid argument, exit unsuccessfully.
9770  *
9771  * Snarfed from Chet Ramey's bash pgrp.c test program
9772  */
9773 #include <stdio.h>
9774 #include <sys/types.h>
9775
9776 int     pid;
9777 int     pg1, pg2, pg3, pg4;
9778 int     ng, np, s, child;
9779
9780 main()
9781 {
9782         pid = getpid();
9783         pg1 = getpgrp(0);
9784         pg2 = getpgrp();
9785         pg3 = getpgrp(pid);
9786         pg4 = getpgrp(1);
9787
9788         /*
9789          * If all of these values are the same, it's pretty sure that
9790          * we're on a system that ignores getpgrp's first argument.
9791          */
9792         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
9793                 exit(0);
9794
9795         child = fork();
9796         if (child < 0)
9797                 exit(1);
9798         else if (child == 0) {
9799                 np = getpid();
9800                 /*
9801                  * If this is Sys V, this will not work; pgrp will be
9802                  * set to np because setpgrp just changes a pgrp to be
9803                  * the same as the pid.
9804                  */
9805                 setpgrp(np, pg1);
9806                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
9807                 if (ng == pg1) {
9808                         exit(1);
9809                 } else {
9810                         exit(0);
9811                 }
9812         } else {
9813                 wait(&s);
9814                 exit(s>>8);
9815         }
9816 }
9817
9818 EOF
9819 if { (eval echo configure:9820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9820 then
9821   ac_cv_func_getpgrp_void=yes
9822 else
9823   conftest_rc="$?"
9824   echo "configure: failed program was:" >&5
9825   cat conftest.$ac_ext >&5
9826   rm -fr conftest*
9827   ac_cv_func_getpgrp_void=no
9828 fi
9829 rm -fr conftest*
9830
9831
9832 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
9833 if test $ac_cv_func_getpgrp_void = yes; then
9834   { test "$extra_verbose" = "yes" && cat << \EOF
9835     Defining GETPGRP_VOID
9836 EOF
9837 cat >> confdefs.h <<\EOF
9838 #define GETPGRP_VOID 1
9839 EOF
9840 }
9841
9842 fi
9843
9844
9845 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9846 echo "configure:9847: checking for working mmap" >&5
9847 case "$opsys" in ultrix* ) have_mmap=no ;; *)
9848 cat > conftest.$ac_ext <<EOF
9849 #line 9850 "configure"
9850 #include "confdefs.h"
9851 #include <stdio.h>
9852 #include <unistd.h>
9853 #include <fcntl.h>
9854 #include <sys/mman.h>
9855
9856 #ifndef MAP_VARIABLE
9857 #define MAP_VARIABLE 0
9858 #endif
9859
9860 #ifndef MAP_FAILED
9861 #define MAP_FAILED -1
9862 #endif
9863
9864 int main (int argc, char *argv[])
9865 {
9866   int fd = -1;
9867   caddr_t p;
9868 #ifndef MAP_ANONYMOUS
9869   fd = open ("/dev/zero", O_RDWR);
9870   if (fd < 0)
9871     return 1;
9872 #define MAP_ANONYMOUS 0
9873 #endif
9874   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
9875            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
9876            fd, 0) != (void *) MAP_FAILED)
9877     return 0;
9878   perror ("conftest: mmap failed");
9879   return 1;
9880 }
9881 EOF
9882 if { (eval echo configure:9883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9883 then
9884   have_mmap=yes
9885 else
9886   conftest_rc="$?"
9887   echo "configure: failed program was:" >&5
9888   cat conftest.$ac_ext >&5
9889   rm -fr conftest*
9890   have_mmap=no
9891 fi
9892 rm -fr conftest* ;;
9893 esac
9894 echo "$ac_t""$have_mmap" 1>&6
9895 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9896     Defining HAVE_MMAP
9897 EOF
9898 cat >> confdefs.h <<\EOF
9899 #define HAVE_MMAP 1
9900 EOF
9901 }
9902
9903 for ac_hdr in unistd.h
9904 do
9905 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9906 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9907 echo "configure:9908: checking for $ac_hdr" >&5
9908
9909 cat > conftest.$ac_ext <<EOF
9910 #line 9911 "configure"
9911 #include "confdefs.h"
9912 #include <$ac_hdr>
9913 EOF
9914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9915 { (eval echo configure:9916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9917 if test -z "$ac_err"; then
9918   rm -rf conftest*
9919   eval "ac_cv_header_$ac_safe=yes"
9920 else
9921   echo "$ac_err" >&5
9922   echo "configure: failed program was:" >&5
9923   cat conftest.$ac_ext >&5
9924   rm -rf conftest*
9925   eval "ac_cv_header_$ac_safe=no"
9926 fi
9927 rm -f conftest*
9928 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9929   echo "$ac_t""yes" 1>&6
9930     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9931   { test "$extra_verbose" = "yes" && cat << EOF
9932     Defining $ac_tr_hdr
9933 EOF
9934 cat >> confdefs.h <<EOF
9935 #define $ac_tr_hdr 1
9936 EOF
9937 }
9938  
9939 else
9940   echo "$ac_t""no" 1>&6
9941 fi
9942 done
9943
9944 for ac_func in getpagesize
9945 do
9946 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9947 echo "configure:9948: checking for $ac_func" >&5
9948
9949 cat > conftest.$ac_ext <<EOF
9950 #line 9951 "configure"
9951 #include "confdefs.h"
9952 /* System header to define __stub macros and hopefully few prototypes,
9953     which can conflict with char $ac_func(); below.  */
9954 #include <assert.h>
9955 /* Override any gcc2 internal prototype to avoid an error.  */
9956 /* We use char because int might match the return type of a gcc2
9957     builtin and then its argument prototype would still apply.  */
9958 char $ac_func();
9959
9960 int main() {
9961
9962 /* The GNU C library defines this for functions which it implements
9963     to always fail with ENOSYS.  Some functions are actually named
9964     something starting with __ and the normal name is an alias.  */
9965 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9966 choke me
9967 #else
9968 $ac_func();
9969 #endif
9970
9971 ; return 0; }
9972 EOF
9973 if { (eval echo configure:9974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9974   rm -rf conftest*
9975   eval "ac_cv_func_$ac_func=yes"
9976 else
9977   echo "configure: failed program was:" >&5
9978   cat conftest.$ac_ext >&5
9979   rm -rf conftest*
9980   eval "ac_cv_func_$ac_func=no"
9981 fi
9982 rm -f conftest*
9983
9984 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9985   echo "$ac_t""yes" 1>&6
9986     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9987   { test "$extra_verbose" = "yes" && cat << EOF
9988     Defining $ac_tr_func
9989 EOF
9990 cat >> confdefs.h <<EOF
9991 #define $ac_tr_func 1
9992 EOF
9993 }
9994  
9995 else
9996   echo "$ac_t""no" 1>&6
9997 fi
9998 done
9999
10000 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10001 echo "configure:10002: checking for working mmap" >&5
10002
10003 cat > conftest.$ac_ext <<EOF
10004 #line 10005 "configure"
10005 #include "confdefs.h"
10006
10007 /* Thanks to Mike Haertel and Jim Avera for this test.
10008    Here is a matrix of mmap possibilities:
10009         mmap private not fixed
10010         mmap private fixed at somewhere currently unmapped
10011         mmap private fixed at somewhere already mapped
10012         mmap shared not fixed
10013         mmap shared fixed at somewhere currently unmapped
10014         mmap shared fixed at somewhere already mapped
10015    For private mappings, we should verify that changes cannot be read()
10016    back from the file, nor mmap's back from the file at a different
10017    address.  (There have been systems where private was not correctly
10018    implemented like the infamous i386 svr4.0, and systems where the
10019    VM page cache was not coherent with the filesystem buffer cache
10020    like early versions of FreeBSD and possibly contemporary NetBSD.)
10021    For shared mappings, we should conversely verify that changes get
10022    propogated back to all the places they're supposed to be.
10023
10024    Grep wants private fixed already mapped.
10025    The main things grep needs to know about mmap are:
10026    * does it exist and is it safe to write into the mmap'd area
10027    * how to use it (BSD variants)  */
10028 #include <sys/types.h>
10029 #include <fcntl.h>
10030 #include <sys/mman.h>
10031
10032 /* This mess was copied from the GNU getpagesize.h.  */
10033 #ifndef HAVE_GETPAGESIZE
10034 # ifdef HAVE_UNISTD_H
10035 #  include <unistd.h>
10036 # endif
10037
10038 /* Assume that all systems that can run configure have sys/param.h.  */
10039 # ifndef HAVE_SYS_PARAM_H
10040 #  define HAVE_SYS_PARAM_H 1
10041 # endif
10042
10043 # ifdef _SC_PAGESIZE
10044 #  define getpagesize() sysconf(_SC_PAGESIZE)
10045 # else /* no _SC_PAGESIZE */
10046 #  ifdef HAVE_SYS_PARAM_H
10047 #   include <sys/param.h>
10048 #   ifdef EXEC_PAGESIZE
10049 #    define getpagesize() EXEC_PAGESIZE
10050 #   else /* no EXEC_PAGESIZE */
10051 #    ifdef NBPG
10052 #     define getpagesize() NBPG * CLSIZE
10053 #     ifndef CLSIZE
10054 #      define CLSIZE 1
10055 #     endif /* no CLSIZE */
10056 #    else /* no NBPG */
10057 #     ifdef NBPC
10058 #      define getpagesize() NBPC
10059 #     else /* no NBPC */
10060 #      ifdef PAGESIZE
10061 #       define getpagesize() PAGESIZE
10062 #      endif /* PAGESIZE */
10063 #     endif /* no NBPC */
10064 #    endif /* no NBPG */
10065 #   endif /* no EXEC_PAGESIZE */
10066 #  else /* no HAVE_SYS_PARAM_H */
10067 #   define getpagesize() 8192   /* punt totally */
10068 #  endif /* no HAVE_SYS_PARAM_H */
10069 # endif /* no _SC_PAGESIZE */
10070
10071 #endif /* no HAVE_GETPAGESIZE */
10072
10073 #ifdef __cplusplus
10074 extern "C" { void *malloc(unsigned); }
10075 #else
10076 char *malloc();
10077 #endif
10078
10079 int
10080 main()
10081 {
10082         char *data, *data2, *data3;
10083         int i, pagesize;
10084         int fd;
10085
10086         pagesize = getpagesize();
10087
10088         /*
10089          * First, make a file with some known garbage in it.
10090          */
10091         data = malloc(pagesize);
10092         if (!data)
10093                 exit(1);
10094         for (i = 0; i < pagesize; ++i)
10095                 *(data + i) = rand();
10096         umask(0);
10097         fd = creat("conftestmmap", 0600);
10098         if (fd < 0)
10099                 exit(1);
10100         if (write(fd, data, pagesize) != pagesize)
10101                 exit(1);
10102         close(fd);
10103
10104         /*
10105          * Next, try to mmap the file at a fixed address which
10106          * already has something else allocated at it.  If we can,
10107          * also make sure that we see the same garbage.
10108          */
10109         fd = open("conftestmmap", O_RDWR);
10110         if (fd < 0)
10111                 exit(1);
10112         data2 = malloc(2 * pagesize);
10113         if (!data2)
10114                 exit(1);
10115         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
10116         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
10117             MAP_PRIVATE | MAP_FIXED, fd, 0L))
10118                 exit(1);
10119         for (i = 0; i < pagesize; ++i)
10120                 if (*(data + i) != *(data2 + i))
10121                         exit(1);
10122
10123         /*
10124          * Finally, make sure that changes to the mapped area
10125          * do not percolate back to the file as seen by read().
10126          * (This is a bug on some variants of i386 svr4.0.)
10127          */
10128         for (i = 0; i < pagesize; ++i)
10129                 *(data2 + i) = *(data2 + i) + 1;
10130         data3 = malloc(pagesize);
10131         if (!data3)
10132                 exit(1);
10133         if (read(fd, data3, pagesize) != pagesize)
10134                 exit(1);
10135         for (i = 0; i < pagesize; ++i)
10136                 if (*(data + i) != *(data3 + i))
10137                         exit(1);
10138         close(fd);
10139         unlink("conftestmmap");
10140         exit(0);
10141 }
10142
10143 EOF
10144 if { (eval echo configure:10145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10145 then
10146   ac_cv_func_mmap_fixed_mapped=yes
10147 else
10148   conftest_rc="$?"
10149   echo "configure: failed program was:" >&5
10150   cat conftest.$ac_ext >&5
10151   rm -fr conftest*
10152   ac_cv_func_mmap_fixed_mapped=no
10153 fi
10154 rm -fr conftest*
10155
10156 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
10157 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10158   { test "$extra_verbose" = "yes" && cat << \EOF
10159     Defining HAVE_MMAP
10160 EOF
10161 cat >> confdefs.h <<\EOF
10162 #define HAVE_MMAP 1
10163 EOF
10164 }
10165
10166 fi
10167
10168
10169 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10170 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10171 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10172     Defining REL_ALLOC
10173 EOF
10174 cat >> confdefs.h <<\EOF
10175 #define REL_ALLOC 1
10176 EOF
10177 }
10178
10179
10180 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10181 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10182 echo "configure:10183: checking for termios.h" >&5
10183
10184 cat > conftest.$ac_ext <<EOF
10185 #line 10186 "configure"
10186 #include "confdefs.h"
10187 #include <termios.h>
10188 EOF
10189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10190 { (eval echo configure:10191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10192 if test -z "$ac_err"; then
10193   rm -rf conftest*
10194   eval "ac_cv_header_$ac_safe=yes"
10195 else
10196   echo "$ac_err" >&5
10197   echo "configure: failed program was:" >&5
10198   cat conftest.$ac_ext >&5
10199   rm -rf conftest*
10200   eval "ac_cv_header_$ac_safe=no"
10201 fi
10202 rm -f conftest*
10203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10204   echo "$ac_t""yes" 1>&6
10205   { test "$extra_verbose" = "yes" && cat << \EOF
10206     Defining HAVE_TERMIOS
10207 EOF
10208 cat >> confdefs.h <<\EOF
10209 #define HAVE_TERMIOS 1
10210 EOF
10211 }
10212
10213   { test "$extra_verbose" = "yes" && cat << \EOF
10214     Defining SIGNALS_VIA_CHARACTERS
10215 EOF
10216 cat >> confdefs.h <<\EOF
10217 #define SIGNALS_VIA_CHARACTERS 1
10218 EOF
10219 }
10220
10221   { test "$extra_verbose" = "yes" && cat << \EOF
10222     Defining NO_TERMIO
10223 EOF
10224 cat >> confdefs.h <<\EOF
10225 #define NO_TERMIO 1
10226 EOF
10227 }
10228
10229 else
10230   echo "$ac_t""no" 1>&6
10231 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10232 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10233 echo "configure:10234: checking for termio.h" >&5
10234
10235 cat > conftest.$ac_ext <<EOF
10236 #line 10237 "configure"
10237 #include "confdefs.h"
10238 #include <termio.h>
10239 EOF
10240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10241 { (eval echo configure:10242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10243 if test -z "$ac_err"; then
10244   rm -rf conftest*
10245   eval "ac_cv_header_$ac_safe=yes"
10246 else
10247   echo "$ac_err" >&5
10248   echo "configure: failed program was:" >&5
10249   cat conftest.$ac_ext >&5
10250   rm -rf conftest*
10251   eval "ac_cv_header_$ac_safe=no"
10252 fi
10253 rm -f conftest*
10254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10255   echo "$ac_t""yes" 1>&6
10256   { test "$extra_verbose" = "yes" && cat << \EOF
10257     Defining HAVE_TERMIO
10258 EOF
10259 cat >> confdefs.h <<\EOF
10260 #define HAVE_TERMIO 1
10261 EOF
10262 }
10263
10264 else
10265   echo "$ac_t""no" 1>&6
10266 fi
10267
10268 fi
10269
10270
10271
10272 echo $ac_n "checking for socket""... $ac_c" 1>&6
10273 echo "configure:10274: checking for socket" >&5
10274
10275 cat > conftest.$ac_ext <<EOF
10276 #line 10277 "configure"
10277 #include "confdefs.h"
10278 /* System header to define __stub macros and hopefully few prototypes,
10279     which can conflict with char socket(); below.  */
10280 #include <assert.h>
10281 /* Override any gcc2 internal prototype to avoid an error.  */
10282 /* We use char because int might match the return type of a gcc2
10283     builtin and then its argument prototype would still apply.  */
10284 char socket();
10285
10286 int main() {
10287
10288 /* The GNU C library defines this for functions which it implements
10289     to always fail with ENOSYS.  Some functions are actually named
10290     something starting with __ and the normal name is an alias.  */
10291 #if defined (__stub_socket) || defined (__stub___socket)
10292 choke me
10293 #else
10294 socket();
10295 #endif
10296
10297 ; return 0; }
10298 EOF
10299 if { (eval echo configure:10300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10300   rm -rf conftest*
10301   eval "ac_cv_func_socket=yes"
10302 else
10303   echo "configure: failed program was:" >&5
10304   cat conftest.$ac_ext >&5
10305   rm -rf conftest*
10306   eval "ac_cv_func_socket=no"
10307 fi
10308 rm -f conftest*
10309
10310 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10311   echo "$ac_t""yes" 1>&6
10312   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10313 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10314 echo "configure:10315: checking for netinet/in.h" >&5
10315
10316 cat > conftest.$ac_ext <<EOF
10317 #line 10318 "configure"
10318 #include "confdefs.h"
10319 #include <netinet/in.h>
10320 EOF
10321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10322 { (eval echo configure:10323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10324 if test -z "$ac_err"; then
10325   rm -rf conftest*
10326   eval "ac_cv_header_$ac_safe=yes"
10327 else
10328   echo "$ac_err" >&5
10329   echo "configure: failed program was:" >&5
10330   cat conftest.$ac_ext >&5
10331   rm -rf conftest*
10332   eval "ac_cv_header_$ac_safe=no"
10333 fi
10334 rm -f conftest*
10335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10336   echo "$ac_t""yes" 1>&6
10337   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10338 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10339 echo "configure:10340: checking for arpa/inet.h" >&5
10340
10341 cat > conftest.$ac_ext <<EOF
10342 #line 10343 "configure"
10343 #include "confdefs.h"
10344 #include <arpa/inet.h>
10345 EOF
10346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10347 { (eval echo configure:10348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10349 if test -z "$ac_err"; then
10350   rm -rf conftest*
10351   eval "ac_cv_header_$ac_safe=yes"
10352 else
10353   echo "$ac_err" >&5
10354   echo "configure: failed program was:" >&5
10355   cat conftest.$ac_ext >&5
10356   rm -rf conftest*
10357   eval "ac_cv_header_$ac_safe=no"
10358 fi
10359 rm -f conftest*
10360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10361   echo "$ac_t""yes" 1>&6
10362   
10363   { test "$extra_verbose" = "yes" && cat << \EOF
10364     Defining HAVE_SOCKETS
10365 EOF
10366 cat >> confdefs.h <<\EOF
10367 #define HAVE_SOCKETS 1
10368 EOF
10369 }
10370
10371       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10372 echo "configure:10373: checking "for sun_len member in struct sockaddr_un"" >&5
10373       cat > conftest.$ac_ext <<EOF
10374 #line 10375 "configure"
10375 #include "confdefs.h"
10376
10377 #include <sys/types.h>
10378 #include <sys/socket.h>
10379 #include <sys/un.h>
10380       
10381 int main() {
10382 static struct sockaddr_un x; x.sun_len = 1;
10383 ; return 0; }
10384 EOF
10385 if { (eval echo configure:10386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10386   rm -rf conftest*
10387   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10388     Defining HAVE_SOCKADDR_SUN_LEN
10389 EOF
10390 cat >> confdefs.h <<\EOF
10391 #define HAVE_SOCKADDR_SUN_LEN 1
10392 EOF
10393 }
10394
10395 else
10396   echo "configure: failed program was:" >&5
10397   cat conftest.$ac_ext >&5
10398   rm -rf conftest*
10399   echo "$ac_t""no" 1>&6
10400 fi
10401 rm -f conftest*
10402       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10403 echo "configure:10404: checking "for ip_mreq struct in netinet/in.h"" >&5
10404       cat > conftest.$ac_ext <<EOF
10405 #line 10406 "configure"
10406 #include "confdefs.h"
10407
10408 #include <sys/types.h>
10409 #include <netinet/in.h>
10410       
10411 int main() {
10412 static struct ip_mreq x;
10413 ; return 0; }
10414 EOF
10415 if { (eval echo configure:10416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10416   rm -rf conftest*
10417   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10418     Defining HAVE_MULTICAST
10419 EOF
10420 cat >> confdefs.h <<\EOF
10421 #define HAVE_MULTICAST 1
10422 EOF
10423 }
10424
10425 else
10426   echo "configure: failed program was:" >&5
10427   cat conftest.$ac_ext >&5
10428   rm -rf conftest*
10429   echo "$ac_t""no" 1>&6
10430 fi
10431 rm -f conftest*
10432 else
10433   echo "$ac_t""no" 1>&6
10434 fi
10435
10436 else
10437   echo "$ac_t""no" 1>&6
10438 fi
10439
10440 else
10441   echo "$ac_t""no" 1>&6
10442 fi
10443
10444
10445 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10446 echo "configure:10447: checking for msgget" >&5
10447
10448 cat > conftest.$ac_ext <<EOF
10449 #line 10450 "configure"
10450 #include "confdefs.h"
10451 /* System header to define __stub macros and hopefully few prototypes,
10452     which can conflict with char msgget(); below.  */
10453 #include <assert.h>
10454 /* Override any gcc2 internal prototype to avoid an error.  */
10455 /* We use char because int might match the return type of a gcc2
10456     builtin and then its argument prototype would still apply.  */
10457 char msgget();
10458
10459 int main() {
10460
10461 /* The GNU C library defines this for functions which it implements
10462     to always fail with ENOSYS.  Some functions are actually named
10463     something starting with __ and the normal name is an alias.  */
10464 #if defined (__stub_msgget) || defined (__stub___msgget)
10465 choke me
10466 #else
10467 msgget();
10468 #endif
10469
10470 ; return 0; }
10471 EOF
10472 if { (eval echo configure:10473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10473   rm -rf conftest*
10474   eval "ac_cv_func_msgget=yes"
10475 else
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -rf conftest*
10479   eval "ac_cv_func_msgget=no"
10480 fi
10481 rm -f conftest*
10482
10483 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10484   echo "$ac_t""yes" 1>&6
10485   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10486 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10487 echo "configure:10488: checking for sys/ipc.h" >&5
10488
10489 cat > conftest.$ac_ext <<EOF
10490 #line 10491 "configure"
10491 #include "confdefs.h"
10492 #include <sys/ipc.h>
10493 EOF
10494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10495 { (eval echo configure:10496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10497 if test -z "$ac_err"; then
10498   rm -rf conftest*
10499   eval "ac_cv_header_$ac_safe=yes"
10500 else
10501   echo "$ac_err" >&5
10502   echo "configure: failed program was:" >&5
10503   cat conftest.$ac_ext >&5
10504   rm -rf conftest*
10505   eval "ac_cv_header_$ac_safe=no"
10506 fi
10507 rm -f conftest*
10508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10509   echo "$ac_t""yes" 1>&6
10510   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10511 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10512 echo "configure:10513: checking for sys/msg.h" >&5
10513
10514 cat > conftest.$ac_ext <<EOF
10515 #line 10516 "configure"
10516 #include "confdefs.h"
10517 #include <sys/msg.h>
10518 EOF
10519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10520 { (eval echo configure:10521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10522 if test -z "$ac_err"; then
10523   rm -rf conftest*
10524   eval "ac_cv_header_$ac_safe=yes"
10525 else
10526   echo "$ac_err" >&5
10527   echo "configure: failed program was:" >&5
10528   cat conftest.$ac_ext >&5
10529   rm -rf conftest*
10530   eval "ac_cv_header_$ac_safe=no"
10531 fi
10532 rm -f conftest*
10533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10534   echo "$ac_t""yes" 1>&6
10535   { test "$extra_verbose" = "yes" && cat << \EOF
10536     Defining HAVE_SYSVIPC
10537 EOF
10538 cat >> confdefs.h <<\EOF
10539 #define HAVE_SYSVIPC 1
10540 EOF
10541 }
10542
10543 else
10544   echo "$ac_t""no" 1>&6
10545 fi
10546
10547 else
10548   echo "$ac_t""no" 1>&6
10549 fi
10550
10551 else
10552   echo "$ac_t""no" 1>&6
10553 fi
10554
10555
10556 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10557 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10558 echo "configure:10559: checking for dirent.h" >&5
10559
10560 cat > conftest.$ac_ext <<EOF
10561 #line 10562 "configure"
10562 #include "confdefs.h"
10563 #include <dirent.h>
10564 EOF
10565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10566 { (eval echo configure:10567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10568 if test -z "$ac_err"; then
10569   rm -rf conftest*
10570   eval "ac_cv_header_$ac_safe=yes"
10571 else
10572   echo "$ac_err" >&5
10573   echo "configure: failed program was:" >&5
10574   cat conftest.$ac_ext >&5
10575   rm -rf conftest*
10576   eval "ac_cv_header_$ac_safe=no"
10577 fi
10578 rm -f conftest*
10579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10580   echo "$ac_t""yes" 1>&6
10581   { test "$extra_verbose" = "yes" && cat << \EOF
10582     Defining SYSV_SYSTEM_DIR
10583 EOF
10584 cat >> confdefs.h <<\EOF
10585 #define SYSV_SYSTEM_DIR 1
10586 EOF
10587 }
10588
10589 else
10590   echo "$ac_t""no" 1>&6
10591 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
10592 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
10593 echo "configure:10594: checking for sys/dir.h" >&5
10594
10595 cat > conftest.$ac_ext <<EOF
10596 #line 10597 "configure"
10597 #include "confdefs.h"
10598 #include <sys/dir.h>
10599 EOF
10600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10601 { (eval echo configure:10602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10603 if test -z "$ac_err"; then
10604   rm -rf conftest*
10605   eval "ac_cv_header_$ac_safe=yes"
10606 else
10607   echo "$ac_err" >&5
10608   echo "configure: failed program was:" >&5
10609   cat conftest.$ac_ext >&5
10610   rm -rf conftest*
10611   eval "ac_cv_header_$ac_safe=no"
10612 fi
10613 rm -f conftest*
10614 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10615   echo "$ac_t""yes" 1>&6
10616   :
10617 else
10618   echo "$ac_t""no" 1>&6
10619 { test "$extra_verbose" = "yes" && cat << \EOF
10620     Defining NONSYSTEM_DIR_LIBRARY
10621 EOF
10622 cat >> confdefs.h <<\EOF
10623 #define NONSYSTEM_DIR_LIBRARY 1
10624 EOF
10625 }
10626
10627 fi
10628
10629 fi
10630
10631
10632 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
10633 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
10634 echo "configure:10635: checking for nlist.h" >&5
10635
10636 cat > conftest.$ac_ext <<EOF
10637 #line 10638 "configure"
10638 #include "confdefs.h"
10639 #include <nlist.h>
10640 EOF
10641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10642 { (eval echo configure:10643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10644 if test -z "$ac_err"; then
10645   rm -rf conftest*
10646   eval "ac_cv_header_$ac_safe=yes"
10647 else
10648   echo "$ac_err" >&5
10649   echo "configure: failed program was:" >&5
10650   cat conftest.$ac_ext >&5
10651   rm -rf conftest*
10652   eval "ac_cv_header_$ac_safe=no"
10653 fi
10654 rm -f conftest*
10655 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10656   echo "$ac_t""yes" 1>&6
10657   { test "$extra_verbose" = "yes" && cat << \EOF
10658     Defining NLIST_STRUCT
10659 EOF
10660 cat >> confdefs.h <<\EOF
10661 #define NLIST_STRUCT 1
10662 EOF
10663 }
10664
10665 else
10666   echo "$ac_t""no" 1>&6
10667 fi
10668
10669
10670
10671 echo "checking "for sound support"" 1>&6
10672 echo "configure:10673: checking "for sound support"" >&5
10673 case "$with_sound" in
10674   native | both ) with_native_sound=yes;;
10675   nas    | no   ) with_native_sound=no;;
10676 esac
10677 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
10678
10679 if test "$with_native_sound" != "no"; then
10680     if test -n "$native_sound_lib"; then
10681     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
10682 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
10683 echo "configure:10684: checking for multimedia/audio_device.h" >&5
10684
10685 cat > conftest.$ac_ext <<EOF
10686 #line 10687 "configure"
10687 #include "confdefs.h"
10688 #include <multimedia/audio_device.h>
10689 EOF
10690 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10691 { (eval echo configure:10692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10692 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10693 if test -z "$ac_err"; then
10694   rm -rf conftest*
10695   eval "ac_cv_header_$ac_safe=yes"
10696 else
10697   echo "$ac_err" >&5
10698   echo "configure: failed program was:" >&5
10699   cat conftest.$ac_ext >&5
10700   rm -rf conftest*
10701   eval "ac_cv_header_$ac_safe=no"
10702 fi
10703 rm -f conftest*
10704 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10705   echo "$ac_t""yes" 1>&6
10706   sound_found=yes sound_cflags=""
10707       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10708    echo "    xemacs will be linked with \"sunplay.o\""
10709  fi
10710 else
10711   echo "$ac_t""no" 1>&6
10712 fi
10713
10714   fi
10715
10716     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
10717     sound_found=yes
10718     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10719    echo "    xemacs will be linked with \"sunplay.o\""
10720  fi
10721     if test -d "/usr/demo/SOUND/include"
10722       then sound_cflags="-I/usr/demo/SOUND/include"
10723       else sound_cflags="-I/usr/demo/SOUND"
10724     fi
10725     if test -z "$native_sound_lib" ; then
10726       if test -r "/usr/demo/SOUND/lib/libaudio.a"
10727         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
10728         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
10729       fi
10730     fi
10731   fi
10732
10733     if test -z "$sound_found"; then
10734     case "$canonical" in
10735     *-sgi-* )
10736       if test -z "$native_sound_lib"; then
10737         
10738 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
10739 echo "configure:10740: checking for ALopenport in -laudio" >&5
10740 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
10741
10742 xe_check_libs=" -laudio "
10743 cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746 /* Override any gcc2 internal prototype to avoid an error.  */
10747 /* We use char because int might match the return type of a gcc2
10748     builtin and then its argument prototype would still apply.  */
10749 char ALopenport();
10750
10751 int main() {
10752 ALopenport()
10753 ; return 0; }
10754 EOF
10755 if { (eval echo configure:10756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10756   rm -rf conftest*
10757   eval "ac_cv_lib_$ac_lib_var=yes"
10758 else
10759   echo "configure: failed program was:" >&5
10760   cat conftest.$ac_ext >&5
10761   rm -rf conftest*
10762   eval "ac_cv_lib_$ac_lib_var=no"
10763 fi
10764 rm -f conftest*
10765 xe_check_libs=""
10766
10767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10768   echo "$ac_t""yes" 1>&6
10769   native_sound_lib="-laudio"
10770 else
10771   echo "$ac_t""no" 1>&6
10772 fi
10773
10774
10775       fi
10776       if test -n "$native_sound_lib"; then
10777         sound_found=yes sound_cflags=""
10778         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
10779    echo "    xemacs will be linked with \"sgiplay.o\""
10780  fi
10781       fi ;;
10782     hppa*-hp-hpux* )
10783       if test -z "$native_sound_lib"; then
10784         
10785 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
10786 echo "configure:10787: checking for AOpenAudio in -lAlib" >&5
10787 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
10788
10789 xe_check_libs=" -lAlib "
10790 cat > conftest.$ac_ext <<EOF
10791 #line 10792 "configure"
10792 #include "confdefs.h"
10793 /* Override any gcc2 internal prototype to avoid an error.  */
10794 /* We use char because int might match the return type of a gcc2
10795     builtin and then its argument prototype would still apply.  */
10796 char AOpenAudio();
10797
10798 int main() {
10799 AOpenAudio()
10800 ; return 0; }
10801 EOF
10802 if { (eval echo configure:10803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10803   rm -rf conftest*
10804   eval "ac_cv_lib_$ac_lib_var=yes"
10805 else
10806   echo "configure: failed program was:" >&5
10807   cat conftest.$ac_ext >&5
10808   rm -rf conftest*
10809   eval "ac_cv_lib_$ac_lib_var=no"
10810 fi
10811 rm -f conftest*
10812 xe_check_libs=""
10813
10814 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10815   echo "$ac_t""yes" 1>&6
10816   native_sound_lib="-lAlib"
10817 else
10818   echo "$ac_t""no" 1>&6
10819 fi
10820
10821
10822       fi
10823       if test -n "$native_sound_lib"; then
10824         sound_found=yes
10825         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
10826    echo "    xemacs will be linked with \"hpplay.o\""
10827  fi
10828         if test "$GCC" = "yes" # Kludge city
10829           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
10830           else sound_cflags="+e -I/usr/audio/examples"
10831         fi
10832       fi ;;
10833     esac
10834   fi
10835
10836     if test -z "$sound_found"; then
10837     for dir in "machine" "sys" "linux"; do
10838       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
10839 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
10840 echo "configure:10841: checking for ${dir}/soundcard.h" >&5
10841
10842 cat > conftest.$ac_ext <<EOF
10843 #line 10844 "configure"
10844 #include "confdefs.h"
10845 #include <${dir}/soundcard.h>
10846 EOF
10847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10848 { (eval echo configure:10849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10850 if test -z "$ac_err"; then
10851   rm -rf conftest*
10852   eval "ac_cv_header_$ac_safe=yes"
10853 else
10854   echo "$ac_err" >&5
10855   echo "configure: failed program was:" >&5
10856   cat conftest.$ac_ext >&5
10857   rm -rf conftest*
10858   eval "ac_cv_header_$ac_safe=no"
10859 fi
10860 rm -f conftest*
10861 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10862   echo "$ac_t""yes" 1>&6
10863   sound_found=yes
10864         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
10865    echo "    xemacs will be linked with \"linuxplay.o\""
10866  fi
10867         { test "$extra_verbose" = "yes" && cat << EOF
10868     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
10869 EOF
10870 cat >> confdefs.h <<EOF
10871 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
10872 EOF
10873 }
10874
10875         break
10876 else
10877   echo "$ac_t""no" 1>&6
10878 fi
10879
10880     done
10881   fi
10882
10883   test "$sound_found" = "yes" && with_native_sound=yes
10884 fi
10885
10886 if test -z "$with_sound"; then
10887   if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then
10888     with_sound=native
10889   fi
10890 fi
10891
10892 if test "$with_native_sound" = "yes"; then
10893   { test "$extra_verbose" = "yes" && cat << \EOF
10894     Defining HAVE_NATIVE_SOUND
10895 EOF
10896 cat >> confdefs.h <<\EOF
10897 #define HAVE_NATIVE_SOUND 1
10898 EOF
10899 }
10900
10901   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
10902 fi
10903
10904 case "$with_sound" in both | nas )
10905   { test "$extra_verbose" = "yes" && cat << \EOF
10906     Defining HAVE_NAS_SOUND
10907 EOF
10908 cat >> confdefs.h <<\EOF
10909 #define HAVE_NAS_SOUND 1
10910 EOF
10911 }
10912
10913   extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
10914    echo "    xemacs will be linked with \"nas.o\""
10915  fi
10916   libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
10917       cat > conftest.$ac_ext <<EOF
10918 #line 10919 "configure"
10919 #include "confdefs.h"
10920 #include <audio/Xtutil.h>
10921 EOF
10922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10923   egrep "AuXtErrorJump" >/dev/null 2>&1; then
10924   :
10925 else
10926   rm -rf conftest*
10927   { test "$extra_verbose" = "yes" && cat << \EOF
10928     Defining NAS_NO_ERROR_JUMP
10929 EOF
10930 cat >> confdefs.h <<\EOF
10931 #define NAS_NO_ERROR_JUMP 1
10932 EOF
10933 }
10934
10935 fi
10936 rm -f conftest*
10937
10938 esac
10939
10940
10941 test -z "$with_tty" && with_tty=yes
10942
10943 if test "$with_tty" = "yes"  ; then
10944   echo "checking for TTY-related features" 1>&6
10945 echo "configure:10946: checking for TTY-related features" >&5
10946   { test "$extra_verbose" = "yes" && cat << \EOF
10947     Defining HAVE_TTY
10948 EOF
10949 cat >> confdefs.h <<\EOF
10950 #define HAVE_TTY 1
10951 EOF
10952 }
10953
10954   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
10955    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\""
10956  fi
10957
10958     if test -z "$with_ncurses"; then
10959     
10960 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
10961 echo "configure:10962: checking for tgetent in -lncurses" >&5
10962 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
10963
10964 xe_check_libs=" -lncurses "
10965 cat > conftest.$ac_ext <<EOF
10966 #line 10967 "configure"
10967 #include "confdefs.h"
10968 /* Override any gcc2 internal prototype to avoid an error.  */
10969 /* We use char because int might match the return type of a gcc2
10970     builtin and then its argument prototype would still apply.  */
10971 char tgetent();
10972
10973 int main() {
10974 tgetent()
10975 ; return 0; }
10976 EOF
10977 if { (eval echo configure:10978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10978   rm -rf conftest*
10979   eval "ac_cv_lib_$ac_lib_var=yes"
10980 else
10981   echo "configure: failed program was:" >&5
10982   cat conftest.$ac_ext >&5
10983   rm -rf conftest*
10984   eval "ac_cv_lib_$ac_lib_var=no"
10985 fi
10986 rm -f conftest*
10987 xe_check_libs=""
10988
10989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10990   echo "$ac_t""yes" 1>&6
10991   with_ncurses=yes
10992 else
10993   echo "$ac_t""no" 1>&6
10994 with_ncurses=no
10995 fi
10996
10997
10998   fi
10999   if test "$with_ncurses" = "yes"; then
11000     { test "$extra_verbose" = "yes" && cat << \EOF
11001     Defining HAVE_NCURSES
11002 EOF
11003 cat >> confdefs.h <<\EOF
11004 #define HAVE_NCURSES 1
11005 EOF
11006 }
11007
11008     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11009 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11010 echo "configure:11011: checking for ncurses/curses.h" >&5
11011
11012 cat > conftest.$ac_ext <<EOF
11013 #line 11014 "configure"
11014 #include "confdefs.h"
11015 #include <ncurses/curses.h>
11016 EOF
11017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11018 { (eval echo configure:11019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11020 if test -z "$ac_err"; then
11021   rm -rf conftest*
11022   eval "ac_cv_header_$ac_safe=yes"
11023 else
11024   echo "$ac_err" >&5
11025   echo "configure: failed program was:" >&5
11026   cat conftest.$ac_ext >&5
11027   rm -rf conftest*
11028   eval "ac_cv_header_$ac_safe=no"
11029 fi
11030 rm -f conftest*
11031 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11032   echo "$ac_t""yes" 1>&6
11033   curses_h_path=ncurses/curses.h
11034 else
11035   echo "$ac_t""no" 1>&6
11036 fi
11037
11038     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11039 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11040 echo "configure:11041: checking for ncurses/term.h" >&5
11041
11042 cat > conftest.$ac_ext <<EOF
11043 #line 11044 "configure"
11044 #include "confdefs.h"
11045 #include <ncurses/term.h>
11046 EOF
11047 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11048 { (eval echo configure:11049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11049 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11050 if test -z "$ac_err"; then
11051   rm -rf conftest*
11052   eval "ac_cv_header_$ac_safe=yes"
11053 else
11054   echo "$ac_err" >&5
11055   echo "configure: failed program was:" >&5
11056   cat conftest.$ac_ext >&5
11057   rm -rf conftest*
11058   eval "ac_cv_header_$ac_safe=no"
11059 fi
11060 rm -f conftest*
11061 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11062   echo "$ac_t""yes" 1>&6
11063   term_h_path=ncurses/term.h
11064 else
11065   echo "$ac_t""no" 1>&6
11066 fi
11067
11068     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11069    echo "    xemacs will be linked with \"terminfo.o\""
11070  fi
11071     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11072
11073     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11074                         save_c_switch_site="$c_switch_site"
11075       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11076       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11077 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11078 echo "configure:11079: checking for ncurses/curses.h" >&5
11079
11080 cat > conftest.$ac_ext <<EOF
11081 #line 11082 "configure"
11082 #include "confdefs.h"
11083 #include <ncurses/curses.h>
11084 EOF
11085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11086 { (eval echo configure:11087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11088 if test -z "$ac_err"; then
11089   rm -rf conftest*
11090   eval "ac_cv_header_$ac_safe=yes"
11091 else
11092   echo "$ac_err" >&5
11093   echo "configure: failed program was:" >&5
11094   cat conftest.$ac_ext >&5
11095   rm -rf conftest*
11096   eval "ac_cv_header_$ac_safe=no"
11097 fi
11098 rm -f conftest*
11099 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11100   echo "$ac_t""yes" 1>&6
11101   curses_h_path=ncurses/curses.h
11102 else
11103   echo "$ac_t""no" 1>&6
11104 fi
11105
11106       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11107         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11108         else c_switch_site="$save_c_switch_site"
11109       fi
11110     fi
11111   else         if test "$have_terminfo" = "yes"; then
11112       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11113    echo "    xemacs will be linked with \"terminfo.o\""
11114  fi
11115       if test -n "$libs_termcap"; then
11116         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11117       else
11118         for lib in curses termlib termcap; do
11119           
11120 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11121 echo "configure:11122: checking for tgetent in -l$lib" >&5
11122 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11123
11124 xe_check_libs=" -l$lib "
11125 cat > conftest.$ac_ext <<EOF
11126 #line 11127 "configure"
11127 #include "confdefs.h"
11128 /* Override any gcc2 internal prototype to avoid an error.  */
11129 /* We use char because int might match the return type of a gcc2
11130     builtin and then its argument prototype would still apply.  */
11131 char tgetent();
11132
11133 int main() {
11134 tgetent()
11135 ; return 0; }
11136 EOF
11137 if { (eval echo configure:11138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11138   rm -rf conftest*
11139   eval "ac_cv_lib_$ac_lib_var=yes"
11140 else
11141   echo "configure: failed program was:" >&5
11142   cat conftest.$ac_ext >&5
11143   rm -rf conftest*
11144   eval "ac_cv_lib_$ac_lib_var=no"
11145 fi
11146 rm -f conftest*
11147 xe_check_libs=""
11148
11149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11150   echo "$ac_t""yes" 1>&6
11151   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11152 else
11153   echo "$ac_t""no" 1>&6
11154 fi
11155
11156
11157         done
11158       fi
11159     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11160    echo "    xemacs will be linked with \"tparam.o\""
11161  fi
11162                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11163       if test -n "$libs_termcap"; then
11164         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11165       else
11166         
11167 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11168 echo "configure:11169: checking for tgetent in -lcurses" >&5
11169 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11170
11171 xe_check_libs=" -lcurses "
11172 cat > conftest.$ac_ext <<EOF
11173 #line 11174 "configure"
11174 #include "confdefs.h"
11175 /* Override any gcc2 internal prototype to avoid an error.  */
11176 /* We use char because int might match the return type of a gcc2
11177     builtin and then its argument prototype would still apply.  */
11178 char tgetent();
11179
11180 int main() {
11181 tgetent()
11182 ; return 0; }
11183 EOF
11184 if { (eval echo configure:11185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11185   rm -rf conftest*
11186   eval "ac_cv_lib_$ac_lib_var=yes"
11187 else
11188   echo "configure: failed program was:" >&5
11189   cat conftest.$ac_ext >&5
11190   rm -rf conftest*
11191   eval "ac_cv_lib_$ac_lib_var=no"
11192 fi
11193 rm -f conftest*
11194 xe_check_libs=""
11195
11196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11197   echo "$ac_t""yes" 1>&6
11198   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11199 else
11200   echo "$ac_t""no" 1>&6
11201 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11202 echo "configure:11203: checking for tgetent in -ltermcap" >&5
11203 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11204
11205 xe_check_libs=" -ltermcap "
11206 cat > conftest.$ac_ext <<EOF
11207 #line 11208 "configure"
11208 #include "confdefs.h"
11209 /* Override any gcc2 internal prototype to avoid an error.  */
11210 /* We use char because int might match the return type of a gcc2
11211     builtin and then its argument prototype would still apply.  */
11212 char tgetent();
11213
11214 int main() {
11215 tgetent()
11216 ; return 0; }
11217 EOF
11218 if { (eval echo configure:11219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11219   rm -rf conftest*
11220   eval "ac_cv_lib_$ac_lib_var=yes"
11221 else
11222   echo "configure: failed program was:" >&5
11223   cat conftest.$ac_ext >&5
11224   rm -rf conftest*
11225   eval "ac_cv_lib_$ac_lib_var=no"
11226 fi
11227 rm -f conftest*
11228 xe_check_libs=""
11229
11230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11231   echo "$ac_t""yes" 1>&6
11232   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11233 else
11234   echo "$ac_t""no" 1>&6
11235 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11236    echo "    xemacs will be linked with \"termcap.o\""
11237  fi
11238 fi
11239
11240
11241 fi
11242
11243
11244       fi
11245     fi
11246   fi
11247   { test "$extra_verbose" = "yes" && cat << EOF
11248     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11249 EOF
11250 cat >> confdefs.h <<EOF
11251 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11252 EOF
11253 }
11254
11255   { test "$extra_verbose" = "yes" && cat << EOF
11256     Defining TERM_H_PATH = "${term_h_path-term.h}"
11257 EOF
11258 cat >> confdefs.h <<EOF
11259 #define TERM_H_PATH "${term_h_path-term.h}"
11260 EOF
11261 }
11262
11263
11264     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11265 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11266 echo "configure:11267: checking for gpm.h" >&5
11267
11268 cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11271 #include <gpm.h>
11272 EOF
11273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11274 { (eval echo configure:11275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11276 if test -z "$ac_err"; then
11277   rm -rf conftest*
11278   eval "ac_cv_header_$ac_safe=yes"
11279 else
11280   echo "$ac_err" >&5
11281   echo "configure: failed program was:" >&5
11282   cat conftest.$ac_ext >&5
11283   rm -rf conftest*
11284   eval "ac_cv_header_$ac_safe=no"
11285 fi
11286 rm -f conftest*
11287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11288   echo "$ac_t""yes" 1>&6
11289   :
11290 else
11291   echo "$ac_t""no" 1>&6
11292 with_gpm=no
11293 fi
11294  }
11295   test -z "$with_gpm" && { 
11296 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11297 echo "configure:11298: checking for Gpm_Open in -lgpm" >&5
11298 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11299
11300 xe_check_libs=" -lgpm "
11301 cat > conftest.$ac_ext <<EOF
11302 #line 11303 "configure"
11303 #include "confdefs.h"
11304 /* Override any gcc2 internal prototype to avoid an error.  */
11305 /* We use char because int might match the return type of a gcc2
11306     builtin and then its argument prototype would still apply.  */
11307 char Gpm_Open();
11308
11309 int main() {
11310 Gpm_Open()
11311 ; return 0; }
11312 EOF
11313 if { (eval echo configure:11314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11314   rm -rf conftest*
11315   eval "ac_cv_lib_$ac_lib_var=yes"
11316 else
11317   echo "configure: failed program was:" >&5
11318   cat conftest.$ac_ext >&5
11319   rm -rf conftest*
11320   eval "ac_cv_lib_$ac_lib_var=no"
11321 fi
11322 rm -f conftest*
11323 xe_check_libs=""
11324
11325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11326   echo "$ac_t""yes" 1>&6
11327   with_gpm=yes
11328 else
11329   echo "$ac_t""no" 1>&6
11330 with_gpm=no
11331 fi
11332
11333  }
11334   if test "$with_gpm" = "yes"; then
11335     { test "$extra_verbose" = "yes" && cat << \EOF
11336     Defining HAVE_GPM
11337 EOF
11338 cat >> confdefs.h <<\EOF
11339 #define HAVE_GPM 1
11340 EOF
11341 }
11342
11343     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
11344    echo "    xemacs will be linked with \"gpmevent.o\""
11345  fi
11346     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
11347   fi
11348
11349 else   for feature in ncurses gpm; do
11350     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11351       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
11352     fi
11353     eval "with_${feature}=no"
11354   done
11355 fi 
11356 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
11357    echo "    xemacs will be linked with \"event-unixoid.o\""
11358  fi
11359
11360
11361 test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
11362   != "no no no" && echo "checking for database support" 1>&6
11363 echo "configure:11364: checking for database support" >&5
11364
11365 if test "$with_database_gnudbm $with_database_dbm" != "no no"; then
11366   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
11367 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
11368 echo "configure:11369: checking for ndbm.h" >&5
11369
11370 cat > conftest.$ac_ext <<EOF
11371 #line 11372 "configure"
11372 #include "confdefs.h"
11373 #include <ndbm.h>
11374 EOF
11375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11376 { (eval echo configure:11377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11377 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11378 if test -z "$ac_err"; then
11379   rm -rf conftest*
11380   eval "ac_cv_header_$ac_safe=yes"
11381 else
11382   echo "$ac_err" >&5
11383   echo "configure: failed program was:" >&5
11384   cat conftest.$ac_ext >&5
11385   rm -rf conftest*
11386   eval "ac_cv_header_$ac_safe=no"
11387 fi
11388 rm -f conftest*
11389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11390   echo "$ac_t""yes" 1>&6
11391   :
11392 else
11393   echo "$ac_t""no" 1>&6
11394
11395     test "$with_database_gnudbm" = "yes" -o \
11396          "$with_database_dbm"    = "yes" && \
11397       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11398     with_database_gnudbm=no with_database_dbm=no
11399 fi
11400
11401 fi
11402
11403 if test "$with_database_gnudbm" != "no"; then
11404   
11405 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
11406 echo "configure:11407: checking for dbm_open in -lgdbm" >&5
11407 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
11408
11409 xe_check_libs=" -lgdbm "
11410 cat > conftest.$ac_ext <<EOF
11411 #line 11412 "configure"
11412 #include "confdefs.h"
11413 /* Override any gcc2 internal prototype to avoid an error.  */
11414 /* We use char because int might match the return type of a gcc2
11415     builtin and then its argument prototype would still apply.  */
11416 char dbm_open();
11417
11418 int main() {
11419 dbm_open()
11420 ; return 0; }
11421 EOF
11422 if { (eval echo configure:11423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11423   rm -rf conftest*
11424   eval "ac_cv_lib_$ac_lib_var=yes"
11425 else
11426   echo "configure: failed program was:" >&5
11427   cat conftest.$ac_ext >&5
11428   rm -rf conftest*
11429   eval "ac_cv_lib_$ac_lib_var=no"
11430 fi
11431 rm -f conftest*
11432 xe_check_libs=""
11433
11434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11435   echo "$ac_t""yes" 1>&6
11436   with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm
11437 else
11438   echo "$ac_t""no" 1>&6
11439 if test "$with_database_gnudbm" = "yes"; then
11440      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
11441    fi
11442    with_database_gnudbm=no
11443 fi
11444
11445
11446 fi
11447
11448 if test "$with_database_dbm" != "no"; then
11449   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11450 echo "configure:11451: checking for dbm_open" >&5
11451
11452 cat > conftest.$ac_ext <<EOF
11453 #line 11454 "configure"
11454 #include "confdefs.h"
11455 /* System header to define __stub macros and hopefully few prototypes,
11456     which can conflict with char dbm_open(); below.  */
11457 #include <assert.h>
11458 /* Override any gcc2 internal prototype to avoid an error.  */
11459 /* We use char because int might match the return type of a gcc2
11460     builtin and then its argument prototype would still apply.  */
11461 char dbm_open();
11462
11463 int main() {
11464
11465 /* The GNU C library defines this for functions which it implements
11466     to always fail with ENOSYS.  Some functions are actually named
11467     something starting with __ and the normal name is an alias.  */
11468 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11469 choke me
11470 #else
11471 dbm_open();
11472 #endif
11473
11474 ; return 0; }
11475 EOF
11476 if { (eval echo configure:11477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11477   rm -rf conftest*
11478   eval "ac_cv_func_dbm_open=yes"
11479 else
11480   echo "configure: failed program was:" >&5
11481   cat conftest.$ac_ext >&5
11482   rm -rf conftest*
11483   eval "ac_cv_func_dbm_open=no"
11484 fi
11485 rm -f conftest*
11486
11487 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11488   echo "$ac_t""yes" 1>&6
11489   with_database_dbm=yes libdbm=
11490 else
11491   echo "$ac_t""no" 1>&6
11492
11493     
11494 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11495 echo "configure:11496: checking for dbm_open in -ldbm" >&5
11496 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
11497
11498 xe_check_libs=" -ldbm "
11499 cat > conftest.$ac_ext <<EOF
11500 #line 11501 "configure"
11501 #include "confdefs.h"
11502 /* Override any gcc2 internal prototype to avoid an error.  */
11503 /* We use char because int might match the return type of a gcc2
11504     builtin and then its argument prototype would still apply.  */
11505 char dbm_open();
11506
11507 int main() {
11508 dbm_open()
11509 ; return 0; }
11510 EOF
11511 if { (eval echo configure:11512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11512   rm -rf conftest*
11513   eval "ac_cv_lib_$ac_lib_var=yes"
11514 else
11515   echo "configure: failed program was:" >&5
11516   cat conftest.$ac_ext >&5
11517   rm -rf conftest*
11518   eval "ac_cv_lib_$ac_lib_var=no"
11519 fi
11520 rm -f conftest*
11521 xe_check_libs=""
11522
11523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11524   echo "$ac_t""yes" 1>&6
11525   with_database_dbm=yes libdbm=-ldbm
11526 else
11527   echo "$ac_t""no" 1>&6
11528 test "$with_database_dbm" = "yes" && \
11529         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11530       with_database_dbm=no
11531 fi
11532
11533
11534 fi
11535
11536 fi
11537
11538 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
11539 test "$with_database_gnudbm" = "yes" -o \
11540      "$with_database_dbm"    = "yes" && \
11541   { test "$extra_verbose" = "yes" && cat << \EOF
11542     Defining HAVE_DBM
11543 EOF
11544 cat >> confdefs.h <<\EOF
11545 #define HAVE_DBM 1
11546 EOF
11547 }
11548
11549
11550 if test "$with_database_berkdb" != "no"; then
11551   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
11552 echo "configure:11553: checking for Berkeley db.h" >&5
11553   for path in "db/db.h" "db.h"; do
11554     cat > conftest.$ac_ext <<EOF
11555 #line 11556 "configure"
11556 #include "confdefs.h"
11557 #ifdef HAVE_INTTYPES_H
11558 #define __BIT_TYPES_DEFINED__
11559 #include <inttypes.h>
11560 typedef uint8_t  u_int8_t;
11561 typedef uint16_t u_int16_t;
11562 typedef uint32_t u_int32_t;
11563 #ifdef WE_DONT_NEED_QUADS
11564 typedef uint64_t u_int64_t;
11565 #endif
11566 #endif
11567 #include <$path>
11568
11569 int main() {
11570
11571 ; return 0; }
11572 EOF
11573 if { (eval echo configure:11574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11574   rm -rf conftest*
11575   db_h_path="$path"; break
11576 else
11577   echo "configure: failed program was:" >&5
11578   cat conftest.$ac_ext >&5
11579 fi
11580 rm -f conftest*
11581   done
11582   if test -z "$db_h_path"
11583   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
11584   else echo "$ac_t""$db_h_path" 1>&6
11585   fi
11586
11587   if test "$with_database_berkdb" != "no"; then
11588     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
11589 echo "configure:11590: checking for Berkeley DB version" >&5
11590     cat > conftest.$ac_ext <<EOF
11591 #line 11592 "configure"
11592 #include "confdefs.h"
11593 #include <$db_h_path>
11594 #if DB_VERSION_MAJOR > 1
11595 yes
11596 #endif
11597
11598 EOF
11599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11600   egrep "yes" >/dev/null 2>&1; then
11601   rm -rf conftest*
11602   echo "$ac_t""2" 1>&6; dbfunc=db_open
11603 else
11604   rm -rf conftest*
11605   echo "$ac_t""1" 1>&6; dbfunc=dbopen
11606 fi
11607 rm -f conftest*
11608
11609     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
11610 echo "configure:11611: checking for $dbfunc" >&5
11611
11612 cat > conftest.$ac_ext <<EOF
11613 #line 11614 "configure"
11614 #include "confdefs.h"
11615 /* System header to define __stub macros and hopefully few prototypes,
11616     which can conflict with char $dbfunc(); below.  */
11617 #include <assert.h>
11618 /* Override any gcc2 internal prototype to avoid an error.  */
11619 /* We use char because int might match the return type of a gcc2
11620     builtin and then its argument prototype would still apply.  */
11621 char $dbfunc();
11622
11623 int main() {
11624
11625 /* The GNU C library defines this for functions which it implements
11626     to always fail with ENOSYS.  Some functions are actually named
11627     something starting with __ and the normal name is an alias.  */
11628 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
11629 choke me
11630 #else
11631 $dbfunc();
11632 #endif
11633
11634 ; return 0; }
11635 EOF
11636 if { (eval echo configure:11637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11637   rm -rf conftest*
11638   eval "ac_cv_func_$dbfunc=yes"
11639 else
11640   echo "configure: failed program was:" >&5
11641   cat conftest.$ac_ext >&5
11642   rm -rf conftest*
11643   eval "ac_cv_func_$dbfunc=no"
11644 fi
11645 rm -f conftest*
11646
11647 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
11648   echo "$ac_t""yes" 1>&6
11649   with_database_berkdb=yes need_libdb=no
11650 else
11651   echo "$ac_t""no" 1>&6
11652
11653     
11654 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
11655 echo "configure:11656: checking for $dbfunc in -ldb" >&5
11656 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
11657
11658 xe_check_libs=" -ldb "
11659 cat > conftest.$ac_ext <<EOF
11660 #line 11661 "configure"
11661 #include "confdefs.h"
11662 /* Override any gcc2 internal prototype to avoid an error.  */
11663 /* We use char because int might match the return type of a gcc2
11664     builtin and then its argument prototype would still apply.  */
11665 char $dbfunc();
11666
11667 int main() {
11668 $dbfunc()
11669 ; return 0; }
11670 EOF
11671 if { (eval echo configure:11672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11672   rm -rf conftest*
11673   eval "ac_cv_lib_$ac_lib_var=yes"
11674 else
11675   echo "configure: failed program was:" >&5
11676   cat conftest.$ac_ext >&5
11677   rm -rf conftest*
11678   eval "ac_cv_lib_$ac_lib_var=no"
11679 fi
11680 rm -f conftest*
11681 xe_check_libs=""
11682
11683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11684   echo "$ac_t""yes" 1>&6
11685   with_database_berkdb=yes need_libdb=yes
11686 else
11687   echo "$ac_t""no" 1>&6
11688 fi
11689
11690
11691 fi
11692
11693   fi
11694
11695   if test "$with_database_berkdb" = "yes"; then
11696     { test "$extra_verbose" = "yes" && cat << EOF
11697     Defining DB_H_PATH = "$db_h_path"
11698 EOF
11699 cat >> confdefs.h <<EOF
11700 #define DB_H_PATH "$db_h_path"
11701 EOF
11702 }
11703
11704     { test "$extra_verbose" = "yes" && cat << \EOF
11705     Defining HAVE_BERKELEY_DB
11706 EOF
11707 cat >> confdefs.h <<\EOF
11708 #define HAVE_BERKELEY_DB 1
11709 EOF
11710 }
11711
11712     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
11713   else with_database_berkdb=no
11714   fi
11715 fi
11716
11717 if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
11718      != "no no no"; then
11719   { test "$extra_verbose" = "yes" && cat << \EOF
11720     Defining HAVE_DATABASE
11721 EOF
11722 cat >> confdefs.h <<\EOF
11723 #define HAVE_DATABASE 1
11724 EOF
11725 }
11726
11727   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
11728    echo "    xemacs will be linked with \"database.o\""
11729  fi
11730 fi
11731
11732 if test "$with_socks" = "yes"; then
11733   
11734 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
11735 echo "configure:11736: checking for SOCKSinit in -lsocks" >&5
11736 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
11737
11738 xe_check_libs=" -lsocks "
11739 cat > conftest.$ac_ext <<EOF
11740 #line 11741 "configure"
11741 #include "confdefs.h"
11742 /* Override any gcc2 internal prototype to avoid an error.  */
11743 /* We use char because int might match the return type of a gcc2
11744     builtin and then its argument prototype would still apply.  */
11745 char SOCKSinit();
11746
11747 int main() {
11748 SOCKSinit()
11749 ; return 0; }
11750 EOF
11751 if { (eval echo configure:11752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11752   rm -rf conftest*
11753   eval "ac_cv_lib_$ac_lib_var=yes"
11754 else
11755   echo "configure: failed program was:" >&5
11756   cat conftest.$ac_ext >&5
11757   rm -rf conftest*
11758   eval "ac_cv_lib_$ac_lib_var=no"
11759 fi
11760 rm -f conftest*
11761 xe_check_libs=""
11762
11763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11764   echo "$ac_t""yes" 1>&6
11765     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11766     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11767   { test "$extra_verbose" = "yes" && cat << EOF
11768     Defining $ac_tr_lib
11769 EOF
11770 cat >> confdefs.h <<EOF
11771 #define $ac_tr_lib 1
11772 EOF
11773 }
11774
11775   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
11776
11777 else
11778   echo "$ac_t""no" 1>&6
11779 fi
11780
11781
11782   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
11783     Defining HAVE_SOCKS
11784 EOF
11785 cat >> confdefs.h <<\EOF
11786 #define HAVE_SOCKS 1
11787 EOF
11788 }
11789
11790 fi
11791
11792 if test "$usage_tracking" = "yes"; then
11793   { test "$extra_verbose" = "yes" && cat << \EOF
11794     Defining USAGE_TRACKING
11795 EOF
11796 cat >> confdefs.h <<\EOF
11797 #define USAGE_TRACKING 1
11798 EOF
11799 }
11800
11801   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
11802 fi
11803
11804 for ac_hdr in dlfcn.h
11805 do
11806 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11807 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11808 echo "configure:11809: checking for $ac_hdr" >&5
11809
11810 cat > conftest.$ac_ext <<EOF
11811 #line 11812 "configure"
11812 #include "confdefs.h"
11813 #include <$ac_hdr>
11814 EOF
11815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11816 { (eval echo configure:11817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11818 if test -z "$ac_err"; then
11819   rm -rf conftest*
11820   eval "ac_cv_header_$ac_safe=yes"
11821 else
11822   echo "$ac_err" >&5
11823   echo "configure: failed program was:" >&5
11824   cat conftest.$ac_ext >&5
11825   rm -rf conftest*
11826   eval "ac_cv_header_$ac_safe=no"
11827 fi
11828 rm -f conftest*
11829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11830   echo "$ac_t""yes" 1>&6
11831     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11832   { test "$extra_verbose" = "yes" && cat << EOF
11833     Defining $ac_tr_hdr
11834 EOF
11835 cat >> confdefs.h <<EOF
11836 #define $ac_tr_hdr 1
11837 EOF
11838 }
11839  have_dlfcn=yes
11840   { test "$extra_verbose" = "yes" && cat << \EOF
11841     Defining HAVE_DLFCN_H
11842 EOF
11843 cat >> confdefs.h <<\EOF
11844 #define HAVE_DLFCN_H 1
11845 EOF
11846 }
11847
11848 else
11849   echo "$ac_t""no" 1>&6
11850 fi
11851 done
11852
11853 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11854 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
11855 echo "configure:11856: checking for dlopen in -ldl" >&5
11856 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
11857
11858 xe_check_libs=" -ldl "
11859 cat > conftest.$ac_ext <<EOF
11860 #line 11861 "configure"
11861 #include "confdefs.h"
11862 /* Override any gcc2 internal prototype to avoid an error.  */
11863 /* We use char because int might match the return type of a gcc2
11864     builtin and then its argument prototype would still apply.  */
11865 char dlopen();
11866
11867 int main() {
11868 dlopen()
11869 ; return 0; }
11870 EOF
11871 if { (eval echo configure:11872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11872   rm -rf conftest*
11873   eval "ac_cv_lib_$ac_lib_var=yes"
11874 else
11875   echo "configure: failed program was:" >&5
11876   cat conftest.$ac_ext >&5
11877   rm -rf conftest*
11878   eval "ac_cv_lib_$ac_lib_var=no"
11879 fi
11880 rm -f conftest*
11881 xe_check_libs=""
11882
11883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11884   echo "$ac_t""yes" 1>&6
11885   { test "$extra_verbose" = "yes" && cat << \EOF
11886     Defining HAVE_DLOPEN
11887 EOF
11888 cat >> confdefs.h <<\EOF
11889 #define HAVE_DLOPEN 1
11890 EOF
11891 }
11892  DLL_LIB=dl;  with_shlib=yes
11893 else
11894   echo "$ac_t""no" 1>&6
11895 fi
11896
11897  }
11898 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11899 echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6
11900 echo "configure:11901: checking for _dlopen in -lc" >&5
11901 ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'`
11902
11903 xe_check_libs=" -lc "
11904 cat > conftest.$ac_ext <<EOF
11905 #line 11906 "configure"
11906 #include "confdefs.h"
11907 /* Override any gcc2 internal prototype to avoid an error.  */
11908 /* We use char because int might match the return type of a gcc2
11909     builtin and then its argument prototype would still apply.  */
11910 char _dlopen();
11911
11912 int main() {
11913 _dlopen()
11914 ; return 0; }
11915 EOF
11916 if { (eval echo configure:11917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11917   rm -rf conftest*
11918   eval "ac_cv_lib_$ac_lib_var=yes"
11919 else
11920   echo "configure: failed program was:" >&5
11921   cat conftest.$ac_ext >&5
11922   rm -rf conftest*
11923   eval "ac_cv_lib_$ac_lib_var=no"
11924 fi
11925 rm -f conftest*
11926 xe_check_libs=""
11927
11928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11929   echo "$ac_t""yes" 1>&6
11930   { test "$extra_verbose" = "yes" && cat << \EOF
11931     Defining HAVE_DLOPEN
11932 EOF
11933 cat >> confdefs.h <<\EOF
11934 #define HAVE_DLOPEN 1
11935 EOF
11936 }
11937  DLL_LIB=;   with_shlib=yes
11938 else
11939   echo "$ac_t""no" 1>&6
11940 fi
11941
11942  }
11943 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11944 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
11945 echo "configure:11946: checking for dlopen in -lc" >&5
11946 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
11947
11948 xe_check_libs=" -lc "
11949 cat > conftest.$ac_ext <<EOF
11950 #line 11951 "configure"
11951 #include "confdefs.h"
11952 /* Override any gcc2 internal prototype to avoid an error.  */
11953 /* We use char because int might match the return type of a gcc2
11954     builtin and then its argument prototype would still apply.  */
11955 char dlopen();
11956
11957 int main() {
11958 dlopen()
11959 ; return 0; }
11960 EOF
11961 if { (eval echo configure:11962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11962   rm -rf conftest*
11963   eval "ac_cv_lib_$ac_lib_var=yes"
11964 else
11965   echo "configure: failed program was:" >&5
11966   cat conftest.$ac_ext >&5
11967   rm -rf conftest*
11968   eval "ac_cv_lib_$ac_lib_var=no"
11969 fi
11970 rm -f conftest*
11971 xe_check_libs=""
11972
11973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11974   echo "$ac_t""yes" 1>&6
11975   { test "$extra_verbose" = "yes" && cat << \EOF
11976     Defining HAVE_DLOPEN
11977 EOF
11978 cat >> confdefs.h <<\EOF
11979 #define HAVE_DLOPEN 1
11980 EOF
11981 }
11982  DLL_LIB=;   with_shlib=yes
11983 else
11984   echo "$ac_t""no" 1>&6
11985 fi
11986
11987  }
11988 test -z "$with_shlib" && { 
11989 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
11990 echo "configure:11991: checking for shl_load in -ldld" >&5
11991 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
11992
11993 xe_check_libs=" -ldld "
11994 cat > conftest.$ac_ext <<EOF
11995 #line 11996 "configure"
11996 #include "confdefs.h"
11997 /* Override any gcc2 internal prototype to avoid an error.  */
11998 /* We use char because int might match the return type of a gcc2
11999     builtin and then its argument prototype would still apply.  */
12000 char shl_load();
12001
12002 int main() {
12003 shl_load()
12004 ; return 0; }
12005 EOF
12006 if { (eval echo configure:12007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12007   rm -rf conftest*
12008   eval "ac_cv_lib_$ac_lib_var=yes"
12009 else
12010   echo "configure: failed program was:" >&5
12011   cat conftest.$ac_ext >&5
12012   rm -rf conftest*
12013   eval "ac_cv_lib_$ac_lib_var=no"
12014 fi
12015 rm -f conftest*
12016 xe_check_libs=""
12017
12018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12019   echo "$ac_t""yes" 1>&6
12020   { test "$extra_verbose" = "yes" && cat << \EOF
12021     Defining HAVE_SHL_LOAD
12022 EOF
12023 cat >> confdefs.h <<\EOF
12024 #define HAVE_SHL_LOAD 1
12025 EOF
12026 }
12027  DLL_LIB=dld; with_shlib=yes
12028 else
12029   echo "$ac_t""no" 1>&6
12030 fi
12031
12032  }
12033 test -z "$with_shlib" && { 
12034 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12035 echo "configure:12036: checking for dld_init in -ldld" >&5
12036 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12037
12038 xe_check_libs=" -ldld "
12039 cat > conftest.$ac_ext <<EOF
12040 #line 12041 "configure"
12041 #include "confdefs.h"
12042 /* Override any gcc2 internal prototype to avoid an error.  */
12043 /* We use char because int might match the return type of a gcc2
12044     builtin and then its argument prototype would still apply.  */
12045 char dld_init();
12046
12047 int main() {
12048 dld_init()
12049 ; return 0; }
12050 EOF
12051 if { (eval echo configure:12052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12052   rm -rf conftest*
12053   eval "ac_cv_lib_$ac_lib_var=yes"
12054 else
12055   echo "configure: failed program was:" >&5
12056   cat conftest.$ac_ext >&5
12057   rm -rf conftest*
12058   eval "ac_cv_lib_$ac_lib_var=no"
12059 fi
12060 rm -f conftest*
12061 xe_check_libs=""
12062
12063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12064   echo "$ac_t""yes" 1>&6
12065   { test "$extra_verbose" = "yes" && cat << \EOF
12066     Defining HAVE_DLD_INIT
12067 EOF
12068 cat >> confdefs.h <<\EOF
12069 #define HAVE_DLD_INIT 1
12070 EOF
12071 }
12072  DLL_LIB=dld; with_shlib=yes
12073 else
12074   echo "$ac_t""no" 1>&6
12075 fi
12076
12077  }
12078 if test "$with_shlib" = "yes"; then
12079   
12080 dll_ld=
12081 dll_ldflags=
12082 dll_cflags=
12083 dll_post=
12084 dll_ldo="-o"
12085 ld_dynamic_link_flags=
12086 xehost=$canonical
12087 xealias=$internal_configuration
12088
12089 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12090 echo "configure:12091: checking how to build dynamic libraries for ${xehost}" >&5
12091 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12092 case "$xehost" in
12093 *-*-linux-gnu*) ;;
12094 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12095 esac
12096
12097 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12098 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12099 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12100
12101 case "$xehost_os" in
12102 aix3*)
12103   # AIX sometimes has problems with the GCC collect2 program.  For some
12104   # reason, if we set the COLLECT_NAMES environment variable, the problems
12105   # vanish in a puff of smoke.
12106   if test "${COLLECT_NAMES+set}" != set; then
12107     COLLECT_NAMES=
12108     export COLLECT_NAMES
12109   fi
12110   ;;
12111 esac
12112
12113 # Now see if the compiler is really GCC.
12114 if test "$GCC" = "yes"; then
12115   XEGCC=yes
12116 else
12117   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12118 echo "configure:12119: checking checking whether we are using GNU C" >&5
12119   cat > conftest.$ac_ext <<EOF
12120 #line 12121 "configure"
12121 #include "confdefs.h"
12122
12123 #ifdef __GNUC__
12124   yes;
12125 #endif
12126
12127 EOF
12128 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12129   egrep "yes" >/dev/null 2>&1; then
12130   rm -rf conftest*
12131   XEGCC=yes
12132 else
12133   rm -rf conftest*
12134   XEGCC=no
12135 fi
12136 rm -f conftest*
12137
12138   echo "$ac_t""${XEGCC}" 1>&6
12139 fi
12140
12141 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12142 echo "configure:12143: checking how to produce PIC code" >&5
12143 wl=
12144
12145 can_build_shared=yes
12146 if test "$XEGCC" = yes; then
12147   wl='-Wl,'
12148
12149   case "$xehost_os" in
12150   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12151     # PIC is the default for these OSes.
12152     ;;
12153
12154   os2*)
12155     # We can build DLLs from non-PIC.
12156     ;;
12157   amigaos*)
12158     # FIXME: we need at least 68020 code to build shared libraries, but
12159     # adding the `-m68020' flag to GCC prevents building anything better,
12160     # like `-m68040'.
12161     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12162     ;;
12163   *)
12164     dll_cflags='-fPIC'
12165     ;;
12166   esac
12167 else
12168   # PORTME Check for PIC flags for the system compiler.
12169   case "$xehost_os" in
12170   hpux9* | hpux10*)
12171     # Is there a better link_static_flag that works with the bundled CC?
12172     wl='-Wl,'
12173     dll_cflags='+Z'
12174     ;;
12175
12176   irix5* | irix6*)
12177     wl='-Wl,'
12178     # PIC (with -KPIC) is the default.
12179     ;;
12180
12181   os2*)
12182     # We can build DLLs from non-PIC.
12183     ;;
12184
12185   osf3* | osf4*)
12186     # All OSF/1 code is PIC.
12187     wl='-Wl,'
12188     ;;
12189
12190   sco3.2v5*)
12191     dll_cflags='-belf -Kpic'
12192     wl='-Wl,'
12193     ;;
12194
12195   unixware*)
12196     dll_cflags="-KPIC"
12197     wl="-Wl,"
12198     ;;
12199
12200   sysv4*)
12201     dll_cflags="-KPIC"
12202     wl="-Wl,"
12203     ;;
12204
12205   sysv5*)
12206     dll_cflags="-KPIC"
12207     wl="-Wl,"
12208     ;;
12209
12210   solaris2*)
12211     dll_cflags='-KPIC'
12212     wl='-Wl,'
12213     ;;
12214
12215   sunos4*)
12216     dll_cflags='-PIC'
12217     wl='-Qoption ld '
12218     ;;
12219
12220   uts4*)
12221     dll_cflags='-pic'
12222     ;;
12223
12224   *)
12225     can_build_shared=no
12226     ;;
12227   esac
12228 fi
12229
12230 if test -n "$dll_cflags"; then
12231   echo "$ac_t""${dll_cflags}" 1>&6
12232   
12233   # Check to make sure the dll_cflags actually works.
12234   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12235 echo "configure:12236: checking if PIC flag ${dll_cflags} really works" >&5
12236   save_CFLAGS="$CFLAGS"
12237   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12238   cat > conftest.$ac_ext <<EOF
12239 #line 12240 "configure"
12240 #include "confdefs.h"
12241
12242 int main() {
12243 int x=0;
12244 ; return 0; }
12245 EOF
12246 if { (eval echo configure:12247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12247   rm -rf conftest*
12248   
12249     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12250     # reports no error.  So, we need to grep stderr for (Bundled).
12251     if grep '(Bundled)' config.log >/dev/null; then
12252       echo "$ac_t""no" 1>&6
12253       can_build_shared=no
12254       dll_cflags=
12255     else
12256       echo "$ac_t""yes" 1>&6
12257     fi
12258 else
12259   echo "configure: failed program was:" >&5
12260   cat conftest.$ac_ext >&5
12261   rm -rf conftest*
12262   echo "$ac_t""no" 1>&6
12263     can_build_shared=no
12264     dll_cflags=
12265 fi
12266 rm -f conftest*
12267   CFLAGS="$save_CFLAGS"
12268 else
12269   echo "$ac_t""none" 1>&6
12270 fi
12271
12272 if test "$can_build_shared" = "yes"; then
12273 cc_produces_so=no
12274 xldf=
12275 xcldf=
12276 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12277 echo "configure:12278: checking if C compiler can produce shared libraries" >&5
12278 if test "$XEGCC" = yes; then
12279   xcldf="-shared"
12280   xldf="-shared"
12281 else # Not using GCC
12282   case "$xehost_os" in
12283     aix3* | aix4*)
12284       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12285       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12286       ;;
12287
12288     freebsd2* | netbsd* | openbsd*)
12289       xldf="-Bshareable"
12290       xcldf="${wl}-Bshareable"
12291       ;;
12292
12293     freebsd3*)
12294       xcldf="-shared"
12295       ;;
12296
12297     hpux*)
12298       xldf="-b +s"
12299       xcldf="${wl}-b ${wl}+s"
12300       ;;
12301
12302     irix5* | irix6* | osf3* | osf4*)
12303       xcldf="${wl}-shared"
12304       xldf="-shared"
12305       ;;
12306
12307     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12308       xcldf="-G"
12309       xldf="-G"
12310       ;;
12311
12312     sunos4*)
12313       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12314       xldf="-assert pure-text -Bstatic"
12315       ;;
12316   esac
12317 fi # End if if we are using gcc
12318
12319 if test -n "$xcldf"; then
12320   save_LDFLAGS=$LDFLAGS
12321   save_LIBS=$LIBS
12322   save_xe_libs=$xe_libs
12323   LDFLAGS="$xcldf $LDFLAGS"
12324   LIBS=
12325   xe_libs=
12326   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12327   cat > conftest.$ac_ext <<EOF
12328 #line 12329 "configure"
12329 #include "confdefs.h"
12330
12331 int main() {
12332 int x=0;
12333 ; return 0; }
12334 EOF
12335 if { (eval echo configure:12336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12336   rm -rf conftest*
12337   cc_produces_so=yes
12338 else
12339   echo "configure: failed program was:" >&5
12340   cat conftest.$ac_ext >&5
12341   rm -rf conftest*
12342   cc_produces_so=no
12343 fi
12344 rm -f conftest*
12345   LDFLAGS=$save_LDFLAGS
12346   LIBS=$save_LIBS
12347   xe_libs=$save_xe_libs
12348   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12349 else
12350   cc_produces_so=no
12351 fi
12352 echo "$ac_t""${cc_produces_so}" 1>&6
12353
12354 LTLD=$LD
12355 if test -z "$LTLD"; then
12356   ac_prog=ld
12357   if test "$XEGCC" = yes; then
12358     # Check if gcc -print-prog-name=ld gives a path.
12359     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12360 echo "configure:12361: checking for ld used by GCC" >&5
12361     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12362     case "$ac_prog" in
12363     # Accept absolute paths.
12364     /*)
12365       if test -z "$LTLD"; then
12366         case "$ac_prog" in
12367           *gcc-lib*) LTLD="$CC"
12368                      ;;
12369           *)         LTLD="$ac_prog"
12370                      ;;
12371         esac
12372       fi
12373       ;;
12374     "")
12375       # If it fails, then pretend we aren't using GCC.
12376       ac_prog=ld
12377       ;;
12378     *)
12379       # If it is relative, then search for the first ld in PATH.
12380       with_gnu_ld=unknown
12381       ;;
12382     esac
12383   else
12384     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12385 echo "configure:12386: checking for GNU ld" >&5
12386   fi
12387
12388   if test -z "$LTLD"; then
12389     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12390     for ac_dir in $PATH; do
12391       test -z "$ac_dir" && ac_dir=.
12392       if test -f "$ac_dir/$ac_prog"; then
12393         LTLD="$ac_dir/$ac_prog"
12394         # Check to see if the program is GNU ld.  I'd rather use --version,
12395         # but apparently some GNU ld's only accept -v.
12396         # Break only if it was the GNU/non-GNU ld that we prefer.
12397         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12398           xe_gnu_ld=yes
12399         else
12400           xe_gnu_ld=no
12401         fi
12402       fi
12403     done
12404     IFS="$ac_save_ifs"
12405   fi
12406
12407   if test -n "$LTLD"; then
12408     echo "$ac_t""${LTLD}" 1>&6
12409   else
12410     echo "$ac_t""no" 1>&6
12411   fi
12412
12413   if test -z "$LTLD" -a "$cc_produces_so" = no; then
12414     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
12415     exit 1
12416   fi
12417 fi
12418
12419 ld_dynamic_link_flags=
12420
12421 # Check to see if it really is or isn't GNU ld.
12422 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
12423 echo "configure:12424: checking if the linker is GNU ld" >&5
12424 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12425 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
12426   xe_gnu_ld=yes
12427 else
12428   xe_gnu_ld=no
12429 fi
12430 echo "$ac_t""${xe_gnu_ld}" 1>&6
12431
12432 case "$xehost_os" in
12433   amigaos* | sunos4*)
12434     # On these operating systems, we should treat GNU ld like the system ld.
12435     gnu_ld_acts_native=yes
12436     ;;
12437   *)
12438     gnu_ld_acts_native=no
12439     ;;
12440 esac
12441
12442 if test "$cc_produces_so" = "yes"; then
12443   dll_ld=$CC
12444   dll_ldflags=$xcldf
12445   can_build_shared=yes
12446 else
12447   # OK - only NOW do we futz about with ld.
12448   # See if the linker supports building shared libraries.
12449   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
12450 echo "configure:12451: checking whether the linker supports shared libraries" >&5
12451   dll_ld=$CC
12452   dll_ldflags=$LDFLAGS
12453   ld_shlibs=yes
12454   can_build_shared=yes
12455   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
12456     # See if GNU ld supports shared libraries.
12457     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12458       dll_ld=$CC
12459       dll_ldflags="-shared"
12460       ld_shlibs=yes
12461     else
12462       ld_shlibs=no
12463     fi
12464   else
12465     # PORTME fill in a description of your system's linker (not GNU ld)
12466     case "$xehost_os" in
12467     aix3*)
12468       dll_ld=$LTLD
12469       dll_ldflags=$xldf
12470       ;;
12471
12472     aix4*)
12473       dll_ldflags=$xcldf
12474       ;;
12475
12476     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12477     # support.  Future versions do this automatically, but an explicit c++rt0.o
12478     # doesn't break anything, and helps significantly (at the cost of a little
12479     # extra space).
12480     freebsd2.2*)
12481       dll_ld=$LTLD
12482       dll_ldflags=$xldf
12483       dll_post="/usr/lib/c++rt0.o"
12484       ;;
12485
12486     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
12487     freebsd2*)
12488       dll_ld=$LTLD
12489       dll_ldflags="-Bshareable"
12490       ;;
12491
12492     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
12493     freebsd3*)
12494       dll_ldflags="-shared"
12495       ;;
12496
12497     hpux*)
12498       dll_ld=$LTLD
12499       dll_ldflags=$xldf
12500       ;;
12501
12502     irix5* | irix6*)
12503       dll_ld=$LTLD
12504       dll_ldflags=$xldf
12505       ;;
12506
12507     netbsd*)
12508       # Tested with NetBSD 1.2 ld
12509       dll_ld=$LTLD
12510       dll_ldflags=$xldf
12511       ;;
12512
12513     openbsd*)
12514       dll_ld=$LTLD
12515       dll_ldflags=$xldf
12516       ;;
12517
12518     osf3* | osf4*)
12519       dll_ld=$LTLD
12520       dll_ldflags=$xldf
12521       ;;
12522
12523     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
12524     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
12525       dll_ld=$LTLD
12526       case "$dll_ld" in
12527         *gcc*) dll_ldflags="-shared"
12528                dll_ld=$CC
12529                ;;
12530         *)     dll_ldflags="-G"
12531                ;;
12532       esac
12533       ;;
12534
12535     sunos4*)
12536       if test "$XEGCC" = yes; then
12537         dll_ld=$CC
12538       else
12539         dll_ld=$LTLD
12540       fi
12541       dll_ldflags=$xldf
12542       ;;
12543
12544     uts4*)
12545       dll_ld=$LTLD
12546       dll_ldflags="-G"
12547       ;;
12548
12549     bsdi*)
12550       dll_ldflags="-r"
12551       dll_ld="shlicc2"
12552       ;;
12553
12554     *)
12555       ld_shlibs=no
12556       can_build_shared=no
12557       ;;
12558     esac
12559   fi
12560   echo "$ac_t""${ld_shlibs}" 1>&6
12561   if test "$ld_shlibs" = "no"; then
12562     can_build_shared=no
12563   fi
12564 fi # End of if cc_produces_so = no
12565
12566
12567 if test "$xe_gnu_ld" = yes; then
12568   if test "$ld_shlibs" = yes; then
12569     ld_dynamic_link_flags="${wl}-export-dynamic"
12570   fi
12571 fi
12572
12573 if test -z "$ld_dynamic_link_flags"; then
12574   case "$xehost_os" in
12575   aix3*)
12576     ld_dynamic_link_flags=
12577     ;;
12578
12579   aix4*)
12580     ld_dynamic_link_flags=
12581     ;;
12582
12583   freebsd2.2*)
12584     ld_dynamic_link_flags=
12585     ;;
12586
12587   freebsd2*)
12588     ld_dynamic_link_flags=
12589     ;;
12590
12591   freebsd3*)
12592     ld_dynamic_link_flags=
12593     ;;
12594
12595   hpux*)
12596     ld_dynamic_link_flags="${wl}-E"
12597     ;;
12598
12599   irix5* | irix6*)
12600     ld_dynamic_link_flags=
12601     ;;
12602
12603   netbsd*)
12604     ld_dynamic_link_flags=
12605     ;;
12606
12607   openbsd*)
12608     ld_dynamic_link_flags=
12609     ;;
12610
12611   osf3* | osf4*)
12612     ld_dynamic_link_flags=
12613     ;;
12614
12615   solaris2* | solaris7*)
12616     ld_dynamic_link_flags="${wl}-Bdynamic"
12617     ;;
12618
12619   sco3.2v5* | unixware* | sysv5* | sysv4*)
12620     ld_dynamic_link_flags="${wl}-Bexport"
12621     ;;
12622
12623   sunos4*)
12624     ld_dynamic_link_flags=
12625     ;;
12626
12627   uts4*)
12628     ld_dynamic_link_flags=
12629     ;;
12630
12631   bsdi*)
12632     ld_dynamic_link_flags=
12633     ;;
12634
12635   esac
12636 fi # End of if -z ld_dynamic_link_flags
12637 fi # End of if test "$can_build_shared" = "yes"
12638
12639
12640
12641
12642
12643
12644
12645
12646   if test "$can_build_shared" = "yes"; then
12647     { test "$extra_verbose" = "yes" && cat << \EOF
12648     Defining HAVE_SHLIB
12649 EOF
12650 cat >> confdefs.h <<\EOF
12651 #define HAVE_SHLIB 1
12652 EOF
12653 }
12654
12655     extra_objs="$extra_objs sysdll.o" &&  if test "$extra_verbose" = "yes"; then
12656    echo "    xemacs will be linked with \"sysdll.o\""
12657  fi
12658     extra_objs="$extra_objs emodules.o" &&  if test "$extra_verbose" = "yes"; then
12659    echo "    xemacs will be linked with \"emodules.o\""
12660  fi
12661     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
12662     test ! -z "$DLL_LIB" && LIBS="-l${DLL_LIB} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${DLL_LIB}\" to \$LIBS"; fi
12663     for ac_func in dlerror _dlerror
12664 do
12665 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12666 echo "configure:12667: checking for $ac_func" >&5
12667
12668 cat > conftest.$ac_ext <<EOF
12669 #line 12670 "configure"
12670 #include "confdefs.h"
12671 /* System header to define __stub macros and hopefully few prototypes,
12672     which can conflict with char $ac_func(); below.  */
12673 #include <assert.h>
12674 /* Override any gcc2 internal prototype to avoid an error.  */
12675 /* We use char because int might match the return type of a gcc2
12676     builtin and then its argument prototype would still apply.  */
12677 char $ac_func();
12678
12679 int main() {
12680
12681 /* The GNU C library defines this for functions which it implements
12682     to always fail with ENOSYS.  Some functions are actually named
12683     something starting with __ and the normal name is an alias.  */
12684 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12685 choke me
12686 #else
12687 $ac_func();
12688 #endif
12689
12690 ; return 0; }
12691 EOF
12692 if { (eval echo configure:12693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12693   rm -rf conftest*
12694   eval "ac_cv_func_$ac_func=yes"
12695 else
12696   echo "configure: failed program was:" >&5
12697   cat conftest.$ac_ext >&5
12698   rm -rf conftest*
12699   eval "ac_cv_func_$ac_func=no"
12700 fi
12701 rm -f conftest*
12702
12703 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12704   echo "$ac_t""yes" 1>&6
12705     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12706   { test "$extra_verbose" = "yes" && cat << EOF
12707     Defining $ac_tr_func
12708 EOF
12709 cat >> confdefs.h <<EOF
12710 #define $ac_tr_func 1
12711 EOF
12712 }
12713  
12714 else
12715   echo "$ac_t""no" 1>&6
12716 fi
12717 done
12718
12719   else
12720     echo "configure: warning: disabling shared library support" 1>&2
12721     with_shlib=no
12722   fi
12723 fi
12724
12725 cat > conftest.$ac_ext <<EOF
12726 #line 12727 "configure"
12727 #include "confdefs.h"
12728 int main(int c,char *v[]){return 0;}
12729 EOF
12730 if { (eval echo configure:12731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12731 then
12732   :
12733 else
12734   conftest_rc="$?"
12735   echo "configure: failed program was:" >&5
12736   cat conftest.$ac_ext >&5
12737   rm -fr conftest*
12738   
12739   echo ""
12740   echo "*** PANIC *** The C compiler can no longer build working executables."
12741   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
12742   echo "*** PANIC *** The most likely reason for this problem is that configure"
12743   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
12744   echo "*** PANIC *** found at run time."
12745   echo "*** PANIC ***"
12746   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
12747   echo "*** PANIC *** On other systems, try telling configure where to find the"
12748   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
12749   echo "*** PANIC ***"
12750   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
12751   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
12752   echo "*** PANIC *** on your system.  Don't do that."
12753   exit 1
12754 fi
12755 rm -fr conftest*
12756
12757 if test "$win32_processes" = "yes"; then
12758   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
12759    echo "    xemacs will be linked with \"process-nt.o\""
12760  fi
12761 else
12762   { test "$extra_verbose" = "yes" && cat << \EOF
12763     Defining HAVE_UNIX_PROCESSES
12764 EOF
12765 cat >> confdefs.h <<\EOF
12766 #define HAVE_UNIX_PROCESSES 1
12767 EOF
12768 }
12769
12770   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
12771    echo "    xemacs will be linked with \"process-unix.o\""
12772  fi
12773 fi
12774
12775
12776
12777 T=""
12778 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12779 CFLAGS="$T"
12780
12781
12782 T=""
12783 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12784 extra_objs="$T"
12785
12786
12787 T=""
12788 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
12789 c_switch_general="$T"
12790
12791
12792 T=""
12793 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12794 c_switch_window_system="$T"
12795
12796
12797 T=""
12798 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12799 c_switch_all="$T"
12800
12801
12802 T=""
12803 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
12804 ld_switch_general="$T"
12805
12806
12807 T=""
12808 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12809 ld_switch_window_system="$T"
12810
12811
12812 T=""
12813 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12814 ld_switch_all="$T"
12815
12816
12817 T=""
12818 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12819 ld_libs_general="$T"
12820
12821
12822 T=""
12823 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
12824 ld_libs_window_system="$T"
12825
12826
12827 T=""
12828 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12829 ld_libs_all="$T"
12830
12831
12832
12833 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
12834 internal_makefile_list="Makefile.in"
12835 SUBDIR_MAKEFILES=''
12836 test -d lock || mkdir lock
12837 for dir in $MAKE_SUBDIR; do
12838   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
12839         test -d "$d" || mkdir "$d"; cd "$d"
12840       done ) ;;
12841    * ) test -d "$dir" || mkdir "$dir" ;;
12842   esac
12843   
12844 T=""
12845 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12846 SUBDIR_MAKEFILES="$T"
12847
12848   
12849 T=""
12850 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12851 internal_makefile_list="$T"
12852
12853 done
12854
12855
12856
12857
12858 for dir in src/s src/m; do
12859   if test ! -d "$dir" ; then
12860     echo Making symbolic link to "$srcdir/$dir"
12861     ${LN_S} "$srcdir/$dir" "$dir"
12862   fi
12863 done
12864
12865 if test "$extra_verbose" = "yes"; then
12866   echo ""
12867   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
12868   echo ""
12869 fi
12870
12871 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
12872   echo "creating src/gdbinit"; echo ""
12873   echo "source $srcdir/src/gdbinit" > src/gdbinit
12874 fi
12875
12876 if test "$__SUNPRO_C" = "yes"; then
12877   echo "creating .sbinit"; echo ""
12878   ( echo "# For use with Sun WorkShop's Source browser."
12879     echo "# See sbquery(1) and sbinit(4) for more information"
12880     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
12881   ) > .sbinit
12882 fi
12883
12884 rm -f core
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902 PREFIX=$prefix
12903 while true; do
12904   case "$PREFIX" in
12905     *\$* ) eval "PREFIX=$PREFIX" ;;
12906     *) break ;;
12907   esac
12908 done
12909
12910
12911
12912
12913 EXEC_PREFIX=$exec_prefix
12914 while true; do
12915   case "$EXEC_PREFIX" in
12916     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
12917     *) break ;;
12918   esac
12919 done
12920
12921
12922
12923
12924 INFODIR=$infodir
12925 while true; do
12926   case "$INFODIR" in
12927     *\$* ) eval "INFODIR=$INFODIR" ;;
12928     *) break ;;
12929   esac
12930 done
12931
12932
12933
12934
12935 INFOPATH=$infopath
12936 while true; do
12937   case "$INFOPATH" in
12938     *\$* ) eval "INFOPATH=$INFOPATH" ;;
12939     *) break ;;
12940   esac
12941 done
12942
12943
12944
12945
12946 PACKAGE_PATH=$package_path
12947 while true; do
12948   case "$PACKAGE_PATH" in
12949     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
12950     *) break ;;
12951   esac
12952 done
12953
12954
12955
12956
12957 LISPDIR=$lispdir
12958 while true; do
12959   case "$LISPDIR" in
12960     *\$* ) eval "LISPDIR=$LISPDIR" ;;
12961     *) break ;;
12962   esac
12963 done
12964
12965
12966
12967
12968 MODULEDIR=$moduledir
12969 while true; do
12970   case "$MODULEDIR" in
12971     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
12972     *) break ;;
12973   esac
12974 done
12975
12976
12977
12978
12979 SITELISPDIR=$sitelispdir
12980 while true; do
12981   case "$SITELISPDIR" in
12982     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
12983     *) break ;;
12984   esac
12985 done
12986
12987
12988
12989
12990 SITEMODULEDIR=$sitemoduledir
12991 while true; do
12992   case "$SITEMODULEDIR" in
12993     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
12994     *) break ;;
12995   esac
12996 done
12997
12998
12999
13000
13001 ETCDIR=$etcdir
13002 while true; do
13003   case "$ETCDIR" in
13004     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13005     *) break ;;
13006   esac
13007 done
13008
13009
13010
13011
13012 LOCKDIR=$lockdir
13013 while true; do
13014   case "$LOCKDIR" in
13015     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13016     *) break ;;
13017   esac
13018 done
13019
13020
13021
13022
13023 DOCDIR=$docdir
13024 while true; do
13025   case "$DOCDIR" in
13026     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13027     *) break ;;
13028   esac
13029 done
13030
13031
13032
13033
13034 ARCHLIBDIR=$archlibdir
13035 while true; do
13036   case "$ARCHLIBDIR" in
13037     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13038     *) break ;;
13039   esac
13040 done
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13062
13063
13064
13065
13066
13067
13068
13069 : ${XEMACS_CC:=$CC}
13070
13071
13072 if test "$with_prefix" = "yes"; then
13073   { test "$extra_verbose" = "yes" && cat << \EOF
13074     Defining PREFIX_USER_DEFINED
13075 EOF
13076 cat >> confdefs.h <<\EOF
13077 #define PREFIX_USER_DEFINED 1
13078 EOF
13079 }
13080
13081 fi
13082
13083 if test "$with_site_lisp" = "no"; then
13084   { test "$extra_verbose" = "yes" && cat << \EOF
13085     Defining INHIBIT_SITE_LISP
13086 EOF
13087 cat >> confdefs.h <<\EOF
13088 #define INHIBIT_SITE_LISP 1
13089 EOF
13090 }
13091
13092 fi
13093 if test "$with_site_modules" = "no"; then
13094   { test "$extra_verbose" = "yes" && cat << \EOF
13095     Defining INHIBIT_SITE_MODULES
13096 EOF
13097 cat >> confdefs.h <<\EOF
13098 #define INHIBIT_SITE_MODULES 1
13099 EOF
13100 }
13101
13102 fi
13103
13104
13105 T=""
13106 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13107 ac_configure_args="$T"
13108
13109 { test "$extra_verbose" = "yes" && cat << EOF
13110     Defining EMACS_CONFIGURATION = "$canonical"
13111 EOF
13112 cat >> confdefs.h <<EOF
13113 #define EMACS_CONFIGURATION "$canonical"
13114 EOF
13115 }
13116
13117 { test "$extra_verbose" = "yes" && cat << EOF
13118     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13119 EOF
13120 cat >> confdefs.h <<EOF
13121 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13122 EOF
13123 }
13124
13125 { test "$extra_verbose" = "yes" && cat << EOF
13126     Defining config_machfile = "$machfile"
13127 EOF
13128 cat >> confdefs.h <<EOF
13129 #define config_machfile "$machfile"
13130 EOF
13131 }
13132
13133 { test "$extra_verbose" = "yes" && cat << EOF
13134     Defining config_opsysfile = "$opsysfile"
13135 EOF
13136 cat >> confdefs.h <<EOF
13137 #define config_opsysfile "$opsysfile"
13138 EOF
13139 }
13140
13141
13142
13143 null_string=""
13144 { test "$extra_verbose" = "yes" && cat << EOF
13145     Defining LD_SWITCH_X_SITE = $null_string
13146 EOF
13147 cat >> confdefs.h <<EOF
13148 #define LD_SWITCH_X_SITE $null_string
13149 EOF
13150 }
13151
13152 { test "$extra_verbose" = "yes" && cat << EOF
13153     Defining LD_SWITCH_X_SITE_AUX = $null_string
13154 EOF
13155 cat >> confdefs.h <<EOF
13156 #define LD_SWITCH_X_SITE_AUX $null_string
13157 EOF
13158 }
13159
13160 { test "$extra_verbose" = "yes" && cat << EOF
13161     Defining C_SWITCH_X_SITE = $null_string
13162 EOF
13163 cat >> confdefs.h <<EOF
13164 #define C_SWITCH_X_SITE $null_string
13165 EOF
13166 }
13167
13168 { test "$extra_verbose" = "yes" && cat << EOF
13169     Defining LD_SWITCH_SITE = $null_string
13170 EOF
13171 cat >> confdefs.h <<EOF
13172 #define LD_SWITCH_SITE $null_string
13173 EOF
13174 }
13175
13176 { test "$extra_verbose" = "yes" && cat << EOF
13177     Defining C_SWITCH_SITE = $null_string
13178 EOF
13179 cat >> confdefs.h <<EOF
13180 #define C_SWITCH_SITE $null_string
13181 EOF
13182 }
13183
13184
13185
13186 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13187     Defining GNU_MALLOC
13188 EOF
13189 cat >> confdefs.h <<\EOF
13190 #define GNU_MALLOC 1
13191 EOF
13192 }
13193
13194 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13195     Defining USE_SYSTEM_MALLOC
13196 EOF
13197 cat >> confdefs.h <<\EOF
13198 #define USE_SYSTEM_MALLOC 1
13199 EOF
13200 }
13201
13202 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13203     Defining USE_DEBUG_MALLOC
13204 EOF
13205 cat >> confdefs.h <<\EOF
13206 #define USE_DEBUG_MALLOC 1
13207 EOF
13208 }
13209
13210                                               { test "$extra_verbose" = "yes" && cat << \EOF
13211     Defining USE_SYSTEM_MALLOC
13212 EOF
13213 cat >> confdefs.h <<\EOF
13214 #define USE_SYSTEM_MALLOC 1
13215 EOF
13216 }
13217
13218 fi
13219 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13220     Defining I18N3
13221 EOF
13222 cat >> confdefs.h <<\EOF
13223 #define I18N3 1
13224 EOF
13225 }
13226
13227 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13228     Defining USE_GCC
13229 EOF
13230 cat >> confdefs.h <<\EOF
13231 #define USE_GCC 1
13232 EOF
13233 }
13234
13235 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13236     Defining EXTERNAL_WIDGET
13237 EOF
13238 cat >> confdefs.h <<\EOF
13239 #define EXTERNAL_WIDGET 1
13240 EOF
13241 }
13242
13243 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13244     Defining NO_DOC_FILE
13245 EOF
13246 cat >> confdefs.h <<\EOF
13247 #define NO_DOC_FILE 1
13248 EOF
13249 }
13250
13251 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13252     Defining PURIFY
13253 EOF
13254 cat >> confdefs.h <<\EOF
13255 #define PURIFY 1
13256 EOF
13257 }
13258
13259 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13260     Defining QUANTIFY
13261 EOF
13262 cat >> confdefs.h <<\EOF
13263 #define QUANTIFY 1
13264 EOF
13265 }
13266
13267 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13268     Defining MAIL_USE_POP
13269 EOF
13270 cat >> confdefs.h <<\EOF
13271 #define MAIL_USE_POP 1
13272 EOF
13273 }
13274
13275 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13276     Defining KERBEROS
13277 EOF
13278 cat >> confdefs.h <<\EOF
13279 #define KERBEROS 1
13280 EOF
13281 }
13282
13283 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13284     Defining HESIOD
13285 EOF
13286 cat >> confdefs.h <<\EOF
13287 #define HESIOD 1
13288 EOF
13289 }
13290
13291 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13292     Defining USE_UNION_TYPE
13293 EOF
13294 cat >> confdefs.h <<\EOF
13295 #define USE_UNION_TYPE 1
13296 EOF
13297 }
13298
13299
13300
13301 (
13302 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13303 else
13304   echo "uname -a: `uname -a`"
13305 fi
13306 echo ""
13307 echo "$0 $quoted_arguments"
13308 ) > Installation
13309
13310 if test ! -z ${emacs_beta_version} ; then
13311   if test -z "${emacs_is_beta}" ; then
13312         xemacs_betaname=".${emacs_beta_version}"
13313   else
13314         xemacs_betaname="-b${emacs_beta_version}"
13315   fi
13316 else
13317   xemacs_betaname=""    
13318 fi
13319
13320 (
13321 echo "
13322
13323 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13324
13325   Where should the build process find the source code?    $srcdir
13326   What installation prefix should install use?            $prefix
13327   What operating system and machine description files should XEmacs use?
13328         \`$opsysfile' and \`$machfile'
13329   What compiler should XEmacs be built with?              $CC $CFLAGS
13330   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13331   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13332   What window system should XEmacs use?                   ${window_system}"
13333 if test "$with_x11" = "yes"; then
13334   echo "  Where do we find X Windows header files?                $x_includes"
13335   echo "  Where do we find X Windows libraries?                   $x_libraries"
13336 fi
13337 if test -n "$site_includes"; then
13338   echo "  Additional header files:                                $site_includes"
13339 fi
13340 if test -n "$site_libraries"; then
13341   echo "  Additional libraries:                                   $site_libraries"
13342 fi
13343 if test -n "$site_prefixes"; then
13344   echo "  Additional prefixes:                                    $site_prefixes"
13345 fi
13346 if test -n "$runpath"; then
13347   echo "  Runtime library search path:                            $runpath"
13348 fi
13349 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13350 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13351 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13352 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13353   echo "  No Xmu; substituting equivalent routines."
13354 fi
13355
13356 if test "$with_xpm" = yes; then
13357   echo "  Compiling in support for XPM images."
13358 elif test "$with_x11" = yes; then
13359   echo "  --------------------------------------------------------------------"
13360   echo "  WARNING: Compiling without XPM support."
13361   if test "$xpm_problem" != ""; then
13362     echo "  Reason: $xpm_problem"
13363   fi
13364   echo "  WARNING: You should strongly consider installing XPM."
13365   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13366   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13367   echo "  --------------------------------------------------------------------"
13368 fi
13369 if test "$with_png" = yes; then
13370   echo "  Compiling in support for PNG image handling."
13371 elif test "$window_system" != "none"; then
13372   echo "  --------------------------------------------------------------------"
13373   echo "  WARNING: Compiling without PNG image support."
13374   if test "$png_problem" != ""; then
13375     echo "  Reason: $png_problem"
13376   fi
13377   echo "  WARNING: You should strongly consider installing the PNG libraries."
13378   echo "  WARNING: Otherwise certain images and glyphs may not display."
13379   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13380   echo "  --------------------------------------------------------------------"
13381 fi
13382 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
13383 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
13384 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
13385 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
13386 case "$with_sound" in
13387   nas    ) echo "  Compiling in network sound (NAS) support." ;;
13388   native ) echo "  Compiling in native sound support." ;;
13389   both   ) echo "  Compiling in both network and native sound support." ;;
13390 esac
13391 test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously."
13392
13393 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
13394 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
13395 test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
13396
13397 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
13398
13399 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
13400 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
13401
13402 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
13403 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
13404 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
13405 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
13406 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
13407 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
13408 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
13409 if test "$with_wnn" = yes; then
13410   echo "  Compiling in support for the WNN input method on Mule."
13411   test "$with_wnn6" = yes && echo "    Using WNN version 6."
13412 fi
13413 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
13414
13415 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
13416 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
13417 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
13418 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
13419 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
13420 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
13421 case "$with_menubars" in
13422   lucid ) echo "  Using Lucid menubars." ;;
13423   motif ) echo "  Using Motif menubars."
13424           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
13425           echo "             We recommend using the Lucid menubar instead."
13426           echo "             Re-run configure with --with-menubars='lucid'." ;;
13427 esac
13428 case "$with_scrollbars" in
13429   lucid    ) echo "  Using Lucid scrollbars."     ;;
13430   motif    ) echo "  Using Motif scrollbars."     ;;
13431   athena   ) echo "  Using Athena scrollbars."    ;;
13432   athena3d ) echo "  Using Athena-3d scrollbars." ;;
13433 esac
13434 case "$with_dialogs" in
13435   motif    )
13436     echo "  Using Motif dialog boxes."
13437     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
13438       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
13439       echo "             We recommend using the Athena dialog boxes instead."
13440       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
13441       echo "             Read the PROBLEMS file for more information."
13442     fi; fi
13443     ;;
13444   athena   ) echo "  Using Athena dialog boxes."    ;;
13445   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
13446 esac
13447 test "$with_shlib" = "yes" && echo "  Compiling in DLL support."
13448 test "$with_clash_detection" = yes && \
13449   echo "  Clash detection will use \"$lockdir\" for locking files."
13450 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
13451 test "$with_pop"        = yes && echo "  Using POP for mail access."
13452 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
13453 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
13454 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
13455 test "$debug"              = yes && echo "  Compiling in extra code for debugging."
13456 test "$usage_tracking"     = yes && echo "  Compiling with usage tracking active (Sun internal)."
13457 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
13458   != "no no no no no"; then
13459   echo "  WARNING: ---------------------------------------------------------"
13460   echo "  WARNING: Compiling in support for runtime error checking."
13461   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
13462   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
13463   echo "  WARNING: ---------------------------------------------------------"
13464 fi
13465 echo ""
13466 ) | tee -a Installation
13467 echo ""
13468
13469
13470 # Remove any trailing slashes in these variables.
13471 test -n "$prefix" &&
13472   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13473 test -n "$exec_prefix" &&
13474   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13475
13476
13477 for file in $internal_makefile_list; do
13478   test "$file" = src/Makefile.in && \
13479     file="src/Makefile.in:src/Makefile.in.in:src/depend"
13480   ac_output_files="${ac_output_files+$ac_output_files }$file"
13481 done
13482 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
13483 if test "$with_shlib" = "yes"; then
13484   ac_output_files="$ac_output_files lib-src/ellcc.h"
13485 fi
13486
13487 trap '' 1 2 15
13488
13489 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13490
13491 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13492 # Let make expand exec_prefix.
13493 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13494
13495 # Any assignment to VPATH causes Sun make to only execute
13496 # the first set of double-colon rules, so remove it if not needed.
13497 # If there is a colon in the path, we need to keep it.
13498 if test "x$srcdir" = x.; then
13499   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13500 fi
13501
13502 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13503
13504 DEFS=-DHAVE_CONFIG_H
13505
13506 # Without the "./", some shells look in PATH for config.status.
13507 : ${CONFIG_STATUS=./config.status}
13508
13509 echo creating $CONFIG_STATUS
13510 rm -f $CONFIG_STATUS
13511 cat > $CONFIG_STATUS <<EOF
13512 #! /bin/sh
13513 # Generated automatically by configure.
13514 # Run this file to recreate the current configuration.
13515 # This directory was configured as follows,
13516 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13517 #
13518 # $0 $ac_configure_args
13519 #
13520 # Compiler output produced by configure, useful for debugging
13521 # configure, is in ./config.log if it exists.
13522
13523 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13524 for ac_option
13525 do
13526   case "\$ac_option" in
13527   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13528     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13529     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13530   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13531     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13532     exit 0 ;;
13533   -help | --help | --hel | --he | --h)
13534     echo "\$ac_cs_usage"; exit 0 ;;
13535   *) echo "\$ac_cs_usage"; exit 1 ;;
13536   esac
13537 done
13538
13539 ac_given_srcdir=$srcdir
13540 ac_given_INSTALL="$INSTALL"
13541
13542 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13543 EOF
13544 cat >> $CONFIG_STATUS <<EOF
13545
13546 # Protect against being on the right side of a sed subst in config.status.
13547 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13548  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13549 $ac_vpsub
13550 $extrasub
13551 s%@SHELL@%$SHELL%g
13552 s%@CFLAGS@%$CFLAGS%g
13553 s%@CPPFLAGS@%$CPPFLAGS%g
13554 s%@CXXFLAGS@%$CXXFLAGS%g
13555 s%@FFLAGS@%$FFLAGS%g
13556 s%@DEFS@%$DEFS%g
13557 s%@LDFLAGS@%$LDFLAGS%g
13558 s%@LIBS@%$LIBS%g
13559 s%@exec_prefix@%$exec_prefix%g
13560 s%@prefix@%$prefix%g
13561 s%@program_transform_name@%$program_transform_name%g
13562 s%@bindir@%$bindir%g
13563 s%@sbindir@%$sbindir%g
13564 s%@libexecdir@%$libexecdir%g
13565 s%@datadir@%$datadir%g
13566 s%@sysconfdir@%$sysconfdir%g
13567 s%@sharedstatedir@%$sharedstatedir%g
13568 s%@localstatedir@%$localstatedir%g
13569 s%@libdir@%$libdir%g
13570 s%@includedir@%$includedir%g
13571 s%@oldincludedir@%$oldincludedir%g
13572 s%@infodir@%$infodir%g
13573 s%@mandir@%$mandir%g
13574 s%@LN_S@%$LN_S%g
13575 s%@blddir@%$blddir%g
13576 s%@CC@%$CC%g
13577 s%@CPP@%$CPP%g
13578 s%@start_flags@%$start_flags%g
13579 s%@ld_switch_shared@%$ld_switch_shared%g
13580 s%@start_files@%$start_files%g
13581 s%@ld@%$ld%g
13582 s%@lib_gcc@%$lib_gcc%g
13583 s%@RANLIB@%$RANLIB%g
13584 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13585 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13586 s%@INSTALL_DATA@%$INSTALL_DATA%g
13587 s%@YACC@%$YACC%g
13588 s%@SET_MAKE@%$SET_MAKE%g
13589 s%@X_CFLAGS@%$X_CFLAGS%g
13590 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
13591 s%@X_LIBS@%$X_LIBS%g
13592 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
13593 s%@install_pp@%$install_pp%g
13594 s%@libs_xauth@%$libs_xauth%g
13595 s%@dnd_objs@%$dnd_objs%g
13596 s%@lwlib_objs@%$lwlib_objs%g
13597 s%@ALLOCA@%$ALLOCA%g
13598 s%@dll_ld@%$dll_ld%g
13599 s%@dll_cflags@%$dll_cflags%g
13600 s%@dll_ldflags@%$dll_ldflags%g
13601 s%@dll_post@%$dll_post%g
13602 s%@dll_ldo@%$dll_ldo%g
13603 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
13604 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
13605 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
13606 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
13607 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
13608 s%@PROGNAME@%$PROGNAME%g
13609 s%@version@%$version%g
13610 s%@configuration@%$configuration%g
13611 s%@canonical@%$canonical%g
13612 s%@srcdir@%$srcdir%g
13613 s%@pkgdir@%$pkgdir%g
13614 s%@statedir@%$statedir%g
13615 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
13616 s%@PREFIX@%$PREFIX%g
13617 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
13618 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
13619 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
13620 s%@INFODIR@%$INFODIR%g
13621 s%@infopath@%$infopath%g
13622 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
13623 s%@INFOPATH@%$INFOPATH%g
13624 s%@package_path@%$package_path%g
13625 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
13626 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
13627 s%@lispdir@%$lispdir%g
13628 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
13629 s%@LISPDIR@%$LISPDIR%g
13630 s%@moduledir@%$moduledir%g
13631 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
13632 s%@MODULEDIR@%$MODULEDIR%g
13633 s%@sitelispdir@%$sitelispdir%g
13634 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
13635 s%@SITELISPDIR@%$SITELISPDIR%g
13636 s%@sitemoduledir@%$sitemoduledir%g
13637 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
13638 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
13639 s%@etcdir@%$etcdir%g
13640 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
13641 s%@ETCDIR@%$ETCDIR%g
13642 s%@lockdir@%$lockdir%g
13643 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
13644 s%@LOCKDIR@%$LOCKDIR%g
13645 s%@docdir@%$docdir%g
13646 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
13647 s%@DOCDIR@%$DOCDIR%g
13648 s%@archlibdir@%$archlibdir%g
13649 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
13650 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
13651 s%@bitmapdir@%$bitmapdir%g
13652 s%@extra_objs@%$extra_objs%g
13653 s%@machfile@%$machfile%g
13654 s%@opsysfile@%$opsysfile%g
13655 s%@c_switch_general@%$c_switch_general%g
13656 s%@c_switch_window_system@%$c_switch_window_system%g
13657 s%@c_switch_all@%$c_switch_all%g
13658 s%@ld_switch_general@%$ld_switch_general%g
13659 s%@ld_switch_window_system@%$ld_switch_window_system%g
13660 s%@ld_switch_all@%$ld_switch_all%g
13661 s%@ld_libs_general@%$ld_libs_general%g
13662 s%@ld_libs_window_system@%$ld_libs_window_system%g
13663 s%@ld_libs_all@%$ld_libs_all%g
13664 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
13665 s%@native_sound_lib@%$native_sound_lib%g
13666 s%@sound_cflags@%$sound_cflags%g
13667 s%@dynodump_arch@%$dynodump_arch%g
13668 s%@XEMACS_CC@%$XEMACS_CC%g
13669 s%@internal_makefile_list@%$internal_makefile_list%g
13670
13671 CEOF
13672 EOF
13673
13674 cat >> $CONFIG_STATUS <<\EOF
13675
13676 # Split the substitutions into bite-sized pieces for seds with
13677 # small command number limits, like on Digital OSF/1 and HP-UX.
13678 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13679 ac_file=1 # Number of current file.
13680 ac_beg=1 # First line for current file.
13681 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13682 ac_more_lines=:
13683 ac_sed_cmds=""
13684 while $ac_more_lines; do
13685   if test $ac_beg -gt 1; then
13686     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13687   else
13688     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13689   fi
13690   if test ! -s conftest.s$ac_file; then
13691     ac_more_lines=false
13692     rm -f conftest.s$ac_file
13693   else
13694     if test -z "$ac_sed_cmds"; then
13695       ac_sed_cmds="sed -f conftest.s$ac_file"
13696     else
13697       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13698     fi
13699     ac_file=`expr $ac_file + 1`
13700     ac_beg=$ac_end
13701     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13702   fi
13703 done
13704 if test -z "$ac_sed_cmds"; then
13705   ac_sed_cmds=cat
13706 fi
13707 EOF
13708
13709 cat >> $CONFIG_STATUS <<EOF
13710
13711 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
13712 EOF
13713 cat >> $CONFIG_STATUS <<\EOF
13714 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13715   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13716   case "$ac_file" in
13717   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13718        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13719   *) ac_file_in="${ac_file}.in" ;;
13720   esac
13721
13722   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13723
13724   # Remove last slash and all that follows it.  Not all systems have dirname.
13725   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13726   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13727     # The file is in a subdirectory.
13728     test ! -d "$ac_dir" && mkdir "$ac_dir"
13729     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13730     # A "../" for each directory in $ac_dir_suffix.
13731     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13732   else
13733     ac_dir_suffix= ac_dots=
13734   fi
13735
13736   case "$ac_given_srcdir" in
13737   .)  srcdir=.
13738       if test -z "$ac_dots"; then top_srcdir=.
13739       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13740   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13741   *) # Relative path.
13742     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13743     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13744   esac
13745
13746   case "$ac_given_INSTALL" in
13747   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13748   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13749   esac
13750
13751   echo creating "$ac_file"
13752   rm -f "$ac_file"
13753   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13754   case "$ac_file" in
13755   *Makefile*) ac_comsub="1i\\
13756 # $configure_input" ;;
13757   *) ac_comsub= ;;
13758   esac
13759
13760   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13761   sed -e "$ac_comsub
13762 s%@configure_input@%$configure_input%g
13763 s%@srcdir@%$srcdir%g
13764 s%@top_srcdir@%$top_srcdir%g
13765 s%@INSTALL@%$INSTALL%g
13766 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13767 fi; done
13768 rm -f conftest.s*
13769
13770 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13771 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13772 #
13773 # ac_d sets the value in "#define NAME VALUE" lines.
13774 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13775 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13776 ac_dC='\3'
13777 ac_dD='%g'
13778 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13779 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13780 ac_uB='\([      ]\)%\1#\2define\3'
13781 ac_uC=' '
13782 ac_uD='\4%g'
13783 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13784 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13785 ac_eB='$%\1#\2define\3'
13786 ac_eC=' '
13787 ac_eD='%g'
13788
13789 if test "${CONFIG_HEADERS+set}" != set; then
13790 EOF
13791 cat >> $CONFIG_STATUS <<EOF
13792   CONFIG_HEADERS="src/config.h lwlib/config.h"
13793 EOF
13794 cat >> $CONFIG_STATUS <<\EOF
13795 fi
13796 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13797   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13798   case "$ac_file" in
13799   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13800        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13801   *) ac_file_in="${ac_file}.in" ;;
13802   esac
13803
13804   echo creating $ac_file
13805
13806   rm -f conftest.frag conftest.in conftest.out
13807   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13808   cat $ac_file_inputs > conftest.in
13809
13810 EOF
13811
13812 # Transform confdefs.h into a sed script conftest.vals that substitutes
13813 # the proper values into config.h.in to produce config.h.  And first:
13814 # Protect against being on the right side of a sed subst in config.status.
13815 # Protect against being in an unquoted here document in config.status.
13816 rm -f conftest.vals
13817 cat > conftest.hdr <<\EOF
13818 s/[\\&%]/\\&/g
13819 s%[\\$`]%\\&%g
13820 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13821 s%ac_d%ac_u%gp
13822 s%ac_u%ac_e%gp
13823 EOF
13824 sed -n -f conftest.hdr confdefs.h > conftest.vals
13825 rm -f conftest.hdr
13826
13827 # This sed command replaces #undef with comments.  This is necessary, for
13828 # example, in the case of _POSIX_SOURCE, which is predefined and required
13829 # on some systems where configure will not decide to define it.
13830 cat >> conftest.vals <<\EOF
13831 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13832 EOF
13833
13834 # Break up conftest.vals because some shells have a limit on
13835 # the size of here documents, and old seds have small limits too.
13836
13837 rm -f conftest.tail
13838 while :
13839 do
13840   ac_lines=`grep -c . conftest.vals`
13841   # grep -c gives empty output for an empty file on some AIX systems.
13842   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13843   # Write a limited-size here document to conftest.frag.
13844   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13845   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13846   echo 'CEOF
13847   sed -f conftest.frag conftest.in > conftest.out
13848   rm -f conftest.in
13849   mv conftest.out conftest.in
13850 ' >> $CONFIG_STATUS
13851   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13852   rm -f conftest.vals
13853   mv conftest.tail conftest.vals
13854 done
13855 rm -f conftest.vals
13856
13857 cat >> $CONFIG_STATUS <<\EOF
13858   rm -f conftest.frag conftest.h
13859   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13860   cat conftest.in >> conftest.h
13861   rm -f conftest.in
13862   if cmp -s $ac_file conftest.h 2>/dev/null; then
13863     echo "$ac_file is unchanged"
13864     rm -f conftest.h
13865   else
13866     # Remove last slash and all that follows it.  Not all systems have dirname.
13867       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13868       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13869       # The file is in a subdirectory.
13870       test ! -d "$ac_dir" && mkdir "$ac_dir"
13871     fi
13872     rm -f $ac_file
13873     mv conftest.h $ac_file
13874   fi
13875 fi; done
13876
13877 EOF
13878 cat >> $CONFIG_STATUS <<EOF
13879 CPP="$CPP"
13880  top_srcdir="$srcdir"
13881  MAKE_SUBDIR="$MAKE_SUBDIR"
13882
13883 EOF
13884 cat >> $CONFIG_STATUS <<\EOF
13885 for dir in . $MAKE_SUBDIR; do
13886   (
13887     cd $dir
13888     rm -f junk.c
13889     < Makefile.in \
13890       sed -e '/^# Generated/d' \
13891           -e 's%/\*\*/#.*%%' \
13892           -e 's/^ *# */#/' \
13893           -e '/^##/d' \
13894           -e '/^#/ {
13895 p
13896 d
13897 }'        \
13898           -e '/./ {
13899 s/\([\"]\)/\\\1/g
13900 s/^/"/
13901 s/$/"/
13902 }'  > junk.c;
13903
13904
13905
13906     echo creating $dir/Makefile
13907 $CPP -I. -I${top_srcdir}/src  junk.c \
13908   | sed -e 's/^\#.*//'          \
13909         -e 's/^[        ][      ]*$//'\
13910         -e 's/^ /       /'              \
13911   | sed -n -e '/^..*$/p'        \
13912   | sed '/^\"/ {
13913         s/\\\([\"]\)/\1/g
13914         s/^[    ]*\"//
13915         s/\"[   ]*$//
13916 }' > Makefile.new
13917     chmod 444 Makefile.new
13918     mv -f Makefile.new Makefile
13919
13920     echo creating $dir/GNUmakefile
13921 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
13922   | sed -e 's/^\#.*//'          \
13923         -e 's/^[        ][      ]*$//'\
13924         -e 's/^ /       /'              \
13925   | sed -n -e '/^..*$/p'        \
13926   | sed '/^\"/ {
13927         s/\\\([\"]\)/\1/g
13928         s/^[    ]*\"//
13929         s/\"[   ]*$//
13930 }' > Makefile.new
13931     chmod 444 Makefile.new
13932     mv -f Makefile.new GNUmakefile
13933
13934     rm -f junk.c
13935   )
13936 done
13937
13938 sed < config.status >> lib-src/config.values \
13939   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
13940   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
13941   -e 's/^\([^ ]*\) $/\1 ""/' \
13942   -e 's/ 1$/ t/'
13943
13944
13945 exit 0
13946 EOF
13947 chmod +x $CONFIG_STATUS
13948 rm -fr confdefs* $ac_clean_files
13949 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1