Sync with r21-2-28.
[chise/xemacs-chise.git-] / 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_utf_2000   | \
346         with_text_coding| \
347         with_file_coding| \
348         with_canna      | \
349         with_wnn        | \
350         with_wnn6       | \
351         with_workshop   | \
352         with_sparcworks | \
353         with_tooltalk   | \
354         with_ldap       | \
355         with_pop        | \
356         with_kerberos   | \
357         with_hesiod     | \
358         with_dnet       | \
359         with_infodock   | \
360         external_widget | \
361         verbose         | \
362         extra_verbose   | \
363         const_is_losing | \
364         usage_tracking  | \
365         use_union_type  | \
366         pdump           | \
367         debug           | \
368         use_assertions  | \
369         memory_usage_stats | \
370         with_clash_detection | \
371         with_modules | \
372         no_doc_file )
373                   case "$val" in
374             y | ye | yes )      val=yes ;;
375             n | no )            val=no  ;;
376             * ) (echo "$progname: Usage error:"
377 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
378 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
379           esac
380           eval "$opt=\"$val\"" ;;
381
382
383                         srcdir          | \
384         compiler        | \
385         cflags          | \
386         cpp             | \
387         cppflags        | \
388         libs            | \
389         ldflags         | \
390         cache_file      | \
391         native_sound_lib| \
392         site_lisp       | \
393         x_includes      | \
394         x_libraries     | \
395         site_includes   | \
396         site_libraries  | \
397         site_prefixes   | \
398         site_runtime_libraries )
399                   if test "$valomitted" = "yes" ; then
400                     if test "$#" = 0 ; then
401               (echo "$progname: Usage error:"
402 echo " " "The \`--$optname' option requires a value."
403 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
404             fi
405             val="$1"; shift
406           fi
407           eval "$opt=\"$val\""
408         ;;
409
410                 rel_alloc | \
411         with_dlmalloc | \
412         with_debug_malloc  | use_debug_malloc | \
413         with_system_malloc | use_system_malloc )
414           case "$val" in
415             y | ye | yes )      val=yes ;;
416             n | no )            val=no  ;;
417             d | de | def | defa | defau | defaul | default ) val=default ;;
418             * ) (echo "$progname: Usage error:"
419 echo " " "The \`--$optname' option requires one of these values:
420   \`yes', \`no', or \`default'."
421 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
422           esac
423           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
424           eval "$opt=\"$val\""
425         ;;
426
427                 "with_database" )
428           with_database_berkdb=no
429           with_database_dbm=no
430           with_database_gdbm=no
431           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
432             case "$x" in
433               no ) ;;
434               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
435               d | db | dbm )                               with_database_dbm=yes    ;;
436               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
437               * ) (echo "$progname: Usage error:"
438 echo " " "The \`--$optname' option value
439   must be either \`no' or a comma-separated list
440   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
441 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
442             esac
443           done
444           if test "$with_database_dbm"  = "yes" -a \
445                   "$with_database_gdbm" = "yes"; then
446           (echo "$progname: Usage error:"
447 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
448   with the \`--$optname' option."
449 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
450           fi
451         ;;
452
453                 "with_sound" )
454                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
455             case "$x" in
456                       n | no | non | none ) new_sdefault=no ;;
457               a | al | all | both ) new_sdefault=yes ;;
458
459               native )       with_native_sound=yes ;;
460               nonative )     with_native_sound=no ;;
461
462               nas )          with_nas_sound=yes ;;
463               nonas )        with_nas_sound=no ;;
464
465               esd )          with_esd_sound=yes ;;
466               noesd )        with_esd_sound=no ;;
467
468               * ) bogus_sound=yes ;;
469             esac
470             if test "$bogus_sound" -o \
471                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
472                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
473                 (echo "$progname: Usage error:"
474 echo " " "Valid types for the \`--$optname' option are:
475   $types.
476 The default is to autodetect all sound support."
477 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
478             elif test -n "$new_sdefault" ; then
479                 with_native_sound=$new_sdefault
480                 with_nas_sound=$new_sdefault
481                 with_esd_sound=$new_sdefault
482                 new_sdefault=   # reset this
483             fi
484             sound_notfirst=true
485           done
486         ;;
487
488                         "with_athena" )
489           case "$val" in
490             xa | xaw )                    val=xaw    ;;
491             3 | 3d | xaw3d )              val=3d     ;;
492                         ne | nex | next | naxtaw)     val=next   ;;
493                         9 | 95 | xaw95 )              val=95     ;;
494             xp | xpm | xawxpm )           val=xpm    ;;
495             * ) (echo "$progname: Usage error:"
496 echo " " "The \`--$optname' option must have one of these values:
497   \`xaw', \`3d', \`next', \`95', or \`xpm'."
498 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
499           esac
500           eval "$opt=\"$val\""
501         ;;
502
503                 "with_xim" )
504           case "$val" in
505             y | ye | yes )                val=yes   ;;
506             n | no | non | none )         val=no    ;;
507             x | xl | xli | xlib )         val=xlib  ;;
508             m | mo | mot | moti | motif ) val=motif ;;
509             * ) (echo "$progname: Usage error:"
510 echo " " "The \`--$optname' option must have one of these values:
511   \`motif', \`xlib', \`yes', or \`no'."
512 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
513           esac
514           eval "$opt=\"$val\""
515         ;;
516
517                 "mail_locking" )
518           case "$val" in
519             lockf )     val=lockf ;;
520             flock )     val=flock ;;
521             file | dot ) val=file  ;;
522             locking )   val=locking  ;;
523             * ) (echo "$progname: Usage error:"
524 echo " " "The \`--$optname' option must have one of these values:
525   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
526 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
527           esac
528           eval "$opt=\"$val\""
529         ;;
530
531                 "error_checking" )
532                           
533           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
534             case "$x" in
535                       n | no | non | none ) new_default=no ;;
536               a | al | all )        new_default=yes ;;
537
538               extents )       error_check_extents=yes ;;
539               noextents )     error_check_extents=no ;;
540
541               typecheck )     error_check_typecheck=yes ;;
542               notypecheck )   error_check_typecheck=no ;;
543
544               bufpos )        error_check_bufpos=yes ;;
545               nobufpos )      error_check_bufpos=no ;;
546
547               gc )            error_check_gc=yes ;;
548               nogc )          error_check_gc=no ;;
549
550               malloc )        error_check_malloc=yes ;;
551               nomalloc )      error_check_malloc=no ;;
552
553               byte_code )     error_check_byte_code=yes ;;
554               nobyte_code )   error_check_byte_code=no ;;
555
556               * ) bogus_error_check=yes ;;
557             esac
558             if test "$bogus_error_check" -o \
559                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
560                 if test "$error_check_default" = yes ; then
561                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
562                 else
563                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
564                 fi
565                 (echo "$progname: Usage error:"
566 echo " " "Valid types for the \`--$optname' option are:
567   $types."
568 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
569             elif test -n "$new_default" ; then
570                 error_check_extents=$new_default
571                 error_check_typecheck=$new_default
572                 error_check_bufpos=$new_default
573                 error_check_gc=$new_default
574                 error_check_malloc=$new_default
575                 error_check_byte_code=$new_default
576                 new_default=    # reset this
577             fi
578             echeck_notfirst=true
579           done
580         ;;
581
582                                 
583                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
584         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
585         archlibdir | docdir | package_path )
586                    if test "$valomitted" = "yes"; then
587              if test "$#" = 0; then
588                  (echo "$progname: Usage error:"
589 echo " " "The \`--$optname' option requires a value."
590 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
591              fi
592              val="$1"; shift
593            fi
594            eval "$opt=\"$val\""
595
596                            case "$opt" in
597                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
598     Defining EXEC_PREFIX_USER_DEFINED
599 EOF
600 cat >> confdefs.h <<\EOF
601 #define EXEC_PREFIX_USER_DEFINED 1
602 EOF
603 }
604  ;;
605              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
606     Defining LISPDIR_USER_DEFINED
607 EOF
608 cat >> confdefs.h <<\EOF
609 #define LISPDIR_USER_DEFINED 1
610 EOF
611 }
612  ;;
613              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
614     Defining SITELISPDIR_USER_DEFINED
615 EOF
616 cat >> confdefs.h <<\EOF
617 #define SITELISPDIR_USER_DEFINED 1
618 EOF
619 }
620  ;;
621              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
622     Defining MODULEDIR_USER_DEFINED
623 EOF
624 cat >> confdefs.h <<\EOF
625 #define MODULEDIR_USER_DEFINED 1
626 EOF
627 }
628  ;;
629              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
630     Defining ETCDIR_USER_DEFINED
631 EOF
632 cat >> confdefs.h <<\EOF
633 #define ETCDIR_USER_DEFINED 1
634 EOF
635 }
636  ;;
637              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
638     Defining INFODIR_USER_DEFINED
639 EOF
640 cat >> confdefs.h <<\EOF
641 #define INFODIR_USER_DEFINED 1
642 EOF
643 }
644  ;;
645              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
646     Defining INFOPATH_USER_DEFINED
647 EOF
648 cat >> confdefs.h <<\EOF
649 #define INFOPATH_USER_DEFINED 1
650 EOF
651 }
652  ;;
653              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
654     Defining PACKAGE_PATH_USER_DEFINED
655 EOF
656 cat >> confdefs.h <<\EOF
657 #define PACKAGE_PATH_USER_DEFINED 1
658 EOF
659 }
660  ;;
661              datadir )
662                 { test "$extra_verbose" = "yes" && cat << \EOF
663     Defining INFODIR_USER_DEFINED
664 EOF
665 cat >> confdefs.h <<\EOF
666 #define INFODIR_USER_DEFINED 1
667 EOF
668 }
669
670                 { test "$extra_verbose" = "yes" && cat << \EOF
671     Defining LISPDIR_USER_DEFINED
672 EOF
673 cat >> confdefs.h <<\EOF
674 #define LISPDIR_USER_DEFINED 1
675 EOF
676 }
677
678             { test "$extra_verbose" = "yes" && cat << \EOF
679     Defining MODULEDIR_USER_DEFINED
680 EOF
681 cat >> confdefs.h <<\EOF
682 #define MODULEDIR_USER_DEFINED 1
683 EOF
684 }
685
686                 { test "$extra_verbose" = "yes" && cat << \EOF
687     Defining ETCDIR_USER_DEFINED
688 EOF
689 cat >> confdefs.h <<\EOF
690 #define ETCDIR_USER_DEFINED 1
691 EOF
692 }
693  ;;
694              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
695     Defining LOCKDIR_USER_DEFINED
696 EOF
697 cat >> confdefs.h <<\EOF
698 #define LOCKDIR_USER_DEFINED 1
699 EOF
700 }
701  ;;
702              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
703     Defining DOCDIR_USER_DEFINED
704 EOF
705 cat >> confdefs.h <<\EOF
706 #define DOCDIR_USER_DEFINED 1
707 EOF
708 }
709  ;;
710              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
711     Defining ARCHLIBDIR_USER_DEFINED
712 EOF
713 cat >> confdefs.h <<\EOF
714 #define ARCHLIBDIR_USER_DEFINED 1
715 EOF
716 }
717  ;;
718            esac
719         ;;
720
721                 "no_create" ) ;;
722
723                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
724
725                 "with_menubars"   | \
726         "with_scrollbars" | \
727         "with_dialogs" | \
728         "with_widgets" )
729           case "$val" in
730             l | lu | luc | luci | lucid )               val=lucid  ;;
731             m | mo | mot | moti | motif )               val=motif  ;;
732             a | at | ath | athe | athen | athena )      val=athena ;;
733             n | no | non | none )                       val=no ;;
734             * ) (echo "$progname: Usage error:"
735 echo " " "The \`--$optname' option must have one of these values:
736   \`lucid', \`motif', \`athena', or \`no'."
737 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
738           esac
739           eval "$opt=\"$val\""
740         ;;
741
742                 "use_minimal_tagbits" | \
743         "use_indexed_lrecord_implementation" | \
744         "run_in_place"  | \
745         "with_gnu_make" )
746           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
747         ;;
748
749                 * ) (echo "$progname: Usage error:"
750 echo " " "Unrecognized option: $arg"
751 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
752
753       esac
754     ;;
755
756         *-*-*) configuration="$arg" ;;
757
758         *) (echo "$progname: Usage error:"
759 echo " " "Unrecognized argument: $arg"
760 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
761
762   esac
763 done
764
765
766 test -n "$cpp"      && CPP="$cpp"
767 test -n "$cppflags" && CPPFLAGS="$cppflags"
768 test -n "$libs"     && LIBS="$libs"
769 test -n "$ldflags"  && LDFLAGS="$ldflags"
770
771 eval set x "$quoted_arguments"; shift
772
773 test "$extra_verbose" = "yes" && verbose=yes
774
775 test -n "$with_x" && with_x11="$with_x"
776
777 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
778   test "$with_system_malloc" = "default" && with_system_malloc=yes
779 fi
780
781
782
783 if test "$with_cde $with_tooltalk" = "yes no"; then
784   (echo "$progname: Usage error:"
785 echo " " "--with-cde requires --with-tooltalk"
786 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
787 elif test "$with_tooltalk" = "no" ; then with_cde=no
788 elif test "$with_cde" = "yes"; then with_tooltalk=yes
789 fi
790
791
792 case "$srcdir" in
793
794     "" )
795     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
796       if test -f "$dir/src/lisp.h" -a \
797               -f "$dir/lisp/version.el" ; then
798         srcdir="$dir"
799         break
800       fi
801     done
802     if test -z "$srcdir" ; then
803       (echo "$progname: Usage error:"
804 echo " " "Neither the current directory nor its parent seem to
805   contain the XEmacs sources.  If you do not want to build XEmacs in its
806   source tree, you should run \`$progname' in the directory in which
807   you wish to build XEmacs, using the \`--srcdir' option to say where the
808   sources may be found."
809 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
810     fi
811   ;;
812
813     * )
814     if test ! -f "$srcdir/src/lisp.h" -o \
815             ! -f "$srcdir/lisp/version.el" ; then
816       (echo "$progname: Usage error:"
817 echo " " "The directory specified with the \`--srcdir' option,
818   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
819   either run the \`$progname' script at the top of the XEmacs source
820   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
821 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
822     fi
823   ;;
824 esac
825
826 if test -z "$configuration"; then
827     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
828   if test -z "$configuration"; then
829     (echo "$progname: Usage error:"
830 echo " " "XEmacs has not been ported to this host type.
831 Try explicitly specifying the CONFIGURATION when rerunning configure."
832 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
833   fi
834 fi
835
836 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
837 echo "configure:838: checking whether ln -s works" >&5
838
839 rm -f conftestdata
840 if ln -s X conftestdata 2>/dev/null
841 then
842   rm -f conftestdata
843   ac_cv_prog_LN_S="ln -s"
844 else
845   ac_cv_prog_LN_S=ln
846 fi
847 LN_S="$ac_cv_prog_LN_S"
848 if test "$ac_cv_prog_LN_S" = "ln -s"; then
849   echo "$ac_t""yes" 1>&6
850 else
851   echo "$ac_t""no" 1>&6
852 fi
853
854
855 for dir in lisp etc man info tests; do
856   if test ! -d "$dir" ; then
857     echo Making symbolic link to "$srcdir/$dir"
858     ${LN_S} "$srcdir/$dir" "$dir"
859   fi
860 done
861
862
863 absolute_pwd="`pwd`";
864 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
865 then blddir="$PWD"
866 else blddir="$absolute_pwd"; if test -d "/net"; then
867   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
868   blddir=`echo "$blddir" | \
869    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
870 fi
871 fi
872
873
874 case "$srcdir" in
875   /* ) ;;
876   .  ) srcdir="$blddir" ;;
877   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
878   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
879   srcdir=`echo "$srcdir" | \
880    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
881 fi ;;
882 esac
883
884 if test `pwd` != `sh -c cd $srcdir && pwd`  \
885    && test -f "$srcdir/src/config.h"; then
886   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
887    echo "   as a build directory right now; it has been configured in its own"
888    echo "   right.  To configure in another directory as well, you MUST"
889    echo "   use GNU make.  If you do not have GNU make, then you must"
890    echo "   now do \`make distclean' in $srcdir,"
891    echo "   and then run $progname again.") >&2
892   extrasub='/^VPATH[     ]*=/c\
893 vpath %.c $(srcdir)\
894 vpath %.h $(srcdir)\
895 vpath %.y $(srcdir)\
896 vpath %.l $(srcdir)\
897 vpath %.s $(srcdir)\
898 vpath %.in $(srcdir)'
899 fi
900
901 . "$srcdir/version.sh" || exit 1;
902 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
903 : "${extra_verbose=$beta}"
904 version="${emacs_major_version}.${emacs_minor_version}"
905 { test "$extra_verbose" = "yes" && cat << EOF
906     Defining EMACS_MAJOR_VERSION = $emacs_major_version
907 EOF
908 cat >> confdefs.h <<EOF
909 #define EMACS_MAJOR_VERSION $emacs_major_version
910 EOF
911 }
912
913 { test "$extra_verbose" = "yes" && cat << EOF
914     Defining EMACS_MINOR_VERSION = $emacs_minor_version
915 EOF
916 cat >> confdefs.h <<EOF
917 #define EMACS_MINOR_VERSION $emacs_minor_version
918 EOF
919 }
920
921 if test -n "$emacs_beta_version" ; then
922   if test "$beta" = "yes"; then
923         version="${version}-b${emacs_beta_version}"
924         { test "$extra_verbose" = "yes" && cat << EOF
925     Defining EMACS_BETA_VERSION = $emacs_beta_version
926 EOF
927 cat >> confdefs.h <<EOF
928 #define EMACS_BETA_VERSION $emacs_beta_version
929 EOF
930 }
931
932   else
933         version="${version}.${emacs_beta_version}"
934         { test "$extra_verbose" = "yes" && cat << EOF
935     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
936 EOF
937 cat >> confdefs.h <<EOF
938 #define EMACS_PATCH_LEVEL $emacs_beta_version
939 EOF
940 }
941
942   fi
943 fi
944 { test "$extra_verbose" = "yes" && cat << EOF
945     Defining XEMACS_CODENAME = "$xemacs_codename"
946 EOF
947 cat >> confdefs.h <<EOF
948 #define XEMACS_CODENAME "$xemacs_codename"
949 EOF
950 }
951
952 { test "$extra_verbose" = "yes" && cat << EOF
953     Defining EMACS_VERSION = "$version"
954 EOF
955 cat >> confdefs.h <<EOF
956 #define EMACS_VERSION "$version"
957 EOF
958 }
959
960
961 if test "$with_infodock" = "yes"; then
962   if test ! -f ../../ID-INSTALL; then
963     echo "Cannot build InfoDock without InfoDock sources"
964     with_infodock=no
965   fi
966 fi
967
968 if test "$with_infodock" = "yes"; then
969       { test "$extra_verbose" = "yes" && cat << EOF
970     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
971 EOF
972 cat >> confdefs.h <<EOF
973 #define INFODOCK_MAJOR_VERSION $infodock_major_version
974 EOF
975 }
976
977   { test "$extra_verbose" = "yes" && cat << EOF
978     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
979 EOF
980 cat >> confdefs.h <<EOF
981 #define INFODOCK_MINOR_VERSION $infodock_minor_version
982 EOF
983 }
984
985   { test "$extra_verbose" = "yes" && cat << EOF
986     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
987 EOF
988 cat >> confdefs.h <<EOF
989 #define INFODOCK_BUILD_VERSION $infodock_build_version
990 EOF
991 }
992
993   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
994   PROGNAME=infodock
995   CPPFLAGS="$CPPFLAGS -DINFODOCK"
996 else
997   PROGNAME=xemacs
998 fi
999
1000 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1001 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1002     Defining ERROR_CHECK_EXTENTS
1003 EOF
1004 cat >> confdefs.h <<\EOF
1005 #define ERROR_CHECK_EXTENTS 1
1006 EOF
1007 }
1008
1009 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1010     Defining ERROR_CHECK_TYPECHECK
1011 EOF
1012 cat >> confdefs.h <<\EOF
1013 #define ERROR_CHECK_TYPECHECK 1
1014 EOF
1015 }
1016
1017 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1018     Defining ERROR_CHECK_BUFPOS
1019 EOF
1020 cat >> confdefs.h <<\EOF
1021 #define ERROR_CHECK_BUFPOS 1
1022 EOF
1023 }
1024
1025 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1026     Defining ERROR_CHECK_GC
1027 EOF
1028 cat >> confdefs.h <<\EOF
1029 #define ERROR_CHECK_GC 1
1030 EOF
1031 }
1032
1033 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1034     Defining ERROR_CHECK_MALLOC
1035 EOF
1036 cat >> confdefs.h <<\EOF
1037 #define ERROR_CHECK_MALLOC 1
1038 EOF
1039 }
1040
1041 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1042     Defining ERROR_CHECK_BYTE_CODE
1043 EOF
1044 cat >> confdefs.h <<\EOF
1045 #define ERROR_CHECK_BYTE_CODE 1
1046 EOF
1047 }
1048
1049 if test "${debug:=$beta}" = "yes"; then
1050   use_assertions=yes memory_usage_stats=yes
1051   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1052    echo "    xemacs will be linked with \"debug.o\""
1053  fi
1054   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1055    echo "    xemacs will be linked with \"tests.o\""
1056  fi
1057   { test "$extra_verbose" = "yes" && cat << \EOF
1058     Defining DEBUG_XEMACS
1059 EOF
1060 cat >> confdefs.h <<\EOF
1061 #define DEBUG_XEMACS 1
1062 EOF
1063 }
1064
1065 fi
1066 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1067     Defining USE_ASSERTIONS
1068 EOF
1069 cat >> confdefs.h <<\EOF
1070 #define USE_ASSERTIONS 1
1071 EOF
1072 }
1073
1074 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1075     Defining MEMORY_USAGE_STATS
1076 EOF
1077 cat >> confdefs.h <<\EOF
1078 #define MEMORY_USAGE_STATS 1
1079 EOF
1080 }
1081
1082
1083
1084 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1085 echo "configure:1086: checking "host system type"" >&5
1086 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1087 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1088 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1089 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1090 echo "$ac_t""$configuration" 1>&6
1091
1092
1093
1094
1095
1096 machine='' opsys=''
1097
1098 case "$canonical" in
1099   sparc-*-*        ) machine=sparc ;;
1100   alpha*-*-*       ) machine=alpha ;;
1101   vax-*-*          ) machine=vax ;;
1102   mips-dec-*       ) machine=pmax ;;
1103   mips-sgi-irix6*  ) machine=iris6d ;;
1104   mips-sgi-*       ) machine=iris4d ;;
1105   mips*-linux      ) machine=mips ;;
1106   romp-ibm-*       ) machine=ibmrt ;;
1107   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1108   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1109   powerpc*-*       ) machine=powerpc ;;
1110   hppa-*-*         ) machine=hp800 ;;
1111   m88k-dg-*        ) machine=aviion ;;
1112   m68*-sony-*      ) machine=news ;;
1113   mips-sony-*      ) machine=news-risc ;;
1114   clipper-*        ) machine=clipper ;;
1115   arm-*            ) machine=arm ;;
1116   armv34lb-*   ) machine=arm ;;
1117   ns32k-*          ) machine=ns32000 ;;
1118 esac
1119
1120 case "$canonical" in
1121   *-*-linux*    ) opsys=linux ;;
1122   *-*-netbsd*   ) opsys=netbsd ;;
1123   *-*-openbsd*  ) opsys=openbsd ;;
1124   *-*-nextstep* ) opsys=nextstep ;;
1125   *-*-vms       ) opsys=vms ;;
1126
1127     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1128   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1129   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1130   *-dec-osf3*                ) opsys=decosf3-1 ;;
1131   *-dec-osf4*                ) opsys=decosf4-0 ;;
1132
1133     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1134   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1135   *-*-ultrix* )         opsys=ultrix4-3 ;;
1136
1137     *-*-aix3.1*  ) opsys=aix3-1 ;;
1138   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1139   *-*-aix3*    ) opsys=aix3-2   ;;
1140   *-*-aix4.0*  ) opsys=aix4     ;;
1141   *-*-aix4.1*  ) opsys=aix4-1   ;;
1142   *-*-aix4*    ) opsys=aix4-2   ;;
1143
1144     *-gnu* )                    opsys=gnu    ;;
1145   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1146   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1147   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1148   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1149   *-*-aos*   )                  opsys=bsd4-3 ;;
1150   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1151   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1152   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1153   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1154   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1155   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1156         if test -z "$NON_GNU_CPP" ; then
1157           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1158             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1159           done
1160         fi
1161         opsys=usg5-4-2 ;;
1162     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1163     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1164 esac
1165
1166 case "$canonical" in
1167
1168     *-*-netbsd* )
1169     case "$canonical" in
1170       i[3-9]86-*-netbsd*) machine=intel386 ;;
1171       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1172                                             machine=hp9000s300 ;;
1173       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1174       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1175     esac
1176   ;;
1177
1178     *-*-openbsd* )
1179     case "${canonical}" in
1180       i386-*-openbsd*)          machine=intel386 ;;
1181       m68k-*-openbsd*)          machine=hp9000s300 ;;
1182       mipsel-*-openbsd*)        machine=pmax ;;
1183      esac
1184    ;;
1185
1186     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1187   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1188
1189     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1190   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1191
1192     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1193
1194     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1195
1196     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1197
1198     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1199
1200     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1201
1202     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1203   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1204   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1205
1206   
1207     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1208
1209     *-convex-bsd* | *-convex-convexos* )
1210     machine=convex opsys=bsd4-3
1211     NON_GNU_CPP="cc -E -P"
1212   ;;
1213
1214     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1215
1216     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1217   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1218   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1219   m88k-dg-dgux*                           ) opsys=dgux     ;;
1220
1221     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1222   m88k-motorola-sysv4* )
1223                     machine=delta88k opsys=usg5-4-2
1224   ;;
1225   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1226
1227     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1228   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1229
1230     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1231
1232     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1233   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1234   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1235
1236       m88k-harris-cxux* )
1237         case "`uname -r`" in
1238        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1239        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1240     esac
1241     NON_GNU_CPP="/lib/cpp"
1242   ;;
1243     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1244     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1245
1246     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1247
1248     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1249
1250     *-hp-hpux* )
1251         case "$canonical" in
1252       m68*  ) machine=hp9000s300 ;;
1253       hppa* ) machine=hp800      ;;
1254     esac
1255
1256     case "$canonical" in
1257       *-hp-hpux7*  )  opsys=hpux   ;;
1258       *-hp-hpux8*  )  opsys=hpux8  ;;
1259       *-hp-hpux9*  )  opsys=hpux9  ;;
1260       *-hp-hpux10* )  opsys=hpux10 ;;
1261       *-hp-hpux11* )  opsys=hpux11 ;;
1262       *            )  opsys=hpux   ;;
1263     esac
1264
1265         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1266    echo "    xemacs will be linked with \"strcat.o\""
1267  fi ;; esac
1268
1269     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1270         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1271     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1272
1273     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1274   ;;
1275
1276     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1277   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1278
1279     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1280   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1281   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1282   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1283   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1284   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1285
1286     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1287   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1288
1289     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1290
1291     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1292
1293     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1294
1295     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1296
1297       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1298
1299     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1300
1301     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1302
1303     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1304
1305     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1306
1307         mips-mips-usg* ) machine=mips4 ;;
1308   mips-mips-riscos4 )
1309     machine=mips4
1310     NON_GNU_CC="cc -systype bsd43"
1311     NON_GNU_CPP="cc -systype bsd43 -E"
1312     case "$canonical" in
1313       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1314       mips-mips-riscos5* ) opsys=riscos5 ;;
1315     esac
1316   ;;
1317   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1318   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1319
1320     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1321
1322     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1323
1324     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1325   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1326
1327     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1328
1329     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1330
1331     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1332
1333     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1334
1335     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1336   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1337
1338     mips-siemens-sysv* | mips-sni-sysv*)
1339     machine=mips-siemens opsys=usg5-4
1340     NON_GNU_CC=/usr/ccs/bin/cc
1341     NON_GNU_CPP=/usr/ccs/lib/cpp
1342   ;;
1343
1344     mips-nec-sysv*)
1345     machine=mips-nec
1346     NON_GNU_CC=/usr/ccs/bin/cc
1347     NON_GNU_CPP=/usr/ccs/lib/cpp
1348   ;;
1349
1350       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1351   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1352     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1353   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1354   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1355   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1356   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1357   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1358   mips-sgi-irix*      ) opsys=irix5-0 ;;
1359
1360     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1361   *-sony-news* ) opsys=newsos5 ;;
1362
1363     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1364
1365     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1366         case "$canonical" in
1367       m68*-sunos1* )             machine=sun1     ;;
1368       m68*-sunos2* )             machine=sun2     ;;
1369       m68* )                     machine=sun3     ;;
1370       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1371       i*86-*-* )                 machine=intel386 ;;
1372       rs6000* )                  machine=rs6000   ;;
1373     esac
1374
1375         case "$canonical" in *-sunos5*)
1376       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1377     esac
1378
1379                     case "$canonical" in
1380       *-sunos4* )
1381         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1382         : ;;
1383       *-solaris2* )
1384         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1385         RANLIB=':' ;;
1386     esac
1387
1388     case "$canonical" in
1389       *-solaris*          )
1390         opsys=sol2
1391         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1392         { test "$extra_verbose" = "yes" && cat << EOF
1393     Defining OS_RELEASE = $os_release
1394 EOF
1395 cat >> confdefs.h <<EOF
1396 #define OS_RELEASE $os_release
1397 EOF
1398 }
1399  ;;
1400
1401             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1402       *-sunos4.0*         ) opsys=sunos4-0      ;;
1403       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1404       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1405       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1406       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1407       *-mach*             ) opsys=mach-bsd4-3   ;;
1408       *                   ) opsys=bsd4-2        ;;
1409     esac
1410
1411     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1412
1413         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1414   ;;
1415
1416     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1417
1418     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1419   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1420
1421     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1422
1423     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1424
1425     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1426       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1427
1428     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1429
1430     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1431
1432     vax-dec-* )
1433     case "$canonical" in
1434       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1435       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1436       *-mach* )                         opsys=mach-bsd4-3 ;;
1437     esac
1438   ;;
1439
1440     ns16k-whitechapel-* ) machine=mg1 ;;
1441
1442     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1443
1444     i[3-9]86-*-* )
1445     machine=intel386
1446     case "$canonical" in
1447       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1448       *-isc2.2* )               opsys=isc2-2 ;;
1449       *-isc4.0* )               opsys=isc4-0 ;;
1450       *-isc4.* )                opsys=isc4-1
1451                                 GCC_TEST_OPTIONS=-posix
1452                                 NON_GCC_TEST_OPTIONS=-Xp
1453                                 ;;
1454       *-isc* )                  opsys=isc3-0 ;;
1455       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1456       *-esix* )                 opsys=esix ;;
1457       *-mach* )                 opsys=mach-bsd4-3 ;;
1458       *-xenix* )                opsys=xenix ;;
1459       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1460       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1461       *-bsdi4* )                opsys=bsdos4 ;;
1462       *-bsdi3* )                opsys=bsdos3 ;;
1463       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1464       *-bsdi2* )                opsys=bsdos2 ;;
1465       *-sco3.2v5* )             opsys=sco5 ;
1466                                                         if test "$dynamic" = "yes" ; then
1467                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1468         else
1469                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1470         fi ;;
1471       *-sysv5* )                opsys=sco7 ;;
1472       *-386bsd* )               opsys=386bsd ;;
1473       *-freebsd* )              opsys=freebsd ;;
1474       *-nextstep* )             opsys=nextstep ;;
1475       *-pc-cygwin* )            opsys=cygwin32 ;;
1476       *-pc-mingw* )             opsys=mingw32 ;
1477                                 test -z "$with_tty" && with_tty="no";;
1478           esac
1479   ;;
1480
1481     m68k-*-linux* ) machine=m68k opsys=linux ;;
1482
1483 esac
1484
1485 if test -z "$machine" -o -z "$opsys"; then
1486   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1487    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1488   ) >&2
1489   exit 1
1490 fi
1491
1492 if test -z "$dynamic"; then
1493   case "$opsys" in
1494     hpux* | sunos4* ) dynamic=no ;;
1495     *) dynamic=yes ;;
1496   esac
1497 fi
1498 if test "$dynamic" = "yes"; then
1499   case "$opsys" in
1500     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1501     decosf* ) ld_call_shared="-call_shared" ;;
1502   esac
1503 else   case "$opsys" in
1504     sol2 )
1505       echo "Static linking is not supported on Solaris 2."
1506       echo "Rerun configure without specifying --dynamic=no."
1507       exit 1 ;;
1508     linux   ) ld_call_shared="-Bstatic" ;;
1509     decosf* ) ld_call_shared="-non_shared" ;;
1510   esac
1511 fi
1512
1513 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1514
1515 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1516 { test "$extra_verbose" = "yes" && cat << EOF
1517     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1518 EOF
1519 cat >> confdefs.h <<EOF
1520 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1521 EOF
1522 }
1523
1524
1525 machfile="m/${machine}.h"
1526 opsysfile="s/${opsys}.h"
1527
1528
1529 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1530 if test "$with_workshop $with_tooltalk" = "yes no"; then
1531   (echo "$progname: Usage error:"
1532 echo " " "--with-workshop requires --with-tooltalk"
1533 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1534 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1535 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1536 fi
1537
1538 if test "$with_workshop" = "yes"; then
1539   { test "$extra_verbose" = "yes" && cat << \EOF
1540     Defining SUNPRO
1541 EOF
1542 cat >> confdefs.h <<\EOF
1543 #define SUNPRO 1
1544 EOF
1545 }
1546
1547   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1548    echo "    xemacs will be linked with \"sunpro.o\""
1549  fi
1550 fi
1551
1552 if test "$with_clash_detection" = "yes"; then
1553   { test "$extra_verbose" = "yes" && cat << \EOF
1554     Defining CLASH_DETECTION
1555 EOF
1556 cat >> confdefs.h <<\EOF
1557 #define CLASH_DETECTION 1
1558 EOF
1559 }
1560
1561   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1562    echo "    xemacs will be linked with \"filelock.o\""
1563  fi
1564 fi
1565
1566 test -n "$compiler" && CC="$compiler"
1567 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1568 fi
1569
1570 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1571 if test "${CFLAGS-unset}" != unset
1572   then cflags_specified=yes;
1573   else cflags_specified=no;
1574 fi
1575
1576 xe_save_CFLAGS="$CFLAGS"
1577
1578 # Extract the first word of "gcc", so it can be a program name with args.
1579 set dummy gcc; ac_word=$2
1580 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1581 echo "configure:1582: checking for $ac_word" >&5
1582
1583 if test -n "$CC"; then
1584   ac_cv_prog_CC="$CC" # Let the user override the test.
1585 else
1586   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1587   ac_dummy="$PATH"
1588   for ac_dir in $ac_dummy; do
1589     test -z "$ac_dir" && ac_dir=.
1590     if test -f $ac_dir/$ac_word; then
1591       ac_cv_prog_CC="gcc"
1592       break
1593     fi
1594   done
1595   IFS="$ac_save_ifs"
1596 fi
1597 CC="$ac_cv_prog_CC"
1598 if test -n "$CC"; then
1599   echo "$ac_t""$CC" 1>&6
1600 else
1601   echo "$ac_t""no" 1>&6
1602 fi
1603
1604 if test -z "$CC"; then
1605   # Extract the first word of "cc", so it can be a program name with args.
1606 set dummy cc; ac_word=$2
1607 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1608 echo "configure:1609: checking for $ac_word" >&5
1609
1610 if test -n "$CC"; then
1611   ac_cv_prog_CC="$CC" # Let the user override the test.
1612 else
1613   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1614   ac_prog_rejected=no
1615   ac_dummy="$PATH"
1616   for ac_dir in $ac_dummy; do
1617     test -z "$ac_dir" && ac_dir=.
1618     if test -f $ac_dir/$ac_word; then
1619       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1620         ac_prog_rejected=yes
1621         continue
1622       fi
1623       ac_cv_prog_CC="cc"
1624       break
1625     fi
1626   done
1627   IFS="$ac_save_ifs"
1628 if test $ac_prog_rejected = yes; then
1629   # We found a bogon in the path, so make sure we never use it.
1630   set dummy $ac_cv_prog_CC
1631   shift
1632   if test $# -gt 0; then
1633     # We chose a different compiler from the bogus one.
1634     # However, it has the same basename, so the bogon will be chosen
1635     # first if we set CC to just the basename; use the full file name.
1636     shift
1637     set dummy "$ac_dir/$ac_word" "$@"
1638     shift
1639     ac_cv_prog_CC="$@"
1640   fi
1641 fi
1642 fi
1643 CC="$ac_cv_prog_CC"
1644 if test -n "$CC"; then
1645   echo "$ac_t""$CC" 1>&6
1646 else
1647   echo "$ac_t""no" 1>&6
1648 fi
1649
1650   if test -z "$CC"; then
1651     case "`uname -s`" in
1652     *win32* | *WIN32*)
1653       # Extract the first word of "cl", so it can be a program name with args.
1654 set dummy cl; ac_word=$2
1655 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1656 echo "configure:1657: checking for $ac_word" >&5
1657
1658 if test -n "$CC"; then
1659   ac_cv_prog_CC="$CC" # Let the user override the test.
1660 else
1661   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1662   ac_dummy="$PATH"
1663   for ac_dir in $ac_dummy; do
1664     test -z "$ac_dir" && ac_dir=.
1665     if test -f $ac_dir/$ac_word; then
1666       ac_cv_prog_CC="cl"
1667       break
1668     fi
1669   done
1670   IFS="$ac_save_ifs"
1671 fi
1672 CC="$ac_cv_prog_CC"
1673 if test -n "$CC"; then
1674   echo "$ac_t""$CC" 1>&6
1675 else
1676   echo "$ac_t""no" 1>&6
1677 fi
1678  ;;
1679     esac
1680   fi
1681   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1682 fi
1683
1684 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1685 echo "configure:1686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1686
1687 ac_ext=c
1688 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1689 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1690 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1691 ac_cpp='$CPP '"$xe_cppflags"
1692 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1693 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1694 cross_compiling=no
1695
1696 cat > conftest.$ac_ext << EOF
1697
1698 #line 1699 "configure"
1699 #include "confdefs.h"
1700
1701 main(){return(0);}
1702 EOF
1703 if { (eval echo configure:1704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1704   ac_cv_prog_cc_works=yes
1705   # If we can't run a trivial program, we are probably using a cross compiler.
1706   if (./conftest; exit) 2>/dev/null; then
1707     ac_cv_prog_cc_cross=no
1708   else
1709     ac_cv_prog_cc_cross=yes
1710   fi
1711 else
1712   echo "configure: failed program was:" >&5
1713   cat conftest.$ac_ext >&5
1714   ac_cv_prog_cc_works=no
1715 fi
1716 rm -fr conftest*
1717 ac_ext=c
1718 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1719 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1720 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1721 ac_cpp='$CPP '"$xe_cppflags"
1722 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1723 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1724 cross_compiling=no
1725
1726 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1727 if test $ac_cv_prog_cc_works = no; then
1728   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1729 fi
1730 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1731 echo "configure:1732: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1732 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1733 cross_compiling=$ac_cv_prog_cc_cross
1734
1735 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1736 echo "configure:1737: checking whether we are using GNU C" >&5
1737
1738 cat > conftest.c <<EOF
1739 #ifdef __GNUC__
1740   yes;
1741 #endif
1742 EOF
1743 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1744   ac_cv_prog_gcc=yes
1745 else
1746   ac_cv_prog_gcc=no
1747 fi
1748
1749 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1750
1751 if test $ac_cv_prog_gcc = yes; then
1752   GCC=yes
1753 else
1754   GCC=
1755 fi
1756
1757 ac_test_CFLAGS="${CFLAGS+set}"
1758 ac_save_CFLAGS="$CFLAGS"
1759 CFLAGS=
1760 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1761 echo "configure:1762: checking whether ${CC-cc} accepts -g" >&5
1762
1763 echo 'void f(){}' > conftest.c
1764 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1765   ac_cv_prog_cc_g=yes
1766 else
1767   ac_cv_prog_cc_g=no
1768 fi
1769 rm -f conftest*
1770
1771
1772 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1773 if test "$ac_test_CFLAGS" = set; then
1774   CFLAGS="$ac_save_CFLAGS"
1775 elif test $ac_cv_prog_cc_g = yes; then
1776   if test "$GCC" = yes; then
1777     CFLAGS="-g -O2"
1778   else
1779     CFLAGS="-g"
1780   fi
1781 else
1782   if test "$GCC" = yes; then
1783     CFLAGS="-O2"
1784   else
1785     CFLAGS=
1786   fi
1787 fi
1788  
1789 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1790   CC=${NON_GNU_CC-cc}
1791   # Extract the first word of "gcc", so it can be a program name with args.
1792 set dummy gcc; ac_word=$2
1793 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1794 echo "configure:1795: checking for $ac_word" >&5
1795
1796 if test -n "$CC"; then
1797   ac_cv_prog_CC="$CC" # Let the user override the test.
1798 else
1799   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1800   ac_dummy="$PATH"
1801   for ac_dir in $ac_dummy; do
1802     test -z "$ac_dir" && ac_dir=.
1803     if test -f $ac_dir/$ac_word; then
1804       ac_cv_prog_CC="gcc"
1805       break
1806     fi
1807   done
1808   IFS="$ac_save_ifs"
1809 fi
1810 CC="$ac_cv_prog_CC"
1811 if test -n "$CC"; then
1812   echo "$ac_t""$CC" 1>&6
1813 else
1814   echo "$ac_t""no" 1>&6
1815 fi
1816
1817 if test -z "$CC"; then
1818   # Extract the first word of "cc", so it can be a program name with args.
1819 set dummy cc; ac_word=$2
1820 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1821 echo "configure:1822: checking for $ac_word" >&5
1822
1823 if test -n "$CC"; then
1824   ac_cv_prog_CC="$CC" # Let the user override the test.
1825 else
1826   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1827   ac_prog_rejected=no
1828   ac_dummy="$PATH"
1829   for ac_dir in $ac_dummy; do
1830     test -z "$ac_dir" && ac_dir=.
1831     if test -f $ac_dir/$ac_word; then
1832       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1833         ac_prog_rejected=yes
1834         continue
1835       fi
1836       ac_cv_prog_CC="cc"
1837       break
1838     fi
1839   done
1840   IFS="$ac_save_ifs"
1841 if test $ac_prog_rejected = yes; then
1842   # We found a bogon in the path, so make sure we never use it.
1843   set dummy $ac_cv_prog_CC
1844   shift
1845   if test $# -gt 0; then
1846     # We chose a different compiler from the bogus one.
1847     # However, it has the same basename, so the bogon will be chosen
1848     # first if we set CC to just the basename; use the full file name.
1849     shift
1850     set dummy "$ac_dir/$ac_word" "$@"
1851     shift
1852     ac_cv_prog_CC="$@"
1853   fi
1854 fi
1855 fi
1856 CC="$ac_cv_prog_CC"
1857 if test -n "$CC"; then
1858   echo "$ac_t""$CC" 1>&6
1859 else
1860   echo "$ac_t""no" 1>&6
1861 fi
1862
1863   if test -z "$CC"; then
1864     case "`uname -s`" in
1865     *win32* | *WIN32*)
1866       # Extract the first word of "cl", so it can be a program name with args.
1867 set dummy cl; ac_word=$2
1868 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1869 echo "configure:1870: checking for $ac_word" >&5
1870
1871 if test -n "$CC"; then
1872   ac_cv_prog_CC="$CC" # Let the user override the test.
1873 else
1874   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1875   ac_dummy="$PATH"
1876   for ac_dir in $ac_dummy; do
1877     test -z "$ac_dir" && ac_dir=.
1878     if test -f $ac_dir/$ac_word; then
1879       ac_cv_prog_CC="cl"
1880       break
1881     fi
1882   done
1883   IFS="$ac_save_ifs"
1884 fi
1885 CC="$ac_cv_prog_CC"
1886 if test -n "$CC"; then
1887   echo "$ac_t""$CC" 1>&6
1888 else
1889   echo "$ac_t""no" 1>&6
1890 fi
1891  ;;
1892     esac
1893   fi
1894   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1895 fi
1896
1897 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1898 echo "configure:1899: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1899
1900 ac_ext=c
1901 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1902 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1903 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1904 ac_cpp='$CPP '"$xe_cppflags"
1905 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1906 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1907 cross_compiling=no
1908
1909 cat > conftest.$ac_ext << EOF
1910
1911 #line 1912 "configure"
1912 #include "confdefs.h"
1913
1914 main(){return(0);}
1915 EOF
1916 if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1917   ac_cv_prog_cc_works=yes
1918   # If we can't run a trivial program, we are probably using a cross compiler.
1919   if (./conftest; exit) 2>/dev/null; then
1920     ac_cv_prog_cc_cross=no
1921   else
1922     ac_cv_prog_cc_cross=yes
1923   fi
1924 else
1925   echo "configure: failed program was:" >&5
1926   cat conftest.$ac_ext >&5
1927   ac_cv_prog_cc_works=no
1928 fi
1929 rm -fr conftest*
1930 ac_ext=c
1931 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1932 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1933 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1934 ac_cpp='$CPP '"$xe_cppflags"
1935 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1936 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1937 cross_compiling=no
1938
1939 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1940 if test $ac_cv_prog_cc_works = no; then
1941   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1942 fi
1943 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1944 echo "configure:1945: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1945 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1946 cross_compiling=$ac_cv_prog_cc_cross
1947
1948 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1949 echo "configure:1950: checking whether we are using GNU C" >&5
1950
1951 cat > conftest.c <<EOF
1952 #ifdef __GNUC__
1953   yes;
1954 #endif
1955 EOF
1956 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1957   ac_cv_prog_gcc=yes
1958 else
1959   ac_cv_prog_gcc=no
1960 fi
1961
1962 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1963
1964 if test $ac_cv_prog_gcc = yes; then
1965   GCC=yes
1966 else
1967   GCC=
1968 fi
1969
1970 ac_test_CFLAGS="${CFLAGS+set}"
1971 ac_save_CFLAGS="$CFLAGS"
1972 CFLAGS=
1973 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1974 echo "configure:1975: checking whether ${CC-cc} accepts -g" >&5
1975
1976 echo 'void f(){}' > conftest.c
1977 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1978   ac_cv_prog_cc_g=yes
1979 else
1980   ac_cv_prog_cc_g=no
1981 fi
1982 rm -f conftest*
1983
1984
1985 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1986 if test "$ac_test_CFLAGS" = set; then
1987   CFLAGS="$ac_save_CFLAGS"
1988 elif test $ac_cv_prog_cc_g = yes; then
1989   if test "$GCC" = yes; then
1990     CFLAGS="-g -O2"
1991   else
1992     CFLAGS="-g"
1993   fi
1994 else
1995   if test "$GCC" = yes; then
1996     CFLAGS="-O2"
1997   else
1998     CFLAGS=
1999   fi
2000 fi
2001
2002 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2003   CC=gcc
2004   # Extract the first word of "gcc", so it can be a program name with args.
2005 set dummy gcc; ac_word=$2
2006 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2007 echo "configure:2008: checking for $ac_word" >&5
2008
2009 if test -n "$CC"; then
2010   ac_cv_prog_CC="$CC" # Let the user override the test.
2011 else
2012   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2013   ac_dummy="$PATH"
2014   for ac_dir in $ac_dummy; do
2015     test -z "$ac_dir" && ac_dir=.
2016     if test -f $ac_dir/$ac_word; then
2017       ac_cv_prog_CC="gcc"
2018       break
2019     fi
2020   done
2021   IFS="$ac_save_ifs"
2022 fi
2023 CC="$ac_cv_prog_CC"
2024 if test -n "$CC"; then
2025   echo "$ac_t""$CC" 1>&6
2026 else
2027   echo "$ac_t""no" 1>&6
2028 fi
2029
2030 if test -z "$CC"; then
2031   # Extract the first word of "cc", so it can be a program name with args.
2032 set dummy cc; ac_word=$2
2033 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2034 echo "configure:2035: checking for $ac_word" >&5
2035
2036 if test -n "$CC"; then
2037   ac_cv_prog_CC="$CC" # Let the user override the test.
2038 else
2039   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2040   ac_prog_rejected=no
2041   ac_dummy="$PATH"
2042   for ac_dir in $ac_dummy; do
2043     test -z "$ac_dir" && ac_dir=.
2044     if test -f $ac_dir/$ac_word; then
2045       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2046         ac_prog_rejected=yes
2047         continue
2048       fi
2049       ac_cv_prog_CC="cc"
2050       break
2051     fi
2052   done
2053   IFS="$ac_save_ifs"
2054 if test $ac_prog_rejected = yes; then
2055   # We found a bogon in the path, so make sure we never use it.
2056   set dummy $ac_cv_prog_CC
2057   shift
2058   if test $# -gt 0; then
2059     # We chose a different compiler from the bogus one.
2060     # However, it has the same basename, so the bogon will be chosen
2061     # first if we set CC to just the basename; use the full file name.
2062     shift
2063     set dummy "$ac_dir/$ac_word" "$@"
2064     shift
2065     ac_cv_prog_CC="$@"
2066   fi
2067 fi
2068 fi
2069 CC="$ac_cv_prog_CC"
2070 if test -n "$CC"; then
2071   echo "$ac_t""$CC" 1>&6
2072 else
2073   echo "$ac_t""no" 1>&6
2074 fi
2075
2076   if test -z "$CC"; then
2077     case "`uname -s`" in
2078     *win32* | *WIN32*)
2079       # Extract the first word of "cl", so it can be a program name with args.
2080 set dummy cl; ac_word=$2
2081 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2082 echo "configure:2083: checking for $ac_word" >&5
2083
2084 if test -n "$CC"; then
2085   ac_cv_prog_CC="$CC" # Let the user override the test.
2086 else
2087   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2088   ac_dummy="$PATH"
2089   for ac_dir in $ac_dummy; do
2090     test -z "$ac_dir" && ac_dir=.
2091     if test -f $ac_dir/$ac_word; then
2092       ac_cv_prog_CC="cl"
2093       break
2094     fi
2095   done
2096   IFS="$ac_save_ifs"
2097 fi
2098 CC="$ac_cv_prog_CC"
2099 if test -n "$CC"; then
2100   echo "$ac_t""$CC" 1>&6
2101 else
2102   echo "$ac_t""no" 1>&6
2103 fi
2104  ;;
2105     esac
2106   fi
2107   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2108 fi
2109
2110 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2111 echo "configure:2112: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2112
2113 ac_ext=c
2114 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2115 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2116 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2117 ac_cpp='$CPP '"$xe_cppflags"
2118 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2119 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2120 cross_compiling=no
2121
2122 cat > conftest.$ac_ext << EOF
2123
2124 #line 2125 "configure"
2125 #include "confdefs.h"
2126
2127 main(){return(0);}
2128 EOF
2129 if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2130   ac_cv_prog_cc_works=yes
2131   # If we can't run a trivial program, we are probably using a cross compiler.
2132   if (./conftest; exit) 2>/dev/null; then
2133     ac_cv_prog_cc_cross=no
2134   else
2135     ac_cv_prog_cc_cross=yes
2136   fi
2137 else
2138   echo "configure: failed program was:" >&5
2139   cat conftest.$ac_ext >&5
2140   ac_cv_prog_cc_works=no
2141 fi
2142 rm -fr conftest*
2143 ac_ext=c
2144 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2145 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2146 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2147 ac_cpp='$CPP '"$xe_cppflags"
2148 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2149 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2150 cross_compiling=no
2151
2152 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2153 if test $ac_cv_prog_cc_works = no; then
2154   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2155 fi
2156 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2157 echo "configure:2158: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2158 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2159 cross_compiling=$ac_cv_prog_cc_cross
2160
2161 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2162 echo "configure:2163: checking whether we are using GNU C" >&5
2163
2164 cat > conftest.c <<EOF
2165 #ifdef __GNUC__
2166   yes;
2167 #endif
2168 EOF
2169 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2170   ac_cv_prog_gcc=yes
2171 else
2172   ac_cv_prog_gcc=no
2173 fi
2174
2175 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2176
2177 if test $ac_cv_prog_gcc = yes; then
2178   GCC=yes
2179 else
2180   GCC=
2181 fi
2182
2183 ac_test_CFLAGS="${CFLAGS+set}"
2184 ac_save_CFLAGS="$CFLAGS"
2185 CFLAGS=
2186 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2187 echo "configure:2188: checking whether ${CC-cc} accepts -g" >&5
2188
2189 echo 'void f(){}' > conftest.c
2190 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2191   ac_cv_prog_cc_g=yes
2192 else
2193   ac_cv_prog_cc_g=no
2194 fi
2195 rm -f conftest*
2196
2197
2198 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2199 if test "$ac_test_CFLAGS" = set; then
2200   CFLAGS="$ac_save_CFLAGS"
2201 elif test $ac_cv_prog_cc_g = yes; then
2202   if test "$GCC" = yes; then
2203     CFLAGS="-g -O2"
2204   else
2205     CFLAGS="-g"
2206   fi
2207 else
2208   if test "$GCC" = yes; then
2209     CFLAGS="-O2"
2210   else
2211     CFLAGS=
2212   fi
2213 fi
2214
2215 fi
2216 CFLAGS="$xe_save_CFLAGS"
2217
2218
2219 test -n "$CPP" -a -d "$CPP" && CPP=
2220
2221 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2222
2223 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2224 echo "configure:2225: checking how to run the C preprocessor" >&5
2225 # On Suns, sometimes $CPP names a directory.
2226 if test -n "$CPP" && test -d "$CPP"; then
2227   CPP=
2228 fi
2229 if test -z "$CPP"; then
2230
2231   # This must be in double quotes, not single quotes, because CPP may get
2232   # substituted into the Makefile and "${CC-cc}" will confuse make.
2233   CPP="${CC-cc} -E"
2234   # On the NeXT, cc -E runs the code through the compiler's parser,
2235   # not just through cpp.
2236   cat > conftest.$ac_ext <<EOF
2237 #line 2238 "configure"
2238 #include "confdefs.h"
2239 #include <assert.h>
2240 Syntax Error
2241 EOF
2242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2243 { (eval echo configure:2244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2245 if test -z "$ac_err"; then
2246   :
2247 else
2248   echo "$ac_err" >&5
2249   echo "configure: failed program was:" >&5
2250   cat conftest.$ac_ext >&5
2251   rm -rf conftest*
2252   CPP="${CC-cc} -E -traditional-cpp"
2253   cat > conftest.$ac_ext <<EOF
2254 #line 2255 "configure"
2255 #include "confdefs.h"
2256 #include <assert.h>
2257 Syntax Error
2258 EOF
2259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2260 { (eval echo configure:2261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2262 if test -z "$ac_err"; then
2263   :
2264 else
2265   echo "$ac_err" >&5
2266   echo "configure: failed program was:" >&5
2267   cat conftest.$ac_ext >&5
2268   rm -rf conftest*
2269   CPP="${CC-cc} -nologo -E"
2270   cat > conftest.$ac_ext <<EOF
2271 #line 2272 "configure"
2272 #include "confdefs.h"
2273 #include <assert.h>
2274 Syntax Error
2275 EOF
2276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2277 { (eval echo configure:2278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2279 if test -z "$ac_err"; then
2280   :
2281 else
2282   echo "$ac_err" >&5
2283   echo "configure: failed program was:" >&5
2284   cat conftest.$ac_ext >&5
2285   rm -rf conftest*
2286   CPP=/lib/cpp
2287 fi
2288 rm -f conftest*
2289 fi
2290 rm -f conftest*
2291 fi
2292 rm -f conftest*
2293   ac_cv_prog_CPP="$CPP"
2294   CPP="$ac_cv_prog_CPP"
2295 else
2296   ac_cv_prog_CPP="$CPP"
2297 fi
2298 echo "$ac_t""$CPP" 1>&6
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
2330 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2331 echo "configure:2332: checking for GNU libc" >&5
2332 cat > conftest.$ac_ext <<EOF
2333 #line 2334 "configure"
2334 #include "confdefs.h"
2335 #include <features.h>
2336 int main() {
2337
2338 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2339 #error Not a GNU libc system :-(
2340 ******* ======= ******** &&&&&&&&
2341 #endif
2342
2343 ; return 0; }
2344 EOF
2345 if { (eval echo configure:2346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2346   rm -rf conftest*
2347   have_glibc=yes
2348 else
2349   echo "configure: failed program was:" >&5
2350   cat conftest.$ac_ext >&5
2351   rm -rf conftest*
2352   have_glibc=no
2353 fi
2354 rm -f conftest*
2355 echo "$ac_t""$have_glibc" 1>&6
2356 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2357     Defining _GNU_SOURCE
2358 EOF
2359 cat >> confdefs.h <<\EOF
2360 #define _GNU_SOURCE 1
2361 EOF
2362 }
2363
2364
2365
2366 cat > conftest.$ac_ext <<EOF
2367 #line 2368 "configure"
2368 #include "confdefs.h"
2369 int main () {
2370 #if defined __SUNPRO_C
2371 return 11;
2372 #elif defined __DECC
2373 return 12;
2374 #else
2375 return 0;
2376 #endif
2377 }
2378 EOF
2379 if { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2380 then
2381   :
2382 else
2383   conftest_rc="$?"
2384   echo "configure: failed program was:" >&5
2385   cat conftest.$ac_ext >&5
2386   rm -fr conftest*
2387   case "$conftest_rc" in
2388   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2389   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2390 esac
2391 fi
2392 rm -fr conftest*
2393
2394
2395
2396
2397 echo "Extracting information from the machine- and system-dependent headers..."
2398
2399 tempcname="conftest.c"
2400
2401
2402
2403 cat > $tempcname <<EOF
2404 #define NOT_C_CODE
2405 #define C_SWITCH_SITE
2406 #define C_SWITCH_X_SITE
2407 #define LD_SWITCH_SITE
2408 #define LD_SWITCH_X_SITE
2409 #define LD_SWITCH_X_SITE_AUX
2410 #define OS_RELEASE $os_release
2411 #include "$srcdir/src/$opsysfile"
2412 #include "$srcdir/src/$machfile"
2413
2414 #ifndef LIBS_MACHINE
2415 #define LIBS_MACHINE
2416 #endif
2417 configure___ libs_machine=LIBS_MACHINE
2418
2419 #ifndef LIBS_SYSTEM
2420 #define LIBS_SYSTEM
2421 #endif
2422 configure___ libs_system=LIBS_SYSTEM
2423
2424 #ifndef LIBS_TERMCAP
2425 #define LIBS_TERMCAP
2426 #endif
2427 configure___ libs_termcap=LIBS_TERMCAP
2428
2429 #ifndef LIB_STANDARD
2430 #define LIB_STANDARD
2431 #endif
2432 configure___ libs_standard=LIB_STANDARD
2433
2434
2435 #ifndef OBJECTS_MACHINE
2436 #define OBJECTS_MACHINE
2437 #endif
2438 configure___ objects_machine=OBJECTS_MACHINE
2439
2440 #ifndef OBJECTS_SYSTEM
2441 #define OBJECTS_SYSTEM
2442 #endif
2443 configure___ objects_system=OBJECTS_SYSTEM
2444
2445
2446 #ifndef C_SWITCH_MACHINE
2447 #define C_SWITCH_MACHINE
2448 #endif
2449 configure___ c_switch_machine=C_SWITCH_MACHINE
2450
2451 #ifndef C_SWITCH_SYSTEM
2452 #define C_SWITCH_SYSTEM
2453 #endif
2454 configure___ c_switch_system=C_SWITCH_SYSTEM
2455
2456
2457 #ifndef LD_SWITCH_MACHINE
2458 #define LD_SWITCH_MACHINE
2459 #endif
2460 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2461
2462 #ifndef LD_SWITCH_SYSTEM
2463 #define LD_SWITCH_SYSTEM
2464 #endif
2465 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2466
2467
2468 #ifndef UNEXEC
2469 #define UNEXEC "unexec.o"
2470 #endif
2471 configure___ unexec=UNEXEC
2472
2473
2474 #ifndef LD_SWITCH_SHARED
2475 #define LD_SWITCH_SHARED "-c"
2476 #endif
2477 configure___ ld_switch_shared=LD_SWITCH_SHARED
2478
2479
2480 #ifdef ORDINARY_LINK
2481 #define LD "\$(CC) \$(CFLAGS)"
2482 #else /* no ORDINARY LINK */
2483 #ifdef COFF_ENCAPSULATE
2484 #define LD "\$(CC) -nostdlib"
2485 #else /* not COFF_ENCAPSULATE */
2486 #ifdef LINKER
2487 #define LD LINKER
2488 #else /* ! defined (LINKER) */
2489 #define LD "ld"
2490 #endif /* ! defined (LINKER) */
2491 #endif /* ! defined (COFF_ENCAPSULATE) */
2492 #endif /* not ORDINARY_LINK */
2493 configure___ ld=LD
2494
2495 #ifndef LIB_GCC
2496 #define LIB_GCC
2497 #endif
2498 configure___ lib_gcc=LIB_GCC
2499
2500 #ifndef LD_TEXT_START_ADDR
2501 #define LD_TEXT_START_ADDR
2502 #endif
2503 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2504
2505
2506 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2507 #ifdef NO_REMAP
2508 #ifdef COFF_ENCAPSULATE
2509 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2510 #else /* ! defined (COFF_ENCAPSULATE) */
2511 #define START_FILES "pre-crt0.o /lib/crt0.o"
2512 #endif /* ! defined (COFF_ENCAPSULATE) */
2513 #else /* ! defined (NO_REMAP) */
2514 #define START_FILES "ecrt0.o"
2515 #endif /* ! defined (NO_REMAP) */
2516 #endif /* no ORDINARY_LINK */
2517 #ifndef START_FILES
2518 #define START_FILES
2519 #endif
2520 configure___ start_files=START_FILES
2521
2522 #ifdef ORDINARY_LINK
2523 configure___ ordinary_link=yes
2524 #else
2525 configure___ ordinary_link=no
2526 #endif
2527
2528 #ifdef SYSTEM_MALLOC
2529 configure___ system_malloc=yes
2530 #else
2531 configure___ system_malloc=no
2532 #endif
2533
2534 #ifdef TERMINFO
2535 configure___ have_terminfo=yes
2536 #else
2537 configure___ have_terminfo=no
2538 #endif
2539
2540 #ifdef MAIL_USE_FLOCK
2541 configure___ mail_use_flock=yes
2542 #else
2543 configure___ mail_use_flock=no
2544 #endif
2545
2546 #ifdef MAIL_USE_LOCKF
2547 configure___ mail_use_lockf=yes
2548 #else
2549 configure___ mail_use_lockf=no
2550 #endif
2551
2552 #ifdef MAIL_USE_LOCKING
2553 configure___ mail_use_locking=yes
2554 #else
2555 configure___ mail_use_locking=no
2556 #endif
2557
2558 #ifdef HAVE_WIN32_PROCESSES
2559 configure___ win32_processes=yes
2560 #else
2561 configure___ win32_processes=no
2562 #endif
2563
2564 EOF
2565
2566 CPP=`eval "echo $CPP $CPPFLAGS"`
2567 eval `$CPP -Isrc $tempcname \
2568         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2569
2570 rm $tempcname
2571
2572 test "$extra_verbose" = "yes" && \
2573   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 ""
2574
2575 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2576         mingw_include=`eval "dirname $mingw_include"` ;
2577         mingw_include="-I$mingw_include/../include/mingw32" ;
2578         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2579 esac
2580
2581 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2582
2583 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2584
2585 if test "$cflags_specified" = "no"; then
2586       if   test "$GCC" = "yes"; then
2587     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2588               elif test "$__SUNPRO_C" = "yes"; then
2589     case "$opsys" in
2590       sol2    ) CFLAGS="-v -xO4" ;;
2591       sunos4* ) CFLAGS="-xO2";;
2592     esac
2593   elif test "$__DECC" = "yes"; then
2594     CFLAGS="-O3"
2595   elif test "$CC" = "xlc"; then
2596     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2597     else
2598     CFLAGS="-O" ;  fi
2599 fi
2600
2601
2602 if test "$GCC" = "yes"; then
2603   set x $ld_switch_system; shift; ld_switch_system=""
2604   while test -n "$1"; do
2605     case $1 in
2606       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2607       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2608       -Xlinker* ) ;;
2609       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2610     esac
2611     shift
2612   done
2613 fi
2614
2615 if test "$GCC" = "yes"; then
2616   set x $ld_switch_machine; shift; ld_switch_machine=""
2617   while test -n "$1"; do
2618     case $1 in
2619       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2620       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2621       -Xlinker* ) ;;
2622       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2623     esac
2624     shift
2625   done
2626 fi
2627
2628 if test "$GCC" = "yes"; then
2629   set x $LDFLAGS; shift; LDFLAGS=""
2630   while test -n "$1"; do
2631     case $1 in
2632       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2633       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2634       -Xlinker* ) ;;
2635       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2636     esac
2637     shift
2638   done
2639 fi
2640
2641 if test "$GCC" = "yes"; then
2642   set x $ld_call_shared; shift; ld_call_shared=""
2643   while test -n "$1"; do
2644     case $1 in
2645       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2646       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2647       -Xlinker* ) ;;
2648       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2649     esac
2650     shift
2651   done
2652 fi
2653
2654 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2655    echo "    xemacs will be linked with \"$objects_machine\""
2656  fi
2657 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2658    echo "    xemacs will be linked with \"$objects_system\""
2659  fi
2660 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2661    echo "    xemacs will be linked with \"$unexec\""
2662  fi
2663
2664 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2665 echo "configure:2666: checking for dynodump" >&5
2666 if test "$unexec" != "unexsol2.o"; then
2667   echo "$ac_t""no" 1>&6
2668 else
2669   echo "$ac_t""yes" 1>&6
2670   { test "$extra_verbose" = "yes" && cat << \EOF
2671     Defining DYNODUMP
2672 EOF
2673 cat >> confdefs.h <<\EOF
2674 #define DYNODUMP 1
2675 EOF
2676 }
2677
2678   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2679   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2680   case "$machine" in
2681     sparc   ) dynodump_arch=sparc ;;
2682     *86*    ) dynodump_arch=i386  ;;
2683     powerpc ) dynodump_arch=ppc   ;;
2684   esac
2685     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
2686 fi
2687
2688
2689 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2690
2691 if test "$unexec" = "unexaix.o"; then
2692   if   test "$dynamic" = "no"; then
2693   start_flags="-Wl,-bnso,-bnodelcsect"
2694   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2695   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2696     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2697   done
2698   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2699     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2700   done
2701   
2702 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2703 echo "configure:2704: checking for terminateAndUnload in -lC" >&5
2704 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2705
2706 xe_check_libs=" -lC "
2707 cat > conftest.$ac_ext <<EOF
2708 #line 2709 "configure"
2709 #include "confdefs.h"
2710 /* Override any gcc2 internal prototype to avoid an error.  */
2711 /* We use char because int might match the return type of a gcc2
2712     builtin and then its argument prototype would still apply.  */
2713 char terminateAndUnload();
2714
2715 int main() {
2716 terminateAndUnload()
2717 ; return 0; }
2718 EOF
2719 if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2720   rm -rf conftest*
2721   eval "ac_cv_lib_$ac_lib_var=yes"
2722 else
2723   echo "configure: failed program was:" >&5
2724   cat conftest.$ac_ext >&5
2725   rm -rf conftest*
2726   eval "ac_cv_lib_$ac_lib_var=no"
2727 fi
2728 rm -f conftest*
2729 xe_check_libs=""
2730
2731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2732   echo "$ac_t""yes" 1>&6
2733   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2734 else
2735   echo "$ac_t""no" 1>&6
2736 fi
2737
2738
2739   fi
2740 elif test -n "$ld_text_start_addr"; then
2741   start_flags="-T $ld_text_start_addr -e __start"
2742 fi
2743
2744
2745
2746
2747 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2748  test -z "$linker" &&  linker='$(CC) -nostdlib'
2749  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2750 fi
2751 test "$GCC" != "yes" && lib_gcc=
2752
2753
2754
2755
2756
2757 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2758 if test -n "$site_libraries"; then
2759   for arg in $site_libraries; do
2760     case "$arg" in
2761      -* ) ;;
2762      * ) test -d "$arg" || \
2763            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2764        arg="-L${arg}" ;;
2765     esac
2766     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2767   done
2768 fi
2769
2770 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2771 if test -n "$site_includes"; then
2772   for arg in $site_includes; do
2773     case "$arg" in
2774       -* ) ;;
2775       * ) test -d "$arg" || \
2776            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2777       arg="-I${arg}" ;;
2778     esac
2779     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2780   done
2781 fi
2782
2783 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2784 if test -n "$site_prefixes"; then
2785   for dir in $site_prefixes; do
2786     lib_dir="${dir}/lib"
2787     inc_dir="${dir}/include"
2788     if test ! -d "$dir"; then
2789       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2790     elif test ! -d "$lib_dir"; then
2791       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2792     else
2793       if test -d "$inc_dir"; then
2794         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
2795       fi
2796       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
2797     fi
2798   done
2799 fi
2800
2801
2802 for dir in "/usr/ccs/lib"; do
2803   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
2804 done
2805
2806 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2807 if test -n "$site_runtime_libraries"; then
2808   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2809   export LD_RUN_PATH
2810 fi
2811
2812
2813
2814
2815
2816 if test -n "$add_runtime_path"; then :;
2817 elif test "$dynamic" = "no"; then add_runtime_path=no
2818 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2819 else case "$opsys" in
2820        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2821        * ) add_runtime_path=no ;;
2822      esac
2823 fi
2824
2825 if test "$add_runtime_path" = "yes"; then
2826       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2827 echo "configure:2828: checking "for runtime libraries flag"" >&5
2828   case "$opsys" in
2829     sol2 ) dash_r="-R" ;;
2830     decosf* | linux* | irix*) dash_r="-rpath " ;;
2831     *)
2832       dash_r=""
2833       for try_dash_r in "-R" "-R " "-rpath "; do
2834         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2835         
2836 if test "$GCC" = "yes"; then
2837   set x $xe_check_libs; shift; xe_check_libs=""
2838   while test -n "$1"; do
2839     case $1 in
2840       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2841       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2842       -Xlinker* ) ;;
2843       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2844     esac
2845     shift
2846   done
2847 fi
2848         cat > conftest.$ac_ext <<EOF
2849 #line 2850 "configure"
2850 #include "confdefs.h"
2851
2852 int main() {
2853
2854 ; return 0; }
2855 EOF
2856 if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2857   rm -rf conftest*
2858   dash_r="$try_dash_r"
2859 else
2860   echo "configure: failed program was:" >&5
2861   cat conftest.$ac_ext >&5
2862 fi
2863 rm -f conftest*
2864         xe_check_libs=""
2865         test -n "$dash_r" && break
2866       done ;;
2867   esac
2868   if test -n "$dash_r";
2869     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2870     else echo "$ac_t""NONE" 1>&6
2871   fi
2872 fi
2873
2874 xe_add_unique_runpath_dir='
2875   xe_add_p=yes
2876   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2877   done
2878   if test "$xe_add_p" = "yes"; then
2879     test -n "$runpath" && runpath="${runpath}:"
2880     runpath="${runpath}${xe_runpath_dir}"
2881     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2882   fi'
2883
2884
2885
2886
2887 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2888     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2889   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2890   
2891         runpath="" runpath_dirs=""
2892   if test -n "$LD_RUN_PATH"; then
2893     runpath="$LD_RUN_PATH"
2894   elif test "$GCC" = "yes"; then
2895         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2896     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2897     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2898     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2899       case "$arg" in P,* | -L* | -R* )
2900         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2901           {
2902 xe_runpath_dir="$dir"
2903   test "$xe_runpath_dir" != "/lib"     -a \
2904         "$xe_runpath_dir" != "/usr/lib" -a \
2905         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2906   eval "$xe_add_unique_runpath_dir"
2907 }
2908         done ;;
2909       esac
2910     done
2911     ld_switch_run="$ld_switch_run_save"
2912     rm -f conftest*
2913   else
2914         for arg in $ld_switch_site $ld_switch_x_site; do
2915       case "$arg" in -L*) {
2916 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2917   test "$xe_runpath_dir" != "/lib"     -a \
2918         "$xe_runpath_dir" != "/usr/lib" -a \
2919         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2920   eval "$xe_add_unique_runpath_dir"
2921 };; esac
2922     done
2923         if test "$opsys $need_motif" = "sol2 yes"; then
2924       xe_runpath_dir="/opt/SUNWdt/lib";
2925       eval "$xe_add_unique_runpath_dir";
2926     fi
2927   fi 
2928   if test -n "$runpath"; then
2929     ld_switch_run="${dash_r}${runpath}"
2930     
2931 if test "$GCC" = "yes"; then
2932   set x $ld_switch_run; shift; ld_switch_run=""
2933   while test -n "$1"; do
2934     case $1 in
2935       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2936       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2937       -Xlinker* ) ;;
2938       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2939     esac
2940     shift
2941   done
2942 fi
2943     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2944   fi
2945 fi
2946
2947
2948
2949
2950 GNU_MALLOC=yes
2951 if test "$with_dlmalloc" != "no"; then
2952         doug_lea_malloc=yes
2953 else
2954         doug_lea_malloc=no
2955 fi
2956 after_morecore_hook_exists=yes
2957 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2958 echo "configure:2959: checking for malloc_get_state" >&5
2959
2960 cat > conftest.$ac_ext <<EOF
2961 #line 2962 "configure"
2962 #include "confdefs.h"
2963 /* System header to define __stub macros and hopefully few prototypes,
2964     which can conflict with char malloc_get_state(); below.  */
2965 #include <assert.h>
2966 /* Override any gcc2 internal prototype to avoid an error.  */
2967 /* We use char because int might match the return type of a gcc2
2968     builtin and then its argument prototype would still apply.  */
2969 char malloc_get_state();
2970
2971 int main() {
2972
2973 /* The GNU C library defines this for functions which it implements
2974     to always fail with ENOSYS.  Some functions are actually named
2975     something starting with __ and the normal name is an alias.  */
2976 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2977 choke me
2978 #else
2979 malloc_get_state();
2980 #endif
2981
2982 ; return 0; }
2983 EOF
2984 if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2985   rm -rf conftest*
2986   eval "ac_cv_func_malloc_get_state=yes"
2987 else
2988   echo "configure: failed program was:" >&5
2989   cat conftest.$ac_ext >&5
2990   rm -rf conftest*
2991   eval "ac_cv_func_malloc_get_state=no"
2992 fi
2993 rm -f conftest*
2994
2995 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2996   echo "$ac_t""yes" 1>&6
2997   :
2998 else
2999   echo "$ac_t""no" 1>&6
3000 doug_lea_malloc=no
3001 fi
3002
3003 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3004 echo "configure:3005: checking for malloc_set_state" >&5
3005
3006 cat > conftest.$ac_ext <<EOF
3007 #line 3008 "configure"
3008 #include "confdefs.h"
3009 /* System header to define __stub macros and hopefully few prototypes,
3010     which can conflict with char malloc_set_state(); below.  */
3011 #include <assert.h>
3012 /* Override any gcc2 internal prototype to avoid an error.  */
3013 /* We use char because int might match the return type of a gcc2
3014     builtin and then its argument prototype would still apply.  */
3015 char malloc_set_state();
3016
3017 int main() {
3018
3019 /* The GNU C library defines this for functions which it implements
3020     to always fail with ENOSYS.  Some functions are actually named
3021     something starting with __ and the normal name is an alias.  */
3022 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3023 choke me
3024 #else
3025 malloc_set_state();
3026 #endif
3027
3028 ; return 0; }
3029 EOF
3030 if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3031   rm -rf conftest*
3032   eval "ac_cv_func_malloc_set_state=yes"
3033 else
3034   echo "configure: failed program was:" >&5
3035   cat conftest.$ac_ext >&5
3036   rm -rf conftest*
3037   eval "ac_cv_func_malloc_set_state=no"
3038 fi
3039 rm -f conftest*
3040
3041 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3042   echo "$ac_t""yes" 1>&6
3043   :
3044 else
3045   echo "$ac_t""no" 1>&6
3046 doug_lea_malloc=no
3047 fi
3048
3049 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3050 echo "configure:3051: checking whether __after_morecore_hook exists" >&5
3051 cat > conftest.$ac_ext <<EOF
3052 #line 3053 "configure"
3053 #include "confdefs.h"
3054 extern void (* __after_morecore_hook)();
3055 int main() {
3056 __after_morecore_hook = 0
3057 ; return 0; }
3058 EOF
3059 if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3060   rm -rf conftest*
3061   echo "$ac_t""yes" 1>&6
3062 else
3063   echo "configure: failed program was:" >&5
3064   cat conftest.$ac_ext >&5
3065   rm -rf conftest*
3066   echo "$ac_t""no" 1>&6
3067    after_morecore_hook_exists=no
3068 fi
3069 rm -f conftest*
3070 if test "$system_malloc" = "yes" ; then
3071   GNU_MALLOC=no
3072   GNU_MALLOC_reason="
3073   (The GNU allocators don't work with this system configuration)."
3074 elif test "$with_system_malloc" = "yes" ; then
3075   GNU_MALLOC=no
3076   GNU_MALLOC_reason="
3077   (User chose not to use GNU allocators)."
3078 elif test "$with_debug_malloc" = "yes" ; then
3079   GNU_MALLOC=no
3080   GNU_MALLOC_reason="
3081   (User chose to use Debugging Malloc)."
3082 fi
3083
3084 if test "$doug_lea_malloc" = "yes" ; then
3085   if test "$GNU_MALLOC" = yes ; then
3086     GNU_MALLOC_reason="
3087   (Using Doug Lea's new malloc from the GNU C Library.)"
3088   fi
3089   { test "$extra_verbose" = "yes" && cat << \EOF
3090     Defining DOUG_LEA_MALLOC
3091 EOF
3092 cat >> confdefs.h <<\EOF
3093 #define DOUG_LEA_MALLOC 1
3094 EOF
3095 }
3096
3097   if test "$after_morecore_hook_exists" = "no" ; then
3098     GNU_MALLOC_reason="
3099   (Using Doug Lea's new malloc from the Linux C Library.)"
3100     { test "$extra_verbose" = "yes" && cat << \EOF
3101     Defining _NO_MALLOC_WARNING_
3102 EOF
3103 cat >> confdefs.h <<\EOF
3104 #define _NO_MALLOC_WARNING_ 1
3105 EOF
3106 }
3107
3108   fi
3109   use_minimal_tagbits=yes
3110 fi
3111
3112
3113
3114
3115 # Extract the first word of "ranlib", so it can be a program name with args.
3116 set dummy ranlib; ac_word=$2
3117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3118 echo "configure:3119: checking for $ac_word" >&5
3119
3120 if test -n "$RANLIB"; then
3121   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3122 else
3123   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3124   ac_dummy="$PATH"
3125   for ac_dir in $ac_dummy; do
3126     test -z "$ac_dir" && ac_dir=.
3127     if test -f $ac_dir/$ac_word; then
3128       ac_cv_prog_RANLIB="ranlib"
3129       break
3130     fi
3131   done
3132   IFS="$ac_save_ifs"
3133   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3134 fi
3135 RANLIB="$ac_cv_prog_RANLIB"
3136 if test -n "$RANLIB"; then
3137   echo "$ac_t""$RANLIB" 1>&6
3138 else
3139   echo "$ac_t""no" 1>&6
3140 fi
3141
3142 ac_aux_dir=
3143 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3144   if test -f $ac_dir/install-sh; then
3145     ac_aux_dir=$ac_dir
3146     ac_install_sh="$ac_aux_dir/install-sh -c"
3147     break
3148   elif test -f $ac_dir/install.sh; then
3149     ac_aux_dir=$ac_dir
3150     ac_install_sh="$ac_aux_dir/install.sh -c"
3151     break
3152   fi
3153 done
3154 if test -z "$ac_aux_dir"; then
3155   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3156 fi
3157 ac_config_guess=$ac_aux_dir/config.guess
3158 ac_config_sub=$ac_aux_dir/config.sub
3159 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3160
3161 # Find a good install program.  We prefer a C program (faster),
3162 # so one script is as good as another.  But avoid the broken or
3163 # incompatible versions:
3164 # SysV /etc/install, /usr/sbin/install
3165 # SunOS /usr/etc/install
3166 # IRIX /sbin/install
3167 # AIX /bin/install
3168 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3169 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3170 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3171 # ./install, which can be erroneously created by make from ./install.sh.
3172 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3173 echo "configure:3174: checking for a BSD compatible install" >&5
3174 if test -z "$INSTALL"; then
3175
3176   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3177   for ac_dir in $PATH; do
3178     # Account for people who put trailing slashes in PATH elements.
3179     case "$ac_dir/" in
3180     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3181     *)
3182       # OSF1 and SCO ODT 3.0 have their own names for install.
3183       # Don't use installbsd from OSF since it installs stuff as root
3184       # by default.
3185       for ac_prog in ginstall scoinst install; do
3186         if test -f $ac_dir/$ac_prog; then
3187           if test $ac_prog = install &&
3188             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3189             # AIX install.  It has an incompatible calling convention.
3190             :
3191           else
3192             ac_cv_path_install="$ac_dir/$ac_prog -c"
3193             break 2
3194           fi
3195         fi
3196       done
3197       ;;
3198     esac
3199   done
3200   IFS="$ac_save_IFS"
3201
3202   if test "${ac_cv_path_install+set}" = set; then
3203     INSTALL="$ac_cv_path_install"
3204   else
3205     # As a last resort, use the slow shell script.  We don't cache a
3206     # path for INSTALL within a source directory, because that will
3207     # break other packages using the cache if that directory is
3208     # removed, or if the path is relative.
3209     INSTALL="$ac_install_sh"
3210   fi
3211 fi
3212 echo "$ac_t""$INSTALL" 1>&6
3213
3214 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3215 # It thinks the first close brace ends the variable substitution.
3216 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3217
3218 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3219
3220 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3221
3222 for ac_prog in 'bison -y' byacc
3223 do
3224 # Extract the first word of "$ac_prog", so it can be a program name with args.
3225 set dummy $ac_prog; ac_word=$2
3226 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3227 echo "configure:3228: checking for $ac_word" >&5
3228
3229 if test -n "$YACC"; then
3230   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3231 else
3232   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3233   ac_dummy="$PATH"
3234   for ac_dir in $ac_dummy; do
3235     test -z "$ac_dir" && ac_dir=.
3236     if test -f $ac_dir/$ac_word; then
3237       ac_cv_prog_YACC="$ac_prog"
3238       break
3239     fi
3240   done
3241   IFS="$ac_save_ifs"
3242 fi
3243 YACC="$ac_cv_prog_YACC"
3244 if test -n "$YACC"; then
3245   echo "$ac_t""$YACC" 1>&6
3246 else
3247   echo "$ac_t""no" 1>&6
3248 fi
3249
3250 test -n "$YACC" && break
3251 done
3252 test -n "$YACC" || YACC="yacc"
3253
3254
3255 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3256 do
3257 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3258 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3259 echo "configure:3260: checking for $ac_hdr" >&5
3260
3261 cat > conftest.$ac_ext <<EOF
3262 #line 3263 "configure"
3263 #include "confdefs.h"
3264 #include <$ac_hdr>
3265 EOF
3266 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3267 { (eval echo configure:3268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3268 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3269 if test -z "$ac_err"; then
3270   rm -rf conftest*
3271   eval "ac_cv_header_$ac_safe=yes"
3272 else
3273   echo "$ac_err" >&5
3274   echo "configure: failed program was:" >&5
3275   cat conftest.$ac_ext >&5
3276   rm -rf conftest*
3277   eval "ac_cv_header_$ac_safe=no"
3278 fi
3279 rm -f conftest*
3280 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3281   echo "$ac_t""yes" 1>&6
3282     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3283   { test "$extra_verbose" = "yes" && cat << EOF
3284     Defining $ac_tr_hdr
3285 EOF
3286 cat >> confdefs.h <<EOF
3287 #define $ac_tr_hdr 1
3288 EOF
3289 }
3290  
3291 else
3292   echo "$ac_t""no" 1>&6
3293 fi
3294 done
3295
3296 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3297 do
3298 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3299 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3300 echo "configure:3301: checking for $ac_hdr" >&5
3301
3302 cat > conftest.$ac_ext <<EOF
3303 #line 3304 "configure"
3304 #include "confdefs.h"
3305 #include <$ac_hdr>
3306 EOF
3307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3308 { (eval echo configure:3309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3310 if test -z "$ac_err"; then
3311   rm -rf conftest*
3312   eval "ac_cv_header_$ac_safe=yes"
3313 else
3314   echo "$ac_err" >&5
3315   echo "configure: failed program was:" >&5
3316   cat conftest.$ac_ext >&5
3317   rm -rf conftest*
3318   eval "ac_cv_header_$ac_safe=no"
3319 fi
3320 rm -f conftest*
3321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3322   echo "$ac_t""yes" 1>&6
3323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3324   { test "$extra_verbose" = "yes" && cat << EOF
3325     Defining $ac_tr_hdr
3326 EOF
3327 cat >> confdefs.h <<EOF
3328 #define $ac_tr_hdr 1
3329 EOF
3330 }
3331  
3332 else
3333   echo "$ac_t""no" 1>&6
3334 fi
3335 done
3336
3337 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3338 do
3339 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3340 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3341 echo "configure:3342: checking for $ac_hdr" >&5
3342
3343 cat > conftest.$ac_ext <<EOF
3344 #line 3345 "configure"
3345 #include "confdefs.h"
3346 #include <$ac_hdr>
3347 EOF
3348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3349 { (eval echo configure:3350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3351 if test -z "$ac_err"; then
3352   rm -rf conftest*
3353   eval "ac_cv_header_$ac_safe=yes"
3354 else
3355   echo "$ac_err" >&5
3356   echo "configure: failed program was:" >&5
3357   cat conftest.$ac_ext >&5
3358   rm -rf conftest*
3359   eval "ac_cv_header_$ac_safe=no"
3360 fi
3361 rm -f conftest*
3362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3363   echo "$ac_t""yes" 1>&6
3364     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3365   { test "$extra_verbose" = "yes" && cat << EOF
3366     Defining $ac_tr_hdr
3367 EOF
3368 cat >> confdefs.h <<EOF
3369 #define $ac_tr_hdr 1
3370 EOF
3371 }
3372  
3373 else
3374   echo "$ac_t""no" 1>&6
3375 fi
3376 done
3377
3378 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3379 echo "configure:3380: checking for sys/wait.h that is POSIX.1 compatible" >&5
3380
3381 cat > conftest.$ac_ext <<EOF
3382 #line 3383 "configure"
3383 #include "confdefs.h"
3384 #include <sys/types.h>
3385 #include <sys/wait.h>
3386 #ifndef WEXITSTATUS
3387 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3388 #endif
3389 #ifndef WIFEXITED
3390 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3391 #endif
3392 int main() {
3393 int s;
3394 wait (&s);
3395 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3396 ; return 0; }
3397 EOF
3398 if { (eval echo configure:3399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3399   rm -rf conftest*
3400   ac_cv_header_sys_wait_h=yes
3401 else
3402   echo "configure: failed program was:" >&5
3403   cat conftest.$ac_ext >&5
3404   rm -rf conftest*
3405   ac_cv_header_sys_wait_h=no
3406 fi
3407 rm -f conftest*
3408
3409 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3410 if test $ac_cv_header_sys_wait_h = yes; then
3411   { test "$extra_verbose" = "yes" && cat << \EOF
3412     Defining HAVE_SYS_WAIT_H
3413 EOF
3414 cat >> confdefs.h <<\EOF
3415 #define HAVE_SYS_WAIT_H 1
3416 EOF
3417 }
3418
3419 fi
3420
3421 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3422 echo "configure:3423: checking for ANSI C header files" >&5
3423
3424 cat > conftest.$ac_ext <<EOF
3425 #line 3426 "configure"
3426 #include "confdefs.h"
3427 #include <stdlib.h>
3428 #include <stdarg.h>
3429 #include <string.h>
3430 #include <float.h>
3431 EOF
3432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3433 { (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3435 if test -z "$ac_err"; then
3436   rm -rf conftest*
3437   ac_cv_header_stdc=yes
3438 else
3439   echo "$ac_err" >&5
3440   echo "configure: failed program was:" >&5
3441   cat conftest.$ac_ext >&5
3442   rm -rf conftest*
3443   ac_cv_header_stdc=no
3444 fi
3445 rm -f conftest*
3446
3447 if test $ac_cv_header_stdc = yes; then
3448   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3449 cat > conftest.$ac_ext <<EOF
3450 #line 3451 "configure"
3451 #include "confdefs.h"
3452 #include <string.h>
3453 EOF
3454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3455   egrep "memchr" >/dev/null 2>&1; then
3456   :
3457 else
3458   rm -rf conftest*
3459   ac_cv_header_stdc=no
3460 fi
3461 rm -f conftest*
3462
3463 fi
3464
3465 if test $ac_cv_header_stdc = yes; then
3466   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3467 cat > conftest.$ac_ext <<EOF
3468 #line 3469 "configure"
3469 #include "confdefs.h"
3470 #include <stdlib.h>
3471 EOF
3472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3473   egrep "free" >/dev/null 2>&1; then
3474   :
3475 else
3476   rm -rf conftest*
3477   ac_cv_header_stdc=no
3478 fi
3479 rm -f conftest*
3480
3481 fi
3482
3483 if test $ac_cv_header_stdc = yes; then
3484   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3485 cat > conftest.$ac_ext <<EOF
3486 #line 3487 "configure"
3487 #include "confdefs.h"
3488 #include <ctype.h>
3489 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3490 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3491 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3492 int main () { int i; for (i = 0; i < 256; i++)
3493 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3494 exit (0); }
3495
3496 EOF
3497 if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3498 then
3499   :
3500 else
3501   conftest_rc="$?"
3502   echo "configure: failed program was:" >&5
3503   cat conftest.$ac_ext >&5
3504   rm -fr conftest*
3505   ac_cv_header_stdc=no
3506 fi
3507 rm -fr conftest*
3508 fi
3509
3510 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3511 if test $ac_cv_header_stdc = yes; then
3512   { test "$extra_verbose" = "yes" && cat << \EOF
3513     Defining STDC_HEADERS
3514 EOF
3515 cat >> confdefs.h <<\EOF
3516 #define STDC_HEADERS 1
3517 EOF
3518 }
3519
3520 fi
3521
3522 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3523 echo "configure:3524: checking whether time.h and sys/time.h may both be included" >&5
3524
3525 cat > conftest.$ac_ext <<EOF
3526 #line 3527 "configure"
3527 #include "confdefs.h"
3528 #include <sys/types.h>
3529 #include <sys/time.h>
3530 #include <time.h>
3531 int main() {
3532 struct tm *tp;
3533 ; return 0; }
3534 EOF
3535 if { (eval echo configure:3536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3536   rm -rf conftest*
3537   ac_cv_header_time=yes
3538 else
3539   echo "configure: failed program was:" >&5
3540   cat conftest.$ac_ext >&5
3541   rm -rf conftest*
3542   ac_cv_header_time=no
3543 fi
3544 rm -f conftest*
3545
3546 echo "$ac_t""$ac_cv_header_time" 1>&6
3547 if test $ac_cv_header_time = yes; then
3548   { test "$extra_verbose" = "yes" && cat << \EOF
3549     Defining TIME_WITH_SYS_TIME
3550 EOF
3551 cat >> confdefs.h <<\EOF
3552 #define TIME_WITH_SYS_TIME 1
3553 EOF
3554 }
3555
3556 fi
3557
3558 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3559 echo "configure:3560: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3560
3561 cat > conftest.$ac_ext <<EOF
3562 #line 3563 "configure"
3563 #include "confdefs.h"
3564 #include <sys/types.h>
3565 #include <signal.h>
3566 /* NetBSD declares sys_siglist in unistd.h.  */
3567 #ifdef HAVE_UNISTD_H
3568 #include <unistd.h>
3569 #endif
3570 int main() {
3571 char *msg = *(sys_siglist + 1);
3572 ; return 0; }
3573 EOF
3574 if { (eval echo configure:3575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3575   rm -rf conftest*
3576   ac_cv_decl_sys_siglist=yes
3577 else
3578   echo "configure: failed program was:" >&5
3579   cat conftest.$ac_ext >&5
3580   rm -rf conftest*
3581   ac_cv_decl_sys_siglist=no
3582 fi
3583 rm -f conftest*
3584
3585 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3586 if test $ac_cv_decl_sys_siglist = yes; then
3587   { test "$extra_verbose" = "yes" && cat << \EOF
3588     Defining SYS_SIGLIST_DECLARED
3589 EOF
3590 cat >> confdefs.h <<\EOF
3591 #define SYS_SIGLIST_DECLARED 1
3592 EOF
3593 }
3594
3595 fi
3596
3597
3598 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3599 echo "configure:3600: checking for struct utimbuf" >&5
3600 cat > conftest.$ac_ext <<EOF
3601 #line 3602 "configure"
3602 #include "confdefs.h"
3603 #ifdef TIME_WITH_SYS_TIME
3604 #include <sys/time.h>
3605 #include <time.h>
3606 #else
3607 #ifdef HAVE_SYS_TIME_H
3608 #include <sys/time.h>
3609 #else
3610 #include <time.h>
3611 #endif
3612 #endif
3613 #ifdef HAVE_UTIME_H
3614 #include <utime.h>
3615 #endif
3616 int main() {
3617 static struct utimbuf x; x.actime = x.modtime;
3618 ; return 0; }
3619 EOF
3620 if { (eval echo configure:3621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3621   rm -rf conftest*
3622   echo "$ac_t""yes" 1>&6
3623    { test "$extra_verbose" = "yes" && cat << \EOF
3624     Defining HAVE_STRUCT_UTIMBUF
3625 EOF
3626 cat >> confdefs.h <<\EOF
3627 #define HAVE_STRUCT_UTIMBUF 1
3628 EOF
3629 }
3630
3631 else
3632   echo "configure: failed program was:" >&5
3633   cat conftest.$ac_ext >&5
3634   rm -rf conftest*
3635   echo "$ac_t""no" 1>&6
3636 fi
3637 rm -f conftest*
3638
3639 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3640 echo "configure:3641: checking return type of signal handlers" >&5
3641
3642 cat > conftest.$ac_ext <<EOF
3643 #line 3644 "configure"
3644 #include "confdefs.h"
3645 #include <sys/types.h>
3646 #include <signal.h>
3647 #ifdef signal
3648 #undef signal
3649 #endif
3650 #ifdef __cplusplus
3651 extern "C" void (*signal (int, void (*)(int)))(int);
3652 #else
3653 void (*signal ()) ();
3654 #endif
3655
3656 int main() {
3657 int i;
3658 ; return 0; }
3659 EOF
3660 if { (eval echo configure:3661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3661   rm -rf conftest*
3662   ac_cv_type_signal=void
3663 else
3664   echo "configure: failed program was:" >&5
3665   cat conftest.$ac_ext >&5
3666   rm -rf conftest*
3667   ac_cv_type_signal=int
3668 fi
3669 rm -f conftest*
3670
3671 echo "$ac_t""$ac_cv_type_signal" 1>&6
3672 { test "$extra_verbose" = "yes" && cat << EOF
3673     Defining RETSIGTYPE = $ac_cv_type_signal
3674 EOF
3675 cat >> confdefs.h <<EOF
3676 #define RETSIGTYPE $ac_cv_type_signal
3677 EOF
3678 }
3679
3680
3681 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3682 echo "configure:3683: checking for size_t" >&5
3683
3684 cat > conftest.$ac_ext <<EOF
3685 #line 3686 "configure"
3686 #include "confdefs.h"
3687 #include <sys/types.h>
3688 #if STDC_HEADERS
3689 #include <stdlib.h>
3690 #include <stddef.h>
3691 #endif
3692 EOF
3693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3694   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3695   rm -rf conftest*
3696   ac_cv_type_size_t=yes
3697 else
3698   rm -rf conftest*
3699   ac_cv_type_size_t=no
3700 fi
3701 rm -f conftest*
3702
3703 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3704 if test $ac_cv_type_size_t = no; then
3705   { test "$extra_verbose" = "yes" && cat << \EOF
3706     Defining size_t = unsigned
3707 EOF
3708 cat >> confdefs.h <<\EOF
3709 #define size_t unsigned
3710 EOF
3711 }
3712
3713 fi
3714
3715 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3716 echo "configure:3717: checking for pid_t" >&5
3717
3718 cat > conftest.$ac_ext <<EOF
3719 #line 3720 "configure"
3720 #include "confdefs.h"
3721 #include <sys/types.h>
3722 #if STDC_HEADERS
3723 #include <stdlib.h>
3724 #include <stddef.h>
3725 #endif
3726 EOF
3727 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3728   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3729   rm -rf conftest*
3730   ac_cv_type_pid_t=yes
3731 else
3732   rm -rf conftest*
3733   ac_cv_type_pid_t=no
3734 fi
3735 rm -f conftest*
3736
3737 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3738 if test $ac_cv_type_pid_t = no; then
3739   { test "$extra_verbose" = "yes" && cat << \EOF
3740     Defining pid_t = int
3741 EOF
3742 cat >> confdefs.h <<\EOF
3743 #define pid_t int
3744 EOF
3745 }
3746
3747 fi
3748
3749 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3750 echo "configure:3751: checking for uid_t in sys/types.h" >&5
3751
3752 cat > conftest.$ac_ext <<EOF
3753 #line 3754 "configure"
3754 #include "confdefs.h"
3755 #include <sys/types.h>
3756 EOF
3757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3758   egrep "uid_t" >/dev/null 2>&1; then
3759   rm -rf conftest*
3760   ac_cv_type_uid_t=yes
3761 else
3762   rm -rf conftest*
3763   ac_cv_type_uid_t=no
3764 fi
3765 rm -f conftest*
3766
3767
3768 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3769 if test $ac_cv_type_uid_t = no; then
3770   { test "$extra_verbose" = "yes" && cat << \EOF
3771     Defining uid_t = int
3772 EOF
3773 cat >> confdefs.h <<\EOF
3774 #define uid_t int
3775 EOF
3776 }
3777
3778   { test "$extra_verbose" = "yes" && cat << \EOF
3779     Defining gid_t = int
3780 EOF
3781 cat >> confdefs.h <<\EOF
3782 #define gid_t int
3783 EOF
3784 }
3785
3786 fi
3787
3788 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3789 echo "configure:3790: checking for mode_t" >&5
3790
3791 cat > conftest.$ac_ext <<EOF
3792 #line 3793 "configure"
3793 #include "confdefs.h"
3794 #include <sys/types.h>
3795 #if STDC_HEADERS
3796 #include <stdlib.h>
3797 #include <stddef.h>
3798 #endif
3799 EOF
3800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3801   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3802   rm -rf conftest*
3803   ac_cv_type_mode_t=yes
3804 else
3805   rm -rf conftest*
3806   ac_cv_type_mode_t=no
3807 fi
3808 rm -f conftest*
3809
3810 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3811 if test $ac_cv_type_mode_t = no; then
3812   { test "$extra_verbose" = "yes" && cat << \EOF
3813     Defining mode_t = int
3814 EOF
3815 cat >> confdefs.h <<\EOF
3816 #define mode_t int
3817 EOF
3818 }
3819
3820 fi
3821
3822 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3823 echo "configure:3824: checking for off_t" >&5
3824
3825 cat > conftest.$ac_ext <<EOF
3826 #line 3827 "configure"
3827 #include "confdefs.h"
3828 #include <sys/types.h>
3829 #if STDC_HEADERS
3830 #include <stdlib.h>
3831 #include <stddef.h>
3832 #endif
3833 EOF
3834 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3835   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3836   rm -rf conftest*
3837   ac_cv_type_off_t=yes
3838 else
3839   rm -rf conftest*
3840   ac_cv_type_off_t=no
3841 fi
3842 rm -f conftest*
3843
3844 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3845 if test $ac_cv_type_off_t = no; then
3846   { test "$extra_verbose" = "yes" && cat << \EOF
3847     Defining off_t = long
3848 EOF
3849 cat >> confdefs.h <<\EOF
3850 #define off_t long
3851 EOF
3852 }
3853
3854 fi
3855
3856 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3857 echo "configure:3858: checking for ssize_t" >&5
3858
3859 cat > conftest.$ac_ext <<EOF
3860 #line 3861 "configure"
3861 #include "confdefs.h"
3862 #include <sys/types.h>
3863 #if STDC_HEADERS
3864 #include <stdlib.h>
3865 #include <stddef.h>
3866 #endif
3867 EOF
3868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3869   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3870   rm -rf conftest*
3871   ac_cv_type_ssize_t=yes
3872 else
3873   rm -rf conftest*
3874   ac_cv_type_ssize_t=no
3875 fi
3876 rm -f conftest*
3877
3878 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3879 if test $ac_cv_type_ssize_t = no; then
3880   { test "$extra_verbose" = "yes" && cat << \EOF
3881     Defining ssize_t = int
3882 EOF
3883 cat >> confdefs.h <<\EOF
3884 #define ssize_t int
3885 EOF
3886 }
3887
3888 fi
3889
3890
3891 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3892 echo "configure:3893: checking for struct timeval" >&5
3893 cat > conftest.$ac_ext <<EOF
3894 #line 3895 "configure"
3895 #include "confdefs.h"
3896 #ifdef TIME_WITH_SYS_TIME
3897 #include <sys/time.h>
3898 #include <time.h>
3899 #else
3900 #ifdef HAVE_SYS_TIME_H
3901 #include <sys/time.h>
3902 #else
3903 #include <time.h>
3904 #endif
3905 #endif
3906 int main() {
3907 static struct timeval x; x.tv_sec = x.tv_usec;
3908 ; return 0; }
3909 EOF
3910 if { (eval echo configure:3911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3911   rm -rf conftest*
3912   echo "$ac_t""yes" 1>&6
3913   HAVE_TIMEVAL=yes
3914   { test "$extra_verbose" = "yes" && cat << \EOF
3915     Defining HAVE_TIMEVAL
3916 EOF
3917 cat >> confdefs.h <<\EOF
3918 #define HAVE_TIMEVAL 1
3919 EOF
3920 }
3921
3922 else
3923   echo "configure: failed program was:" >&5
3924   cat conftest.$ac_ext >&5
3925   rm -rf conftest*
3926   echo "$ac_t""no" 1>&6
3927    HAVE_TIMEVAL=no
3928 fi
3929 rm -f conftest*
3930
3931 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3932 echo "configure:3933: checking whether struct tm is in sys/time.h or time.h" >&5
3933
3934 cat > conftest.$ac_ext <<EOF
3935 #line 3936 "configure"
3936 #include "confdefs.h"
3937 #include <sys/types.h>
3938 #include <time.h>
3939 int main() {
3940 struct tm *tp; tp->tm_sec;
3941 ; return 0; }
3942 EOF
3943 if { (eval echo configure:3944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3944   rm -rf conftest*
3945   ac_cv_struct_tm=time.h
3946 else
3947   echo "configure: failed program was:" >&5
3948   cat conftest.$ac_ext >&5
3949   rm -rf conftest*
3950   ac_cv_struct_tm=sys/time.h
3951 fi
3952 rm -f conftest*
3953
3954 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3955 if test $ac_cv_struct_tm = sys/time.h; then
3956   { test "$extra_verbose" = "yes" && cat << \EOF
3957     Defining TM_IN_SYS_TIME
3958 EOF
3959 cat >> confdefs.h <<\EOF
3960 #define TM_IN_SYS_TIME 1
3961 EOF
3962 }
3963
3964 fi
3965
3966 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3967 echo "configure:3968: checking for tm_zone in struct tm" >&5
3968
3969 cat > conftest.$ac_ext <<EOF
3970 #line 3971 "configure"
3971 #include "confdefs.h"
3972 #include <sys/types.h>
3973 #include <$ac_cv_struct_tm>
3974 int main() {
3975 struct tm tm; tm.tm_zone;
3976 ; return 0; }
3977 EOF
3978 if { (eval echo configure:3979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3979   rm -rf conftest*
3980   ac_cv_struct_tm_zone=yes
3981 else
3982   echo "configure: failed program was:" >&5
3983   cat conftest.$ac_ext >&5
3984   rm -rf conftest*
3985   ac_cv_struct_tm_zone=no
3986 fi
3987 rm -f conftest*
3988
3989 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3990 if test "$ac_cv_struct_tm_zone" = yes; then
3991   { test "$extra_verbose" = "yes" && cat << \EOF
3992     Defining HAVE_TM_ZONE
3993 EOF
3994 cat >> confdefs.h <<\EOF
3995 #define HAVE_TM_ZONE 1
3996 EOF
3997 }
3998
3999 else
4000   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4001 echo "configure:4002: checking for tzname" >&5
4002
4003 cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006 #include <time.h>
4007 #ifndef tzname /* For SGI.  */
4008 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4009 #endif
4010 int main() {
4011 atoi(*tzname);
4012 ; return 0; }
4013 EOF
4014 if { (eval echo configure:4015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4015   rm -rf conftest*
4016   ac_cv_var_tzname=yes
4017 else
4018   echo "configure: failed program was:" >&5
4019   cat conftest.$ac_ext >&5
4020   rm -rf conftest*
4021   ac_cv_var_tzname=no
4022 fi
4023 rm -f conftest*
4024
4025 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4026   if test $ac_cv_var_tzname = yes; then
4027     { test "$extra_verbose" = "yes" && cat << \EOF
4028     Defining HAVE_TZNAME
4029 EOF
4030 cat >> confdefs.h <<\EOF
4031 #define HAVE_TZNAME 1
4032 EOF
4033 }
4034
4035   fi
4036 fi
4037
4038
4039 echo $ac_n "checking for working const""... $ac_c" 1>&6
4040 echo "configure:4041: checking for working const" >&5
4041
4042 cat > conftest.$ac_ext <<EOF
4043 #line 4044 "configure"
4044 #include "confdefs.h"
4045
4046 int main() {
4047
4048 /* Ultrix mips cc rejects this.  */
4049 typedef int charset[2]; const charset x = {0,0};
4050 /* SunOS 4.1.1 cc rejects this.  */
4051 char const *const *ccp;
4052 char **p;
4053 /* NEC SVR4.0.2 mips cc rejects this.  */
4054 struct point {int x, y;};
4055 static struct point const zero = {0,0};
4056 /* AIX XL C 1.02.0.0 rejects this.
4057    It does not let you subtract one const X* pointer from another in an arm
4058    of an if-expression whose if-part is not a constant expression */
4059 const char *g = "string";
4060 ccp = &g + (g ? g-g : 0);
4061 /* HPUX 7.0 cc rejects these. */
4062 ++ccp;
4063 p = (char**) ccp;
4064 ccp = (char const *const *) p;
4065 { /* SCO 3.2v4 cc rejects this.  */
4066   char *t;
4067   char const *s = 0 ? (char *) 0 : (char const *) 0;
4068
4069   *t++ = 0;
4070 }
4071 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4072   int x[] = {25, 17};
4073   const int *foo = &x[0];
4074   ++foo;
4075 }
4076 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4077   typedef const int *iptr;
4078   iptr p = 0;
4079   ++p;
4080 }
4081 { /* AIX XL C 1.02.0.0 rejects this saying
4082      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4083   struct s { int j; const int *ap[3]; };
4084   struct s *b; b->j = 5;
4085 }
4086 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4087   const int foo = 10;
4088 }
4089
4090 ; return 0; }
4091 EOF
4092 if { (eval echo configure:4093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4093   rm -rf conftest*
4094   ac_cv_c_const=yes
4095 else
4096   echo "configure: failed program was:" >&5
4097   cat conftest.$ac_ext >&5
4098   rm -rf conftest*
4099   ac_cv_c_const=no
4100 fi
4101 rm -f conftest*
4102
4103 echo "$ac_t""$ac_cv_c_const" 1>&6
4104 if test $ac_cv_c_const = no; then
4105   { test "$extra_verbose" = "yes" && cat << \EOF
4106     Defining const = 
4107 EOF
4108 cat >> confdefs.h <<\EOF
4109 #define const 
4110 EOF
4111 }
4112
4113 fi
4114
4115
4116 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4117 echo "configure:4118: checking whether ${MAKE-make} sets \${MAKE}" >&5
4118 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4119
4120 cat > conftestmake <<\EOF
4121 all:
4122         @echo 'ac_maketemp="${MAKE}"'
4123 EOF
4124 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4125 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4126 if test -n "$ac_maketemp"; then
4127   eval ac_cv_prog_make_${ac_make}_set=yes
4128 else
4129   eval ac_cv_prog_make_${ac_make}_set=no
4130 fi
4131 rm -f conftestmake
4132 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4133   echo "$ac_t""yes" 1>&6
4134   SET_MAKE=
4135 else
4136   echo "$ac_t""no" 1>&6
4137   SET_MAKE="MAKE=${MAKE-make}"
4138 fi
4139
4140
4141 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4142 echo "configure:4143: checking whether byte ordering is bigendian" >&5
4143
4144 ac_cv_c_bigendian=unknown
4145 # See if sys/param.h defines the BYTE_ORDER macro.
4146 cat > conftest.$ac_ext <<EOF
4147 #line 4148 "configure"
4148 #include "confdefs.h"
4149 #include <sys/types.h>
4150 #include <sys/param.h>
4151 int main() {
4152
4153 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4154  bogus endian macros
4155 #endif
4156 ; return 0; }
4157 EOF
4158 if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4159   rm -rf conftest*
4160   # It does; now see whether it defined to BIG_ENDIAN or not.
4161 cat > conftest.$ac_ext <<EOF
4162 #line 4163 "configure"
4163 #include "confdefs.h"
4164 #include <sys/types.h>
4165 #include <sys/param.h>
4166 int main() {
4167
4168 #if BYTE_ORDER != BIG_ENDIAN
4169  not big endian
4170 #endif
4171 ; return 0; }
4172 EOF
4173 if { (eval echo configure:4174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4174   rm -rf conftest*
4175   ac_cv_c_bigendian=yes
4176 else
4177   echo "configure: failed program was:" >&5
4178   cat conftest.$ac_ext >&5
4179   rm -rf conftest*
4180   ac_cv_c_bigendian=no
4181 fi
4182 rm -f conftest*
4183 else
4184   echo "configure: failed program was:" >&5
4185   cat conftest.$ac_ext >&5
4186 fi
4187 rm -f conftest*
4188 if test $ac_cv_c_bigendian = unknown; then
4189 cat > conftest.$ac_ext <<EOF
4190 #line 4191 "configure"
4191 #include "confdefs.h"
4192 main () {
4193   /* Are we little or big endian?  From Harbison&Steele.  */
4194   union
4195   {
4196     long l;
4197     char c[sizeof (long)];
4198   } u;
4199   u.l = 1;
4200   exit (u.c[sizeof (long) - 1] == 1);
4201 }
4202 EOF
4203 if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4204 then
4205   ac_cv_c_bigendian=no
4206 else
4207   conftest_rc="$?"
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -fr conftest*
4211   ac_cv_c_bigendian=yes
4212 fi
4213 rm -fr conftest*
4214 fi
4215
4216 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4217 if test $ac_cv_c_bigendian = yes; then
4218   { test "$extra_verbose" = "yes" && cat << \EOF
4219     Defining WORDS_BIGENDIAN
4220 EOF
4221 cat >> confdefs.h <<\EOF
4222 #define WORDS_BIGENDIAN 1
4223 EOF
4224 }
4225
4226 fi
4227
4228
4229 echo $ac_n "checking size of short""... $ac_c" 1>&6
4230 echo "configure:4231: checking size of short" >&5
4231
4232 cat > conftest.$ac_ext <<EOF
4233 #line 4234 "configure"
4234 #include "confdefs.h"
4235 #include <stdio.h>
4236 main()
4237 {
4238   FILE *f=fopen("conftestval", "w");
4239   if (!f) exit(1);
4240   fprintf(f, "%d\n", sizeof(short));
4241   exit(0);
4242 }
4243 EOF
4244 if { (eval echo configure:4245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4245 then
4246   ac_cv_sizeof_short=`cat conftestval`
4247 else
4248   conftest_rc="$?"
4249   echo "configure: failed program was:" >&5
4250   cat conftest.$ac_ext >&5
4251   rm -fr conftest*
4252   ac_cv_sizeof_short=0
4253 fi
4254 rm -fr conftest*
4255 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4256 { test "$extra_verbose" = "yes" && cat << EOF
4257     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4258 EOF
4259 cat >> confdefs.h <<EOF
4260 #define SIZEOF_SHORT $ac_cv_sizeof_short
4261 EOF
4262 }
4263
4264
4265 if test "$ac_cv_sizeof_short" = 0; then
4266   echo ""
4267   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4268   echo "*** PANIC *** Please examine config.log for compilation errors."
4269   exit 1
4270 fi
4271 echo $ac_n "checking size of int""... $ac_c" 1>&6
4272 echo "configure:4273: checking size of int" >&5
4273
4274 cat > conftest.$ac_ext <<EOF
4275 #line 4276 "configure"
4276 #include "confdefs.h"
4277 #include <stdio.h>
4278 main()
4279 {
4280   FILE *f=fopen("conftestval", "w");
4281   if (!f) exit(1);
4282   fprintf(f, "%d\n", sizeof(int));
4283   exit(0);
4284 }
4285 EOF
4286 if { (eval echo configure:4287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4287 then
4288   ac_cv_sizeof_int=`cat conftestval`
4289 else
4290   conftest_rc="$?"
4291   echo "configure: failed program was:" >&5
4292   cat conftest.$ac_ext >&5
4293   rm -fr conftest*
4294   ac_cv_sizeof_int=0
4295 fi
4296 rm -fr conftest*
4297 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4298 { test "$extra_verbose" = "yes" && cat << EOF
4299     Defining SIZEOF_INT = $ac_cv_sizeof_int
4300 EOF
4301 cat >> confdefs.h <<EOF
4302 #define SIZEOF_INT $ac_cv_sizeof_int
4303 EOF
4304 }
4305
4306
4307 echo $ac_n "checking size of long""... $ac_c" 1>&6
4308 echo "configure:4309: checking size of long" >&5
4309
4310 cat > conftest.$ac_ext <<EOF
4311 #line 4312 "configure"
4312 #include "confdefs.h"
4313 #include <stdio.h>
4314 main()
4315 {
4316   FILE *f=fopen("conftestval", "w");
4317   if (!f) exit(1);
4318   fprintf(f, "%d\n", sizeof(long));
4319   exit(0);
4320 }
4321 EOF
4322 if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4323 then
4324   ac_cv_sizeof_long=`cat conftestval`
4325 else
4326   conftest_rc="$?"
4327   echo "configure: failed program was:" >&5
4328   cat conftest.$ac_ext >&5
4329   rm -fr conftest*
4330   ac_cv_sizeof_long=0
4331 fi
4332 rm -fr conftest*
4333 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4334 { test "$extra_verbose" = "yes" && cat << EOF
4335     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4336 EOF
4337 cat >> confdefs.h <<EOF
4338 #define SIZEOF_LONG $ac_cv_sizeof_long
4339 EOF
4340 }
4341
4342
4343 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4344 echo "configure:4345: checking size of long long" >&5
4345
4346 cat > conftest.$ac_ext <<EOF
4347 #line 4348 "configure"
4348 #include "confdefs.h"
4349 #include <stdio.h>
4350 main()
4351 {
4352   FILE *f=fopen("conftestval", "w");
4353   if (!f) exit(1);
4354   fprintf(f, "%d\n", sizeof(long long));
4355   exit(0);
4356 }
4357 EOF
4358 if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4359 then
4360   ac_cv_sizeof_long_long=`cat conftestval`
4361 else
4362   conftest_rc="$?"
4363   echo "configure: failed program was:" >&5
4364   cat conftest.$ac_ext >&5
4365   rm -fr conftest*
4366   ac_cv_sizeof_long_long=0
4367 fi
4368 rm -fr conftest*
4369 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4370 { test "$extra_verbose" = "yes" && cat << EOF
4371     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4372 EOF
4373 cat >> confdefs.h <<EOF
4374 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4375 EOF
4376 }
4377
4378
4379 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4380 echo "configure:4381: checking size of void *" >&5
4381
4382 cat > conftest.$ac_ext <<EOF
4383 #line 4384 "configure"
4384 #include "confdefs.h"
4385 #include <stdio.h>
4386 main()
4387 {
4388   FILE *f=fopen("conftestval", "w");
4389   if (!f) exit(1);
4390   fprintf(f, "%d\n", sizeof(void *));
4391   exit(0);
4392 }
4393 EOF
4394 if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4395 then
4396   ac_cv_sizeof_void_p=`cat conftestval`
4397 else
4398   conftest_rc="$?"
4399   echo "configure: failed program was:" >&5
4400   cat conftest.$ac_ext >&5
4401   rm -fr conftest*
4402   ac_cv_sizeof_void_p=0
4403 fi
4404 rm -fr conftest*
4405 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4406 { test "$extra_verbose" = "yes" && cat << EOF
4407     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4408 EOF
4409 cat >> confdefs.h <<EOF
4410 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4411 EOF
4412 }
4413
4414
4415
4416 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4417 echo "configure:4418: checking for long file names" >&5
4418
4419 ac_cv_sys_long_file_names=yes
4420 # Test for long file names in all the places we know might matter:
4421 #      .                the current directory, where building will happen
4422 #      $prefix/lib      where we will be installing things
4423 #      $exec_prefix/lib likewise
4424 # eval it to expand exec_prefix.
4425 #      $TMPDIR          if set, where it might want to write temporary files
4426 # if $TMPDIR is not set:
4427 #      /tmp             where it might want to write temporary files
4428 #      /var/tmp         likewise
4429 #      /usr/tmp         likewise
4430 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4431   ac_tmpdirs="$TMPDIR"
4432 else
4433   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4434 fi
4435 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4436   test -d $ac_dir || continue
4437   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4438   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4439   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4440   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4441   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4442     ac_cv_sys_long_file_names=no
4443     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4444     break
4445   fi
4446   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4447 done
4448
4449 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4450 if test $ac_cv_sys_long_file_names = yes; then
4451   { test "$extra_verbose" = "yes" && cat << \EOF
4452     Defining HAVE_LONG_FILE_NAMES
4453 EOF
4454 cat >> confdefs.h <<\EOF
4455 #define HAVE_LONG_FILE_NAMES 1
4456 EOF
4457 }
4458
4459 fi
4460
4461
4462 echo $ac_n "checking for sin""... $ac_c" 1>&6
4463 echo "configure:4464: checking for sin" >&5
4464
4465 cat > conftest.$ac_ext <<EOF
4466 #line 4467 "configure"
4467 #include "confdefs.h"
4468 /* System header to define __stub macros and hopefully few prototypes,
4469     which can conflict with char sin(); below.  */
4470 #include <assert.h>
4471 /* Override any gcc2 internal prototype to avoid an error.  */
4472 /* We use char because int might match the return type of a gcc2
4473     builtin and then its argument prototype would still apply.  */
4474 char sin();
4475
4476 int main() {
4477
4478 /* The GNU C library defines this for functions which it implements
4479     to always fail with ENOSYS.  Some functions are actually named
4480     something starting with __ and the normal name is an alias.  */
4481 #if defined (__stub_sin) || defined (__stub___sin)
4482 choke me
4483 #else
4484 sin();
4485 #endif
4486
4487 ; return 0; }
4488 EOF
4489 if { (eval echo configure:4490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4490   rm -rf conftest*
4491   eval "ac_cv_func_sin=yes"
4492 else
4493   echo "configure: failed program was:" >&5
4494   cat conftest.$ac_ext >&5
4495   rm -rf conftest*
4496   eval "ac_cv_func_sin=no"
4497 fi
4498 rm -f conftest*
4499
4500 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4501   echo "$ac_t""yes" 1>&6
4502   :
4503 else
4504   echo "$ac_t""no" 1>&6
4505
4506 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4507 echo "configure:4508: checking for sin in -lm" >&5
4508 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4509
4510 xe_check_libs=" -lm "
4511 cat > conftest.$ac_ext <<EOF
4512 #line 4513 "configure"
4513 #include "confdefs.h"
4514 /* Override any gcc2 internal prototype to avoid an error.  */
4515 /* We use char because int might match the return type of a gcc2
4516     builtin and then its argument prototype would still apply.  */
4517 char sin();
4518
4519 int main() {
4520 sin()
4521 ; return 0; }
4522 EOF
4523 if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4524   rm -rf conftest*
4525   eval "ac_cv_lib_$ac_lib_var=yes"
4526 else
4527   echo "configure: failed program was:" >&5
4528   cat conftest.$ac_ext >&5
4529   rm -rf conftest*
4530   eval "ac_cv_lib_$ac_lib_var=no"
4531 fi
4532 rm -f conftest*
4533 xe_check_libs=""
4534
4535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4536   echo "$ac_t""yes" 1>&6
4537     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4538     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4539   { test "$extra_verbose" = "yes" && cat << EOF
4540     Defining $ac_tr_lib
4541 EOF
4542 cat >> confdefs.h <<EOF
4543 #define $ac_tr_lib 1
4544 EOF
4545 }
4546
4547   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4548
4549 else
4550   echo "$ac_t""no" 1>&6
4551 fi
4552
4553
4554 fi
4555
4556
4557 { test "$extra_verbose" = "yes" && cat << \EOF
4558     Defining LISP_FLOAT_TYPE
4559 EOF
4560 cat >> confdefs.h <<\EOF
4561 #define LISP_FLOAT_TYPE 1
4562 EOF
4563 }
4564
4565
4566 cat > conftest.$ac_ext <<EOF
4567 #line 4568 "configure"
4568 #include "confdefs.h"
4569 #include <math.h>
4570 int main() {
4571 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4572 ; return 0; }
4573 EOF
4574 if { (eval echo configure:4575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4575   rm -rf conftest*
4576   { test "$extra_verbose" = "yes" && cat << \EOF
4577     Defining HAVE_INVERSE_HYPERBOLIC
4578 EOF
4579 cat >> confdefs.h <<\EOF
4580 #define HAVE_INVERSE_HYPERBOLIC 1
4581 EOF
4582 }
4583
4584 else
4585   echo "configure: failed program was:" >&5
4586   cat conftest.$ac_ext >&5
4587 fi
4588 rm -f conftest*
4589
4590 echo "checking type of mail spool file locking" 1>&6
4591 echo "configure:4592: checking type of mail spool file locking" >&5
4592 for ac_func in lockf flock
4593 do
4594 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4595 echo "configure:4596: checking for $ac_func" >&5
4596
4597 cat > conftest.$ac_ext <<EOF
4598 #line 4599 "configure"
4599 #include "confdefs.h"
4600 /* System header to define __stub macros and hopefully few prototypes,
4601     which can conflict with char $ac_func(); below.  */
4602 #include <assert.h>
4603 /* Override any gcc2 internal prototype to avoid an error.  */
4604 /* We use char because int might match the return type of a gcc2
4605     builtin and then its argument prototype would still apply.  */
4606 char $ac_func();
4607
4608 int main() {
4609
4610 /* The GNU C library defines this for functions which it implements
4611     to always fail with ENOSYS.  Some functions are actually named
4612     something starting with __ and the normal name is an alias.  */
4613 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4614 choke me
4615 #else
4616 $ac_func();
4617 #endif
4618
4619 ; return 0; }
4620 EOF
4621 if { (eval echo configure:4622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4622   rm -rf conftest*
4623   eval "ac_cv_func_$ac_func=yes"
4624 else
4625   echo "configure: failed program was:" >&5
4626   cat conftest.$ac_ext >&5
4627   rm -rf conftest*
4628   eval "ac_cv_func_$ac_func=no"
4629 fi
4630 rm -f conftest*
4631
4632 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4633   echo "$ac_t""yes" 1>&6
4634     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4635   { test "$extra_verbose" = "yes" && cat << EOF
4636     Defining $ac_tr_func
4637 EOF
4638 cat >> confdefs.h <<EOF
4639 #define $ac_tr_func 1
4640 EOF
4641 }
4642  
4643 else
4644   echo "$ac_t""no" 1>&6
4645 fi
4646 done
4647
4648 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4649 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4650 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4651 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4652     Defining MAIL_LOCK_LOCKF
4653 EOF
4654 cat >> confdefs.h <<\EOF
4655 #define MAIL_LOCK_LOCKF 1
4656 EOF
4657 }
4658
4659 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4660     Defining MAIL_LOCK_FLOCK
4661 EOF
4662 cat >> confdefs.h <<\EOF
4663 #define MAIL_LOCK_FLOCK 1
4664 EOF
4665 }
4666
4667 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4668     Defining MAIL_LOCK_LOCKING
4669 EOF
4670 cat >> confdefs.h <<\EOF
4671 #define MAIL_LOCK_LOCKING 1
4672 EOF
4673 }
4674
4675 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4676     Defining MAIL_LOCK_DOT
4677 EOF
4678 cat >> confdefs.h <<\EOF
4679 #define MAIL_LOCK_DOT 1
4680 EOF
4681 }
4682
4683 fi
4684 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4685   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4686 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4687   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4688 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4689   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4690
4691 case "$opsys" in decosf*)
4692   
4693 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4694 echo "configure:4695: checking for cma_open in -lpthreads" >&5
4695 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4696
4697 xe_check_libs=" -lpthreads "
4698 cat > conftest.$ac_ext <<EOF
4699 #line 4700 "configure"
4700 #include "confdefs.h"
4701 /* Override any gcc2 internal prototype to avoid an error.  */
4702 /* We use char because int might match the return type of a gcc2
4703     builtin and then its argument prototype would still apply.  */
4704 char cma_open();
4705
4706 int main() {
4707 cma_open()
4708 ; return 0; }
4709 EOF
4710 if { (eval echo configure:4711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4711   rm -rf conftest*
4712   eval "ac_cv_lib_$ac_lib_var=yes"
4713 else
4714   echo "configure: failed program was:" >&5
4715   cat conftest.$ac_ext >&5
4716   rm -rf conftest*
4717   eval "ac_cv_lib_$ac_lib_var=no"
4718 fi
4719 rm -f conftest*
4720 xe_check_libs=""
4721
4722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4723   echo "$ac_t""yes" 1>&6
4724     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4725     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4726   { test "$extra_verbose" = "yes" && cat << EOF
4727     Defining $ac_tr_lib
4728 EOF
4729 cat >> confdefs.h <<EOF
4730 #define $ac_tr_lib 1
4731 EOF
4732 }
4733
4734   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4735
4736 else
4737   echo "$ac_t""no" 1>&6
4738 fi
4739
4740
4741   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4742     c_switch_site="$c_switch_site -threads" ;;
4743 esac
4744
4745 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4746 echo "configure:4747: checking whether the -xildoff compiler flag is required" >&5
4747 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4748   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4749     then echo "$ac_t""no" 1>&6;
4750     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
4751   fi
4752   else echo "$ac_t""no" 1>&6
4753 fi
4754
4755 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4756   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4757 echo "configure:4758: checking for \"-z ignore\" linker flag" >&5
4758   case "`ld -h 2>&1`" in
4759     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4760       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4761     *) echo "$ac_t""no" 1>&6 ;;
4762   esac
4763 fi
4764
4765
4766 echo "checking "for specified window system"" 1>&6
4767 echo "configure:4768: checking "for specified window system"" >&5
4768
4769 if test "$with_x11" != "no"; then
4770     test "$x_includes $x_libraries" != "NONE NONE" && \
4771    window_system=x11 with_x11=yes
4772
4773         
4774       if test "$x_includes $x_libraries" = "NONE NONE" \
4775     -a -n "$OPENWINHOME" \
4776     -a "$OPENWINHOME" != "/usr/openwin" \
4777     -a -d "$OPENWINHOME"; then
4778       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4779       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4780       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4781   fi
4782
4783   if test "$x_includes" = "NONE"; then
4784                     for dir in "/usr/X11" "/usr/X11R6"; do
4785       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4786     done
4787   fi
4788
4789   if test "$x_libraries" = "NONE"; then
4790     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4791       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4792     done
4793   fi
4794
4795   # If we find X, set shell vars x_includes and x_libraries to the
4796 # paths, otherwise set no_x=yes.
4797 # Uses ac_ vars as temps to allow command line to override cache and checks.
4798 # --without-x overrides everything else, but does not touch the cache.
4799 echo $ac_n "checking for X""... $ac_c" 1>&6
4800 echo "configure:4801: checking for X" >&5
4801
4802 # Check whether --with-x or --without-x was given.
4803 if test "${with_x+set}" = set; then
4804   withval="$with_x"
4805   :
4806 fi
4807
4808 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4809 if test "x$with_x" = xno; then
4810   # The user explicitly disabled X.
4811   have_x=disabled
4812 else
4813   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4814     # Both variables are already set.
4815     have_x=yes
4816   else
4817
4818 # One or both of the vars are not set, and there is no cached value.
4819 ac_x_includes=NO ac_x_libraries=NO
4820 rm -fr conftestdir
4821 if mkdir conftestdir; then
4822   cd conftestdir
4823   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4824   cat > Imakefile <<'EOF'
4825 acfindx:
4826         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4827 EOF
4828   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4829     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4830     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4831     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4832     for ac_extension in a so sl; do
4833       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4834         test -f $ac_im_libdir/libX11.$ac_extension; then
4835         ac_im_usrlibdir=$ac_im_libdir; break
4836       fi
4837     done
4838     # Screen out bogus values from the imake configuration.  They are
4839     # bogus both because they are the default anyway, and because
4840     # using them would break gcc on systems where it needs fixed includes.
4841     case "$ac_im_incroot" in
4842         /usr/include) ;;
4843         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4844     esac
4845     case "$ac_im_usrlibdir" in
4846         /usr/lib | /lib) ;;
4847         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4848     esac
4849   fi
4850   cd ..
4851   rm -fr conftestdir
4852 fi
4853
4854 if test "$ac_x_includes" = NO; then
4855   # Guess where to find include files, by looking for this one X11 .h file.
4856   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4857
4858   # First, try using that file with no special directory specified.
4859 cat > conftest.$ac_ext <<EOF
4860 #line 4861 "configure"
4861 #include "confdefs.h"
4862 #include <$x_direct_test_include>
4863 EOF
4864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4865 { (eval echo configure:4866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4867 if test -z "$ac_err"; then
4868   rm -rf conftest*
4869   # We can compile using X headers with no special include directory.
4870 ac_x_includes=
4871 else
4872   echo "$ac_err" >&5
4873   echo "configure: failed program was:" >&5
4874   cat conftest.$ac_ext >&5
4875   rm -rf conftest*
4876   # Look for the header file in a standard set of common directories.
4877 # Check X11 before X11Rn because it is often a symlink to the current release.
4878   for ac_dir in               \
4879     /usr/X11/include          \
4880     /usr/X11R6/include        \
4881     /usr/X11R5/include        \
4882     /usr/X11R4/include        \
4883                               \
4884     /usr/include/X11          \
4885     /usr/include/X11R6        \
4886     /usr/include/X11R5        \
4887     /usr/include/X11R4        \
4888                               \
4889     /usr/local/X11/include    \
4890     /usr/local/X11R6/include  \
4891     /usr/local/X11R5/include  \
4892     /usr/local/X11R4/include  \
4893                               \
4894     /usr/local/include/X11    \
4895     /usr/local/include/X11R6  \
4896     /usr/local/include/X11R5  \
4897     /usr/local/include/X11R4  \
4898                               \
4899     /usr/X386/include         \
4900     /usr/x386/include         \
4901     /usr/XFree86/include/X11  \
4902                               \
4903     /usr/include              \
4904     /usr/local/include        \
4905     /usr/unsupported/include  \
4906     /usr/athena/include       \
4907     /usr/local/x11r5/include  \
4908     /usr/lpp/Xamples/include  \
4909                               \
4910     /usr/openwin/include      \
4911     /usr/openwin/share/include \
4912     ; \
4913   do
4914     if test -r "$ac_dir/$x_direct_test_include"; then
4915       ac_x_includes=$ac_dir
4916       break
4917     fi
4918   done
4919 fi
4920 rm -f conftest*
4921 fi # $ac_x_includes = NO
4922
4923 if test "$ac_x_libraries" = NO; then
4924   # Check for the libraries.
4925
4926   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4927   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4928
4929   # See if we find them without any special options.
4930   # Don't add to $LIBS permanently.
4931   ac_save_LIBS="$LIBS"
4932   LIBS="-l$x_direct_test_library $LIBS"
4933 cat > conftest.$ac_ext <<EOF
4934 #line 4935 "configure"
4935 #include "confdefs.h"
4936
4937 int main() {
4938 ${x_direct_test_function}()
4939 ; return 0; }
4940 EOF
4941 if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4942   rm -rf conftest*
4943   LIBS="$ac_save_LIBS"
4944 # We can link X programs with no special library path.
4945 ac_x_libraries=
4946 else
4947   echo "configure: failed program was:" >&5
4948   cat conftest.$ac_ext >&5
4949   rm -rf conftest*
4950   LIBS="$ac_save_LIBS"
4951 # First see if replacing the include by lib works.
4952 # Check X11 before X11Rn because it is often a symlink to the current release.
4953 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4954     /usr/X11/lib          \
4955     /usr/X11R6/lib        \
4956     /usr/X11R5/lib        \
4957     /usr/X11R4/lib        \
4958                           \
4959     /usr/lib/X11          \
4960     /usr/lib/X11R6        \
4961     /usr/lib/X11R5        \
4962     /usr/lib/X11R4        \
4963                           \
4964     /usr/local/X11/lib    \
4965     /usr/local/X11R6/lib  \
4966     /usr/local/X11R5/lib  \
4967     /usr/local/X11R4/lib  \
4968                           \
4969     /usr/local/lib/X11    \
4970     /usr/local/lib/X11R6  \
4971     /usr/local/lib/X11R5  \
4972     /usr/local/lib/X11R4  \
4973                           \
4974     /usr/X386/lib         \
4975     /usr/x386/lib         \
4976     /usr/XFree86/lib/X11  \
4977                           \
4978     /usr/lib              \
4979     /usr/local/lib        \
4980     /usr/unsupported/lib  \
4981     /usr/athena/lib       \
4982     /usr/local/x11r5/lib  \
4983     /usr/lpp/Xamples/lib  \
4984     /lib/usr/lib/X11      \
4985                           \
4986     /usr/openwin/lib      \
4987     /usr/openwin/share/lib \
4988     ; \
4989 do
4990   for ac_extension in a so sl; do
4991     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4992       ac_x_libraries=$ac_dir
4993       break 2
4994     fi
4995   done
4996 done
4997 fi
4998 rm -f conftest*
4999 fi # $ac_x_libraries = NO
5000
5001 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5002   # Didn't find X anywhere.  Cache the known absence of X.
5003   ac_cv_have_x="have_x=no"
5004 else
5005   # Record where we found X for the cache.
5006   ac_cv_have_x="have_x=yes \
5007                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5008 fi
5009   fi
5010   eval "$ac_cv_have_x"
5011 fi # $with_x != no
5012
5013 if test "$have_x" != yes; then
5014   echo "$ac_t""$have_x" 1>&6
5015   no_x=yes
5016 else
5017   # If each of the values was on the command line, it overrides each guess.
5018   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5019   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5020   # Update the cache value to reflect the command line values.
5021   ac_cv_have_x="have_x=yes \
5022                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5023   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5024 fi
5025
5026 if test "$no_x" = yes; then
5027   # Not all programs may use this symbol, but it does not hurt to define it.
5028   { test "$extra_verbose" = "yes" && cat << \EOF
5029     Defining X_DISPLAY_MISSING
5030 EOF
5031 cat >> confdefs.h <<\EOF
5032 #define X_DISPLAY_MISSING 1
5033 EOF
5034 }
5035
5036   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5037 else
5038   if test -n "$x_includes"; then
5039     X_CFLAGS="$X_CFLAGS -I$x_includes"
5040   fi
5041
5042   # It would also be nice to do this for all -L options, not just this one.
5043   if test -n "$x_libraries"; then
5044     X_LIBS="$X_LIBS -L$x_libraries"
5045     # For Solaris; some versions of Sun CC require a space after -R and
5046     # others require no space.  Words are not sufficient . . . .
5047     case "`(uname -sr) 2>/dev/null`" in
5048     "SunOS 5"*)
5049       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5050 echo "configure:5051: checking whether -R must be followed by a space" >&5
5051       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5052       cat > conftest.$ac_ext <<EOF
5053 #line 5054 "configure"
5054 #include "confdefs.h"
5055
5056 int main() {
5057
5058 ; return 0; }
5059 EOF
5060 if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5061   rm -rf conftest*
5062   ac_R_nospace=yes
5063 else
5064   echo "configure: failed program was:" >&5
5065   cat conftest.$ac_ext >&5
5066   rm -rf conftest*
5067   ac_R_nospace=no
5068 fi
5069 rm -f conftest*
5070       if test $ac_R_nospace = yes; then
5071         echo "$ac_t""no" 1>&6
5072         X_LIBS="$X_LIBS -R$x_libraries"
5073       else
5074         LIBS="$ac_xsave_LIBS -R $x_libraries"
5075         cat > conftest.$ac_ext <<EOF
5076 #line 5077 "configure"
5077 #include "confdefs.h"
5078
5079 int main() {
5080
5081 ; return 0; }
5082 EOF
5083 if { (eval echo configure:5084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5084   rm -rf conftest*
5085   ac_R_space=yes
5086 else
5087   echo "configure: failed program was:" >&5
5088   cat conftest.$ac_ext >&5
5089   rm -rf conftest*
5090   ac_R_space=no
5091 fi
5092 rm -f conftest*
5093         if test $ac_R_space = yes; then
5094           echo "$ac_t""yes" 1>&6
5095           X_LIBS="$X_LIBS -R $x_libraries"
5096         else
5097           echo "$ac_t""neither works" 1>&6
5098         fi
5099       fi
5100       LIBS="$ac_xsave_LIBS"
5101     esac
5102   fi
5103
5104   # Check for system-dependent libraries X programs must link with.
5105   # Do this before checking for the system-independent R6 libraries
5106   # (-lICE), since we may need -lsocket or whatever for X linking.
5107
5108   if test "$ISC" = yes; then
5109     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5110   else
5111     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5112     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5113     # the Alpha needs dnet_stub (dnet does not exist).
5114     if test "$with_dnet" = "no" ; then
5115 ac_cv_lib_dnet_dnet_ntoa=no
5116 else
5117
5118 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5119 echo "configure:5120: checking for dnet_ntoa in -ldnet" >&5
5120 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5121
5122 xe_check_libs=" -ldnet "
5123 cat > conftest.$ac_ext <<EOF
5124 #line 5125 "configure"
5125 #include "confdefs.h"
5126 /* Override any gcc2 internal prototype to avoid an error.  */
5127 /* We use char because int might match the return type of a gcc2
5128     builtin and then its argument prototype would still apply.  */
5129 char dnet_ntoa();
5130
5131 int main() {
5132 dnet_ntoa()
5133 ; return 0; }
5134 EOF
5135 if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5136   rm -rf conftest*
5137   eval "ac_cv_lib_$ac_lib_var=yes"
5138 else
5139   echo "configure: failed program was:" >&5
5140   cat conftest.$ac_ext >&5
5141   rm -rf conftest*
5142   eval "ac_cv_lib_$ac_lib_var=no"
5143 fi
5144 rm -f conftest*
5145 xe_check_libs=""
5146
5147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5148   echo "$ac_t""yes" 1>&6
5149   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5150 else
5151   echo "$ac_t""no" 1>&6
5152 fi
5153
5154 fi
5155
5156     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5157       
5158 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5159 echo "configure:5160: checking for dnet_ntoa in -ldnet_stub" >&5
5160 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5161
5162 xe_check_libs=" -ldnet_stub "
5163 cat > conftest.$ac_ext <<EOF
5164 #line 5165 "configure"
5165 #include "confdefs.h"
5166 /* Override any gcc2 internal prototype to avoid an error.  */
5167 /* We use char because int might match the return type of a gcc2
5168     builtin and then its argument prototype would still apply.  */
5169 char dnet_ntoa();
5170
5171 int main() {
5172 dnet_ntoa()
5173 ; return 0; }
5174 EOF
5175 if { (eval echo configure:5176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5176   rm -rf conftest*
5177   eval "ac_cv_lib_$ac_lib_var=yes"
5178 else
5179   echo "configure: failed program was:" >&5
5180   cat conftest.$ac_ext >&5
5181   rm -rf conftest*
5182   eval "ac_cv_lib_$ac_lib_var=no"
5183 fi
5184 rm -f conftest*
5185 xe_check_libs=""
5186
5187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5188   echo "$ac_t""yes" 1>&6
5189   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5190 else
5191   echo "$ac_t""no" 1>&6
5192 fi
5193
5194
5195     fi
5196
5197     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5198     # to get the SysV transport functions.
5199     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5200     # needs -lnsl.
5201     # The nsl library prevents programs from opening the X display
5202     # on Irix 5.2, according to dickey@clark.net.
5203     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5204 echo "configure:5205: checking for gethostbyname" >&5
5205
5206 cat > conftest.$ac_ext <<EOF
5207 #line 5208 "configure"
5208 #include "confdefs.h"
5209 /* System header to define __stub macros and hopefully few prototypes,
5210     which can conflict with char gethostbyname(); below.  */
5211 #include <assert.h>
5212 /* Override any gcc2 internal prototype to avoid an error.  */
5213 /* We use char because int might match the return type of a gcc2
5214     builtin and then its argument prototype would still apply.  */
5215 char gethostbyname();
5216
5217 int main() {
5218
5219 /* The GNU C library defines this for functions which it implements
5220     to always fail with ENOSYS.  Some functions are actually named
5221     something starting with __ and the normal name is an alias.  */
5222 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5223 choke me
5224 #else
5225 gethostbyname();
5226 #endif
5227
5228 ; return 0; }
5229 EOF
5230 if { (eval echo configure:5231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5231   rm -rf conftest*
5232   eval "ac_cv_func_gethostbyname=yes"
5233 else
5234   echo "configure: failed program was:" >&5
5235   cat conftest.$ac_ext >&5
5236   rm -rf conftest*
5237   eval "ac_cv_func_gethostbyname=no"
5238 fi
5239 rm -f conftest*
5240
5241 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5242   echo "$ac_t""yes" 1>&6
5243   :
5244 else
5245   echo "$ac_t""no" 1>&6
5246 fi
5247
5248     if test $ac_cv_func_gethostbyname = no; then
5249       
5250 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5251 echo "configure:5252: checking for gethostbyname in -lnsl" >&5
5252 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5253
5254 xe_check_libs=" -lnsl "
5255 cat > conftest.$ac_ext <<EOF
5256 #line 5257 "configure"
5257 #include "confdefs.h"
5258 /* Override any gcc2 internal prototype to avoid an error.  */
5259 /* We use char because int might match the return type of a gcc2
5260     builtin and then its argument prototype would still apply.  */
5261 char gethostbyname();
5262
5263 int main() {
5264 gethostbyname()
5265 ; return 0; }
5266 EOF
5267 if { (eval echo configure:5268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5268   rm -rf conftest*
5269   eval "ac_cv_lib_$ac_lib_var=yes"
5270 else
5271   echo "configure: failed program was:" >&5
5272   cat conftest.$ac_ext >&5
5273   rm -rf conftest*
5274   eval "ac_cv_lib_$ac_lib_var=no"
5275 fi
5276 rm -f conftest*
5277 xe_check_libs=""
5278
5279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5280   echo "$ac_t""yes" 1>&6
5281   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5282 else
5283   echo "$ac_t""no" 1>&6
5284 fi
5285
5286
5287     fi
5288
5289     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5290     # socket/setsockopt and other routines are undefined under SCO ODT
5291     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5292     # on later versions), says simon@lia.di.epfl.ch: it contains
5293     # gethostby* variants that don't use the nameserver (or something).
5294     # -lsocket must be given before -lnsl if both are needed.
5295     # We assume that if connect needs -lnsl, so does gethostbyname.
5296     echo $ac_n "checking for connect""... $ac_c" 1>&6
5297 echo "configure:5298: checking for connect" >&5
5298
5299 cat > conftest.$ac_ext <<EOF
5300 #line 5301 "configure"
5301 #include "confdefs.h"
5302 /* System header to define __stub macros and hopefully few prototypes,
5303     which can conflict with char connect(); below.  */
5304 #include <assert.h>
5305 /* Override any gcc2 internal prototype to avoid an error.  */
5306 /* We use char because int might match the return type of a gcc2
5307     builtin and then its argument prototype would still apply.  */
5308 char connect();
5309
5310 int main() {
5311
5312 /* The GNU C library defines this for functions which it implements
5313     to always fail with ENOSYS.  Some functions are actually named
5314     something starting with __ and the normal name is an alias.  */
5315 #if defined (__stub_connect) || defined (__stub___connect)
5316 choke me
5317 #else
5318 connect();
5319 #endif
5320
5321 ; return 0; }
5322 EOF
5323 if { (eval echo configure:5324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5324   rm -rf conftest*
5325   eval "ac_cv_func_connect=yes"
5326 else
5327   echo "configure: failed program was:" >&5
5328   cat conftest.$ac_ext >&5
5329   rm -rf conftest*
5330   eval "ac_cv_func_connect=no"
5331 fi
5332 rm -f conftest*
5333
5334 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5335   echo "$ac_t""yes" 1>&6
5336   :
5337 else
5338   echo "$ac_t""no" 1>&6
5339 fi
5340
5341     if test $ac_cv_func_connect = no; then
5342       
5343 xe_msg_checking="for connect in -lsocket"
5344 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5345 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5346 echo "configure:5347: checking "$xe_msg_checking"" >&5
5347 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5348
5349 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5350 cat > conftest.$ac_ext <<EOF
5351 #line 5352 "configure"
5352 #include "confdefs.h"
5353 /* Override any gcc2 internal prototype to avoid an error.  */
5354 /* We use char because int might match the return type of a gcc2
5355     builtin and then its argument prototype would still apply.  */
5356 char connect();
5357
5358 int main() {
5359 connect()
5360 ; return 0; }
5361 EOF
5362 if { (eval echo configure:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5363   rm -rf conftest*
5364   eval "ac_cv_lib_$ac_lib_var=yes"
5365 else
5366   echo "configure: failed program was:" >&5
5367   cat conftest.$ac_ext >&5
5368   rm -rf conftest*
5369   eval "ac_cv_lib_$ac_lib_var=no"
5370 fi
5371 rm -f conftest*
5372 xe_check_libs=""
5373
5374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5375   echo "$ac_t""yes" 1>&6
5376   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5377 else
5378   echo "$ac_t""no" 1>&6
5379 fi
5380
5381
5382     fi
5383
5384     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5385     echo $ac_n "checking for remove""... $ac_c" 1>&6
5386 echo "configure:5387: checking for remove" >&5
5387
5388 cat > conftest.$ac_ext <<EOF
5389 #line 5390 "configure"
5390 #include "confdefs.h"
5391 /* System header to define __stub macros and hopefully few prototypes,
5392     which can conflict with char remove(); below.  */
5393 #include <assert.h>
5394 /* Override any gcc2 internal prototype to avoid an error.  */
5395 /* We use char because int might match the return type of a gcc2
5396     builtin and then its argument prototype would still apply.  */
5397 char remove();
5398
5399 int main() {
5400
5401 /* The GNU C library defines this for functions which it implements
5402     to always fail with ENOSYS.  Some functions are actually named
5403     something starting with __ and the normal name is an alias.  */
5404 #if defined (__stub_remove) || defined (__stub___remove)
5405 choke me
5406 #else
5407 remove();
5408 #endif
5409
5410 ; return 0; }
5411 EOF
5412 if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5413   rm -rf conftest*
5414   eval "ac_cv_func_remove=yes"
5415 else
5416   echo "configure: failed program was:" >&5
5417   cat conftest.$ac_ext >&5
5418   rm -rf conftest*
5419   eval "ac_cv_func_remove=no"
5420 fi
5421 rm -f conftest*
5422
5423 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5424   echo "$ac_t""yes" 1>&6
5425   :
5426 else
5427   echo "$ac_t""no" 1>&6
5428 fi
5429
5430     if test $ac_cv_func_remove = no; then
5431       
5432 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5433 echo "configure:5434: checking for remove in -lposix" >&5
5434 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5435
5436 xe_check_libs=" -lposix "
5437 cat > conftest.$ac_ext <<EOF
5438 #line 5439 "configure"
5439 #include "confdefs.h"
5440 /* Override any gcc2 internal prototype to avoid an error.  */
5441 /* We use char because int might match the return type of a gcc2
5442     builtin and then its argument prototype would still apply.  */
5443 char remove();
5444
5445 int main() {
5446 remove()
5447 ; return 0; }
5448 EOF
5449 if { (eval echo configure:5450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5450   rm -rf conftest*
5451   eval "ac_cv_lib_$ac_lib_var=yes"
5452 else
5453   echo "configure: failed program was:" >&5
5454   cat conftest.$ac_ext >&5
5455   rm -rf conftest*
5456   eval "ac_cv_lib_$ac_lib_var=no"
5457 fi
5458 rm -f conftest*
5459 xe_check_libs=""
5460
5461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5462   echo "$ac_t""yes" 1>&6
5463   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5464 else
5465   echo "$ac_t""no" 1>&6
5466 fi
5467
5468
5469     fi
5470
5471     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5472     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5473 echo "configure:5474: checking for shmat" >&5
5474
5475 cat > conftest.$ac_ext <<EOF
5476 #line 5477 "configure"
5477 #include "confdefs.h"
5478 /* System header to define __stub macros and hopefully few prototypes,
5479     which can conflict with char shmat(); below.  */
5480 #include <assert.h>
5481 /* Override any gcc2 internal prototype to avoid an error.  */
5482 /* We use char because int might match the return type of a gcc2
5483     builtin and then its argument prototype would still apply.  */
5484 char shmat();
5485
5486 int main() {
5487
5488 /* The GNU C library defines this for functions which it implements
5489     to always fail with ENOSYS.  Some functions are actually named
5490     something starting with __ and the normal name is an alias.  */
5491 #if defined (__stub_shmat) || defined (__stub___shmat)
5492 choke me
5493 #else
5494 shmat();
5495 #endif
5496
5497 ; return 0; }
5498 EOF
5499 if { (eval echo configure:5500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5500   rm -rf conftest*
5501   eval "ac_cv_func_shmat=yes"
5502 else
5503   echo "configure: failed program was:" >&5
5504   cat conftest.$ac_ext >&5
5505   rm -rf conftest*
5506   eval "ac_cv_func_shmat=no"
5507 fi
5508 rm -f conftest*
5509
5510 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5511   echo "$ac_t""yes" 1>&6
5512   :
5513 else
5514   echo "$ac_t""no" 1>&6
5515 fi
5516
5517     if test $ac_cv_func_shmat = no; then
5518       
5519 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5520 echo "configure:5521: checking for shmat in -lipc" >&5
5521 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5522
5523 xe_check_libs=" -lipc "
5524 cat > conftest.$ac_ext <<EOF
5525 #line 5526 "configure"
5526 #include "confdefs.h"
5527 /* Override any gcc2 internal prototype to avoid an error.  */
5528 /* We use char because int might match the return type of a gcc2
5529     builtin and then its argument prototype would still apply.  */
5530 char shmat();
5531
5532 int main() {
5533 shmat()
5534 ; return 0; }
5535 EOF
5536 if { (eval echo configure:5537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5537   rm -rf conftest*
5538   eval "ac_cv_lib_$ac_lib_var=yes"
5539 else
5540   echo "configure: failed program was:" >&5
5541   cat conftest.$ac_ext >&5
5542   rm -rf conftest*
5543   eval "ac_cv_lib_$ac_lib_var=no"
5544 fi
5545 rm -f conftest*
5546 xe_check_libs=""
5547
5548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5549   echo "$ac_t""yes" 1>&6
5550   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5551 else
5552   echo "$ac_t""no" 1>&6
5553 fi
5554
5555
5556     fi
5557   fi
5558
5559   # Check for libraries that X11R6 Xt/Xaw programs need.
5560   ac_save_LDFLAGS="$LDFLAGS"
5561   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5562   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5563   # check for ICE first), but we must link in the order -lSM -lICE or
5564   # we get undefined symbols.  So assume we have SM if we have ICE.
5565   # These have to be linked with before -lX11, unlike the other
5566   # libraries we check for below, so use a different variable.
5567   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5568   
5569 xe_msg_checking="for IceConnectionNumber in -lICE"
5570 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5571 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5572 echo "configure:5573: checking "$xe_msg_checking"" >&5
5573 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5574
5575 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5576 cat > conftest.$ac_ext <<EOF
5577 #line 5578 "configure"
5578 #include "confdefs.h"
5579 /* Override any gcc2 internal prototype to avoid an error.  */
5580 /* We use char because int might match the return type of a gcc2
5581     builtin and then its argument prototype would still apply.  */
5582 char IceConnectionNumber();
5583
5584 int main() {
5585 IceConnectionNumber()
5586 ; return 0; }
5587 EOF
5588 if { (eval echo configure:5589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5589   rm -rf conftest*
5590   eval "ac_cv_lib_$ac_lib_var=yes"
5591 else
5592   echo "configure: failed program was:" >&5
5593   cat conftest.$ac_ext >&5
5594   rm -rf conftest*
5595   eval "ac_cv_lib_$ac_lib_var=no"
5596 fi
5597 rm -f conftest*
5598 xe_check_libs=""
5599
5600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5601   echo "$ac_t""yes" 1>&6
5602   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5603 else
5604   echo "$ac_t""no" 1>&6
5605 fi
5606
5607
5608   LDFLAGS="$ac_save_LDFLAGS"
5609
5610 fi
5611  # Autoconf claims to find X library and include dirs for us.
5612   if test "$no_x" = "yes"
5613   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5614   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5615   fi
5616 fi
5617
5618 case "$with_x11" in
5619   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5620   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5621 esac
5622
5623 if test "$with_x11" = "yes"; then
5624   { test "$extra_verbose" = "yes" && cat << \EOF
5625     Defining HAVE_X_WINDOWS
5626 EOF
5627 cat >> confdefs.h <<\EOF
5628 #define HAVE_X_WINDOWS 1
5629 EOF
5630 }
5631
5632   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5633   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5634
5635       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5636     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5637     if test -d "$lib_dir" -a -d "$inc_dir"; then
5638       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5639         x_libraries="$lib_dir $x_libraries"
5640         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5641       esac
5642       case "$x_includes" in "$inc_dir"* ) ;; *)
5643         x_includes="$inc_dir $x_includes"
5644         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5645       esac
5646       break;       fi
5647   done
5648
5649     for rel in "X11R6" "X11R5" "X11R4"; do
5650     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5651     if test -d "$lib_dir" -a -d "$inc_dir"; then
5652       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5653         x_libraries="$x_libraries $lib_dir"
5654         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5655       esac
5656       case "$x_includes" in "$inc_dir"* ) ;; *)
5657         x_includes="$x_includes $inc_dir"
5658         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5659       esac
5660       break;     fi
5661   done
5662
5663     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
5664
5665   ld_switch_x_site="$X_LIBS"
5666
5667   
5668 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5669     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5670   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5671   
5672         runpath="" runpath_dirs=""
5673   if test -n "$LD_RUN_PATH"; then
5674     runpath="$LD_RUN_PATH"
5675   elif test "$GCC" = "yes"; then
5676         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5677     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5678     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5679     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5680       case "$arg" in P,* | -L* | -R* )
5681         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5682           {
5683 xe_runpath_dir="$dir"
5684   test "$xe_runpath_dir" != "/lib"     -a \
5685         "$xe_runpath_dir" != "/usr/lib" -a \
5686         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5687   eval "$xe_add_unique_runpath_dir"
5688 }
5689         done ;;
5690       esac
5691     done
5692     ld_switch_run="$ld_switch_run_save"
5693     rm -f conftest*
5694   else
5695         for arg in $ld_switch_site $ld_switch_x_site; do
5696       case "$arg" in -L*) {
5697 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5698   test "$xe_runpath_dir" != "/lib"     -a \
5699         "$xe_runpath_dir" != "/usr/lib" -a \
5700         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5701   eval "$xe_add_unique_runpath_dir"
5702 };; esac
5703     done
5704         if test "$opsys $need_motif" = "sol2 yes"; then
5705       xe_runpath_dir="/opt/SUNWdt/lib";
5706       eval "$xe_add_unique_runpath_dir";
5707     fi
5708   fi 
5709   if test -n "$runpath"; then
5710     ld_switch_run="${dash_r}${runpath}"
5711     
5712 if test "$GCC" = "yes"; then
5713   set x $ld_switch_run; shift; ld_switch_run=""
5714   while test -n "$1"; do
5715     case $1 in
5716       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5717       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5718       -Xlinker* ) ;;
5719       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5720     esac
5721     shift
5722   done
5723 fi
5724     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5725   fi
5726 fi
5727
5728
5729   if test "$extra_verbose" = "yes"; then
5730     echo; echo "X11 compilation variables:"
5731     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5732     echo
5733   fi
5734
5735             bitmapdirs=
5736   if test "$x_includes" != NONE; then
5737     for i in $x_includes; do
5738       if test -d "$i/bitmaps"; then
5739         bitmapdirs="$i/bitmaps:$bitmapdirs"
5740       fi
5741       if test -d "$i/X11/bitmaps"; then
5742         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5743       fi
5744     done
5745     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5746   fi
5747   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5748     Defining BITMAPDIR = "$bitmapdirs"
5749 EOF
5750 cat >> confdefs.h <<EOF
5751 #define BITMAPDIR "$bitmapdirs"
5752 EOF
5753 }
5754
5755
5756     echo "checking for X defines extracted by xmkmf" 1>&6
5757 echo "configure:5758: checking for X defines extracted by xmkmf" >&5
5758   rm -fr conftestdir
5759   if mkdir conftestdir; then
5760     cd conftestdir
5761     cat > Imakefile <<'EOF'
5762 xetest:
5763         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5764 EOF
5765     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5766       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5767       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5768     fi
5769     cd ..
5770     rm -fr conftestdir
5771     for word in $xmkmf_defines; do
5772       case "$word" in
5773         -D*=* ) ;;
5774         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5775               { test "$extra_verbose" = "yes" && cat << EOF
5776     Defining $word
5777 EOF
5778 cat >> confdefs.h <<EOF
5779 #define $word 1
5780 EOF
5781 }
5782  ;;
5783       esac
5784     done
5785   fi
5786
5787     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5788 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5789 echo "configure:5790: checking for X11/Intrinsic.h" >&5
5790
5791 cat > conftest.$ac_ext <<EOF
5792 #line 5793 "configure"
5793 #include "confdefs.h"
5794 #include <X11/Intrinsic.h>
5795 EOF
5796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5797 { (eval echo configure:5798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5799 if test -z "$ac_err"; then
5800   rm -rf conftest*
5801   eval "ac_cv_header_$ac_safe=yes"
5802 else
5803   echo "$ac_err" >&5
5804   echo "configure: failed program was:" >&5
5805   cat conftest.$ac_ext >&5
5806   rm -rf conftest*
5807   eval "ac_cv_header_$ac_safe=no"
5808 fi
5809 rm -f conftest*
5810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5811   echo "$ac_t""yes" 1>&6
5812   :
5813 else
5814   echo "$ac_t""no" 1>&6
5815 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5816 fi
5817
5818
5819       
5820 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5821 echo "configure:5822: checking for XOpenDisplay in -lX11" >&5
5822 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5823
5824 xe_check_libs=" -lX11 "
5825 cat > conftest.$ac_ext <<EOF
5826 #line 5827 "configure"
5827 #include "confdefs.h"
5828 /* Override any gcc2 internal prototype to avoid an error.  */
5829 /* We use char because int might match the return type of a gcc2
5830     builtin and then its argument prototype would still apply.  */
5831 char XOpenDisplay();
5832
5833 int main() {
5834 XOpenDisplay()
5835 ; return 0; }
5836 EOF
5837 if { (eval echo configure:5838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5838   rm -rf conftest*
5839   eval "ac_cv_lib_$ac_lib_var=yes"
5840 else
5841   echo "configure: failed program was:" >&5
5842   cat conftest.$ac_ext >&5
5843   rm -rf conftest*
5844   eval "ac_cv_lib_$ac_lib_var=no"
5845 fi
5846 rm -f conftest*
5847 xe_check_libs=""
5848
5849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5850   echo "$ac_t""yes" 1>&6
5851   have_lib_x11=yes
5852 else
5853   echo "$ac_t""no" 1>&6
5854 fi
5855
5856
5857   if test "$have_lib_x11" != "yes"; then
5858     
5859 xe_msg_checking="for XGetFontProperty in -lX11"
5860 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5861 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5862 echo "configure:5863: checking "$xe_msg_checking"" >&5
5863 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5864
5865 xe_check_libs=" -lX11 -b i486-linuxaout"
5866 cat > conftest.$ac_ext <<EOF
5867 #line 5868 "configure"
5868 #include "confdefs.h"
5869 /* Override any gcc2 internal prototype to avoid an error.  */
5870 /* We use char because int might match the return type of a gcc2
5871     builtin and then its argument prototype would still apply.  */
5872 char XGetFontProperty();
5873
5874 int main() {
5875 XGetFontProperty()
5876 ; return 0; }
5877 EOF
5878 if { (eval echo configure:5879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5879   rm -rf conftest*
5880   eval "ac_cv_lib_$ac_lib_var=yes"
5881 else
5882   echo "configure: failed program was:" >&5
5883   cat conftest.$ac_ext >&5
5884   rm -rf conftest*
5885   eval "ac_cv_lib_$ac_lib_var=no"
5886 fi
5887 rm -f conftest*
5888 xe_check_libs=""
5889
5890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5891   echo "$ac_t""yes" 1>&6
5892   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5893 else
5894   echo "$ac_t""no" 1>&6
5895 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5896 fi
5897
5898
5899   fi
5900   libs_x="-lX11"
5901   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5902
5903     
5904 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5905 echo "configure:5906: checking for XShapeSelectInput in -lXext" >&5
5906 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5907
5908 xe_check_libs=" -lXext "
5909 cat > conftest.$ac_ext <<EOF
5910 #line 5911 "configure"
5911 #include "confdefs.h"
5912 /* Override any gcc2 internal prototype to avoid an error.  */
5913 /* We use char because int might match the return type of a gcc2
5914     builtin and then its argument prototype would still apply.  */
5915 char XShapeSelectInput();
5916
5917 int main() {
5918 XShapeSelectInput()
5919 ; return 0; }
5920 EOF
5921 if { (eval echo configure:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5922   rm -rf conftest*
5923   eval "ac_cv_lib_$ac_lib_var=yes"
5924 else
5925   echo "configure: failed program was:" >&5
5926   cat conftest.$ac_ext >&5
5927   rm -rf conftest*
5928   eval "ac_cv_lib_$ac_lib_var=no"
5929 fi
5930 rm -f conftest*
5931 xe_check_libs=""
5932
5933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5934   echo "$ac_t""yes" 1>&6
5935   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5936 else
5937   echo "$ac_t""no" 1>&6
5938 fi
5939
5940
5941
5942     
5943 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5944 echo "configure:5945: checking for XtOpenDisplay in -lXt" >&5
5945 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5946
5947 xe_check_libs=" -lXt "
5948 cat > conftest.$ac_ext <<EOF
5949 #line 5950 "configure"
5950 #include "confdefs.h"
5951 /* Override any gcc2 internal prototype to avoid an error.  */
5952 /* We use char because int might match the return type of a gcc2
5953     builtin and then its argument prototype would still apply.  */
5954 char XtOpenDisplay();
5955
5956 int main() {
5957 XtOpenDisplay()
5958 ; return 0; }
5959 EOF
5960 if { (eval echo configure:5961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5961   rm -rf conftest*
5962   eval "ac_cv_lib_$ac_lib_var=yes"
5963 else
5964   echo "configure: failed program was:" >&5
5965   cat conftest.$ac_ext >&5
5966   rm -rf conftest*
5967   eval "ac_cv_lib_$ac_lib_var=no"
5968 fi
5969 rm -f conftest*
5970 xe_check_libs=""
5971
5972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5973   echo "$ac_t""yes" 1>&6
5974   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5975 else
5976   echo "$ac_t""no" 1>&6
5977 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5978 fi
5979
5980
5981
5982   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5983 echo "configure:5984: checking the version of X11 being used" >&5
5984   cat > conftest.$ac_ext <<EOF
5985 #line 5986 "configure"
5986 #include "confdefs.h"
5987 #include <X11/Intrinsic.h>
5988     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5989 EOF
5990 if { (eval echo configure:5991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5991 then
5992   ./conftest foobar; x11_release=$?
5993 else
5994   conftest_rc="$?"
5995   echo "configure: failed program was:" >&5
5996   cat conftest.$ac_ext >&5
5997   rm -fr conftest*
5998   x11_release=4
5999 fi
6000 rm -fr conftest*
6001   echo "$ac_t""R${x11_release}" 1>&6
6002   { test "$extra_verbose" = "yes" && cat << EOF
6003     Defining THIS_IS_X11R${x11_release}
6004 EOF
6005 cat >> confdefs.h <<EOF
6006 #define THIS_IS_X11R${x11_release} 1
6007 EOF
6008 }
6009
6010
6011   for ac_hdr in X11/Xlocale.h
6012 do
6013 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6014 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6015 echo "configure:6016: checking for $ac_hdr" >&5
6016
6017 cat > conftest.$ac_ext <<EOF
6018 #line 6019 "configure"
6019 #include "confdefs.h"
6020 #include <$ac_hdr>
6021 EOF
6022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6023 { (eval echo configure:6024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6025 if test -z "$ac_err"; then
6026   rm -rf conftest*
6027   eval "ac_cv_header_$ac_safe=yes"
6028 else
6029   echo "$ac_err" >&5
6030   echo "configure: failed program was:" >&5
6031   cat conftest.$ac_ext >&5
6032   rm -rf conftest*
6033   eval "ac_cv_header_$ac_safe=no"
6034 fi
6035 rm -f conftest*
6036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6037   echo "$ac_t""yes" 1>&6
6038     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6039   { test "$extra_verbose" = "yes" && cat << EOF
6040     Defining $ac_tr_hdr
6041 EOF
6042 cat >> confdefs.h <<EOF
6043 #define $ac_tr_hdr 1
6044 EOF
6045 }
6046  
6047 else
6048   echo "$ac_t""no" 1>&6
6049 fi
6050 done
6051
6052
6053     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6054 echo "configure:6055: checking for XFree86" >&5
6055   if test -d "/usr/X386/include" -o \
6056           -f "/etc/XF86Config"    -o \
6057           -f "/etc/X11/XF86Config" -o \
6058           -f "/usr/X11R6/lib/X11/XF86Config"; then
6059     echo "$ac_t""yes" 1>&6
6060     { test "$extra_verbose" = "yes" && cat << \EOF
6061     Defining HAVE_XFREE386
6062 EOF
6063 cat >> confdefs.h <<\EOF
6064 #define HAVE_XFREE386 1
6065 EOF
6066 }
6067
6068   else
6069     echo "$ac_t""no" 1>&6
6070   fi
6071
6072     test -z "$with_xmu" && { 
6073 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6074 echo "configure:6075: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6075 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6076
6077 xe_check_libs=" -lXmu "
6078 cat > conftest.$ac_ext <<EOF
6079 #line 6080 "configure"
6080 #include "confdefs.h"
6081 /* Override any gcc2 internal prototype to avoid an error.  */
6082 /* We use char because int might match the return type of a gcc2
6083     builtin and then its argument prototype would still apply.  */
6084 char XmuReadBitmapDataFromFile();
6085
6086 int main() {
6087 XmuReadBitmapDataFromFile()
6088 ; return 0; }
6089 EOF
6090 if { (eval echo configure:6091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6091   rm -rf conftest*
6092   eval "ac_cv_lib_$ac_lib_var=yes"
6093 else
6094   echo "configure: failed program was:" >&5
6095   cat conftest.$ac_ext >&5
6096   rm -rf conftest*
6097   eval "ac_cv_lib_$ac_lib_var=no"
6098 fi
6099 rm -f conftest*
6100 xe_check_libs=""
6101
6102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6103   echo "$ac_t""yes" 1>&6
6104   with_xmu=yes
6105 else
6106   echo "$ac_t""no" 1>&6
6107 with_xmu=no
6108 fi
6109
6110  }
6111   if test "$with_xmu" = "no"; then
6112     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6113    echo "    xemacs will be linked with \"xmu.o\""
6114  fi
6115   else
6116     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6117     { test "$extra_verbose" = "yes" && cat << \EOF
6118     Defining HAVE_XMU
6119 EOF
6120 cat >> confdefs.h <<\EOF
6121 #define HAVE_XMU 1
6122 EOF
6123 }
6124
6125   fi
6126
6127       
6128 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6129 echo "configure:6130: checking for main in -lXbsd" >&5
6130 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6131
6132 xe_check_libs=" -lXbsd "
6133 cat > conftest.$ac_ext <<EOF
6134 #line 6135 "configure"
6135 #include "confdefs.h"
6136
6137 int main() {
6138 main()
6139 ; return 0; }
6140 EOF
6141 if { (eval echo configure:6142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6142   rm -rf conftest*
6143   eval "ac_cv_lib_$ac_lib_var=yes"
6144 else
6145   echo "configure: failed program was:" >&5
6146   cat conftest.$ac_ext >&5
6147   rm -rf conftest*
6148   eval "ac_cv_lib_$ac_lib_var=no"
6149 fi
6150 rm -f conftest*
6151 xe_check_libs=""
6152
6153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6154   echo "$ac_t""yes" 1>&6
6155   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6156 else
6157   echo "$ac_t""no" 1>&6
6158 fi
6159
6160
6161
6162     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6163         if test "$GCC" = "yes"; then
6164       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6165       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6166     else
6167       case "$CC" in
6168         "xlc" ) CC="xlc_r" ;;
6169         "xlC" ) CC="xlC_r" ;;
6170         "cc"  ) CC="cc_r" ;;
6171       esac
6172     fi
6173   fi
6174
6175 fi 
6176 if test "$with_msw" != "no"; then
6177   echo "checking for MS-Windows" 1>&6
6178 echo "configure:6179: checking for MS-Windows" >&5
6179   
6180 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6181 echo "configure:6182: checking for main in -lgdi32" >&5
6182 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6183
6184 xe_check_libs=" -lgdi32 "
6185 cat > conftest.$ac_ext <<EOF
6186 #line 6187 "configure"
6187 #include "confdefs.h"
6188
6189 int main() {
6190 main()
6191 ; return 0; }
6192 EOF
6193 if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6194   rm -rf conftest*
6195   eval "ac_cv_lib_$ac_lib_var=yes"
6196 else
6197   echo "configure: failed program was:" >&5
6198   cat conftest.$ac_ext >&5
6199   rm -rf conftest*
6200   eval "ac_cv_lib_$ac_lib_var=no"
6201 fi
6202 rm -f conftest*
6203 xe_check_libs=""
6204
6205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6206   echo "$ac_t""yes" 1>&6
6207   with_msw=yes
6208 else
6209   echo "$ac_t""no" 1>&6
6210 fi
6211
6212
6213   if test "$with_msw" = "yes"; then
6214     { test "$extra_verbose" = "yes" && cat << \EOF
6215     Defining HAVE_MS_WINDOWS
6216 EOF
6217 cat >> confdefs.h <<\EOF
6218 #define HAVE_MS_WINDOWS 1
6219 EOF
6220 }
6221
6222     install_pp="$blddir/lib-src/installexe.sh"
6223     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
6224     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6225     if test "$window_system" != x11; then
6226         window_system=msw
6227         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6228             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6229    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6230  fi
6231         test "$with_menubars"   != "no" && with_menubars=msw \
6232             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6233    echo "    xemacs will be linked with \"menubar-msw.o\""
6234  fi
6235         test "$with_toolbars"   != "no" && with_toolbars=msw \
6236             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6237    echo "    xemacs will be linked with \"toolbar-msw.o\""
6238  fi
6239         test "$with_dialogs"   != "no" && with_dialogs=msw \
6240             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6241    echo "    xemacs will be linked with \"dialog-msw.o\""
6242  fi
6243         test "$with_widgets"   != "no" && with_widgets=msw
6244     else
6245         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6246    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6247  fi
6248         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6249    echo "    xemacs will be linked with \"menubar-msw.o\""
6250  fi
6251         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6252    echo "    xemacs will be linked with \"toolbar-msw.o\""
6253  fi
6254         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6255    echo "    xemacs will be linked with \"dialog-msw.o\""
6256  fi
6257     fi
6258         cat > conftest.$ac_ext <<EOF
6259 #line 6260 "configure"
6260 #include "confdefs.h"
6261 #include <fcntl.h>
6262     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6263 EOF
6264 if { (eval echo configure:6265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6265 then
6266   { test "$extra_verbose" = "yes" && cat << \EOF
6267     Defining HAVE_MSG_SELECT
6268 EOF
6269 cat >> confdefs.h <<\EOF
6270 #define HAVE_MSG_SELECT 1
6271 EOF
6272 }
6273
6274 else
6275   conftest_rc="$?"
6276   echo "configure: failed program was:" >&5
6277   cat conftest.$ac_ext >&5
6278 fi
6279 rm -fr conftest*
6280     const_is_losing=no
6281     with_file_coding=yes
6282     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
6283    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\""
6284  fi
6285   fi
6286 fi
6287
6288
6289
6290 test -z "$window_system" && window_system="none"
6291
6292 if test "$window_system" = "none"; then
6293   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6294   do
6295     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6296        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6297     fi
6298     eval "with_${feature}=no"
6299   done
6300 else
6301   test -z "$with_toolbars" && with_toolbars=yes
6302 fi
6303
6304 if test "$with_msw" != "yes"; then
6305   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6306   do
6307     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6308        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6309     fi
6310     eval "with_${feature}=no"
6311   done
6312 else
6313   :
6314 fi
6315
6316 if test "$with_x11" != "yes"; then
6317             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6318   do
6319     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6320        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6321     fi
6322     eval "with_${feature}=no"
6323   done
6324 fi
6325
6326 bitmapdir=
6327
6328 case "$window_system" in
6329   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6330   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6331   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6332 esac
6333
6334 case "$x_libraries" in *X11R4* )
6335   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6336   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6337 esac
6338
6339 echo "checking for WM_COMMAND option" 1>&6
6340 echo "configure:6341: checking for WM_COMMAND option" >&5;
6341 if test "$with_wmcommand" != "no"; then
6342   { test "$extra_verbose" = "yes" && cat << \EOF
6343     Defining HAVE_WMCOMMAND
6344 EOF
6345 cat >> confdefs.h <<\EOF
6346 #define HAVE_WMCOMMAND 1
6347 EOF
6348 }
6349
6350 fi
6351
6352 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6353 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6354 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6355 echo "configure:6356: checking for X11/Xauth.h" >&5
6356
6357 cat > conftest.$ac_ext <<EOF
6358 #line 6359 "configure"
6359 #include "confdefs.h"
6360 #include <X11/Xauth.h>
6361 EOF
6362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6363 { (eval echo configure:6364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6364 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6365 if test -z "$ac_err"; then
6366   rm -rf conftest*
6367   eval "ac_cv_header_$ac_safe=yes"
6368 else
6369   echo "$ac_err" >&5
6370   echo "configure: failed program was:" >&5
6371   cat conftest.$ac_ext >&5
6372   rm -rf conftest*
6373   eval "ac_cv_header_$ac_safe=no"
6374 fi
6375 rm -f conftest*
6376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6377   echo "$ac_t""yes" 1>&6
6378   :
6379 else
6380   echo "$ac_t""no" 1>&6
6381 with_xauth=no
6382 fi
6383  }
6384 test -z "$with_xauth" && { 
6385 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6386 echo "configure:6387: checking for XauGetAuthByAddr in -lXau" >&5
6387 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6388
6389 xe_check_libs=" -lXau "
6390 cat > conftest.$ac_ext <<EOF
6391 #line 6392 "configure"
6392 #include "confdefs.h"
6393 /* Override any gcc2 internal prototype to avoid an error.  */
6394 /* We use char because int might match the return type of a gcc2
6395     builtin and then its argument prototype would still apply.  */
6396 char XauGetAuthByAddr();
6397
6398 int main() {
6399 XauGetAuthByAddr()
6400 ; return 0; }
6401 EOF
6402 if { (eval echo configure:6403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6403   rm -rf conftest*
6404   eval "ac_cv_lib_$ac_lib_var=yes"
6405 else
6406   echo "configure: failed program was:" >&5
6407   cat conftest.$ac_ext >&5
6408   rm -rf conftest*
6409   eval "ac_cv_lib_$ac_lib_var=no"
6410 fi
6411 rm -f conftest*
6412 xe_check_libs=""
6413
6414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6415   echo "$ac_t""yes" 1>&6
6416   :
6417 else
6418   echo "$ac_t""no" 1>&6
6419 with_xauth=no
6420 fi
6421
6422  }
6423 test -z "$with_xauth" && with_xauth=yes
6424 if test "$with_xauth" = "yes"; then
6425   { test "$extra_verbose" = "yes" && cat << \EOF
6426     Defining HAVE_XAUTH
6427 EOF
6428 cat >> confdefs.h <<\EOF
6429 #define HAVE_XAUTH 1
6430 EOF
6431 }
6432
6433   
6434 T=""
6435 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
6436 libs_xauth="$T"
6437
6438 fi
6439
6440
6441
6442
6443 if test "$with_tooltalk" != "no" ; then
6444       for dir in "" "Tt/" "desktop/" ; do
6445     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6446 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6447 echo "configure:6448: checking for ${dir}tt_c.h" >&5
6448
6449 cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452 #include <${dir}tt_c.h>
6453 EOF
6454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6455 { (eval echo configure:6456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6457 if test -z "$ac_err"; then
6458   rm -rf conftest*
6459   eval "ac_cv_header_$ac_safe=yes"
6460 else
6461   echo "$ac_err" >&5
6462   echo "configure: failed program was:" >&5
6463   cat conftest.$ac_ext >&5
6464   rm -rf conftest*
6465   eval "ac_cv_header_$ac_safe=no"
6466 fi
6467 rm -f conftest*
6468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6469   echo "$ac_t""yes" 1>&6
6470   tt_c_h_path="${dir}tt_c.h"; break
6471 else
6472   echo "$ac_t""no" 1>&6
6473 fi
6474
6475   done
6476   if test -z "$tt_c_h_path"; then
6477     if test "$with_tooltalk" = "yes"; then
6478       (echo "$progname: Usage error:"
6479 echo " " "Unable to find required tooltalk header files."
6480 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6481     fi
6482     with_tooltalk=no
6483   fi
6484 fi
6485 if test "$with_tooltalk" != "no" ; then
6486   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6487     
6488 xe_msg_checking="for tt_message_create in -ltt"
6489 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6490 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6491 echo "configure:6492: checking "$xe_msg_checking"" >&5
6492 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6493
6494 xe_check_libs=" -ltt $extra_libs"
6495 cat > conftest.$ac_ext <<EOF
6496 #line 6497 "configure"
6497 #include "confdefs.h"
6498 /* Override any gcc2 internal prototype to avoid an error.  */
6499 /* We use char because int might match the return type of a gcc2
6500     builtin and then its argument prototype would still apply.  */
6501 char tt_message_create();
6502
6503 int main() {
6504 tt_message_create()
6505 ; return 0; }
6506 EOF
6507 if { (eval echo configure:6508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6508   rm -rf conftest*
6509   eval "ac_cv_lib_$ac_lib_var=yes"
6510 else
6511   echo "configure: failed program was:" >&5
6512   cat conftest.$ac_ext >&5
6513   rm -rf conftest*
6514   eval "ac_cv_lib_$ac_lib_var=no"
6515 fi
6516 rm -f conftest*
6517 xe_check_libs=""
6518
6519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6520   echo "$ac_t""yes" 1>&6
6521   tt_libs="-ltt $extra_libs"; break
6522 else
6523   echo "$ac_t""no" 1>&6
6524 :
6525 fi
6526
6527
6528   done
6529   if test -z "$tt_libs"; then
6530     if test "$with_tooltalk" = "yes"; then
6531       (echo "$progname: Usage error:"
6532 echo " " "Unable to find required tooltalk libraries."
6533 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6534     fi
6535     with_tooltalk=no
6536   fi
6537 fi
6538 test -z "$with_tooltalk" && with_tooltalk=yes
6539 if test "$with_tooltalk" = "yes"; then
6540   { test "$extra_verbose" = "yes" && cat << \EOF
6541     Defining TOOLTALK
6542 EOF
6543 cat >> confdefs.h <<\EOF
6544 #define TOOLTALK 1
6545 EOF
6546 }
6547
6548   { test "$extra_verbose" = "yes" && cat << EOF
6549     Defining TT_C_H_PATH = "$tt_c_h_path"
6550 EOF
6551 cat >> confdefs.h <<EOF
6552 #define TT_C_H_PATH "$tt_c_h_path"
6553 EOF
6554 }
6555
6556   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6557   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6558    echo "    xemacs will be linked with \"tooltalk.o\""
6559  fi
6560 fi
6561
6562 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6563 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6564 echo "configure:6565: checking for Dt/Dt.h" >&5
6565
6566 cat > conftest.$ac_ext <<EOF
6567 #line 6568 "configure"
6568 #include "confdefs.h"
6569 #include <Dt/Dt.h>
6570 EOF
6571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6572 { (eval echo configure:6573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6574 if test -z "$ac_err"; then
6575   rm -rf conftest*
6576   eval "ac_cv_header_$ac_safe=yes"
6577 else
6578   echo "$ac_err" >&5
6579   echo "configure: failed program was:" >&5
6580   cat conftest.$ac_ext >&5
6581   rm -rf conftest*
6582   eval "ac_cv_header_$ac_safe=no"
6583 fi
6584 rm -f conftest*
6585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6586   echo "$ac_t""yes" 1>&6
6587   :
6588 else
6589   echo "$ac_t""no" 1>&6
6590 with_cde=no
6591 fi
6592  }
6593 test -z "$with_cde" && { 
6594 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6595 echo "configure:6596: checking for DtDndDragStart in -lDtSvc" >&5
6596 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6597
6598 xe_check_libs=" -lDtSvc "
6599 cat > conftest.$ac_ext <<EOF
6600 #line 6601 "configure"
6601 #include "confdefs.h"
6602 /* Override any gcc2 internal prototype to avoid an error.  */
6603 /* We use char because int might match the return type of a gcc2
6604     builtin and then its argument prototype would still apply.  */
6605 char DtDndDragStart();
6606
6607 int main() {
6608 DtDndDragStart()
6609 ; return 0; }
6610 EOF
6611 if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6612   rm -rf conftest*
6613   eval "ac_cv_lib_$ac_lib_var=yes"
6614 else
6615   echo "configure: failed program was:" >&5
6616   cat conftest.$ac_ext >&5
6617   rm -rf conftest*
6618   eval "ac_cv_lib_$ac_lib_var=no"
6619 fi
6620 rm -f conftest*
6621 xe_check_libs=""
6622
6623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6624   echo "$ac_t""yes" 1>&6
6625   :
6626 else
6627   echo "$ac_t""no" 1>&6
6628 with_cde=no
6629 fi
6630
6631  }
6632 test -z "$with_cde" && with_cde=yes
6633 if test "$with_dragndrop" = no; then
6634   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6635   with_cde=no
6636 fi
6637 if test "$with_cde" = "yes" ; then
6638   { test "$extra_verbose" = "yes" && cat << \EOF
6639     Defining HAVE_CDE
6640 EOF
6641 cat >> confdefs.h <<\EOF
6642 #define HAVE_CDE 1
6643 EOF
6644 }
6645
6646   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6647   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6648   with_tooltalk=yes # CDE requires Tooltalk
6649   need_motif=yes    # CDE requires Motif
6650 fi
6651
6652 test "$window_system" != "x11" && with_offix=no
6653 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6654   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6655   with_offix=no
6656 fi
6657 if test "$with_dragndrop" = no; then
6658   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6659   with_offix=no
6660 fi
6661 if test "$with_cde" = yes; then
6662   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6663   with_offix=no
6664 fi
6665 test -z "$with_offix" && with_offix=no
6666 if test "$with_offix" = "yes"; then
6667   { test "$extra_verbose" = "yes" && cat << \EOF
6668     Defining HAVE_OFFIX_DND
6669 EOF
6670 cat >> confdefs.h <<\EOF
6671 #define HAVE_OFFIX_DND 1
6672 EOF
6673 }
6674
6675   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6676   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6677 fi
6678
6679 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6680 echo "configure:6681: checking if drag and drop API is needed" >&5
6681 if test "$with_dragndrop" != "no" ; then
6682   if test -n "$dragndrop_proto" ; then
6683     with_dragndrop=yes
6684     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6685     { test "$extra_verbose" = "yes" && cat << \EOF
6686     Defining HAVE_DRAGNDROP
6687 EOF
6688 cat >> confdefs.h <<\EOF
6689 #define HAVE_DRAGNDROP 1
6690 EOF
6691 }
6692
6693     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6694   else
6695     with_dragndrop=no
6696     echo "$ac_t""no" 1>&6
6697   fi
6698 fi
6699
6700 echo "checking for LDAP" 1>&6
6701 echo "configure:6702: checking for LDAP" >&5
6702 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6703 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6704 echo "configure:6705: checking for ldap.h" >&5
6705
6706 cat > conftest.$ac_ext <<EOF
6707 #line 6708 "configure"
6708 #include "confdefs.h"
6709 #include <ldap.h>
6710 EOF
6711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6712 { (eval echo configure:6713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6714 if test -z "$ac_err"; then
6715   rm -rf conftest*
6716   eval "ac_cv_header_$ac_safe=yes"
6717 else
6718   echo "$ac_err" >&5
6719   echo "configure: failed program was:" >&5
6720   cat conftest.$ac_ext >&5
6721   rm -rf conftest*
6722   eval "ac_cv_header_$ac_safe=no"
6723 fi
6724 rm -f conftest*
6725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6726   echo "$ac_t""yes" 1>&6
6727   :
6728 else
6729   echo "$ac_t""no" 1>&6
6730 with_ldap=no
6731 fi
6732  }
6733 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6734 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6735 echo "configure:6736: checking for lber.h" >&5
6736
6737 cat > conftest.$ac_ext <<EOF
6738 #line 6739 "configure"
6739 #include "confdefs.h"
6740 #include <lber.h>
6741 EOF
6742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6743 { (eval echo configure:6744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6745 if test -z "$ac_err"; then
6746   rm -rf conftest*
6747   eval "ac_cv_header_$ac_safe=yes"
6748 else
6749   echo "$ac_err" >&5
6750   echo "configure: failed program was:" >&5
6751   cat conftest.$ac_ext >&5
6752   rm -rf conftest*
6753   eval "ac_cv_header_$ac_safe=no"
6754 fi
6755 rm -f conftest*
6756 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6757   echo "$ac_t""yes" 1>&6
6758   :
6759 else
6760   echo "$ac_t""no" 1>&6
6761 with_ldap=no
6762 fi
6763  }
6764 if test "$with_ldap" != "no"; then
6765   
6766 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6767 echo "configure:6768: checking for ldap_search in -lldap" >&5
6768 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6769
6770 xe_check_libs=" -lldap "
6771 cat > conftest.$ac_ext <<EOF
6772 #line 6773 "configure"
6773 #include "confdefs.h"
6774 /* Override any gcc2 internal prototype to avoid an error.  */
6775 /* We use char because int might match the return type of a gcc2
6776     builtin and then its argument prototype would still apply.  */
6777 char ldap_search();
6778
6779 int main() {
6780 ldap_search()
6781 ; return 0; }
6782 EOF
6783 if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6784   rm -rf conftest*
6785   eval "ac_cv_lib_$ac_lib_var=yes"
6786 else
6787   echo "configure: failed program was:" >&5
6788   cat conftest.$ac_ext >&5
6789   rm -rf conftest*
6790   eval "ac_cv_lib_$ac_lib_var=no"
6791 fi
6792 rm -f conftest*
6793 xe_check_libs=""
6794
6795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6796   echo "$ac_t""yes" 1>&6
6797   with_ldap_nolber=yes
6798 else
6799   echo "$ac_t""no" 1>&6
6800 with_ldap_nolber=no
6801 fi
6802
6803
6804   test "$with_ldap_nolber" = "no" && { 
6805 xe_msg_checking="for ldap_open in -lldap"
6806 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6807 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6808 echo "configure:6809: checking "$xe_msg_checking"" >&5
6809 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6810
6811 xe_check_libs=" -lldap -llber"
6812 cat > conftest.$ac_ext <<EOF
6813 #line 6814 "configure"
6814 #include "confdefs.h"
6815 /* Override any gcc2 internal prototype to avoid an error.  */
6816 /* We use char because int might match the return type of a gcc2
6817     builtin and then its argument prototype would still apply.  */
6818 char ldap_open();
6819
6820 int main() {
6821 ldap_open()
6822 ; return 0; }
6823 EOF
6824 if { (eval echo configure:6825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6825   rm -rf conftest*
6826   eval "ac_cv_lib_$ac_lib_var=yes"
6827 else
6828   echo "configure: failed program was:" >&5
6829   cat conftest.$ac_ext >&5
6830   rm -rf conftest*
6831   eval "ac_cv_lib_$ac_lib_var=no"
6832 fi
6833 rm -f conftest*
6834 xe_check_libs=""
6835
6836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6837   echo "$ac_t""yes" 1>&6
6838   with_ldap_lber=yes
6839 else
6840   echo "$ac_t""no" 1>&6
6841 with_ldap_lber=no
6842 fi
6843
6844  }
6845   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6846 xe_msg_checking="for ldap_open in -lldap"
6847 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6848 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6849 echo "configure:6850: checking "$xe_msg_checking"" >&5
6850 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6851
6852 xe_check_libs=" -lldap -llber -lkrb"
6853 cat > conftest.$ac_ext <<EOF
6854 #line 6855 "configure"
6855 #include "confdefs.h"
6856 /* Override any gcc2 internal prototype to avoid an error.  */
6857 /* We use char because int might match the return type of a gcc2
6858     builtin and then its argument prototype would still apply.  */
6859 char ldap_open();
6860
6861 int main() {
6862 ldap_open()
6863 ; return 0; }
6864 EOF
6865 if { (eval echo configure:6866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6866   rm -rf conftest*
6867   eval "ac_cv_lib_$ac_lib_var=yes"
6868 else
6869   echo "configure: failed program was:" >&5
6870   cat conftest.$ac_ext >&5
6871   rm -rf conftest*
6872   eval "ac_cv_lib_$ac_lib_var=no"
6873 fi
6874 rm -f conftest*
6875 xe_check_libs=""
6876
6877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6878   echo "$ac_t""yes" 1>&6
6879   with_ldap_krb=yes
6880 else
6881   echo "$ac_t""no" 1>&6
6882 with_ldap_krb=no
6883 fi
6884
6885  }
6886   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6887 xe_msg_checking="for ldap_open in -lldap"
6888 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6889 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6890 echo "configure:6891: checking "$xe_msg_checking"" >&5
6891 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6892
6893 xe_check_libs=" -lldap -llber -lkrb -ldes"
6894 cat > conftest.$ac_ext <<EOF
6895 #line 6896 "configure"
6896 #include "confdefs.h"
6897 /* Override any gcc2 internal prototype to avoid an error.  */
6898 /* We use char because int might match the return type of a gcc2
6899     builtin and then its argument prototype would still apply.  */
6900 char ldap_open();
6901
6902 int main() {
6903 ldap_open()
6904 ; return 0; }
6905 EOF
6906 if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6907   rm -rf conftest*
6908   eval "ac_cv_lib_$ac_lib_var=yes"
6909 else
6910   echo "configure: failed program was:" >&5
6911   cat conftest.$ac_ext >&5
6912   rm -rf conftest*
6913   eval "ac_cv_lib_$ac_lib_var=no"
6914 fi
6915 rm -f conftest*
6916 xe_check_libs=""
6917
6918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6919   echo "$ac_t""yes" 1>&6
6920   with_ldap_krbdes=yes
6921 else
6922   echo "$ac_t""no" 1>&6
6923 with_ldap_krbdes=no
6924 fi
6925
6926  }
6927   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
6928 fi
6929 if test "$with_ldap" = "yes"; then
6930   { test "$extra_verbose" = "yes" && cat << \EOF
6931     Defining HAVE_LDAP
6932 EOF
6933 cat >> confdefs.h <<\EOF
6934 #define HAVE_LDAP 1
6935 EOF
6936 }
6937
6938   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6939    echo "    xemacs will be linked with \"eldap.o\""
6940  fi
6941   if test "$with_ldap_nolber" = "yes" ; then
6942     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6943   else
6944     if test "$with_ldap_krb" = "yes" ; then
6945       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6946     fi
6947     if test "$with_ldap_krbdes" = "yes" ; then
6948       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
6949       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6950     fi
6951     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6952     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6953   fi
6954   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
6955 do
6956 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6957 echo "configure:6958: checking for $ac_func" >&5
6958
6959 cat > conftest.$ac_ext <<EOF
6960 #line 6961 "configure"
6961 #include "confdefs.h"
6962 /* System header to define __stub macros and hopefully few prototypes,
6963     which can conflict with char $ac_func(); below.  */
6964 #include <assert.h>
6965 /* Override any gcc2 internal prototype to avoid an error.  */
6966 /* We use char because int might match the return type of a gcc2
6967     builtin and then its argument prototype would still apply.  */
6968 char $ac_func();
6969
6970 int main() {
6971
6972 /* The GNU C library defines this for functions which it implements
6973     to always fail with ENOSYS.  Some functions are actually named
6974     something starting with __ and the normal name is an alias.  */
6975 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6976 choke me
6977 #else
6978 $ac_func();
6979 #endif
6980
6981 ; return 0; }
6982 EOF
6983 if { (eval echo configure:6984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6984   rm -rf conftest*
6985   eval "ac_cv_func_$ac_func=yes"
6986 else
6987   echo "configure: failed program was:" >&5
6988   cat conftest.$ac_ext >&5
6989   rm -rf conftest*
6990   eval "ac_cv_func_$ac_func=no"
6991 fi
6992 rm -f conftest*
6993
6994 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6995   echo "$ac_t""yes" 1>&6
6996     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6997   { test "$extra_verbose" = "yes" && cat << EOF
6998     Defining $ac_tr_func
6999 EOF
7000 cat >> confdefs.h <<EOF
7001 #define $ac_tr_func 1
7002 EOF
7003 }
7004  
7005 else
7006   echo "$ac_t""no" 1>&6
7007 fi
7008 done
7009
7010 fi
7011
7012
7013 if test "$window_system" != "none"; then
7014   echo "checking for graphics libraries" 1>&6
7015 echo "configure:7016: checking for graphics libraries" >&5
7016
7017     xpm_problem=""
7018   if test -z "$with_xpm"; then
7019     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7020 echo "configure:7021: checking for Xpm - no older than 3.4f" >&5
7021     xe_check_libs=-lXpm
7022     cat > conftest.$ac_ext <<EOF
7023 #line 7024 "configure"
7024 #include "confdefs.h"
7025 #include <X11/xpm.h>
7026     int main(int c, char **v) {
7027     return c == 1 ? 0 :
7028       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7029       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7030 EOF
7031 if { (eval echo configure:7032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7032 then
7033   ./conftest dummy_arg; xpm_status=$?;
7034       if test "$xpm_status" = "0"; then
7035         with_xpm=yes;
7036       else
7037         with_xpm=no;
7038         if test "$xpm_status" = "1"; then
7039           xpm_problem="Xpm library version and header file version don't match!"
7040         elif test "$xpm_status" = "2"; then
7041           xpm_problem="Xpm library version is too old!"
7042         else
7043           xpm_problem="Internal xpm detection logic error!"
7044         fi
7045         echo "
7046 *** WARNING *** $xpm_problem
7047   I'm not touching that with a 10-foot pole!
7048   If you really want to use the installed version of Xpm, rerun
7049   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7050     fi
7051 else
7052   conftest_rc="$?"
7053   echo "configure: failed program was:" >&5
7054   cat conftest.$ac_ext >&5
7055   rm -fr conftest*
7056   with_xpm=no
7057 fi
7058 rm -fr conftest*
7059     xe_check_libs=
7060     echo "$ac_t""$with_xpm" 1>&6
7061   fi
7062   if test "$with_xpm" = "yes"; then
7063     { test "$extra_verbose" = "yes" && cat << \EOF
7064     Defining HAVE_XPM
7065 EOF
7066 cat >> confdefs.h <<\EOF
7067 #define HAVE_XPM 1
7068 EOF
7069 }
7070
7071     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7072     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7073 echo "configure:7074: checking for \"FOR_MSW\" xpm" >&5
7074     xe_check_libs=-lXpm
7075     cat > conftest.$ac_ext <<EOF
7076 #line 7077 "configure"
7077 #include "confdefs.h"
7078
7079 int main() {
7080 XpmCreatePixmapFromData()
7081 ; return 0; }
7082 EOF
7083 if { (eval echo configure:7084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7084   rm -rf conftest*
7085   xpm_for_msw=no
7086 else
7087   echo "configure: failed program was:" >&5
7088   cat conftest.$ac_ext >&5
7089   rm -rf conftest*
7090   xpm_for_msw=yes
7091 fi
7092 rm -f conftest*
7093     xe_check_libs=
7094     echo "$ac_t""$xpm_for_msw" 1>&6
7095     if test "$xpm_for_msw" = "yes"; then
7096       { test "$extra_verbose" = "yes" && cat << \EOF
7097     Defining FOR_MSW
7098 EOF
7099 cat >> confdefs.h <<\EOF
7100 #define FOR_MSW 1
7101 EOF
7102 }
7103
7104     fi
7105   fi
7106
7107     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7108 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7109 echo "configure:7110: checking for compface.h" >&5
7110
7111 cat > conftest.$ac_ext <<EOF
7112 #line 7113 "configure"
7113 #include "confdefs.h"
7114 #include <compface.h>
7115 EOF
7116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7117 { (eval echo configure:7118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7119 if test -z "$ac_err"; then
7120   rm -rf conftest*
7121   eval "ac_cv_header_$ac_safe=yes"
7122 else
7123   echo "$ac_err" >&5
7124   echo "configure: failed program was:" >&5
7125   cat conftest.$ac_ext >&5
7126   rm -rf conftest*
7127   eval "ac_cv_header_$ac_safe=no"
7128 fi
7129 rm -f conftest*
7130 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7131   echo "$ac_t""yes" 1>&6
7132   :
7133 else
7134   echo "$ac_t""no" 1>&6
7135 with_xface=no
7136 fi
7137  }
7138   test -z "$with_xface" && { 
7139 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7140 echo "configure:7141: checking for UnGenFace in -lcompface" >&5
7141 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7142
7143 xe_check_libs=" -lcompface "
7144 cat > conftest.$ac_ext <<EOF
7145 #line 7146 "configure"
7146 #include "confdefs.h"
7147 /* Override any gcc2 internal prototype to avoid an error.  */
7148 /* We use char because int might match the return type of a gcc2
7149     builtin and then its argument prototype would still apply.  */
7150 char UnGenFace();
7151
7152 int main() {
7153 UnGenFace()
7154 ; return 0; }
7155 EOF
7156 if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7157   rm -rf conftest*
7158   eval "ac_cv_lib_$ac_lib_var=yes"
7159 else
7160   echo "configure: failed program was:" >&5
7161   cat conftest.$ac_ext >&5
7162   rm -rf conftest*
7163   eval "ac_cv_lib_$ac_lib_var=no"
7164 fi
7165 rm -f conftest*
7166 xe_check_libs=""
7167
7168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7169   echo "$ac_t""yes" 1>&6
7170   : 
7171 else
7172   echo "$ac_t""no" 1>&6
7173 with_xface=no
7174 fi
7175
7176  }
7177   test -z "$with_xface" && with_xface=yes
7178   if test "$with_xface" = "yes"; then
7179     { test "$extra_verbose" = "yes" && cat << \EOF
7180     Defining HAVE_XFACE
7181 EOF
7182 cat >> confdefs.h <<\EOF
7183 #define HAVE_XFACE 1
7184 EOF
7185 }
7186
7187     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7188   fi
7189
7190         if test "$with_gif" != "no"; then
7191     with_gif="yes"
7192     { test "$extra_verbose" = "yes" && cat << \EOF
7193     Defining HAVE_GIF
7194 EOF
7195 cat >> confdefs.h <<\EOF
7196 #define HAVE_GIF 1
7197 EOF
7198 }
7199
7200     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7201    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7202  fi
7203   fi
7204
7205       if test "$with_png $with_tiff" != "no no"; then
7206     
7207 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7208 echo "configure:7209: checking for inflate in -lc" >&5
7209 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7210
7211 xe_check_libs=" -lc "
7212 cat > conftest.$ac_ext <<EOF
7213 #line 7214 "configure"
7214 #include "confdefs.h"
7215 /* Override any gcc2 internal prototype to avoid an error.  */
7216 /* We use char because int might match the return type of a gcc2
7217     builtin and then its argument prototype would still apply.  */
7218 char inflate();
7219
7220 int main() {
7221 inflate()
7222 ; return 0; }
7223 EOF
7224 if { (eval echo configure:7225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7225   rm -rf conftest*
7226   eval "ac_cv_lib_$ac_lib_var=yes"
7227 else
7228   echo "configure: failed program was:" >&5
7229   cat conftest.$ac_ext >&5
7230   rm -rf conftest*
7231   eval "ac_cv_lib_$ac_lib_var=no"
7232 fi
7233 rm -f conftest*
7234 xe_check_libs=""
7235
7236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7237   echo "$ac_t""yes" 1>&6
7238   :
7239 else
7240   echo "$ac_t""no" 1>&6
7241
7242 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7243 echo "configure:7244: checking for inflate in -lz" >&5
7244 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7245
7246 xe_check_libs=" -lz "
7247 cat > conftest.$ac_ext <<EOF
7248 #line 7249 "configure"
7249 #include "confdefs.h"
7250 /* Override any gcc2 internal prototype to avoid an error.  */
7251 /* We use char because int might match the return type of a gcc2
7252     builtin and then its argument prototype would still apply.  */
7253 char inflate();
7254
7255 int main() {
7256 inflate()
7257 ; return 0; }
7258 EOF
7259 if { (eval echo configure:7260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7260   rm -rf conftest*
7261   eval "ac_cv_lib_$ac_lib_var=yes"
7262 else
7263   echo "configure: failed program was:" >&5
7264   cat conftest.$ac_ext >&5
7265   rm -rf conftest*
7266   eval "ac_cv_lib_$ac_lib_var=no"
7267 fi
7268 rm -f conftest*
7269 xe_check_libs=""
7270
7271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7272   echo "$ac_t""yes" 1>&6
7273   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7274 else
7275   echo "$ac_t""no" 1>&6
7276
7277 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7278 echo "configure:7279: checking for inflate in -lgz" >&5
7279 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7280
7281 xe_check_libs=" -lgz "
7282 cat > conftest.$ac_ext <<EOF
7283 #line 7284 "configure"
7284 #include "confdefs.h"
7285 /* Override any gcc2 internal prototype to avoid an error.  */
7286 /* We use char because int might match the return type of a gcc2
7287     builtin and then its argument prototype would still apply.  */
7288 char inflate();
7289
7290 int main() {
7291 inflate()
7292 ; return 0; }
7293 EOF
7294 if { (eval echo configure:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7295   rm -rf conftest*
7296   eval "ac_cv_lib_$ac_lib_var=yes"
7297 else
7298   echo "configure: failed program was:" >&5
7299   cat conftest.$ac_ext >&5
7300   rm -rf conftest*
7301   eval "ac_cv_lib_$ac_lib_var=no"
7302 fi
7303 rm -f conftest*
7304 xe_check_libs=""
7305
7306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7307   echo "$ac_t""yes" 1>&6
7308   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7309 else
7310   echo "$ac_t""no" 1>&6
7311 fi
7312
7313
7314 fi
7315
7316
7317 fi
7318
7319
7320   fi
7321
7322     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7323 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7324 echo "configure:7325: checking for jpeglib.h" >&5
7325
7326 cat > conftest.$ac_ext <<EOF
7327 #line 7328 "configure"
7328 #include "confdefs.h"
7329 #include <jpeglib.h>
7330 EOF
7331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7332 { (eval echo configure:7333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7334 if test -z "$ac_err"; then
7335   rm -rf conftest*
7336   eval "ac_cv_header_$ac_safe=yes"
7337 else
7338   echo "$ac_err" >&5
7339   echo "configure: failed program was:" >&5
7340   cat conftest.$ac_ext >&5
7341   rm -rf conftest*
7342   eval "ac_cv_header_$ac_safe=no"
7343 fi
7344 rm -f conftest*
7345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7346   echo "$ac_t""yes" 1>&6
7347   :
7348 else
7349   echo "$ac_t""no" 1>&6
7350 with_jpeg=no
7351 fi
7352  }
7353   test -z "$with_jpeg" && { 
7354 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7355 echo "configure:7356: checking for jpeg_destroy_decompress in -ljpeg" >&5
7356 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7357
7358 xe_check_libs=" -ljpeg "
7359 cat > conftest.$ac_ext <<EOF
7360 #line 7361 "configure"
7361 #include "confdefs.h"
7362 /* Override any gcc2 internal prototype to avoid an error.  */
7363 /* We use char because int might match the return type of a gcc2
7364     builtin and then its argument prototype would still apply.  */
7365 char jpeg_destroy_decompress();
7366
7367 int main() {
7368 jpeg_destroy_decompress()
7369 ; return 0; }
7370 EOF
7371 if { (eval echo configure:7372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7372   rm -rf conftest*
7373   eval "ac_cv_lib_$ac_lib_var=yes"
7374 else
7375   echo "configure: failed program was:" >&5
7376   cat conftest.$ac_ext >&5
7377   rm -rf conftest*
7378   eval "ac_cv_lib_$ac_lib_var=no"
7379 fi
7380 rm -f conftest*
7381 xe_check_libs=""
7382
7383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7384   echo "$ac_t""yes" 1>&6
7385   :
7386 else
7387   echo "$ac_t""no" 1>&6
7388 with_jpeg=no
7389 fi
7390
7391  }
7392   test -z "$with_jpeg" && with_jpeg=yes
7393   if test "$with_jpeg" = "yes"; then
7394     { test "$extra_verbose" = "yes" && cat << \EOF
7395     Defining HAVE_JPEG
7396 EOF
7397 cat >> confdefs.h <<\EOF
7398 #define HAVE_JPEG 1
7399 EOF
7400 }
7401
7402     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7403   fi
7404
7405     png_problem=""
7406   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7407 echo "configure:7408: checking for pow" >&5
7408
7409 cat > conftest.$ac_ext <<EOF
7410 #line 7411 "configure"
7411 #include "confdefs.h"
7412 /* System header to define __stub macros and hopefully few prototypes,
7413     which can conflict with char pow(); below.  */
7414 #include <assert.h>
7415 /* Override any gcc2 internal prototype to avoid an error.  */
7416 /* We use char because int might match the return type of a gcc2
7417     builtin and then its argument prototype would still apply.  */
7418 char pow();
7419
7420 int main() {
7421
7422 /* The GNU C library defines this for functions which it implements
7423     to always fail with ENOSYS.  Some functions are actually named
7424     something starting with __ and the normal name is an alias.  */
7425 #if defined (__stub_pow) || defined (__stub___pow)
7426 choke me
7427 #else
7428 pow();
7429 #endif
7430
7431 ; return 0; }
7432 EOF
7433 if { (eval echo configure:7434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7434   rm -rf conftest*
7435   eval "ac_cv_func_pow=yes"
7436 else
7437   echo "configure: failed program was:" >&5
7438   cat conftest.$ac_ext >&5
7439   rm -rf conftest*
7440   eval "ac_cv_func_pow=no"
7441 fi
7442 rm -f conftest*
7443
7444 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7445   echo "$ac_t""yes" 1>&6
7446   :
7447 else
7448   echo "$ac_t""no" 1>&6
7449 with_png=no
7450 fi
7451  }
7452   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7453 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7454 echo "configure:7455: checking for png.h" >&5
7455
7456 cat > conftest.$ac_ext <<EOF
7457 #line 7458 "configure"
7458 #include "confdefs.h"
7459 #include <png.h>
7460 EOF
7461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7462 { (eval echo configure:7463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7464 if test -z "$ac_err"; then
7465   rm -rf conftest*
7466   eval "ac_cv_header_$ac_safe=yes"
7467 else
7468   echo "$ac_err" >&5
7469   echo "configure: failed program was:" >&5
7470   cat conftest.$ac_ext >&5
7471   rm -rf conftest*
7472   eval "ac_cv_header_$ac_safe=no"
7473 fi
7474 rm -f conftest*
7475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7476   echo "$ac_t""yes" 1>&6
7477   :
7478 else
7479   echo "$ac_t""no" 1>&6
7480 with_png=no
7481 fi
7482  }
7483   test -z "$with_png" && { 
7484 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7485 echo "configure:7486: checking for png_read_image in -lpng" >&5
7486 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7487
7488 xe_check_libs=" -lpng "
7489 cat > conftest.$ac_ext <<EOF
7490 #line 7491 "configure"
7491 #include "confdefs.h"
7492 /* Override any gcc2 internal prototype to avoid an error.  */
7493 /* We use char because int might match the return type of a gcc2
7494     builtin and then its argument prototype would still apply.  */
7495 char png_read_image();
7496
7497 int main() {
7498 png_read_image()
7499 ; return 0; }
7500 EOF
7501 if { (eval echo configure:7502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7502   rm -rf conftest*
7503   eval "ac_cv_lib_$ac_lib_var=yes"
7504 else
7505   echo "configure: failed program was:" >&5
7506   cat conftest.$ac_ext >&5
7507   rm -rf conftest*
7508   eval "ac_cv_lib_$ac_lib_var=no"
7509 fi
7510 rm -f conftest*
7511 xe_check_libs=""
7512
7513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7514   echo "$ac_t""yes" 1>&6
7515   :
7516 else
7517   echo "$ac_t""no" 1>&6
7518 with_png=no
7519 fi
7520
7521  }
7522   if test -z "$with_png"; then
7523     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7524 echo "configure:7525: checking for workable png version information" >&5
7525     xe_check_libs="-lpng -lz"
7526     cat > conftest.$ac_ext <<EOF
7527 #line 7528 "configure"
7528 #include "confdefs.h"
7529 #include <png.h>
7530     int main(int c, char **v) {
7531     if (c == 1) return 0;
7532     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7533     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7534 EOF
7535 if { (eval echo configure:7536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7536 then
7537   ./conftest dummy_arg; png_status=$?;
7538       if test "$png_status" = "0"; then
7539         with_png=yes;
7540       else
7541         with_png=no;
7542         if test "$png_status" = "1"; then
7543           png_problem="PNG library version and header file don't match!"
7544         elif test "$png_status" = "2"; then
7545           png_problem="PNG library version too old (pre 1.0.2)!"
7546         fi
7547         echo "
7548 *** WARNING *** $png_problem
7549   I'm not touching that with a 10-foot pole!
7550   If you really want to use the installed version of libPNG, rerun
7551   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7552     fi
7553 else
7554   conftest_rc="$?"
7555   echo "configure: failed program was:" >&5
7556   cat conftest.$ac_ext >&5
7557   rm -fr conftest*
7558   with_png=no
7559 fi
7560 rm -fr conftest*
7561     xe_check_libs=
7562     echo "$ac_t""$with_png" 1>&6
7563   fi
7564   if test "$with_png" = "yes"; then
7565     { test "$extra_verbose" = "yes" && cat << \EOF
7566     Defining HAVE_PNG
7567 EOF
7568 cat >> confdefs.h <<\EOF
7569 #define HAVE_PNG 1
7570 EOF
7571 }
7572
7573     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7574   fi
7575
7576     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7577 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7578 echo "configure:7579: checking for tiffio.h" >&5
7579
7580 cat > conftest.$ac_ext <<EOF
7581 #line 7582 "configure"
7582 #include "confdefs.h"
7583 #include <tiffio.h>
7584 EOF
7585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7586 { (eval echo configure:7587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7588 if test -z "$ac_err"; then
7589   rm -rf conftest*
7590   eval "ac_cv_header_$ac_safe=yes"
7591 else
7592   echo "$ac_err" >&5
7593   echo "configure: failed program was:" >&5
7594   cat conftest.$ac_ext >&5
7595   rm -rf conftest*
7596   eval "ac_cv_header_$ac_safe=no"
7597 fi
7598 rm -f conftest*
7599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7600   echo "$ac_t""yes" 1>&6
7601   :
7602 else
7603   echo "$ac_t""no" 1>&6
7604 with_tiff=no
7605 fi
7606  }
7607   test -z "$with_tiff" && { 
7608 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7609 echo "configure:7610: checking for TIFFClientOpen in -ltiff" >&5
7610 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7611
7612 xe_check_libs=" -ltiff "
7613 cat > conftest.$ac_ext <<EOF
7614 #line 7615 "configure"
7615 #include "confdefs.h"
7616 /* Override any gcc2 internal prototype to avoid an error.  */
7617 /* We use char because int might match the return type of a gcc2
7618     builtin and then its argument prototype would still apply.  */
7619 char TIFFClientOpen();
7620
7621 int main() {
7622 TIFFClientOpen()
7623 ; return 0; }
7624 EOF
7625 if { (eval echo configure:7626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7626   rm -rf conftest*
7627   eval "ac_cv_lib_$ac_lib_var=yes"
7628 else
7629   echo "configure: failed program was:" >&5
7630   cat conftest.$ac_ext >&5
7631   rm -rf conftest*
7632   eval "ac_cv_lib_$ac_lib_var=no"
7633 fi
7634 rm -f conftest*
7635 xe_check_libs=""
7636
7637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7638   echo "$ac_t""yes" 1>&6
7639   :
7640 else
7641   echo "$ac_t""no" 1>&6
7642 with_tiff=no
7643 fi
7644
7645  }
7646   test -z "$with_tiff" && with_tiff=yes
7647   if test "$with_tiff" = "yes"; then
7648     { test "$extra_verbose" = "yes" && cat << \EOF
7649     Defining HAVE_TIFF
7650 EOF
7651 cat >> confdefs.h <<\EOF
7652 #define HAVE_TIFF 1
7653 EOF
7654 }
7655
7656     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7657   fi
7658 fi
7659
7660
7661 if test "$with_x11" = "yes"; then
7662
7663   echo "checking for X11 graphics libraries" 1>&6
7664 echo "configure:7665: checking for X11 graphics libraries" >&5
7665
7666   echo "checking for the Athena widgets" 1>&6
7667 echo "configure:7668: checking for the Athena widgets" >&5
7668
7669     case "$with_athena" in
7670         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
7671     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
7672     "next")     athena_variant=neXtaw   athena_3d=yes ;;
7673     "95")       athena_variant=Xaw95    athena_3d=yes ;;
7674     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
7675     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
7676   esac
7677
7678     if test "$athena_3d" = "no"; then
7679     
7680 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
7681 echo "configure:7682: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
7682 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7683
7684 xe_check_libs=" -l$athena_variant "
7685 cat > conftest.$ac_ext <<EOF
7686 #line 7687 "configure"
7687 #include "confdefs.h"
7688 /* Override any gcc2 internal prototype to avoid an error.  */
7689 /* We use char because int might match the return type of a gcc2
7690     builtin and then its argument prototype would still apply.  */
7691 char XawScrollbarSetThumb();
7692
7693 int main() {
7694 XawScrollbarSetThumb()
7695 ; return 0; }
7696 EOF
7697 if { (eval echo configure:7698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7698   rm -rf conftest*
7699   eval "ac_cv_lib_$ac_lib_var=yes"
7700 else
7701   echo "configure: failed program was:" >&5
7702   cat conftest.$ac_ext >&5
7703   rm -rf conftest*
7704   eval "ac_cv_lib_$ac_lib_var=no"
7705 fi
7706 rm -f conftest*
7707 xe_check_libs=""
7708
7709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7710   echo "$ac_t""yes" 1>&6
7711           
7712 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7713 echo "configure:7714: checking for threeDClassRec in -l$athena_variant" >&5
7714 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7715
7716 xe_check_libs=" -l$athena_variant "
7717 cat > conftest.$ac_ext <<EOF
7718 #line 7719 "configure"
7719 #include "confdefs.h"
7720 /* Override any gcc2 internal prototype to avoid an error.  */
7721 /* We use char because int might match the return type of a gcc2
7722     builtin and then its argument prototype would still apply.  */
7723 char threeDClassRec();
7724
7725 int main() {
7726 threeDClassRec()
7727 ; return 0; }
7728 EOF
7729 if { (eval echo configure:7730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7730   rm -rf conftest*
7731   eval "ac_cv_lib_$ac_lib_var=yes"
7732 else
7733   echo "configure: failed program was:" >&5
7734   cat conftest.$ac_ext >&5
7735   rm -rf conftest*
7736   eval "ac_cv_lib_$ac_lib_var=no"
7737 fi
7738 rm -f conftest*
7739 xe_check_libs=""
7740
7741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7742   echo "$ac_t""yes" 1>&6
7743   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
7744 else
7745   echo "$ac_t""no" 1>&6
7746 athena_lib=$athena_variant
7747 fi
7748
7749
7750       
7751 else
7752   echo "$ac_t""no" 1>&6
7753 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
7754 fi
7755
7756
7757   else
7758         
7759 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7760 echo "configure:7761: checking for threeDClassRec in -l$athena_variant" >&5
7761 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7762
7763 xe_check_libs=" -l$athena_variant "
7764 cat > conftest.$ac_ext <<EOF
7765 #line 7766 "configure"
7766 #include "confdefs.h"
7767 /* Override any gcc2 internal prototype to avoid an error.  */
7768 /* We use char because int might match the return type of a gcc2
7769     builtin and then its argument prototype would still apply.  */
7770 char threeDClassRec();
7771
7772 int main() {
7773 threeDClassRec()
7774 ; return 0; }
7775 EOF
7776 if { (eval echo configure:7777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7777   rm -rf conftest*
7778   eval "ac_cv_lib_$ac_lib_var=yes"
7779 else
7780   echo "configure: failed program was:" >&5
7781   cat conftest.$ac_ext >&5
7782   rm -rf conftest*
7783   eval "ac_cv_lib_$ac_lib_var=no"
7784 fi
7785 rm -f conftest*
7786 xe_check_libs=""
7787
7788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7789   echo "$ac_t""yes" 1>&6
7790   athena_lib=$athena_variant
7791 else
7792   echo "$ac_t""no" 1>&6
7793 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
7794 echo "configure:7795: checking for threeDClassRec in -lXaw" >&5
7795 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
7796
7797 xe_check_libs=" -lXaw "
7798 cat > conftest.$ac_ext <<EOF
7799 #line 7800 "configure"
7800 #include "confdefs.h"
7801 /* Override any gcc2 internal prototype to avoid an error.  */
7802 /* We use char because int might match the return type of a gcc2
7803     builtin and then its argument prototype would still apply.  */
7804 char threeDClassRec();
7805
7806 int main() {
7807 threeDClassRec()
7808 ; return 0; }
7809 EOF
7810 if { (eval echo configure:7811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7811   rm -rf conftest*
7812   eval "ac_cv_lib_$ac_lib_var=yes"
7813 else
7814   echo "configure: failed program was:" >&5
7815   cat conftest.$ac_ext >&5
7816   rm -rf conftest*
7817   eval "ac_cv_lib_$ac_lib_var=no"
7818 fi
7819 rm -f conftest*
7820 xe_check_libs=""
7821
7822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7823   echo "$ac_t""yes" 1>&6
7824   athena_lib=Xaw;
7825           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
7826         
7827 else
7828   echo "$ac_t""no" 1>&6
7829 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
7830 fi
7831
7832
7833 fi
7834
7835
7836   fi
7837
7838     if test "$athena_3d" = "no"; then
7839     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
7840 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
7841 echo "configure:7842: checking for X11/Xaw/ThreeD.h" >&5
7842
7843 cat > conftest.$ac_ext <<EOF
7844 #line 7845 "configure"
7845 #include "confdefs.h"
7846 #include <X11/Xaw/ThreeD.h>
7847 EOF
7848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7849 { (eval echo configure:7850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7851 if test -z "$ac_err"; then
7852   rm -rf conftest*
7853   eval "ac_cv_header_$ac_safe=yes"
7854 else
7855   echo "$ac_err" >&5
7856   echo "configure: failed program was:" >&5
7857   cat conftest.$ac_ext >&5
7858   rm -rf conftest*
7859   eval "ac_cv_header_$ac_safe=no"
7860 fi
7861 rm -f conftest*
7862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7863   echo "$ac_t""yes" 1>&6
7864   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7865 else
7866   echo "$ac_t""no" 1>&6
7867 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
7868 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
7869 echo "configure:7870: checking for X11/Xaw/XawInit.h" >&5
7870
7871 cat > conftest.$ac_ext <<EOF
7872 #line 7873 "configure"
7873 #include "confdefs.h"
7874 #include <X11/Xaw/XawInit.h>
7875 EOF
7876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7877 { (eval echo configure:7878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7879 if test -z "$ac_err"; then
7880   rm -rf conftest*
7881   eval "ac_cv_header_$ac_safe=yes"
7882 else
7883   echo "$ac_err" >&5
7884   echo "configure: failed program was:" >&5
7885   cat conftest.$ac_ext >&5
7886   rm -rf conftest*
7887   eval "ac_cv_header_$ac_safe=no"
7888 fi
7889 rm -f conftest*
7890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7891   echo "$ac_t""yes" 1>&6
7892   athena_h_path=X11/Xaw
7893 else
7894   echo "$ac_t""no" 1>&6
7895 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7896 fi
7897
7898 fi
7899
7900   else
7901             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
7902 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
7903 echo "configure:7904: checking for X11/$athena_variant/XawInit.h" >&5
7904
7905 cat > conftest.$ac_ext <<EOF
7906 #line 7907 "configure"
7907 #include "confdefs.h"
7908 #include <X11/$athena_variant/XawInit.h>
7909 EOF
7910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7911 { (eval echo configure:7912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7913 if test -z "$ac_err"; then
7914   rm -rf conftest*
7915   eval "ac_cv_header_$ac_safe=yes"
7916 else
7917   echo "$ac_err" >&5
7918   echo "configure: failed program was:" >&5
7919   cat conftest.$ac_ext >&5
7920   rm -rf conftest*
7921   eval "ac_cv_header_$ac_safe=no"
7922 fi
7923 rm -f conftest*
7924 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7925   echo "$ac_t""yes" 1>&6
7926   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
7927 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
7928 echo "configure:7929: checking for X11/$athena_variant/ThreeD.h" >&5
7929
7930 cat > conftest.$ac_ext <<EOF
7931 #line 7932 "configure"
7932 #include "confdefs.h"
7933 #include <X11/$athena_variant/ThreeD.h>
7934 EOF
7935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7936 { (eval echo configure:7937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7938 if test -z "$ac_err"; then
7939   rm -rf conftest*
7940   eval "ac_cv_header_$ac_safe=yes"
7941 else
7942   echo "$ac_err" >&5
7943   echo "configure: failed program was:" >&5
7944   cat conftest.$ac_ext >&5
7945   rm -rf conftest*
7946   eval "ac_cv_header_$ac_safe=no"
7947 fi
7948 rm -f conftest*
7949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7950   echo "$ac_t""yes" 1>&6
7951   athena_h_path=X11/$athena_variant
7952 else
7953   echo "$ac_t""no" 1>&6
7954 fi
7955
7956 else
7957   echo "$ac_t""no" 1>&6
7958 fi
7959
7960
7961         if test -z "$athena_h_path"; then
7962       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
7963 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
7964 echo "configure:7965: checking for $athena_variant/XawInit.h" >&5
7965
7966 cat > conftest.$ac_ext <<EOF
7967 #line 7968 "configure"
7968 #include "confdefs.h"
7969 #include <$athena_variant/XawInit.h>
7970 EOF
7971 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7972 { (eval echo configure:7973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7973 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7974 if test -z "$ac_err"; then
7975   rm -rf conftest*
7976   eval "ac_cv_header_$ac_safe=yes"
7977 else
7978   echo "$ac_err" >&5
7979   echo "configure: failed program was:" >&5
7980   cat conftest.$ac_ext >&5
7981   rm -rf conftest*
7982   eval "ac_cv_header_$ac_safe=no"
7983 fi
7984 rm -f conftest*
7985 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7986   echo "$ac_t""yes" 1>&6
7987   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
7988 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
7989 echo "configure:7990: checking for $athena_variant/ThreeD.h" >&5
7990
7991 cat > conftest.$ac_ext <<EOF
7992 #line 7993 "configure"
7993 #include "confdefs.h"
7994 #include <$athena_variant/ThreeD.h>
7995 EOF
7996 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7997 { (eval echo configure:7998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7998 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7999 if test -z "$ac_err"; then
8000   rm -rf conftest*
8001   eval "ac_cv_header_$ac_safe=yes"
8002 else
8003   echo "$ac_err" >&5
8004   echo "configure: failed program was:" >&5
8005   cat conftest.$ac_ext >&5
8006   rm -rf conftest*
8007   eval "ac_cv_header_$ac_safe=no"
8008 fi
8009 rm -f conftest*
8010 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8011   echo "$ac_t""yes" 1>&6
8012   athena_h_path=$athena_variant
8013 else
8014   echo "$ac_t""no" 1>&6
8015 fi
8016
8017 else
8018   echo "$ac_t""no" 1>&6
8019 fi
8020
8021     fi
8022
8023         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8024       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8025 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8026 echo "configure:8027: checking for X11/Xaw3d/XawInit.h" >&5
8027
8028 cat > conftest.$ac_ext <<EOF
8029 #line 8030 "configure"
8030 #include "confdefs.h"
8031 #include <X11/Xaw3d/XawInit.h>
8032 EOF
8033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8034 { (eval echo configure:8035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8036 if test -z "$ac_err"; then
8037   rm -rf conftest*
8038   eval "ac_cv_header_$ac_safe=yes"
8039 else
8040   echo "$ac_err" >&5
8041   echo "configure: failed program was:" >&5
8042   cat conftest.$ac_ext >&5
8043   rm -rf conftest*
8044   eval "ac_cv_header_$ac_safe=no"
8045 fi
8046 rm -f conftest*
8047 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8048   echo "$ac_t""yes" 1>&6
8049   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8050 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8051 echo "configure:8052: checking for X11/Xaw3d/ThreeD.h" >&5
8052
8053 cat > conftest.$ac_ext <<EOF
8054 #line 8055 "configure"
8055 #include "confdefs.h"
8056 #include <X11/Xaw3d/ThreeD.h>
8057 EOF
8058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8059 { (eval echo configure:8060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8061 if test -z "$ac_err"; then
8062   rm -rf conftest*
8063   eval "ac_cv_header_$ac_safe=yes"
8064 else
8065   echo "$ac_err" >&5
8066   echo "configure: failed program was:" >&5
8067   cat conftest.$ac_ext >&5
8068   rm -rf conftest*
8069   eval "ac_cv_header_$ac_safe=no"
8070 fi
8071 rm -f conftest*
8072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8073   echo "$ac_t""yes" 1>&6
8074   
8075             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8076             athena_h_path=X11/Xaw3d
8077           
8078 else
8079   echo "$ac_t""no" 1>&6
8080 fi
8081
8082 else
8083   echo "$ac_t""no" 1>&6
8084 fi
8085
8086     fi
8087
8088         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8089       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8090 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8091 echo "configure:8092: checking for Xaw3d/XawInit.h" >&5
8092
8093 cat > conftest.$ac_ext <<EOF
8094 #line 8095 "configure"
8095 #include "confdefs.h"
8096 #include <Xaw3d/XawInit.h>
8097 EOF
8098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8099 { (eval echo configure:8100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8101 if test -z "$ac_err"; then
8102   rm -rf conftest*
8103   eval "ac_cv_header_$ac_safe=yes"
8104 else
8105   echo "$ac_err" >&5
8106   echo "configure: failed program was:" >&5
8107   cat conftest.$ac_ext >&5
8108   rm -rf conftest*
8109   eval "ac_cv_header_$ac_safe=no"
8110 fi
8111 rm -f conftest*
8112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8113   echo "$ac_t""yes" 1>&6
8114   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8115 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8116 echo "configure:8117: checking for Xaw3d/ThreeD.h" >&5
8117
8118 cat > conftest.$ac_ext <<EOF
8119 #line 8120 "configure"
8120 #include "confdefs.h"
8121 #include <Xaw3d/ThreeD.h>
8122 EOF
8123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8124 { (eval echo configure:8125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8126 if test -z "$ac_err"; then
8127   rm -rf conftest*
8128   eval "ac_cv_header_$ac_safe=yes"
8129 else
8130   echo "$ac_err" >&5
8131   echo "configure: failed program was:" >&5
8132   cat conftest.$ac_ext >&5
8133   rm -rf conftest*
8134   eval "ac_cv_header_$ac_safe=no"
8135 fi
8136 rm -f conftest*
8137 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8138   echo "$ac_t""yes" 1>&6
8139   
8140             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8141             athena_h_path=Xaw3d
8142           
8143 else
8144   echo "$ac_t""no" 1>&6
8145 fi
8146
8147 else
8148   echo "$ac_t""no" 1>&6
8149 fi
8150
8151     fi
8152
8153             if test -z "$athena_h_path"; then
8154       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8155 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8156 echo "configure:8157: checking for X11/Xaw/ThreeD.h" >&5
8157
8158 cat > conftest.$ac_ext <<EOF
8159 #line 8160 "configure"
8160 #include "confdefs.h"
8161 #include <X11/Xaw/ThreeD.h>
8162 EOF
8163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8164 { (eval echo configure:8165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8166 if test -z "$ac_err"; then
8167   rm -rf conftest*
8168   eval "ac_cv_header_$ac_safe=yes"
8169 else
8170   echo "$ac_err" >&5
8171   echo "configure: failed program was:" >&5
8172   cat conftest.$ac_ext >&5
8173   rm -rf conftest*
8174   eval "ac_cv_header_$ac_safe=no"
8175 fi
8176 rm -f conftest*
8177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8178   echo "$ac_t""yes" 1>&6
8179   
8180           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8181           athena_h_path=X11/Xaw
8182         
8183 else
8184   echo "$ac_t""no" 1>&6
8185 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8186 fi
8187
8188     fi
8189   fi
8190
8191     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8192     have_xaw=yes
8193   else
8194     have_xaw=no
8195   fi
8196
8197     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8198 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8199 echo "configure:8200: checking for Xm/Xm.h" >&5
8200
8201 cat > conftest.$ac_ext <<EOF
8202 #line 8203 "configure"
8203 #include "confdefs.h"
8204 #include <Xm/Xm.h>
8205 EOF
8206 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8207 { (eval echo configure:8208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8208 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8209 if test -z "$ac_err"; then
8210   rm -rf conftest*
8211   eval "ac_cv_header_$ac_safe=yes"
8212 else
8213   echo "$ac_err" >&5
8214   echo "configure: failed program was:" >&5
8215   cat conftest.$ac_ext >&5
8216   rm -rf conftest*
8217   eval "ac_cv_header_$ac_safe=no"
8218 fi
8219 rm -f conftest*
8220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8221   echo "$ac_t""yes" 1>&6
8222   
8223 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8224 echo "configure:8225: checking for XmStringFree in -lXm" >&5
8225 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8226
8227 xe_check_libs=" -lXm "
8228 cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 /* Override any gcc2 internal prototype to avoid an error.  */
8232 /* We use char because int might match the return type of a gcc2
8233     builtin and then its argument prototype would still apply.  */
8234 char XmStringFree();
8235
8236 int main() {
8237 XmStringFree()
8238 ; return 0; }
8239 EOF
8240 if { (eval echo configure:8241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8241   rm -rf conftest*
8242   eval "ac_cv_lib_$ac_lib_var=yes"
8243 else
8244   echo "configure: failed program was:" >&5
8245   cat conftest.$ac_ext >&5
8246   rm -rf conftest*
8247   eval "ac_cv_lib_$ac_lib_var=no"
8248 fi
8249 rm -f conftest*
8250 xe_check_libs=""
8251
8252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8253   echo "$ac_t""yes" 1>&6
8254   have_motif=yes
8255 else
8256   echo "$ac_t""no" 1>&6
8257 have_motif=no
8258 fi
8259
8260
8261 else
8262   echo "$ac_t""no" 1>&6
8263 have_motif=no
8264 fi
8265
8266
8267   if test "$have_motif" = "yes"; then
8268         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8269 echo "configure:8270: checking for Lesstif" >&5
8270     cat > conftest.$ac_ext <<EOF
8271 #line 8272 "configure"
8272 #include "confdefs.h"
8273 #include <Xm/Xm.h>
8274 #ifdef LESSTIF_VERSION
8275 yes
8276 #endif
8277
8278 EOF
8279 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8280   egrep "yes" >/dev/null 2>&1; then
8281   rm -rf conftest*
8282   have_lesstif=yes
8283 else
8284   rm -rf conftest*
8285   have_lesstif=no
8286 fi
8287 rm -f conftest*
8288
8289   echo "$ac_t""$have_lesstif" 1>&6
8290   fi
8291
8292 fi 
8293
8294 case "$with_menubars" in "" | "yes" | "athena" )
8295   with_menubars="lucid" ;;
8296 esac
8297 case "$with_dialogs" in "" | "yes" | "lucid" )
8298   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8299   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8300   else with_dialogs=no
8301   fi ;;
8302 esac
8303 case "$with_scrollbars" in "" | "yes" )
8304   with_scrollbars="lucid" ;;
8305 esac
8306 case "$with_widgets" in "" | "yes" | "lucid")
8307   if   test "$have_motif" = "yes"; then with_widgets="motif"
8308   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8309   else with_widgets=no
8310   fi ;;
8311 esac
8312
8313 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8314
8315 case "$all_widgets" in
8316   *athena* )
8317     if test "$have_xaw" != "yes"; then
8318       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8319     fi
8320
8321         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8322
8323         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8324
8325             { test "$extra_verbose" = "yes" && cat << EOF
8326     Defining ATHENA_H_PATH = $athena_h_path
8327 EOF
8328 cat >> confdefs.h <<EOF
8329 #define ATHENA_H_PATH $athena_h_path
8330 EOF
8331 }
8332
8333
8334     { test "$extra_verbose" = "yes" && cat << \EOF
8335     Defining LWLIB_USES_ATHENA
8336 EOF
8337 cat >> confdefs.h <<\EOF
8338 #define LWLIB_USES_ATHENA 1
8339 EOF
8340 }
8341
8342     { test "$extra_verbose" = "yes" && cat << \EOF
8343     Defining NEED_ATHENA
8344 EOF
8345 cat >> confdefs.h <<\EOF
8346 #define NEED_ATHENA 1
8347 EOF
8348 }
8349
8350
8351     if test "$athena_3d" = "yes"; then
8352       { test "$extra_verbose" = "yes" && cat << \EOF
8353     Defining HAVE_ATHENA_3D
8354 EOF
8355 cat >> confdefs.h <<\EOF
8356 #define HAVE_ATHENA_3D 1
8357 EOF
8358 }
8359
8360     fi
8361   ;;
8362 esac
8363
8364 case "$all_widgets" in *motif* )
8365   { test "$extra_verbose" = "yes" && cat << \EOF
8366     Defining LWLIB_USES_MOTIF
8367 EOF
8368 cat >> confdefs.h <<\EOF
8369 #define LWLIB_USES_MOTIF 1
8370 EOF
8371 }
8372
8373   { test "$extra_verbose" = "yes" && cat << \EOF
8374     Defining NEED_MOTIF
8375 EOF
8376 cat >> confdefs.h <<\EOF
8377 #define NEED_MOTIF 1
8378 EOF
8379 }
8380
8381   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8382   need_motif=yes ;;
8383 esac
8384
8385 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8386 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8387 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8388 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8389         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8390 case "$with_widgets" in athena* )
8391         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;;
8392 esac
8393 case "$all_widgets" in *lucid* )
8394   { test "$extra_verbose" = "yes" && cat << \EOF
8395     Defining NEED_LUCID
8396 EOF
8397 cat >> confdefs.h <<\EOF
8398 #define NEED_LUCID 1
8399 EOF
8400 }
8401
8402   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8403 esac
8404
8405
8406
8407 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8408     Defining LWLIB_SCROLLBARS_ATHENA
8409 EOF
8410 cat >> confdefs.h <<\EOF
8411 #define LWLIB_SCROLLBARS_ATHENA 1
8412 EOF
8413 }
8414
8415 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8416     Defining LWLIB_DIALOGS_ATHENA
8417 EOF
8418 cat >> confdefs.h <<\EOF
8419 #define LWLIB_DIALOGS_ATHENA 1
8420 EOF
8421 }
8422
8423
8424 if test "$athena_3d" = "yes"; then
8425   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8426     Defining LWLIB_SCROLLBARS_ATHENA3D
8427 EOF
8428 cat >> confdefs.h <<\EOF
8429 #define LWLIB_SCROLLBARS_ATHENA3D 1
8430 EOF
8431 }
8432
8433   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8434     Defining LWLIB_DIALOGS_ATHENA3D
8435 EOF
8436 cat >> confdefs.h <<\EOF
8437 #define LWLIB_DIALOGS_ATHENA3D 1
8438 EOF
8439 }
8440
8441 fi
8442
8443 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8444     Defining LWLIB_WIDGETS_ATHENA
8445 EOF
8446 cat >> confdefs.h <<\EOF
8447 #define LWLIB_WIDGETS_ATHENA 1
8448 EOF
8449 }
8450 ;; esac
8451 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8452         { test "$extra_verbose" = "yes" && cat << \EOF
8453     Defining LWLIB_TABS_LUCID
8454 EOF
8455 cat >> confdefs.h <<\EOF
8456 #define LWLIB_TABS_LUCID 1
8457 EOF
8458 }
8459
8460
8461 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8462     Defining HAVE_MENUBARS
8463 EOF
8464 cat >> confdefs.h <<\EOF
8465 #define HAVE_MENUBARS 1
8466 EOF
8467 }
8468
8469 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8470     Defining HAVE_SCROLLBARS
8471 EOF
8472 cat >> confdefs.h <<\EOF
8473 #define HAVE_SCROLLBARS 1
8474 EOF
8475 }
8476
8477 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8478     Defining HAVE_DIALOGS
8479 EOF
8480 cat >> confdefs.h <<\EOF
8481 #define HAVE_DIALOGS 1
8482 EOF
8483 }
8484
8485 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8486     Defining HAVE_TOOLBARS
8487 EOF
8488 cat >> confdefs.h <<\EOF
8489 #define HAVE_TOOLBARS 1
8490 EOF
8491 }
8492
8493 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8494     Defining HAVE_WIDGETS
8495 EOF
8496 cat >> confdefs.h <<\EOF
8497 #define HAVE_WIDGETS 1
8498 EOF
8499 }
8500
8501
8502 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8503     Defining LWLIB_MENUBARS_LUCID
8504 EOF
8505 cat >> confdefs.h <<\EOF
8506 #define LWLIB_MENUBARS_LUCID 1
8507 EOF
8508 }
8509
8510 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8511     Defining LWLIB_SCROLLBARS_LUCID
8512 EOF
8513 cat >> confdefs.h <<\EOF
8514 #define LWLIB_SCROLLBARS_LUCID 1
8515 EOF
8516 }
8517
8518
8519 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8520     Defining LWLIB_MENUBARS_MOTIF
8521 EOF
8522 cat >> confdefs.h <<\EOF
8523 #define LWLIB_MENUBARS_MOTIF 1
8524 EOF
8525 }
8526
8527 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8528     Defining LWLIB_SCROLLBARS_MOTIF
8529 EOF
8530 cat >> confdefs.h <<\EOF
8531 #define LWLIB_SCROLLBARS_MOTIF 1
8532 EOF
8533 }
8534
8535 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8536     Defining LWLIB_DIALOGS_MOTIF
8537 EOF
8538 cat >> confdefs.h <<\EOF
8539 #define LWLIB_DIALOGS_MOTIF 1
8540 EOF
8541 }
8542
8543 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8544     Defining LWLIB_WIDGETS_MOTIF
8545 EOF
8546 cat >> confdefs.h <<\EOF
8547 #define LWLIB_WIDGETS_MOTIF 1
8548 EOF
8549 }
8550
8551
8552 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
8553    echo "    xemacs will be linked with \"menubar.o\""
8554  fi
8555 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
8556    echo "    xemacs will be linked with \"scrollbar.o\""
8557  fi
8558 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
8559    echo "    xemacs will be linked with \"dialog.o\""
8560  fi
8561 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
8562    echo "    xemacs will be linked with \"toolbar.o\""
8563  fi
8564
8565 if test "$with_x11" = "yes"; then
8566   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
8567    echo "    xemacs will be linked with \"menubar-x.o\""
8568  fi
8569   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8570    echo "    xemacs will be linked with \"scrollbar-x.o\""
8571  fi
8572   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
8573    echo "    xemacs will be linked with \"dialog-x.o\""
8574  fi
8575   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8576    echo "    xemacs will be linked with \"toolbar-x.o\""
8577  fi
8578   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8579    echo "    xemacs will be linked with \"gui-x.o\""
8580  fi
8581 fi
8582
8583
8584 test -z "$with_mule" && with_mule=no
8585 test -z "$with_file_coding" && with_file_coding=no
8586
8587
8588 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8589   { test "$extra_verbose" = "yes" && cat << \EOF
8590     Defining FILE_CODING
8591 EOF
8592 cat >> confdefs.h <<\EOF
8593 #define FILE_CODING 1
8594 EOF
8595 }
8596
8597   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8598    echo "    xemacs will be linked with \"file-coding.o\""
8599  fi
8600 fi
8601
8602 if test "$with_mule" = "yes" ; then
8603   echo "checking for Mule-related features" 1>&6
8604 echo "configure:8605: checking for Mule-related features" >&5
8605   { test "$extra_verbose" = "yes" && cat << \EOF
8606     Defining MULE
8607 EOF
8608 cat >> confdefs.h <<\EOF
8609 #define MULE 1
8610 EOF
8611 }
8612
8613   { test "$extra_verbose" = "yes" && cat << \EOF
8614     Defining FILE_CODING
8615 EOF
8616 cat >> confdefs.h <<\EOF
8617 #define FILE_CODING 1
8618 EOF
8619 }
8620
8621   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
8622    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
8623  fi
8624   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
8625     { test "$extra_verbose" = "yes" && cat << \EOF
8626     Defining TEXT_CODING
8627 EOF
8628 cat >> confdefs.h <<\EOF
8629 #define TEXT_CODING 1
8630 EOF
8631 }
8632
8633     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
8634    echo "    xemacs will be linked with \"text-coding.o\""
8635  fi
8636   else
8637     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8638    echo "    xemacs will be linked with \"file-coding.o\""
8639  fi
8640   fi
8641     for ac_hdr in libintl.h
8642 do
8643 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8644 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8645 echo "configure:8646: checking for $ac_hdr" >&5
8646
8647 cat > conftest.$ac_ext <<EOF
8648 #line 8649 "configure"
8649 #include "confdefs.h"
8650 #include <$ac_hdr>
8651 EOF
8652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8653 { (eval echo configure:8654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8655 if test -z "$ac_err"; then
8656   rm -rf conftest*
8657   eval "ac_cv_header_$ac_safe=yes"
8658 else
8659   echo "$ac_err" >&5
8660   echo "configure: failed program was:" >&5
8661   cat conftest.$ac_ext >&5
8662   rm -rf conftest*
8663   eval "ac_cv_header_$ac_safe=no"
8664 fi
8665 rm -f conftest*
8666 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8667   echo "$ac_t""yes" 1>&6
8668     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8669   { test "$extra_verbose" = "yes" && cat << EOF
8670     Defining $ac_tr_hdr
8671 EOF
8672 cat >> confdefs.h <<EOF
8673 #define $ac_tr_hdr 1
8674 EOF
8675 }
8676  
8677 else
8678   echo "$ac_t""no" 1>&6
8679 fi
8680 done
8681
8682   
8683 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
8684 echo "configure:8685: checking for strerror in -lintl" >&5
8685 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
8686
8687 xe_check_libs=" -lintl "
8688 cat > conftest.$ac_ext <<EOF
8689 #line 8690 "configure"
8690 #include "confdefs.h"
8691 /* Override any gcc2 internal prototype to avoid an error.  */
8692 /* We use char because int might match the return type of a gcc2
8693     builtin and then its argument prototype would still apply.  */
8694 char strerror();
8695
8696 int main() {
8697 strerror()
8698 ; return 0; }
8699 EOF
8700 if { (eval echo configure:8701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8701   rm -rf conftest*
8702   eval "ac_cv_lib_$ac_lib_var=yes"
8703 else
8704   echo "configure: failed program was:" >&5
8705   cat conftest.$ac_ext >&5
8706   rm -rf conftest*
8707   eval "ac_cv_lib_$ac_lib_var=no"
8708 fi
8709 rm -f conftest*
8710 xe_check_libs=""
8711
8712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8713   echo "$ac_t""yes" 1>&6
8714     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8715     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8716   { test "$extra_verbose" = "yes" && cat << EOF
8717     Defining $ac_tr_lib
8718 EOF
8719 cat >> confdefs.h <<EOF
8720 #define $ac_tr_lib 1
8721 EOF
8722 }
8723
8724   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
8725
8726 else
8727   echo "$ac_t""no" 1>&6
8728 fi
8729
8730
8731
8732   if test "$with_utf_2000" = "yes" ; then
8733     { test "$extra_verbose" = "yes" && cat << \EOF
8734     Defining CHAR_IS_UCS4
8735 EOF
8736 cat >> confdefs.h <<\EOF
8737 #define CHAR_IS_UCS4 1
8738 EOF
8739 }
8740
8741     { test "$extra_verbose" = "yes" && cat << \EOF
8742     Defining UTF2000
8743 EOF
8744 cat >> confdefs.h <<\EOF
8745 #define UTF2000 1
8746 EOF
8747 }
8748
8749   fi
8750
8751   echo "checking for Mule input methods" 1>&6
8752 echo "configure:8753: checking for Mule input methods" >&5
8753         case "$with_xim" in "" | "yes" )
8754     echo "checking for XIM" 1>&6
8755 echo "configure:8756: checking for XIM" >&5
8756     
8757 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
8758 echo "configure:8759: checking for XOpenIM in -lX11" >&5
8759 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
8760
8761 xe_check_libs=" -lX11 "
8762 cat > conftest.$ac_ext <<EOF
8763 #line 8764 "configure"
8764 #include "confdefs.h"
8765 /* Override any gcc2 internal prototype to avoid an error.  */
8766 /* We use char because int might match the return type of a gcc2
8767     builtin and then its argument prototype would still apply.  */
8768 char XOpenIM();
8769
8770 int main() {
8771 XOpenIM()
8772 ; return 0; }
8773 EOF
8774 if { (eval echo configure:8775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8775   rm -rf conftest*
8776   eval "ac_cv_lib_$ac_lib_var=yes"
8777 else
8778   echo "configure: failed program was:" >&5
8779   cat conftest.$ac_ext >&5
8780   rm -rf conftest*
8781   eval "ac_cv_lib_$ac_lib_var=no"
8782 fi
8783 rm -f conftest*
8784 xe_check_libs=""
8785
8786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8787   echo "$ac_t""yes" 1>&6
8788   with_xim=xlib
8789 else
8790   echo "$ac_t""no" 1>&6
8791 with_xim=no
8792 fi
8793
8794
8795         if test "$have_motif $have_lesstif" = "yes no"; then
8796       
8797 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
8798 echo "configure:8799: checking for XmImMbLookupString in -lXm" >&5
8799 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
8800
8801 xe_check_libs=" -lXm "
8802 cat > conftest.$ac_ext <<EOF
8803 #line 8804 "configure"
8804 #include "confdefs.h"
8805 /* Override any gcc2 internal prototype to avoid an error.  */
8806 /* We use char because int might match the return type of a gcc2
8807     builtin and then its argument prototype would still apply.  */
8808 char XmImMbLookupString();
8809
8810 int main() {
8811 XmImMbLookupString()
8812 ; return 0; }
8813 EOF
8814 if { (eval echo configure:8815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8815   rm -rf conftest*
8816   eval "ac_cv_lib_$ac_lib_var=yes"
8817 else
8818   echo "configure: failed program was:" >&5
8819   cat conftest.$ac_ext >&5
8820   rm -rf conftest*
8821   eval "ac_cv_lib_$ac_lib_var=no"
8822 fi
8823 rm -f conftest*
8824 xe_check_libs=""
8825
8826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8827   echo "$ac_t""yes" 1>&6
8828   with_xim=motif
8829 else
8830   echo "$ac_t""no" 1>&6
8831 fi
8832
8833
8834     fi ;;
8835   esac
8836   if test "$with_xim" != "no"; then
8837     { test "$extra_verbose" = "yes" && cat << \EOF
8838     Defining HAVE_XIM
8839 EOF
8840 cat >> confdefs.h <<\EOF
8841 #define HAVE_XIM 1
8842 EOF
8843 }
8844
8845     if test "$with_xim" = "xlib"; then
8846       { test "$extra_verbose" = "yes" && cat << \EOF
8847     Defining XIM_XLIB
8848 EOF
8849 cat >> confdefs.h <<\EOF
8850 #define XIM_XLIB 1
8851 EOF
8852 }
8853
8854       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
8855    echo "    xemacs will be linked with \"input-method-xlib.o\""
8856  fi
8857     fi
8858     if test "$with_xim" = "motif"; then
8859       { test "$extra_verbose" = "yes" && cat << \EOF
8860     Defining XIM_MOTIF
8861 EOF
8862 cat >> confdefs.h <<\EOF
8863 #define XIM_MOTIF 1
8864 EOF
8865 }
8866
8867       need_motif=yes
8868       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8869    echo "    xemacs will be linked with \"input-method-motif.o\""
8870  fi
8871     fi
8872     if test "$with_xim" = "motif"; then
8873       with_xfs=no
8874     fi
8875   fi
8876
8877     if test "$with_xfs" = "yes" ; then
8878     echo "checking for XFontSet" 1>&6
8879 echo "configure:8880: checking for XFontSet" >&5
8880     
8881 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8882 echo "configure:8883: checking for XmbDrawString in -lX11" >&5
8883 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8884
8885 xe_check_libs=" -lX11 "
8886 cat > conftest.$ac_ext <<EOF
8887 #line 8888 "configure"
8888 #include "confdefs.h"
8889 /* Override any gcc2 internal prototype to avoid an error.  */
8890 /* We use char because int might match the return type of a gcc2
8891     builtin and then its argument prototype would still apply.  */
8892 char XmbDrawString();
8893
8894 int main() {
8895 XmbDrawString()
8896 ; return 0; }
8897 EOF
8898 if { (eval echo configure:8899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8899   rm -rf conftest*
8900   eval "ac_cv_lib_$ac_lib_var=yes"
8901 else
8902   echo "configure: failed program was:" >&5
8903   cat conftest.$ac_ext >&5
8904   rm -rf conftest*
8905   eval "ac_cv_lib_$ac_lib_var=no"
8906 fi
8907 rm -f conftest*
8908 xe_check_libs=""
8909
8910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8911   echo "$ac_t""yes" 1>&6
8912   :
8913 else
8914   echo "$ac_t""no" 1>&6
8915 with_xfs=no
8916 fi
8917
8918
8919     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8920       { test "$extra_verbose" = "yes" && cat << \EOF
8921     Defining USE_XFONTSET
8922 EOF
8923 cat >> confdefs.h <<\EOF
8924 #define USE_XFONTSET 1
8925 EOF
8926 }
8927
8928       if test "$with_xim" = "no" ; then
8929         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8930    echo "    xemacs will be linked with \"input-method-xfs.o\""
8931  fi
8932       fi
8933     fi
8934   fi 
8935     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8936   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8937 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8938 echo "configure:8939: checking for wnn/jllib.h" >&5
8939
8940 cat > conftest.$ac_ext <<EOF
8941 #line 8942 "configure"
8942 #include "confdefs.h"
8943 #include <wnn/jllib.h>
8944 EOF
8945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8946 { (eval echo configure:8947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8948 if test -z "$ac_err"; then
8949   rm -rf conftest*
8950   eval "ac_cv_header_$ac_safe=yes"
8951 else
8952   echo "$ac_err" >&5
8953   echo "configure: failed program was:" >&5
8954   cat conftest.$ac_ext >&5
8955   rm -rf conftest*
8956   eval "ac_cv_header_$ac_safe=no"
8957 fi
8958 rm -f conftest*
8959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8960   echo "$ac_t""yes" 1>&6
8961   :
8962 else
8963   echo "$ac_t""no" 1>&6
8964 with_wnn=no
8965 fi
8966  }
8967     if test "$with_wnn" != "no"; then
8968     for ac_func in crypt
8969 do
8970 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8971 echo "configure:8972: checking for $ac_func" >&5
8972
8973 cat > conftest.$ac_ext <<EOF
8974 #line 8975 "configure"
8975 #include "confdefs.h"
8976 /* System header to define __stub macros and hopefully few prototypes,
8977     which can conflict with char $ac_func(); below.  */
8978 #include <assert.h>
8979 /* Override any gcc2 internal prototype to avoid an error.  */
8980 /* We use char because int might match the return type of a gcc2
8981     builtin and then its argument prototype would still apply.  */
8982 char $ac_func();
8983
8984 int main() {
8985
8986 /* The GNU C library defines this for functions which it implements
8987     to always fail with ENOSYS.  Some functions are actually named
8988     something starting with __ and the normal name is an alias.  */
8989 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8990 choke me
8991 #else
8992 $ac_func();
8993 #endif
8994
8995 ; return 0; }
8996 EOF
8997 if { (eval echo configure:8998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8998   rm -rf conftest*
8999   eval "ac_cv_func_$ac_func=yes"
9000 else
9001   echo "configure: failed program was:" >&5
9002   cat conftest.$ac_ext >&5
9003   rm -rf conftest*
9004   eval "ac_cv_func_$ac_func=no"
9005 fi
9006 rm -f conftest*
9007
9008 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9009   echo "$ac_t""yes" 1>&6
9010     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9011   { test "$extra_verbose" = "yes" && cat << EOF
9012     Defining $ac_tr_func
9013 EOF
9014 cat >> confdefs.h <<EOF
9015 #define $ac_tr_func 1
9016 EOF
9017 }
9018  
9019 else
9020   echo "$ac_t""no" 1>&6
9021 fi
9022 done
9023
9024     test "$ac_cv_func_crypt" != "yes" && { 
9025 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9026 echo "configure:9027: checking for crypt in -lcrypt" >&5
9027 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9028
9029 xe_check_libs=" -lcrypt "
9030 cat > conftest.$ac_ext <<EOF
9031 #line 9032 "configure"
9032 #include "confdefs.h"
9033 /* Override any gcc2 internal prototype to avoid an error.  */
9034 /* We use char because int might match the return type of a gcc2
9035     builtin and then its argument prototype would still apply.  */
9036 char crypt();
9037
9038 int main() {
9039 crypt()
9040 ; return 0; }
9041 EOF
9042 if { (eval echo configure:9043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9043   rm -rf conftest*
9044   eval "ac_cv_lib_$ac_lib_var=yes"
9045 else
9046   echo "configure: failed program was:" >&5
9047   cat conftest.$ac_ext >&5
9048   rm -rf conftest*
9049   eval "ac_cv_lib_$ac_lib_var=no"
9050 fi
9051 rm -f conftest*
9052 xe_check_libs=""
9053
9054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9055   echo "$ac_t""yes" 1>&6
9056     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9057     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9058   { test "$extra_verbose" = "yes" && cat << EOF
9059     Defining $ac_tr_lib
9060 EOF
9061 cat >> confdefs.h <<EOF
9062 #define $ac_tr_lib 1
9063 EOF
9064 }
9065
9066   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9067
9068 else
9069   echo "$ac_t""no" 1>&6
9070 fi
9071
9072  }
9073   fi
9074     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9075     
9076 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9077 echo "configure:9078: checking for jl_dic_list_e in -lwnn" >&5
9078 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9079
9080 xe_check_libs=" -lwnn "
9081 cat > conftest.$ac_ext <<EOF
9082 #line 9083 "configure"
9083 #include "confdefs.h"
9084 /* Override any gcc2 internal prototype to avoid an error.  */
9085 /* We use char because int might match the return type of a gcc2
9086     builtin and then its argument prototype would still apply.  */
9087 char jl_dic_list_e();
9088
9089 int main() {
9090 jl_dic_list_e()
9091 ; return 0; }
9092 EOF
9093 if { (eval echo configure:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9094   rm -rf conftest*
9095   eval "ac_cv_lib_$ac_lib_var=yes"
9096 else
9097   echo "configure: failed program was:" >&5
9098   cat conftest.$ac_ext >&5
9099   rm -rf conftest*
9100   eval "ac_cv_lib_$ac_lib_var=no"
9101 fi
9102 rm -f conftest*
9103 xe_check_libs=""
9104
9105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9106   echo "$ac_t""yes" 1>&6
9107   libwnn=wnn
9108 else
9109   echo "$ac_t""no" 1>&6
9110 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9111 echo "configure:9112: checking for jl_dic_list_e in -lwnn4" >&5
9112 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9113
9114 xe_check_libs=" -lwnn4 "
9115 cat > conftest.$ac_ext <<EOF
9116 #line 9117 "configure"
9117 #include "confdefs.h"
9118 /* Override any gcc2 internal prototype to avoid an error.  */
9119 /* We use char because int might match the return type of a gcc2
9120     builtin and then its argument prototype would still apply.  */
9121 char jl_dic_list_e();
9122
9123 int main() {
9124 jl_dic_list_e()
9125 ; return 0; }
9126 EOF
9127 if { (eval echo configure:9128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9128   rm -rf conftest*
9129   eval "ac_cv_lib_$ac_lib_var=yes"
9130 else
9131   echo "configure: failed program was:" >&5
9132   cat conftest.$ac_ext >&5
9133   rm -rf conftest*
9134   eval "ac_cv_lib_$ac_lib_var=no"
9135 fi
9136 rm -f conftest*
9137 xe_check_libs=""
9138
9139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9140   echo "$ac_t""yes" 1>&6
9141   libwnn=wnn4
9142 else
9143   echo "$ac_t""no" 1>&6
9144 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9145 echo "configure:9146: checking for jl_dic_list_e in -lwnn6" >&5
9146 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9147
9148 xe_check_libs=" -lwnn6 "
9149 cat > conftest.$ac_ext <<EOF
9150 #line 9151 "configure"
9151 #include "confdefs.h"
9152 /* Override any gcc2 internal prototype to avoid an error.  */
9153 /* We use char because int might match the return type of a gcc2
9154     builtin and then its argument prototype would still apply.  */
9155 char jl_dic_list_e();
9156
9157 int main() {
9158 jl_dic_list_e()
9159 ; return 0; }
9160 EOF
9161 if { (eval echo configure:9162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9162   rm -rf conftest*
9163   eval "ac_cv_lib_$ac_lib_var=yes"
9164 else
9165   echo "configure: failed program was:" >&5
9166   cat conftest.$ac_ext >&5
9167   rm -rf conftest*
9168   eval "ac_cv_lib_$ac_lib_var=no"
9169 fi
9170 rm -f conftest*
9171 xe_check_libs=""
9172
9173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9174   echo "$ac_t""yes" 1>&6
9175   libwnn=wnn6
9176 else
9177   echo "$ac_t""no" 1>&6
9178 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9179 echo "configure:9180: checking for dic_list_e in -lwnn6_fromsrc" >&5
9180 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9181
9182 xe_check_libs=" -lwnn6_fromsrc "
9183 cat > conftest.$ac_ext <<EOF
9184 #line 9185 "configure"
9185 #include "confdefs.h"
9186 /* Override any gcc2 internal prototype to avoid an error.  */
9187 /* We use char because int might match the return type of a gcc2
9188     builtin and then its argument prototype would still apply.  */
9189 char dic_list_e();
9190
9191 int main() {
9192 dic_list_e()
9193 ; return 0; }
9194 EOF
9195 if { (eval echo configure:9196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9196   rm -rf conftest*
9197   eval "ac_cv_lib_$ac_lib_var=yes"
9198 else
9199   echo "configure: failed program was:" >&5
9200   cat conftest.$ac_ext >&5
9201   rm -rf conftest*
9202   eval "ac_cv_lib_$ac_lib_var=no"
9203 fi
9204 rm -f conftest*
9205 xe_check_libs=""
9206
9207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9208   echo "$ac_t""yes" 1>&6
9209   libwnn=wnn6_fromsrc
9210 else
9211   echo "$ac_t""no" 1>&6
9212 with_wnn=no
9213 fi
9214
9215
9216 fi
9217
9218
9219 fi
9220
9221
9222 fi
9223
9224
9225   fi
9226   test -z "$with_wnn" && with_wnn=yes
9227   if test "$with_wnn" = "yes"; then
9228     { test "$extra_verbose" = "yes" && cat << \EOF
9229     Defining HAVE_WNN
9230 EOF
9231 cat >> confdefs.h <<\EOF
9232 #define HAVE_WNN 1
9233 EOF
9234 }
9235
9236     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9237     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9238    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9239  fi
9240     if test "$with_wnn6" != "no"; then
9241       
9242 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9243 echo "configure:9244: checking for jl_fi_dic_list in -l$libwnn" >&5
9244 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9245
9246 xe_check_libs=" -l$libwnn "
9247 cat > conftest.$ac_ext <<EOF
9248 #line 9249 "configure"
9249 #include "confdefs.h"
9250 /* Override any gcc2 internal prototype to avoid an error.  */
9251 /* We use char because int might match the return type of a gcc2
9252     builtin and then its argument prototype would still apply.  */
9253 char jl_fi_dic_list();
9254
9255 int main() {
9256 jl_fi_dic_list()
9257 ; return 0; }
9258 EOF
9259 if { (eval echo configure:9260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9260   rm -rf conftest*
9261   eval "ac_cv_lib_$ac_lib_var=yes"
9262 else
9263   echo "configure: failed program was:" >&5
9264   cat conftest.$ac_ext >&5
9265   rm -rf conftest*
9266   eval "ac_cv_lib_$ac_lib_var=no"
9267 fi
9268 rm -f conftest*
9269 xe_check_libs=""
9270
9271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9272   echo "$ac_t""yes" 1>&6
9273   with_wnn6=yes
9274 else
9275   echo "$ac_t""no" 1>&6
9276 fi
9277
9278
9279       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9280     Defining WNN6
9281 EOF
9282 cat >> confdefs.h <<\EOF
9283 #define WNN6 1
9284 EOF
9285 }
9286
9287     fi
9288   fi
9289
9290     canna_includes_found=no
9291   if test "$with_canna" != "no"; then
9292     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9293 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9294 echo "configure:9295: checking for canna/jrkanji.h" >&5
9295
9296 cat > conftest.$ac_ext <<EOF
9297 #line 9298 "configure"
9298 #include "confdefs.h"
9299 #include <canna/jrkanji.h>
9300 EOF
9301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9302 { (eval echo configure:9303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9304 if test -z "$ac_err"; then
9305   rm -rf conftest*
9306   eval "ac_cv_header_$ac_safe=yes"
9307 else
9308   echo "$ac_err" >&5
9309   echo "configure: failed program was:" >&5
9310   cat conftest.$ac_ext >&5
9311   rm -rf conftest*
9312   eval "ac_cv_header_$ac_safe=no"
9313 fi
9314 rm -f conftest*
9315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9316   echo "$ac_t""yes" 1>&6
9317   canna_includes_found=yes
9318 else
9319   echo "$ac_t""no" 1>&6
9320 fi
9321
9322   fi
9323   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9324       -d "/usr/local/canna/include"; then
9325     save_c_switch_site="$c_switch_site"
9326     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9327     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9328 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9329 echo "configure:9330: checking for canna/jrkanji.h" >&5
9330
9331 cat > conftest.$ac_ext <<EOF
9332 #line 9333 "configure"
9333 #include "confdefs.h"
9334 #include <canna/jrkanji.h>
9335 EOF
9336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9337 { (eval echo configure:9338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9339 if test -z "$ac_err"; then
9340   rm -rf conftest*
9341   eval "ac_cv_header_$ac_safe=yes"
9342 else
9343   echo "$ac_err" >&5
9344   echo "configure: failed program was:" >&5
9345   cat conftest.$ac_ext >&5
9346   rm -rf conftest*
9347   eval "ac_cv_header_$ac_safe=no"
9348 fi
9349 rm -f conftest*
9350 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9351   echo "$ac_t""yes" 1>&6
9352   canna_includes_found=yes
9353 else
9354   echo "$ac_t""no" 1>&6
9355 fi
9356
9357     if test "$canna_includes_found" != "yes"; then
9358       c_switch_site="$save_c_switch_site"
9359       with_canna="no"
9360     fi
9361   fi
9362
9363   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9364 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9365 echo "configure:9366: checking for canna/RK.h" >&5
9366
9367 cat > conftest.$ac_ext <<EOF
9368 #line 9369 "configure"
9369 #include "confdefs.h"
9370 #include <canna/RK.h>
9371 EOF
9372 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9373 { (eval echo configure:9374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9374 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9375 if test -z "$ac_err"; then
9376   rm -rf conftest*
9377   eval "ac_cv_header_$ac_safe=yes"
9378 else
9379   echo "$ac_err" >&5
9380   echo "configure: failed program was:" >&5
9381   cat conftest.$ac_ext >&5
9382   rm -rf conftest*
9383   eval "ac_cv_header_$ac_safe=no"
9384 fi
9385 rm -f conftest*
9386 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9387   echo "$ac_t""yes" 1>&6
9388   :
9389 else
9390   echo "$ac_t""no" 1>&6
9391 with_canna=no
9392 fi
9393  }
9394   test -z "$with_canna" && { 
9395 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9396 echo "configure:9397: checking for RkBgnBun in -lRKC" >&5
9397 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9398
9399 xe_check_libs=" -lRKC "
9400 cat > conftest.$ac_ext <<EOF
9401 #line 9402 "configure"
9402 #include "confdefs.h"
9403 /* Override any gcc2 internal prototype to avoid an error.  */
9404 /* We use char because int might match the return type of a gcc2
9405     builtin and then its argument prototype would still apply.  */
9406 char RkBgnBun();
9407
9408 int main() {
9409 RkBgnBun()
9410 ; return 0; }
9411 EOF
9412 if { (eval echo configure:9413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9413   rm -rf conftest*
9414   eval "ac_cv_lib_$ac_lib_var=yes"
9415 else
9416   echo "configure: failed program was:" >&5
9417   cat conftest.$ac_ext >&5
9418   rm -rf conftest*
9419   eval "ac_cv_lib_$ac_lib_var=no"
9420 fi
9421 rm -f conftest*
9422 xe_check_libs=""
9423
9424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9425   echo "$ac_t""yes" 1>&6
9426   :
9427 else
9428   echo "$ac_t""no" 1>&6
9429 with_canna=no
9430 fi
9431
9432  }
9433   test -z "$with_canna" && { 
9434 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9435 echo "configure:9436: checking for jrKanjiControl in -lcanna" >&5
9436 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9437
9438 xe_check_libs=" -lcanna "
9439 cat > conftest.$ac_ext <<EOF
9440 #line 9441 "configure"
9441 #include "confdefs.h"
9442 /* Override any gcc2 internal prototype to avoid an error.  */
9443 /* We use char because int might match the return type of a gcc2
9444     builtin and then its argument prototype would still apply.  */
9445 char jrKanjiControl();
9446
9447 int main() {
9448 jrKanjiControl()
9449 ; return 0; }
9450 EOF
9451 if { (eval echo configure:9452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9452   rm -rf conftest*
9453   eval "ac_cv_lib_$ac_lib_var=yes"
9454 else
9455   echo "configure: failed program was:" >&5
9456   cat conftest.$ac_ext >&5
9457   rm -rf conftest*
9458   eval "ac_cv_lib_$ac_lib_var=no"
9459 fi
9460 rm -f conftest*
9461 xe_check_libs=""
9462
9463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9464   echo "$ac_t""yes" 1>&6
9465   :
9466 else
9467   echo "$ac_t""no" 1>&6
9468 with_canna=no
9469 fi
9470
9471  }
9472   test -z "$with_canna" && with_canna=yes
9473   if test "$with_canna" = "yes"; then
9474     { test "$extra_verbose" = "yes" && cat << \EOF
9475     Defining HAVE_CANNA
9476 EOF
9477 cat >> confdefs.h <<\EOF
9478 #define HAVE_CANNA 1
9479 EOF
9480 }
9481
9482     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9483     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9484    echo "    xemacs will be linked with \"mule-canna.o\""
9485  fi
9486   fi
9487
9488 else   for feature in xim canna wnn; do
9489     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9490       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9491     fi
9492     eval "with_${feature}=no"
9493   done
9494 fi 
9495
9496 if test "$need_motif" = "yes" ; then
9497   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9498     
9499 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9500 echo "configure:9501: checking for layout_object_getvalue in -li18n" >&5
9501 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9502
9503 xe_check_libs=" -li18n "
9504 cat > conftest.$ac_ext <<EOF
9505 #line 9506 "configure"
9506 #include "confdefs.h"
9507 /* Override any gcc2 internal prototype to avoid an error.  */
9508 /* We use char because int might match the return type of a gcc2
9509     builtin and then its argument prototype would still apply.  */
9510 char layout_object_getvalue();
9511
9512 int main() {
9513 layout_object_getvalue()
9514 ; return 0; }
9515 EOF
9516 if { (eval echo configure:9517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9517   rm -rf conftest*
9518   eval "ac_cv_lib_$ac_lib_var=yes"
9519 else
9520   echo "configure: failed program was:" >&5
9521   cat conftest.$ac_ext >&5
9522   rm -rf conftest*
9523   eval "ac_cv_lib_$ac_lib_var=no"
9524 fi
9525 rm -f conftest*
9526 xe_check_libs=""
9527
9528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9529   echo "$ac_t""yes" 1>&6
9530   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9531 else
9532   echo "$ac_t""no" 1>&6
9533 fi
9534
9535
9536   
9537 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9538     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9539   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9540   
9541         runpath="" runpath_dirs=""
9542   if test -n "$LD_RUN_PATH"; then
9543     runpath="$LD_RUN_PATH"
9544   elif test "$GCC" = "yes"; then
9545         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
9546     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
9547     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
9548     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
9549       case "$arg" in P,* | -L* | -R* )
9550         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
9551           {
9552 xe_runpath_dir="$dir"
9553   test "$xe_runpath_dir" != "/lib"     -a \
9554         "$xe_runpath_dir" != "/usr/lib" -a \
9555         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9556   eval "$xe_add_unique_runpath_dir"
9557 }
9558         done ;;
9559       esac
9560     done
9561     ld_switch_run="$ld_switch_run_save"
9562     rm -f conftest*
9563   else
9564         for arg in $ld_switch_site $ld_switch_x_site; do
9565       case "$arg" in -L*) {
9566 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
9567   test "$xe_runpath_dir" != "/lib"     -a \
9568         "$xe_runpath_dir" != "/usr/lib" -a \
9569         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9570   eval "$xe_add_unique_runpath_dir"
9571 };; esac
9572     done
9573         if test "$opsys $need_motif" = "sol2 yes"; then
9574       xe_runpath_dir="/opt/SUNWdt/lib";
9575       eval "$xe_add_unique_runpath_dir";
9576     fi
9577   fi 
9578   if test -n "$runpath"; then
9579     ld_switch_run="${dash_r}${runpath}"
9580     
9581 if test "$GCC" = "yes"; then
9582   set x $ld_switch_run; shift; ld_switch_run=""
9583   while test -n "$1"; do
9584     case $1 in
9585       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9586       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9587       -Xlinker* ) ;;
9588       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9589     esac
9590     shift
9591   done
9592 fi
9593     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9594   fi
9595 fi
9596
9597 fi
9598
9599 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
9600 do
9601 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9602 echo "configure:9603: checking for $ac_func" >&5
9603
9604 cat > conftest.$ac_ext <<EOF
9605 #line 9606 "configure"
9606 #include "confdefs.h"
9607 /* System header to define __stub macros and hopefully few prototypes,
9608     which can conflict with char $ac_func(); below.  */
9609 #include <assert.h>
9610 /* Override any gcc2 internal prototype to avoid an error.  */
9611 /* We use char because int might match the return type of a gcc2
9612     builtin and then its argument prototype would still apply.  */
9613 char $ac_func();
9614
9615 int main() {
9616
9617 /* The GNU C library defines this for functions which it implements
9618     to always fail with ENOSYS.  Some functions are actually named
9619     something starting with __ and the normal name is an alias.  */
9620 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9621 choke me
9622 #else
9623 $ac_func();
9624 #endif
9625
9626 ; return 0; }
9627 EOF
9628 if { (eval echo configure:9629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9629   rm -rf conftest*
9630   eval "ac_cv_func_$ac_func=yes"
9631 else
9632   echo "configure: failed program was:" >&5
9633   cat conftest.$ac_ext >&5
9634   rm -rf conftest*
9635   eval "ac_cv_func_$ac_func=no"
9636 fi
9637 rm -f conftest*
9638
9639 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9640   echo "$ac_t""yes" 1>&6
9641     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9642   { test "$extra_verbose" = "yes" && cat << EOF
9643     Defining $ac_tr_func
9644 EOF
9645 cat >> confdefs.h <<EOF
9646 #define $ac_tr_func 1
9647 EOF
9648 }
9649  
9650 else
9651   echo "$ac_t""no" 1>&6
9652 fi
9653 done
9654
9655
9656 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9657    echo "    xemacs will be linked with \"realpath.o\""
9658  fi
9659
9660 for ac_func in getloadavg
9661 do
9662 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9663 echo "configure:9664: checking for $ac_func" >&5
9664
9665 cat > conftest.$ac_ext <<EOF
9666 #line 9667 "configure"
9667 #include "confdefs.h"
9668 /* System header to define __stub macros and hopefully few prototypes,
9669     which can conflict with char $ac_func(); below.  */
9670 #include <assert.h>
9671 /* Override any gcc2 internal prototype to avoid an error.  */
9672 /* We use char because int might match the return type of a gcc2
9673     builtin and then its argument prototype would still apply.  */
9674 char $ac_func();
9675
9676 int main() {
9677
9678 /* The GNU C library defines this for functions which it implements
9679     to always fail with ENOSYS.  Some functions are actually named
9680     something starting with __ and the normal name is an alias.  */
9681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9682 choke me
9683 #else
9684 $ac_func();
9685 #endif
9686
9687 ; return 0; }
9688 EOF
9689 if { (eval echo configure:9690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9690   rm -rf conftest*
9691   eval "ac_cv_func_$ac_func=yes"
9692 else
9693   echo "configure: failed program was:" >&5
9694   cat conftest.$ac_ext >&5
9695   rm -rf conftest*
9696   eval "ac_cv_func_$ac_func=no"
9697 fi
9698 rm -f conftest*
9699
9700 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9701   echo "$ac_t""yes" 1>&6
9702     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9703   { test "$extra_verbose" = "yes" && cat << EOF
9704     Defining $ac_tr_func
9705 EOF
9706 cat >> confdefs.h <<EOF
9707 #define $ac_tr_func 1
9708 EOF
9709 }
9710  
9711 else
9712   echo "$ac_t""no" 1>&6
9713 fi
9714 done
9715
9716
9717 if test "$ac_cv_func_getloadavg" != "yes"
9718 then
9719   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
9720    echo "    xemacs will be linked with \"getloadavg.o\""
9721  fi
9722
9723     
9724 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
9725 echo "configure:9726: checking for kstat_open in -lkstat" >&5
9726 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
9727
9728 xe_check_libs=" -lkstat "
9729 cat > conftest.$ac_ext <<EOF
9730 #line 9731 "configure"
9731 #include "confdefs.h"
9732 /* Override any gcc2 internal prototype to avoid an error.  */
9733 /* We use char because int might match the return type of a gcc2
9734     builtin and then its argument prototype would still apply.  */
9735 char kstat_open();
9736
9737 int main() {
9738 kstat_open()
9739 ; return 0; }
9740 EOF
9741 if { (eval echo configure:9742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9742   rm -rf conftest*
9743   eval "ac_cv_lib_$ac_lib_var=yes"
9744 else
9745   echo "configure: failed program was:" >&5
9746   cat conftest.$ac_ext >&5
9747   rm -rf conftest*
9748   eval "ac_cv_lib_$ac_lib_var=no"
9749 fi
9750 rm -f conftest*
9751 xe_check_libs=""
9752
9753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9754   echo "$ac_t""yes" 1>&6
9755     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9756     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9757   { test "$extra_verbose" = "yes" && cat << EOF
9758     Defining $ac_tr_lib
9759 EOF
9760 cat >> confdefs.h <<EOF
9761 #define $ac_tr_lib 1
9762 EOF
9763 }
9764
9765   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
9766
9767 else
9768   echo "$ac_t""no" 1>&6
9769 fi
9770
9771
9772
9773     
9774 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
9775 echo "configure:9776: checking for kvm_read in -lkvm" >&5
9776 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
9777
9778 xe_check_libs=" -lkvm "
9779 cat > conftest.$ac_ext <<EOF
9780 #line 9781 "configure"
9781 #include "confdefs.h"
9782 /* Override any gcc2 internal prototype to avoid an error.  */
9783 /* We use char because int might match the return type of a gcc2
9784     builtin and then its argument prototype would still apply.  */
9785 char kvm_read();
9786
9787 int main() {
9788 kvm_read()
9789 ; return 0; }
9790 EOF
9791 if { (eval echo configure:9792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9792   rm -rf conftest*
9793   eval "ac_cv_lib_$ac_lib_var=yes"
9794 else
9795   echo "configure: failed program was:" >&5
9796   cat conftest.$ac_ext >&5
9797   rm -rf conftest*
9798   eval "ac_cv_lib_$ac_lib_var=no"
9799 fi
9800 rm -f conftest*
9801 xe_check_libs=""
9802
9803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9804   echo "$ac_t""yes" 1>&6
9805     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9806     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9807   { test "$extra_verbose" = "yes" && cat << EOF
9808     Defining $ac_tr_lib
9809 EOF
9810 cat >> confdefs.h <<EOF
9811 #define $ac_tr_lib 1
9812 EOF
9813 }
9814
9815   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9816
9817 else
9818   echo "$ac_t""no" 1>&6
9819 fi
9820
9821
9822 fi
9823
9824 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9825 echo "configure:9826: checking whether netdb declares h_errno" >&5
9826 cat > conftest.$ac_ext <<EOF
9827 #line 9828 "configure"
9828 #include "confdefs.h"
9829 #include <netdb.h>
9830 int main() {
9831 return h_errno;
9832 ; return 0; }
9833 EOF
9834 if { (eval echo configure:9835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9835   rm -rf conftest*
9836   echo "$ac_t""yes" 1>&6
9837    { test "$extra_verbose" = "yes" && cat << \EOF
9838     Defining HAVE_H_ERRNO
9839 EOF
9840 cat >> confdefs.h <<\EOF
9841 #define HAVE_H_ERRNO 1
9842 EOF
9843 }
9844
9845 else
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848   rm -rf conftest*
9849   echo "$ac_t""no" 1>&6
9850 fi
9851 rm -f conftest*
9852
9853 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9854 echo "configure:9855: checking for sigsetjmp" >&5
9855 cat > conftest.$ac_ext <<EOF
9856 #line 9857 "configure"
9857 #include "confdefs.h"
9858 #include <setjmp.h>
9859 int main() {
9860 sigjmp_buf bar; sigsetjmp (bar, 0);
9861 ; return 0; }
9862 EOF
9863 if { (eval echo configure:9864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9864   rm -rf conftest*
9865   echo "$ac_t""yes" 1>&6
9866    { test "$extra_verbose" = "yes" && cat << \EOF
9867     Defining HAVE_SIGSETJMP
9868 EOF
9869 cat >> confdefs.h <<\EOF
9870 #define HAVE_SIGSETJMP 1
9871 EOF
9872 }
9873
9874 else
9875   echo "configure: failed program was:" >&5
9876   cat conftest.$ac_ext >&5
9877   rm -rf conftest*
9878   echo "$ac_t""no" 1>&6
9879 fi
9880 rm -f conftest*
9881
9882 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9883 echo "configure:9884: checking whether localtime caches TZ" >&5
9884
9885 if test "$ac_cv_func_tzset" = "yes"; then
9886 cat > conftest.$ac_ext <<EOF
9887 #line 9888 "configure"
9888 #include "confdefs.h"
9889 #include <time.h>
9890 #if STDC_HEADERS
9891 # include <stdlib.h>
9892 #endif
9893 extern char **environ;
9894 unset_TZ ()
9895 {
9896   char **from, **to;
9897   for (to = from = environ; (*to = *from); from++)
9898     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9899       to++;
9900 }
9901 char TZ_GMT0[] = "TZ=GMT0";
9902 char TZ_PST8[] = "TZ=PST8";
9903 main()
9904 {
9905   time_t now = time ((time_t *) 0);
9906   int hour_GMT0, hour_unset;
9907   if (putenv (TZ_GMT0) != 0)
9908     exit (1);
9909   hour_GMT0 = localtime (&now)->tm_hour;
9910   unset_TZ ();
9911   hour_unset = localtime (&now)->tm_hour;
9912   if (putenv (TZ_PST8) != 0)
9913     exit (1);
9914   if (localtime (&now)->tm_hour == hour_GMT0)
9915     exit (1);
9916   unset_TZ ();
9917   if (localtime (&now)->tm_hour != hour_unset)
9918     exit (1);
9919   exit (0);
9920 }
9921 EOF
9922 if { (eval echo configure:9923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9923 then
9924   emacs_cv_localtime_cache=no
9925 else
9926   conftest_rc="$?"
9927   echo "configure: failed program was:" >&5
9928   cat conftest.$ac_ext >&5
9929   rm -fr conftest*
9930   emacs_cv_localtime_cache=yes
9931 fi
9932 rm -fr conftest*
9933 else
9934         # If we lack tzset, report that localtime does not cache TZ,
9935         # since we can't invalidate the cache if we don't have tzset.
9936         emacs_cv_localtime_cache=no
9937 fi
9938 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9939 if test $emacs_cv_localtime_cache = yes; then
9940   { test "$extra_verbose" = "yes" && cat << \EOF
9941     Defining LOCALTIME_CACHE
9942 EOF
9943 cat >> confdefs.h <<\EOF
9944 #define LOCALTIME_CACHE 1
9945 EOF
9946 }
9947
9948 fi
9949
9950 if test "$HAVE_TIMEVAL" = "yes"; then
9951 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9952 echo "configure:9953: checking whether gettimeofday accepts one or two arguments" >&5
9953 cat > conftest.$ac_ext <<EOF
9954 #line 9955 "configure"
9955 #include "confdefs.h"
9956
9957 #ifdef TIME_WITH_SYS_TIME
9958 #include <sys/time.h>
9959 #include <time.h>
9960 #else
9961 #ifdef HAVE_SYS_TIME_H
9962 #include <sys/time.h>
9963 #else
9964 #include <time.h>
9965 #endif
9966 #endif
9967   
9968 int main() {
9969
9970   struct timeval time;
9971   struct timezone dummy;
9972   gettimeofday (&time, &dummy);
9973
9974 ; return 0; }
9975 EOF
9976 if { (eval echo configure:9977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9977   rm -rf conftest*
9978   echo "$ac_t""two" 1>&6
9979 else
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -rf conftest*
9983   echo "$ac_t""one" 1>&6
9984    { test "$extra_verbose" = "yes" && cat << \EOF
9985     Defining GETTIMEOFDAY_ONE_ARGUMENT
9986 EOF
9987 cat >> confdefs.h <<\EOF
9988 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9989 EOF
9990 }
9991
9992 fi
9993 rm -f conftest*
9994 fi
9995
9996
9997 echo $ac_n "checking for inline""... $ac_c" 1>&6
9998 echo "configure:9999: checking for inline" >&5
9999
10000 ac_cv_c_inline=no
10001 for ac_kw in inline __inline__ __inline; do
10002   cat > conftest.$ac_ext <<EOF
10003 #line 10004 "configure"
10004 #include "confdefs.h"
10005
10006 int main() {
10007 } int $ac_kw foo() {
10008 ; return 0; }
10009 EOF
10010 if { (eval echo configure:10011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10011   rm -rf conftest*
10012   ac_cv_c_inline=$ac_kw; break
10013 else
10014   echo "configure: failed program was:" >&5
10015   cat conftest.$ac_ext >&5
10016 fi
10017 rm -f conftest*
10018 done
10019
10020
10021 echo "$ac_t""$ac_cv_c_inline" 1>&6
10022 case "$ac_cv_c_inline" in
10023   inline | yes) ;;
10024   no) { test "$extra_verbose" = "yes" && cat << \EOF
10025     Defining inline = 
10026 EOF
10027 cat >> confdefs.h <<\EOF
10028 #define inline 
10029 EOF
10030 }
10031  ;;
10032   *)  { test "$extra_verbose" = "yes" && cat << EOF
10033     Defining inline = $ac_cv_c_inline
10034 EOF
10035 cat >> confdefs.h <<EOF
10036 #define inline $ac_cv_c_inline
10037 EOF
10038 }
10039  ;;
10040 esac
10041
10042 if test "$ac_cv_c_inline" != "no"; then
10043   { test "$extra_verbose" = "yes" && cat << \EOF
10044     Defining HAVE_INLINE
10045 EOF
10046 cat >> confdefs.h <<\EOF
10047 #define HAVE_INLINE 1
10048 EOF
10049 }
10050
10051   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
10052    echo "    xemacs will be linked with \"inline.o\""
10053  fi
10054 fi
10055
10056
10057 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10058 # for constant arguments.  Useless!
10059 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
10060 echo "configure:10061: checking for working alloca.h" >&5
10061
10062 cat > conftest.$ac_ext <<EOF
10063 #line 10064 "configure"
10064 #include "confdefs.h"
10065 #include <alloca.h>
10066 int main() {
10067 void *p = alloca(2 * sizeof(int));
10068 ; return 0; }
10069 EOF
10070 if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10071   rm -rf conftest*
10072   ac_cv_header_alloca_h=yes
10073 else
10074   echo "configure: failed program was:" >&5
10075   cat conftest.$ac_ext >&5
10076   rm -rf conftest*
10077   ac_cv_header_alloca_h=no
10078 fi
10079 rm -f conftest*
10080
10081 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
10082 if test $ac_cv_header_alloca_h = yes; then
10083   { test "$extra_verbose" = "yes" && cat << \EOF
10084     Defining HAVE_ALLOCA_H
10085 EOF
10086 cat >> confdefs.h <<\EOF
10087 #define HAVE_ALLOCA_H 1
10088 EOF
10089 }
10090
10091 fi
10092
10093 echo $ac_n "checking for alloca""... $ac_c" 1>&6
10094 echo "configure:10095: checking for alloca" >&5
10095
10096 cat > conftest.$ac_ext <<EOF
10097 #line 10098 "configure"
10098 #include "confdefs.h"
10099
10100 #ifdef __GNUC__
10101 # define alloca __builtin_alloca
10102 #else
10103 # ifdef _MSC_VER
10104 #  include <malloc.h>
10105 #  define alloca _alloca
10106 # else
10107 #  if HAVE_ALLOCA_H
10108 #   include <alloca.h>
10109 #  else
10110 #   ifdef _AIX
10111  #pragma alloca
10112 #   else
10113 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10114 char *alloca ();
10115 #    endif
10116 #   endif
10117 #  endif
10118 # endif
10119 #endif
10120
10121 int main() {
10122 char *p = (char *) alloca(1);
10123 ; return 0; }
10124 EOF
10125 if { (eval echo configure:10126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10126   rm -rf conftest*
10127   ac_cv_func_alloca_works=yes
10128 else
10129   echo "configure: failed program was:" >&5
10130   cat conftest.$ac_ext >&5
10131   rm -rf conftest*
10132   ac_cv_func_alloca_works=no
10133 fi
10134 rm -f conftest*
10135
10136 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
10137 if test $ac_cv_func_alloca_works = yes; then
10138   { test "$extra_verbose" = "yes" && cat << \EOF
10139     Defining HAVE_ALLOCA
10140 EOF
10141 cat >> confdefs.h <<\EOF
10142 #define HAVE_ALLOCA 1
10143 EOF
10144 }
10145
10146 fi
10147
10148 if test $ac_cv_func_alloca_works = no; then
10149   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10150   # that cause trouble.  Some versions do not even contain alloca or
10151   # contain a buggy version.  If you still want to use their alloca,
10152   # use ar to extract alloca.o from them instead of compiling alloca.c.
10153   ALLOCA=alloca.${ac_objext}
10154   { test "$extra_verbose" = "yes" && cat << \EOF
10155     Defining C_ALLOCA
10156 EOF
10157 cat >> confdefs.h <<\EOF
10158 #define C_ALLOCA 1
10159 EOF
10160 }
10161
10162
10163 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10164 echo "configure:10165: checking whether alloca needs Cray hooks" >&5
10165
10166 cat > conftest.$ac_ext <<EOF
10167 #line 10168 "configure"
10168 #include "confdefs.h"
10169 #if defined(CRAY) && ! defined(CRAY2)
10170 webecray
10171 #else
10172 wenotbecray
10173 #endif
10174
10175 EOF
10176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10177   egrep "webecray" >/dev/null 2>&1; then
10178   rm -rf conftest*
10179   ac_cv_os_cray=yes
10180 else
10181   rm -rf conftest*
10182   ac_cv_os_cray=no
10183 fi
10184 rm -f conftest*
10185
10186
10187 echo "$ac_t""$ac_cv_os_cray" 1>&6
10188 if test $ac_cv_os_cray = yes; then
10189 for ac_func in _getb67 GETB67 getb67; do
10190   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10191 echo "configure:10192: checking for $ac_func" >&5
10192
10193 cat > conftest.$ac_ext <<EOF
10194 #line 10195 "configure"
10195 #include "confdefs.h"
10196 /* System header to define __stub macros and hopefully few prototypes,
10197     which can conflict with char $ac_func(); below.  */
10198 #include <assert.h>
10199 /* Override any gcc2 internal prototype to avoid an error.  */
10200 /* We use char because int might match the return type of a gcc2
10201     builtin and then its argument prototype would still apply.  */
10202 char $ac_func();
10203
10204 int main() {
10205
10206 /* The GNU C library defines this for functions which it implements
10207     to always fail with ENOSYS.  Some functions are actually named
10208     something starting with __ and the normal name is an alias.  */
10209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10210 choke me
10211 #else
10212 $ac_func();
10213 #endif
10214
10215 ; return 0; }
10216 EOF
10217 if { (eval echo configure:10218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10218   rm -rf conftest*
10219   eval "ac_cv_func_$ac_func=yes"
10220 else
10221   echo "configure: failed program was:" >&5
10222   cat conftest.$ac_ext >&5
10223   rm -rf conftest*
10224   eval "ac_cv_func_$ac_func=no"
10225 fi
10226 rm -f conftest*
10227
10228 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10229   echo "$ac_t""yes" 1>&6
10230   { test "$extra_verbose" = "yes" && cat << EOF
10231     Defining CRAY_STACKSEG_END = $ac_func
10232 EOF
10233 cat >> confdefs.h <<EOF
10234 #define CRAY_STACKSEG_END $ac_func
10235 EOF
10236 }
10237
10238   break
10239 else
10240   echo "$ac_t""no" 1>&6
10241 fi
10242
10243 done
10244 fi
10245
10246 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10247 echo "configure:10248: checking stack direction for C alloca" >&5
10248
10249 cat > conftest.$ac_ext <<EOF
10250 #line 10251 "configure"
10251 #include "confdefs.h"
10252 find_stack_direction ()
10253 {
10254   static char *addr = 0;
10255   auto char dummy;
10256   if (addr == 0)
10257     {
10258       addr = &dummy;
10259       return find_stack_direction ();
10260     }
10261   else
10262     return (&dummy > addr) ? 1 : -1;
10263 }
10264 main ()
10265 {
10266   exit (find_stack_direction() < 0);
10267 }
10268 EOF
10269 if { (eval echo configure:10270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10270 then
10271   ac_cv_c_stack_direction=1
10272 else
10273   conftest_rc="$?"
10274   echo "configure: failed program was:" >&5
10275   cat conftest.$ac_ext >&5
10276   rm -fr conftest*
10277   ac_cv_c_stack_direction=-1
10278 fi
10279 rm -fr conftest*
10280
10281 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10282 { test "$extra_verbose" = "yes" && cat << EOF
10283     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10284 EOF
10285 cat >> confdefs.h <<EOF
10286 #define STACK_DIRECTION $ac_cv_c_stack_direction
10287 EOF
10288 }
10289
10290 fi
10291
10292 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10293    echo "    xemacs will be linked with \"$ALLOCA\""
10294  fi
10295
10296 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10297 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10298 echo "configure:10299: checking for vfork.h" >&5
10299
10300 cat > conftest.$ac_ext <<EOF
10301 #line 10302 "configure"
10302 #include "confdefs.h"
10303 #include <vfork.h>
10304 EOF
10305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10306 { (eval echo configure:10307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10308 if test -z "$ac_err"; then
10309   rm -rf conftest*
10310   eval "ac_cv_header_$ac_safe=yes"
10311 else
10312   echo "$ac_err" >&5
10313   echo "configure: failed program was:" >&5
10314   cat conftest.$ac_ext >&5
10315   rm -rf conftest*
10316   eval "ac_cv_header_$ac_safe=no"
10317 fi
10318 rm -f conftest*
10319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10320   echo "$ac_t""yes" 1>&6
10321   { test "$extra_verbose" = "yes" && cat << \EOF
10322     Defining HAVE_VFORK_H
10323 EOF
10324 cat >> confdefs.h <<\EOF
10325 #define HAVE_VFORK_H 1
10326 EOF
10327 }
10328
10329 else
10330   echo "$ac_t""no" 1>&6
10331 fi
10332
10333 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10334 echo "configure:10335: checking for working vfork" >&5
10335
10336 cat > conftest.$ac_ext <<EOF
10337 #line 10338 "configure"
10338 #include "confdefs.h"
10339 /* Thanks to Paul Eggert for this test.  */
10340 #include <stdio.h>
10341 #include <sys/types.h>
10342 #include <sys/stat.h>
10343 #ifdef HAVE_UNISTD_H
10344 #include <unistd.h>
10345 #endif
10346 #ifdef HAVE_VFORK_H
10347 #include <vfork.h>
10348 #endif
10349 /* On some sparc systems, changes by the child to local and incoming
10350    argument registers are propagated back to the parent.
10351    The compiler is told about this with #include <vfork.h>,
10352    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10353    Test for this by using a static variable whose address
10354    is put into a register that is clobbered by the vfork.  */
10355 static
10356 #ifdef __cplusplus
10357 sparc_address_test (int arg)
10358 #else
10359 sparc_address_test (arg) int arg;
10360 #endif
10361 {
10362   static pid_t child;
10363   if (!child) {
10364     child = vfork ();
10365     if (child < 0) {
10366       perror ("vfork");
10367       _exit(2);
10368     }
10369     if (!child) {
10370       arg = getpid();
10371       write(-1, "", 0);
10372       _exit (arg);
10373     }
10374   }
10375 }
10376 main() {
10377   pid_t parent = getpid ();
10378   pid_t child;
10379
10380   sparc_address_test ();
10381
10382   child = vfork ();
10383
10384   if (child == 0) {
10385     /* Here is another test for sparc vfork register problems.
10386        This test uses lots of local variables, at least
10387        as many local variables as main has allocated so far
10388        including compiler temporaries.  4 locals are enough for
10389        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10390        A buggy compiler should reuse the register of parent
10391        for one of the local variables, since it will think that
10392        parent can't possibly be used any more in this routine.
10393        Assigning to the local variable will thus munge parent
10394        in the parent process.  */
10395     pid_t
10396       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10397       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10398     /* Convince the compiler that p..p7 are live; otherwise, it might
10399        use the same hardware register for all 8 local variables.  */
10400     if (p != p1 || p != p2 || p != p3 || p != p4
10401         || p != p5 || p != p6 || p != p7)
10402       _exit(1);
10403
10404     /* On some systems (e.g. IRIX 3.3),
10405        vfork doesn't separate parent from child file descriptors.
10406        If the child closes a descriptor before it execs or exits,
10407        this munges the parent's descriptor as well.
10408        Test for this by closing stdout in the child.  */
10409     _exit(close(fileno(stdout)) != 0);
10410   } else {
10411     int status;
10412     struct stat st;
10413
10414     while (wait(&status) != child)
10415       ;
10416     exit(
10417          /* Was there some problem with vforking?  */
10418          child < 0
10419
10420          /* Did the child fail?  (This shouldn't happen.)  */
10421          || status
10422
10423          /* Did the vfork/compiler bug occur?  */
10424          || parent != getpid()
10425
10426          /* Did the file descriptor bug occur?  */
10427          || fstat(fileno(stdout), &st) != 0
10428          );
10429   }
10430 }
10431 EOF
10432 if { (eval echo configure:10433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10433 then
10434   ac_cv_func_vfork_works=yes
10435 else
10436   conftest_rc="$?"
10437   echo "configure: failed program was:" >&5
10438   cat conftest.$ac_ext >&5
10439   rm -fr conftest*
10440   ac_cv_func_vfork_works=no
10441 fi
10442 rm -fr conftest*
10443
10444 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10445 if test $ac_cv_func_vfork_works = no; then
10446   { test "$extra_verbose" = "yes" && cat << \EOF
10447     Defining vfork = fork
10448 EOF
10449 cat >> confdefs.h <<\EOF
10450 #define vfork fork
10451 EOF
10452 }
10453
10454 fi
10455
10456
10457 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10458 echo "configure:10459: checking for working strcoll" >&5
10459
10460 cat > conftest.$ac_ext <<EOF
10461 #line 10462 "configure"
10462 #include "confdefs.h"
10463 #include <string.h>
10464 main ()
10465 {
10466   exit (strcoll ("abc", "def") >= 0 ||
10467         strcoll ("ABC", "DEF") >= 0 ||
10468         strcoll ("123", "456") >= 0);
10469 }
10470 EOF
10471 if { (eval echo configure:10472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10472 then
10473   ac_cv_func_strcoll_works=yes
10474 else
10475   conftest_rc="$?"
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -fr conftest*
10479   ac_cv_func_strcoll_works=no
10480 fi
10481 rm -fr conftest*
10482
10483 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10484 if test $ac_cv_func_strcoll_works = yes; then
10485   { test "$extra_verbose" = "yes" && cat << \EOF
10486     Defining HAVE_STRCOLL
10487 EOF
10488 cat >> confdefs.h <<\EOF
10489 #define HAVE_STRCOLL 1
10490 EOF
10491 }
10492
10493 fi
10494
10495
10496 for ac_func in getpgrp
10497 do
10498 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10499 echo "configure:10500: checking for $ac_func" >&5
10500
10501 cat > conftest.$ac_ext <<EOF
10502 #line 10503 "configure"
10503 #include "confdefs.h"
10504 /* System header to define __stub macros and hopefully few prototypes,
10505     which can conflict with char $ac_func(); below.  */
10506 #include <assert.h>
10507 /* Override any gcc2 internal prototype to avoid an error.  */
10508 /* We use char because int might match the return type of a gcc2
10509     builtin and then its argument prototype would still apply.  */
10510 char $ac_func();
10511
10512 int main() {
10513
10514 /* The GNU C library defines this for functions which it implements
10515     to always fail with ENOSYS.  Some functions are actually named
10516     something starting with __ and the normal name is an alias.  */
10517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10518 choke me
10519 #else
10520 $ac_func();
10521 #endif
10522
10523 ; return 0; }
10524 EOF
10525 if { (eval echo configure:10526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10526   rm -rf conftest*
10527   eval "ac_cv_func_$ac_func=yes"
10528 else
10529   echo "configure: failed program was:" >&5
10530   cat conftest.$ac_ext >&5
10531   rm -rf conftest*
10532   eval "ac_cv_func_$ac_func=no"
10533 fi
10534 rm -f conftest*
10535
10536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10537   echo "$ac_t""yes" 1>&6
10538     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10539   { test "$extra_verbose" = "yes" && cat << EOF
10540     Defining $ac_tr_func
10541 EOF
10542 cat >> confdefs.h <<EOF
10543 #define $ac_tr_func 1
10544 EOF
10545 }
10546  
10547 else
10548   echo "$ac_t""no" 1>&6
10549 fi
10550 done
10551
10552 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10553 echo "configure:10554: checking whether getpgrp takes no argument" >&5
10554
10555 cat > conftest.$ac_ext <<EOF
10556 #line 10557 "configure"
10557 #include "confdefs.h"
10558
10559 /*
10560  * If this system has a BSD-style getpgrp(),
10561  * which takes a pid argument, exit unsuccessfully.
10562  *
10563  * Snarfed from Chet Ramey's bash pgrp.c test program
10564  */
10565 #include <stdio.h>
10566 #include <sys/types.h>
10567
10568 int     pid;
10569 int     pg1, pg2, pg3, pg4;
10570 int     ng, np, s, child;
10571
10572 main()
10573 {
10574         pid = getpid();
10575         pg1 = getpgrp(0);
10576         pg2 = getpgrp();
10577         pg3 = getpgrp(pid);
10578         pg4 = getpgrp(1);
10579
10580         /*
10581          * If all of these values are the same, it's pretty sure that
10582          * we're on a system that ignores getpgrp's first argument.
10583          */
10584         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10585                 exit(0);
10586
10587         child = fork();
10588         if (child < 0)
10589                 exit(1);
10590         else if (child == 0) {
10591                 np = getpid();
10592                 /*
10593                  * If this is Sys V, this will not work; pgrp will be
10594                  * set to np because setpgrp just changes a pgrp to be
10595                  * the same as the pid.
10596                  */
10597                 setpgrp(np, pg1);
10598                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10599                 if (ng == pg1) {
10600                         exit(1);
10601                 } else {
10602                         exit(0);
10603                 }
10604         } else {
10605                 wait(&s);
10606                 exit(s>>8);
10607         }
10608 }
10609
10610 EOF
10611 if { (eval echo configure:10612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10612 then
10613   ac_cv_func_getpgrp_void=yes
10614 else
10615   conftest_rc="$?"
10616   echo "configure: failed program was:" >&5
10617   cat conftest.$ac_ext >&5
10618   rm -fr conftest*
10619   ac_cv_func_getpgrp_void=no
10620 fi
10621 rm -fr conftest*
10622
10623
10624 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10625 if test $ac_cv_func_getpgrp_void = yes; then
10626   { test "$extra_verbose" = "yes" && cat << \EOF
10627     Defining GETPGRP_VOID
10628 EOF
10629 cat >> confdefs.h <<\EOF
10630 #define GETPGRP_VOID 1
10631 EOF
10632 }
10633
10634 fi
10635
10636
10637 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10638 echo "configure:10639: checking for working mmap" >&5
10639 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10640 cat > conftest.$ac_ext <<EOF
10641 #line 10642 "configure"
10642 #include "confdefs.h"
10643 #include <stdio.h>
10644 #include <unistd.h>
10645 #include <fcntl.h>
10646 #include <sys/mman.h>
10647
10648 #ifndef MAP_VARIABLE
10649 #define MAP_VARIABLE 0
10650 #endif
10651
10652 #ifndef MAP_FAILED
10653 #define MAP_FAILED -1
10654 #endif
10655
10656 int main (int argc, char *argv[])
10657 {
10658   int fd = -1;
10659   caddr_t p;
10660 #ifndef MAP_ANONYMOUS
10661   fd = open ("/dev/zero", O_RDWR);
10662   if (fd < 0)
10663     return 1;
10664 #define MAP_ANONYMOUS 0
10665 #endif
10666   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10667            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10668            fd, 0) != (void *) MAP_FAILED)
10669     return 0;
10670   perror ("conftest: mmap failed");
10671   return 1;
10672 }
10673 EOF
10674 if { (eval echo configure:10675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10675 then
10676   have_mmap=yes
10677 else
10678   conftest_rc="$?"
10679   echo "configure: failed program was:" >&5
10680   cat conftest.$ac_ext >&5
10681   rm -fr conftest*
10682   have_mmap=no
10683 fi
10684 rm -fr conftest* ;;
10685 esac
10686 echo "$ac_t""$have_mmap" 1>&6
10687 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10688     Defining HAVE_MMAP
10689 EOF
10690 cat >> confdefs.h <<\EOF
10691 #define HAVE_MMAP 1
10692 EOF
10693 }
10694
10695
10696 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10697 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10698 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10699     Defining REL_ALLOC
10700 EOF
10701 cat >> confdefs.h <<\EOF
10702 #define REL_ALLOC 1
10703 EOF
10704 }
10705
10706
10707 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10708 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10709 echo "configure:10710: checking for termios.h" >&5
10710
10711 cat > conftest.$ac_ext <<EOF
10712 #line 10713 "configure"
10713 #include "confdefs.h"
10714 #include <termios.h>
10715 EOF
10716 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10717 { (eval echo configure:10718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10718 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10719 if test -z "$ac_err"; then
10720   rm -rf conftest*
10721   eval "ac_cv_header_$ac_safe=yes"
10722 else
10723   echo "$ac_err" >&5
10724   echo "configure: failed program was:" >&5
10725   cat conftest.$ac_ext >&5
10726   rm -rf conftest*
10727   eval "ac_cv_header_$ac_safe=no"
10728 fi
10729 rm -f conftest*
10730 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10731   echo "$ac_t""yes" 1>&6
10732   { test "$extra_verbose" = "yes" && cat << \EOF
10733     Defining HAVE_TERMIOS
10734 EOF
10735 cat >> confdefs.h <<\EOF
10736 #define HAVE_TERMIOS 1
10737 EOF
10738 }
10739
10740   { test "$extra_verbose" = "yes" && cat << \EOF
10741     Defining SIGNALS_VIA_CHARACTERS
10742 EOF
10743 cat >> confdefs.h <<\EOF
10744 #define SIGNALS_VIA_CHARACTERS 1
10745 EOF
10746 }
10747
10748   { test "$extra_verbose" = "yes" && cat << \EOF
10749     Defining NO_TERMIO
10750 EOF
10751 cat >> confdefs.h <<\EOF
10752 #define NO_TERMIO 1
10753 EOF
10754 }
10755
10756 else
10757   echo "$ac_t""no" 1>&6
10758 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10759 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10760 echo "configure:10761: checking for termio.h" >&5
10761
10762 cat > conftest.$ac_ext <<EOF
10763 #line 10764 "configure"
10764 #include "confdefs.h"
10765 #include <termio.h>
10766 EOF
10767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10768 { (eval echo configure:10769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10770 if test -z "$ac_err"; then
10771   rm -rf conftest*
10772   eval "ac_cv_header_$ac_safe=yes"
10773 else
10774   echo "$ac_err" >&5
10775   echo "configure: failed program was:" >&5
10776   cat conftest.$ac_ext >&5
10777   rm -rf conftest*
10778   eval "ac_cv_header_$ac_safe=no"
10779 fi
10780 rm -f conftest*
10781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10782   echo "$ac_t""yes" 1>&6
10783   { test "$extra_verbose" = "yes" && cat << \EOF
10784     Defining HAVE_TERMIO
10785 EOF
10786 cat >> confdefs.h <<\EOF
10787 #define HAVE_TERMIO 1
10788 EOF
10789 }
10790
10791 else
10792   echo "$ac_t""no" 1>&6
10793 fi
10794
10795 fi
10796
10797
10798
10799 echo $ac_n "checking for socket""... $ac_c" 1>&6
10800 echo "configure:10801: checking for socket" >&5
10801
10802 cat > conftest.$ac_ext <<EOF
10803 #line 10804 "configure"
10804 #include "confdefs.h"
10805 /* System header to define __stub macros and hopefully few prototypes,
10806     which can conflict with char socket(); below.  */
10807 #include <assert.h>
10808 /* Override any gcc2 internal prototype to avoid an error.  */
10809 /* We use char because int might match the return type of a gcc2
10810     builtin and then its argument prototype would still apply.  */
10811 char socket();
10812
10813 int main() {
10814
10815 /* The GNU C library defines this for functions which it implements
10816     to always fail with ENOSYS.  Some functions are actually named
10817     something starting with __ and the normal name is an alias.  */
10818 #if defined (__stub_socket) || defined (__stub___socket)
10819 choke me
10820 #else
10821 socket();
10822 #endif
10823
10824 ; return 0; }
10825 EOF
10826 if { (eval echo configure:10827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10827   rm -rf conftest*
10828   eval "ac_cv_func_socket=yes"
10829 else
10830   echo "configure: failed program was:" >&5
10831   cat conftest.$ac_ext >&5
10832   rm -rf conftest*
10833   eval "ac_cv_func_socket=no"
10834 fi
10835 rm -f conftest*
10836
10837 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10838   echo "$ac_t""yes" 1>&6
10839   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10840 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10841 echo "configure:10842: checking for netinet/in.h" >&5
10842
10843 cat > conftest.$ac_ext <<EOF
10844 #line 10845 "configure"
10845 #include "confdefs.h"
10846 #include <netinet/in.h>
10847 EOF
10848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10849 { (eval echo configure:10850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10851 if test -z "$ac_err"; then
10852   rm -rf conftest*
10853   eval "ac_cv_header_$ac_safe=yes"
10854 else
10855   echo "$ac_err" >&5
10856   echo "configure: failed program was:" >&5
10857   cat conftest.$ac_ext >&5
10858   rm -rf conftest*
10859   eval "ac_cv_header_$ac_safe=no"
10860 fi
10861 rm -f conftest*
10862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10863   echo "$ac_t""yes" 1>&6
10864   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10865 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10866 echo "configure:10867: checking for arpa/inet.h" >&5
10867
10868 cat > conftest.$ac_ext <<EOF
10869 #line 10870 "configure"
10870 #include "confdefs.h"
10871 #include <arpa/inet.h>
10872 EOF
10873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10874 { (eval echo configure:10875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10875 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10876 if test -z "$ac_err"; then
10877   rm -rf conftest*
10878   eval "ac_cv_header_$ac_safe=yes"
10879 else
10880   echo "$ac_err" >&5
10881   echo "configure: failed program was:" >&5
10882   cat conftest.$ac_ext >&5
10883   rm -rf conftest*
10884   eval "ac_cv_header_$ac_safe=no"
10885 fi
10886 rm -f conftest*
10887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10888   echo "$ac_t""yes" 1>&6
10889   
10890   { test "$extra_verbose" = "yes" && cat << \EOF
10891     Defining HAVE_SOCKETS
10892 EOF
10893 cat >> confdefs.h <<\EOF
10894 #define HAVE_SOCKETS 1
10895 EOF
10896 }
10897
10898       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10899 echo "configure:10900: checking "for sun_len member in struct sockaddr_un"" >&5
10900       cat > conftest.$ac_ext <<EOF
10901 #line 10902 "configure"
10902 #include "confdefs.h"
10903
10904 #include <sys/types.h>
10905 #include <sys/socket.h>
10906 #include <sys/un.h>
10907       
10908 int main() {
10909 static struct sockaddr_un x; x.sun_len = 1;
10910 ; return 0; }
10911 EOF
10912 if { (eval echo configure:10913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10913   rm -rf conftest*
10914   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10915     Defining HAVE_SOCKADDR_SUN_LEN
10916 EOF
10917 cat >> confdefs.h <<\EOF
10918 #define HAVE_SOCKADDR_SUN_LEN 1
10919 EOF
10920 }
10921
10922 else
10923   echo "configure: failed program was:" >&5
10924   cat conftest.$ac_ext >&5
10925   rm -rf conftest*
10926   echo "$ac_t""no" 1>&6
10927 fi
10928 rm -f conftest*
10929       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10930 echo "configure:10931: checking "for ip_mreq struct in netinet/in.h"" >&5
10931       cat > conftest.$ac_ext <<EOF
10932 #line 10933 "configure"
10933 #include "confdefs.h"
10934
10935 #include <sys/types.h>
10936 #include <netinet/in.h>
10937       
10938 int main() {
10939 static struct ip_mreq x;
10940 ; return 0; }
10941 EOF
10942 if { (eval echo configure:10943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10943   rm -rf conftest*
10944   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10945     Defining HAVE_MULTICAST
10946 EOF
10947 cat >> confdefs.h <<\EOF
10948 #define HAVE_MULTICAST 1
10949 EOF
10950 }
10951
10952 else
10953   echo "configure: failed program was:" >&5
10954   cat conftest.$ac_ext >&5
10955   rm -rf conftest*
10956   echo "$ac_t""no" 1>&6
10957 fi
10958 rm -f conftest*
10959 else
10960   echo "$ac_t""no" 1>&6
10961 fi
10962
10963 else
10964   echo "$ac_t""no" 1>&6
10965 fi
10966
10967 else
10968   echo "$ac_t""no" 1>&6
10969 fi
10970
10971
10972 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10973 echo "configure:10974: checking for msgget" >&5
10974
10975 cat > conftest.$ac_ext <<EOF
10976 #line 10977 "configure"
10977 #include "confdefs.h"
10978 /* System header to define __stub macros and hopefully few prototypes,
10979     which can conflict with char msgget(); below.  */
10980 #include <assert.h>
10981 /* Override any gcc2 internal prototype to avoid an error.  */
10982 /* We use char because int might match the return type of a gcc2
10983     builtin and then its argument prototype would still apply.  */
10984 char msgget();
10985
10986 int main() {
10987
10988 /* The GNU C library defines this for functions which it implements
10989     to always fail with ENOSYS.  Some functions are actually named
10990     something starting with __ and the normal name is an alias.  */
10991 #if defined (__stub_msgget) || defined (__stub___msgget)
10992 choke me
10993 #else
10994 msgget();
10995 #endif
10996
10997 ; return 0; }
10998 EOF
10999 if { (eval echo configure:11000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11000   rm -rf conftest*
11001   eval "ac_cv_func_msgget=yes"
11002 else
11003   echo "configure: failed program was:" >&5
11004   cat conftest.$ac_ext >&5
11005   rm -rf conftest*
11006   eval "ac_cv_func_msgget=no"
11007 fi
11008 rm -f conftest*
11009
11010 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
11011   echo "$ac_t""yes" 1>&6
11012   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
11013 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
11014 echo "configure:11015: checking for sys/ipc.h" >&5
11015
11016 cat > conftest.$ac_ext <<EOF
11017 #line 11018 "configure"
11018 #include "confdefs.h"
11019 #include <sys/ipc.h>
11020 EOF
11021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11022 { (eval echo configure:11023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11024 if test -z "$ac_err"; then
11025   rm -rf conftest*
11026   eval "ac_cv_header_$ac_safe=yes"
11027 else
11028   echo "$ac_err" >&5
11029   echo "configure: failed program was:" >&5
11030   cat conftest.$ac_ext >&5
11031   rm -rf conftest*
11032   eval "ac_cv_header_$ac_safe=no"
11033 fi
11034 rm -f conftest*
11035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11036   echo "$ac_t""yes" 1>&6
11037   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
11038 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
11039 echo "configure:11040: checking for sys/msg.h" >&5
11040
11041 cat > conftest.$ac_ext <<EOF
11042 #line 11043 "configure"
11043 #include "confdefs.h"
11044 #include <sys/msg.h>
11045 EOF
11046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11047 { (eval echo configure:11048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11049 if test -z "$ac_err"; then
11050   rm -rf conftest*
11051   eval "ac_cv_header_$ac_safe=yes"
11052 else
11053   echo "$ac_err" >&5
11054   echo "configure: failed program was:" >&5
11055   cat conftest.$ac_ext >&5
11056   rm -rf conftest*
11057   eval "ac_cv_header_$ac_safe=no"
11058 fi
11059 rm -f conftest*
11060 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11061   echo "$ac_t""yes" 1>&6
11062   { test "$extra_verbose" = "yes" && cat << \EOF
11063     Defining HAVE_SYSVIPC
11064 EOF
11065 cat >> confdefs.h <<\EOF
11066 #define HAVE_SYSVIPC 1
11067 EOF
11068 }
11069
11070 else
11071   echo "$ac_t""no" 1>&6
11072 fi
11073
11074 else
11075   echo "$ac_t""no" 1>&6
11076 fi
11077
11078 else
11079   echo "$ac_t""no" 1>&6
11080 fi
11081
11082
11083 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
11084 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
11085 echo "configure:11086: checking for dirent.h" >&5
11086
11087 cat > conftest.$ac_ext <<EOF
11088 #line 11089 "configure"
11089 #include "confdefs.h"
11090 #include <dirent.h>
11091 EOF
11092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11093 { (eval echo configure:11094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11095 if test -z "$ac_err"; then
11096   rm -rf conftest*
11097   eval "ac_cv_header_$ac_safe=yes"
11098 else
11099   echo "$ac_err" >&5
11100   echo "configure: failed program was:" >&5
11101   cat conftest.$ac_ext >&5
11102   rm -rf conftest*
11103   eval "ac_cv_header_$ac_safe=no"
11104 fi
11105 rm -f conftest*
11106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11107   echo "$ac_t""yes" 1>&6
11108   { test "$extra_verbose" = "yes" && cat << \EOF
11109     Defining SYSV_SYSTEM_DIR
11110 EOF
11111 cat >> confdefs.h <<\EOF
11112 #define SYSV_SYSTEM_DIR 1
11113 EOF
11114 }
11115
11116 else
11117   echo "$ac_t""no" 1>&6
11118 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
11119 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
11120 echo "configure:11121: checking for sys/dir.h" >&5
11121
11122 cat > conftest.$ac_ext <<EOF
11123 #line 11124 "configure"
11124 #include "confdefs.h"
11125 #include <sys/dir.h>
11126 EOF
11127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11128 { (eval echo configure:11129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11130 if test -z "$ac_err"; then
11131   rm -rf conftest*
11132   eval "ac_cv_header_$ac_safe=yes"
11133 else
11134   echo "$ac_err" >&5
11135   echo "configure: failed program was:" >&5
11136   cat conftest.$ac_ext >&5
11137   rm -rf conftest*
11138   eval "ac_cv_header_$ac_safe=no"
11139 fi
11140 rm -f conftest*
11141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11142   echo "$ac_t""yes" 1>&6
11143   :
11144 else
11145   echo "$ac_t""no" 1>&6
11146 { test "$extra_verbose" = "yes" && cat << \EOF
11147     Defining NONSYSTEM_DIR_LIBRARY
11148 EOF
11149 cat >> confdefs.h <<\EOF
11150 #define NONSYSTEM_DIR_LIBRARY 1
11151 EOF
11152 }
11153
11154 fi
11155
11156 fi
11157
11158
11159 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11160 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11161 echo "configure:11162: checking for nlist.h" >&5
11162
11163 cat > conftest.$ac_ext <<EOF
11164 #line 11165 "configure"
11165 #include "confdefs.h"
11166 #include <nlist.h>
11167 EOF
11168 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11169 { (eval echo configure:11170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11170 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11171 if test -z "$ac_err"; then
11172   rm -rf conftest*
11173   eval "ac_cv_header_$ac_safe=yes"
11174 else
11175   echo "$ac_err" >&5
11176   echo "configure: failed program was:" >&5
11177   cat conftest.$ac_ext >&5
11178   rm -rf conftest*
11179   eval "ac_cv_header_$ac_safe=no"
11180 fi
11181 rm -f conftest*
11182 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11183   echo "$ac_t""yes" 1>&6
11184   { test "$extra_verbose" = "yes" && cat << \EOF
11185     Defining NLIST_STRUCT
11186 EOF
11187 cat >> confdefs.h <<\EOF
11188 #define NLIST_STRUCT 1
11189 EOF
11190 }
11191
11192 else
11193   echo "$ac_t""no" 1>&6
11194 fi
11195
11196
11197
11198 echo "checking "for sound support"" 1>&6
11199 echo "configure:11200: checking "for sound support"" >&5
11200 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11201
11202 if test "$with_native_sound" != "no"; then
11203     if test -n "$native_sound_lib"; then
11204     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11205 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11206 echo "configure:11207: checking for multimedia/audio_device.h" >&5
11207
11208 cat > conftest.$ac_ext <<EOF
11209 #line 11210 "configure"
11210 #include "confdefs.h"
11211 #include <multimedia/audio_device.h>
11212 EOF
11213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11214 { (eval echo configure:11215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11216 if test -z "$ac_err"; then
11217   rm -rf conftest*
11218   eval "ac_cv_header_$ac_safe=yes"
11219 else
11220   echo "$ac_err" >&5
11221   echo "configure: failed program was:" >&5
11222   cat conftest.$ac_ext >&5
11223   rm -rf conftest*
11224   eval "ac_cv_header_$ac_safe=no"
11225 fi
11226 rm -f conftest*
11227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11228   echo "$ac_t""yes" 1>&6
11229   sound_found=yes sound_cflags=""
11230       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11231    echo "    xemacs will be linked with \"sunplay.o\""
11232  fi
11233 else
11234   echo "$ac_t""no" 1>&6
11235 fi
11236
11237   fi
11238
11239     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11240     sound_found=yes
11241     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11242    echo "    xemacs will be linked with \"sunplay.o\""
11243  fi
11244     if test -d "/usr/demo/SOUND/include"
11245       then sound_cflags="-I/usr/demo/SOUND/include"
11246       else sound_cflags="-I/usr/demo/SOUND"
11247     fi
11248     if test -z "$native_sound_lib" ; then
11249       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11250         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11251         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11252       fi
11253     fi
11254   fi
11255
11256     if test -z "$sound_found"; then
11257     case "$canonical" in
11258     *-sgi-* )
11259       if test -z "$native_sound_lib"; then
11260         
11261 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11262 echo "configure:11263: checking for ALopenport in -laudio" >&5
11263 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11264
11265 xe_check_libs=" -laudio "
11266 cat > conftest.$ac_ext <<EOF
11267 #line 11268 "configure"
11268 #include "confdefs.h"
11269 /* Override any gcc2 internal prototype to avoid an error.  */
11270 /* We use char because int might match the return type of a gcc2
11271     builtin and then its argument prototype would still apply.  */
11272 char ALopenport();
11273
11274 int main() {
11275 ALopenport()
11276 ; return 0; }
11277 EOF
11278 if { (eval echo configure:11279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11279   rm -rf conftest*
11280   eval "ac_cv_lib_$ac_lib_var=yes"
11281 else
11282   echo "configure: failed program was:" >&5
11283   cat conftest.$ac_ext >&5
11284   rm -rf conftest*
11285   eval "ac_cv_lib_$ac_lib_var=no"
11286 fi
11287 rm -f conftest*
11288 xe_check_libs=""
11289
11290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11291   echo "$ac_t""yes" 1>&6
11292   native_sound_lib="-laudio"
11293 else
11294   echo "$ac_t""no" 1>&6
11295 fi
11296
11297
11298       fi
11299       if test -n "$native_sound_lib"; then
11300         sound_found=yes sound_cflags=""
11301         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11302    echo "    xemacs will be linked with \"sgiplay.o\""
11303  fi
11304       fi ;;
11305     hppa*-hp-hpux* )
11306       if test -z "$native_sound_lib"; then
11307         
11308 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11309 echo "configure:11310: checking for AOpenAudio in -lAlib" >&5
11310 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11311
11312 xe_check_libs=" -lAlib "
11313 cat > conftest.$ac_ext <<EOF
11314 #line 11315 "configure"
11315 #include "confdefs.h"
11316 /* Override any gcc2 internal prototype to avoid an error.  */
11317 /* We use char because int might match the return type of a gcc2
11318     builtin and then its argument prototype would still apply.  */
11319 char AOpenAudio();
11320
11321 int main() {
11322 AOpenAudio()
11323 ; return 0; }
11324 EOF
11325 if { (eval echo configure:11326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11326   rm -rf conftest*
11327   eval "ac_cv_lib_$ac_lib_var=yes"
11328 else
11329   echo "configure: failed program was:" >&5
11330   cat conftest.$ac_ext >&5
11331   rm -rf conftest*
11332   eval "ac_cv_lib_$ac_lib_var=no"
11333 fi
11334 rm -f conftest*
11335 xe_check_libs=""
11336
11337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11338   echo "$ac_t""yes" 1>&6
11339   native_sound_lib="-lAlib"
11340 else
11341   echo "$ac_t""no" 1>&6
11342 fi
11343
11344
11345       fi
11346       if test -n "$native_sound_lib"; then
11347         sound_found=yes
11348         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11349    echo "    xemacs will be linked with \"hpplay.o\""
11350  fi
11351         if test "$GCC" = "yes" # Kludge city
11352           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11353           else sound_cflags="+e -I/usr/audio/examples"
11354         fi
11355       fi ;;
11356     esac
11357   fi
11358
11359     if test -z "$sound_found"; then
11360     for dir in "machine" "sys" "linux"; do
11361       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11362 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11363 echo "configure:11364: checking for ${dir}/soundcard.h" >&5
11364
11365 cat > conftest.$ac_ext <<EOF
11366 #line 11367 "configure"
11367 #include "confdefs.h"
11368 #include <${dir}/soundcard.h>
11369 EOF
11370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11371 { (eval echo configure:11372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11373 if test -z "$ac_err"; then
11374   rm -rf conftest*
11375   eval "ac_cv_header_$ac_safe=yes"
11376 else
11377   echo "$ac_err" >&5
11378   echo "configure: failed program was:" >&5
11379   cat conftest.$ac_ext >&5
11380   rm -rf conftest*
11381   eval "ac_cv_header_$ac_safe=no"
11382 fi
11383 rm -f conftest*
11384 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11385   echo "$ac_t""yes" 1>&6
11386   sound_found=yes
11387        need_miscplay=yes
11388         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11389    echo "    xemacs will be linked with \"linuxplay.o\""
11390  fi
11391         { test "$extra_verbose" = "yes" && cat << EOF
11392     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
11393 EOF
11394 cat >> confdefs.h <<EOF
11395 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
11396 EOF
11397 }
11398
11399         break
11400 else
11401   echo "$ac_t""no" 1>&6
11402 fi
11403
11404     done
11405   fi
11406
11407   test "$sound_found" = "yes" && with_native_sound=yes
11408 fi
11409
11410 if test "$with_native_sound" = "yes"; then
11411   { test "$extra_verbose" = "yes" && cat << \EOF
11412     Defining HAVE_NATIVE_SOUND
11413 EOF
11414 cat >> confdefs.h <<\EOF
11415 #define HAVE_NATIVE_SOUND 1
11416 EOF
11417 }
11418
11419   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11420 fi
11421
11422 if test "$with_nas_sound" != "no"; then
11423   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11424 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11425 echo "configure:11426: checking for audio/audiolib.h" >&5
11426
11427 cat > conftest.$ac_ext <<EOF
11428 #line 11429 "configure"
11429 #include "confdefs.h"
11430 #include <audio/audiolib.h>
11431 EOF
11432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11433 { (eval echo configure:11434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11435 if test -z "$ac_err"; then
11436   rm -rf conftest*
11437   eval "ac_cv_header_$ac_safe=yes"
11438 else
11439   echo "$ac_err" >&5
11440   echo "configure: failed program was:" >&5
11441   cat conftest.$ac_ext >&5
11442   rm -rf conftest*
11443   eval "ac_cv_header_$ac_safe=no"
11444 fi
11445 rm -f conftest*
11446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11447   echo "$ac_t""yes" 1>&6
11448   
11449     
11450 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11451 echo "configure:11452: checking for AuOpenServer in -laudio" >&5
11452 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11453
11454 xe_check_libs=" -laudio "
11455 cat > conftest.$ac_ext <<EOF
11456 #line 11457 "configure"
11457 #include "confdefs.h"
11458 /* Override any gcc2 internal prototype to avoid an error.  */
11459 /* We use char because int might match the return type of a gcc2
11460     builtin and then its argument prototype would still apply.  */
11461 char AuOpenServer();
11462
11463 int main() {
11464 AuOpenServer()
11465 ; return 0; }
11466 EOF
11467 if { (eval echo configure:11468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11468   rm -rf conftest*
11469   eval "ac_cv_lib_$ac_lib_var=yes"
11470 else
11471   echo "configure: failed program was:" >&5
11472   cat conftest.$ac_ext >&5
11473   rm -rf conftest*
11474   eval "ac_cv_lib_$ac_lib_var=no"
11475 fi
11476 rm -f conftest*
11477 xe_check_libs=""
11478
11479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11480   echo "$ac_t""yes" 1>&6
11481   have_nas_sound=yes
11482 else
11483   echo "$ac_t""no" 1>&6
11484 fi
11485
11486
11487 else
11488   echo "$ac_t""no" 1>&6
11489 fi
11490
11491   if test "$have_nas_sound" = "yes"; then
11492     with_nas_sound=yes
11493     { test "$extra_verbose" = "yes" && cat << \EOF
11494     Defining HAVE_NAS_SOUND
11495 EOF
11496 cat >> confdefs.h <<\EOF
11497 #define HAVE_NAS_SOUND 1
11498 EOF
11499 }
11500
11501     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11502    echo "    xemacs will be linked with \"nas.o\""
11503  fi
11504     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11505             cat > conftest.$ac_ext <<EOF
11506 #line 11507 "configure"
11507 #include "confdefs.h"
11508 #include <audio/Xtutil.h>
11509 EOF
11510 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11511   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11512   :
11513 else
11514   rm -rf conftest*
11515   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11516     Defining NAS_NO_ERROR_JUMP
11517 EOF
11518 cat >> confdefs.h <<\EOF
11519 #define NAS_NO_ERROR_JUMP 1
11520 EOF
11521 }
11522
11523 fi
11524 rm -f conftest*
11525
11526   else
11527     test "$with_nas_sound" = "yes" && \
11528       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11529     with_nas_sound=no
11530   fi
11531 fi
11532
11533 if test "$with_esd_sound" != "no"; then
11534   # Extract the first word of "esd-config", so it can be a program name with args.
11535 set dummy esd-config; ac_word=$2
11536 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11537 echo "configure:11538: checking for $ac_word" >&5
11538
11539 if test -n "$have_esd_config"; then
11540   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11541 else
11542   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11543   ac_dummy="$PATH"
11544   for ac_dir in $ac_dummy; do
11545     test -z "$ac_dir" && ac_dir=.
11546     if test -f $ac_dir/$ac_word; then
11547       ac_cv_prog_have_esd_config="yes"
11548       break
11549     fi
11550   done
11551   IFS="$ac_save_ifs"
11552   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11553 fi
11554 have_esd_config="$ac_cv_prog_have_esd_config"
11555 if test -n "$have_esd_config"; then
11556   echo "$ac_t""$have_esd_config" 1>&6
11557 else
11558   echo "$ac_t""no" 1>&6
11559 fi
11560
11561   if test "$have_esd_config" = "yes"; then
11562     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11563     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
11564     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11565     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11566 echo "configure:11567: checking for esd_play_stream" >&5
11567
11568 cat > conftest.$ac_ext <<EOF
11569 #line 11570 "configure"
11570 #include "confdefs.h"
11571 /* System header to define __stub macros and hopefully few prototypes,
11572     which can conflict with char esd_play_stream(); below.  */
11573 #include <assert.h>
11574 /* Override any gcc2 internal prototype to avoid an error.  */
11575 /* We use char because int might match the return type of a gcc2
11576     builtin and then its argument prototype would still apply.  */
11577 char esd_play_stream();
11578
11579 int main() {
11580
11581 /* The GNU C library defines this for functions which it implements
11582     to always fail with ENOSYS.  Some functions are actually named
11583     something starting with __ and the normal name is an alias.  */
11584 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11585 choke me
11586 #else
11587 esd_play_stream();
11588 #endif
11589
11590 ; return 0; }
11591 EOF
11592 if { (eval echo configure:11593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11593   rm -rf conftest*
11594   eval "ac_cv_func_esd_play_stream=yes"
11595 else
11596   echo "configure: failed program was:" >&5
11597   cat conftest.$ac_ext >&5
11598   rm -rf conftest*
11599   eval "ac_cv_func_esd_play_stream=no"
11600 fi
11601 rm -f conftest*
11602
11603 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
11604   echo "$ac_t""yes" 1>&6
11605   have_esd_sound=yes
11606 else
11607   echo "$ac_t""no" 1>&6
11608 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
11609 fi
11610
11611   fi
11612
11613   if test "$have_esd_sound" = "yes"; then
11614     with_esd_sound=yes
11615     need_miscplay=yes
11616     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
11617    echo "    xemacs will be linked with \"esd.o\""
11618  fi
11619     { test "$extra_verbose" = "yes" && cat << \EOF
11620     Defining HAVE_ESD_SOUND
11621 EOF
11622 cat >> confdefs.h <<\EOF
11623 #define HAVE_ESD_SOUND 1
11624 EOF
11625 }
11626
11627   else
11628     test "$with_esd_sound" = "yes" && \
11629       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
11630     with_esd_sound=no
11631   fi
11632 fi
11633
11634 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
11635    echo "    xemacs will be linked with \"miscplay.o\""
11636  fi
11637
11638
11639 test -z "$with_tty" && with_tty=yes
11640
11641 if test "$with_tty" = "yes"  ; then
11642   echo "checking for TTY-related features" 1>&6
11643 echo "configure:11644: checking for TTY-related features" >&5
11644   { test "$extra_verbose" = "yes" && cat << \EOF
11645     Defining HAVE_TTY
11646 EOF
11647 cat >> confdefs.h <<\EOF
11648 #define HAVE_TTY 1
11649 EOF
11650 }
11651
11652   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
11653    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\""
11654  fi
11655
11656     if test -z "$with_ncurses"; then
11657     
11658 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
11659 echo "configure:11660: checking for tgetent in -lncurses" >&5
11660 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
11661
11662 xe_check_libs=" -lncurses "
11663 cat > conftest.$ac_ext <<EOF
11664 #line 11665 "configure"
11665 #include "confdefs.h"
11666 /* Override any gcc2 internal prototype to avoid an error.  */
11667 /* We use char because int might match the return type of a gcc2
11668     builtin and then its argument prototype would still apply.  */
11669 char tgetent();
11670
11671 int main() {
11672 tgetent()
11673 ; return 0; }
11674 EOF
11675 if { (eval echo configure:11676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11676   rm -rf conftest*
11677   eval "ac_cv_lib_$ac_lib_var=yes"
11678 else
11679   echo "configure: failed program was:" >&5
11680   cat conftest.$ac_ext >&5
11681   rm -rf conftest*
11682   eval "ac_cv_lib_$ac_lib_var=no"
11683 fi
11684 rm -f conftest*
11685 xe_check_libs=""
11686
11687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11688   echo "$ac_t""yes" 1>&6
11689   with_ncurses=yes
11690 else
11691   echo "$ac_t""no" 1>&6
11692 with_ncurses=no
11693 fi
11694
11695
11696   fi
11697   if test "$with_ncurses" = "yes"; then
11698     { test "$extra_verbose" = "yes" && cat << \EOF
11699     Defining HAVE_NCURSES
11700 EOF
11701 cat >> confdefs.h <<\EOF
11702 #define HAVE_NCURSES 1
11703 EOF
11704 }
11705
11706     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11707 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11708 echo "configure:11709: checking for ncurses/curses.h" >&5
11709
11710 cat > conftest.$ac_ext <<EOF
11711 #line 11712 "configure"
11712 #include "confdefs.h"
11713 #include <ncurses/curses.h>
11714 EOF
11715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11716 { (eval echo configure:11717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11718 if test -z "$ac_err"; then
11719   rm -rf conftest*
11720   eval "ac_cv_header_$ac_safe=yes"
11721 else
11722   echo "$ac_err" >&5
11723   echo "configure: failed program was:" >&5
11724   cat conftest.$ac_ext >&5
11725   rm -rf conftest*
11726   eval "ac_cv_header_$ac_safe=no"
11727 fi
11728 rm -f conftest*
11729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11730   echo "$ac_t""yes" 1>&6
11731   curses_h_path=ncurses/curses.h
11732 else
11733   echo "$ac_t""no" 1>&6
11734 fi
11735
11736     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11737 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11738 echo "configure:11739: checking for ncurses/term.h" >&5
11739
11740 cat > conftest.$ac_ext <<EOF
11741 #line 11742 "configure"
11742 #include "confdefs.h"
11743 #include <ncurses/term.h>
11744 EOF
11745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11746 { (eval echo configure:11747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11748 if test -z "$ac_err"; then
11749   rm -rf conftest*
11750   eval "ac_cv_header_$ac_safe=yes"
11751 else
11752   echo "$ac_err" >&5
11753   echo "configure: failed program was:" >&5
11754   cat conftest.$ac_ext >&5
11755   rm -rf conftest*
11756   eval "ac_cv_header_$ac_safe=no"
11757 fi
11758 rm -f conftest*
11759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11760   echo "$ac_t""yes" 1>&6
11761   term_h_path=ncurses/term.h
11762 else
11763   echo "$ac_t""no" 1>&6
11764 fi
11765
11766     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11767    echo "    xemacs will be linked with \"terminfo.o\""
11768  fi
11769     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11770
11771     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11772                         save_c_switch_site="$c_switch_site"
11773       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11774       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11775 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11776 echo "configure:11777: checking for ncurses/curses.h" >&5
11777
11778 cat > conftest.$ac_ext <<EOF
11779 #line 11780 "configure"
11780 #include "confdefs.h"
11781 #include <ncurses/curses.h>
11782 EOF
11783 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11784 { (eval echo configure:11785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11785 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11786 if test -z "$ac_err"; then
11787   rm -rf conftest*
11788   eval "ac_cv_header_$ac_safe=yes"
11789 else
11790   echo "$ac_err" >&5
11791   echo "configure: failed program was:" >&5
11792   cat conftest.$ac_ext >&5
11793   rm -rf conftest*
11794   eval "ac_cv_header_$ac_safe=no"
11795 fi
11796 rm -f conftest*
11797 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11798   echo "$ac_t""yes" 1>&6
11799   curses_h_path=ncurses/curses.h
11800 else
11801   echo "$ac_t""no" 1>&6
11802 fi
11803
11804       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11805         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11806         else c_switch_site="$save_c_switch_site"
11807       fi
11808     fi
11809   else         if test "$have_terminfo" = "yes"; then
11810       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11811    echo "    xemacs will be linked with \"terminfo.o\""
11812  fi
11813       if test -n "$libs_termcap"; then
11814         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11815       else
11816         for lib in curses termlib termcap; do
11817           
11818 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11819 echo "configure:11820: checking for tgetent in -l$lib" >&5
11820 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11821
11822 xe_check_libs=" -l$lib "
11823 cat > conftest.$ac_ext <<EOF
11824 #line 11825 "configure"
11825 #include "confdefs.h"
11826 /* Override any gcc2 internal prototype to avoid an error.  */
11827 /* We use char because int might match the return type of a gcc2
11828     builtin and then its argument prototype would still apply.  */
11829 char tgetent();
11830
11831 int main() {
11832 tgetent()
11833 ; return 0; }
11834 EOF
11835 if { (eval echo configure:11836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11836   rm -rf conftest*
11837   eval "ac_cv_lib_$ac_lib_var=yes"
11838 else
11839   echo "configure: failed program was:" >&5
11840   cat conftest.$ac_ext >&5
11841   rm -rf conftest*
11842   eval "ac_cv_lib_$ac_lib_var=no"
11843 fi
11844 rm -f conftest*
11845 xe_check_libs=""
11846
11847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11848   echo "$ac_t""yes" 1>&6
11849   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11850 else
11851   echo "$ac_t""no" 1>&6
11852 fi
11853
11854
11855         done
11856       fi
11857     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11858    echo "    xemacs will be linked with \"tparam.o\""
11859  fi
11860                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11861       if test -n "$libs_termcap"; then
11862         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11863       else
11864         
11865 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11866 echo "configure:11867: checking for tgetent in -lcurses" >&5
11867 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11868
11869 xe_check_libs=" -lcurses "
11870 cat > conftest.$ac_ext <<EOF
11871 #line 11872 "configure"
11872 #include "confdefs.h"
11873 /* Override any gcc2 internal prototype to avoid an error.  */
11874 /* We use char because int might match the return type of a gcc2
11875     builtin and then its argument prototype would still apply.  */
11876 char tgetent();
11877
11878 int main() {
11879 tgetent()
11880 ; return 0; }
11881 EOF
11882 if { (eval echo configure:11883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11883   rm -rf conftest*
11884   eval "ac_cv_lib_$ac_lib_var=yes"
11885 else
11886   echo "configure: failed program was:" >&5
11887   cat conftest.$ac_ext >&5
11888   rm -rf conftest*
11889   eval "ac_cv_lib_$ac_lib_var=no"
11890 fi
11891 rm -f conftest*
11892 xe_check_libs=""
11893
11894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11895   echo "$ac_t""yes" 1>&6
11896   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11897 else
11898   echo "$ac_t""no" 1>&6
11899 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11900 echo "configure:11901: checking for tgetent in -ltermcap" >&5
11901 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11902
11903 xe_check_libs=" -ltermcap "
11904 cat > conftest.$ac_ext <<EOF
11905 #line 11906 "configure"
11906 #include "confdefs.h"
11907 /* Override any gcc2 internal prototype to avoid an error.  */
11908 /* We use char because int might match the return type of a gcc2
11909     builtin and then its argument prototype would still apply.  */
11910 char tgetent();
11911
11912 int main() {
11913 tgetent()
11914 ; return 0; }
11915 EOF
11916 if { (eval echo configure:11917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11917   rm -rf conftest*
11918   eval "ac_cv_lib_$ac_lib_var=yes"
11919 else
11920   echo "configure: failed program was:" >&5
11921   cat conftest.$ac_ext >&5
11922   rm -rf conftest*
11923   eval "ac_cv_lib_$ac_lib_var=no"
11924 fi
11925 rm -f conftest*
11926 xe_check_libs=""
11927
11928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11929   echo "$ac_t""yes" 1>&6
11930   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11931 else
11932   echo "$ac_t""no" 1>&6
11933 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11934    echo "    xemacs will be linked with \"termcap.o\""
11935  fi
11936 fi
11937
11938
11939 fi
11940
11941
11942       fi
11943     fi
11944   fi
11945   { test "$extra_verbose" = "yes" && cat << EOF
11946     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11947 EOF
11948 cat >> confdefs.h <<EOF
11949 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11950 EOF
11951 }
11952
11953   { test "$extra_verbose" = "yes" && cat << EOF
11954     Defining TERM_H_PATH = "${term_h_path-term.h}"
11955 EOF
11956 cat >> confdefs.h <<EOF
11957 #define TERM_H_PATH "${term_h_path-term.h}"
11958 EOF
11959 }
11960
11961
11962     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11963 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11964 echo "configure:11965: checking for gpm.h" >&5
11965
11966 cat > conftest.$ac_ext <<EOF
11967 #line 11968 "configure"
11968 #include "confdefs.h"
11969 #include <gpm.h>
11970 EOF
11971 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11972 { (eval echo configure:11973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11973 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11974 if test -z "$ac_err"; then
11975   rm -rf conftest*
11976   eval "ac_cv_header_$ac_safe=yes"
11977 else
11978   echo "$ac_err" >&5
11979   echo "configure: failed program was:" >&5
11980   cat conftest.$ac_ext >&5
11981   rm -rf conftest*
11982   eval "ac_cv_header_$ac_safe=no"
11983 fi
11984 rm -f conftest*
11985 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11986   echo "$ac_t""yes" 1>&6
11987   :
11988 else
11989   echo "$ac_t""no" 1>&6
11990 with_gpm=no
11991 fi
11992  }
11993   test -z "$with_gpm" && { 
11994 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11995 echo "configure:11996: checking for Gpm_Open in -lgpm" >&5
11996 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11997
11998 xe_check_libs=" -lgpm "
11999 cat > conftest.$ac_ext <<EOF
12000 #line 12001 "configure"
12001 #include "confdefs.h"
12002 /* Override any gcc2 internal prototype to avoid an error.  */
12003 /* We use char because int might match the return type of a gcc2
12004     builtin and then its argument prototype would still apply.  */
12005 char Gpm_Open();
12006
12007 int main() {
12008 Gpm_Open()
12009 ; return 0; }
12010 EOF
12011 if { (eval echo configure:12012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12012   rm -rf conftest*
12013   eval "ac_cv_lib_$ac_lib_var=yes"
12014 else
12015   echo "configure: failed program was:" >&5
12016   cat conftest.$ac_ext >&5
12017   rm -rf conftest*
12018   eval "ac_cv_lib_$ac_lib_var=no"
12019 fi
12020 rm -f conftest*
12021 xe_check_libs=""
12022
12023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12024   echo "$ac_t""yes" 1>&6
12025   with_gpm=yes
12026 else
12027   echo "$ac_t""no" 1>&6
12028 with_gpm=no
12029 fi
12030
12031  }
12032   if test "$with_gpm" = "yes"; then
12033     { test "$extra_verbose" = "yes" && cat << \EOF
12034     Defining HAVE_GPM
12035 EOF
12036 cat >> confdefs.h <<\EOF
12037 #define HAVE_GPM 1
12038 EOF
12039 }
12040
12041     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
12042    echo "    xemacs will be linked with \"gpmevent.o\""
12043  fi
12044     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
12045   fi
12046
12047 else   for feature in ncurses gpm; do
12048     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
12049       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
12050     fi
12051     eval "with_${feature}=no"
12052   done
12053 fi 
12054 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
12055    echo "    xemacs will be linked with \"event-unixoid.o\""
12056  fi
12057
12058
12059 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12060   != "no no no" && echo "checking for database support" 1>&6
12061 echo "configure:12062: checking for database support" >&5
12062
12063 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
12064   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
12065 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
12066 echo "configure:12067: checking for ndbm.h" >&5
12067
12068 cat > conftest.$ac_ext <<EOF
12069 #line 12070 "configure"
12070 #include "confdefs.h"
12071 #include <ndbm.h>
12072 EOF
12073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12074 { (eval echo configure:12075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12076 if test -z "$ac_err"; then
12077   rm -rf conftest*
12078   eval "ac_cv_header_$ac_safe=yes"
12079 else
12080   echo "$ac_err" >&5
12081   echo "configure: failed program was:" >&5
12082   cat conftest.$ac_ext >&5
12083   rm -rf conftest*
12084   eval "ac_cv_header_$ac_safe=no"
12085 fi
12086 rm -f conftest*
12087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12088   echo "$ac_t""yes" 1>&6
12089   :
12090 else
12091   echo "$ac_t""no" 1>&6
12092
12093     test "$with_database_gdbm" = "yes" -o \
12094          "$with_database_dbm"  = "yes" && \
12095       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12096     with_database_gdbm=no with_database_dbm=no
12097 fi
12098
12099 fi
12100
12101 if test "$with_database_gdbm" != "no"; then
12102   
12103 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
12104 echo "configure:12105: checking for dbm_open in -lgdbm" >&5
12105 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
12106
12107 xe_check_libs=" -lgdbm "
12108 cat > conftest.$ac_ext <<EOF
12109 #line 12110 "configure"
12110 #include "confdefs.h"
12111 /* Override any gcc2 internal prototype to avoid an error.  */
12112 /* We use char because int might match the return type of a gcc2
12113     builtin and then its argument prototype would still apply.  */
12114 char dbm_open();
12115
12116 int main() {
12117 dbm_open()
12118 ; return 0; }
12119 EOF
12120 if { (eval echo configure:12121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12121   rm -rf conftest*
12122   eval "ac_cv_lib_$ac_lib_var=yes"
12123 else
12124   echo "configure: failed program was:" >&5
12125   cat conftest.$ac_ext >&5
12126   rm -rf conftest*
12127   eval "ac_cv_lib_$ac_lib_var=no"
12128 fi
12129 rm -f conftest*
12130 xe_check_libs=""
12131
12132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12133   echo "$ac_t""yes" 1>&6
12134   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
12135 else
12136   echo "$ac_t""no" 1>&6
12137 if test "$with_database_gdbm" = "yes"; then
12138      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
12139    fi
12140    with_database_gdbm=no
12141 fi
12142
12143
12144 fi
12145
12146 if test "$with_database_dbm" != "no"; then
12147   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12148 echo "configure:12149: checking for dbm_open" >&5
12149
12150 cat > conftest.$ac_ext <<EOF
12151 #line 12152 "configure"
12152 #include "confdefs.h"
12153 /* System header to define __stub macros and hopefully few prototypes,
12154     which can conflict with char dbm_open(); below.  */
12155 #include <assert.h>
12156 /* Override any gcc2 internal prototype to avoid an error.  */
12157 /* We use char because int might match the return type of a gcc2
12158     builtin and then its argument prototype would still apply.  */
12159 char dbm_open();
12160
12161 int main() {
12162
12163 /* The GNU C library defines this for functions which it implements
12164     to always fail with ENOSYS.  Some functions are actually named
12165     something starting with __ and the normal name is an alias.  */
12166 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12167 choke me
12168 #else
12169 dbm_open();
12170 #endif
12171
12172 ; return 0; }
12173 EOF
12174 if { (eval echo configure:12175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12175   rm -rf conftest*
12176   eval "ac_cv_func_dbm_open=yes"
12177 else
12178   echo "configure: failed program was:" >&5
12179   cat conftest.$ac_ext >&5
12180   rm -rf conftest*
12181   eval "ac_cv_func_dbm_open=no"
12182 fi
12183 rm -f conftest*
12184
12185 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12186   echo "$ac_t""yes" 1>&6
12187   with_database_dbm=yes libdbm=
12188 else
12189   echo "$ac_t""no" 1>&6
12190
12191     
12192 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12193 echo "configure:12194: checking for dbm_open in -ldbm" >&5
12194 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12195
12196 xe_check_libs=" -ldbm "
12197 cat > conftest.$ac_ext <<EOF
12198 #line 12199 "configure"
12199 #include "confdefs.h"
12200 /* Override any gcc2 internal prototype to avoid an error.  */
12201 /* We use char because int might match the return type of a gcc2
12202     builtin and then its argument prototype would still apply.  */
12203 char dbm_open();
12204
12205 int main() {
12206 dbm_open()
12207 ; return 0; }
12208 EOF
12209 if { (eval echo configure:12210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12210   rm -rf conftest*
12211   eval "ac_cv_lib_$ac_lib_var=yes"
12212 else
12213   echo "configure: failed program was:" >&5
12214   cat conftest.$ac_ext >&5
12215   rm -rf conftest*
12216   eval "ac_cv_lib_$ac_lib_var=no"
12217 fi
12218 rm -f conftest*
12219 xe_check_libs=""
12220
12221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12222   echo "$ac_t""yes" 1>&6
12223   with_database_dbm=yes libdbm=-ldbm
12224 else
12225   echo "$ac_t""no" 1>&6
12226 test "$with_database_dbm" = "yes" && \
12227         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12228       with_database_dbm=no
12229 fi
12230
12231
12232 fi
12233
12234 fi
12235
12236 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12237 test "$with_database_gdbm" = "yes" -o \
12238      "$with_database_dbm"  = "yes" && \
12239   { test "$extra_verbose" = "yes" && cat << \EOF
12240     Defining HAVE_DBM
12241 EOF
12242 cat >> confdefs.h <<\EOF
12243 #define HAVE_DBM 1
12244 EOF
12245 }
12246
12247
12248 if test "$with_database_berkdb" != "no"; then
12249   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12250 echo "configure:12251: checking for Berkeley db.h" >&5
12251   for path in "db/db.h" "db.h"; do
12252     cat > conftest.$ac_ext <<EOF
12253 #line 12254 "configure"
12254 #include "confdefs.h"
12255 #ifdef HAVE_INTTYPES_H
12256 #define __BIT_TYPES_DEFINED__
12257 #include <inttypes.h>
12258 typedef uint8_t  u_int8_t;
12259 typedef uint16_t u_int16_t;
12260 typedef uint32_t u_int32_t;
12261 #ifdef WE_DONT_NEED_QUADS
12262 typedef uint64_t u_int64_t;
12263 #endif
12264 #endif
12265 #include <$path>
12266
12267 int main() {
12268
12269 ; return 0; }
12270 EOF
12271 if { (eval echo configure:12272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12272   rm -rf conftest*
12273   db_h_path="$path"; break
12274 else
12275   echo "configure: failed program was:" >&5
12276   cat conftest.$ac_ext >&5
12277 fi
12278 rm -f conftest*
12279   done
12280   if test -z "$db_h_path"
12281   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12282   else echo "$ac_t""$db_h_path" 1>&6
12283   fi
12284
12285   if test "$with_database_berkdb" != "no"; then
12286     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12287 echo "configure:12288: checking for Berkeley DB version" >&5
12288     cat > conftest.$ac_ext <<EOF
12289 #line 12290 "configure"
12290 #include "confdefs.h"
12291 #include <$db_h_path>
12292 #if DB_VERSION_MAJOR > 1
12293 yes
12294 #endif
12295
12296 EOF
12297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12298   egrep "yes" >/dev/null 2>&1; then
12299   rm -rf conftest*
12300   echo "$ac_t""2" 1>&6; dbfunc=db_open
12301 else
12302   rm -rf conftest*
12303   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12304 fi
12305 rm -f conftest*
12306
12307     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12308 echo "configure:12309: checking for $dbfunc" >&5
12309
12310 cat > conftest.$ac_ext <<EOF
12311 #line 12312 "configure"
12312 #include "confdefs.h"
12313 /* System header to define __stub macros and hopefully few prototypes,
12314     which can conflict with char $dbfunc(); below.  */
12315 #include <assert.h>
12316 /* Override any gcc2 internal prototype to avoid an error.  */
12317 /* We use char because int might match the return type of a gcc2
12318     builtin and then its argument prototype would still apply.  */
12319 char $dbfunc();
12320
12321 int main() {
12322
12323 /* The GNU C library defines this for functions which it implements
12324     to always fail with ENOSYS.  Some functions are actually named
12325     something starting with __ and the normal name is an alias.  */
12326 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12327 choke me
12328 #else
12329 $dbfunc();
12330 #endif
12331
12332 ; return 0; }
12333 EOF
12334 if { (eval echo configure:12335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12335   rm -rf conftest*
12336   eval "ac_cv_func_$dbfunc=yes"
12337 else
12338   echo "configure: failed program was:" >&5
12339   cat conftest.$ac_ext >&5
12340   rm -rf conftest*
12341   eval "ac_cv_func_$dbfunc=no"
12342 fi
12343 rm -f conftest*
12344
12345 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12346   echo "$ac_t""yes" 1>&6
12347   with_database_berkdb=yes need_libdb=no
12348 else
12349   echo "$ac_t""no" 1>&6
12350
12351     
12352 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12353 echo "configure:12354: checking for $dbfunc in -ldb" >&5
12354 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12355
12356 xe_check_libs=" -ldb "
12357 cat > conftest.$ac_ext <<EOF
12358 #line 12359 "configure"
12359 #include "confdefs.h"
12360 /* Override any gcc2 internal prototype to avoid an error.  */
12361 /* We use char because int might match the return type of a gcc2
12362     builtin and then its argument prototype would still apply.  */
12363 char $dbfunc();
12364
12365 int main() {
12366 $dbfunc()
12367 ; return 0; }
12368 EOF
12369 if { (eval echo configure:12370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12370   rm -rf conftest*
12371   eval "ac_cv_lib_$ac_lib_var=yes"
12372 else
12373   echo "configure: failed program was:" >&5
12374   cat conftest.$ac_ext >&5
12375   rm -rf conftest*
12376   eval "ac_cv_lib_$ac_lib_var=no"
12377 fi
12378 rm -f conftest*
12379 xe_check_libs=""
12380
12381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12382   echo "$ac_t""yes" 1>&6
12383   with_database_berkdb=yes need_libdb=yes
12384 else
12385   echo "$ac_t""no" 1>&6
12386 fi
12387
12388
12389 fi
12390
12391   fi
12392
12393   if test "$with_database_berkdb" = "yes"; then
12394     { test "$extra_verbose" = "yes" && cat << EOF
12395     Defining DB_H_PATH = "$db_h_path"
12396 EOF
12397 cat >> confdefs.h <<EOF
12398 #define DB_H_PATH "$db_h_path"
12399 EOF
12400 }
12401
12402     { test "$extra_verbose" = "yes" && cat << \EOF
12403     Defining HAVE_BERKELEY_DB
12404 EOF
12405 cat >> confdefs.h <<\EOF
12406 #define HAVE_BERKELEY_DB 1
12407 EOF
12408 }
12409
12410     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12411   else with_database_berkdb=no
12412   fi
12413 fi
12414
12415 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12416      != "no no no"; then
12417   { test "$extra_verbose" = "yes" && cat << \EOF
12418     Defining HAVE_DATABASE
12419 EOF
12420 cat >> confdefs.h <<\EOF
12421 #define HAVE_DATABASE 1
12422 EOF
12423 }
12424
12425   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12426    echo "    xemacs will be linked with \"database.o\""
12427  fi
12428 fi
12429
12430 if test "$with_socks" = "yes"; then
12431   
12432 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12433 echo "configure:12434: checking for SOCKSinit in -lsocks" >&5
12434 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12435
12436 xe_check_libs=" -lsocks "
12437 cat > conftest.$ac_ext <<EOF
12438 #line 12439 "configure"
12439 #include "confdefs.h"
12440 /* Override any gcc2 internal prototype to avoid an error.  */
12441 /* We use char because int might match the return type of a gcc2
12442     builtin and then its argument prototype would still apply.  */
12443 char SOCKSinit();
12444
12445 int main() {
12446 SOCKSinit()
12447 ; return 0; }
12448 EOF
12449 if { (eval echo configure:12450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12450   rm -rf conftest*
12451   eval "ac_cv_lib_$ac_lib_var=yes"
12452 else
12453   echo "configure: failed program was:" >&5
12454   cat conftest.$ac_ext >&5
12455   rm -rf conftest*
12456   eval "ac_cv_lib_$ac_lib_var=no"
12457 fi
12458 rm -f conftest*
12459 xe_check_libs=""
12460
12461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12462   echo "$ac_t""yes" 1>&6
12463     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12464     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12465   { test "$extra_verbose" = "yes" && cat << EOF
12466     Defining $ac_tr_lib
12467 EOF
12468 cat >> confdefs.h <<EOF
12469 #define $ac_tr_lib 1
12470 EOF
12471 }
12472
12473   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12474
12475 else
12476   echo "$ac_t""no" 1>&6
12477 fi
12478
12479
12480   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12481     Defining HAVE_SOCKS
12482 EOF
12483 cat >> confdefs.h <<\EOF
12484 #define HAVE_SOCKS 1
12485 EOF
12486 }
12487
12488 fi
12489
12490 if test "$usage_tracking" = "yes"; then
12491   { test "$extra_verbose" = "yes" && cat << \EOF
12492     Defining USAGE_TRACKING
12493 EOF
12494 cat >> confdefs.h <<\EOF
12495 #define USAGE_TRACKING 1
12496 EOF
12497 }
12498
12499   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12500 fi
12501
12502 if test "$with_modules" != "no"; then
12503   echo "checking for module support" 1>&6
12504 echo "configure:12505: checking for module support" >&5
12505
12506     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12507 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12508 echo "configure:12509: checking for dlfcn.h" >&5
12509
12510 cat > conftest.$ac_ext <<EOF
12511 #line 12512 "configure"
12512 #include "confdefs.h"
12513 #include <dlfcn.h>
12514 EOF
12515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12516 { (eval echo configure:12517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12518 if test -z "$ac_err"; then
12519   rm -rf conftest*
12520   eval "ac_cv_header_$ac_safe=yes"
12521 else
12522   echo "$ac_err" >&5
12523   echo "configure: failed program was:" >&5
12524   cat conftest.$ac_ext >&5
12525   rm -rf conftest*
12526   eval "ac_cv_header_$ac_safe=no"
12527 fi
12528 rm -f conftest*
12529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12530   echo "$ac_t""yes" 1>&6
12531   
12532     
12533 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12534 echo "configure:12535: checking for dlopen in -ldl" >&5
12535 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12536
12537 xe_check_libs=" -ldl "
12538 cat > conftest.$ac_ext <<EOF
12539 #line 12540 "configure"
12540 #include "confdefs.h"
12541 /* Override any gcc2 internal prototype to avoid an error.  */
12542 /* We use char because int might match the return type of a gcc2
12543     builtin and then its argument prototype would still apply.  */
12544 char dlopen();
12545
12546 int main() {
12547 dlopen()
12548 ; return 0; }
12549 EOF
12550 if { (eval echo configure:12551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12551   rm -rf conftest*
12552   eval "ac_cv_lib_$ac_lib_var=yes"
12553 else
12554   echo "configure: failed program was:" >&5
12555   cat conftest.$ac_ext >&5
12556   rm -rf conftest*
12557   eval "ac_cv_lib_$ac_lib_var=no"
12558 fi
12559 rm -f conftest*
12560 xe_check_libs=""
12561
12562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12563   echo "$ac_t""yes" 1>&6
12564   have_dl=yes libdl=dl
12565 else
12566   echo "$ac_t""no" 1>&6
12567
12568 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12569 echo "configure:12570: checking for dlopen in -lc" >&5
12570 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12571
12572 xe_check_libs=" -lc "
12573 cat > conftest.$ac_ext <<EOF
12574 #line 12575 "configure"
12575 #include "confdefs.h"
12576 /* Override any gcc2 internal prototype to avoid an error.  */
12577 /* We use char because int might match the return type of a gcc2
12578     builtin and then its argument prototype would still apply.  */
12579 char dlopen();
12580
12581 int main() {
12582 dlopen()
12583 ; return 0; }
12584 EOF
12585 if { (eval echo configure:12586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12586   rm -rf conftest*
12587   eval "ac_cv_lib_$ac_lib_var=yes"
12588 else
12589   echo "configure: failed program was:" >&5
12590   cat conftest.$ac_ext >&5
12591   rm -rf conftest*
12592   eval "ac_cv_lib_$ac_lib_var=no"
12593 fi
12594 rm -f conftest*
12595 xe_check_libs=""
12596
12597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12598   echo "$ac_t""yes" 1>&6
12599   have_dl=yes 
12600 else
12601   echo "$ac_t""no" 1>&6
12602 fi
12603
12604
12605 fi
12606
12607
12608 else
12609   echo "$ac_t""no" 1>&6
12610 fi
12611
12612   if test -n "$have_dl"; then
12613     { test "$extra_verbose" = "yes" && cat << \EOF
12614     Defining HAVE_DLOPEN
12615 EOF
12616 cat >> confdefs.h <<\EOF
12617 #define HAVE_DLOPEN 1
12618 EOF
12619 }
12620
12621   else
12622     
12623 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
12624 echo "configure:12625: checking for shl_load in -ldld" >&5
12625 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
12626
12627 xe_check_libs=" -ldld "
12628 cat > conftest.$ac_ext <<EOF
12629 #line 12630 "configure"
12630 #include "confdefs.h"
12631 /* Override any gcc2 internal prototype to avoid an error.  */
12632 /* We use char because int might match the return type of a gcc2
12633     builtin and then its argument prototype would still apply.  */
12634 char shl_load();
12635
12636 int main() {
12637 shl_load()
12638 ; return 0; }
12639 EOF
12640 if { (eval echo configure:12641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12641   rm -rf conftest*
12642   eval "ac_cv_lib_$ac_lib_var=yes"
12643 else
12644   echo "configure: failed program was:" >&5
12645   cat conftest.$ac_ext >&5
12646   rm -rf conftest*
12647   eval "ac_cv_lib_$ac_lib_var=no"
12648 fi
12649 rm -f conftest*
12650 xe_check_libs=""
12651
12652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12653   echo "$ac_t""yes" 1>&6
12654   libdl=dld have_dl=yes;
12655       { test "$extra_verbose" = "yes" && cat << \EOF
12656     Defining HAVE_SHL_LOAD
12657 EOF
12658 cat >> confdefs.h <<\EOF
12659 #define HAVE_SHL_LOAD 1
12660 EOF
12661 }
12662
12663 else
12664   echo "$ac_t""no" 1>&6
12665
12666 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12667 echo "configure:12668: checking for dld_init in -ldld" >&5
12668 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12669
12670 xe_check_libs=" -ldld "
12671 cat > conftest.$ac_ext <<EOF
12672 #line 12673 "configure"
12673 #include "confdefs.h"
12674 /* Override any gcc2 internal prototype to avoid an error.  */
12675 /* We use char because int might match the return type of a gcc2
12676     builtin and then its argument prototype would still apply.  */
12677 char dld_init();
12678
12679 int main() {
12680 dld_init()
12681 ; return 0; }
12682 EOF
12683 if { (eval echo configure:12684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12684   rm -rf conftest*
12685   eval "ac_cv_lib_$ac_lib_var=yes"
12686 else
12687   echo "configure: failed program was:" >&5
12688   cat conftest.$ac_ext >&5
12689   rm -rf conftest*
12690   eval "ac_cv_lib_$ac_lib_var=no"
12691 fi
12692 rm -f conftest*
12693 xe_check_libs=""
12694
12695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12696   echo "$ac_t""yes" 1>&6
12697   libdl=dld have_dl=yes;
12698       { test "$extra_verbose" = "yes" && cat << \EOF
12699     Defining HAVE_DLD_INIT
12700 EOF
12701 cat >> confdefs.h <<\EOF
12702 #define HAVE_DLD_INIT 1
12703 EOF
12704 }
12705
12706 else
12707   echo "$ac_t""no" 1>&6
12708 fi
12709
12710
12711 fi
12712
12713
12714   fi
12715
12716   if test -n "$have_dl"; then
12717         
12718 dll_ld=
12719 dll_ldflags=
12720 dll_cflags=
12721 dll_post=
12722 dll_ldo="-o"
12723 ld_dynamic_link_flags=
12724 xehost=$canonical
12725 xealias=$internal_configuration
12726
12727 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12728 echo "configure:12729: checking how to build dynamic libraries for ${xehost}" >&5
12729 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12730 case "$xehost" in
12731 *-*-linux-gnu*) ;;
12732 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12733 esac
12734
12735 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12736 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12737 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12738
12739 case "$xehost_os" in
12740 aix3*)
12741   # AIX sometimes has problems with the GCC collect2 program.  For some
12742   # reason, if we set the COLLECT_NAMES environment variable, the problems
12743   # vanish in a puff of smoke.
12744   if test "${COLLECT_NAMES+set}" != set; then
12745     COLLECT_NAMES=
12746     export COLLECT_NAMES
12747   fi
12748   ;;
12749 esac
12750
12751 # Now see if the compiler is really GCC.
12752 if test "$GCC" = "yes"; then
12753   XEGCC=yes
12754 else
12755   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12756 echo "configure:12757: checking checking whether we are using GNU C" >&5
12757   cat > conftest.$ac_ext <<EOF
12758 #line 12759 "configure"
12759 #include "confdefs.h"
12760
12761 #ifdef __GNUC__
12762   yes;
12763 #endif
12764
12765 EOF
12766 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12767   egrep "yes" >/dev/null 2>&1; then
12768   rm -rf conftest*
12769   XEGCC=yes
12770 else
12771   rm -rf conftest*
12772   XEGCC=no
12773 fi
12774 rm -f conftest*
12775
12776   echo "$ac_t""${XEGCC}" 1>&6
12777 fi
12778
12779 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12780 echo "configure:12781: checking how to produce PIC code" >&5
12781 wl=
12782
12783 can_build_shared=yes
12784 if test "$XEGCC" = yes; then
12785   wl='-Wl,'
12786
12787   case "$xehost_os" in
12788   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12789     # PIC is the default for these OSes.
12790     ;;
12791
12792   os2*)
12793     # We can build DLLs from non-PIC.
12794     ;;
12795   amigaos*)
12796     # FIXME: we need at least 68020 code to build shared libraries, but
12797     # adding the `-m68020' flag to GCC prevents building anything better,
12798     # like `-m68040'.
12799     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12800     ;;
12801   *)
12802     dll_cflags='-fPIC'
12803     ;;
12804   esac
12805 else
12806   # PORTME Check for PIC flags for the system compiler.
12807   case "$xehost_os" in
12808   hpux9* | hpux1[0-9]*)
12809     # Is there a better link_static_flag that works with the bundled CC?
12810     wl='-Wl,'
12811     dll_cflags='+Z'
12812     ;;
12813
12814   irix5* | irix6*)
12815     wl='-Wl,'
12816     # PIC (with -KPIC) is the default.
12817     ;;
12818
12819   os2*)
12820     # We can build DLLs from non-PIC.
12821     ;;
12822
12823   osf3* | osf4*)
12824     # All OSF/1 code is PIC.
12825     wl='-Wl,'
12826     ;;
12827
12828   sco3.2v5*)
12829     dll_cflags='-belf -Kpic'
12830     wl='-Wl,'
12831     ;;
12832
12833   unixware*)
12834     dll_cflags="-KPIC"
12835     wl="-Wl,"
12836     ;;
12837
12838   sysv4*)
12839     dll_cflags="-KPIC"
12840     wl="-Wl,"
12841     ;;
12842
12843   sysv5*)
12844     dll_cflags="-KPIC"
12845     wl="-Wl,"
12846     ;;
12847
12848   solaris2*)
12849     dll_cflags='-KPIC'
12850     wl='-Wl,'
12851     ;;
12852
12853   sunos4*)
12854     dll_cflags='-PIC'
12855     wl='-Qoption ld '
12856     ;;
12857
12858   uts4*)
12859     dll_cflags='-pic'
12860     ;;
12861
12862   *)
12863     can_build_shared=no
12864     ;;
12865   esac
12866 fi
12867
12868 if test -n "$dll_cflags"; then
12869   echo "$ac_t""${dll_cflags}" 1>&6
12870   
12871   # Check to make sure the dll_cflags actually works.
12872   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12873 echo "configure:12874: checking if PIC flag ${dll_cflags} really works" >&5
12874   save_CFLAGS="$CFLAGS"
12875   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12876   cat > conftest.$ac_ext <<EOF
12877 #line 12878 "configure"
12878 #include "confdefs.h"
12879
12880 int main() {
12881 int x=0;
12882 ; return 0; }
12883 EOF
12884 if { (eval echo configure:12885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12885   rm -rf conftest*
12886   
12887     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12888     # reports no error.  So, we need to grep stderr for (Bundled).
12889     if grep '(Bundled)' config.log >/dev/null; then
12890       echo "$ac_t""no" 1>&6
12891       can_build_shared=no
12892       dll_cflags=
12893     else
12894       echo "$ac_t""yes" 1>&6
12895     fi
12896 else
12897   echo "configure: failed program was:" >&5
12898   cat conftest.$ac_ext >&5
12899   rm -rf conftest*
12900   echo "$ac_t""no" 1>&6
12901     can_build_shared=no
12902     dll_cflags=
12903 fi
12904 rm -f conftest*
12905   CFLAGS="$save_CFLAGS"
12906 else
12907   echo "$ac_t""none" 1>&6
12908 fi
12909
12910 if test "$can_build_shared" = "yes"; then
12911 cc_produces_so=no
12912 xldf=
12913 xcldf=
12914 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12915 echo "configure:12916: checking if C compiler can produce shared libraries" >&5
12916 if test "$XEGCC" = yes; then
12917   xcldf="-shared"
12918   xldf="-shared"
12919 else # Not using GCC
12920   case "$xehost_os" in
12921     aix3* | aix4*)
12922       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12923       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12924       ;;
12925
12926     freebsd2* | netbsd* | openbsd*)
12927       xldf="-Bshareable"
12928       xcldf="${wl}-Bshareable"
12929       ;;
12930
12931     freebsd3*)
12932       xcldf="-shared"
12933       ;;
12934
12935     hpux*)
12936       xldf="-b +s"
12937       xcldf="${wl}-b ${wl}+s"
12938       ;;
12939
12940     irix5* | irix6* | osf3* | osf4*)
12941       xcldf="${wl}-shared"
12942       xldf="-shared"
12943       ;;
12944
12945     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12946       xcldf="-G"
12947       xldf="-G"
12948       ;;
12949
12950     sunos4*)
12951       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12952       xldf="-assert pure-text -Bstatic"
12953       ;;
12954   esac
12955 fi # End if if we are using gcc
12956
12957 if test -n "$xcldf"; then
12958   save_LDFLAGS=$LDFLAGS
12959   save_LIBS=$LIBS
12960   save_xe_libs=$xe_libs
12961   LDFLAGS="$xcldf $LDFLAGS"
12962   LIBS=
12963   xe_libs=
12964   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12965   cat > conftest.$ac_ext <<EOF
12966 #line 12967 "configure"
12967 #include "confdefs.h"
12968
12969 int main() {
12970 int x=0;
12971 ; return 0; }
12972 EOF
12973 if { (eval echo configure:12974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12974   rm -rf conftest*
12975   cc_produces_so=yes
12976 else
12977   echo "configure: failed program was:" >&5
12978   cat conftest.$ac_ext >&5
12979   rm -rf conftest*
12980   cc_produces_so=no
12981 fi
12982 rm -f conftest*
12983   LDFLAGS=$save_LDFLAGS
12984   LIBS=$save_LIBS
12985   xe_libs=$save_xe_libs
12986   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12987 else
12988   cc_produces_so=no
12989 fi
12990 echo "$ac_t""${cc_produces_so}" 1>&6
12991
12992 LTLD=$LD
12993 if test -z "$LTLD"; then
12994   ac_prog=ld
12995   if test "$XEGCC" = yes; then
12996     # Check if gcc -print-prog-name=ld gives a path.
12997     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12998 echo "configure:12999: checking for ld used by GCC" >&5
12999     ac_prog=`($CC -print-prog-name=ld) 2>&5`
13000     case "$ac_prog" in
13001     # Accept absolute paths.
13002     /*)
13003       if test -z "$LTLD"; then
13004         case "$ac_prog" in
13005           *gcc-lib*) LTLD="$CC"
13006                      ;;
13007           *)         LTLD="$ac_prog"
13008                      ;;
13009         esac
13010       fi
13011       ;;
13012     "")
13013       # If it fails, then pretend we aren't using GCC.
13014       ac_prog=ld
13015       ;;
13016     *)
13017       # If it is relative, then search for the first ld in PATH.
13018       with_gnu_ld=unknown
13019       ;;
13020     esac
13021   else
13022     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
13023 echo "configure:13024: checking for GNU ld" >&5
13024   fi
13025
13026   if test -z "$LTLD"; then
13027     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13028     for ac_dir in $PATH; do
13029       test -z "$ac_dir" && ac_dir=.
13030       if test -f "$ac_dir/$ac_prog"; then
13031         LTLD="$ac_dir/$ac_prog"
13032         # Check to see if the program is GNU ld.  I'd rather use --version,
13033         # but apparently some GNU ld's only accept -v.
13034         # Break only if it was the GNU/non-GNU ld that we prefer.
13035         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
13036           xe_gnu_ld=yes
13037         else
13038           xe_gnu_ld=no
13039         fi
13040       fi
13041     done
13042     IFS="$ac_save_ifs"
13043   fi
13044
13045   if test -n "$LTLD"; then
13046     echo "$ac_t""${LTLD}" 1>&6
13047   else
13048     echo "$ac_t""no" 1>&6
13049   fi
13050
13051   if test -z "$LTLD" -a "$cc_produces_so" = no; then
13052     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
13053     exit 1
13054   fi
13055 fi
13056
13057 ld_dynamic_link_flags=
13058
13059 # Check to see if it really is or isn't GNU ld.
13060 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
13061 echo "configure:13062: checking if the linker is GNU ld" >&5
13062 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
13063 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
13064   xe_gnu_ld=yes
13065 else
13066   xe_gnu_ld=no
13067 fi
13068 echo "$ac_t""${xe_gnu_ld}" 1>&6
13069
13070 case "$xehost_os" in
13071   amigaos* | sunos4*)
13072     # On these operating systems, we should treat GNU ld like the system ld.
13073     gnu_ld_acts_native=yes
13074     ;;
13075   *)
13076     gnu_ld_acts_native=no
13077     ;;
13078 esac
13079
13080 if test "$cc_produces_so" = "yes"; then
13081   dll_ld=$CC
13082   dll_ldflags=$xcldf
13083   can_build_shared=yes
13084 else
13085   # OK - only NOW do we futz about with ld.
13086   # See if the linker supports building shared libraries.
13087   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
13088 echo "configure:13089: checking whether the linker supports shared libraries" >&5
13089   dll_ld=$CC
13090   dll_ldflags=$LDFLAGS
13091   ld_shlibs=yes
13092   can_build_shared=yes
13093   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
13094     # See if GNU ld supports shared libraries.
13095     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
13096       dll_ld=$CC
13097       dll_ldflags="-shared"
13098       ld_shlibs=yes
13099     else
13100       ld_shlibs=no
13101     fi
13102   else
13103     # PORTME fill in a description of your system's linker (not GNU ld)
13104     case "$xehost_os" in
13105     aix3*)
13106       dll_ld=$LTLD
13107       dll_ldflags=$xldf
13108       ;;
13109
13110     aix4*)
13111       dll_ldflags=$xcldf
13112       ;;
13113
13114     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13115     # support.  Future versions do this automatically, but an explicit c++rt0.o
13116     # doesn't break anything, and helps significantly (at the cost of a little
13117     # extra space).
13118     freebsd2.2*)
13119       dll_ld=$LTLD
13120       dll_ldflags=$xldf
13121       dll_post="/usr/lib/c++rt0.o"
13122       ;;
13123
13124     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
13125     freebsd2*)
13126       dll_ld=$LTLD
13127       dll_ldflags="-Bshareable"
13128       ;;
13129
13130     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
13131     freebsd3*)
13132       dll_ldflags="-shared"
13133       ;;
13134
13135     hpux*)
13136       dll_ld=$LTLD
13137       dll_ldflags=$xldf
13138       ;;
13139
13140     irix5* | irix6*)
13141       dll_ld=$LTLD
13142       dll_ldflags=$xldf
13143       ;;
13144
13145     netbsd*)
13146       # Tested with NetBSD 1.2 ld
13147       dll_ld=$LTLD
13148       dll_ldflags=$xldf
13149       ;;
13150
13151     openbsd*)
13152       dll_ld=$LTLD
13153       dll_ldflags=$xldf
13154       ;;
13155
13156     osf3* | osf4*)
13157       dll_ld=$LTLD
13158       dll_ldflags=$xldf
13159       ;;
13160
13161     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13162     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13163       dll_ld=$LTLD
13164       case "$dll_ld" in
13165         *gcc*) dll_ldflags="-shared"
13166                dll_ld=$CC
13167                ;;
13168         *)     dll_ldflags="-G"
13169                ;;
13170       esac
13171       ;;
13172
13173     sunos4*)
13174       if test "$XEGCC" = yes; then
13175         dll_ld=$CC
13176       else
13177         dll_ld=$LTLD
13178       fi
13179       dll_ldflags=$xldf
13180       ;;
13181
13182     uts4*)
13183       dll_ld=$LTLD
13184       dll_ldflags="-G"
13185       ;;
13186
13187     bsdi*)
13188       dll_ldflags="-r"
13189       dll_ld="shlicc2"
13190       ;;
13191
13192     *)
13193       ld_shlibs=no
13194       can_build_shared=no
13195       ;;
13196     esac
13197   fi
13198   echo "$ac_t""${ld_shlibs}" 1>&6
13199   if test "$ld_shlibs" = "no"; then
13200     can_build_shared=no
13201   fi
13202 fi # End of if cc_produces_so = no
13203
13204
13205 if test "$xe_gnu_ld" = yes; then
13206   if test "$ld_shlibs" = yes; then
13207     ld_dynamic_link_flags="${wl}-export-dynamic"
13208   fi
13209 fi
13210
13211 if test -z "$ld_dynamic_link_flags"; then
13212   case "$xehost_os" in
13213   aix3*)
13214     ld_dynamic_link_flags=
13215     ;;
13216
13217   aix4*)
13218     ld_dynamic_link_flags=
13219     ;;
13220
13221   freebsd2.2*)
13222     ld_dynamic_link_flags=
13223     ;;
13224
13225   freebsd2*)
13226     ld_dynamic_link_flags=
13227     ;;
13228
13229   freebsd3*)
13230     ld_dynamic_link_flags=
13231     ;;
13232
13233   hpux*)
13234     ld_dynamic_link_flags="${wl}-E"
13235     ;;
13236
13237   irix5* | irix6*)
13238     ld_dynamic_link_flags=
13239     ;;
13240
13241   netbsd*)
13242     ld_dynamic_link_flags=
13243     ;;
13244
13245   openbsd*)
13246     ld_dynamic_link_flags=
13247     ;;
13248
13249   osf3* | osf4*)
13250     ld_dynamic_link_flags=
13251     ;;
13252
13253   solaris2* | solaris7*)
13254     ld_dynamic_link_flags=
13255     ;;
13256
13257   sco3.2v5* | unixware* | sysv5* | sysv4*)
13258     ld_dynamic_link_flags="${wl}-Bexport"
13259     ;;
13260
13261   sunos4*)
13262     ld_dynamic_link_flags=
13263     ;;
13264
13265   uts4*)
13266     ld_dynamic_link_flags=
13267     ;;
13268
13269   bsdi*)
13270     ld_dynamic_link_flags=
13271     ;;
13272
13273   esac
13274 fi # End of if -z ld_dynamic_link_flags
13275 fi # End of if test "$can_build_shared" = "yes"
13276
13277
13278
13279
13280
13281
13282
13283
13284   fi
13285
13286   if test "$can_build_shared" = "yes"; then
13287     { test "$extra_verbose" = "yes" && cat << \EOF
13288     Defining HAVE_SHLIB
13289 EOF
13290 cat >> confdefs.h <<\EOF
13291 #define HAVE_SHLIB 1
13292 EOF
13293 }
13294
13295     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13296    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13297  fi
13298     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13299     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13300     for ac_func in dlerror _dlerror
13301 do
13302 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13303 echo "configure:13304: checking for $ac_func" >&5
13304
13305 cat > conftest.$ac_ext <<EOF
13306 #line 13307 "configure"
13307 #include "confdefs.h"
13308 /* System header to define __stub macros and hopefully few prototypes,
13309     which can conflict with char $ac_func(); below.  */
13310 #include <assert.h>
13311 /* Override any gcc2 internal prototype to avoid an error.  */
13312 /* We use char because int might match the return type of a gcc2
13313     builtin and then its argument prototype would still apply.  */
13314 char $ac_func();
13315
13316 int main() {
13317
13318 /* The GNU C library defines this for functions which it implements
13319     to always fail with ENOSYS.  Some functions are actually named
13320     something starting with __ and the normal name is an alias.  */
13321 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13322 choke me
13323 #else
13324 $ac_func();
13325 #endif
13326
13327 ; return 0; }
13328 EOF
13329 if { (eval echo configure:13330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13330   rm -rf conftest*
13331   eval "ac_cv_func_$ac_func=yes"
13332 else
13333   echo "configure: failed program was:" >&5
13334   cat conftest.$ac_ext >&5
13335   rm -rf conftest*
13336   eval "ac_cv_func_$ac_func=no"
13337 fi
13338 rm -f conftest*
13339
13340 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13341   echo "$ac_t""yes" 1>&6
13342     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13343   { test "$extra_verbose" = "yes" && cat << EOF
13344     Defining $ac_tr_func
13345 EOF
13346 cat >> confdefs.h <<EOF
13347 #define $ac_tr_func 1
13348 EOF
13349 }
13350  
13351 else
13352   echo "$ac_t""no" 1>&6
13353 fi
13354 done
13355
13356     with_modules=yes
13357   else
13358     if test "$with_modules" = "yes"; then
13359       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13360     else
13361       echo "configure: warning: "Module support cannot be provided."" 1>&2
13362     fi
13363     with_modules=no
13364   fi
13365 fi
13366
13367 cat > conftest.$ac_ext <<EOF
13368 #line 13369 "configure"
13369 #include "confdefs.h"
13370 int main(int c,char *v[]){return 0;}
13371 EOF
13372 if { (eval echo configure:13373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13373 then
13374   :
13375 else
13376   conftest_rc="$?"
13377   echo "configure: failed program was:" >&5
13378   cat conftest.$ac_ext >&5
13379   rm -fr conftest*
13380   
13381   echo ""
13382   echo "*** PANIC *** The C compiler can no longer build working executables."
13383   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13384   echo "*** PANIC *** The most likely reason for this problem is that configure"
13385   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13386   echo "*** PANIC *** found at run time."
13387   echo "*** PANIC ***"
13388   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13389   echo "*** PANIC *** On other systems, try telling configure where to find the"
13390   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13391   echo "*** PANIC ***"
13392   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13393   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13394   echo "*** PANIC *** on your system.  Don't do that."
13395   exit 1
13396 fi
13397 rm -fr conftest*
13398
13399 if test "$win32_processes" = "yes"; then
13400   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13401    echo "    xemacs will be linked with \"process-nt.o\""
13402  fi
13403 else
13404   { test "$extra_verbose" = "yes" && cat << \EOF
13405     Defining HAVE_UNIX_PROCESSES
13406 EOF
13407 cat >> confdefs.h <<\EOF
13408 #define HAVE_UNIX_PROCESSES 1
13409 EOF
13410 }
13411
13412   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13413    echo "    xemacs will be linked with \"process-unix.o\""
13414  fi
13415 fi
13416
13417
13418
13419 T=""
13420 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13421 CFLAGS="$T"
13422
13423
13424 T=""
13425 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13426 extra_objs="$T"
13427
13428
13429 T=""
13430 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
13431 c_switch_general="$T"
13432
13433
13434 T=""
13435 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13436 c_switch_window_system="$T"
13437
13438
13439 T=""
13440 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13441 c_switch_all="$T"
13442
13443
13444 T=""
13445 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
13446 ld_switch_general="$T"
13447
13448
13449 T=""
13450 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13451 ld_switch_window_system="$T"
13452
13453
13454 T=""
13455 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13456 ld_switch_all="$T"
13457
13458
13459 T=""
13460 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13461 ld_libs_general="$T"
13462
13463
13464 T=""
13465 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
13466 ld_libs_window_system="$T"
13467
13468
13469 T=""
13470 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13471 ld_libs_all="$T"
13472
13473
13474
13475 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13476 internal_makefile_list="Makefile.in"
13477 SUBDIR_MAKEFILES=''
13478 test -d lock || mkdir lock
13479 for dir in $MAKE_SUBDIR; do
13480   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13481         test -d "$d" || mkdir "$d"; cd "$d"
13482       done ) ;;
13483    * ) test -d "$dir" || mkdir "$dir" ;;
13484   esac
13485   
13486 T=""
13487 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13488 SUBDIR_MAKEFILES="$T"
13489
13490   
13491 T=""
13492 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13493 internal_makefile_list="$T"
13494
13495 done
13496
13497
13498
13499
13500 for dir in src/s src/m; do
13501   if test ! -d "$dir" ; then
13502     echo Making symbolic link to "$srcdir/$dir"
13503     ${LN_S} "$srcdir/$dir" "$dir"
13504   fi
13505 done
13506
13507 if test "$extra_verbose" = "yes"; then
13508   echo ""
13509   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
13510   echo ""
13511 fi
13512
13513
13514 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
13515   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
13516   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
13517 fi
13518
13519 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
13520   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
13521   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
13522 fi
13523
13524 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
13525   test "$extra_verbose" = "yes" && echo "creating TAGS"
13526   echo "\f
13527 $srcdir/TAGS,include" > "TAGS"
13528 fi
13529
13530 if test "$__SUNPRO_C" = "yes"; then
13531   test "$extra_verbose" = "yes" && echo "creating .sbinit"
13532   ( echo "# For use with Sun WorkShop's Source browser."
13533     echo "# See sbquery(1) and sbinit(4) for more information"
13534     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13535   ) > .sbinit
13536 fi
13537
13538 rm -f core
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558 PREFIX=$prefix
13559 while true; do
13560   case "$PREFIX" in
13561     *\$* ) eval "PREFIX=$PREFIX" ;;
13562     *) break ;;
13563   esac
13564 done
13565
13566
13567
13568
13569 EXEC_PREFIX=$exec_prefix
13570 while true; do
13571   case "$EXEC_PREFIX" in
13572     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13573     *) break ;;
13574   esac
13575 done
13576
13577
13578
13579
13580 INFODIR=$infodir
13581 while true; do
13582   case "$INFODIR" in
13583     *\$* ) eval "INFODIR=$INFODIR" ;;
13584     *) break ;;
13585   esac
13586 done
13587
13588
13589
13590
13591 INFOPATH=$infopath
13592 while true; do
13593   case "$INFOPATH" in
13594     *\$* ) eval "INFOPATH=$INFOPATH" ;;
13595     *) break ;;
13596   esac
13597 done
13598
13599
13600
13601
13602 PACKAGE_PATH=$package_path
13603 while true; do
13604   case "$PACKAGE_PATH" in
13605     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
13606     *) break ;;
13607   esac
13608 done
13609
13610
13611
13612
13613 LISPDIR=$lispdir
13614 while true; do
13615   case "$LISPDIR" in
13616     *\$* ) eval "LISPDIR=$LISPDIR" ;;
13617     *) break ;;
13618   esac
13619 done
13620
13621
13622
13623
13624 MODULEDIR=$moduledir
13625 while true; do
13626   case "$MODULEDIR" in
13627     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
13628     *) break ;;
13629   esac
13630 done
13631
13632
13633
13634
13635 SITELISPDIR=$sitelispdir
13636 while true; do
13637   case "$SITELISPDIR" in
13638     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
13639     *) break ;;
13640   esac
13641 done
13642
13643
13644
13645
13646 SITEMODULEDIR=$sitemoduledir
13647 while true; do
13648   case "$SITEMODULEDIR" in
13649     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
13650     *) break ;;
13651   esac
13652 done
13653
13654
13655
13656
13657 ETCDIR=$etcdir
13658 while true; do
13659   case "$ETCDIR" in
13660     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13661     *) break ;;
13662   esac
13663 done
13664
13665
13666
13667
13668 LOCKDIR=$lockdir
13669 while true; do
13670   case "$LOCKDIR" in
13671     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13672     *) break ;;
13673   esac
13674 done
13675
13676
13677
13678
13679 DOCDIR=$docdir
13680 while true; do
13681   case "$DOCDIR" in
13682     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13683     *) break ;;
13684   esac
13685 done
13686
13687
13688
13689
13690 ARCHLIBDIR=$archlibdir
13691 while true; do
13692   case "$ARCHLIBDIR" in
13693     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13694     *) break ;;
13695   esac
13696 done
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13718
13719
13720
13721
13722
13723
13724
13725 : ${XEMACS_CC:=$CC}
13726
13727
13728 if test "$with_prefix" = "yes"; then
13729   { test "$extra_verbose" = "yes" && cat << \EOF
13730     Defining PREFIX_USER_DEFINED
13731 EOF
13732 cat >> confdefs.h <<\EOF
13733 #define PREFIX_USER_DEFINED 1
13734 EOF
13735 }
13736
13737 fi
13738
13739 if test "$with_site_lisp" = "no"; then
13740   { test "$extra_verbose" = "yes" && cat << \EOF
13741     Defining INHIBIT_SITE_LISP
13742 EOF
13743 cat >> confdefs.h <<\EOF
13744 #define INHIBIT_SITE_LISP 1
13745 EOF
13746 }
13747
13748 fi
13749 if test "$with_site_modules" = "no"; then
13750   { test "$extra_verbose" = "yes" && cat << \EOF
13751     Defining INHIBIT_SITE_MODULES
13752 EOF
13753 cat >> confdefs.h <<\EOF
13754 #define INHIBIT_SITE_MODULES 1
13755 EOF
13756 }
13757
13758 fi
13759
13760
13761 T=""
13762 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13763 ac_configure_args="$T"
13764
13765 { test "$extra_verbose" = "yes" && cat << EOF
13766     Defining EMACS_CONFIGURATION = "$configuration"
13767 EOF
13768 cat >> confdefs.h <<EOF
13769 #define EMACS_CONFIGURATION "$configuration"
13770 EOF
13771 }
13772
13773 { test "$extra_verbose" = "yes" && cat << EOF
13774     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13775 EOF
13776 cat >> confdefs.h <<EOF
13777 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13778 EOF
13779 }
13780
13781 { test "$extra_verbose" = "yes" && cat << EOF
13782     Defining config_machfile = "$machfile"
13783 EOF
13784 cat >> confdefs.h <<EOF
13785 #define config_machfile "$machfile"
13786 EOF
13787 }
13788
13789 { test "$extra_verbose" = "yes" && cat << EOF
13790     Defining config_opsysfile = "$opsysfile"
13791 EOF
13792 cat >> confdefs.h <<EOF
13793 #define config_opsysfile "$opsysfile"
13794 EOF
13795 }
13796
13797
13798
13799 null_string=""
13800 { test "$extra_verbose" = "yes" && cat << EOF
13801     Defining LD_SWITCH_X_SITE = $null_string
13802 EOF
13803 cat >> confdefs.h <<EOF
13804 #define LD_SWITCH_X_SITE $null_string
13805 EOF
13806 }
13807
13808 { test "$extra_verbose" = "yes" && cat << EOF
13809     Defining LD_SWITCH_X_SITE_AUX = $null_string
13810 EOF
13811 cat >> confdefs.h <<EOF
13812 #define LD_SWITCH_X_SITE_AUX $null_string
13813 EOF
13814 }
13815
13816 { test "$extra_verbose" = "yes" && cat << EOF
13817     Defining C_SWITCH_X_SITE = $null_string
13818 EOF
13819 cat >> confdefs.h <<EOF
13820 #define C_SWITCH_X_SITE $null_string
13821 EOF
13822 }
13823
13824 { test "$extra_verbose" = "yes" && cat << EOF
13825     Defining LD_SWITCH_SITE = $null_string
13826 EOF
13827 cat >> confdefs.h <<EOF
13828 #define LD_SWITCH_SITE $null_string
13829 EOF
13830 }
13831
13832 { test "$extra_verbose" = "yes" && cat << EOF
13833     Defining C_SWITCH_SITE = $null_string
13834 EOF
13835 cat >> confdefs.h <<EOF
13836 #define C_SWITCH_SITE $null_string
13837 EOF
13838 }
13839
13840
13841
13842 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13843     Defining GNU_MALLOC
13844 EOF
13845 cat >> confdefs.h <<\EOF
13846 #define GNU_MALLOC 1
13847 EOF
13848 }
13849
13850 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13851     Defining USE_SYSTEM_MALLOC
13852 EOF
13853 cat >> confdefs.h <<\EOF
13854 #define USE_SYSTEM_MALLOC 1
13855 EOF
13856 }
13857
13858 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13859     Defining USE_DEBUG_MALLOC
13860 EOF
13861 cat >> confdefs.h <<\EOF
13862 #define USE_DEBUG_MALLOC 1
13863 EOF
13864 }
13865
13866                                               { test "$extra_verbose" = "yes" && cat << \EOF
13867     Defining USE_SYSTEM_MALLOC
13868 EOF
13869 cat >> confdefs.h <<\EOF
13870 #define USE_SYSTEM_MALLOC 1
13871 EOF
13872 }
13873
13874 fi
13875 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13876     Defining I18N3
13877 EOF
13878 cat >> confdefs.h <<\EOF
13879 #define I18N3 1
13880 EOF
13881 }
13882
13883 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13884     Defining USE_GCC
13885 EOF
13886 cat >> confdefs.h <<\EOF
13887 #define USE_GCC 1
13888 EOF
13889 }
13890
13891 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13892     Defining EXTERNAL_WIDGET
13893 EOF
13894 cat >> confdefs.h <<\EOF
13895 #define EXTERNAL_WIDGET 1
13896 EOF
13897 }
13898
13899 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13900     Defining NO_DOC_FILE
13901 EOF
13902 cat >> confdefs.h <<\EOF
13903 #define NO_DOC_FILE 1
13904 EOF
13905 }
13906
13907 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13908     Defining PURIFY
13909 EOF
13910 cat >> confdefs.h <<\EOF
13911 #define PURIFY 1
13912 EOF
13913 }
13914
13915 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13916     Defining QUANTIFY
13917 EOF
13918 cat >> confdefs.h <<\EOF
13919 #define QUANTIFY 1
13920 EOF
13921 }
13922
13923 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13924     Defining MAIL_USE_POP
13925 EOF
13926 cat >> confdefs.h <<\EOF
13927 #define MAIL_USE_POP 1
13928 EOF
13929 }
13930
13931 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13932     Defining KERBEROS
13933 EOF
13934 cat >> confdefs.h <<\EOF
13935 #define KERBEROS 1
13936 EOF
13937 }
13938
13939 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13940     Defining HESIOD
13941 EOF
13942 cat >> confdefs.h <<\EOF
13943 #define HESIOD 1
13944 EOF
13945 }
13946
13947 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13948     Defining USE_UNION_TYPE
13949 EOF
13950 cat >> confdefs.h <<\EOF
13951 #define USE_UNION_TYPE 1
13952 EOF
13953 }
13954
13955 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13956     Defining PDUMP
13957 EOF
13958 cat >> confdefs.h <<\EOF
13959 #define PDUMP 1
13960 EOF
13961 }
13962
13963
13964
13965 (
13966 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13967 else
13968   echo "uname -a: `uname -a`"
13969 fi
13970 echo ""
13971 echo "$0 $quoted_arguments"
13972 ) > Installation
13973
13974 if test ! -z ${emacs_beta_version} ; then
13975   if test -z "${emacs_is_beta}" ; then
13976         xemacs_betaname=".${emacs_beta_version}"
13977   else
13978         xemacs_betaname="-b${emacs_beta_version}"
13979   fi
13980 else
13981   xemacs_betaname=""
13982 fi
13983
13984 (
13985 echo "
13986
13987 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13988
13989   Where should the build process find the source code?    $srcdir
13990   What installation prefix should install use?            $prefix
13991   What operating system and machine description files should XEmacs use?
13992         \`$opsysfile' and \`$machfile'
13993   What compiler should XEmacs be built with?              $CC $CFLAGS
13994   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13995   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13996   What window system should XEmacs use?                   ${window_system}"
13997 if test "$with_x11" = "yes"; then
13998   echo "  Where do we find X Windows header files?                $x_includes"
13999   echo "  Where do we find X Windows libraries?                   $x_libraries"
14000 fi
14001 if test -n "$site_includes"; then
14002   echo "  Additional header files:                                $site_includes"
14003 fi
14004 if test -n "$site_libraries"; then
14005   echo "  Additional libraries:                                   $site_libraries"
14006 fi
14007 if test -n "$site_prefixes"; then
14008   echo "  Additional prefixes:                                    $site_prefixes"
14009 fi
14010 if test -n "$runpath"; then
14011   echo "  Runtime library search path:                            $runpath"
14012 fi
14013 if test "$have_xaw" = "yes"; then
14014   echo "  Athena library to link:                                 $athena_lib"
14015   echo "  Athena header include path:                             $athena_h_path"
14016 fi
14017 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
14018 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
14019 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
14020 if test "$with_xmu" != yes -a "$with_x11" = yes; then
14021   echo "  No Xmu; substituting equivalent routines."
14022 fi
14023
14024 if test "$with_xpm" = yes; then
14025   echo "  Compiling in support for XPM images."
14026 elif test "$with_x11" = yes; then
14027   echo "  --------------------------------------------------------------------"
14028   echo "  WARNING: Compiling without XPM support."
14029   if test "$xpm_problem" != ""; then
14030     echo "  Reason: $xpm_problem"
14031   fi
14032   echo "  WARNING: You should strongly consider installing XPM."
14033   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
14034   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14035   echo "  --------------------------------------------------------------------"
14036 fi
14037 if test "$with_png" = yes; then
14038   echo "  Compiling in support for PNG image handling."
14039 elif test "$window_system" != "none"; then
14040   echo "  --------------------------------------------------------------------"
14041   echo "  WARNING: Compiling without PNG image support."
14042   if test "$png_problem" != ""; then
14043     echo "  Reason: $png_problem"
14044   fi
14045   echo "  WARNING: You should strongly consider installing the PNG libraries."
14046   echo "  WARNING: Otherwise certain images and glyphs may not display."
14047   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14048   echo "  --------------------------------------------------------------------"
14049 fi
14050 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
14051 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
14052 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
14053 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
14054
14055 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
14056 test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
14057 test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
14058 test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
14059
14060 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
14061 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
14062 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
14063
14064 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
14065
14066 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
14067 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
14068
14069 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
14070 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
14071 test "$with_text_coding"     = yes && echo "  Compiling in Text coding support."
14072 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
14073 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
14074 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
14075 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
14076 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
14077 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
14078 if test "$with_wnn" = yes; then
14079   echo "  Compiling in support for the WNN input method on Mule."
14080   test "$with_wnn6" = yes && echo "    Using WNN version 6."
14081 fi
14082 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
14083
14084 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
14085 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
14086 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
14087 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
14088 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
14089 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
14090 case "$with_menubars" in
14091   lucid ) echo "  Using Lucid menubars." ;;
14092   motif ) echo "  Using Motif menubars."
14093           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
14094           echo "             We recommend using the Lucid menubar instead."
14095           echo "             Re-run configure with --with-menubars='lucid'." ;;
14096   msw ) echo "  Using MS-Windows menubars." ;;
14097 esac
14098 case "$with_scrollbars" in
14099   lucid    ) echo "  Using Lucid scrollbars."     ;;
14100   motif    ) echo "  Using Motif scrollbars."     ;;
14101   athena   ) echo "  Using Athena scrollbars."    ;;
14102   msw ) echo "  Using MS-Windows scrollbars." ;;
14103 esac
14104 case "$with_widgets" in
14105   motif    ) echo "  Using Motif native widgets."     ;;
14106   athena   ) echo "  Using Athena native widgets."    ;;
14107   msw ) echo "  Using MS-Windows native widgets." ;;
14108 esac
14109 case "$with_dialogs" in
14110   motif    )
14111     echo "  Using Motif dialog boxes."
14112     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
14113       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
14114       echo "             We recommend using the Athena dialog boxes instead."
14115       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
14116       echo "             Read the PROBLEMS file for more information."
14117     fi; fi
14118     ;;
14119   athena   ) echo "  Using Athena dialog boxes."    ;;
14120   msw ) echo "  Using MS-Windows dialog boxes." ;;
14121 esac
14122 test "$with_modules" = "yes" && echo "  Compiling in dynamic shared object module support."
14123 test "$with_clash_detection" = yes && \
14124   echo "  Clash detection will use \"$lockdir\" for locking files."
14125 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
14126 test "$with_pop"        = yes && echo "  Using POP for mail access."
14127 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
14128 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
14129 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
14130 test "$pdump"           = yes && echo "  Using the new portable dumper (wishful thinking)."
14131 test "$debug"           = yes && echo "  Compiling in extra code for debugging."
14132 test "$usage_tracking"  = yes && echo "  Compiling with usage tracking active (Sun internal)."
14133 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
14134   != "no no no no no"; then
14135   echo "  WARNING: ---------------------------------------------------------"
14136   echo "  WARNING: Compiling in support for runtime error checking."
14137   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
14138   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
14139   echo "  WARNING: ---------------------------------------------------------"
14140 fi
14141 echo ""
14142 ) | tee -a Installation
14143 echo ""
14144
14145
14146 # Remove any trailing slashes in these variables.
14147 test -n "$prefix" &&
14148   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14149 test -n "$exec_prefix" &&
14150   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14151
14152
14153 for file in $internal_makefile_list; do
14154   test "$file" = src/Makefile.in && \
14155     file="src/Makefile.in:src/Makefile.in.in:src/depend"
14156   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
14157 done
14158 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
14159 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
14160
14161 trap '' 1 2 15
14162
14163 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14164
14165 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14166 # Let make expand exec_prefix.
14167 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14168
14169 # Any assignment to VPATH causes Sun make to only execute
14170 # the first set of double-colon rules, so remove it if not needed.
14171 # If there is a colon in the path, we need to keep it.
14172 if test "x$srcdir" = x.; then
14173   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14174 fi
14175
14176 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14177
14178 DEFS=-DHAVE_CONFIG_H
14179
14180 # Without the "./", some shells look in PATH for config.status.
14181 : ${CONFIG_STATUS=./config.status}
14182
14183 echo creating $CONFIG_STATUS
14184 rm -f $CONFIG_STATUS
14185 cat > $CONFIG_STATUS <<EOF
14186 #! /bin/sh
14187 # Generated automatically by configure.
14188 # Run this file to recreate the current configuration.
14189 # This directory was configured as follows,
14190 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14191 #
14192 # $0 $ac_configure_args
14193 #
14194 # Compiler output produced by configure, useful for debugging
14195 # configure, is in ./config.log if it exists.
14196
14197 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14198 for ac_option
14199 do
14200   case "\$ac_option" in
14201   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14202     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14203     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14204   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14205     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14206     exit 0 ;;
14207   -help | --help | --hel | --he | --h)
14208     echo "\$ac_cs_usage"; exit 0 ;;
14209   *) echo "\$ac_cs_usage"; exit 1 ;;
14210   esac
14211 done
14212
14213 ac_given_srcdir=$srcdir
14214 ac_given_INSTALL="$INSTALL"
14215
14216 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14217 EOF
14218 cat >> $CONFIG_STATUS <<EOF
14219
14220 # Protect against being on the right side of a sed subst in config.status.
14221 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14222  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14223 $ac_vpsub
14224 $extrasub
14225 s%@SHELL@%$SHELL%g
14226 s%@CFLAGS@%$CFLAGS%g
14227 s%@CPPFLAGS@%$CPPFLAGS%g
14228 s%@CXXFLAGS@%$CXXFLAGS%g
14229 s%@FFLAGS@%$FFLAGS%g
14230 s%@DEFS@%$DEFS%g
14231 s%@LDFLAGS@%$LDFLAGS%g
14232 s%@LIBS@%$LIBS%g
14233 s%@exec_prefix@%$exec_prefix%g
14234 s%@prefix@%$prefix%g
14235 s%@program_transform_name@%$program_transform_name%g
14236 s%@bindir@%$bindir%g
14237 s%@sbindir@%$sbindir%g
14238 s%@libexecdir@%$libexecdir%g
14239 s%@datadir@%$datadir%g
14240 s%@sysconfdir@%$sysconfdir%g
14241 s%@sharedstatedir@%$sharedstatedir%g
14242 s%@localstatedir@%$localstatedir%g
14243 s%@libdir@%$libdir%g
14244 s%@includedir@%$includedir%g
14245 s%@oldincludedir@%$oldincludedir%g
14246 s%@infodir@%$infodir%g
14247 s%@mandir@%$mandir%g
14248 s%@LN_S@%$LN_S%g
14249 s%@blddir@%$blddir%g
14250 s%@CC@%$CC%g
14251 s%@CPP@%$CPP%g
14252 s%@start_flags@%$start_flags%g
14253 s%@ld_switch_shared@%$ld_switch_shared%g
14254 s%@start_files@%$start_files%g
14255 s%@ld@%$ld%g
14256 s%@lib_gcc@%$lib_gcc%g
14257 s%@RANLIB@%$RANLIB%g
14258 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14259 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14260 s%@INSTALL_DATA@%$INSTALL_DATA%g
14261 s%@YACC@%$YACC%g
14262 s%@SET_MAKE@%$SET_MAKE%g
14263 s%@X_CFLAGS@%$X_CFLAGS%g
14264 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14265 s%@X_LIBS@%$X_LIBS%g
14266 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14267 s%@install_pp@%$install_pp%g
14268 s%@libs_xauth@%$libs_xauth%g
14269 s%@dnd_objs@%$dnd_objs%g
14270 s%@lwlib_objs@%$lwlib_objs%g
14271 s%@ALLOCA@%$ALLOCA%g
14272 s%@have_esd_config@%$have_esd_config%g
14273 s%@dll_ld@%$dll_ld%g
14274 s%@dll_cflags@%$dll_cflags%g
14275 s%@dll_ldflags@%$dll_ldflags%g
14276 s%@dll_post@%$dll_post%g
14277 s%@dll_ldo@%$dll_ldo%g
14278 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14279 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14280 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14281 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14282 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14283 s%@PROGNAME@%$PROGNAME%g
14284 s%@version@%$version%g
14285 s%@configuration@%$configuration%g
14286 s%@canonical@%$canonical%g
14287 s%@inststaticdir@%$inststaticdir%g
14288 s%@instvardir@%$instvardir%g
14289 s%@srcdir@%$srcdir%g
14290 s%@pkgdir@%$pkgdir%g
14291 s%@statedir@%$statedir%g
14292 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14293 s%@PREFIX@%$PREFIX%g
14294 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14295 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14296 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14297 s%@INFODIR@%$INFODIR%g
14298 s%@infopath@%$infopath%g
14299 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14300 s%@INFOPATH@%$INFOPATH%g
14301 s%@package_path@%$package_path%g
14302 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14303 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14304 s%@lispdir@%$lispdir%g
14305 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14306 s%@LISPDIR@%$LISPDIR%g
14307 s%@moduledir@%$moduledir%g
14308 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14309 s%@MODULEDIR@%$MODULEDIR%g
14310 s%@sitelispdir@%$sitelispdir%g
14311 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14312 s%@SITELISPDIR@%$SITELISPDIR%g
14313 s%@sitemoduledir@%$sitemoduledir%g
14314 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14315 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14316 s%@etcdir@%$etcdir%g
14317 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14318 s%@ETCDIR@%$ETCDIR%g
14319 s%@lockdir@%$lockdir%g
14320 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
14321 s%@LOCKDIR@%$LOCKDIR%g
14322 s%@docdir@%$docdir%g
14323 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14324 s%@DOCDIR@%$DOCDIR%g
14325 s%@archlibdir@%$archlibdir%g
14326 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14327 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14328 s%@bitmapdir@%$bitmapdir%g
14329 s%@extra_objs@%$extra_objs%g
14330 s%@machfile@%$machfile%g
14331 s%@opsysfile@%$opsysfile%g
14332 s%@c_switch_general@%$c_switch_general%g
14333 s%@c_switch_window_system@%$c_switch_window_system%g
14334 s%@c_switch_all@%$c_switch_all%g
14335 s%@ld_switch_general@%$ld_switch_general%g
14336 s%@ld_switch_window_system@%$ld_switch_window_system%g
14337 s%@ld_switch_all@%$ld_switch_all%g
14338 s%@ld_libs_general@%$ld_libs_general%g
14339 s%@ld_libs_window_system@%$ld_libs_window_system%g
14340 s%@ld_libs_all@%$ld_libs_all%g
14341 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14342 s%@native_sound_lib@%$native_sound_lib%g
14343 s%@sound_cflags@%$sound_cflags%g
14344 s%@dynodump_arch@%$dynodump_arch%g
14345 s%@XEMACS_CC@%$XEMACS_CC%g
14346 s%@internal_makefile_list@%$internal_makefile_list%g
14347
14348 CEOF
14349 EOF
14350
14351 cat >> $CONFIG_STATUS <<\EOF
14352
14353 # Split the substitutions into bite-sized pieces for seds with
14354 # small command number limits, like on Digital OSF/1 and HP-UX.
14355 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14356 ac_file=1 # Number of current file.
14357 ac_beg=1 # First line for current file.
14358 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14359 ac_more_lines=:
14360 ac_sed_cmds=""
14361 while $ac_more_lines; do
14362   if test $ac_beg -gt 1; then
14363     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14364   else
14365     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14366   fi
14367   if test ! -s conftest.s$ac_file; then
14368     ac_more_lines=false
14369     rm -f conftest.s$ac_file
14370   else
14371     if test -z "$ac_sed_cmds"; then
14372       ac_sed_cmds="sed -f conftest.s$ac_file"
14373     else
14374       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14375     fi
14376     ac_file=`expr $ac_file + 1`
14377     ac_beg=$ac_end
14378     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14379   fi
14380 done
14381 if test -z "$ac_sed_cmds"; then
14382   ac_sed_cmds=cat
14383 fi
14384 EOF
14385
14386 cat >> $CONFIG_STATUS <<EOF
14387
14388 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14389 EOF
14390 cat >> $CONFIG_STATUS <<\EOF
14391 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14392   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14393   case "$ac_file" in
14394   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14395        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14396   *) ac_file_in="${ac_file}.in" ;;
14397   esac
14398
14399   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14400
14401   # Remove last slash and all that follows it.  Not all systems have dirname.
14402   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14403   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14404     # The file is in a subdirectory.
14405     test ! -d "$ac_dir" && mkdir "$ac_dir"
14406     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14407     # A "../" for each directory in $ac_dir_suffix.
14408     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14409   else
14410     ac_dir_suffix= ac_dots=
14411   fi
14412
14413   case "$ac_given_srcdir" in
14414   .)  srcdir=.
14415       if test -z "$ac_dots"; then top_srcdir=.
14416       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14417   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14418   *) # Relative path.
14419     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14420     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14421   esac
14422
14423   case "$ac_given_INSTALL" in
14424   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14425   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14426   esac
14427
14428   echo creating "$ac_file"
14429   rm -f "$ac_file"
14430   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14431   case "$ac_file" in
14432   *Makefile*) ac_comsub="1i\\
14433 # $configure_input" ;;
14434   *) ac_comsub= ;;
14435   esac
14436
14437   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14438   sed -e "$ac_comsub
14439 s%@configure_input@%$configure_input%g
14440 s%@srcdir@%$srcdir%g
14441 s%@top_srcdir@%$top_srcdir%g
14442 s%@INSTALL@%$INSTALL%g
14443 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14444 fi; done
14445 rm -f conftest.s*
14446
14447 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14448 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14449 #
14450 # ac_d sets the value in "#define NAME VALUE" lines.
14451 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14452 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14453 ac_dC='\3'
14454 ac_dD='%g'
14455 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14456 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14457 ac_uB='\([      ]\)%\1#\2define\3'
14458 ac_uC=' '
14459 ac_uD='\4%g'
14460 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14461 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14462 ac_eB='$%\1#\2define\3'
14463 ac_eC=' '
14464 ac_eD='%g'
14465
14466 if test "${CONFIG_HEADERS+set}" != set; then
14467 EOF
14468 cat >> $CONFIG_STATUS <<EOF
14469   CONFIG_HEADERS="src/config.h lwlib/config.h"
14470 EOF
14471 cat >> $CONFIG_STATUS <<\EOF
14472 fi
14473 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14474   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14475   case "$ac_file" in
14476   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14477        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14478   *) ac_file_in="${ac_file}.in" ;;
14479   esac
14480
14481   echo creating $ac_file
14482
14483   rm -f conftest.frag conftest.in conftest.out
14484   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14485   cat $ac_file_inputs > conftest.in
14486
14487 EOF
14488
14489 # Transform confdefs.h into a sed script conftest.vals that substitutes
14490 # the proper values into config.h.in to produce config.h.  And first:
14491 # Protect against being on the right side of a sed subst in config.status.
14492 # Protect against being in an unquoted here document in config.status.
14493 rm -f conftest.vals
14494 cat > conftest.hdr <<\EOF
14495 s/[\\&%]/\\&/g
14496 s%[\\$`]%\\&%g
14497 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14498 s%ac_d%ac_u%gp
14499 s%ac_u%ac_e%gp
14500 EOF
14501 sed -n -f conftest.hdr confdefs.h > conftest.vals
14502 rm -f conftest.hdr
14503
14504 # This sed command replaces #undef with comments.  This is necessary, for
14505 # example, in the case of _POSIX_SOURCE, which is predefined and required
14506 # on some systems where configure will not decide to define it.
14507 cat >> conftest.vals <<\EOF
14508 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14509 EOF
14510
14511 # Break up conftest.vals because some shells have a limit on
14512 # the size of here documents, and old seds have small limits too.
14513
14514 rm -f conftest.tail
14515 while :
14516 do
14517   ac_lines=`grep -c . conftest.vals`
14518   # grep -c gives empty output for an empty file on some AIX systems.
14519   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14520   # Write a limited-size here document to conftest.frag.
14521   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14522   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14523   echo 'CEOF
14524   sed -f conftest.frag conftest.in > conftest.out
14525   rm -f conftest.in
14526   mv conftest.out conftest.in
14527 ' >> $CONFIG_STATUS
14528   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14529   rm -f conftest.vals
14530   mv conftest.tail conftest.vals
14531 done
14532 rm -f conftest.vals
14533
14534 cat >> $CONFIG_STATUS <<\EOF
14535   rm -f conftest.frag conftest.h
14536   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14537   cat conftest.in >> conftest.h
14538   rm -f conftest.in
14539   if cmp -s $ac_file conftest.h 2>/dev/null; then
14540     echo "$ac_file is unchanged"
14541     rm -f conftest.h
14542   else
14543     # Remove last slash and all that follows it.  Not all systems have dirname.
14544       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14545       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14546       # The file is in a subdirectory.
14547       test ! -d "$ac_dir" && mkdir "$ac_dir"
14548     fi
14549     rm -f $ac_file
14550     mv conftest.h $ac_file
14551   fi
14552 fi; done
14553
14554 EOF
14555 cat >> $CONFIG_STATUS <<EOF
14556 CPP="$CPP"
14557  top_srcdir="$srcdir"
14558  MAKE_SUBDIR="$MAKE_SUBDIR"
14559
14560 EOF
14561 cat >> $CONFIG_STATUS <<\EOF
14562 for dir in . $MAKE_SUBDIR; do
14563   (
14564     cd $dir
14565     rm -f junk.c
14566     < Makefile.in \
14567       sed -e '/^# Generated/d' \
14568           -e 's%/\*\*/#.*%%' \
14569           -e 's/^ *# */#/' \
14570           -e '/^##/d' \
14571           -e '/^#/ {
14572 p
14573 d
14574 }'        \
14575           -e '/./ {
14576 s/\([\"]\)/\\\1/g
14577 s/^/"/
14578 s/$/"/
14579 }'  > junk.c;
14580
14581
14582
14583     echo creating $dir/Makefile
14584 $CPP -I. -I${top_srcdir}/src  junk.c \
14585   | sed -e 's/^\#.*//'          \
14586         -e 's/^[        ][      ]*$//'\
14587         -e 's/^ /       /'              \
14588   | sed -n -e '/^..*$/p'        \
14589   | sed '/^\"/ {
14590         s/\\\([\"]\)/\1/g
14591         s/^[    ]*\"//
14592         s/\"[   ]*$//
14593 }' > Makefile.new
14594     chmod 444 Makefile.new
14595     mv -f Makefile.new Makefile
14596
14597     echo creating $dir/GNUmakefile
14598 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
14599   | sed -e 's/^\#.*//'          \
14600         -e 's/^[        ][      ]*$//'\
14601         -e 's/^ /       /'              \
14602   | sed -n -e '/^..*$/p'        \
14603   | sed '/^\"/ {
14604         s/\\\([\"]\)/\1/g
14605         s/^[    ]*\"//
14606         s/\"[   ]*$//
14607 }' > Makefile.new
14608     chmod 444 Makefile.new
14609     mv -f Makefile.new GNUmakefile
14610
14611     rm -f junk.c
14612   )
14613 done
14614
14615 sed < config.status >> lib-src/config.values \
14616   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
14617   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
14618   -e 's/^\([^ ]*\) $/\1 ""/' \
14619   -e 's/ 1$/ t/'
14620
14621
14622 exit 0
14623 EOF
14624 chmod +x $CONFIG_STATUS
14625 rm -fr confdefs* $ac_clean_files
14626 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1