e526103a853e737e3f81988f88752e65dca95f16
[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 with_dragndrop="no"
268
269
270
271
272 arguments="$@"
273
274 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
275 quoted_arguments=
276 for i in "$@"; do
277    case "$i" in
278    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
279    | --no-cr | --no-c) ;;
280    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
281    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
282    *)
283    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
284    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
285    esac
286 done
287
288 while test $# != 0; do
289   arg="$1"; shift
290   case "$arg" in
291     --no-create|--no-recursion) ;;
292         -* )
293             case "$arg" in
294         -*=*)
295           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
296           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
297           valomitted=no
298         ;;
299                                                                           -*)
300                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
301           val="yes" valomitted=yes
302         ;;
303       esac
304
305             optname="$opt"
306       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
307
308             case "${valomitted}-${opt}" in yes-without_* )
309         opt=`echo $opt | sed 's/without/with/'`
310         valomitted="no" val="no" ;;
311       esac
312
313             case "$opt" in
314
315         with_site_lisp  | \
316         with_prefix     | \
317         with_site_modules | \
318         with_x          | \
319         with_x11        | \
320         with_msw        | \
321         with_gcc        | \
322         dynamic         | \
323         with_ncurses    | \
324         with_dnet       | \
325         with_socks      | \
326         with_dragndrop  | \
327         with_cde        | \
328         with_offix      | \
329         with_gpm        | \
330         with_xpm        | \
331         with_xface      | \
332         with_gif        | \
333         with_jpeg       | \
334         with_png        | \
335         with_tiff       | \
336         with_wmcommand  | \
337         with_xmu        | \
338         with_purify     | \
339         with_quantify   | \
340         with_toolbars   | \
341         with_tty        | \
342         with_xfs        | \
343         with_i18n3      | \
344         with_mule       | \
345         with_file_coding| \
346         with_canna      | \
347         with_wnn        | \
348         with_wnn6       | \
349         with_workshop   | \
350         with_sparcworks | \
351         with_tooltalk   | \
352         with_ldap       | \
353         with_pop        | \
354         with_kerberos   | \
355         with_hesiod     | \
356         with_dnet       | \
357         with_infodock   | \
358         external_widget | \
359         verbose         | \
360         extra_verbose   | \
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_athena" )
486           case "$val" in
487             xa | xaw )                    val=xaw    ;;
488             3 | 3d | xaw3d )              val=3d     ;;
489                         ne | nex | next | naxtaw)     val=next   ;;
490                         9 | 95 | xaw95 )              val=95     ;;
491             xp | xpm | xawxpm )           val=xpm    ;;
492             * ) (echo "$progname: Usage error:"
493 echo " " "The \`--$optname' option must have one of these values:
494   \`xaw', \`3d', \`next', \`95', or \`xpm'."
495 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
496           esac
497           eval "$opt=\"$val\""
498         ;;
499
500                 "with_xim" )
501           case "$val" in
502             y | ye | yes )                val=yes   ;;
503             n | no | non | none )         val=no    ;;
504             x | xl | xli | xlib )         val=xlib  ;;
505             m | mo | mot | moti | motif ) val=motif ;;
506             * ) (echo "$progname: Usage error:"
507 echo " " "The \`--$optname' option must have one of these values:
508   \`motif', \`xlib', \`yes', or \`no'."
509 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
510           esac
511           eval "$opt=\"$val\""
512         ;;
513
514                 "mail_locking" )
515           case "$val" in
516             lockf )     val=lockf ;;
517             flock )     val=flock ;;
518             file | dot ) val=file  ;;
519             locking )   val=locking  ;;
520             * ) (echo "$progname: Usage error:"
521 echo " " "The \`--$optname' option must have one of these values:
522   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
523 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
524           esac
525           eval "$opt=\"$val\""
526         ;;
527
528                 "error_checking" )
529                           
530           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
531             case "$x" in
532                       n | no | non | none ) new_default=no ;;
533               a | al | all )        new_default=yes ;;
534
535               extents )       error_check_extents=yes ;;
536               noextents )     error_check_extents=no ;;
537
538               typecheck )     error_check_typecheck=yes ;;
539               notypecheck )   error_check_typecheck=no ;;
540
541               bufpos )        error_check_bufpos=yes ;;
542               nobufpos )      error_check_bufpos=no ;;
543
544               gc )            error_check_gc=yes ;;
545               nogc )          error_check_gc=no ;;
546
547               malloc )        error_check_malloc=yes ;;
548               nomalloc )      error_check_malloc=no ;;
549
550               byte_code )     error_check_byte_code=yes ;;
551               nobyte_code )   error_check_byte_code=no ;;
552
553               * ) bogus_error_check=yes ;;
554             esac
555             if test "$bogus_error_check" -o \
556                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
557                 if test "$error_check_default" = yes ; then
558                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
559                 else
560                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
561                 fi
562                 (echo "$progname: Usage error:"
563 echo " " "Valid types for the \`--$optname' option are:
564   $types."
565 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
566             elif test -n "$new_default" ; then
567                 error_check_extents=$new_default
568                 error_check_typecheck=$new_default
569                 error_check_bufpos=$new_default
570                 error_check_gc=$new_default
571                 error_check_malloc=$new_default
572                 error_check_byte_code=$new_default
573                 new_default=    # reset this
574             fi
575             echeck_notfirst=true
576           done
577         ;;
578
579                                 
580                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
581         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
582         archlibdir | docdir | package_path )
583                    if test "$valomitted" = "yes"; then
584              if test "$#" = 0; then
585                  (echo "$progname: Usage error:"
586 echo " " "The \`--$optname' option requires a value."
587 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
588              fi
589              val="$1"; shift
590            fi
591            eval "$opt=\"$val\""
592
593                            case "$opt" in
594                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
595     Defining EXEC_PREFIX_USER_DEFINED
596 EOF
597 cat >> confdefs.h <<\EOF
598 #define EXEC_PREFIX_USER_DEFINED 1
599 EOF
600 }
601  ;;
602              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
603     Defining LISPDIR_USER_DEFINED
604 EOF
605 cat >> confdefs.h <<\EOF
606 #define LISPDIR_USER_DEFINED 1
607 EOF
608 }
609  ;;
610              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
611     Defining SITELISPDIR_USER_DEFINED
612 EOF
613 cat >> confdefs.h <<\EOF
614 #define SITELISPDIR_USER_DEFINED 1
615 EOF
616 }
617  ;;
618              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
619     Defining MODULEDIR_USER_DEFINED
620 EOF
621 cat >> confdefs.h <<\EOF
622 #define MODULEDIR_USER_DEFINED 1
623 EOF
624 }
625  ;;
626              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
627     Defining ETCDIR_USER_DEFINED
628 EOF
629 cat >> confdefs.h <<\EOF
630 #define ETCDIR_USER_DEFINED 1
631 EOF
632 }
633  ;;
634              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
635     Defining INFODIR_USER_DEFINED
636 EOF
637 cat >> confdefs.h <<\EOF
638 #define INFODIR_USER_DEFINED 1
639 EOF
640 }
641  ;;
642              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
643     Defining INFOPATH_USER_DEFINED
644 EOF
645 cat >> confdefs.h <<\EOF
646 #define INFOPATH_USER_DEFINED 1
647 EOF
648 }
649  ;;
650              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
651     Defining PACKAGE_PATH_USER_DEFINED
652 EOF
653 cat >> confdefs.h <<\EOF
654 #define PACKAGE_PATH_USER_DEFINED 1
655 EOF
656 }
657  ;;
658              datadir )
659                 { test "$extra_verbose" = "yes" && cat << \EOF
660     Defining INFODIR_USER_DEFINED
661 EOF
662 cat >> confdefs.h <<\EOF
663 #define INFODIR_USER_DEFINED 1
664 EOF
665 }
666
667                 { test "$extra_verbose" = "yes" && cat << \EOF
668     Defining LISPDIR_USER_DEFINED
669 EOF
670 cat >> confdefs.h <<\EOF
671 #define LISPDIR_USER_DEFINED 1
672 EOF
673 }
674
675             { test "$extra_verbose" = "yes" && cat << \EOF
676     Defining MODULEDIR_USER_DEFINED
677 EOF
678 cat >> confdefs.h <<\EOF
679 #define MODULEDIR_USER_DEFINED 1
680 EOF
681 }
682
683                 { test "$extra_verbose" = "yes" && cat << \EOF
684     Defining ETCDIR_USER_DEFINED
685 EOF
686 cat >> confdefs.h <<\EOF
687 #define ETCDIR_USER_DEFINED 1
688 EOF
689 }
690  ;;
691              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
692     Defining LOCKDIR_USER_DEFINED
693 EOF
694 cat >> confdefs.h <<\EOF
695 #define LOCKDIR_USER_DEFINED 1
696 EOF
697 }
698  ;;
699              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
700     Defining DOCDIR_USER_DEFINED
701 EOF
702 cat >> confdefs.h <<\EOF
703 #define DOCDIR_USER_DEFINED 1
704 EOF
705 }
706  ;;
707              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
708     Defining ARCHLIBDIR_USER_DEFINED
709 EOF
710 cat >> confdefs.h <<\EOF
711 #define ARCHLIBDIR_USER_DEFINED 1
712 EOF
713 }
714  ;;
715            esac
716         ;;
717
718                 "no_create" ) ;;
719
720                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
721
722                 "with_menubars"   | \
723         "with_scrollbars" | \
724         "with_dialogs" | \
725         "with_widgets" )
726           case "$val" in
727             l | lu | luc | luci | lucid )               val=lucid  ;;
728             m | mo | mot | moti | motif )               val=motif  ;;
729             a | at | ath | athe | athen | athena )      val=athena ;;
730             n | no | non | none )                       val=no ;;
731             * ) (echo "$progname: Usage error:"
732 echo " " "The \`--$optname' option must have one of these values:
733   \`lucid', \`motif', \`athena', or \`no'."
734 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
735           esac
736           eval "$opt=\"$val\""
737         ;;
738
739                 "use_minimal_tagbits" | \
740         "use_indexed_lrecord_implementation" | \
741         "run_in_place"  | \
742         "const_is_losing" | \
743         "with_gnu_make" )
744           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
745         ;;
746
747                 * ) (echo "$progname: Usage error:"
748 echo " " "Unrecognized option: $arg"
749 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
750
751       esac
752     ;;
753
754         *-*-*) configuration="$arg" ;;
755
756         *) (echo "$progname: Usage error:"
757 echo " " "Unrecognized argument: $arg"
758 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
759
760   esac
761 done
762
763
764 test -n "$cpp"      && CPP="$cpp"
765 test -n "$cppflags" && CPPFLAGS="$cppflags"
766 test -n "$libs"     && LIBS="$libs"
767 test -n "$ldflags"  && LDFLAGS="$ldflags"
768
769 eval set x "$quoted_arguments"; shift
770
771 test "$extra_verbose" = "yes" && verbose=yes
772
773 test -n "$with_x" && with_x11="$with_x"
774
775 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
776   test "$with_system_malloc" = "default" && with_system_malloc=yes
777 fi
778
779
780
781 if test "$with_cde $with_tooltalk" = "yes no"; then
782   (echo "$progname: Usage error:"
783 echo " " "--with-cde requires --with-tooltalk"
784 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
785 elif test "$with_tooltalk" = "no" ; then with_cde=no
786 elif test "$with_cde" = "yes"; then with_tooltalk=yes
787 fi
788
789
790 case "$srcdir" in
791
792     "" )
793     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
794       if test -f "$dir/src/lisp.h" -a \
795               -f "$dir/lisp/version.el" ; then
796         srcdir="$dir"
797         break
798       fi
799     done
800     if test -z "$srcdir" ; then
801       (echo "$progname: Usage error:"
802 echo " " "Neither the current directory nor its parent seem to
803   contain the XEmacs sources.  If you do not want to build XEmacs in its
804   source tree, you should run \`$progname' in the directory in which
805   you wish to build XEmacs, using the \`--srcdir' option to say where the
806   sources may be found."
807 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
808     fi
809   ;;
810
811     * )
812     if test ! -f "$srcdir/src/lisp.h" -o \
813             ! -f "$srcdir/lisp/version.el" ; then
814       (echo "$progname: Usage error:"
815 echo " " "The directory specified with the \`--srcdir' option,
816   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
817   either run the \`$progname' script at the top of the XEmacs source
818   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
819 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
820     fi
821   ;;
822 esac
823
824 if test -z "$configuration"; then
825     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
826   if test -z "$configuration"; then
827     (echo "$progname: Usage error:"
828 echo " " "XEmacs has not been ported to this host type.
829 Try explicitly specifying the CONFIGURATION when rerunning configure."
830 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
831   fi
832 fi
833
834 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
835 echo "configure:836: checking whether ln -s works" >&5
836
837 rm -f conftestdata
838 if ln -s X conftestdata 2>/dev/null
839 then
840   rm -f conftestdata
841   ac_cv_prog_LN_S="ln -s"
842 else
843   ac_cv_prog_LN_S=ln
844 fi
845 LN_S="$ac_cv_prog_LN_S"
846 if test "$ac_cv_prog_LN_S" = "ln -s"; then
847   echo "$ac_t""yes" 1>&6
848 else
849   echo "$ac_t""no" 1>&6
850 fi
851
852
853 for dir in lisp etc man info tests; do
854   if test ! -d "$dir" ; then
855     echo Making symbolic link to "$srcdir/$dir"
856     ${LN_S} "$srcdir/$dir" "$dir"
857   fi
858 done
859
860
861 absolute_pwd="`pwd`";
862 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
863 then blddir="$PWD"
864 else blddir="$absolute_pwd"; if test -d "/net"; then
865   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
866   blddir=`echo "$blddir" | \
867    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
868 fi
869 fi
870
871
872 case "$srcdir" in
873   /* ) ;;
874   .  ) srcdir="$blddir" ;;
875   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
876   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
877   srcdir=`echo "$srcdir" | \
878    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
879 fi ;;
880 esac
881
882 if test `pwd` != `sh -c cd $srcdir && pwd`  \
883    && test -f "$srcdir/src/config.h"; then
884   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
885    echo "   as a build directory right now; it has been configured in its own"
886    echo "   right.  To configure in another directory as well, you MUST"
887    echo "   use GNU make.  If you do not have GNU make, then you must"
888    echo "   now do \`make distclean' in $srcdir,"
889    echo "   and then run $progname again.") >&2
890   extrasub='/^VPATH[     ]*=/c\
891 vpath %.c $(srcdir)\
892 vpath %.h $(srcdir)\
893 vpath %.y $(srcdir)\
894 vpath %.l $(srcdir)\
895 vpath %.s $(srcdir)\
896 vpath %.in $(srcdir)'
897 fi
898
899 . "$srcdir/version.sh" || exit 1;
900 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
901 : "${extra_verbose=$beta}"
902 version="${emacs_major_version}.${emacs_minor_version}"
903 { test "$extra_verbose" = "yes" && cat << EOF
904     Defining EMACS_MAJOR_VERSION = $emacs_major_version
905 EOF
906 cat >> confdefs.h <<EOF
907 #define EMACS_MAJOR_VERSION $emacs_major_version
908 EOF
909 }
910
911 { test "$extra_verbose" = "yes" && cat << EOF
912     Defining EMACS_MINOR_VERSION = $emacs_minor_version
913 EOF
914 cat >> confdefs.h <<EOF
915 #define EMACS_MINOR_VERSION $emacs_minor_version
916 EOF
917 }
918
919 if test -n "$emacs_beta_version" ; then
920   if test "$beta" = "yes"; then
921         version="${version}-b${emacs_beta_version}"
922         { test "$extra_verbose" = "yes" && cat << EOF
923     Defining EMACS_BETA_VERSION = $emacs_beta_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define EMACS_BETA_VERSION $emacs_beta_version
927 EOF
928 }
929
930   else
931         version="${version}.${emacs_beta_version}"
932         { test "$extra_verbose" = "yes" && cat << EOF
933     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
934 EOF
935 cat >> confdefs.h <<EOF
936 #define EMACS_PATCH_LEVEL $emacs_beta_version
937 EOF
938 }
939
940   fi
941 fi
942 { test "$extra_verbose" = "yes" && cat << EOF
943     Defining XEMACS_CODENAME = "$xemacs_codename"
944 EOF
945 cat >> confdefs.h <<EOF
946 #define XEMACS_CODENAME "$xemacs_codename"
947 EOF
948 }
949
950 { test "$extra_verbose" = "yes" && cat << EOF
951     Defining EMACS_VERSION = "$version"
952 EOF
953 cat >> confdefs.h <<EOF
954 #define EMACS_VERSION "$version"
955 EOF
956 }
957
958
959 if test "$with_infodock" = "yes"; then
960   if test ! -f ../../ID-INSTALL; then
961     echo "Cannot build InfoDock without InfoDock sources"
962     with_infodock=no
963   fi
964 fi
965
966 if test "$with_infodock" = "yes"; then
967       { test "$extra_verbose" = "yes" && cat << EOF
968     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
969 EOF
970 cat >> confdefs.h <<EOF
971 #define INFODOCK_MAJOR_VERSION $infodock_major_version
972 EOF
973 }
974
975   { test "$extra_verbose" = "yes" && cat << EOF
976     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
977 EOF
978 cat >> confdefs.h <<EOF
979 #define INFODOCK_MINOR_VERSION $infodock_minor_version
980 EOF
981 }
982
983   { test "$extra_verbose" = "yes" && cat << EOF
984     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
985 EOF
986 cat >> confdefs.h <<EOF
987 #define INFODOCK_BUILD_VERSION $infodock_build_version
988 EOF
989 }
990
991   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
992   PROGNAME=infodock
993   CPPFLAGS="$CPPFLAGS -DINFODOCK"
994 else
995   PROGNAME=xemacs
996 fi
997
998 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
999 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1000     Defining ERROR_CHECK_EXTENTS
1001 EOF
1002 cat >> confdefs.h <<\EOF
1003 #define ERROR_CHECK_EXTENTS 1
1004 EOF
1005 }
1006
1007 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1008     Defining ERROR_CHECK_TYPECHECK
1009 EOF
1010 cat >> confdefs.h <<\EOF
1011 #define ERROR_CHECK_TYPECHECK 1
1012 EOF
1013 }
1014
1015 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1016     Defining ERROR_CHECK_BUFPOS
1017 EOF
1018 cat >> confdefs.h <<\EOF
1019 #define ERROR_CHECK_BUFPOS 1
1020 EOF
1021 }
1022
1023 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1024     Defining ERROR_CHECK_GC
1025 EOF
1026 cat >> confdefs.h <<\EOF
1027 #define ERROR_CHECK_GC 1
1028 EOF
1029 }
1030
1031 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1032     Defining ERROR_CHECK_MALLOC
1033 EOF
1034 cat >> confdefs.h <<\EOF
1035 #define ERROR_CHECK_MALLOC 1
1036 EOF
1037 }
1038
1039 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1040     Defining ERROR_CHECK_BYTE_CODE
1041 EOF
1042 cat >> confdefs.h <<\EOF
1043 #define ERROR_CHECK_BYTE_CODE 1
1044 EOF
1045 }
1046
1047 if test "${debug:=$beta}" = "yes"; then
1048   use_assertions=yes memory_usage_stats=yes
1049   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1050    echo "    xemacs will be linked with \"debug.o\""
1051  fi
1052   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1053    echo "    xemacs will be linked with \"tests.o\""
1054  fi
1055   { test "$extra_verbose" = "yes" && cat << \EOF
1056     Defining DEBUG_XEMACS
1057 EOF
1058 cat >> confdefs.h <<\EOF
1059 #define DEBUG_XEMACS 1
1060 EOF
1061 }
1062
1063 fi
1064 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1065     Defining USE_ASSERTIONS
1066 EOF
1067 cat >> confdefs.h <<\EOF
1068 #define USE_ASSERTIONS 1
1069 EOF
1070 }
1071
1072 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1073     Defining MEMORY_USAGE_STATS
1074 EOF
1075 cat >> confdefs.h <<\EOF
1076 #define MEMORY_USAGE_STATS 1
1077 EOF
1078 }
1079
1080
1081
1082 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1083 echo "configure:1084: checking "host system type"" >&5
1084 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1085 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1086 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1087 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1088 echo "$ac_t""$configuration" 1>&6
1089
1090
1091
1092
1093
1094 machine='' opsys=''
1095
1096 case "$canonical" in
1097   sparc-*-*        ) machine=sparc ;;
1098   alpha*-*-*       ) machine=alpha ;;
1099   vax-*-*          ) machine=vax ;;
1100   mips-dec-*       ) machine=pmax ;;
1101   mips-sgi-irix6*  ) machine=iris6d ;;
1102   mips-sgi-*       ) machine=iris4d ;;
1103   mips*-linux      ) machine=mips ;;
1104   romp-ibm-*       ) machine=ibmrt ;;
1105   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1106   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1107   powerpc*-*       ) machine=powerpc ;;
1108   hppa-*-*         ) machine=hp800 ;;
1109   m88k-dg-*        ) machine=aviion ;;
1110   m68*-sony-*      ) machine=news ;;
1111   mips-sony-*      ) machine=news-risc ;;
1112   clipper-*        ) machine=clipper ;;
1113   arm-*            ) machine=arm ;;
1114   armv34lb-*   ) machine=arm ;;
1115   ns32k-*          ) machine=ns32000 ;;
1116 esac
1117
1118 case "$canonical" in
1119   *-*-linux*    ) opsys=linux ;;
1120   *-*-netbsd*   ) opsys=netbsd ;;
1121   *-*-openbsd*  ) opsys=openbsd ;;
1122   *-*-nextstep* ) opsys=nextstep ;;
1123   *-*-vms       ) opsys=vms ;;
1124
1125     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1126   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1127   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1128   *-dec-osf3*                ) opsys=decosf3-1 ;;
1129   *-dec-osf4*                ) opsys=decosf4-0 ;;
1130
1131     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1132   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1133   *-*-ultrix* )         opsys=ultrix4-3 ;;
1134
1135     *-*-aix3.1*  ) opsys=aix3-1 ;;
1136   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1137   *-*-aix3*    ) opsys=aix3-2   ;;
1138   *-*-aix4.0*  ) opsys=aix4     ;;
1139   *-*-aix4.1*  ) opsys=aix4-1   ;;
1140   *-*-aix4*    ) opsys=aix4-2   ;;
1141
1142     *-gnu* )                    opsys=gnu    ;;
1143   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1144   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1145   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1146   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1147   *-*-aos*   )                  opsys=bsd4-3 ;;
1148   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1149   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1150   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1151   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1152   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1153   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1154         if test -z "$NON_GNU_CPP" ; then
1155           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1156             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1157           done
1158         fi
1159         opsys=usg5-4-2 ;;
1160     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1161     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1162 esac
1163
1164 case "$canonical" in
1165
1166     *-*-netbsd* )
1167     case "$canonical" in
1168       i[3-9]86-*-netbsd*) machine=intel386 ;;
1169       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1170                                             machine=hp9000s300 ;;
1171       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1172       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1173     esac
1174   ;;
1175
1176     *-*-openbsd* )
1177     case "${canonical}" in
1178       i386-*-openbsd*)          machine=intel386 ;;
1179       m68k-*-openbsd*)          machine=hp9000s300 ;;
1180       mipsel-*-openbsd*)        machine=pmax ;;
1181      esac
1182    ;;
1183
1184     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1185   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1186
1187     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1188   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1189
1190     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1191
1192     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1193
1194     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1195
1196     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1197
1198     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1199
1200     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1201   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1202   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1203
1204   
1205     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1206
1207     *-convex-bsd* | *-convex-convexos* )
1208     machine=convex opsys=bsd4-3
1209     NON_GNU_CPP="cc -E -P"
1210   ;;
1211
1212     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1213
1214     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1215   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1216   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1217   m88k-dg-dgux*                           ) opsys=dgux     ;;
1218
1219     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1220   m88k-motorola-sysv4* )
1221                     machine=delta88k opsys=usg5-4-2
1222   ;;
1223   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1224
1225     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1226   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1227
1228     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1229
1230     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1231   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1232   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1233
1234       m88k-harris-cxux* )
1235         case "`uname -r`" in
1236        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1237        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1238     esac
1239     NON_GNU_CPP="/lib/cpp"
1240   ;;
1241     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1242     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1243
1244     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1245
1246     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1247
1248     *-hp-hpux* )
1249         case "$canonical" in
1250       m68*  ) machine=hp9000s300 ;;
1251       hppa* ) machine=hp800      ;;
1252     esac
1253
1254     case "$canonical" in
1255       *-hp-hpux7*  )  opsys=hpux   ;;
1256       *-hp-hpux8*  )  opsys=hpux8  ;;
1257       *-hp-hpux9*  )  opsys=hpux9  ;;
1258       *-hp-hpux10* )  opsys=hpux10 ;;
1259       *-hp-hpux11* )  opsys=hpux11 ;;
1260       *            )  opsys=hpux   ;;
1261     esac
1262
1263         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1264    echo "    xemacs will be linked with \"strcat.o\""
1265  fi ;; esac
1266
1267     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1268         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1269     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1270
1271     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1272   ;;
1273
1274     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1275   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1276
1277     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1278   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1279   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1280   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1281   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1282   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1283
1284     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1285   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1286
1287     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1288
1289     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1290
1291     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1292
1293     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1294
1295       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1296
1297     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1298
1299     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1300
1301     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1302
1303     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1304
1305         mips-mips-usg* ) machine=mips4 ;;
1306   mips-mips-riscos4 )
1307     machine=mips4
1308     NON_GNU_CC="cc -systype bsd43"
1309     NON_GNU_CPP="cc -systype bsd43 -E"
1310     case "$canonical" in
1311       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1312       mips-mips-riscos5* ) opsys=riscos5 ;;
1313     esac
1314   ;;
1315   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1316   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1317
1318     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1319
1320     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1321
1322     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1323   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1324
1325     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1326
1327     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1328
1329     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1330
1331     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1332
1333     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1334   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1335
1336     mips-siemens-sysv* | mips-sni-sysv*)
1337     machine=mips-siemens opsys=usg5-4
1338     NON_GNU_CC=/usr/ccs/bin/cc
1339     NON_GNU_CPP=/usr/ccs/lib/cpp
1340   ;;
1341
1342     mips-nec-sysv*)
1343     machine=mips-nec
1344     NON_GNU_CC=/usr/ccs/bin/cc
1345     NON_GNU_CPP=/usr/ccs/lib/cpp
1346   ;;
1347
1348       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1349   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1350     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1351   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1352   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1353   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1354   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1355   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1356   mips-sgi-irix*      ) opsys=irix5-0 ;;
1357
1358     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1359   *-sony-news* ) opsys=newsos5 ;;
1360
1361     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1362
1363     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1364         case "$canonical" in
1365       m68*-sunos1* )             machine=sun1     ;;
1366       m68*-sunos2* )             machine=sun2     ;;
1367       m68* )                     machine=sun3     ;;
1368       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1369       i*86-*-* )                 machine=intel386 ;;
1370       rs6000* )                  machine=rs6000   ;;
1371     esac
1372
1373         case "$canonical" in *-sunos5*)
1374       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1375     esac
1376
1377                     case "$canonical" in
1378       *-sunos4* )
1379         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1380         : ;;
1381       *-solaris2* )
1382         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1383         RANLIB=':' ;;
1384     esac
1385
1386     case "$canonical" in
1387       *-solaris*          )
1388         opsys=sol2
1389         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1390         { test "$extra_verbose" = "yes" && cat << EOF
1391     Defining OS_RELEASE = $os_release
1392 EOF
1393 cat >> confdefs.h <<EOF
1394 #define OS_RELEASE $os_release
1395 EOF
1396 }
1397  ;;
1398
1399             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1400       *-sunos4.0*         ) opsys=sunos4-0      ;;
1401       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1402       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1403       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1404       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1405       *-mach*             ) opsys=mach-bsd4-3   ;;
1406       *                   ) opsys=bsd4-2        ;;
1407     esac
1408
1409     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1410
1411         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1412   ;;
1413
1414     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1415
1416     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1417   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1418
1419     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1420
1421     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1422
1423     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1424       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1425
1426     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1427
1428     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1429
1430     vax-dec-* )
1431     case "$canonical" in
1432       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1433       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1434       *-mach* )                         opsys=mach-bsd4-3 ;;
1435     esac
1436   ;;
1437
1438     ns16k-whitechapel-* ) machine=mg1 ;;
1439
1440     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1441
1442     i[3-9]86-*-* )
1443     machine=intel386
1444     case "$canonical" in
1445       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1446       *-isc2.2* )               opsys=isc2-2 ;;
1447       *-isc4.0* )               opsys=isc4-0 ;;
1448       *-isc4.* )                opsys=isc4-1
1449                                 GCC_TEST_OPTIONS=-posix
1450                                 NON_GCC_TEST_OPTIONS=-Xp
1451                                 ;;
1452       *-isc* )                  opsys=isc3-0 ;;
1453       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1454       *-esix* )                 opsys=esix ;;
1455       *-mach* )                 opsys=mach-bsd4-3 ;;
1456       *-xenix* )                opsys=xenix ;;
1457       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1458       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1459       *-bsdi4* )                opsys=bsdos4 ;;
1460       *-bsdi3* )                opsys=bsdos3 ;;
1461       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1462       *-bsdi2* )                opsys=bsdos2 ;;
1463       *-sco3.2v5* )             opsys=sco5 ;
1464                                                         if test "$dynamic" = "yes" ; then
1465                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1466         else
1467                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1468         fi ;;
1469       *-sysv5* )                opsys=sco7 ;;
1470       *-386bsd* )               opsys=386bsd ;;
1471       *-freebsd* )              opsys=freebsd ;;
1472       *-nextstep* )             opsys=nextstep ;;
1473       *-pc-cygwin* )            opsys=cygwin32 ;;
1474       *-pc-mingw* )             opsys=mingw32 ;
1475                                 test -z "$with_tty" && with_tty="no";;
1476           esac
1477   ;;
1478
1479     m68k-*-linux* ) machine=m68k opsys=linux ;;
1480
1481 esac
1482
1483 if test -z "$machine" -o -z "$opsys"; then
1484   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1485    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1486   ) >&2
1487   exit 1
1488 fi
1489
1490 if test -z "$dynamic"; then
1491   case "$opsys" in
1492     hpux* | sunos4* ) dynamic=no ;;
1493     *) dynamic=yes ;;
1494   esac
1495 fi
1496 if test "$dynamic" = "yes"; then
1497   case "$opsys" in
1498     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1499     decosf* ) ld_call_shared="-call_shared" ;;
1500   esac
1501 else   case "$opsys" in
1502     sol2 )
1503       echo "Static linking is not supported on Solaris 2."
1504       echo "Rerun configure without specifying --dynamic=no."
1505       exit 1 ;;
1506     linux   ) ld_call_shared="-Bstatic" ;;
1507     decosf* ) ld_call_shared="-non_shared" ;;
1508   esac
1509 fi
1510
1511 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1512
1513 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1514 { test "$extra_verbose" = "yes" && cat << EOF
1515     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1516 EOF
1517 cat >> confdefs.h <<EOF
1518 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1519 EOF
1520 }
1521
1522
1523 machfile="m/${machine}.h"
1524 opsysfile="s/${opsys}.h"
1525
1526
1527 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1528 if test "$with_workshop $with_tooltalk" = "yes no"; then
1529   (echo "$progname: Usage error:"
1530 echo " " "--with-workshop requires --with-tooltalk"
1531 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1532 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1533 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1534 fi
1535
1536 if test "$with_workshop" = "yes"; then
1537   { test "$extra_verbose" = "yes" && cat << \EOF
1538     Defining SUNPRO
1539 EOF
1540 cat >> confdefs.h <<\EOF
1541 #define SUNPRO 1
1542 EOF
1543 }
1544
1545   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1546    echo "    xemacs will be linked with \"sunpro.o\""
1547  fi
1548 fi
1549
1550 if test "$with_clash_detection" = "yes"; then
1551   { test "$extra_verbose" = "yes" && cat << \EOF
1552     Defining CLASH_DETECTION
1553 EOF
1554 cat >> confdefs.h <<\EOF
1555 #define CLASH_DETECTION 1
1556 EOF
1557 }
1558
1559   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1560    echo "    xemacs will be linked with \"filelock.o\""
1561  fi
1562 fi
1563
1564 test -n "$compiler" && CC="$compiler"
1565 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1566 fi
1567
1568 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1569 if test "${CFLAGS-unset}" != unset
1570   then cflags_specified=yes;
1571   else cflags_specified=no;
1572 fi
1573
1574 xe_save_CFLAGS="$CFLAGS"
1575
1576 # Extract the first word of "gcc", so it can be a program name with args.
1577 set dummy gcc; ac_word=$2
1578 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1579 echo "configure:1580: checking for $ac_word" >&5
1580
1581 if test -n "$CC"; then
1582   ac_cv_prog_CC="$CC" # Let the user override the test.
1583 else
1584   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1585   ac_dummy="$PATH"
1586   for ac_dir in $ac_dummy; do
1587     test -z "$ac_dir" && ac_dir=.
1588     if test -f $ac_dir/$ac_word; then
1589       ac_cv_prog_CC="gcc"
1590       break
1591     fi
1592   done
1593   IFS="$ac_save_ifs"
1594 fi
1595 CC="$ac_cv_prog_CC"
1596 if test -n "$CC"; then
1597   echo "$ac_t""$CC" 1>&6
1598 else
1599   echo "$ac_t""no" 1>&6
1600 fi
1601
1602 if test -z "$CC"; then
1603   # Extract the first word of "cc", so it can be a program name with args.
1604 set dummy cc; ac_word=$2
1605 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1606 echo "configure:1607: checking for $ac_word" >&5
1607
1608 if test -n "$CC"; then
1609   ac_cv_prog_CC="$CC" # Let the user override the test.
1610 else
1611   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1612   ac_prog_rejected=no
1613   ac_dummy="$PATH"
1614   for ac_dir in $ac_dummy; do
1615     test -z "$ac_dir" && ac_dir=.
1616     if test -f $ac_dir/$ac_word; then
1617       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1618         ac_prog_rejected=yes
1619         continue
1620       fi
1621       ac_cv_prog_CC="cc"
1622       break
1623     fi
1624   done
1625   IFS="$ac_save_ifs"
1626 if test $ac_prog_rejected = yes; then
1627   # We found a bogon in the path, so make sure we never use it.
1628   set dummy $ac_cv_prog_CC
1629   shift
1630   if test $# -gt 0; then
1631     # We chose a different compiler from the bogus one.
1632     # However, it has the same basename, so the bogon will be chosen
1633     # first if we set CC to just the basename; use the full file name.
1634     shift
1635     set dummy "$ac_dir/$ac_word" "$@"
1636     shift
1637     ac_cv_prog_CC="$@"
1638   fi
1639 fi
1640 fi
1641 CC="$ac_cv_prog_CC"
1642 if test -n "$CC"; then
1643   echo "$ac_t""$CC" 1>&6
1644 else
1645   echo "$ac_t""no" 1>&6
1646 fi
1647
1648   if test -z "$CC"; then
1649     case "`uname -s`" in
1650     *win32* | *WIN32*)
1651       # Extract the first word of "cl", so it can be a program name with args.
1652 set dummy cl; ac_word=$2
1653 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1654 echo "configure:1655: checking for $ac_word" >&5
1655
1656 if test -n "$CC"; then
1657   ac_cv_prog_CC="$CC" # Let the user override the test.
1658 else
1659   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1660   ac_dummy="$PATH"
1661   for ac_dir in $ac_dummy; do
1662     test -z "$ac_dir" && ac_dir=.
1663     if test -f $ac_dir/$ac_word; then
1664       ac_cv_prog_CC="cl"
1665       break
1666     fi
1667   done
1668   IFS="$ac_save_ifs"
1669 fi
1670 CC="$ac_cv_prog_CC"
1671 if test -n "$CC"; then
1672   echo "$ac_t""$CC" 1>&6
1673 else
1674   echo "$ac_t""no" 1>&6
1675 fi
1676  ;;
1677     esac
1678   fi
1679   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1680 fi
1681
1682 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1683 echo "configure:1684: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1684
1685 ac_ext=c
1686 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1687 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1688 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1689 ac_cpp='$CPP '"$xe_cppflags"
1690 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1691 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1692 cross_compiling=no
1693
1694 cat > conftest.$ac_ext << EOF
1695
1696 #line 1697 "configure"
1697 #include "confdefs.h"
1698
1699 main(){return(0);}
1700 EOF
1701 if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1702   ac_cv_prog_cc_works=yes
1703   # If we can't run a trivial program, we are probably using a cross compiler.
1704   if (./conftest; exit) 2>/dev/null; then
1705     ac_cv_prog_cc_cross=no
1706   else
1707     ac_cv_prog_cc_cross=yes
1708   fi
1709 else
1710   echo "configure: failed program was:" >&5
1711   cat conftest.$ac_ext >&5
1712   ac_cv_prog_cc_works=no
1713 fi
1714 rm -fr conftest*
1715 ac_ext=c
1716 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1717 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1718 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1719 ac_cpp='$CPP '"$xe_cppflags"
1720 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1721 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1722 cross_compiling=no
1723
1724 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1725 if test $ac_cv_prog_cc_works = no; then
1726   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1727 fi
1728 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1729 echo "configure:1730: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1730 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1731 cross_compiling=$ac_cv_prog_cc_cross
1732
1733 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1734 echo "configure:1735: checking whether we are using GNU C" >&5
1735
1736 cat > conftest.c <<EOF
1737 #ifdef __GNUC__
1738   yes;
1739 #endif
1740 EOF
1741 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1742   ac_cv_prog_gcc=yes
1743 else
1744   ac_cv_prog_gcc=no
1745 fi
1746
1747 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1748
1749 if test $ac_cv_prog_gcc = yes; then
1750   GCC=yes
1751 else
1752   GCC=
1753 fi
1754
1755 ac_test_CFLAGS="${CFLAGS+set}"
1756 ac_save_CFLAGS="$CFLAGS"
1757 CFLAGS=
1758 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1759 echo "configure:1760: checking whether ${CC-cc} accepts -g" >&5
1760
1761 echo 'void f(){}' > conftest.c
1762 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1763   ac_cv_prog_cc_g=yes
1764 else
1765   ac_cv_prog_cc_g=no
1766 fi
1767 rm -f conftest*
1768
1769
1770 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1771 if test "$ac_test_CFLAGS" = set; then
1772   CFLAGS="$ac_save_CFLAGS"
1773 elif test $ac_cv_prog_cc_g = yes; then
1774   if test "$GCC" = yes; then
1775     CFLAGS="-g -O2"
1776   else
1777     CFLAGS="-g"
1778   fi
1779 else
1780   if test "$GCC" = yes; then
1781     CFLAGS="-O2"
1782   else
1783     CFLAGS=
1784   fi
1785 fi
1786  
1787 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1788   CC=${NON_GNU_CC-cc}
1789   # Extract the first word of "gcc", so it can be a program name with args.
1790 set dummy gcc; ac_word=$2
1791 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1792 echo "configure:1793: checking for $ac_word" >&5
1793
1794 if test -n "$CC"; then
1795   ac_cv_prog_CC="$CC" # Let the user override the test.
1796 else
1797   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1798   ac_dummy="$PATH"
1799   for ac_dir in $ac_dummy; do
1800     test -z "$ac_dir" && ac_dir=.
1801     if test -f $ac_dir/$ac_word; then
1802       ac_cv_prog_CC="gcc"
1803       break
1804     fi
1805   done
1806   IFS="$ac_save_ifs"
1807 fi
1808 CC="$ac_cv_prog_CC"
1809 if test -n "$CC"; then
1810   echo "$ac_t""$CC" 1>&6
1811 else
1812   echo "$ac_t""no" 1>&6
1813 fi
1814
1815 if test -z "$CC"; then
1816   # Extract the first word of "cc", so it can be a program name with args.
1817 set dummy cc; ac_word=$2
1818 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1819 echo "configure:1820: checking for $ac_word" >&5
1820
1821 if test -n "$CC"; then
1822   ac_cv_prog_CC="$CC" # Let the user override the test.
1823 else
1824   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1825   ac_prog_rejected=no
1826   ac_dummy="$PATH"
1827   for ac_dir in $ac_dummy; do
1828     test -z "$ac_dir" && ac_dir=.
1829     if test -f $ac_dir/$ac_word; then
1830       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1831         ac_prog_rejected=yes
1832         continue
1833       fi
1834       ac_cv_prog_CC="cc"
1835       break
1836     fi
1837   done
1838   IFS="$ac_save_ifs"
1839 if test $ac_prog_rejected = yes; then
1840   # We found a bogon in the path, so make sure we never use it.
1841   set dummy $ac_cv_prog_CC
1842   shift
1843   if test $# -gt 0; then
1844     # We chose a different compiler from the bogus one.
1845     # However, it has the same basename, so the bogon will be chosen
1846     # first if we set CC to just the basename; use the full file name.
1847     shift
1848     set dummy "$ac_dir/$ac_word" "$@"
1849     shift
1850     ac_cv_prog_CC="$@"
1851   fi
1852 fi
1853 fi
1854 CC="$ac_cv_prog_CC"
1855 if test -n "$CC"; then
1856   echo "$ac_t""$CC" 1>&6
1857 else
1858   echo "$ac_t""no" 1>&6
1859 fi
1860
1861   if test -z "$CC"; then
1862     case "`uname -s`" in
1863     *win32* | *WIN32*)
1864       # Extract the first word of "cl", so it can be a program name with args.
1865 set dummy cl; ac_word=$2
1866 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1867 echo "configure:1868: checking for $ac_word" >&5
1868
1869 if test -n "$CC"; then
1870   ac_cv_prog_CC="$CC" # Let the user override the test.
1871 else
1872   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1873   ac_dummy="$PATH"
1874   for ac_dir in $ac_dummy; do
1875     test -z "$ac_dir" && ac_dir=.
1876     if test -f $ac_dir/$ac_word; then
1877       ac_cv_prog_CC="cl"
1878       break
1879     fi
1880   done
1881   IFS="$ac_save_ifs"
1882 fi
1883 CC="$ac_cv_prog_CC"
1884 if test -n "$CC"; then
1885   echo "$ac_t""$CC" 1>&6
1886 else
1887   echo "$ac_t""no" 1>&6
1888 fi
1889  ;;
1890     esac
1891   fi
1892   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1893 fi
1894
1895 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1896 echo "configure:1897: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1897
1898 ac_ext=c
1899 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1900 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1901 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1902 ac_cpp='$CPP '"$xe_cppflags"
1903 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1904 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1905 cross_compiling=no
1906
1907 cat > conftest.$ac_ext << EOF
1908
1909 #line 1910 "configure"
1910 #include "confdefs.h"
1911
1912 main(){return(0);}
1913 EOF
1914 if { (eval echo configure:1915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1915   ac_cv_prog_cc_works=yes
1916   # If we can't run a trivial program, we are probably using a cross compiler.
1917   if (./conftest; exit) 2>/dev/null; then
1918     ac_cv_prog_cc_cross=no
1919   else
1920     ac_cv_prog_cc_cross=yes
1921   fi
1922 else
1923   echo "configure: failed program was:" >&5
1924   cat conftest.$ac_ext >&5
1925   ac_cv_prog_cc_works=no
1926 fi
1927 rm -fr conftest*
1928 ac_ext=c
1929 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1930 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1931 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1932 ac_cpp='$CPP '"$xe_cppflags"
1933 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1934 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1935 cross_compiling=no
1936
1937 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1938 if test $ac_cv_prog_cc_works = no; then
1939   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1940 fi
1941 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1942 echo "configure:1943: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1943 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1944 cross_compiling=$ac_cv_prog_cc_cross
1945
1946 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1947 echo "configure:1948: checking whether we are using GNU C" >&5
1948
1949 cat > conftest.c <<EOF
1950 #ifdef __GNUC__
1951   yes;
1952 #endif
1953 EOF
1954 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1955   ac_cv_prog_gcc=yes
1956 else
1957   ac_cv_prog_gcc=no
1958 fi
1959
1960 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1961
1962 if test $ac_cv_prog_gcc = yes; then
1963   GCC=yes
1964 else
1965   GCC=
1966 fi
1967
1968 ac_test_CFLAGS="${CFLAGS+set}"
1969 ac_save_CFLAGS="$CFLAGS"
1970 CFLAGS=
1971 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1972 echo "configure:1973: checking whether ${CC-cc} accepts -g" >&5
1973
1974 echo 'void f(){}' > conftest.c
1975 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1976   ac_cv_prog_cc_g=yes
1977 else
1978   ac_cv_prog_cc_g=no
1979 fi
1980 rm -f conftest*
1981
1982
1983 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1984 if test "$ac_test_CFLAGS" = set; then
1985   CFLAGS="$ac_save_CFLAGS"
1986 elif test $ac_cv_prog_cc_g = yes; then
1987   if test "$GCC" = yes; then
1988     CFLAGS="-g -O2"
1989   else
1990     CFLAGS="-g"
1991   fi
1992 else
1993   if test "$GCC" = yes; then
1994     CFLAGS="-O2"
1995   else
1996     CFLAGS=
1997   fi
1998 fi
1999
2000 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2001   CC=gcc
2002   # Extract the first word of "gcc", so it can be a program name with args.
2003 set dummy gcc; ac_word=$2
2004 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2005 echo "configure:2006: checking for $ac_word" >&5
2006
2007 if test -n "$CC"; then
2008   ac_cv_prog_CC="$CC" # Let the user override the test.
2009 else
2010   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2011   ac_dummy="$PATH"
2012   for ac_dir in $ac_dummy; do
2013     test -z "$ac_dir" && ac_dir=.
2014     if test -f $ac_dir/$ac_word; then
2015       ac_cv_prog_CC="gcc"
2016       break
2017     fi
2018   done
2019   IFS="$ac_save_ifs"
2020 fi
2021 CC="$ac_cv_prog_CC"
2022 if test -n "$CC"; then
2023   echo "$ac_t""$CC" 1>&6
2024 else
2025   echo "$ac_t""no" 1>&6
2026 fi
2027
2028 if test -z "$CC"; then
2029   # Extract the first word of "cc", so it can be a program name with args.
2030 set dummy cc; ac_word=$2
2031 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2032 echo "configure:2033: checking for $ac_word" >&5
2033
2034 if test -n "$CC"; then
2035   ac_cv_prog_CC="$CC" # Let the user override the test.
2036 else
2037   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2038   ac_prog_rejected=no
2039   ac_dummy="$PATH"
2040   for ac_dir in $ac_dummy; do
2041     test -z "$ac_dir" && ac_dir=.
2042     if test -f $ac_dir/$ac_word; then
2043       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2044         ac_prog_rejected=yes
2045         continue
2046       fi
2047       ac_cv_prog_CC="cc"
2048       break
2049     fi
2050   done
2051   IFS="$ac_save_ifs"
2052 if test $ac_prog_rejected = yes; then
2053   # We found a bogon in the path, so make sure we never use it.
2054   set dummy $ac_cv_prog_CC
2055   shift
2056   if test $# -gt 0; then
2057     # We chose a different compiler from the bogus one.
2058     # However, it has the same basename, so the bogon will be chosen
2059     # first if we set CC to just the basename; use the full file name.
2060     shift
2061     set dummy "$ac_dir/$ac_word" "$@"
2062     shift
2063     ac_cv_prog_CC="$@"
2064   fi
2065 fi
2066 fi
2067 CC="$ac_cv_prog_CC"
2068 if test -n "$CC"; then
2069   echo "$ac_t""$CC" 1>&6
2070 else
2071   echo "$ac_t""no" 1>&6
2072 fi
2073
2074   if test -z "$CC"; then
2075     case "`uname -s`" in
2076     *win32* | *WIN32*)
2077       # Extract the first word of "cl", so it can be a program name with args.
2078 set dummy cl; ac_word=$2
2079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2080 echo "configure:2081: checking for $ac_word" >&5
2081
2082 if test -n "$CC"; then
2083   ac_cv_prog_CC="$CC" # Let the user override the test.
2084 else
2085   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2086   ac_dummy="$PATH"
2087   for ac_dir in $ac_dummy; do
2088     test -z "$ac_dir" && ac_dir=.
2089     if test -f $ac_dir/$ac_word; then
2090       ac_cv_prog_CC="cl"
2091       break
2092     fi
2093   done
2094   IFS="$ac_save_ifs"
2095 fi
2096 CC="$ac_cv_prog_CC"
2097 if test -n "$CC"; then
2098   echo "$ac_t""$CC" 1>&6
2099 else
2100   echo "$ac_t""no" 1>&6
2101 fi
2102  ;;
2103     esac
2104   fi
2105   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2106 fi
2107
2108 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2109 echo "configure:2110: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2110
2111 ac_ext=c
2112 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2113 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2114 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2115 ac_cpp='$CPP '"$xe_cppflags"
2116 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2117 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2118 cross_compiling=no
2119
2120 cat > conftest.$ac_ext << EOF
2121
2122 #line 2123 "configure"
2123 #include "confdefs.h"
2124
2125 main(){return(0);}
2126 EOF
2127 if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2128   ac_cv_prog_cc_works=yes
2129   # If we can't run a trivial program, we are probably using a cross compiler.
2130   if (./conftest; exit) 2>/dev/null; then
2131     ac_cv_prog_cc_cross=no
2132   else
2133     ac_cv_prog_cc_cross=yes
2134   fi
2135 else
2136   echo "configure: failed program was:" >&5
2137   cat conftest.$ac_ext >&5
2138   ac_cv_prog_cc_works=no
2139 fi
2140 rm -fr conftest*
2141 ac_ext=c
2142 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2143 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2144 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2145 ac_cpp='$CPP '"$xe_cppflags"
2146 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2147 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2148 cross_compiling=no
2149
2150 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2151 if test $ac_cv_prog_cc_works = no; then
2152   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2153 fi
2154 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2155 echo "configure:2156: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2156 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2157 cross_compiling=$ac_cv_prog_cc_cross
2158
2159 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2160 echo "configure:2161: checking whether we are using GNU C" >&5
2161
2162 cat > conftest.c <<EOF
2163 #ifdef __GNUC__
2164   yes;
2165 #endif
2166 EOF
2167 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2168   ac_cv_prog_gcc=yes
2169 else
2170   ac_cv_prog_gcc=no
2171 fi
2172
2173 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2174
2175 if test $ac_cv_prog_gcc = yes; then
2176   GCC=yes
2177 else
2178   GCC=
2179 fi
2180
2181 ac_test_CFLAGS="${CFLAGS+set}"
2182 ac_save_CFLAGS="$CFLAGS"
2183 CFLAGS=
2184 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2185 echo "configure:2186: checking whether ${CC-cc} accepts -g" >&5
2186
2187 echo 'void f(){}' > conftest.c
2188 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2189   ac_cv_prog_cc_g=yes
2190 else
2191   ac_cv_prog_cc_g=no
2192 fi
2193 rm -f conftest*
2194
2195
2196 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2197 if test "$ac_test_CFLAGS" = set; then
2198   CFLAGS="$ac_save_CFLAGS"
2199 elif test $ac_cv_prog_cc_g = yes; then
2200   if test "$GCC" = yes; then
2201     CFLAGS="-g -O2"
2202   else
2203     CFLAGS="-g"
2204   fi
2205 else
2206   if test "$GCC" = yes; then
2207     CFLAGS="-O2"
2208   else
2209     CFLAGS=
2210   fi
2211 fi
2212
2213 fi
2214 CFLAGS="$xe_save_CFLAGS"
2215
2216
2217 test -n "$CPP" -a -d "$CPP" && CPP=
2218
2219 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2220
2221 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2222 echo "configure:2223: checking how to run the C preprocessor" >&5
2223 # On Suns, sometimes $CPP names a directory.
2224 if test -n "$CPP" && test -d "$CPP"; then
2225   CPP=
2226 fi
2227 if test -z "$CPP"; then
2228
2229   # This must be in double quotes, not single quotes, because CPP may get
2230   # substituted into the Makefile and "${CC-cc}" will confuse make.
2231   CPP="${CC-cc} -E"
2232   # On the NeXT, cc -E runs the code through the compiler's parser,
2233   # not just through cpp.
2234   cat > conftest.$ac_ext <<EOF
2235 #line 2236 "configure"
2236 #include "confdefs.h"
2237 #include <assert.h>
2238 Syntax Error
2239 EOF
2240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2241 { (eval echo configure:2242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2243 if test -z "$ac_err"; then
2244   :
2245 else
2246   echo "$ac_err" >&5
2247   echo "configure: failed program was:" >&5
2248   cat conftest.$ac_ext >&5
2249   rm -rf conftest*
2250   CPP="${CC-cc} -E -traditional-cpp"
2251   cat > conftest.$ac_ext <<EOF
2252 #line 2253 "configure"
2253 #include "confdefs.h"
2254 #include <assert.h>
2255 Syntax Error
2256 EOF
2257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2258 { (eval echo configure:2259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2260 if test -z "$ac_err"; then
2261   :
2262 else
2263   echo "$ac_err" >&5
2264   echo "configure: failed program was:" >&5
2265   cat conftest.$ac_ext >&5
2266   rm -rf conftest*
2267   CPP="${CC-cc} -nologo -E"
2268   cat > conftest.$ac_ext <<EOF
2269 #line 2270 "configure"
2270 #include "confdefs.h"
2271 #include <assert.h>
2272 Syntax Error
2273 EOF
2274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2275 { (eval echo configure:2276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2277 if test -z "$ac_err"; then
2278   :
2279 else
2280   echo "$ac_err" >&5
2281   echo "configure: failed program was:" >&5
2282   cat conftest.$ac_ext >&5
2283   rm -rf conftest*
2284   CPP=/lib/cpp
2285 fi
2286 rm -f conftest*
2287 fi
2288 rm -f conftest*
2289 fi
2290 rm -f conftest*
2291   ac_cv_prog_CPP="$CPP"
2292   CPP="$ac_cv_prog_CPP"
2293 else
2294   ac_cv_prog_CPP="$CPP"
2295 fi
2296 echo "$ac_t""$CPP" 1>&6
2297
2298
2299
2300
2301 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2302 echo "configure:2303: checking for AIX" >&5
2303 cat > conftest.$ac_ext <<EOF
2304 #line 2305 "configure"
2305 #include "confdefs.h"
2306 #ifdef _AIX
2307   yes
2308 #endif
2309
2310 EOF
2311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2312   egrep "yes" >/dev/null 2>&1; then
2313   rm -rf conftest*
2314   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2315     Defining _ALL_SOURCE
2316 EOF
2317 cat >> confdefs.h <<\EOF
2318 #define _ALL_SOURCE 1
2319 EOF
2320 }
2321
2322 else
2323   rm -rf conftest*
2324   echo "$ac_t""no" 1>&6
2325 fi
2326 rm -f conftest*
2327
2328  
2329 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2330 echo "configure:2331: checking for GNU libc" >&5
2331 cat > conftest.$ac_ext <<EOF
2332 #line 2333 "configure"
2333 #include "confdefs.h"
2334 #include <features.h>
2335 int main() {
2336
2337 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2338 #error Not a GNU libc system :-(
2339 ******* ======= ******** &&&&&&&&
2340 #endif
2341
2342 ; return 0; }
2343 EOF
2344 if { (eval echo configure:2345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2345   rm -rf conftest*
2346   have_glibc=yes
2347 else
2348   echo "configure: failed program was:" >&5
2349   cat conftest.$ac_ext >&5
2350   rm -rf conftest*
2351   have_glibc=no
2352 fi
2353 rm -f conftest*
2354 echo "$ac_t""$have_glibc" 1>&6
2355 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2356     Defining _GNU_SOURCE
2357 EOF
2358 cat >> confdefs.h <<\EOF
2359 #define _GNU_SOURCE 1
2360 EOF
2361 }
2362
2363
2364 case "$opsys" in
2365   sol2) 
2366    { test "$extra_verbose" = "yes" && cat << \EOF
2367     Defining __EXTENSIONS__
2368 EOF
2369 cat >> confdefs.h <<\EOF
2370 #define __EXTENSIONS__ 1
2371 EOF
2372 }
2373
2374       if test "$os_release" -ge 55; then
2375      { test "$extra_verbose" = "yes" && cat << \EOF
2376     Defining _XOPEN_SOURCE = 500
2377 EOF
2378 cat >> confdefs.h <<\EOF
2379 #define _XOPEN_SOURCE 500
2380 EOF
2381 }
2382
2383      { test "$extra_verbose" = "yes" && cat << \EOF
2384     Defining _XOPEN_SOURCE_EXTENDED
2385 EOF
2386 cat >> confdefs.h <<\EOF
2387 #define _XOPEN_SOURCE_EXTENDED 1
2388 EOF
2389 }
2390
2391    fi ;;
2392   linux)
2393     { test "$extra_verbose" = "yes" && cat << \EOF
2394     Defining _POSIX_C_SOURCE = 199506L
2395 EOF
2396 cat >> confdefs.h <<\EOF
2397 #define _POSIX_C_SOURCE 199506L
2398 EOF
2399 }
2400
2401     { test "$extra_verbose" = "yes" && cat << \EOF
2402     Defining _XOPEN_SOURCE = 500
2403 EOF
2404 cat >> confdefs.h <<\EOF
2405 #define _XOPEN_SOURCE 500
2406 EOF
2407 }
2408
2409     { test "$extra_verbose" = "yes" && cat << \EOF
2410     Defining _XOPEN_SOURCE_EXTENDED
2411 EOF
2412 cat >> confdefs.h <<\EOF
2413 #define _XOPEN_SOURCE_EXTENDED 1
2414 EOF
2415 }
2416
2417     ;;
2418 esac
2419
2420 cat > conftest.$ac_ext <<EOF
2421 #line 2422 "configure"
2422 #include "confdefs.h"
2423 int main () {
2424 #if defined __SUNPRO_C
2425 return 11;
2426 #elif defined __DECC
2427 return 12;
2428 #else
2429 return 0;
2430 #endif
2431 }
2432 EOF
2433 if { (eval echo configure:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2434 then
2435   :
2436 else
2437   conftest_rc="$?"
2438   echo "configure: failed program was:" >&5
2439   cat conftest.$ac_ext >&5
2440   rm -fr conftest*
2441   case "$conftest_rc" in
2442   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2443   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2444 esac
2445 fi
2446 rm -fr conftest*
2447
2448
2449
2450
2451 echo "Extracting information from the machine- and system-dependent headers..."
2452
2453 tempcname="conftest.c"
2454
2455
2456
2457 cat > $tempcname <<EOF
2458 #define NOT_C_CODE
2459 #define C_SWITCH_SITE
2460 #define C_SWITCH_X_SITE
2461 #define LD_SWITCH_SITE
2462 #define LD_SWITCH_X_SITE
2463 #define LD_SWITCH_X_SITE_AUX
2464 #define OS_RELEASE $os_release
2465 #include "$srcdir/src/$opsysfile"
2466 #include "$srcdir/src/$machfile"
2467
2468 #ifndef LIBS_MACHINE
2469 #define LIBS_MACHINE
2470 #endif
2471 configure___ libs_machine=LIBS_MACHINE
2472
2473 #ifndef LIBS_SYSTEM
2474 #define LIBS_SYSTEM
2475 #endif
2476 configure___ libs_system=LIBS_SYSTEM
2477
2478 #ifndef LIBS_TERMCAP
2479 #define LIBS_TERMCAP
2480 #endif
2481 configure___ libs_termcap=LIBS_TERMCAP
2482
2483 #ifndef LIB_STANDARD
2484 #define LIB_STANDARD
2485 #endif
2486 configure___ libs_standard=LIB_STANDARD
2487
2488
2489 #ifndef OBJECTS_MACHINE
2490 #define OBJECTS_MACHINE
2491 #endif
2492 configure___ objects_machine=OBJECTS_MACHINE
2493
2494 #ifndef OBJECTS_SYSTEM
2495 #define OBJECTS_SYSTEM
2496 #endif
2497 configure___ objects_system=OBJECTS_SYSTEM
2498
2499
2500 #ifndef C_SWITCH_MACHINE
2501 #define C_SWITCH_MACHINE
2502 #endif
2503 configure___ c_switch_machine=C_SWITCH_MACHINE
2504
2505 #ifndef C_SWITCH_SYSTEM
2506 #define C_SWITCH_SYSTEM
2507 #endif
2508 configure___ c_switch_system=C_SWITCH_SYSTEM
2509
2510
2511 #ifndef LD_SWITCH_MACHINE
2512 #define LD_SWITCH_MACHINE
2513 #endif
2514 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2515
2516 #ifndef LD_SWITCH_SYSTEM
2517 #define LD_SWITCH_SYSTEM
2518 #endif
2519 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2520
2521
2522 #ifndef UNEXEC
2523 #define UNEXEC "unexec.o"
2524 #endif
2525 configure___ unexec=UNEXEC
2526
2527
2528 #ifndef LD_SWITCH_SHARED
2529 #define LD_SWITCH_SHARED "-c"
2530 #endif
2531 configure___ ld_switch_shared=LD_SWITCH_SHARED
2532
2533
2534 #ifdef ORDINARY_LINK
2535 #define LD "\$(CC) \$(CFLAGS)"
2536 #else /* no ORDINARY LINK */
2537 #ifdef COFF_ENCAPSULATE
2538 #define LD "\$(CC) -nostdlib"
2539 #else /* not COFF_ENCAPSULATE */
2540 #ifdef LINKER
2541 #define LD LINKER
2542 #else /* ! defined (LINKER) */
2543 #define LD "ld"
2544 #endif /* ! defined (LINKER) */
2545 #endif /* ! defined (COFF_ENCAPSULATE) */
2546 #endif /* not ORDINARY_LINK */
2547 configure___ ld=LD
2548
2549 #ifndef LIB_GCC
2550 #define LIB_GCC
2551 #endif
2552 configure___ lib_gcc=LIB_GCC
2553
2554 #ifndef LD_TEXT_START_ADDR
2555 #define LD_TEXT_START_ADDR
2556 #endif
2557 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2558
2559
2560 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2561 #ifdef NO_REMAP
2562 #ifdef COFF_ENCAPSULATE
2563 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2564 #else /* ! defined (COFF_ENCAPSULATE) */
2565 #define START_FILES "pre-crt0.o /lib/crt0.o"
2566 #endif /* ! defined (COFF_ENCAPSULATE) */
2567 #else /* ! defined (NO_REMAP) */
2568 #define START_FILES "ecrt0.o"
2569 #endif /* ! defined (NO_REMAP) */
2570 #endif /* no ORDINARY_LINK */
2571 #ifndef START_FILES
2572 #define START_FILES
2573 #endif
2574 configure___ start_files=START_FILES
2575
2576 #ifdef ORDINARY_LINK
2577 configure___ ordinary_link=yes
2578 #else
2579 configure___ ordinary_link=no
2580 #endif
2581
2582 #ifdef SYSTEM_MALLOC
2583 configure___ system_malloc=yes
2584 #else
2585 configure___ system_malloc=no
2586 #endif
2587
2588 #ifdef TERMINFO
2589 configure___ have_terminfo=yes
2590 #else
2591 configure___ have_terminfo=no
2592 #endif
2593
2594 #ifdef MAIL_USE_FLOCK
2595 configure___ mail_use_flock=yes
2596 #else
2597 configure___ mail_use_flock=no
2598 #endif
2599
2600 #ifdef MAIL_USE_LOCKF
2601 configure___ mail_use_lockf=yes
2602 #else
2603 configure___ mail_use_lockf=no
2604 #endif
2605
2606 #ifdef MAIL_USE_LOCKING
2607 configure___ mail_use_locking=yes
2608 #else
2609 configure___ mail_use_locking=no
2610 #endif
2611
2612 #ifdef HAVE_WIN32_PROCESSES
2613 configure___ win32_processes=yes
2614 #else
2615 configure___ win32_processes=no
2616 #endif
2617
2618 EOF
2619
2620 CPP=`eval "echo $CPP $CPPFLAGS"`
2621 eval `$CPP -Isrc $tempcname \
2622         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2623
2624 rm $tempcname
2625
2626 test "$extra_verbose" = "yes" && \
2627   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 ""
2628
2629 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2630         mingw_include=`eval "dirname $mingw_include"` ;
2631         mingw_include="-I$mingw_include/../include/mingw32" ;
2632         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2633 esac
2634
2635 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2636
2637 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2638
2639 if test "$cflags_specified" = "no"; then
2640       if   test "$GCC" = "yes"; then
2641     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2642               elif test "$__SUNPRO_C" = "yes"; then
2643     case "$opsys" in
2644       sol2    ) CFLAGS="-v -xO4" ;;
2645       sunos4* ) CFLAGS="-xO2";;
2646     esac
2647   elif test "$__DECC" = "yes"; then
2648     CFLAGS="-O3"
2649   elif test "$CC" = "xlc"; then
2650     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2651     else
2652     CFLAGS="-O" ;  fi
2653 fi
2654
2655
2656 if test "$GCC" = "yes"; then
2657   set x $ld_switch_system; shift; ld_switch_system=""
2658   while test -n "$1"; do
2659     case $1 in
2660       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2661       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2662       -Xlinker* ) ;;
2663       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2664     esac
2665     shift
2666   done
2667 fi
2668
2669 if test "$GCC" = "yes"; then
2670   set x $ld_switch_machine; shift; ld_switch_machine=""
2671   while test -n "$1"; do
2672     case $1 in
2673       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2674       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2675       -Xlinker* ) ;;
2676       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2677     esac
2678     shift
2679   done
2680 fi
2681
2682 if test "$GCC" = "yes"; then
2683   set x $LDFLAGS; shift; LDFLAGS=""
2684   while test -n "$1"; do
2685     case $1 in
2686       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2687       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2688       -Xlinker* ) ;;
2689       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2690     esac
2691     shift
2692   done
2693 fi
2694
2695 if test "$GCC" = "yes"; then
2696   set x $ld_call_shared; shift; ld_call_shared=""
2697   while test -n "$1"; do
2698     case $1 in
2699       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2700       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2701       -Xlinker* ) ;;
2702       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2703     esac
2704     shift
2705   done
2706 fi
2707
2708 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2709    echo "    xemacs will be linked with \"$objects_machine\""
2710  fi
2711 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2712    echo "    xemacs will be linked with \"$objects_system\""
2713  fi
2714 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2715    echo "    xemacs will be linked with \"$unexec\""
2716  fi
2717
2718 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2719 echo "configure:2720: checking for dynodump" >&5
2720 if test "$unexec" != "unexsol2.o"; then
2721   echo "$ac_t""no" 1>&6
2722 else
2723   echo "$ac_t""yes" 1>&6
2724   { test "$extra_verbose" = "yes" && cat << \EOF
2725     Defining DYNODUMP
2726 EOF
2727 cat >> confdefs.h <<\EOF
2728 #define DYNODUMP 1
2729 EOF
2730 }
2731
2732   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2733   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2734   case "$machine" in
2735     sparc   ) dynodump_arch=sparc ;;
2736     *86*    ) dynodump_arch=i386  ;;
2737     powerpc ) dynodump_arch=ppc   ;;
2738   esac
2739     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
2740 fi
2741
2742
2743 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2744
2745 if test "$unexec" = "unexaix.o"; then
2746   if   test "$dynamic" = "no"; then
2747   start_flags="-Wl,-bnso,-bnodelcsect"
2748   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2749   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2750     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2751   done
2752   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2753     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2754   done
2755   
2756 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2757 echo "configure:2758: checking for terminateAndUnload in -lC" >&5
2758 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2759
2760 xe_check_libs=" -lC "
2761 cat > conftest.$ac_ext <<EOF
2762 #line 2763 "configure"
2763 #include "confdefs.h"
2764 /* Override any gcc2 internal prototype to avoid an error.  */
2765 /* We use char because int might match the return type of a gcc2
2766     builtin and then its argument prototype would still apply.  */
2767 char terminateAndUnload();
2768
2769 int main() {
2770 terminateAndUnload()
2771 ; return 0; }
2772 EOF
2773 if { (eval echo configure:2774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2774   rm -rf conftest*
2775   eval "ac_cv_lib_$ac_lib_var=yes"
2776 else
2777   echo "configure: failed program was:" >&5
2778   cat conftest.$ac_ext >&5
2779   rm -rf conftest*
2780   eval "ac_cv_lib_$ac_lib_var=no"
2781 fi
2782 rm -f conftest*
2783 xe_check_libs=""
2784
2785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2786   echo "$ac_t""yes" 1>&6
2787   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2788 else
2789   echo "$ac_t""no" 1>&6
2790 fi
2791
2792
2793   fi
2794 elif test -n "$ld_text_start_addr"; then
2795   start_flags="-T $ld_text_start_addr -e __start"
2796 fi
2797
2798
2799
2800
2801 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2802  test -z "$linker" &&  linker='$(CC) -nostdlib'
2803  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2804 fi
2805 test "$GCC" != "yes" && lib_gcc=
2806
2807
2808
2809
2810
2811 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2812 if test -n "$site_libraries"; then
2813   for arg in $site_libraries; do
2814     case "$arg" in
2815      -* ) ;;
2816      * ) test -d "$arg" || \
2817            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2818        arg="-L${arg}" ;;
2819     esac
2820     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2821   done
2822 fi
2823
2824 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2825 if test -n "$site_includes"; then
2826   for arg in $site_includes; do
2827     case "$arg" in
2828       -* ) ;;
2829       * ) test -d "$arg" || \
2830            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2831       arg="-I${arg}" ;;
2832     esac
2833     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2834   done
2835 fi
2836
2837 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2838 if test -n "$site_prefixes"; then
2839   for dir in $site_prefixes; do
2840     lib_dir="${dir}/lib"
2841     inc_dir="${dir}/include"
2842     if test ! -d "$dir"; then
2843       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2844     elif test ! -d "$lib_dir"; then
2845       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2846     else
2847       if test -d "$inc_dir"; then
2848         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
2849       fi
2850       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
2851     fi
2852   done
2853 fi
2854
2855
2856 for dir in "/usr/ccs/lib"; do
2857   test -d "$dir" && ld_switch_system="$ld_switch_system -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_system"; fi
2858 done
2859
2860 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2861 if test -n "$site_runtime_libraries"; then
2862   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2863   export LD_RUN_PATH
2864 fi
2865
2866
2867
2868
2869
2870 if test -n "$add_runtime_path"; then :;
2871 elif test "$dynamic" = "no"; then add_runtime_path=no
2872 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2873 else case "$opsys" in
2874        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2875        * ) add_runtime_path=no ;;
2876      esac
2877 fi
2878
2879 if test "$add_runtime_path" = "yes"; then
2880       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2881 echo "configure:2882: checking "for runtime libraries flag"" >&5
2882   case "$opsys" in
2883     sol2 ) dash_r="-R" ;;
2884     decosf* | linux* | irix*) dash_r="-rpath " ;;
2885     *)
2886       dash_r=""
2887       for try_dash_r in "-R" "-R " "-rpath "; do
2888         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2889         
2890 if test "$GCC" = "yes"; then
2891   set x $xe_check_libs; shift; xe_check_libs=""
2892   while test -n "$1"; do
2893     case $1 in
2894       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2895       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2896       -Xlinker* ) ;;
2897       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2898     esac
2899     shift
2900   done
2901 fi
2902         cat > conftest.$ac_ext <<EOF
2903 #line 2904 "configure"
2904 #include "confdefs.h"
2905
2906 int main() {
2907
2908 ; return 0; }
2909 EOF
2910 if { (eval echo configure:2911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2911   rm -rf conftest*
2912   dash_r="$try_dash_r"
2913 else
2914   echo "configure: failed program was:" >&5
2915   cat conftest.$ac_ext >&5
2916 fi
2917 rm -f conftest*
2918         xe_check_libs=""
2919         test -n "$dash_r" && break
2920       done ;;
2921   esac
2922   if test -n "$dash_r";
2923     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2924     else echo "$ac_t""NONE" 1>&6
2925   fi
2926 fi
2927
2928 xe_add_unique_runpath_dir='
2929   xe_add_p=yes
2930   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2931   done
2932   if test "$xe_add_p" = "yes"; then
2933     test -n "$runpath" && runpath="${runpath}:"
2934     runpath="${runpath}${xe_runpath_dir}"
2935     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2936   fi'
2937
2938
2939
2940
2941 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2942     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2943   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2944   
2945         runpath="" runpath_dirs=""
2946   if test -n "$LD_RUN_PATH"; then
2947     runpath="$LD_RUN_PATH"
2948   elif test "$GCC" = "yes"; then
2949         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2950     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2951     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2952     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2953       case "$arg" in P,* | -L* | -R* )
2954         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2955           {
2956 xe_runpath_dir="$dir"
2957   test "$xe_runpath_dir" != "/lib"     -a \
2958         "$xe_runpath_dir" != "/usr/lib" -a \
2959         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2960   eval "$xe_add_unique_runpath_dir"
2961 }
2962         done ;;
2963       esac
2964     done
2965     ld_switch_run="$ld_switch_run_save"
2966     rm -f conftest*
2967   else
2968         for arg in $ld_switch_site $ld_switch_x_site; do
2969       case "$arg" in -L*) {
2970 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2971   test "$xe_runpath_dir" != "/lib"     -a \
2972         "$xe_runpath_dir" != "/usr/lib" -a \
2973         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2974   eval "$xe_add_unique_runpath_dir"
2975 };; esac
2976     done
2977         if test "$opsys $need_motif" = "sol2 yes"; then
2978       xe_runpath_dir="/opt/SUNWdt/lib";
2979       eval "$xe_add_unique_runpath_dir";
2980     fi
2981   fi 
2982   if test -n "$runpath"; then
2983     ld_switch_run="${dash_r}${runpath}"
2984     
2985 if test "$GCC" = "yes"; then
2986   set x $ld_switch_run; shift; ld_switch_run=""
2987   while test -n "$1"; do
2988     case $1 in
2989       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2990       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2991       -Xlinker* ) ;;
2992       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2993     esac
2994     shift
2995   done
2996 fi
2997     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2998   fi
2999 fi
3000
3001
3002
3003
3004 GNU_MALLOC=yes
3005 if test "$with_dlmalloc" != "no"; then
3006         doug_lea_malloc=yes
3007 else
3008         doug_lea_malloc=no
3009 fi
3010 after_morecore_hook_exists=yes
3011 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3012 echo "configure:3013: checking for malloc_get_state" >&5
3013
3014 cat > conftest.$ac_ext <<EOF
3015 #line 3016 "configure"
3016 #include "confdefs.h"
3017 /* System header to define __stub macros and hopefully few prototypes,
3018     which can conflict with char malloc_get_state(); below.  */
3019 #include <assert.h>
3020 /* Override any gcc2 internal prototype to avoid an error.  */
3021 /* We use char because int might match the return type of a gcc2
3022     builtin and then its argument prototype would still apply.  */
3023 char malloc_get_state();
3024
3025 int main() {
3026
3027 /* The GNU C library defines this for functions which it implements
3028     to always fail with ENOSYS.  Some functions are actually named
3029     something starting with __ and the normal name is an alias.  */
3030 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3031 choke me
3032 #else
3033 malloc_get_state();
3034 #endif
3035
3036 ; return 0; }
3037 EOF
3038 if { (eval echo configure:3039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3039   rm -rf conftest*
3040   eval "ac_cv_func_malloc_get_state=yes"
3041 else
3042   echo "configure: failed program was:" >&5
3043   cat conftest.$ac_ext >&5
3044   rm -rf conftest*
3045   eval "ac_cv_func_malloc_get_state=no"
3046 fi
3047 rm -f conftest*
3048
3049 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3050   echo "$ac_t""yes" 1>&6
3051   :
3052 else
3053   echo "$ac_t""no" 1>&6
3054 doug_lea_malloc=no
3055 fi
3056
3057 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3058 echo "configure:3059: checking for malloc_set_state" >&5
3059
3060 cat > conftest.$ac_ext <<EOF
3061 #line 3062 "configure"
3062 #include "confdefs.h"
3063 /* System header to define __stub macros and hopefully few prototypes,
3064     which can conflict with char malloc_set_state(); below.  */
3065 #include <assert.h>
3066 /* Override any gcc2 internal prototype to avoid an error.  */
3067 /* We use char because int might match the return type of a gcc2
3068     builtin and then its argument prototype would still apply.  */
3069 char malloc_set_state();
3070
3071 int main() {
3072
3073 /* The GNU C library defines this for functions which it implements
3074     to always fail with ENOSYS.  Some functions are actually named
3075     something starting with __ and the normal name is an alias.  */
3076 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3077 choke me
3078 #else
3079 malloc_set_state();
3080 #endif
3081
3082 ; return 0; }
3083 EOF
3084 if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3085   rm -rf conftest*
3086   eval "ac_cv_func_malloc_set_state=yes"
3087 else
3088   echo "configure: failed program was:" >&5
3089   cat conftest.$ac_ext >&5
3090   rm -rf conftest*
3091   eval "ac_cv_func_malloc_set_state=no"
3092 fi
3093 rm -f conftest*
3094
3095 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3096   echo "$ac_t""yes" 1>&6
3097   :
3098 else
3099   echo "$ac_t""no" 1>&6
3100 doug_lea_malloc=no
3101 fi
3102
3103 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3104 echo "configure:3105: checking whether __after_morecore_hook exists" >&5
3105 cat > conftest.$ac_ext <<EOF
3106 #line 3107 "configure"
3107 #include "confdefs.h"
3108 extern void (* __after_morecore_hook)();
3109 int main() {
3110 __after_morecore_hook = 0
3111 ; return 0; }
3112 EOF
3113 if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3114   rm -rf conftest*
3115   echo "$ac_t""yes" 1>&6
3116 else
3117   echo "configure: failed program was:" >&5
3118   cat conftest.$ac_ext >&5
3119   rm -rf conftest*
3120   echo "$ac_t""no" 1>&6
3121    after_morecore_hook_exists=no
3122 fi
3123 rm -f conftest*
3124 if test "$system_malloc" = "yes" ; then
3125   GNU_MALLOC=no
3126   GNU_MALLOC_reason="
3127   (The GNU allocators don't work with this system configuration)."
3128 elif test "$with_system_malloc" = "yes" ; then
3129   GNU_MALLOC=no
3130   GNU_MALLOC_reason="
3131   (User chose not to use GNU allocators)."
3132 elif test "$with_debug_malloc" = "yes" ; then
3133   GNU_MALLOC=no
3134   GNU_MALLOC_reason="
3135   (User chose to use Debugging Malloc)."
3136 fi
3137
3138 if test "$doug_lea_malloc" = "yes" ; then
3139   if test "$GNU_MALLOC" = yes ; then
3140     GNU_MALLOC_reason="
3141   (Using Doug Lea's new malloc from the GNU C Library.)"
3142   fi
3143   { test "$extra_verbose" = "yes" && cat << \EOF
3144     Defining DOUG_LEA_MALLOC
3145 EOF
3146 cat >> confdefs.h <<\EOF
3147 #define DOUG_LEA_MALLOC 1
3148 EOF
3149 }
3150
3151   if test "$after_morecore_hook_exists" = "no" ; then
3152     GNU_MALLOC_reason="
3153   (Using Doug Lea's new malloc from the Linux C Library.)"
3154     { test "$extra_verbose" = "yes" && cat << \EOF
3155     Defining _NO_MALLOC_WARNING_
3156 EOF
3157 cat >> confdefs.h <<\EOF
3158 #define _NO_MALLOC_WARNING_ 1
3159 EOF
3160 }
3161
3162   fi
3163   use_minimal_tagbits=yes
3164 fi
3165
3166
3167
3168
3169 # Extract the first word of "ranlib", so it can be a program name with args.
3170 set dummy ranlib; ac_word=$2
3171 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172 echo "configure:3173: checking for $ac_word" >&5
3173
3174 if test -n "$RANLIB"; then
3175   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3176 else
3177   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3178   ac_dummy="$PATH"
3179   for ac_dir in $ac_dummy; do
3180     test -z "$ac_dir" && ac_dir=.
3181     if test -f $ac_dir/$ac_word; then
3182       ac_cv_prog_RANLIB="ranlib"
3183       break
3184     fi
3185   done
3186   IFS="$ac_save_ifs"
3187   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3188 fi
3189 RANLIB="$ac_cv_prog_RANLIB"
3190 if test -n "$RANLIB"; then
3191   echo "$ac_t""$RANLIB" 1>&6
3192 else
3193   echo "$ac_t""no" 1>&6
3194 fi
3195
3196 ac_aux_dir=
3197 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3198   if test -f $ac_dir/install-sh; then
3199     ac_aux_dir=$ac_dir
3200     ac_install_sh="$ac_aux_dir/install-sh -c"
3201     break
3202   elif test -f $ac_dir/install.sh; then
3203     ac_aux_dir=$ac_dir
3204     ac_install_sh="$ac_aux_dir/install.sh -c"
3205     break
3206   fi
3207 done
3208 if test -z "$ac_aux_dir"; then
3209   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3210 fi
3211 ac_config_guess=$ac_aux_dir/config.guess
3212 ac_config_sub=$ac_aux_dir/config.sub
3213 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3214
3215 # Find a good install program.  We prefer a C program (faster),
3216 # so one script is as good as another.  But avoid the broken or
3217 # incompatible versions:
3218 # SysV /etc/install, /usr/sbin/install
3219 # SunOS /usr/etc/install
3220 # IRIX /sbin/install
3221 # AIX /bin/install
3222 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3223 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3224 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3225 # ./install, which can be erroneously created by make from ./install.sh.
3226 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3227 echo "configure:3228: checking for a BSD compatible install" >&5
3228 if test -z "$INSTALL"; then
3229
3230   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3231   for ac_dir in $PATH; do
3232     # Account for people who put trailing slashes in PATH elements.
3233     case "$ac_dir/" in
3234     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3235     *)
3236       # OSF1 and SCO ODT 3.0 have their own names for install.
3237       # Don't use installbsd from OSF since it installs stuff as root
3238       # by default.
3239       for ac_prog in ginstall scoinst install; do
3240         if test -f $ac_dir/$ac_prog; then
3241           if test $ac_prog = install &&
3242             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3243             # AIX install.  It has an incompatible calling convention.
3244             :
3245           else
3246             ac_cv_path_install="$ac_dir/$ac_prog -c"
3247             break 2
3248           fi
3249         fi
3250       done
3251       ;;
3252     esac
3253   done
3254   IFS="$ac_save_IFS"
3255
3256   if test "${ac_cv_path_install+set}" = set; then
3257     INSTALL="$ac_cv_path_install"
3258   else
3259     # As a last resort, use the slow shell script.  We don't cache a
3260     # path for INSTALL within a source directory, because that will
3261     # break other packages using the cache if that directory is
3262     # removed, or if the path is relative.
3263     INSTALL="$ac_install_sh"
3264   fi
3265 fi
3266 echo "$ac_t""$INSTALL" 1>&6
3267
3268 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3269 # It thinks the first close brace ends the variable substitution.
3270 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3271
3272 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3273
3274 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3275
3276 for ac_prog in 'bison -y' byacc
3277 do
3278 # Extract the first word of "$ac_prog", so it can be a program name with args.
3279 set dummy $ac_prog; ac_word=$2
3280 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3281 echo "configure:3282: checking for $ac_word" >&5
3282
3283 if test -n "$YACC"; then
3284   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3285 else
3286   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3287   ac_dummy="$PATH"
3288   for ac_dir in $ac_dummy; do
3289     test -z "$ac_dir" && ac_dir=.
3290     if test -f $ac_dir/$ac_word; then
3291       ac_cv_prog_YACC="$ac_prog"
3292       break
3293     fi
3294   done
3295   IFS="$ac_save_ifs"
3296 fi
3297 YACC="$ac_cv_prog_YACC"
3298 if test -n "$YACC"; then
3299   echo "$ac_t""$YACC" 1>&6
3300 else
3301   echo "$ac_t""no" 1>&6
3302 fi
3303
3304 test -n "$YACC" && break
3305 done
3306 test -n "$YACC" || YACC="yacc"
3307
3308
3309 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3310 do
3311 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3312 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3313 echo "configure:3314: checking for $ac_hdr" >&5
3314
3315 cat > conftest.$ac_ext <<EOF
3316 #line 3317 "configure"
3317 #include "confdefs.h"
3318 #include <$ac_hdr>
3319 EOF
3320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3321 { (eval echo configure:3322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3323 if test -z "$ac_err"; then
3324   rm -rf conftest*
3325   eval "ac_cv_header_$ac_safe=yes"
3326 else
3327   echo "$ac_err" >&5
3328   echo "configure: failed program was:" >&5
3329   cat conftest.$ac_ext >&5
3330   rm -rf conftest*
3331   eval "ac_cv_header_$ac_safe=no"
3332 fi
3333 rm -f conftest*
3334 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3335   echo "$ac_t""yes" 1>&6
3336     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3337   { test "$extra_verbose" = "yes" && cat << EOF
3338     Defining $ac_tr_hdr
3339 EOF
3340 cat >> confdefs.h <<EOF
3341 #define $ac_tr_hdr 1
3342 EOF
3343 }
3344  
3345 else
3346   echo "$ac_t""no" 1>&6
3347 fi
3348 done
3349
3350 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3351 do
3352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3354 echo "configure:3355: checking for $ac_hdr" >&5
3355
3356 cat > conftest.$ac_ext <<EOF
3357 #line 3358 "configure"
3358 #include "confdefs.h"
3359 #include <$ac_hdr>
3360 EOF
3361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3362 { (eval echo configure:3363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3364 if test -z "$ac_err"; then
3365   rm -rf conftest*
3366   eval "ac_cv_header_$ac_safe=yes"
3367 else
3368   echo "$ac_err" >&5
3369   echo "configure: failed program was:" >&5
3370   cat conftest.$ac_ext >&5
3371   rm -rf conftest*
3372   eval "ac_cv_header_$ac_safe=no"
3373 fi
3374 rm -f conftest*
3375 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3376   echo "$ac_t""yes" 1>&6
3377     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3378   { test "$extra_verbose" = "yes" && cat << EOF
3379     Defining $ac_tr_hdr
3380 EOF
3381 cat >> confdefs.h <<EOF
3382 #define $ac_tr_hdr 1
3383 EOF
3384 }
3385  
3386 else
3387   echo "$ac_t""no" 1>&6
3388 fi
3389 done
3390
3391 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3392 do
3393 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3394 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3395 echo "configure:3396: checking for $ac_hdr" >&5
3396
3397 cat > conftest.$ac_ext <<EOF
3398 #line 3399 "configure"
3399 #include "confdefs.h"
3400 #include <$ac_hdr>
3401 EOF
3402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3403 { (eval echo configure:3404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3405 if test -z "$ac_err"; then
3406   rm -rf conftest*
3407   eval "ac_cv_header_$ac_safe=yes"
3408 else
3409   echo "$ac_err" >&5
3410   echo "configure: failed program was:" >&5
3411   cat conftest.$ac_ext >&5
3412   rm -rf conftest*
3413   eval "ac_cv_header_$ac_safe=no"
3414 fi
3415 rm -f conftest*
3416 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3417   echo "$ac_t""yes" 1>&6
3418     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3419   { test "$extra_verbose" = "yes" && cat << EOF
3420     Defining $ac_tr_hdr
3421 EOF
3422 cat >> confdefs.h <<EOF
3423 #define $ac_tr_hdr 1
3424 EOF
3425 }
3426  
3427 else
3428   echo "$ac_t""no" 1>&6
3429 fi
3430 done
3431
3432 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3433 echo "configure:3434: checking for sys/wait.h that is POSIX.1 compatible" >&5
3434
3435 cat > conftest.$ac_ext <<EOF
3436 #line 3437 "configure"
3437 #include "confdefs.h"
3438 #include <sys/types.h>
3439 #include <sys/wait.h>
3440 #ifndef WEXITSTATUS
3441 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3442 #endif
3443 #ifndef WIFEXITED
3444 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3445 #endif
3446 int main() {
3447 int s;
3448 wait (&s);
3449 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3450 ; return 0; }
3451 EOF
3452 if { (eval echo configure:3453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3453   rm -rf conftest*
3454   ac_cv_header_sys_wait_h=yes
3455 else
3456   echo "configure: failed program was:" >&5
3457   cat conftest.$ac_ext >&5
3458   rm -rf conftest*
3459   ac_cv_header_sys_wait_h=no
3460 fi
3461 rm -f conftest*
3462
3463 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3464 if test $ac_cv_header_sys_wait_h = yes; then
3465   { test "$extra_verbose" = "yes" && cat << \EOF
3466     Defining HAVE_SYS_WAIT_H
3467 EOF
3468 cat >> confdefs.h <<\EOF
3469 #define HAVE_SYS_WAIT_H 1
3470 EOF
3471 }
3472
3473 fi
3474
3475 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3476 echo "configure:3477: checking for ANSI C header files" >&5
3477
3478 cat > conftest.$ac_ext <<EOF
3479 #line 3480 "configure"
3480 #include "confdefs.h"
3481 #include <stdlib.h>
3482 #include <stdarg.h>
3483 #include <string.h>
3484 #include <float.h>
3485 EOF
3486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3487 { (eval echo configure:3488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3488 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3489 if test -z "$ac_err"; then
3490   rm -rf conftest*
3491   ac_cv_header_stdc=yes
3492 else
3493   echo "$ac_err" >&5
3494   echo "configure: failed program was:" >&5
3495   cat conftest.$ac_ext >&5
3496   rm -rf conftest*
3497   ac_cv_header_stdc=no
3498 fi
3499 rm -f conftest*
3500
3501 if test $ac_cv_header_stdc = yes; then
3502   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3503 cat > conftest.$ac_ext <<EOF
3504 #line 3505 "configure"
3505 #include "confdefs.h"
3506 #include <string.h>
3507 EOF
3508 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3509   egrep "memchr" >/dev/null 2>&1; then
3510   :
3511 else
3512   rm -rf conftest*
3513   ac_cv_header_stdc=no
3514 fi
3515 rm -f conftest*
3516
3517 fi
3518
3519 if test $ac_cv_header_stdc = yes; then
3520   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3521 cat > conftest.$ac_ext <<EOF
3522 #line 3523 "configure"
3523 #include "confdefs.h"
3524 #include <stdlib.h>
3525 EOF
3526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3527   egrep "free" >/dev/null 2>&1; then
3528   :
3529 else
3530   rm -rf conftest*
3531   ac_cv_header_stdc=no
3532 fi
3533 rm -f conftest*
3534
3535 fi
3536
3537 if test $ac_cv_header_stdc = yes; then
3538   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3539 cat > conftest.$ac_ext <<EOF
3540 #line 3541 "configure"
3541 #include "confdefs.h"
3542 #include <ctype.h>
3543 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3544 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3545 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3546 int main () { int i; for (i = 0; i < 256; i++)
3547 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3548 exit (0); }
3549
3550 EOF
3551 if { (eval echo configure:3552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3552 then
3553   :
3554 else
3555   conftest_rc="$?"
3556   echo "configure: failed program was:" >&5
3557   cat conftest.$ac_ext >&5
3558   rm -fr conftest*
3559   ac_cv_header_stdc=no
3560 fi
3561 rm -fr conftest*
3562 fi
3563
3564 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3565 if test $ac_cv_header_stdc = yes; then
3566   { test "$extra_verbose" = "yes" && cat << \EOF
3567     Defining STDC_HEADERS
3568 EOF
3569 cat >> confdefs.h <<\EOF
3570 #define STDC_HEADERS 1
3571 EOF
3572 }
3573
3574 fi
3575
3576 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3577 echo "configure:3578: checking whether time.h and sys/time.h may both be included" >&5
3578
3579 cat > conftest.$ac_ext <<EOF
3580 #line 3581 "configure"
3581 #include "confdefs.h"
3582 #include <sys/types.h>
3583 #include <sys/time.h>
3584 #include <time.h>
3585 int main() {
3586 struct tm *tp;
3587 ; return 0; }
3588 EOF
3589 if { (eval echo configure:3590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3590   rm -rf conftest*
3591   ac_cv_header_time=yes
3592 else
3593   echo "configure: failed program was:" >&5
3594   cat conftest.$ac_ext >&5
3595   rm -rf conftest*
3596   ac_cv_header_time=no
3597 fi
3598 rm -f conftest*
3599
3600 echo "$ac_t""$ac_cv_header_time" 1>&6
3601 if test $ac_cv_header_time = yes; then
3602   { test "$extra_verbose" = "yes" && cat << \EOF
3603     Defining TIME_WITH_SYS_TIME
3604 EOF
3605 cat >> confdefs.h <<\EOF
3606 #define TIME_WITH_SYS_TIME 1
3607 EOF
3608 }
3609
3610 fi
3611
3612 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3613 echo "configure:3614: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3614
3615 cat > conftest.$ac_ext <<EOF
3616 #line 3617 "configure"
3617 #include "confdefs.h"
3618 #include <sys/types.h>
3619 #include <signal.h>
3620 /* NetBSD declares sys_siglist in unistd.h.  */
3621 #ifdef HAVE_UNISTD_H
3622 #include <unistd.h>
3623 #endif
3624 int main() {
3625 char *msg = *(sys_siglist + 1);
3626 ; return 0; }
3627 EOF
3628 if { (eval echo configure:3629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3629   rm -rf conftest*
3630   ac_cv_decl_sys_siglist=yes
3631 else
3632   echo "configure: failed program was:" >&5
3633   cat conftest.$ac_ext >&5
3634   rm -rf conftest*
3635   ac_cv_decl_sys_siglist=no
3636 fi
3637 rm -f conftest*
3638
3639 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3640 if test $ac_cv_decl_sys_siglist = yes; then
3641   { test "$extra_verbose" = "yes" && cat << \EOF
3642     Defining SYS_SIGLIST_DECLARED
3643 EOF
3644 cat >> confdefs.h <<\EOF
3645 #define SYS_SIGLIST_DECLARED 1
3646 EOF
3647 }
3648
3649 fi
3650
3651
3652 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3653 echo "configure:3654: checking for struct utimbuf" >&5
3654 cat > conftest.$ac_ext <<EOF
3655 #line 3656 "configure"
3656 #include "confdefs.h"
3657 #ifdef TIME_WITH_SYS_TIME
3658 #include <sys/time.h>
3659 #include <time.h>
3660 #else
3661 #ifdef HAVE_SYS_TIME_H
3662 #include <sys/time.h>
3663 #else
3664 #include <time.h>
3665 #endif
3666 #endif
3667 #ifdef HAVE_UTIME_H
3668 #include <utime.h>
3669 #endif
3670 int main() {
3671 static struct utimbuf x; x.actime = x.modtime;
3672 ; return 0; }
3673 EOF
3674 if { (eval echo configure:3675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3675   rm -rf conftest*
3676   echo "$ac_t""yes" 1>&6
3677    { test "$extra_verbose" = "yes" && cat << \EOF
3678     Defining HAVE_STRUCT_UTIMBUF
3679 EOF
3680 cat >> confdefs.h <<\EOF
3681 #define HAVE_STRUCT_UTIMBUF 1
3682 EOF
3683 }
3684
3685 else
3686   echo "configure: failed program was:" >&5
3687   cat conftest.$ac_ext >&5
3688   rm -rf conftest*
3689   echo "$ac_t""no" 1>&6
3690 fi
3691 rm -f conftest*
3692
3693 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3694 echo "configure:3695: checking return type of signal handlers" >&5
3695
3696 cat > conftest.$ac_ext <<EOF
3697 #line 3698 "configure"
3698 #include "confdefs.h"
3699 #include <sys/types.h>
3700 #include <signal.h>
3701 #ifdef signal
3702 #undef signal
3703 #endif
3704 #ifdef __cplusplus
3705 extern "C" void (*signal (int, void (*)(int)))(int);
3706 #else
3707 void (*signal ()) ();
3708 #endif
3709
3710 int main() {
3711 int i;
3712 ; return 0; }
3713 EOF
3714 if { (eval echo configure:3715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3715   rm -rf conftest*
3716   ac_cv_type_signal=void
3717 else
3718   echo "configure: failed program was:" >&5
3719   cat conftest.$ac_ext >&5
3720   rm -rf conftest*
3721   ac_cv_type_signal=int
3722 fi
3723 rm -f conftest*
3724
3725 echo "$ac_t""$ac_cv_type_signal" 1>&6
3726 { test "$extra_verbose" = "yes" && cat << EOF
3727     Defining RETSIGTYPE = $ac_cv_type_signal
3728 EOF
3729 cat >> confdefs.h <<EOF
3730 #define RETSIGTYPE $ac_cv_type_signal
3731 EOF
3732 }
3733
3734
3735 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3736 echo "configure:3737: checking for size_t" >&5
3737
3738 cat > conftest.$ac_ext <<EOF
3739 #line 3740 "configure"
3740 #include "confdefs.h"
3741 #include <sys/types.h>
3742 #if STDC_HEADERS
3743 #include <stdlib.h>
3744 #include <stddef.h>
3745 #endif
3746 EOF
3747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3748   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3749   rm -rf conftest*
3750   ac_cv_type_size_t=yes
3751 else
3752   rm -rf conftest*
3753   ac_cv_type_size_t=no
3754 fi
3755 rm -f conftest*
3756
3757 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3758 if test $ac_cv_type_size_t = no; then
3759   { test "$extra_verbose" = "yes" && cat << \EOF
3760     Defining size_t = unsigned
3761 EOF
3762 cat >> confdefs.h <<\EOF
3763 #define size_t unsigned
3764 EOF
3765 }
3766
3767 fi
3768
3769 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3770 echo "configure:3771: checking for pid_t" >&5
3771
3772 cat > conftest.$ac_ext <<EOF
3773 #line 3774 "configure"
3774 #include "confdefs.h"
3775 #include <sys/types.h>
3776 #if STDC_HEADERS
3777 #include <stdlib.h>
3778 #include <stddef.h>
3779 #endif
3780 EOF
3781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3782   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3783   rm -rf conftest*
3784   ac_cv_type_pid_t=yes
3785 else
3786   rm -rf conftest*
3787   ac_cv_type_pid_t=no
3788 fi
3789 rm -f conftest*
3790
3791 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3792 if test $ac_cv_type_pid_t = no; then
3793   { test "$extra_verbose" = "yes" && cat << \EOF
3794     Defining pid_t = int
3795 EOF
3796 cat >> confdefs.h <<\EOF
3797 #define pid_t int
3798 EOF
3799 }
3800
3801 fi
3802
3803 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3804 echo "configure:3805: checking for uid_t in sys/types.h" >&5
3805
3806 cat > conftest.$ac_ext <<EOF
3807 #line 3808 "configure"
3808 #include "confdefs.h"
3809 #include <sys/types.h>
3810 EOF
3811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3812   egrep "uid_t" >/dev/null 2>&1; then
3813   rm -rf conftest*
3814   ac_cv_type_uid_t=yes
3815 else
3816   rm -rf conftest*
3817   ac_cv_type_uid_t=no
3818 fi
3819 rm -f conftest*
3820
3821
3822 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3823 if test $ac_cv_type_uid_t = no; then
3824   { test "$extra_verbose" = "yes" && cat << \EOF
3825     Defining uid_t = int
3826 EOF
3827 cat >> confdefs.h <<\EOF
3828 #define uid_t int
3829 EOF
3830 }
3831
3832   { test "$extra_verbose" = "yes" && cat << \EOF
3833     Defining gid_t = int
3834 EOF
3835 cat >> confdefs.h <<\EOF
3836 #define gid_t int
3837 EOF
3838 }
3839
3840 fi
3841
3842 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3843 echo "configure:3844: checking for mode_t" >&5
3844
3845 cat > conftest.$ac_ext <<EOF
3846 #line 3847 "configure"
3847 #include "confdefs.h"
3848 #include <sys/types.h>
3849 #if STDC_HEADERS
3850 #include <stdlib.h>
3851 #include <stddef.h>
3852 #endif
3853 EOF
3854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3855   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3856   rm -rf conftest*
3857   ac_cv_type_mode_t=yes
3858 else
3859   rm -rf conftest*
3860   ac_cv_type_mode_t=no
3861 fi
3862 rm -f conftest*
3863
3864 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3865 if test $ac_cv_type_mode_t = no; then
3866   { test "$extra_verbose" = "yes" && cat << \EOF
3867     Defining mode_t = int
3868 EOF
3869 cat >> confdefs.h <<\EOF
3870 #define mode_t int
3871 EOF
3872 }
3873
3874 fi
3875
3876 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3877 echo "configure:3878: checking for off_t" >&5
3878
3879 cat > conftest.$ac_ext <<EOF
3880 #line 3881 "configure"
3881 #include "confdefs.h"
3882 #include <sys/types.h>
3883 #if STDC_HEADERS
3884 #include <stdlib.h>
3885 #include <stddef.h>
3886 #endif
3887 EOF
3888 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3889   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3890   rm -rf conftest*
3891   ac_cv_type_off_t=yes
3892 else
3893   rm -rf conftest*
3894   ac_cv_type_off_t=no
3895 fi
3896 rm -f conftest*
3897
3898 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3899 if test $ac_cv_type_off_t = no; then
3900   { test "$extra_verbose" = "yes" && cat << \EOF
3901     Defining off_t = long
3902 EOF
3903 cat >> confdefs.h <<\EOF
3904 #define off_t long
3905 EOF
3906 }
3907
3908 fi
3909
3910 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3911 echo "configure:3912: checking for ssize_t" >&5
3912
3913 cat > conftest.$ac_ext <<EOF
3914 #line 3915 "configure"
3915 #include "confdefs.h"
3916 #include <sys/types.h>
3917 #if STDC_HEADERS
3918 #include <stdlib.h>
3919 #include <stddef.h>
3920 #endif
3921 EOF
3922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3923   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3924   rm -rf conftest*
3925   ac_cv_type_ssize_t=yes
3926 else
3927   rm -rf conftest*
3928   ac_cv_type_ssize_t=no
3929 fi
3930 rm -f conftest*
3931
3932 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3933 if test $ac_cv_type_ssize_t = no; then
3934   { test "$extra_verbose" = "yes" && cat << \EOF
3935     Defining ssize_t = int
3936 EOF
3937 cat >> confdefs.h <<\EOF
3938 #define ssize_t int
3939 EOF
3940 }
3941
3942 fi
3943
3944
3945 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3946 echo "configure:3947: checking for struct timeval" >&5
3947 cat > conftest.$ac_ext <<EOF
3948 #line 3949 "configure"
3949 #include "confdefs.h"
3950 #ifdef TIME_WITH_SYS_TIME
3951 #include <sys/time.h>
3952 #include <time.h>
3953 #else
3954 #ifdef HAVE_SYS_TIME_H
3955 #include <sys/time.h>
3956 #else
3957 #include <time.h>
3958 #endif
3959 #endif
3960 int main() {
3961 static struct timeval x; x.tv_sec = x.tv_usec;
3962 ; return 0; }
3963 EOF
3964 if { (eval echo configure:3965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3965   rm -rf conftest*
3966   echo "$ac_t""yes" 1>&6
3967   HAVE_TIMEVAL=yes
3968   { test "$extra_verbose" = "yes" && cat << \EOF
3969     Defining HAVE_TIMEVAL
3970 EOF
3971 cat >> confdefs.h <<\EOF
3972 #define HAVE_TIMEVAL 1
3973 EOF
3974 }
3975
3976 else
3977   echo "configure: failed program was:" >&5
3978   cat conftest.$ac_ext >&5
3979   rm -rf conftest*
3980   echo "$ac_t""no" 1>&6
3981    HAVE_TIMEVAL=no
3982 fi
3983 rm -f conftest*
3984
3985 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3986 echo "configure:3987: checking whether struct tm is in sys/time.h or time.h" >&5
3987
3988 cat > conftest.$ac_ext <<EOF
3989 #line 3990 "configure"
3990 #include "confdefs.h"
3991 #include <sys/types.h>
3992 #include <time.h>
3993 int main() {
3994 struct tm *tp; tp->tm_sec;
3995 ; return 0; }
3996 EOF
3997 if { (eval echo configure:3998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3998   rm -rf conftest*
3999   ac_cv_struct_tm=time.h
4000 else
4001   echo "configure: failed program was:" >&5
4002   cat conftest.$ac_ext >&5
4003   rm -rf conftest*
4004   ac_cv_struct_tm=sys/time.h
4005 fi
4006 rm -f conftest*
4007
4008 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4009 if test $ac_cv_struct_tm = sys/time.h; then
4010   { test "$extra_verbose" = "yes" && cat << \EOF
4011     Defining TM_IN_SYS_TIME
4012 EOF
4013 cat >> confdefs.h <<\EOF
4014 #define TM_IN_SYS_TIME 1
4015 EOF
4016 }
4017
4018 fi
4019
4020 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4021 echo "configure:4022: checking for tm_zone in struct tm" >&5
4022
4023 cat > conftest.$ac_ext <<EOF
4024 #line 4025 "configure"
4025 #include "confdefs.h"
4026 #include <sys/types.h>
4027 #include <$ac_cv_struct_tm>
4028 int main() {
4029 struct tm tm; tm.tm_zone;
4030 ; return 0; }
4031 EOF
4032 if { (eval echo configure:4033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4033   rm -rf conftest*
4034   ac_cv_struct_tm_zone=yes
4035 else
4036   echo "configure: failed program was:" >&5
4037   cat conftest.$ac_ext >&5
4038   rm -rf conftest*
4039   ac_cv_struct_tm_zone=no
4040 fi
4041 rm -f conftest*
4042
4043 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4044 if test "$ac_cv_struct_tm_zone" = yes; then
4045   { test "$extra_verbose" = "yes" && cat << \EOF
4046     Defining HAVE_TM_ZONE
4047 EOF
4048 cat >> confdefs.h <<\EOF
4049 #define HAVE_TM_ZONE 1
4050 EOF
4051 }
4052
4053 else
4054   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4055 echo "configure:4056: checking for tzname" >&5
4056
4057 cat > conftest.$ac_ext <<EOF
4058 #line 4059 "configure"
4059 #include "confdefs.h"
4060 #include <time.h>
4061 #ifndef tzname /* For SGI.  */
4062 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4063 #endif
4064 int main() {
4065 atoi(*tzname);
4066 ; return 0; }
4067 EOF
4068 if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4069   rm -rf conftest*
4070   ac_cv_var_tzname=yes
4071 else
4072   echo "configure: failed program was:" >&5
4073   cat conftest.$ac_ext >&5
4074   rm -rf conftest*
4075   ac_cv_var_tzname=no
4076 fi
4077 rm -f conftest*
4078
4079 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4080   if test $ac_cv_var_tzname = yes; then
4081     { test "$extra_verbose" = "yes" && cat << \EOF
4082     Defining HAVE_TZNAME
4083 EOF
4084 cat >> confdefs.h <<\EOF
4085 #define HAVE_TZNAME 1
4086 EOF
4087 }
4088
4089   fi
4090 fi
4091
4092
4093 echo $ac_n "checking for working const""... $ac_c" 1>&6
4094 echo "configure:4095: checking for working const" >&5
4095
4096 cat > conftest.$ac_ext <<EOF
4097 #line 4098 "configure"
4098 #include "confdefs.h"
4099
4100 int main() {
4101
4102 /* Ultrix mips cc rejects this.  */
4103 typedef int charset[2]; const charset x;
4104 /* SunOS 4.1.1 cc rejects this.  */
4105 char const *const *ccp;
4106 char **p;
4107 /* NEC SVR4.0.2 mips cc rejects this.  */
4108 struct point {int x, y;};
4109 static struct point const zero = {0,0};
4110 /* AIX XL C 1.02.0.0 rejects this.
4111    It does not let you subtract one const X* pointer from another in an arm
4112    of an if-expression whose if-part is not a constant expression */
4113 const char *g = "string";
4114 ccp = &g + (g ? g-g : 0);
4115 /* HPUX 7.0 cc rejects these. */
4116 ++ccp;
4117 p = (char**) ccp;
4118 ccp = (char const *const *) p;
4119 { /* SCO 3.2v4 cc rejects this.  */
4120   char *t;
4121   char const *s = 0 ? (char *) 0 : (char const *) 0;
4122
4123   *t++ = 0;
4124 }
4125 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4126   int x[] = {25, 17};
4127   const int *foo = &x[0];
4128   ++foo;
4129 }
4130 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4131   typedef const int *iptr;
4132   iptr p = 0;
4133   ++p;
4134 }
4135 { /* AIX XL C 1.02.0.0 rejects this saying
4136      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4137   struct s { int j; const int *ap[3]; };
4138   struct s *b; b->j = 5;
4139 }
4140 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4141   const int foo = 10;
4142 }
4143
4144 ; return 0; }
4145 EOF
4146 if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4147   rm -rf conftest*
4148   ac_cv_c_const=yes
4149 else
4150   echo "configure: failed program was:" >&5
4151   cat conftest.$ac_ext >&5
4152   rm -rf conftest*
4153   ac_cv_c_const=no
4154 fi
4155 rm -f conftest*
4156
4157 echo "$ac_t""$ac_cv_c_const" 1>&6
4158 if test $ac_cv_c_const = no; then
4159   { test "$extra_verbose" = "yes" && cat << \EOF
4160     Defining const = 
4161 EOF
4162 cat >> confdefs.h <<\EOF
4163 #define const 
4164 EOF
4165 }
4166
4167 fi
4168
4169
4170 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4171 echo "configure:4172: checking whether ${MAKE-make} sets \${MAKE}" >&5
4172 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4173
4174 cat > conftestmake <<\EOF
4175 all:
4176         @echo 'ac_maketemp="${MAKE}"'
4177 EOF
4178 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4179 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4180 if test -n "$ac_maketemp"; then
4181   eval ac_cv_prog_make_${ac_make}_set=yes
4182 else
4183   eval ac_cv_prog_make_${ac_make}_set=no
4184 fi
4185 rm -f conftestmake
4186 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4187   echo "$ac_t""yes" 1>&6
4188   SET_MAKE=
4189 else
4190   echo "$ac_t""no" 1>&6
4191   SET_MAKE="MAKE=${MAKE-make}"
4192 fi
4193
4194
4195 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4196 echo "configure:4197: checking whether byte ordering is bigendian" >&5
4197
4198 ac_cv_c_bigendian=unknown
4199 # See if sys/param.h defines the BYTE_ORDER macro.
4200 cat > conftest.$ac_ext <<EOF
4201 #line 4202 "configure"
4202 #include "confdefs.h"
4203 #include <sys/types.h>
4204 #include <sys/param.h>
4205 int main() {
4206
4207 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4208  bogus endian macros
4209 #endif
4210 ; return 0; }
4211 EOF
4212 if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4213   rm -rf conftest*
4214   # It does; now see whether it defined to BIG_ENDIAN or not.
4215 cat > conftest.$ac_ext <<EOF
4216 #line 4217 "configure"
4217 #include "confdefs.h"
4218 #include <sys/types.h>
4219 #include <sys/param.h>
4220 int main() {
4221
4222 #if BYTE_ORDER != BIG_ENDIAN
4223  not big endian
4224 #endif
4225 ; return 0; }
4226 EOF
4227 if { (eval echo configure:4228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4228   rm -rf conftest*
4229   ac_cv_c_bigendian=yes
4230 else
4231   echo "configure: failed program was:" >&5
4232   cat conftest.$ac_ext >&5
4233   rm -rf conftest*
4234   ac_cv_c_bigendian=no
4235 fi
4236 rm -f conftest*
4237 else
4238   echo "configure: failed program was:" >&5
4239   cat conftest.$ac_ext >&5
4240 fi
4241 rm -f conftest*
4242 if test $ac_cv_c_bigendian = unknown; then
4243 cat > conftest.$ac_ext <<EOF
4244 #line 4245 "configure"
4245 #include "confdefs.h"
4246 main () {
4247   /* Are we little or big endian?  From Harbison&Steele.  */
4248   union
4249   {
4250     long l;
4251     char c[sizeof (long)];
4252   } u;
4253   u.l = 1;
4254   exit (u.c[sizeof (long) - 1] == 1);
4255 }
4256 EOF
4257 if { (eval echo configure:4258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4258 then
4259   ac_cv_c_bigendian=no
4260 else
4261   conftest_rc="$?"
4262   echo "configure: failed program was:" >&5
4263   cat conftest.$ac_ext >&5
4264   rm -fr conftest*
4265   ac_cv_c_bigendian=yes
4266 fi
4267 rm -fr conftest*
4268 fi
4269
4270 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4271 if test $ac_cv_c_bigendian = yes; then
4272   { test "$extra_verbose" = "yes" && cat << \EOF
4273     Defining WORDS_BIGENDIAN
4274 EOF
4275 cat >> confdefs.h <<\EOF
4276 #define WORDS_BIGENDIAN 1
4277 EOF
4278 }
4279
4280 fi
4281
4282
4283 echo $ac_n "checking size of short""... $ac_c" 1>&6
4284 echo "configure:4285: checking size of short" >&5
4285
4286 cat > conftest.$ac_ext <<EOF
4287 #line 4288 "configure"
4288 #include "confdefs.h"
4289 #include <stdio.h>
4290 main()
4291 {
4292   FILE *f=fopen("conftestval", "w");
4293   if (!f) exit(1);
4294   fprintf(f, "%d\n", sizeof(short));
4295   exit(0);
4296 }
4297 EOF
4298 if { (eval echo configure:4299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4299 then
4300   ac_cv_sizeof_short=`cat conftestval`
4301 else
4302   conftest_rc="$?"
4303   echo "configure: failed program was:" >&5
4304   cat conftest.$ac_ext >&5
4305   rm -fr conftest*
4306   ac_cv_sizeof_short=0
4307 fi
4308 rm -fr conftest*
4309 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4310 { test "$extra_verbose" = "yes" && cat << EOF
4311     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4312 EOF
4313 cat >> confdefs.h <<EOF
4314 #define SIZEOF_SHORT $ac_cv_sizeof_short
4315 EOF
4316 }
4317
4318
4319 if test "$ac_cv_sizeof_short" = 0; then
4320   echo ""
4321   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4322   echo "*** PANIC *** Please examine config.log for compilation errors."
4323   exit 1
4324 fi
4325 echo $ac_n "checking size of int""... $ac_c" 1>&6
4326 echo "configure:4327: checking size of int" >&5
4327
4328 cat > conftest.$ac_ext <<EOF
4329 #line 4330 "configure"
4330 #include "confdefs.h"
4331 #include <stdio.h>
4332 main()
4333 {
4334   FILE *f=fopen("conftestval", "w");
4335   if (!f) exit(1);
4336   fprintf(f, "%d\n", sizeof(int));
4337   exit(0);
4338 }
4339 EOF
4340 if { (eval echo configure:4341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4341 then
4342   ac_cv_sizeof_int=`cat conftestval`
4343 else
4344   conftest_rc="$?"
4345   echo "configure: failed program was:" >&5
4346   cat conftest.$ac_ext >&5
4347   rm -fr conftest*
4348   ac_cv_sizeof_int=0
4349 fi
4350 rm -fr conftest*
4351 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4352 { test "$extra_verbose" = "yes" && cat << EOF
4353     Defining SIZEOF_INT = $ac_cv_sizeof_int
4354 EOF
4355 cat >> confdefs.h <<EOF
4356 #define SIZEOF_INT $ac_cv_sizeof_int
4357 EOF
4358 }
4359
4360
4361 echo $ac_n "checking size of long""... $ac_c" 1>&6
4362 echo "configure:4363: checking size of long" >&5
4363
4364 cat > conftest.$ac_ext <<EOF
4365 #line 4366 "configure"
4366 #include "confdefs.h"
4367 #include <stdio.h>
4368 main()
4369 {
4370   FILE *f=fopen("conftestval", "w");
4371   if (!f) exit(1);
4372   fprintf(f, "%d\n", sizeof(long));
4373   exit(0);
4374 }
4375 EOF
4376 if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4377 then
4378   ac_cv_sizeof_long=`cat conftestval`
4379 else
4380   conftest_rc="$?"
4381   echo "configure: failed program was:" >&5
4382   cat conftest.$ac_ext >&5
4383   rm -fr conftest*
4384   ac_cv_sizeof_long=0
4385 fi
4386 rm -fr conftest*
4387 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4388 { test "$extra_verbose" = "yes" && cat << EOF
4389     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4390 EOF
4391 cat >> confdefs.h <<EOF
4392 #define SIZEOF_LONG $ac_cv_sizeof_long
4393 EOF
4394 }
4395
4396
4397 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4398 echo "configure:4399: checking size of long long" >&5
4399
4400 cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403 #include <stdio.h>
4404 main()
4405 {
4406   FILE *f=fopen("conftestval", "w");
4407   if (!f) exit(1);
4408   fprintf(f, "%d\n", sizeof(long long));
4409   exit(0);
4410 }
4411 EOF
4412 if { (eval echo configure:4413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4413 then
4414   ac_cv_sizeof_long_long=`cat conftestval`
4415 else
4416   conftest_rc="$?"
4417   echo "configure: failed program was:" >&5
4418   cat conftest.$ac_ext >&5
4419   rm -fr conftest*
4420   ac_cv_sizeof_long_long=0
4421 fi
4422 rm -fr conftest*
4423 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4424 { test "$extra_verbose" = "yes" && cat << EOF
4425     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4426 EOF
4427 cat >> confdefs.h <<EOF
4428 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4429 EOF
4430 }
4431
4432
4433 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4434 echo "configure:4435: checking size of void *" >&5
4435
4436 cat > conftest.$ac_ext <<EOF
4437 #line 4438 "configure"
4438 #include "confdefs.h"
4439 #include <stdio.h>
4440 main()
4441 {
4442   FILE *f=fopen("conftestval", "w");
4443   if (!f) exit(1);
4444   fprintf(f, "%d\n", sizeof(void *));
4445   exit(0);
4446 }
4447 EOF
4448 if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4449 then
4450   ac_cv_sizeof_void_p=`cat conftestval`
4451 else
4452   conftest_rc="$?"
4453   echo "configure: failed program was:" >&5
4454   cat conftest.$ac_ext >&5
4455   rm -fr conftest*
4456   ac_cv_sizeof_void_p=0
4457 fi
4458 rm -fr conftest*
4459 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4460 { test "$extra_verbose" = "yes" && cat << EOF
4461     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4462 EOF
4463 cat >> confdefs.h <<EOF
4464 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4465 EOF
4466 }
4467
4468
4469
4470 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4471 echo "configure:4472: checking for long file names" >&5
4472
4473 ac_cv_sys_long_file_names=yes
4474 # Test for long file names in all the places we know might matter:
4475 #      .                the current directory, where building will happen
4476 #      $prefix/lib      where we will be installing things
4477 #      $exec_prefix/lib likewise
4478 # eval it to expand exec_prefix.
4479 #      $TMPDIR          if set, where it might want to write temporary files
4480 # if $TMPDIR is not set:
4481 #      /tmp             where it might want to write temporary files
4482 #      /var/tmp         likewise
4483 #      /usr/tmp         likewise
4484 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4485   ac_tmpdirs="$TMPDIR"
4486 else
4487   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4488 fi
4489 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4490   test -d $ac_dir || continue
4491   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4492   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4493   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4494   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4495   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4496     ac_cv_sys_long_file_names=no
4497     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4498     break
4499   fi
4500   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4501 done
4502
4503 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4504 if test $ac_cv_sys_long_file_names = yes; then
4505   { test "$extra_verbose" = "yes" && cat << \EOF
4506     Defining HAVE_LONG_FILE_NAMES
4507 EOF
4508 cat >> confdefs.h <<\EOF
4509 #define HAVE_LONG_FILE_NAMES 1
4510 EOF
4511 }
4512
4513 fi
4514
4515
4516 echo $ac_n "checking for sin""... $ac_c" 1>&6
4517 echo "configure:4518: checking for sin" >&5
4518
4519 cat > conftest.$ac_ext <<EOF
4520 #line 4521 "configure"
4521 #include "confdefs.h"
4522 /* System header to define __stub macros and hopefully few prototypes,
4523     which can conflict with char sin(); below.  */
4524 #include <assert.h>
4525 /* Override any gcc2 internal prototype to avoid an error.  */
4526 /* We use char because int might match the return type of a gcc2
4527     builtin and then its argument prototype would still apply.  */
4528 char sin();
4529
4530 int main() {
4531
4532 /* The GNU C library defines this for functions which it implements
4533     to always fail with ENOSYS.  Some functions are actually named
4534     something starting with __ and the normal name is an alias.  */
4535 #if defined (__stub_sin) || defined (__stub___sin)
4536 choke me
4537 #else
4538 sin();
4539 #endif
4540
4541 ; return 0; }
4542 EOF
4543 if { (eval echo configure:4544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4544   rm -rf conftest*
4545   eval "ac_cv_func_sin=yes"
4546 else
4547   echo "configure: failed program was:" >&5
4548   cat conftest.$ac_ext >&5
4549   rm -rf conftest*
4550   eval "ac_cv_func_sin=no"
4551 fi
4552 rm -f conftest*
4553
4554 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4555   echo "$ac_t""yes" 1>&6
4556   :
4557 else
4558   echo "$ac_t""no" 1>&6
4559
4560 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4561 echo "configure:4562: checking for sin in -lm" >&5
4562 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4563
4564 xe_check_libs=" -lm "
4565 cat > conftest.$ac_ext <<EOF
4566 #line 4567 "configure"
4567 #include "confdefs.h"
4568 /* Override any gcc2 internal prototype to avoid an error.  */
4569 /* We use char because int might match the return type of a gcc2
4570     builtin and then its argument prototype would still apply.  */
4571 char sin();
4572
4573 int main() {
4574 sin()
4575 ; return 0; }
4576 EOF
4577 if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4578   rm -rf conftest*
4579   eval "ac_cv_lib_$ac_lib_var=yes"
4580 else
4581   echo "configure: failed program was:" >&5
4582   cat conftest.$ac_ext >&5
4583   rm -rf conftest*
4584   eval "ac_cv_lib_$ac_lib_var=no"
4585 fi
4586 rm -f conftest*
4587 xe_check_libs=""
4588
4589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4590   echo "$ac_t""yes" 1>&6
4591     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4592     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4593   { test "$extra_verbose" = "yes" && cat << EOF
4594     Defining $ac_tr_lib
4595 EOF
4596 cat >> confdefs.h <<EOF
4597 #define $ac_tr_lib 1
4598 EOF
4599 }
4600
4601   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4602
4603 else
4604   echo "$ac_t""no" 1>&6
4605 fi
4606
4607
4608 fi
4609
4610
4611 { test "$extra_verbose" = "yes" && cat << \EOF
4612     Defining LISP_FLOAT_TYPE
4613 EOF
4614 cat >> confdefs.h <<\EOF
4615 #define LISP_FLOAT_TYPE 1
4616 EOF
4617 }
4618
4619
4620 cat > conftest.$ac_ext <<EOF
4621 #line 4622 "configure"
4622 #include "confdefs.h"
4623 #include <math.h>
4624 int main() {
4625 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4626 ; return 0; }
4627 EOF
4628 if { (eval echo configure:4629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4629   rm -rf conftest*
4630   { test "$extra_verbose" = "yes" && cat << \EOF
4631     Defining HAVE_INVERSE_HYPERBOLIC
4632 EOF
4633 cat >> confdefs.h <<\EOF
4634 #define HAVE_INVERSE_HYPERBOLIC 1
4635 EOF
4636 }
4637
4638 else
4639   echo "configure: failed program was:" >&5
4640   cat conftest.$ac_ext >&5
4641 fi
4642 rm -f conftest*
4643
4644 echo "checking type of mail spool file locking" 1>&6
4645 echo "configure:4646: checking type of mail spool file locking" >&5
4646 for ac_func in lockf flock
4647 do
4648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4649 echo "configure:4650: checking for $ac_func" >&5
4650
4651 cat > conftest.$ac_ext <<EOF
4652 #line 4653 "configure"
4653 #include "confdefs.h"
4654 /* System header to define __stub macros and hopefully few prototypes,
4655     which can conflict with char $ac_func(); below.  */
4656 #include <assert.h>
4657 /* Override any gcc2 internal prototype to avoid an error.  */
4658 /* We use char because int might match the return type of a gcc2
4659     builtin and then its argument prototype would still apply.  */
4660 char $ac_func();
4661
4662 int main() {
4663
4664 /* The GNU C library defines this for functions which it implements
4665     to always fail with ENOSYS.  Some functions are actually named
4666     something starting with __ and the normal name is an alias.  */
4667 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4668 choke me
4669 #else
4670 $ac_func();
4671 #endif
4672
4673 ; return 0; }
4674 EOF
4675 if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4676   rm -rf conftest*
4677   eval "ac_cv_func_$ac_func=yes"
4678 else
4679   echo "configure: failed program was:" >&5
4680   cat conftest.$ac_ext >&5
4681   rm -rf conftest*
4682   eval "ac_cv_func_$ac_func=no"
4683 fi
4684 rm -f conftest*
4685
4686 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4687   echo "$ac_t""yes" 1>&6
4688     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4689   { test "$extra_verbose" = "yes" && cat << EOF
4690     Defining $ac_tr_func
4691 EOF
4692 cat >> confdefs.h <<EOF
4693 #define $ac_tr_func 1
4694 EOF
4695 }
4696  
4697 else
4698   echo "$ac_t""no" 1>&6
4699 fi
4700 done
4701
4702 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4703 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4704 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4705 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4706     Defining MAIL_LOCK_LOCKF
4707 EOF
4708 cat >> confdefs.h <<\EOF
4709 #define MAIL_LOCK_LOCKF 1
4710 EOF
4711 }
4712
4713 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4714     Defining MAIL_LOCK_FLOCK
4715 EOF
4716 cat >> confdefs.h <<\EOF
4717 #define MAIL_LOCK_FLOCK 1
4718 EOF
4719 }
4720
4721 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4722     Defining MAIL_LOCK_LOCKING
4723 EOF
4724 cat >> confdefs.h <<\EOF
4725 #define MAIL_LOCK_LOCKING 1
4726 EOF
4727 }
4728
4729 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4730     Defining MAIL_LOCK_DOT
4731 EOF
4732 cat >> confdefs.h <<\EOF
4733 #define MAIL_LOCK_DOT 1
4734 EOF
4735 }
4736
4737 fi
4738 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4739   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4740 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4741   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4742 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4743   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4744
4745 case "$opsys" in decosf*)
4746   
4747 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4748 echo "configure:4749: checking for cma_open in -lpthreads" >&5
4749 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4750
4751 xe_check_libs=" -lpthreads "
4752 cat > conftest.$ac_ext <<EOF
4753 #line 4754 "configure"
4754 #include "confdefs.h"
4755 /* Override any gcc2 internal prototype to avoid an error.  */
4756 /* We use char because int might match the return type of a gcc2
4757     builtin and then its argument prototype would still apply.  */
4758 char cma_open();
4759
4760 int main() {
4761 cma_open()
4762 ; return 0; }
4763 EOF
4764 if { (eval echo configure:4765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4765   rm -rf conftest*
4766   eval "ac_cv_lib_$ac_lib_var=yes"
4767 else
4768   echo "configure: failed program was:" >&5
4769   cat conftest.$ac_ext >&5
4770   rm -rf conftest*
4771   eval "ac_cv_lib_$ac_lib_var=no"
4772 fi
4773 rm -f conftest*
4774 xe_check_libs=""
4775
4776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4777   echo "$ac_t""yes" 1>&6
4778     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4779     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4780   { test "$extra_verbose" = "yes" && cat << EOF
4781     Defining $ac_tr_lib
4782 EOF
4783 cat >> confdefs.h <<EOF
4784 #define $ac_tr_lib 1
4785 EOF
4786 }
4787
4788   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4789
4790 else
4791   echo "$ac_t""no" 1>&6
4792 fi
4793
4794
4795   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4796     c_switch_site="$c_switch_site -threads" ;;
4797 esac
4798
4799 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4800 echo "configure:4801: checking whether the -xildoff compiler flag is required" >&5
4801 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4802   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4803     then echo "$ac_t""no" 1>&6;
4804     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
4805   fi
4806   else echo "$ac_t""no" 1>&6
4807 fi
4808
4809 if test "$opsys" = "sol2" -a "$os_release" -ge 56; then
4810   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4811 echo "configure:4812: checking for \"-z ignore\" linker flag" >&5
4812   case "`ld -h 2>&1`" in
4813     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4814       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4815     *) echo "$ac_t""no" 1>&6 ;;
4816   esac
4817 fi
4818
4819
4820 echo "checking "for specified window system"" 1>&6
4821 echo "configure:4822: checking "for specified window system"" >&5
4822
4823 if test "$with_x11" != "no"; then
4824     test "$x_includes $x_libraries" != "NONE NONE" && \
4825    window_system=x11 with_x11=yes
4826
4827         
4828       if test "$x_includes $x_libraries" = "NONE NONE" \
4829     -a -n "$OPENWINHOME" \
4830     -a "$OPENWINHOME" != "/usr/openwin" \
4831     -a -d "$OPENWINHOME"; then
4832       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4833       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4834       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4835   fi
4836
4837   if test "$x_includes" = "NONE"; then
4838                     for dir in "/usr/X11" "/usr/X11R6"; do
4839       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4840     done
4841   fi
4842
4843   if test "$x_libraries" = "NONE"; then
4844     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4845       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4846     done
4847   fi
4848
4849   # If we find X, set shell vars x_includes and x_libraries to the
4850 # paths, otherwise set no_x=yes.
4851 # Uses ac_ vars as temps to allow command line to override cache and checks.
4852 # --without-x overrides everything else, but does not touch the cache.
4853 echo $ac_n "checking for X""... $ac_c" 1>&6
4854 echo "configure:4855: checking for X" >&5
4855
4856 # Check whether --with-x or --without-x was given.
4857 if test "${with_x+set}" = set; then
4858   withval="$with_x"
4859   :
4860 fi
4861
4862 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4863 if test "x$with_x" = xno; then
4864   # The user explicitly disabled X.
4865   have_x=disabled
4866 else
4867   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4868     # Both variables are already set.
4869     have_x=yes
4870   else
4871
4872 # One or both of the vars are not set, and there is no cached value.
4873 ac_x_includes=NO ac_x_libraries=NO
4874 rm -fr conftestdir
4875 if mkdir conftestdir; then
4876   cd conftestdir
4877   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4878   cat > Imakefile <<'EOF'
4879 acfindx:
4880         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4881 EOF
4882   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4883     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4884     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4885     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4886     for ac_extension in a so sl; do
4887       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4888         test -f $ac_im_libdir/libX11.$ac_extension; then
4889         ac_im_usrlibdir=$ac_im_libdir; break
4890       fi
4891     done
4892     # Screen out bogus values from the imake configuration.  They are
4893     # bogus both because they are the default anyway, and because
4894     # using them would break gcc on systems where it needs fixed includes.
4895     case "$ac_im_incroot" in
4896         /usr/include) ;;
4897         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4898     esac
4899     case "$ac_im_usrlibdir" in
4900         /usr/lib | /lib) ;;
4901         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4902     esac
4903   fi
4904   cd ..
4905   rm -fr conftestdir
4906 fi
4907
4908 if test "$ac_x_includes" = NO; then
4909   # Guess where to find include files, by looking for this one X11 .h file.
4910   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4911
4912   # First, try using that file with no special directory specified.
4913 cat > conftest.$ac_ext <<EOF
4914 #line 4915 "configure"
4915 #include "confdefs.h"
4916 #include <$x_direct_test_include>
4917 EOF
4918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4919 { (eval echo configure:4920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4921 if test -z "$ac_err"; then
4922   rm -rf conftest*
4923   # We can compile using X headers with no special include directory.
4924 ac_x_includes=
4925 else
4926   echo "$ac_err" >&5
4927   echo "configure: failed program was:" >&5
4928   cat conftest.$ac_ext >&5
4929   rm -rf conftest*
4930   # Look for the header file in a standard set of common directories.
4931 # Check X11 before X11Rn because it is often a symlink to the current release.
4932   for ac_dir in               \
4933     /usr/X11/include          \
4934     /usr/X11R6/include        \
4935     /usr/X11R5/include        \
4936     /usr/X11R4/include        \
4937                               \
4938     /usr/include/X11          \
4939     /usr/include/X11R6        \
4940     /usr/include/X11R5        \
4941     /usr/include/X11R4        \
4942                               \
4943     /usr/local/X11/include    \
4944     /usr/local/X11R6/include  \
4945     /usr/local/X11R5/include  \
4946     /usr/local/X11R4/include  \
4947                               \
4948     /usr/local/include/X11    \
4949     /usr/local/include/X11R6  \
4950     /usr/local/include/X11R5  \
4951     /usr/local/include/X11R4  \
4952                               \
4953     /usr/X386/include         \
4954     /usr/x386/include         \
4955     /usr/XFree86/include/X11  \
4956                               \
4957     /usr/include              \
4958     /usr/local/include        \
4959     /usr/unsupported/include  \
4960     /usr/athena/include       \
4961     /usr/local/x11r5/include  \
4962     /usr/lpp/Xamples/include  \
4963                               \
4964     /usr/openwin/include      \
4965     /usr/openwin/share/include \
4966     ; \
4967   do
4968     if test -r "$ac_dir/$x_direct_test_include"; then
4969       ac_x_includes=$ac_dir
4970       break
4971     fi
4972   done
4973 fi
4974 rm -f conftest*
4975 fi # $ac_x_includes = NO
4976
4977 if test "$ac_x_libraries" = NO; then
4978   # Check for the libraries.
4979
4980   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4981   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4982
4983   # See if we find them without any special options.
4984   # Don't add to $LIBS permanently.
4985   ac_save_LIBS="$LIBS"
4986   LIBS="-l$x_direct_test_library $LIBS"
4987 cat > conftest.$ac_ext <<EOF
4988 #line 4989 "configure"
4989 #include "confdefs.h"
4990
4991 int main() {
4992 ${x_direct_test_function}()
4993 ; return 0; }
4994 EOF
4995 if { (eval echo configure:4996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4996   rm -rf conftest*
4997   LIBS="$ac_save_LIBS"
4998 # We can link X programs with no special library path.
4999 ac_x_libraries=
5000 else
5001   echo "configure: failed program was:" >&5
5002   cat conftest.$ac_ext >&5
5003   rm -rf conftest*
5004   LIBS="$ac_save_LIBS"
5005 # First see if replacing the include by lib works.
5006 # Check X11 before X11Rn because it is often a symlink to the current release.
5007 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5008     /usr/X11/lib          \
5009     /usr/X11R6/lib        \
5010     /usr/X11R5/lib        \
5011     /usr/X11R4/lib        \
5012                           \
5013     /usr/lib/X11          \
5014     /usr/lib/X11R6        \
5015     /usr/lib/X11R5        \
5016     /usr/lib/X11R4        \
5017                           \
5018     /usr/local/X11/lib    \
5019     /usr/local/X11R6/lib  \
5020     /usr/local/X11R5/lib  \
5021     /usr/local/X11R4/lib  \
5022                           \
5023     /usr/local/lib/X11    \
5024     /usr/local/lib/X11R6  \
5025     /usr/local/lib/X11R5  \
5026     /usr/local/lib/X11R4  \
5027                           \
5028     /usr/X386/lib         \
5029     /usr/x386/lib         \
5030     /usr/XFree86/lib/X11  \
5031                           \
5032     /usr/lib              \
5033     /usr/local/lib        \
5034     /usr/unsupported/lib  \
5035     /usr/athena/lib       \
5036     /usr/local/x11r5/lib  \
5037     /usr/lpp/Xamples/lib  \
5038     /lib/usr/lib/X11      \
5039                           \
5040     /usr/openwin/lib      \
5041     /usr/openwin/share/lib \
5042     ; \
5043 do
5044   for ac_extension in a so sl; do
5045     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5046       ac_x_libraries=$ac_dir
5047       break 2
5048     fi
5049   done
5050 done
5051 fi
5052 rm -f conftest*
5053 fi # $ac_x_libraries = NO
5054
5055 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5056   # Didn't find X anywhere.  Cache the known absence of X.
5057   ac_cv_have_x="have_x=no"
5058 else
5059   # Record where we found X for the cache.
5060   ac_cv_have_x="have_x=yes \
5061                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5062 fi
5063   fi
5064   eval "$ac_cv_have_x"
5065 fi # $with_x != no
5066
5067 if test "$have_x" != yes; then
5068   echo "$ac_t""$have_x" 1>&6
5069   no_x=yes
5070 else
5071   # If each of the values was on the command line, it overrides each guess.
5072   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5073   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5074   # Update the cache value to reflect the command line values.
5075   ac_cv_have_x="have_x=yes \
5076                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5077   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5078 fi
5079
5080 if test "$no_x" = yes; then
5081   # Not all programs may use this symbol, but it does not hurt to define it.
5082   { test "$extra_verbose" = "yes" && cat << \EOF
5083     Defining X_DISPLAY_MISSING
5084 EOF
5085 cat >> confdefs.h <<\EOF
5086 #define X_DISPLAY_MISSING 1
5087 EOF
5088 }
5089
5090   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5091 else
5092   if test -n "$x_includes"; then
5093     X_CFLAGS="$X_CFLAGS -I$x_includes"
5094   fi
5095
5096   # It would also be nice to do this for all -L options, not just this one.
5097   if test -n "$x_libraries"; then
5098     X_LIBS="$X_LIBS -L$x_libraries"
5099     # For Solaris; some versions of Sun CC require a space after -R and
5100     # others require no space.  Words are not sufficient . . . .
5101     case "`(uname -sr) 2>/dev/null`" in
5102     "SunOS 5"*)
5103       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5104 echo "configure:5105: checking whether -R must be followed by a space" >&5
5105       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5106       cat > conftest.$ac_ext <<EOF
5107 #line 5108 "configure"
5108 #include "confdefs.h"
5109
5110 int main() {
5111
5112 ; return 0; }
5113 EOF
5114 if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5115   rm -rf conftest*
5116   ac_R_nospace=yes
5117 else
5118   echo "configure: failed program was:" >&5
5119   cat conftest.$ac_ext >&5
5120   rm -rf conftest*
5121   ac_R_nospace=no
5122 fi
5123 rm -f conftest*
5124       if test $ac_R_nospace = yes; then
5125         echo "$ac_t""no" 1>&6
5126         X_LIBS="$X_LIBS -R$x_libraries"
5127       else
5128         LIBS="$ac_xsave_LIBS -R $x_libraries"
5129         cat > conftest.$ac_ext <<EOF
5130 #line 5131 "configure"
5131 #include "confdefs.h"
5132
5133 int main() {
5134
5135 ; return 0; }
5136 EOF
5137 if { (eval echo configure:5138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5138   rm -rf conftest*
5139   ac_R_space=yes
5140 else
5141   echo "configure: failed program was:" >&5
5142   cat conftest.$ac_ext >&5
5143   rm -rf conftest*
5144   ac_R_space=no
5145 fi
5146 rm -f conftest*
5147         if test $ac_R_space = yes; then
5148           echo "$ac_t""yes" 1>&6
5149           X_LIBS="$X_LIBS -R $x_libraries"
5150         else
5151           echo "$ac_t""neither works" 1>&6
5152         fi
5153       fi
5154       LIBS="$ac_xsave_LIBS"
5155     esac
5156   fi
5157
5158   # Check for system-dependent libraries X programs must link with.
5159   # Do this before checking for the system-independent R6 libraries
5160   # (-lICE), since we may need -lsocket or whatever for X linking.
5161
5162   if test "$ISC" = yes; then
5163     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5164   else
5165     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5166     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5167     # the Alpha needs dnet_stub (dnet does not exist).
5168     if test "$with_dnet" = "no" ; then
5169 ac_cv_lib_dnet_dnet_ntoa=no
5170 else
5171
5172 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5173 echo "configure:5174: checking for dnet_ntoa in -ldnet" >&5
5174 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5175
5176 xe_check_libs=" -ldnet "
5177 cat > conftest.$ac_ext <<EOF
5178 #line 5179 "configure"
5179 #include "confdefs.h"
5180 /* Override any gcc2 internal prototype to avoid an error.  */
5181 /* We use char because int might match the return type of a gcc2
5182     builtin and then its argument prototype would still apply.  */
5183 char dnet_ntoa();
5184
5185 int main() {
5186 dnet_ntoa()
5187 ; return 0; }
5188 EOF
5189 if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5190   rm -rf conftest*
5191   eval "ac_cv_lib_$ac_lib_var=yes"
5192 else
5193   echo "configure: failed program was:" >&5
5194   cat conftest.$ac_ext >&5
5195   rm -rf conftest*
5196   eval "ac_cv_lib_$ac_lib_var=no"
5197 fi
5198 rm -f conftest*
5199 xe_check_libs=""
5200
5201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5202   echo "$ac_t""yes" 1>&6
5203   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5204 else
5205   echo "$ac_t""no" 1>&6
5206 fi
5207
5208 fi
5209
5210     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5211       
5212 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5213 echo "configure:5214: checking for dnet_ntoa in -ldnet_stub" >&5
5214 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5215
5216 xe_check_libs=" -ldnet_stub "
5217 cat > conftest.$ac_ext <<EOF
5218 #line 5219 "configure"
5219 #include "confdefs.h"
5220 /* Override any gcc2 internal prototype to avoid an error.  */
5221 /* We use char because int might match the return type of a gcc2
5222     builtin and then its argument prototype would still apply.  */
5223 char dnet_ntoa();
5224
5225 int main() {
5226 dnet_ntoa()
5227 ; return 0; }
5228 EOF
5229 if { (eval echo configure:5230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5230   rm -rf conftest*
5231   eval "ac_cv_lib_$ac_lib_var=yes"
5232 else
5233   echo "configure: failed program was:" >&5
5234   cat conftest.$ac_ext >&5
5235   rm -rf conftest*
5236   eval "ac_cv_lib_$ac_lib_var=no"
5237 fi
5238 rm -f conftest*
5239 xe_check_libs=""
5240
5241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5242   echo "$ac_t""yes" 1>&6
5243   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5244 else
5245   echo "$ac_t""no" 1>&6
5246 fi
5247
5248
5249     fi
5250
5251     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5252     # to get the SysV transport functions.
5253     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5254     # needs -lnsl.
5255     # The nsl library prevents programs from opening the X display
5256     # on Irix 5.2, according to dickey@clark.net.
5257     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5258 echo "configure:5259: checking for gethostbyname" >&5
5259
5260 cat > conftest.$ac_ext <<EOF
5261 #line 5262 "configure"
5262 #include "confdefs.h"
5263 /* System header to define __stub macros and hopefully few prototypes,
5264     which can conflict with char gethostbyname(); below.  */
5265 #include <assert.h>
5266 /* Override any gcc2 internal prototype to avoid an error.  */
5267 /* We use char because int might match the return type of a gcc2
5268     builtin and then its argument prototype would still apply.  */
5269 char gethostbyname();
5270
5271 int main() {
5272
5273 /* The GNU C library defines this for functions which it implements
5274     to always fail with ENOSYS.  Some functions are actually named
5275     something starting with __ and the normal name is an alias.  */
5276 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5277 choke me
5278 #else
5279 gethostbyname();
5280 #endif
5281
5282 ; return 0; }
5283 EOF
5284 if { (eval echo configure:5285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5285   rm -rf conftest*
5286   eval "ac_cv_func_gethostbyname=yes"
5287 else
5288   echo "configure: failed program was:" >&5
5289   cat conftest.$ac_ext >&5
5290   rm -rf conftest*
5291   eval "ac_cv_func_gethostbyname=no"
5292 fi
5293 rm -f conftest*
5294
5295 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5296   echo "$ac_t""yes" 1>&6
5297   :
5298 else
5299   echo "$ac_t""no" 1>&6
5300 fi
5301
5302     if test $ac_cv_func_gethostbyname = no; then
5303       
5304 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5305 echo "configure:5306: checking for gethostbyname in -lnsl" >&5
5306 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5307
5308 xe_check_libs=" -lnsl "
5309 cat > conftest.$ac_ext <<EOF
5310 #line 5311 "configure"
5311 #include "confdefs.h"
5312 /* Override any gcc2 internal prototype to avoid an error.  */
5313 /* We use char because int might match the return type of a gcc2
5314     builtin and then its argument prototype would still apply.  */
5315 char gethostbyname();
5316
5317 int main() {
5318 gethostbyname()
5319 ; return 0; }
5320 EOF
5321 if { (eval echo configure:5322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5322   rm -rf conftest*
5323   eval "ac_cv_lib_$ac_lib_var=yes"
5324 else
5325   echo "configure: failed program was:" >&5
5326   cat conftest.$ac_ext >&5
5327   rm -rf conftest*
5328   eval "ac_cv_lib_$ac_lib_var=no"
5329 fi
5330 rm -f conftest*
5331 xe_check_libs=""
5332
5333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5334   echo "$ac_t""yes" 1>&6
5335   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5336 else
5337   echo "$ac_t""no" 1>&6
5338 fi
5339
5340
5341     fi
5342
5343     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5344     # socket/setsockopt and other routines are undefined under SCO ODT
5345     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5346     # on later versions), says simon@lia.di.epfl.ch: it contains
5347     # gethostby* variants that don't use the nameserver (or something).
5348     # -lsocket must be given before -lnsl if both are needed.
5349     # We assume that if connect needs -lnsl, so does gethostbyname.
5350     echo $ac_n "checking for connect""... $ac_c" 1>&6
5351 echo "configure:5352: checking for connect" >&5
5352
5353 cat > conftest.$ac_ext <<EOF
5354 #line 5355 "configure"
5355 #include "confdefs.h"
5356 /* System header to define __stub macros and hopefully few prototypes,
5357     which can conflict with char connect(); below.  */
5358 #include <assert.h>
5359 /* Override any gcc2 internal prototype to avoid an error.  */
5360 /* We use char because int might match the return type of a gcc2
5361     builtin and then its argument prototype would still apply.  */
5362 char connect();
5363
5364 int main() {
5365
5366 /* The GNU C library defines this for functions which it implements
5367     to always fail with ENOSYS.  Some functions are actually named
5368     something starting with __ and the normal name is an alias.  */
5369 #if defined (__stub_connect) || defined (__stub___connect)
5370 choke me
5371 #else
5372 connect();
5373 #endif
5374
5375 ; return 0; }
5376 EOF
5377 if { (eval echo configure:5378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5378   rm -rf conftest*
5379   eval "ac_cv_func_connect=yes"
5380 else
5381   echo "configure: failed program was:" >&5
5382   cat conftest.$ac_ext >&5
5383   rm -rf conftest*
5384   eval "ac_cv_func_connect=no"
5385 fi
5386 rm -f conftest*
5387
5388 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5389   echo "$ac_t""yes" 1>&6
5390   :
5391 else
5392   echo "$ac_t""no" 1>&6
5393 fi
5394
5395     if test $ac_cv_func_connect = no; then
5396       
5397 xe_msg_checking="for connect in -lsocket"
5398 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5399 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5400 echo "configure:5401: checking "$xe_msg_checking"" >&5
5401 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5402
5403 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5404 cat > conftest.$ac_ext <<EOF
5405 #line 5406 "configure"
5406 #include "confdefs.h"
5407 /* Override any gcc2 internal prototype to avoid an error.  */
5408 /* We use char because int might match the return type of a gcc2
5409     builtin and then its argument prototype would still apply.  */
5410 char connect();
5411
5412 int main() {
5413 connect()
5414 ; return 0; }
5415 EOF
5416 if { (eval echo configure:5417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5417   rm -rf conftest*
5418   eval "ac_cv_lib_$ac_lib_var=yes"
5419 else
5420   echo "configure: failed program was:" >&5
5421   cat conftest.$ac_ext >&5
5422   rm -rf conftest*
5423   eval "ac_cv_lib_$ac_lib_var=no"
5424 fi
5425 rm -f conftest*
5426 xe_check_libs=""
5427
5428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5429   echo "$ac_t""yes" 1>&6
5430   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5431 else
5432   echo "$ac_t""no" 1>&6
5433 fi
5434
5435
5436     fi
5437
5438     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5439     echo $ac_n "checking for remove""... $ac_c" 1>&6
5440 echo "configure:5441: checking for remove" >&5
5441
5442 cat > conftest.$ac_ext <<EOF
5443 #line 5444 "configure"
5444 #include "confdefs.h"
5445 /* System header to define __stub macros and hopefully few prototypes,
5446     which can conflict with char remove(); below.  */
5447 #include <assert.h>
5448 /* Override any gcc2 internal prototype to avoid an error.  */
5449 /* We use char because int might match the return type of a gcc2
5450     builtin and then its argument prototype would still apply.  */
5451 char remove();
5452
5453 int main() {
5454
5455 /* The GNU C library defines this for functions which it implements
5456     to always fail with ENOSYS.  Some functions are actually named
5457     something starting with __ and the normal name is an alias.  */
5458 #if defined (__stub_remove) || defined (__stub___remove)
5459 choke me
5460 #else
5461 remove();
5462 #endif
5463
5464 ; return 0; }
5465 EOF
5466 if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5467   rm -rf conftest*
5468   eval "ac_cv_func_remove=yes"
5469 else
5470   echo "configure: failed program was:" >&5
5471   cat conftest.$ac_ext >&5
5472   rm -rf conftest*
5473   eval "ac_cv_func_remove=no"
5474 fi
5475 rm -f conftest*
5476
5477 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5478   echo "$ac_t""yes" 1>&6
5479   :
5480 else
5481   echo "$ac_t""no" 1>&6
5482 fi
5483
5484     if test $ac_cv_func_remove = no; then
5485       
5486 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5487 echo "configure:5488: checking for remove in -lposix" >&5
5488 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5489
5490 xe_check_libs=" -lposix "
5491 cat > conftest.$ac_ext <<EOF
5492 #line 5493 "configure"
5493 #include "confdefs.h"
5494 /* Override any gcc2 internal prototype to avoid an error.  */
5495 /* We use char because int might match the return type of a gcc2
5496     builtin and then its argument prototype would still apply.  */
5497 char remove();
5498
5499 int main() {
5500 remove()
5501 ; return 0; }
5502 EOF
5503 if { (eval echo configure:5504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5504   rm -rf conftest*
5505   eval "ac_cv_lib_$ac_lib_var=yes"
5506 else
5507   echo "configure: failed program was:" >&5
5508   cat conftest.$ac_ext >&5
5509   rm -rf conftest*
5510   eval "ac_cv_lib_$ac_lib_var=no"
5511 fi
5512 rm -f conftest*
5513 xe_check_libs=""
5514
5515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5516   echo "$ac_t""yes" 1>&6
5517   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5518 else
5519   echo "$ac_t""no" 1>&6
5520 fi
5521
5522
5523     fi
5524
5525     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5526     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5527 echo "configure:5528: checking for shmat" >&5
5528
5529 cat > conftest.$ac_ext <<EOF
5530 #line 5531 "configure"
5531 #include "confdefs.h"
5532 /* System header to define __stub macros and hopefully few prototypes,
5533     which can conflict with char shmat(); below.  */
5534 #include <assert.h>
5535 /* Override any gcc2 internal prototype to avoid an error.  */
5536 /* We use char because int might match the return type of a gcc2
5537     builtin and then its argument prototype would still apply.  */
5538 char shmat();
5539
5540 int main() {
5541
5542 /* The GNU C library defines this for functions which it implements
5543     to always fail with ENOSYS.  Some functions are actually named
5544     something starting with __ and the normal name is an alias.  */
5545 #if defined (__stub_shmat) || defined (__stub___shmat)
5546 choke me
5547 #else
5548 shmat();
5549 #endif
5550
5551 ; return 0; }
5552 EOF
5553 if { (eval echo configure:5554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5554   rm -rf conftest*
5555   eval "ac_cv_func_shmat=yes"
5556 else
5557   echo "configure: failed program was:" >&5
5558   cat conftest.$ac_ext >&5
5559   rm -rf conftest*
5560   eval "ac_cv_func_shmat=no"
5561 fi
5562 rm -f conftest*
5563
5564 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5565   echo "$ac_t""yes" 1>&6
5566   :
5567 else
5568   echo "$ac_t""no" 1>&6
5569 fi
5570
5571     if test $ac_cv_func_shmat = no; then
5572       
5573 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5574 echo "configure:5575: checking for shmat in -lipc" >&5
5575 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5576
5577 xe_check_libs=" -lipc "
5578 cat > conftest.$ac_ext <<EOF
5579 #line 5580 "configure"
5580 #include "confdefs.h"
5581 /* Override any gcc2 internal prototype to avoid an error.  */
5582 /* We use char because int might match the return type of a gcc2
5583     builtin and then its argument prototype would still apply.  */
5584 char shmat();
5585
5586 int main() {
5587 shmat()
5588 ; return 0; }
5589 EOF
5590 if { (eval echo configure:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5591   rm -rf conftest*
5592   eval "ac_cv_lib_$ac_lib_var=yes"
5593 else
5594   echo "configure: failed program was:" >&5
5595   cat conftest.$ac_ext >&5
5596   rm -rf conftest*
5597   eval "ac_cv_lib_$ac_lib_var=no"
5598 fi
5599 rm -f conftest*
5600 xe_check_libs=""
5601
5602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5603   echo "$ac_t""yes" 1>&6
5604   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5605 else
5606   echo "$ac_t""no" 1>&6
5607 fi
5608
5609
5610     fi
5611   fi
5612
5613   # Check for libraries that X11R6 Xt/Xaw programs need.
5614   ac_save_LDFLAGS="$LDFLAGS"
5615   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5616   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5617   # check for ICE first), but we must link in the order -lSM -lICE or
5618   # we get undefined symbols.  So assume we have SM if we have ICE.
5619   # These have to be linked with before -lX11, unlike the other
5620   # libraries we check for below, so use a different variable.
5621   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5622   
5623 xe_msg_checking="for IceConnectionNumber in -lICE"
5624 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5625 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5626 echo "configure:5627: checking "$xe_msg_checking"" >&5
5627 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5628
5629 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5630 cat > conftest.$ac_ext <<EOF
5631 #line 5632 "configure"
5632 #include "confdefs.h"
5633 /* Override any gcc2 internal prototype to avoid an error.  */
5634 /* We use char because int might match the return type of a gcc2
5635     builtin and then its argument prototype would still apply.  */
5636 char IceConnectionNumber();
5637
5638 int main() {
5639 IceConnectionNumber()
5640 ; return 0; }
5641 EOF
5642 if { (eval echo configure:5643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5643   rm -rf conftest*
5644   eval "ac_cv_lib_$ac_lib_var=yes"
5645 else
5646   echo "configure: failed program was:" >&5
5647   cat conftest.$ac_ext >&5
5648   rm -rf conftest*
5649   eval "ac_cv_lib_$ac_lib_var=no"
5650 fi
5651 rm -f conftest*
5652 xe_check_libs=""
5653
5654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5655   echo "$ac_t""yes" 1>&6
5656   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5657 else
5658   echo "$ac_t""no" 1>&6
5659 fi
5660
5661
5662   LDFLAGS="$ac_save_LDFLAGS"
5663
5664 fi
5665  # Autoconf claims to find X library and include dirs for us.
5666   if test "$no_x" = "yes"
5667   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5668   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5669   fi
5670 fi
5671
5672 case "$with_x11" in
5673   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5674   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5675 esac
5676
5677 if test "$with_x11" = "yes"; then
5678   { test "$extra_verbose" = "yes" && cat << \EOF
5679     Defining HAVE_X_WINDOWS
5680 EOF
5681 cat >> confdefs.h <<\EOF
5682 #define HAVE_X_WINDOWS 1
5683 EOF
5684 }
5685
5686   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5687   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5688
5689       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5690     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5691     if test -d "$lib_dir" -a -d "$inc_dir"; then
5692       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5693         x_libraries="$lib_dir $x_libraries"
5694         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5695       esac
5696       case "$x_includes" in "$inc_dir"* ) ;; *)
5697         x_includes="$inc_dir $x_includes"
5698         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5699       esac
5700       break;       fi
5701   done
5702
5703     for rel in "X11R6" "X11R5" "X11R4"; do
5704     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5705     if test -d "$lib_dir" -a -d "$inc_dir"; then
5706       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5707         x_libraries="$x_libraries $lib_dir"
5708         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5709       esac
5710       case "$x_includes" in "$inc_dir"* ) ;; *)
5711         x_includes="$x_includes $inc_dir"
5712         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5713       esac
5714       break;     fi
5715   done
5716
5717     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
5718
5719   ld_switch_x_site="$X_LIBS"
5720
5721   
5722 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5723     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5724   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5725   
5726         runpath="" runpath_dirs=""
5727   if test -n "$LD_RUN_PATH"; then
5728     runpath="$LD_RUN_PATH"
5729   elif test "$GCC" = "yes"; then
5730         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5731     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5732     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5733     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5734       case "$arg" in P,* | -L* | -R* )
5735         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5736           {
5737 xe_runpath_dir="$dir"
5738   test "$xe_runpath_dir" != "/lib"     -a \
5739         "$xe_runpath_dir" != "/usr/lib" -a \
5740         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5741   eval "$xe_add_unique_runpath_dir"
5742 }
5743         done ;;
5744       esac
5745     done
5746     ld_switch_run="$ld_switch_run_save"
5747     rm -f conftest*
5748   else
5749         for arg in $ld_switch_site $ld_switch_x_site; do
5750       case "$arg" in -L*) {
5751 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5752   test "$xe_runpath_dir" != "/lib"     -a \
5753         "$xe_runpath_dir" != "/usr/lib" -a \
5754         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5755   eval "$xe_add_unique_runpath_dir"
5756 };; esac
5757     done
5758         if test "$opsys $need_motif" = "sol2 yes"; then
5759       xe_runpath_dir="/opt/SUNWdt/lib";
5760       eval "$xe_add_unique_runpath_dir";
5761     fi
5762   fi 
5763   if test -n "$runpath"; then
5764     ld_switch_run="${dash_r}${runpath}"
5765     
5766 if test "$GCC" = "yes"; then
5767   set x $ld_switch_run; shift; ld_switch_run=""
5768   while test -n "$1"; do
5769     case $1 in
5770       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5771       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5772       -Xlinker* ) ;;
5773       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5774     esac
5775     shift
5776   done
5777 fi
5778     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5779   fi
5780 fi
5781
5782
5783   if test "$extra_verbose" = "yes"; then
5784     echo; echo "X11 compilation variables:"
5785     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5786     echo
5787   fi
5788
5789             bitmapdirs=
5790   if test "$x_includes" != NONE; then
5791     for i in $x_includes; do
5792       if test -d "$i/bitmaps"; then
5793         bitmapdirs="$i/bitmaps:$bitmapdirs"
5794       fi
5795       if test -d "$i/X11/bitmaps"; then
5796         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5797       fi
5798     done
5799     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5800   fi
5801   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5802     Defining BITMAPDIR = "$bitmapdirs"
5803 EOF
5804 cat >> confdefs.h <<EOF
5805 #define BITMAPDIR "$bitmapdirs"
5806 EOF
5807 }
5808
5809
5810     echo "checking for X defines extracted by xmkmf" 1>&6
5811 echo "configure:5812: checking for X defines extracted by xmkmf" >&5
5812   rm -fr conftestdir
5813   if mkdir conftestdir; then
5814     cd conftestdir
5815     cat > Imakefile <<'EOF'
5816 xetest:
5817         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5818 EOF
5819     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5820       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5821       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5822     fi
5823     cd ..
5824     rm -fr conftestdir
5825     for word in $xmkmf_defines; do
5826       case "$word" in
5827         -D*=* ) ;;
5828         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5829               { test "$extra_verbose" = "yes" && cat << EOF
5830     Defining $word
5831 EOF
5832 cat >> confdefs.h <<EOF
5833 #define $word 1
5834 EOF
5835 }
5836  ;;
5837       esac
5838     done
5839   fi
5840
5841     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5842 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5843 echo "configure:5844: checking for X11/Intrinsic.h" >&5
5844
5845 cat > conftest.$ac_ext <<EOF
5846 #line 5847 "configure"
5847 #include "confdefs.h"
5848 #include <X11/Intrinsic.h>
5849 EOF
5850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5851 { (eval echo configure:5852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5853 if test -z "$ac_err"; then
5854   rm -rf conftest*
5855   eval "ac_cv_header_$ac_safe=yes"
5856 else
5857   echo "$ac_err" >&5
5858   echo "configure: failed program was:" >&5
5859   cat conftest.$ac_ext >&5
5860   rm -rf conftest*
5861   eval "ac_cv_header_$ac_safe=no"
5862 fi
5863 rm -f conftest*
5864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5865   echo "$ac_t""yes" 1>&6
5866   :
5867 else
5868   echo "$ac_t""no" 1>&6
5869 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5870 fi
5871
5872
5873       
5874 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5875 echo "configure:5876: checking for XOpenDisplay in -lX11" >&5
5876 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5877
5878 xe_check_libs=" -lX11 "
5879 cat > conftest.$ac_ext <<EOF
5880 #line 5881 "configure"
5881 #include "confdefs.h"
5882 /* Override any gcc2 internal prototype to avoid an error.  */
5883 /* We use char because int might match the return type of a gcc2
5884     builtin and then its argument prototype would still apply.  */
5885 char XOpenDisplay();
5886
5887 int main() {
5888 XOpenDisplay()
5889 ; return 0; }
5890 EOF
5891 if { (eval echo configure:5892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5892   rm -rf conftest*
5893   eval "ac_cv_lib_$ac_lib_var=yes"
5894 else
5895   echo "configure: failed program was:" >&5
5896   cat conftest.$ac_ext >&5
5897   rm -rf conftest*
5898   eval "ac_cv_lib_$ac_lib_var=no"
5899 fi
5900 rm -f conftest*
5901 xe_check_libs=""
5902
5903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5904   echo "$ac_t""yes" 1>&6
5905   have_lib_x11=yes
5906 else
5907   echo "$ac_t""no" 1>&6
5908 fi
5909
5910
5911   if test "$have_lib_x11" != "yes"; then
5912     
5913 xe_msg_checking="for XGetFontProperty in -lX11"
5914 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5915 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5916 echo "configure:5917: checking "$xe_msg_checking"" >&5
5917 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5918
5919 xe_check_libs=" -lX11 -b i486-linuxaout"
5920 cat > conftest.$ac_ext <<EOF
5921 #line 5922 "configure"
5922 #include "confdefs.h"
5923 /* Override any gcc2 internal prototype to avoid an error.  */
5924 /* We use char because int might match the return type of a gcc2
5925     builtin and then its argument prototype would still apply.  */
5926 char XGetFontProperty();
5927
5928 int main() {
5929 XGetFontProperty()
5930 ; return 0; }
5931 EOF
5932 if { (eval echo configure:5933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5933   rm -rf conftest*
5934   eval "ac_cv_lib_$ac_lib_var=yes"
5935 else
5936   echo "configure: failed program was:" >&5
5937   cat conftest.$ac_ext >&5
5938   rm -rf conftest*
5939   eval "ac_cv_lib_$ac_lib_var=no"
5940 fi
5941 rm -f conftest*
5942 xe_check_libs=""
5943
5944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5945   echo "$ac_t""yes" 1>&6
5946   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5947 else
5948   echo "$ac_t""no" 1>&6
5949 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5950 fi
5951
5952
5953   fi
5954   libs_x="-lX11"
5955   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5956
5957     
5958 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5959 echo "configure:5960: checking for XShapeSelectInput in -lXext" >&5
5960 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5961
5962 xe_check_libs=" -lXext "
5963 cat > conftest.$ac_ext <<EOF
5964 #line 5965 "configure"
5965 #include "confdefs.h"
5966 /* Override any gcc2 internal prototype to avoid an error.  */
5967 /* We use char because int might match the return type of a gcc2
5968     builtin and then its argument prototype would still apply.  */
5969 char XShapeSelectInput();
5970
5971 int main() {
5972 XShapeSelectInput()
5973 ; return 0; }
5974 EOF
5975 if { (eval echo configure:5976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5976   rm -rf conftest*
5977   eval "ac_cv_lib_$ac_lib_var=yes"
5978 else
5979   echo "configure: failed program was:" >&5
5980   cat conftest.$ac_ext >&5
5981   rm -rf conftest*
5982   eval "ac_cv_lib_$ac_lib_var=no"
5983 fi
5984 rm -f conftest*
5985 xe_check_libs=""
5986
5987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5988   echo "$ac_t""yes" 1>&6
5989   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5990 else
5991   echo "$ac_t""no" 1>&6
5992 fi
5993
5994
5995
5996     
5997 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5998 echo "configure:5999: checking for XtOpenDisplay in -lXt" >&5
5999 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6000
6001 xe_check_libs=" -lXt "
6002 cat > conftest.$ac_ext <<EOF
6003 #line 6004 "configure"
6004 #include "confdefs.h"
6005 /* Override any gcc2 internal prototype to avoid an error.  */
6006 /* We use char because int might match the return type of a gcc2
6007     builtin and then its argument prototype would still apply.  */
6008 char XtOpenDisplay();
6009
6010 int main() {
6011 XtOpenDisplay()
6012 ; return 0; }
6013 EOF
6014 if { (eval echo configure:6015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6015   rm -rf conftest*
6016   eval "ac_cv_lib_$ac_lib_var=yes"
6017 else
6018   echo "configure: failed program was:" >&5
6019   cat conftest.$ac_ext >&5
6020   rm -rf conftest*
6021   eval "ac_cv_lib_$ac_lib_var=no"
6022 fi
6023 rm -f conftest*
6024 xe_check_libs=""
6025
6026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6027   echo "$ac_t""yes" 1>&6
6028   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6029 else
6030   echo "$ac_t""no" 1>&6
6031 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6032 fi
6033
6034
6035
6036   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6037 echo "configure:6038: checking the version of X11 being used" >&5
6038   cat > conftest.$ac_ext <<EOF
6039 #line 6040 "configure"
6040 #include "confdefs.h"
6041 #include <X11/Intrinsic.h>
6042     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6043 EOF
6044 if { (eval echo configure:6045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6045 then
6046   ./conftest foobar; x11_release=$?
6047 else
6048   conftest_rc="$?"
6049   echo "configure: failed program was:" >&5
6050   cat conftest.$ac_ext >&5
6051   rm -fr conftest*
6052   x11_release=4
6053 fi
6054 rm -fr conftest*
6055   echo "$ac_t""R${x11_release}" 1>&6
6056   { test "$extra_verbose" = "yes" && cat << EOF
6057     Defining THIS_IS_X11R${x11_release}
6058 EOF
6059 cat >> confdefs.h <<EOF
6060 #define THIS_IS_X11R${x11_release} 1
6061 EOF
6062 }
6063
6064
6065   for ac_func in XConvertCase
6066 do
6067 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6068 echo "configure:6069: checking for $ac_func" >&5
6069
6070 cat > conftest.$ac_ext <<EOF
6071 #line 6072 "configure"
6072 #include "confdefs.h"
6073 /* System header to define __stub macros and hopefully few prototypes,
6074     which can conflict with char $ac_func(); below.  */
6075 #include <assert.h>
6076 /* Override any gcc2 internal prototype to avoid an error.  */
6077 /* We use char because int might match the return type of a gcc2
6078     builtin and then its argument prototype would still apply.  */
6079 char $ac_func();
6080
6081 int main() {
6082
6083 /* The GNU C library defines this for functions which it implements
6084     to always fail with ENOSYS.  Some functions are actually named
6085     something starting with __ and the normal name is an alias.  */
6086 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6087 choke me
6088 #else
6089 $ac_func();
6090 #endif
6091
6092 ; return 0; }
6093 EOF
6094 if { (eval echo configure:6095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6095   rm -rf conftest*
6096   eval "ac_cv_func_$ac_func=yes"
6097 else
6098   echo "configure: failed program was:" >&5
6099   cat conftest.$ac_ext >&5
6100   rm -rf conftest*
6101   eval "ac_cv_func_$ac_func=no"
6102 fi
6103 rm -f conftest*
6104
6105 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6106   echo "$ac_t""yes" 1>&6
6107     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6108   { test "$extra_verbose" = "yes" && cat << EOF
6109     Defining $ac_tr_func
6110 EOF
6111 cat >> confdefs.h <<EOF
6112 #define $ac_tr_func 1
6113 EOF
6114 }
6115  
6116 else
6117   echo "$ac_t""no" 1>&6
6118 fi
6119 done
6120
6121
6122   for ac_hdr in X11/Xlocale.h
6123 do
6124 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6125 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6126 echo "configure:6127: checking for $ac_hdr" >&5
6127
6128 cat > conftest.$ac_ext <<EOF
6129 #line 6130 "configure"
6130 #include "confdefs.h"
6131 #include <$ac_hdr>
6132 EOF
6133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6134 { (eval echo configure:6135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6136 if test -z "$ac_err"; then
6137   rm -rf conftest*
6138   eval "ac_cv_header_$ac_safe=yes"
6139 else
6140   echo "$ac_err" >&5
6141   echo "configure: failed program was:" >&5
6142   cat conftest.$ac_ext >&5
6143   rm -rf conftest*
6144   eval "ac_cv_header_$ac_safe=no"
6145 fi
6146 rm -f conftest*
6147 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6148   echo "$ac_t""yes" 1>&6
6149     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6150   { test "$extra_verbose" = "yes" && cat << EOF
6151     Defining $ac_tr_hdr
6152 EOF
6153 cat >> confdefs.h <<EOF
6154 #define $ac_tr_hdr 1
6155 EOF
6156 }
6157  
6158 else
6159   echo "$ac_t""no" 1>&6
6160 fi
6161 done
6162
6163
6164     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6165 echo "configure:6166: checking for XFree86" >&5
6166   if test -d "/usr/X386/include" -o \
6167           -f "/etc/XF86Config"    -o \
6168           -f "/etc/X11/XF86Config" -o \
6169           -f "/usr/X11R6/lib/X11/XF86Config"; then
6170     echo "$ac_t""yes" 1>&6
6171     { test "$extra_verbose" = "yes" && cat << \EOF
6172     Defining HAVE_XFREE386
6173 EOF
6174 cat >> confdefs.h <<\EOF
6175 #define HAVE_XFREE386 1
6176 EOF
6177 }
6178
6179   else
6180     echo "$ac_t""no" 1>&6
6181   fi
6182
6183     test -z "$with_xmu" && { 
6184 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6185 echo "configure:6186: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6186 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6187
6188 xe_check_libs=" -lXmu "
6189 cat > conftest.$ac_ext <<EOF
6190 #line 6191 "configure"
6191 #include "confdefs.h"
6192 /* Override any gcc2 internal prototype to avoid an error.  */
6193 /* We use char because int might match the return type of a gcc2
6194     builtin and then its argument prototype would still apply.  */
6195 char XmuReadBitmapDataFromFile();
6196
6197 int main() {
6198 XmuReadBitmapDataFromFile()
6199 ; return 0; }
6200 EOF
6201 if { (eval echo configure:6202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6202   rm -rf conftest*
6203   eval "ac_cv_lib_$ac_lib_var=yes"
6204 else
6205   echo "configure: failed program was:" >&5
6206   cat conftest.$ac_ext >&5
6207   rm -rf conftest*
6208   eval "ac_cv_lib_$ac_lib_var=no"
6209 fi
6210 rm -f conftest*
6211 xe_check_libs=""
6212
6213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6214   echo "$ac_t""yes" 1>&6
6215   with_xmu=yes
6216 else
6217   echo "$ac_t""no" 1>&6
6218 with_xmu=no
6219 fi
6220
6221  }
6222   if test "$with_xmu" = "no"; then
6223     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6224    echo "    xemacs will be linked with \"xmu.o\""
6225  fi
6226   else
6227     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6228     { test "$extra_verbose" = "yes" && cat << \EOF
6229     Defining HAVE_XMU
6230 EOF
6231 cat >> confdefs.h <<\EOF
6232 #define HAVE_XMU 1
6233 EOF
6234 }
6235
6236   fi
6237
6238       
6239 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6240 echo "configure:6241: checking for main in -lXbsd" >&5
6241 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6242
6243 xe_check_libs=" -lXbsd "
6244 cat > conftest.$ac_ext <<EOF
6245 #line 6246 "configure"
6246 #include "confdefs.h"
6247
6248 int main() {
6249 main()
6250 ; return 0; }
6251 EOF
6252 if { (eval echo configure:6253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6253   rm -rf conftest*
6254   eval "ac_cv_lib_$ac_lib_var=yes"
6255 else
6256   echo "configure: failed program was:" >&5
6257   cat conftest.$ac_ext >&5
6258   rm -rf conftest*
6259   eval "ac_cv_lib_$ac_lib_var=no"
6260 fi
6261 rm -f conftest*
6262 xe_check_libs=""
6263
6264 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6265   echo "$ac_t""yes" 1>&6
6266   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6267 else
6268   echo "$ac_t""no" 1>&6
6269 fi
6270
6271
6272
6273     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6274         if test "$GCC" = "yes"; then
6275       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6276       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6277     else
6278       case "$CC" in
6279         "xlc" ) CC="xlc_r" ;;
6280         "xlC" ) CC="xlC_r" ;;
6281         "cc"  ) CC="cc_r" ;;
6282       esac
6283     fi
6284   fi
6285
6286 fi 
6287 if test "$with_msw" != "no"; then
6288   echo "checking for MS-Windows" 1>&6
6289 echo "configure:6290: checking for MS-Windows" >&5
6290   
6291 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6292 echo "configure:6293: checking for main in -lgdi32" >&5
6293 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6294
6295 xe_check_libs=" -lgdi32 "
6296 cat > conftest.$ac_ext <<EOF
6297 #line 6298 "configure"
6298 #include "confdefs.h"
6299
6300 int main() {
6301 main()
6302 ; return 0; }
6303 EOF
6304 if { (eval echo configure:6305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6305   rm -rf conftest*
6306   eval "ac_cv_lib_$ac_lib_var=yes"
6307 else
6308   echo "configure: failed program was:" >&5
6309   cat conftest.$ac_ext >&5
6310   rm -rf conftest*
6311   eval "ac_cv_lib_$ac_lib_var=no"
6312 fi
6313 rm -f conftest*
6314 xe_check_libs=""
6315
6316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6317   echo "$ac_t""yes" 1>&6
6318   with_msw=yes
6319 else
6320   echo "$ac_t""no" 1>&6
6321 fi
6322
6323
6324   if test "$with_msw" = "yes"; then
6325     { test "$extra_verbose" = "yes" && cat << \EOF
6326     Defining HAVE_MS_WINDOWS
6327 EOF
6328 cat >> confdefs.h <<\EOF
6329 #define HAVE_MS_WINDOWS 1
6330 EOF
6331 }
6332
6333     install_pp="$blddir/lib-src/installexe.sh"
6334     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
6335     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6336     if test "$window_system" != x11; then
6337         window_system=msw
6338         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6339             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6340    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6341  fi
6342         test "$with_menubars"   != "no" && with_menubars=msw \
6343             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6344    echo "    xemacs will be linked with \"menubar-msw.o\""
6345  fi
6346         test "$with_toolbars"   != "no" && with_toolbars=msw \
6347             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6348    echo "    xemacs will be linked with \"toolbar-msw.o\""
6349  fi
6350         test "$with_dialogs"   != "no" && with_dialogs=msw \
6351             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6352    echo "    xemacs will be linked with \"dialog-msw.o\""
6353  fi
6354         test "$with_widgets"   != "no" && with_widgets=msw
6355     else
6356         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6357    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6358  fi
6359         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6360    echo "    xemacs will be linked with \"menubar-msw.o\""
6361  fi
6362         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6363    echo "    xemacs will be linked with \"toolbar-msw.o\""
6364  fi
6365         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6366    echo "    xemacs will be linked with \"dialog-msw.o\""
6367  fi
6368     fi
6369         cat > conftest.$ac_ext <<EOF
6370 #line 6371 "configure"
6371 #include "confdefs.h"
6372 #include <fcntl.h>
6373     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6374 EOF
6375 if { (eval echo configure:6376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6376 then
6377   { test "$extra_verbose" = "yes" && cat << \EOF
6378     Defining HAVE_MSG_SELECT
6379 EOF
6380 cat >> confdefs.h <<\EOF
6381 #define HAVE_MSG_SELECT 1
6382 EOF
6383 }
6384
6385 else
6386   conftest_rc="$?"
6387   echo "configure: failed program was:" >&5
6388   cat conftest.$ac_ext >&5
6389 fi
6390 rm -fr conftest*
6391     with_file_coding=yes
6392     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
6393    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\""
6394  fi
6395   fi
6396 fi
6397
6398
6399
6400 test -z "$window_system" && window_system="none"
6401
6402 if test "$window_system" = "none"; then
6403   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6404   do
6405     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6406        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6407     fi
6408     eval "with_${feature}=no"
6409   done
6410 else
6411   test -z "$with_toolbars" && with_toolbars=yes
6412 fi
6413
6414 if test "$with_msw" != "yes"; then
6415   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6416   do
6417     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6418        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6419     fi
6420     eval "with_${feature}=no"
6421   done
6422 else
6423   :
6424 fi
6425
6426 if test "$with_x11" != "yes"; then
6427             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6428   do
6429     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6430        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6431     fi
6432     eval "with_${feature}=no"
6433   done
6434 fi
6435
6436 bitmapdir=
6437
6438 case "$window_system" in
6439   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6440   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6441   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6442 esac
6443
6444 case "$x_libraries" in *X11R4* )
6445   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6446   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6447 esac
6448
6449 echo "checking for WM_COMMAND option" 1>&6
6450 echo "configure:6451: checking for WM_COMMAND option" >&5;
6451 if test "$with_wmcommand" != "no"; then
6452   { test "$extra_verbose" = "yes" && cat << \EOF
6453     Defining HAVE_WMCOMMAND
6454 EOF
6455 cat >> confdefs.h <<\EOF
6456 #define HAVE_WMCOMMAND 1
6457 EOF
6458 }
6459
6460 fi
6461
6462 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6463 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6464 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6465 echo "configure:6466: checking for X11/Xauth.h" >&5
6466
6467 cat > conftest.$ac_ext <<EOF
6468 #line 6469 "configure"
6469 #include "confdefs.h"
6470 #include <X11/Xauth.h>
6471 EOF
6472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6473 { (eval echo configure:6474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6475 if test -z "$ac_err"; then
6476   rm -rf conftest*
6477   eval "ac_cv_header_$ac_safe=yes"
6478 else
6479   echo "$ac_err" >&5
6480   echo "configure: failed program was:" >&5
6481   cat conftest.$ac_ext >&5
6482   rm -rf conftest*
6483   eval "ac_cv_header_$ac_safe=no"
6484 fi
6485 rm -f conftest*
6486 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6487   echo "$ac_t""yes" 1>&6
6488   :
6489 else
6490   echo "$ac_t""no" 1>&6
6491 with_xauth=no
6492 fi
6493  }
6494 test -z "$with_xauth" && { 
6495 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6496 echo "configure:6497: checking for XauGetAuthByAddr in -lXau" >&5
6497 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6498
6499 xe_check_libs=" -lXau "
6500 cat > conftest.$ac_ext <<EOF
6501 #line 6502 "configure"
6502 #include "confdefs.h"
6503 /* Override any gcc2 internal prototype to avoid an error.  */
6504 /* We use char because int might match the return type of a gcc2
6505     builtin and then its argument prototype would still apply.  */
6506 char XauGetAuthByAddr();
6507
6508 int main() {
6509 XauGetAuthByAddr()
6510 ; return 0; }
6511 EOF
6512 if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6513   rm -rf conftest*
6514   eval "ac_cv_lib_$ac_lib_var=yes"
6515 else
6516   echo "configure: failed program was:" >&5
6517   cat conftest.$ac_ext >&5
6518   rm -rf conftest*
6519   eval "ac_cv_lib_$ac_lib_var=no"
6520 fi
6521 rm -f conftest*
6522 xe_check_libs=""
6523
6524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6525   echo "$ac_t""yes" 1>&6
6526   :
6527 else
6528   echo "$ac_t""no" 1>&6
6529 with_xauth=no
6530 fi
6531
6532  }
6533 test -z "$with_xauth" && with_xauth=yes
6534 if test "$with_xauth" = "yes"; then
6535   { test "$extra_verbose" = "yes" && cat << \EOF
6536     Defining HAVE_XAUTH
6537 EOF
6538 cat >> confdefs.h <<\EOF
6539 #define HAVE_XAUTH 1
6540 EOF
6541 }
6542
6543   
6544 T=""
6545 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
6546 libs_xauth="$T"
6547
6548 fi
6549
6550
6551
6552
6553 if test "$with_tooltalk" != "no" ; then
6554       for dir in "" "Tt/" "desktop/" ; do
6555     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6556 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6557 echo "configure:6558: checking for ${dir}tt_c.h" >&5
6558
6559 cat > conftest.$ac_ext <<EOF
6560 #line 6561 "configure"
6561 #include "confdefs.h"
6562 #include <${dir}tt_c.h>
6563 EOF
6564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6565 { (eval echo configure:6566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6567 if test -z "$ac_err"; then
6568   rm -rf conftest*
6569   eval "ac_cv_header_$ac_safe=yes"
6570 else
6571   echo "$ac_err" >&5
6572   echo "configure: failed program was:" >&5
6573   cat conftest.$ac_ext >&5
6574   rm -rf conftest*
6575   eval "ac_cv_header_$ac_safe=no"
6576 fi
6577 rm -f conftest*
6578 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6579   echo "$ac_t""yes" 1>&6
6580   tt_c_h_path="${dir}tt_c.h"; break
6581 else
6582   echo "$ac_t""no" 1>&6
6583 fi
6584
6585   done
6586   if test -z "$tt_c_h_path"; then
6587     if test "$with_tooltalk" = "yes"; then
6588       (echo "$progname: Usage error:"
6589 echo " " "Unable to find required tooltalk header files."
6590 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6591     fi
6592     with_tooltalk=no
6593   fi
6594 fi
6595 if test "$with_tooltalk" != "no" ; then
6596   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6597     
6598 xe_msg_checking="for tt_message_create in -ltt"
6599 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6600 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6601 echo "configure:6602: checking "$xe_msg_checking"" >&5
6602 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6603
6604 xe_check_libs=" -ltt $extra_libs"
6605 cat > conftest.$ac_ext <<EOF
6606 #line 6607 "configure"
6607 #include "confdefs.h"
6608 /* Override any gcc2 internal prototype to avoid an error.  */
6609 /* We use char because int might match the return type of a gcc2
6610     builtin and then its argument prototype would still apply.  */
6611 char tt_message_create();
6612
6613 int main() {
6614 tt_message_create()
6615 ; return 0; }
6616 EOF
6617 if { (eval echo configure:6618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6618   rm -rf conftest*
6619   eval "ac_cv_lib_$ac_lib_var=yes"
6620 else
6621   echo "configure: failed program was:" >&5
6622   cat conftest.$ac_ext >&5
6623   rm -rf conftest*
6624   eval "ac_cv_lib_$ac_lib_var=no"
6625 fi
6626 rm -f conftest*
6627 xe_check_libs=""
6628
6629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6630   echo "$ac_t""yes" 1>&6
6631   tt_libs="-ltt $extra_libs"; break
6632 else
6633   echo "$ac_t""no" 1>&6
6634 :
6635 fi
6636
6637
6638   done
6639   if test -z "$tt_libs"; then
6640     if test "$with_tooltalk" = "yes"; then
6641       (echo "$progname: Usage error:"
6642 echo " " "Unable to find required tooltalk libraries."
6643 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6644     fi
6645     with_tooltalk=no
6646   fi
6647 fi
6648 test -z "$with_tooltalk" && with_tooltalk=yes
6649 if test "$with_tooltalk" = "yes"; then
6650   { test "$extra_verbose" = "yes" && cat << \EOF
6651     Defining TOOLTALK
6652 EOF
6653 cat >> confdefs.h <<\EOF
6654 #define TOOLTALK 1
6655 EOF
6656 }
6657
6658   { test "$extra_verbose" = "yes" && cat << EOF
6659     Defining TT_C_H_PATH = "$tt_c_h_path"
6660 EOF
6661 cat >> confdefs.h <<EOF
6662 #define TT_C_H_PATH "$tt_c_h_path"
6663 EOF
6664 }
6665
6666   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6667   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6668    echo "    xemacs will be linked with \"tooltalk.o\""
6669  fi
6670 fi
6671
6672 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6673 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6674 echo "configure:6675: checking for Dt/Dt.h" >&5
6675
6676 cat > conftest.$ac_ext <<EOF
6677 #line 6678 "configure"
6678 #include "confdefs.h"
6679 #include <Dt/Dt.h>
6680 EOF
6681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6682 { (eval echo configure:6683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6684 if test -z "$ac_err"; then
6685   rm -rf conftest*
6686   eval "ac_cv_header_$ac_safe=yes"
6687 else
6688   echo "$ac_err" >&5
6689   echo "configure: failed program was:" >&5
6690   cat conftest.$ac_ext >&5
6691   rm -rf conftest*
6692   eval "ac_cv_header_$ac_safe=no"
6693 fi
6694 rm -f conftest*
6695 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6696   echo "$ac_t""yes" 1>&6
6697   :
6698 else
6699   echo "$ac_t""no" 1>&6
6700 with_cde=no
6701 fi
6702  }
6703 test -z "$with_cde" && { 
6704 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6705 echo "configure:6706: checking for DtDndDragStart in -lDtSvc" >&5
6706 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6707
6708 xe_check_libs=" -lDtSvc "
6709 cat > conftest.$ac_ext <<EOF
6710 #line 6711 "configure"
6711 #include "confdefs.h"
6712 /* Override any gcc2 internal prototype to avoid an error.  */
6713 /* We use char because int might match the return type of a gcc2
6714     builtin and then its argument prototype would still apply.  */
6715 char DtDndDragStart();
6716
6717 int main() {
6718 DtDndDragStart()
6719 ; return 0; }
6720 EOF
6721 if { (eval echo configure:6722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6722   rm -rf conftest*
6723   eval "ac_cv_lib_$ac_lib_var=yes"
6724 else
6725   echo "configure: failed program was:" >&5
6726   cat conftest.$ac_ext >&5
6727   rm -rf conftest*
6728   eval "ac_cv_lib_$ac_lib_var=no"
6729 fi
6730 rm -f conftest*
6731 xe_check_libs=""
6732
6733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6734   echo "$ac_t""yes" 1>&6
6735   :
6736 else
6737   echo "$ac_t""no" 1>&6
6738 with_cde=no
6739 fi
6740
6741  }
6742 test -z "$with_cde" && with_cde=yes
6743 if test "$with_dragndrop" = no; then
6744   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6745   with_cde=no
6746 fi
6747 if test "$with_cde" = "yes" ; then
6748   { test "$extra_verbose" = "yes" && cat << \EOF
6749     Defining HAVE_CDE
6750 EOF
6751 cat >> confdefs.h <<\EOF
6752 #define HAVE_CDE 1
6753 EOF
6754 }
6755
6756   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6757   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6758   with_tooltalk=yes # CDE requires Tooltalk
6759   need_motif=yes    # CDE requires Motif
6760 fi
6761
6762 test "$window_system" != "x11" && with_offix=no
6763 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6764   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6765   with_offix=no
6766 fi
6767 if test "$with_dragndrop" = no; then
6768   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6769   with_offix=no
6770 fi
6771 if test "$with_cde" = yes; then
6772   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6773   with_offix=no
6774 fi
6775 test -z "$with_offix" && with_offix=no
6776 if test "$with_offix" = "yes"; then
6777   { test "$extra_verbose" = "yes" && cat << \EOF
6778     Defining HAVE_OFFIX_DND
6779 EOF
6780 cat >> confdefs.h <<\EOF
6781 #define HAVE_OFFIX_DND 1
6782 EOF
6783 }
6784
6785   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6786   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6787 fi
6788
6789 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6790 echo "configure:6791: checking if drag and drop API is needed" >&5
6791 if test "$with_dragndrop" != "no" ; then
6792   if test -n "$dragndrop_proto" ; then
6793     with_dragndrop=yes
6794     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6795     { test "$extra_verbose" = "yes" && cat << \EOF
6796     Defining HAVE_DRAGNDROP
6797 EOF
6798 cat >> confdefs.h <<\EOF
6799 #define HAVE_DRAGNDROP 1
6800 EOF
6801 }
6802
6803     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6804   else
6805     with_dragndrop=no
6806     echo "$ac_t""no" 1>&6
6807   fi
6808 fi
6809
6810 echo "checking for LDAP" 1>&6
6811 echo "configure:6812: checking for LDAP" >&5
6812 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6813 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6814 echo "configure:6815: checking for ldap.h" >&5
6815
6816 cat > conftest.$ac_ext <<EOF
6817 #line 6818 "configure"
6818 #include "confdefs.h"
6819 #include <ldap.h>
6820 EOF
6821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6822 { (eval echo configure:6823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6824 if test -z "$ac_err"; then
6825   rm -rf conftest*
6826   eval "ac_cv_header_$ac_safe=yes"
6827 else
6828   echo "$ac_err" >&5
6829   echo "configure: failed program was:" >&5
6830   cat conftest.$ac_ext >&5
6831   rm -rf conftest*
6832   eval "ac_cv_header_$ac_safe=no"
6833 fi
6834 rm -f conftest*
6835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6836   echo "$ac_t""yes" 1>&6
6837   :
6838 else
6839   echo "$ac_t""no" 1>&6
6840 with_ldap=no
6841 fi
6842  }
6843 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6844 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6845 echo "configure:6846: checking for lber.h" >&5
6846
6847 cat > conftest.$ac_ext <<EOF
6848 #line 6849 "configure"
6849 #include "confdefs.h"
6850 #include <lber.h>
6851 EOF
6852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6853 { (eval echo configure:6854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6855 if test -z "$ac_err"; then
6856   rm -rf conftest*
6857   eval "ac_cv_header_$ac_safe=yes"
6858 else
6859   echo "$ac_err" >&5
6860   echo "configure: failed program was:" >&5
6861   cat conftest.$ac_ext >&5
6862   rm -rf conftest*
6863   eval "ac_cv_header_$ac_safe=no"
6864 fi
6865 rm -f conftest*
6866 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6867   echo "$ac_t""yes" 1>&6
6868   :
6869 else
6870   echo "$ac_t""no" 1>&6
6871 with_ldap=no
6872 fi
6873  }
6874 if test "$with_ldap" != "no"; then
6875   
6876 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6877 echo "configure:6878: checking for ldap_search in -lldap" >&5
6878 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6879
6880 xe_check_libs=" -lldap "
6881 cat > conftest.$ac_ext <<EOF
6882 #line 6883 "configure"
6883 #include "confdefs.h"
6884 /* Override any gcc2 internal prototype to avoid an error.  */
6885 /* We use char because int might match the return type of a gcc2
6886     builtin and then its argument prototype would still apply.  */
6887 char ldap_search();
6888
6889 int main() {
6890 ldap_search()
6891 ; return 0; }
6892 EOF
6893 if { (eval echo configure:6894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6894   rm -rf conftest*
6895   eval "ac_cv_lib_$ac_lib_var=yes"
6896 else
6897   echo "configure: failed program was:" >&5
6898   cat conftest.$ac_ext >&5
6899   rm -rf conftest*
6900   eval "ac_cv_lib_$ac_lib_var=no"
6901 fi
6902 rm -f conftest*
6903 xe_check_libs=""
6904
6905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6906   echo "$ac_t""yes" 1>&6
6907   with_ldap_nolber=yes
6908 else
6909   echo "$ac_t""no" 1>&6
6910 with_ldap_nolber=no
6911 fi
6912
6913
6914   test "$with_ldap_nolber" = "no" && { 
6915 xe_msg_checking="for ldap_open in -lldap"
6916 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6917 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6918 echo "configure:6919: checking "$xe_msg_checking"" >&5
6919 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6920
6921 xe_check_libs=" -lldap -llber"
6922 cat > conftest.$ac_ext <<EOF
6923 #line 6924 "configure"
6924 #include "confdefs.h"
6925 /* Override any gcc2 internal prototype to avoid an error.  */
6926 /* We use char because int might match the return type of a gcc2
6927     builtin and then its argument prototype would still apply.  */
6928 char ldap_open();
6929
6930 int main() {
6931 ldap_open()
6932 ; return 0; }
6933 EOF
6934 if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6935   rm -rf conftest*
6936   eval "ac_cv_lib_$ac_lib_var=yes"
6937 else
6938   echo "configure: failed program was:" >&5
6939   cat conftest.$ac_ext >&5
6940   rm -rf conftest*
6941   eval "ac_cv_lib_$ac_lib_var=no"
6942 fi
6943 rm -f conftest*
6944 xe_check_libs=""
6945
6946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6947   echo "$ac_t""yes" 1>&6
6948   with_ldap_lber=yes
6949 else
6950   echo "$ac_t""no" 1>&6
6951 with_ldap_lber=no
6952 fi
6953
6954  }
6955   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6956 xe_msg_checking="for ldap_open in -lldap"
6957 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6958 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6959 echo "configure:6960: checking "$xe_msg_checking"" >&5
6960 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6961
6962 xe_check_libs=" -lldap -llber -lkrb"
6963 cat > conftest.$ac_ext <<EOF
6964 #line 6965 "configure"
6965 #include "confdefs.h"
6966 /* Override any gcc2 internal prototype to avoid an error.  */
6967 /* We use char because int might match the return type of a gcc2
6968     builtin and then its argument prototype would still apply.  */
6969 char ldap_open();
6970
6971 int main() {
6972 ldap_open()
6973 ; return 0; }
6974 EOF
6975 if { (eval echo configure:6976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6976   rm -rf conftest*
6977   eval "ac_cv_lib_$ac_lib_var=yes"
6978 else
6979   echo "configure: failed program was:" >&5
6980   cat conftest.$ac_ext >&5
6981   rm -rf conftest*
6982   eval "ac_cv_lib_$ac_lib_var=no"
6983 fi
6984 rm -f conftest*
6985 xe_check_libs=""
6986
6987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6988   echo "$ac_t""yes" 1>&6
6989   with_ldap_krb=yes
6990 else
6991   echo "$ac_t""no" 1>&6
6992 with_ldap_krb=no
6993 fi
6994
6995  }
6996   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6997 xe_msg_checking="for ldap_open in -lldap"
6998 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6999 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7000 echo "configure:7001: checking "$xe_msg_checking"" >&5
7001 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7002
7003 xe_check_libs=" -lldap -llber -lkrb -ldes"
7004 cat > conftest.$ac_ext <<EOF
7005 #line 7006 "configure"
7006 #include "confdefs.h"
7007 /* Override any gcc2 internal prototype to avoid an error.  */
7008 /* We use char because int might match the return type of a gcc2
7009     builtin and then its argument prototype would still apply.  */
7010 char ldap_open();
7011
7012 int main() {
7013 ldap_open()
7014 ; return 0; }
7015 EOF
7016 if { (eval echo configure:7017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7017   rm -rf conftest*
7018   eval "ac_cv_lib_$ac_lib_var=yes"
7019 else
7020   echo "configure: failed program was:" >&5
7021   cat conftest.$ac_ext >&5
7022   rm -rf conftest*
7023   eval "ac_cv_lib_$ac_lib_var=no"
7024 fi
7025 rm -f conftest*
7026 xe_check_libs=""
7027
7028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7029   echo "$ac_t""yes" 1>&6
7030   with_ldap_krbdes=yes
7031 else
7032   echo "$ac_t""no" 1>&6
7033 with_ldap_krbdes=no
7034 fi
7035
7036  }
7037   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
7038 fi
7039 if test "$with_ldap" = "yes"; then
7040   { test "$extra_verbose" = "yes" && cat << \EOF
7041     Defining HAVE_LDAP
7042 EOF
7043 cat >> confdefs.h <<\EOF
7044 #define HAVE_LDAP 1
7045 EOF
7046 }
7047
7048   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7049    echo "    xemacs will be linked with \"eldap.o\""
7050  fi
7051   if test "$with_ldap_nolber" = "yes" ; then
7052     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7053   else
7054     if test "$with_ldap_krb" = "yes" ; then
7055       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7056     fi
7057     if test "$with_ldap_krbdes" = "yes" ; then
7058       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7059       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7060     fi
7061     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7062     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7063   fi
7064   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7065 do
7066 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7067 echo "configure:7068: checking for $ac_func" >&5
7068
7069 cat > conftest.$ac_ext <<EOF
7070 #line 7071 "configure"
7071 #include "confdefs.h"
7072 /* System header to define __stub macros and hopefully few prototypes,
7073     which can conflict with char $ac_func(); below.  */
7074 #include <assert.h>
7075 /* Override any gcc2 internal prototype to avoid an error.  */
7076 /* We use char because int might match the return type of a gcc2
7077     builtin and then its argument prototype would still apply.  */
7078 char $ac_func();
7079
7080 int main() {
7081
7082 /* The GNU C library defines this for functions which it implements
7083     to always fail with ENOSYS.  Some functions are actually named
7084     something starting with __ and the normal name is an alias.  */
7085 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7086 choke me
7087 #else
7088 $ac_func();
7089 #endif
7090
7091 ; return 0; }
7092 EOF
7093 if { (eval echo configure:7094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7094   rm -rf conftest*
7095   eval "ac_cv_func_$ac_func=yes"
7096 else
7097   echo "configure: failed program was:" >&5
7098   cat conftest.$ac_ext >&5
7099   rm -rf conftest*
7100   eval "ac_cv_func_$ac_func=no"
7101 fi
7102 rm -f conftest*
7103
7104 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7105   echo "$ac_t""yes" 1>&6
7106     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7107   { test "$extra_verbose" = "yes" && cat << EOF
7108     Defining $ac_tr_func
7109 EOF
7110 cat >> confdefs.h <<EOF
7111 #define $ac_tr_func 1
7112 EOF
7113 }
7114  
7115 else
7116   echo "$ac_t""no" 1>&6
7117 fi
7118 done
7119
7120 fi
7121
7122
7123 if test "$window_system" != "none"; then
7124   echo "checking for graphics libraries" 1>&6
7125 echo "configure:7126: checking for graphics libraries" >&5
7126
7127     xpm_problem=""
7128   if test -z "$with_xpm"; then
7129     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7130 echo "configure:7131: checking for Xpm - no older than 3.4f" >&5
7131     xe_check_libs=-lXpm
7132     cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135 #define XPM_NUMBERS
7136 #include <X11/xpm.h>
7137     int main(int c, char **v) {
7138     return c == 1 ? 0 :
7139       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7140       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7141 EOF
7142 if { (eval echo configure:7143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7143 then
7144   ./conftest dummy_arg; xpm_status=$?;
7145       if test "$xpm_status" = "0"; then
7146         with_xpm=yes;
7147       else
7148         with_xpm=no;
7149         if test "$xpm_status" = "1"; then
7150           xpm_problem="Xpm library version and header file version don't match!"
7151         elif test "$xpm_status" = "2"; then
7152           xpm_problem="Xpm library version is too old!"
7153         else
7154           xpm_problem="Internal xpm detection logic error!"
7155         fi
7156         echo "
7157 *** WARNING *** $xpm_problem
7158   I'm not touching that with a 10-foot pole!
7159   If you really want to use the installed version of Xpm, rerun
7160   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7161     fi
7162 else
7163   conftest_rc="$?"
7164   echo "configure: failed program was:" >&5
7165   cat conftest.$ac_ext >&5
7166   rm -fr conftest*
7167   with_xpm=no
7168 fi
7169 rm -fr conftest*
7170     xe_check_libs=
7171     echo "$ac_t""$with_xpm" 1>&6
7172   fi
7173   if test "$with_xpm" = "yes"; then
7174     { test "$extra_verbose" = "yes" && cat << \EOF
7175     Defining HAVE_XPM
7176 EOF
7177 cat >> confdefs.h <<\EOF
7178 #define HAVE_XPM 1
7179 EOF
7180 }
7181
7182     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7183     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7184 echo "configure:7185: checking for \"FOR_MSW\" xpm" >&5
7185     xe_check_libs=-lXpm
7186     cat > conftest.$ac_ext <<EOF
7187 #line 7188 "configure"
7188 #include "confdefs.h"
7189
7190 int main() {
7191 XpmCreatePixmapFromData()
7192 ; return 0; }
7193 EOF
7194 if { (eval echo configure:7195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7195   rm -rf conftest*
7196   xpm_for_msw=no
7197 else
7198   echo "configure: failed program was:" >&5
7199   cat conftest.$ac_ext >&5
7200   rm -rf conftest*
7201   xpm_for_msw=yes
7202 fi
7203 rm -f conftest*
7204     xe_check_libs=
7205     echo "$ac_t""$xpm_for_msw" 1>&6
7206     if test "$xpm_for_msw" = "yes"; then
7207       { test "$extra_verbose" = "yes" && cat << \EOF
7208     Defining FOR_MSW
7209 EOF
7210 cat >> confdefs.h <<\EOF
7211 #define FOR_MSW 1
7212 EOF
7213 }
7214
7215     fi
7216   fi
7217
7218     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7219 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7220 echo "configure:7221: checking for compface.h" >&5
7221
7222 cat > conftest.$ac_ext <<EOF
7223 #line 7224 "configure"
7224 #include "confdefs.h"
7225 #include <compface.h>
7226 EOF
7227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7228 { (eval echo configure:7229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7230 if test -z "$ac_err"; then
7231   rm -rf conftest*
7232   eval "ac_cv_header_$ac_safe=yes"
7233 else
7234   echo "$ac_err" >&5
7235   echo "configure: failed program was:" >&5
7236   cat conftest.$ac_ext >&5
7237   rm -rf conftest*
7238   eval "ac_cv_header_$ac_safe=no"
7239 fi
7240 rm -f conftest*
7241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7242   echo "$ac_t""yes" 1>&6
7243   :
7244 else
7245   echo "$ac_t""no" 1>&6
7246 with_xface=no
7247 fi
7248  }
7249   test -z "$with_xface" && { 
7250 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7251 echo "configure:7252: checking for UnGenFace in -lcompface" >&5
7252 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7253
7254 xe_check_libs=" -lcompface "
7255 cat > conftest.$ac_ext <<EOF
7256 #line 7257 "configure"
7257 #include "confdefs.h"
7258 /* Override any gcc2 internal prototype to avoid an error.  */
7259 /* We use char because int might match the return type of a gcc2
7260     builtin and then its argument prototype would still apply.  */
7261 char UnGenFace();
7262
7263 int main() {
7264 UnGenFace()
7265 ; return 0; }
7266 EOF
7267 if { (eval echo configure:7268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7268   rm -rf conftest*
7269   eval "ac_cv_lib_$ac_lib_var=yes"
7270 else
7271   echo "configure: failed program was:" >&5
7272   cat conftest.$ac_ext >&5
7273   rm -rf conftest*
7274   eval "ac_cv_lib_$ac_lib_var=no"
7275 fi
7276 rm -f conftest*
7277 xe_check_libs=""
7278
7279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7280   echo "$ac_t""yes" 1>&6
7281   : 
7282 else
7283   echo "$ac_t""no" 1>&6
7284 with_xface=no
7285 fi
7286
7287  }
7288   test -z "$with_xface" && with_xface=yes
7289   if test "$with_xface" = "yes"; then
7290     { test "$extra_verbose" = "yes" && cat << \EOF
7291     Defining HAVE_XFACE
7292 EOF
7293 cat >> confdefs.h <<\EOF
7294 #define HAVE_XFACE 1
7295 EOF
7296 }
7297
7298     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7299   fi
7300
7301         if test "$with_gif" != "no"; then
7302     with_gif="yes"
7303     { test "$extra_verbose" = "yes" && cat << \EOF
7304     Defining HAVE_GIF
7305 EOF
7306 cat >> confdefs.h <<\EOF
7307 #define HAVE_GIF 1
7308 EOF
7309 }
7310
7311     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7312    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7313  fi
7314   fi
7315
7316       if test "$with_png $with_tiff" != "no no"; then
7317     
7318 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7319 echo "configure:7320: checking for inflate in -lc" >&5
7320 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7321
7322 xe_check_libs=" -lc "
7323 cat > conftest.$ac_ext <<EOF
7324 #line 7325 "configure"
7325 #include "confdefs.h"
7326 /* Override any gcc2 internal prototype to avoid an error.  */
7327 /* We use char because int might match the return type of a gcc2
7328     builtin and then its argument prototype would still apply.  */
7329 char inflate();
7330
7331 int main() {
7332 inflate()
7333 ; return 0; }
7334 EOF
7335 if { (eval echo configure:7336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7336   rm -rf conftest*
7337   eval "ac_cv_lib_$ac_lib_var=yes"
7338 else
7339   echo "configure: failed program was:" >&5
7340   cat conftest.$ac_ext >&5
7341   rm -rf conftest*
7342   eval "ac_cv_lib_$ac_lib_var=no"
7343 fi
7344 rm -f conftest*
7345 xe_check_libs=""
7346
7347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7348   echo "$ac_t""yes" 1>&6
7349   :
7350 else
7351   echo "$ac_t""no" 1>&6
7352
7353 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7354 echo "configure:7355: checking for inflate in -lz" >&5
7355 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7356
7357 xe_check_libs=" -lz "
7358 cat > conftest.$ac_ext <<EOF
7359 #line 7360 "configure"
7360 #include "confdefs.h"
7361 /* Override any gcc2 internal prototype to avoid an error.  */
7362 /* We use char because int might match the return type of a gcc2
7363     builtin and then its argument prototype would still apply.  */
7364 char inflate();
7365
7366 int main() {
7367 inflate()
7368 ; return 0; }
7369 EOF
7370 if { (eval echo configure:7371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7371   rm -rf conftest*
7372   eval "ac_cv_lib_$ac_lib_var=yes"
7373 else
7374   echo "configure: failed program was:" >&5
7375   cat conftest.$ac_ext >&5
7376   rm -rf conftest*
7377   eval "ac_cv_lib_$ac_lib_var=no"
7378 fi
7379 rm -f conftest*
7380 xe_check_libs=""
7381
7382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7383   echo "$ac_t""yes" 1>&6
7384   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7385 else
7386   echo "$ac_t""no" 1>&6
7387
7388 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7389 echo "configure:7390: checking for inflate in -lgz" >&5
7390 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7391
7392 xe_check_libs=" -lgz "
7393 cat > conftest.$ac_ext <<EOF
7394 #line 7395 "configure"
7395 #include "confdefs.h"
7396 /* Override any gcc2 internal prototype to avoid an error.  */
7397 /* We use char because int might match the return type of a gcc2
7398     builtin and then its argument prototype would still apply.  */
7399 char inflate();
7400
7401 int main() {
7402 inflate()
7403 ; return 0; }
7404 EOF
7405 if { (eval echo configure:7406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7406   rm -rf conftest*
7407   eval "ac_cv_lib_$ac_lib_var=yes"
7408 else
7409   echo "configure: failed program was:" >&5
7410   cat conftest.$ac_ext >&5
7411   rm -rf conftest*
7412   eval "ac_cv_lib_$ac_lib_var=no"
7413 fi
7414 rm -f conftest*
7415 xe_check_libs=""
7416
7417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7418   echo "$ac_t""yes" 1>&6
7419   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7420 else
7421   echo "$ac_t""no" 1>&6
7422 fi
7423
7424
7425 fi
7426
7427
7428 fi
7429
7430
7431   fi
7432
7433     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7434 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7435 echo "configure:7436: checking for jpeglib.h" >&5
7436
7437 cat > conftest.$ac_ext <<EOF
7438 #line 7439 "configure"
7439 #include "confdefs.h"
7440 #include <jpeglib.h>
7441 EOF
7442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7443 { (eval echo configure:7444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7445 if test -z "$ac_err"; then
7446   rm -rf conftest*
7447   eval "ac_cv_header_$ac_safe=yes"
7448 else
7449   echo "$ac_err" >&5
7450   echo "configure: failed program was:" >&5
7451   cat conftest.$ac_ext >&5
7452   rm -rf conftest*
7453   eval "ac_cv_header_$ac_safe=no"
7454 fi
7455 rm -f conftest*
7456 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7457   echo "$ac_t""yes" 1>&6
7458   :
7459 else
7460   echo "$ac_t""no" 1>&6
7461 with_jpeg=no
7462 fi
7463  }
7464   test -z "$with_jpeg" && { 
7465 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7466 echo "configure:7467: checking for jpeg_destroy_decompress in -ljpeg" >&5
7467 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7468
7469 xe_check_libs=" -ljpeg "
7470 cat > conftest.$ac_ext <<EOF
7471 #line 7472 "configure"
7472 #include "confdefs.h"
7473 /* Override any gcc2 internal prototype to avoid an error.  */
7474 /* We use char because int might match the return type of a gcc2
7475     builtin and then its argument prototype would still apply.  */
7476 char jpeg_destroy_decompress();
7477
7478 int main() {
7479 jpeg_destroy_decompress()
7480 ; return 0; }
7481 EOF
7482 if { (eval echo configure:7483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7483   rm -rf conftest*
7484   eval "ac_cv_lib_$ac_lib_var=yes"
7485 else
7486   echo "configure: failed program was:" >&5
7487   cat conftest.$ac_ext >&5
7488   rm -rf conftest*
7489   eval "ac_cv_lib_$ac_lib_var=no"
7490 fi
7491 rm -f conftest*
7492 xe_check_libs=""
7493
7494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7495   echo "$ac_t""yes" 1>&6
7496   :
7497 else
7498   echo "$ac_t""no" 1>&6
7499 with_jpeg=no
7500 fi
7501
7502  }
7503   test -z "$with_jpeg" && with_jpeg=yes
7504   if test "$with_jpeg" = "yes"; then
7505     { test "$extra_verbose" = "yes" && cat << \EOF
7506     Defining HAVE_JPEG
7507 EOF
7508 cat >> confdefs.h <<\EOF
7509 #define HAVE_JPEG 1
7510 EOF
7511 }
7512
7513     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7514   fi
7515
7516     png_problem=""
7517   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7518 echo "configure:7519: checking for pow" >&5
7519
7520 cat > conftest.$ac_ext <<EOF
7521 #line 7522 "configure"
7522 #include "confdefs.h"
7523 /* System header to define __stub macros and hopefully few prototypes,
7524     which can conflict with char pow(); below.  */
7525 #include <assert.h>
7526 /* Override any gcc2 internal prototype to avoid an error.  */
7527 /* We use char because int might match the return type of a gcc2
7528     builtin and then its argument prototype would still apply.  */
7529 char pow();
7530
7531 int main() {
7532
7533 /* The GNU C library defines this for functions which it implements
7534     to always fail with ENOSYS.  Some functions are actually named
7535     something starting with __ and the normal name is an alias.  */
7536 #if defined (__stub_pow) || defined (__stub___pow)
7537 choke me
7538 #else
7539 pow();
7540 #endif
7541
7542 ; return 0; }
7543 EOF
7544 if { (eval echo configure:7545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7545   rm -rf conftest*
7546   eval "ac_cv_func_pow=yes"
7547 else
7548   echo "configure: failed program was:" >&5
7549   cat conftest.$ac_ext >&5
7550   rm -rf conftest*
7551   eval "ac_cv_func_pow=no"
7552 fi
7553 rm -f conftest*
7554
7555 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7556   echo "$ac_t""yes" 1>&6
7557   :
7558 else
7559   echo "$ac_t""no" 1>&6
7560 with_png=no
7561 fi
7562  }
7563   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7564 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7565 echo "configure:7566: checking for png.h" >&5
7566
7567 cat > conftest.$ac_ext <<EOF
7568 #line 7569 "configure"
7569 #include "confdefs.h"
7570 #include <png.h>
7571 EOF
7572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7573 { (eval echo configure:7574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7575 if test -z "$ac_err"; then
7576   rm -rf conftest*
7577   eval "ac_cv_header_$ac_safe=yes"
7578 else
7579   echo "$ac_err" >&5
7580   echo "configure: failed program was:" >&5
7581   cat conftest.$ac_ext >&5
7582   rm -rf conftest*
7583   eval "ac_cv_header_$ac_safe=no"
7584 fi
7585 rm -f conftest*
7586 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7587   echo "$ac_t""yes" 1>&6
7588   :
7589 else
7590   echo "$ac_t""no" 1>&6
7591 with_png=no
7592 fi
7593  }
7594   test -z "$with_png" && { 
7595 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7596 echo "configure:7597: checking for png_read_image in -lpng" >&5
7597 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7598
7599 xe_check_libs=" -lpng "
7600 cat > conftest.$ac_ext <<EOF
7601 #line 7602 "configure"
7602 #include "confdefs.h"
7603 /* Override any gcc2 internal prototype to avoid an error.  */
7604 /* We use char because int might match the return type of a gcc2
7605     builtin and then its argument prototype would still apply.  */
7606 char png_read_image();
7607
7608 int main() {
7609 png_read_image()
7610 ; return 0; }
7611 EOF
7612 if { (eval echo configure:7613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7613   rm -rf conftest*
7614   eval "ac_cv_lib_$ac_lib_var=yes"
7615 else
7616   echo "configure: failed program was:" >&5
7617   cat conftest.$ac_ext >&5
7618   rm -rf conftest*
7619   eval "ac_cv_lib_$ac_lib_var=no"
7620 fi
7621 rm -f conftest*
7622 xe_check_libs=""
7623
7624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7625   echo "$ac_t""yes" 1>&6
7626   :
7627 else
7628   echo "$ac_t""no" 1>&6
7629 with_png=no
7630 fi
7631
7632  }
7633   if test -z "$with_png"; then
7634     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7635 echo "configure:7636: checking for workable png version information" >&5
7636     xe_check_libs="-lpng -lz"
7637     cat > conftest.$ac_ext <<EOF
7638 #line 7639 "configure"
7639 #include "confdefs.h"
7640 #include <png.h>
7641     int main(int c, char **v) {
7642     if (c == 1) return 0;
7643     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7644     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7645 EOF
7646 if { (eval echo configure:7647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7647 then
7648   ./conftest dummy_arg; png_status=$?;
7649       if test "$png_status" = "0"; then
7650         with_png=yes;
7651       else
7652         with_png=no;
7653         if test "$png_status" = "1"; then
7654           png_problem="PNG library version and header file don't match!"
7655         elif test "$png_status" = "2"; then
7656           png_problem="PNG library version too old (pre 1.0.2)!"
7657         fi
7658         echo "
7659 *** WARNING *** $png_problem
7660   I'm not touching that with a 10-foot pole!
7661   If you really want to use the installed version of libPNG, rerun
7662   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7663     fi
7664 else
7665   conftest_rc="$?"
7666   echo "configure: failed program was:" >&5
7667   cat conftest.$ac_ext >&5
7668   rm -fr conftest*
7669   with_png=no
7670 fi
7671 rm -fr conftest*
7672     xe_check_libs=
7673     echo "$ac_t""$with_png" 1>&6
7674   fi
7675   if test "$with_png" = "yes"; then
7676     { test "$extra_verbose" = "yes" && cat << \EOF
7677     Defining HAVE_PNG
7678 EOF
7679 cat >> confdefs.h <<\EOF
7680 #define HAVE_PNG 1
7681 EOF
7682 }
7683
7684     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7685   fi
7686
7687     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7688 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7689 echo "configure:7690: checking for tiffio.h" >&5
7690
7691 cat > conftest.$ac_ext <<EOF
7692 #line 7693 "configure"
7693 #include "confdefs.h"
7694 #include <tiffio.h>
7695 EOF
7696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7697 { (eval echo configure:7698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7699 if test -z "$ac_err"; then
7700   rm -rf conftest*
7701   eval "ac_cv_header_$ac_safe=yes"
7702 else
7703   echo "$ac_err" >&5
7704   echo "configure: failed program was:" >&5
7705   cat conftest.$ac_ext >&5
7706   rm -rf conftest*
7707   eval "ac_cv_header_$ac_safe=no"
7708 fi
7709 rm -f conftest*
7710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7711   echo "$ac_t""yes" 1>&6
7712   :
7713 else
7714   echo "$ac_t""no" 1>&6
7715 with_tiff=no
7716 fi
7717  }
7718   test -z "$with_tiff" && { 
7719 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7720 echo "configure:7721: checking for TIFFClientOpen in -ltiff" >&5
7721 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7722
7723 xe_check_libs=" -ltiff "
7724 cat > conftest.$ac_ext <<EOF
7725 #line 7726 "configure"
7726 #include "confdefs.h"
7727 /* Override any gcc2 internal prototype to avoid an error.  */
7728 /* We use char because int might match the return type of a gcc2
7729     builtin and then its argument prototype would still apply.  */
7730 char TIFFClientOpen();
7731
7732 int main() {
7733 TIFFClientOpen()
7734 ; return 0; }
7735 EOF
7736 if { (eval echo configure:7737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7737   rm -rf conftest*
7738   eval "ac_cv_lib_$ac_lib_var=yes"
7739 else
7740   echo "configure: failed program was:" >&5
7741   cat conftest.$ac_ext >&5
7742   rm -rf conftest*
7743   eval "ac_cv_lib_$ac_lib_var=no"
7744 fi
7745 rm -f conftest*
7746 xe_check_libs=""
7747
7748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7749   echo "$ac_t""yes" 1>&6
7750   :
7751 else
7752   echo "$ac_t""no" 1>&6
7753 with_tiff=no
7754 fi
7755
7756  }
7757   test -z "$with_tiff" && with_tiff=yes
7758   if test "$with_tiff" = "yes"; then
7759     { test "$extra_verbose" = "yes" && cat << \EOF
7760     Defining HAVE_TIFF
7761 EOF
7762 cat >> confdefs.h <<\EOF
7763 #define HAVE_TIFF 1
7764 EOF
7765 }
7766
7767     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7768   fi
7769 fi
7770
7771
7772 if test "$with_x11" = "yes"; then
7773
7774   echo "checking for X11 graphics libraries" 1>&6
7775 echo "configure:7776: checking for X11 graphics libraries" >&5
7776
7777   echo "checking for the Athena widgets" 1>&6
7778 echo "configure:7779: checking for the Athena widgets" >&5
7779
7780     case "$with_athena" in
7781         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
7782     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
7783     "next")     athena_variant=neXtaw   athena_3d=yes ;;
7784     "95")       athena_variant=Xaw95    athena_3d=yes ;;
7785     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
7786     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
7787   esac
7788
7789     if test "$athena_3d" = "no"; then
7790     
7791 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
7792 echo "configure:7793: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
7793 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7794
7795 xe_check_libs=" -l$athena_variant "
7796 cat > conftest.$ac_ext <<EOF
7797 #line 7798 "configure"
7798 #include "confdefs.h"
7799 /* Override any gcc2 internal prototype to avoid an error.  */
7800 /* We use char because int might match the return type of a gcc2
7801     builtin and then its argument prototype would still apply.  */
7802 char XawScrollbarSetThumb();
7803
7804 int main() {
7805 XawScrollbarSetThumb()
7806 ; return 0; }
7807 EOF
7808 if { (eval echo configure:7809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7809   rm -rf conftest*
7810   eval "ac_cv_lib_$ac_lib_var=yes"
7811 else
7812   echo "configure: failed program was:" >&5
7813   cat conftest.$ac_ext >&5
7814   rm -rf conftest*
7815   eval "ac_cv_lib_$ac_lib_var=no"
7816 fi
7817 rm -f conftest*
7818 xe_check_libs=""
7819
7820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7821   echo "$ac_t""yes" 1>&6
7822           
7823 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7824 echo "configure:7825: checking for threeDClassRec in -l$athena_variant" >&5
7825 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7826
7827 xe_check_libs=" -l$athena_variant "
7828 cat > conftest.$ac_ext <<EOF
7829 #line 7830 "configure"
7830 #include "confdefs.h"
7831 /* Override any gcc2 internal prototype to avoid an error.  */
7832 /* We use char because int might match the return type of a gcc2
7833     builtin and then its argument prototype would still apply.  */
7834 char threeDClassRec();
7835
7836 int main() {
7837 threeDClassRec()
7838 ; return 0; }
7839 EOF
7840 if { (eval echo configure:7841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7841   rm -rf conftest*
7842   eval "ac_cv_lib_$ac_lib_var=yes"
7843 else
7844   echo "configure: failed program was:" >&5
7845   cat conftest.$ac_ext >&5
7846   rm -rf conftest*
7847   eval "ac_cv_lib_$ac_lib_var=no"
7848 fi
7849 rm -f conftest*
7850 xe_check_libs=""
7851
7852 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7853   echo "$ac_t""yes" 1>&6
7854   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
7855 else
7856   echo "$ac_t""no" 1>&6
7857 athena_lib=$athena_variant
7858 fi
7859
7860
7861       
7862 else
7863   echo "$ac_t""no" 1>&6
7864 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
7865 fi
7866
7867
7868   else
7869         
7870 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7871 echo "configure:7872: checking for threeDClassRec in -l$athena_variant" >&5
7872 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7873
7874 xe_check_libs=" -l$athena_variant "
7875 cat > conftest.$ac_ext <<EOF
7876 #line 7877 "configure"
7877 #include "confdefs.h"
7878 /* Override any gcc2 internal prototype to avoid an error.  */
7879 /* We use char because int might match the return type of a gcc2
7880     builtin and then its argument prototype would still apply.  */
7881 char threeDClassRec();
7882
7883 int main() {
7884 threeDClassRec()
7885 ; return 0; }
7886 EOF
7887 if { (eval echo configure:7888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7888   rm -rf conftest*
7889   eval "ac_cv_lib_$ac_lib_var=yes"
7890 else
7891   echo "configure: failed program was:" >&5
7892   cat conftest.$ac_ext >&5
7893   rm -rf conftest*
7894   eval "ac_cv_lib_$ac_lib_var=no"
7895 fi
7896 rm -f conftest*
7897 xe_check_libs=""
7898
7899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7900   echo "$ac_t""yes" 1>&6
7901   athena_lib=$athena_variant
7902 else
7903   echo "$ac_t""no" 1>&6
7904 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
7905 echo "configure:7906: checking for threeDClassRec in -lXaw" >&5
7906 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
7907
7908 xe_check_libs=" -lXaw "
7909 cat > conftest.$ac_ext <<EOF
7910 #line 7911 "configure"
7911 #include "confdefs.h"
7912 /* Override any gcc2 internal prototype to avoid an error.  */
7913 /* We use char because int might match the return type of a gcc2
7914     builtin and then its argument prototype would still apply.  */
7915 char threeDClassRec();
7916
7917 int main() {
7918 threeDClassRec()
7919 ; return 0; }
7920 EOF
7921 if { (eval echo configure:7922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7922   rm -rf conftest*
7923   eval "ac_cv_lib_$ac_lib_var=yes"
7924 else
7925   echo "configure: failed program was:" >&5
7926   cat conftest.$ac_ext >&5
7927   rm -rf conftest*
7928   eval "ac_cv_lib_$ac_lib_var=no"
7929 fi
7930 rm -f conftest*
7931 xe_check_libs=""
7932
7933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7934   echo "$ac_t""yes" 1>&6
7935   athena_lib=Xaw;
7936           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
7937         
7938 else
7939   echo "$ac_t""no" 1>&6
7940 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
7941 fi
7942
7943
7944 fi
7945
7946
7947   fi
7948
7949     if test "$athena_3d" = "no"; then
7950     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
7951 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
7952 echo "configure:7953: checking for X11/Xaw/ThreeD.h" >&5
7953
7954 cat > conftest.$ac_ext <<EOF
7955 #line 7956 "configure"
7956 #include "confdefs.h"
7957 #include <X11/Xaw/ThreeD.h>
7958 EOF
7959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7960 { (eval echo configure:7961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7962 if test -z "$ac_err"; then
7963   rm -rf conftest*
7964   eval "ac_cv_header_$ac_safe=yes"
7965 else
7966   echo "$ac_err" >&5
7967   echo "configure: failed program was:" >&5
7968   cat conftest.$ac_ext >&5
7969   rm -rf conftest*
7970   eval "ac_cv_header_$ac_safe=no"
7971 fi
7972 rm -f conftest*
7973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7974   echo "$ac_t""yes" 1>&6
7975   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7976 else
7977   echo "$ac_t""no" 1>&6
7978 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
7979 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
7980 echo "configure:7981: checking for X11/Xaw/XawInit.h" >&5
7981
7982 cat > conftest.$ac_ext <<EOF
7983 #line 7984 "configure"
7984 #include "confdefs.h"
7985 #include <X11/Xaw/XawInit.h>
7986 EOF
7987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7988 { (eval echo configure:7989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7990 if test -z "$ac_err"; then
7991   rm -rf conftest*
7992   eval "ac_cv_header_$ac_safe=yes"
7993 else
7994   echo "$ac_err" >&5
7995   echo "configure: failed program was:" >&5
7996   cat conftest.$ac_ext >&5
7997   rm -rf conftest*
7998   eval "ac_cv_header_$ac_safe=no"
7999 fi
8000 rm -f conftest*
8001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8002   echo "$ac_t""yes" 1>&6
8003   athena_h_path=X11/Xaw
8004 else
8005   echo "$ac_t""no" 1>&6
8006 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8007 fi
8008
8009 fi
8010
8011   else
8012             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8013 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8014 echo "configure:8015: checking for X11/$athena_variant/XawInit.h" >&5
8015
8016 cat > conftest.$ac_ext <<EOF
8017 #line 8018 "configure"
8018 #include "confdefs.h"
8019 #include <X11/$athena_variant/XawInit.h>
8020 EOF
8021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8022 { (eval echo configure:8023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8024 if test -z "$ac_err"; then
8025   rm -rf conftest*
8026   eval "ac_cv_header_$ac_safe=yes"
8027 else
8028   echo "$ac_err" >&5
8029   echo "configure: failed program was:" >&5
8030   cat conftest.$ac_ext >&5
8031   rm -rf conftest*
8032   eval "ac_cv_header_$ac_safe=no"
8033 fi
8034 rm -f conftest*
8035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8036   echo "$ac_t""yes" 1>&6
8037   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8038 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8039 echo "configure:8040: checking for X11/$athena_variant/ThreeD.h" >&5
8040
8041 cat > conftest.$ac_ext <<EOF
8042 #line 8043 "configure"
8043 #include "confdefs.h"
8044 #include <X11/$athena_variant/ThreeD.h>
8045 EOF
8046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8047 { (eval echo configure:8048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8049 if test -z "$ac_err"; then
8050   rm -rf conftest*
8051   eval "ac_cv_header_$ac_safe=yes"
8052 else
8053   echo "$ac_err" >&5
8054   echo "configure: failed program was:" >&5
8055   cat conftest.$ac_ext >&5
8056   rm -rf conftest*
8057   eval "ac_cv_header_$ac_safe=no"
8058 fi
8059 rm -f conftest*
8060 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8061   echo "$ac_t""yes" 1>&6
8062   athena_h_path=X11/$athena_variant
8063 else
8064   echo "$ac_t""no" 1>&6
8065 fi
8066
8067 else
8068   echo "$ac_t""no" 1>&6
8069 fi
8070
8071
8072         if test -z "$athena_h_path"; then
8073       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8074 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8075 echo "configure:8076: checking for $athena_variant/XawInit.h" >&5
8076
8077 cat > conftest.$ac_ext <<EOF
8078 #line 8079 "configure"
8079 #include "confdefs.h"
8080 #include <$athena_variant/XawInit.h>
8081 EOF
8082 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8083 { (eval echo configure:8084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8084 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8085 if test -z "$ac_err"; then
8086   rm -rf conftest*
8087   eval "ac_cv_header_$ac_safe=yes"
8088 else
8089   echo "$ac_err" >&5
8090   echo "configure: failed program was:" >&5
8091   cat conftest.$ac_ext >&5
8092   rm -rf conftest*
8093   eval "ac_cv_header_$ac_safe=no"
8094 fi
8095 rm -f conftest*
8096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8097   echo "$ac_t""yes" 1>&6
8098   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8099 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8100 echo "configure:8101: checking for $athena_variant/ThreeD.h" >&5
8101
8102 cat > conftest.$ac_ext <<EOF
8103 #line 8104 "configure"
8104 #include "confdefs.h"
8105 #include <$athena_variant/ThreeD.h>
8106 EOF
8107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8108 { (eval echo configure:8109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8109 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8110 if test -z "$ac_err"; then
8111   rm -rf conftest*
8112   eval "ac_cv_header_$ac_safe=yes"
8113 else
8114   echo "$ac_err" >&5
8115   echo "configure: failed program was:" >&5
8116   cat conftest.$ac_ext >&5
8117   rm -rf conftest*
8118   eval "ac_cv_header_$ac_safe=no"
8119 fi
8120 rm -f conftest*
8121 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8122   echo "$ac_t""yes" 1>&6
8123   athena_h_path=$athena_variant
8124 else
8125   echo "$ac_t""no" 1>&6
8126 fi
8127
8128 else
8129   echo "$ac_t""no" 1>&6
8130 fi
8131
8132     fi
8133
8134         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8135       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8136 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8137 echo "configure:8138: checking for X11/Xaw3d/XawInit.h" >&5
8138
8139 cat > conftest.$ac_ext <<EOF
8140 #line 8141 "configure"
8141 #include "confdefs.h"
8142 #include <X11/Xaw3d/XawInit.h>
8143 EOF
8144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8145 { (eval echo configure:8146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8147 if test -z "$ac_err"; then
8148   rm -rf conftest*
8149   eval "ac_cv_header_$ac_safe=yes"
8150 else
8151   echo "$ac_err" >&5
8152   echo "configure: failed program was:" >&5
8153   cat conftest.$ac_ext >&5
8154   rm -rf conftest*
8155   eval "ac_cv_header_$ac_safe=no"
8156 fi
8157 rm -f conftest*
8158 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8159   echo "$ac_t""yes" 1>&6
8160   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8161 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8162 echo "configure:8163: checking for X11/Xaw3d/ThreeD.h" >&5
8163
8164 cat > conftest.$ac_ext <<EOF
8165 #line 8166 "configure"
8166 #include "confdefs.h"
8167 #include <X11/Xaw3d/ThreeD.h>
8168 EOF
8169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8170 { (eval echo configure:8171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8171 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8172 if test -z "$ac_err"; then
8173   rm -rf conftest*
8174   eval "ac_cv_header_$ac_safe=yes"
8175 else
8176   echo "$ac_err" >&5
8177   echo "configure: failed program was:" >&5
8178   cat conftest.$ac_ext >&5
8179   rm -rf conftest*
8180   eval "ac_cv_header_$ac_safe=no"
8181 fi
8182 rm -f conftest*
8183 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8184   echo "$ac_t""yes" 1>&6
8185   
8186             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8187             athena_h_path=X11/Xaw3d
8188           
8189 else
8190   echo "$ac_t""no" 1>&6
8191 fi
8192
8193 else
8194   echo "$ac_t""no" 1>&6
8195 fi
8196
8197     fi
8198
8199         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8200       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8201 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8202 echo "configure:8203: checking for Xaw3d/XawInit.h" >&5
8203
8204 cat > conftest.$ac_ext <<EOF
8205 #line 8206 "configure"
8206 #include "confdefs.h"
8207 #include <Xaw3d/XawInit.h>
8208 EOF
8209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8210 { (eval echo configure:8211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8212 if test -z "$ac_err"; then
8213   rm -rf conftest*
8214   eval "ac_cv_header_$ac_safe=yes"
8215 else
8216   echo "$ac_err" >&5
8217   echo "configure: failed program was:" >&5
8218   cat conftest.$ac_ext >&5
8219   rm -rf conftest*
8220   eval "ac_cv_header_$ac_safe=no"
8221 fi
8222 rm -f conftest*
8223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8224   echo "$ac_t""yes" 1>&6
8225   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8226 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8227 echo "configure:8228: checking for Xaw3d/ThreeD.h" >&5
8228
8229 cat > conftest.$ac_ext <<EOF
8230 #line 8231 "configure"
8231 #include "confdefs.h"
8232 #include <Xaw3d/ThreeD.h>
8233 EOF
8234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8235 { (eval echo configure:8236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8237 if test -z "$ac_err"; then
8238   rm -rf conftest*
8239   eval "ac_cv_header_$ac_safe=yes"
8240 else
8241   echo "$ac_err" >&5
8242   echo "configure: failed program was:" >&5
8243   cat conftest.$ac_ext >&5
8244   rm -rf conftest*
8245   eval "ac_cv_header_$ac_safe=no"
8246 fi
8247 rm -f conftest*
8248 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8249   echo "$ac_t""yes" 1>&6
8250   
8251             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8252             athena_h_path=Xaw3d
8253           
8254 else
8255   echo "$ac_t""no" 1>&6
8256 fi
8257
8258 else
8259   echo "$ac_t""no" 1>&6
8260 fi
8261
8262     fi
8263
8264             if test -z "$athena_h_path"; then
8265       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8266 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8267 echo "configure:8268: checking for X11/Xaw/ThreeD.h" >&5
8268
8269 cat > conftest.$ac_ext <<EOF
8270 #line 8271 "configure"
8271 #include "confdefs.h"
8272 #include <X11/Xaw/ThreeD.h>
8273 EOF
8274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8275 { (eval echo configure:8276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8277 if test -z "$ac_err"; then
8278   rm -rf conftest*
8279   eval "ac_cv_header_$ac_safe=yes"
8280 else
8281   echo "$ac_err" >&5
8282   echo "configure: failed program was:" >&5
8283   cat conftest.$ac_ext >&5
8284   rm -rf conftest*
8285   eval "ac_cv_header_$ac_safe=no"
8286 fi
8287 rm -f conftest*
8288 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8289   echo "$ac_t""yes" 1>&6
8290   
8291           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8292           athena_h_path=X11/Xaw
8293         
8294 else
8295   echo "$ac_t""no" 1>&6
8296 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8297 fi
8298
8299     fi
8300   fi
8301
8302     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8303     have_xaw=yes
8304   else
8305     have_xaw=no
8306   fi
8307
8308     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8309 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8310 echo "configure:8311: checking for Xm/Xm.h" >&5
8311
8312 cat > conftest.$ac_ext <<EOF
8313 #line 8314 "configure"
8314 #include "confdefs.h"
8315 #include <Xm/Xm.h>
8316 EOF
8317 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8318 { (eval echo configure:8319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8319 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8320 if test -z "$ac_err"; then
8321   rm -rf conftest*
8322   eval "ac_cv_header_$ac_safe=yes"
8323 else
8324   echo "$ac_err" >&5
8325   echo "configure: failed program was:" >&5
8326   cat conftest.$ac_ext >&5
8327   rm -rf conftest*
8328   eval "ac_cv_header_$ac_safe=no"
8329 fi
8330 rm -f conftest*
8331 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8332   echo "$ac_t""yes" 1>&6
8333   
8334 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8335 echo "configure:8336: checking for XmStringFree in -lXm" >&5
8336 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8337
8338 xe_check_libs=" -lXm "
8339 cat > conftest.$ac_ext <<EOF
8340 #line 8341 "configure"
8341 #include "confdefs.h"
8342 /* Override any gcc2 internal prototype to avoid an error.  */
8343 /* We use char because int might match the return type of a gcc2
8344     builtin and then its argument prototype would still apply.  */
8345 char XmStringFree();
8346
8347 int main() {
8348 XmStringFree()
8349 ; return 0; }
8350 EOF
8351 if { (eval echo configure:8352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8352   rm -rf conftest*
8353   eval "ac_cv_lib_$ac_lib_var=yes"
8354 else
8355   echo "configure: failed program was:" >&5
8356   cat conftest.$ac_ext >&5
8357   rm -rf conftest*
8358   eval "ac_cv_lib_$ac_lib_var=no"
8359 fi
8360 rm -f conftest*
8361 xe_check_libs=""
8362
8363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8364   echo "$ac_t""yes" 1>&6
8365   have_motif=yes
8366 else
8367   echo "$ac_t""no" 1>&6
8368 have_motif=no
8369 fi
8370
8371
8372 else
8373   echo "$ac_t""no" 1>&6
8374 have_motif=no
8375 fi
8376
8377
8378   if test "$have_motif" = "yes"; then
8379         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8380 echo "configure:8381: checking for Lesstif" >&5
8381     cat > conftest.$ac_ext <<EOF
8382 #line 8383 "configure"
8383 #include "confdefs.h"
8384 #include <Xm/Xm.h>
8385 #ifdef LESSTIF_VERSION
8386 yes
8387 #endif
8388
8389 EOF
8390 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8391   egrep "yes" >/dev/null 2>&1; then
8392   rm -rf conftest*
8393   have_lesstif=yes
8394 else
8395   rm -rf conftest*
8396   have_lesstif=no
8397 fi
8398 rm -f conftest*
8399
8400   echo "$ac_t""$have_lesstif" 1>&6
8401   fi
8402
8403 fi 
8404
8405 case "$with_menubars" in "" | "yes" | "athena" )
8406   with_menubars="lucid" ;;
8407 esac
8408 case "$with_dialogs" in "" | "yes" | "lucid" )
8409   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8410   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8411   else with_dialogs=no
8412   fi ;;
8413 esac
8414 case "$with_scrollbars" in "" | "yes" )
8415   with_scrollbars="lucid" ;;
8416 esac
8417 case "$with_widgets" in "" | "yes" | "lucid")
8418   if   test "$have_motif" = "yes"; then with_widgets="motif"
8419   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8420   else with_widgets=no
8421   fi ;;
8422 esac
8423
8424 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8425
8426 case "$all_widgets" in
8427   *athena* )
8428     if test "$have_xaw" != "yes"; then
8429       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8430     fi
8431
8432         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8433
8434         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8435
8436             { test "$extra_verbose" = "yes" && cat << EOF
8437     Defining ATHENA_H_PATH = $athena_h_path
8438 EOF
8439 cat >> confdefs.h <<EOF
8440 #define ATHENA_H_PATH $athena_h_path
8441 EOF
8442 }
8443
8444
8445     { test "$extra_verbose" = "yes" && cat << \EOF
8446     Defining LWLIB_USES_ATHENA
8447 EOF
8448 cat >> confdefs.h <<\EOF
8449 #define LWLIB_USES_ATHENA 1
8450 EOF
8451 }
8452
8453     { test "$extra_verbose" = "yes" && cat << \EOF
8454     Defining NEED_ATHENA
8455 EOF
8456 cat >> confdefs.h <<\EOF
8457 #define NEED_ATHENA 1
8458 EOF
8459 }
8460
8461
8462     if test "$athena_3d" = "yes"; then
8463       { test "$extra_verbose" = "yes" && cat << \EOF
8464     Defining HAVE_ATHENA_3D
8465 EOF
8466 cat >> confdefs.h <<\EOF
8467 #define HAVE_ATHENA_3D 1
8468 EOF
8469 }
8470
8471     fi
8472   ;;
8473 esac
8474
8475 case "$all_widgets" in *motif* )
8476   { test "$extra_verbose" = "yes" && cat << \EOF
8477     Defining LWLIB_USES_MOTIF
8478 EOF
8479 cat >> confdefs.h <<\EOF
8480 #define LWLIB_USES_MOTIF 1
8481 EOF
8482 }
8483
8484   { test "$extra_verbose" = "yes" && cat << \EOF
8485     Defining NEED_MOTIF
8486 EOF
8487 cat >> confdefs.h <<\EOF
8488 #define NEED_MOTIF 1
8489 EOF
8490 }
8491
8492   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8493   need_motif=yes ;;
8494 esac
8495
8496 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8497 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8498 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8499 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8500         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8501 case "$with_widgets" in athena* )
8502         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;;
8503 esac
8504 case "$all_widgets" in *lucid* )
8505   { test "$extra_verbose" = "yes" && cat << \EOF
8506     Defining NEED_LUCID
8507 EOF
8508 cat >> confdefs.h <<\EOF
8509 #define NEED_LUCID 1
8510 EOF
8511 }
8512
8513   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8514 esac
8515
8516
8517
8518 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8519     Defining LWLIB_SCROLLBARS_ATHENA
8520 EOF
8521 cat >> confdefs.h <<\EOF
8522 #define LWLIB_SCROLLBARS_ATHENA 1
8523 EOF
8524 }
8525
8526 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8527     Defining LWLIB_DIALOGS_ATHENA
8528 EOF
8529 cat >> confdefs.h <<\EOF
8530 #define LWLIB_DIALOGS_ATHENA 1
8531 EOF
8532 }
8533
8534
8535 if test "$athena_3d" = "yes"; then
8536   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8537     Defining LWLIB_SCROLLBARS_ATHENA3D
8538 EOF
8539 cat >> confdefs.h <<\EOF
8540 #define LWLIB_SCROLLBARS_ATHENA3D 1
8541 EOF
8542 }
8543
8544   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8545     Defining LWLIB_DIALOGS_ATHENA3D
8546 EOF
8547 cat >> confdefs.h <<\EOF
8548 #define LWLIB_DIALOGS_ATHENA3D 1
8549 EOF
8550 }
8551
8552 fi
8553
8554 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8555     Defining LWLIB_WIDGETS_ATHENA
8556 EOF
8557 cat >> confdefs.h <<\EOF
8558 #define LWLIB_WIDGETS_ATHENA 1
8559 EOF
8560 }
8561 ;; esac
8562 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8563         { test "$extra_verbose" = "yes" && cat << \EOF
8564     Defining LWLIB_TABS_LUCID
8565 EOF
8566 cat >> confdefs.h <<\EOF
8567 #define LWLIB_TABS_LUCID 1
8568 EOF
8569 }
8570
8571
8572 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8573     Defining HAVE_MENUBARS
8574 EOF
8575 cat >> confdefs.h <<\EOF
8576 #define HAVE_MENUBARS 1
8577 EOF
8578 }
8579
8580 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8581     Defining HAVE_SCROLLBARS
8582 EOF
8583 cat >> confdefs.h <<\EOF
8584 #define HAVE_SCROLLBARS 1
8585 EOF
8586 }
8587
8588 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8589     Defining HAVE_DIALOGS
8590 EOF
8591 cat >> confdefs.h <<\EOF
8592 #define HAVE_DIALOGS 1
8593 EOF
8594 }
8595
8596 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8597     Defining HAVE_TOOLBARS
8598 EOF
8599 cat >> confdefs.h <<\EOF
8600 #define HAVE_TOOLBARS 1
8601 EOF
8602 }
8603
8604 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8605     Defining HAVE_WIDGETS
8606 EOF
8607 cat >> confdefs.h <<\EOF
8608 #define HAVE_WIDGETS 1
8609 EOF
8610 }
8611
8612
8613 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8614     Defining LWLIB_MENUBARS_LUCID
8615 EOF
8616 cat >> confdefs.h <<\EOF
8617 #define LWLIB_MENUBARS_LUCID 1
8618 EOF
8619 }
8620
8621 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8622     Defining LWLIB_SCROLLBARS_LUCID
8623 EOF
8624 cat >> confdefs.h <<\EOF
8625 #define LWLIB_SCROLLBARS_LUCID 1
8626 EOF
8627 }
8628
8629
8630 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8631     Defining LWLIB_MENUBARS_MOTIF
8632 EOF
8633 cat >> confdefs.h <<\EOF
8634 #define LWLIB_MENUBARS_MOTIF 1
8635 EOF
8636 }
8637
8638 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8639     Defining LWLIB_SCROLLBARS_MOTIF
8640 EOF
8641 cat >> confdefs.h <<\EOF
8642 #define LWLIB_SCROLLBARS_MOTIF 1
8643 EOF
8644 }
8645
8646 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8647     Defining LWLIB_DIALOGS_MOTIF
8648 EOF
8649 cat >> confdefs.h <<\EOF
8650 #define LWLIB_DIALOGS_MOTIF 1
8651 EOF
8652 }
8653
8654 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8655     Defining LWLIB_WIDGETS_MOTIF
8656 EOF
8657 cat >> confdefs.h <<\EOF
8658 #define LWLIB_WIDGETS_MOTIF 1
8659 EOF
8660 }
8661
8662
8663 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
8664    echo "    xemacs will be linked with \"menubar.o\""
8665  fi
8666 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
8667    echo "    xemacs will be linked with \"scrollbar.o\""
8668  fi
8669 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
8670    echo "    xemacs will be linked with \"dialog.o\""
8671  fi
8672 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
8673    echo "    xemacs will be linked with \"toolbar.o\""
8674  fi
8675
8676 if test "$with_x11" = "yes"; then
8677   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
8678    echo "    xemacs will be linked with \"menubar-x.o\""
8679  fi
8680   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8681    echo "    xemacs will be linked with \"scrollbar-x.o\""
8682  fi
8683   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
8684    echo "    xemacs will be linked with \"dialog-x.o\""
8685  fi
8686   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8687    echo "    xemacs will be linked with \"toolbar-x.o\""
8688  fi
8689   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8690    echo "    xemacs will be linked with \"gui-x.o\""
8691  fi
8692 fi
8693
8694
8695 test -z "$with_mule" && with_mule=no
8696 test -z "$with_file_coding" && with_file_coding=no
8697
8698
8699 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8700   { test "$extra_verbose" = "yes" && cat << \EOF
8701     Defining FILE_CODING
8702 EOF
8703 cat >> confdefs.h <<\EOF
8704 #define FILE_CODING 1
8705 EOF
8706 }
8707
8708   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8709    echo "    xemacs will be linked with \"file-coding.o\""
8710  fi
8711 fi
8712
8713 if test "$with_mule" = "yes" ; then
8714   echo "checking for Mule-related features" 1>&6
8715 echo "configure:8716: checking for Mule-related features" >&5
8716   { test "$extra_verbose" = "yes" && cat << \EOF
8717     Defining MULE
8718 EOF
8719 cat >> confdefs.h <<\EOF
8720 #define MULE 1
8721 EOF
8722 }
8723
8724   { test "$extra_verbose" = "yes" && cat << \EOF
8725     Defining FILE_CODING
8726 EOF
8727 cat >> confdefs.h <<\EOF
8728 #define FILE_CODING 1
8729 EOF
8730 }
8731
8732   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8733    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
8734  fi
8735
8736     for ac_hdr in libintl.h
8737 do
8738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8740 echo "configure:8741: checking for $ac_hdr" >&5
8741
8742 cat > conftest.$ac_ext <<EOF
8743 #line 8744 "configure"
8744 #include "confdefs.h"
8745 #include <$ac_hdr>
8746 EOF
8747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8748 { (eval echo configure:8749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8750 if test -z "$ac_err"; then
8751   rm -rf conftest*
8752   eval "ac_cv_header_$ac_safe=yes"
8753 else
8754   echo "$ac_err" >&5
8755   echo "configure: failed program was:" >&5
8756   cat conftest.$ac_ext >&5
8757   rm -rf conftest*
8758   eval "ac_cv_header_$ac_safe=no"
8759 fi
8760 rm -f conftest*
8761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8762   echo "$ac_t""yes" 1>&6
8763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8764   { test "$extra_verbose" = "yes" && cat << EOF
8765     Defining $ac_tr_hdr
8766 EOF
8767 cat >> confdefs.h <<EOF
8768 #define $ac_tr_hdr 1
8769 EOF
8770 }
8771  
8772 else
8773   echo "$ac_t""no" 1>&6
8774 fi
8775 done
8776
8777   
8778 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
8779 echo "configure:8780: checking for strerror in -lintl" >&5
8780 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
8781
8782 xe_check_libs=" -lintl "
8783 cat > conftest.$ac_ext <<EOF
8784 #line 8785 "configure"
8785 #include "confdefs.h"
8786 /* Override any gcc2 internal prototype to avoid an error.  */
8787 /* We use char because int might match the return type of a gcc2
8788     builtin and then its argument prototype would still apply.  */
8789 char strerror();
8790
8791 int main() {
8792 strerror()
8793 ; return 0; }
8794 EOF
8795 if { (eval echo configure:8796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8796   rm -rf conftest*
8797   eval "ac_cv_lib_$ac_lib_var=yes"
8798 else
8799   echo "configure: failed program was:" >&5
8800   cat conftest.$ac_ext >&5
8801   rm -rf conftest*
8802   eval "ac_cv_lib_$ac_lib_var=no"
8803 fi
8804 rm -f conftest*
8805 xe_check_libs=""
8806
8807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8808   echo "$ac_t""yes" 1>&6
8809     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8810     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8811   { test "$extra_verbose" = "yes" && cat << EOF
8812     Defining $ac_tr_lib
8813 EOF
8814 cat >> confdefs.h <<EOF
8815 #define $ac_tr_lib 1
8816 EOF
8817 }
8818
8819   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
8820
8821 else
8822   echo "$ac_t""no" 1>&6
8823 fi
8824
8825
8826
8827   echo "checking for Mule input methods" 1>&6
8828 echo "configure:8829: checking for Mule input methods" >&5
8829         case "$with_xim" in "" | "yes" )
8830     echo "checking for XIM" 1>&6
8831 echo "configure:8832: checking for XIM" >&5
8832     
8833 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
8834 echo "configure:8835: checking for XOpenIM in -lX11" >&5
8835 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
8836
8837 xe_check_libs=" -lX11 "
8838 cat > conftest.$ac_ext <<EOF
8839 #line 8840 "configure"
8840 #include "confdefs.h"
8841 /* Override any gcc2 internal prototype to avoid an error.  */
8842 /* We use char because int might match the return type of a gcc2
8843     builtin and then its argument prototype would still apply.  */
8844 char XOpenIM();
8845
8846 int main() {
8847 XOpenIM()
8848 ; return 0; }
8849 EOF
8850 if { (eval echo configure:8851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8851   rm -rf conftest*
8852   eval "ac_cv_lib_$ac_lib_var=yes"
8853 else
8854   echo "configure: failed program was:" >&5
8855   cat conftest.$ac_ext >&5
8856   rm -rf conftest*
8857   eval "ac_cv_lib_$ac_lib_var=no"
8858 fi
8859 rm -f conftest*
8860 xe_check_libs=""
8861
8862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8863   echo "$ac_t""yes" 1>&6
8864   with_xim=xlib
8865 else
8866   echo "$ac_t""no" 1>&6
8867 with_xim=no
8868 fi
8869
8870
8871         if test "$have_motif $have_lesstif" = "yes no"; then
8872       
8873 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
8874 echo "configure:8875: checking for XmImMbLookupString in -lXm" >&5
8875 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
8876
8877 xe_check_libs=" -lXm "
8878 cat > conftest.$ac_ext <<EOF
8879 #line 8880 "configure"
8880 #include "confdefs.h"
8881 /* Override any gcc2 internal prototype to avoid an error.  */
8882 /* We use char because int might match the return type of a gcc2
8883     builtin and then its argument prototype would still apply.  */
8884 char XmImMbLookupString();
8885
8886 int main() {
8887 XmImMbLookupString()
8888 ; return 0; }
8889 EOF
8890 if { (eval echo configure:8891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8891   rm -rf conftest*
8892   eval "ac_cv_lib_$ac_lib_var=yes"
8893 else
8894   echo "configure: failed program was:" >&5
8895   cat conftest.$ac_ext >&5
8896   rm -rf conftest*
8897   eval "ac_cv_lib_$ac_lib_var=no"
8898 fi
8899 rm -f conftest*
8900 xe_check_libs=""
8901
8902 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8903   echo "$ac_t""yes" 1>&6
8904   with_xim=motif
8905 else
8906   echo "$ac_t""no" 1>&6
8907 fi
8908
8909
8910     fi ;;
8911   esac
8912   if test "$with_xim" != "no"; then
8913     { test "$extra_verbose" = "yes" && cat << \EOF
8914     Defining HAVE_XIM
8915 EOF
8916 cat >> confdefs.h <<\EOF
8917 #define HAVE_XIM 1
8918 EOF
8919 }
8920
8921     if test "$with_xim" = "xlib"; then
8922       { test "$extra_verbose" = "yes" && cat << \EOF
8923     Defining XIM_XLIB
8924 EOF
8925 cat >> confdefs.h <<\EOF
8926 #define XIM_XLIB 1
8927 EOF
8928 }
8929
8930       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
8931    echo "    xemacs will be linked with \"input-method-xlib.o\""
8932  fi
8933     fi
8934     if test "$with_xim" = "motif"; then
8935       { test "$extra_verbose" = "yes" && cat << \EOF
8936     Defining XIM_MOTIF
8937 EOF
8938 cat >> confdefs.h <<\EOF
8939 #define XIM_MOTIF 1
8940 EOF
8941 }
8942
8943       need_motif=yes
8944       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8945    echo "    xemacs will be linked with \"input-method-motif.o\""
8946  fi
8947     fi
8948     if test "$with_xim" = "motif"; then
8949       with_xfs=no
8950     fi
8951   fi
8952
8953     if test "$with_xfs" = "yes" ; then
8954     echo "checking for XFontSet" 1>&6
8955 echo "configure:8956: checking for XFontSet" >&5
8956     
8957 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8958 echo "configure:8959: checking for XmbDrawString in -lX11" >&5
8959 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8960
8961 xe_check_libs=" -lX11 "
8962 cat > conftest.$ac_ext <<EOF
8963 #line 8964 "configure"
8964 #include "confdefs.h"
8965 /* Override any gcc2 internal prototype to avoid an error.  */
8966 /* We use char because int might match the return type of a gcc2
8967     builtin and then its argument prototype would still apply.  */
8968 char XmbDrawString();
8969
8970 int main() {
8971 XmbDrawString()
8972 ; return 0; }
8973 EOF
8974 if { (eval echo configure:8975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8975   rm -rf conftest*
8976   eval "ac_cv_lib_$ac_lib_var=yes"
8977 else
8978   echo "configure: failed program was:" >&5
8979   cat conftest.$ac_ext >&5
8980   rm -rf conftest*
8981   eval "ac_cv_lib_$ac_lib_var=no"
8982 fi
8983 rm -f conftest*
8984 xe_check_libs=""
8985
8986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8987   echo "$ac_t""yes" 1>&6
8988   :
8989 else
8990   echo "$ac_t""no" 1>&6
8991 with_xfs=no
8992 fi
8993
8994
8995     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8996       { test "$extra_verbose" = "yes" && cat << \EOF
8997     Defining USE_XFONTSET
8998 EOF
8999 cat >> confdefs.h <<\EOF
9000 #define USE_XFONTSET 1
9001 EOF
9002 }
9003
9004       if test "$with_xim" = "no" ; then
9005         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
9006    echo "    xemacs will be linked with \"input-method-xfs.o\""
9007  fi
9008       fi
9009     fi
9010   fi 
9011     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9012   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9013 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9014 echo "configure:9015: checking for wnn/jllib.h" >&5
9015
9016 cat > conftest.$ac_ext <<EOF
9017 #line 9018 "configure"
9018 #include "confdefs.h"
9019 #include <wnn/jllib.h>
9020 EOF
9021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9022 { (eval echo configure:9023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9024 if test -z "$ac_err"; then
9025   rm -rf conftest*
9026   eval "ac_cv_header_$ac_safe=yes"
9027 else
9028   echo "$ac_err" >&5
9029   echo "configure: failed program was:" >&5
9030   cat conftest.$ac_ext >&5
9031   rm -rf conftest*
9032   eval "ac_cv_header_$ac_safe=no"
9033 fi
9034 rm -f conftest*
9035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9036   echo "$ac_t""yes" 1>&6
9037   :
9038 else
9039   echo "$ac_t""no" 1>&6
9040 with_wnn=no
9041 fi
9042  }
9043     if test "$with_wnn" != "no"; then
9044     for ac_func in crypt
9045 do
9046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9047 echo "configure:9048: checking for $ac_func" >&5
9048
9049 cat > conftest.$ac_ext <<EOF
9050 #line 9051 "configure"
9051 #include "confdefs.h"
9052 /* System header to define __stub macros and hopefully few prototypes,
9053     which can conflict with char $ac_func(); below.  */
9054 #include <assert.h>
9055 /* Override any gcc2 internal prototype to avoid an error.  */
9056 /* We use char because int might match the return type of a gcc2
9057     builtin and then its argument prototype would still apply.  */
9058 char $ac_func();
9059
9060 int main() {
9061
9062 /* The GNU C library defines this for functions which it implements
9063     to always fail with ENOSYS.  Some functions are actually named
9064     something starting with __ and the normal name is an alias.  */
9065 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9066 choke me
9067 #else
9068 $ac_func();
9069 #endif
9070
9071 ; return 0; }
9072 EOF
9073 if { (eval echo configure:9074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9074   rm -rf conftest*
9075   eval "ac_cv_func_$ac_func=yes"
9076 else
9077   echo "configure: failed program was:" >&5
9078   cat conftest.$ac_ext >&5
9079   rm -rf conftest*
9080   eval "ac_cv_func_$ac_func=no"
9081 fi
9082 rm -f conftest*
9083
9084 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9085   echo "$ac_t""yes" 1>&6
9086     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9087   { test "$extra_verbose" = "yes" && cat << EOF
9088     Defining $ac_tr_func
9089 EOF
9090 cat >> confdefs.h <<EOF
9091 #define $ac_tr_func 1
9092 EOF
9093 }
9094  
9095 else
9096   echo "$ac_t""no" 1>&6
9097 fi
9098 done
9099
9100     test "$ac_cv_func_crypt" != "yes" && { 
9101 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9102 echo "configure:9103: checking for crypt in -lcrypt" >&5
9103 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9104
9105 xe_check_libs=" -lcrypt "
9106 cat > conftest.$ac_ext <<EOF
9107 #line 9108 "configure"
9108 #include "confdefs.h"
9109 /* Override any gcc2 internal prototype to avoid an error.  */
9110 /* We use char because int might match the return type of a gcc2
9111     builtin and then its argument prototype would still apply.  */
9112 char crypt();
9113
9114 int main() {
9115 crypt()
9116 ; return 0; }
9117 EOF
9118 if { (eval echo configure:9119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9119   rm -rf conftest*
9120   eval "ac_cv_lib_$ac_lib_var=yes"
9121 else
9122   echo "configure: failed program was:" >&5
9123   cat conftest.$ac_ext >&5
9124   rm -rf conftest*
9125   eval "ac_cv_lib_$ac_lib_var=no"
9126 fi
9127 rm -f conftest*
9128 xe_check_libs=""
9129
9130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9131   echo "$ac_t""yes" 1>&6
9132     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9133     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9134   { test "$extra_verbose" = "yes" && cat << EOF
9135     Defining $ac_tr_lib
9136 EOF
9137 cat >> confdefs.h <<EOF
9138 #define $ac_tr_lib 1
9139 EOF
9140 }
9141
9142   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9143
9144 else
9145   echo "$ac_t""no" 1>&6
9146 fi
9147
9148  }
9149   fi
9150     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9151     
9152 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9153 echo "configure:9154: checking for jl_dic_list_e in -lwnn" >&5
9154 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9155
9156 xe_check_libs=" -lwnn "
9157 cat > conftest.$ac_ext <<EOF
9158 #line 9159 "configure"
9159 #include "confdefs.h"
9160 /* Override any gcc2 internal prototype to avoid an error.  */
9161 /* We use char because int might match the return type of a gcc2
9162     builtin and then its argument prototype would still apply.  */
9163 char jl_dic_list_e();
9164
9165 int main() {
9166 jl_dic_list_e()
9167 ; return 0; }
9168 EOF
9169 if { (eval echo configure:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9170   rm -rf conftest*
9171   eval "ac_cv_lib_$ac_lib_var=yes"
9172 else
9173   echo "configure: failed program was:" >&5
9174   cat conftest.$ac_ext >&5
9175   rm -rf conftest*
9176   eval "ac_cv_lib_$ac_lib_var=no"
9177 fi
9178 rm -f conftest*
9179 xe_check_libs=""
9180
9181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9182   echo "$ac_t""yes" 1>&6
9183   libwnn=wnn
9184 else
9185   echo "$ac_t""no" 1>&6
9186 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9187 echo "configure:9188: checking for jl_dic_list_e in -lwnn4" >&5
9188 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9189
9190 xe_check_libs=" -lwnn4 "
9191 cat > conftest.$ac_ext <<EOF
9192 #line 9193 "configure"
9193 #include "confdefs.h"
9194 /* Override any gcc2 internal prototype to avoid an error.  */
9195 /* We use char because int might match the return type of a gcc2
9196     builtin and then its argument prototype would still apply.  */
9197 char jl_dic_list_e();
9198
9199 int main() {
9200 jl_dic_list_e()
9201 ; return 0; }
9202 EOF
9203 if { (eval echo configure:9204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9204   rm -rf conftest*
9205   eval "ac_cv_lib_$ac_lib_var=yes"
9206 else
9207   echo "configure: failed program was:" >&5
9208   cat conftest.$ac_ext >&5
9209   rm -rf conftest*
9210   eval "ac_cv_lib_$ac_lib_var=no"
9211 fi
9212 rm -f conftest*
9213 xe_check_libs=""
9214
9215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9216   echo "$ac_t""yes" 1>&6
9217   libwnn=wnn4
9218 else
9219   echo "$ac_t""no" 1>&6
9220 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9221 echo "configure:9222: checking for jl_dic_list_e in -lwnn6" >&5
9222 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9223
9224 xe_check_libs=" -lwnn6 "
9225 cat > conftest.$ac_ext <<EOF
9226 #line 9227 "configure"
9227 #include "confdefs.h"
9228 /* Override any gcc2 internal prototype to avoid an error.  */
9229 /* We use char because int might match the return type of a gcc2
9230     builtin and then its argument prototype would still apply.  */
9231 char jl_dic_list_e();
9232
9233 int main() {
9234 jl_dic_list_e()
9235 ; return 0; }
9236 EOF
9237 if { (eval echo configure:9238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9238   rm -rf conftest*
9239   eval "ac_cv_lib_$ac_lib_var=yes"
9240 else
9241   echo "configure: failed program was:" >&5
9242   cat conftest.$ac_ext >&5
9243   rm -rf conftest*
9244   eval "ac_cv_lib_$ac_lib_var=no"
9245 fi
9246 rm -f conftest*
9247 xe_check_libs=""
9248
9249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9250   echo "$ac_t""yes" 1>&6
9251   libwnn=wnn6
9252 else
9253   echo "$ac_t""no" 1>&6
9254 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9255 echo "configure:9256: checking for dic_list_e in -lwnn6_fromsrc" >&5
9256 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9257
9258 xe_check_libs=" -lwnn6_fromsrc "
9259 cat > conftest.$ac_ext <<EOF
9260 #line 9261 "configure"
9261 #include "confdefs.h"
9262 /* Override any gcc2 internal prototype to avoid an error.  */
9263 /* We use char because int might match the return type of a gcc2
9264     builtin and then its argument prototype would still apply.  */
9265 char dic_list_e();
9266
9267 int main() {
9268 dic_list_e()
9269 ; return 0; }
9270 EOF
9271 if { (eval echo configure:9272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9272   rm -rf conftest*
9273   eval "ac_cv_lib_$ac_lib_var=yes"
9274 else
9275   echo "configure: failed program was:" >&5
9276   cat conftest.$ac_ext >&5
9277   rm -rf conftest*
9278   eval "ac_cv_lib_$ac_lib_var=no"
9279 fi
9280 rm -f conftest*
9281 xe_check_libs=""
9282
9283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9284   echo "$ac_t""yes" 1>&6
9285   libwnn=wnn6_fromsrc
9286 else
9287   echo "$ac_t""no" 1>&6
9288 with_wnn=no
9289 fi
9290
9291
9292 fi
9293
9294
9295 fi
9296
9297
9298 fi
9299
9300
9301   fi
9302   test -z "$with_wnn" && with_wnn=yes
9303   if test "$with_wnn" = "yes"; then
9304     { test "$extra_verbose" = "yes" && cat << \EOF
9305     Defining HAVE_WNN
9306 EOF
9307 cat >> confdefs.h <<\EOF
9308 #define HAVE_WNN 1
9309 EOF
9310 }
9311
9312     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9313     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9314    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9315  fi
9316     if test "$with_wnn6" != "no"; then
9317       
9318 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9319 echo "configure:9320: checking for jl_fi_dic_list in -l$libwnn" >&5
9320 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9321
9322 xe_check_libs=" -l$libwnn "
9323 cat > conftest.$ac_ext <<EOF
9324 #line 9325 "configure"
9325 #include "confdefs.h"
9326 /* Override any gcc2 internal prototype to avoid an error.  */
9327 /* We use char because int might match the return type of a gcc2
9328     builtin and then its argument prototype would still apply.  */
9329 char jl_fi_dic_list();
9330
9331 int main() {
9332 jl_fi_dic_list()
9333 ; return 0; }
9334 EOF
9335 if { (eval echo configure:9336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9336   rm -rf conftest*
9337   eval "ac_cv_lib_$ac_lib_var=yes"
9338 else
9339   echo "configure: failed program was:" >&5
9340   cat conftest.$ac_ext >&5
9341   rm -rf conftest*
9342   eval "ac_cv_lib_$ac_lib_var=no"
9343 fi
9344 rm -f conftest*
9345 xe_check_libs=""
9346
9347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9348   echo "$ac_t""yes" 1>&6
9349   with_wnn6=yes
9350 else
9351   echo "$ac_t""no" 1>&6
9352 fi
9353
9354
9355       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9356     Defining WNN6
9357 EOF
9358 cat >> confdefs.h <<\EOF
9359 #define WNN6 1
9360 EOF
9361 }
9362
9363     fi
9364   fi
9365
9366     canna_includes_found=no
9367   if test "$with_canna" != "no"; then
9368     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9369 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9370 echo "configure:9371: checking for canna/jrkanji.h" >&5
9371
9372 cat > conftest.$ac_ext <<EOF
9373 #line 9374 "configure"
9374 #include "confdefs.h"
9375 #include <canna/jrkanji.h>
9376 EOF
9377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9378 { (eval echo configure:9379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9380 if test -z "$ac_err"; then
9381   rm -rf conftest*
9382   eval "ac_cv_header_$ac_safe=yes"
9383 else
9384   echo "$ac_err" >&5
9385   echo "configure: failed program was:" >&5
9386   cat conftest.$ac_ext >&5
9387   rm -rf conftest*
9388   eval "ac_cv_header_$ac_safe=no"
9389 fi
9390 rm -f conftest*
9391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9392   echo "$ac_t""yes" 1>&6
9393   canna_includes_found=yes
9394 else
9395   echo "$ac_t""no" 1>&6
9396 fi
9397
9398   fi
9399   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9400       -d "/usr/local/canna/include"; then
9401     save_c_switch_site="$c_switch_site"
9402     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9403     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9404 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9405 echo "configure:9406: checking for canna/jrkanji.h" >&5
9406
9407 cat > conftest.$ac_ext <<EOF
9408 #line 9409 "configure"
9409 #include "confdefs.h"
9410 #include <canna/jrkanji.h>
9411 EOF
9412 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9413 { (eval echo configure:9414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9414 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9415 if test -z "$ac_err"; then
9416   rm -rf conftest*
9417   eval "ac_cv_header_$ac_safe=yes"
9418 else
9419   echo "$ac_err" >&5
9420   echo "configure: failed program was:" >&5
9421   cat conftest.$ac_ext >&5
9422   rm -rf conftest*
9423   eval "ac_cv_header_$ac_safe=no"
9424 fi
9425 rm -f conftest*
9426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9427   echo "$ac_t""yes" 1>&6
9428   canna_includes_found=yes
9429 else
9430   echo "$ac_t""no" 1>&6
9431 fi
9432
9433     if test "$canna_includes_found" != "yes"; then
9434       c_switch_site="$save_c_switch_site"
9435       with_canna="no"
9436     fi
9437   fi
9438
9439   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9440 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9441 echo "configure:9442: checking for canna/RK.h" >&5
9442
9443 cat > conftest.$ac_ext <<EOF
9444 #line 9445 "configure"
9445 #include "confdefs.h"
9446 #include <canna/RK.h>
9447 EOF
9448 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9449 { (eval echo configure:9450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9450 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9451 if test -z "$ac_err"; then
9452   rm -rf conftest*
9453   eval "ac_cv_header_$ac_safe=yes"
9454 else
9455   echo "$ac_err" >&5
9456   echo "configure: failed program was:" >&5
9457   cat conftest.$ac_ext >&5
9458   rm -rf conftest*
9459   eval "ac_cv_header_$ac_safe=no"
9460 fi
9461 rm -f conftest*
9462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9463   echo "$ac_t""yes" 1>&6
9464   :
9465 else
9466   echo "$ac_t""no" 1>&6
9467 with_canna=no
9468 fi
9469  }
9470   test -z "$with_canna" && { 
9471 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9472 echo "configure:9473: checking for RkBgnBun in -lRKC" >&5
9473 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9474
9475 xe_check_libs=" -lRKC "
9476 cat > conftest.$ac_ext <<EOF
9477 #line 9478 "configure"
9478 #include "confdefs.h"
9479 /* Override any gcc2 internal prototype to avoid an error.  */
9480 /* We use char because int might match the return type of a gcc2
9481     builtin and then its argument prototype would still apply.  */
9482 char RkBgnBun();
9483
9484 int main() {
9485 RkBgnBun()
9486 ; return 0; }
9487 EOF
9488 if { (eval echo configure:9489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9489   rm -rf conftest*
9490   eval "ac_cv_lib_$ac_lib_var=yes"
9491 else
9492   echo "configure: failed program was:" >&5
9493   cat conftest.$ac_ext >&5
9494   rm -rf conftest*
9495   eval "ac_cv_lib_$ac_lib_var=no"
9496 fi
9497 rm -f conftest*
9498 xe_check_libs=""
9499
9500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9501   echo "$ac_t""yes" 1>&6
9502   :
9503 else
9504   echo "$ac_t""no" 1>&6
9505 with_canna=no
9506 fi
9507
9508  }
9509   test -z "$with_canna" && { 
9510 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9511 echo "configure:9512: checking for jrKanjiControl in -lcanna" >&5
9512 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9513
9514 xe_check_libs=" -lcanna "
9515 cat > conftest.$ac_ext <<EOF
9516 #line 9517 "configure"
9517 #include "confdefs.h"
9518 /* Override any gcc2 internal prototype to avoid an error.  */
9519 /* We use char because int might match the return type of a gcc2
9520     builtin and then its argument prototype would still apply.  */
9521 char jrKanjiControl();
9522
9523 int main() {
9524 jrKanjiControl()
9525 ; return 0; }
9526 EOF
9527 if { (eval echo configure:9528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9528   rm -rf conftest*
9529   eval "ac_cv_lib_$ac_lib_var=yes"
9530 else
9531   echo "configure: failed program was:" >&5
9532   cat conftest.$ac_ext >&5
9533   rm -rf conftest*
9534   eval "ac_cv_lib_$ac_lib_var=no"
9535 fi
9536 rm -f conftest*
9537 xe_check_libs=""
9538
9539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9540   echo "$ac_t""yes" 1>&6
9541   :
9542 else
9543   echo "$ac_t""no" 1>&6
9544 with_canna=no
9545 fi
9546
9547  }
9548   test -z "$with_canna" && with_canna=yes
9549   if test "$with_canna" = "yes"; then
9550     { test "$extra_verbose" = "yes" && cat << \EOF
9551     Defining HAVE_CANNA
9552 EOF
9553 cat >> confdefs.h <<\EOF
9554 #define HAVE_CANNA 1
9555 EOF
9556 }
9557
9558     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9559     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9560    echo "    xemacs will be linked with \"mule-canna.o\""
9561  fi
9562   fi
9563
9564 else   for feature in xim canna wnn; do
9565     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9566       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9567     fi
9568     eval "with_${feature}=no"
9569   done
9570 fi 
9571
9572 if test "$need_motif" = "yes" ; then
9573   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9574     
9575 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9576 echo "configure:9577: checking for layout_object_getvalue in -li18n" >&5
9577 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9578
9579 xe_check_libs=" -li18n "
9580 cat > conftest.$ac_ext <<EOF
9581 #line 9582 "configure"
9582 #include "confdefs.h"
9583 /* Override any gcc2 internal prototype to avoid an error.  */
9584 /* We use char because int might match the return type of a gcc2
9585     builtin and then its argument prototype would still apply.  */
9586 char layout_object_getvalue();
9587
9588 int main() {
9589 layout_object_getvalue()
9590 ; return 0; }
9591 EOF
9592 if { (eval echo configure:9593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9593   rm -rf conftest*
9594   eval "ac_cv_lib_$ac_lib_var=yes"
9595 else
9596   echo "configure: failed program was:" >&5
9597   cat conftest.$ac_ext >&5
9598   rm -rf conftest*
9599   eval "ac_cv_lib_$ac_lib_var=no"
9600 fi
9601 rm -f conftest*
9602 xe_check_libs=""
9603
9604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9605   echo "$ac_t""yes" 1>&6
9606   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9607 else
9608   echo "$ac_t""no" 1>&6
9609 fi
9610
9611
9612   
9613 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9614     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9615   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9616   
9617         runpath="" runpath_dirs=""
9618   if test -n "$LD_RUN_PATH"; then
9619     runpath="$LD_RUN_PATH"
9620   elif test "$GCC" = "yes"; then
9621         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
9622     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
9623     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
9624     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
9625       case "$arg" in P,* | -L* | -R* )
9626         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
9627           {
9628 xe_runpath_dir="$dir"
9629   test "$xe_runpath_dir" != "/lib"     -a \
9630         "$xe_runpath_dir" != "/usr/lib" -a \
9631         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9632   eval "$xe_add_unique_runpath_dir"
9633 }
9634         done ;;
9635       esac
9636     done
9637     ld_switch_run="$ld_switch_run_save"
9638     rm -f conftest*
9639   else
9640         for arg in $ld_switch_site $ld_switch_x_site; do
9641       case "$arg" in -L*) {
9642 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
9643   test "$xe_runpath_dir" != "/lib"     -a \
9644         "$xe_runpath_dir" != "/usr/lib" -a \
9645         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9646   eval "$xe_add_unique_runpath_dir"
9647 };; esac
9648     done
9649         if test "$opsys $need_motif" = "sol2 yes"; then
9650       xe_runpath_dir="/opt/SUNWdt/lib";
9651       eval "$xe_add_unique_runpath_dir";
9652     fi
9653   fi 
9654   if test -n "$runpath"; then
9655     ld_switch_run="${dash_r}${runpath}"
9656     
9657 if test "$GCC" = "yes"; then
9658   set x $ld_switch_run; shift; ld_switch_run=""
9659   while test -n "$1"; do
9660     case $1 in
9661       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9662       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9663       -Xlinker* ) ;;
9664       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9665     esac
9666     shift
9667   done
9668 fi
9669     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9670   fi
9671 fi
9672
9673 fi
9674
9675 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo 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 fsync ftruncate umask
9676 do
9677 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9678 echo "configure:9679: checking for $ac_func" >&5
9679
9680 cat > conftest.$ac_ext <<EOF
9681 #line 9682 "configure"
9682 #include "confdefs.h"
9683 /* System header to define __stub macros and hopefully few prototypes,
9684     which can conflict with char $ac_func(); below.  */
9685 #include <assert.h>
9686 /* Override any gcc2 internal prototype to avoid an error.  */
9687 /* We use char because int might match the return type of a gcc2
9688     builtin and then its argument prototype would still apply.  */
9689 char $ac_func();
9690
9691 int main() {
9692
9693 /* The GNU C library defines this for functions which it implements
9694     to always fail with ENOSYS.  Some functions are actually named
9695     something starting with __ and the normal name is an alias.  */
9696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9697 choke me
9698 #else
9699 $ac_func();
9700 #endif
9701
9702 ; return 0; }
9703 EOF
9704 if { (eval echo configure:9705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9705   rm -rf conftest*
9706   eval "ac_cv_func_$ac_func=yes"
9707 else
9708   echo "configure: failed program was:" >&5
9709   cat conftest.$ac_ext >&5
9710   rm -rf conftest*
9711   eval "ac_cv_func_$ac_func=no"
9712 fi
9713 rm -f conftest*
9714
9715 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9716   echo "$ac_t""yes" 1>&6
9717     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9718   { test "$extra_verbose" = "yes" && cat << EOF
9719     Defining $ac_tr_func
9720 EOF
9721 cat >> confdefs.h <<EOF
9722 #define $ac_tr_func 1
9723 EOF
9724 }
9725  
9726 else
9727   echo "$ac_t""no" 1>&6
9728 fi
9729 done
9730
9731
9732 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9733    echo "    xemacs will be linked with \"realpath.o\""
9734  fi
9735
9736 for ac_func in getloadavg
9737 do
9738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9739 echo "configure:9740: checking for $ac_func" >&5
9740
9741 cat > conftest.$ac_ext <<EOF
9742 #line 9743 "configure"
9743 #include "confdefs.h"
9744 /* System header to define __stub macros and hopefully few prototypes,
9745     which can conflict with char $ac_func(); below.  */
9746 #include <assert.h>
9747 /* Override any gcc2 internal prototype to avoid an error.  */
9748 /* We use char because int might match the return type of a gcc2
9749     builtin and then its argument prototype would still apply.  */
9750 char $ac_func();
9751
9752 int main() {
9753
9754 /* The GNU C library defines this for functions which it implements
9755     to always fail with ENOSYS.  Some functions are actually named
9756     something starting with __ and the normal name is an alias.  */
9757 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9758 choke me
9759 #else
9760 $ac_func();
9761 #endif
9762
9763 ; return 0; }
9764 EOF
9765 if { (eval echo configure:9766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9766   rm -rf conftest*
9767   eval "ac_cv_func_$ac_func=yes"
9768 else
9769   echo "configure: failed program was:" >&5
9770   cat conftest.$ac_ext >&5
9771   rm -rf conftest*
9772   eval "ac_cv_func_$ac_func=no"
9773 fi
9774 rm -f conftest*
9775
9776 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9777   echo "$ac_t""yes" 1>&6
9778     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9779   { test "$extra_verbose" = "yes" && cat << EOF
9780     Defining $ac_tr_func
9781 EOF
9782 cat >> confdefs.h <<EOF
9783 #define $ac_tr_func 1
9784 EOF
9785 }
9786  
9787 else
9788   echo "$ac_t""no" 1>&6
9789 fi
9790 done
9791
9792
9793 if test "$ac_cv_func_getloadavg" != "yes"
9794 then
9795   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
9796    echo "    xemacs will be linked with \"getloadavg.o\""
9797  fi
9798
9799     
9800 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
9801 echo "configure:9802: checking for kstat_open in -lkstat" >&5
9802 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
9803
9804 xe_check_libs=" -lkstat "
9805 cat > conftest.$ac_ext <<EOF
9806 #line 9807 "configure"
9807 #include "confdefs.h"
9808 /* Override any gcc2 internal prototype to avoid an error.  */
9809 /* We use char because int might match the return type of a gcc2
9810     builtin and then its argument prototype would still apply.  */
9811 char kstat_open();
9812
9813 int main() {
9814 kstat_open()
9815 ; return 0; }
9816 EOF
9817 if { (eval echo configure:9818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9818   rm -rf conftest*
9819   eval "ac_cv_lib_$ac_lib_var=yes"
9820 else
9821   echo "configure: failed program was:" >&5
9822   cat conftest.$ac_ext >&5
9823   rm -rf conftest*
9824   eval "ac_cv_lib_$ac_lib_var=no"
9825 fi
9826 rm -f conftest*
9827 xe_check_libs=""
9828
9829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9830   echo "$ac_t""yes" 1>&6
9831     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9832     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9833   { test "$extra_verbose" = "yes" && cat << EOF
9834     Defining $ac_tr_lib
9835 EOF
9836 cat >> confdefs.h <<EOF
9837 #define $ac_tr_lib 1
9838 EOF
9839 }
9840
9841   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
9842
9843 else
9844   echo "$ac_t""no" 1>&6
9845 fi
9846
9847
9848
9849     
9850 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
9851 echo "configure:9852: checking for kvm_read in -lkvm" >&5
9852 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
9853
9854 xe_check_libs=" -lkvm "
9855 cat > conftest.$ac_ext <<EOF
9856 #line 9857 "configure"
9857 #include "confdefs.h"
9858 /* Override any gcc2 internal prototype to avoid an error.  */
9859 /* We use char because int might match the return type of a gcc2
9860     builtin and then its argument prototype would still apply.  */
9861 char kvm_read();
9862
9863 int main() {
9864 kvm_read()
9865 ; return 0; }
9866 EOF
9867 if { (eval echo configure:9868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9868   rm -rf conftest*
9869   eval "ac_cv_lib_$ac_lib_var=yes"
9870 else
9871   echo "configure: failed program was:" >&5
9872   cat conftest.$ac_ext >&5
9873   rm -rf conftest*
9874   eval "ac_cv_lib_$ac_lib_var=no"
9875 fi
9876 rm -f conftest*
9877 xe_check_libs=""
9878
9879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9880   echo "$ac_t""yes" 1>&6
9881     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9882     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9883   { test "$extra_verbose" = "yes" && cat << EOF
9884     Defining $ac_tr_lib
9885 EOF
9886 cat >> confdefs.h <<EOF
9887 #define $ac_tr_lib 1
9888 EOF
9889 }
9890
9891   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9892
9893 else
9894   echo "$ac_t""no" 1>&6
9895 fi
9896
9897
9898 fi
9899
9900 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9901 echo "configure:9902: checking whether netdb declares h_errno" >&5
9902 cat > conftest.$ac_ext <<EOF
9903 #line 9904 "configure"
9904 #include "confdefs.h"
9905 #include <netdb.h>
9906 int main() {
9907 return h_errno;
9908 ; return 0; }
9909 EOF
9910 if { (eval echo configure:9911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9911   rm -rf conftest*
9912   echo "$ac_t""yes" 1>&6
9913    { test "$extra_verbose" = "yes" && cat << \EOF
9914     Defining HAVE_H_ERRNO
9915 EOF
9916 cat >> confdefs.h <<\EOF
9917 #define HAVE_H_ERRNO 1
9918 EOF
9919 }
9920
9921 else
9922   echo "configure: failed program was:" >&5
9923   cat conftest.$ac_ext >&5
9924   rm -rf conftest*
9925   echo "$ac_t""no" 1>&6
9926 fi
9927 rm -f conftest*
9928
9929 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9930 echo "configure:9931: checking for sigsetjmp" >&5
9931 cat > conftest.$ac_ext <<EOF
9932 #line 9933 "configure"
9933 #include "confdefs.h"
9934 #include <setjmp.h>
9935 int main() {
9936 sigjmp_buf bar; sigsetjmp (bar, 0);
9937 ; return 0; }
9938 EOF
9939 if { (eval echo configure:9940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9940   rm -rf conftest*
9941   echo "$ac_t""yes" 1>&6
9942    { test "$extra_verbose" = "yes" && cat << \EOF
9943     Defining HAVE_SIGSETJMP
9944 EOF
9945 cat >> confdefs.h <<\EOF
9946 #define HAVE_SIGSETJMP 1
9947 EOF
9948 }
9949
9950 else
9951   echo "configure: failed program was:" >&5
9952   cat conftest.$ac_ext >&5
9953   rm -rf conftest*
9954   echo "$ac_t""no" 1>&6
9955 fi
9956 rm -f conftest*
9957
9958 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9959 echo "configure:9960: checking whether localtime caches TZ" >&5
9960
9961 if test "$ac_cv_func_tzset" = "yes"; then
9962 cat > conftest.$ac_ext <<EOF
9963 #line 9964 "configure"
9964 #include "confdefs.h"
9965 #include <time.h>
9966 #if STDC_HEADERS
9967 # include <stdlib.h>
9968 #endif
9969 extern char **environ;
9970 unset_TZ ()
9971 {
9972   char **from, **to;
9973   for (to = from = environ; (*to = *from); from++)
9974     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9975       to++;
9976 }
9977 char TZ_GMT0[] = "TZ=GMT0";
9978 char TZ_PST8[] = "TZ=PST8";
9979 main()
9980 {
9981   time_t now = time ((time_t *) 0);
9982   int hour_GMT0, hour_unset;
9983   if (putenv (TZ_GMT0) != 0)
9984     exit (1);
9985   hour_GMT0 = localtime (&now)->tm_hour;
9986   unset_TZ ();
9987   hour_unset = localtime (&now)->tm_hour;
9988   if (putenv (TZ_PST8) != 0)
9989     exit (1);
9990   if (localtime (&now)->tm_hour == hour_GMT0)
9991     exit (1);
9992   unset_TZ ();
9993   if (localtime (&now)->tm_hour != hour_unset)
9994     exit (1);
9995   exit (0);
9996 }
9997 EOF
9998 if { (eval echo configure:9999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9999 then
10000   emacs_cv_localtime_cache=no
10001 else
10002   conftest_rc="$?"
10003   echo "configure: failed program was:" >&5
10004   cat conftest.$ac_ext >&5
10005   rm -fr conftest*
10006   emacs_cv_localtime_cache=yes
10007 fi
10008 rm -fr conftest*
10009 else
10010         # If we lack tzset, report that localtime does not cache TZ,
10011         # since we can't invalidate the cache if we don't have tzset.
10012         emacs_cv_localtime_cache=no
10013 fi
10014 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10015 if test $emacs_cv_localtime_cache = yes; then
10016   { test "$extra_verbose" = "yes" && cat << \EOF
10017     Defining LOCALTIME_CACHE
10018 EOF
10019 cat >> confdefs.h <<\EOF
10020 #define LOCALTIME_CACHE 1
10021 EOF
10022 }
10023
10024 fi
10025
10026 if test "$HAVE_TIMEVAL" = "yes"; then
10027 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10028 echo "configure:10029: checking whether gettimeofday accepts one or two arguments" >&5
10029 cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032
10033 #ifdef TIME_WITH_SYS_TIME
10034 #include <sys/time.h>
10035 #include <time.h>
10036 #else
10037 #ifdef HAVE_SYS_TIME_H
10038 #include <sys/time.h>
10039 #else
10040 #include <time.h>
10041 #endif
10042 #endif
10043   
10044 int main() {
10045
10046   struct timeval time;
10047   gettimeofday (&time, 0);
10048
10049 ; return 0; }
10050 EOF
10051 if { (eval echo configure:10052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10052   rm -rf conftest*
10053   echo "$ac_t""two" 1>&6
10054 else
10055   echo "configure: failed program was:" >&5
10056   cat conftest.$ac_ext >&5
10057   rm -rf conftest*
10058   echo "$ac_t""one" 1>&6
10059    { test "$extra_verbose" = "yes" && cat << \EOF
10060     Defining GETTIMEOFDAY_ONE_ARGUMENT
10061 EOF
10062 cat >> confdefs.h <<\EOF
10063 #define GETTIMEOFDAY_ONE_ARGUMENT 1
10064 EOF
10065 }
10066
10067 fi
10068 rm -f conftest*
10069 fi
10070
10071
10072 echo $ac_n "checking for inline""... $ac_c" 1>&6
10073 echo "configure:10074: checking for inline" >&5
10074
10075 ac_cv_c_inline=no
10076 for ac_kw in inline __inline__ __inline; do
10077   cat > conftest.$ac_ext <<EOF
10078 #line 10079 "configure"
10079 #include "confdefs.h"
10080
10081 int main() {
10082 } $ac_kw foo() {
10083 ; return 0; }
10084 EOF
10085 if { (eval echo configure:10086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10086   rm -rf conftest*
10087   ac_cv_c_inline=$ac_kw; break
10088 else
10089   echo "configure: failed program was:" >&5
10090   cat conftest.$ac_ext >&5
10091 fi
10092 rm -f conftest*
10093 done
10094
10095
10096 echo "$ac_t""$ac_cv_c_inline" 1>&6
10097 case "$ac_cv_c_inline" in
10098   inline | yes) ;;
10099   no) { test "$extra_verbose" = "yes" && cat << \EOF
10100     Defining inline = 
10101 EOF
10102 cat >> confdefs.h <<\EOF
10103 #define inline 
10104 EOF
10105 }
10106  ;;
10107   *)  { test "$extra_verbose" = "yes" && cat << EOF
10108     Defining inline = $ac_cv_c_inline
10109 EOF
10110 cat >> confdefs.h <<EOF
10111 #define inline $ac_cv_c_inline
10112 EOF
10113 }
10114  ;;
10115 esac
10116
10117 if test "$ac_cv_c_inline" != "no"; then
10118   { test "$extra_verbose" = "yes" && cat << \EOF
10119     Defining HAVE_INLINE
10120 EOF
10121 cat >> confdefs.h <<\EOF
10122 #define HAVE_INLINE 1
10123 EOF
10124 }
10125
10126   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
10127    echo "    xemacs will be linked with \"inline.o\""
10128  fi
10129 fi
10130
10131
10132 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10133 # for constant arguments.  Useless!
10134 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
10135 echo "configure:10136: checking for working alloca.h" >&5
10136
10137 cat > conftest.$ac_ext <<EOF
10138 #line 10139 "configure"
10139 #include "confdefs.h"
10140 #include <alloca.h>
10141 int main() {
10142 char *p = alloca(2 * sizeof(int));
10143 ; return 0; }
10144 EOF
10145 if { (eval echo configure:10146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10146   rm -rf conftest*
10147   ac_cv_header_alloca_h=yes
10148 else
10149   echo "configure: failed program was:" >&5
10150   cat conftest.$ac_ext >&5
10151   rm -rf conftest*
10152   ac_cv_header_alloca_h=no
10153 fi
10154 rm -f conftest*
10155
10156 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
10157 if test $ac_cv_header_alloca_h = yes; then
10158   { test "$extra_verbose" = "yes" && cat << \EOF
10159     Defining HAVE_ALLOCA_H
10160 EOF
10161 cat >> confdefs.h <<\EOF
10162 #define HAVE_ALLOCA_H 1
10163 EOF
10164 }
10165
10166 fi
10167
10168 echo $ac_n "checking for alloca""... $ac_c" 1>&6
10169 echo "configure:10170: checking for alloca" >&5
10170
10171 cat > conftest.$ac_ext <<EOF
10172 #line 10173 "configure"
10173 #include "confdefs.h"
10174
10175 #ifdef __GNUC__
10176 # define alloca __builtin_alloca
10177 #else
10178 # ifdef _MSC_VER
10179 #  include <malloc.h>
10180 #  define alloca _alloca
10181 # else
10182 #  if HAVE_ALLOCA_H
10183 #   include <alloca.h>
10184 #  else
10185 #   ifdef _AIX
10186  #pragma alloca
10187 #   else
10188 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10189 char *alloca ();
10190 #    endif
10191 #   endif
10192 #  endif
10193 # endif
10194 #endif
10195
10196 int main() {
10197 char *p = (char *) alloca(1);
10198 ; return 0; }
10199 EOF
10200 if { (eval echo configure:10201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10201   rm -rf conftest*
10202   ac_cv_func_alloca_works=yes
10203 else
10204   echo "configure: failed program was:" >&5
10205   cat conftest.$ac_ext >&5
10206   rm -rf conftest*
10207   ac_cv_func_alloca_works=no
10208 fi
10209 rm -f conftest*
10210
10211 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
10212 if test $ac_cv_func_alloca_works = yes; then
10213   { test "$extra_verbose" = "yes" && cat << \EOF
10214     Defining HAVE_ALLOCA
10215 EOF
10216 cat >> confdefs.h <<\EOF
10217 #define HAVE_ALLOCA 1
10218 EOF
10219 }
10220
10221 fi
10222
10223 if test $ac_cv_func_alloca_works = no; then
10224   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10225   # that cause trouble.  Some versions do not even contain alloca or
10226   # contain a buggy version.  If you still want to use their alloca,
10227   # use ar to extract alloca.o from them instead of compiling alloca.c.
10228   ALLOCA=alloca.${ac_objext}
10229   { test "$extra_verbose" = "yes" && cat << \EOF
10230     Defining C_ALLOCA
10231 EOF
10232 cat >> confdefs.h <<\EOF
10233 #define C_ALLOCA 1
10234 EOF
10235 }
10236
10237
10238 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10239 echo "configure:10240: checking whether alloca needs Cray hooks" >&5
10240
10241 cat > conftest.$ac_ext <<EOF
10242 #line 10243 "configure"
10243 #include "confdefs.h"
10244 #if defined(CRAY) && ! defined(CRAY2)
10245 webecray
10246 #else
10247 wenotbecray
10248 #endif
10249
10250 EOF
10251 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10252   egrep "webecray" >/dev/null 2>&1; then
10253   rm -rf conftest*
10254   ac_cv_os_cray=yes
10255 else
10256   rm -rf conftest*
10257   ac_cv_os_cray=no
10258 fi
10259 rm -f conftest*
10260
10261
10262 echo "$ac_t""$ac_cv_os_cray" 1>&6
10263 if test $ac_cv_os_cray = yes; then
10264 for ac_func in _getb67 GETB67 getb67; do
10265   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10266 echo "configure:10267: checking for $ac_func" >&5
10267
10268 cat > conftest.$ac_ext <<EOF
10269 #line 10270 "configure"
10270 #include "confdefs.h"
10271 /* System header to define __stub macros and hopefully few prototypes,
10272     which can conflict with char $ac_func(); below.  */
10273 #include <assert.h>
10274 /* Override any gcc2 internal prototype to avoid an error.  */
10275 /* We use char because int might match the return type of a gcc2
10276     builtin and then its argument prototype would still apply.  */
10277 char $ac_func();
10278
10279 int main() {
10280
10281 /* The GNU C library defines this for functions which it implements
10282     to always fail with ENOSYS.  Some functions are actually named
10283     something starting with __ and the normal name is an alias.  */
10284 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10285 choke me
10286 #else
10287 $ac_func();
10288 #endif
10289
10290 ; return 0; }
10291 EOF
10292 if { (eval echo configure:10293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10293   rm -rf conftest*
10294   eval "ac_cv_func_$ac_func=yes"
10295 else
10296   echo "configure: failed program was:" >&5
10297   cat conftest.$ac_ext >&5
10298   rm -rf conftest*
10299   eval "ac_cv_func_$ac_func=no"
10300 fi
10301 rm -f conftest*
10302
10303 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10304   echo "$ac_t""yes" 1>&6
10305   { test "$extra_verbose" = "yes" && cat << EOF
10306     Defining CRAY_STACKSEG_END = $ac_func
10307 EOF
10308 cat >> confdefs.h <<EOF
10309 #define CRAY_STACKSEG_END $ac_func
10310 EOF
10311 }
10312
10313   break
10314 else
10315   echo "$ac_t""no" 1>&6
10316 fi
10317
10318 done
10319 fi
10320
10321 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10322 echo "configure:10323: checking stack direction for C alloca" >&5
10323
10324 cat > conftest.$ac_ext <<EOF
10325 #line 10326 "configure"
10326 #include "confdefs.h"
10327 find_stack_direction ()
10328 {
10329   static char *addr = 0;
10330   auto char dummy;
10331   if (addr == 0)
10332     {
10333       addr = &dummy;
10334       return find_stack_direction ();
10335     }
10336   else
10337     return (&dummy > addr) ? 1 : -1;
10338 }
10339 main ()
10340 {
10341   exit (find_stack_direction() < 0);
10342 }
10343 EOF
10344 if { (eval echo configure:10345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10345 then
10346   ac_cv_c_stack_direction=1
10347 else
10348   conftest_rc="$?"
10349   echo "configure: failed program was:" >&5
10350   cat conftest.$ac_ext >&5
10351   rm -fr conftest*
10352   ac_cv_c_stack_direction=-1
10353 fi
10354 rm -fr conftest*
10355
10356 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10357 { test "$extra_verbose" = "yes" && cat << EOF
10358     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10359 EOF
10360 cat >> confdefs.h <<EOF
10361 #define STACK_DIRECTION $ac_cv_c_stack_direction
10362 EOF
10363 }
10364
10365 fi
10366
10367 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10368    echo "    xemacs will be linked with \"$ALLOCA\""
10369  fi
10370
10371 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10372 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10373 echo "configure:10374: checking for vfork.h" >&5
10374
10375 cat > conftest.$ac_ext <<EOF
10376 #line 10377 "configure"
10377 #include "confdefs.h"
10378 #include <vfork.h>
10379 EOF
10380 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10381 { (eval echo configure:10382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10382 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10383 if test -z "$ac_err"; then
10384   rm -rf conftest*
10385   eval "ac_cv_header_$ac_safe=yes"
10386 else
10387   echo "$ac_err" >&5
10388   echo "configure: failed program was:" >&5
10389   cat conftest.$ac_ext >&5
10390   rm -rf conftest*
10391   eval "ac_cv_header_$ac_safe=no"
10392 fi
10393 rm -f conftest*
10394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10395   echo "$ac_t""yes" 1>&6
10396   { test "$extra_verbose" = "yes" && cat << \EOF
10397     Defining HAVE_VFORK_H
10398 EOF
10399 cat >> confdefs.h <<\EOF
10400 #define HAVE_VFORK_H 1
10401 EOF
10402 }
10403
10404 else
10405   echo "$ac_t""no" 1>&6
10406 fi
10407
10408 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10409 echo "configure:10410: checking for working vfork" >&5
10410
10411 cat > conftest.$ac_ext <<EOF
10412 #line 10413 "configure"
10413 #include "confdefs.h"
10414 /* Thanks to Paul Eggert for this test.  */
10415 #include <stdio.h>
10416 #include <sys/types.h>
10417 #include <sys/stat.h>
10418 #ifdef HAVE_UNISTD_H
10419 #include <unistd.h>
10420 #endif
10421 #ifdef HAVE_VFORK_H
10422 #include <vfork.h>
10423 #endif
10424 /* On some sparc systems, changes by the child to local and incoming
10425    argument registers are propagated back to the parent.
10426    The compiler is told about this with #include <vfork.h>,
10427    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10428    Test for this by using a static variable whose address
10429    is put into a register that is clobbered by the vfork.  */
10430 static
10431 #ifdef __cplusplus
10432 sparc_address_test (int arg)
10433 #else
10434 sparc_address_test (arg) int arg;
10435 #endif
10436 {
10437   static pid_t child;
10438   if (!child) {
10439     child = vfork ();
10440     if (child < 0) {
10441       perror ("vfork");
10442       _exit(2);
10443     }
10444     if (!child) {
10445       arg = getpid();
10446       write(-1, "", 0);
10447       _exit (arg);
10448     }
10449   }
10450 }
10451 main() {
10452   pid_t parent = getpid ();
10453   pid_t child;
10454
10455   sparc_address_test ();
10456
10457   child = vfork ();
10458
10459   if (child == 0) {
10460     /* Here is another test for sparc vfork register problems.
10461        This test uses lots of local variables, at least
10462        as many local variables as main has allocated so far
10463        including compiler temporaries.  4 locals are enough for
10464        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10465        A buggy compiler should reuse the register of parent
10466        for one of the local variables, since it will think that
10467        parent can't possibly be used any more in this routine.
10468        Assigning to the local variable will thus munge parent
10469        in the parent process.  */
10470     pid_t
10471       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10472       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10473     /* Convince the compiler that p..p7 are live; otherwise, it might
10474        use the same hardware register for all 8 local variables.  */
10475     if (p != p1 || p != p2 || p != p3 || p != p4
10476         || p != p5 || p != p6 || p != p7)
10477       _exit(1);
10478
10479     /* On some systems (e.g. IRIX 3.3),
10480        vfork doesn't separate parent from child file descriptors.
10481        If the child closes a descriptor before it execs or exits,
10482        this munges the parent's descriptor as well.
10483        Test for this by closing stdout in the child.  */
10484     _exit(close(fileno(stdout)) != 0);
10485   } else {
10486     int status;
10487     struct stat st;
10488
10489     while (wait(&status) != child)
10490       ;
10491     exit(
10492          /* Was there some problem with vforking?  */
10493          child < 0
10494
10495          /* Did the child fail?  (This shouldn't happen.)  */
10496          || status
10497
10498          /* Did the vfork/compiler bug occur?  */
10499          || parent != getpid()
10500
10501          /* Did the file descriptor bug occur?  */
10502          || fstat(fileno(stdout), &st) != 0
10503          );
10504   }
10505 }
10506 EOF
10507 if { (eval echo configure:10508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10508 then
10509   ac_cv_func_vfork_works=yes
10510 else
10511   conftest_rc="$?"
10512   echo "configure: failed program was:" >&5
10513   cat conftest.$ac_ext >&5
10514   rm -fr conftest*
10515   ac_cv_func_vfork_works=no
10516 fi
10517 rm -fr conftest*
10518
10519 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10520 if test $ac_cv_func_vfork_works = no; then
10521   { test "$extra_verbose" = "yes" && cat << \EOF
10522     Defining vfork = fork
10523 EOF
10524 cat >> confdefs.h <<\EOF
10525 #define vfork fork
10526 EOF
10527 }
10528
10529 fi
10530
10531
10532 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10533 echo "configure:10534: checking for working strcoll" >&5
10534
10535 cat > conftest.$ac_ext <<EOF
10536 #line 10537 "configure"
10537 #include "confdefs.h"
10538 #include <string.h>
10539 main ()
10540 {
10541   exit (strcoll ("abc", "def") >= 0 ||
10542         strcoll ("ABC", "DEF") >= 0 ||
10543         strcoll ("123", "456") >= 0);
10544 }
10545 EOF
10546 if { (eval echo configure:10547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10547 then
10548   ac_cv_func_strcoll_works=yes
10549 else
10550   conftest_rc="$?"
10551   echo "configure: failed program was:" >&5
10552   cat conftest.$ac_ext >&5
10553   rm -fr conftest*
10554   ac_cv_func_strcoll_works=no
10555 fi
10556 rm -fr conftest*
10557
10558 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10559 if test $ac_cv_func_strcoll_works = yes; then
10560   { test "$extra_verbose" = "yes" && cat << \EOF
10561     Defining HAVE_STRCOLL
10562 EOF
10563 cat >> confdefs.h <<\EOF
10564 #define HAVE_STRCOLL 1
10565 EOF
10566 }
10567
10568 fi
10569
10570
10571 for ac_func in getpgrp
10572 do
10573 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10574 echo "configure:10575: checking for $ac_func" >&5
10575
10576 cat > conftest.$ac_ext <<EOF
10577 #line 10578 "configure"
10578 #include "confdefs.h"
10579 /* System header to define __stub macros and hopefully few prototypes,
10580     which can conflict with char $ac_func(); below.  */
10581 #include <assert.h>
10582 /* Override any gcc2 internal prototype to avoid an error.  */
10583 /* We use char because int might match the return type of a gcc2
10584     builtin and then its argument prototype would still apply.  */
10585 char $ac_func();
10586
10587 int main() {
10588
10589 /* The GNU C library defines this for functions which it implements
10590     to always fail with ENOSYS.  Some functions are actually named
10591     something starting with __ and the normal name is an alias.  */
10592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10593 choke me
10594 #else
10595 $ac_func();
10596 #endif
10597
10598 ; return 0; }
10599 EOF
10600 if { (eval echo configure:10601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10601   rm -rf conftest*
10602   eval "ac_cv_func_$ac_func=yes"
10603 else
10604   echo "configure: failed program was:" >&5
10605   cat conftest.$ac_ext >&5
10606   rm -rf conftest*
10607   eval "ac_cv_func_$ac_func=no"
10608 fi
10609 rm -f conftest*
10610
10611 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10612   echo "$ac_t""yes" 1>&6
10613     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10614   { test "$extra_verbose" = "yes" && cat << EOF
10615     Defining $ac_tr_func
10616 EOF
10617 cat >> confdefs.h <<EOF
10618 #define $ac_tr_func 1
10619 EOF
10620 }
10621  
10622 else
10623   echo "$ac_t""no" 1>&6
10624 fi
10625 done
10626
10627 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10628 echo "configure:10629: checking whether getpgrp takes no argument" >&5
10629
10630 cat > conftest.$ac_ext <<EOF
10631 #line 10632 "configure"
10632 #include "confdefs.h"
10633
10634 /*
10635  * If this system has a BSD-style getpgrp(),
10636  * which takes a pid argument, exit unsuccessfully.
10637  *
10638  * Snarfed from Chet Ramey's bash pgrp.c test program
10639  */
10640 #include <stdio.h>
10641 #include <sys/types.h>
10642
10643 int     pid;
10644 int     pg1, pg2, pg3, pg4;
10645 int     ng, np, s, child;
10646
10647 main()
10648 {
10649         pid = getpid();
10650         pg1 = getpgrp(0);
10651         pg2 = getpgrp();
10652         pg3 = getpgrp(pid);
10653         pg4 = getpgrp(1);
10654
10655         /*
10656          * If all of these values are the same, it's pretty sure that
10657          * we're on a system that ignores getpgrp's first argument.
10658          */
10659         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10660                 exit(0);
10661
10662         child = fork();
10663         if (child < 0)
10664                 exit(1);
10665         else if (child == 0) {
10666                 np = getpid();
10667                 /*
10668                  * If this is Sys V, this will not work; pgrp will be
10669                  * set to np because setpgrp just changes a pgrp to be
10670                  * the same as the pid.
10671                  */
10672                 setpgrp(np, pg1);
10673                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10674                 if (ng == pg1) {
10675                         exit(1);
10676                 } else {
10677                         exit(0);
10678                 }
10679         } else {
10680                 wait(&s);
10681                 exit(s>>8);
10682         }
10683 }
10684
10685 EOF
10686 if { (eval echo configure:10687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10687 then
10688   ac_cv_func_getpgrp_void=yes
10689 else
10690   conftest_rc="$?"
10691   echo "configure: failed program was:" >&5
10692   cat conftest.$ac_ext >&5
10693   rm -fr conftest*
10694   ac_cv_func_getpgrp_void=no
10695 fi
10696 rm -fr conftest*
10697
10698
10699 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10700 if test $ac_cv_func_getpgrp_void = yes; then
10701   { test "$extra_verbose" = "yes" && cat << \EOF
10702     Defining GETPGRP_VOID
10703 EOF
10704 cat >> confdefs.h <<\EOF
10705 #define GETPGRP_VOID 1
10706 EOF
10707 }
10708
10709 fi
10710
10711
10712 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10713 echo "configure:10714: checking for working mmap" >&5
10714 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10715 cat > conftest.$ac_ext <<EOF
10716 #line 10717 "configure"
10717 #include "confdefs.h"
10718 #include <stdio.h>
10719 #include <unistd.h>
10720 #include <fcntl.h>
10721 #include <sys/mman.h>
10722
10723 #ifndef MAP_VARIABLE
10724 #define MAP_VARIABLE 0
10725 #endif
10726
10727 #ifndef MAP_FAILED
10728 #define MAP_FAILED -1
10729 #endif
10730
10731 int main (int argc, char *argv[])
10732 {
10733   int fd = -1;
10734   caddr_t p;
10735 #ifndef MAP_ANONYMOUS
10736   fd = open ("/dev/zero", O_RDWR);
10737   if (fd < 0)
10738     return 1;
10739 #define MAP_ANONYMOUS 0
10740 #endif
10741   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10742            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10743            fd, 0) != (void *) MAP_FAILED)
10744     return 0;
10745   perror ("conftest: mmap failed");
10746   return 1;
10747 }
10748 EOF
10749 if { (eval echo configure:10750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10750 then
10751   have_mmap=yes
10752 else
10753   conftest_rc="$?"
10754   echo "configure: failed program was:" >&5
10755   cat conftest.$ac_ext >&5
10756   rm -fr conftest*
10757   have_mmap=no
10758 fi
10759 rm -fr conftest* ;;
10760 esac
10761 echo "$ac_t""$have_mmap" 1>&6
10762 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10763     Defining HAVE_MMAP
10764 EOF
10765 cat >> confdefs.h <<\EOF
10766 #define HAVE_MMAP 1
10767 EOF
10768 }
10769
10770
10771 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
10772 if test "$rel_alloc $have_mmap" = "default yes"; then
10773   if test "$doug_lea_malloc" = "yes"; then
10774         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
10775 echo "configure:10776: checking for M_MMAP_THRESHOLD" >&5
10776     cat > conftest.$ac_ext <<EOF
10777 #line 10778 "configure"
10778 #include "confdefs.h"
10779 #include <malloc.h>
10780 int main() {
10781
10782 #ifndef M_MMAP_THRESHOLD
10783 #error No M_MMAP_THRESHOLD :-(
10784 !@+$%^&*_)(_ - unlikely to compile...
10785 #endif
10786
10787 ; return 0; }
10788 EOF
10789 if { (eval echo configure:10790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10790   rm -rf conftest*
10791   rel_alloc=no; echo "$ac_t""yes" 1>&6;
10792 else
10793   echo "configure: failed program was:" >&5
10794   cat conftest.$ac_ext >&5
10795   rm -rf conftest*
10796   rel_alloc=yes; echo "$ac_t""no" 1>&6;
10797 fi
10798 rm -f conftest*
10799   else
10800     rel_alloc=yes
10801   fi
10802 fi
10803 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10804     Defining REL_ALLOC
10805 EOF
10806 cat >> confdefs.h <<\EOF
10807 #define REL_ALLOC 1
10808 EOF
10809 }
10810
10811
10812 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10813 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10814 echo "configure:10815: checking for termios.h" >&5
10815
10816 cat > conftest.$ac_ext <<EOF
10817 #line 10818 "configure"
10818 #include "confdefs.h"
10819 #include <termios.h>
10820 EOF
10821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10822 { (eval echo configure:10823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10824 if test -z "$ac_err"; then
10825   rm -rf conftest*
10826   eval "ac_cv_header_$ac_safe=yes"
10827 else
10828   echo "$ac_err" >&5
10829   echo "configure: failed program was:" >&5
10830   cat conftest.$ac_ext >&5
10831   rm -rf conftest*
10832   eval "ac_cv_header_$ac_safe=no"
10833 fi
10834 rm -f conftest*
10835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10836   echo "$ac_t""yes" 1>&6
10837   { test "$extra_verbose" = "yes" && cat << \EOF
10838     Defining HAVE_TERMIOS
10839 EOF
10840 cat >> confdefs.h <<\EOF
10841 #define HAVE_TERMIOS 1
10842 EOF
10843 }
10844
10845   { test "$extra_verbose" = "yes" && cat << \EOF
10846     Defining SIGNALS_VIA_CHARACTERS
10847 EOF
10848 cat >> confdefs.h <<\EOF
10849 #define SIGNALS_VIA_CHARACTERS 1
10850 EOF
10851 }
10852
10853   { test "$extra_verbose" = "yes" && cat << \EOF
10854     Defining NO_TERMIO
10855 EOF
10856 cat >> confdefs.h <<\EOF
10857 #define NO_TERMIO 1
10858 EOF
10859 }
10860
10861 else
10862   echo "$ac_t""no" 1>&6
10863 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10864 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10865 echo "configure:10866: checking for termio.h" >&5
10866
10867 cat > conftest.$ac_ext <<EOF
10868 #line 10869 "configure"
10869 #include "confdefs.h"
10870 #include <termio.h>
10871 EOF
10872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10873 { (eval echo configure:10874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10875 if test -z "$ac_err"; then
10876   rm -rf conftest*
10877   eval "ac_cv_header_$ac_safe=yes"
10878 else
10879   echo "$ac_err" >&5
10880   echo "configure: failed program was:" >&5
10881   cat conftest.$ac_ext >&5
10882   rm -rf conftest*
10883   eval "ac_cv_header_$ac_safe=no"
10884 fi
10885 rm -f conftest*
10886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10887   echo "$ac_t""yes" 1>&6
10888   { test "$extra_verbose" = "yes" && cat << \EOF
10889     Defining HAVE_TERMIO
10890 EOF
10891 cat >> confdefs.h <<\EOF
10892 #define HAVE_TERMIO 1
10893 EOF
10894 }
10895
10896 else
10897   echo "$ac_t""no" 1>&6
10898 fi
10899
10900 fi
10901
10902
10903
10904 echo $ac_n "checking for socket""... $ac_c" 1>&6
10905 echo "configure:10906: checking for socket" >&5
10906
10907 cat > conftest.$ac_ext <<EOF
10908 #line 10909 "configure"
10909 #include "confdefs.h"
10910 /* System header to define __stub macros and hopefully few prototypes,
10911     which can conflict with char socket(); below.  */
10912 #include <assert.h>
10913 /* Override any gcc2 internal prototype to avoid an error.  */
10914 /* We use char because int might match the return type of a gcc2
10915     builtin and then its argument prototype would still apply.  */
10916 char socket();
10917
10918 int main() {
10919
10920 /* The GNU C library defines this for functions which it implements
10921     to always fail with ENOSYS.  Some functions are actually named
10922     something starting with __ and the normal name is an alias.  */
10923 #if defined (__stub_socket) || defined (__stub___socket)
10924 choke me
10925 #else
10926 socket();
10927 #endif
10928
10929 ; return 0; }
10930 EOF
10931 if { (eval echo configure:10932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10932   rm -rf conftest*
10933   eval "ac_cv_func_socket=yes"
10934 else
10935   echo "configure: failed program was:" >&5
10936   cat conftest.$ac_ext >&5
10937   rm -rf conftest*
10938   eval "ac_cv_func_socket=no"
10939 fi
10940 rm -f conftest*
10941
10942 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10943   echo "$ac_t""yes" 1>&6
10944   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10945 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10946 echo "configure:10947: checking for netinet/in.h" >&5
10947
10948 cat > conftest.$ac_ext <<EOF
10949 #line 10950 "configure"
10950 #include "confdefs.h"
10951 #include <netinet/in.h>
10952 EOF
10953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10954 { (eval echo configure:10955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10956 if test -z "$ac_err"; then
10957   rm -rf conftest*
10958   eval "ac_cv_header_$ac_safe=yes"
10959 else
10960   echo "$ac_err" >&5
10961   echo "configure: failed program was:" >&5
10962   cat conftest.$ac_ext >&5
10963   rm -rf conftest*
10964   eval "ac_cv_header_$ac_safe=no"
10965 fi
10966 rm -f conftest*
10967 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10968   echo "$ac_t""yes" 1>&6
10969   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10970 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10971 echo "configure:10972: checking for arpa/inet.h" >&5
10972
10973 cat > conftest.$ac_ext <<EOF
10974 #line 10975 "configure"
10975 #include "confdefs.h"
10976 #include <arpa/inet.h>
10977 EOF
10978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10979 { (eval echo configure:10980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10981 if test -z "$ac_err"; then
10982   rm -rf conftest*
10983   eval "ac_cv_header_$ac_safe=yes"
10984 else
10985   echo "$ac_err" >&5
10986   echo "configure: failed program was:" >&5
10987   cat conftest.$ac_ext >&5
10988   rm -rf conftest*
10989   eval "ac_cv_header_$ac_safe=no"
10990 fi
10991 rm -f conftest*
10992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10993   echo "$ac_t""yes" 1>&6
10994   
10995   { test "$extra_verbose" = "yes" && cat << \EOF
10996     Defining HAVE_SOCKETS
10997 EOF
10998 cat >> confdefs.h <<\EOF
10999 #define HAVE_SOCKETS 1
11000 EOF
11001 }
11002
11003       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11004 echo "configure:11005: checking "for sun_len member in struct sockaddr_un"" >&5
11005       cat > conftest.$ac_ext <<EOF
11006 #line 11007 "configure"
11007 #include "confdefs.h"
11008
11009 #include <sys/types.h>
11010 #include <sys/socket.h>
11011 #include <sys/un.h>
11012       
11013 int main() {
11014 static struct sockaddr_un x; x.sun_len = 1;
11015 ; return 0; }
11016 EOF
11017 if { (eval echo configure:11018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11018   rm -rf conftest*
11019   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11020     Defining HAVE_SOCKADDR_SUN_LEN
11021 EOF
11022 cat >> confdefs.h <<\EOF
11023 #define HAVE_SOCKADDR_SUN_LEN 1
11024 EOF
11025 }
11026
11027 else
11028   echo "configure: failed program was:" >&5
11029   cat conftest.$ac_ext >&5
11030   rm -rf conftest*
11031   echo "$ac_t""no" 1>&6
11032 fi
11033 rm -f conftest*
11034       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11035 echo "configure:11036: checking "for ip_mreq struct in netinet/in.h"" >&5
11036       cat > conftest.$ac_ext <<EOF
11037 #line 11038 "configure"
11038 #include "confdefs.h"
11039
11040 #include <sys/types.h>
11041 #include <netinet/in.h>
11042       
11043 int main() {
11044 static struct ip_mreq x;
11045 ; return 0; }
11046 EOF
11047 if { (eval echo configure:11048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11048   rm -rf conftest*
11049   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11050     Defining HAVE_MULTICAST
11051 EOF
11052 cat >> confdefs.h <<\EOF
11053 #define HAVE_MULTICAST 1
11054 EOF
11055 }
11056
11057 else
11058   echo "configure: failed program was:" >&5
11059   cat conftest.$ac_ext >&5
11060   rm -rf conftest*
11061   echo "$ac_t""no" 1>&6
11062 fi
11063 rm -f conftest*
11064 else
11065   echo "$ac_t""no" 1>&6
11066 fi
11067
11068 else
11069   echo "$ac_t""no" 1>&6
11070 fi
11071
11072 else
11073   echo "$ac_t""no" 1>&6
11074 fi
11075
11076
11077 echo $ac_n "checking for msgget""... $ac_c" 1>&6
11078 echo "configure:11079: checking for msgget" >&5
11079
11080 cat > conftest.$ac_ext <<EOF
11081 #line 11082 "configure"
11082 #include "confdefs.h"
11083 /* System header to define __stub macros and hopefully few prototypes,
11084     which can conflict with char msgget(); below.  */
11085 #include <assert.h>
11086 /* Override any gcc2 internal prototype to avoid an error.  */
11087 /* We use char because int might match the return type of a gcc2
11088     builtin and then its argument prototype would still apply.  */
11089 char msgget();
11090
11091 int main() {
11092
11093 /* The GNU C library defines this for functions which it implements
11094     to always fail with ENOSYS.  Some functions are actually named
11095     something starting with __ and the normal name is an alias.  */
11096 #if defined (__stub_msgget) || defined (__stub___msgget)
11097 choke me
11098 #else
11099 msgget();
11100 #endif
11101
11102 ; return 0; }
11103 EOF
11104 if { (eval echo configure:11105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11105   rm -rf conftest*
11106   eval "ac_cv_func_msgget=yes"
11107 else
11108   echo "configure: failed program was:" >&5
11109   cat conftest.$ac_ext >&5
11110   rm -rf conftest*
11111   eval "ac_cv_func_msgget=no"
11112 fi
11113 rm -f conftest*
11114
11115 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
11116   echo "$ac_t""yes" 1>&6
11117   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
11118 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
11119 echo "configure:11120: checking for sys/ipc.h" >&5
11120
11121 cat > conftest.$ac_ext <<EOF
11122 #line 11123 "configure"
11123 #include "confdefs.h"
11124 #include <sys/ipc.h>
11125 EOF
11126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11127 { (eval echo configure:11128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11129 if test -z "$ac_err"; then
11130   rm -rf conftest*
11131   eval "ac_cv_header_$ac_safe=yes"
11132 else
11133   echo "$ac_err" >&5
11134   echo "configure: failed program was:" >&5
11135   cat conftest.$ac_ext >&5
11136   rm -rf conftest*
11137   eval "ac_cv_header_$ac_safe=no"
11138 fi
11139 rm -f conftest*
11140 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11141   echo "$ac_t""yes" 1>&6
11142   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
11143 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
11144 echo "configure:11145: checking for sys/msg.h" >&5
11145
11146 cat > conftest.$ac_ext <<EOF
11147 #line 11148 "configure"
11148 #include "confdefs.h"
11149 #include <sys/msg.h>
11150 EOF
11151 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11152 { (eval echo configure:11153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11153 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11154 if test -z "$ac_err"; then
11155   rm -rf conftest*
11156   eval "ac_cv_header_$ac_safe=yes"
11157 else
11158   echo "$ac_err" >&5
11159   echo "configure: failed program was:" >&5
11160   cat conftest.$ac_ext >&5
11161   rm -rf conftest*
11162   eval "ac_cv_header_$ac_safe=no"
11163 fi
11164 rm -f conftest*
11165 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11166   echo "$ac_t""yes" 1>&6
11167   { test "$extra_verbose" = "yes" && cat << \EOF
11168     Defining HAVE_SYSVIPC
11169 EOF
11170 cat >> confdefs.h <<\EOF
11171 #define HAVE_SYSVIPC 1
11172 EOF
11173 }
11174
11175 else
11176   echo "$ac_t""no" 1>&6
11177 fi
11178
11179 else
11180   echo "$ac_t""no" 1>&6
11181 fi
11182
11183 else
11184   echo "$ac_t""no" 1>&6
11185 fi
11186
11187
11188 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
11189 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
11190 echo "configure:11191: checking for dirent.h" >&5
11191
11192 cat > conftest.$ac_ext <<EOF
11193 #line 11194 "configure"
11194 #include "confdefs.h"
11195 #include <dirent.h>
11196 EOF
11197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11198 { (eval echo configure:11199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11200 if test -z "$ac_err"; then
11201   rm -rf conftest*
11202   eval "ac_cv_header_$ac_safe=yes"
11203 else
11204   echo "$ac_err" >&5
11205   echo "configure: failed program was:" >&5
11206   cat conftest.$ac_ext >&5
11207   rm -rf conftest*
11208   eval "ac_cv_header_$ac_safe=no"
11209 fi
11210 rm -f conftest*
11211 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11212   echo "$ac_t""yes" 1>&6
11213   { test "$extra_verbose" = "yes" && cat << \EOF
11214     Defining SYSV_SYSTEM_DIR
11215 EOF
11216 cat >> confdefs.h <<\EOF
11217 #define SYSV_SYSTEM_DIR 1
11218 EOF
11219 }
11220
11221 else
11222   echo "$ac_t""no" 1>&6
11223 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
11224 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
11225 echo "configure:11226: checking for sys/dir.h" >&5
11226
11227 cat > conftest.$ac_ext <<EOF
11228 #line 11229 "configure"
11229 #include "confdefs.h"
11230 #include <sys/dir.h>
11231 EOF
11232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11233 { (eval echo configure:11234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11235 if test -z "$ac_err"; then
11236   rm -rf conftest*
11237   eval "ac_cv_header_$ac_safe=yes"
11238 else
11239   echo "$ac_err" >&5
11240   echo "configure: failed program was:" >&5
11241   cat conftest.$ac_ext >&5
11242   rm -rf conftest*
11243   eval "ac_cv_header_$ac_safe=no"
11244 fi
11245 rm -f conftest*
11246 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11247   echo "$ac_t""yes" 1>&6
11248   :
11249 else
11250   echo "$ac_t""no" 1>&6
11251 { test "$extra_verbose" = "yes" && cat << \EOF
11252     Defining NONSYSTEM_DIR_LIBRARY
11253 EOF
11254 cat >> confdefs.h <<\EOF
11255 #define NONSYSTEM_DIR_LIBRARY 1
11256 EOF
11257 }
11258
11259 fi
11260
11261 fi
11262
11263
11264 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11265 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11266 echo "configure:11267: checking for nlist.h" >&5
11267
11268 cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11271 #include <nlist.h>
11272 EOF
11273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11274 { (eval echo configure:11275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11276 if test -z "$ac_err"; then
11277   rm -rf conftest*
11278   eval "ac_cv_header_$ac_safe=yes"
11279 else
11280   echo "$ac_err" >&5
11281   echo "configure: failed program was:" >&5
11282   cat conftest.$ac_ext >&5
11283   rm -rf conftest*
11284   eval "ac_cv_header_$ac_safe=no"
11285 fi
11286 rm -f conftest*
11287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11288   echo "$ac_t""yes" 1>&6
11289   { test "$extra_verbose" = "yes" && cat << \EOF
11290     Defining NLIST_STRUCT
11291 EOF
11292 cat >> confdefs.h <<\EOF
11293 #define NLIST_STRUCT 1
11294 EOF
11295 }
11296
11297 else
11298   echo "$ac_t""no" 1>&6
11299 fi
11300
11301
11302
11303 echo "checking "for sound support"" 1>&6
11304 echo "configure:11305: checking "for sound support"" >&5
11305 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11306
11307 if test "$with_native_sound" != "no"; then
11308     if test -n "$native_sound_lib"; then
11309     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11310 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11311 echo "configure:11312: checking for multimedia/audio_device.h" >&5
11312
11313 cat > conftest.$ac_ext <<EOF
11314 #line 11315 "configure"
11315 #include "confdefs.h"
11316 #include <multimedia/audio_device.h>
11317 EOF
11318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11319 { (eval echo configure:11320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11321 if test -z "$ac_err"; then
11322   rm -rf conftest*
11323   eval "ac_cv_header_$ac_safe=yes"
11324 else
11325   echo "$ac_err" >&5
11326   echo "configure: failed program was:" >&5
11327   cat conftest.$ac_ext >&5
11328   rm -rf conftest*
11329   eval "ac_cv_header_$ac_safe=no"
11330 fi
11331 rm -f conftest*
11332 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11333   echo "$ac_t""yes" 1>&6
11334   sound_found=yes sound_cflags=""
11335       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11336    echo "    xemacs will be linked with \"sunplay.o\""
11337  fi
11338 else
11339   echo "$ac_t""no" 1>&6
11340 fi
11341
11342   fi
11343
11344     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11345     sound_found=yes
11346     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11347    echo "    xemacs will be linked with \"sunplay.o\""
11348  fi
11349     if test -d "/usr/demo/SOUND/include"
11350       then sound_cflags="-I/usr/demo/SOUND/include"
11351       else sound_cflags="-I/usr/demo/SOUND"
11352     fi
11353     if test -z "$native_sound_lib" ; then
11354       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11355         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11356         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11357       fi
11358     fi
11359   fi
11360
11361     if test -z "$sound_found"; then
11362     case "$canonical" in
11363     *-sgi-* )
11364       if test -z "$native_sound_lib"; then
11365         
11366 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11367 echo "configure:11368: checking for ALopenport in -laudio" >&5
11368 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11369
11370 xe_check_libs=" -laudio "
11371 cat > conftest.$ac_ext <<EOF
11372 #line 11373 "configure"
11373 #include "confdefs.h"
11374 /* Override any gcc2 internal prototype to avoid an error.  */
11375 /* We use char because int might match the return type of a gcc2
11376     builtin and then its argument prototype would still apply.  */
11377 char ALopenport();
11378
11379 int main() {
11380 ALopenport()
11381 ; return 0; }
11382 EOF
11383 if { (eval echo configure:11384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11384   rm -rf conftest*
11385   eval "ac_cv_lib_$ac_lib_var=yes"
11386 else
11387   echo "configure: failed program was:" >&5
11388   cat conftest.$ac_ext >&5
11389   rm -rf conftest*
11390   eval "ac_cv_lib_$ac_lib_var=no"
11391 fi
11392 rm -f conftest*
11393 xe_check_libs=""
11394
11395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11396   echo "$ac_t""yes" 1>&6
11397   native_sound_lib="-laudio"
11398 else
11399   echo "$ac_t""no" 1>&6
11400 fi
11401
11402
11403       fi
11404       if test -n "$native_sound_lib"; then
11405         sound_found=yes sound_cflags=""
11406         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11407    echo "    xemacs will be linked with \"sgiplay.o\""
11408  fi
11409       fi ;;
11410     hppa*-hp-hpux* )
11411       if test -z "$native_sound_lib"; then
11412         
11413 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11414 echo "configure:11415: checking for AOpenAudio in -lAlib" >&5
11415 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11416
11417 xe_check_libs=" -lAlib "
11418 cat > conftest.$ac_ext <<EOF
11419 #line 11420 "configure"
11420 #include "confdefs.h"
11421 /* Override any gcc2 internal prototype to avoid an error.  */
11422 /* We use char because int might match the return type of a gcc2
11423     builtin and then its argument prototype would still apply.  */
11424 char AOpenAudio();
11425
11426 int main() {
11427 AOpenAudio()
11428 ; return 0; }
11429 EOF
11430 if { (eval echo configure:11431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11431   rm -rf conftest*
11432   eval "ac_cv_lib_$ac_lib_var=yes"
11433 else
11434   echo "configure: failed program was:" >&5
11435   cat conftest.$ac_ext >&5
11436   rm -rf conftest*
11437   eval "ac_cv_lib_$ac_lib_var=no"
11438 fi
11439 rm -f conftest*
11440 xe_check_libs=""
11441
11442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11443   echo "$ac_t""yes" 1>&6
11444   native_sound_lib="-lAlib"
11445 else
11446   echo "$ac_t""no" 1>&6
11447 fi
11448
11449
11450       fi
11451       if test -n "$native_sound_lib"; then
11452         sound_found=yes
11453         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11454    echo "    xemacs will be linked with \"hpplay.o\""
11455  fi
11456         if test "$GCC" = "yes" # Kludge city
11457           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11458           else sound_cflags="+e -I/usr/audio/examples"
11459         fi
11460       fi ;;
11461     esac
11462   fi
11463
11464     if test -z "$sound_found"; then
11465     for dir in "machine" "sys" "linux"; do
11466       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11467 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11468 echo "configure:11469: checking for ${dir}/soundcard.h" >&5
11469
11470 cat > conftest.$ac_ext <<EOF
11471 #line 11472 "configure"
11472 #include "confdefs.h"
11473 #include <${dir}/soundcard.h>
11474 EOF
11475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11476 { (eval echo configure:11477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11478 if test -z "$ac_err"; then
11479   rm -rf conftest*
11480   eval "ac_cv_header_$ac_safe=yes"
11481 else
11482   echo "$ac_err" >&5
11483   echo "configure: failed program was:" >&5
11484   cat conftest.$ac_ext >&5
11485   rm -rf conftest*
11486   eval "ac_cv_header_$ac_safe=no"
11487 fi
11488 rm -f conftest*
11489 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11490   echo "$ac_t""yes" 1>&6
11491   sound_found=yes
11492        need_miscplay=yes
11493         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11494    echo "    xemacs will be linked with \"linuxplay.o\""
11495  fi
11496         { test "$extra_verbose" = "yes" && cat << EOF
11497     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
11498 EOF
11499 cat >> confdefs.h <<EOF
11500 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
11501 EOF
11502 }
11503
11504         break
11505 else
11506   echo "$ac_t""no" 1>&6
11507 fi
11508
11509     done
11510   fi
11511
11512   test "$sound_found" = "yes" && with_native_sound=yes
11513 fi
11514
11515 if test "$with_native_sound" = "yes"; then
11516   { test "$extra_verbose" = "yes" && cat << \EOF
11517     Defining HAVE_NATIVE_SOUND
11518 EOF
11519 cat >> confdefs.h <<\EOF
11520 #define HAVE_NATIVE_SOUND 1
11521 EOF
11522 }
11523
11524   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11525 fi
11526
11527 if test "$with_nas_sound" != "no"; then
11528   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11529 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11530 echo "configure:11531: checking for audio/audiolib.h" >&5
11531
11532 cat > conftest.$ac_ext <<EOF
11533 #line 11534 "configure"
11534 #include "confdefs.h"
11535 #include <audio/audiolib.h>
11536 EOF
11537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11538 { (eval echo configure:11539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11540 if test -z "$ac_err"; then
11541   rm -rf conftest*
11542   eval "ac_cv_header_$ac_safe=yes"
11543 else
11544   echo "$ac_err" >&5
11545   echo "configure: failed program was:" >&5
11546   cat conftest.$ac_ext >&5
11547   rm -rf conftest*
11548   eval "ac_cv_header_$ac_safe=no"
11549 fi
11550 rm -f conftest*
11551 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11552   echo "$ac_t""yes" 1>&6
11553   
11554     
11555 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11556 echo "configure:11557: checking for AuOpenServer in -laudio" >&5
11557 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11558
11559 xe_check_libs=" -laudio "
11560 cat > conftest.$ac_ext <<EOF
11561 #line 11562 "configure"
11562 #include "confdefs.h"
11563 /* Override any gcc2 internal prototype to avoid an error.  */
11564 /* We use char because int might match the return type of a gcc2
11565     builtin and then its argument prototype would still apply.  */
11566 char AuOpenServer();
11567
11568 int main() {
11569 AuOpenServer()
11570 ; return 0; }
11571 EOF
11572 if { (eval echo configure:11573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11573   rm -rf conftest*
11574   eval "ac_cv_lib_$ac_lib_var=yes"
11575 else
11576   echo "configure: failed program was:" >&5
11577   cat conftest.$ac_ext >&5
11578   rm -rf conftest*
11579   eval "ac_cv_lib_$ac_lib_var=no"
11580 fi
11581 rm -f conftest*
11582 xe_check_libs=""
11583
11584 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11585   echo "$ac_t""yes" 1>&6
11586   have_nas_sound=yes
11587 else
11588   echo "$ac_t""no" 1>&6
11589 fi
11590
11591
11592 else
11593   echo "$ac_t""no" 1>&6
11594 fi
11595
11596   if test "$have_nas_sound" = "yes"; then
11597     with_nas_sound=yes
11598     { test "$extra_verbose" = "yes" && cat << \EOF
11599     Defining HAVE_NAS_SOUND
11600 EOF
11601 cat >> confdefs.h <<\EOF
11602 #define HAVE_NAS_SOUND 1
11603 EOF
11604 }
11605
11606     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11607    echo "    xemacs will be linked with \"nas.o\""
11608  fi
11609     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11610             cat > conftest.$ac_ext <<EOF
11611 #line 11612 "configure"
11612 #include "confdefs.h"
11613 #include <audio/Xtutil.h>
11614 EOF
11615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11616   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11617   :
11618 else
11619   rm -rf conftest*
11620   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11621     Defining NAS_NO_ERROR_JUMP
11622 EOF
11623 cat >> confdefs.h <<\EOF
11624 #define NAS_NO_ERROR_JUMP 1
11625 EOF
11626 }
11627
11628 fi
11629 rm -f conftest*
11630
11631   else
11632     test "$with_nas_sound" = "yes" && \
11633       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11634     with_nas_sound=no
11635   fi
11636 fi
11637
11638 if test "$with_esd_sound" != "no"; then
11639   # Extract the first word of "esd-config", so it can be a program name with args.
11640 set dummy esd-config; ac_word=$2
11641 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11642 echo "configure:11643: checking for $ac_word" >&5
11643
11644 if test -n "$have_esd_config"; then
11645   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11646 else
11647   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11648   ac_dummy="$PATH"
11649   for ac_dir in $ac_dummy; do
11650     test -z "$ac_dir" && ac_dir=.
11651     if test -f $ac_dir/$ac_word; then
11652       ac_cv_prog_have_esd_config="yes"
11653       break
11654     fi
11655   done
11656   IFS="$ac_save_ifs"
11657   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11658 fi
11659 have_esd_config="$ac_cv_prog_have_esd_config"
11660 if test -n "$have_esd_config"; then
11661   echo "$ac_t""$have_esd_config" 1>&6
11662 else
11663   echo "$ac_t""no" 1>&6
11664 fi
11665
11666   if test "$have_esd_config" = "yes"; then
11667     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11668     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
11669     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11670     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11671 echo "configure:11672: checking for esd_play_stream" >&5
11672
11673 cat > conftest.$ac_ext <<EOF
11674 #line 11675 "configure"
11675 #include "confdefs.h"
11676 /* System header to define __stub macros and hopefully few prototypes,
11677     which can conflict with char esd_play_stream(); below.  */
11678 #include <assert.h>
11679 /* Override any gcc2 internal prototype to avoid an error.  */
11680 /* We use char because int might match the return type of a gcc2
11681     builtin and then its argument prototype would still apply.  */
11682 char esd_play_stream();
11683
11684 int main() {
11685
11686 /* The GNU C library defines this for functions which it implements
11687     to always fail with ENOSYS.  Some functions are actually named
11688     something starting with __ and the normal name is an alias.  */
11689 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11690 choke me
11691 #else
11692 esd_play_stream();
11693 #endif
11694
11695 ; return 0; }
11696 EOF
11697 if { (eval echo configure:11698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11698   rm -rf conftest*
11699   eval "ac_cv_func_esd_play_stream=yes"
11700 else
11701   echo "configure: failed program was:" >&5
11702   cat conftest.$ac_ext >&5
11703   rm -rf conftest*
11704   eval "ac_cv_func_esd_play_stream=no"
11705 fi
11706 rm -f conftest*
11707
11708 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
11709   echo "$ac_t""yes" 1>&6
11710   have_esd_sound=yes
11711 else
11712   echo "$ac_t""no" 1>&6
11713 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
11714 fi
11715
11716   fi
11717
11718   if test "$have_esd_sound" = "yes"; then
11719     with_esd_sound=yes
11720     need_miscplay=yes
11721     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
11722    echo "    xemacs will be linked with \"esd.o\""
11723  fi
11724     { test "$extra_verbose" = "yes" && cat << \EOF
11725     Defining HAVE_ESD_SOUND
11726 EOF
11727 cat >> confdefs.h <<\EOF
11728 #define HAVE_ESD_SOUND 1
11729 EOF
11730 }
11731
11732   else
11733     test "$with_esd_sound" = "yes" && \
11734       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
11735     with_esd_sound=no
11736   fi
11737 fi
11738
11739 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
11740    echo "    xemacs will be linked with \"miscplay.o\""
11741  fi
11742
11743
11744 test -z "$with_tty" && with_tty=yes
11745
11746 if test "$with_tty" = "yes"  ; then
11747   echo "checking for TTY-related features" 1>&6
11748 echo "configure:11749: checking for TTY-related features" >&5
11749   { test "$extra_verbose" = "yes" && cat << \EOF
11750     Defining HAVE_TTY
11751 EOF
11752 cat >> confdefs.h <<\EOF
11753 #define HAVE_TTY 1
11754 EOF
11755 }
11756
11757   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
11758    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\""
11759  fi
11760
11761     if test -z "$with_ncurses"; then
11762     
11763 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
11764 echo "configure:11765: checking for tgetent in -lncurses" >&5
11765 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
11766
11767 xe_check_libs=" -lncurses "
11768 cat > conftest.$ac_ext <<EOF
11769 #line 11770 "configure"
11770 #include "confdefs.h"
11771 /* Override any gcc2 internal prototype to avoid an error.  */
11772 /* We use char because int might match the return type of a gcc2
11773     builtin and then its argument prototype would still apply.  */
11774 char tgetent();
11775
11776 int main() {
11777 tgetent()
11778 ; return 0; }
11779 EOF
11780 if { (eval echo configure:11781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11781   rm -rf conftest*
11782   eval "ac_cv_lib_$ac_lib_var=yes"
11783 else
11784   echo "configure: failed program was:" >&5
11785   cat conftest.$ac_ext >&5
11786   rm -rf conftest*
11787   eval "ac_cv_lib_$ac_lib_var=no"
11788 fi
11789 rm -f conftest*
11790 xe_check_libs=""
11791
11792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11793   echo "$ac_t""yes" 1>&6
11794   with_ncurses=yes
11795 else
11796   echo "$ac_t""no" 1>&6
11797 with_ncurses=no
11798 fi
11799
11800
11801   fi
11802   if test "$with_ncurses" = "yes"; then
11803     { test "$extra_verbose" = "yes" && cat << \EOF
11804     Defining HAVE_NCURSES
11805 EOF
11806 cat >> confdefs.h <<\EOF
11807 #define HAVE_NCURSES 1
11808 EOF
11809 }
11810
11811     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11812 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11813 echo "configure:11814: checking for ncurses/curses.h" >&5
11814
11815 cat > conftest.$ac_ext <<EOF
11816 #line 11817 "configure"
11817 #include "confdefs.h"
11818 #include <ncurses/curses.h>
11819 EOF
11820 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11821 { (eval echo configure:11822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11822 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11823 if test -z "$ac_err"; then
11824   rm -rf conftest*
11825   eval "ac_cv_header_$ac_safe=yes"
11826 else
11827   echo "$ac_err" >&5
11828   echo "configure: failed program was:" >&5
11829   cat conftest.$ac_ext >&5
11830   rm -rf conftest*
11831   eval "ac_cv_header_$ac_safe=no"
11832 fi
11833 rm -f conftest*
11834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11835   echo "$ac_t""yes" 1>&6
11836   curses_h_path=ncurses/curses.h
11837 else
11838   echo "$ac_t""no" 1>&6
11839 fi
11840
11841     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11842 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11843 echo "configure:11844: checking for ncurses/term.h" >&5
11844
11845 cat > conftest.$ac_ext <<EOF
11846 #line 11847 "configure"
11847 #include "confdefs.h"
11848 #include <ncurses/term.h>
11849 EOF
11850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11851 { (eval echo configure:11852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11853 if test -z "$ac_err"; then
11854   rm -rf conftest*
11855   eval "ac_cv_header_$ac_safe=yes"
11856 else
11857   echo "$ac_err" >&5
11858   echo "configure: failed program was:" >&5
11859   cat conftest.$ac_ext >&5
11860   rm -rf conftest*
11861   eval "ac_cv_header_$ac_safe=no"
11862 fi
11863 rm -f conftest*
11864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11865   echo "$ac_t""yes" 1>&6
11866   term_h_path=ncurses/term.h
11867 else
11868   echo "$ac_t""no" 1>&6
11869 fi
11870
11871     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11872    echo "    xemacs will be linked with \"terminfo.o\""
11873  fi
11874     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11875
11876     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11877                         save_c_switch_site="$c_switch_site"
11878       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11879       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11880 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11881 echo "configure:11882: checking for ncurses/curses.h" >&5
11882
11883 cat > conftest.$ac_ext <<EOF
11884 #line 11885 "configure"
11885 #include "confdefs.h"
11886 #include <ncurses/curses.h>
11887 EOF
11888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11889 { (eval echo configure:11890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11891 if test -z "$ac_err"; then
11892   rm -rf conftest*
11893   eval "ac_cv_header_$ac_safe=yes"
11894 else
11895   echo "$ac_err" >&5
11896   echo "configure: failed program was:" >&5
11897   cat conftest.$ac_ext >&5
11898   rm -rf conftest*
11899   eval "ac_cv_header_$ac_safe=no"
11900 fi
11901 rm -f conftest*
11902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11903   echo "$ac_t""yes" 1>&6
11904   curses_h_path=ncurses/curses.h
11905 else
11906   echo "$ac_t""no" 1>&6
11907 fi
11908
11909       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11910         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11911         else c_switch_site="$save_c_switch_site"
11912       fi
11913     fi
11914   else         if test "$have_terminfo" = "yes"; then
11915       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11916    echo "    xemacs will be linked with \"terminfo.o\""
11917  fi
11918       if test -n "$libs_termcap"; then
11919         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11920       else
11921         for lib in curses termlib termcap; do
11922           
11923 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11924 echo "configure:11925: checking for tgetent in -l$lib" >&5
11925 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11926
11927 xe_check_libs=" -l$lib "
11928 cat > conftest.$ac_ext <<EOF
11929 #line 11930 "configure"
11930 #include "confdefs.h"
11931 /* Override any gcc2 internal prototype to avoid an error.  */
11932 /* We use char because int might match the return type of a gcc2
11933     builtin and then its argument prototype would still apply.  */
11934 char tgetent();
11935
11936 int main() {
11937 tgetent()
11938 ; return 0; }
11939 EOF
11940 if { (eval echo configure:11941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11941   rm -rf conftest*
11942   eval "ac_cv_lib_$ac_lib_var=yes"
11943 else
11944   echo "configure: failed program was:" >&5
11945   cat conftest.$ac_ext >&5
11946   rm -rf conftest*
11947   eval "ac_cv_lib_$ac_lib_var=no"
11948 fi
11949 rm -f conftest*
11950 xe_check_libs=""
11951
11952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11953   echo "$ac_t""yes" 1>&6
11954   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11955 else
11956   echo "$ac_t""no" 1>&6
11957 fi
11958
11959
11960         done
11961       fi
11962     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11963    echo "    xemacs will be linked with \"tparam.o\""
11964  fi
11965                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11966       if test -n "$libs_termcap"; then
11967         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11968       else
11969         
11970 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11971 echo "configure:11972: checking for tgetent in -lcurses" >&5
11972 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11973
11974 xe_check_libs=" -lcurses "
11975 cat > conftest.$ac_ext <<EOF
11976 #line 11977 "configure"
11977 #include "confdefs.h"
11978 /* Override any gcc2 internal prototype to avoid an error.  */
11979 /* We use char because int might match the return type of a gcc2
11980     builtin and then its argument prototype would still apply.  */
11981 char tgetent();
11982
11983 int main() {
11984 tgetent()
11985 ; return 0; }
11986 EOF
11987 if { (eval echo configure:11988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11988   rm -rf conftest*
11989   eval "ac_cv_lib_$ac_lib_var=yes"
11990 else
11991   echo "configure: failed program was:" >&5
11992   cat conftest.$ac_ext >&5
11993   rm -rf conftest*
11994   eval "ac_cv_lib_$ac_lib_var=no"
11995 fi
11996 rm -f conftest*
11997 xe_check_libs=""
11998
11999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12000   echo "$ac_t""yes" 1>&6
12001   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12002 else
12003   echo "$ac_t""no" 1>&6
12004 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12005 echo "configure:12006: checking for tgetent in -ltermcap" >&5
12006 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12007
12008 xe_check_libs=" -ltermcap "
12009 cat > conftest.$ac_ext <<EOF
12010 #line 12011 "configure"
12011 #include "confdefs.h"
12012 /* Override any gcc2 internal prototype to avoid an error.  */
12013 /* We use char because int might match the return type of a gcc2
12014     builtin and then its argument prototype would still apply.  */
12015 char tgetent();
12016
12017 int main() {
12018 tgetent()
12019 ; return 0; }
12020 EOF
12021 if { (eval echo configure:12022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12022   rm -rf conftest*
12023   eval "ac_cv_lib_$ac_lib_var=yes"
12024 else
12025   echo "configure: failed program was:" >&5
12026   cat conftest.$ac_ext >&5
12027   rm -rf conftest*
12028   eval "ac_cv_lib_$ac_lib_var=no"
12029 fi
12030 rm -f conftest*
12031 xe_check_libs=""
12032
12033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12034   echo "$ac_t""yes" 1>&6
12035   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12036 else
12037   echo "$ac_t""no" 1>&6
12038 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12039    echo "    xemacs will be linked with \"termcap.o\""
12040  fi
12041 fi
12042
12043
12044 fi
12045
12046
12047       fi
12048     fi
12049   fi
12050   { test "$extra_verbose" = "yes" && cat << EOF
12051     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
12052 EOF
12053 cat >> confdefs.h <<EOF
12054 #define CURSES_H_PATH "${curses_h_path-curses.h}"
12055 EOF
12056 }
12057
12058   { test "$extra_verbose" = "yes" && cat << EOF
12059     Defining TERM_H_PATH = "${term_h_path-term.h}"
12060 EOF
12061 cat >> confdefs.h <<EOF
12062 #define TERM_H_PATH "${term_h_path-term.h}"
12063 EOF
12064 }
12065
12066
12067     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
12068 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
12069 echo "configure:12070: checking for gpm.h" >&5
12070
12071 cat > conftest.$ac_ext <<EOF
12072 #line 12073 "configure"
12073 #include "confdefs.h"
12074 #include <gpm.h>
12075 EOF
12076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12077 { (eval echo configure:12078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12079 if test -z "$ac_err"; then
12080   rm -rf conftest*
12081   eval "ac_cv_header_$ac_safe=yes"
12082 else
12083   echo "$ac_err" >&5
12084   echo "configure: failed program was:" >&5
12085   cat conftest.$ac_ext >&5
12086   rm -rf conftest*
12087   eval "ac_cv_header_$ac_safe=no"
12088 fi
12089 rm -f conftest*
12090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12091   echo "$ac_t""yes" 1>&6
12092   :
12093 else
12094   echo "$ac_t""no" 1>&6
12095 with_gpm=no
12096 fi
12097  }
12098   test -z "$with_gpm" && { 
12099 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
12100 echo "configure:12101: checking for Gpm_Open in -lgpm" >&5
12101 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
12102
12103 xe_check_libs=" -lgpm "
12104 cat > conftest.$ac_ext <<EOF
12105 #line 12106 "configure"
12106 #include "confdefs.h"
12107 /* Override any gcc2 internal prototype to avoid an error.  */
12108 /* We use char because int might match the return type of a gcc2
12109     builtin and then its argument prototype would still apply.  */
12110 char Gpm_Open();
12111
12112 int main() {
12113 Gpm_Open()
12114 ; return 0; }
12115 EOF
12116 if { (eval echo configure:12117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12117   rm -rf conftest*
12118   eval "ac_cv_lib_$ac_lib_var=yes"
12119 else
12120   echo "configure: failed program was:" >&5
12121   cat conftest.$ac_ext >&5
12122   rm -rf conftest*
12123   eval "ac_cv_lib_$ac_lib_var=no"
12124 fi
12125 rm -f conftest*
12126 xe_check_libs=""
12127
12128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12129   echo "$ac_t""yes" 1>&6
12130   with_gpm=yes
12131 else
12132   echo "$ac_t""no" 1>&6
12133 with_gpm=no
12134 fi
12135
12136  }
12137   if test "$with_gpm" = "yes"; then
12138     { test "$extra_verbose" = "yes" && cat << \EOF
12139     Defining HAVE_GPM
12140 EOF
12141 cat >> confdefs.h <<\EOF
12142 #define HAVE_GPM 1
12143 EOF
12144 }
12145
12146     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
12147    echo "    xemacs will be linked with \"gpmevent.o\""
12148  fi
12149     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
12150   fi
12151
12152 else   for feature in ncurses gpm; do
12153     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
12154       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
12155     fi
12156     eval "with_${feature}=no"
12157   done
12158 fi 
12159 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
12160    echo "    xemacs will be linked with \"event-unixoid.o\""
12161  fi
12162
12163
12164 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12165   != "no no no" && echo "checking for database support" 1>&6
12166 echo "configure:12167: checking for database support" >&5
12167
12168 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
12169   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
12170 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
12171 echo "configure:12172: checking for ndbm.h" >&5
12172
12173 cat > conftest.$ac_ext <<EOF
12174 #line 12175 "configure"
12175 #include "confdefs.h"
12176 #include <ndbm.h>
12177 EOF
12178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12179 { (eval echo configure:12180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12181 if test -z "$ac_err"; then
12182   rm -rf conftest*
12183   eval "ac_cv_header_$ac_safe=yes"
12184 else
12185   echo "$ac_err" >&5
12186   echo "configure: failed program was:" >&5
12187   cat conftest.$ac_ext >&5
12188   rm -rf conftest*
12189   eval "ac_cv_header_$ac_safe=no"
12190 fi
12191 rm -f conftest*
12192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12193   echo "$ac_t""yes" 1>&6
12194   :
12195 else
12196   echo "$ac_t""no" 1>&6
12197
12198     test "$with_database_gdbm" = "yes" -o \
12199          "$with_database_dbm"  = "yes" && \
12200       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12201     with_database_gdbm=no with_database_dbm=no
12202 fi
12203
12204 fi
12205
12206 if test "$with_database_gdbm" != "no"; then
12207   
12208 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
12209 echo "configure:12210: checking for dbm_open in -lgdbm" >&5
12210 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
12211
12212 xe_check_libs=" -lgdbm "
12213 cat > conftest.$ac_ext <<EOF
12214 #line 12215 "configure"
12215 #include "confdefs.h"
12216 /* Override any gcc2 internal prototype to avoid an error.  */
12217 /* We use char because int might match the return type of a gcc2
12218     builtin and then its argument prototype would still apply.  */
12219 char dbm_open();
12220
12221 int main() {
12222 dbm_open()
12223 ; return 0; }
12224 EOF
12225 if { (eval echo configure:12226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12226   rm -rf conftest*
12227   eval "ac_cv_lib_$ac_lib_var=yes"
12228 else
12229   echo "configure: failed program was:" >&5
12230   cat conftest.$ac_ext >&5
12231   rm -rf conftest*
12232   eval "ac_cv_lib_$ac_lib_var=no"
12233 fi
12234 rm -f conftest*
12235 xe_check_libs=""
12236
12237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12238   echo "$ac_t""yes" 1>&6
12239   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
12240 else
12241   echo "$ac_t""no" 1>&6
12242 if test "$with_database_gdbm" = "yes"; then
12243      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
12244    fi
12245    with_database_gdbm=no
12246 fi
12247
12248
12249 fi
12250
12251 if test "$with_database_dbm" != "no"; then
12252   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12253 echo "configure:12254: checking for dbm_open" >&5
12254
12255 cat > conftest.$ac_ext <<EOF
12256 #line 12257 "configure"
12257 #include "confdefs.h"
12258 /* System header to define __stub macros and hopefully few prototypes,
12259     which can conflict with char dbm_open(); below.  */
12260 #include <assert.h>
12261 /* Override any gcc2 internal prototype to avoid an error.  */
12262 /* We use char because int might match the return type of a gcc2
12263     builtin and then its argument prototype would still apply.  */
12264 char dbm_open();
12265
12266 int main() {
12267
12268 /* The GNU C library defines this for functions which it implements
12269     to always fail with ENOSYS.  Some functions are actually named
12270     something starting with __ and the normal name is an alias.  */
12271 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12272 choke me
12273 #else
12274 dbm_open();
12275 #endif
12276
12277 ; return 0; }
12278 EOF
12279 if { (eval echo configure:12280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12280   rm -rf conftest*
12281   eval "ac_cv_func_dbm_open=yes"
12282 else
12283   echo "configure: failed program was:" >&5
12284   cat conftest.$ac_ext >&5
12285   rm -rf conftest*
12286   eval "ac_cv_func_dbm_open=no"
12287 fi
12288 rm -f conftest*
12289
12290 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12291   echo "$ac_t""yes" 1>&6
12292   with_database_dbm=yes libdbm=
12293 else
12294   echo "$ac_t""no" 1>&6
12295
12296     
12297 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12298 echo "configure:12299: checking for dbm_open in -ldbm" >&5
12299 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12300
12301 xe_check_libs=" -ldbm "
12302 cat > conftest.$ac_ext <<EOF
12303 #line 12304 "configure"
12304 #include "confdefs.h"
12305 /* Override any gcc2 internal prototype to avoid an error.  */
12306 /* We use char because int might match the return type of a gcc2
12307     builtin and then its argument prototype would still apply.  */
12308 char dbm_open();
12309
12310 int main() {
12311 dbm_open()
12312 ; return 0; }
12313 EOF
12314 if { (eval echo configure:12315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12315   rm -rf conftest*
12316   eval "ac_cv_lib_$ac_lib_var=yes"
12317 else
12318   echo "configure: failed program was:" >&5
12319   cat conftest.$ac_ext >&5
12320   rm -rf conftest*
12321   eval "ac_cv_lib_$ac_lib_var=no"
12322 fi
12323 rm -f conftest*
12324 xe_check_libs=""
12325
12326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12327   echo "$ac_t""yes" 1>&6
12328   with_database_dbm=yes libdbm=-ldbm
12329 else
12330   echo "$ac_t""no" 1>&6
12331 test "$with_database_dbm" = "yes" && \
12332         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12333       with_database_dbm=no
12334 fi
12335
12336
12337 fi
12338
12339 fi
12340
12341 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12342 test "$with_database_gdbm" = "yes" -o \
12343      "$with_database_dbm"  = "yes" && \
12344   { test "$extra_verbose" = "yes" && cat << \EOF
12345     Defining HAVE_DBM
12346 EOF
12347 cat >> confdefs.h <<\EOF
12348 #define HAVE_DBM 1
12349 EOF
12350 }
12351
12352
12353 if test "$with_database_berkdb" != "no"; then
12354   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12355 echo "configure:12356: checking for Berkeley db.h" >&5
12356   for path in "db/db.h" "db.h"; do
12357     cat > conftest.$ac_ext <<EOF
12358 #line 12359 "configure"
12359 #include "confdefs.h"
12360
12361 #include <stdlib.h>
12362 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
12363 #ifdef HAVE_INTTYPES_H
12364 #define __BIT_TYPES_DEFINED__
12365 #include <inttypes.h>
12366 typedef uint8_t  u_int8_t;
12367 typedef uint16_t u_int16_t;
12368 typedef uint32_t u_int32_t;
12369 #ifdef WE_DONT_NEED_QUADS
12370 typedef uint64_t u_int64_t;
12371 #endif
12372 #endif
12373 #endif
12374 #include <$path>
12375
12376 int main() {
12377
12378 ; return 0; }
12379 EOF
12380 if { (eval echo configure:12381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12381   rm -rf conftest*
12382   db_h_path="$path"; break
12383 else
12384   echo "configure: failed program was:" >&5
12385   cat conftest.$ac_ext >&5
12386 fi
12387 rm -f conftest*
12388   done
12389   if test -z "$db_h_path"
12390   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12391   else echo "$ac_t""$db_h_path" 1>&6
12392   fi
12393
12394   if test "$with_database_berkdb" != "no"; then
12395     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12396 echo "configure:12397: checking for Berkeley DB version" >&5
12397     cat > conftest.$ac_ext <<EOF
12398 #line 12399 "configure"
12399 #include "confdefs.h"
12400 #include <$db_h_path>
12401 #if DB_VERSION_MAJOR > 1
12402 yes
12403 #endif
12404
12405 EOF
12406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12407   egrep "yes" >/dev/null 2>&1; then
12408   rm -rf conftest*
12409   echo "$ac_t""2" 1>&6; dbfunc=db_open
12410 else
12411   rm -rf conftest*
12412   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12413 fi
12414 rm -f conftest*
12415
12416     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12417 echo "configure:12418: checking for $dbfunc" >&5
12418
12419 cat > conftest.$ac_ext <<EOF
12420 #line 12421 "configure"
12421 #include "confdefs.h"
12422 /* System header to define __stub macros and hopefully few prototypes,
12423     which can conflict with char $dbfunc(); below.  */
12424 #include <assert.h>
12425 /* Override any gcc2 internal prototype to avoid an error.  */
12426 /* We use char because int might match the return type of a gcc2
12427     builtin and then its argument prototype would still apply.  */
12428 char $dbfunc();
12429
12430 int main() {
12431
12432 /* The GNU C library defines this for functions which it implements
12433     to always fail with ENOSYS.  Some functions are actually named
12434     something starting with __ and the normal name is an alias.  */
12435 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12436 choke me
12437 #else
12438 $dbfunc();
12439 #endif
12440
12441 ; return 0; }
12442 EOF
12443 if { (eval echo configure:12444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12444   rm -rf conftest*
12445   eval "ac_cv_func_$dbfunc=yes"
12446 else
12447   echo "configure: failed program was:" >&5
12448   cat conftest.$ac_ext >&5
12449   rm -rf conftest*
12450   eval "ac_cv_func_$dbfunc=no"
12451 fi
12452 rm -f conftest*
12453
12454 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12455   echo "$ac_t""yes" 1>&6
12456   with_database_berkdb=yes need_libdb=no
12457 else
12458   echo "$ac_t""no" 1>&6
12459
12460     
12461 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12462 echo "configure:12463: checking for $dbfunc in -ldb" >&5
12463 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12464
12465 xe_check_libs=" -ldb "
12466 cat > conftest.$ac_ext <<EOF
12467 #line 12468 "configure"
12468 #include "confdefs.h"
12469 /* Override any gcc2 internal prototype to avoid an error.  */
12470 /* We use char because int might match the return type of a gcc2
12471     builtin and then its argument prototype would still apply.  */
12472 char $dbfunc();
12473
12474 int main() {
12475 $dbfunc()
12476 ; return 0; }
12477 EOF
12478 if { (eval echo configure:12479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12479   rm -rf conftest*
12480   eval "ac_cv_lib_$ac_lib_var=yes"
12481 else
12482   echo "configure: failed program was:" >&5
12483   cat conftest.$ac_ext >&5
12484   rm -rf conftest*
12485   eval "ac_cv_lib_$ac_lib_var=no"
12486 fi
12487 rm -f conftest*
12488 xe_check_libs=""
12489
12490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12491   echo "$ac_t""yes" 1>&6
12492   with_database_berkdb=yes need_libdb=yes
12493 else
12494   echo "$ac_t""no" 1>&6
12495 fi
12496
12497
12498 fi
12499
12500   fi
12501
12502   if test "$with_database_berkdb" = "yes"; then
12503     { test "$extra_verbose" = "yes" && cat << EOF
12504     Defining DB_H_PATH = "$db_h_path"
12505 EOF
12506 cat >> confdefs.h <<EOF
12507 #define DB_H_PATH "$db_h_path"
12508 EOF
12509 }
12510
12511     { test "$extra_verbose" = "yes" && cat << \EOF
12512     Defining HAVE_BERKELEY_DB
12513 EOF
12514 cat >> confdefs.h <<\EOF
12515 #define HAVE_BERKELEY_DB 1
12516 EOF
12517 }
12518
12519     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12520   else with_database_berkdb=no
12521   fi
12522 fi
12523
12524 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12525      != "no no no"; then
12526   { test "$extra_verbose" = "yes" && cat << \EOF
12527     Defining HAVE_DATABASE
12528 EOF
12529 cat >> confdefs.h <<\EOF
12530 #define HAVE_DATABASE 1
12531 EOF
12532 }
12533
12534   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12535    echo "    xemacs will be linked with \"database.o\""
12536  fi
12537 fi
12538
12539 if test "$with_socks" = "yes"; then
12540   
12541 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12542 echo "configure:12543: checking for SOCKSinit in -lsocks" >&5
12543 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12544
12545 xe_check_libs=" -lsocks "
12546 cat > conftest.$ac_ext <<EOF
12547 #line 12548 "configure"
12548 #include "confdefs.h"
12549 /* Override any gcc2 internal prototype to avoid an error.  */
12550 /* We use char because int might match the return type of a gcc2
12551     builtin and then its argument prototype would still apply.  */
12552 char SOCKSinit();
12553
12554 int main() {
12555 SOCKSinit()
12556 ; return 0; }
12557 EOF
12558 if { (eval echo configure:12559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12559   rm -rf conftest*
12560   eval "ac_cv_lib_$ac_lib_var=yes"
12561 else
12562   echo "configure: failed program was:" >&5
12563   cat conftest.$ac_ext >&5
12564   rm -rf conftest*
12565   eval "ac_cv_lib_$ac_lib_var=no"
12566 fi
12567 rm -f conftest*
12568 xe_check_libs=""
12569
12570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12571   echo "$ac_t""yes" 1>&6
12572     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12573     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12574   { test "$extra_verbose" = "yes" && cat << EOF
12575     Defining $ac_tr_lib
12576 EOF
12577 cat >> confdefs.h <<EOF
12578 #define $ac_tr_lib 1
12579 EOF
12580 }
12581
12582   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12583
12584 else
12585   echo "$ac_t""no" 1>&6
12586 fi
12587
12588
12589   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12590     Defining HAVE_SOCKS
12591 EOF
12592 cat >> confdefs.h <<\EOF
12593 #define HAVE_SOCKS 1
12594 EOF
12595 }
12596
12597 fi
12598
12599 if test "$usage_tracking" = "yes"; then
12600   { test "$extra_verbose" = "yes" && cat << \EOF
12601     Defining USAGE_TRACKING
12602 EOF
12603 cat >> confdefs.h <<\EOF
12604 #define USAGE_TRACKING 1
12605 EOF
12606 }
12607
12608   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12609 fi
12610
12611 if test "$with_modules" != "no"; then
12612   echo "checking for module support" 1>&6
12613 echo "configure:12614: checking for module support" >&5
12614
12615     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12616 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12617 echo "configure:12618: checking for dlfcn.h" >&5
12618
12619 cat > conftest.$ac_ext <<EOF
12620 #line 12621 "configure"
12621 #include "confdefs.h"
12622 #include <dlfcn.h>
12623 EOF
12624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12625 { (eval echo configure:12626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12627 if test -z "$ac_err"; then
12628   rm -rf conftest*
12629   eval "ac_cv_header_$ac_safe=yes"
12630 else
12631   echo "$ac_err" >&5
12632   echo "configure: failed program was:" >&5
12633   cat conftest.$ac_ext >&5
12634   rm -rf conftest*
12635   eval "ac_cv_header_$ac_safe=no"
12636 fi
12637 rm -f conftest*
12638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12639   echo "$ac_t""yes" 1>&6
12640   
12641     
12642 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12643 echo "configure:12644: checking for dlopen in -ldl" >&5
12644 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12645
12646 xe_check_libs=" -ldl "
12647 cat > conftest.$ac_ext <<EOF
12648 #line 12649 "configure"
12649 #include "confdefs.h"
12650 /* Override any gcc2 internal prototype to avoid an error.  */
12651 /* We use char because int might match the return type of a gcc2
12652     builtin and then its argument prototype would still apply.  */
12653 char dlopen();
12654
12655 int main() {
12656 dlopen()
12657 ; return 0; }
12658 EOF
12659 if { (eval echo configure:12660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12660   rm -rf conftest*
12661   eval "ac_cv_lib_$ac_lib_var=yes"
12662 else
12663   echo "configure: failed program was:" >&5
12664   cat conftest.$ac_ext >&5
12665   rm -rf conftest*
12666   eval "ac_cv_lib_$ac_lib_var=no"
12667 fi
12668 rm -f conftest*
12669 xe_check_libs=""
12670
12671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12672   echo "$ac_t""yes" 1>&6
12673   have_dl=yes libdl=dl
12674 else
12675   echo "$ac_t""no" 1>&6
12676
12677 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12678 echo "configure:12679: checking for dlopen in -lc" >&5
12679 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12680
12681 xe_check_libs=" -lc "
12682 cat > conftest.$ac_ext <<EOF
12683 #line 12684 "configure"
12684 #include "confdefs.h"
12685 /* Override any gcc2 internal prototype to avoid an error.  */
12686 /* We use char because int might match the return type of a gcc2
12687     builtin and then its argument prototype would still apply.  */
12688 char dlopen();
12689
12690 int main() {
12691 dlopen()
12692 ; return 0; }
12693 EOF
12694 if { (eval echo configure:12695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12695   rm -rf conftest*
12696   eval "ac_cv_lib_$ac_lib_var=yes"
12697 else
12698   echo "configure: failed program was:" >&5
12699   cat conftest.$ac_ext >&5
12700   rm -rf conftest*
12701   eval "ac_cv_lib_$ac_lib_var=no"
12702 fi
12703 rm -f conftest*
12704 xe_check_libs=""
12705
12706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12707   echo "$ac_t""yes" 1>&6
12708   have_dl=yes 
12709 else
12710   echo "$ac_t""no" 1>&6
12711 fi
12712
12713
12714 fi
12715
12716
12717 else
12718   echo "$ac_t""no" 1>&6
12719 fi
12720
12721   if test -n "$have_dl"; then
12722     { test "$extra_verbose" = "yes" && cat << \EOF
12723     Defining HAVE_DLOPEN
12724 EOF
12725 cat >> confdefs.h <<\EOF
12726 #define HAVE_DLOPEN 1
12727 EOF
12728 }
12729
12730   else
12731     
12732 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
12733 echo "configure:12734: checking for shl_load in -ldld" >&5
12734 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
12735
12736 xe_check_libs=" -ldld "
12737 cat > conftest.$ac_ext <<EOF
12738 #line 12739 "configure"
12739 #include "confdefs.h"
12740 /* Override any gcc2 internal prototype to avoid an error.  */
12741 /* We use char because int might match the return type of a gcc2
12742     builtin and then its argument prototype would still apply.  */
12743 char shl_load();
12744
12745 int main() {
12746 shl_load()
12747 ; return 0; }
12748 EOF
12749 if { (eval echo configure:12750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12750   rm -rf conftest*
12751   eval "ac_cv_lib_$ac_lib_var=yes"
12752 else
12753   echo "configure: failed program was:" >&5
12754   cat conftest.$ac_ext >&5
12755   rm -rf conftest*
12756   eval "ac_cv_lib_$ac_lib_var=no"
12757 fi
12758 rm -f conftest*
12759 xe_check_libs=""
12760
12761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12762   echo "$ac_t""yes" 1>&6
12763   libdl=dld have_dl=yes;
12764       { test "$extra_verbose" = "yes" && cat << \EOF
12765     Defining HAVE_SHL_LOAD
12766 EOF
12767 cat >> confdefs.h <<\EOF
12768 #define HAVE_SHL_LOAD 1
12769 EOF
12770 }
12771
12772 else
12773   echo "$ac_t""no" 1>&6
12774
12775 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12776 echo "configure:12777: checking for dld_init in -ldld" >&5
12777 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12778
12779 xe_check_libs=" -ldld "
12780 cat > conftest.$ac_ext <<EOF
12781 #line 12782 "configure"
12782 #include "confdefs.h"
12783 /* Override any gcc2 internal prototype to avoid an error.  */
12784 /* We use char because int might match the return type of a gcc2
12785     builtin and then its argument prototype would still apply.  */
12786 char dld_init();
12787
12788 int main() {
12789 dld_init()
12790 ; return 0; }
12791 EOF
12792 if { (eval echo configure:12793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12793   rm -rf conftest*
12794   eval "ac_cv_lib_$ac_lib_var=yes"
12795 else
12796   echo "configure: failed program was:" >&5
12797   cat conftest.$ac_ext >&5
12798   rm -rf conftest*
12799   eval "ac_cv_lib_$ac_lib_var=no"
12800 fi
12801 rm -f conftest*
12802 xe_check_libs=""
12803
12804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12805   echo "$ac_t""yes" 1>&6
12806   libdl=dld have_dl=yes;
12807       { test "$extra_verbose" = "yes" && cat << \EOF
12808     Defining HAVE_DLD_INIT
12809 EOF
12810 cat >> confdefs.h <<\EOF
12811 #define HAVE_DLD_INIT 1
12812 EOF
12813 }
12814
12815 else
12816   echo "$ac_t""no" 1>&6
12817 fi
12818
12819
12820 fi
12821
12822
12823   fi
12824
12825   if test -n "$have_dl"; then
12826         
12827 dll_ld=
12828 dll_ldflags=
12829 dll_cflags=
12830 dll_post=
12831 dll_ldo="-o"
12832 ld_dynamic_link_flags=
12833 xehost=$canonical
12834 xealias=$internal_configuration
12835
12836 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12837 echo "configure:12838: checking how to build dynamic libraries for ${xehost}" >&5
12838 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12839 case "$xehost" in
12840 *-*-linux-gnu*) ;;
12841 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12842 esac
12843
12844 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12845 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12846 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12847
12848 case "$xehost_os" in
12849 aix3*)
12850   # AIX sometimes has problems with the GCC collect2 program.  For some
12851   # reason, if we set the COLLECT_NAMES environment variable, the problems
12852   # vanish in a puff of smoke.
12853   if test "${COLLECT_NAMES+set}" != set; then
12854     COLLECT_NAMES=
12855     export COLLECT_NAMES
12856   fi
12857   ;;
12858 esac
12859
12860 # Now see if the compiler is really GCC.
12861 if test "$GCC" = "yes"; then
12862   XEGCC=yes
12863 else
12864   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12865 echo "configure:12866: checking checking whether we are using GNU C" >&5
12866   cat > conftest.$ac_ext <<EOF
12867 #line 12868 "configure"
12868 #include "confdefs.h"
12869
12870 #ifdef __GNUC__
12871   yes;
12872 #endif
12873
12874 EOF
12875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12876   egrep "yes" >/dev/null 2>&1; then
12877   rm -rf conftest*
12878   XEGCC=yes
12879 else
12880   rm -rf conftest*
12881   XEGCC=no
12882 fi
12883 rm -f conftest*
12884
12885   echo "$ac_t""${XEGCC}" 1>&6
12886 fi
12887
12888 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12889 echo "configure:12890: checking how to produce PIC code" >&5
12890 wl=
12891
12892 can_build_shared=yes
12893 if test "$XEGCC" = yes; then
12894   wl='-Wl,'
12895
12896   case "$xehost_os" in
12897   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12898     # PIC is the default for these OSes.
12899     ;;
12900
12901   aix3* | aix4* | os2*)
12902     # We can build DLLs from non-PIC.
12903     ;;
12904   amigaos*)
12905     # FIXME: we need at least 68020 code to build shared libraries, but
12906     # adding the `-m68020' flag to GCC prevents building anything better,
12907     # like `-m68040'.
12908     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12909     ;;
12910   *)
12911     dll_cflags='-fPIC'
12912     ;;
12913   esac
12914 else
12915   # PORTME Check for PIC flags for the system compiler.
12916   case "$xehost_os" in
12917   hpux9* | hpux1[0-9]*)
12918     # Is there a better link_static_flag that works with the bundled CC?
12919     wl='-Wl,'
12920     dll_cflags='+Z'
12921     ;;
12922
12923   irix5* | irix6*)
12924     wl='-Wl,'
12925     # PIC (with -KPIC) is the default.
12926     ;;
12927
12928   os2*)
12929     # We can build DLLs from non-PIC.
12930     ;;
12931
12932   osf3* | osf4*)
12933     # All OSF/1 code is PIC.
12934     wl='-Wl,'
12935     ;;
12936
12937   sco3.2v5*)
12938     dll_cflags='-belf -Kpic'
12939     wl='-Wl,'
12940     ;;
12941
12942   unixware*)
12943     dll_cflags="-KPIC"
12944     wl="-Wl,"
12945     ;;
12946
12947   sysv4*)
12948     dll_cflags="-KPIC"
12949     wl="-Wl,"
12950     ;;
12951
12952   sysv5*)
12953     dll_cflags="-KPIC"
12954     wl="-Wl,"
12955     ;;
12956
12957   solaris2*)
12958     dll_cflags='-KPIC'
12959     wl='-Wl,'
12960     ;;
12961
12962   sunos4*)
12963     dll_cflags='-PIC'
12964     wl='-Qoption ld '
12965     ;;
12966
12967   uts4*)
12968     dll_cflags='-pic'
12969     ;;
12970
12971   *)
12972     can_build_shared=no
12973     ;;
12974   esac
12975 fi
12976
12977 if test -n "$dll_cflags"; then
12978   echo "$ac_t""${dll_cflags}" 1>&6
12979   
12980   # Check to make sure the dll_cflags actually works.
12981   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12982 echo "configure:12983: checking if PIC flag ${dll_cflags} really works" >&5
12983   save_CFLAGS="$CFLAGS"
12984   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12985   cat > conftest.$ac_ext <<EOF
12986 #line 12987 "configure"
12987 #include "confdefs.h"
12988
12989 int main() {
12990 int x=0;
12991 ; return 0; }
12992 EOF
12993 if { (eval echo configure:12994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12994   rm -rf conftest*
12995   
12996     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12997     # reports no error.  So, we need to grep stderr for (Bundled).
12998     if grep '(Bundled)' config.log >/dev/null; then
12999       echo "$ac_t""no" 1>&6
13000       can_build_shared=no
13001       dll_cflags=
13002     else
13003       echo "$ac_t""yes" 1>&6
13004     fi
13005 else
13006   echo "configure: failed program was:" >&5
13007   cat conftest.$ac_ext >&5
13008   rm -rf conftest*
13009   echo "$ac_t""no" 1>&6
13010     can_build_shared=no
13011     dll_cflags=
13012 fi
13013 rm -f conftest*
13014   CFLAGS="$save_CFLAGS"
13015 else
13016   echo "$ac_t""none" 1>&6
13017 fi
13018
13019 if test "$can_build_shared" = "yes"; then
13020 cc_produces_so=no
13021 xldf=
13022 xcldf=
13023 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13024 echo "configure:13025: checking if C compiler can produce shared libraries" >&5
13025 if test "$XEGCC" = yes; then
13026   xcldf="-shared"
13027   xldf="-shared"
13028 else # Not using GCC
13029   case "$xehost_os" in
13030     aix3* | aix4*)
13031       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13032       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13033       ;;
13034
13035     freebsd2* | netbsd* | openbsd*)
13036       xldf="-Bshareable"
13037       xcldf="${wl}-Bshareable"
13038       ;;
13039
13040     freebsd3*)
13041       xcldf="-shared"
13042       ;;
13043
13044     hpux*)
13045       xldf="-b +s"
13046       xcldf="${wl}-b ${wl}+s"
13047       ;;
13048
13049     irix5* | irix6* | osf3* | osf4*)
13050       xcldf="${wl}-shared"
13051       xldf="-shared"
13052       ;;
13053
13054     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13055       xcldf="-G"
13056       xldf="-G"
13057       ;;
13058
13059     sunos4*)
13060       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
13061       xldf="-assert pure-text -Bstatic"
13062       ;;
13063   esac
13064 fi # End if if we are using gcc
13065
13066 if test -n "$xcldf"; then
13067   save_LDFLAGS=$LDFLAGS
13068   save_LIBS=$LIBS
13069   save_xe_libs=$xe_libs
13070   LDFLAGS="$xcldf $LDFLAGS"
13071   LIBS=
13072   xe_libs=
13073   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13074   cat > conftest.$ac_ext <<EOF
13075 #line 13076 "configure"
13076 #include "confdefs.h"
13077
13078 int main() {
13079 int x=0;
13080 ; return 0; }
13081 EOF
13082 if { (eval echo configure:13083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13083   rm -rf conftest*
13084   cc_produces_so=yes
13085 else
13086   echo "configure: failed program was:" >&5
13087   cat conftest.$ac_ext >&5
13088   rm -rf conftest*
13089   cc_produces_so=no
13090 fi
13091 rm -f conftest*
13092   LDFLAGS=$save_LDFLAGS
13093   LIBS=$save_LIBS
13094   xe_libs=$save_xe_libs
13095   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13096 else
13097   cc_produces_so=no
13098 fi
13099 echo "$ac_t""${cc_produces_so}" 1>&6
13100
13101 LTLD=$LD
13102 if test -z "$LTLD"; then
13103   ac_prog=ld
13104   if test "$XEGCC" = yes; then
13105     # Check if gcc -print-prog-name=ld gives a path.
13106     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
13107 echo "configure:13108: checking for ld used by GCC" >&5
13108     ac_prog=`($CC -print-prog-name=ld) 2>&5`
13109     case "$ac_prog" in
13110     # Accept absolute paths.
13111     /*)
13112       if test -z "$LTLD"; then
13113         case "$ac_prog" in
13114           *gcc-lib*) LTLD="$CC"
13115                      ;;
13116           *)         LTLD="$ac_prog"
13117                      ;;
13118         esac
13119       fi
13120       ;;
13121     "")
13122       # If it fails, then pretend we aren't using GCC.
13123       ac_prog=ld
13124       ;;
13125     *)
13126       # If it is relative, then search for the first ld in PATH.
13127       with_gnu_ld=unknown
13128       ;;
13129     esac
13130   else
13131     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
13132 echo "configure:13133: checking for GNU ld" >&5
13133   fi
13134
13135   if test -z "$LTLD"; then
13136     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13137     for ac_dir in $PATH; do
13138       test -z "$ac_dir" && ac_dir=.
13139       if test -f "$ac_dir/$ac_prog"; then
13140         LTLD="$ac_dir/$ac_prog"
13141         # Check to see if the program is GNU ld.  I'd rather use --version,
13142         # but apparently some GNU ld's only accept -v.
13143         # Break only if it was the GNU/non-GNU ld that we prefer.
13144         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
13145           xe_gnu_ld=yes
13146         else
13147           xe_gnu_ld=no
13148         fi
13149       fi
13150     done
13151     IFS="$ac_save_ifs"
13152   fi
13153
13154   if test -n "$LTLD"; then
13155     echo "$ac_t""${LTLD}" 1>&6
13156   else
13157     echo "$ac_t""no" 1>&6
13158   fi
13159
13160   if test -z "$LTLD" -a "$cc_produces_so" = no; then
13161     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
13162     exit 1
13163   fi
13164 fi
13165
13166 ld_dynamic_link_flags=
13167
13168 # Check to see if it really is or isn't GNU ld.
13169 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
13170 echo "configure:13171: checking if the linker is GNU ld" >&5
13171 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
13172 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
13173   xe_gnu_ld=yes
13174 else
13175   xe_gnu_ld=no
13176 fi
13177 echo "$ac_t""${xe_gnu_ld}" 1>&6
13178
13179 case "$xehost_os" in
13180   amigaos* | sunos4*)
13181     # On these operating systems, we should treat GNU ld like the system ld.
13182     gnu_ld_acts_native=yes
13183     ;;
13184   *)
13185     gnu_ld_acts_native=no
13186     ;;
13187 esac
13188
13189 if test "$cc_produces_so" = "yes"; then
13190   dll_ld=$CC
13191   dll_ldflags=$xcldf
13192   can_build_shared=yes
13193 else
13194   # OK - only NOW do we futz about with ld.
13195   # See if the linker supports building shared libraries.
13196   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
13197 echo "configure:13198: checking whether the linker supports shared libraries" >&5
13198   dll_ld=$CC
13199   dll_ldflags=$LDFLAGS
13200   ld_shlibs=yes
13201   can_build_shared=yes
13202   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
13203     # See if GNU ld supports shared libraries.
13204     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
13205       dll_ld=$CC
13206       dll_ldflags="-shared"
13207       ld_shlibs=yes
13208     else
13209       ld_shlibs=no
13210     fi
13211   else
13212     # PORTME fill in a description of your system's linker (not GNU ld)
13213     case "$xehost_os" in
13214     aix3*)
13215       dll_ld=$LTLD
13216       dll_ldflags=$xldf
13217       ;;
13218
13219     aix4*)
13220       dll_ldflags=$xcldf
13221       ;;
13222
13223     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13224     # support.  Future versions do this automatically, but an explicit c++rt0.o
13225     # doesn't break anything, and helps significantly (at the cost of a little
13226     # extra space).
13227     freebsd2.2*)
13228       dll_ld=$LTLD
13229       dll_ldflags=$xldf
13230       dll_post="/usr/lib/c++rt0.o"
13231       ;;
13232
13233     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
13234     freebsd2*)
13235       dll_ld=$LTLD
13236       dll_ldflags="-Bshareable"
13237       ;;
13238
13239     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
13240     freebsd3*)
13241       dll_ldflags="-shared"
13242       ;;
13243
13244     hpux*)
13245       dll_ld=$LTLD
13246       dll_ldflags=$xldf
13247       ;;
13248
13249     irix5* | irix6*)
13250       dll_ld=$LTLD
13251       dll_ldflags=$xldf
13252       ;;
13253
13254     netbsd*)
13255       # Tested with NetBSD 1.2 ld
13256       dll_ld=$LTLD
13257       dll_ldflags=$xldf
13258       ;;
13259
13260     openbsd*)
13261       dll_ld=$LTLD
13262       dll_ldflags=$xldf
13263       ;;
13264
13265     osf3* | osf4*)
13266       dll_ld=$LTLD
13267       dll_ldflags=$xldf
13268       ;;
13269
13270     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13271     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13272       dll_ld=$LTLD
13273       case "$dll_ld" in
13274         *gcc*) dll_ldflags="-shared"
13275                dll_ld=$CC
13276                ;;
13277         *)     dll_ldflags="-G"
13278                ;;
13279       esac
13280       ;;
13281
13282     sunos4*)
13283       if test "$XEGCC" = yes; then
13284         dll_ld=$CC
13285       else
13286         dll_ld=$LTLD
13287       fi
13288       dll_ldflags=$xldf
13289       ;;
13290
13291     uts4*)
13292       dll_ld=$LTLD
13293       dll_ldflags="-G"
13294       ;;
13295
13296     bsdi*)
13297       dll_ldflags="-r"
13298       dll_ld="shlicc2"
13299       ;;
13300
13301     *)
13302       ld_shlibs=no
13303       can_build_shared=no
13304       ;;
13305     esac
13306   fi
13307   echo "$ac_t""${ld_shlibs}" 1>&6
13308   if test "$ld_shlibs" = "no"; then
13309     can_build_shared=no
13310   fi
13311 fi # End of if cc_produces_so = no
13312
13313
13314 if test "$xe_gnu_ld" = yes; then
13315   if test "$ld_shlibs" = yes; then
13316     ld_dynamic_link_flags="${wl}-export-dynamic"
13317   fi
13318 fi
13319
13320 if test -z "$ld_dynamic_link_flags"; then
13321   case "$xehost_os" in
13322   aix3*)
13323     ld_dynamic_link_flags=
13324     ;;
13325
13326   aix4*)
13327     ld_dynamic_link_flags=
13328     ;;
13329
13330   freebsd2.2*)
13331     ld_dynamic_link_flags=
13332     ;;
13333
13334   freebsd2*)
13335     ld_dynamic_link_flags=
13336     ;;
13337
13338   freebsd3*)
13339     ld_dynamic_link_flags=
13340     ;;
13341
13342   hpux*)
13343     ld_dynamic_link_flags="${wl}-E"
13344     ;;
13345
13346   irix5* | irix6*)
13347     ld_dynamic_link_flags=
13348     ;;
13349
13350   netbsd*)
13351     ld_dynamic_link_flags=
13352     ;;
13353
13354   openbsd*)
13355     ld_dynamic_link_flags=
13356     ;;
13357
13358   osf3* | osf4*)
13359     ld_dynamic_link_flags=
13360     ;;
13361
13362   solaris2* | solaris7*)
13363     ld_dynamic_link_flags=
13364     ;;
13365
13366   sco3.2v5* | unixware* | sysv5* | sysv4*)
13367     ld_dynamic_link_flags="${wl}-Bexport"
13368     ;;
13369
13370   sunos4*)
13371     ld_dynamic_link_flags=
13372     ;;
13373
13374   uts4*)
13375     ld_dynamic_link_flags=
13376     ;;
13377
13378   bsdi*)
13379     ld_dynamic_link_flags=
13380     ;;
13381
13382   esac
13383 fi # End of if -z ld_dynamic_link_flags
13384 fi # End of if test "$can_build_shared" = "yes"
13385
13386
13387
13388
13389
13390
13391
13392
13393   fi
13394
13395   if test "$can_build_shared" = "yes"; then
13396     { test "$extra_verbose" = "yes" && cat << \EOF
13397     Defining HAVE_SHLIB
13398 EOF
13399 cat >> confdefs.h <<\EOF
13400 #define HAVE_SHLIB 1
13401 EOF
13402 }
13403
13404     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13405    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13406  fi
13407     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13408     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13409     for ac_func in dlerror _dlerror
13410 do
13411 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13412 echo "configure:13413: checking for $ac_func" >&5
13413
13414 cat > conftest.$ac_ext <<EOF
13415 #line 13416 "configure"
13416 #include "confdefs.h"
13417 /* System header to define __stub macros and hopefully few prototypes,
13418     which can conflict with char $ac_func(); below.  */
13419 #include <assert.h>
13420 /* Override any gcc2 internal prototype to avoid an error.  */
13421 /* We use char because int might match the return type of a gcc2
13422     builtin and then its argument prototype would still apply.  */
13423 char $ac_func();
13424
13425 int main() {
13426
13427 /* The GNU C library defines this for functions which it implements
13428     to always fail with ENOSYS.  Some functions are actually named
13429     something starting with __ and the normal name is an alias.  */
13430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13431 choke me
13432 #else
13433 $ac_func();
13434 #endif
13435
13436 ; return 0; }
13437 EOF
13438 if { (eval echo configure:13439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13439   rm -rf conftest*
13440   eval "ac_cv_func_$ac_func=yes"
13441 else
13442   echo "configure: failed program was:" >&5
13443   cat conftest.$ac_ext >&5
13444   rm -rf conftest*
13445   eval "ac_cv_func_$ac_func=no"
13446 fi
13447 rm -f conftest*
13448
13449 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13450   echo "$ac_t""yes" 1>&6
13451     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13452   { test "$extra_verbose" = "yes" && cat << EOF
13453     Defining $ac_tr_func
13454 EOF
13455 cat >> confdefs.h <<EOF
13456 #define $ac_tr_func 1
13457 EOF
13458 }
13459  
13460 else
13461   echo "$ac_t""no" 1>&6
13462 fi
13463 done
13464
13465     with_modules=yes
13466   else
13467     if test "$with_modules" = "yes"; then
13468       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13469     else
13470       echo "configure: warning: "Module support cannot be provided."" 1>&2
13471     fi
13472     with_modules=no
13473   fi
13474 fi
13475
13476 cat > conftest.$ac_ext <<EOF
13477 #line 13478 "configure"
13478 #include "confdefs.h"
13479 int main(int c,char *v[]){return 0;}
13480 EOF
13481 if { (eval echo configure:13482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13482 then
13483   :
13484 else
13485   conftest_rc="$?"
13486   echo "configure: failed program was:" >&5
13487   cat conftest.$ac_ext >&5
13488   rm -fr conftest*
13489   
13490   echo ""
13491   echo "*** PANIC *** The C compiler can no longer build working executables."
13492   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13493   echo "*** PANIC *** The most likely reason for this problem is that configure"
13494   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13495   echo "*** PANIC *** found at run time."
13496   echo "*** PANIC ***"
13497   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13498   echo "*** PANIC *** On other systems, try telling configure where to find the"
13499   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13500   echo "*** PANIC ***"
13501   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13502   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13503   echo "*** PANIC *** on your system.  Don't do that."
13504   exit 1
13505 fi
13506 rm -fr conftest*
13507
13508 if test "$win32_processes" = "yes"; then
13509   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13510    echo "    xemacs will be linked with \"process-nt.o\""
13511  fi
13512 else
13513   { test "$extra_verbose" = "yes" && cat << \EOF
13514     Defining HAVE_UNIX_PROCESSES
13515 EOF
13516 cat >> confdefs.h <<\EOF
13517 #define HAVE_UNIX_PROCESSES 1
13518 EOF
13519 }
13520
13521   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13522    echo "    xemacs will be linked with \"process-unix.o\""
13523  fi
13524 fi
13525
13526
13527
13528 T=""
13529 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13530 CFLAGS="$T"
13531
13532
13533 T=""
13534 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13535 extra_objs="$T"
13536
13537
13538 T=""
13539 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
13540 c_switch_general="$T"
13541
13542
13543 T=""
13544 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13545 c_switch_window_system="$T"
13546
13547
13548 T=""
13549 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13550 c_switch_all="$T"
13551
13552
13553 T=""
13554 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
13555 ld_switch_general="$T"
13556
13557
13558 T=""
13559 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13560 ld_switch_window_system="$T"
13561
13562
13563 T=""
13564 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13565 ld_switch_all="$T"
13566
13567
13568 T=""
13569 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13570 ld_libs_general="$T"
13571
13572
13573 T=""
13574 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
13575 ld_libs_window_system="$T"
13576
13577
13578 T=""
13579 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13580 ld_libs_all="$T"
13581
13582
13583
13584 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13585 internal_makefile_list="Makefile.in"
13586 SUBDIR_MAKEFILES=''
13587 test -d lock || mkdir lock
13588 for dir in $MAKE_SUBDIR; do
13589   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13590         test -d "$d" || mkdir "$d"; cd "$d"
13591       done ) ;;
13592    * ) test -d "$dir" || mkdir "$dir" ;;
13593   esac
13594   
13595 T=""
13596 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13597 SUBDIR_MAKEFILES="$T"
13598
13599   
13600 T=""
13601 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13602 internal_makefile_list="$T"
13603
13604 done
13605
13606
13607
13608
13609 for dir in src/s src/m; do
13610   if test ! -d "$dir" ; then
13611     echo Making symbolic link to "$srcdir/$dir"
13612     ${LN_S} "$srcdir/$dir" "$dir"
13613   fi
13614 done
13615
13616 if test "$extra_verbose" = "yes"; then
13617   echo ""
13618   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
13619   echo ""
13620 fi
13621
13622
13623 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
13624   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
13625   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
13626 fi
13627
13628 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
13629   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
13630   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
13631 fi
13632
13633 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
13634   test "$extra_verbose" = "yes" && echo "creating TAGS"
13635   echo "\f
13636 $srcdir/TAGS,include" > "TAGS"
13637 fi
13638
13639 if test "$__SUNPRO_C" = "yes"; then
13640   test "$extra_verbose" = "yes" && echo "creating .sbinit"
13641   ( echo "# For use with Sun WorkShop's Source browser."
13642     echo "# See sbquery(1) and sbinit(4) for more information"
13643     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13644   ) > .sbinit
13645 fi
13646
13647 rm -f core
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667 PREFIX=$prefix
13668 while true; do
13669   case "$PREFIX" in
13670     *\$* ) eval "PREFIX=$PREFIX" ;;
13671     *) break ;;
13672   esac
13673 done
13674
13675
13676
13677
13678 EXEC_PREFIX=$exec_prefix
13679 while true; do
13680   case "$EXEC_PREFIX" in
13681     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13682     *) break ;;
13683   esac
13684 done
13685
13686
13687
13688
13689 INFODIR=$infodir
13690 while true; do
13691   case "$INFODIR" in
13692     *\$* ) eval "INFODIR=$INFODIR" ;;
13693     *) break ;;
13694   esac
13695 done
13696
13697
13698
13699
13700 INFOPATH=$infopath
13701 while true; do
13702   case "$INFOPATH" in
13703     *\$* ) eval "INFOPATH=$INFOPATH" ;;
13704     *) break ;;
13705   esac
13706 done
13707
13708
13709
13710
13711 PACKAGE_PATH=$package_path
13712 while true; do
13713   case "$PACKAGE_PATH" in
13714     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
13715     *) break ;;
13716   esac
13717 done
13718
13719
13720
13721
13722 LISPDIR=$lispdir
13723 while true; do
13724   case "$LISPDIR" in
13725     *\$* ) eval "LISPDIR=$LISPDIR" ;;
13726     *) break ;;
13727   esac
13728 done
13729
13730
13731
13732
13733 MODULEDIR=$moduledir
13734 while true; do
13735   case "$MODULEDIR" in
13736     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
13737     *) break ;;
13738   esac
13739 done
13740
13741
13742
13743
13744 SITELISPDIR=$sitelispdir
13745 while true; do
13746   case "$SITELISPDIR" in
13747     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
13748     *) break ;;
13749   esac
13750 done
13751
13752
13753
13754
13755 SITEMODULEDIR=$sitemoduledir
13756 while true; do
13757   case "$SITEMODULEDIR" in
13758     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
13759     *) break ;;
13760   esac
13761 done
13762
13763
13764
13765
13766 ETCDIR=$etcdir
13767 while true; do
13768   case "$ETCDIR" in
13769     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13770     *) break ;;
13771   esac
13772 done
13773
13774
13775
13776
13777 LOCKDIR=$lockdir
13778 while true; do
13779   case "$LOCKDIR" in
13780     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13781     *) break ;;
13782   esac
13783 done
13784
13785
13786
13787
13788 DOCDIR=$docdir
13789 while true; do
13790   case "$DOCDIR" in
13791     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13792     *) break ;;
13793   esac
13794 done
13795
13796
13797
13798
13799 ARCHLIBDIR=$archlibdir
13800 while true; do
13801   case "$ARCHLIBDIR" in
13802     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13803     *) break ;;
13804   esac
13805 done
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13827
13828
13829
13830
13831
13832
13833
13834 : ${XEMACS_CC:=$CC}
13835
13836
13837 if test "$with_prefix" = "yes"; then
13838   { test "$extra_verbose" = "yes" && cat << \EOF
13839     Defining PREFIX_USER_DEFINED
13840 EOF
13841 cat >> confdefs.h <<\EOF
13842 #define PREFIX_USER_DEFINED 1
13843 EOF
13844 }
13845
13846 fi
13847
13848 if test "$with_site_lisp" = "no"; then
13849   { test "$extra_verbose" = "yes" && cat << \EOF
13850     Defining INHIBIT_SITE_LISP
13851 EOF
13852 cat >> confdefs.h <<\EOF
13853 #define INHIBIT_SITE_LISP 1
13854 EOF
13855 }
13856
13857 fi
13858 if test "$with_site_modules" = "no"; then
13859   { test "$extra_verbose" = "yes" && cat << \EOF
13860     Defining INHIBIT_SITE_MODULES
13861 EOF
13862 cat >> confdefs.h <<\EOF
13863 #define INHIBIT_SITE_MODULES 1
13864 EOF
13865 }
13866
13867 fi
13868
13869
13870 T=""
13871 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13872 ac_configure_args="$T"
13873
13874 { test "$extra_verbose" = "yes" && cat << EOF
13875     Defining EMACS_CONFIGURATION = "$configuration"
13876 EOF
13877 cat >> confdefs.h <<EOF
13878 #define EMACS_CONFIGURATION "$configuration"
13879 EOF
13880 }
13881
13882 { test "$extra_verbose" = "yes" && cat << EOF
13883     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13884 EOF
13885 cat >> confdefs.h <<EOF
13886 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13887 EOF
13888 }
13889
13890 { test "$extra_verbose" = "yes" && cat << EOF
13891     Defining config_machfile = "$machfile"
13892 EOF
13893 cat >> confdefs.h <<EOF
13894 #define config_machfile "$machfile"
13895 EOF
13896 }
13897
13898 { test "$extra_verbose" = "yes" && cat << EOF
13899     Defining config_opsysfile = "$opsysfile"
13900 EOF
13901 cat >> confdefs.h <<EOF
13902 #define config_opsysfile "$opsysfile"
13903 EOF
13904 }
13905
13906
13907
13908 null_string=""
13909 { test "$extra_verbose" = "yes" && cat << EOF
13910     Defining LD_SWITCH_X_SITE = $null_string
13911 EOF
13912 cat >> confdefs.h <<EOF
13913 #define LD_SWITCH_X_SITE $null_string
13914 EOF
13915 }
13916
13917 { test "$extra_verbose" = "yes" && cat << EOF
13918     Defining LD_SWITCH_X_SITE_AUX = $null_string
13919 EOF
13920 cat >> confdefs.h <<EOF
13921 #define LD_SWITCH_X_SITE_AUX $null_string
13922 EOF
13923 }
13924
13925 { test "$extra_verbose" = "yes" && cat << EOF
13926     Defining C_SWITCH_X_SITE = $null_string
13927 EOF
13928 cat >> confdefs.h <<EOF
13929 #define C_SWITCH_X_SITE $null_string
13930 EOF
13931 }
13932
13933 { test "$extra_verbose" = "yes" && cat << EOF
13934     Defining LD_SWITCH_SITE = $null_string
13935 EOF
13936 cat >> confdefs.h <<EOF
13937 #define LD_SWITCH_SITE $null_string
13938 EOF
13939 }
13940
13941 { test "$extra_verbose" = "yes" && cat << EOF
13942     Defining C_SWITCH_SITE = $null_string
13943 EOF
13944 cat >> confdefs.h <<EOF
13945 #define C_SWITCH_SITE $null_string
13946 EOF
13947 }
13948
13949
13950
13951 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13952     Defining GNU_MALLOC
13953 EOF
13954 cat >> confdefs.h <<\EOF
13955 #define GNU_MALLOC 1
13956 EOF
13957 }
13958
13959 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13960     Defining USE_SYSTEM_MALLOC
13961 EOF
13962 cat >> confdefs.h <<\EOF
13963 #define USE_SYSTEM_MALLOC 1
13964 EOF
13965 }
13966
13967 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13968     Defining USE_DEBUG_MALLOC
13969 EOF
13970 cat >> confdefs.h <<\EOF
13971 #define USE_DEBUG_MALLOC 1
13972 EOF
13973 }
13974
13975                                               { test "$extra_verbose" = "yes" && cat << \EOF
13976     Defining USE_SYSTEM_MALLOC
13977 EOF
13978 cat >> confdefs.h <<\EOF
13979 #define USE_SYSTEM_MALLOC 1
13980 EOF
13981 }
13982
13983 fi
13984 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13985     Defining I18N3
13986 EOF
13987 cat >> confdefs.h <<\EOF
13988 #define I18N3 1
13989 EOF
13990 }
13991
13992 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13993     Defining USE_GCC
13994 EOF
13995 cat >> confdefs.h <<\EOF
13996 #define USE_GCC 1
13997 EOF
13998 }
13999
14000 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14001     Defining EXTERNAL_WIDGET
14002 EOF
14003 cat >> confdefs.h <<\EOF
14004 #define EXTERNAL_WIDGET 1
14005 EOF
14006 }
14007
14008 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14009     Defining NO_DOC_FILE
14010 EOF
14011 cat >> confdefs.h <<\EOF
14012 #define NO_DOC_FILE 1
14013 EOF
14014 }
14015
14016 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14017     Defining PURIFY
14018 EOF
14019 cat >> confdefs.h <<\EOF
14020 #define PURIFY 1
14021 EOF
14022 }
14023
14024 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14025     Defining QUANTIFY
14026 EOF
14027 cat >> confdefs.h <<\EOF
14028 #define QUANTIFY 1
14029 EOF
14030 }
14031
14032 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14033     Defining MAIL_USE_POP
14034 EOF
14035 cat >> confdefs.h <<\EOF
14036 #define MAIL_USE_POP 1
14037 EOF
14038 }
14039
14040 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14041     Defining KERBEROS
14042 EOF
14043 cat >> confdefs.h <<\EOF
14044 #define KERBEROS 1
14045 EOF
14046 }
14047
14048 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14049     Defining HESIOD
14050 EOF
14051 cat >> confdefs.h <<\EOF
14052 #define HESIOD 1
14053 EOF
14054 }
14055
14056 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14057     Defining USE_UNION_TYPE
14058 EOF
14059 cat >> confdefs.h <<\EOF
14060 #define USE_UNION_TYPE 1
14061 EOF
14062 }
14063
14064 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14065     Defining PDUMP
14066 EOF
14067 cat >> confdefs.h <<\EOF
14068 #define PDUMP 1
14069 EOF
14070 }
14071
14072
14073
14074 (
14075 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14076 else
14077   echo "uname -a: `uname -a`"
14078 fi
14079 echo ""
14080 echo "$0 $quoted_arguments"
14081 ) > Installation
14082
14083 if test ! -z ${emacs_beta_version} ; then
14084   if test -z "${emacs_is_beta}" ; then
14085         xemacs_betaname=".${emacs_beta_version}"
14086   else
14087         xemacs_betaname="-b${emacs_beta_version}"
14088   fi
14089 else
14090   xemacs_betaname=""
14091 fi
14092
14093 (
14094 echo "
14095
14096 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
14097
14098   Where should the build process find the source code?    $srcdir
14099   What installation prefix should install use?            $prefix
14100   What operating system and machine description files should XEmacs use?
14101         \`$opsysfile' and \`$machfile'
14102   What compiler should XEmacs be built with?              $CC $CFLAGS
14103   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
14104   Should XEmacs use the relocating allocator for buffers? $rel_alloc
14105   What window system should XEmacs use?                   ${window_system}"
14106 if test "$with_x11" = "yes"; then
14107   echo "  Where do we find X Windows header files?                $x_includes"
14108   echo "  Where do we find X Windows libraries?                   $x_libraries"
14109 fi
14110 if test -n "$site_includes"; then
14111   echo "  Additional header files:                                $site_includes"
14112 fi
14113 if test -n "$site_libraries"; then
14114   echo "  Additional libraries:                                   $site_libraries"
14115 fi
14116 if test -n "$site_prefixes"; then
14117   echo "  Additional prefixes:                                    $site_prefixes"
14118 fi
14119 if test -n "$runpath"; then
14120   echo "  Runtime library search path:                            $runpath"
14121 fi
14122 if test "$have_xaw" = "yes"; then
14123   echo "  Athena library to link:                                 $athena_lib"
14124   echo "  Athena header include path:                             $athena_h_path"
14125 fi
14126 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
14127 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
14128 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
14129 if test "$with_xmu" != yes -a "$with_x11" = yes; then
14130   echo "  No Xmu; substituting equivalent routines."
14131 fi
14132
14133 if test "$with_xpm" = yes; then
14134   echo "  Compiling in support for XPM images."
14135 elif test "$with_x11" = yes; then
14136   echo "  --------------------------------------------------------------------"
14137   echo "  WARNING: Compiling without XPM support."
14138   if test "$xpm_problem" != ""; then
14139     echo "  Reason: $xpm_problem"
14140   fi
14141   echo "  WARNING: You should strongly consider installing XPM."
14142   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
14143   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14144   echo "  --------------------------------------------------------------------"
14145 fi
14146 if test "$with_png" = yes; then
14147   echo "  Compiling in support for PNG image handling."
14148 elif test "$window_system" != "none"; then
14149   echo "  --------------------------------------------------------------------"
14150   echo "  WARNING: Compiling without PNG image support."
14151   if test "$png_problem" != ""; then
14152     echo "  Reason: $png_problem"
14153   fi
14154   echo "  WARNING: You should strongly consider installing the PNG libraries."
14155   echo "  WARNING: Otherwise certain images and glyphs may not display."
14156   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14157   echo "  --------------------------------------------------------------------"
14158 fi
14159 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
14160 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
14161 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
14162 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
14163
14164 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
14165 test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
14166 test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
14167 test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
14168
14169 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
14170 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
14171 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
14172
14173 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
14174
14175 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
14176 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
14177
14178 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
14179 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
14180 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
14181 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
14182 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
14183 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
14184 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
14185 if test "$with_wnn" = yes; then
14186   echo "  Compiling in support for the WNN input method on Mule."
14187   test "$with_wnn6" = yes && echo "    Using WNN version 6."
14188 fi
14189 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
14190
14191 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
14192 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
14193 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
14194 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
14195 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
14196 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
14197 case "$with_menubars" in
14198   lucid ) echo "  Using Lucid menubars." ;;
14199   motif ) echo "  Using Motif menubars."
14200           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
14201           echo "             We recommend using the Lucid menubar instead."
14202           echo "             Re-run configure with --with-menubars='lucid'." ;;
14203   msw ) echo "  Using MS-Windows menubars." ;;
14204 esac
14205 case "$with_scrollbars" in
14206   lucid    ) echo "  Using Lucid scrollbars."     ;;
14207   motif    ) echo "  Using Motif scrollbars."     ;;
14208   athena   ) echo "  Using Athena scrollbars."    ;;
14209   msw ) echo "  Using MS-Windows scrollbars." ;;
14210 esac
14211 case "$with_widgets" in
14212   motif    ) echo "  Using Motif native widgets."     ;;
14213   athena   ) echo "  Using Athena native widgets."    ;;
14214   msw ) echo "  Using MS-Windows native widgets." ;;
14215 esac
14216 case "$with_dialogs" in
14217   motif    )
14218     echo "  Using Motif dialog boxes."
14219     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
14220       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
14221       echo "             We recommend using the Athena dialog boxes instead."
14222       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
14223       echo "             Read the PROBLEMS file for more information."
14224     fi; fi
14225     ;;
14226   athena   ) echo "  Using Athena dialog boxes."    ;;
14227   msw ) echo "  Using MS-Windows dialog boxes." ;;
14228 esac
14229 test "$with_modules" = "yes" && echo "  Compiling in dynamic shared object module support."
14230 test "$with_clash_detection" = yes && \
14231   echo "  Clash detection will use \"$lockdir\" for locking files."
14232 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
14233 test "$with_pop"        = yes && echo "  Using POP for mail access."
14234 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
14235 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
14236 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
14237 test "$pdump"           = yes && echo "  Using the new portable dumper (wishful thinking)."
14238 test "$debug"           = yes && echo "  Compiling in extra code for debugging."
14239 test "$usage_tracking"  = yes && echo "  Compiling with usage tracking active (Sun internal)."
14240 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
14241   != "no no no no no"; then
14242   echo "  WARNING: ---------------------------------------------------------"
14243   echo "  WARNING: Compiling in support for runtime error checking."
14244   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
14245   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
14246   echo "  WARNING: ---------------------------------------------------------"
14247 fi
14248 echo ""
14249 ) | tee -a Installation
14250 echo ""
14251
14252
14253 # Remove any trailing slashes in these variables.
14254 test -n "$prefix" &&
14255   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14256 test -n "$exec_prefix" &&
14257   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14258
14259
14260 for file in $internal_makefile_list; do
14261   test "$file" = src/Makefile.in && \
14262     file="src/Makefile.in:src/Makefile.in.in:src/depend"
14263   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
14264 done
14265 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
14266 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
14267
14268 trap '' 1 2 15
14269
14270 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14271
14272 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14273 # Let make expand exec_prefix.
14274 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14275
14276 # Any assignment to VPATH causes Sun make to only execute
14277 # the first set of double-colon rules, so remove it if not needed.
14278 # If there is a colon in the path, we need to keep it.
14279 if test "x$srcdir" = x.; then
14280   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14281 fi
14282
14283 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14284
14285 DEFS=-DHAVE_CONFIG_H
14286
14287 # Without the "./", some shells look in PATH for config.status.
14288 : ${CONFIG_STATUS=./config.status}
14289
14290 echo creating $CONFIG_STATUS
14291 rm -f $CONFIG_STATUS
14292 cat > $CONFIG_STATUS <<EOF
14293 #! /bin/sh
14294 # Generated automatically by configure.
14295 # Run this file to recreate the current configuration.
14296 # This directory was configured as follows,
14297 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14298 #
14299 # $0 $ac_configure_args
14300 #
14301 # Compiler output produced by configure, useful for debugging
14302 # configure, is in ./config.log if it exists.
14303
14304 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14305 for ac_option
14306 do
14307   case "\$ac_option" in
14308   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14309     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14310     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14311   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14312     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14313     exit 0 ;;
14314   -help | --help | --hel | --he | --h)
14315     echo "\$ac_cs_usage"; exit 0 ;;
14316   *) echo "\$ac_cs_usage"; exit 1 ;;
14317   esac
14318 done
14319
14320 ac_given_srcdir=$srcdir
14321 ac_given_INSTALL="$INSTALL"
14322
14323 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14324 EOF
14325 cat >> $CONFIG_STATUS <<EOF
14326
14327 # Protect against being on the right side of a sed subst in config.status.
14328 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14329  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14330 $ac_vpsub
14331 $extrasub
14332 s%@SHELL@%$SHELL%g
14333 s%@CFLAGS@%$CFLAGS%g
14334 s%@CPPFLAGS@%$CPPFLAGS%g
14335 s%@CXXFLAGS@%$CXXFLAGS%g
14336 s%@FFLAGS@%$FFLAGS%g
14337 s%@DEFS@%$DEFS%g
14338 s%@LDFLAGS@%$LDFLAGS%g
14339 s%@LIBS@%$LIBS%g
14340 s%@exec_prefix@%$exec_prefix%g
14341 s%@prefix@%$prefix%g
14342 s%@program_transform_name@%$program_transform_name%g
14343 s%@bindir@%$bindir%g
14344 s%@sbindir@%$sbindir%g
14345 s%@libexecdir@%$libexecdir%g
14346 s%@datadir@%$datadir%g
14347 s%@sysconfdir@%$sysconfdir%g
14348 s%@sharedstatedir@%$sharedstatedir%g
14349 s%@localstatedir@%$localstatedir%g
14350 s%@libdir@%$libdir%g
14351 s%@includedir@%$includedir%g
14352 s%@oldincludedir@%$oldincludedir%g
14353 s%@infodir@%$infodir%g
14354 s%@mandir@%$mandir%g
14355 s%@LN_S@%$LN_S%g
14356 s%@blddir@%$blddir%g
14357 s%@CC@%$CC%g
14358 s%@CPP@%$CPP%g
14359 s%@start_flags@%$start_flags%g
14360 s%@ld_switch_shared@%$ld_switch_shared%g
14361 s%@start_files@%$start_files%g
14362 s%@ld@%$ld%g
14363 s%@lib_gcc@%$lib_gcc%g
14364 s%@RANLIB@%$RANLIB%g
14365 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14366 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14367 s%@INSTALL_DATA@%$INSTALL_DATA%g
14368 s%@YACC@%$YACC%g
14369 s%@SET_MAKE@%$SET_MAKE%g
14370 s%@X_CFLAGS@%$X_CFLAGS%g
14371 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14372 s%@X_LIBS@%$X_LIBS%g
14373 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14374 s%@install_pp@%$install_pp%g
14375 s%@libs_xauth@%$libs_xauth%g
14376 s%@dnd_objs@%$dnd_objs%g
14377 s%@lwlib_objs@%$lwlib_objs%g
14378 s%@ALLOCA@%$ALLOCA%g
14379 s%@have_esd_config@%$have_esd_config%g
14380 s%@dll_ld@%$dll_ld%g
14381 s%@dll_cflags@%$dll_cflags%g
14382 s%@dll_ldflags@%$dll_ldflags%g
14383 s%@dll_post@%$dll_post%g
14384 s%@dll_ldo@%$dll_ldo%g
14385 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14386 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14387 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14388 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14389 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14390 s%@PROGNAME@%$PROGNAME%g
14391 s%@version@%$version%g
14392 s%@configuration@%$configuration%g
14393 s%@canonical@%$canonical%g
14394 s%@inststaticdir@%$inststaticdir%g
14395 s%@instvardir@%$instvardir%g
14396 s%@srcdir@%$srcdir%g
14397 s%@pkgdir@%$pkgdir%g
14398 s%@statedir@%$statedir%g
14399 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14400 s%@PREFIX@%$PREFIX%g
14401 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14402 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14403 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14404 s%@INFODIR@%$INFODIR%g
14405 s%@infopath@%$infopath%g
14406 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14407 s%@INFOPATH@%$INFOPATH%g
14408 s%@package_path@%$package_path%g
14409 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14410 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14411 s%@lispdir@%$lispdir%g
14412 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14413 s%@LISPDIR@%$LISPDIR%g
14414 s%@moduledir@%$moduledir%g
14415 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14416 s%@MODULEDIR@%$MODULEDIR%g
14417 s%@sitelispdir@%$sitelispdir%g
14418 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14419 s%@SITELISPDIR@%$SITELISPDIR%g
14420 s%@sitemoduledir@%$sitemoduledir%g
14421 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14422 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14423 s%@etcdir@%$etcdir%g
14424 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14425 s%@ETCDIR@%$ETCDIR%g
14426 s%@lockdir@%$lockdir%g
14427 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
14428 s%@LOCKDIR@%$LOCKDIR%g
14429 s%@docdir@%$docdir%g
14430 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14431 s%@DOCDIR@%$DOCDIR%g
14432 s%@archlibdir@%$archlibdir%g
14433 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14434 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14435 s%@bitmapdir@%$bitmapdir%g
14436 s%@extra_objs@%$extra_objs%g
14437 s%@machfile@%$machfile%g
14438 s%@opsysfile@%$opsysfile%g
14439 s%@c_switch_general@%$c_switch_general%g
14440 s%@c_switch_window_system@%$c_switch_window_system%g
14441 s%@c_switch_all@%$c_switch_all%g
14442 s%@ld_switch_general@%$ld_switch_general%g
14443 s%@ld_switch_window_system@%$ld_switch_window_system%g
14444 s%@ld_switch_all@%$ld_switch_all%g
14445 s%@ld_libs_general@%$ld_libs_general%g
14446 s%@ld_libs_window_system@%$ld_libs_window_system%g
14447 s%@ld_libs_all@%$ld_libs_all%g
14448 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14449 s%@native_sound_lib@%$native_sound_lib%g
14450 s%@sound_cflags@%$sound_cflags%g
14451 s%@dynodump_arch@%$dynodump_arch%g
14452 s%@XEMACS_CC@%$XEMACS_CC%g
14453 s%@internal_makefile_list@%$internal_makefile_list%g
14454
14455 CEOF
14456 EOF
14457
14458 cat >> $CONFIG_STATUS <<\EOF
14459
14460 # Split the substitutions into bite-sized pieces for seds with
14461 # small command number limits, like on Digital OSF/1 and HP-UX.
14462 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14463 ac_file=1 # Number of current file.
14464 ac_beg=1 # First line for current file.
14465 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14466 ac_more_lines=:
14467 ac_sed_cmds=""
14468 while $ac_more_lines; do
14469   if test $ac_beg -gt 1; then
14470     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14471   else
14472     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14473   fi
14474   if test ! -s conftest.s$ac_file; then
14475     ac_more_lines=false
14476     rm -f conftest.s$ac_file
14477   else
14478     if test -z "$ac_sed_cmds"; then
14479       ac_sed_cmds="sed -f conftest.s$ac_file"
14480     else
14481       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14482     fi
14483     ac_file=`expr $ac_file + 1`
14484     ac_beg=$ac_end
14485     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14486   fi
14487 done
14488 if test -z "$ac_sed_cmds"; then
14489   ac_sed_cmds=cat
14490 fi
14491 EOF
14492
14493 cat >> $CONFIG_STATUS <<EOF
14494
14495 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14496 EOF
14497 cat >> $CONFIG_STATUS <<\EOF
14498 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14499   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14500   case "$ac_file" in
14501   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14502        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14503   *) ac_file_in="${ac_file}.in" ;;
14504   esac
14505
14506   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14507
14508   # Remove last slash and all that follows it.  Not all systems have dirname.
14509   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14510   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14511     # The file is in a subdirectory.
14512     test ! -d "$ac_dir" && mkdir "$ac_dir"
14513     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14514     # A "../" for each directory in $ac_dir_suffix.
14515     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14516   else
14517     ac_dir_suffix= ac_dots=
14518   fi
14519
14520   case "$ac_given_srcdir" in
14521   .)  srcdir=.
14522       if test -z "$ac_dots"; then top_srcdir=.
14523       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14524   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14525   *) # Relative path.
14526     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14527     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14528   esac
14529
14530   case "$ac_given_INSTALL" in
14531   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14532   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14533   esac
14534
14535   echo creating "$ac_file"
14536   rm -f "$ac_file"
14537   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14538   case "$ac_file" in
14539   *Makefile*) ac_comsub="1i\\
14540 # $configure_input" ;;
14541   *) ac_comsub= ;;
14542   esac
14543
14544   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14545   sed -e "$ac_comsub
14546 s%@configure_input@%$configure_input%g
14547 s%@srcdir@%$srcdir%g
14548 s%@top_srcdir@%$top_srcdir%g
14549 s%@INSTALL@%$INSTALL%g
14550 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14551 fi; done
14552 rm -f conftest.s*
14553
14554 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14555 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14556 #
14557 # ac_d sets the value in "#define NAME VALUE" lines.
14558 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14559 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14560 ac_dC='\3'
14561 ac_dD='%g'
14562 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14563 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14564 ac_uB='\([      ]\)%\1#\2define\3'
14565 ac_uC=' '
14566 ac_uD='\4%g'
14567 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14568 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14569 ac_eB='$%\1#\2define\3'
14570 ac_eC=' '
14571 ac_eD='%g'
14572
14573 if test "${CONFIG_HEADERS+set}" != set; then
14574 EOF
14575 cat >> $CONFIG_STATUS <<EOF
14576   CONFIG_HEADERS="src/config.h lwlib/config.h"
14577 EOF
14578 cat >> $CONFIG_STATUS <<\EOF
14579 fi
14580 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14581   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14582   case "$ac_file" in
14583   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14584        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14585   *) ac_file_in="${ac_file}.in" ;;
14586   esac
14587
14588   echo creating $ac_file
14589
14590   rm -f conftest.frag conftest.in conftest.out
14591   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14592   cat $ac_file_inputs > conftest.in
14593
14594 EOF
14595
14596 # Transform confdefs.h into a sed script conftest.vals that substitutes
14597 # the proper values into config.h.in to produce config.h.  And first:
14598 # Protect against being on the right side of a sed subst in config.status.
14599 # Protect against being in an unquoted here document in config.status.
14600 rm -f conftest.vals
14601 cat > conftest.hdr <<\EOF
14602 s/[\\&%]/\\&/g
14603 s%[\\$`]%\\&%g
14604 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14605 s%ac_d%ac_u%gp
14606 s%ac_u%ac_e%gp
14607 EOF
14608 sed -n -f conftest.hdr confdefs.h > conftest.vals
14609 rm -f conftest.hdr
14610
14611 # This sed command replaces #undef with comments.  This is necessary, for
14612 # example, in the case of _POSIX_SOURCE, which is predefined and required
14613 # on some systems where configure will not decide to define it.
14614 cat >> conftest.vals <<\EOF
14615 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14616 EOF
14617
14618 # Break up conftest.vals because some shells have a limit on
14619 # the size of here documents, and old seds have small limits too.
14620
14621 rm -f conftest.tail
14622 while :
14623 do
14624   ac_lines=`grep -c . conftest.vals`
14625   # grep -c gives empty output for an empty file on some AIX systems.
14626   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14627   # Write a limited-size here document to conftest.frag.
14628   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14629   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14630   echo 'CEOF
14631   sed -f conftest.frag conftest.in > conftest.out
14632   rm -f conftest.in
14633   mv conftest.out conftest.in
14634 ' >> $CONFIG_STATUS
14635   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14636   rm -f conftest.vals
14637   mv conftest.tail conftest.vals
14638 done
14639 rm -f conftest.vals
14640
14641 cat >> $CONFIG_STATUS <<\EOF
14642   rm -f conftest.frag conftest.h
14643   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14644   cat conftest.in >> conftest.h
14645   rm -f conftest.in
14646   if cmp -s $ac_file conftest.h 2>/dev/null; then
14647     echo "$ac_file is unchanged"
14648     rm -f conftest.h
14649   else
14650     # Remove last slash and all that follows it.  Not all systems have dirname.
14651       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14652       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14653       # The file is in a subdirectory.
14654       test ! -d "$ac_dir" && mkdir "$ac_dir"
14655     fi
14656     rm -f $ac_file
14657     mv conftest.h $ac_file
14658   fi
14659 fi; done
14660
14661 EOF
14662 cat >> $CONFIG_STATUS <<EOF
14663 CPP="$CPP"
14664  top_srcdir="$srcdir"
14665  MAKE_SUBDIR="$MAKE_SUBDIR"
14666
14667 EOF
14668 cat >> $CONFIG_STATUS <<\EOF
14669 for dir in . $MAKE_SUBDIR; do
14670   (
14671     cd $dir
14672     rm -f junk.c
14673     < Makefile.in \
14674       sed -e '/^# Generated/d' \
14675           -e 's%/\*\*/#.*%%' \
14676           -e 's/^ *# */#/' \
14677           -e '/^##/d' \
14678           -e '/^#/ {
14679 p
14680 d
14681 }'        \
14682           -e '/./ {
14683 s/\([\"]\)/\\\1/g
14684 s/^/"/
14685 s/$/"/
14686 }'  > junk.c;
14687
14688
14689
14690     echo creating $dir/Makefile
14691 $CPP -I. -I${top_srcdir}/src  junk.c \
14692   | sed -e 's/^\#.*//'          \
14693         -e 's/^[        ][      ]*$//'\
14694         -e 's/^ /       /'              \
14695   | sed -n -e '/^..*$/p'        \
14696   | sed '/^\"/ {
14697         s/\\\([\"]\)/\1/g
14698         s/^[    ]*\"//
14699         s/\"[   ]*$//
14700 }' > Makefile.new
14701     chmod 444 Makefile.new
14702     mv -f Makefile.new Makefile
14703
14704     echo creating $dir/GNUmakefile
14705 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
14706   | sed -e 's/^\#.*//'          \
14707         -e 's/^[        ][      ]*$//'\
14708         -e 's/^ /       /'              \
14709   | sed -n -e '/^..*$/p'        \
14710   | sed '/^\"/ {
14711         s/\\\([\"]\)/\1/g
14712         s/^[    ]*\"//
14713         s/\"[   ]*$//
14714 }' > Makefile.new
14715     chmod 444 Makefile.new
14716     mv -f Makefile.new GNUmakefile
14717
14718     rm -f junk.c
14719   )
14720 done
14721
14722 sed < config.status >> lib-src/config.values \
14723   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
14724   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
14725   -e 's/^\([^ ]*\) $/\1 ""/' \
14726   -e 's/ 1$/ t/'
14727
14728
14729 exit 0
14730 EOF
14731 chmod +x $CONFIG_STATUS
14732 rm -fr confdefs* $ac_clean_files
14733 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1