XEmacs 21.2.24 "Hecate".
[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 inststaticdir='${PROGNAME}'
231 instvardir='${PROGNAME}-${version}'
232 infodir='${datadir}/${instvardir}/info'
233 infopath=''
234 install_pp=''
235 lispdir='${datadir}/${instvardir}/lisp'
236 moduledir='${datadir}/${instvardir}/${configuration}/modules'
237 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
238 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
239 pkgdir='${datadir}/${instvardir}/lisp'
240 package_path=''
241 etcdir='${datadir}/${instvardir}/etc'
242 lockdir='${statedir}/${inststaticdir}/lock'
243 archlibdir='${datadir}/${instvardir}/${configuration}'
244 docdir='${archlibdir}'
245 with_prefix='yes'
246 with_site_lisp='no'
247 with_site_modules='yes'
248 with_menubars=''
249 with_scrollbars=''
250 with_widgets=''
251 with_dialogs=''
252 with_file_coding=''
253 cpp='' cppflags='' libs='' ldflags=''
254 dynamic=''
255 with_x11=''
256 with_msw=''
257 rel_alloc='default'
258 with_system_malloc='default'
259 with_dlmalloc='default'
260 native_sound_lib=''
261 use_assertions="yes"
262 with_toolbars=""
263 with_tty=""
264 use_union_type="no"
265 with_dnet=""
266 pdump="no"
267
268
269
270
271 arguments="$@"
272
273 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
274 quoted_arguments=
275 for i in "$@"; do
276    case "$i" in
277    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
278    | --no-cr | --no-c) ;;
279    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
280    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
281    *)
282    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
283    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
284    esac
285 done
286
287 while test $# != 0; do
288   arg="$1"; shift
289   case "$arg" in
290     --no-create|--no-recursion) ;;
291         -* )
292             case "$arg" in
293         -*=*)
294           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
295           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
296           valomitted=no
297         ;;
298                                                                           -*)
299                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
300           val="yes" valomitted=yes
301         ;;
302       esac
303
304             optname="$opt"
305       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
306
307             case "${valomitted}-${opt}" in yes-without_* )
308         opt=`echo $opt | sed 's/without/with/'`
309         valomitted="no" val="no" ;;
310       esac
311
312             case "$opt" in
313
314         with_site_lisp  | \
315         with_prefix     | \
316         with_site_modules | \
317         with_x          | \
318         with_x11        | \
319         with_msw        | \
320         with_gcc        | \
321         dynamic         | \
322         with_ncurses    | \
323         with_dnet       | \
324         with_socks      | \
325         with_dragndrop  | \
326         with_cde        | \
327         with_offix      | \
328         with_gpm        | \
329         with_xpm        | \
330         with_xface      | \
331         with_gif        | \
332         with_jpeg       | \
333         with_png        | \
334         with_tiff       | \
335         with_wmcommand  | \
336         with_xmu        | \
337         with_purify     | \
338         with_quantify   | \
339         with_toolbars   | \
340         with_tty        | \
341         with_xfs        | \
342         with_i18n3      | \
343         with_mule       | \
344         with_file_coding| \
345         with_canna      | \
346         with_wnn        | \
347         with_wnn6       | \
348         with_workshop   | \
349         with_sparcworks | \
350         with_tooltalk   | \
351         with_ldap       | \
352         with_pop        | \
353         with_kerberos   | \
354         with_hesiod     | \
355         with_dnet       | \
356         with_infodock   | \
357         external_widget | \
358         verbose         | \
359         extra_verbose   | \
360         const_is_losing | \
361         usage_tracking  | \
362         use_union_type  | \
363         pdump           | \
364         debug           | \
365         use_assertions  | \
366         memory_usage_stats | \
367         with_clash_detection | \
368         with_modules | \
369         no_doc_file )
370                   case "$val" in
371             y | ye | yes )      val=yes ;;
372             n | no )            val=no  ;;
373             * ) (echo "$progname: Usage error:"
374 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
375 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
376           esac
377           eval "$opt=\"$val\"" ;;
378
379
380                         srcdir          | \
381         compiler        | \
382         cflags          | \
383         cpp             | \
384         cppflags        | \
385         libs            | \
386         ldflags         | \
387         cache_file      | \
388         native_sound_lib| \
389         site_lisp       | \
390         x_includes      | \
391         x_libraries     | \
392         site_includes   | \
393         site_libraries  | \
394         site_prefixes   | \
395         site_runtime_libraries )
396                   if test "$valomitted" = "yes" ; then
397                     if test "$#" = 0 ; then
398               (echo "$progname: Usage error:"
399 echo " " "The \`--$optname' option requires a value."
400 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
401             fi
402             val="$1"; shift
403           fi
404           eval "$opt=\"$val\""
405         ;;
406
407                 rel_alloc | \
408         with_dlmalloc | \
409         with_debug_malloc  | use_debug_malloc | \
410         with_system_malloc | use_system_malloc )
411           case "$val" in
412             y | ye | yes )      val=yes ;;
413             n | no )            val=no  ;;
414             d | de | def | defa | defau | defaul | default ) val=default ;;
415             * ) (echo "$progname: Usage error:"
416 echo " " "The \`--$optname' option requires one of these values:
417   \`yes', \`no', or \`default'."
418 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
419           esac
420           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
421           eval "$opt=\"$val\""
422         ;;
423
424                 "with_database" )
425           with_database_berkdb=no
426           with_database_dbm=no
427           with_database_gdbm=no
428           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
429             case "$x" in
430               no ) ;;
431               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
432               d | db | dbm )                               with_database_dbm=yes    ;;
433               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
434               * ) (echo "$progname: Usage error:"
435 echo " " "The \`--$optname' option value
436   must be either \`no' or a comma-separated list
437   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
438 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
439             esac
440           done
441           if test "$with_database_dbm"  = "yes" -a \
442                   "$with_database_gdbm" = "yes"; then
443           (echo "$progname: Usage error:"
444 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
445   with the \`--$optname' option."
446 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
447           fi
448         ;;
449
450                 "with_sound" )
451                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
452             case "$x" in
453                       n | no | non | none ) new_sdefault=no ;;
454               a | al | all | both ) new_sdefault=yes ;;
455
456               native )       with_native_sound=yes ;;
457               nonative )     with_native_sound=no ;;
458
459               nas )          with_nas_sound=yes ;;
460               nonas )        with_nas_sound=no ;;
461
462               esd )          with_esd_sound=yes ;;
463               noesd )        with_esd_sound=no ;;
464
465               * ) bogus_sound=yes ;;
466             esac
467             if test "$bogus_sound" -o \
468                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
469                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
470                 (echo "$progname: Usage error:"
471 echo " " "Valid types for the \`--$optname' option are:
472   $types.
473 The default is to autodetect all sound support."
474 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
475             elif test -n "$new_sdefault" ; then
476                 with_native_sound=$new_sdefault
477                 with_nas_sound=$new_sdefault
478                 with_esd_sound=$new_sdefault
479                 new_sdefault=   # reset this
480             fi
481             sound_notfirst=true
482           done
483         ;;
484
485                 "with_xim" )
486           case "$val" in
487             y | ye | yes )                val=yes   ;;
488             n | no | non | none )         val=no    ;;
489             x | xl | xli | xlib )         val=xlib  ;;
490             m | mo | mot | moti | motif ) val=motif ;;
491             * ) (echo "$progname: Usage error:"
492 echo " " "The \`--$optname' option must have one of these values:
493   \`motif', \`xlib', \`yes', or \`no'."
494 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
495           esac
496           eval "$opt=\"$val\""
497         ;;
498
499                 "mail_locking" )
500           case "$val" in
501             lockf )     val=lockf ;;
502             flock )     val=flock ;;
503             file )      val=file  ;;
504             * ) (echo "$progname: Usage error:"
505 echo " " "The \`--$optname' option must have one of these values:
506   \`lockf', \`flock', or \`file'."
507 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
508           esac
509           eval "$opt=\"$val\""
510         ;;
511
512                 "error_checking" )
513                           
514           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
515             case "$x" in
516                       n | no | non | none ) new_default=no ;;
517               a | al | all )        new_default=yes ;;
518
519               extents )       error_check_extents=yes ;;
520               noextents )     error_check_extents=no ;;
521
522               typecheck )     error_check_typecheck=yes ;;
523               notypecheck )   error_check_typecheck=no ;;
524
525               bufpos )        error_check_bufpos=yes ;;
526               nobufpos )      error_check_bufpos=no ;;
527
528               gc )            error_check_gc=yes ;;
529               nogc )          error_check_gc=no ;;
530
531               malloc )        error_check_malloc=yes ;;
532               nomalloc )      error_check_malloc=no ;;
533
534               byte_code )     error_check_byte_code=yes ;;
535               nobyte_code )   error_check_byte_code=no ;;
536
537               * ) bogus_error_check=yes ;;
538             esac
539             if test "$bogus_error_check" -o \
540                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
541                 if test "$error_check_default" = yes ; then
542                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
543                 else
544                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
545                 fi
546                 (echo "$progname: Usage error:"
547 echo " " "Valid types for the \`--$optname' option are:
548   $types."
549 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
550             elif test -n "$new_default" ; then
551                 error_check_extents=$new_default
552                 error_check_typecheck=$new_default
553                 error_check_bufpos=$new_default
554                 error_check_gc=$new_default
555                 error_check_malloc=$new_default
556                 error_check_byte_code=$new_default
557                 new_default=    # reset this
558             fi
559             echeck_notfirst=true
560           done
561         ;;
562
563                                 
564                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
565         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
566         archlibdir | docdir | package_path )
567                    if test "$valomitted" = "yes"; then
568              if test "$#" = 0; then
569                  (echo "$progname: Usage error:"
570 echo " " "The \`--$optname' option requires a value."
571 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
572              fi
573              val="$1"; shift
574            fi
575            eval "$opt=\"$val\""
576
577                            case "$opt" in
578                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
579     Defining EXEC_PREFIX_USER_DEFINED
580 EOF
581 cat >> confdefs.h <<\EOF
582 #define EXEC_PREFIX_USER_DEFINED 1
583 EOF
584 }
585  ;;
586              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
587     Defining LISPDIR_USER_DEFINED
588 EOF
589 cat >> confdefs.h <<\EOF
590 #define LISPDIR_USER_DEFINED 1
591 EOF
592 }
593  ;;
594              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
595     Defining SITELISPDIR_USER_DEFINED
596 EOF
597 cat >> confdefs.h <<\EOF
598 #define SITELISPDIR_USER_DEFINED 1
599 EOF
600 }
601  ;;
602              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
603     Defining MODULEDIR_USER_DEFINED
604 EOF
605 cat >> confdefs.h <<\EOF
606 #define MODULEDIR_USER_DEFINED 1
607 EOF
608 }
609  ;;
610              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
611     Defining ETCDIR_USER_DEFINED
612 EOF
613 cat >> confdefs.h <<\EOF
614 #define ETCDIR_USER_DEFINED 1
615 EOF
616 }
617  ;;
618              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
619     Defining INFODIR_USER_DEFINED
620 EOF
621 cat >> confdefs.h <<\EOF
622 #define INFODIR_USER_DEFINED 1
623 EOF
624 }
625  ;;
626              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
627     Defining INFOPATH_USER_DEFINED
628 EOF
629 cat >> confdefs.h <<\EOF
630 #define INFOPATH_USER_DEFINED 1
631 EOF
632 }
633  ;;
634              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
635     Defining PACKAGE_PATH_USER_DEFINED
636 EOF
637 cat >> confdefs.h <<\EOF
638 #define PACKAGE_PATH_USER_DEFINED 1
639 EOF
640 }
641  ;;
642              datadir )
643                 { test "$extra_verbose" = "yes" && cat << \EOF
644     Defining INFODIR_USER_DEFINED
645 EOF
646 cat >> confdefs.h <<\EOF
647 #define INFODIR_USER_DEFINED 1
648 EOF
649 }
650
651                 { test "$extra_verbose" = "yes" && cat << \EOF
652     Defining LISPDIR_USER_DEFINED
653 EOF
654 cat >> confdefs.h <<\EOF
655 #define LISPDIR_USER_DEFINED 1
656 EOF
657 }
658
659             { test "$extra_verbose" = "yes" && cat << \EOF
660     Defining MODULEDIR_USER_DEFINED
661 EOF
662 cat >> confdefs.h <<\EOF
663 #define MODULEDIR_USER_DEFINED 1
664 EOF
665 }
666
667                 { test "$extra_verbose" = "yes" && cat << \EOF
668     Defining ETCDIR_USER_DEFINED
669 EOF
670 cat >> confdefs.h <<\EOF
671 #define ETCDIR_USER_DEFINED 1
672 EOF
673 }
674  ;;
675              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
676     Defining LOCKDIR_USER_DEFINED
677 EOF
678 cat >> confdefs.h <<\EOF
679 #define LOCKDIR_USER_DEFINED 1
680 EOF
681 }
682  ;;
683              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
684     Defining DOCDIR_USER_DEFINED
685 EOF
686 cat >> confdefs.h <<\EOF
687 #define DOCDIR_USER_DEFINED 1
688 EOF
689 }
690  ;;
691              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
692     Defining ARCHLIBDIR_USER_DEFINED
693 EOF
694 cat >> confdefs.h <<\EOF
695 #define ARCHLIBDIR_USER_DEFINED 1
696 EOF
697 }
698  ;;
699            esac
700         ;;
701
702                 "no_create" ) ;;
703
704                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
705
706                 "with_menubars"   | \
707         "with_scrollbars" | \
708         "with_dialogs" | \
709         "with_widgets" )
710           case "$val" in
711             l | lu | luc | luci | lucid )               val=lucid  ;;
712             m | mo | mot | moti | motif )               val=motif  ;;
713             athena3d | athena-3d )                      val=athena3d ;;
714             a | at | ath | athe | athen | athena )      val=athena ;;
715             n | no | non | none )                       val=no ;;
716             * ) (echo "$progname: Usage error:"
717 echo " " "The \`--$optname' option must have one of these values:
718   \`lucid', \`motif', \`athena', \`athena3d', or \`no'."
719 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
720           esac
721           eval "$opt=\"$val\""
722         ;;
723
724                 "use_minimal_tagbits" | \
725         "use_indexed_lrecord_implementation" | \
726         "run_in_place"  | \
727         "with_gnu_make" )
728           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
729         ;;
730
731                 * ) (echo "$progname: Usage error:"
732 echo " " "Unrecognized option: $arg"
733 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
734
735       esac
736     ;;
737
738         *-*-*) configuration="$arg" ;;
739
740         *) (echo "$progname: Usage error:"
741 echo " " "Unrecognized argument: $arg"
742 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
743
744   esac
745 done
746
747
748 test -n "$cpp"      && CPP="$cpp"
749 test -n "$cppflags" && CPPFLAGS="$cppflags"
750 test -n "$libs"     && LIBS="$libs"
751 test -n "$ldflags"  && LDFLAGS="$ldflags"
752
753 eval set x "$quoted_arguments"; shift
754
755 test "$extra_verbose" = "yes" && verbose=yes
756
757 test -n "$with_x" && with_x11="$with_x"
758
759 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
760   test "$with_system_malloc" = "default" && with_system_malloc=yes
761 fi
762
763
764
765 if test "$with_cde $with_tooltalk" = "yes no"; then
766   (echo "$progname: Usage error:"
767 echo " " "--with-cde requires --with-tooltalk"
768 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
769 elif test "$with_tooltalk" = "no" ; then with_cde=no
770 elif test "$with_cde" = "yes"; then with_tooltalk=yes
771 fi
772
773
774 case "$srcdir" in
775
776     "" )
777     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
778       if test -f "$dir/src/lisp.h" -a \
779               -f "$dir/lisp/version.el" ; then
780         srcdir="$dir"
781         break
782       fi
783     done
784     if test -z "$srcdir" ; then
785       (echo "$progname: Usage error:"
786 echo " " "Neither the current directory nor its parent seem to
787   contain the XEmacs sources.  If you do not want to build XEmacs in its
788   source tree, you should run \`$progname' in the directory in which
789   you wish to build XEmacs, using the \`--srcdir' option to say where the
790   sources may be found."
791 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
792     fi
793   ;;
794
795     * )
796     if test ! -f "$srcdir/src/lisp.h" -o \
797             ! -f "$srcdir/lisp/version.el" ; then
798       (echo "$progname: Usage error:"
799 echo " " "The directory specified with the \`--srcdir' option,
800   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
801   either run the \`$progname' script at the top of the XEmacs source
802   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
803 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
804     fi
805   ;;
806 esac
807
808 if test -z "$configuration"; then
809     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
810   if test -z "$configuration"; then
811     (echo "$progname: Usage error:"
812 echo " " "XEmacs has not been ported to this host type.
813 Try explicitly specifying the CONFIGURATION when rerunning configure."
814 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
815   fi
816 fi
817
818 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
819 echo "configure:820: checking whether ln -s works" >&5
820
821 rm -f conftestdata
822 if ln -s X conftestdata 2>/dev/null
823 then
824   rm -f conftestdata
825   ac_cv_prog_LN_S="ln -s"
826 else
827   ac_cv_prog_LN_S=ln
828 fi
829 LN_S="$ac_cv_prog_LN_S"
830 if test "$ac_cv_prog_LN_S" = "ln -s"; then
831   echo "$ac_t""yes" 1>&6
832 else
833   echo "$ac_t""no" 1>&6
834 fi
835
836
837 for dir in lisp etc man info; do
838   if test ! -d "$dir" ; then
839     echo Making symbolic link to "$srcdir/$dir"
840     ${LN_S} "$srcdir/$dir" "$dir"
841   fi
842 done
843
844
845 absolute_pwd="`pwd`";
846 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
847 then blddir="$PWD"
848 else blddir="$absolute_pwd"; if test -d "/net"; then
849   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
850   blddir=`echo "$blddir" | \
851    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
852 fi
853 fi
854
855
856 case "$srcdir" in
857   /* ) ;;
858   .  ) srcdir="$blddir" ;;
859   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
860   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
861   srcdir=`echo "$srcdir" | \
862    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
863 fi ;;
864 esac
865
866 if test `pwd` != `sh -c cd $srcdir && pwd`  \
867    && test -f "$srcdir/src/config.h"; then
868   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
869    echo "   as a build directory right now; it has been configured in its own"
870    echo "   right.  To configure in another directory as well, you MUST"
871    echo "   use GNU make.  If you do not have GNU make, then you must"
872    echo "   now do \`make distclean' in $srcdir,"
873    echo "   and then run $progname again.") >&2
874   extrasub='/^VPATH[     ]*=/c\
875 vpath %.c $(srcdir)\
876 vpath %.h $(srcdir)\
877 vpath %.y $(srcdir)\
878 vpath %.l $(srcdir)\
879 vpath %.s $(srcdir)\
880 vpath %.in $(srcdir)'
881 fi
882
883 . "$srcdir/version.sh" || exit 1;
884 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
885 : "${extra_verbose=$beta}"
886 version="${emacs_major_version}.${emacs_minor_version}"
887 { test "$extra_verbose" = "yes" && cat << EOF
888     Defining EMACS_MAJOR_VERSION = $emacs_major_version
889 EOF
890 cat >> confdefs.h <<EOF
891 #define EMACS_MAJOR_VERSION $emacs_major_version
892 EOF
893 }
894
895 { test "$extra_verbose" = "yes" && cat << EOF
896     Defining EMACS_MINOR_VERSION = $emacs_minor_version
897 EOF
898 cat >> confdefs.h <<EOF
899 #define EMACS_MINOR_VERSION $emacs_minor_version
900 EOF
901 }
902
903 if test -n "$emacs_beta_version" ; then
904   if test "$beta" = "yes"; then
905         version="${version}-b${emacs_beta_version}"
906         { test "$extra_verbose" = "yes" && cat << EOF
907     Defining EMACS_BETA_VERSION = $emacs_beta_version
908 EOF
909 cat >> confdefs.h <<EOF
910 #define EMACS_BETA_VERSION $emacs_beta_version
911 EOF
912 }
913
914   else
915         version="${version}.${emacs_beta_version}"
916         { test "$extra_verbose" = "yes" && cat << EOF
917     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
918 EOF
919 cat >> confdefs.h <<EOF
920 #define EMACS_PATCH_LEVEL $emacs_beta_version
921 EOF
922 }
923
924   fi
925 fi
926 { test "$extra_verbose" = "yes" && cat << EOF
927     Defining XEMACS_CODENAME = "$xemacs_codename"
928 EOF
929 cat >> confdefs.h <<EOF
930 #define XEMACS_CODENAME "$xemacs_codename"
931 EOF
932 }
933
934 { test "$extra_verbose" = "yes" && cat << EOF
935     Defining EMACS_VERSION = "$version"
936 EOF
937 cat >> confdefs.h <<EOF
938 #define EMACS_VERSION "$version"
939 EOF
940 }
941
942
943 if test "$with_infodock" = "yes"; then
944   if test ! -f ../../ID-INSTALL; then
945     echo "Cannot build InfoDock without InfoDock sources"
946     with_infodock=no
947   fi
948 fi
949
950 if test "$with_infodock" = "yes"; then
951       { test "$extra_verbose" = "yes" && cat << EOF
952     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
953 EOF
954 cat >> confdefs.h <<EOF
955 #define INFODOCK_MAJOR_VERSION $infodock_major_version
956 EOF
957 }
958
959   { test "$extra_verbose" = "yes" && cat << EOF
960     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
961 EOF
962 cat >> confdefs.h <<EOF
963 #define INFODOCK_MINOR_VERSION $infodock_minor_version
964 EOF
965 }
966
967   { test "$extra_verbose" = "yes" && cat << EOF
968     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
969 EOF
970 cat >> confdefs.h <<EOF
971 #define INFODOCK_BUILD_VERSION $infodock_build_version
972 EOF
973 }
974
975   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
976   PROGNAME=infodock
977   CPPFLAGS="$CPPFLAGS -DINFODOCK"
978 else
979   PROGNAME=xemacs
980 fi
981
982 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
983 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
984     Defining ERROR_CHECK_EXTENTS
985 EOF
986 cat >> confdefs.h <<\EOF
987 #define ERROR_CHECK_EXTENTS 1
988 EOF
989 }
990
991 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
992     Defining ERROR_CHECK_TYPECHECK
993 EOF
994 cat >> confdefs.h <<\EOF
995 #define ERROR_CHECK_TYPECHECK 1
996 EOF
997 }
998
999 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1000     Defining ERROR_CHECK_BUFPOS
1001 EOF
1002 cat >> confdefs.h <<\EOF
1003 #define ERROR_CHECK_BUFPOS 1
1004 EOF
1005 }
1006
1007 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1008     Defining ERROR_CHECK_GC
1009 EOF
1010 cat >> confdefs.h <<\EOF
1011 #define ERROR_CHECK_GC 1
1012 EOF
1013 }
1014
1015 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1016     Defining ERROR_CHECK_MALLOC
1017 EOF
1018 cat >> confdefs.h <<\EOF
1019 #define ERROR_CHECK_MALLOC 1
1020 EOF
1021 }
1022
1023 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1024     Defining ERROR_CHECK_BYTE_CODE
1025 EOF
1026 cat >> confdefs.h <<\EOF
1027 #define ERROR_CHECK_BYTE_CODE 1
1028 EOF
1029 }
1030
1031 if test "${debug:=$beta}" = "yes"; then
1032   use_assertions=yes memory_usage_stats=yes
1033   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1034    echo "    xemacs will be linked with \"debug.o\""
1035  fi
1036   { test "$extra_verbose" = "yes" && cat << \EOF
1037     Defining DEBUG_XEMACS
1038 EOF
1039 cat >> confdefs.h <<\EOF
1040 #define DEBUG_XEMACS 1
1041 EOF
1042 }
1043
1044 fi
1045 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1046     Defining USE_ASSERTIONS
1047 EOF
1048 cat >> confdefs.h <<\EOF
1049 #define USE_ASSERTIONS 1
1050 EOF
1051 }
1052
1053 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1054     Defining MEMORY_USAGE_STATS
1055 EOF
1056 cat >> confdefs.h <<\EOF
1057 #define MEMORY_USAGE_STATS 1
1058 EOF
1059 }
1060
1061
1062
1063 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1064 echo "configure:1065: checking "host system type"" >&5
1065 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1066 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1067 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1068 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1069 echo "$ac_t""$configuration" 1>&6
1070
1071
1072
1073
1074
1075 machine='' opsys=''
1076
1077 case "$canonical" in
1078   sparc-*-*        ) machine=sparc ;;
1079   alpha*-*-*       ) machine=alpha ;;
1080   vax-*-*          ) machine=vax ;;
1081   mips-dec-*       ) machine=pmax ;;
1082   mips-sgi-*       ) machine=iris4d ;;
1083   mips*-linux      ) machine=mips ;;
1084   romp-ibm-*       ) machine=ibmrt ;;
1085   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1086   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1087   powerpc*-*       ) machine=powerpc ;;
1088   hppa-*-*         ) machine=hp800 ;;
1089   m88k-dg-*        ) machine=aviion ;;
1090   m68*-sony-*      ) machine=news ;;
1091   mips-sony-*      ) machine=news-risc ;;
1092   clipper-*        ) machine=clipper ;;
1093   arm-*            ) machine=arm ;;
1094   ns32k-*          ) machine=ns32000 ;;
1095 esac
1096
1097 case "$canonical" in
1098   *-*-linux*    ) opsys=linux ;;
1099   *-*-netbsd*   ) opsys=netbsd ;;
1100   *-*-openbsd*  ) opsys=openbsd ;;
1101   *-*-nextstep* ) opsys=nextstep ;;
1102   *-*-vms       ) opsys=vms ;;
1103
1104     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1105   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1106   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1107   *-dec-osf3*                ) opsys=decosf3-1 ;;
1108   *-dec-osf4*                ) opsys=decosf4-0 ;;
1109
1110     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1111   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1112   *-*-ultrix* )         opsys=ultrix4-3 ;;
1113
1114     *-*-aix3.1*  ) opsys=aix3-1 ;;
1115   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1116   *-*-aix3*    ) opsys=aix3-2   ;;
1117   *-*-aix4.0*  ) opsys=aix4     ;;
1118   *-*-aix4.1*  ) opsys=aix4-1   ;;
1119   *-*-aix4*    ) opsys=aix4-2   ;;
1120
1121     *-gnu* )                    opsys=gnu    ;;
1122   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1123   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1124   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1125   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1126   *-*-aos*   )                  opsys=bsd4-3 ;;
1127   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1128   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1129   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1130   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1131   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1132   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1133         if test -z "$NON_GNU_CPP" ; then
1134           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1135             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1136           done
1137         fi
1138         opsys=usg5-4-2 ;;
1139     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1140     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1141 esac
1142
1143 case "$canonical" in
1144
1145     *-*-netbsd* )
1146     case "$canonical" in
1147       i[3-9]86-*-netbsd*) machine=intel386 ;;
1148       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1149                                             machine=hp9000s300 ;;
1150       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1151       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1152     esac
1153   ;;
1154
1155     *-*-openbsd* )
1156     case "${canonical}" in
1157       i386-*-openbsd*)          machine=intel386 ;;
1158       m68k-*-openbsd*)          machine=hp9000s300 ;;
1159       mipsel-*-openbsd*)        machine=pmax ;;
1160      esac
1161    ;;
1162
1163     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1164   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1165
1166     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1167   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1168
1169     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1170
1171     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1172
1173     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1174
1175     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1176
1177     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1178
1179     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1180   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1181   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1182
1183   
1184     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1185
1186     *-convex-bsd* | *-convex-convexos* )
1187     machine=convex opsys=bsd4-3
1188     NON_GNU_CPP="cc -E -P"
1189   ;;
1190
1191     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1192
1193     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1194   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1195   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1196   m88k-dg-dgux*                           ) opsys=dgux     ;;
1197
1198     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1199   m88k-motorola-sysv4* )
1200                     machine=delta88k opsys=usg5-4-2
1201   ;;
1202   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1203
1204     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1205   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1206
1207     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1208
1209     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1210   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1211   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1212
1213       m88k-harris-cxux* )
1214         case "`uname -r`" in
1215        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1216        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1217     esac
1218     NON_GNU_CPP="/lib/cpp"
1219   ;;
1220     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1221     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1222
1223     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1224
1225     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1226
1227     *-hp-hpux* )
1228         case "$canonical" in
1229       m68*  ) machine=hp9000s300 ;;
1230       hppa* ) machine=hp800      ;;
1231     esac
1232
1233     case "$canonical" in
1234       *-hp-hpux7*  )  opsys=hpux   ;;
1235       *-hp-hpux8*  )  opsys=hpux8  ;;
1236       *-hp-hpux9*  )  opsys=hpux9  ;;
1237       *-hp-hpux10* )  opsys=hpux10 ;;
1238       *-hp-hpux11* )  opsys=hpux11 ;;
1239       *            )  opsys=hpux   ;;
1240     esac
1241
1242         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1243    echo "    xemacs will be linked with \"strcat.o\""
1244  fi ;; esac
1245
1246     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1247         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1248     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1249
1250     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1251   ;;
1252
1253     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1254   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1255
1256     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1257   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1258   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1259   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1260   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1261   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1262
1263     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1264   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1265
1266     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1267
1268     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1269
1270     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1271
1272     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1273
1274       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1275
1276     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1277
1278     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1279
1280     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1281
1282     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1283
1284         mips-mips-usg* ) machine=mips4 ;;
1285   mips-mips-riscos4 )
1286     machine=mips4
1287     NON_GNU_CC="cc -systype bsd43"
1288     NON_GNU_CPP="cc -systype bsd43 -E"
1289     case "$canonical" in
1290       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1291       mips-mips-riscos5* ) opsys=riscos5 ;;
1292     esac
1293   ;;
1294   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1295   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1296
1297     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1298
1299     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1300
1301     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1302   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1303
1304     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1305
1306     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1307
1308     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1309
1310     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1311
1312     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1313   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1314
1315     mips-siemens-sysv* | mips-sni-sysv*)
1316     machine=mips-siemens opsys=usg5-4
1317     NON_GNU_CC=/usr/ccs/bin/cc
1318     NON_GNU_CPP=/usr/ccs/lib/cpp
1319   ;;
1320
1321     mips-nec-sysv*)
1322     machine=mips-nec
1323     NON_GNU_CC=/usr/ccs/bin/cc
1324     NON_GNU_CPP=/usr/ccs/lib/cpp
1325   ;;
1326
1327       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1328   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1329     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1330   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1331   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1332   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1333   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1334   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1335   mips-sgi-irix*      ) opsys=irix5-0 ;;
1336
1337     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1338   *-sony-news* ) opsys=newsos5 ;;
1339
1340     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1341
1342     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1343         case "$canonical" in
1344       m68*-sunos1* )             machine=sun1     ;;
1345       m68*-sunos2* )             machine=sun2     ;;
1346       m68* )                     machine=sun3     ;;
1347       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1348       i*86-*-* )                 machine=intel386 ;;
1349       rs6000* )                  machine=rs6000   ;;
1350     esac
1351
1352         case "$canonical" in *-sunos5*)
1353       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1354     esac
1355
1356                     case "$canonical" in
1357       *-sunos4* )
1358         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1359         : ;;
1360       *-solaris2* )
1361         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1362         RANLIB=':' ;;
1363     esac
1364
1365     case "$canonical" in
1366       *-solaris*          )
1367         opsys=sol2
1368         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1369         { test "$extra_verbose" = "yes" && cat << EOF
1370     Defining OS_RELEASE = $os_release
1371 EOF
1372 cat >> confdefs.h <<EOF
1373 #define OS_RELEASE $os_release
1374 EOF
1375 }
1376  ;;
1377
1378             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1379       *-sunos4.0*         ) opsys=sunos4-0      ;;
1380       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1381       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1382       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1383       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1384       *-mach*             ) opsys=mach-bsd4-3   ;;
1385       *                   ) opsys=bsd4-2        ;;
1386     esac
1387
1388     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1389
1390         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1391   ;;
1392
1393     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1394
1395     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1396   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1397
1398     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1399
1400     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1401
1402     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1403       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1404
1405     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1406
1407     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1408
1409     vax-dec-* )
1410     case "$canonical" in
1411       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1412       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1413       *-mach* )                         opsys=mach-bsd4-3 ;;
1414     esac
1415   ;;
1416
1417     ns16k-whitechapel-* ) machine=mg1 ;;
1418
1419     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1420
1421     i[3-9]86-*-* )
1422     machine=intel386
1423     case "$canonical" in
1424       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1425       *-isc2.2* )               opsys=isc2-2 ;;
1426       *-isc4.0* )               opsys=isc4-0 ;;
1427       *-isc4.* )                opsys=isc4-1
1428                                 GCC_TEST_OPTIONS=-posix
1429                                 NON_GCC_TEST_OPTIONS=-Xp
1430                                 ;;
1431       *-isc* )                  opsys=isc3-0 ;;
1432       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1433       *-esix* )                 opsys=esix ;;
1434       *-mach* )                 opsys=mach-bsd4-3 ;;
1435       *-xenix* )                opsys=xenix ;;
1436       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1437       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1438       *-bsdi4* )                opsys=bsdos4 ;;
1439       *-bsdi3* )                opsys=bsdos3 ;;
1440       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1441       *-bsdi2* )                opsys=bsdos2 ;;
1442       *-sco3.2v5* )             opsys=sco5 ;
1443                                                         if test "$dynamic" = "yes" ; then
1444                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1445         else
1446                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1447         fi ;;
1448       *-sysv5* )                opsys=sco7 ;;
1449       *-386bsd* )               opsys=386bsd ;;
1450       *-freebsd* )              opsys=freebsd ;;
1451       *-nextstep* )             opsys=nextstep ;;
1452       *-pc-cygwin* )            opsys=cygwin32 ;;
1453       *-pc-mingw* )             opsys=mingw32 ;
1454                                 test -z "$with_tty" && with_tty="no";;
1455           esac
1456   ;;
1457
1458     m68k-*-linux* ) machine=m68k opsys=linux ;;
1459
1460 esac
1461
1462 if test -z "$machine" -o -z "$opsys"; then
1463   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1464    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1465   ) >&2
1466   exit 1
1467 fi
1468
1469 if test -z "$dynamic"; then
1470   case "$opsys" in
1471     hpux* | sunos4* ) dynamic=no ;;
1472     *) dynamic=yes ;;
1473   esac
1474 fi
1475 if test "$dynamic" = "yes"; then
1476   case "$opsys" in
1477     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1478     decosf* ) ld_call_shared="-call_shared" ;;
1479   esac
1480 else   case "$opsys" in
1481     sol2 )
1482       echo "Static linking is not supported on Solaris 2."
1483       echo "Rerun configure without specifying --dynamic=no."
1484       exit 1 ;;
1485     linux   ) ld_call_shared="-Bstatic" ;;
1486     decosf* ) ld_call_shared="-non_shared" ;;
1487   esac
1488 fi
1489
1490 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1491
1492 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1493 { test "$extra_verbose" = "yes" && cat << EOF
1494     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1495 EOF
1496 cat >> confdefs.h <<EOF
1497 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1498 EOF
1499 }
1500
1501
1502 machfile="m/${machine}.h"
1503 opsysfile="s/${opsys}.h"
1504
1505
1506 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1507 if test "$with_workshop $with_tooltalk" = "yes no"; then
1508   (echo "$progname: Usage error:"
1509 echo " " "--with-workshop requires --with-tooltalk"
1510 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1511 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1512 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1513 fi
1514
1515 if test "$with_workshop" = "yes"; then
1516   { test "$extra_verbose" = "yes" && cat << \EOF
1517     Defining SUNPRO
1518 EOF
1519 cat >> confdefs.h <<\EOF
1520 #define SUNPRO 1
1521 EOF
1522 }
1523
1524   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1525    echo "    xemacs will be linked with \"sunpro.o\""
1526  fi
1527 fi
1528
1529 if test "$with_clash_detection" = "yes"; then
1530   { test "$extra_verbose" = "yes" && cat << \EOF
1531     Defining CLASH_DETECTION
1532 EOF
1533 cat >> confdefs.h <<\EOF
1534 #define CLASH_DETECTION 1
1535 EOF
1536 }
1537
1538   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1539    echo "    xemacs will be linked with \"filelock.o\""
1540  fi
1541 fi
1542
1543 test -n "$compiler" && CC="$compiler"
1544 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1545 fi
1546
1547 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1548 if test "${CFLAGS-unset}" != unset
1549   then cflags_specified=yes;
1550   else cflags_specified=no;
1551 fi
1552
1553 xe_save_CFLAGS="$CFLAGS"
1554
1555 # Extract the first word of "gcc", so it can be a program name with args.
1556 set dummy gcc; ac_word=$2
1557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1558 echo "configure:1559: checking for $ac_word" >&5
1559
1560 if test -n "$CC"; then
1561   ac_cv_prog_CC="$CC" # Let the user override the test.
1562 else
1563   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
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       ac_cv_prog_CC="gcc"
1569       break
1570     fi
1571   done
1572   IFS="$ac_save_ifs"
1573 fi
1574 CC="$ac_cv_prog_CC"
1575 if test -n "$CC"; then
1576   echo "$ac_t""$CC" 1>&6
1577 else
1578   echo "$ac_t""no" 1>&6
1579 fi
1580
1581 if test -z "$CC"; then
1582   # Extract the first word of "cc", so it can be a program name with args.
1583 set dummy cc; ac_word=$2
1584 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1585 echo "configure:1586: checking for $ac_word" >&5
1586
1587 if test -n "$CC"; then
1588   ac_cv_prog_CC="$CC" # Let the user override the test.
1589 else
1590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1591   ac_prog_rejected=no
1592   ac_dummy="$PATH"
1593   for ac_dir in $ac_dummy; do
1594     test -z "$ac_dir" && ac_dir=.
1595     if test -f $ac_dir/$ac_word; then
1596       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1597         ac_prog_rejected=yes
1598         continue
1599       fi
1600       ac_cv_prog_CC="cc"
1601       break
1602     fi
1603   done
1604   IFS="$ac_save_ifs"
1605 if test $ac_prog_rejected = yes; then
1606   # We found a bogon in the path, so make sure we never use it.
1607   set dummy $ac_cv_prog_CC
1608   shift
1609   if test $# -gt 0; then
1610     # We chose a different compiler from the bogus one.
1611     # However, it has the same basename, so the bogon will be chosen
1612     # first if we set CC to just the basename; use the full file name.
1613     shift
1614     set dummy "$ac_dir/$ac_word" "$@"
1615     shift
1616     ac_cv_prog_CC="$@"
1617   fi
1618 fi
1619 fi
1620 CC="$ac_cv_prog_CC"
1621 if test -n "$CC"; then
1622   echo "$ac_t""$CC" 1>&6
1623 else
1624   echo "$ac_t""no" 1>&6
1625 fi
1626
1627   if test -z "$CC"; then
1628     case "`uname -s`" in
1629     *win32* | *WIN32*)
1630       # Extract the first word of "cl", so it can be a program name with args.
1631 set dummy cl; ac_word=$2
1632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1633 echo "configure:1634: checking for $ac_word" >&5
1634
1635 if test -n "$CC"; then
1636   ac_cv_prog_CC="$CC" # Let the user override the test.
1637 else
1638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1639   ac_dummy="$PATH"
1640   for ac_dir in $ac_dummy; do
1641     test -z "$ac_dir" && ac_dir=.
1642     if test -f $ac_dir/$ac_word; then
1643       ac_cv_prog_CC="cl"
1644       break
1645     fi
1646   done
1647   IFS="$ac_save_ifs"
1648 fi
1649 CC="$ac_cv_prog_CC"
1650 if test -n "$CC"; then
1651   echo "$ac_t""$CC" 1>&6
1652 else
1653   echo "$ac_t""no" 1>&6
1654 fi
1655  ;;
1656     esac
1657   fi
1658   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1659 fi
1660
1661 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1662 echo "configure:1663: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1663
1664 ac_ext=c
1665 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1666 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1667 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1668 ac_cpp='$CPP '"$xe_cppflags"
1669 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1670 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1671 cross_compiling=no
1672
1673 cat > conftest.$ac_ext << EOF
1674
1675 #line 1676 "configure"
1676 #include "confdefs.h"
1677
1678 main(){return(0);}
1679 EOF
1680 if { (eval echo configure:1681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1681   ac_cv_prog_cc_works=yes
1682   # If we can't run a trivial program, we are probably using a cross compiler.
1683   if (./conftest; exit) 2>/dev/null; then
1684     ac_cv_prog_cc_cross=no
1685   else
1686     ac_cv_prog_cc_cross=yes
1687   fi
1688 else
1689   echo "configure: failed program was:" >&5
1690   cat conftest.$ac_ext >&5
1691   ac_cv_prog_cc_works=no
1692 fi
1693 rm -fr conftest*
1694 ac_ext=c
1695 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1696 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1697 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1698 ac_cpp='$CPP '"$xe_cppflags"
1699 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1700 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1701 cross_compiling=no
1702
1703 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1704 if test $ac_cv_prog_cc_works = no; then
1705   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1706 fi
1707 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1708 echo "configure:1709: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1709 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1710 cross_compiling=$ac_cv_prog_cc_cross
1711
1712 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1713 echo "configure:1714: checking whether we are using GNU C" >&5
1714
1715 cat > conftest.c <<EOF
1716 #ifdef __GNUC__
1717   yes;
1718 #endif
1719 EOF
1720 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1721   ac_cv_prog_gcc=yes
1722 else
1723   ac_cv_prog_gcc=no
1724 fi
1725
1726 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1727
1728 if test $ac_cv_prog_gcc = yes; then
1729   GCC=yes
1730 else
1731   GCC=
1732 fi
1733
1734 ac_test_CFLAGS="${CFLAGS+set}"
1735 ac_save_CFLAGS="$CFLAGS"
1736 CFLAGS=
1737 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1738 echo "configure:1739: checking whether ${CC-cc} accepts -g" >&5
1739
1740 echo 'void f(){}' > conftest.c
1741 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1742   ac_cv_prog_cc_g=yes
1743 else
1744   ac_cv_prog_cc_g=no
1745 fi
1746 rm -f conftest*
1747
1748
1749 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1750 if test "$ac_test_CFLAGS" = set; then
1751   CFLAGS="$ac_save_CFLAGS"
1752 elif test $ac_cv_prog_cc_g = yes; then
1753   if test "$GCC" = yes; then
1754     CFLAGS="-g -O2"
1755   else
1756     CFLAGS="-g"
1757   fi
1758 else
1759   if test "$GCC" = yes; then
1760     CFLAGS="-O2"
1761   else
1762     CFLAGS=
1763   fi
1764 fi
1765  
1766 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1767   CC=${NON_GNU_CC-cc}
1768   # Extract the first word of "gcc", so it can be a program name with args.
1769 set dummy gcc; ac_word=$2
1770 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1771 echo "configure:1772: checking for $ac_word" >&5
1772
1773 if test -n "$CC"; then
1774   ac_cv_prog_CC="$CC" # Let the user override the test.
1775 else
1776   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
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       ac_cv_prog_CC="gcc"
1782       break
1783     fi
1784   done
1785   IFS="$ac_save_ifs"
1786 fi
1787 CC="$ac_cv_prog_CC"
1788 if test -n "$CC"; then
1789   echo "$ac_t""$CC" 1>&6
1790 else
1791   echo "$ac_t""no" 1>&6
1792 fi
1793
1794 if test -z "$CC"; then
1795   # Extract the first word of "cc", so it can be a program name with args.
1796 set dummy cc; ac_word=$2
1797 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1798 echo "configure:1799: checking for $ac_word" >&5
1799
1800 if test -n "$CC"; then
1801   ac_cv_prog_CC="$CC" # Let the user override the test.
1802 else
1803   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1804   ac_prog_rejected=no
1805   ac_dummy="$PATH"
1806   for ac_dir in $ac_dummy; do
1807     test -z "$ac_dir" && ac_dir=.
1808     if test -f $ac_dir/$ac_word; then
1809       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1810         ac_prog_rejected=yes
1811         continue
1812       fi
1813       ac_cv_prog_CC="cc"
1814       break
1815     fi
1816   done
1817   IFS="$ac_save_ifs"
1818 if test $ac_prog_rejected = yes; then
1819   # We found a bogon in the path, so make sure we never use it.
1820   set dummy $ac_cv_prog_CC
1821   shift
1822   if test $# -gt 0; then
1823     # We chose a different compiler from the bogus one.
1824     # However, it has the same basename, so the bogon will be chosen
1825     # first if we set CC to just the basename; use the full file name.
1826     shift
1827     set dummy "$ac_dir/$ac_word" "$@"
1828     shift
1829     ac_cv_prog_CC="$@"
1830   fi
1831 fi
1832 fi
1833 CC="$ac_cv_prog_CC"
1834 if test -n "$CC"; then
1835   echo "$ac_t""$CC" 1>&6
1836 else
1837   echo "$ac_t""no" 1>&6
1838 fi
1839
1840   if test -z "$CC"; then
1841     case "`uname -s`" in
1842     *win32* | *WIN32*)
1843       # Extract the first word of "cl", so it can be a program name with args.
1844 set dummy cl; ac_word=$2
1845 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1846 echo "configure:1847: checking for $ac_word" >&5
1847
1848 if test -n "$CC"; then
1849   ac_cv_prog_CC="$CC" # Let the user override the test.
1850 else
1851   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1852   ac_dummy="$PATH"
1853   for ac_dir in $ac_dummy; do
1854     test -z "$ac_dir" && ac_dir=.
1855     if test -f $ac_dir/$ac_word; then
1856       ac_cv_prog_CC="cl"
1857       break
1858     fi
1859   done
1860   IFS="$ac_save_ifs"
1861 fi
1862 CC="$ac_cv_prog_CC"
1863 if test -n "$CC"; then
1864   echo "$ac_t""$CC" 1>&6
1865 else
1866   echo "$ac_t""no" 1>&6
1867 fi
1868  ;;
1869     esac
1870   fi
1871   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1872 fi
1873
1874 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1875 echo "configure:1876: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1876
1877 ac_ext=c
1878 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1879 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1880 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1881 ac_cpp='$CPP '"$xe_cppflags"
1882 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1883 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1884 cross_compiling=no
1885
1886 cat > conftest.$ac_ext << EOF
1887
1888 #line 1889 "configure"
1889 #include "confdefs.h"
1890
1891 main(){return(0);}
1892 EOF
1893 if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1894   ac_cv_prog_cc_works=yes
1895   # If we can't run a trivial program, we are probably using a cross compiler.
1896   if (./conftest; exit) 2>/dev/null; then
1897     ac_cv_prog_cc_cross=no
1898   else
1899     ac_cv_prog_cc_cross=yes
1900   fi
1901 else
1902   echo "configure: failed program was:" >&5
1903   cat conftest.$ac_ext >&5
1904   ac_cv_prog_cc_works=no
1905 fi
1906 rm -fr conftest*
1907 ac_ext=c
1908 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1909 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1910 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1911 ac_cpp='$CPP '"$xe_cppflags"
1912 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1913 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1914 cross_compiling=no
1915
1916 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1917 if test $ac_cv_prog_cc_works = no; then
1918   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1919 fi
1920 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1921 echo "configure:1922: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1922 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1923 cross_compiling=$ac_cv_prog_cc_cross
1924
1925 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1926 echo "configure:1927: checking whether we are using GNU C" >&5
1927
1928 cat > conftest.c <<EOF
1929 #ifdef __GNUC__
1930   yes;
1931 #endif
1932 EOF
1933 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1934   ac_cv_prog_gcc=yes
1935 else
1936   ac_cv_prog_gcc=no
1937 fi
1938
1939 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1940
1941 if test $ac_cv_prog_gcc = yes; then
1942   GCC=yes
1943 else
1944   GCC=
1945 fi
1946
1947 ac_test_CFLAGS="${CFLAGS+set}"
1948 ac_save_CFLAGS="$CFLAGS"
1949 CFLAGS=
1950 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1951 echo "configure:1952: checking whether ${CC-cc} accepts -g" >&5
1952
1953 echo 'void f(){}' > conftest.c
1954 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1955   ac_cv_prog_cc_g=yes
1956 else
1957   ac_cv_prog_cc_g=no
1958 fi
1959 rm -f conftest*
1960
1961
1962 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1963 if test "$ac_test_CFLAGS" = set; then
1964   CFLAGS="$ac_save_CFLAGS"
1965 elif test $ac_cv_prog_cc_g = yes; then
1966   if test "$GCC" = yes; then
1967     CFLAGS="-g -O2"
1968   else
1969     CFLAGS="-g"
1970   fi
1971 else
1972   if test "$GCC" = yes; then
1973     CFLAGS="-O2"
1974   else
1975     CFLAGS=
1976   fi
1977 fi
1978
1979 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1980   CC=gcc
1981   # Extract the first word of "gcc", so it can be a program name with args.
1982 set dummy gcc; ac_word=$2
1983 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1984 echo "configure:1985: checking for $ac_word" >&5
1985
1986 if test -n "$CC"; then
1987   ac_cv_prog_CC="$CC" # Let the user override the test.
1988 else
1989   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
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       ac_cv_prog_CC="gcc"
1995       break
1996     fi
1997   done
1998   IFS="$ac_save_ifs"
1999 fi
2000 CC="$ac_cv_prog_CC"
2001 if test -n "$CC"; then
2002   echo "$ac_t""$CC" 1>&6
2003 else
2004   echo "$ac_t""no" 1>&6
2005 fi
2006
2007 if test -z "$CC"; then
2008   # Extract the first word of "cc", so it can be a program name with args.
2009 set dummy cc; ac_word=$2
2010 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2011 echo "configure:2012: checking for $ac_word" >&5
2012
2013 if test -n "$CC"; then
2014   ac_cv_prog_CC="$CC" # Let the user override the test.
2015 else
2016   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2017   ac_prog_rejected=no
2018   ac_dummy="$PATH"
2019   for ac_dir in $ac_dummy; do
2020     test -z "$ac_dir" && ac_dir=.
2021     if test -f $ac_dir/$ac_word; then
2022       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2023         ac_prog_rejected=yes
2024         continue
2025       fi
2026       ac_cv_prog_CC="cc"
2027       break
2028     fi
2029   done
2030   IFS="$ac_save_ifs"
2031 if test $ac_prog_rejected = yes; then
2032   # We found a bogon in the path, so make sure we never use it.
2033   set dummy $ac_cv_prog_CC
2034   shift
2035   if test $# -gt 0; then
2036     # We chose a different compiler from the bogus one.
2037     # However, it has the same basename, so the bogon will be chosen
2038     # first if we set CC to just the basename; use the full file name.
2039     shift
2040     set dummy "$ac_dir/$ac_word" "$@"
2041     shift
2042     ac_cv_prog_CC="$@"
2043   fi
2044 fi
2045 fi
2046 CC="$ac_cv_prog_CC"
2047 if test -n "$CC"; then
2048   echo "$ac_t""$CC" 1>&6
2049 else
2050   echo "$ac_t""no" 1>&6
2051 fi
2052
2053   if test -z "$CC"; then
2054     case "`uname -s`" in
2055     *win32* | *WIN32*)
2056       # Extract the first word of "cl", so it can be a program name with args.
2057 set dummy cl; ac_word=$2
2058 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2059 echo "configure:2060: checking for $ac_word" >&5
2060
2061 if test -n "$CC"; then
2062   ac_cv_prog_CC="$CC" # Let the user override the test.
2063 else
2064   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2065   ac_dummy="$PATH"
2066   for ac_dir in $ac_dummy; do
2067     test -z "$ac_dir" && ac_dir=.
2068     if test -f $ac_dir/$ac_word; then
2069       ac_cv_prog_CC="cl"
2070       break
2071     fi
2072   done
2073   IFS="$ac_save_ifs"
2074 fi
2075 CC="$ac_cv_prog_CC"
2076 if test -n "$CC"; then
2077   echo "$ac_t""$CC" 1>&6
2078 else
2079   echo "$ac_t""no" 1>&6
2080 fi
2081  ;;
2082     esac
2083   fi
2084   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2085 fi
2086
2087 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2088 echo "configure:2089: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2089
2090 ac_ext=c
2091 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2092 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2093 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2094 ac_cpp='$CPP '"$xe_cppflags"
2095 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2096 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2097 cross_compiling=no
2098
2099 cat > conftest.$ac_ext << EOF
2100
2101 #line 2102 "configure"
2102 #include "confdefs.h"
2103
2104 main(){return(0);}
2105 EOF
2106 if { (eval echo configure:2107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2107   ac_cv_prog_cc_works=yes
2108   # If we can't run a trivial program, we are probably using a cross compiler.
2109   if (./conftest; exit) 2>/dev/null; then
2110     ac_cv_prog_cc_cross=no
2111   else
2112     ac_cv_prog_cc_cross=yes
2113   fi
2114 else
2115   echo "configure: failed program was:" >&5
2116   cat conftest.$ac_ext >&5
2117   ac_cv_prog_cc_works=no
2118 fi
2119 rm -fr conftest*
2120 ac_ext=c
2121 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2122 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2123 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2124 ac_cpp='$CPP '"$xe_cppflags"
2125 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2126 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2127 cross_compiling=no
2128
2129 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2130 if test $ac_cv_prog_cc_works = no; then
2131   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2132 fi
2133 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2134 echo "configure:2135: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2135 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2136 cross_compiling=$ac_cv_prog_cc_cross
2137
2138 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2139 echo "configure:2140: checking whether we are using GNU C" >&5
2140
2141 cat > conftest.c <<EOF
2142 #ifdef __GNUC__
2143   yes;
2144 #endif
2145 EOF
2146 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2147   ac_cv_prog_gcc=yes
2148 else
2149   ac_cv_prog_gcc=no
2150 fi
2151
2152 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2153
2154 if test $ac_cv_prog_gcc = yes; then
2155   GCC=yes
2156 else
2157   GCC=
2158 fi
2159
2160 ac_test_CFLAGS="${CFLAGS+set}"
2161 ac_save_CFLAGS="$CFLAGS"
2162 CFLAGS=
2163 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2164 echo "configure:2165: checking whether ${CC-cc} accepts -g" >&5
2165
2166 echo 'void f(){}' > conftest.c
2167 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2168   ac_cv_prog_cc_g=yes
2169 else
2170   ac_cv_prog_cc_g=no
2171 fi
2172 rm -f conftest*
2173
2174
2175 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2176 if test "$ac_test_CFLAGS" = set; then
2177   CFLAGS="$ac_save_CFLAGS"
2178 elif test $ac_cv_prog_cc_g = yes; then
2179   if test "$GCC" = yes; then
2180     CFLAGS="-g -O2"
2181   else
2182     CFLAGS="-g"
2183   fi
2184 else
2185   if test "$GCC" = yes; then
2186     CFLAGS="-O2"
2187   else
2188     CFLAGS=
2189   fi
2190 fi
2191
2192 fi
2193 CFLAGS="$xe_save_CFLAGS"
2194
2195
2196 test -n "$CPP" -a -d "$CPP" && CPP=
2197
2198 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2199
2200 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2201 echo "configure:2202: checking how to run the C preprocessor" >&5
2202 # On Suns, sometimes $CPP names a directory.
2203 if test -n "$CPP" && test -d "$CPP"; then
2204   CPP=
2205 fi
2206 if test -z "$CPP"; then
2207
2208   # This must be in double quotes, not single quotes, because CPP may get
2209   # substituted into the Makefile and "${CC-cc}" will confuse make.
2210   CPP="${CC-cc} -E"
2211   # On the NeXT, cc -E runs the code through the compiler's parser,
2212   # not just through cpp.
2213   cat > conftest.$ac_ext <<EOF
2214 #line 2215 "configure"
2215 #include "confdefs.h"
2216 #include <assert.h>
2217 Syntax Error
2218 EOF
2219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2220 { (eval echo configure:2221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2222 if test -z "$ac_err"; then
2223   :
2224 else
2225   echo "$ac_err" >&5
2226   echo "configure: failed program was:" >&5
2227   cat conftest.$ac_ext >&5
2228   rm -rf conftest*
2229   CPP="${CC-cc} -E -traditional-cpp"
2230   cat > conftest.$ac_ext <<EOF
2231 #line 2232 "configure"
2232 #include "confdefs.h"
2233 #include <assert.h>
2234 Syntax Error
2235 EOF
2236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2237 { (eval echo configure:2238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2239 if test -z "$ac_err"; then
2240   :
2241 else
2242   echo "$ac_err" >&5
2243   echo "configure: failed program was:" >&5
2244   cat conftest.$ac_ext >&5
2245   rm -rf conftest*
2246   CPP="${CC-cc} -nologo -E"
2247   cat > conftest.$ac_ext <<EOF
2248 #line 2249 "configure"
2249 #include "confdefs.h"
2250 #include <assert.h>
2251 Syntax Error
2252 EOF
2253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2254 { (eval echo configure:2255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2256 if test -z "$ac_err"; then
2257   :
2258 else
2259   echo "$ac_err" >&5
2260   echo "configure: failed program was:" >&5
2261   cat conftest.$ac_ext >&5
2262   rm -rf conftest*
2263   CPP=/lib/cpp
2264 fi
2265 rm -f conftest*
2266 fi
2267 rm -f conftest*
2268 fi
2269 rm -f conftest*
2270   ac_cv_prog_CPP="$CPP"
2271   CPP="$ac_cv_prog_CPP"
2272 else
2273   ac_cv_prog_CPP="$CPP"
2274 fi
2275 echo "$ac_t""$CPP" 1>&6
2276
2277
2278 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2279 echo "configure:2280: checking for AIX" >&5
2280 cat > conftest.$ac_ext <<EOF
2281 #line 2282 "configure"
2282 #include "confdefs.h"
2283 #ifdef _AIX
2284   yes
2285 #endif
2286
2287 EOF
2288 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2289   egrep "yes" >/dev/null 2>&1; then
2290   rm -rf conftest*
2291   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2292     Defining _ALL_SOURCE
2293 EOF
2294 cat >> confdefs.h <<\EOF
2295 #define _ALL_SOURCE 1
2296 EOF
2297 }
2298
2299 else
2300   rm -rf conftest*
2301   echo "$ac_t""no" 1>&6
2302 fi
2303 rm -f conftest*
2304
2305
2306
2307 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2308 echo "configure:2309: checking for GNU libc" >&5
2309 cat > conftest.$ac_ext <<EOF
2310 #line 2311 "configure"
2311 #include "confdefs.h"
2312 #include <features.h>
2313 int main() {
2314
2315 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2316 #error Not a GNU libc system :-(
2317 ******* ======= ******** &&&&&&&&
2318 #endif
2319
2320 ; return 0; }
2321 EOF
2322 if { (eval echo configure:2323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2323   rm -rf conftest*
2324   have_glibc=yes
2325 else
2326   echo "configure: failed program was:" >&5
2327   cat conftest.$ac_ext >&5
2328   rm -rf conftest*
2329   have_glibc=no
2330 fi
2331 rm -f conftest*
2332 echo "$ac_t""$have_glibc" 1>&6
2333 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2334     Defining _GNU_SOURCE
2335 EOF
2336 cat >> confdefs.h <<\EOF
2337 #define _GNU_SOURCE 1
2338 EOF
2339 }
2340
2341
2342
2343 cat > conftest.$ac_ext <<EOF
2344 #line 2345 "configure"
2345 #include "confdefs.h"
2346 int main () {
2347 #if defined __SUNPRO_C
2348 return 11;
2349 #elif defined __DECC
2350 return 12;
2351 #else
2352 return 0;
2353 #endif
2354 }
2355 EOF
2356 if { (eval echo configure:2357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2357 then
2358   :
2359 else
2360   conftest_rc="$?"
2361   echo "configure: failed program was:" >&5
2362   cat conftest.$ac_ext >&5
2363   rm -fr conftest*
2364   case "$conftest_rc" in
2365   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2366   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2367 esac
2368 fi
2369 rm -fr conftest*
2370
2371
2372
2373
2374 echo "Extracting information from the machine- and system-dependent headers..."
2375
2376 tempcname="conftest.c"
2377
2378
2379
2380 cat > $tempcname <<EOF
2381 #define NOT_C_CODE
2382 #define C_SWITCH_SITE
2383 #define C_SWITCH_X_SITE
2384 #define LD_SWITCH_SITE
2385 #define LD_SWITCH_X_SITE
2386 #define LD_SWITCH_X_SITE_AUX
2387 #define OS_RELEASE $os_release
2388 #include "$srcdir/src/$opsysfile"
2389 #include "$srcdir/src/$machfile"
2390
2391 #ifndef LIBS_MACHINE
2392 #define LIBS_MACHINE
2393 #endif
2394 configure___ libs_machine=LIBS_MACHINE
2395
2396 #ifndef LIBS_SYSTEM
2397 #define LIBS_SYSTEM
2398 #endif
2399 configure___ libs_system=LIBS_SYSTEM
2400
2401 #ifndef LIBS_TERMCAP
2402 #define LIBS_TERMCAP
2403 #endif
2404 configure___ libs_termcap=LIBS_TERMCAP
2405
2406 #ifndef LIB_STANDARD
2407 #define LIB_STANDARD
2408 #endif
2409 configure___ libs_standard=LIB_STANDARD
2410
2411
2412 #ifndef OBJECTS_MACHINE
2413 #define OBJECTS_MACHINE
2414 #endif
2415 configure___ objects_machine=OBJECTS_MACHINE
2416
2417 #ifndef OBJECTS_SYSTEM
2418 #define OBJECTS_SYSTEM
2419 #endif
2420 configure___ objects_system=OBJECTS_SYSTEM
2421
2422
2423 #ifndef C_SWITCH_MACHINE
2424 #define C_SWITCH_MACHINE
2425 #endif
2426 configure___ c_switch_machine=C_SWITCH_MACHINE
2427
2428 #ifndef C_SWITCH_SYSTEM
2429 #define C_SWITCH_SYSTEM
2430 #endif
2431 configure___ c_switch_system=C_SWITCH_SYSTEM
2432
2433
2434 #ifndef LD_SWITCH_MACHINE
2435 #define LD_SWITCH_MACHINE
2436 #endif
2437 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2438
2439 #ifndef LD_SWITCH_SYSTEM
2440 #define LD_SWITCH_SYSTEM
2441 #endif
2442 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2443
2444
2445 #ifndef UNEXEC
2446 #define UNEXEC "unexec.o"
2447 #endif
2448 configure___ unexec=UNEXEC
2449
2450
2451 #ifndef LD_SWITCH_SHARED
2452 #define LD_SWITCH_SHARED "-c"
2453 #endif
2454 configure___ ld_switch_shared=LD_SWITCH_SHARED
2455
2456
2457 #ifdef ORDINARY_LINK
2458 #define LD "\$(CC) \$(CFLAGS)"
2459 #else /* no ORDINARY LINK */
2460 #ifdef COFF_ENCAPSULATE
2461 #define LD "\$(CC) -nostdlib"
2462 #else /* not COFF_ENCAPSULATE */
2463 #ifdef LINKER
2464 #define LD LINKER
2465 #else /* ! defined (LINKER) */
2466 #define LD "ld"
2467 #endif /* ! defined (LINKER) */
2468 #endif /* ! defined (COFF_ENCAPSULATE) */
2469 #endif /* not ORDINARY_LINK */
2470 configure___ ld=LD
2471
2472 #ifndef LIB_GCC
2473 #define LIB_GCC
2474 #endif
2475 configure___ lib_gcc=LIB_GCC
2476
2477 #ifndef LD_TEXT_START_ADDR
2478 #define LD_TEXT_START_ADDR
2479 #endif
2480 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2481
2482
2483 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2484 #ifdef NO_REMAP
2485 #ifdef COFF_ENCAPSULATE
2486 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2487 #else /* ! defined (COFF_ENCAPSULATE) */
2488 #define START_FILES "pre-crt0.o /lib/crt0.o"
2489 #endif /* ! defined (COFF_ENCAPSULATE) */
2490 #else /* ! defined (NO_REMAP) */
2491 #define START_FILES "ecrt0.o"
2492 #endif /* ! defined (NO_REMAP) */
2493 #endif /* no ORDINARY_LINK */
2494 #ifndef START_FILES
2495 #define START_FILES
2496 #endif
2497 configure___ start_files=START_FILES
2498
2499 #ifdef ORDINARY_LINK
2500 configure___ ordinary_link=yes
2501 #else
2502 configure___ ordinary_link=no
2503 #endif
2504
2505 #ifdef SYSTEM_MALLOC
2506 configure___ system_malloc=yes
2507 #else
2508 configure___ system_malloc=no
2509 #endif
2510
2511 #ifdef TERMINFO
2512 configure___ have_terminfo=yes
2513 #else
2514 configure___ have_terminfo=no
2515 #endif
2516
2517 #ifdef MAIL_USE_FLOCK
2518 configure___ mail_use_flock=yes
2519 #else
2520 configure___ mail_use_flock=no
2521 #endif
2522
2523 #ifdef MAIL_USE_LOCKF
2524 configure___ mail_use_lockf=yes
2525 #else
2526 configure___ mail_use_lockf=no
2527 #endif
2528
2529 #ifdef HAVE_WIN32_PROCESSES
2530 configure___ win32_processes=yes
2531 #else
2532 configure___ win32_processes=no
2533 #endif
2534
2535 EOF
2536
2537 CPP=`eval "echo $CPP $CPPFLAGS"`
2538 eval `$CPP -Isrc $tempcname \
2539         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2540
2541 rm $tempcname
2542
2543 test "$extra_verbose" = "yes" && \
2544   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 ""
2545
2546 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2547
2548 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2549
2550 if test "$cflags_specified" = "no"; then
2551       if   test "$GCC" = "yes"; then
2552     CFLAGS="-g -O3 -Wall -Wno-switch"
2553               elif test "$__SUNPRO_C" = "yes"; then
2554     case "$opsys" in
2555       sol2    ) CFLAGS="-v -xO4" ;;
2556       sunos4* ) CFLAGS="-xO2";;
2557     esac
2558   elif test "$__DECC" = "yes"; then
2559     CFLAGS="-O3"
2560   elif test "$CC" = "xlc"; then
2561     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2562     else
2563     CFLAGS="-O" ;  fi
2564 fi
2565
2566
2567 if test "$GCC" = "yes"; then
2568   set x $ld_switch_system; shift; ld_switch_system=""
2569   while test -n "$1"; do
2570     case $1 in
2571       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2572       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2573       -Xlinker* ) ;;
2574       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2575     esac
2576     shift
2577   done
2578 fi
2579
2580 if test "$GCC" = "yes"; then
2581   set x $ld_switch_machine; shift; ld_switch_machine=""
2582   while test -n "$1"; do
2583     case $1 in
2584       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2585       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2586       -Xlinker* ) ;;
2587       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2588     esac
2589     shift
2590   done
2591 fi
2592
2593 if test "$GCC" = "yes"; then
2594   set x $LDFLAGS; shift; LDFLAGS=""
2595   while test -n "$1"; do
2596     case $1 in
2597       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2598       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2599       -Xlinker* ) ;;
2600       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2601     esac
2602     shift
2603   done
2604 fi
2605
2606 if test "$GCC" = "yes"; then
2607   set x $ld_call_shared; shift; ld_call_shared=""
2608   while test -n "$1"; do
2609     case $1 in
2610       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2611       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2612       -Xlinker* ) ;;
2613       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2614     esac
2615     shift
2616   done
2617 fi
2618
2619 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2620    echo "    xemacs will be linked with \"$objects_machine\""
2621  fi
2622 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2623    echo "    xemacs will be linked with \"$objects_system\""
2624  fi
2625 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2626    echo "    xemacs will be linked with \"$unexec\""
2627  fi
2628
2629 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2630 echo "configure:2631: checking for dynodump" >&5
2631 if test "$unexec" != "unexsol2.o"; then
2632   echo "$ac_t""no" 1>&6
2633 else
2634   echo "$ac_t""yes" 1>&6
2635   { test "$extra_verbose" = "yes" && cat << \EOF
2636     Defining DYNODUMP
2637 EOF
2638 cat >> confdefs.h <<\EOF
2639 #define DYNODUMP 1
2640 EOF
2641 }
2642
2643   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2644   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2645   case "$machine" in
2646     sparc   ) dynodump_arch=sparc ;;
2647     *86*    ) dynodump_arch=i386  ;;
2648     powerpc ) dynodump_arch=ppc   ;;
2649   esac
2650     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
2651 fi
2652
2653
2654 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2655
2656 if test "$unexec" = "unexaix.o"; then
2657   if   test "$dynamic" = "no"; then
2658   start_flags="-Wl,-bnso,-bnodelcsect"
2659   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2660   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2661     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2662   done
2663   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2664     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2665   done
2666   
2667 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2668 echo "configure:2669: checking for terminateAndUnload in -lC" >&5
2669 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2670
2671 xe_check_libs=" -lC "
2672 cat > conftest.$ac_ext <<EOF
2673 #line 2674 "configure"
2674 #include "confdefs.h"
2675 /* Override any gcc2 internal prototype to avoid an error.  */
2676 /* We use char because int might match the return type of a gcc2
2677     builtin and then its argument prototype would still apply.  */
2678 char terminateAndUnload();
2679
2680 int main() {
2681 terminateAndUnload()
2682 ; return 0; }
2683 EOF
2684 if { (eval echo configure:2685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2685   rm -rf conftest*
2686   eval "ac_cv_lib_$ac_lib_var=yes"
2687 else
2688   echo "configure: failed program was:" >&5
2689   cat conftest.$ac_ext >&5
2690   rm -rf conftest*
2691   eval "ac_cv_lib_$ac_lib_var=no"
2692 fi
2693 rm -f conftest*
2694 xe_check_libs=""
2695
2696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2697   echo "$ac_t""yes" 1>&6
2698   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2699 else
2700   echo "$ac_t""no" 1>&6
2701 fi
2702
2703
2704   fi
2705 elif test -n "$ld_text_start_addr"; then
2706   start_flags="-T $ld_text_start_addr -e __start"
2707 fi
2708
2709
2710
2711
2712 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2713  test -z "$linker" &&  linker='$(CC) -nostdlib'
2714  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2715 fi
2716 test "$GCC" != "yes" && lib_gcc=
2717
2718
2719
2720
2721
2722 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2723 if test -n "$site_libraries"; then
2724   for arg in $site_libraries; do
2725     case "$arg" in
2726      -* ) ;;
2727      * ) test -d "$arg" || \
2728            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2729        arg="-L${arg}" ;;
2730     esac
2731     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2732   done
2733 fi
2734
2735 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2736 if test -n "$site_includes"; then
2737   for arg in $site_includes; do
2738     case "$arg" in
2739       -* ) ;;
2740       * ) test -d "$arg" || \
2741            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2742       arg="-I${arg}" ;;
2743     esac
2744     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2745   done
2746 fi
2747
2748 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2749 if test -n "$site_prefixes"; then
2750   for dir in $site_prefixes; do
2751     lib_dir="${dir}/lib"
2752     inc_dir="${dir}/include"
2753     if test ! -d "$dir"; then
2754       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2755     elif test ! -d "$lib_dir"; then
2756       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2757     else
2758       if test -d "$inc_dir"; then
2759         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
2760       fi
2761       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
2762     fi
2763   done
2764 fi
2765
2766
2767 for dir in "/usr/ccs/lib"; do
2768   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
2769 done
2770
2771 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2772 if test -n "$site_runtime_libraries"; then
2773   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2774   export LD_RUN_PATH
2775 fi
2776
2777
2778 if   test "$dynamic" = "no"; then add_runtime_path=no
2779 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2780 else case "$opsys" in
2781        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2782        * ) add_runtime_path=no ;;
2783      esac
2784 fi
2785
2786 if test "$add_runtime_path" = "yes"; then
2787       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2788 echo "configure:2789: checking "for runtime libraries flag"" >&5
2789   case "$opsys" in
2790     sol2 ) dash_r="-R" ;;
2791     decosf* | linux* | irix*) dash_r="-rpath " ;;
2792     *)
2793       dash_r=""
2794       for try_dash_r in "-R" "-R " "-rpath "; do
2795         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2796         
2797 if test "$GCC" = "yes"; then
2798   set x $xe_check_libs; shift; xe_check_libs=""
2799   while test -n "$1"; do
2800     case $1 in
2801       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2802       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2803       -Xlinker* ) ;;
2804       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2805     esac
2806     shift
2807   done
2808 fi
2809         cat > conftest.$ac_ext <<EOF
2810 #line 2811 "configure"
2811 #include "confdefs.h"
2812
2813 int main() {
2814
2815 ; return 0; }
2816 EOF
2817 if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2818   rm -rf conftest*
2819   dash_r="$try_dash_r"
2820 else
2821   echo "configure: failed program was:" >&5
2822   cat conftest.$ac_ext >&5
2823 fi
2824 rm -f conftest*
2825         xe_check_libs=""
2826         test -n "$dash_r" && break
2827       done ;;
2828   esac
2829   if test -n "$dash_r";
2830     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2831     else echo "$ac_t""NONE" 1>&6
2832   fi
2833 fi
2834
2835 xe_add_unique_runpath_dir='
2836   xe_add_p=yes
2837   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2838   done
2839   if test "$xe_add_p" = "yes"; then
2840     test -n "$runpath" && runpath="${runpath}:"
2841     runpath="${runpath}${xe_runpath_dir}"
2842     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2843   fi'
2844
2845
2846
2847
2848 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2849     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2850   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2851   
2852         runpath="" runpath_dirs=""
2853   if test -n "$LD_RUN_PATH"; then
2854     runpath="$LD_RUN_PATH"
2855   elif test "$GCC" = "yes"; then
2856         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2857     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2858     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2859     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2860       case "$arg" in P,* | -L* | -R* )
2861         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2862           {
2863 xe_runpath_dir="$dir"
2864   test "$xe_runpath_dir" != "/lib"     -a \
2865         "$xe_runpath_dir" != "/usr/lib" -a \
2866         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2867   eval "$xe_add_unique_runpath_dir"
2868 }
2869         done ;;
2870       esac
2871     done
2872     ld_switch_run="$ld_switch_run_save"
2873     rm -f conftest*
2874   else
2875         for arg in $ld_switch_site $ld_switch_x_site; do
2876       case "$arg" in -L*) {
2877 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2878   test "$xe_runpath_dir" != "/lib"     -a \
2879         "$xe_runpath_dir" != "/usr/lib" -a \
2880         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2881   eval "$xe_add_unique_runpath_dir"
2882 };; esac
2883     done
2884         if test "$opsys $need_motif" = "sol2 yes"; then
2885       xe_runpath_dir="/opt/SUNWdt/lib";
2886       eval "$xe_add_unique_runpath_dir";
2887     fi
2888   fi 
2889   if test -n "$runpath"; then
2890     ld_switch_run="${dash_r}${runpath}"
2891     
2892 if test "$GCC" = "yes"; then
2893   set x $ld_switch_run; shift; ld_switch_run=""
2894   while test -n "$1"; do
2895     case $1 in
2896       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2897       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2898       -Xlinker* ) ;;
2899       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2900     esac
2901     shift
2902   done
2903 fi
2904     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2905   fi
2906 fi
2907
2908
2909
2910
2911 GNU_MALLOC=yes
2912 if test "$with_dlmalloc" != "no"; then
2913         doug_lea_malloc=yes
2914 else
2915         doug_lea_malloc=no
2916 fi
2917 after_morecore_hook_exists=yes
2918 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2919 echo "configure:2920: checking for malloc_get_state" >&5
2920
2921 cat > conftest.$ac_ext <<EOF
2922 #line 2923 "configure"
2923 #include "confdefs.h"
2924 /* System header to define __stub macros and hopefully few prototypes,
2925     which can conflict with char malloc_get_state(); below.  */
2926 #include <assert.h>
2927 /* Override any gcc2 internal prototype to avoid an error.  */
2928 /* We use char because int might match the return type of a gcc2
2929     builtin and then its argument prototype would still apply.  */
2930 char malloc_get_state();
2931
2932 int main() {
2933
2934 /* The GNU C library defines this for functions which it implements
2935     to always fail with ENOSYS.  Some functions are actually named
2936     something starting with __ and the normal name is an alias.  */
2937 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2938 choke me
2939 #else
2940 malloc_get_state();
2941 #endif
2942
2943 ; return 0; }
2944 EOF
2945 if { (eval echo configure:2946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2946   rm -rf conftest*
2947   eval "ac_cv_func_malloc_get_state=yes"
2948 else
2949   echo "configure: failed program was:" >&5
2950   cat conftest.$ac_ext >&5
2951   rm -rf conftest*
2952   eval "ac_cv_func_malloc_get_state=no"
2953 fi
2954 rm -f conftest*
2955
2956 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2957   echo "$ac_t""yes" 1>&6
2958   :
2959 else
2960   echo "$ac_t""no" 1>&6
2961 doug_lea_malloc=no
2962 fi
2963
2964 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2965 echo "configure:2966: checking for malloc_set_state" >&5
2966
2967 cat > conftest.$ac_ext <<EOF
2968 #line 2969 "configure"
2969 #include "confdefs.h"
2970 /* System header to define __stub macros and hopefully few prototypes,
2971     which can conflict with char malloc_set_state(); below.  */
2972 #include <assert.h>
2973 /* Override any gcc2 internal prototype to avoid an error.  */
2974 /* We use char because int might match the return type of a gcc2
2975     builtin and then its argument prototype would still apply.  */
2976 char malloc_set_state();
2977
2978 int main() {
2979
2980 /* The GNU C library defines this for functions which it implements
2981     to always fail with ENOSYS.  Some functions are actually named
2982     something starting with __ and the normal name is an alias.  */
2983 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
2984 choke me
2985 #else
2986 malloc_set_state();
2987 #endif
2988
2989 ; return 0; }
2990 EOF
2991 if { (eval echo configure:2992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2992   rm -rf conftest*
2993   eval "ac_cv_func_malloc_set_state=yes"
2994 else
2995   echo "configure: failed program was:" >&5
2996   cat conftest.$ac_ext >&5
2997   rm -rf conftest*
2998   eval "ac_cv_func_malloc_set_state=no"
2999 fi
3000 rm -f conftest*
3001
3002 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3003   echo "$ac_t""yes" 1>&6
3004   :
3005 else
3006   echo "$ac_t""no" 1>&6
3007 doug_lea_malloc=no
3008 fi
3009
3010 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3011 echo "configure:3012: checking whether __after_morecore_hook exists" >&5
3012 cat > conftest.$ac_ext <<EOF
3013 #line 3014 "configure"
3014 #include "confdefs.h"
3015 extern void (* __after_morecore_hook)();
3016 int main() {
3017 __after_morecore_hook = 0
3018 ; return 0; }
3019 EOF
3020 if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3021   rm -rf conftest*
3022   echo "$ac_t""yes" 1>&6
3023 else
3024   echo "configure: failed program was:" >&5
3025   cat conftest.$ac_ext >&5
3026   rm -rf conftest*
3027   echo "$ac_t""no" 1>&6
3028    after_morecore_hook_exists=no
3029 fi
3030 rm -f conftest*
3031 if test "$system_malloc" = "yes" ; then
3032   GNU_MALLOC=no
3033   GNU_MALLOC_reason="
3034   (The GNU allocators don't work with this system configuration)."
3035 elif test "$with_system_malloc" = "yes" ; then
3036   GNU_MALLOC=no
3037   GNU_MALLOC_reason="
3038   (User chose not to use GNU allocators)."
3039 elif test "$with_debug_malloc" = "yes" ; then
3040   GNU_MALLOC=no
3041   GNU_MALLOC_reason="
3042   (User chose to use Debugging Malloc)."
3043 fi
3044
3045 if test "$doug_lea_malloc" = "yes" ; then
3046   if test "$GNU_MALLOC" = yes ; then
3047     GNU_MALLOC_reason="
3048   (Using Doug Lea's new malloc from the GNU C Library.)"
3049   fi
3050   { test "$extra_verbose" = "yes" && cat << \EOF
3051     Defining DOUG_LEA_MALLOC
3052 EOF
3053 cat >> confdefs.h <<\EOF
3054 #define DOUG_LEA_MALLOC 1
3055 EOF
3056 }
3057
3058   if test "$after_morecore_hook_exists" = "no" ; then
3059     GNU_MALLOC_reason="
3060   (Using Doug Lea's new malloc from the Linux C Library.)"
3061     { test "$extra_verbose" = "yes" && cat << \EOF
3062     Defining _NO_MALLOC_WARNING_
3063 EOF
3064 cat >> confdefs.h <<\EOF
3065 #define _NO_MALLOC_WARNING_ 1
3066 EOF
3067 }
3068
3069   fi
3070   use_minimal_tagbits=yes
3071 fi
3072
3073
3074
3075
3076 # Extract the first word of "ranlib", so it can be a program name with args.
3077 set dummy ranlib; ac_word=$2
3078 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3079 echo "configure:3080: checking for $ac_word" >&5
3080
3081 if test -n "$RANLIB"; then
3082   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3083 else
3084   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3085   ac_dummy="$PATH"
3086   for ac_dir in $ac_dummy; do
3087     test -z "$ac_dir" && ac_dir=.
3088     if test -f $ac_dir/$ac_word; then
3089       ac_cv_prog_RANLIB="ranlib"
3090       break
3091     fi
3092   done
3093   IFS="$ac_save_ifs"
3094   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3095 fi
3096 RANLIB="$ac_cv_prog_RANLIB"
3097 if test -n "$RANLIB"; then
3098   echo "$ac_t""$RANLIB" 1>&6
3099 else
3100   echo "$ac_t""no" 1>&6
3101 fi
3102
3103 ac_aux_dir=
3104 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3105   if test -f $ac_dir/install-sh; then
3106     ac_aux_dir=$ac_dir
3107     ac_install_sh="$ac_aux_dir/install-sh -c"
3108     break
3109   elif test -f $ac_dir/install.sh; then
3110     ac_aux_dir=$ac_dir
3111     ac_install_sh="$ac_aux_dir/install.sh -c"
3112     break
3113   fi
3114 done
3115 if test -z "$ac_aux_dir"; then
3116   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3117 fi
3118 ac_config_guess=$ac_aux_dir/config.guess
3119 ac_config_sub=$ac_aux_dir/config.sub
3120 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3121
3122 # Find a good install program.  We prefer a C program (faster),
3123 # so one script is as good as another.  But avoid the broken or
3124 # incompatible versions:
3125 # SysV /etc/install, /usr/sbin/install
3126 # SunOS /usr/etc/install
3127 # IRIX /sbin/install
3128 # AIX /bin/install
3129 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3130 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3131 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3132 # ./install, which can be erroneously created by make from ./install.sh.
3133 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3134 echo "configure:3135: checking for a BSD compatible install" >&5
3135 if test -z "$INSTALL"; then
3136
3137   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3138   for ac_dir in $PATH; do
3139     # Account for people who put trailing slashes in PATH elements.
3140     case "$ac_dir/" in
3141     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3142     *)
3143       # OSF1 and SCO ODT 3.0 have their own names for install.
3144       # Don't use installbsd from OSF since it installs stuff as root
3145       # by default.
3146       for ac_prog in ginstall scoinst install; do
3147         if test -f $ac_dir/$ac_prog; then
3148           if test $ac_prog = install &&
3149             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3150             # AIX install.  It has an incompatible calling convention.
3151             :
3152           else
3153             ac_cv_path_install="$ac_dir/$ac_prog -c"
3154             break 2
3155           fi
3156         fi
3157       done
3158       ;;
3159     esac
3160   done
3161   IFS="$ac_save_IFS"
3162
3163   if test "${ac_cv_path_install+set}" = set; then
3164     INSTALL="$ac_cv_path_install"
3165   else
3166     # As a last resort, use the slow shell script.  We don't cache a
3167     # path for INSTALL within a source directory, because that will
3168     # break other packages using the cache if that directory is
3169     # removed, or if the path is relative.
3170     INSTALL="$ac_install_sh"
3171   fi
3172 fi
3173 echo "$ac_t""$INSTALL" 1>&6
3174
3175 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3176 # It thinks the first close brace ends the variable substitution.
3177 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3178
3179 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3180
3181 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3182
3183 for ac_prog in 'bison -y' byacc
3184 do
3185 # Extract the first word of "$ac_prog", so it can be a program name with args.
3186 set dummy $ac_prog; ac_word=$2
3187 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3188 echo "configure:3189: checking for $ac_word" >&5
3189
3190 if test -n "$YACC"; then
3191   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3192 else
3193   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3194   ac_dummy="$PATH"
3195   for ac_dir in $ac_dummy; do
3196     test -z "$ac_dir" && ac_dir=.
3197     if test -f $ac_dir/$ac_word; then
3198       ac_cv_prog_YACC="$ac_prog"
3199       break
3200     fi
3201   done
3202   IFS="$ac_save_ifs"
3203 fi
3204 YACC="$ac_cv_prog_YACC"
3205 if test -n "$YACC"; then
3206   echo "$ac_t""$YACC" 1>&6
3207 else
3208   echo "$ac_t""no" 1>&6
3209 fi
3210
3211 test -n "$YACC" && break
3212 done
3213 test -n "$YACC" || YACC="yacc"
3214
3215
3216 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3217 do
3218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3220 echo "configure:3221: checking for $ac_hdr" >&5
3221
3222 cat > conftest.$ac_ext <<EOF
3223 #line 3224 "configure"
3224 #include "confdefs.h"
3225 #include <$ac_hdr>
3226 EOF
3227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3228 { (eval echo configure:3229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3230 if test -z "$ac_err"; then
3231   rm -rf conftest*
3232   eval "ac_cv_header_$ac_safe=yes"
3233 else
3234   echo "$ac_err" >&5
3235   echo "configure: failed program was:" >&5
3236   cat conftest.$ac_ext >&5
3237   rm -rf conftest*
3238   eval "ac_cv_header_$ac_safe=no"
3239 fi
3240 rm -f conftest*
3241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3242   echo "$ac_t""yes" 1>&6
3243     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3244   { test "$extra_verbose" = "yes" && cat << EOF
3245     Defining $ac_tr_hdr
3246 EOF
3247 cat >> confdefs.h <<EOF
3248 #define $ac_tr_hdr 1
3249 EOF
3250 }
3251  
3252 else
3253   echo "$ac_t""no" 1>&6
3254 fi
3255 done
3256
3257 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3258 do
3259 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3260 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3261 echo "configure:3262: checking for $ac_hdr" >&5
3262
3263 cat > conftest.$ac_ext <<EOF
3264 #line 3265 "configure"
3265 #include "confdefs.h"
3266 #include <$ac_hdr>
3267 EOF
3268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3269 { (eval echo configure:3270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3271 if test -z "$ac_err"; then
3272   rm -rf conftest*
3273   eval "ac_cv_header_$ac_safe=yes"
3274 else
3275   echo "$ac_err" >&5
3276   echo "configure: failed program was:" >&5
3277   cat conftest.$ac_ext >&5
3278   rm -rf conftest*
3279   eval "ac_cv_header_$ac_safe=no"
3280 fi
3281 rm -f conftest*
3282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3283   echo "$ac_t""yes" 1>&6
3284     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3285   { test "$extra_verbose" = "yes" && cat << EOF
3286     Defining $ac_tr_hdr
3287 EOF
3288 cat >> confdefs.h <<EOF
3289 #define $ac_tr_hdr 1
3290 EOF
3291 }
3292  
3293 else
3294   echo "$ac_t""no" 1>&6
3295 fi
3296 done
3297
3298 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3299 do
3300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3302 echo "configure:3303: checking for $ac_hdr" >&5
3303
3304 cat > conftest.$ac_ext <<EOF
3305 #line 3306 "configure"
3306 #include "confdefs.h"
3307 #include <$ac_hdr>
3308 EOF
3309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3310 { (eval echo configure:3311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3312 if test -z "$ac_err"; then
3313   rm -rf conftest*
3314   eval "ac_cv_header_$ac_safe=yes"
3315 else
3316   echo "$ac_err" >&5
3317   echo "configure: failed program was:" >&5
3318   cat conftest.$ac_ext >&5
3319   rm -rf conftest*
3320   eval "ac_cv_header_$ac_safe=no"
3321 fi
3322 rm -f conftest*
3323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3324   echo "$ac_t""yes" 1>&6
3325     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3326   { test "$extra_verbose" = "yes" && cat << EOF
3327     Defining $ac_tr_hdr
3328 EOF
3329 cat >> confdefs.h <<EOF
3330 #define $ac_tr_hdr 1
3331 EOF
3332 }
3333  
3334 else
3335   echo "$ac_t""no" 1>&6
3336 fi
3337 done
3338
3339 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3340 echo "configure:3341: checking for sys/wait.h that is POSIX.1 compatible" >&5
3341
3342 cat > conftest.$ac_ext <<EOF
3343 #line 3344 "configure"
3344 #include "confdefs.h"
3345 #include <sys/types.h>
3346 #include <sys/wait.h>
3347 #ifndef WEXITSTATUS
3348 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3349 #endif
3350 #ifndef WIFEXITED
3351 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3352 #endif
3353 int main() {
3354 int s;
3355 wait (&s);
3356 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3357 ; return 0; }
3358 EOF
3359 if { (eval echo configure:3360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3360   rm -rf conftest*
3361   ac_cv_header_sys_wait_h=yes
3362 else
3363   echo "configure: failed program was:" >&5
3364   cat conftest.$ac_ext >&5
3365   rm -rf conftest*
3366   ac_cv_header_sys_wait_h=no
3367 fi
3368 rm -f conftest*
3369
3370 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3371 if test $ac_cv_header_sys_wait_h = yes; then
3372   { test "$extra_verbose" = "yes" && cat << \EOF
3373     Defining HAVE_SYS_WAIT_H
3374 EOF
3375 cat >> confdefs.h <<\EOF
3376 #define HAVE_SYS_WAIT_H 1
3377 EOF
3378 }
3379
3380 fi
3381
3382 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3383 echo "configure:3384: checking for ANSI C header files" >&5
3384
3385 cat > conftest.$ac_ext <<EOF
3386 #line 3387 "configure"
3387 #include "confdefs.h"
3388 #include <stdlib.h>
3389 #include <stdarg.h>
3390 #include <string.h>
3391 #include <float.h>
3392 EOF
3393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3394 { (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3396 if test -z "$ac_err"; then
3397   rm -rf conftest*
3398   ac_cv_header_stdc=yes
3399 else
3400   echo "$ac_err" >&5
3401   echo "configure: failed program was:" >&5
3402   cat conftest.$ac_ext >&5
3403   rm -rf conftest*
3404   ac_cv_header_stdc=no
3405 fi
3406 rm -f conftest*
3407
3408 if test $ac_cv_header_stdc = yes; then
3409   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3410 cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <string.h>
3414 EOF
3415 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3416   egrep "memchr" >/dev/null 2>&1; then
3417   :
3418 else
3419   rm -rf conftest*
3420   ac_cv_header_stdc=no
3421 fi
3422 rm -f conftest*
3423
3424 fi
3425
3426 if test $ac_cv_header_stdc = yes; then
3427   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3428 cat > conftest.$ac_ext <<EOF
3429 #line 3430 "configure"
3430 #include "confdefs.h"
3431 #include <stdlib.h>
3432 EOF
3433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3434   egrep "free" >/dev/null 2>&1; then
3435   :
3436 else
3437   rm -rf conftest*
3438   ac_cv_header_stdc=no
3439 fi
3440 rm -f conftest*
3441
3442 fi
3443
3444 if test $ac_cv_header_stdc = yes; then
3445   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3446 cat > conftest.$ac_ext <<EOF
3447 #line 3448 "configure"
3448 #include "confdefs.h"
3449 #include <ctype.h>
3450 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3451 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3452 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3453 int main () { int i; for (i = 0; i < 256; i++)
3454 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3455 exit (0); }
3456
3457 EOF
3458 if { (eval echo configure:3459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3459 then
3460   :
3461 else
3462   conftest_rc="$?"
3463   echo "configure: failed program was:" >&5
3464   cat conftest.$ac_ext >&5
3465   rm -fr conftest*
3466   ac_cv_header_stdc=no
3467 fi
3468 rm -fr conftest*
3469 fi
3470
3471 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3472 if test $ac_cv_header_stdc = yes; then
3473   { test "$extra_verbose" = "yes" && cat << \EOF
3474     Defining STDC_HEADERS
3475 EOF
3476 cat >> confdefs.h <<\EOF
3477 #define STDC_HEADERS 1
3478 EOF
3479 }
3480
3481 fi
3482
3483 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3484 echo "configure:3485: checking whether time.h and sys/time.h may both be included" >&5
3485
3486 cat > conftest.$ac_ext <<EOF
3487 #line 3488 "configure"
3488 #include "confdefs.h"
3489 #include <sys/types.h>
3490 #include <sys/time.h>
3491 #include <time.h>
3492 int main() {
3493 struct tm *tp;
3494 ; return 0; }
3495 EOF
3496 if { (eval echo configure:3497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3497   rm -rf conftest*
3498   ac_cv_header_time=yes
3499 else
3500   echo "configure: failed program was:" >&5
3501   cat conftest.$ac_ext >&5
3502   rm -rf conftest*
3503   ac_cv_header_time=no
3504 fi
3505 rm -f conftest*
3506
3507 echo "$ac_t""$ac_cv_header_time" 1>&6
3508 if test $ac_cv_header_time = yes; then
3509   { test "$extra_verbose" = "yes" && cat << \EOF
3510     Defining TIME_WITH_SYS_TIME
3511 EOF
3512 cat >> confdefs.h <<\EOF
3513 #define TIME_WITH_SYS_TIME 1
3514 EOF
3515 }
3516
3517 fi
3518
3519 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3520 echo "configure:3521: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3521
3522 cat > conftest.$ac_ext <<EOF
3523 #line 3524 "configure"
3524 #include "confdefs.h"
3525 #include <sys/types.h>
3526 #include <signal.h>
3527 /* NetBSD declares sys_siglist in unistd.h.  */
3528 #ifdef HAVE_UNISTD_H
3529 #include <unistd.h>
3530 #endif
3531 int main() {
3532 char *msg = *(sys_siglist + 1);
3533 ; return 0; }
3534 EOF
3535 if { (eval echo configure:3536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3536   rm -rf conftest*
3537   ac_cv_decl_sys_siglist=yes
3538 else
3539   echo "configure: failed program was:" >&5
3540   cat conftest.$ac_ext >&5
3541   rm -rf conftest*
3542   ac_cv_decl_sys_siglist=no
3543 fi
3544 rm -f conftest*
3545
3546 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3547 if test $ac_cv_decl_sys_siglist = yes; then
3548   { test "$extra_verbose" = "yes" && cat << \EOF
3549     Defining SYS_SIGLIST_DECLARED
3550 EOF
3551 cat >> confdefs.h <<\EOF
3552 #define SYS_SIGLIST_DECLARED 1
3553 EOF
3554 }
3555
3556 fi
3557
3558
3559 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3560 echo "configure:3561: checking for struct utimbuf" >&5
3561 cat > conftest.$ac_ext <<EOF
3562 #line 3563 "configure"
3563 #include "confdefs.h"
3564 #ifdef TIME_WITH_SYS_TIME
3565 #include <sys/time.h>
3566 #include <time.h>
3567 #else
3568 #ifdef HAVE_SYS_TIME_H
3569 #include <sys/time.h>
3570 #else
3571 #include <time.h>
3572 #endif
3573 #endif
3574 #ifdef HAVE_UTIME_H
3575 #include <utime.h>
3576 #endif
3577 int main() {
3578 static struct utimbuf x; x.actime = x.modtime;
3579 ; return 0; }
3580 EOF
3581 if { (eval echo configure:3582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3582   rm -rf conftest*
3583   echo "$ac_t""yes" 1>&6
3584    { test "$extra_verbose" = "yes" && cat << \EOF
3585     Defining HAVE_STRUCT_UTIMBUF
3586 EOF
3587 cat >> confdefs.h <<\EOF
3588 #define HAVE_STRUCT_UTIMBUF 1
3589 EOF
3590 }
3591
3592 else
3593   echo "configure: failed program was:" >&5
3594   cat conftest.$ac_ext >&5
3595   rm -rf conftest*
3596   echo "$ac_t""no" 1>&6
3597 fi
3598 rm -f conftest*
3599
3600 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3601 echo "configure:3602: checking return type of signal handlers" >&5
3602
3603 cat > conftest.$ac_ext <<EOF
3604 #line 3605 "configure"
3605 #include "confdefs.h"
3606 #include <sys/types.h>
3607 #include <signal.h>
3608 #ifdef signal
3609 #undef signal
3610 #endif
3611 #ifdef __cplusplus
3612 extern "C" void (*signal (int, void (*)(int)))(int);
3613 #else
3614 void (*signal ()) ();
3615 #endif
3616
3617 int main() {
3618 int i;
3619 ; return 0; }
3620 EOF
3621 if { (eval echo configure:3622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3622   rm -rf conftest*
3623   ac_cv_type_signal=void
3624 else
3625   echo "configure: failed program was:" >&5
3626   cat conftest.$ac_ext >&5
3627   rm -rf conftest*
3628   ac_cv_type_signal=int
3629 fi
3630 rm -f conftest*
3631
3632 echo "$ac_t""$ac_cv_type_signal" 1>&6
3633 { test "$extra_verbose" = "yes" && cat << EOF
3634     Defining RETSIGTYPE = $ac_cv_type_signal
3635 EOF
3636 cat >> confdefs.h <<EOF
3637 #define RETSIGTYPE $ac_cv_type_signal
3638 EOF
3639 }
3640
3641
3642 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3643 echo "configure:3644: checking for size_t" >&5
3644
3645 cat > conftest.$ac_ext <<EOF
3646 #line 3647 "configure"
3647 #include "confdefs.h"
3648 #include <sys/types.h>
3649 #if STDC_HEADERS
3650 #include <stdlib.h>
3651 #include <stddef.h>
3652 #endif
3653 EOF
3654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3655   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3656   rm -rf conftest*
3657   ac_cv_type_size_t=yes
3658 else
3659   rm -rf conftest*
3660   ac_cv_type_size_t=no
3661 fi
3662 rm -f conftest*
3663
3664 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3665 if test $ac_cv_type_size_t = no; then
3666   { test "$extra_verbose" = "yes" && cat << \EOF
3667     Defining size_t = unsigned
3668 EOF
3669 cat >> confdefs.h <<\EOF
3670 #define size_t unsigned
3671 EOF
3672 }
3673
3674 fi
3675
3676 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3677 echo "configure:3678: checking for pid_t" >&5
3678
3679 cat > conftest.$ac_ext <<EOF
3680 #line 3681 "configure"
3681 #include "confdefs.h"
3682 #include <sys/types.h>
3683 #if STDC_HEADERS
3684 #include <stdlib.h>
3685 #include <stddef.h>
3686 #endif
3687 EOF
3688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3689   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3690   rm -rf conftest*
3691   ac_cv_type_pid_t=yes
3692 else
3693   rm -rf conftest*
3694   ac_cv_type_pid_t=no
3695 fi
3696 rm -f conftest*
3697
3698 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3699 if test $ac_cv_type_pid_t = no; then
3700   { test "$extra_verbose" = "yes" && cat << \EOF
3701     Defining pid_t = int
3702 EOF
3703 cat >> confdefs.h <<\EOF
3704 #define pid_t int
3705 EOF
3706 }
3707
3708 fi
3709
3710 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3711 echo "configure:3712: checking for uid_t in sys/types.h" >&5
3712
3713 cat > conftest.$ac_ext <<EOF
3714 #line 3715 "configure"
3715 #include "confdefs.h"
3716 #include <sys/types.h>
3717 EOF
3718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3719   egrep "uid_t" >/dev/null 2>&1; then
3720   rm -rf conftest*
3721   ac_cv_type_uid_t=yes
3722 else
3723   rm -rf conftest*
3724   ac_cv_type_uid_t=no
3725 fi
3726 rm -f conftest*
3727
3728
3729 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3730 if test $ac_cv_type_uid_t = no; then
3731   { test "$extra_verbose" = "yes" && cat << \EOF
3732     Defining uid_t = int
3733 EOF
3734 cat >> confdefs.h <<\EOF
3735 #define uid_t int
3736 EOF
3737 }
3738
3739   { test "$extra_verbose" = "yes" && cat << \EOF
3740     Defining gid_t = int
3741 EOF
3742 cat >> confdefs.h <<\EOF
3743 #define gid_t int
3744 EOF
3745 }
3746
3747 fi
3748
3749 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3750 echo "configure:3751: checking for mode_t" >&5
3751
3752 cat > conftest.$ac_ext <<EOF
3753 #line 3754 "configure"
3754 #include "confdefs.h"
3755 #include <sys/types.h>
3756 #if STDC_HEADERS
3757 #include <stdlib.h>
3758 #include <stddef.h>
3759 #endif
3760 EOF
3761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3762   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3763   rm -rf conftest*
3764   ac_cv_type_mode_t=yes
3765 else
3766   rm -rf conftest*
3767   ac_cv_type_mode_t=no
3768 fi
3769 rm -f conftest*
3770
3771 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3772 if test $ac_cv_type_mode_t = no; then
3773   { test "$extra_verbose" = "yes" && cat << \EOF
3774     Defining mode_t = int
3775 EOF
3776 cat >> confdefs.h <<\EOF
3777 #define mode_t int
3778 EOF
3779 }
3780
3781 fi
3782
3783 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3784 echo "configure:3785: checking for off_t" >&5
3785
3786 cat > conftest.$ac_ext <<EOF
3787 #line 3788 "configure"
3788 #include "confdefs.h"
3789 #include <sys/types.h>
3790 #if STDC_HEADERS
3791 #include <stdlib.h>
3792 #include <stddef.h>
3793 #endif
3794 EOF
3795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3796   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3797   rm -rf conftest*
3798   ac_cv_type_off_t=yes
3799 else
3800   rm -rf conftest*
3801   ac_cv_type_off_t=no
3802 fi
3803 rm -f conftest*
3804
3805 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3806 if test $ac_cv_type_off_t = no; then
3807   { test "$extra_verbose" = "yes" && cat << \EOF
3808     Defining off_t = long
3809 EOF
3810 cat >> confdefs.h <<\EOF
3811 #define off_t long
3812 EOF
3813 }
3814
3815 fi
3816
3817 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3818 echo "configure:3819: checking for ssize_t" >&5
3819
3820 cat > conftest.$ac_ext <<EOF
3821 #line 3822 "configure"
3822 #include "confdefs.h"
3823 #include <sys/types.h>
3824 #if STDC_HEADERS
3825 #include <stdlib.h>
3826 #include <stddef.h>
3827 #endif
3828 EOF
3829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3830   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3831   rm -rf conftest*
3832   ac_cv_type_ssize_t=yes
3833 else
3834   rm -rf conftest*
3835   ac_cv_type_ssize_t=no
3836 fi
3837 rm -f conftest*
3838
3839 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3840 if test $ac_cv_type_ssize_t = no; then
3841   { test "$extra_verbose" = "yes" && cat << \EOF
3842     Defining ssize_t = int
3843 EOF
3844 cat >> confdefs.h <<\EOF
3845 #define ssize_t int
3846 EOF
3847 }
3848
3849 fi
3850
3851
3852 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3853 echo "configure:3854: checking for struct timeval" >&5
3854 cat > conftest.$ac_ext <<EOF
3855 #line 3856 "configure"
3856 #include "confdefs.h"
3857 #ifdef TIME_WITH_SYS_TIME
3858 #include <sys/time.h>
3859 #include <time.h>
3860 #else
3861 #ifdef HAVE_SYS_TIME_H
3862 #include <sys/time.h>
3863 #else
3864 #include <time.h>
3865 #endif
3866 #endif
3867 int main() {
3868 static struct timeval x; x.tv_sec = x.tv_usec;
3869 ; return 0; }
3870 EOF
3871 if { (eval echo configure:3872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3872   rm -rf conftest*
3873   echo "$ac_t""yes" 1>&6
3874   HAVE_TIMEVAL=yes
3875   { test "$extra_verbose" = "yes" && cat << \EOF
3876     Defining HAVE_TIMEVAL
3877 EOF
3878 cat >> confdefs.h <<\EOF
3879 #define HAVE_TIMEVAL 1
3880 EOF
3881 }
3882
3883 else
3884   echo "configure: failed program was:" >&5
3885   cat conftest.$ac_ext >&5
3886   rm -rf conftest*
3887   echo "$ac_t""no" 1>&6
3888    HAVE_TIMEVAL=no
3889 fi
3890 rm -f conftest*
3891
3892 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3893 echo "configure:3894: checking whether struct tm is in sys/time.h or time.h" >&5
3894
3895 cat > conftest.$ac_ext <<EOF
3896 #line 3897 "configure"
3897 #include "confdefs.h"
3898 #include <sys/types.h>
3899 #include <time.h>
3900 int main() {
3901 struct tm *tp; tp->tm_sec;
3902 ; return 0; }
3903 EOF
3904 if { (eval echo configure:3905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3905   rm -rf conftest*
3906   ac_cv_struct_tm=time.h
3907 else
3908   echo "configure: failed program was:" >&5
3909   cat conftest.$ac_ext >&5
3910   rm -rf conftest*
3911   ac_cv_struct_tm=sys/time.h
3912 fi
3913 rm -f conftest*
3914
3915 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3916 if test $ac_cv_struct_tm = sys/time.h; then
3917   { test "$extra_verbose" = "yes" && cat << \EOF
3918     Defining TM_IN_SYS_TIME
3919 EOF
3920 cat >> confdefs.h <<\EOF
3921 #define TM_IN_SYS_TIME 1
3922 EOF
3923 }
3924
3925 fi
3926
3927 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3928 echo "configure:3929: checking for tm_zone in struct tm" >&5
3929
3930 cat > conftest.$ac_ext <<EOF
3931 #line 3932 "configure"
3932 #include "confdefs.h"
3933 #include <sys/types.h>
3934 #include <$ac_cv_struct_tm>
3935 int main() {
3936 struct tm tm; tm.tm_zone;
3937 ; return 0; }
3938 EOF
3939 if { (eval echo configure:3940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3940   rm -rf conftest*
3941   ac_cv_struct_tm_zone=yes
3942 else
3943   echo "configure: failed program was:" >&5
3944   cat conftest.$ac_ext >&5
3945   rm -rf conftest*
3946   ac_cv_struct_tm_zone=no
3947 fi
3948 rm -f conftest*
3949
3950 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3951 if test "$ac_cv_struct_tm_zone" = yes; then
3952   { test "$extra_verbose" = "yes" && cat << \EOF
3953     Defining HAVE_TM_ZONE
3954 EOF
3955 cat >> confdefs.h <<\EOF
3956 #define HAVE_TM_ZONE 1
3957 EOF
3958 }
3959
3960 else
3961   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3962 echo "configure:3963: checking for tzname" >&5
3963
3964 cat > conftest.$ac_ext <<EOF
3965 #line 3966 "configure"
3966 #include "confdefs.h"
3967 #include <time.h>
3968 #ifndef tzname /* For SGI.  */
3969 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3970 #endif
3971 int main() {
3972 atoi(*tzname);
3973 ; return 0; }
3974 EOF
3975 if { (eval echo configure:3976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3976   rm -rf conftest*
3977   ac_cv_var_tzname=yes
3978 else
3979   echo "configure: failed program was:" >&5
3980   cat conftest.$ac_ext >&5
3981   rm -rf conftest*
3982   ac_cv_var_tzname=no
3983 fi
3984 rm -f conftest*
3985
3986 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3987   if test $ac_cv_var_tzname = yes; then
3988     { test "$extra_verbose" = "yes" && cat << \EOF
3989     Defining HAVE_TZNAME
3990 EOF
3991 cat >> confdefs.h <<\EOF
3992 #define HAVE_TZNAME 1
3993 EOF
3994 }
3995
3996   fi
3997 fi
3998
3999
4000 echo $ac_n "checking for working const""... $ac_c" 1>&6
4001 echo "configure:4002: checking for working const" >&5
4002
4003 cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006
4007 int main() {
4008
4009 /* Ultrix mips cc rejects this.  */
4010 typedef int charset[2]; const charset x;
4011 /* SunOS 4.1.1 cc rejects this.  */
4012 char const *const *ccp;
4013 char **p;
4014 /* NEC SVR4.0.2 mips cc rejects this.  */
4015 struct point {int x, y;};
4016 static struct point const zero = {0,0};
4017 /* AIX XL C 1.02.0.0 rejects this.
4018    It does not let you subtract one const X* pointer from another in an arm
4019    of an if-expression whose if-part is not a constant expression */
4020 const char *g = "string";
4021 ccp = &g + (g ? g-g : 0);
4022 /* HPUX 7.0 cc rejects these. */
4023 ++ccp;
4024 p = (char**) ccp;
4025 ccp = (char const *const *) p;
4026 { /* SCO 3.2v4 cc rejects this.  */
4027   char *t;
4028   char const *s = 0 ? (char *) 0 : (char const *) 0;
4029
4030   *t++ = 0;
4031 }
4032 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4033   int x[] = {25, 17};
4034   const int *foo = &x[0];
4035   ++foo;
4036 }
4037 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4038   typedef const int *iptr;
4039   iptr p = 0;
4040   ++p;
4041 }
4042 { /* AIX XL C 1.02.0.0 rejects this saying
4043      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4044   struct s { int j; const int *ap[3]; };
4045   struct s *b; b->j = 5;
4046 }
4047 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4048   const int foo = 10;
4049 }
4050
4051 ; return 0; }
4052 EOF
4053 if { (eval echo configure:4054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4054   rm -rf conftest*
4055   ac_cv_c_const=yes
4056 else
4057   echo "configure: failed program was:" >&5
4058   cat conftest.$ac_ext >&5
4059   rm -rf conftest*
4060   ac_cv_c_const=no
4061 fi
4062 rm -f conftest*
4063
4064 echo "$ac_t""$ac_cv_c_const" 1>&6
4065 if test $ac_cv_c_const = no; then
4066   { test "$extra_verbose" = "yes" && cat << \EOF
4067     Defining const = 
4068 EOF
4069 cat >> confdefs.h <<\EOF
4070 #define const 
4071 EOF
4072 }
4073
4074 fi
4075
4076
4077 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4078 echo "configure:4079: checking whether ${MAKE-make} sets \${MAKE}" >&5
4079 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4080
4081 cat > conftestmake <<\EOF
4082 all:
4083         @echo 'ac_maketemp="${MAKE}"'
4084 EOF
4085 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4086 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4087 if test -n "$ac_maketemp"; then
4088   eval ac_cv_prog_make_${ac_make}_set=yes
4089 else
4090   eval ac_cv_prog_make_${ac_make}_set=no
4091 fi
4092 rm -f conftestmake
4093 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4094   echo "$ac_t""yes" 1>&6
4095   SET_MAKE=
4096 else
4097   echo "$ac_t""no" 1>&6
4098   SET_MAKE="MAKE=${MAKE-make}"
4099 fi
4100
4101
4102 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4103 echo "configure:4104: checking whether byte ordering is bigendian" >&5
4104
4105 ac_cv_c_bigendian=unknown
4106 # See if sys/param.h defines the BYTE_ORDER macro.
4107 cat > conftest.$ac_ext <<EOF
4108 #line 4109 "configure"
4109 #include "confdefs.h"
4110 #include <sys/types.h>
4111 #include <sys/param.h>
4112 int main() {
4113
4114 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4115  bogus endian macros
4116 #endif
4117 ; return 0; }
4118 EOF
4119 if { (eval echo configure:4120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4120   rm -rf conftest*
4121   # It does; now see whether it defined to BIG_ENDIAN or not.
4122 cat > conftest.$ac_ext <<EOF
4123 #line 4124 "configure"
4124 #include "confdefs.h"
4125 #include <sys/types.h>
4126 #include <sys/param.h>
4127 int main() {
4128
4129 #if BYTE_ORDER != BIG_ENDIAN
4130  not big endian
4131 #endif
4132 ; return 0; }
4133 EOF
4134 if { (eval echo configure:4135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4135   rm -rf conftest*
4136   ac_cv_c_bigendian=yes
4137 else
4138   echo "configure: failed program was:" >&5
4139   cat conftest.$ac_ext >&5
4140   rm -rf conftest*
4141   ac_cv_c_bigendian=no
4142 fi
4143 rm -f conftest*
4144 else
4145   echo "configure: failed program was:" >&5
4146   cat conftest.$ac_ext >&5
4147 fi
4148 rm -f conftest*
4149 if test $ac_cv_c_bigendian = unknown; then
4150 cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4153 main () {
4154   /* Are we little or big endian?  From Harbison&Steele.  */
4155   union
4156   {
4157     long l;
4158     char c[sizeof (long)];
4159   } u;
4160   u.l = 1;
4161   exit (u.c[sizeof (long) - 1] == 1);
4162 }
4163 EOF
4164 if { (eval echo configure:4165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4165 then
4166   ac_cv_c_bigendian=no
4167 else
4168   conftest_rc="$?"
4169   echo "configure: failed program was:" >&5
4170   cat conftest.$ac_ext >&5
4171   rm -fr conftest*
4172   ac_cv_c_bigendian=yes
4173 fi
4174 rm -fr conftest*
4175 fi
4176
4177 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4178 if test $ac_cv_c_bigendian = yes; then
4179   { test "$extra_verbose" = "yes" && cat << \EOF
4180     Defining WORDS_BIGENDIAN
4181 EOF
4182 cat >> confdefs.h <<\EOF
4183 #define WORDS_BIGENDIAN 1
4184 EOF
4185 }
4186
4187 fi
4188
4189
4190 echo $ac_n "checking size of short""... $ac_c" 1>&6
4191 echo "configure:4192: checking size of short" >&5
4192
4193 cat > conftest.$ac_ext <<EOF
4194 #line 4195 "configure"
4195 #include "confdefs.h"
4196 #include <stdio.h>
4197 main()
4198 {
4199   FILE *f=fopen("conftestval", "w");
4200   if (!f) exit(1);
4201   fprintf(f, "%d\n", sizeof(short));
4202   exit(0);
4203 }
4204 EOF
4205 if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4206 then
4207   ac_cv_sizeof_short=`cat conftestval`
4208 else
4209   conftest_rc="$?"
4210   echo "configure: failed program was:" >&5
4211   cat conftest.$ac_ext >&5
4212   rm -fr conftest*
4213   ac_cv_sizeof_short=0
4214 fi
4215 rm -fr conftest*
4216 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4217 { test "$extra_verbose" = "yes" && cat << EOF
4218     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4219 EOF
4220 cat >> confdefs.h <<EOF
4221 #define SIZEOF_SHORT $ac_cv_sizeof_short
4222 EOF
4223 }
4224
4225
4226 if test "$ac_cv_sizeof_short" = 0; then
4227   echo ""
4228   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4229   echo "*** PANIC *** Please examine config.log for compilation errors."
4230   exit 1
4231 fi
4232 echo $ac_n "checking size of int""... $ac_c" 1>&6
4233 echo "configure:4234: checking size of int" >&5
4234
4235 cat > conftest.$ac_ext <<EOF
4236 #line 4237 "configure"
4237 #include "confdefs.h"
4238 #include <stdio.h>
4239 main()
4240 {
4241   FILE *f=fopen("conftestval", "w");
4242   if (!f) exit(1);
4243   fprintf(f, "%d\n", sizeof(int));
4244   exit(0);
4245 }
4246 EOF
4247 if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4248 then
4249   ac_cv_sizeof_int=`cat conftestval`
4250 else
4251   conftest_rc="$?"
4252   echo "configure: failed program was:" >&5
4253   cat conftest.$ac_ext >&5
4254   rm -fr conftest*
4255   ac_cv_sizeof_int=0
4256 fi
4257 rm -fr conftest*
4258 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4259 { test "$extra_verbose" = "yes" && cat << EOF
4260     Defining SIZEOF_INT = $ac_cv_sizeof_int
4261 EOF
4262 cat >> confdefs.h <<EOF
4263 #define SIZEOF_INT $ac_cv_sizeof_int
4264 EOF
4265 }
4266
4267
4268 echo $ac_n "checking size of long""... $ac_c" 1>&6
4269 echo "configure:4270: checking size of long" >&5
4270
4271 cat > conftest.$ac_ext <<EOF
4272 #line 4273 "configure"
4273 #include "confdefs.h"
4274 #include <stdio.h>
4275 main()
4276 {
4277   FILE *f=fopen("conftestval", "w");
4278   if (!f) exit(1);
4279   fprintf(f, "%d\n", sizeof(long));
4280   exit(0);
4281 }
4282 EOF
4283 if { (eval echo configure:4284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4284 then
4285   ac_cv_sizeof_long=`cat conftestval`
4286 else
4287   conftest_rc="$?"
4288   echo "configure: failed program was:" >&5
4289   cat conftest.$ac_ext >&5
4290   rm -fr conftest*
4291   ac_cv_sizeof_long=0
4292 fi
4293 rm -fr conftest*
4294 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4295 { test "$extra_verbose" = "yes" && cat << EOF
4296     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4297 EOF
4298 cat >> confdefs.h <<EOF
4299 #define SIZEOF_LONG $ac_cv_sizeof_long
4300 EOF
4301 }
4302
4303
4304 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4305 echo "configure:4306: checking size of long long" >&5
4306
4307 cat > conftest.$ac_ext <<EOF
4308 #line 4309 "configure"
4309 #include "confdefs.h"
4310 #include <stdio.h>
4311 main()
4312 {
4313   FILE *f=fopen("conftestval", "w");
4314   if (!f) exit(1);
4315   fprintf(f, "%d\n", sizeof(long long));
4316   exit(0);
4317 }
4318 EOF
4319 if { (eval echo configure:4320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4320 then
4321   ac_cv_sizeof_long_long=`cat conftestval`
4322 else
4323   conftest_rc="$?"
4324   echo "configure: failed program was:" >&5
4325   cat conftest.$ac_ext >&5
4326   rm -fr conftest*
4327   ac_cv_sizeof_long_long=0
4328 fi
4329 rm -fr conftest*
4330 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4331 { test "$extra_verbose" = "yes" && cat << EOF
4332     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4333 EOF
4334 cat >> confdefs.h <<EOF
4335 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4336 EOF
4337 }
4338
4339
4340 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4341 echo "configure:4342: checking size of void *" >&5
4342
4343 cat > conftest.$ac_ext <<EOF
4344 #line 4345 "configure"
4345 #include "confdefs.h"
4346 #include <stdio.h>
4347 main()
4348 {
4349   FILE *f=fopen("conftestval", "w");
4350   if (!f) exit(1);
4351   fprintf(f, "%d\n", sizeof(void *));
4352   exit(0);
4353 }
4354 EOF
4355 if { (eval echo configure:4356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4356 then
4357   ac_cv_sizeof_void_p=`cat conftestval`
4358 else
4359   conftest_rc="$?"
4360   echo "configure: failed program was:" >&5
4361   cat conftest.$ac_ext >&5
4362   rm -fr conftest*
4363   ac_cv_sizeof_void_p=0
4364 fi
4365 rm -fr conftest*
4366 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4367 { test "$extra_verbose" = "yes" && cat << EOF
4368     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4369 EOF
4370 cat >> confdefs.h <<EOF
4371 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4372 EOF
4373 }
4374
4375
4376
4377 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4378 echo "configure:4379: checking for long file names" >&5
4379
4380 ac_cv_sys_long_file_names=yes
4381 # Test for long file names in all the places we know might matter:
4382 #      .                the current directory, where building will happen
4383 #      $prefix/lib      where we will be installing things
4384 #      $exec_prefix/lib likewise
4385 # eval it to expand exec_prefix.
4386 #      $TMPDIR          if set, where it might want to write temporary files
4387 # if $TMPDIR is not set:
4388 #      /tmp             where it might want to write temporary files
4389 #      /var/tmp         likewise
4390 #      /usr/tmp         likewise
4391 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4392   ac_tmpdirs="$TMPDIR"
4393 else
4394   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4395 fi
4396 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4397   test -d $ac_dir || continue
4398   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4399   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4400   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4401   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4402   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4403     ac_cv_sys_long_file_names=no
4404     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4405     break
4406   fi
4407   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4408 done
4409
4410 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4411 if test $ac_cv_sys_long_file_names = yes; then
4412   { test "$extra_verbose" = "yes" && cat << \EOF
4413     Defining HAVE_LONG_FILE_NAMES
4414 EOF
4415 cat >> confdefs.h <<\EOF
4416 #define HAVE_LONG_FILE_NAMES 1
4417 EOF
4418 }
4419
4420 fi
4421
4422
4423 echo $ac_n "checking for sin""... $ac_c" 1>&6
4424 echo "configure:4425: checking for sin" >&5
4425
4426 cat > conftest.$ac_ext <<EOF
4427 #line 4428 "configure"
4428 #include "confdefs.h"
4429 /* System header to define __stub macros and hopefully few prototypes,
4430     which can conflict with char sin(); below.  */
4431 #include <assert.h>
4432 /* Override any gcc2 internal prototype to avoid an error.  */
4433 /* We use char because int might match the return type of a gcc2
4434     builtin and then its argument prototype would still apply.  */
4435 char sin();
4436
4437 int main() {
4438
4439 /* The GNU C library defines this for functions which it implements
4440     to always fail with ENOSYS.  Some functions are actually named
4441     something starting with __ and the normal name is an alias.  */
4442 #if defined (__stub_sin) || defined (__stub___sin)
4443 choke me
4444 #else
4445 sin();
4446 #endif
4447
4448 ; return 0; }
4449 EOF
4450 if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4451   rm -rf conftest*
4452   eval "ac_cv_func_sin=yes"
4453 else
4454   echo "configure: failed program was:" >&5
4455   cat conftest.$ac_ext >&5
4456   rm -rf conftest*
4457   eval "ac_cv_func_sin=no"
4458 fi
4459 rm -f conftest*
4460
4461 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4462   echo "$ac_t""yes" 1>&6
4463   :
4464 else
4465   echo "$ac_t""no" 1>&6
4466
4467 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4468 echo "configure:4469: checking for sin in -lm" >&5
4469 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4470
4471 xe_check_libs=" -lm "
4472 cat > conftest.$ac_ext <<EOF
4473 #line 4474 "configure"
4474 #include "confdefs.h"
4475 /* Override any gcc2 internal prototype to avoid an error.  */
4476 /* We use char because int might match the return type of a gcc2
4477     builtin and then its argument prototype would still apply.  */
4478 char sin();
4479
4480 int main() {
4481 sin()
4482 ; return 0; }
4483 EOF
4484 if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4485   rm -rf conftest*
4486   eval "ac_cv_lib_$ac_lib_var=yes"
4487 else
4488   echo "configure: failed program was:" >&5
4489   cat conftest.$ac_ext >&5
4490   rm -rf conftest*
4491   eval "ac_cv_lib_$ac_lib_var=no"
4492 fi
4493 rm -f conftest*
4494 xe_check_libs=""
4495
4496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4497   echo "$ac_t""yes" 1>&6
4498     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4499     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4500   { test "$extra_verbose" = "yes" && cat << EOF
4501     Defining $ac_tr_lib
4502 EOF
4503 cat >> confdefs.h <<EOF
4504 #define $ac_tr_lib 1
4505 EOF
4506 }
4507
4508   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4509
4510 else
4511   echo "$ac_t""no" 1>&6
4512 fi
4513
4514
4515 fi
4516
4517
4518 { test "$extra_verbose" = "yes" && cat << \EOF
4519     Defining LISP_FLOAT_TYPE
4520 EOF
4521 cat >> confdefs.h <<\EOF
4522 #define LISP_FLOAT_TYPE 1
4523 EOF
4524 }
4525
4526
4527 cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 #include <math.h>
4531 int main() {
4532 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4533 ; return 0; }
4534 EOF
4535 if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4536   rm -rf conftest*
4537   { test "$extra_verbose" = "yes" && cat << \EOF
4538     Defining HAVE_INVERSE_HYPERBOLIC
4539 EOF
4540 cat >> confdefs.h <<\EOF
4541 #define HAVE_INVERSE_HYPERBOLIC 1
4542 EOF
4543 }
4544
4545 else
4546   echo "configure: failed program was:" >&5
4547   cat conftest.$ac_ext >&5
4548 fi
4549 rm -f conftest*
4550
4551 echo "checking type of mail spool file locking" 1>&6
4552 echo "configure:4553: checking type of mail spool file locking" >&5
4553 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4554 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4555 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4556     Defining REAL_MAIL_USE_LOCKF
4557 EOF
4558 cat >> confdefs.h <<\EOF
4559 #define REAL_MAIL_USE_LOCKF 1
4560 EOF
4561 }
4562
4563 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4564     Defining REAL_MAIL_USE_FLOCK
4565 EOF
4566 cat >> confdefs.h <<\EOF
4567 #define REAL_MAIL_USE_FLOCK 1
4568 EOF
4569 }
4570
4571 else mail_locking="dot-locking"
4572 fi
4573
4574 case "$opsys" in decosf*)
4575   
4576 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4577 echo "configure:4578: checking for cma_open in -lpthreads" >&5
4578 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4579
4580 xe_check_libs=" -lpthreads "
4581 cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584 /* Override any gcc2 internal prototype to avoid an error.  */
4585 /* We use char because int might match the return type of a gcc2
4586     builtin and then its argument prototype would still apply.  */
4587 char cma_open();
4588
4589 int main() {
4590 cma_open()
4591 ; return 0; }
4592 EOF
4593 if { (eval echo configure:4594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4594   rm -rf conftest*
4595   eval "ac_cv_lib_$ac_lib_var=yes"
4596 else
4597   echo "configure: failed program was:" >&5
4598   cat conftest.$ac_ext >&5
4599   rm -rf conftest*
4600   eval "ac_cv_lib_$ac_lib_var=no"
4601 fi
4602 rm -f conftest*
4603 xe_check_libs=""
4604
4605 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4606   echo "$ac_t""yes" 1>&6
4607     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4608     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4609   { test "$extra_verbose" = "yes" && cat << EOF
4610     Defining $ac_tr_lib
4611 EOF
4612 cat >> confdefs.h <<EOF
4613 #define $ac_tr_lib 1
4614 EOF
4615 }
4616
4617   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4618
4619 else
4620   echo "$ac_t""no" 1>&6
4621 fi
4622
4623
4624   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4625     c_switch_site="$c_switch_site -threads" ;;
4626 esac
4627
4628 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4629 echo "configure:4630: checking whether the -xildoff compiler flag is required" >&5
4630 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4631   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4632     then echo "$ac_t""no" 1>&6;
4633     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
4634   fi
4635   else echo "$ac_t""no" 1>&6
4636 fi
4637
4638 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4639   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4640 echo "configure:4641: checking for \"-z ignore\" linker flag" >&5
4641   case "`ld -h 2>&1`" in
4642     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4643       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4644     *) echo "$ac_t""no" 1>&6 ;;
4645   esac
4646 fi
4647
4648
4649 echo "checking "for specified window system"" 1>&6
4650 echo "configure:4651: checking "for specified window system"" >&5
4651
4652 if test "$with_x11" != "no"; then
4653     test "$x_includes $x_libraries" != "NONE NONE" && \
4654    window_system=x11 with_x11=yes
4655
4656         
4657       if test "$x_includes $x_libraries" = "NONE NONE" \
4658     -a -n "$OPENWINHOME" \
4659     -a "$OPENWINHOME" != "/usr/openwin" \
4660     -a -d "$OPENWINHOME"; then
4661       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4662       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4663       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4664   fi
4665
4666   if test "$x_includes" = "NONE"; then
4667                     for dir in "/usr/X11" "/usr/X11R6"; do
4668       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4669     done
4670   fi
4671
4672   if test "$x_libraries" = "NONE"; then
4673     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4674       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4675     done
4676   fi
4677
4678   # If we find X, set shell vars x_includes and x_libraries to the
4679 # paths, otherwise set no_x=yes.
4680 # Uses ac_ vars as temps to allow command line to override cache and checks.
4681 # --without-x overrides everything else, but does not touch the cache.
4682 echo $ac_n "checking for X""... $ac_c" 1>&6
4683 echo "configure:4684: checking for X" >&5
4684
4685 # Check whether --with-x or --without-x was given.
4686 if test "${with_x+set}" = set; then
4687   withval="$with_x"
4688   :
4689 fi
4690
4691 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4692 if test "x$with_x" = xno; then
4693   # The user explicitly disabled X.
4694   have_x=disabled
4695 else
4696   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4697     # Both variables are already set.
4698     have_x=yes
4699   else
4700
4701 # One or both of the vars are not set, and there is no cached value.
4702 ac_x_includes=NO ac_x_libraries=NO
4703 rm -fr conftestdir
4704 if mkdir conftestdir; then
4705   cd conftestdir
4706   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4707   cat > Imakefile <<'EOF'
4708 acfindx:
4709         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4710 EOF
4711   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4712     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4713     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4714     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4715     for ac_extension in a so sl; do
4716       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4717         test -f $ac_im_libdir/libX11.$ac_extension; then
4718         ac_im_usrlibdir=$ac_im_libdir; break
4719       fi
4720     done
4721     # Screen out bogus values from the imake configuration.  They are
4722     # bogus both because they are the default anyway, and because
4723     # using them would break gcc on systems where it needs fixed includes.
4724     case "$ac_im_incroot" in
4725         /usr/include) ;;
4726         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4727     esac
4728     case "$ac_im_usrlibdir" in
4729         /usr/lib | /lib) ;;
4730         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4731     esac
4732   fi
4733   cd ..
4734   rm -fr conftestdir
4735 fi
4736
4737 if test "$ac_x_includes" = NO; then
4738   # Guess where to find include files, by looking for this one X11 .h file.
4739   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4740
4741   # First, try using that file with no special directory specified.
4742 cat > conftest.$ac_ext <<EOF
4743 #line 4744 "configure"
4744 #include "confdefs.h"
4745 #include <$x_direct_test_include>
4746 EOF
4747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4748 { (eval echo configure:4749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4750 if test -z "$ac_err"; then
4751   rm -rf conftest*
4752   # We can compile using X headers with no special include directory.
4753 ac_x_includes=
4754 else
4755   echo "$ac_err" >&5
4756   echo "configure: failed program was:" >&5
4757   cat conftest.$ac_ext >&5
4758   rm -rf conftest*
4759   # Look for the header file in a standard set of common directories.
4760 # Check X11 before X11Rn because it is often a symlink to the current release.
4761   for ac_dir in               \
4762     /usr/X11/include          \
4763     /usr/X11R6/include        \
4764     /usr/X11R5/include        \
4765     /usr/X11R4/include        \
4766                               \
4767     /usr/include/X11          \
4768     /usr/include/X11R6        \
4769     /usr/include/X11R5        \
4770     /usr/include/X11R4        \
4771                               \
4772     /usr/local/X11/include    \
4773     /usr/local/X11R6/include  \
4774     /usr/local/X11R5/include  \
4775     /usr/local/X11R4/include  \
4776                               \
4777     /usr/local/include/X11    \
4778     /usr/local/include/X11R6  \
4779     /usr/local/include/X11R5  \
4780     /usr/local/include/X11R4  \
4781                               \
4782     /usr/X386/include         \
4783     /usr/x386/include         \
4784     /usr/XFree86/include/X11  \
4785                               \
4786     /usr/include              \
4787     /usr/local/include        \
4788     /usr/unsupported/include  \
4789     /usr/athena/include       \
4790     /usr/local/x11r5/include  \
4791     /usr/lpp/Xamples/include  \
4792                               \
4793     /usr/openwin/include      \
4794     /usr/openwin/share/include \
4795     ; \
4796   do
4797     if test -r "$ac_dir/$x_direct_test_include"; then
4798       ac_x_includes=$ac_dir
4799       break
4800     fi
4801   done
4802 fi
4803 rm -f conftest*
4804 fi # $ac_x_includes = NO
4805
4806 if test "$ac_x_libraries" = NO; then
4807   # Check for the libraries.
4808
4809   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4810   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4811
4812   # See if we find them without any special options.
4813   # Don't add to $LIBS permanently.
4814   ac_save_LIBS="$LIBS"
4815   LIBS="-l$x_direct_test_library $LIBS"
4816 cat > conftest.$ac_ext <<EOF
4817 #line 4818 "configure"
4818 #include "confdefs.h"
4819
4820 int main() {
4821 ${x_direct_test_function}()
4822 ; return 0; }
4823 EOF
4824 if { (eval echo configure:4825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4825   rm -rf conftest*
4826   LIBS="$ac_save_LIBS"
4827 # We can link X programs with no special library path.
4828 ac_x_libraries=
4829 else
4830   echo "configure: failed program was:" >&5
4831   cat conftest.$ac_ext >&5
4832   rm -rf conftest*
4833   LIBS="$ac_save_LIBS"
4834 # First see if replacing the include by lib works.
4835 # Check X11 before X11Rn because it is often a symlink to the current release.
4836 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4837     /usr/X11/lib          \
4838     /usr/X11R6/lib        \
4839     /usr/X11R5/lib        \
4840     /usr/X11R4/lib        \
4841                           \
4842     /usr/lib/X11          \
4843     /usr/lib/X11R6        \
4844     /usr/lib/X11R5        \
4845     /usr/lib/X11R4        \
4846                           \
4847     /usr/local/X11/lib    \
4848     /usr/local/X11R6/lib  \
4849     /usr/local/X11R5/lib  \
4850     /usr/local/X11R4/lib  \
4851                           \
4852     /usr/local/lib/X11    \
4853     /usr/local/lib/X11R6  \
4854     /usr/local/lib/X11R5  \
4855     /usr/local/lib/X11R4  \
4856                           \
4857     /usr/X386/lib         \
4858     /usr/x386/lib         \
4859     /usr/XFree86/lib/X11  \
4860                           \
4861     /usr/lib              \
4862     /usr/local/lib        \
4863     /usr/unsupported/lib  \
4864     /usr/athena/lib       \
4865     /usr/local/x11r5/lib  \
4866     /usr/lpp/Xamples/lib  \
4867     /lib/usr/lib/X11      \
4868                           \
4869     /usr/openwin/lib      \
4870     /usr/openwin/share/lib \
4871     ; \
4872 do
4873   for ac_extension in a so sl; do
4874     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4875       ac_x_libraries=$ac_dir
4876       break 2
4877     fi
4878   done
4879 done
4880 fi
4881 rm -f conftest*
4882 fi # $ac_x_libraries = NO
4883
4884 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4885   # Didn't find X anywhere.  Cache the known absence of X.
4886   ac_cv_have_x="have_x=no"
4887 else
4888   # Record where we found X for the cache.
4889   ac_cv_have_x="have_x=yes \
4890                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4891 fi
4892   fi
4893   eval "$ac_cv_have_x"
4894 fi # $with_x != no
4895
4896 if test "$have_x" != yes; then
4897   echo "$ac_t""$have_x" 1>&6
4898   no_x=yes
4899 else
4900   # If each of the values was on the command line, it overrides each guess.
4901   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4902   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4903   # Update the cache value to reflect the command line values.
4904   ac_cv_have_x="have_x=yes \
4905                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4906   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4907 fi
4908
4909 if test "$no_x" = yes; then
4910   # Not all programs may use this symbol, but it does not hurt to define it.
4911   { test "$extra_verbose" = "yes" && cat << \EOF
4912     Defining X_DISPLAY_MISSING
4913 EOF
4914 cat >> confdefs.h <<\EOF
4915 #define X_DISPLAY_MISSING 1
4916 EOF
4917 }
4918
4919   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4920 else
4921   if test -n "$x_includes"; then
4922     X_CFLAGS="$X_CFLAGS -I$x_includes"
4923   fi
4924
4925   # It would also be nice to do this for all -L options, not just this one.
4926   if test -n "$x_libraries"; then
4927     X_LIBS="$X_LIBS -L$x_libraries"
4928     # For Solaris; some versions of Sun CC require a space after -R and
4929     # others require no space.  Words are not sufficient . . . .
4930     case "`(uname -sr) 2>/dev/null`" in
4931     "SunOS 5"*)
4932       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4933 echo "configure:4934: checking whether -R must be followed by a space" >&5
4934       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4935       cat > conftest.$ac_ext <<EOF
4936 #line 4937 "configure"
4937 #include "confdefs.h"
4938
4939 int main() {
4940
4941 ; return 0; }
4942 EOF
4943 if { (eval echo configure:4944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4944   rm -rf conftest*
4945   ac_R_nospace=yes
4946 else
4947   echo "configure: failed program was:" >&5
4948   cat conftest.$ac_ext >&5
4949   rm -rf conftest*
4950   ac_R_nospace=no
4951 fi
4952 rm -f conftest*
4953       if test $ac_R_nospace = yes; then
4954         echo "$ac_t""no" 1>&6
4955         X_LIBS="$X_LIBS -R$x_libraries"
4956       else
4957         LIBS="$ac_xsave_LIBS -R $x_libraries"
4958         cat > conftest.$ac_ext <<EOF
4959 #line 4960 "configure"
4960 #include "confdefs.h"
4961
4962 int main() {
4963
4964 ; return 0; }
4965 EOF
4966 if { (eval echo configure:4967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4967   rm -rf conftest*
4968   ac_R_space=yes
4969 else
4970   echo "configure: failed program was:" >&5
4971   cat conftest.$ac_ext >&5
4972   rm -rf conftest*
4973   ac_R_space=no
4974 fi
4975 rm -f conftest*
4976         if test $ac_R_space = yes; then
4977           echo "$ac_t""yes" 1>&6
4978           X_LIBS="$X_LIBS -R $x_libraries"
4979         else
4980           echo "$ac_t""neither works" 1>&6
4981         fi
4982       fi
4983       LIBS="$ac_xsave_LIBS"
4984     esac
4985   fi
4986
4987   # Check for system-dependent libraries X programs must link with.
4988   # Do this before checking for the system-independent R6 libraries
4989   # (-lICE), since we may need -lsocket or whatever for X linking.
4990
4991   if test "$ISC" = yes; then
4992     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4993   else
4994     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4995     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4996     # the Alpha needs dnet_stub (dnet does not exist).
4997     if test "$with_dnet" = "no" ; then
4998 ac_cv_lib_dnet_dnet_ntoa=no
4999 else
5000
5001 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5002 echo "configure:5003: checking for dnet_ntoa in -ldnet" >&5
5003 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5004
5005 xe_check_libs=" -ldnet "
5006 cat > conftest.$ac_ext <<EOF
5007 #line 5008 "configure"
5008 #include "confdefs.h"
5009 /* Override any gcc2 internal prototype to avoid an error.  */
5010 /* We use char because int might match the return type of a gcc2
5011     builtin and then its argument prototype would still apply.  */
5012 char dnet_ntoa();
5013
5014 int main() {
5015 dnet_ntoa()
5016 ; return 0; }
5017 EOF
5018 if { (eval echo configure:5019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5019   rm -rf conftest*
5020   eval "ac_cv_lib_$ac_lib_var=yes"
5021 else
5022   echo "configure: failed program was:" >&5
5023   cat conftest.$ac_ext >&5
5024   rm -rf conftest*
5025   eval "ac_cv_lib_$ac_lib_var=no"
5026 fi
5027 rm -f conftest*
5028 xe_check_libs=""
5029
5030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5031   echo "$ac_t""yes" 1>&6
5032   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5033 else
5034   echo "$ac_t""no" 1>&6
5035 fi
5036
5037 fi
5038
5039     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5040       
5041 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5042 echo "configure:5043: checking for dnet_ntoa in -ldnet_stub" >&5
5043 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5044
5045 xe_check_libs=" -ldnet_stub "
5046 cat > conftest.$ac_ext <<EOF
5047 #line 5048 "configure"
5048 #include "confdefs.h"
5049 /* Override any gcc2 internal prototype to avoid an error.  */
5050 /* We use char because int might match the return type of a gcc2
5051     builtin and then its argument prototype would still apply.  */
5052 char dnet_ntoa();
5053
5054 int main() {
5055 dnet_ntoa()
5056 ; return 0; }
5057 EOF
5058 if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5059   rm -rf conftest*
5060   eval "ac_cv_lib_$ac_lib_var=yes"
5061 else
5062   echo "configure: failed program was:" >&5
5063   cat conftest.$ac_ext >&5
5064   rm -rf conftest*
5065   eval "ac_cv_lib_$ac_lib_var=no"
5066 fi
5067 rm -f conftest*
5068 xe_check_libs=""
5069
5070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5071   echo "$ac_t""yes" 1>&6
5072   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5073 else
5074   echo "$ac_t""no" 1>&6
5075 fi
5076
5077
5078     fi
5079
5080     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5081     # to get the SysV transport functions.
5082     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5083     # needs -lnsl.
5084     # The nsl library prevents programs from opening the X display
5085     # on Irix 5.2, according to dickey@clark.net.
5086     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5087 echo "configure:5088: checking for gethostbyname" >&5
5088
5089 cat > conftest.$ac_ext <<EOF
5090 #line 5091 "configure"
5091 #include "confdefs.h"
5092 /* System header to define __stub macros and hopefully few prototypes,
5093     which can conflict with char gethostbyname(); below.  */
5094 #include <assert.h>
5095 /* Override any gcc2 internal prototype to avoid an error.  */
5096 /* We use char because int might match the return type of a gcc2
5097     builtin and then its argument prototype would still apply.  */
5098 char gethostbyname();
5099
5100 int main() {
5101
5102 /* The GNU C library defines this for functions which it implements
5103     to always fail with ENOSYS.  Some functions are actually named
5104     something starting with __ and the normal name is an alias.  */
5105 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5106 choke me
5107 #else
5108 gethostbyname();
5109 #endif
5110
5111 ; return 0; }
5112 EOF
5113 if { (eval echo configure:5114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5114   rm -rf conftest*
5115   eval "ac_cv_func_gethostbyname=yes"
5116 else
5117   echo "configure: failed program was:" >&5
5118   cat conftest.$ac_ext >&5
5119   rm -rf conftest*
5120   eval "ac_cv_func_gethostbyname=no"
5121 fi
5122 rm -f conftest*
5123
5124 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5125   echo "$ac_t""yes" 1>&6
5126   :
5127 else
5128   echo "$ac_t""no" 1>&6
5129 fi
5130
5131     if test $ac_cv_func_gethostbyname = no; then
5132       
5133 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5134 echo "configure:5135: checking for gethostbyname in -lnsl" >&5
5135 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5136
5137 xe_check_libs=" -lnsl "
5138 cat > conftest.$ac_ext <<EOF
5139 #line 5140 "configure"
5140 #include "confdefs.h"
5141 /* Override any gcc2 internal prototype to avoid an error.  */
5142 /* We use char because int might match the return type of a gcc2
5143     builtin and then its argument prototype would still apply.  */
5144 char gethostbyname();
5145
5146 int main() {
5147 gethostbyname()
5148 ; return 0; }
5149 EOF
5150 if { (eval echo configure:5151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5151   rm -rf conftest*
5152   eval "ac_cv_lib_$ac_lib_var=yes"
5153 else
5154   echo "configure: failed program was:" >&5
5155   cat conftest.$ac_ext >&5
5156   rm -rf conftest*
5157   eval "ac_cv_lib_$ac_lib_var=no"
5158 fi
5159 rm -f conftest*
5160 xe_check_libs=""
5161
5162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5163   echo "$ac_t""yes" 1>&6
5164   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5165 else
5166   echo "$ac_t""no" 1>&6
5167 fi
5168
5169
5170     fi
5171
5172     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5173     # socket/setsockopt and other routines are undefined under SCO ODT
5174     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5175     # on later versions), says simon@lia.di.epfl.ch: it contains
5176     # gethostby* variants that don't use the nameserver (or something).
5177     # -lsocket must be given before -lnsl if both are needed.
5178     # We assume that if connect needs -lnsl, so does gethostbyname.
5179     echo $ac_n "checking for connect""... $ac_c" 1>&6
5180 echo "configure:5181: checking for connect" >&5
5181
5182 cat > conftest.$ac_ext <<EOF
5183 #line 5184 "configure"
5184 #include "confdefs.h"
5185 /* System header to define __stub macros and hopefully few prototypes,
5186     which can conflict with char connect(); below.  */
5187 #include <assert.h>
5188 /* Override any gcc2 internal prototype to avoid an error.  */
5189 /* We use char because int might match the return type of a gcc2
5190     builtin and then its argument prototype would still apply.  */
5191 char connect();
5192
5193 int main() {
5194
5195 /* The GNU C library defines this for functions which it implements
5196     to always fail with ENOSYS.  Some functions are actually named
5197     something starting with __ and the normal name is an alias.  */
5198 #if defined (__stub_connect) || defined (__stub___connect)
5199 choke me
5200 #else
5201 connect();
5202 #endif
5203
5204 ; return 0; }
5205 EOF
5206 if { (eval echo configure:5207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5207   rm -rf conftest*
5208   eval "ac_cv_func_connect=yes"
5209 else
5210   echo "configure: failed program was:" >&5
5211   cat conftest.$ac_ext >&5
5212   rm -rf conftest*
5213   eval "ac_cv_func_connect=no"
5214 fi
5215 rm -f conftest*
5216
5217 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5218   echo "$ac_t""yes" 1>&6
5219   :
5220 else
5221   echo "$ac_t""no" 1>&6
5222 fi
5223
5224     if test $ac_cv_func_connect = no; then
5225       
5226 xe_msg_checking="for connect in -lsocket"
5227 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5228 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5229 echo "configure:5230: checking "$xe_msg_checking"" >&5
5230 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5231
5232 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5233 cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236 /* Override any gcc2 internal prototype to avoid an error.  */
5237 /* We use char because int might match the return type of a gcc2
5238     builtin and then its argument prototype would still apply.  */
5239 char connect();
5240
5241 int main() {
5242 connect()
5243 ; return 0; }
5244 EOF
5245 if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5246   rm -rf conftest*
5247   eval "ac_cv_lib_$ac_lib_var=yes"
5248 else
5249   echo "configure: failed program was:" >&5
5250   cat conftest.$ac_ext >&5
5251   rm -rf conftest*
5252   eval "ac_cv_lib_$ac_lib_var=no"
5253 fi
5254 rm -f conftest*
5255 xe_check_libs=""
5256
5257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5258   echo "$ac_t""yes" 1>&6
5259   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5260 else
5261   echo "$ac_t""no" 1>&6
5262 fi
5263
5264
5265     fi
5266
5267     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5268     echo $ac_n "checking for remove""... $ac_c" 1>&6
5269 echo "configure:5270: checking for remove" >&5
5270
5271 cat > conftest.$ac_ext <<EOF
5272 #line 5273 "configure"
5273 #include "confdefs.h"
5274 /* System header to define __stub macros and hopefully few prototypes,
5275     which can conflict with char remove(); below.  */
5276 #include <assert.h>
5277 /* Override any gcc2 internal prototype to avoid an error.  */
5278 /* We use char because int might match the return type of a gcc2
5279     builtin and then its argument prototype would still apply.  */
5280 char remove();
5281
5282 int main() {
5283
5284 /* The GNU C library defines this for functions which it implements
5285     to always fail with ENOSYS.  Some functions are actually named
5286     something starting with __ and the normal name is an alias.  */
5287 #if defined (__stub_remove) || defined (__stub___remove)
5288 choke me
5289 #else
5290 remove();
5291 #endif
5292
5293 ; return 0; }
5294 EOF
5295 if { (eval echo configure:5296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5296   rm -rf conftest*
5297   eval "ac_cv_func_remove=yes"
5298 else
5299   echo "configure: failed program was:" >&5
5300   cat conftest.$ac_ext >&5
5301   rm -rf conftest*
5302   eval "ac_cv_func_remove=no"
5303 fi
5304 rm -f conftest*
5305
5306 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5307   echo "$ac_t""yes" 1>&6
5308   :
5309 else
5310   echo "$ac_t""no" 1>&6
5311 fi
5312
5313     if test $ac_cv_func_remove = no; then
5314       
5315 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5316 echo "configure:5317: checking for remove in -lposix" >&5
5317 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5318
5319 xe_check_libs=" -lposix "
5320 cat > conftest.$ac_ext <<EOF
5321 #line 5322 "configure"
5322 #include "confdefs.h"
5323 /* Override any gcc2 internal prototype to avoid an error.  */
5324 /* We use char because int might match the return type of a gcc2
5325     builtin and then its argument prototype would still apply.  */
5326 char remove();
5327
5328 int main() {
5329 remove()
5330 ; return 0; }
5331 EOF
5332 if { (eval echo configure:5333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5333   rm -rf conftest*
5334   eval "ac_cv_lib_$ac_lib_var=yes"
5335 else
5336   echo "configure: failed program was:" >&5
5337   cat conftest.$ac_ext >&5
5338   rm -rf conftest*
5339   eval "ac_cv_lib_$ac_lib_var=no"
5340 fi
5341 rm -f conftest*
5342 xe_check_libs=""
5343
5344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5345   echo "$ac_t""yes" 1>&6
5346   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5347 else
5348   echo "$ac_t""no" 1>&6
5349 fi
5350
5351
5352     fi
5353
5354     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5355     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5356 echo "configure:5357: checking for shmat" >&5
5357
5358 cat > conftest.$ac_ext <<EOF
5359 #line 5360 "configure"
5360 #include "confdefs.h"
5361 /* System header to define __stub macros and hopefully few prototypes,
5362     which can conflict with char shmat(); below.  */
5363 #include <assert.h>
5364 /* Override any gcc2 internal prototype to avoid an error.  */
5365 /* We use char because int might match the return type of a gcc2
5366     builtin and then its argument prototype would still apply.  */
5367 char shmat();
5368
5369 int main() {
5370
5371 /* The GNU C library defines this for functions which it implements
5372     to always fail with ENOSYS.  Some functions are actually named
5373     something starting with __ and the normal name is an alias.  */
5374 #if defined (__stub_shmat) || defined (__stub___shmat)
5375 choke me
5376 #else
5377 shmat();
5378 #endif
5379
5380 ; return 0; }
5381 EOF
5382 if { (eval echo configure:5383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5383   rm -rf conftest*
5384   eval "ac_cv_func_shmat=yes"
5385 else
5386   echo "configure: failed program was:" >&5
5387   cat conftest.$ac_ext >&5
5388   rm -rf conftest*
5389   eval "ac_cv_func_shmat=no"
5390 fi
5391 rm -f conftest*
5392
5393 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5394   echo "$ac_t""yes" 1>&6
5395   :
5396 else
5397   echo "$ac_t""no" 1>&6
5398 fi
5399
5400     if test $ac_cv_func_shmat = no; then
5401       
5402 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5403 echo "configure:5404: checking for shmat in -lipc" >&5
5404 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5405
5406 xe_check_libs=" -lipc "
5407 cat > conftest.$ac_ext <<EOF
5408 #line 5409 "configure"
5409 #include "confdefs.h"
5410 /* Override any gcc2 internal prototype to avoid an error.  */
5411 /* We use char because int might match the return type of a gcc2
5412     builtin and then its argument prototype would still apply.  */
5413 char shmat();
5414
5415 int main() {
5416 shmat()
5417 ; return 0; }
5418 EOF
5419 if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5420   rm -rf conftest*
5421   eval "ac_cv_lib_$ac_lib_var=yes"
5422 else
5423   echo "configure: failed program was:" >&5
5424   cat conftest.$ac_ext >&5
5425   rm -rf conftest*
5426   eval "ac_cv_lib_$ac_lib_var=no"
5427 fi
5428 rm -f conftest*
5429 xe_check_libs=""
5430
5431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5432   echo "$ac_t""yes" 1>&6
5433   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5434 else
5435   echo "$ac_t""no" 1>&6
5436 fi
5437
5438
5439     fi
5440   fi
5441
5442   # Check for libraries that X11R6 Xt/Xaw programs need.
5443   ac_save_LDFLAGS="$LDFLAGS"
5444   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5445   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5446   # check for ICE first), but we must link in the order -lSM -lICE or
5447   # we get undefined symbols.  So assume we have SM if we have ICE.
5448   # These have to be linked with before -lX11, unlike the other
5449   # libraries we check for below, so use a different variable.
5450   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5451   
5452 xe_msg_checking="for IceConnectionNumber in -lICE"
5453 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5454 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5455 echo "configure:5456: checking "$xe_msg_checking"" >&5
5456 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5457
5458 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5459 cat > conftest.$ac_ext <<EOF
5460 #line 5461 "configure"
5461 #include "confdefs.h"
5462 /* Override any gcc2 internal prototype to avoid an error.  */
5463 /* We use char because int might match the return type of a gcc2
5464     builtin and then its argument prototype would still apply.  */
5465 char IceConnectionNumber();
5466
5467 int main() {
5468 IceConnectionNumber()
5469 ; return 0; }
5470 EOF
5471 if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5472   rm -rf conftest*
5473   eval "ac_cv_lib_$ac_lib_var=yes"
5474 else
5475   echo "configure: failed program was:" >&5
5476   cat conftest.$ac_ext >&5
5477   rm -rf conftest*
5478   eval "ac_cv_lib_$ac_lib_var=no"
5479 fi
5480 rm -f conftest*
5481 xe_check_libs=""
5482
5483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5484   echo "$ac_t""yes" 1>&6
5485   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5486 else
5487   echo "$ac_t""no" 1>&6
5488 fi
5489
5490
5491   LDFLAGS="$ac_save_LDFLAGS"
5492
5493 fi
5494  # Autoconf claims to find X library and include dirs for us.
5495   if test "$no_x" = "yes"
5496   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5497   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5498   fi
5499 fi
5500
5501 case "$with_x11" in
5502   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5503   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5504 esac
5505
5506 if test "$with_x11" = "yes"; then
5507   { test "$extra_verbose" = "yes" && cat << \EOF
5508     Defining HAVE_X_WINDOWS
5509 EOF
5510 cat >> confdefs.h <<\EOF
5511 #define HAVE_X_WINDOWS 1
5512 EOF
5513 }
5514
5515   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5516   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5517
5518       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5519     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5520     if test -d "$lib_dir" -a -d "$inc_dir"; then
5521       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5522         x_libraries="$lib_dir $x_libraries"
5523         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5524       esac
5525       case "$x_includes" in "$inc_dir"* ) ;; *)
5526         x_includes="$inc_dir $x_includes"
5527         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5528       esac
5529       break;       fi
5530   done
5531
5532     for rel in "X11R6" "X11R5" "X11R4"; do
5533     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5534     if test -d "$lib_dir" -a -d "$inc_dir"; then
5535       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5536         x_libraries="$x_libraries $lib_dir"
5537         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5538       esac
5539       case "$x_includes" in "$inc_dir"* ) ;; *)
5540         x_includes="$x_includes $inc_dir"
5541         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5542       esac
5543       break;     fi
5544   done
5545
5546     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
5547
5548   ld_switch_x_site="$X_LIBS"
5549
5550   
5551 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5552     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5553   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5554   
5555         runpath="" runpath_dirs=""
5556   if test -n "$LD_RUN_PATH"; then
5557     runpath="$LD_RUN_PATH"
5558   elif test "$GCC" = "yes"; then
5559         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5560     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5561     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5562     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5563       case "$arg" in P,* | -L* | -R* )
5564         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5565           {
5566 xe_runpath_dir="$dir"
5567   test "$xe_runpath_dir" != "/lib"     -a \
5568         "$xe_runpath_dir" != "/usr/lib" -a \
5569         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5570   eval "$xe_add_unique_runpath_dir"
5571 }
5572         done ;;
5573       esac
5574     done
5575     ld_switch_run="$ld_switch_run_save"
5576     rm -f conftest*
5577   else
5578         for arg in $ld_switch_site $ld_switch_x_site; do
5579       case "$arg" in -L*) {
5580 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5581   test "$xe_runpath_dir" != "/lib"     -a \
5582         "$xe_runpath_dir" != "/usr/lib" -a \
5583         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5584   eval "$xe_add_unique_runpath_dir"
5585 };; esac
5586     done
5587         if test "$opsys $need_motif" = "sol2 yes"; then
5588       xe_runpath_dir="/opt/SUNWdt/lib";
5589       eval "$xe_add_unique_runpath_dir";
5590     fi
5591   fi 
5592   if test -n "$runpath"; then
5593     ld_switch_run="${dash_r}${runpath}"
5594     
5595 if test "$GCC" = "yes"; then
5596   set x $ld_switch_run; shift; ld_switch_run=""
5597   while test -n "$1"; do
5598     case $1 in
5599       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5600       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5601       -Xlinker* ) ;;
5602       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5603     esac
5604     shift
5605   done
5606 fi
5607     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5608   fi
5609 fi
5610
5611
5612   if test "$extra_verbose" = "yes"; then
5613     echo; echo "X11 compilation variables:"
5614     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5615     echo
5616   fi
5617
5618             bitmapdirs=
5619   if test "$x_includes" != NONE; then
5620     for i in $x_includes; do
5621       if test -d "$i/bitmaps"; then
5622         bitmapdirs="$i/bitmaps:$bitmapdirs"
5623       fi
5624       if test -d "$i/X11/bitmaps"; then
5625         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5626       fi
5627     done
5628     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5629   fi
5630   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5631     Defining BITMAPDIR = "$bitmapdirs"
5632 EOF
5633 cat >> confdefs.h <<EOF
5634 #define BITMAPDIR "$bitmapdirs"
5635 EOF
5636 }
5637
5638
5639     echo "checking for X defines extracted by xmkmf" 1>&6
5640 echo "configure:5641: checking for X defines extracted by xmkmf" >&5
5641   rm -fr conftestdir
5642   if mkdir conftestdir; then
5643     cd conftestdir
5644     cat > Imakefile <<'EOF'
5645 xetest:
5646         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5647 EOF
5648     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5649       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5650       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5651     fi
5652     cd ..
5653     rm -fr conftestdir
5654     for word in $xmkmf_defines; do
5655       case "$word" in
5656         -D*=* ) ;;
5657         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5658               { test "$extra_verbose" = "yes" && cat << EOF
5659     Defining $word
5660 EOF
5661 cat >> confdefs.h <<EOF
5662 #define $word 1
5663 EOF
5664 }
5665  ;;
5666       esac
5667     done
5668   fi
5669
5670     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5671 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5672 echo "configure:5673: checking for X11/Intrinsic.h" >&5
5673
5674 cat > conftest.$ac_ext <<EOF
5675 #line 5676 "configure"
5676 #include "confdefs.h"
5677 #include <X11/Intrinsic.h>
5678 EOF
5679 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5680 { (eval echo configure:5681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5681 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5682 if test -z "$ac_err"; then
5683   rm -rf conftest*
5684   eval "ac_cv_header_$ac_safe=yes"
5685 else
5686   echo "$ac_err" >&5
5687   echo "configure: failed program was:" >&5
5688   cat conftest.$ac_ext >&5
5689   rm -rf conftest*
5690   eval "ac_cv_header_$ac_safe=no"
5691 fi
5692 rm -f conftest*
5693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5694   echo "$ac_t""yes" 1>&6
5695   :
5696 else
5697   echo "$ac_t""no" 1>&6
5698 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5699 fi
5700
5701
5702       
5703 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5704 echo "configure:5705: checking for XOpenDisplay in -lX11" >&5
5705 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5706
5707 xe_check_libs=" -lX11 "
5708 cat > conftest.$ac_ext <<EOF
5709 #line 5710 "configure"
5710 #include "confdefs.h"
5711 /* Override any gcc2 internal prototype to avoid an error.  */
5712 /* We use char because int might match the return type of a gcc2
5713     builtin and then its argument prototype would still apply.  */
5714 char XOpenDisplay();
5715
5716 int main() {
5717 XOpenDisplay()
5718 ; return 0; }
5719 EOF
5720 if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5721   rm -rf conftest*
5722   eval "ac_cv_lib_$ac_lib_var=yes"
5723 else
5724   echo "configure: failed program was:" >&5
5725   cat conftest.$ac_ext >&5
5726   rm -rf conftest*
5727   eval "ac_cv_lib_$ac_lib_var=no"
5728 fi
5729 rm -f conftest*
5730 xe_check_libs=""
5731
5732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5733   echo "$ac_t""yes" 1>&6
5734   have_lib_x11=yes
5735 else
5736   echo "$ac_t""no" 1>&6
5737 fi
5738
5739
5740   if test "$have_lib_x11" != "yes"; then
5741     
5742 xe_msg_checking="for XGetFontProperty in -lX11"
5743 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5744 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5745 echo "configure:5746: checking "$xe_msg_checking"" >&5
5746 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5747
5748 xe_check_libs=" -lX11 -b i486-linuxaout"
5749 cat > conftest.$ac_ext <<EOF
5750 #line 5751 "configure"
5751 #include "confdefs.h"
5752 /* Override any gcc2 internal prototype to avoid an error.  */
5753 /* We use char because int might match the return type of a gcc2
5754     builtin and then its argument prototype would still apply.  */
5755 char XGetFontProperty();
5756
5757 int main() {
5758 XGetFontProperty()
5759 ; return 0; }
5760 EOF
5761 if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5762   rm -rf conftest*
5763   eval "ac_cv_lib_$ac_lib_var=yes"
5764 else
5765   echo "configure: failed program was:" >&5
5766   cat conftest.$ac_ext >&5
5767   rm -rf conftest*
5768   eval "ac_cv_lib_$ac_lib_var=no"
5769 fi
5770 rm -f conftest*
5771 xe_check_libs=""
5772
5773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5774   echo "$ac_t""yes" 1>&6
5775   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5776 else
5777   echo "$ac_t""no" 1>&6
5778 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5779 fi
5780
5781
5782   fi
5783   libs_x="-lX11"
5784   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5785
5786     
5787 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5788 echo "configure:5789: checking for XShapeSelectInput in -lXext" >&5
5789 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5790
5791 xe_check_libs=" -lXext "
5792 cat > conftest.$ac_ext <<EOF
5793 #line 5794 "configure"
5794 #include "confdefs.h"
5795 /* Override any gcc2 internal prototype to avoid an error.  */
5796 /* We use char because int might match the return type of a gcc2
5797     builtin and then its argument prototype would still apply.  */
5798 char XShapeSelectInput();
5799
5800 int main() {
5801 XShapeSelectInput()
5802 ; return 0; }
5803 EOF
5804 if { (eval echo configure:5805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5805   rm -rf conftest*
5806   eval "ac_cv_lib_$ac_lib_var=yes"
5807 else
5808   echo "configure: failed program was:" >&5
5809   cat conftest.$ac_ext >&5
5810   rm -rf conftest*
5811   eval "ac_cv_lib_$ac_lib_var=no"
5812 fi
5813 rm -f conftest*
5814 xe_check_libs=""
5815
5816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5817   echo "$ac_t""yes" 1>&6
5818   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5819 else
5820   echo "$ac_t""no" 1>&6
5821 fi
5822
5823
5824
5825     
5826 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5827 echo "configure:5828: checking for XtOpenDisplay in -lXt" >&5
5828 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5829
5830 xe_check_libs=" -lXt "
5831 cat > conftest.$ac_ext <<EOF
5832 #line 5833 "configure"
5833 #include "confdefs.h"
5834 /* Override any gcc2 internal prototype to avoid an error.  */
5835 /* We use char because int might match the return type of a gcc2
5836     builtin and then its argument prototype would still apply.  */
5837 char XtOpenDisplay();
5838
5839 int main() {
5840 XtOpenDisplay()
5841 ; return 0; }
5842 EOF
5843 if { (eval echo configure:5844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5844   rm -rf conftest*
5845   eval "ac_cv_lib_$ac_lib_var=yes"
5846 else
5847   echo "configure: failed program was:" >&5
5848   cat conftest.$ac_ext >&5
5849   rm -rf conftest*
5850   eval "ac_cv_lib_$ac_lib_var=no"
5851 fi
5852 rm -f conftest*
5853 xe_check_libs=""
5854
5855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5856   echo "$ac_t""yes" 1>&6
5857   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5858 else
5859   echo "$ac_t""no" 1>&6
5860 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5861 fi
5862
5863
5864
5865   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5866 echo "configure:5867: checking the version of X11 being used" >&5
5867   cat > conftest.$ac_ext <<EOF
5868 #line 5869 "configure"
5869 #include "confdefs.h"
5870 #include <X11/Intrinsic.h>
5871     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5872 EOF
5873 if { (eval echo configure:5874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5874 then
5875   ./conftest foobar; x11_release=$?
5876 else
5877   conftest_rc="$?"
5878   echo "configure: failed program was:" >&5
5879   cat conftest.$ac_ext >&5
5880   rm -fr conftest*
5881   x11_release=4
5882 fi
5883 rm -fr conftest*
5884   echo "$ac_t""R${x11_release}" 1>&6
5885   { test "$extra_verbose" = "yes" && cat << EOF
5886     Defining THIS_IS_X11R${x11_release}
5887 EOF
5888 cat >> confdefs.h <<EOF
5889 #define THIS_IS_X11R${x11_release} 1
5890 EOF
5891 }
5892
5893
5894   for ac_hdr in X11/Xlocale.h
5895 do
5896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5898 echo "configure:5899: checking for $ac_hdr" >&5
5899
5900 cat > conftest.$ac_ext <<EOF
5901 #line 5902 "configure"
5902 #include "confdefs.h"
5903 #include <$ac_hdr>
5904 EOF
5905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5906 { (eval echo configure:5907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5908 if test -z "$ac_err"; then
5909   rm -rf conftest*
5910   eval "ac_cv_header_$ac_safe=yes"
5911 else
5912   echo "$ac_err" >&5
5913   echo "configure: failed program was:" >&5
5914   cat conftest.$ac_ext >&5
5915   rm -rf conftest*
5916   eval "ac_cv_header_$ac_safe=no"
5917 fi
5918 rm -f conftest*
5919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5920   echo "$ac_t""yes" 1>&6
5921     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5922   { test "$extra_verbose" = "yes" && cat << EOF
5923     Defining $ac_tr_hdr
5924 EOF
5925 cat >> confdefs.h <<EOF
5926 #define $ac_tr_hdr 1
5927 EOF
5928 }
5929  
5930 else
5931   echo "$ac_t""no" 1>&6
5932 fi
5933 done
5934
5935
5936     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5937 echo "configure:5938: checking for XFree86" >&5
5938   if test -d "/usr/X386/include" -o \
5939           -f "/etc/XF86Config"    -o \
5940           -f "/etc/X11/XF86Config" -o \
5941           -f "/usr/X11R6/lib/X11/XF86Config"; then
5942     echo "$ac_t""yes" 1>&6
5943     { test "$extra_verbose" = "yes" && cat << \EOF
5944     Defining HAVE_XFREE386
5945 EOF
5946 cat >> confdefs.h <<\EOF
5947 #define HAVE_XFREE386 1
5948 EOF
5949 }
5950
5951   else
5952     echo "$ac_t""no" 1>&6
5953   fi
5954
5955     test -z "$with_xmu" && { 
5956 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5957 echo "configure:5958: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5958 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5959
5960 xe_check_libs=" -lXmu "
5961 cat > conftest.$ac_ext <<EOF
5962 #line 5963 "configure"
5963 #include "confdefs.h"
5964 /* Override any gcc2 internal prototype to avoid an error.  */
5965 /* We use char because int might match the return type of a gcc2
5966     builtin and then its argument prototype would still apply.  */
5967 char XmuReadBitmapDataFromFile();
5968
5969 int main() {
5970 XmuReadBitmapDataFromFile()
5971 ; return 0; }
5972 EOF
5973 if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5974   rm -rf conftest*
5975   eval "ac_cv_lib_$ac_lib_var=yes"
5976 else
5977   echo "configure: failed program was:" >&5
5978   cat conftest.$ac_ext >&5
5979   rm -rf conftest*
5980   eval "ac_cv_lib_$ac_lib_var=no"
5981 fi
5982 rm -f conftest*
5983 xe_check_libs=""
5984
5985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5986   echo "$ac_t""yes" 1>&6
5987   with_xmu=yes
5988 else
5989   echo "$ac_t""no" 1>&6
5990 with_xmu=no
5991 fi
5992
5993  }
5994   if test "$with_xmu" = "no"; then
5995     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
5996    echo "    xemacs will be linked with \"xmu.o\""
5997  fi
5998   else
5999     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6000     { test "$extra_verbose" = "yes" && cat << \EOF
6001     Defining HAVE_XMU
6002 EOF
6003 cat >> confdefs.h <<\EOF
6004 #define HAVE_XMU 1
6005 EOF
6006 }
6007
6008   fi
6009
6010       
6011 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6012 echo "configure:6013: checking for main in -lXbsd" >&5
6013 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6014
6015 xe_check_libs=" -lXbsd "
6016 cat > conftest.$ac_ext <<EOF
6017 #line 6018 "configure"
6018 #include "confdefs.h"
6019
6020 int main() {
6021 main()
6022 ; return 0; }
6023 EOF
6024 if { (eval echo configure:6025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6025   rm -rf conftest*
6026   eval "ac_cv_lib_$ac_lib_var=yes"
6027 else
6028   echo "configure: failed program was:" >&5
6029   cat conftest.$ac_ext >&5
6030   rm -rf conftest*
6031   eval "ac_cv_lib_$ac_lib_var=no"
6032 fi
6033 rm -f conftest*
6034 xe_check_libs=""
6035
6036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6037   echo "$ac_t""yes" 1>&6
6038   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6039 else
6040   echo "$ac_t""no" 1>&6
6041 fi
6042
6043
6044
6045     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6046         if test "$GCC" = "yes"; then
6047       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6048       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6049     else
6050       case "$CC" in
6051         "xlc" ) CC="xlc_r" ;;
6052         "xlC" ) CC="xlC_r" ;;
6053         "cc"  ) CC="cc_r" ;;
6054       esac
6055     fi
6056   fi
6057
6058 fi 
6059 if test "$with_msw" != "no"; then
6060   echo "checking for MS-Windows" 1>&6
6061 echo "configure:6062: checking for MS-Windows" >&5
6062   
6063 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6064 echo "configure:6065: checking for main in -lgdi32" >&5
6065 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6066
6067 xe_check_libs=" -lgdi32 "
6068 cat > conftest.$ac_ext <<EOF
6069 #line 6070 "configure"
6070 #include "confdefs.h"
6071
6072 int main() {
6073 main()
6074 ; return 0; }
6075 EOF
6076 if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6077   rm -rf conftest*
6078   eval "ac_cv_lib_$ac_lib_var=yes"
6079 else
6080   echo "configure: failed program was:" >&5
6081   cat conftest.$ac_ext >&5
6082   rm -rf conftest*
6083   eval "ac_cv_lib_$ac_lib_var=no"
6084 fi
6085 rm -f conftest*
6086 xe_check_libs=""
6087
6088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6089   echo "$ac_t""yes" 1>&6
6090   with_msw=yes
6091 else
6092   echo "$ac_t""no" 1>&6
6093 fi
6094
6095
6096   if test "$with_msw" = "yes"; then
6097     { test "$extra_verbose" = "yes" && cat << \EOF
6098     Defining HAVE_MS_WINDOWS
6099 EOF
6100 cat >> confdefs.h <<\EOF
6101 #define HAVE_MS_WINDOWS 1
6102 EOF
6103 }
6104
6105     install_pp="$blddir/lib-src/installexe.sh"
6106     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
6107     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6108     if test "$window_system" != x11; then
6109         window_system=msw
6110         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6111             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6112    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6113  fi
6114         test "$with_menubars"   != "no" && with_menubars=msw \
6115             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6116    echo "    xemacs will be linked with \"menubar-msw.o\""
6117  fi
6118         test "$with_toolbars"   != "no" && with_toolbars=msw \
6119             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6120    echo "    xemacs will be linked with \"toolbar-msw.o\""
6121  fi
6122         test "$with_dialogs"   != "no" && with_dialogs=msw \
6123             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6124    echo "    xemacs will be linked with \"dialog-msw.o\""
6125  fi
6126         test "$with_widgets"   != "no" && with_widgets=msw
6127     else
6128         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6129    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6130  fi
6131         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6132    echo "    xemacs will be linked with \"menubar-msw.o\""
6133  fi
6134         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6135    echo "    xemacs will be linked with \"toolbar-msw.o\""
6136  fi
6137         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6138    echo "    xemacs will be linked with \"dialog-msw.o\""
6139  fi
6140     fi
6141         cat > conftest.$ac_ext <<EOF
6142 #line 6143 "configure"
6143 #include "confdefs.h"
6144 #include <fcntl.h>
6145     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6146 EOF
6147 if { (eval echo configure:6148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6148 then
6149   { test "$extra_verbose" = "yes" && cat << \EOF
6150     Defining HAVE_MSG_SELECT
6151 EOF
6152 cat >> confdefs.h <<\EOF
6153 #define HAVE_MSG_SELECT 1
6154 EOF
6155 }
6156
6157 else
6158   conftest_rc="$?"
6159   echo "configure: failed program was:" >&5
6160   cat conftest.$ac_ext >&5
6161 fi
6162 rm -fr conftest*
6163     const_is_losing=no
6164     with_file_coding=yes
6165     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
6166    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\""
6167  fi
6168   fi
6169 fi
6170
6171
6172
6173 test -z "$window_system" && window_system="none"
6174
6175 if test "$window_system" = "none"; then
6176   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6177   do
6178     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6179        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6180     fi
6181     eval "with_${feature}=no"
6182   done
6183 else
6184   test -z "$with_toolbars" && with_toolbars=yes
6185 fi
6186
6187 if test "$with_msw" != "yes"; then
6188   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6189   do
6190     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6191        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6192     fi
6193     eval "with_${feature}=no"
6194   done
6195 else
6196   :
6197 fi
6198
6199 if test "$with_x11" != "yes"; then
6200             for feature in tooltalk cde offix wmcommand xim xmu xpm nas_sound
6201   do
6202     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6203        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6204     fi
6205     eval "with_${feature}=no"
6206   done
6207 fi
6208
6209 bitmapdir=
6210
6211 case "$window_system" in
6212   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6213   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6214   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6215 esac
6216
6217 case "$x_libraries" in *X11R4* )
6218   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6219   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6220 esac
6221
6222 echo "checking for WM_COMMAND option" 1>&6
6223 echo "configure:6224: checking for WM_COMMAND option" >&5;
6224 if test "$with_wmcommand" != "no"; then
6225   { test "$extra_verbose" = "yes" && cat << \EOF
6226     Defining HAVE_WMCOMMAND
6227 EOF
6228 cat >> confdefs.h <<\EOF
6229 #define HAVE_WMCOMMAND 1
6230 EOF
6231 }
6232
6233 fi
6234
6235 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6236 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6237 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6238 echo "configure:6239: checking for X11/Xauth.h" >&5
6239
6240 cat > conftest.$ac_ext <<EOF
6241 #line 6242 "configure"
6242 #include "confdefs.h"
6243 #include <X11/Xauth.h>
6244 EOF
6245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6246 { (eval echo configure:6247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6248 if test -z "$ac_err"; then
6249   rm -rf conftest*
6250   eval "ac_cv_header_$ac_safe=yes"
6251 else
6252   echo "$ac_err" >&5
6253   echo "configure: failed program was:" >&5
6254   cat conftest.$ac_ext >&5
6255   rm -rf conftest*
6256   eval "ac_cv_header_$ac_safe=no"
6257 fi
6258 rm -f conftest*
6259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6260   echo "$ac_t""yes" 1>&6
6261   :
6262 else
6263   echo "$ac_t""no" 1>&6
6264 with_xauth=no
6265 fi
6266  }
6267 test -z "$with_xauth" && { 
6268 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6269 echo "configure:6270: checking for XauGetAuthByAddr in -lXau" >&5
6270 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6271
6272 xe_check_libs=" -lXau "
6273 cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276 /* Override any gcc2 internal prototype to avoid an error.  */
6277 /* We use char because int might match the return type of a gcc2
6278     builtin and then its argument prototype would still apply.  */
6279 char XauGetAuthByAddr();
6280
6281 int main() {
6282 XauGetAuthByAddr()
6283 ; return 0; }
6284 EOF
6285 if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6286   rm -rf conftest*
6287   eval "ac_cv_lib_$ac_lib_var=yes"
6288 else
6289   echo "configure: failed program was:" >&5
6290   cat conftest.$ac_ext >&5
6291   rm -rf conftest*
6292   eval "ac_cv_lib_$ac_lib_var=no"
6293 fi
6294 rm -f conftest*
6295 xe_check_libs=""
6296
6297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6298   echo "$ac_t""yes" 1>&6
6299   :
6300 else
6301   echo "$ac_t""no" 1>&6
6302 with_xauth=no
6303 fi
6304
6305  }
6306 test -z "$with_xauth" && with_xauth=yes
6307 if test "$with_xauth" = "yes"; then
6308   { test "$extra_verbose" = "yes" && cat << \EOF
6309     Defining HAVE_XAUTH
6310 EOF
6311 cat >> confdefs.h <<\EOF
6312 #define HAVE_XAUTH 1
6313 EOF
6314 }
6315
6316   
6317 T=""
6318 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
6319 libs_xauth="$T"
6320
6321 fi
6322
6323
6324
6325
6326 if test "$with_tooltalk" != "no" ; then
6327       for dir in "" "Tt/" "desktop/" ; do
6328     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6329 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6330 echo "configure:6331: checking for ${dir}tt_c.h" >&5
6331
6332 cat > conftest.$ac_ext <<EOF
6333 #line 6334 "configure"
6334 #include "confdefs.h"
6335 #include <${dir}tt_c.h>
6336 EOF
6337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6338 { (eval echo configure:6339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6340 if test -z "$ac_err"; then
6341   rm -rf conftest*
6342   eval "ac_cv_header_$ac_safe=yes"
6343 else
6344   echo "$ac_err" >&5
6345   echo "configure: failed program was:" >&5
6346   cat conftest.$ac_ext >&5
6347   rm -rf conftest*
6348   eval "ac_cv_header_$ac_safe=no"
6349 fi
6350 rm -f conftest*
6351 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6352   echo "$ac_t""yes" 1>&6
6353   tt_c_h_path="${dir}tt_c.h"; break
6354 else
6355   echo "$ac_t""no" 1>&6
6356 fi
6357
6358   done
6359   if test -z "$tt_c_h_path"; then
6360     if test "$with_tooltalk" = "yes"; then
6361       (echo "$progname: Usage error:"
6362 echo " " "Unable to find required tooltalk header files."
6363 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6364     fi
6365     with_tooltalk=no
6366   fi
6367 fi
6368 if test "$with_tooltalk" != "no" ; then
6369   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6370     
6371 xe_msg_checking="for tt_message_create in -ltt"
6372 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6373 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6374 echo "configure:6375: checking "$xe_msg_checking"" >&5
6375 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6376
6377 xe_check_libs=" -ltt $extra_libs"
6378 cat > conftest.$ac_ext <<EOF
6379 #line 6380 "configure"
6380 #include "confdefs.h"
6381 /* Override any gcc2 internal prototype to avoid an error.  */
6382 /* We use char because int might match the return type of a gcc2
6383     builtin and then its argument prototype would still apply.  */
6384 char tt_message_create();
6385
6386 int main() {
6387 tt_message_create()
6388 ; return 0; }
6389 EOF
6390 if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6391   rm -rf conftest*
6392   eval "ac_cv_lib_$ac_lib_var=yes"
6393 else
6394   echo "configure: failed program was:" >&5
6395   cat conftest.$ac_ext >&5
6396   rm -rf conftest*
6397   eval "ac_cv_lib_$ac_lib_var=no"
6398 fi
6399 rm -f conftest*
6400 xe_check_libs=""
6401
6402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6403   echo "$ac_t""yes" 1>&6
6404   tt_libs="-ltt $extra_libs"; break
6405 else
6406   echo "$ac_t""no" 1>&6
6407 :
6408 fi
6409
6410
6411   done
6412   if test -z "$tt_libs"; then
6413     if test "$with_tooltalk" = "yes"; then
6414       (echo "$progname: Usage error:"
6415 echo " " "Unable to find required tooltalk libraries."
6416 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6417     fi
6418     with_tooltalk=no
6419   fi
6420 fi
6421 test -z "$with_tooltalk" && with_tooltalk=yes
6422 if test "$with_tooltalk" = "yes"; then
6423   { test "$extra_verbose" = "yes" && cat << \EOF
6424     Defining TOOLTALK
6425 EOF
6426 cat >> confdefs.h <<\EOF
6427 #define TOOLTALK 1
6428 EOF
6429 }
6430
6431   { test "$extra_verbose" = "yes" && cat << EOF
6432     Defining TT_C_H_PATH = "$tt_c_h_path"
6433 EOF
6434 cat >> confdefs.h <<EOF
6435 #define TT_C_H_PATH "$tt_c_h_path"
6436 EOF
6437 }
6438
6439   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6440   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6441    echo "    xemacs will be linked with \"tooltalk.o\""
6442  fi
6443 fi
6444
6445 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6446 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6447 echo "configure:6448: checking for Dt/Dt.h" >&5
6448
6449 cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452 #include <Dt/Dt.h>
6453 EOF
6454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6455 { (eval echo configure:6456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6457 if test -z "$ac_err"; then
6458   rm -rf conftest*
6459   eval "ac_cv_header_$ac_safe=yes"
6460 else
6461   echo "$ac_err" >&5
6462   echo "configure: failed program was:" >&5
6463   cat conftest.$ac_ext >&5
6464   rm -rf conftest*
6465   eval "ac_cv_header_$ac_safe=no"
6466 fi
6467 rm -f conftest*
6468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6469   echo "$ac_t""yes" 1>&6
6470   :
6471 else
6472   echo "$ac_t""no" 1>&6
6473 with_cde=no
6474 fi
6475  }
6476 test -z "$with_cde" && { 
6477 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6478 echo "configure:6479: checking for DtDndDragStart in -lDtSvc" >&5
6479 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6480
6481 xe_check_libs=" -lDtSvc "
6482 cat > conftest.$ac_ext <<EOF
6483 #line 6484 "configure"
6484 #include "confdefs.h"
6485 /* Override any gcc2 internal prototype to avoid an error.  */
6486 /* We use char because int might match the return type of a gcc2
6487     builtin and then its argument prototype would still apply.  */
6488 char DtDndDragStart();
6489
6490 int main() {
6491 DtDndDragStart()
6492 ; return 0; }
6493 EOF
6494 if { (eval echo configure:6495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6495   rm -rf conftest*
6496   eval "ac_cv_lib_$ac_lib_var=yes"
6497 else
6498   echo "configure: failed program was:" >&5
6499   cat conftest.$ac_ext >&5
6500   rm -rf conftest*
6501   eval "ac_cv_lib_$ac_lib_var=no"
6502 fi
6503 rm -f conftest*
6504 xe_check_libs=""
6505
6506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6507   echo "$ac_t""yes" 1>&6
6508   :
6509 else
6510   echo "$ac_t""no" 1>&6
6511 with_cde=no
6512 fi
6513
6514  }
6515 test -z "$with_cde" && with_cde=yes
6516 if test "$with_dragndrop" = no; then
6517   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6518   with_cde=no
6519 fi
6520 if test "$with_cde" = "yes" ; then
6521   { test "$extra_verbose" = "yes" && cat << \EOF
6522     Defining HAVE_CDE
6523 EOF
6524 cat >> confdefs.h <<\EOF
6525 #define HAVE_CDE 1
6526 EOF
6527 }
6528
6529   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6530   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6531   with_tooltalk=yes # CDE requires Tooltalk
6532   need_motif=yes    # CDE requires Motif
6533 fi
6534
6535 test "$window_system" != "x11" && with_offix=no
6536 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6537   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6538   with_offix=no
6539 fi
6540 if test "$with_dragndrop" = no; then
6541   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6542   with_offix=no
6543 fi
6544 if test "$with_cde" = yes; then
6545   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6546   with_offix=no
6547 fi
6548 test -z "$with_offix" && with_offix=no
6549 if test "$with_offix" = "yes"; then
6550   { test "$extra_verbose" = "yes" && cat << \EOF
6551     Defining HAVE_OFFIX_DND
6552 EOF
6553 cat >> confdefs.h <<\EOF
6554 #define HAVE_OFFIX_DND 1
6555 EOF
6556 }
6557
6558   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6559   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6560 fi
6561
6562 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6563 echo "configure:6564: checking if drag and drop API is needed" >&5
6564 if test "$with_dragndrop" != "no" ; then
6565   if test -n "$dragndrop_proto" ; then
6566     with_dragndrop=yes
6567     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6568     { test "$extra_verbose" = "yes" && cat << \EOF
6569     Defining HAVE_DRAGNDROP
6570 EOF
6571 cat >> confdefs.h <<\EOF
6572 #define HAVE_DRAGNDROP 1
6573 EOF
6574 }
6575
6576     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6577   else
6578     with_dragndrop=no
6579     echo "$ac_t""no" 1>&6
6580   fi
6581 fi
6582
6583 echo "checking for LDAP" 1>&6
6584 echo "configure:6585: checking for LDAP" >&5
6585 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6586 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6587 echo "configure:6588: checking for ldap.h" >&5
6588
6589 cat > conftest.$ac_ext <<EOF
6590 #line 6591 "configure"
6591 #include "confdefs.h"
6592 #include <ldap.h>
6593 EOF
6594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6595 { (eval echo configure:6596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6597 if test -z "$ac_err"; then
6598   rm -rf conftest*
6599   eval "ac_cv_header_$ac_safe=yes"
6600 else
6601   echo "$ac_err" >&5
6602   echo "configure: failed program was:" >&5
6603   cat conftest.$ac_ext >&5
6604   rm -rf conftest*
6605   eval "ac_cv_header_$ac_safe=no"
6606 fi
6607 rm -f conftest*
6608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6609   echo "$ac_t""yes" 1>&6
6610   :
6611 else
6612   echo "$ac_t""no" 1>&6
6613 with_ldap=no
6614 fi
6615  }
6616 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6617 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6618 echo "configure:6619: checking for lber.h" >&5
6619
6620 cat > conftest.$ac_ext <<EOF
6621 #line 6622 "configure"
6622 #include "confdefs.h"
6623 #include <lber.h>
6624 EOF
6625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6626 { (eval echo configure:6627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6628 if test -z "$ac_err"; then
6629   rm -rf conftest*
6630   eval "ac_cv_header_$ac_safe=yes"
6631 else
6632   echo "$ac_err" >&5
6633   echo "configure: failed program was:" >&5
6634   cat conftest.$ac_ext >&5
6635   rm -rf conftest*
6636   eval "ac_cv_header_$ac_safe=no"
6637 fi
6638 rm -f conftest*
6639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6640   echo "$ac_t""yes" 1>&6
6641   :
6642 else
6643   echo "$ac_t""no" 1>&6
6644 with_ldap=no
6645 fi
6646  }
6647 if test "$with_ldap" != "no"; then
6648   
6649 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6650 echo "configure:6651: checking for ldap_search in -lldap" >&5
6651 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6652
6653 xe_check_libs=" -lldap "
6654 cat > conftest.$ac_ext <<EOF
6655 #line 6656 "configure"
6656 #include "confdefs.h"
6657 /* Override any gcc2 internal prototype to avoid an error.  */
6658 /* We use char because int might match the return type of a gcc2
6659     builtin and then its argument prototype would still apply.  */
6660 char ldap_search();
6661
6662 int main() {
6663 ldap_search()
6664 ; return 0; }
6665 EOF
6666 if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6667   rm -rf conftest*
6668   eval "ac_cv_lib_$ac_lib_var=yes"
6669 else
6670   echo "configure: failed program was:" >&5
6671   cat conftest.$ac_ext >&5
6672   rm -rf conftest*
6673   eval "ac_cv_lib_$ac_lib_var=no"
6674 fi
6675 rm -f conftest*
6676 xe_check_libs=""
6677
6678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6679   echo "$ac_t""yes" 1>&6
6680   with_ldap_nolber=yes
6681 else
6682   echo "$ac_t""no" 1>&6
6683 with_ldap_nolber=no
6684 fi
6685
6686
6687   test "$with_ldap_nolber" = "no" && { 
6688 xe_msg_checking="for ldap_open in -lldap"
6689 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6690 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6691 echo "configure:6692: checking "$xe_msg_checking"" >&5
6692 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6693
6694 xe_check_libs=" -lldap -llber"
6695 cat > conftest.$ac_ext <<EOF
6696 #line 6697 "configure"
6697 #include "confdefs.h"
6698 /* Override any gcc2 internal prototype to avoid an error.  */
6699 /* We use char because int might match the return type of a gcc2
6700     builtin and then its argument prototype would still apply.  */
6701 char ldap_open();
6702
6703 int main() {
6704 ldap_open()
6705 ; return 0; }
6706 EOF
6707 if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6708   rm -rf conftest*
6709   eval "ac_cv_lib_$ac_lib_var=yes"
6710 else
6711   echo "configure: failed program was:" >&5
6712   cat conftest.$ac_ext >&5
6713   rm -rf conftest*
6714   eval "ac_cv_lib_$ac_lib_var=no"
6715 fi
6716 rm -f conftest*
6717 xe_check_libs=""
6718
6719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6720   echo "$ac_t""yes" 1>&6
6721   with_ldap_lber=yes
6722 else
6723   echo "$ac_t""no" 1>&6
6724 with_ldap_lber=no
6725 fi
6726
6727  }
6728   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6729 xe_msg_checking="for ldap_open in -lldap"
6730 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6731 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6732 echo "configure:6733: checking "$xe_msg_checking"" >&5
6733 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6734
6735 xe_check_libs=" -lldap -llber -lkrb"
6736 cat > conftest.$ac_ext <<EOF
6737 #line 6738 "configure"
6738 #include "confdefs.h"
6739 /* Override any gcc2 internal prototype to avoid an error.  */
6740 /* We use char because int might match the return type of a gcc2
6741     builtin and then its argument prototype would still apply.  */
6742 char ldap_open();
6743
6744 int main() {
6745 ldap_open()
6746 ; return 0; }
6747 EOF
6748 if { (eval echo configure:6749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6749   rm -rf conftest*
6750   eval "ac_cv_lib_$ac_lib_var=yes"
6751 else
6752   echo "configure: failed program was:" >&5
6753   cat conftest.$ac_ext >&5
6754   rm -rf conftest*
6755   eval "ac_cv_lib_$ac_lib_var=no"
6756 fi
6757 rm -f conftest*
6758 xe_check_libs=""
6759
6760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6761   echo "$ac_t""yes" 1>&6
6762   with_ldap_krb=yes
6763 else
6764   echo "$ac_t""no" 1>&6
6765 with_ldap_krb=no
6766 fi
6767
6768  }
6769   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6770 xe_msg_checking="for ldap_open in -lldap"
6771 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6772 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6773 echo "configure:6774: checking "$xe_msg_checking"" >&5
6774 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6775
6776 xe_check_libs=" -lldap -llber -lkrb -ldes"
6777 cat > conftest.$ac_ext <<EOF
6778 #line 6779 "configure"
6779 #include "confdefs.h"
6780 /* Override any gcc2 internal prototype to avoid an error.  */
6781 /* We use char because int might match the return type of a gcc2
6782     builtin and then its argument prototype would still apply.  */
6783 char ldap_open();
6784
6785 int main() {
6786 ldap_open()
6787 ; return 0; }
6788 EOF
6789 if { (eval echo configure:6790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6790   rm -rf conftest*
6791   eval "ac_cv_lib_$ac_lib_var=yes"
6792 else
6793   echo "configure: failed program was:" >&5
6794   cat conftest.$ac_ext >&5
6795   rm -rf conftest*
6796   eval "ac_cv_lib_$ac_lib_var=no"
6797 fi
6798 rm -f conftest*
6799 xe_check_libs=""
6800
6801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6802   echo "$ac_t""yes" 1>&6
6803   with_ldap_krbdes=yes
6804 else
6805   echo "$ac_t""no" 1>&6
6806 with_ldap_krbdes=no
6807 fi
6808
6809  }
6810   test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes
6811 fi
6812 if test "$with_ldap" = "yes"; then
6813   { test "$extra_verbose" = "yes" && cat << \EOF
6814     Defining HAVE_LDAP
6815 EOF
6816 cat >> confdefs.h <<\EOF
6817 #define HAVE_LDAP 1
6818 EOF
6819 }
6820
6821   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6822    echo "    xemacs will be linked with \"eldap.o\""
6823  fi
6824   if test "$with_ldap_nolber" = "yes" ; then
6825     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6826   else
6827     if test "$with_ldap_krb" = "yes" ; then
6828       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6829     fi
6830     if test "$with_ldap_krbdes" = "yes" ; then
6831       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
6832       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6833     fi
6834     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6835     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6836   fi
6837   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
6838 do
6839 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6840 echo "configure:6841: checking for $ac_func" >&5
6841
6842 cat > conftest.$ac_ext <<EOF
6843 #line 6844 "configure"
6844 #include "confdefs.h"
6845 /* System header to define __stub macros and hopefully few prototypes,
6846     which can conflict with char $ac_func(); below.  */
6847 #include <assert.h>
6848 /* Override any gcc2 internal prototype to avoid an error.  */
6849 /* We use char because int might match the return type of a gcc2
6850     builtin and then its argument prototype would still apply.  */
6851 char $ac_func();
6852
6853 int main() {
6854
6855 /* The GNU C library defines this for functions which it implements
6856     to always fail with ENOSYS.  Some functions are actually named
6857     something starting with __ and the normal name is an alias.  */
6858 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6859 choke me
6860 #else
6861 $ac_func();
6862 #endif
6863
6864 ; return 0; }
6865 EOF
6866 if { (eval echo configure:6867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6867   rm -rf conftest*
6868   eval "ac_cv_func_$ac_func=yes"
6869 else
6870   echo "configure: failed program was:" >&5
6871   cat conftest.$ac_ext >&5
6872   rm -rf conftest*
6873   eval "ac_cv_func_$ac_func=no"
6874 fi
6875 rm -f conftest*
6876
6877 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6878   echo "$ac_t""yes" 1>&6
6879     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6880   { test "$extra_verbose" = "yes" && cat << EOF
6881     Defining $ac_tr_func
6882 EOF
6883 cat >> confdefs.h <<EOF
6884 #define $ac_tr_func 1
6885 EOF
6886 }
6887  
6888 else
6889   echo "$ac_t""no" 1>&6
6890 fi
6891 done
6892
6893 fi
6894
6895
6896 if test "$window_system" != "none"; then
6897   echo "checking for graphics libraries" 1>&6
6898 echo "configure:6899: checking for graphics libraries" >&5
6899
6900     xpm_problem=""
6901   if test -z "$with_xpm"; then
6902     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6903 echo "configure:6904: checking for Xpm - no older than 3.4f" >&5
6904     xe_check_libs=-lXpm
6905     cat > conftest.$ac_ext <<EOF
6906 #line 6907 "configure"
6907 #include "confdefs.h"
6908 #include <X11/xpm.h>
6909     int main(int c, char **v) {
6910     return c == 1 ? 0 :
6911       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6912       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6913 EOF
6914 if { (eval echo configure:6915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6915 then
6916   ./conftest dummy_arg; xpm_status=$?;
6917       if test "$xpm_status" = "0"; then
6918         with_xpm=yes;
6919       else
6920         with_xpm=no;
6921         if test "$xpm_status" = "1"; then
6922           xpm_problem="Xpm library version and header file version don't match!"
6923         elif test "$xpm_status" = "2"; then
6924           xpm_problem="Xpm library version is too old!"
6925         else
6926           xpm_problem="Internal xpm detection logic error!"
6927         fi
6928         echo "
6929 *** WARNING *** $xpm_problem
6930   I'm not touching that with a 10-foot pole!
6931   If you really want to use the installed version of Xpm, rerun
6932   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
6933     fi
6934 else
6935   conftest_rc="$?"
6936   echo "configure: failed program was:" >&5
6937   cat conftest.$ac_ext >&5
6938   rm -fr conftest*
6939   with_xpm=no
6940 fi
6941 rm -fr conftest*
6942     xe_check_libs=
6943     echo "$ac_t""$with_xpm" 1>&6
6944   fi
6945   if test "$with_xpm" = "yes"; then
6946     { test "$extra_verbose" = "yes" && cat << \EOF
6947     Defining HAVE_XPM
6948 EOF
6949 cat >> confdefs.h <<\EOF
6950 #define HAVE_XPM 1
6951 EOF
6952 }
6953
6954     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6955     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6956 echo "configure:6957: checking for \"FOR_MSW\" xpm" >&5
6957     xe_check_libs=-lXpm
6958     cat > conftest.$ac_ext <<EOF
6959 #line 6960 "configure"
6960 #include "confdefs.h"
6961
6962 int main() {
6963 XpmCreatePixmapFromData()
6964 ; return 0; }
6965 EOF
6966 if { (eval echo configure:6967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6967   rm -rf conftest*
6968   xpm_for_msw=no
6969 else
6970   echo "configure: failed program was:" >&5
6971   cat conftest.$ac_ext >&5
6972   rm -rf conftest*
6973   xpm_for_msw=yes
6974 fi
6975 rm -f conftest*
6976     xe_check_libs=
6977     echo "$ac_t""$xpm_for_msw" 1>&6
6978     if test "$xpm_for_msw" = "yes"; then
6979       { test "$extra_verbose" = "yes" && cat << \EOF
6980     Defining FOR_MSW
6981 EOF
6982 cat >> confdefs.h <<\EOF
6983 #define FOR_MSW 1
6984 EOF
6985 }
6986
6987     fi
6988   fi
6989
6990     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
6991 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
6992 echo "configure:6993: checking for compface.h" >&5
6993
6994 cat > conftest.$ac_ext <<EOF
6995 #line 6996 "configure"
6996 #include "confdefs.h"
6997 #include <compface.h>
6998 EOF
6999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7000 { (eval echo configure:7001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7002 if test -z "$ac_err"; then
7003   rm -rf conftest*
7004   eval "ac_cv_header_$ac_safe=yes"
7005 else
7006   echo "$ac_err" >&5
7007   echo "configure: failed program was:" >&5
7008   cat conftest.$ac_ext >&5
7009   rm -rf conftest*
7010   eval "ac_cv_header_$ac_safe=no"
7011 fi
7012 rm -f conftest*
7013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7014   echo "$ac_t""yes" 1>&6
7015   :
7016 else
7017   echo "$ac_t""no" 1>&6
7018 with_xface=no
7019 fi
7020  }
7021   test -z "$with_xface" && { 
7022 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7023 echo "configure:7024: checking for UnGenFace in -lcompface" >&5
7024 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7025
7026 xe_check_libs=" -lcompface "
7027 cat > conftest.$ac_ext <<EOF
7028 #line 7029 "configure"
7029 #include "confdefs.h"
7030 /* Override any gcc2 internal prototype to avoid an error.  */
7031 /* We use char because int might match the return type of a gcc2
7032     builtin and then its argument prototype would still apply.  */
7033 char UnGenFace();
7034
7035 int main() {
7036 UnGenFace()
7037 ; return 0; }
7038 EOF
7039 if { (eval echo configure:7040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7040   rm -rf conftest*
7041   eval "ac_cv_lib_$ac_lib_var=yes"
7042 else
7043   echo "configure: failed program was:" >&5
7044   cat conftest.$ac_ext >&5
7045   rm -rf conftest*
7046   eval "ac_cv_lib_$ac_lib_var=no"
7047 fi
7048 rm -f conftest*
7049 xe_check_libs=""
7050
7051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7052   echo "$ac_t""yes" 1>&6
7053   : 
7054 else
7055   echo "$ac_t""no" 1>&6
7056 with_xface=no
7057 fi
7058
7059  }
7060   test -z "$with_xface" && with_xface=yes
7061   if test "$with_xface" = "yes"; then
7062     { test "$extra_verbose" = "yes" && cat << \EOF
7063     Defining HAVE_XFACE
7064 EOF
7065 cat >> confdefs.h <<\EOF
7066 #define HAVE_XFACE 1
7067 EOF
7068 }
7069
7070     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7071   fi
7072
7073         if test "$with_gif" != "no"; then
7074     with_gif="yes"
7075     { test "$extra_verbose" = "yes" && cat << \EOF
7076     Defining HAVE_GIF
7077 EOF
7078 cat >> confdefs.h <<\EOF
7079 #define HAVE_GIF 1
7080 EOF
7081 }
7082
7083     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7084    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7085  fi
7086   fi
7087
7088       if test "$with_png $with_tiff" != "no no"; then
7089     
7090 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7091 echo "configure:7092: checking for inflate in -lc" >&5
7092 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7093
7094 xe_check_libs=" -lc "
7095 cat > conftest.$ac_ext <<EOF
7096 #line 7097 "configure"
7097 #include "confdefs.h"
7098 /* Override any gcc2 internal prototype to avoid an error.  */
7099 /* We use char because int might match the return type of a gcc2
7100     builtin and then its argument prototype would still apply.  */
7101 char inflate();
7102
7103 int main() {
7104 inflate()
7105 ; return 0; }
7106 EOF
7107 if { (eval echo configure:7108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7108   rm -rf conftest*
7109   eval "ac_cv_lib_$ac_lib_var=yes"
7110 else
7111   echo "configure: failed program was:" >&5
7112   cat conftest.$ac_ext >&5
7113   rm -rf conftest*
7114   eval "ac_cv_lib_$ac_lib_var=no"
7115 fi
7116 rm -f conftest*
7117 xe_check_libs=""
7118
7119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7120   echo "$ac_t""yes" 1>&6
7121   :
7122 else
7123   echo "$ac_t""no" 1>&6
7124
7125 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7126 echo "configure:7127: checking for inflate in -lz" >&5
7127 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7128
7129 xe_check_libs=" -lz "
7130 cat > conftest.$ac_ext <<EOF
7131 #line 7132 "configure"
7132 #include "confdefs.h"
7133 /* Override any gcc2 internal prototype to avoid an error.  */
7134 /* We use char because int might match the return type of a gcc2
7135     builtin and then its argument prototype would still apply.  */
7136 char inflate();
7137
7138 int main() {
7139 inflate()
7140 ; return 0; }
7141 EOF
7142 if { (eval echo configure:7143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7143   rm -rf conftest*
7144   eval "ac_cv_lib_$ac_lib_var=yes"
7145 else
7146   echo "configure: failed program was:" >&5
7147   cat conftest.$ac_ext >&5
7148   rm -rf conftest*
7149   eval "ac_cv_lib_$ac_lib_var=no"
7150 fi
7151 rm -f conftest*
7152 xe_check_libs=""
7153
7154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7155   echo "$ac_t""yes" 1>&6
7156   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7157 else
7158   echo "$ac_t""no" 1>&6
7159
7160 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7161 echo "configure:7162: checking for inflate in -lgz" >&5
7162 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7163
7164 xe_check_libs=" -lgz "
7165 cat > conftest.$ac_ext <<EOF
7166 #line 7167 "configure"
7167 #include "confdefs.h"
7168 /* Override any gcc2 internal prototype to avoid an error.  */
7169 /* We use char because int might match the return type of a gcc2
7170     builtin and then its argument prototype would still apply.  */
7171 char inflate();
7172
7173 int main() {
7174 inflate()
7175 ; return 0; }
7176 EOF
7177 if { (eval echo configure:7178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7178   rm -rf conftest*
7179   eval "ac_cv_lib_$ac_lib_var=yes"
7180 else
7181   echo "configure: failed program was:" >&5
7182   cat conftest.$ac_ext >&5
7183   rm -rf conftest*
7184   eval "ac_cv_lib_$ac_lib_var=no"
7185 fi
7186 rm -f conftest*
7187 xe_check_libs=""
7188
7189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7190   echo "$ac_t""yes" 1>&6
7191   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7192 else
7193   echo "$ac_t""no" 1>&6
7194 fi
7195
7196
7197 fi
7198
7199
7200 fi
7201
7202
7203   fi
7204
7205     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7206 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7207 echo "configure:7208: checking for jpeglib.h" >&5
7208
7209 cat > conftest.$ac_ext <<EOF
7210 #line 7211 "configure"
7211 #include "confdefs.h"
7212 #include <jpeglib.h>
7213 EOF
7214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7215 { (eval echo configure:7216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7217 if test -z "$ac_err"; then
7218   rm -rf conftest*
7219   eval "ac_cv_header_$ac_safe=yes"
7220 else
7221   echo "$ac_err" >&5
7222   echo "configure: failed program was:" >&5
7223   cat conftest.$ac_ext >&5
7224   rm -rf conftest*
7225   eval "ac_cv_header_$ac_safe=no"
7226 fi
7227 rm -f conftest*
7228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7229   echo "$ac_t""yes" 1>&6
7230   :
7231 else
7232   echo "$ac_t""no" 1>&6
7233 with_jpeg=no
7234 fi
7235  }
7236   test -z "$with_jpeg" && { 
7237 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7238 echo "configure:7239: checking for jpeg_destroy_decompress in -ljpeg" >&5
7239 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7240
7241 xe_check_libs=" -ljpeg "
7242 cat > conftest.$ac_ext <<EOF
7243 #line 7244 "configure"
7244 #include "confdefs.h"
7245 /* Override any gcc2 internal prototype to avoid an error.  */
7246 /* We use char because int might match the return type of a gcc2
7247     builtin and then its argument prototype would still apply.  */
7248 char jpeg_destroy_decompress();
7249
7250 int main() {
7251 jpeg_destroy_decompress()
7252 ; return 0; }
7253 EOF
7254 if { (eval echo configure:7255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7255   rm -rf conftest*
7256   eval "ac_cv_lib_$ac_lib_var=yes"
7257 else
7258   echo "configure: failed program was:" >&5
7259   cat conftest.$ac_ext >&5
7260   rm -rf conftest*
7261   eval "ac_cv_lib_$ac_lib_var=no"
7262 fi
7263 rm -f conftest*
7264 xe_check_libs=""
7265
7266 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7267   echo "$ac_t""yes" 1>&6
7268   :
7269 else
7270   echo "$ac_t""no" 1>&6
7271 with_jpeg=no
7272 fi
7273
7274  }
7275   test -z "$with_jpeg" && with_jpeg=yes
7276   if test "$with_jpeg" = "yes"; then
7277     { test "$extra_verbose" = "yes" && cat << \EOF
7278     Defining HAVE_JPEG
7279 EOF
7280 cat >> confdefs.h <<\EOF
7281 #define HAVE_JPEG 1
7282 EOF
7283 }
7284
7285     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7286   fi
7287
7288     png_problem=""
7289   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7290 echo "configure:7291: checking for pow" >&5
7291
7292 cat > conftest.$ac_ext <<EOF
7293 #line 7294 "configure"
7294 #include "confdefs.h"
7295 /* System header to define __stub macros and hopefully few prototypes,
7296     which can conflict with char pow(); below.  */
7297 #include <assert.h>
7298 /* Override any gcc2 internal prototype to avoid an error.  */
7299 /* We use char because int might match the return type of a gcc2
7300     builtin and then its argument prototype would still apply.  */
7301 char pow();
7302
7303 int main() {
7304
7305 /* The GNU C library defines this for functions which it implements
7306     to always fail with ENOSYS.  Some functions are actually named
7307     something starting with __ and the normal name is an alias.  */
7308 #if defined (__stub_pow) || defined (__stub___pow)
7309 choke me
7310 #else
7311 pow();
7312 #endif
7313
7314 ; return 0; }
7315 EOF
7316 if { (eval echo configure:7317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7317   rm -rf conftest*
7318   eval "ac_cv_func_pow=yes"
7319 else
7320   echo "configure: failed program was:" >&5
7321   cat conftest.$ac_ext >&5
7322   rm -rf conftest*
7323   eval "ac_cv_func_pow=no"
7324 fi
7325 rm -f conftest*
7326
7327 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7328   echo "$ac_t""yes" 1>&6
7329   :
7330 else
7331   echo "$ac_t""no" 1>&6
7332 with_png=no
7333 fi
7334  }
7335   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7336 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7337 echo "configure:7338: checking for png.h" >&5
7338
7339 cat > conftest.$ac_ext <<EOF
7340 #line 7341 "configure"
7341 #include "confdefs.h"
7342 #include <png.h>
7343 EOF
7344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7345 { (eval echo configure:7346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7347 if test -z "$ac_err"; then
7348   rm -rf conftest*
7349   eval "ac_cv_header_$ac_safe=yes"
7350 else
7351   echo "$ac_err" >&5
7352   echo "configure: failed program was:" >&5
7353   cat conftest.$ac_ext >&5
7354   rm -rf conftest*
7355   eval "ac_cv_header_$ac_safe=no"
7356 fi
7357 rm -f conftest*
7358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7359   echo "$ac_t""yes" 1>&6
7360   :
7361 else
7362   echo "$ac_t""no" 1>&6
7363 with_png=no
7364 fi
7365  }
7366   test -z "$with_png" && { 
7367 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7368 echo "configure:7369: checking for png_read_image in -lpng" >&5
7369 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7370
7371 xe_check_libs=" -lpng "
7372 cat > conftest.$ac_ext <<EOF
7373 #line 7374 "configure"
7374 #include "confdefs.h"
7375 /* Override any gcc2 internal prototype to avoid an error.  */
7376 /* We use char because int might match the return type of a gcc2
7377     builtin and then its argument prototype would still apply.  */
7378 char png_read_image();
7379
7380 int main() {
7381 png_read_image()
7382 ; return 0; }
7383 EOF
7384 if { (eval echo configure:7385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7385   rm -rf conftest*
7386   eval "ac_cv_lib_$ac_lib_var=yes"
7387 else
7388   echo "configure: failed program was:" >&5
7389   cat conftest.$ac_ext >&5
7390   rm -rf conftest*
7391   eval "ac_cv_lib_$ac_lib_var=no"
7392 fi
7393 rm -f conftest*
7394 xe_check_libs=""
7395
7396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7397   echo "$ac_t""yes" 1>&6
7398   :
7399 else
7400   echo "$ac_t""no" 1>&6
7401 with_png=no
7402 fi
7403
7404  }
7405   if test -z "$with_png"; then
7406     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7407 echo "configure:7408: checking for workable png version information" >&5
7408     xe_check_libs="-lpng -lz"
7409     cat > conftest.$ac_ext <<EOF
7410 #line 7411 "configure"
7411 #include "confdefs.h"
7412 #include <png.h>
7413     int main(int c, char **v) {
7414     if (c == 1) return 0;
7415     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7416     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7417 EOF
7418 if { (eval echo configure:7419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7419 then
7420   ./conftest dummy_arg; png_status=$?;
7421       if test "$png_status" = "0"; then
7422         with_png=yes;
7423       else
7424         with_png=no;
7425         if test "$png_status" = "1"; then
7426           png_problem="PNG library version and header file don't match!"
7427         elif test "$png_status" = "2"; then
7428           png_problem="PNG library version too old (pre 1.0.2)!"
7429         fi
7430         echo "
7431 *** WARNING *** $png_problem
7432   I'm not touching that with a 10-foot pole!
7433   If you really want to use the installed version of libPNG, rerun
7434   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7435     fi
7436 else
7437   conftest_rc="$?"
7438   echo "configure: failed program was:" >&5
7439   cat conftest.$ac_ext >&5
7440   rm -fr conftest*
7441   with_png=no
7442 fi
7443 rm -fr conftest*
7444     xe_check_libs=
7445     echo "$ac_t""$with_png" 1>&6
7446   fi
7447   if test "$with_png" = "yes"; then
7448     { test "$extra_verbose" = "yes" && cat << \EOF
7449     Defining HAVE_PNG
7450 EOF
7451 cat >> confdefs.h <<\EOF
7452 #define HAVE_PNG 1
7453 EOF
7454 }
7455
7456     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7457   fi
7458
7459     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7460 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7461 echo "configure:7462: checking for tiffio.h" >&5
7462
7463 cat > conftest.$ac_ext <<EOF
7464 #line 7465 "configure"
7465 #include "confdefs.h"
7466 #include <tiffio.h>
7467 EOF
7468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7469 { (eval echo configure:7470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7471 if test -z "$ac_err"; then
7472   rm -rf conftest*
7473   eval "ac_cv_header_$ac_safe=yes"
7474 else
7475   echo "$ac_err" >&5
7476   echo "configure: failed program was:" >&5
7477   cat conftest.$ac_ext >&5
7478   rm -rf conftest*
7479   eval "ac_cv_header_$ac_safe=no"
7480 fi
7481 rm -f conftest*
7482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7483   echo "$ac_t""yes" 1>&6
7484   :
7485 else
7486   echo "$ac_t""no" 1>&6
7487 with_tiff=no
7488 fi
7489  }
7490   test -z "$with_tiff" && { 
7491 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7492 echo "configure:7493: checking for TIFFClientOpen in -ltiff" >&5
7493 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7494
7495 xe_check_libs=" -ltiff "
7496 cat > conftest.$ac_ext <<EOF
7497 #line 7498 "configure"
7498 #include "confdefs.h"
7499 /* Override any gcc2 internal prototype to avoid an error.  */
7500 /* We use char because int might match the return type of a gcc2
7501     builtin and then its argument prototype would still apply.  */
7502 char TIFFClientOpen();
7503
7504 int main() {
7505 TIFFClientOpen()
7506 ; return 0; }
7507 EOF
7508 if { (eval echo configure:7509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7509   rm -rf conftest*
7510   eval "ac_cv_lib_$ac_lib_var=yes"
7511 else
7512   echo "configure: failed program was:" >&5
7513   cat conftest.$ac_ext >&5
7514   rm -rf conftest*
7515   eval "ac_cv_lib_$ac_lib_var=no"
7516 fi
7517 rm -f conftest*
7518 xe_check_libs=""
7519
7520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7521   echo "$ac_t""yes" 1>&6
7522   :
7523 else
7524   echo "$ac_t""no" 1>&6
7525 with_tiff=no
7526 fi
7527
7528  }
7529   test -z "$with_tiff" && with_tiff=yes
7530   if test "$with_tiff" = "yes"; then
7531     { test "$extra_verbose" = "yes" && cat << \EOF
7532     Defining HAVE_TIFF
7533 EOF
7534 cat >> confdefs.h <<\EOF
7535 #define HAVE_TIFF 1
7536 EOF
7537 }
7538
7539     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7540   fi
7541 fi
7542
7543
7544 if test "$with_x11" = "yes"; then
7545
7546   echo "checking for X11 graphics libraries" 1>&6
7547 echo "configure:7548: checking for X11 graphics libraries" >&5
7548
7549     
7550 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
7551 echo "configure:7552: checking for XawScrollbarSetThumb in -lXaw" >&5
7552 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7553
7554 xe_check_libs=" -lXaw "
7555 cat > conftest.$ac_ext <<EOF
7556 #line 7557 "configure"
7557 #include "confdefs.h"
7558 /* Override any gcc2 internal prototype to avoid an error.  */
7559 /* We use char because int might match the return type of a gcc2
7560     builtin and then its argument prototype would still apply.  */
7561 char XawScrollbarSetThumb();
7562
7563 int main() {
7564 XawScrollbarSetThumb()
7565 ; return 0; }
7566 EOF
7567 if { (eval echo configure:7568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7568   rm -rf conftest*
7569   eval "ac_cv_lib_$ac_lib_var=yes"
7570 else
7571   echo "configure: failed program was:" >&5
7572   cat conftest.$ac_ext >&5
7573   rm -rf conftest*
7574   eval "ac_cv_lib_$ac_lib_var=no"
7575 fi
7576 rm -f conftest*
7577 xe_check_libs=""
7578
7579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7580   echo "$ac_t""yes" 1>&6
7581   have_xaw=yes
7582 else
7583   echo "$ac_t""no" 1>&6
7584 have_xaw=no
7585 fi
7586
7587
7588                     
7589     
7590 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
7591 echo "configure:7592: checking for XawScrollbarSetThumb in -lXaw3d" >&5
7592 ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7593
7594 xe_check_libs=" -lXaw3d "
7595 cat > conftest.$ac_ext <<EOF
7596 #line 7597 "configure"
7597 #include "confdefs.h"
7598 /* Override any gcc2 internal prototype to avoid an error.  */
7599 /* We use char because int might match the return type of a gcc2
7600     builtin and then its argument prototype would still apply.  */
7601 char XawScrollbarSetThumb();
7602
7603 int main() {
7604 XawScrollbarSetThumb()
7605 ; return 0; }
7606 EOF
7607 if { (eval echo configure:7608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7608   rm -rf conftest*
7609   eval "ac_cv_lib_$ac_lib_var=yes"
7610 else
7611   echo "configure: failed program was:" >&5
7612   cat conftest.$ac_ext >&5
7613   rm -rf conftest*
7614   eval "ac_cv_lib_$ac_lib_var=no"
7615 fi
7616 rm -f conftest*
7617 xe_check_libs=""
7618
7619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7620   echo "$ac_t""yes" 1>&6
7621   have_xaw3d=yes
7622 else
7623   echo "$ac_t""no" 1>&6
7624 have_xaw3d=no
7625 fi
7626
7627
7628
7629     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7630 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7631 echo "configure:7632: checking for Xm/Xm.h" >&5
7632
7633 cat > conftest.$ac_ext <<EOF
7634 #line 7635 "configure"
7635 #include "confdefs.h"
7636 #include <Xm/Xm.h>
7637 EOF
7638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7639 { (eval echo configure:7640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7641 if test -z "$ac_err"; then
7642   rm -rf conftest*
7643   eval "ac_cv_header_$ac_safe=yes"
7644 else
7645   echo "$ac_err" >&5
7646   echo "configure: failed program was:" >&5
7647   cat conftest.$ac_ext >&5
7648   rm -rf conftest*
7649   eval "ac_cv_header_$ac_safe=no"
7650 fi
7651 rm -f conftest*
7652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7653   echo "$ac_t""yes" 1>&6
7654   
7655 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7656 echo "configure:7657: checking for XmStringFree in -lXm" >&5
7657 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7658
7659 xe_check_libs=" -lXm "
7660 cat > conftest.$ac_ext <<EOF
7661 #line 7662 "configure"
7662 #include "confdefs.h"
7663 /* Override any gcc2 internal prototype to avoid an error.  */
7664 /* We use char because int might match the return type of a gcc2
7665     builtin and then its argument prototype would still apply.  */
7666 char XmStringFree();
7667
7668 int main() {
7669 XmStringFree()
7670 ; return 0; }
7671 EOF
7672 if { (eval echo configure:7673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7673   rm -rf conftest*
7674   eval "ac_cv_lib_$ac_lib_var=yes"
7675 else
7676   echo "configure: failed program was:" >&5
7677   cat conftest.$ac_ext >&5
7678   rm -rf conftest*
7679   eval "ac_cv_lib_$ac_lib_var=no"
7680 fi
7681 rm -f conftest*
7682 xe_check_libs=""
7683
7684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7685   echo "$ac_t""yes" 1>&6
7686   have_motif=yes
7687 else
7688   echo "$ac_t""no" 1>&6
7689 have_motif=no
7690 fi
7691
7692
7693 else
7694   echo "$ac_t""no" 1>&6
7695 have_motif=no
7696 fi
7697
7698
7699   if test "$have_motif" = "yes"; then
7700         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
7701 echo "configure:7702: checking for Lesstif" >&5
7702     cat > conftest.$ac_ext <<EOF
7703 #line 7704 "configure"
7704 #include "confdefs.h"
7705 #include <Xm/Xm.h>
7706 #ifdef LESSTIF_VERSION
7707 yes
7708 #endif
7709
7710 EOF
7711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7712   egrep "yes" >/dev/null 2>&1; then
7713   rm -rf conftest*
7714   have_lesstif=yes
7715 else
7716   rm -rf conftest*
7717   have_lesstif=no
7718 fi
7719 rm -f conftest*
7720
7721   echo "$ac_t""$have_lesstif" 1>&6
7722   fi
7723
7724 fi 
7725
7726 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
7727   with_menubars="lucid" ;;
7728 esac
7729 case "$with_dialogs" in "" | "yes" | "lucid" )
7730   if   test "$have_motif" = "yes"; then with_dialogs="motif"
7731   elif test "$have_xaw3d" = "yes"; then with_dialogs="athena3d"
7732   elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
7733   else with_dialogs=no
7734   fi ;;
7735 esac
7736 case "$with_scrollbars" in "" | "yes" )
7737   with_scrollbars="lucid" ;;
7738 esac
7739 case "$with_widgets" in "" | "yes" | "lucid")
7740   if   test "$have_motif" = "yes"; then with_widgets="motif"
7741   elif test "$have_xaw3d" = "yes"; then with_widgets="athena3d"
7742   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
7743   else with_widgets=no
7744   fi ;;
7745 esac
7746
7747 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
7748
7749 case "$all_widgets" in
7750  *athena*3d )
7751   { test "$extra_verbose" = "yes" && cat << \EOF
7752     Defining LWLIB_USES_ATHENA
7753 EOF
7754 cat >> confdefs.h <<\EOF
7755 #define LWLIB_USES_ATHENA 1
7756 EOF
7757 }
7758
7759   { test "$extra_verbose" = "yes" && cat << \EOF
7760     Defining NEED_ATHENA
7761 EOF
7762 cat >> confdefs.h <<\EOF
7763 #define NEED_ATHENA 1
7764 EOF
7765 }
7766
7767   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7768   if test "$have_xaw3d"; then
7769     libs_x="-lXaw3d $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw3d\" to \$libs_x"; fi
7770   else
7771     libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi
7772   fi ;;
7773  *athena* )
7774   { test "$extra_verbose" = "yes" && cat << \EOF
7775     Defining LWLIB_USES_ATHENA
7776 EOF
7777 cat >> confdefs.h <<\EOF
7778 #define LWLIB_USES_ATHENA 1
7779 EOF
7780 }
7781
7782   { test "$extra_verbose" = "yes" && cat << \EOF
7783     Defining NEED_ATHENA
7784 EOF
7785 cat >> confdefs.h <<\EOF
7786 #define NEED_ATHENA 1
7787 EOF
7788 }
7789
7790   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7791   libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
7792 esac
7793
7794 case "$all_widgets" in *motif* )
7795   { test "$extra_verbose" = "yes" && cat << \EOF
7796     Defining LWLIB_USES_MOTIF
7797 EOF
7798 cat >> confdefs.h <<\EOF
7799 #define LWLIB_USES_MOTIF 1
7800 EOF
7801 }
7802
7803   { test "$extra_verbose" = "yes" && cat << \EOF
7804     Defining NEED_MOTIF
7805 EOF
7806 cat >> confdefs.h <<\EOF
7807 #define NEED_MOTIF 1
7808 EOF
7809 }
7810
7811   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
7812   need_motif=yes ;;
7813 esac
7814
7815 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7816 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7817 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
7818 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
7819         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
7820 case "$with_widgets" in athena* )
7821         lwlib_objs="$lwlib_objs xlwradio.o xlwcheckbox.o xlwgauge.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwradio.o xlwcheckbox.o xlwgauge.o\" to \$lwlib_objs"; fi;;
7822 esac
7823 case "$all_widgets" in *lucid* )
7824   { test "$extra_verbose" = "yes" && cat << \EOF
7825     Defining NEED_LUCID
7826 EOF
7827 cat >> confdefs.h <<\EOF
7828 #define NEED_LUCID 1
7829 EOF
7830 }
7831
7832   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
7833 esac
7834
7835
7836
7837 case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7838     Defining LWLIB_SCROLLBARS_ATHENA
7839 EOF
7840 cat >> confdefs.h <<\EOF
7841 #define LWLIB_SCROLLBARS_ATHENA 1
7842 EOF
7843 }
7844 ;; esac
7845 case "$with_dialogs"    in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7846     Defining LWLIB_DIALOGS_ATHENA
7847 EOF
7848 cat >> confdefs.h <<\EOF
7849 #define LWLIB_DIALOGS_ATHENA 1
7850 EOF
7851 }
7852    ;; esac
7853 test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7854     Defining LWLIB_SCROLLBARS_ATHENA3D
7855 EOF
7856 cat >> confdefs.h <<\EOF
7857 #define LWLIB_SCROLLBARS_ATHENA3D 1
7858 EOF
7859 }
7860
7861 test "$with_dialogs"    = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7862     Defining LWLIB_DIALOGS_ATHENA3D
7863 EOF
7864 cat >> confdefs.h <<\EOF
7865 #define LWLIB_DIALOGS_ATHENA3D 1
7866 EOF
7867 }
7868
7869 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7870     Defining LWLIB_WIDGETS_ATHENA
7871 EOF
7872 cat >> confdefs.h <<\EOF
7873 #define LWLIB_WIDGETS_ATHENA 1
7874 EOF
7875 }
7876 ;; esac
7877 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
7878         { test "$extra_verbose" = "yes" && cat << \EOF
7879     Defining LWLIB_TABS_LUCID
7880 EOF
7881 cat >> confdefs.h <<\EOF
7882 #define LWLIB_TABS_LUCID 1
7883 EOF
7884 }
7885
7886
7887 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7888     Defining HAVE_MENUBARS
7889 EOF
7890 cat >> confdefs.h <<\EOF
7891 #define HAVE_MENUBARS 1
7892 EOF
7893 }
7894
7895 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7896     Defining HAVE_SCROLLBARS
7897 EOF
7898 cat >> confdefs.h <<\EOF
7899 #define HAVE_SCROLLBARS 1
7900 EOF
7901 }
7902
7903 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7904     Defining HAVE_DIALOGS
7905 EOF
7906 cat >> confdefs.h <<\EOF
7907 #define HAVE_DIALOGS 1
7908 EOF
7909 }
7910
7911 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7912     Defining HAVE_TOOLBARS
7913 EOF
7914 cat >> confdefs.h <<\EOF
7915 #define HAVE_TOOLBARS 1
7916 EOF
7917 }
7918
7919 test "$with_widgets"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7920     Defining HAVE_WIDGETS
7921 EOF
7922 cat >> confdefs.h <<\EOF
7923 #define HAVE_WIDGETS 1
7924 EOF
7925 }
7926
7927
7928 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7929     Defining LWLIB_MENUBARS_LUCID
7930 EOF
7931 cat >> confdefs.h <<\EOF
7932 #define LWLIB_MENUBARS_LUCID 1
7933 EOF
7934 }
7935
7936 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7937     Defining LWLIB_SCROLLBARS_LUCID
7938 EOF
7939 cat >> confdefs.h <<\EOF
7940 #define LWLIB_SCROLLBARS_LUCID 1
7941 EOF
7942 }
7943
7944
7945 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7946     Defining LWLIB_MENUBARS_MOTIF
7947 EOF
7948 cat >> confdefs.h <<\EOF
7949 #define LWLIB_MENUBARS_MOTIF 1
7950 EOF
7951 }
7952
7953 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7954     Defining LWLIB_SCROLLBARS_MOTIF
7955 EOF
7956 cat >> confdefs.h <<\EOF
7957 #define LWLIB_SCROLLBARS_MOTIF 1
7958 EOF
7959 }
7960
7961 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7962     Defining LWLIB_DIALOGS_MOTIF
7963 EOF
7964 cat >> confdefs.h <<\EOF
7965 #define LWLIB_DIALOGS_MOTIF 1
7966 EOF
7967 }
7968
7969 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7970     Defining LWLIB_WIDGETS_MOTIF
7971 EOF
7972 cat >> confdefs.h <<\EOF
7973 #define LWLIB_WIDGETS_MOTIF 1
7974 EOF
7975 }
7976
7977
7978 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
7979    echo "    xemacs will be linked with \"menubar.o\""
7980  fi
7981 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
7982    echo "    xemacs will be linked with \"scrollbar.o\""
7983  fi
7984 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
7985    echo "    xemacs will be linked with \"dialog.o\""
7986  fi
7987 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
7988    echo "    xemacs will be linked with \"toolbar.o\""
7989  fi
7990
7991 if test "$with_x11" = "yes"; then
7992   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
7993    echo "    xemacs will be linked with \"menubar-x.o\""
7994  fi
7995   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7996    echo "    xemacs will be linked with \"scrollbar-x.o\""
7997  fi
7998   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
7999    echo "    xemacs will be linked with \"dialog-x.o\""
8000  fi
8001   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8002    echo "    xemacs will be linked with \"toolbar-x.o\""
8003  fi
8004   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8005    echo "    xemacs will be linked with \"gui-x.o\""
8006  fi
8007 fi
8008
8009
8010 test -z "$with_mule" && with_mule=no
8011 test -z "$with_file_coding" && with_file_coding=no
8012
8013
8014 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8015   { test "$extra_verbose" = "yes" && cat << \EOF
8016     Defining FILE_CODING
8017 EOF
8018 cat >> confdefs.h <<\EOF
8019 #define FILE_CODING 1
8020 EOF
8021 }
8022
8023   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8024    echo "    xemacs will be linked with \"file-coding.o\""
8025  fi
8026 fi
8027
8028 if test "$with_mule" = "yes" ; then
8029   echo "checking for Mule-related features" 1>&6
8030 echo "configure:8031: checking for Mule-related features" >&5
8031   { test "$extra_verbose" = "yes" && cat << \EOF
8032     Defining MULE
8033 EOF
8034 cat >> confdefs.h <<\EOF
8035 #define MULE 1
8036 EOF
8037 }
8038
8039   { test "$extra_verbose" = "yes" && cat << \EOF
8040     Defining FILE_CODING
8041 EOF
8042 cat >> confdefs.h <<\EOF
8043 #define FILE_CODING 1
8044 EOF
8045 }
8046
8047   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8048    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
8049  fi
8050
8051     for ac_hdr in libintl.h
8052 do
8053 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8054 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8055 echo "configure:8056: checking for $ac_hdr" >&5
8056
8057 cat > conftest.$ac_ext <<EOF
8058 #line 8059 "configure"
8059 #include "confdefs.h"
8060 #include <$ac_hdr>
8061 EOF
8062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8063 { (eval echo configure:8064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8065 if test -z "$ac_err"; then
8066   rm -rf conftest*
8067   eval "ac_cv_header_$ac_safe=yes"
8068 else
8069   echo "$ac_err" >&5
8070   echo "configure: failed program was:" >&5
8071   cat conftest.$ac_ext >&5
8072   rm -rf conftest*
8073   eval "ac_cv_header_$ac_safe=no"
8074 fi
8075 rm -f conftest*
8076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8077   echo "$ac_t""yes" 1>&6
8078     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8079   { test "$extra_verbose" = "yes" && cat << EOF
8080     Defining $ac_tr_hdr
8081 EOF
8082 cat >> confdefs.h <<EOF
8083 #define $ac_tr_hdr 1
8084 EOF
8085 }
8086  
8087 else
8088   echo "$ac_t""no" 1>&6
8089 fi
8090 done
8091
8092   
8093 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
8094 echo "configure:8095: checking for strerror in -lintl" >&5
8095 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
8096
8097 xe_check_libs=" -lintl "
8098 cat > conftest.$ac_ext <<EOF
8099 #line 8100 "configure"
8100 #include "confdefs.h"
8101 /* Override any gcc2 internal prototype to avoid an error.  */
8102 /* We use char because int might match the return type of a gcc2
8103     builtin and then its argument prototype would still apply.  */
8104 char strerror();
8105
8106 int main() {
8107 strerror()
8108 ; return 0; }
8109 EOF
8110 if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8111   rm -rf conftest*
8112   eval "ac_cv_lib_$ac_lib_var=yes"
8113 else
8114   echo "configure: failed program was:" >&5
8115   cat conftest.$ac_ext >&5
8116   rm -rf conftest*
8117   eval "ac_cv_lib_$ac_lib_var=no"
8118 fi
8119 rm -f conftest*
8120 xe_check_libs=""
8121
8122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8123   echo "$ac_t""yes" 1>&6
8124     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8125     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8126   { test "$extra_verbose" = "yes" && cat << EOF
8127     Defining $ac_tr_lib
8128 EOF
8129 cat >> confdefs.h <<EOF
8130 #define $ac_tr_lib 1
8131 EOF
8132 }
8133
8134   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
8135
8136 else
8137   echo "$ac_t""no" 1>&6
8138 fi
8139
8140
8141
8142   echo "checking for Mule input methods" 1>&6
8143 echo "configure:8144: checking for Mule input methods" >&5
8144         case "$with_xim" in "" | "yes" )
8145     echo "checking for XIM" 1>&6
8146 echo "configure:8147: checking for XIM" >&5
8147     
8148 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
8149 echo "configure:8150: checking for XOpenIM in -lX11" >&5
8150 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
8151
8152 xe_check_libs=" -lX11 "
8153 cat > conftest.$ac_ext <<EOF
8154 #line 8155 "configure"
8155 #include "confdefs.h"
8156 /* Override any gcc2 internal prototype to avoid an error.  */
8157 /* We use char because int might match the return type of a gcc2
8158     builtin and then its argument prototype would still apply.  */
8159 char XOpenIM();
8160
8161 int main() {
8162 XOpenIM()
8163 ; return 0; }
8164 EOF
8165 if { (eval echo configure:8166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8166   rm -rf conftest*
8167   eval "ac_cv_lib_$ac_lib_var=yes"
8168 else
8169   echo "configure: failed program was:" >&5
8170   cat conftest.$ac_ext >&5
8171   rm -rf conftest*
8172   eval "ac_cv_lib_$ac_lib_var=no"
8173 fi
8174 rm -f conftest*
8175 xe_check_libs=""
8176
8177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8178   echo "$ac_t""yes" 1>&6
8179   with_xim=xlib
8180 else
8181   echo "$ac_t""no" 1>&6
8182 with_xim=no
8183 fi
8184
8185
8186         if test "$have_motif $have_lesstif" = "yes no"; then
8187       
8188 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
8189 echo "configure:8190: checking for XmImMbLookupString in -lXm" >&5
8190 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
8191
8192 xe_check_libs=" -lXm "
8193 cat > conftest.$ac_ext <<EOF
8194 #line 8195 "configure"
8195 #include "confdefs.h"
8196 /* Override any gcc2 internal prototype to avoid an error.  */
8197 /* We use char because int might match the return type of a gcc2
8198     builtin and then its argument prototype would still apply.  */
8199 char XmImMbLookupString();
8200
8201 int main() {
8202 XmImMbLookupString()
8203 ; return 0; }
8204 EOF
8205 if { (eval echo configure:8206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8206   rm -rf conftest*
8207   eval "ac_cv_lib_$ac_lib_var=yes"
8208 else
8209   echo "configure: failed program was:" >&5
8210   cat conftest.$ac_ext >&5
8211   rm -rf conftest*
8212   eval "ac_cv_lib_$ac_lib_var=no"
8213 fi
8214 rm -f conftest*
8215 xe_check_libs=""
8216
8217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8218   echo "$ac_t""yes" 1>&6
8219   with_xim=motif
8220 else
8221   echo "$ac_t""no" 1>&6
8222 fi
8223
8224
8225     fi ;;
8226   esac
8227   if test "$with_xim" != "no"; then
8228     { test "$extra_verbose" = "yes" && cat << \EOF
8229     Defining HAVE_XIM
8230 EOF
8231 cat >> confdefs.h <<\EOF
8232 #define HAVE_XIM 1
8233 EOF
8234 }
8235
8236     if test "$with_xim" = "xlib"; then
8237       { test "$extra_verbose" = "yes" && cat << \EOF
8238     Defining XIM_XLIB
8239 EOF
8240 cat >> confdefs.h <<\EOF
8241 #define XIM_XLIB 1
8242 EOF
8243 }
8244
8245       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
8246    echo "    xemacs will be linked with \"input-method-xlib.o\""
8247  fi
8248     fi
8249     if test "$with_xim" = "motif"; then
8250       { test "$extra_verbose" = "yes" && cat << \EOF
8251     Defining XIM_MOTIF
8252 EOF
8253 cat >> confdefs.h <<\EOF
8254 #define XIM_MOTIF 1
8255 EOF
8256 }
8257
8258       need_motif=yes
8259       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8260    echo "    xemacs will be linked with \"input-method-motif.o\""
8261  fi
8262     fi
8263     if test "$with_xim" = "motif"; then
8264       with_xfs=no
8265     fi
8266   fi
8267
8268     if test "$with_xfs" = "yes" ; then
8269     echo "checking for XFontSet" 1>&6
8270 echo "configure:8271: checking for XFontSet" >&5
8271     
8272 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8273 echo "configure:8274: checking for XmbDrawString in -lX11" >&5
8274 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8275
8276 xe_check_libs=" -lX11 "
8277 cat > conftest.$ac_ext <<EOF
8278 #line 8279 "configure"
8279 #include "confdefs.h"
8280 /* Override any gcc2 internal prototype to avoid an error.  */
8281 /* We use char because int might match the return type of a gcc2
8282     builtin and then its argument prototype would still apply.  */
8283 char XmbDrawString();
8284
8285 int main() {
8286 XmbDrawString()
8287 ; return 0; }
8288 EOF
8289 if { (eval echo configure:8290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8290   rm -rf conftest*
8291   eval "ac_cv_lib_$ac_lib_var=yes"
8292 else
8293   echo "configure: failed program was:" >&5
8294   cat conftest.$ac_ext >&5
8295   rm -rf conftest*
8296   eval "ac_cv_lib_$ac_lib_var=no"
8297 fi
8298 rm -f conftest*
8299 xe_check_libs=""
8300
8301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8302   echo "$ac_t""yes" 1>&6
8303   :
8304 else
8305   echo "$ac_t""no" 1>&6
8306 with_xfs=no
8307 fi
8308
8309
8310     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8311       { test "$extra_verbose" = "yes" && cat << \EOF
8312     Defining USE_XFONTSET
8313 EOF
8314 cat >> confdefs.h <<\EOF
8315 #define USE_XFONTSET 1
8316 EOF
8317 }
8318
8319       if test "$with_xim" = "no" ; then
8320         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8321    echo "    xemacs will be linked with \"input-method-xfs.o\""
8322  fi
8323       fi
8324     fi
8325   fi 
8326     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8327   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8328 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8329 echo "configure:8330: checking for wnn/jllib.h" >&5
8330
8331 cat > conftest.$ac_ext <<EOF
8332 #line 8333 "configure"
8333 #include "confdefs.h"
8334 #include <wnn/jllib.h>
8335 EOF
8336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8337 { (eval echo configure:8338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8339 if test -z "$ac_err"; then
8340   rm -rf conftest*
8341   eval "ac_cv_header_$ac_safe=yes"
8342 else
8343   echo "$ac_err" >&5
8344   echo "configure: failed program was:" >&5
8345   cat conftest.$ac_ext >&5
8346   rm -rf conftest*
8347   eval "ac_cv_header_$ac_safe=no"
8348 fi
8349 rm -f conftest*
8350 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8351   echo "$ac_t""yes" 1>&6
8352   :
8353 else
8354   echo "$ac_t""no" 1>&6
8355 with_wnn=no
8356 fi
8357  }
8358     if test "$with_wnn" != "no"; then
8359     for ac_func in crypt
8360 do
8361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8362 echo "configure:8363: checking for $ac_func" >&5
8363
8364 cat > conftest.$ac_ext <<EOF
8365 #line 8366 "configure"
8366 #include "confdefs.h"
8367 /* System header to define __stub macros and hopefully few prototypes,
8368     which can conflict with char $ac_func(); below.  */
8369 #include <assert.h>
8370 /* Override any gcc2 internal prototype to avoid an error.  */
8371 /* We use char because int might match the return type of a gcc2
8372     builtin and then its argument prototype would still apply.  */
8373 char $ac_func();
8374
8375 int main() {
8376
8377 /* The GNU C library defines this for functions which it implements
8378     to always fail with ENOSYS.  Some functions are actually named
8379     something starting with __ and the normal name is an alias.  */
8380 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8381 choke me
8382 #else
8383 $ac_func();
8384 #endif
8385
8386 ; return 0; }
8387 EOF
8388 if { (eval echo configure:8389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8389   rm -rf conftest*
8390   eval "ac_cv_func_$ac_func=yes"
8391 else
8392   echo "configure: failed program was:" >&5
8393   cat conftest.$ac_ext >&5
8394   rm -rf conftest*
8395   eval "ac_cv_func_$ac_func=no"
8396 fi
8397 rm -f conftest*
8398
8399 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8400   echo "$ac_t""yes" 1>&6
8401     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8402   { test "$extra_verbose" = "yes" && cat << EOF
8403     Defining $ac_tr_func
8404 EOF
8405 cat >> confdefs.h <<EOF
8406 #define $ac_tr_func 1
8407 EOF
8408 }
8409  
8410 else
8411   echo "$ac_t""no" 1>&6
8412 fi
8413 done
8414
8415     test "$ac_cv_func_crypt" != "yes" && { 
8416 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8417 echo "configure:8418: checking for crypt in -lcrypt" >&5
8418 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8419
8420 xe_check_libs=" -lcrypt "
8421 cat > conftest.$ac_ext <<EOF
8422 #line 8423 "configure"
8423 #include "confdefs.h"
8424 /* Override any gcc2 internal prototype to avoid an error.  */
8425 /* We use char because int might match the return type of a gcc2
8426     builtin and then its argument prototype would still apply.  */
8427 char crypt();
8428
8429 int main() {
8430 crypt()
8431 ; return 0; }
8432 EOF
8433 if { (eval echo configure:8434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8434   rm -rf conftest*
8435   eval "ac_cv_lib_$ac_lib_var=yes"
8436 else
8437   echo "configure: failed program was:" >&5
8438   cat conftest.$ac_ext >&5
8439   rm -rf conftest*
8440   eval "ac_cv_lib_$ac_lib_var=no"
8441 fi
8442 rm -f conftest*
8443 xe_check_libs=""
8444
8445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8446   echo "$ac_t""yes" 1>&6
8447     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8448     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8449   { test "$extra_verbose" = "yes" && cat << EOF
8450     Defining $ac_tr_lib
8451 EOF
8452 cat >> confdefs.h <<EOF
8453 #define $ac_tr_lib 1
8454 EOF
8455 }
8456
8457   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
8458
8459 else
8460   echo "$ac_t""no" 1>&6
8461 fi
8462
8463  }
8464   fi
8465     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
8466     
8467 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
8468 echo "configure:8469: checking for jl_dic_list_e in -lwnn" >&5
8469 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8470
8471 xe_check_libs=" -lwnn "
8472 cat > conftest.$ac_ext <<EOF
8473 #line 8474 "configure"
8474 #include "confdefs.h"
8475 /* Override any gcc2 internal prototype to avoid an error.  */
8476 /* We use char because int might match the return type of a gcc2
8477     builtin and then its argument prototype would still apply.  */
8478 char jl_dic_list_e();
8479
8480 int main() {
8481 jl_dic_list_e()
8482 ; return 0; }
8483 EOF
8484 if { (eval echo configure:8485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8485   rm -rf conftest*
8486   eval "ac_cv_lib_$ac_lib_var=yes"
8487 else
8488   echo "configure: failed program was:" >&5
8489   cat conftest.$ac_ext >&5
8490   rm -rf conftest*
8491   eval "ac_cv_lib_$ac_lib_var=no"
8492 fi
8493 rm -f conftest*
8494 xe_check_libs=""
8495
8496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8497   echo "$ac_t""yes" 1>&6
8498   libwnn=wnn
8499 else
8500   echo "$ac_t""no" 1>&6
8501 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
8502 echo "configure:8503: checking for jl_dic_list_e in -lwnn4" >&5
8503 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8504
8505 xe_check_libs=" -lwnn4 "
8506 cat > conftest.$ac_ext <<EOF
8507 #line 8508 "configure"
8508 #include "confdefs.h"
8509 /* Override any gcc2 internal prototype to avoid an error.  */
8510 /* We use char because int might match the return type of a gcc2
8511     builtin and then its argument prototype would still apply.  */
8512 char jl_dic_list_e();
8513
8514 int main() {
8515 jl_dic_list_e()
8516 ; return 0; }
8517 EOF
8518 if { (eval echo configure:8519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8519   rm -rf conftest*
8520   eval "ac_cv_lib_$ac_lib_var=yes"
8521 else
8522   echo "configure: failed program was:" >&5
8523   cat conftest.$ac_ext >&5
8524   rm -rf conftest*
8525   eval "ac_cv_lib_$ac_lib_var=no"
8526 fi
8527 rm -f conftest*
8528 xe_check_libs=""
8529
8530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8531   echo "$ac_t""yes" 1>&6
8532   libwnn=wnn4
8533 else
8534   echo "$ac_t""no" 1>&6
8535 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
8536 echo "configure:8537: checking for jl_dic_list_e in -lwnn6" >&5
8537 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8538
8539 xe_check_libs=" -lwnn6 "
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 jl_dic_list_e();
8547
8548 int main() {
8549 jl_dic_list_e()
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   libwnn=wnn6
8567 else
8568   echo "$ac_t""no" 1>&6
8569 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
8570 echo "configure:8571: checking for dic_list_e in -lwnn6_fromsrc" >&5
8571 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
8572
8573 xe_check_libs=" -lwnn6_fromsrc "
8574 cat > conftest.$ac_ext <<EOF
8575 #line 8576 "configure"
8576 #include "confdefs.h"
8577 /* Override any gcc2 internal prototype to avoid an error.  */
8578 /* We use char because int might match the return type of a gcc2
8579     builtin and then its argument prototype would still apply.  */
8580 char dic_list_e();
8581
8582 int main() {
8583 dic_list_e()
8584 ; return 0; }
8585 EOF
8586 if { (eval echo configure:8587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8587   rm -rf conftest*
8588   eval "ac_cv_lib_$ac_lib_var=yes"
8589 else
8590   echo "configure: failed program was:" >&5
8591   cat conftest.$ac_ext >&5
8592   rm -rf conftest*
8593   eval "ac_cv_lib_$ac_lib_var=no"
8594 fi
8595 rm -f conftest*
8596 xe_check_libs=""
8597
8598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8599   echo "$ac_t""yes" 1>&6
8600   libwnn=wnn6_fromsrc
8601 else
8602   echo "$ac_t""no" 1>&6
8603 with_wnn=no
8604 fi
8605
8606
8607 fi
8608
8609
8610 fi
8611
8612
8613 fi
8614
8615
8616   fi
8617   test -z "$with_wnn" && with_wnn=yes
8618   if test "$with_wnn" = "yes"; then
8619     { test "$extra_verbose" = "yes" && cat << \EOF
8620     Defining HAVE_WNN
8621 EOF
8622 cat >> confdefs.h <<\EOF
8623 #define HAVE_WNN 1
8624 EOF
8625 }
8626
8627     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
8628     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
8629    echo "    xemacs will be linked with \"mule-wnnfns.o\""
8630  fi
8631     if test "$with_wnn6" != "no"; then
8632       
8633 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
8634 echo "configure:8635: checking for jl_fi_dic_list in -l$libwnn" >&5
8635 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
8636
8637 xe_check_libs=" -l$libwnn "
8638 cat > conftest.$ac_ext <<EOF
8639 #line 8640 "configure"
8640 #include "confdefs.h"
8641 /* Override any gcc2 internal prototype to avoid an error.  */
8642 /* We use char because int might match the return type of a gcc2
8643     builtin and then its argument prototype would still apply.  */
8644 char jl_fi_dic_list();
8645
8646 int main() {
8647 jl_fi_dic_list()
8648 ; return 0; }
8649 EOF
8650 if { (eval echo configure:8651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8651   rm -rf conftest*
8652   eval "ac_cv_lib_$ac_lib_var=yes"
8653 else
8654   echo "configure: failed program was:" >&5
8655   cat conftest.$ac_ext >&5
8656   rm -rf conftest*
8657   eval "ac_cv_lib_$ac_lib_var=no"
8658 fi
8659 rm -f conftest*
8660 xe_check_libs=""
8661
8662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8663   echo "$ac_t""yes" 1>&6
8664   with_wnn6=yes
8665 else
8666   echo "$ac_t""no" 1>&6
8667 fi
8668
8669
8670       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
8671     Defining WNN6
8672 EOF
8673 cat >> confdefs.h <<\EOF
8674 #define WNN6 1
8675 EOF
8676 }
8677
8678     fi
8679   fi
8680
8681     canna_includes_found=no
8682   if test "$with_canna" != "no"; then
8683     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8684 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8685 echo "configure:8686: checking for canna/jrkanji.h" >&5
8686
8687 cat > conftest.$ac_ext <<EOF
8688 #line 8689 "configure"
8689 #include "confdefs.h"
8690 #include <canna/jrkanji.h>
8691 EOF
8692 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8693 { (eval echo configure:8694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8694 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8695 if test -z "$ac_err"; then
8696   rm -rf conftest*
8697   eval "ac_cv_header_$ac_safe=yes"
8698 else
8699   echo "$ac_err" >&5
8700   echo "configure: failed program was:" >&5
8701   cat conftest.$ac_ext >&5
8702   rm -rf conftest*
8703   eval "ac_cv_header_$ac_safe=no"
8704 fi
8705 rm -f conftest*
8706 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8707   echo "$ac_t""yes" 1>&6
8708   canna_includes_found=yes
8709 else
8710   echo "$ac_t""no" 1>&6
8711 fi
8712
8713   fi
8714   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
8715       -d "/usr/local/canna/include"; then
8716     save_c_switch_site="$c_switch_site"
8717     c_switch_site="$c_switch_site -I/usr/local/canna/include"
8718     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8719 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8720 echo "configure:8721: checking for canna/jrkanji.h" >&5
8721
8722 cat > conftest.$ac_ext <<EOF
8723 #line 8724 "configure"
8724 #include "confdefs.h"
8725 #include <canna/jrkanji.h>
8726 EOF
8727 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8728 { (eval echo configure:8729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8729 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8730 if test -z "$ac_err"; then
8731   rm -rf conftest*
8732   eval "ac_cv_header_$ac_safe=yes"
8733 else
8734   echo "$ac_err" >&5
8735   echo "configure: failed program was:" >&5
8736   cat conftest.$ac_ext >&5
8737   rm -rf conftest*
8738   eval "ac_cv_header_$ac_safe=no"
8739 fi
8740 rm -f conftest*
8741 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8742   echo "$ac_t""yes" 1>&6
8743   canna_includes_found=yes
8744 else
8745   echo "$ac_t""no" 1>&6
8746 fi
8747
8748     if test "$canna_includes_found" != "yes"; then
8749       c_switch_site="$save_c_switch_site"
8750       with_canna="no"
8751     fi
8752   fi
8753
8754   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
8755 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
8756 echo "configure:8757: checking for canna/RK.h" >&5
8757
8758 cat > conftest.$ac_ext <<EOF
8759 #line 8760 "configure"
8760 #include "confdefs.h"
8761 #include <canna/RK.h>
8762 EOF
8763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8764 { (eval echo configure:8765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8766 if test -z "$ac_err"; then
8767   rm -rf conftest*
8768   eval "ac_cv_header_$ac_safe=yes"
8769 else
8770   echo "$ac_err" >&5
8771   echo "configure: failed program was:" >&5
8772   cat conftest.$ac_ext >&5
8773   rm -rf conftest*
8774   eval "ac_cv_header_$ac_safe=no"
8775 fi
8776 rm -f conftest*
8777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8778   echo "$ac_t""yes" 1>&6
8779   :
8780 else
8781   echo "$ac_t""no" 1>&6
8782 with_canna=no
8783 fi
8784  }
8785   test -z "$with_canna" && { 
8786 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
8787 echo "configure:8788: checking for RkBgnBun in -lRKC" >&5
8788 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
8789
8790 xe_check_libs=" -lRKC "
8791 cat > conftest.$ac_ext <<EOF
8792 #line 8793 "configure"
8793 #include "confdefs.h"
8794 /* Override any gcc2 internal prototype to avoid an error.  */
8795 /* We use char because int might match the return type of a gcc2
8796     builtin and then its argument prototype would still apply.  */
8797 char RkBgnBun();
8798
8799 int main() {
8800 RkBgnBun()
8801 ; return 0; }
8802 EOF
8803 if { (eval echo configure:8804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8804   rm -rf conftest*
8805   eval "ac_cv_lib_$ac_lib_var=yes"
8806 else
8807   echo "configure: failed program was:" >&5
8808   cat conftest.$ac_ext >&5
8809   rm -rf conftest*
8810   eval "ac_cv_lib_$ac_lib_var=no"
8811 fi
8812 rm -f conftest*
8813 xe_check_libs=""
8814
8815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8816   echo "$ac_t""yes" 1>&6
8817   :
8818 else
8819   echo "$ac_t""no" 1>&6
8820 with_canna=no
8821 fi
8822
8823  }
8824   test -z "$with_canna" && { 
8825 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
8826 echo "configure:8827: checking for jrKanjiControl in -lcanna" >&5
8827 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
8828
8829 xe_check_libs=" -lcanna "
8830 cat > conftest.$ac_ext <<EOF
8831 #line 8832 "configure"
8832 #include "confdefs.h"
8833 /* Override any gcc2 internal prototype to avoid an error.  */
8834 /* We use char because int might match the return type of a gcc2
8835     builtin and then its argument prototype would still apply.  */
8836 char jrKanjiControl();
8837
8838 int main() {
8839 jrKanjiControl()
8840 ; return 0; }
8841 EOF
8842 if { (eval echo configure:8843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8843   rm -rf conftest*
8844   eval "ac_cv_lib_$ac_lib_var=yes"
8845 else
8846   echo "configure: failed program was:" >&5
8847   cat conftest.$ac_ext >&5
8848   rm -rf conftest*
8849   eval "ac_cv_lib_$ac_lib_var=no"
8850 fi
8851 rm -f conftest*
8852 xe_check_libs=""
8853
8854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8855   echo "$ac_t""yes" 1>&6
8856   :
8857 else
8858   echo "$ac_t""no" 1>&6
8859 with_canna=no
8860 fi
8861
8862  }
8863   test -z "$with_canna" && with_canna=yes
8864   if test "$with_canna" = "yes"; then
8865     { test "$extra_verbose" = "yes" && cat << \EOF
8866     Defining HAVE_CANNA
8867 EOF
8868 cat >> confdefs.h <<\EOF
8869 #define HAVE_CANNA 1
8870 EOF
8871 }
8872
8873     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
8874     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
8875    echo "    xemacs will be linked with \"mule-canna.o\""
8876  fi
8877   fi
8878
8879 else   for feature in xim canna wnn; do
8880     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
8881       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
8882     fi
8883     eval "with_${feature}=no"
8884   done
8885 fi 
8886
8887 if test "$need_motif" = "yes" ; then
8888   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
8889     
8890 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
8891 echo "configure:8892: checking for layout_object_getvalue in -li18n" >&5
8892 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
8893
8894 xe_check_libs=" -li18n "
8895 cat > conftest.$ac_ext <<EOF
8896 #line 8897 "configure"
8897 #include "confdefs.h"
8898 /* Override any gcc2 internal prototype to avoid an error.  */
8899 /* We use char because int might match the return type of a gcc2
8900     builtin and then its argument prototype would still apply.  */
8901 char layout_object_getvalue();
8902
8903 int main() {
8904 layout_object_getvalue()
8905 ; return 0; }
8906 EOF
8907 if { (eval echo configure:8908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8908   rm -rf conftest*
8909   eval "ac_cv_lib_$ac_lib_var=yes"
8910 else
8911   echo "configure: failed program was:" >&5
8912   cat conftest.$ac_ext >&5
8913   rm -rf conftest*
8914   eval "ac_cv_lib_$ac_lib_var=no"
8915 fi
8916 rm -f conftest*
8917 xe_check_libs=""
8918
8919 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8920   echo "$ac_t""yes" 1>&6
8921   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
8922 else
8923   echo "$ac_t""no" 1>&6
8924 fi
8925
8926
8927   
8928 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
8929     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8930   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8931   
8932         runpath="" runpath_dirs=""
8933   if test -n "$LD_RUN_PATH"; then
8934     runpath="$LD_RUN_PATH"
8935   elif test "$GCC" = "yes"; then
8936         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
8937     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
8938     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
8939     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
8940       case "$arg" in P,* | -L* | -R* )
8941         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
8942           {
8943 xe_runpath_dir="$dir"
8944   test "$xe_runpath_dir" != "/lib"     -a \
8945         "$xe_runpath_dir" != "/usr/lib" -a \
8946         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8947   eval "$xe_add_unique_runpath_dir"
8948 }
8949         done ;;
8950       esac
8951     done
8952     ld_switch_run="$ld_switch_run_save"
8953     rm -f conftest*
8954   else
8955         for arg in $ld_switch_site $ld_switch_x_site; do
8956       case "$arg" in -L*) {
8957 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
8958   test "$xe_runpath_dir" != "/lib"     -a \
8959         "$xe_runpath_dir" != "/usr/lib" -a \
8960         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8961   eval "$xe_add_unique_runpath_dir"
8962 };; esac
8963     done
8964         if test "$opsys $need_motif" = "sol2 yes"; then
8965       xe_runpath_dir="/opt/SUNWdt/lib";
8966       eval "$xe_add_unique_runpath_dir";
8967     fi
8968   fi 
8969   if test -n "$runpath"; then
8970     ld_switch_run="${dash_r}${runpath}"
8971     
8972 if test "$GCC" = "yes"; then
8973   set x $ld_switch_run; shift; ld_switch_run=""
8974   while test -n "$1"; do
8975     case $1 in
8976       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
8977       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
8978       -Xlinker* ) ;;
8979       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
8980     esac
8981     shift
8982   done
8983 fi
8984     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
8985   fi
8986 fi
8987
8988 fi
8989
8990 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf
8991 do
8992 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8993 echo "configure:8994: checking for $ac_func" >&5
8994
8995 cat > conftest.$ac_ext <<EOF
8996 #line 8997 "configure"
8997 #include "confdefs.h"
8998 /* System header to define __stub macros and hopefully few prototypes,
8999     which can conflict with char $ac_func(); below.  */
9000 #include <assert.h>
9001 /* Override any gcc2 internal prototype to avoid an error.  */
9002 /* We use char because int might match the return type of a gcc2
9003     builtin and then its argument prototype would still apply.  */
9004 char $ac_func();
9005
9006 int main() {
9007
9008 /* The GNU C library defines this for functions which it implements
9009     to always fail with ENOSYS.  Some functions are actually named
9010     something starting with __ and the normal name is an alias.  */
9011 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9012 choke me
9013 #else
9014 $ac_func();
9015 #endif
9016
9017 ; return 0; }
9018 EOF
9019 if { (eval echo configure:9020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9020   rm -rf conftest*
9021   eval "ac_cv_func_$ac_func=yes"
9022 else
9023   echo "configure: failed program was:" >&5
9024   cat conftest.$ac_ext >&5
9025   rm -rf conftest*
9026   eval "ac_cv_func_$ac_func=no"
9027 fi
9028 rm -f conftest*
9029
9030 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9031   echo "$ac_t""yes" 1>&6
9032     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9033   { test "$extra_verbose" = "yes" && cat << EOF
9034     Defining $ac_tr_func
9035 EOF
9036 cat >> confdefs.h <<EOF
9037 #define $ac_tr_func 1
9038 EOF
9039 }
9040  
9041 else
9042   echo "$ac_t""no" 1>&6
9043 fi
9044 done
9045
9046
9047
9048 case "$opsys" in
9049   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9050    echo "    xemacs will be linked with \"realpath.o\""
9051  fi ;;
9052   * )
9053     case "$canonical" in
9054       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9055    echo "    xemacs will be linked with \"realpath.o\""
9056  fi ;;
9057       * ) for ac_func in realpath
9058 do
9059 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9060 echo "configure:9061: checking for $ac_func" >&5
9061
9062 cat > conftest.$ac_ext <<EOF
9063 #line 9064 "configure"
9064 #include "confdefs.h"
9065 /* System header to define __stub macros and hopefully few prototypes,
9066     which can conflict with char $ac_func(); below.  */
9067 #include <assert.h>
9068 /* Override any gcc2 internal prototype to avoid an error.  */
9069 /* We use char because int might match the return type of a gcc2
9070     builtin and then its argument prototype would still apply.  */
9071 char $ac_func();
9072
9073 int main() {
9074
9075 /* The GNU C library defines this for functions which it implements
9076     to always fail with ENOSYS.  Some functions are actually named
9077     something starting with __ and the normal name is an alias.  */
9078 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9079 choke me
9080 #else
9081 $ac_func();
9082 #endif
9083
9084 ; return 0; }
9085 EOF
9086 if { (eval echo configure:9087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9087   rm -rf conftest*
9088   eval "ac_cv_func_$ac_func=yes"
9089 else
9090   echo "configure: failed program was:" >&5
9091   cat conftest.$ac_ext >&5
9092   rm -rf conftest*
9093   eval "ac_cv_func_$ac_func=no"
9094 fi
9095 rm -f conftest*
9096
9097 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9098   echo "$ac_t""yes" 1>&6
9099     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9100   { test "$extra_verbose" = "yes" && cat << EOF
9101     Defining $ac_tr_func
9102 EOF
9103 cat >> confdefs.h <<EOF
9104 #define $ac_tr_func 1
9105 EOF
9106 }
9107  
9108 else
9109   echo "$ac_t""no" 1>&6
9110 fi
9111 done
9112
9113           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9114    echo "    xemacs will be linked with \"realpath.o\""
9115  fi ;;
9116     esac ;;
9117 esac
9118
9119 for ac_func in getloadavg
9120 do
9121 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9122 echo "configure:9123: checking for $ac_func" >&5
9123
9124 cat > conftest.$ac_ext <<EOF
9125 #line 9126 "configure"
9126 #include "confdefs.h"
9127 /* System header to define __stub macros and hopefully few prototypes,
9128     which can conflict with char $ac_func(); below.  */
9129 #include <assert.h>
9130 /* Override any gcc2 internal prototype to avoid an error.  */
9131 /* We use char because int might match the return type of a gcc2
9132     builtin and then its argument prototype would still apply.  */
9133 char $ac_func();
9134
9135 int main() {
9136
9137 /* The GNU C library defines this for functions which it implements
9138     to always fail with ENOSYS.  Some functions are actually named
9139     something starting with __ and the normal name is an alias.  */
9140 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9141 choke me
9142 #else
9143 $ac_func();
9144 #endif
9145
9146 ; return 0; }
9147 EOF
9148 if { (eval echo configure:9149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9149   rm -rf conftest*
9150   eval "ac_cv_func_$ac_func=yes"
9151 else
9152   echo "configure: failed program was:" >&5
9153   cat conftest.$ac_ext >&5
9154   rm -rf conftest*
9155   eval "ac_cv_func_$ac_func=no"
9156 fi
9157 rm -f conftest*
9158
9159 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9160   echo "$ac_t""yes" 1>&6
9161     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9162   { test "$extra_verbose" = "yes" && cat << EOF
9163     Defining $ac_tr_func
9164 EOF
9165 cat >> confdefs.h <<EOF
9166 #define $ac_tr_func 1
9167 EOF
9168 }
9169  
9170 else
9171   echo "$ac_t""no" 1>&6
9172 fi
9173 done
9174
9175
9176 if test "$ac_cv_func_getloadavg" != "yes"
9177 then
9178   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
9179    echo "    xemacs will be linked with \"getloadavg.o\""
9180  fi
9181
9182     
9183 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
9184 echo "configure:9185: checking for kstat_open in -lkstat" >&5
9185 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
9186
9187 xe_check_libs=" -lkstat "
9188 cat > conftest.$ac_ext <<EOF
9189 #line 9190 "configure"
9190 #include "confdefs.h"
9191 /* Override any gcc2 internal prototype to avoid an error.  */
9192 /* We use char because int might match the return type of a gcc2
9193     builtin and then its argument prototype would still apply.  */
9194 char kstat_open();
9195
9196 int main() {
9197 kstat_open()
9198 ; return 0; }
9199 EOF
9200 if { (eval echo configure:9201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9201   rm -rf conftest*
9202   eval "ac_cv_lib_$ac_lib_var=yes"
9203 else
9204   echo "configure: failed program was:" >&5
9205   cat conftest.$ac_ext >&5
9206   rm -rf conftest*
9207   eval "ac_cv_lib_$ac_lib_var=no"
9208 fi
9209 rm -f conftest*
9210 xe_check_libs=""
9211
9212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9213   echo "$ac_t""yes" 1>&6
9214     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9215     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9216   { test "$extra_verbose" = "yes" && cat << EOF
9217     Defining $ac_tr_lib
9218 EOF
9219 cat >> confdefs.h <<EOF
9220 #define $ac_tr_lib 1
9221 EOF
9222 }
9223
9224   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
9225
9226 else
9227   echo "$ac_t""no" 1>&6
9228 fi
9229
9230
9231
9232     
9233 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
9234 echo "configure:9235: checking for kvm_read in -lkvm" >&5
9235 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
9236
9237 xe_check_libs=" -lkvm "
9238 cat > conftest.$ac_ext <<EOF
9239 #line 9240 "configure"
9240 #include "confdefs.h"
9241 /* Override any gcc2 internal prototype to avoid an error.  */
9242 /* We use char because int might match the return type of a gcc2
9243     builtin and then its argument prototype would still apply.  */
9244 char kvm_read();
9245
9246 int main() {
9247 kvm_read()
9248 ; return 0; }
9249 EOF
9250 if { (eval echo configure:9251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9251   rm -rf conftest*
9252   eval "ac_cv_lib_$ac_lib_var=yes"
9253 else
9254   echo "configure: failed program was:" >&5
9255   cat conftest.$ac_ext >&5
9256   rm -rf conftest*
9257   eval "ac_cv_lib_$ac_lib_var=no"
9258 fi
9259 rm -f conftest*
9260 xe_check_libs=""
9261
9262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9263   echo "$ac_t""yes" 1>&6
9264     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9265     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9266   { test "$extra_verbose" = "yes" && cat << EOF
9267     Defining $ac_tr_lib
9268 EOF
9269 cat >> confdefs.h <<EOF
9270 #define $ac_tr_lib 1
9271 EOF
9272 }
9273
9274   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9275
9276 else
9277   echo "$ac_t""no" 1>&6
9278 fi
9279
9280
9281 fi
9282
9283 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9284 echo "configure:9285: checking whether netdb declares h_errno" >&5
9285 cat > conftest.$ac_ext <<EOF
9286 #line 9287 "configure"
9287 #include "confdefs.h"
9288 #include <netdb.h>
9289 int main() {
9290 return h_errno;
9291 ; return 0; }
9292 EOF
9293 if { (eval echo configure:9294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9294   rm -rf conftest*
9295   echo "$ac_t""yes" 1>&6
9296    { test "$extra_verbose" = "yes" && cat << \EOF
9297     Defining HAVE_H_ERRNO
9298 EOF
9299 cat >> confdefs.h <<\EOF
9300 #define HAVE_H_ERRNO 1
9301 EOF
9302 }
9303
9304 else
9305   echo "configure: failed program was:" >&5
9306   cat conftest.$ac_ext >&5
9307   rm -rf conftest*
9308   echo "$ac_t""no" 1>&6
9309 fi
9310 rm -f conftest*
9311
9312 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9313 echo "configure:9314: checking for sigsetjmp" >&5
9314 cat > conftest.$ac_ext <<EOF
9315 #line 9316 "configure"
9316 #include "confdefs.h"
9317 #include <setjmp.h>
9318 int main() {
9319 sigjmp_buf bar; sigsetjmp (bar, 0);
9320 ; return 0; }
9321 EOF
9322 if { (eval echo configure:9323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9323   rm -rf conftest*
9324   echo "$ac_t""yes" 1>&6
9325    { test "$extra_verbose" = "yes" && cat << \EOF
9326     Defining HAVE_SIGSETJMP
9327 EOF
9328 cat >> confdefs.h <<\EOF
9329 #define HAVE_SIGSETJMP 1
9330 EOF
9331 }
9332
9333 else
9334   echo "configure: failed program was:" >&5
9335   cat conftest.$ac_ext >&5
9336   rm -rf conftest*
9337   echo "$ac_t""no" 1>&6
9338 fi
9339 rm -f conftest*
9340
9341 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9342 echo "configure:9343: checking whether localtime caches TZ" >&5
9343
9344 if test "$ac_cv_func_tzset" = "yes"; then
9345 cat > conftest.$ac_ext <<EOF
9346 #line 9347 "configure"
9347 #include "confdefs.h"
9348 #include <time.h>
9349 #if STDC_HEADERS
9350 # include <stdlib.h>
9351 #endif
9352 extern char **environ;
9353 unset_TZ ()
9354 {
9355   char **from, **to;
9356   for (to = from = environ; (*to = *from); from++)
9357     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9358       to++;
9359 }
9360 char TZ_GMT0[] = "TZ=GMT0";
9361 char TZ_PST8[] = "TZ=PST8";
9362 main()
9363 {
9364   time_t now = time ((time_t *) 0);
9365   int hour_GMT0, hour_unset;
9366   if (putenv (TZ_GMT0) != 0)
9367     exit (1);
9368   hour_GMT0 = localtime (&now)->tm_hour;
9369   unset_TZ ();
9370   hour_unset = localtime (&now)->tm_hour;
9371   if (putenv (TZ_PST8) != 0)
9372     exit (1);
9373   if (localtime (&now)->tm_hour == hour_GMT0)
9374     exit (1);
9375   unset_TZ ();
9376   if (localtime (&now)->tm_hour != hour_unset)
9377     exit (1);
9378   exit (0);
9379 }
9380 EOF
9381 if { (eval echo configure:9382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9382 then
9383   emacs_cv_localtime_cache=no
9384 else
9385   conftest_rc="$?"
9386   echo "configure: failed program was:" >&5
9387   cat conftest.$ac_ext >&5
9388   rm -fr conftest*
9389   emacs_cv_localtime_cache=yes
9390 fi
9391 rm -fr conftest*
9392 else
9393         # If we lack tzset, report that localtime does not cache TZ,
9394         # since we can't invalidate the cache if we don't have tzset.
9395         emacs_cv_localtime_cache=no
9396 fi
9397 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9398 if test $emacs_cv_localtime_cache = yes; then
9399   { test "$extra_verbose" = "yes" && cat << \EOF
9400     Defining LOCALTIME_CACHE
9401 EOF
9402 cat >> confdefs.h <<\EOF
9403 #define LOCALTIME_CACHE 1
9404 EOF
9405 }
9406
9407 fi
9408
9409 if test "$HAVE_TIMEVAL" = "yes"; then
9410 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9411 echo "configure:9412: checking whether gettimeofday accepts one or two arguments" >&5
9412 cat > conftest.$ac_ext <<EOF
9413 #line 9414 "configure"
9414 #include "confdefs.h"
9415
9416 #ifdef TIME_WITH_SYS_TIME
9417 #include <sys/time.h>
9418 #include <time.h>
9419 #else
9420 #ifdef HAVE_SYS_TIME_H
9421 #include <sys/time.h>
9422 #else
9423 #include <time.h>
9424 #endif
9425 #endif
9426   
9427 int main() {
9428
9429   struct timeval time;
9430   struct timezone dummy;
9431   gettimeofday (&time, &dummy);
9432
9433 ; return 0; }
9434 EOF
9435 if { (eval echo configure:9436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9436   rm -rf conftest*
9437   echo "$ac_t""two" 1>&6
9438 else
9439   echo "configure: failed program was:" >&5
9440   cat conftest.$ac_ext >&5
9441   rm -rf conftest*
9442   echo "$ac_t""one" 1>&6
9443    { test "$extra_verbose" = "yes" && cat << \EOF
9444     Defining GETTIMEOFDAY_ONE_ARGUMENT
9445 EOF
9446 cat >> confdefs.h <<\EOF
9447 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9448 EOF
9449 }
9450
9451 fi
9452 rm -f conftest*
9453 fi
9454
9455
9456 echo $ac_n "checking for inline""... $ac_c" 1>&6
9457 echo "configure:9458: checking for inline" >&5
9458
9459 ac_cv_c_inline=no
9460 for ac_kw in inline __inline__ __inline; do
9461   cat > conftest.$ac_ext <<EOF
9462 #line 9463 "configure"
9463 #include "confdefs.h"
9464
9465 int main() {
9466 } $ac_kw foo() {
9467 ; return 0; }
9468 EOF
9469 if { (eval echo configure:9470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9470   rm -rf conftest*
9471   ac_cv_c_inline=$ac_kw; break
9472 else
9473   echo "configure: failed program was:" >&5
9474   cat conftest.$ac_ext >&5
9475 fi
9476 rm -f conftest*
9477 done
9478
9479
9480 echo "$ac_t""$ac_cv_c_inline" 1>&6
9481 case "$ac_cv_c_inline" in
9482   inline | yes) ;;
9483   no) { test "$extra_verbose" = "yes" && cat << \EOF
9484     Defining inline = 
9485 EOF
9486 cat >> confdefs.h <<\EOF
9487 #define inline 
9488 EOF
9489 }
9490  ;;
9491   *)  { test "$extra_verbose" = "yes" && cat << EOF
9492     Defining inline = $ac_cv_c_inline
9493 EOF
9494 cat >> confdefs.h <<EOF
9495 #define inline $ac_cv_c_inline
9496 EOF
9497 }
9498  ;;
9499 esac
9500
9501 if test "$ac_cv_c_inline" != "no"; then
9502   { test "$extra_verbose" = "yes" && cat << \EOF
9503     Defining HAVE_INLINE
9504 EOF
9505 cat >> confdefs.h <<\EOF
9506 #define HAVE_INLINE 1
9507 EOF
9508 }
9509
9510   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
9511    echo "    xemacs will be linked with \"inline.o\""
9512  fi
9513 fi
9514
9515
9516 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9517 # for constant arguments.  Useless!
9518 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9519 echo "configure:9520: checking for working alloca.h" >&5
9520
9521 cat > conftest.$ac_ext <<EOF
9522 #line 9523 "configure"
9523 #include "confdefs.h"
9524 #include <alloca.h>
9525 int main() {
9526 char *p = alloca(2 * sizeof(int));
9527 ; return 0; }
9528 EOF
9529 if { (eval echo configure:9530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9530   rm -rf conftest*
9531   ac_cv_header_alloca_h=yes
9532 else
9533   echo "configure: failed program was:" >&5
9534   cat conftest.$ac_ext >&5
9535   rm -rf conftest*
9536   ac_cv_header_alloca_h=no
9537 fi
9538 rm -f conftest*
9539
9540 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9541 if test $ac_cv_header_alloca_h = yes; then
9542   { test "$extra_verbose" = "yes" && cat << \EOF
9543     Defining HAVE_ALLOCA_H
9544 EOF
9545 cat >> confdefs.h <<\EOF
9546 #define HAVE_ALLOCA_H 1
9547 EOF
9548 }
9549
9550 fi
9551
9552 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9553 echo "configure:9554: checking for alloca" >&5
9554
9555 cat > conftest.$ac_ext <<EOF
9556 #line 9557 "configure"
9557 #include "confdefs.h"
9558
9559 #ifdef __GNUC__
9560 # define alloca __builtin_alloca
9561 #else
9562 # ifdef _MSC_VER
9563 #  include <malloc.h>
9564 #  define alloca _alloca
9565 # else
9566 #  if HAVE_ALLOCA_H
9567 #   include <alloca.h>
9568 #  else
9569 #   ifdef _AIX
9570  #pragma alloca
9571 #   else
9572 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9573 char *alloca ();
9574 #    endif
9575 #   endif
9576 #  endif
9577 # endif
9578 #endif
9579
9580 int main() {
9581 char *p = (char *) alloca(1);
9582 ; return 0; }
9583 EOF
9584 if { (eval echo configure:9585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9585   rm -rf conftest*
9586   ac_cv_func_alloca_works=yes
9587 else
9588   echo "configure: failed program was:" >&5
9589   cat conftest.$ac_ext >&5
9590   rm -rf conftest*
9591   ac_cv_func_alloca_works=no
9592 fi
9593 rm -f conftest*
9594
9595 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
9596 if test $ac_cv_func_alloca_works = yes; then
9597   { test "$extra_verbose" = "yes" && cat << \EOF
9598     Defining HAVE_ALLOCA
9599 EOF
9600 cat >> confdefs.h <<\EOF
9601 #define HAVE_ALLOCA 1
9602 EOF
9603 }
9604
9605 fi
9606
9607 if test $ac_cv_func_alloca_works = no; then
9608   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9609   # that cause trouble.  Some versions do not even contain alloca or
9610   # contain a buggy version.  If you still want to use their alloca,
9611   # use ar to extract alloca.o from them instead of compiling alloca.c.
9612   ALLOCA=alloca.${ac_objext}
9613   { test "$extra_verbose" = "yes" && cat << \EOF
9614     Defining C_ALLOCA
9615 EOF
9616 cat >> confdefs.h <<\EOF
9617 #define C_ALLOCA 1
9618 EOF
9619 }
9620
9621
9622 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9623 echo "configure:9624: checking whether alloca needs Cray hooks" >&5
9624
9625 cat > conftest.$ac_ext <<EOF
9626 #line 9627 "configure"
9627 #include "confdefs.h"
9628 #if defined(CRAY) && ! defined(CRAY2)
9629 webecray
9630 #else
9631 wenotbecray
9632 #endif
9633
9634 EOF
9635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9636   egrep "webecray" >/dev/null 2>&1; then
9637   rm -rf conftest*
9638   ac_cv_os_cray=yes
9639 else
9640   rm -rf conftest*
9641   ac_cv_os_cray=no
9642 fi
9643 rm -f conftest*
9644
9645
9646 echo "$ac_t""$ac_cv_os_cray" 1>&6
9647 if test $ac_cv_os_cray = yes; then
9648 for ac_func in _getb67 GETB67 getb67; do
9649   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9650 echo "configure:9651: checking for $ac_func" >&5
9651
9652 cat > conftest.$ac_ext <<EOF
9653 #line 9654 "configure"
9654 #include "confdefs.h"
9655 /* System header to define __stub macros and hopefully few prototypes,
9656     which can conflict with char $ac_func(); below.  */
9657 #include <assert.h>
9658 /* Override any gcc2 internal prototype to avoid an error.  */
9659 /* We use char because int might match the return type of a gcc2
9660     builtin and then its argument prototype would still apply.  */
9661 char $ac_func();
9662
9663 int main() {
9664
9665 /* The GNU C library defines this for functions which it implements
9666     to always fail with ENOSYS.  Some functions are actually named
9667     something starting with __ and the normal name is an alias.  */
9668 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9669 choke me
9670 #else
9671 $ac_func();
9672 #endif
9673
9674 ; return 0; }
9675 EOF
9676 if { (eval echo configure:9677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9677   rm -rf conftest*
9678   eval "ac_cv_func_$ac_func=yes"
9679 else
9680   echo "configure: failed program was:" >&5
9681   cat conftest.$ac_ext >&5
9682   rm -rf conftest*
9683   eval "ac_cv_func_$ac_func=no"
9684 fi
9685 rm -f conftest*
9686
9687 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9688   echo "$ac_t""yes" 1>&6
9689   { test "$extra_verbose" = "yes" && cat << EOF
9690     Defining CRAY_STACKSEG_END = $ac_func
9691 EOF
9692 cat >> confdefs.h <<EOF
9693 #define CRAY_STACKSEG_END $ac_func
9694 EOF
9695 }
9696
9697   break
9698 else
9699   echo "$ac_t""no" 1>&6
9700 fi
9701
9702 done
9703 fi
9704
9705 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9706 echo "configure:9707: checking stack direction for C alloca" >&5
9707
9708 cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 find_stack_direction ()
9712 {
9713   static char *addr = 0;
9714   auto char dummy;
9715   if (addr == 0)
9716     {
9717       addr = &dummy;
9718       return find_stack_direction ();
9719     }
9720   else
9721     return (&dummy > addr) ? 1 : -1;
9722 }
9723 main ()
9724 {
9725   exit (find_stack_direction() < 0);
9726 }
9727 EOF
9728 if { (eval echo configure:9729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9729 then
9730   ac_cv_c_stack_direction=1
9731 else
9732   conftest_rc="$?"
9733   echo "configure: failed program was:" >&5
9734   cat conftest.$ac_ext >&5
9735   rm -fr conftest*
9736   ac_cv_c_stack_direction=-1
9737 fi
9738 rm -fr conftest*
9739
9740 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
9741 { test "$extra_verbose" = "yes" && cat << EOF
9742     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
9743 EOF
9744 cat >> confdefs.h <<EOF
9745 #define STACK_DIRECTION $ac_cv_c_stack_direction
9746 EOF
9747 }
9748
9749 fi
9750
9751 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
9752    echo "    xemacs will be linked with \"$ALLOCA\""
9753  fi
9754
9755 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
9756 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9757 echo "configure:9758: checking for vfork.h" >&5
9758
9759 cat > conftest.$ac_ext <<EOF
9760 #line 9761 "configure"
9761 #include "confdefs.h"
9762 #include <vfork.h>
9763 EOF
9764 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9765 { (eval echo configure:9766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9766 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9767 if test -z "$ac_err"; then
9768   rm -rf conftest*
9769   eval "ac_cv_header_$ac_safe=yes"
9770 else
9771   echo "$ac_err" >&5
9772   echo "configure: failed program was:" >&5
9773   cat conftest.$ac_ext >&5
9774   rm -rf conftest*
9775   eval "ac_cv_header_$ac_safe=no"
9776 fi
9777 rm -f conftest*
9778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9779   echo "$ac_t""yes" 1>&6
9780   { test "$extra_verbose" = "yes" && cat << \EOF
9781     Defining HAVE_VFORK_H
9782 EOF
9783 cat >> confdefs.h <<\EOF
9784 #define HAVE_VFORK_H 1
9785 EOF
9786 }
9787
9788 else
9789   echo "$ac_t""no" 1>&6
9790 fi
9791
9792 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9793 echo "configure:9794: checking for working vfork" >&5
9794
9795 cat > conftest.$ac_ext <<EOF
9796 #line 9797 "configure"
9797 #include "confdefs.h"
9798 /* Thanks to Paul Eggert for this test.  */
9799 #include <stdio.h>
9800 #include <sys/types.h>
9801 #include <sys/stat.h>
9802 #ifdef HAVE_UNISTD_H
9803 #include <unistd.h>
9804 #endif
9805 #ifdef HAVE_VFORK_H
9806 #include <vfork.h>
9807 #endif
9808 /* On some sparc systems, changes by the child to local and incoming
9809    argument registers are propagated back to the parent.
9810    The compiler is told about this with #include <vfork.h>,
9811    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9812    Test for this by using a static variable whose address
9813    is put into a register that is clobbered by the vfork.  */
9814 static
9815 #ifdef __cplusplus
9816 sparc_address_test (int arg)
9817 #else
9818 sparc_address_test (arg) int arg;
9819 #endif
9820 {
9821   static pid_t child;
9822   if (!child) {
9823     child = vfork ();
9824     if (child < 0) {
9825       perror ("vfork");
9826       _exit(2);
9827     }
9828     if (!child) {
9829       arg = getpid();
9830       write(-1, "", 0);
9831       _exit (arg);
9832     }
9833   }
9834 }
9835 main() {
9836   pid_t parent = getpid ();
9837   pid_t child;
9838
9839   sparc_address_test ();
9840
9841   child = vfork ();
9842
9843   if (child == 0) {
9844     /* Here is another test for sparc vfork register problems.
9845        This test uses lots of local variables, at least
9846        as many local variables as main has allocated so far
9847        including compiler temporaries.  4 locals are enough for
9848        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9849        A buggy compiler should reuse the register of parent
9850        for one of the local variables, since it will think that
9851        parent can't possibly be used any more in this routine.
9852        Assigning to the local variable will thus munge parent
9853        in the parent process.  */
9854     pid_t
9855       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9856       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9857     /* Convince the compiler that p..p7 are live; otherwise, it might
9858        use the same hardware register for all 8 local variables.  */
9859     if (p != p1 || p != p2 || p != p3 || p != p4
9860         || p != p5 || p != p6 || p != p7)
9861       _exit(1);
9862
9863     /* On some systems (e.g. IRIX 3.3),
9864        vfork doesn't separate parent from child file descriptors.
9865        If the child closes a descriptor before it execs or exits,
9866        this munges the parent's descriptor as well.
9867        Test for this by closing stdout in the child.  */
9868     _exit(close(fileno(stdout)) != 0);
9869   } else {
9870     int status;
9871     struct stat st;
9872
9873     while (wait(&status) != child)
9874       ;
9875     exit(
9876          /* Was there some problem with vforking?  */
9877          child < 0
9878
9879          /* Did the child fail?  (This shouldn't happen.)  */
9880          || status
9881
9882          /* Did the vfork/compiler bug occur?  */
9883          || parent != getpid()
9884
9885          /* Did the file descriptor bug occur?  */
9886          || fstat(fileno(stdout), &st) != 0
9887          );
9888   }
9889 }
9890 EOF
9891 if { (eval echo configure:9892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9892 then
9893   ac_cv_func_vfork_works=yes
9894 else
9895   conftest_rc="$?"
9896   echo "configure: failed program was:" >&5
9897   cat conftest.$ac_ext >&5
9898   rm -fr conftest*
9899   ac_cv_func_vfork_works=no
9900 fi
9901 rm -fr conftest*
9902
9903 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9904 if test $ac_cv_func_vfork_works = no; then
9905   { test "$extra_verbose" = "yes" && cat << \EOF
9906     Defining vfork = fork
9907 EOF
9908 cat >> confdefs.h <<\EOF
9909 #define vfork fork
9910 EOF
9911 }
9912
9913 fi
9914
9915
9916 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
9917 echo "configure:9918: checking for working strcoll" >&5
9918
9919 cat > conftest.$ac_ext <<EOF
9920 #line 9921 "configure"
9921 #include "confdefs.h"
9922 #include <string.h>
9923 main ()
9924 {
9925   exit (strcoll ("abc", "def") >= 0 ||
9926         strcoll ("ABC", "DEF") >= 0 ||
9927         strcoll ("123", "456") >= 0);
9928 }
9929 EOF
9930 if { (eval echo configure:9931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9931 then
9932   ac_cv_func_strcoll_works=yes
9933 else
9934   conftest_rc="$?"
9935   echo "configure: failed program was:" >&5
9936   cat conftest.$ac_ext >&5
9937   rm -fr conftest*
9938   ac_cv_func_strcoll_works=no
9939 fi
9940 rm -fr conftest*
9941
9942 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
9943 if test $ac_cv_func_strcoll_works = yes; then
9944   { test "$extra_verbose" = "yes" && cat << \EOF
9945     Defining HAVE_STRCOLL
9946 EOF
9947 cat >> confdefs.h <<\EOF
9948 #define HAVE_STRCOLL 1
9949 EOF
9950 }
9951
9952 fi
9953
9954
9955 for ac_func in getpgrp
9956 do
9957 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9958 echo "configure:9959: checking for $ac_func" >&5
9959
9960 cat > conftest.$ac_ext <<EOF
9961 #line 9962 "configure"
9962 #include "confdefs.h"
9963 /* System header to define __stub macros and hopefully few prototypes,
9964     which can conflict with char $ac_func(); below.  */
9965 #include <assert.h>
9966 /* Override any gcc2 internal prototype to avoid an error.  */
9967 /* We use char because int might match the return type of a gcc2
9968     builtin and then its argument prototype would still apply.  */
9969 char $ac_func();
9970
9971 int main() {
9972
9973 /* The GNU C library defines this for functions which it implements
9974     to always fail with ENOSYS.  Some functions are actually named
9975     something starting with __ and the normal name is an alias.  */
9976 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9977 choke me
9978 #else
9979 $ac_func();
9980 #endif
9981
9982 ; return 0; }
9983 EOF
9984 if { (eval echo configure:9985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9985   rm -rf conftest*
9986   eval "ac_cv_func_$ac_func=yes"
9987 else
9988   echo "configure: failed program was:" >&5
9989   cat conftest.$ac_ext >&5
9990   rm -rf conftest*
9991   eval "ac_cv_func_$ac_func=no"
9992 fi
9993 rm -f conftest*
9994
9995 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9996   echo "$ac_t""yes" 1>&6
9997     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9998   { test "$extra_verbose" = "yes" && cat << EOF
9999     Defining $ac_tr_func
10000 EOF
10001 cat >> confdefs.h <<EOF
10002 #define $ac_tr_func 1
10003 EOF
10004 }
10005  
10006 else
10007   echo "$ac_t""no" 1>&6
10008 fi
10009 done
10010
10011 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10012 echo "configure:10013: checking whether getpgrp takes no argument" >&5
10013
10014 cat > conftest.$ac_ext <<EOF
10015 #line 10016 "configure"
10016 #include "confdefs.h"
10017
10018 /*
10019  * If this system has a BSD-style getpgrp(),
10020  * which takes a pid argument, exit unsuccessfully.
10021  *
10022  * Snarfed from Chet Ramey's bash pgrp.c test program
10023  */
10024 #include <stdio.h>
10025 #include <sys/types.h>
10026
10027 int     pid;
10028 int     pg1, pg2, pg3, pg4;
10029 int     ng, np, s, child;
10030
10031 main()
10032 {
10033         pid = getpid();
10034         pg1 = getpgrp(0);
10035         pg2 = getpgrp();
10036         pg3 = getpgrp(pid);
10037         pg4 = getpgrp(1);
10038
10039         /*
10040          * If all of these values are the same, it's pretty sure that
10041          * we're on a system that ignores getpgrp's first argument.
10042          */
10043         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10044                 exit(0);
10045
10046         child = fork();
10047         if (child < 0)
10048                 exit(1);
10049         else if (child == 0) {
10050                 np = getpid();
10051                 /*
10052                  * If this is Sys V, this will not work; pgrp will be
10053                  * set to np because setpgrp just changes a pgrp to be
10054                  * the same as the pid.
10055                  */
10056                 setpgrp(np, pg1);
10057                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10058                 if (ng == pg1) {
10059                         exit(1);
10060                 } else {
10061                         exit(0);
10062                 }
10063         } else {
10064                 wait(&s);
10065                 exit(s>>8);
10066         }
10067 }
10068
10069 EOF
10070 if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10071 then
10072   ac_cv_func_getpgrp_void=yes
10073 else
10074   conftest_rc="$?"
10075   echo "configure: failed program was:" >&5
10076   cat conftest.$ac_ext >&5
10077   rm -fr conftest*
10078   ac_cv_func_getpgrp_void=no
10079 fi
10080 rm -fr conftest*
10081
10082
10083 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10084 if test $ac_cv_func_getpgrp_void = yes; then
10085   { test "$extra_verbose" = "yes" && cat << \EOF
10086     Defining GETPGRP_VOID
10087 EOF
10088 cat >> confdefs.h <<\EOF
10089 #define GETPGRP_VOID 1
10090 EOF
10091 }
10092
10093 fi
10094
10095
10096 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10097 echo "configure:10098: checking for working mmap" >&5
10098 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10099 cat > conftest.$ac_ext <<EOF
10100 #line 10101 "configure"
10101 #include "confdefs.h"
10102 #include <stdio.h>
10103 #include <unistd.h>
10104 #include <fcntl.h>
10105 #include <sys/mman.h>
10106
10107 #ifndef MAP_VARIABLE
10108 #define MAP_VARIABLE 0
10109 #endif
10110
10111 #ifndef MAP_FAILED
10112 #define MAP_FAILED -1
10113 #endif
10114
10115 int main (int argc, char *argv[])
10116 {
10117   int fd = -1;
10118   caddr_t p;
10119 #ifndef MAP_ANONYMOUS
10120   fd = open ("/dev/zero", O_RDWR);
10121   if (fd < 0)
10122     return 1;
10123 #define MAP_ANONYMOUS 0
10124 #endif
10125   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10126            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10127            fd, 0) != (void *) MAP_FAILED)
10128     return 0;
10129   perror ("conftest: mmap failed");
10130   return 1;
10131 }
10132 EOF
10133 if { (eval echo configure:10134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10134 then
10135   have_mmap=yes
10136 else
10137   conftest_rc="$?"
10138   echo "configure: failed program was:" >&5
10139   cat conftest.$ac_ext >&5
10140   rm -fr conftest*
10141   have_mmap=no
10142 fi
10143 rm -fr conftest* ;;
10144 esac
10145 echo "$ac_t""$have_mmap" 1>&6
10146 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10147     Defining HAVE_MMAP
10148 EOF
10149 cat >> confdefs.h <<\EOF
10150 #define HAVE_MMAP 1
10151 EOF
10152 }
10153
10154
10155 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10156 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10157 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10158     Defining REL_ALLOC
10159 EOF
10160 cat >> confdefs.h <<\EOF
10161 #define REL_ALLOC 1
10162 EOF
10163 }
10164
10165
10166 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10167 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10168 echo "configure:10169: checking for termios.h" >&5
10169
10170 cat > conftest.$ac_ext <<EOF
10171 #line 10172 "configure"
10172 #include "confdefs.h"
10173 #include <termios.h>
10174 EOF
10175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10176 { (eval echo configure:10177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10178 if test -z "$ac_err"; then
10179   rm -rf conftest*
10180   eval "ac_cv_header_$ac_safe=yes"
10181 else
10182   echo "$ac_err" >&5
10183   echo "configure: failed program was:" >&5
10184   cat conftest.$ac_ext >&5
10185   rm -rf conftest*
10186   eval "ac_cv_header_$ac_safe=no"
10187 fi
10188 rm -f conftest*
10189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10190   echo "$ac_t""yes" 1>&6
10191   { test "$extra_verbose" = "yes" && cat << \EOF
10192     Defining HAVE_TERMIOS
10193 EOF
10194 cat >> confdefs.h <<\EOF
10195 #define HAVE_TERMIOS 1
10196 EOF
10197 }
10198
10199   { test "$extra_verbose" = "yes" && cat << \EOF
10200     Defining SIGNALS_VIA_CHARACTERS
10201 EOF
10202 cat >> confdefs.h <<\EOF
10203 #define SIGNALS_VIA_CHARACTERS 1
10204 EOF
10205 }
10206
10207   { test "$extra_verbose" = "yes" && cat << \EOF
10208     Defining NO_TERMIO
10209 EOF
10210 cat >> confdefs.h <<\EOF
10211 #define NO_TERMIO 1
10212 EOF
10213 }
10214
10215 else
10216   echo "$ac_t""no" 1>&6
10217 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10218 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10219 echo "configure:10220: checking for termio.h" >&5
10220
10221 cat > conftest.$ac_ext <<EOF
10222 #line 10223 "configure"
10223 #include "confdefs.h"
10224 #include <termio.h>
10225 EOF
10226 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10227 { (eval echo configure:10228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10228 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10229 if test -z "$ac_err"; then
10230   rm -rf conftest*
10231   eval "ac_cv_header_$ac_safe=yes"
10232 else
10233   echo "$ac_err" >&5
10234   echo "configure: failed program was:" >&5
10235   cat conftest.$ac_ext >&5
10236   rm -rf conftest*
10237   eval "ac_cv_header_$ac_safe=no"
10238 fi
10239 rm -f conftest*
10240 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10241   echo "$ac_t""yes" 1>&6
10242   { test "$extra_verbose" = "yes" && cat << \EOF
10243     Defining HAVE_TERMIO
10244 EOF
10245 cat >> confdefs.h <<\EOF
10246 #define HAVE_TERMIO 1
10247 EOF
10248 }
10249
10250 else
10251   echo "$ac_t""no" 1>&6
10252 fi
10253
10254 fi
10255
10256
10257
10258 echo $ac_n "checking for socket""... $ac_c" 1>&6
10259 echo "configure:10260: checking for socket" >&5
10260
10261 cat > conftest.$ac_ext <<EOF
10262 #line 10263 "configure"
10263 #include "confdefs.h"
10264 /* System header to define __stub macros and hopefully few prototypes,
10265     which can conflict with char socket(); below.  */
10266 #include <assert.h>
10267 /* Override any gcc2 internal prototype to avoid an error.  */
10268 /* We use char because int might match the return type of a gcc2
10269     builtin and then its argument prototype would still apply.  */
10270 char socket();
10271
10272 int main() {
10273
10274 /* The GNU C library defines this for functions which it implements
10275     to always fail with ENOSYS.  Some functions are actually named
10276     something starting with __ and the normal name is an alias.  */
10277 #if defined (__stub_socket) || defined (__stub___socket)
10278 choke me
10279 #else
10280 socket();
10281 #endif
10282
10283 ; return 0; }
10284 EOF
10285 if { (eval echo configure:10286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10286   rm -rf conftest*
10287   eval "ac_cv_func_socket=yes"
10288 else
10289   echo "configure: failed program was:" >&5
10290   cat conftest.$ac_ext >&5
10291   rm -rf conftest*
10292   eval "ac_cv_func_socket=no"
10293 fi
10294 rm -f conftest*
10295
10296 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10297   echo "$ac_t""yes" 1>&6
10298   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10299 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10300 echo "configure:10301: checking for netinet/in.h" >&5
10301
10302 cat > conftest.$ac_ext <<EOF
10303 #line 10304 "configure"
10304 #include "confdefs.h"
10305 #include <netinet/in.h>
10306 EOF
10307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10308 { (eval echo configure:10309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10310 if test -z "$ac_err"; then
10311   rm -rf conftest*
10312   eval "ac_cv_header_$ac_safe=yes"
10313 else
10314   echo "$ac_err" >&5
10315   echo "configure: failed program was:" >&5
10316   cat conftest.$ac_ext >&5
10317   rm -rf conftest*
10318   eval "ac_cv_header_$ac_safe=no"
10319 fi
10320 rm -f conftest*
10321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10322   echo "$ac_t""yes" 1>&6
10323   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10324 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10325 echo "configure:10326: checking for arpa/inet.h" >&5
10326
10327 cat > conftest.$ac_ext <<EOF
10328 #line 10329 "configure"
10329 #include "confdefs.h"
10330 #include <arpa/inet.h>
10331 EOF
10332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10333 { (eval echo configure:10334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10335 if test -z "$ac_err"; then
10336   rm -rf conftest*
10337   eval "ac_cv_header_$ac_safe=yes"
10338 else
10339   echo "$ac_err" >&5
10340   echo "configure: failed program was:" >&5
10341   cat conftest.$ac_ext >&5
10342   rm -rf conftest*
10343   eval "ac_cv_header_$ac_safe=no"
10344 fi
10345 rm -f conftest*
10346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10347   echo "$ac_t""yes" 1>&6
10348   
10349   { test "$extra_verbose" = "yes" && cat << \EOF
10350     Defining HAVE_SOCKETS
10351 EOF
10352 cat >> confdefs.h <<\EOF
10353 #define HAVE_SOCKETS 1
10354 EOF
10355 }
10356
10357       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10358 echo "configure:10359: checking "for sun_len member in struct sockaddr_un"" >&5
10359       cat > conftest.$ac_ext <<EOF
10360 #line 10361 "configure"
10361 #include "confdefs.h"
10362
10363 #include <sys/types.h>
10364 #include <sys/socket.h>
10365 #include <sys/un.h>
10366       
10367 int main() {
10368 static struct sockaddr_un x; x.sun_len = 1;
10369 ; return 0; }
10370 EOF
10371 if { (eval echo configure:10372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10372   rm -rf conftest*
10373   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10374     Defining HAVE_SOCKADDR_SUN_LEN
10375 EOF
10376 cat >> confdefs.h <<\EOF
10377 #define HAVE_SOCKADDR_SUN_LEN 1
10378 EOF
10379 }
10380
10381 else
10382   echo "configure: failed program was:" >&5
10383   cat conftest.$ac_ext >&5
10384   rm -rf conftest*
10385   echo "$ac_t""no" 1>&6
10386 fi
10387 rm -f conftest*
10388       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10389 echo "configure:10390: checking "for ip_mreq struct in netinet/in.h"" >&5
10390       cat > conftest.$ac_ext <<EOF
10391 #line 10392 "configure"
10392 #include "confdefs.h"
10393
10394 #include <sys/types.h>
10395 #include <netinet/in.h>
10396       
10397 int main() {
10398 static struct ip_mreq x;
10399 ; return 0; }
10400 EOF
10401 if { (eval echo configure:10402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10402   rm -rf conftest*
10403   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10404     Defining HAVE_MULTICAST
10405 EOF
10406 cat >> confdefs.h <<\EOF
10407 #define HAVE_MULTICAST 1
10408 EOF
10409 }
10410
10411 else
10412   echo "configure: failed program was:" >&5
10413   cat conftest.$ac_ext >&5
10414   rm -rf conftest*
10415   echo "$ac_t""no" 1>&6
10416 fi
10417 rm -f conftest*
10418 else
10419   echo "$ac_t""no" 1>&6
10420 fi
10421
10422 else
10423   echo "$ac_t""no" 1>&6
10424 fi
10425
10426 else
10427   echo "$ac_t""no" 1>&6
10428 fi
10429
10430
10431 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10432 echo "configure:10433: checking for msgget" >&5
10433
10434 cat > conftest.$ac_ext <<EOF
10435 #line 10436 "configure"
10436 #include "confdefs.h"
10437 /* System header to define __stub macros and hopefully few prototypes,
10438     which can conflict with char msgget(); below.  */
10439 #include <assert.h>
10440 /* Override any gcc2 internal prototype to avoid an error.  */
10441 /* We use char because int might match the return type of a gcc2
10442     builtin and then its argument prototype would still apply.  */
10443 char msgget();
10444
10445 int main() {
10446
10447 /* The GNU C library defines this for functions which it implements
10448     to always fail with ENOSYS.  Some functions are actually named
10449     something starting with __ and the normal name is an alias.  */
10450 #if defined (__stub_msgget) || defined (__stub___msgget)
10451 choke me
10452 #else
10453 msgget();
10454 #endif
10455
10456 ; return 0; }
10457 EOF
10458 if { (eval echo configure:10459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10459   rm -rf conftest*
10460   eval "ac_cv_func_msgget=yes"
10461 else
10462   echo "configure: failed program was:" >&5
10463   cat conftest.$ac_ext >&5
10464   rm -rf conftest*
10465   eval "ac_cv_func_msgget=no"
10466 fi
10467 rm -f conftest*
10468
10469 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10470   echo "$ac_t""yes" 1>&6
10471   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10472 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10473 echo "configure:10474: checking for sys/ipc.h" >&5
10474
10475 cat > conftest.$ac_ext <<EOF
10476 #line 10477 "configure"
10477 #include "confdefs.h"
10478 #include <sys/ipc.h>
10479 EOF
10480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10481 { (eval echo configure:10482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10483 if test -z "$ac_err"; then
10484   rm -rf conftest*
10485   eval "ac_cv_header_$ac_safe=yes"
10486 else
10487   echo "$ac_err" >&5
10488   echo "configure: failed program was:" >&5
10489   cat conftest.$ac_ext >&5
10490   rm -rf conftest*
10491   eval "ac_cv_header_$ac_safe=no"
10492 fi
10493 rm -f conftest*
10494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10495   echo "$ac_t""yes" 1>&6
10496   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10497 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10498 echo "configure:10499: checking for sys/msg.h" >&5
10499
10500 cat > conftest.$ac_ext <<EOF
10501 #line 10502 "configure"
10502 #include "confdefs.h"
10503 #include <sys/msg.h>
10504 EOF
10505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10506 { (eval echo configure:10507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10508 if test -z "$ac_err"; then
10509   rm -rf conftest*
10510   eval "ac_cv_header_$ac_safe=yes"
10511 else
10512   echo "$ac_err" >&5
10513   echo "configure: failed program was:" >&5
10514   cat conftest.$ac_ext >&5
10515   rm -rf conftest*
10516   eval "ac_cv_header_$ac_safe=no"
10517 fi
10518 rm -f conftest*
10519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10520   echo "$ac_t""yes" 1>&6
10521   { test "$extra_verbose" = "yes" && cat << \EOF
10522     Defining HAVE_SYSVIPC
10523 EOF
10524 cat >> confdefs.h <<\EOF
10525 #define HAVE_SYSVIPC 1
10526 EOF
10527 }
10528
10529 else
10530   echo "$ac_t""no" 1>&6
10531 fi
10532
10533 else
10534   echo "$ac_t""no" 1>&6
10535 fi
10536
10537 else
10538   echo "$ac_t""no" 1>&6
10539 fi
10540
10541
10542 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10543 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10544 echo "configure:10545: checking for dirent.h" >&5
10545
10546 cat > conftest.$ac_ext <<EOF
10547 #line 10548 "configure"
10548 #include "confdefs.h"
10549 #include <dirent.h>
10550 EOF
10551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10552 { (eval echo configure:10553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10554 if test -z "$ac_err"; then
10555   rm -rf conftest*
10556   eval "ac_cv_header_$ac_safe=yes"
10557 else
10558   echo "$ac_err" >&5
10559   echo "configure: failed program was:" >&5
10560   cat conftest.$ac_ext >&5
10561   rm -rf conftest*
10562   eval "ac_cv_header_$ac_safe=no"
10563 fi
10564 rm -f conftest*
10565 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10566   echo "$ac_t""yes" 1>&6
10567   { test "$extra_verbose" = "yes" && cat << \EOF
10568     Defining SYSV_SYSTEM_DIR
10569 EOF
10570 cat >> confdefs.h <<\EOF
10571 #define SYSV_SYSTEM_DIR 1
10572 EOF
10573 }
10574
10575 else
10576   echo "$ac_t""no" 1>&6
10577 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
10578 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
10579 echo "configure:10580: checking for sys/dir.h" >&5
10580
10581 cat > conftest.$ac_ext <<EOF
10582 #line 10583 "configure"
10583 #include "confdefs.h"
10584 #include <sys/dir.h>
10585 EOF
10586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10587 { (eval echo configure:10588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10589 if test -z "$ac_err"; then
10590   rm -rf conftest*
10591   eval "ac_cv_header_$ac_safe=yes"
10592 else
10593   echo "$ac_err" >&5
10594   echo "configure: failed program was:" >&5
10595   cat conftest.$ac_ext >&5
10596   rm -rf conftest*
10597   eval "ac_cv_header_$ac_safe=no"
10598 fi
10599 rm -f conftest*
10600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10601   echo "$ac_t""yes" 1>&6
10602   :
10603 else
10604   echo "$ac_t""no" 1>&6
10605 { test "$extra_verbose" = "yes" && cat << \EOF
10606     Defining NONSYSTEM_DIR_LIBRARY
10607 EOF
10608 cat >> confdefs.h <<\EOF
10609 #define NONSYSTEM_DIR_LIBRARY 1
10610 EOF
10611 }
10612
10613 fi
10614
10615 fi
10616
10617
10618 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
10619 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
10620 echo "configure:10621: checking for nlist.h" >&5
10621
10622 cat > conftest.$ac_ext <<EOF
10623 #line 10624 "configure"
10624 #include "confdefs.h"
10625 #include <nlist.h>
10626 EOF
10627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10628 { (eval echo configure:10629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10630 if test -z "$ac_err"; then
10631   rm -rf conftest*
10632   eval "ac_cv_header_$ac_safe=yes"
10633 else
10634   echo "$ac_err" >&5
10635   echo "configure: failed program was:" >&5
10636   cat conftest.$ac_ext >&5
10637   rm -rf conftest*
10638   eval "ac_cv_header_$ac_safe=no"
10639 fi
10640 rm -f conftest*
10641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10642   echo "$ac_t""yes" 1>&6
10643   { test "$extra_verbose" = "yes" && cat << \EOF
10644     Defining NLIST_STRUCT
10645 EOF
10646 cat >> confdefs.h <<\EOF
10647 #define NLIST_STRUCT 1
10648 EOF
10649 }
10650
10651 else
10652   echo "$ac_t""no" 1>&6
10653 fi
10654
10655
10656
10657 echo "checking "for sound support"" 1>&6
10658 echo "configure:10659: checking "for sound support"" >&5
10659 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
10660
10661 if test "$with_native_sound" != "no"; then
10662     if test -n "$native_sound_lib"; then
10663     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
10664 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
10665 echo "configure:10666: checking for multimedia/audio_device.h" >&5
10666
10667 cat > conftest.$ac_ext <<EOF
10668 #line 10669 "configure"
10669 #include "confdefs.h"
10670 #include <multimedia/audio_device.h>
10671 EOF
10672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10673 { (eval echo configure:10674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10675 if test -z "$ac_err"; then
10676   rm -rf conftest*
10677   eval "ac_cv_header_$ac_safe=yes"
10678 else
10679   echo "$ac_err" >&5
10680   echo "configure: failed program was:" >&5
10681   cat conftest.$ac_ext >&5
10682   rm -rf conftest*
10683   eval "ac_cv_header_$ac_safe=no"
10684 fi
10685 rm -f conftest*
10686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10687   echo "$ac_t""yes" 1>&6
10688   sound_found=yes sound_cflags=""
10689       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10690    echo "    xemacs will be linked with \"sunplay.o\""
10691  fi
10692 else
10693   echo "$ac_t""no" 1>&6
10694 fi
10695
10696   fi
10697
10698     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
10699     sound_found=yes
10700     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10701    echo "    xemacs will be linked with \"sunplay.o\""
10702  fi
10703     if test -d "/usr/demo/SOUND/include"
10704       then sound_cflags="-I/usr/demo/SOUND/include"
10705       else sound_cflags="-I/usr/demo/SOUND"
10706     fi
10707     if test -z "$native_sound_lib" ; then
10708       if test -r "/usr/demo/SOUND/lib/libaudio.a"
10709         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
10710         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
10711       fi
10712     fi
10713   fi
10714
10715     if test -z "$sound_found"; then
10716     case "$canonical" in
10717     *-sgi-* )
10718       if test -z "$native_sound_lib"; then
10719         
10720 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
10721 echo "configure:10722: checking for ALopenport in -laudio" >&5
10722 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
10723
10724 xe_check_libs=" -laudio "
10725 cat > conftest.$ac_ext <<EOF
10726 #line 10727 "configure"
10727 #include "confdefs.h"
10728 /* Override any gcc2 internal prototype to avoid an error.  */
10729 /* We use char because int might match the return type of a gcc2
10730     builtin and then its argument prototype would still apply.  */
10731 char ALopenport();
10732
10733 int main() {
10734 ALopenport()
10735 ; return 0; }
10736 EOF
10737 if { (eval echo configure:10738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10738   rm -rf conftest*
10739   eval "ac_cv_lib_$ac_lib_var=yes"
10740 else
10741   echo "configure: failed program was:" >&5
10742   cat conftest.$ac_ext >&5
10743   rm -rf conftest*
10744   eval "ac_cv_lib_$ac_lib_var=no"
10745 fi
10746 rm -f conftest*
10747 xe_check_libs=""
10748
10749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10750   echo "$ac_t""yes" 1>&6
10751   native_sound_lib="-laudio"
10752 else
10753   echo "$ac_t""no" 1>&6
10754 fi
10755
10756
10757       fi
10758       if test -n "$native_sound_lib"; then
10759         sound_found=yes sound_cflags=""
10760         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
10761    echo "    xemacs will be linked with \"sgiplay.o\""
10762  fi
10763       fi ;;
10764     hppa*-hp-hpux* )
10765       if test -z "$native_sound_lib"; then
10766         
10767 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
10768 echo "configure:10769: checking for AOpenAudio in -lAlib" >&5
10769 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
10770
10771 xe_check_libs=" -lAlib "
10772 cat > conftest.$ac_ext <<EOF
10773 #line 10774 "configure"
10774 #include "confdefs.h"
10775 /* Override any gcc2 internal prototype to avoid an error.  */
10776 /* We use char because int might match the return type of a gcc2
10777     builtin and then its argument prototype would still apply.  */
10778 char AOpenAudio();
10779
10780 int main() {
10781 AOpenAudio()
10782 ; return 0; }
10783 EOF
10784 if { (eval echo configure:10785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10785   rm -rf conftest*
10786   eval "ac_cv_lib_$ac_lib_var=yes"
10787 else
10788   echo "configure: failed program was:" >&5
10789   cat conftest.$ac_ext >&5
10790   rm -rf conftest*
10791   eval "ac_cv_lib_$ac_lib_var=no"
10792 fi
10793 rm -f conftest*
10794 xe_check_libs=""
10795
10796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10797   echo "$ac_t""yes" 1>&6
10798   native_sound_lib="-lAlib"
10799 else
10800   echo "$ac_t""no" 1>&6
10801 fi
10802
10803
10804       fi
10805       if test -n "$native_sound_lib"; then
10806         sound_found=yes
10807         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
10808    echo "    xemacs will be linked with \"hpplay.o\""
10809  fi
10810         if test "$GCC" = "yes" # Kludge city
10811           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
10812           else sound_cflags="+e -I/usr/audio/examples"
10813         fi
10814       fi ;;
10815     esac
10816   fi
10817
10818     if test -z "$sound_found"; then
10819     for dir in "machine" "sys" "linux"; do
10820       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
10821 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
10822 echo "configure:10823: checking for ${dir}/soundcard.h" >&5
10823
10824 cat > conftest.$ac_ext <<EOF
10825 #line 10826 "configure"
10826 #include "confdefs.h"
10827 #include <${dir}/soundcard.h>
10828 EOF
10829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10830 { (eval echo configure:10831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10832 if test -z "$ac_err"; then
10833   rm -rf conftest*
10834   eval "ac_cv_header_$ac_safe=yes"
10835 else
10836   echo "$ac_err" >&5
10837   echo "configure: failed program was:" >&5
10838   cat conftest.$ac_ext >&5
10839   rm -rf conftest*
10840   eval "ac_cv_header_$ac_safe=no"
10841 fi
10842 rm -f conftest*
10843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10844   echo "$ac_t""yes" 1>&6
10845   sound_found=yes
10846        need_miscplay=yes
10847         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
10848    echo "    xemacs will be linked with \"linuxplay.o\""
10849  fi
10850         { test "$extra_verbose" = "yes" && cat << EOF
10851     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
10852 EOF
10853 cat >> confdefs.h <<EOF
10854 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
10855 EOF
10856 }
10857
10858         break
10859 else
10860   echo "$ac_t""no" 1>&6
10861 fi
10862
10863     done
10864   fi
10865
10866   test "$sound_found" = "yes" && with_native_sound=yes
10867 fi
10868
10869 if test "$with_native_sound" = "yes"; then
10870   { test "$extra_verbose" = "yes" && cat << \EOF
10871     Defining HAVE_NATIVE_SOUND
10872 EOF
10873 cat >> confdefs.h <<\EOF
10874 #define HAVE_NATIVE_SOUND 1
10875 EOF
10876 }
10877
10878   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
10879 fi
10880
10881 if test "$with_nas_sound" != "no"; then
10882   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
10883 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
10884 echo "configure:10885: checking for audio/audiolib.h" >&5
10885
10886 cat > conftest.$ac_ext <<EOF
10887 #line 10888 "configure"
10888 #include "confdefs.h"
10889 #include <audio/audiolib.h>
10890 EOF
10891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10892 { (eval echo configure:10893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10894 if test -z "$ac_err"; then
10895   rm -rf conftest*
10896   eval "ac_cv_header_$ac_safe=yes"
10897 else
10898   echo "$ac_err" >&5
10899   echo "configure: failed program was:" >&5
10900   cat conftest.$ac_ext >&5
10901   rm -rf conftest*
10902   eval "ac_cv_header_$ac_safe=no"
10903 fi
10904 rm -f conftest*
10905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10906   echo "$ac_t""yes" 1>&6
10907   
10908     
10909 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
10910 echo "configure:10911: checking for AuOpenServer in -laudio" >&5
10911 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
10912
10913 xe_check_libs=" -laudio "
10914 cat > conftest.$ac_ext <<EOF
10915 #line 10916 "configure"
10916 #include "confdefs.h"
10917 /* Override any gcc2 internal prototype to avoid an error.  */
10918 /* We use char because int might match the return type of a gcc2
10919     builtin and then its argument prototype would still apply.  */
10920 char AuOpenServer();
10921
10922 int main() {
10923 AuOpenServer()
10924 ; return 0; }
10925 EOF
10926 if { (eval echo configure:10927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10927   rm -rf conftest*
10928   eval "ac_cv_lib_$ac_lib_var=yes"
10929 else
10930   echo "configure: failed program was:" >&5
10931   cat conftest.$ac_ext >&5
10932   rm -rf conftest*
10933   eval "ac_cv_lib_$ac_lib_var=no"
10934 fi
10935 rm -f conftest*
10936 xe_check_libs=""
10937
10938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10939   echo "$ac_t""yes" 1>&6
10940   have_nas_sound=yes
10941 else
10942   echo "$ac_t""no" 1>&6
10943 fi
10944
10945
10946 else
10947   echo "$ac_t""no" 1>&6
10948 fi
10949
10950   if test "$have_nas_sound" = "yes"; then
10951     with_nas_sound=yes
10952     { test "$extra_verbose" = "yes" && cat << \EOF
10953     Defining HAVE_NAS_SOUND
10954 EOF
10955 cat >> confdefs.h <<\EOF
10956 #define HAVE_NAS_SOUND 1
10957 EOF
10958 }
10959
10960     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
10961    echo "    xemacs will be linked with \"nas.o\""
10962  fi
10963     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
10964             cat > conftest.$ac_ext <<EOF
10965 #line 10966 "configure"
10966 #include "confdefs.h"
10967 #include <audio/Xtutil.h>
10968 EOF
10969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10970   egrep "AuXtErrorJump" >/dev/null 2>&1; then
10971   :
10972 else
10973   rm -rf conftest*
10974   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
10975     Defining NAS_NO_ERROR_JUMP
10976 EOF
10977 cat >> confdefs.h <<\EOF
10978 #define NAS_NO_ERROR_JUMP 1
10979 EOF
10980 }
10981
10982 fi
10983 rm -f conftest*
10984
10985   else
10986     test "$with_nas_sound" = "yes" && \
10987       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
10988     with_nas_sound=no
10989   fi
10990 fi
10991
10992 if test "$with_esd_sound" != "no"; then
10993   # Extract the first word of "esd-config", so it can be a program name with args.
10994 set dummy esd-config; ac_word=$2
10995 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
10996 echo "configure:10997: checking for $ac_word" >&5
10997
10998 if test -n "$have_esd_config"; then
10999   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11000 else
11001   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11002   ac_dummy="$PATH"
11003   for ac_dir in $ac_dummy; do
11004     test -z "$ac_dir" && ac_dir=.
11005     if test -f $ac_dir/$ac_word; then
11006       ac_cv_prog_have_esd_config="yes"
11007       break
11008     fi
11009   done
11010   IFS="$ac_save_ifs"
11011   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11012 fi
11013 have_esd_config="$ac_cv_prog_have_esd_config"
11014 if test -n "$have_esd_config"; then
11015   echo "$ac_t""$have_esd_config" 1>&6
11016 else
11017   echo "$ac_t""no" 1>&6
11018 fi
11019
11020   if test "$have_esd_config" = "yes"; then
11021     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11022     c_switch_site="$c_switch_site `esd-config --cflags`" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi
11023     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11024     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11025 echo "configure:11026: checking for esd_play_stream" >&5
11026
11027 cat > conftest.$ac_ext <<EOF
11028 #line 11029 "configure"
11029 #include "confdefs.h"
11030 /* System header to define __stub macros and hopefully few prototypes,
11031     which can conflict with char esd_play_stream(); below.  */
11032 #include <assert.h>
11033 /* Override any gcc2 internal prototype to avoid an error.  */
11034 /* We use char because int might match the return type of a gcc2
11035     builtin and then its argument prototype would still apply.  */
11036 char esd_play_stream();
11037
11038 int main() {
11039
11040 /* The GNU C library defines this for functions which it implements
11041     to always fail with ENOSYS.  Some functions are actually named
11042     something starting with __ and the normal name is an alias.  */
11043 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11044 choke me
11045 #else
11046 esd_play_stream();
11047 #endif
11048
11049 ; return 0; }
11050 EOF
11051 if { (eval echo configure:11052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11052   rm -rf conftest*
11053   eval "ac_cv_func_esd_play_stream=yes"
11054 else
11055   echo "configure: failed program was:" >&5
11056   cat conftest.$ac_ext >&5
11057   rm -rf conftest*
11058   eval "ac_cv_func_esd_play_stream=no"
11059 fi
11060 rm -f conftest*
11061
11062 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
11063   echo "$ac_t""yes" 1>&6
11064   have_esd_sound=yes
11065 else
11066   echo "$ac_t""no" 1>&6
11067 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
11068 fi
11069
11070   fi
11071
11072   if test "$have_esd_sound" = "yes"; then
11073     with_esd_sound=yes
11074     need_miscplay=yes
11075     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
11076    echo "    xemacs will be linked with \"esd.o\""
11077  fi
11078     { test "$extra_verbose" = "yes" && cat << \EOF
11079     Defining HAVE_ESD_SOUND
11080 EOF
11081 cat >> confdefs.h <<\EOF
11082 #define HAVE_ESD_SOUND 1
11083 EOF
11084 }
11085
11086   else
11087     test "$with_esd_sound" = "yes" && \
11088       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
11089     with_esd_sound=no
11090   fi
11091 fi
11092
11093 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
11094    echo "    xemacs will be linked with \"miscplay.o\""
11095  fi
11096
11097
11098 test -z "$with_tty" && with_tty=yes
11099
11100 if test "$with_tty" = "yes"  ; then
11101   echo "checking for TTY-related features" 1>&6
11102 echo "configure:11103: checking for TTY-related features" >&5
11103   { test "$extra_verbose" = "yes" && cat << \EOF
11104     Defining HAVE_TTY
11105 EOF
11106 cat >> confdefs.h <<\EOF
11107 #define HAVE_TTY 1
11108 EOF
11109 }
11110
11111   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
11112    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\""
11113  fi
11114
11115     if test -z "$with_ncurses"; then
11116     
11117 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
11118 echo "configure:11119: checking for tgetent in -lncurses" >&5
11119 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
11120
11121 xe_check_libs=" -lncurses "
11122 cat > conftest.$ac_ext <<EOF
11123 #line 11124 "configure"
11124 #include "confdefs.h"
11125 /* Override any gcc2 internal prototype to avoid an error.  */
11126 /* We use char because int might match the return type of a gcc2
11127     builtin and then its argument prototype would still apply.  */
11128 char tgetent();
11129
11130 int main() {
11131 tgetent()
11132 ; return 0; }
11133 EOF
11134 if { (eval echo configure:11135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11135   rm -rf conftest*
11136   eval "ac_cv_lib_$ac_lib_var=yes"
11137 else
11138   echo "configure: failed program was:" >&5
11139   cat conftest.$ac_ext >&5
11140   rm -rf conftest*
11141   eval "ac_cv_lib_$ac_lib_var=no"
11142 fi
11143 rm -f conftest*
11144 xe_check_libs=""
11145
11146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11147   echo "$ac_t""yes" 1>&6
11148   with_ncurses=yes
11149 else
11150   echo "$ac_t""no" 1>&6
11151 with_ncurses=no
11152 fi
11153
11154
11155   fi
11156   if test "$with_ncurses" = "yes"; then
11157     { test "$extra_verbose" = "yes" && cat << \EOF
11158     Defining HAVE_NCURSES
11159 EOF
11160 cat >> confdefs.h <<\EOF
11161 #define HAVE_NCURSES 1
11162 EOF
11163 }
11164
11165     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11166 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11167 echo "configure:11168: checking for ncurses/curses.h" >&5
11168
11169 cat > conftest.$ac_ext <<EOF
11170 #line 11171 "configure"
11171 #include "confdefs.h"
11172 #include <ncurses/curses.h>
11173 EOF
11174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11175 { (eval echo configure:11176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11177 if test -z "$ac_err"; then
11178   rm -rf conftest*
11179   eval "ac_cv_header_$ac_safe=yes"
11180 else
11181   echo "$ac_err" >&5
11182   echo "configure: failed program was:" >&5
11183   cat conftest.$ac_ext >&5
11184   rm -rf conftest*
11185   eval "ac_cv_header_$ac_safe=no"
11186 fi
11187 rm -f conftest*
11188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11189   echo "$ac_t""yes" 1>&6
11190   curses_h_path=ncurses/curses.h
11191 else
11192   echo "$ac_t""no" 1>&6
11193 fi
11194
11195     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11196 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11197 echo "configure:11198: checking for ncurses/term.h" >&5
11198
11199 cat > conftest.$ac_ext <<EOF
11200 #line 11201 "configure"
11201 #include "confdefs.h"
11202 #include <ncurses/term.h>
11203 EOF
11204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11205 { (eval echo configure:11206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11207 if test -z "$ac_err"; then
11208   rm -rf conftest*
11209   eval "ac_cv_header_$ac_safe=yes"
11210 else
11211   echo "$ac_err" >&5
11212   echo "configure: failed program was:" >&5
11213   cat conftest.$ac_ext >&5
11214   rm -rf conftest*
11215   eval "ac_cv_header_$ac_safe=no"
11216 fi
11217 rm -f conftest*
11218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11219   echo "$ac_t""yes" 1>&6
11220   term_h_path=ncurses/term.h
11221 else
11222   echo "$ac_t""no" 1>&6
11223 fi
11224
11225     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11226    echo "    xemacs will be linked with \"terminfo.o\""
11227  fi
11228     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11229
11230     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11231                         save_c_switch_site="$c_switch_site"
11232       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11233       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11234 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11235 echo "configure:11236: checking for ncurses/curses.h" >&5
11236
11237 cat > conftest.$ac_ext <<EOF
11238 #line 11239 "configure"
11239 #include "confdefs.h"
11240 #include <ncurses/curses.h>
11241 EOF
11242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11243 { (eval echo configure:11244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11245 if test -z "$ac_err"; then
11246   rm -rf conftest*
11247   eval "ac_cv_header_$ac_safe=yes"
11248 else
11249   echo "$ac_err" >&5
11250   echo "configure: failed program was:" >&5
11251   cat conftest.$ac_ext >&5
11252   rm -rf conftest*
11253   eval "ac_cv_header_$ac_safe=no"
11254 fi
11255 rm -f conftest*
11256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11257   echo "$ac_t""yes" 1>&6
11258   curses_h_path=ncurses/curses.h
11259 else
11260   echo "$ac_t""no" 1>&6
11261 fi
11262
11263       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11264         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11265         else c_switch_site="$save_c_switch_site"
11266       fi
11267     fi
11268   else         if test "$have_terminfo" = "yes"; then
11269       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11270    echo "    xemacs will be linked with \"terminfo.o\""
11271  fi
11272       if test -n "$libs_termcap"; then
11273         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11274       else
11275         for lib in curses termlib termcap; do
11276           
11277 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11278 echo "configure:11279: checking for tgetent in -l$lib" >&5
11279 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11280
11281 xe_check_libs=" -l$lib "
11282 cat > conftest.$ac_ext <<EOF
11283 #line 11284 "configure"
11284 #include "confdefs.h"
11285 /* Override any gcc2 internal prototype to avoid an error.  */
11286 /* We use char because int might match the return type of a gcc2
11287     builtin and then its argument prototype would still apply.  */
11288 char tgetent();
11289
11290 int main() {
11291 tgetent()
11292 ; return 0; }
11293 EOF
11294 if { (eval echo configure:11295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11295   rm -rf conftest*
11296   eval "ac_cv_lib_$ac_lib_var=yes"
11297 else
11298   echo "configure: failed program was:" >&5
11299   cat conftest.$ac_ext >&5
11300   rm -rf conftest*
11301   eval "ac_cv_lib_$ac_lib_var=no"
11302 fi
11303 rm -f conftest*
11304 xe_check_libs=""
11305
11306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11307   echo "$ac_t""yes" 1>&6
11308   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11309 else
11310   echo "$ac_t""no" 1>&6
11311 fi
11312
11313
11314         done
11315       fi
11316     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11317    echo "    xemacs will be linked with \"tparam.o\""
11318  fi
11319                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11320       if test -n "$libs_termcap"; then
11321         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11322       else
11323         
11324 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11325 echo "configure:11326: checking for tgetent in -lcurses" >&5
11326 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11327
11328 xe_check_libs=" -lcurses "
11329 cat > conftest.$ac_ext <<EOF
11330 #line 11331 "configure"
11331 #include "confdefs.h"
11332 /* Override any gcc2 internal prototype to avoid an error.  */
11333 /* We use char because int might match the return type of a gcc2
11334     builtin and then its argument prototype would still apply.  */
11335 char tgetent();
11336
11337 int main() {
11338 tgetent()
11339 ; return 0; }
11340 EOF
11341 if { (eval echo configure:11342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11342   rm -rf conftest*
11343   eval "ac_cv_lib_$ac_lib_var=yes"
11344 else
11345   echo "configure: failed program was:" >&5
11346   cat conftest.$ac_ext >&5
11347   rm -rf conftest*
11348   eval "ac_cv_lib_$ac_lib_var=no"
11349 fi
11350 rm -f conftest*
11351 xe_check_libs=""
11352
11353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11354   echo "$ac_t""yes" 1>&6
11355   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11356 else
11357   echo "$ac_t""no" 1>&6
11358 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11359 echo "configure:11360: checking for tgetent in -ltermcap" >&5
11360 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11361
11362 xe_check_libs=" -ltermcap "
11363 cat > conftest.$ac_ext <<EOF
11364 #line 11365 "configure"
11365 #include "confdefs.h"
11366 /* Override any gcc2 internal prototype to avoid an error.  */
11367 /* We use char because int might match the return type of a gcc2
11368     builtin and then its argument prototype would still apply.  */
11369 char tgetent();
11370
11371 int main() {
11372 tgetent()
11373 ; return 0; }
11374 EOF
11375 if { (eval echo configure:11376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11376   rm -rf conftest*
11377   eval "ac_cv_lib_$ac_lib_var=yes"
11378 else
11379   echo "configure: failed program was:" >&5
11380   cat conftest.$ac_ext >&5
11381   rm -rf conftest*
11382   eval "ac_cv_lib_$ac_lib_var=no"
11383 fi
11384 rm -f conftest*
11385 xe_check_libs=""
11386
11387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11388   echo "$ac_t""yes" 1>&6
11389   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11390 else
11391   echo "$ac_t""no" 1>&6
11392 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11393    echo "    xemacs will be linked with \"termcap.o\""
11394  fi
11395 fi
11396
11397
11398 fi
11399
11400
11401       fi
11402     fi
11403   fi
11404   { test "$extra_verbose" = "yes" && cat << EOF
11405     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11406 EOF
11407 cat >> confdefs.h <<EOF
11408 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11409 EOF
11410 }
11411
11412   { test "$extra_verbose" = "yes" && cat << EOF
11413     Defining TERM_H_PATH = "${term_h_path-term.h}"
11414 EOF
11415 cat >> confdefs.h <<EOF
11416 #define TERM_H_PATH "${term_h_path-term.h}"
11417 EOF
11418 }
11419
11420
11421     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11422 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11423 echo "configure:11424: checking for gpm.h" >&5
11424
11425 cat > conftest.$ac_ext <<EOF
11426 #line 11427 "configure"
11427 #include "confdefs.h"
11428 #include <gpm.h>
11429 EOF
11430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11431 { (eval echo configure:11432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11433 if test -z "$ac_err"; then
11434   rm -rf conftest*
11435   eval "ac_cv_header_$ac_safe=yes"
11436 else
11437   echo "$ac_err" >&5
11438   echo "configure: failed program was:" >&5
11439   cat conftest.$ac_ext >&5
11440   rm -rf conftest*
11441   eval "ac_cv_header_$ac_safe=no"
11442 fi
11443 rm -f conftest*
11444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11445   echo "$ac_t""yes" 1>&6
11446   :
11447 else
11448   echo "$ac_t""no" 1>&6
11449 with_gpm=no
11450 fi
11451  }
11452   test -z "$with_gpm" && { 
11453 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11454 echo "configure:11455: checking for Gpm_Open in -lgpm" >&5
11455 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11456
11457 xe_check_libs=" -lgpm "
11458 cat > conftest.$ac_ext <<EOF
11459 #line 11460 "configure"
11460 #include "confdefs.h"
11461 /* Override any gcc2 internal prototype to avoid an error.  */
11462 /* We use char because int might match the return type of a gcc2
11463     builtin and then its argument prototype would still apply.  */
11464 char Gpm_Open();
11465
11466 int main() {
11467 Gpm_Open()
11468 ; return 0; }
11469 EOF
11470 if { (eval echo configure:11471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11471   rm -rf conftest*
11472   eval "ac_cv_lib_$ac_lib_var=yes"
11473 else
11474   echo "configure: failed program was:" >&5
11475   cat conftest.$ac_ext >&5
11476   rm -rf conftest*
11477   eval "ac_cv_lib_$ac_lib_var=no"
11478 fi
11479 rm -f conftest*
11480 xe_check_libs=""
11481
11482 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11483   echo "$ac_t""yes" 1>&6
11484   with_gpm=yes
11485 else
11486   echo "$ac_t""no" 1>&6
11487 with_gpm=no
11488 fi
11489
11490  }
11491   if test "$with_gpm" = "yes"; then
11492     { test "$extra_verbose" = "yes" && cat << \EOF
11493     Defining HAVE_GPM
11494 EOF
11495 cat >> confdefs.h <<\EOF
11496 #define HAVE_GPM 1
11497 EOF
11498 }
11499
11500     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
11501    echo "    xemacs will be linked with \"gpmevent.o\""
11502  fi
11503     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
11504   fi
11505
11506 else   for feature in ncurses gpm; do
11507     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11508       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
11509     fi
11510     eval "with_${feature}=no"
11511   done
11512 fi 
11513 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
11514    echo "    xemacs will be linked with \"event-unixoid.o\""
11515  fi
11516
11517
11518 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
11519   != "no no no" && echo "checking for database support" 1>&6
11520 echo "configure:11521: checking for database support" >&5
11521
11522 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
11523   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
11524 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
11525 echo "configure:11526: checking for ndbm.h" >&5
11526
11527 cat > conftest.$ac_ext <<EOF
11528 #line 11529 "configure"
11529 #include "confdefs.h"
11530 #include <ndbm.h>
11531 EOF
11532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11533 { (eval echo configure:11534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11535 if test -z "$ac_err"; then
11536   rm -rf conftest*
11537   eval "ac_cv_header_$ac_safe=yes"
11538 else
11539   echo "$ac_err" >&5
11540   echo "configure: failed program was:" >&5
11541   cat conftest.$ac_ext >&5
11542   rm -rf conftest*
11543   eval "ac_cv_header_$ac_safe=no"
11544 fi
11545 rm -f conftest*
11546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11547   echo "$ac_t""yes" 1>&6
11548   :
11549 else
11550   echo "$ac_t""no" 1>&6
11551
11552     test "$with_database_gdbm" = "yes" -o \
11553          "$with_database_dbm"  = "yes" && \
11554       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11555     with_database_gdbm=no with_database_dbm=no
11556 fi
11557
11558 fi
11559
11560 if test "$with_database_gdbm" != "no"; then
11561   
11562 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
11563 echo "configure:11564: checking for dbm_open in -lgdbm" >&5
11564 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
11565
11566 xe_check_libs=" -lgdbm "
11567 cat > conftest.$ac_ext <<EOF
11568 #line 11569 "configure"
11569 #include "confdefs.h"
11570 /* Override any gcc2 internal prototype to avoid an error.  */
11571 /* We use char because int might match the return type of a gcc2
11572     builtin and then its argument prototype would still apply.  */
11573 char dbm_open();
11574
11575 int main() {
11576 dbm_open()
11577 ; return 0; }
11578 EOF
11579 if { (eval echo configure:11580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11580   rm -rf conftest*
11581   eval "ac_cv_lib_$ac_lib_var=yes"
11582 else
11583   echo "configure: failed program was:" >&5
11584   cat conftest.$ac_ext >&5
11585   rm -rf conftest*
11586   eval "ac_cv_lib_$ac_lib_var=no"
11587 fi
11588 rm -f conftest*
11589 xe_check_libs=""
11590
11591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11592   echo "$ac_t""yes" 1>&6
11593   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
11594 else
11595   echo "$ac_t""no" 1>&6
11596 if test "$with_database_gdbm" = "yes"; then
11597      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
11598    fi
11599    with_database_gdbm=no
11600 fi
11601
11602
11603 fi
11604
11605 if test "$with_database_dbm" != "no"; then
11606   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11607 echo "configure:11608: checking for dbm_open" >&5
11608
11609 cat > conftest.$ac_ext <<EOF
11610 #line 11611 "configure"
11611 #include "confdefs.h"
11612 /* System header to define __stub macros and hopefully few prototypes,
11613     which can conflict with char dbm_open(); below.  */
11614 #include <assert.h>
11615 /* Override any gcc2 internal prototype to avoid an error.  */
11616 /* We use char because int might match the return type of a gcc2
11617     builtin and then its argument prototype would still apply.  */
11618 char dbm_open();
11619
11620 int main() {
11621
11622 /* The GNU C library defines this for functions which it implements
11623     to always fail with ENOSYS.  Some functions are actually named
11624     something starting with __ and the normal name is an alias.  */
11625 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11626 choke me
11627 #else
11628 dbm_open();
11629 #endif
11630
11631 ; return 0; }
11632 EOF
11633 if { (eval echo configure:11634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11634   rm -rf conftest*
11635   eval "ac_cv_func_dbm_open=yes"
11636 else
11637   echo "configure: failed program was:" >&5
11638   cat conftest.$ac_ext >&5
11639   rm -rf conftest*
11640   eval "ac_cv_func_dbm_open=no"
11641 fi
11642 rm -f conftest*
11643
11644 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11645   echo "$ac_t""yes" 1>&6
11646   with_database_dbm=yes libdbm=
11647 else
11648   echo "$ac_t""no" 1>&6
11649
11650     
11651 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11652 echo "configure:11653: checking for dbm_open in -ldbm" >&5
11653 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
11654
11655 xe_check_libs=" -ldbm "
11656 cat > conftest.$ac_ext <<EOF
11657 #line 11658 "configure"
11658 #include "confdefs.h"
11659 /* Override any gcc2 internal prototype to avoid an error.  */
11660 /* We use char because int might match the return type of a gcc2
11661     builtin and then its argument prototype would still apply.  */
11662 char dbm_open();
11663
11664 int main() {
11665 dbm_open()
11666 ; return 0; }
11667 EOF
11668 if { (eval echo configure:11669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11669   rm -rf conftest*
11670   eval "ac_cv_lib_$ac_lib_var=yes"
11671 else
11672   echo "configure: failed program was:" >&5
11673   cat conftest.$ac_ext >&5
11674   rm -rf conftest*
11675   eval "ac_cv_lib_$ac_lib_var=no"
11676 fi
11677 rm -f conftest*
11678 xe_check_libs=""
11679
11680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11681   echo "$ac_t""yes" 1>&6
11682   with_database_dbm=yes libdbm=-ldbm
11683 else
11684   echo "$ac_t""no" 1>&6
11685 test "$with_database_dbm" = "yes" && \
11686         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11687       with_database_dbm=no
11688 fi
11689
11690
11691 fi
11692
11693 fi
11694
11695 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
11696 test "$with_database_gdbm" = "yes" -o \
11697      "$with_database_dbm"  = "yes" && \
11698   { test "$extra_verbose" = "yes" && cat << \EOF
11699     Defining HAVE_DBM
11700 EOF
11701 cat >> confdefs.h <<\EOF
11702 #define HAVE_DBM 1
11703 EOF
11704 }
11705
11706
11707 if test "$with_database_berkdb" != "no"; then
11708   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
11709 echo "configure:11710: checking for Berkeley db.h" >&5
11710   for path in "db/db.h" "db.h"; do
11711     cat > conftest.$ac_ext <<EOF
11712 #line 11713 "configure"
11713 #include "confdefs.h"
11714 #ifdef HAVE_INTTYPES_H
11715 #define __BIT_TYPES_DEFINED__
11716 #include <inttypes.h>
11717 typedef uint8_t  u_int8_t;
11718 typedef uint16_t u_int16_t;
11719 typedef uint32_t u_int32_t;
11720 #ifdef WE_DONT_NEED_QUADS
11721 typedef uint64_t u_int64_t;
11722 #endif
11723 #endif
11724 #include <$path>
11725
11726 int main() {
11727
11728 ; return 0; }
11729 EOF
11730 if { (eval echo configure:11731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11731   rm -rf conftest*
11732   db_h_path="$path"; break
11733 else
11734   echo "configure: failed program was:" >&5
11735   cat conftest.$ac_ext >&5
11736 fi
11737 rm -f conftest*
11738   done
11739   if test -z "$db_h_path"
11740   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
11741   else echo "$ac_t""$db_h_path" 1>&6
11742   fi
11743
11744   if test "$with_database_berkdb" != "no"; then
11745     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
11746 echo "configure:11747: checking for Berkeley DB version" >&5
11747     cat > conftest.$ac_ext <<EOF
11748 #line 11749 "configure"
11749 #include "confdefs.h"
11750 #include <$db_h_path>
11751 #if DB_VERSION_MAJOR > 1
11752 yes
11753 #endif
11754
11755 EOF
11756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11757   egrep "yes" >/dev/null 2>&1; then
11758   rm -rf conftest*
11759   echo "$ac_t""2" 1>&6; dbfunc=db_open
11760 else
11761   rm -rf conftest*
11762   echo "$ac_t""1" 1>&6; dbfunc=dbopen
11763 fi
11764 rm -f conftest*
11765
11766     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
11767 echo "configure:11768: checking for $dbfunc" >&5
11768
11769 cat > conftest.$ac_ext <<EOF
11770 #line 11771 "configure"
11771 #include "confdefs.h"
11772 /* System header to define __stub macros and hopefully few prototypes,
11773     which can conflict with char $dbfunc(); below.  */
11774 #include <assert.h>
11775 /* Override any gcc2 internal prototype to avoid an error.  */
11776 /* We use char because int might match the return type of a gcc2
11777     builtin and then its argument prototype would still apply.  */
11778 char $dbfunc();
11779
11780 int main() {
11781
11782 /* The GNU C library defines this for functions which it implements
11783     to always fail with ENOSYS.  Some functions are actually named
11784     something starting with __ and the normal name is an alias.  */
11785 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
11786 choke me
11787 #else
11788 $dbfunc();
11789 #endif
11790
11791 ; return 0; }
11792 EOF
11793 if { (eval echo configure:11794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11794   rm -rf conftest*
11795   eval "ac_cv_func_$dbfunc=yes"
11796 else
11797   echo "configure: failed program was:" >&5
11798   cat conftest.$ac_ext >&5
11799   rm -rf conftest*
11800   eval "ac_cv_func_$dbfunc=no"
11801 fi
11802 rm -f conftest*
11803
11804 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
11805   echo "$ac_t""yes" 1>&6
11806   with_database_berkdb=yes need_libdb=no
11807 else
11808   echo "$ac_t""no" 1>&6
11809
11810     
11811 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
11812 echo "configure:11813: checking for $dbfunc in -ldb" >&5
11813 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
11814
11815 xe_check_libs=" -ldb "
11816 cat > conftest.$ac_ext <<EOF
11817 #line 11818 "configure"
11818 #include "confdefs.h"
11819 /* Override any gcc2 internal prototype to avoid an error.  */
11820 /* We use char because int might match the return type of a gcc2
11821     builtin and then its argument prototype would still apply.  */
11822 char $dbfunc();
11823
11824 int main() {
11825 $dbfunc()
11826 ; return 0; }
11827 EOF
11828 if { (eval echo configure:11829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11829   rm -rf conftest*
11830   eval "ac_cv_lib_$ac_lib_var=yes"
11831 else
11832   echo "configure: failed program was:" >&5
11833   cat conftest.$ac_ext >&5
11834   rm -rf conftest*
11835   eval "ac_cv_lib_$ac_lib_var=no"
11836 fi
11837 rm -f conftest*
11838 xe_check_libs=""
11839
11840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11841   echo "$ac_t""yes" 1>&6
11842   with_database_berkdb=yes need_libdb=yes
11843 else
11844   echo "$ac_t""no" 1>&6
11845 fi
11846
11847
11848 fi
11849
11850   fi
11851
11852   if test "$with_database_berkdb" = "yes"; then
11853     { test "$extra_verbose" = "yes" && cat << EOF
11854     Defining DB_H_PATH = "$db_h_path"
11855 EOF
11856 cat >> confdefs.h <<EOF
11857 #define DB_H_PATH "$db_h_path"
11858 EOF
11859 }
11860
11861     { test "$extra_verbose" = "yes" && cat << \EOF
11862     Defining HAVE_BERKELEY_DB
11863 EOF
11864 cat >> confdefs.h <<\EOF
11865 #define HAVE_BERKELEY_DB 1
11866 EOF
11867 }
11868
11869     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
11870   else with_database_berkdb=no
11871   fi
11872 fi
11873
11874 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
11875      != "no no no"; then
11876   { test "$extra_verbose" = "yes" && cat << \EOF
11877     Defining HAVE_DATABASE
11878 EOF
11879 cat >> confdefs.h <<\EOF
11880 #define HAVE_DATABASE 1
11881 EOF
11882 }
11883
11884   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
11885    echo "    xemacs will be linked with \"database.o\""
11886  fi
11887 fi
11888
11889 if test "$with_socks" = "yes"; then
11890   
11891 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
11892 echo "configure:11893: checking for SOCKSinit in -lsocks" >&5
11893 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
11894
11895 xe_check_libs=" -lsocks "
11896 cat > conftest.$ac_ext <<EOF
11897 #line 11898 "configure"
11898 #include "confdefs.h"
11899 /* Override any gcc2 internal prototype to avoid an error.  */
11900 /* We use char because int might match the return type of a gcc2
11901     builtin and then its argument prototype would still apply.  */
11902 char SOCKSinit();
11903
11904 int main() {
11905 SOCKSinit()
11906 ; return 0; }
11907 EOF
11908 if { (eval echo configure:11909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11909   rm -rf conftest*
11910   eval "ac_cv_lib_$ac_lib_var=yes"
11911 else
11912   echo "configure: failed program was:" >&5
11913   cat conftest.$ac_ext >&5
11914   rm -rf conftest*
11915   eval "ac_cv_lib_$ac_lib_var=no"
11916 fi
11917 rm -f conftest*
11918 xe_check_libs=""
11919
11920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11921   echo "$ac_t""yes" 1>&6
11922     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11923     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11924   { test "$extra_verbose" = "yes" && cat << EOF
11925     Defining $ac_tr_lib
11926 EOF
11927 cat >> confdefs.h <<EOF
11928 #define $ac_tr_lib 1
11929 EOF
11930 }
11931
11932   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
11933
11934 else
11935   echo "$ac_t""no" 1>&6
11936 fi
11937
11938
11939   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
11940     Defining HAVE_SOCKS
11941 EOF
11942 cat >> confdefs.h <<\EOF
11943 #define HAVE_SOCKS 1
11944 EOF
11945 }
11946
11947 fi
11948
11949 if test "$usage_tracking" = "yes"; then
11950   { test "$extra_verbose" = "yes" && cat << \EOF
11951     Defining USAGE_TRACKING
11952 EOF
11953 cat >> confdefs.h <<\EOF
11954 #define USAGE_TRACKING 1
11955 EOF
11956 }
11957
11958   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
11959 fi
11960
11961 if test "$with_modules" != "no"; then
11962   echo "checking for module support" 1>&6
11963 echo "configure:11964: checking for module support" >&5
11964
11965     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
11966 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
11967 echo "configure:11968: checking for dlfcn.h" >&5
11968
11969 cat > conftest.$ac_ext <<EOF
11970 #line 11971 "configure"
11971 #include "confdefs.h"
11972 #include <dlfcn.h>
11973 EOF
11974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11975 { (eval echo configure:11976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11976 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11977 if test -z "$ac_err"; then
11978   rm -rf conftest*
11979   eval "ac_cv_header_$ac_safe=yes"
11980 else
11981   echo "$ac_err" >&5
11982   echo "configure: failed program was:" >&5
11983   cat conftest.$ac_ext >&5
11984   rm -rf conftest*
11985   eval "ac_cv_header_$ac_safe=no"
11986 fi
11987 rm -f conftest*
11988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11989   echo "$ac_t""yes" 1>&6
11990   
11991     
11992 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
11993 echo "configure:11994: checking for dlopen in -ldl" >&5
11994 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
11995
11996 xe_check_libs=" -ldl "
11997 cat > conftest.$ac_ext <<EOF
11998 #line 11999 "configure"
11999 #include "confdefs.h"
12000 /* Override any gcc2 internal prototype to avoid an error.  */
12001 /* We use char because int might match the return type of a gcc2
12002     builtin and then its argument prototype would still apply.  */
12003 char dlopen();
12004
12005 int main() {
12006 dlopen()
12007 ; return 0; }
12008 EOF
12009 if { (eval echo configure:12010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12010   rm -rf conftest*
12011   eval "ac_cv_lib_$ac_lib_var=yes"
12012 else
12013   echo "configure: failed program was:" >&5
12014   cat conftest.$ac_ext >&5
12015   rm -rf conftest*
12016   eval "ac_cv_lib_$ac_lib_var=no"
12017 fi
12018 rm -f conftest*
12019 xe_check_libs=""
12020
12021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12022   echo "$ac_t""yes" 1>&6
12023   have_dl=yes libdl=dl
12024 else
12025   echo "$ac_t""no" 1>&6
12026
12027 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12028 echo "configure:12029: checking for dlopen in -lc" >&5
12029 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12030
12031 xe_check_libs=" -lc "
12032 cat > conftest.$ac_ext <<EOF
12033 #line 12034 "configure"
12034 #include "confdefs.h"
12035 /* Override any gcc2 internal prototype to avoid an error.  */
12036 /* We use char because int might match the return type of a gcc2
12037     builtin and then its argument prototype would still apply.  */
12038 char dlopen();
12039
12040 int main() {
12041 dlopen()
12042 ; return 0; }
12043 EOF
12044 if { (eval echo configure:12045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12045   rm -rf conftest*
12046   eval "ac_cv_lib_$ac_lib_var=yes"
12047 else
12048   echo "configure: failed program was:" >&5
12049   cat conftest.$ac_ext >&5
12050   rm -rf conftest*
12051   eval "ac_cv_lib_$ac_lib_var=no"
12052 fi
12053 rm -f conftest*
12054 xe_check_libs=""
12055
12056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12057   echo "$ac_t""yes" 1>&6
12058   have_dl=yes 
12059 else
12060   echo "$ac_t""no" 1>&6
12061 fi
12062
12063
12064 fi
12065
12066
12067 else
12068   echo "$ac_t""no" 1>&6
12069 fi
12070
12071   if test -n "$have_dl"; then
12072     { test "$extra_verbose" = "yes" && cat << \EOF
12073     Defining HAVE_DLOPEN
12074 EOF
12075 cat >> confdefs.h <<\EOF
12076 #define HAVE_DLOPEN 1
12077 EOF
12078 }
12079
12080   else
12081     
12082 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
12083 echo "configure:12084: checking for shl_load in -ldld" >&5
12084 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
12085
12086 xe_check_libs=" -ldld "
12087 cat > conftest.$ac_ext <<EOF
12088 #line 12089 "configure"
12089 #include "confdefs.h"
12090 /* Override any gcc2 internal prototype to avoid an error.  */
12091 /* We use char because int might match the return type of a gcc2
12092     builtin and then its argument prototype would still apply.  */
12093 char shl_load();
12094
12095 int main() {
12096 shl_load()
12097 ; return 0; }
12098 EOF
12099 if { (eval echo configure:12100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12100   rm -rf conftest*
12101   eval "ac_cv_lib_$ac_lib_var=yes"
12102 else
12103   echo "configure: failed program was:" >&5
12104   cat conftest.$ac_ext >&5
12105   rm -rf conftest*
12106   eval "ac_cv_lib_$ac_lib_var=no"
12107 fi
12108 rm -f conftest*
12109 xe_check_libs=""
12110
12111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12112   echo "$ac_t""yes" 1>&6
12113   libdl=dld have_dl=yes;
12114       { test "$extra_verbose" = "yes" && cat << \EOF
12115     Defining HAVE_SHL_LOAD
12116 EOF
12117 cat >> confdefs.h <<\EOF
12118 #define HAVE_SHL_LOAD 1
12119 EOF
12120 }
12121
12122 else
12123   echo "$ac_t""no" 1>&6
12124
12125 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12126 echo "configure:12127: checking for dld_init in -ldld" >&5
12127 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12128
12129 xe_check_libs=" -ldld "
12130 cat > conftest.$ac_ext <<EOF
12131 #line 12132 "configure"
12132 #include "confdefs.h"
12133 /* Override any gcc2 internal prototype to avoid an error.  */
12134 /* We use char because int might match the return type of a gcc2
12135     builtin and then its argument prototype would still apply.  */
12136 char dld_init();
12137
12138 int main() {
12139 dld_init()
12140 ; return 0; }
12141 EOF
12142 if { (eval echo configure:12143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12143   rm -rf conftest*
12144   eval "ac_cv_lib_$ac_lib_var=yes"
12145 else
12146   echo "configure: failed program was:" >&5
12147   cat conftest.$ac_ext >&5
12148   rm -rf conftest*
12149   eval "ac_cv_lib_$ac_lib_var=no"
12150 fi
12151 rm -f conftest*
12152 xe_check_libs=""
12153
12154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12155   echo "$ac_t""yes" 1>&6
12156   libdl=dld have_dl=yes;
12157       { test "$extra_verbose" = "yes" && cat << \EOF
12158     Defining HAVE_DLD_INIT
12159 EOF
12160 cat >> confdefs.h <<\EOF
12161 #define HAVE_DLD_INIT 1
12162 EOF
12163 }
12164
12165 else
12166   echo "$ac_t""no" 1>&6
12167 fi
12168
12169
12170 fi
12171
12172
12173   fi
12174
12175   if test -n "$have_dl"; then
12176         
12177 dll_ld=
12178 dll_ldflags=
12179 dll_cflags=
12180 dll_post=
12181 dll_ldo="-o"
12182 ld_dynamic_link_flags=
12183 xehost=$canonical
12184 xealias=$internal_configuration
12185
12186 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12187 echo "configure:12188: checking how to build dynamic libraries for ${xehost}" >&5
12188 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12189 case "$xehost" in
12190 *-*-linux-gnu*) ;;
12191 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12192 esac
12193
12194 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12195 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12196 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12197
12198 case "$xehost_os" in
12199 aix3*)
12200   # AIX sometimes has problems with the GCC collect2 program.  For some
12201   # reason, if we set the COLLECT_NAMES environment variable, the problems
12202   # vanish in a puff of smoke.
12203   if test "${COLLECT_NAMES+set}" != set; then
12204     COLLECT_NAMES=
12205     export COLLECT_NAMES
12206   fi
12207   ;;
12208 esac
12209
12210 # Now see if the compiler is really GCC.
12211 if test "$GCC" = "yes"; then
12212   XEGCC=yes
12213 else
12214   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12215 echo "configure:12216: checking checking whether we are using GNU C" >&5
12216   cat > conftest.$ac_ext <<EOF
12217 #line 12218 "configure"
12218 #include "confdefs.h"
12219
12220 #ifdef __GNUC__
12221   yes;
12222 #endif
12223
12224 EOF
12225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12226   egrep "yes" >/dev/null 2>&1; then
12227   rm -rf conftest*
12228   XEGCC=yes
12229 else
12230   rm -rf conftest*
12231   XEGCC=no
12232 fi
12233 rm -f conftest*
12234
12235   echo "$ac_t""${XEGCC}" 1>&6
12236 fi
12237
12238 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12239 echo "configure:12240: checking how to produce PIC code" >&5
12240 wl=
12241
12242 can_build_shared=yes
12243 if test "$XEGCC" = yes; then
12244   wl='-Wl,'
12245
12246   case "$xehost_os" in
12247   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12248     # PIC is the default for these OSes.
12249     ;;
12250
12251   os2*)
12252     # We can build DLLs from non-PIC.
12253     ;;
12254   amigaos*)
12255     # FIXME: we need at least 68020 code to build shared libraries, but
12256     # adding the `-m68020' flag to GCC prevents building anything better,
12257     # like `-m68040'.
12258     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12259     ;;
12260   *)
12261     dll_cflags='-fPIC'
12262     ;;
12263   esac
12264 else
12265   # PORTME Check for PIC flags for the system compiler.
12266   case "$xehost_os" in
12267   hpux9* | hpux1[0-9]*)
12268     # Is there a better link_static_flag that works with the bundled CC?
12269     wl='-Wl,'
12270     dll_cflags='+Z'
12271     ;;
12272
12273   irix5* | irix6*)
12274     wl='-Wl,'
12275     # PIC (with -KPIC) is the default.
12276     ;;
12277
12278   os2*)
12279     # We can build DLLs from non-PIC.
12280     ;;
12281
12282   osf3* | osf4*)
12283     # All OSF/1 code is PIC.
12284     wl='-Wl,'
12285     ;;
12286
12287   sco3.2v5*)
12288     dll_cflags='-belf -Kpic'
12289     wl='-Wl,'
12290     ;;
12291
12292   unixware*)
12293     dll_cflags="-KPIC"
12294     wl="-Wl,"
12295     ;;
12296
12297   sysv4*)
12298     dll_cflags="-KPIC"
12299     wl="-Wl,"
12300     ;;
12301
12302   sysv5*)
12303     dll_cflags="-KPIC"
12304     wl="-Wl,"
12305     ;;
12306
12307   solaris2*)
12308     dll_cflags='-KPIC'
12309     wl='-Wl,'
12310     ;;
12311
12312   sunos4*)
12313     dll_cflags='-PIC'
12314     wl='-Qoption ld '
12315     ;;
12316
12317   uts4*)
12318     dll_cflags='-pic'
12319     ;;
12320
12321   *)
12322     can_build_shared=no
12323     ;;
12324   esac
12325 fi
12326
12327 if test -n "$dll_cflags"; then
12328   echo "$ac_t""${dll_cflags}" 1>&6
12329   
12330   # Check to make sure the dll_cflags actually works.
12331   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12332 echo "configure:12333: checking if PIC flag ${dll_cflags} really works" >&5
12333   save_CFLAGS="$CFLAGS"
12334   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12335   cat > conftest.$ac_ext <<EOF
12336 #line 12337 "configure"
12337 #include "confdefs.h"
12338
12339 int main() {
12340 int x=0;
12341 ; return 0; }
12342 EOF
12343 if { (eval echo configure:12344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12344   rm -rf conftest*
12345   
12346     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12347     # reports no error.  So, we need to grep stderr for (Bundled).
12348     if grep '(Bundled)' config.log >/dev/null; then
12349       echo "$ac_t""no" 1>&6
12350       can_build_shared=no
12351       dll_cflags=
12352     else
12353       echo "$ac_t""yes" 1>&6
12354     fi
12355 else
12356   echo "configure: failed program was:" >&5
12357   cat conftest.$ac_ext >&5
12358   rm -rf conftest*
12359   echo "$ac_t""no" 1>&6
12360     can_build_shared=no
12361     dll_cflags=
12362 fi
12363 rm -f conftest*
12364   CFLAGS="$save_CFLAGS"
12365 else
12366   echo "$ac_t""none" 1>&6
12367 fi
12368
12369 if test "$can_build_shared" = "yes"; then
12370 cc_produces_so=no
12371 xldf=
12372 xcldf=
12373 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12374 echo "configure:12375: checking if C compiler can produce shared libraries" >&5
12375 if test "$XEGCC" = yes; then
12376   xcldf="-shared"
12377   xldf="-shared"
12378 else # Not using GCC
12379   case "$xehost_os" in
12380     aix3* | aix4*)
12381       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12382       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12383       ;;
12384
12385     freebsd2* | netbsd* | openbsd*)
12386       xldf="-Bshareable"
12387       xcldf="${wl}-Bshareable"
12388       ;;
12389
12390     freebsd3*)
12391       xcldf="-shared"
12392       ;;
12393
12394     hpux*)
12395       xldf="-b +s"
12396       xcldf="${wl}-b ${wl}+s"
12397       ;;
12398
12399     irix5* | irix6* | osf3* | osf4*)
12400       xcldf="${wl}-shared"
12401       xldf="-shared"
12402       ;;
12403
12404     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12405       xcldf="-G"
12406       xldf="-G"
12407       ;;
12408
12409     sunos4*)
12410       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12411       xldf="-assert pure-text -Bstatic"
12412       ;;
12413   esac
12414 fi # End if if we are using gcc
12415
12416 if test -n "$xcldf"; then
12417   save_LDFLAGS=$LDFLAGS
12418   save_LIBS=$LIBS
12419   save_xe_libs=$xe_libs
12420   LDFLAGS="$xcldf $LDFLAGS"
12421   LIBS=
12422   xe_libs=
12423   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12424   cat > conftest.$ac_ext <<EOF
12425 #line 12426 "configure"
12426 #include "confdefs.h"
12427
12428 int main() {
12429 int x=0;
12430 ; return 0; }
12431 EOF
12432 if { (eval echo configure:12433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12433   rm -rf conftest*
12434   cc_produces_so=yes
12435 else
12436   echo "configure: failed program was:" >&5
12437   cat conftest.$ac_ext >&5
12438   rm -rf conftest*
12439   cc_produces_so=no
12440 fi
12441 rm -f conftest*
12442   LDFLAGS=$save_LDFLAGS
12443   LIBS=$save_LIBS
12444   xe_libs=$save_xe_libs
12445   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12446 else
12447   cc_produces_so=no
12448 fi
12449 echo "$ac_t""${cc_produces_so}" 1>&6
12450
12451 LTLD=$LD
12452 if test -z "$LTLD"; then
12453   ac_prog=ld
12454   if test "$XEGCC" = yes; then
12455     # Check if gcc -print-prog-name=ld gives a path.
12456     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12457 echo "configure:12458: checking for ld used by GCC" >&5
12458     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12459     case "$ac_prog" in
12460     # Accept absolute paths.
12461     /*)
12462       if test -z "$LTLD"; then
12463         case "$ac_prog" in
12464           *gcc-lib*) LTLD="$CC"
12465                      ;;
12466           *)         LTLD="$ac_prog"
12467                      ;;
12468         esac
12469       fi
12470       ;;
12471     "")
12472       # If it fails, then pretend we aren't using GCC.
12473       ac_prog=ld
12474       ;;
12475     *)
12476       # If it is relative, then search for the first ld in PATH.
12477       with_gnu_ld=unknown
12478       ;;
12479     esac
12480   else
12481     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12482 echo "configure:12483: checking for GNU ld" >&5
12483   fi
12484
12485   if test -z "$LTLD"; then
12486     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12487     for ac_dir in $PATH; do
12488       test -z "$ac_dir" && ac_dir=.
12489       if test -f "$ac_dir/$ac_prog"; then
12490         LTLD="$ac_dir/$ac_prog"
12491         # Check to see if the program is GNU ld.  I'd rather use --version,
12492         # but apparently some GNU ld's only accept -v.
12493         # Break only if it was the GNU/non-GNU ld that we prefer.
12494         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12495           xe_gnu_ld=yes
12496         else
12497           xe_gnu_ld=no
12498         fi
12499       fi
12500     done
12501     IFS="$ac_save_ifs"
12502   fi
12503
12504   if test -n "$LTLD"; then
12505     echo "$ac_t""${LTLD}" 1>&6
12506   else
12507     echo "$ac_t""no" 1>&6
12508   fi
12509
12510   if test -z "$LTLD" -a "$cc_produces_so" = no; then
12511     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
12512     exit 1
12513   fi
12514 fi
12515
12516 ld_dynamic_link_flags=
12517
12518 # Check to see if it really is or isn't GNU ld.
12519 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
12520 echo "configure:12521: checking if the linker is GNU ld" >&5
12521 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12522 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
12523   xe_gnu_ld=yes
12524 else
12525   xe_gnu_ld=no
12526 fi
12527 echo "$ac_t""${xe_gnu_ld}" 1>&6
12528
12529 case "$xehost_os" in
12530   amigaos* | sunos4*)
12531     # On these operating systems, we should treat GNU ld like the system ld.
12532     gnu_ld_acts_native=yes
12533     ;;
12534   *)
12535     gnu_ld_acts_native=no
12536     ;;
12537 esac
12538
12539 if test "$cc_produces_so" = "yes"; then
12540   dll_ld=$CC
12541   dll_ldflags=$xcldf
12542   can_build_shared=yes
12543 else
12544   # OK - only NOW do we futz about with ld.
12545   # See if the linker supports building shared libraries.
12546   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
12547 echo "configure:12548: checking whether the linker supports shared libraries" >&5
12548   dll_ld=$CC
12549   dll_ldflags=$LDFLAGS
12550   ld_shlibs=yes
12551   can_build_shared=yes
12552   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
12553     # See if GNU ld supports shared libraries.
12554     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12555       dll_ld=$CC
12556       dll_ldflags="-shared"
12557       ld_shlibs=yes
12558     else
12559       ld_shlibs=no
12560     fi
12561   else
12562     # PORTME fill in a description of your system's linker (not GNU ld)
12563     case "$xehost_os" in
12564     aix3*)
12565       dll_ld=$LTLD
12566       dll_ldflags=$xldf
12567       ;;
12568
12569     aix4*)
12570       dll_ldflags=$xcldf
12571       ;;
12572
12573     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12574     # support.  Future versions do this automatically, but an explicit c++rt0.o
12575     # doesn't break anything, and helps significantly (at the cost of a little
12576     # extra space).
12577     freebsd2.2*)
12578       dll_ld=$LTLD
12579       dll_ldflags=$xldf
12580       dll_post="/usr/lib/c++rt0.o"
12581       ;;
12582
12583     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
12584     freebsd2*)
12585       dll_ld=$LTLD
12586       dll_ldflags="-Bshareable"
12587       ;;
12588
12589     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
12590     freebsd3*)
12591       dll_ldflags="-shared"
12592       ;;
12593
12594     hpux*)
12595       dll_ld=$LTLD
12596       dll_ldflags=$xldf
12597       ;;
12598
12599     irix5* | irix6*)
12600       dll_ld=$LTLD
12601       dll_ldflags=$xldf
12602       ;;
12603
12604     netbsd*)
12605       # Tested with NetBSD 1.2 ld
12606       dll_ld=$LTLD
12607       dll_ldflags=$xldf
12608       ;;
12609
12610     openbsd*)
12611       dll_ld=$LTLD
12612       dll_ldflags=$xldf
12613       ;;
12614
12615     osf3* | osf4*)
12616       dll_ld=$LTLD
12617       dll_ldflags=$xldf
12618       ;;
12619
12620     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
12621     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
12622       dll_ld=$LTLD
12623       case "$dll_ld" in
12624         *gcc*) dll_ldflags="-shared"
12625                dll_ld=$CC
12626                ;;
12627         *)     dll_ldflags="-G"
12628                ;;
12629       esac
12630       ;;
12631
12632     sunos4*)
12633       if test "$XEGCC" = yes; then
12634         dll_ld=$CC
12635       else
12636         dll_ld=$LTLD
12637       fi
12638       dll_ldflags=$xldf
12639       ;;
12640
12641     uts4*)
12642       dll_ld=$LTLD
12643       dll_ldflags="-G"
12644       ;;
12645
12646     bsdi*)
12647       dll_ldflags="-r"
12648       dll_ld="shlicc2"
12649       ;;
12650
12651     *)
12652       ld_shlibs=no
12653       can_build_shared=no
12654       ;;
12655     esac
12656   fi
12657   echo "$ac_t""${ld_shlibs}" 1>&6
12658   if test "$ld_shlibs" = "no"; then
12659     can_build_shared=no
12660   fi
12661 fi # End of if cc_produces_so = no
12662
12663
12664 if test "$xe_gnu_ld" = yes; then
12665   if test "$ld_shlibs" = yes; then
12666     ld_dynamic_link_flags="${wl}-export-dynamic"
12667   fi
12668 fi
12669
12670 if test -z "$ld_dynamic_link_flags"; then
12671   case "$xehost_os" in
12672   aix3*)
12673     ld_dynamic_link_flags=
12674     ;;
12675
12676   aix4*)
12677     ld_dynamic_link_flags=
12678     ;;
12679
12680   freebsd2.2*)
12681     ld_dynamic_link_flags=
12682     ;;
12683
12684   freebsd2*)
12685     ld_dynamic_link_flags=
12686     ;;
12687
12688   freebsd3*)
12689     ld_dynamic_link_flags=
12690     ;;
12691
12692   hpux*)
12693     ld_dynamic_link_flags="${wl}-E"
12694     ;;
12695
12696   irix5* | irix6*)
12697     ld_dynamic_link_flags=
12698     ;;
12699
12700   netbsd*)
12701     ld_dynamic_link_flags=
12702     ;;
12703
12704   openbsd*)
12705     ld_dynamic_link_flags=
12706     ;;
12707
12708   osf3* | osf4*)
12709     ld_dynamic_link_flags=
12710     ;;
12711
12712   solaris2* | solaris7*)
12713     ld_dynamic_link_flags=
12714     ;;
12715
12716   sco3.2v5* | unixware* | sysv5* | sysv4*)
12717     ld_dynamic_link_flags="${wl}-Bexport"
12718     ;;
12719
12720   sunos4*)
12721     ld_dynamic_link_flags=
12722     ;;
12723
12724   uts4*)
12725     ld_dynamic_link_flags=
12726     ;;
12727
12728   bsdi*)
12729     ld_dynamic_link_flags=
12730     ;;
12731
12732   esac
12733 fi # End of if -z ld_dynamic_link_flags
12734 fi # End of if test "$can_build_shared" = "yes"
12735
12736
12737
12738
12739
12740
12741
12742
12743   fi
12744
12745   if test "$can_build_shared" = "yes"; then
12746     { test "$extra_verbose" = "yes" && cat << \EOF
12747     Defining HAVE_SHLIB
12748 EOF
12749 cat >> confdefs.h <<\EOF
12750 #define HAVE_SHLIB 1
12751 EOF
12752 }
12753
12754     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
12755    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
12756  fi
12757     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
12758     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
12759     for ac_func in dlerror _dlerror
12760 do
12761 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12762 echo "configure:12763: checking for $ac_func" >&5
12763
12764 cat > conftest.$ac_ext <<EOF
12765 #line 12766 "configure"
12766 #include "confdefs.h"
12767 /* System header to define __stub macros and hopefully few prototypes,
12768     which can conflict with char $ac_func(); below.  */
12769 #include <assert.h>
12770 /* Override any gcc2 internal prototype to avoid an error.  */
12771 /* We use char because int might match the return type of a gcc2
12772     builtin and then its argument prototype would still apply.  */
12773 char $ac_func();
12774
12775 int main() {
12776
12777 /* The GNU C library defines this for functions which it implements
12778     to always fail with ENOSYS.  Some functions are actually named
12779     something starting with __ and the normal name is an alias.  */
12780 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12781 choke me
12782 #else
12783 $ac_func();
12784 #endif
12785
12786 ; return 0; }
12787 EOF
12788 if { (eval echo configure:12789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12789   rm -rf conftest*
12790   eval "ac_cv_func_$ac_func=yes"
12791 else
12792   echo "configure: failed program was:" >&5
12793   cat conftest.$ac_ext >&5
12794   rm -rf conftest*
12795   eval "ac_cv_func_$ac_func=no"
12796 fi
12797 rm -f conftest*
12798
12799 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12800   echo "$ac_t""yes" 1>&6
12801     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12802   { test "$extra_verbose" = "yes" && cat << EOF
12803     Defining $ac_tr_func
12804 EOF
12805 cat >> confdefs.h <<EOF
12806 #define $ac_tr_func 1
12807 EOF
12808 }
12809  
12810 else
12811   echo "$ac_t""no" 1>&6
12812 fi
12813 done
12814
12815     with_modules=yes
12816   else
12817     if test "$with_modules" = "yes"; then
12818       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
12819     else
12820       echo "configure: warning: "Module support cannot be provided."" 1>&2
12821     fi
12822     with_modules=no
12823   fi
12824 fi
12825
12826 cat > conftest.$ac_ext <<EOF
12827 #line 12828 "configure"
12828 #include "confdefs.h"
12829 int main(int c,char *v[]){return 0;}
12830 EOF
12831 if { (eval echo configure:12832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12832 then
12833   :
12834 else
12835   conftest_rc="$?"
12836   echo "configure: failed program was:" >&5
12837   cat conftest.$ac_ext >&5
12838   rm -fr conftest*
12839   
12840   echo ""
12841   echo "*** PANIC *** The C compiler can no longer build working executables."
12842   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
12843   echo "*** PANIC *** The most likely reason for this problem is that configure"
12844   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
12845   echo "*** PANIC *** found at run time."
12846   echo "*** PANIC ***"
12847   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
12848   echo "*** PANIC *** On other systems, try telling configure where to find the"
12849   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
12850   echo "*** PANIC ***"
12851   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
12852   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
12853   echo "*** PANIC *** on your system.  Don't do that."
12854   exit 1
12855 fi
12856 rm -fr conftest*
12857
12858 if test "$win32_processes" = "yes"; then
12859   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
12860    echo "    xemacs will be linked with \"process-nt.o\""
12861  fi
12862 else
12863   { test "$extra_verbose" = "yes" && cat << \EOF
12864     Defining HAVE_UNIX_PROCESSES
12865 EOF
12866 cat >> confdefs.h <<\EOF
12867 #define HAVE_UNIX_PROCESSES 1
12868 EOF
12869 }
12870
12871   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
12872    echo "    xemacs will be linked with \"process-unix.o\""
12873  fi
12874 fi
12875
12876
12877
12878 T=""
12879 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12880 CFLAGS="$T"
12881
12882
12883 T=""
12884 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12885 extra_objs="$T"
12886
12887
12888 T=""
12889 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
12890 c_switch_general="$T"
12891
12892
12893 T=""
12894 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12895 c_switch_window_system="$T"
12896
12897
12898 T=""
12899 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12900 c_switch_all="$T"
12901
12902
12903 T=""
12904 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
12905 ld_switch_general="$T"
12906
12907
12908 T=""
12909 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12910 ld_switch_window_system="$T"
12911
12912
12913 T=""
12914 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12915 ld_switch_all="$T"
12916
12917
12918 T=""
12919 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12920 ld_libs_general="$T"
12921
12922
12923 T=""
12924 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
12925 ld_libs_window_system="$T"
12926
12927
12928 T=""
12929 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12930 ld_libs_all="$T"
12931
12932
12933
12934 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
12935 internal_makefile_list="Makefile.in"
12936 SUBDIR_MAKEFILES=''
12937 test -d lock || mkdir lock
12938 for dir in $MAKE_SUBDIR; do
12939   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
12940         test -d "$d" || mkdir "$d"; cd "$d"
12941       done ) ;;
12942    * ) test -d "$dir" || mkdir "$dir" ;;
12943   esac
12944   
12945 T=""
12946 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12947 SUBDIR_MAKEFILES="$T"
12948
12949   
12950 T=""
12951 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12952 internal_makefile_list="$T"
12953
12954 done
12955
12956
12957
12958
12959 for dir in src/s src/m; do
12960   if test ! -d "$dir" ; then
12961     echo Making symbolic link to "$srcdir/$dir"
12962     ${LN_S} "$srcdir/$dir" "$dir"
12963   fi
12964 done
12965
12966 if test "$extra_verbose" = "yes"; then
12967   echo ""
12968   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
12969   echo ""
12970 fi
12971
12972 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
12973   echo "creating src/gdbinit"; echo ""
12974   echo "source $srcdir/src/gdbinit" > src/gdbinit
12975 fi
12976
12977 if test "$__SUNPRO_C" = "yes"; then
12978   echo "creating .sbinit"; echo ""
12979   ( echo "# For use with Sun WorkShop's Source browser."
12980     echo "# See sbquery(1) and sbinit(4) for more information"
12981     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
12982   ) > .sbinit
12983 fi
12984
12985 rm -f core
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005 PREFIX=$prefix
13006 while true; do
13007   case "$PREFIX" in
13008     *\$* ) eval "PREFIX=$PREFIX" ;;
13009     *) break ;;
13010   esac
13011 done
13012
13013
13014
13015
13016 EXEC_PREFIX=$exec_prefix
13017 while true; do
13018   case "$EXEC_PREFIX" in
13019     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13020     *) break ;;
13021   esac
13022 done
13023
13024
13025
13026
13027 INFODIR=$infodir
13028 while true; do
13029   case "$INFODIR" in
13030     *\$* ) eval "INFODIR=$INFODIR" ;;
13031     *) break ;;
13032   esac
13033 done
13034
13035
13036
13037
13038 INFOPATH=$infopath
13039 while true; do
13040   case "$INFOPATH" in
13041     *\$* ) eval "INFOPATH=$INFOPATH" ;;
13042     *) break ;;
13043   esac
13044 done
13045
13046
13047
13048
13049 PACKAGE_PATH=$package_path
13050 while true; do
13051   case "$PACKAGE_PATH" in
13052     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
13053     *) break ;;
13054   esac
13055 done
13056
13057
13058
13059
13060 LISPDIR=$lispdir
13061 while true; do
13062   case "$LISPDIR" in
13063     *\$* ) eval "LISPDIR=$LISPDIR" ;;
13064     *) break ;;
13065   esac
13066 done
13067
13068
13069
13070
13071 MODULEDIR=$moduledir
13072 while true; do
13073   case "$MODULEDIR" in
13074     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
13075     *) break ;;
13076   esac
13077 done
13078
13079
13080
13081
13082 SITELISPDIR=$sitelispdir
13083 while true; do
13084   case "$SITELISPDIR" in
13085     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
13086     *) break ;;
13087   esac
13088 done
13089
13090
13091
13092
13093 SITEMODULEDIR=$sitemoduledir
13094 while true; do
13095   case "$SITEMODULEDIR" in
13096     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
13097     *) break ;;
13098   esac
13099 done
13100
13101
13102
13103
13104 ETCDIR=$etcdir
13105 while true; do
13106   case "$ETCDIR" in
13107     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13108     *) break ;;
13109   esac
13110 done
13111
13112
13113
13114
13115 LOCKDIR=$lockdir
13116 while true; do
13117   case "$LOCKDIR" in
13118     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13119     *) break ;;
13120   esac
13121 done
13122
13123
13124
13125
13126 DOCDIR=$docdir
13127 while true; do
13128   case "$DOCDIR" in
13129     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13130     *) break ;;
13131   esac
13132 done
13133
13134
13135
13136
13137 ARCHLIBDIR=$archlibdir
13138 while true; do
13139   case "$ARCHLIBDIR" in
13140     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13141     *) break ;;
13142   esac
13143 done
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13165
13166
13167
13168
13169
13170
13171
13172 : ${XEMACS_CC:=$CC}
13173
13174
13175 if test "$with_prefix" = "yes"; then
13176   { test "$extra_verbose" = "yes" && cat << \EOF
13177     Defining PREFIX_USER_DEFINED
13178 EOF
13179 cat >> confdefs.h <<\EOF
13180 #define PREFIX_USER_DEFINED 1
13181 EOF
13182 }
13183
13184 fi
13185
13186 if test "$with_site_lisp" = "no"; then
13187   { test "$extra_verbose" = "yes" && cat << \EOF
13188     Defining INHIBIT_SITE_LISP
13189 EOF
13190 cat >> confdefs.h <<\EOF
13191 #define INHIBIT_SITE_LISP 1
13192 EOF
13193 }
13194
13195 fi
13196 if test "$with_site_modules" = "no"; then
13197   { test "$extra_verbose" = "yes" && cat << \EOF
13198     Defining INHIBIT_SITE_MODULES
13199 EOF
13200 cat >> confdefs.h <<\EOF
13201 #define INHIBIT_SITE_MODULES 1
13202 EOF
13203 }
13204
13205 fi
13206
13207
13208 T=""
13209 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13210 ac_configure_args="$T"
13211
13212 { test "$extra_verbose" = "yes" && cat << EOF
13213     Defining EMACS_CONFIGURATION = "$configuration"
13214 EOF
13215 cat >> confdefs.h <<EOF
13216 #define EMACS_CONFIGURATION "$configuration"
13217 EOF
13218 }
13219
13220 { test "$extra_verbose" = "yes" && cat << EOF
13221     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13222 EOF
13223 cat >> confdefs.h <<EOF
13224 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13225 EOF
13226 }
13227
13228 { test "$extra_verbose" = "yes" && cat << EOF
13229     Defining config_machfile = "$machfile"
13230 EOF
13231 cat >> confdefs.h <<EOF
13232 #define config_machfile "$machfile"
13233 EOF
13234 }
13235
13236 { test "$extra_verbose" = "yes" && cat << EOF
13237     Defining config_opsysfile = "$opsysfile"
13238 EOF
13239 cat >> confdefs.h <<EOF
13240 #define config_opsysfile "$opsysfile"
13241 EOF
13242 }
13243
13244
13245
13246 null_string=""
13247 { test "$extra_verbose" = "yes" && cat << EOF
13248     Defining LD_SWITCH_X_SITE = $null_string
13249 EOF
13250 cat >> confdefs.h <<EOF
13251 #define LD_SWITCH_X_SITE $null_string
13252 EOF
13253 }
13254
13255 { test "$extra_verbose" = "yes" && cat << EOF
13256     Defining LD_SWITCH_X_SITE_AUX = $null_string
13257 EOF
13258 cat >> confdefs.h <<EOF
13259 #define LD_SWITCH_X_SITE_AUX $null_string
13260 EOF
13261 }
13262
13263 { test "$extra_verbose" = "yes" && cat << EOF
13264     Defining C_SWITCH_X_SITE = $null_string
13265 EOF
13266 cat >> confdefs.h <<EOF
13267 #define C_SWITCH_X_SITE $null_string
13268 EOF
13269 }
13270
13271 { test "$extra_verbose" = "yes" && cat << EOF
13272     Defining LD_SWITCH_SITE = $null_string
13273 EOF
13274 cat >> confdefs.h <<EOF
13275 #define LD_SWITCH_SITE $null_string
13276 EOF
13277 }
13278
13279 { test "$extra_verbose" = "yes" && cat << EOF
13280     Defining C_SWITCH_SITE = $null_string
13281 EOF
13282 cat >> confdefs.h <<EOF
13283 #define C_SWITCH_SITE $null_string
13284 EOF
13285 }
13286
13287
13288
13289 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13290     Defining GNU_MALLOC
13291 EOF
13292 cat >> confdefs.h <<\EOF
13293 #define GNU_MALLOC 1
13294 EOF
13295 }
13296
13297 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13298     Defining USE_SYSTEM_MALLOC
13299 EOF
13300 cat >> confdefs.h <<\EOF
13301 #define USE_SYSTEM_MALLOC 1
13302 EOF
13303 }
13304
13305 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13306     Defining USE_DEBUG_MALLOC
13307 EOF
13308 cat >> confdefs.h <<\EOF
13309 #define USE_DEBUG_MALLOC 1
13310 EOF
13311 }
13312
13313                                               { test "$extra_verbose" = "yes" && cat << \EOF
13314     Defining USE_SYSTEM_MALLOC
13315 EOF
13316 cat >> confdefs.h <<\EOF
13317 #define USE_SYSTEM_MALLOC 1
13318 EOF
13319 }
13320
13321 fi
13322 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13323     Defining I18N3
13324 EOF
13325 cat >> confdefs.h <<\EOF
13326 #define I18N3 1
13327 EOF
13328 }
13329
13330 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13331     Defining USE_GCC
13332 EOF
13333 cat >> confdefs.h <<\EOF
13334 #define USE_GCC 1
13335 EOF
13336 }
13337
13338 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13339     Defining EXTERNAL_WIDGET
13340 EOF
13341 cat >> confdefs.h <<\EOF
13342 #define EXTERNAL_WIDGET 1
13343 EOF
13344 }
13345
13346 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13347     Defining NO_DOC_FILE
13348 EOF
13349 cat >> confdefs.h <<\EOF
13350 #define NO_DOC_FILE 1
13351 EOF
13352 }
13353
13354 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13355     Defining PURIFY
13356 EOF
13357 cat >> confdefs.h <<\EOF
13358 #define PURIFY 1
13359 EOF
13360 }
13361
13362 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13363     Defining QUANTIFY
13364 EOF
13365 cat >> confdefs.h <<\EOF
13366 #define QUANTIFY 1
13367 EOF
13368 }
13369
13370 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13371     Defining MAIL_USE_POP
13372 EOF
13373 cat >> confdefs.h <<\EOF
13374 #define MAIL_USE_POP 1
13375 EOF
13376 }
13377
13378 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13379     Defining KERBEROS
13380 EOF
13381 cat >> confdefs.h <<\EOF
13382 #define KERBEROS 1
13383 EOF
13384 }
13385
13386 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13387     Defining HESIOD
13388 EOF
13389 cat >> confdefs.h <<\EOF
13390 #define HESIOD 1
13391 EOF
13392 }
13393
13394 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13395     Defining USE_UNION_TYPE
13396 EOF
13397 cat >> confdefs.h <<\EOF
13398 #define USE_UNION_TYPE 1
13399 EOF
13400 }
13401
13402 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13403     Defining PDUMP
13404 EOF
13405 cat >> confdefs.h <<\EOF
13406 #define PDUMP 1
13407 EOF
13408 }
13409
13410
13411
13412 (
13413 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13414 else
13415   echo "uname -a: `uname -a`"
13416 fi
13417 echo ""
13418 echo "$0 $quoted_arguments"
13419 ) > Installation
13420
13421 if test ! -z ${emacs_beta_version} ; then
13422   if test -z "${emacs_is_beta}" ; then
13423         xemacs_betaname=".${emacs_beta_version}"
13424   else
13425         xemacs_betaname="-b${emacs_beta_version}"
13426   fi
13427 else
13428   xemacs_betaname=""
13429 fi
13430
13431 (
13432 echo "
13433
13434 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13435
13436   Where should the build process find the source code?    $srcdir
13437   What installation prefix should install use?            $prefix
13438   What operating system and machine description files should XEmacs use?
13439         \`$opsysfile' and \`$machfile'
13440   What compiler should XEmacs be built with?              $CC $CFLAGS
13441   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13442   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13443   What window system should XEmacs use?                   ${window_system}"
13444 if test "$with_x11" = "yes"; then
13445   echo "  Where do we find X Windows header files?                $x_includes"
13446   echo "  Where do we find X Windows libraries?                   $x_libraries"
13447 fi
13448 if test -n "$site_includes"; then
13449   echo "  Additional header files:                                $site_includes"
13450 fi
13451 if test -n "$site_libraries"; then
13452   echo "  Additional libraries:                                   $site_libraries"
13453 fi
13454 if test -n "$site_prefixes"; then
13455   echo "  Additional prefixes:                                    $site_prefixes"
13456 fi
13457 if test -n "$runpath"; then
13458   echo "  Runtime library search path:                            $runpath"
13459 fi
13460 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13461 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13462 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13463 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13464   echo "  No Xmu; substituting equivalent routines."
13465 fi
13466
13467 if test "$with_xpm" = yes; then
13468   echo "  Compiling in support for XPM images."
13469 elif test "$with_x11" = yes; then
13470   echo "  --------------------------------------------------------------------"
13471   echo "  WARNING: Compiling without XPM support."
13472   if test "$xpm_problem" != ""; then
13473     echo "  Reason: $xpm_problem"
13474   fi
13475   echo "  WARNING: You should strongly consider installing XPM."
13476   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13477   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13478   echo "  --------------------------------------------------------------------"
13479 fi
13480 if test "$with_png" = yes; then
13481   echo "  Compiling in support for PNG image handling."
13482 elif test "$window_system" != "none"; then
13483   echo "  --------------------------------------------------------------------"
13484   echo "  WARNING: Compiling without PNG image support."
13485   if test "$png_problem" != ""; then
13486     echo "  Reason: $png_problem"
13487   fi
13488   echo "  WARNING: You should strongly consider installing the PNG libraries."
13489   echo "  WARNING: Otherwise certain images and glyphs may not display."
13490   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13491   echo "  --------------------------------------------------------------------"
13492 fi
13493 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
13494 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
13495 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
13496 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
13497
13498 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
13499 test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
13500 test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
13501 test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
13502
13503 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
13504 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
13505 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
13506
13507 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
13508
13509 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
13510 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
13511
13512 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
13513 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
13514 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
13515 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
13516 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
13517 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
13518 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
13519 if test "$with_wnn" = yes; then
13520   echo "  Compiling in support for the WNN input method on Mule."
13521   test "$with_wnn6" = yes && echo "    Using WNN version 6."
13522 fi
13523 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
13524
13525 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
13526 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
13527 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
13528 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
13529 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
13530 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
13531 case "$with_menubars" in
13532   lucid ) echo "  Using Lucid menubars." ;;
13533   motif ) echo "  Using Motif menubars."
13534           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
13535           echo "             We recommend using the Lucid menubar instead."
13536           echo "             Re-run configure with --with-menubars='lucid'." ;;
13537   msw ) echo "  Using MS-Windows menubars." ;;
13538 esac
13539 case "$with_scrollbars" in
13540   lucid    ) echo "  Using Lucid scrollbars."     ;;
13541   motif    ) echo "  Using Motif scrollbars."     ;;
13542   athena   ) echo "  Using Athena scrollbars."    ;;
13543   athena3d ) echo "  Using Athena-3d scrollbars." ;;
13544   msw ) echo "  Using MS-Windows scrollbars." ;;
13545 esac
13546 case "$with_widgets" in
13547   motif    ) echo "  Using Motif native widgets."     ;;
13548   athena   ) echo "  Using Athena native widgets."    ;;
13549   athena3d ) echo "  Using Athena-3d native widgets." ;;
13550   msw ) echo "  Using MS-Windows native widgets." ;;
13551 esac
13552 case "$with_dialogs" in
13553   motif    )
13554     echo "  Using Motif dialog boxes."
13555     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
13556       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
13557       echo "             We recommend using the Athena dialog boxes instead."
13558       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
13559       echo "             Read the PROBLEMS file for more information."
13560     fi; fi
13561     ;;
13562   athena   ) echo "  Using Athena dialog boxes."    ;;
13563   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
13564   msw ) echo "  Using MS-Windows dialog boxes." ;;
13565 esac
13566 test "$with_modules" = "yes" && echo "  Compiling in dynamic shared object module support."
13567 test "$with_clash_detection" = yes && \
13568   echo "  Clash detection will use \"$lockdir\" for locking files."
13569 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
13570 test "$with_pop"        = yes && echo "  Using POP for mail access."
13571 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
13572 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
13573 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
13574 test "$pdump"           = yes && echo "  Using the new portable dumper (wishful thinking)."
13575 test "$debug"           = yes && echo "  Compiling in extra code for debugging."
13576 test "$usage_tracking"  = yes && echo "  Compiling with usage tracking active (Sun internal)."
13577 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
13578   != "no no no no no"; then
13579   echo "  WARNING: ---------------------------------------------------------"
13580   echo "  WARNING: Compiling in support for runtime error checking."
13581   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
13582   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
13583   echo "  WARNING: ---------------------------------------------------------"
13584 fi
13585 echo ""
13586 ) | tee -a Installation
13587 echo ""
13588
13589
13590 # Remove any trailing slashes in these variables.
13591 test -n "$prefix" &&
13592   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13593 test -n "$exec_prefix" &&
13594   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13595
13596
13597 for file in $internal_makefile_list; do
13598   test "$file" = src/Makefile.in && \
13599     file="src/Makefile.in:src/Makefile.in.in:src/depend"
13600   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
13601 done
13602 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
13603 test "$with_modules" = "yes" && ac_output_files="$ac_output_files lib-src/ellcc.h" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src/ellcc.h\" to \$ac_output_files"; fi
13604
13605 trap '' 1 2 15
13606
13607 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13608
13609 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13610 # Let make expand exec_prefix.
13611 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13612
13613 # Any assignment to VPATH causes Sun make to only execute
13614 # the first set of double-colon rules, so remove it if not needed.
13615 # If there is a colon in the path, we need to keep it.
13616 if test "x$srcdir" = x.; then
13617   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13618 fi
13619
13620 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13621
13622 DEFS=-DHAVE_CONFIG_H
13623
13624 # Without the "./", some shells look in PATH for config.status.
13625 : ${CONFIG_STATUS=./config.status}
13626
13627 echo creating $CONFIG_STATUS
13628 rm -f $CONFIG_STATUS
13629 cat > $CONFIG_STATUS <<EOF
13630 #! /bin/sh
13631 # Generated automatically by configure.
13632 # Run this file to recreate the current configuration.
13633 # This directory was configured as follows,
13634 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13635 #
13636 # $0 $ac_configure_args
13637 #
13638 # Compiler output produced by configure, useful for debugging
13639 # configure, is in ./config.log if it exists.
13640
13641 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13642 for ac_option
13643 do
13644   case "\$ac_option" in
13645   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13646     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13647     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13648   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13649     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13650     exit 0 ;;
13651   -help | --help | --hel | --he | --h)
13652     echo "\$ac_cs_usage"; exit 0 ;;
13653   *) echo "\$ac_cs_usage"; exit 1 ;;
13654   esac
13655 done
13656
13657 ac_given_srcdir=$srcdir
13658 ac_given_INSTALL="$INSTALL"
13659
13660 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13661 EOF
13662 cat >> $CONFIG_STATUS <<EOF
13663
13664 # Protect against being on the right side of a sed subst in config.status.
13665 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13666  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13667 $ac_vpsub
13668 $extrasub
13669 s%@SHELL@%$SHELL%g
13670 s%@CFLAGS@%$CFLAGS%g
13671 s%@CPPFLAGS@%$CPPFLAGS%g
13672 s%@CXXFLAGS@%$CXXFLAGS%g
13673 s%@FFLAGS@%$FFLAGS%g
13674 s%@DEFS@%$DEFS%g
13675 s%@LDFLAGS@%$LDFLAGS%g
13676 s%@LIBS@%$LIBS%g
13677 s%@exec_prefix@%$exec_prefix%g
13678 s%@prefix@%$prefix%g
13679 s%@program_transform_name@%$program_transform_name%g
13680 s%@bindir@%$bindir%g
13681 s%@sbindir@%$sbindir%g
13682 s%@libexecdir@%$libexecdir%g
13683 s%@datadir@%$datadir%g
13684 s%@sysconfdir@%$sysconfdir%g
13685 s%@sharedstatedir@%$sharedstatedir%g
13686 s%@localstatedir@%$localstatedir%g
13687 s%@libdir@%$libdir%g
13688 s%@includedir@%$includedir%g
13689 s%@oldincludedir@%$oldincludedir%g
13690 s%@infodir@%$infodir%g
13691 s%@mandir@%$mandir%g
13692 s%@LN_S@%$LN_S%g
13693 s%@blddir@%$blddir%g
13694 s%@CC@%$CC%g
13695 s%@CPP@%$CPP%g
13696 s%@start_flags@%$start_flags%g
13697 s%@ld_switch_shared@%$ld_switch_shared%g
13698 s%@start_files@%$start_files%g
13699 s%@ld@%$ld%g
13700 s%@lib_gcc@%$lib_gcc%g
13701 s%@RANLIB@%$RANLIB%g
13702 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13703 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13704 s%@INSTALL_DATA@%$INSTALL_DATA%g
13705 s%@YACC@%$YACC%g
13706 s%@SET_MAKE@%$SET_MAKE%g
13707 s%@X_CFLAGS@%$X_CFLAGS%g
13708 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
13709 s%@X_LIBS@%$X_LIBS%g
13710 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
13711 s%@install_pp@%$install_pp%g
13712 s%@libs_xauth@%$libs_xauth%g
13713 s%@dnd_objs@%$dnd_objs%g
13714 s%@lwlib_objs@%$lwlib_objs%g
13715 s%@ALLOCA@%$ALLOCA%g
13716 s%@have_esd_config@%$have_esd_config%g
13717 s%@dll_ld@%$dll_ld%g
13718 s%@dll_cflags@%$dll_cflags%g
13719 s%@dll_ldflags@%$dll_ldflags%g
13720 s%@dll_post@%$dll_post%g
13721 s%@dll_ldo@%$dll_ldo%g
13722 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
13723 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
13724 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
13725 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
13726 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
13727 s%@PROGNAME@%$PROGNAME%g
13728 s%@version@%$version%g
13729 s%@configuration@%$configuration%g
13730 s%@canonical@%$canonical%g
13731 s%@inststaticdir@%$inststaticdir%g
13732 s%@instvardir@%$instvardir%g
13733 s%@srcdir@%$srcdir%g
13734 s%@pkgdir@%$pkgdir%g
13735 s%@statedir@%$statedir%g
13736 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
13737 s%@PREFIX@%$PREFIX%g
13738 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
13739 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
13740 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
13741 s%@INFODIR@%$INFODIR%g
13742 s%@infopath@%$infopath%g
13743 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
13744 s%@INFOPATH@%$INFOPATH%g
13745 s%@package_path@%$package_path%g
13746 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
13747 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
13748 s%@lispdir@%$lispdir%g
13749 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
13750 s%@LISPDIR@%$LISPDIR%g
13751 s%@moduledir@%$moduledir%g
13752 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
13753 s%@MODULEDIR@%$MODULEDIR%g
13754 s%@sitelispdir@%$sitelispdir%g
13755 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
13756 s%@SITELISPDIR@%$SITELISPDIR%g
13757 s%@sitemoduledir@%$sitemoduledir%g
13758 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
13759 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
13760 s%@etcdir@%$etcdir%g
13761 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
13762 s%@ETCDIR@%$ETCDIR%g
13763 s%@lockdir@%$lockdir%g
13764 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
13765 s%@LOCKDIR@%$LOCKDIR%g
13766 s%@docdir@%$docdir%g
13767 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
13768 s%@DOCDIR@%$DOCDIR%g
13769 s%@archlibdir@%$archlibdir%g
13770 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
13771 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
13772 s%@bitmapdir@%$bitmapdir%g
13773 s%@extra_objs@%$extra_objs%g
13774 s%@machfile@%$machfile%g
13775 s%@opsysfile@%$opsysfile%g
13776 s%@c_switch_general@%$c_switch_general%g
13777 s%@c_switch_window_system@%$c_switch_window_system%g
13778 s%@c_switch_all@%$c_switch_all%g
13779 s%@ld_switch_general@%$ld_switch_general%g
13780 s%@ld_switch_window_system@%$ld_switch_window_system%g
13781 s%@ld_switch_all@%$ld_switch_all%g
13782 s%@ld_libs_general@%$ld_libs_general%g
13783 s%@ld_libs_window_system@%$ld_libs_window_system%g
13784 s%@ld_libs_all@%$ld_libs_all%g
13785 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
13786 s%@native_sound_lib@%$native_sound_lib%g
13787 s%@sound_cflags@%$sound_cflags%g
13788 s%@dynodump_arch@%$dynodump_arch%g
13789 s%@XEMACS_CC@%$XEMACS_CC%g
13790 s%@internal_makefile_list@%$internal_makefile_list%g
13791
13792 CEOF
13793 EOF
13794
13795 cat >> $CONFIG_STATUS <<\EOF
13796
13797 # Split the substitutions into bite-sized pieces for seds with
13798 # small command number limits, like on Digital OSF/1 and HP-UX.
13799 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13800 ac_file=1 # Number of current file.
13801 ac_beg=1 # First line for current file.
13802 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13803 ac_more_lines=:
13804 ac_sed_cmds=""
13805 while $ac_more_lines; do
13806   if test $ac_beg -gt 1; then
13807     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13808   else
13809     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13810   fi
13811   if test ! -s conftest.s$ac_file; then
13812     ac_more_lines=false
13813     rm -f conftest.s$ac_file
13814   else
13815     if test -z "$ac_sed_cmds"; then
13816       ac_sed_cmds="sed -f conftest.s$ac_file"
13817     else
13818       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13819     fi
13820     ac_file=`expr $ac_file + 1`
13821     ac_beg=$ac_end
13822     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13823   fi
13824 done
13825 if test -z "$ac_sed_cmds"; then
13826   ac_sed_cmds=cat
13827 fi
13828 EOF
13829
13830 cat >> $CONFIG_STATUS <<EOF
13831
13832 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
13833 EOF
13834 cat >> $CONFIG_STATUS <<\EOF
13835 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13836   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13837   case "$ac_file" in
13838   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13839        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13840   *) ac_file_in="${ac_file}.in" ;;
13841   esac
13842
13843   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13844
13845   # Remove last slash and all that follows it.  Not all systems have dirname.
13846   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13847   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13848     # The file is in a subdirectory.
13849     test ! -d "$ac_dir" && mkdir "$ac_dir"
13850     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13851     # A "../" for each directory in $ac_dir_suffix.
13852     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13853   else
13854     ac_dir_suffix= ac_dots=
13855   fi
13856
13857   case "$ac_given_srcdir" in
13858   .)  srcdir=.
13859       if test -z "$ac_dots"; then top_srcdir=.
13860       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13861   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13862   *) # Relative path.
13863     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13864     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13865   esac
13866
13867   case "$ac_given_INSTALL" in
13868   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13869   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13870   esac
13871
13872   echo creating "$ac_file"
13873   rm -f "$ac_file"
13874   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13875   case "$ac_file" in
13876   *Makefile*) ac_comsub="1i\\
13877 # $configure_input" ;;
13878   *) ac_comsub= ;;
13879   esac
13880
13881   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13882   sed -e "$ac_comsub
13883 s%@configure_input@%$configure_input%g
13884 s%@srcdir@%$srcdir%g
13885 s%@top_srcdir@%$top_srcdir%g
13886 s%@INSTALL@%$INSTALL%g
13887 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13888 fi; done
13889 rm -f conftest.s*
13890
13891 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13892 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13893 #
13894 # ac_d sets the value in "#define NAME VALUE" lines.
13895 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13896 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13897 ac_dC='\3'
13898 ac_dD='%g'
13899 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13900 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13901 ac_uB='\([      ]\)%\1#\2define\3'
13902 ac_uC=' '
13903 ac_uD='\4%g'
13904 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13905 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13906 ac_eB='$%\1#\2define\3'
13907 ac_eC=' '
13908 ac_eD='%g'
13909
13910 if test "${CONFIG_HEADERS+set}" != set; then
13911 EOF
13912 cat >> $CONFIG_STATUS <<EOF
13913   CONFIG_HEADERS="src/config.h lwlib/config.h"
13914 EOF
13915 cat >> $CONFIG_STATUS <<\EOF
13916 fi
13917 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13918   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13919   case "$ac_file" in
13920   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13921        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13922   *) ac_file_in="${ac_file}.in" ;;
13923   esac
13924
13925   echo creating $ac_file
13926
13927   rm -f conftest.frag conftest.in conftest.out
13928   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13929   cat $ac_file_inputs > conftest.in
13930
13931 EOF
13932
13933 # Transform confdefs.h into a sed script conftest.vals that substitutes
13934 # the proper values into config.h.in to produce config.h.  And first:
13935 # Protect against being on the right side of a sed subst in config.status.
13936 # Protect against being in an unquoted here document in config.status.
13937 rm -f conftest.vals
13938 cat > conftest.hdr <<\EOF
13939 s/[\\&%]/\\&/g
13940 s%[\\$`]%\\&%g
13941 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13942 s%ac_d%ac_u%gp
13943 s%ac_u%ac_e%gp
13944 EOF
13945 sed -n -f conftest.hdr confdefs.h > conftest.vals
13946 rm -f conftest.hdr
13947
13948 # This sed command replaces #undef with comments.  This is necessary, for
13949 # example, in the case of _POSIX_SOURCE, which is predefined and required
13950 # on some systems where configure will not decide to define it.
13951 cat >> conftest.vals <<\EOF
13952 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13953 EOF
13954
13955 # Break up conftest.vals because some shells have a limit on
13956 # the size of here documents, and old seds have small limits too.
13957
13958 rm -f conftest.tail
13959 while :
13960 do
13961   ac_lines=`grep -c . conftest.vals`
13962   # grep -c gives empty output for an empty file on some AIX systems.
13963   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13964   # Write a limited-size here document to conftest.frag.
13965   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13966   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13967   echo 'CEOF
13968   sed -f conftest.frag conftest.in > conftest.out
13969   rm -f conftest.in
13970   mv conftest.out conftest.in
13971 ' >> $CONFIG_STATUS
13972   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13973   rm -f conftest.vals
13974   mv conftest.tail conftest.vals
13975 done
13976 rm -f conftest.vals
13977
13978 cat >> $CONFIG_STATUS <<\EOF
13979   rm -f conftest.frag conftest.h
13980   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13981   cat conftest.in >> conftest.h
13982   rm -f conftest.in
13983   if cmp -s $ac_file conftest.h 2>/dev/null; then
13984     echo "$ac_file is unchanged"
13985     rm -f conftest.h
13986   else
13987     # Remove last slash and all that follows it.  Not all systems have dirname.
13988       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13989       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13990       # The file is in a subdirectory.
13991       test ! -d "$ac_dir" && mkdir "$ac_dir"
13992     fi
13993     rm -f $ac_file
13994     mv conftest.h $ac_file
13995   fi
13996 fi; done
13997
13998 EOF
13999 cat >> $CONFIG_STATUS <<EOF
14000 CPP="$CPP"
14001  top_srcdir="$srcdir"
14002  MAKE_SUBDIR="$MAKE_SUBDIR"
14003
14004 EOF
14005 cat >> $CONFIG_STATUS <<\EOF
14006 for dir in . $MAKE_SUBDIR; do
14007   (
14008     cd $dir
14009     rm -f junk.c
14010     < Makefile.in \
14011       sed -e '/^# Generated/d' \
14012           -e 's%/\*\*/#.*%%' \
14013           -e 's/^ *# */#/' \
14014           -e '/^##/d' \
14015           -e '/^#/ {
14016 p
14017 d
14018 }'        \
14019           -e '/./ {
14020 s/\([\"]\)/\\\1/g
14021 s/^/"/
14022 s/$/"/
14023 }'  > junk.c;
14024
14025
14026
14027     echo creating $dir/Makefile
14028 $CPP -I. -I${top_srcdir}/src  junk.c \
14029   | sed -e 's/^\#.*//'          \
14030         -e 's/^[        ][      ]*$//'\
14031         -e 's/^ /       /'              \
14032   | sed -n -e '/^..*$/p'        \
14033   | sed '/^\"/ {
14034         s/\\\([\"]\)/\1/g
14035         s/^[    ]*\"//
14036         s/\"[   ]*$//
14037 }' > Makefile.new
14038     chmod 444 Makefile.new
14039     mv -f Makefile.new Makefile
14040
14041     echo creating $dir/GNUmakefile
14042 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
14043   | sed -e 's/^\#.*//'          \
14044         -e 's/^[        ][      ]*$//'\
14045         -e 's/^ /       /'              \
14046   | sed -n -e '/^..*$/p'        \
14047   | sed '/^\"/ {
14048         s/\\\([\"]\)/\1/g
14049         s/^[    ]*\"//
14050         s/\"[   ]*$//
14051 }' > Makefile.new
14052     chmod 444 Makefile.new
14053     mv -f Makefile.new GNUmakefile
14054
14055     rm -f junk.c
14056   )
14057 done
14058
14059 sed < config.status >> lib-src/config.values \
14060   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
14061   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
14062   -e 's/^\([^ ]*\) $/\1 ""/' \
14063   -e 's/ 1$/ t/'
14064
14065
14066 exit 0
14067 EOF
14068 chmod +x $CONFIG_STATUS
14069 rm -fr confdefs* $ac_clean_files
14070 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1