3cdf766df172e51aebf40d3b88765159ab8bcdba
[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, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 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) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19 ### Note: this script has not yet been ported to autoconf version 2.5x.
20
21 ### This file is part of XEmacs.
22
23 ### XEmacs is free software; you can redistribute it and/or modify it
24 ### under the terms of the GNU General Public License as published by
25 ### the Free Software Foundation; either version 2, or (at your
26 ### option) any later version.
27
28 ### XEmacs is distributed in the hope that it will be useful, but
29 ### WITHOUT ANY WARRANTY; without even the implied warranty of
30 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31 ### General Public License for more details.
32
33 ### You should have received a copy of the GNU General Public License
34 ### along with XEmacs; see the file COPYING.  If not, write to the Free
35 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
36 ### 02111-1307, USA.
37
38 ### For usage, run `./configure --help'
39 ### For more detailed information on building and installing XEmacs,
40 ### read the file `INSTALL'.
41 ###
42 ### If configure succeeds, it leaves its status in config.status.
43 ### A log of configuration tests can be found in config.log.
44 ### If configure fails after disturbing the status quo,
45 ###     config.status is removed.
46
47 ac_help="$ac_help
48   --with-x                use the X Window System"
49
50
51
52 if test -n "$ZSH_VERSION"; then
53     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
54   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
55   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
56   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
57       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
58 elif test -n "$BASH_VERSION"; then
59     set -o posix
60   unset CDPATH
61 else
62   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
63 fi
64
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81
82 subdirs=
83 MFLAGS= MAKEFLAGS=
84 SHELL=${CONFIG_SHELL-/bin/sh}
85 ac_max_here_lines=12
86
87 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
88
89 # File descriptor usage:
90 # 0 standard input
91 # 1 file creation
92 # 2 errors and warnings
93 # 3 some systems may open it to /dev/tty
94 # 4 used on the Kubota Titan
95 # 6 checking for... messages and results
96 # 5 compiler messages saved in config.log
97 if test "$silent" = yes; then
98   exec 6>/dev/null
99 else
100   exec 6>&1
101 fi
102 exec 5>./config.log
103
104 echo "\
105 This file contains any messages produced by compilers while
106 running configure, to aid debugging if configure makes a mistake.
107 " 1>&5
108
109 # Strip out --no-create and --no-recursion so they do not pile up.
110 # Also quote any args containing shell metacharacters.
111 ac_configure_args=
112 for ac_arg
113 do
114   case "$ac_arg" in
115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
116   | --no-cr | --no-c) ;;
117   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
118   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
119   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
120   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
121   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
122   esac
123 done
124
125 # NLS nuisances.
126 # Only set these to C if already set.  These must not be set unconditionally
127 # because not all systems understand e.g. LANG=C (notably SCO).
128 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
129 # Non-C LC_CTYPE values break the ctype check.
130 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
131 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
132 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
133 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
134
135 # confdefs.h avoids OS command line length limits that DEFS can exceed.
136 rm -rf conftest* confdefs.h
137 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
138 echo > confdefs.h
139
140 # A filename unique to this package, relative to the directory that
141 # configure is in, which we can look for to find out if srcdir is correct.
142 ac_unique_file=src/lisp.h
143
144 # Find the source files, if location was not specified.
145 if test -z "$srcdir"; then
146   ac_srcdir_defaulted=yes
147   # Try the directory containing this script, then its parent.
148   ac_prog=$0
149   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
150   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
151   srcdir=$ac_confdir
152   if test ! -r $srcdir/$ac_unique_file; then
153     srcdir=..
154   fi
155 else
156   ac_srcdir_defaulted=no
157 fi
158 if test ! -r $srcdir/$ac_unique_file; then
159   if test "$ac_srcdir_defaulted" = yes; then
160     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
161   else
162     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
163   fi
164 fi
165 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
166
167 # Prefer explicitly selected file to automatically selected ones.
168 if test -z "$CONFIG_SITE"; then
169   if test "x$prefix" != xNONE; then
170     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
171   else
172     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
173   fi
174 fi
175 for ac_site_file in $CONFIG_SITE; do
176   if test -r "$ac_site_file"; then
177     echo "loading site script $ac_site_file"
178     . "$ac_site_file"
179   fi
180 done
181
182
183 ac_ext=c
184 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
185 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
186 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
187 ac_cpp='$CPP '"$xe_cppflags"
188 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
189 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
190 cross_compiling=no
191
192 ac_exeext=
193 ac_objext=o
194 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
195   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
196   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
197     ac_n= ac_c='
198 ' ac_t='        '
199   else
200     ac_n=-n ac_c= ac_t=
201   fi
202 else
203   ac_n= ac_c='\c' ac_t=
204 fi
205
206
207 progname="`echo $0 | sed 's:^\./\./:\./:'`"
208
209
210 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
211 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
212
213 prefix='/usr/local'
214 exec_prefix='${prefix}'
215 bindir='${exec_prefix}/bin'
216 datadir='${prefix}/lib'
217 statedir='${prefix}/lib'
218 libdir='${exec_prefix}/lib'
219 mandir='${prefix}/man/man1'
220 inststaticdir='${PROGNAME}'
221 instvardir='${PROGNAME}-${version}'
222 infodir='${datadir}/${instvardir}/info'
223 infopath=''
224 install_pp=''
225 lispdir='${datadir}/${instvardir}/lisp'
226 moduledir='${libdir}/${instvardir}/${configuration}/modules'
227 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
228 sitemoduledir='${libdir}/${inststaticdir}/site-modules'
229 pkgdir='${datadir}/${instvardir}/lisp'
230 package_path=''
231 etcdir='${datadir}/${instvardir}/etc'
232 archlibdir='${libdir}/${instvardir}/${configuration}'
233 docdir='${archlibdir}'
234 with_netinstall="no"
235 with_prefix='yes'
236 with_site_lisp='no'
237 with_site_modules='yes'
238 with_menubars=''
239 with_scrollbars=''
240 with_widgets=''
241 with_dialogs=''
242 with_file_coding=''
243 cpp='' cppflags='' libs='' ldflags=''
244 extra_includes=''
245 dynamic=''
246 with_x11=''
247 with_msw=''
248 rel_alloc='default'
249 with_system_malloc='default'
250 with_dlmalloc='default'
251 with_esd_sound='no'
252 native_sound_lib=''
253 with_gtk='no'
254 with_gnome='no'
255 use_assertions="yes"
256 with_toolbars=""
257 with_tty=""
258 use_union_type="no"
259 with_dnet=""
260 pdump="no"
261 with_dragndrop="no"
262 with_ipv6_cname="no"
263
264
265
266
267 arguments="$@"
268
269 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
270 quoted_arguments=
271 for i in "$@"; do
272    case "$i" in
273    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
274    | --no-cr | --no-c) ;;
275    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
276    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
277    *)
278    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
279    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
280    esac
281 done
282
283 while test $# != 0; do
284   arg="$1"; shift
285   case "$arg" in
286     --no-create|--no-recursion) ;;
287         -* )
288             case "$arg" in
289         -*=*)
290           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
291           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
292           valomitted=no
293         ;;
294                                                                           -*)
295                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
296           val="yes" valomitted=yes
297         ;;
298       esac
299
300             optname="$opt"
301       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
302
303             case "${valomitted}-${opt}" in yes-without_* )
304         opt=`echo $opt | sed 's/without/with/'`
305         valomitted="no" val="no" ;;
306       esac
307
308             case "$opt" in
309
310         with_site_lisp  | \
311         with_prefix     | \
312         with_site_modules | \
313         with_x          | \
314         with_x11        | \
315         with_gtk        | \
316         with_gnome      | \
317         with_msw        | \
318         with_gcc        | \
319         dynamic         | \
320         with_ncurses    | \
321         with_dnet       | \
322         with_socks      | \
323         with_dragndrop  | \
324         with_cde        | \
325         with_offix      | \
326         with_gpm        | \
327         with_xpm        | \
328         with_xface      | \
329         with_gif        | \
330         with_jpeg       | \
331         with_png        | \
332         with_tiff       | \
333         with_wmcommand  | \
334         with_xmu        | \
335         with_purify     | \
336         with_quantify   | \
337         with_toolbars   | \
338         with_tty        | \
339         with_xfs        | \
340         with_i18n3      | \
341         with_mule       | \
342         with_utf_2000   | \
343         with_text_coding| \
344         with_file_coding| \
345         with_canna      | \
346         with_wnn        | \
347         with_wnn6       | \
348         with_workshop   | \
349         with_sparcworks | \
350         with_tooltalk   | \
351         with_ldap       | \
352         with_postgresql | \
353         with_pop        | \
354         with_kerberos   | \
355         with_hesiod     | \
356         with_dnet       | \
357         with_infodock   | \
358         with_netinstall | \
359         with_ipv6_cname | \
360         external_widget | \
361         verbose         | \
362         extra_verbose   | \
363         usage_tracking  | \
364         use_union_type  | \
365         pdump           | \
366         debug           | \
367         use_assertions  | \
368         memory_usage_stats | \
369         with_clash_detection | \
370         with_modules | \
371         quick_build )
372                   case "$val" in
373             y | ye | yes )      val=yes ;;
374             n | no )            val=no  ;;
375             * ) (echo "$progname: Usage error:"
376 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
377 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
378           esac
379           eval "$opt=\"$val\"" ;;
380
381
382                         srcdir          | \
383         compiler        | \
384         cflags          | \
385         cpp             | \
386         cppflags        | \
387         libs            | \
388         ldflags         | \
389         cache_file      | \
390         native_sound_lib| \
391         site_lisp       | \
392         x_includes      | \
393         x_libraries     | \
394         site_includes   | \
395         site_libraries  | \
396         site_prefixes   | \
397         site_runtime_libraries )
398                   if test "$valomitted" = "yes" ; then
399                     if test "$#" = 0 ; then
400               (echo "$progname: Usage error:"
401 echo " " "The \`--$optname' option requires a value."
402 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
403             fi
404             val="$1"; shift
405           fi
406           eval "$opt=\"$val\""
407         ;;
408
409                 rel_alloc | \
410         with_dlmalloc | \
411         with_debug_malloc  | use_debug_malloc | \
412         with_system_malloc | use_system_malloc )
413           case "$val" in
414             y | ye | yes )      val=yes ;;
415             n | no )            val=no  ;;
416             d | de | def | defa | defau | defaul | default ) val=default ;;
417             * ) (echo "$progname: Usage error:"
418 echo " " "The \`--$optname' option requires one of these values:
419   \`yes', \`no', or \`default'."
420 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
421           esac
422           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
423           eval "$opt=\"$val\""
424         ;;
425
426                 "with_database" )
427           with_database_berkdb=no
428           with_database_dbm=no
429           with_database_gdbm=no
430           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
431             case "$x" in
432               no ) ;;
433               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
434               d | db | dbm )                               with_database_dbm=yes    ;;
435               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
436               * ) (echo "$progname: Usage error:"
437 echo " " "The \`--$optname' option value
438   must be either \`no' or a comma-separated list
439   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
440 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
441             esac
442           done
443           if test "$with_database_dbm"  = "yes" -a \
444                   "$with_database_gdbm" = "yes"; then
445           (echo "$progname: Usage error:"
446 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
447   with the \`--$optname' option."
448 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
449           fi
450         ;;
451
452                 "with_sound" )
453                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
454             case "$x" in
455                       n | no | non | none ) new_sdefault=no ;;
456               a | al | all | both ) new_sdefault=yes ;;
457
458               native )       with_native_sound=yes ;;
459               nonative )     with_native_sound=no ;;
460
461               nas )          with_nas_sound=yes ;;
462               nonas )        with_nas_sound=no ;;
463
464               esd )          with_esd_sound=yes ;;
465               noesd )        with_esd_sound=no ;;
466
467               * ) bogus_sound=yes ;;
468             esac
469             if test "$bogus_sound" -o \
470                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
471                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
472                 (echo "$progname: Usage error:"
473 echo " " "Valid types for the \`--$optname' option are:
474   $types.
475 Option \`all' or \`none' must be first in the list.
476 The default is to autodetect native and NAS 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               glyphs )     error_check_glyphs=yes ;;
557               noglyphs )   error_check_glyphs=no ;;
558
559               * ) bogus_error_check=yes ;;
560             esac
561             if test "$bogus_error_check" -o \
562                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
563                 if test "$error_check_default" = yes ; then
564                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
565                 else
566                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
567                 fi
568                 (echo "$progname: Usage error:"
569 echo " " "Valid types for the \`--$optname' option are:
570   $types."
571 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
572             elif test -n "$new_default" ; then
573                 error_check_extents=$new_default
574                 error_check_typecheck=$new_default
575                 error_check_bufpos=$new_default
576                 error_check_gc=$new_default
577                 error_check_malloc=$new_default
578                 error_check_byte_code=$new_default
579                 error_check_glyphs=$new_default
580                 new_default=    # reset this
581             fi
582             echeck_notfirst=true
583           done
584         ;;
585
586                                 
587                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
588         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
589         archlibdir | docdir | package_path | moduledir )
590                    if test "$valomitted" = "yes"; then
591              if test "$#" = 0; then
592                  (echo "$progname: Usage error:"
593 echo " " "The \`--$optname' option requires a value."
594 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
595              fi
596              val="$1"; shift
597            fi
598            eval "$opt=\"$val\""
599
600                            case "$opt" in
601                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
602     Defining EXEC_PREFIX_USER_DEFINED
603 EOF
604 cat >> confdefs.h <<\EOF
605 #define EXEC_PREFIX_USER_DEFINED 1
606 EOF
607 }
608  ;;
609              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
610     Defining LISPDIR_USER_DEFINED
611 EOF
612 cat >> confdefs.h <<\EOF
613 #define LISPDIR_USER_DEFINED 1
614 EOF
615 }
616  ;;
617              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
618     Defining SITELISPDIR_USER_DEFINED
619 EOF
620 cat >> confdefs.h <<\EOF
621 #define SITELISPDIR_USER_DEFINED 1
622 EOF
623 }
624  ;;
625              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
626     Defining MODULEDIR_USER_DEFINED
627 EOF
628 cat >> confdefs.h <<\EOF
629 #define MODULEDIR_USER_DEFINED 1
630 EOF
631 }
632  ;;
633              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
634     Defining ETCDIR_USER_DEFINED
635 EOF
636 cat >> confdefs.h <<\EOF
637 #define ETCDIR_USER_DEFINED 1
638 EOF
639 }
640  ;;
641              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
642     Defining INFODIR_USER_DEFINED
643 EOF
644 cat >> confdefs.h <<\EOF
645 #define INFODIR_USER_DEFINED 1
646 EOF
647 }
648  ;;
649              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
650     Defining INFOPATH_USER_DEFINED
651 EOF
652 cat >> confdefs.h <<\EOF
653 #define INFOPATH_USER_DEFINED 1
654 EOF
655 }
656  ;;
657              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
658     Defining PACKAGE_PATH_USER_DEFINED
659 EOF
660 cat >> confdefs.h <<\EOF
661 #define PACKAGE_PATH_USER_DEFINED 1
662 EOF
663 }
664  ;;
665              datadir )
666                 { test "$extra_verbose" = "yes" && cat << \EOF
667     Defining INFODIR_USER_DEFINED
668 EOF
669 cat >> confdefs.h <<\EOF
670 #define INFODIR_USER_DEFINED 1
671 EOF
672 }
673
674                 { test "$extra_verbose" = "yes" && cat << \EOF
675     Defining LISPDIR_USER_DEFINED
676 EOF
677 cat >> confdefs.h <<\EOF
678 #define LISPDIR_USER_DEFINED 1
679 EOF
680 }
681
682                 { test "$extra_verbose" = "yes" && cat << \EOF
683     Defining MODULEDIR_USER_DEFINED
684 EOF
685 cat >> confdefs.h <<\EOF
686 #define MODULEDIR_USER_DEFINED 1
687 EOF
688 }
689
690                 { test "$extra_verbose" = "yes" && cat << \EOF
691     Defining ETCDIR_USER_DEFINED
692 EOF
693 cat >> confdefs.h <<\EOF
694 #define ETCDIR_USER_DEFINED 1
695 EOF
696 }
697
698                 { test "$extra_verbose" = "yes" && cat << \EOF
699     Defining DOCDIR_USER_DEFINED
700 EOF
701 cat >> confdefs.h <<\EOF
702 #define DOCDIR_USER_DEFINED 1
703 EOF
704 }
705
706                 { test "$extra_verbose" = "yes" && cat << \EOF
707     Defining ARCHLIBDIR_USER_DEFINED
708 EOF
709 cat >> confdefs.h <<\EOF
710 #define ARCHLIBDIR_USER_DEFINED 1
711 EOF
712 }
713  ;;
714              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
715     Defining DOCDIR_USER_DEFINED
716 EOF
717 cat >> confdefs.h <<\EOF
718 #define DOCDIR_USER_DEFINED 1
719 EOF
720 }
721  ;;
722              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
723     Defining ARCHLIBDIR_USER_DEFINED
724 EOF
725 cat >> confdefs.h <<\EOF
726 #define ARCHLIBDIR_USER_DEFINED 1
727 EOF
728 }
729  ;;
730            esac
731         ;;
732
733                 "no_create" ) ;;
734
735                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
736
737                 "with_menubars"   | \
738         "with_scrollbars" | \
739         "with_dialogs"    | \
740         "with_widgets" )
741           case "$val" in
742             l | lu | luc | luci | lucid )               val=lucid  ;;
743             mo | mot | moti | motif )                   val=motif  ;;
744             a | at | ath | athe | athen | athena )      val=athena ;;
745             n | no | non | none )                       val=no     ;;
746             y | ye | yes )                              val=yes    ;;
747                         "")                                             val=yes    ;;
748             g | gt | gtk )                              val=gtk    ;;
749             ms | msw )                                  val=msw    ;;
750             * ) (echo "$progname: Usage error:"
751 echo " " "The \`--$optname' option must have one of these values:
752   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
753 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
754           esac
755           eval "$opt=\"$val\""
756         ;;
757
758                 "use_minimal_tagbits" | \
759         "use_indexed_lrecord_implementation" | \
760         "run_in_place"  | \
761         "const_is_losing" | \
762         "with_gnu_make" )
763           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
764         ;;
765
766                 * ) (echo "$progname: Usage error:"
767 echo " " "Unrecognized option: $arg"
768 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
769
770       esac
771     ;;
772
773         *-*-*) configuration="$arg" ;;
774
775         *) (echo "$progname: Usage error:"
776 echo " " "Unrecognized argument: $arg"
777 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
778
779   esac
780 done
781
782
783 test -n "$cpp"      && CPP="$cpp"
784 test -n "$cppflags" && CPPFLAGS="$cppflags"
785 test -n "$libs"     && LIBS="$libs"
786 test -n "$ldflags"  && LDFLAGS="$ldflags"
787
788 eval set x "$quoted_arguments"; shift
789
790 test "$extra_verbose" = "yes" && verbose=yes
791
792 test -n "$with_x" && with_x11="$with_x"
793
794 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
795   test "$with_system_malloc" = "default" && with_system_malloc=yes
796 fi
797
798
799
800 if test "$with_cde $with_tooltalk" = "yes no"; then
801   (echo "$progname: Usage error:"
802 echo " " "--with-cde requires --with-tooltalk"
803 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
804 elif test "$with_tooltalk" = "no" ; then with_cde=no
805 elif test "$with_cde" = "yes"; then with_tooltalk=yes
806 fi
807
808
809 case "$srcdir" in
810
811     "" )
812     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
813       if test -f "$dir/src/lisp.h" -a \
814               -f "$dir/lisp/version.el" ; then
815         srcdir="$dir"
816         break
817       fi
818     done
819     if test -z "$srcdir" ; then
820       (echo "$progname: Usage error:"
821 echo " " "Neither the current directory nor its parent seem to
822   contain the XEmacs sources.  If you do not want to build XEmacs in its
823   source tree, you should run \`$progname' in the directory in which
824   you wish to build XEmacs, using the \`--srcdir' option to say where the
825   sources may be found."
826 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
827     fi
828   ;;
829
830     * )
831     if test ! -f "$srcdir/src/lisp.h" -o \
832             ! -f "$srcdir/lisp/version.el" ; then
833       (echo "$progname: Usage error:"
834 echo " " "The directory specified with the \`--srcdir' option,
835   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
836   either run the \`$progname' script at the top of the XEmacs source
837   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
838 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
839     fi
840   ;;
841 esac
842
843 if test -z "$configuration"; then
844     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
845   if test -z "$configuration"; then
846     (echo "$progname: Usage error:"
847 echo " " "XEmacs has not been ported to this host type.
848 Try explicitly specifying the CONFIGURATION when rerunning configure."
849 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
850   fi
851 fi
852
853 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
854 echo "configure:855: checking whether ln -s works" >&5
855
856 rm -f conftestdata
857 if ln -s X conftestdata 2>/dev/null
858 then
859   rm -f conftestdata
860   ac_cv_prog_LN_S="ln -s"
861 else
862   ac_cv_prog_LN_S=ln
863 fi
864 LN_S="$ac_cv_prog_LN_S"
865 if test "$ac_cv_prog_LN_S" = "ln -s"; then
866   echo "$ac_t""yes" 1>&6
867 else
868   echo "$ac_t""no" 1>&6
869 fi
870
871
872 for dir in lisp etc man info tests; do
873   if test ! -d "$dir" ; then
874     echo Making symbolic link to "$srcdir/$dir"
875     ${LN_S} "$srcdir/$dir" "$dir"
876   fi
877 done
878
879
880 absolute_pwd="`pwd`";
881 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
882 then blddir="$PWD"
883 else blddir="$absolute_pwd"; if test -d "/net"; then
884   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
885   blddir=`echo "$blddir" | \
886    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
887 fi
888 fi
889
890
891 case "$srcdir" in
892   /* ) ;;
893   .  ) srcdir="$blddir" ;;
894   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
895   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
896   srcdir=`echo "$srcdir" | \
897    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
898 fi ;;
899 esac
900
901 if test `pwd` != `sh -c cd $srcdir && pwd`  \
902    && test -f "$srcdir/src/config.h"; then
903   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
904    echo "   as a build directory right now; it has been configured in its own"
905    echo "   right.  To configure in another directory as well, you MUST"
906    echo "   use GNU make.  If you do not have GNU make, then you must"
907    echo "   now do \`make distclean' in $srcdir,"
908    echo "   and then run $progname again.") >&2
909   extrasub='/^VPATH[     ]*=/c\
910 vpath %.c $(srcdir)\
911 vpath %.h $(srcdir)\
912 vpath %.y $(srcdir)\
913 vpath %.l $(srcdir)\
914 vpath %.s $(srcdir)\
915 vpath %.in $(srcdir)'
916 fi
917
918 . "$srcdir/version.sh" || exit 1;
919 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
920 : "${extra_verbose=$beta}"
921 version="${emacs_major_version}.${emacs_minor_version}"
922 { test "$extra_verbose" = "yes" && cat << EOF
923     Defining EMACS_MAJOR_VERSION = $emacs_major_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define EMACS_MAJOR_VERSION $emacs_major_version
927 EOF
928 }
929
930 { test "$extra_verbose" = "yes" && cat << EOF
931     Defining EMACS_MINOR_VERSION = $emacs_minor_version
932 EOF
933 cat >> confdefs.h <<EOF
934 #define EMACS_MINOR_VERSION $emacs_minor_version
935 EOF
936 }
937
938 if test -n "$emacs_beta_version" ; then
939   if test "$beta" = "yes"; then
940         version="${version}-b${emacs_beta_version}"
941         { test "$extra_verbose" = "yes" && cat << EOF
942     Defining EMACS_BETA_VERSION = $emacs_beta_version
943 EOF
944 cat >> confdefs.h <<EOF
945 #define EMACS_BETA_VERSION $emacs_beta_version
946 EOF
947 }
948
949   else
950         version="${version}.${emacs_beta_version}"
951         { test "$extra_verbose" = "yes" && cat << EOF
952     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
953 EOF
954 cat >> confdefs.h <<EOF
955 #define EMACS_PATCH_LEVEL $emacs_beta_version
956 EOF
957 }
958
959   fi
960 fi
961 { test "$extra_verbose" = "yes" && cat << EOF
962     Defining XEMACS_CODENAME = "$xemacs_codename"
963 EOF
964 cat >> confdefs.h <<EOF
965 #define XEMACS_CODENAME "$xemacs_codename"
966 EOF
967 }
968
969 { test "$extra_verbose" = "yes" && cat << EOF
970     Defining EMACS_VERSION = "$version"
971 EOF
972 cat >> confdefs.h <<EOF
973 #define EMACS_VERSION "$version"
974 EOF
975 }
976
977
978 if test "$with_infodock" = "yes"; then
979   if test ! -f ../../ID-INSTALL; then
980     echo "Cannot build InfoDock without InfoDock sources"
981     with_infodock=no
982   fi
983 fi
984
985 if test "$with_infodock" = "yes"; then
986       { test "$extra_verbose" = "yes" && cat << EOF
987     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
988 EOF
989 cat >> confdefs.h <<EOF
990 #define INFODOCK_MAJOR_VERSION $infodock_major_version
991 EOF
992 }
993
994   { test "$extra_verbose" = "yes" && cat << EOF
995     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
996 EOF
997 cat >> confdefs.h <<EOF
998 #define INFODOCK_MINOR_VERSION $infodock_minor_version
999 EOF
1000 }
1001
1002   { test "$extra_verbose" = "yes" && cat << EOF
1003     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1004 EOF
1005 cat >> confdefs.h <<EOF
1006 #define INFODOCK_BUILD_VERSION $infodock_build_version
1007 EOF
1008 }
1009
1010   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1011   PROGNAME=infodock
1012   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1013 else
1014   PROGNAME=xemacs
1015 fi
1016
1017 { test "$extra_verbose" = "yes" && cat << EOF
1018     Defining EMACS_PROGNAME = "$PROGNAME"
1019 EOF
1020 cat >> confdefs.h <<EOF
1021 #define EMACS_PROGNAME "$PROGNAME"
1022 EOF
1023 }
1024
1025
1026 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1027 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1028     Defining ERROR_CHECK_EXTENTS
1029 EOF
1030 cat >> confdefs.h <<\EOF
1031 #define ERROR_CHECK_EXTENTS 1
1032 EOF
1033 }
1034
1035 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1036     Defining ERROR_CHECK_TYPECHECK
1037 EOF
1038 cat >> confdefs.h <<\EOF
1039 #define ERROR_CHECK_TYPECHECK 1
1040 EOF
1041 }
1042
1043 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1044     Defining ERROR_CHECK_BUFPOS
1045 EOF
1046 cat >> confdefs.h <<\EOF
1047 #define ERROR_CHECK_BUFPOS 1
1048 EOF
1049 }
1050
1051 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1052     Defining ERROR_CHECK_GC
1053 EOF
1054 cat >> confdefs.h <<\EOF
1055 #define ERROR_CHECK_GC 1
1056 EOF
1057 }
1058
1059 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1060     Defining ERROR_CHECK_MALLOC
1061 EOF
1062 cat >> confdefs.h <<\EOF
1063 #define ERROR_CHECK_MALLOC 1
1064 EOF
1065 }
1066
1067 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1068     Defining ERROR_CHECK_BYTE_CODE
1069 EOF
1070 cat >> confdefs.h <<\EOF
1071 #define ERROR_CHECK_BYTE_CODE 1
1072 EOF
1073 }
1074
1075 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1076     Defining ERROR_CHECK_GLYPHS
1077 EOF
1078 cat >> confdefs.h <<\EOF
1079 #define ERROR_CHECK_GLYPHS 1
1080 EOF
1081 }
1082
1083 if test "${debug:=$beta}" = "yes"; then
1084   use_assertions=yes memory_usage_stats=yes
1085   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1086    echo "    xemacs will be linked with \"debug.o\""
1087  fi
1088   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1089    echo "    xemacs will be linked with \"tests.o\""
1090  fi
1091   { test "$extra_verbose" = "yes" && cat << \EOF
1092     Defining DEBUG_XEMACS
1093 EOF
1094 cat >> confdefs.h <<\EOF
1095 #define DEBUG_XEMACS 1
1096 EOF
1097 }
1098
1099 fi
1100 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1101     Defining USE_ASSERTIONS
1102 EOF
1103 cat >> confdefs.h <<\EOF
1104 #define USE_ASSERTIONS 1
1105 EOF
1106 }
1107
1108 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1109     Defining MEMORY_USAGE_STATS
1110 EOF
1111 cat >> confdefs.h <<\EOF
1112 #define MEMORY_USAGE_STATS 1
1113 EOF
1114 }
1115
1116
1117
1118 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1119 echo "configure:1120: checking "host system type"" >&5
1120 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1121 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1122 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1123 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1124 echo "$ac_t""$configuration" 1>&6
1125
1126
1127
1128
1129
1130 machine='' opsys=''
1131
1132 case "$canonical" in
1133   sparc-*-*        ) machine=sparc ;;
1134   alpha*-*-*       ) machine=alpha ;;
1135   vax-*-*          ) machine=vax ;;
1136   mips-dec-*       ) machine=pmax ;;
1137   mips-sgi-irix6*  ) machine=iris6d ;;
1138   mips-sgi-*       ) machine=iris4d ;;
1139   mips*-linux      ) machine=mips ;;
1140   romp-ibm-*       ) machine=ibmrt ;;
1141   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1142   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1143   powerpc*-*       ) machine=powerpc ;;
1144   hppa-*-*         ) machine=hp800 ;;
1145   m88k-dg-*        ) machine=aviion ;;
1146   m68*-sony-*      ) machine=news ;;
1147   mips-sony-*      ) machine=news-risc ;;
1148   clipper-*        ) machine=clipper ;;
1149   arm*             ) machine=arm ;;
1150   ns32k-*          ) machine=ns32000 ;;
1151 esac
1152
1153 case "$canonical" in
1154   *-*-linux*    ) opsys=linux ;;
1155   *-*-netbsd*   ) opsys=netbsd ;;
1156   *-*-openbsd*  ) opsys=openbsd ;;
1157   *-*-nextstep* ) opsys=nextstep ;;
1158   *-*-vms       ) opsys=vms ;;
1159
1160     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1161   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1162   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1163   *-dec-osf3*                ) opsys=decosf3-1 ;;
1164   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1165
1166     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1167   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1168   *-*-ultrix* )         opsys=ultrix4-3 ;;
1169
1170     *-*-aix3.1*  ) opsys=aix3-1 ;;
1171   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1172   *-*-aix3*    ) opsys=aix3-2   ;;
1173   *-*-aix4.0*  ) opsys=aix4     ;;
1174   *-*-aix4.1*  ) opsys=aix4-1   ;;
1175   *-*-aix4*    ) opsys=aix4-2   ;;
1176
1177     *-gnu* )                    opsys=gnu    ;;
1178   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1179   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1180   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1181   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1182   *-*-aos*   )                  opsys=bsd4-3 ;;
1183   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1184   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1185   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1186   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1187   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1188   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1189         if test -z "$NON_GNU_CPP" ; then
1190           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1191             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1192           done
1193         fi
1194         opsys=usg5-4-2 ;;
1195     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1196     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1197 esac
1198
1199 case "$canonical" in
1200
1201     *-*-netbsd* )
1202     case "$canonical" in
1203       i[3-9]86-*-netbsd*) machine=intel386 ;;
1204       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1205                                             machine=hp9000s300 ;;
1206       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1207       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1208     esac
1209   ;;
1210
1211     *-*-openbsd* )
1212     case "${canonical}" in
1213       i386-*-openbsd*)          machine=intel386 ;;
1214       m68k-*-openbsd*)          machine=hp9000s300 ;;
1215       mipsel-*-openbsd*)        machine=pmax ;;
1216      esac
1217    ;;
1218
1219     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1220   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1221
1222     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1223   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1224
1225     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1226
1227     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1228
1229     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1230
1231     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1232
1233     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1234
1235     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1236   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1237   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1238
1239   
1240     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1241
1242     *-convex-bsd* | *-convex-convexos* )
1243     machine=convex opsys=bsd4-3
1244     NON_GNU_CPP="cc -E -P"
1245   ;;
1246
1247     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1248
1249     *-*-darwin*)
1250     opsys=darwin
1251     RANLIB="ranlib -c"     pdump=yes              ;;
1252
1253     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1254   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1255   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1256   m88k-dg-dgux*                           ) opsys=dgux     ;;
1257
1258     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1259   m88k-motorola-sysv4* )
1260                     machine=delta88k opsys=usg5-4-2
1261   ;;
1262   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1263
1264     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1265   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1266
1267     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1268
1269     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1270   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1271   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1272
1273       m88k-harris-cxux* )
1274         case "`uname -r`" in
1275        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1276        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1277     esac
1278     NON_GNU_CPP="/lib/cpp"
1279   ;;
1280     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1281     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1282
1283     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1284
1285     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1286
1287     *-hp-hpux* )
1288         case "$canonical" in
1289       m68*  ) machine=hp9000s300 ;;
1290       hppa* ) machine=hp800      ;;
1291     esac
1292
1293     case "$canonical" in
1294       *-hp-hpux7*  )  opsys=hpux   ;;
1295       *-hp-hpux8*  )  opsys=hpux8  ;;
1296       *-hp-hpux9*  )  opsys=hpux9  ;;
1297       *-hp-hpux10* )  opsys=hpux10 ;;
1298       *-hp-hpux11* )  opsys=hpux11 ;;
1299       *            )  opsys=hpux   ;;
1300     esac
1301
1302         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1303    echo "    xemacs will be linked with \"strcat.o\""
1304  fi ;; esac
1305
1306     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1307         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1308     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1309
1310     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1311   ;;
1312
1313     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1314   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1315
1316     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1317   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1318   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1319   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1320   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1321   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1322
1323     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1324   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1325
1326     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1327
1328     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1329
1330     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1331
1332     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1333
1334       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1335
1336     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1337
1338     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1339
1340     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1341
1342     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1343
1344         mips-mips-usg* ) machine=mips4 ;;
1345   mips-mips-riscos4 )
1346     machine=mips4
1347     NON_GNU_CC="cc -systype bsd43"
1348     NON_GNU_CPP="cc -systype bsd43 -E"
1349     case "$canonical" in
1350       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1351       mips-mips-riscos5* ) opsys=riscos5 ;;
1352     esac
1353   ;;
1354   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1355   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1356
1357     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1358
1359     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1360
1361     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1362   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1363
1364     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1365
1366     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1367
1368     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1369
1370     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1371
1372     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1373   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1374
1375     mips-siemens-sysv* | mips-sni-sysv*)
1376     machine=mips-siemens opsys=usg5-4
1377     NON_GNU_CC=/usr/ccs/bin/cc
1378     NON_GNU_CPP=/usr/ccs/lib/cpp
1379   ;;
1380
1381     mips-nec-sysv*)
1382     machine=mips-nec
1383     NON_GNU_CC=/usr/ccs/bin/cc
1384     NON_GNU_CPP=/usr/ccs/lib/cpp
1385   ;;
1386
1387       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1388   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1389     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1390   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1391   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1392   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1393   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1394   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1395   mips-sgi-irix*      ) opsys=irix5-0 ;;
1396
1397     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1398   *-sony-news* ) opsys=newsos5 ;;
1399
1400     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1401
1402     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1403         case "$canonical" in
1404       m68*-sunos1* )             machine=sun1     ;;
1405       m68*-sunos2* )             machine=sun2     ;;
1406       m68* )                     machine=sun3     ;;
1407       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1408       i*86-*-* )                 machine=intel386 ;;
1409       rs6000* )                  machine=rs6000   ;;
1410     esac
1411
1412         case "$canonical" in *-sunos5*)
1413       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1414     esac
1415
1416                     case "$canonical" in
1417       *-sunos4* )
1418         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1419         : ;;
1420       *-solaris2* )
1421         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1422         RANLIB=':' ;;
1423     esac
1424
1425     case "$canonical" in
1426       *-solaris*          )
1427         opsys=sol2
1428         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1429         { test "$extra_verbose" = "yes" && cat << EOF
1430     Defining OS_RELEASE = $os_release
1431 EOF
1432 cat >> confdefs.h <<EOF
1433 #define OS_RELEASE $os_release
1434 EOF
1435 }
1436  ;;
1437
1438             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1439       *-sunos4.0*         ) opsys=sunos4-0      ;;
1440       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1441       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1442       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1443       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1444       *-mach*             ) opsys=mach-bsd4-3   ;;
1445       *                   ) opsys=bsd4-2        ;;
1446     esac
1447
1448     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1449
1450         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1451   ;;
1452
1453     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1454
1455     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1456   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1457
1458     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1459
1460     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1461
1462     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1463       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1464
1465     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1466
1467     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1468
1469     vax-dec-* )
1470     case "$canonical" in
1471       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1472       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1473       *-mach* )                         opsys=mach-bsd4-3 ;;
1474     esac
1475   ;;
1476
1477     ns16k-whitechapel-* ) machine=mg1 ;;
1478
1479     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1480
1481     i[3-9]86-*-* )
1482     machine=intel386
1483     case "$canonical" in
1484       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1485       *-isc2.2* )               opsys=isc2-2 ;;
1486       *-isc4.0* )               opsys=isc4-0 ;;
1487       *-isc4.* )                opsys=isc4-1
1488                                 GCC_TEST_OPTIONS=-posix
1489                                 NON_GCC_TEST_OPTIONS=-Xp
1490                                 ;;
1491       *-isc* )                  opsys=isc3-0 ;;
1492       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1493       *-esix* )                 opsys=esix ;;
1494       *-mach* )                 opsys=mach-bsd4-3 ;;
1495       *-xenix* )                opsys=xenix ;;
1496       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1497       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1498       *-bsdi4* )                opsys=bsdos4 ;;
1499       *-bsdi3* )                opsys=bsdos3 ;;
1500       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1501       *-bsdi2* )                opsys=bsdos2 ;;
1502       *-sco3.2v5* )             opsys=sco5 ;;
1503       *-sysv5* )                opsys=sco7 ;;
1504       *-386bsd* )               opsys=386bsd ;;
1505       *-freebsd* )              opsys=freebsd ;;
1506       *-nextstep* )             opsys=nextstep ;;
1507       *-pc-cygwin* )            opsys=cygwin32 ;;
1508       *-pc-mingw* )             opsys=mingw32 ;
1509                                 test -z "$with_tty" && with_tty="no";;
1510           esac
1511   ;;
1512
1513     m68k-*-linux* ) machine=m68k opsys=linux ;;
1514
1515 esac
1516
1517 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1518
1519 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1520
1521 if test -r "${srcdir}/src/m/${machine}.h"; then
1522   machfile="m/${machine}.h"
1523   { test "$extra_verbose" = "yes" && cat << EOF
1524     Defining config_machfile = "$machfile"
1525 EOF
1526 cat >> confdefs.h <<EOF
1527 #define config_machfile "$machfile"
1528 EOF
1529 }
1530
1531 else
1532   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1533   echo "Using configure-time autodetection only."
1534 fi
1535
1536 if test -r "${srcdir}/src/s/${opsys}.h"; then
1537   opsysfile="s/${opsys}.h"
1538   { test "$extra_verbose" = "yes" && cat << EOF
1539     Defining config_opsysfile = "$opsysfile"
1540 EOF
1541 cat >> confdefs.h <<EOF
1542 #define config_opsysfile "$opsysfile"
1543 EOF
1544 }
1545
1546 else
1547   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1548   echo "Using configure-time autodetection only."
1549 fi
1550
1551
1552 if test -z "$dynamic"; then
1553   case "$opsys" in
1554     hpux* | sunos4* ) dynamic=no ;;
1555     *) dynamic=yes ;;
1556   esac
1557 fi
1558 if test "$dynamic" = "yes"; then
1559   case "$opsys" in
1560     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1561     decosf* ) ld_call_shared="-call_shared" ;;
1562   esac
1563 else   case "$opsys" in
1564     sol2 )
1565       echo "Static linking is not supported on Solaris 2."
1566       echo "Rerun configure without specifying --dynamic=no."
1567       exit 1 ;;
1568     linux   ) ld_call_shared="-Bstatic" ;;
1569     decosf* ) ld_call_shared="-non_shared" ;;
1570   esac
1571 fi
1572
1573 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1574
1575 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1576 { test "$extra_verbose" = "yes" && cat << EOF
1577     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1578 EOF
1579 cat >> confdefs.h <<EOF
1580 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1581 EOF
1582 }
1583
1584
1585
1586 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1587 if test "$with_workshop $with_tooltalk" = "yes no"; then
1588   (echo "$progname: Usage error:"
1589 echo " " "--with-workshop requires --with-tooltalk"
1590 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1591 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1592 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1593 fi
1594
1595 if test "$with_workshop" = "yes"; then
1596   { test "$extra_verbose" = "yes" && cat << \EOF
1597     Defining SUNPRO
1598 EOF
1599 cat >> confdefs.h <<\EOF
1600 #define SUNPRO 1
1601 EOF
1602 }
1603
1604   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1605    echo "    xemacs will be linked with \"sunpro.o\""
1606  fi
1607 fi
1608
1609 if test "$with_clash_detection" != "no"; then
1610   { test "$extra_verbose" = "yes" && cat << \EOF
1611     Defining CLASH_DETECTION
1612 EOF
1613 cat >> confdefs.h <<\EOF
1614 #define CLASH_DETECTION 1
1615 EOF
1616 }
1617
1618   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1619    echo "    xemacs will be linked with \"filelock.o\""
1620  fi
1621 fi
1622
1623 test -n "$compiler" && CC="$compiler"
1624 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1625 fi
1626
1627 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1628 if test "${CFLAGS-unset}" != unset
1629   then cflags_specified=yes;
1630   else cflags_specified=no;
1631 fi
1632
1633 xe_save_CFLAGS="$CFLAGS"
1634
1635 # Extract the first word of "gcc", so it can be a program name with args.
1636 set dummy gcc; ac_word=$2
1637 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1638 echo "configure:1639: checking for $ac_word" >&5
1639
1640 if test -n "$CC"; then
1641   ac_cv_prog_CC="$CC" # Let the user override the test.
1642 else
1643   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1644   ac_dummy="$PATH"
1645   for ac_dir in $ac_dummy; do
1646     test -z "$ac_dir" && ac_dir=.
1647     if test -f $ac_dir/$ac_word; then
1648       ac_cv_prog_CC="gcc"
1649       break
1650     fi
1651   done
1652   IFS="$ac_save_ifs"
1653 fi
1654 CC="$ac_cv_prog_CC"
1655 if test -n "$CC"; then
1656   echo "$ac_t""$CC" 1>&6
1657 else
1658   echo "$ac_t""no" 1>&6
1659 fi
1660
1661 if test -z "$CC"; then
1662   # Extract the first word of "cc", so it can be a program name with args.
1663 set dummy cc; ac_word=$2
1664 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1665 echo "configure:1666: checking for $ac_word" >&5
1666
1667 if test -n "$CC"; then
1668   ac_cv_prog_CC="$CC" # Let the user override the test.
1669 else
1670   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1671   ac_prog_rejected=no
1672   ac_dummy="$PATH"
1673   for ac_dir in $ac_dummy; do
1674     test -z "$ac_dir" && ac_dir=.
1675     if test -f $ac_dir/$ac_word; then
1676       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1677         ac_prog_rejected=yes
1678         continue
1679       fi
1680       ac_cv_prog_CC="cc"
1681       break
1682     fi
1683   done
1684   IFS="$ac_save_ifs"
1685 if test $ac_prog_rejected = yes; then
1686   # We found a bogon in the path, so make sure we never use it.
1687   set dummy $ac_cv_prog_CC
1688   shift
1689   if test $# -gt 0; then
1690     # We chose a different compiler from the bogus one.
1691     # However, it has the same basename, so the bogon will be chosen
1692     # first if we set CC to just the basename; use the full file name.
1693     shift
1694     set dummy "$ac_dir/$ac_word" "$@"
1695     shift
1696     ac_cv_prog_CC="$@"
1697   fi
1698 fi
1699 fi
1700 CC="$ac_cv_prog_CC"
1701 if test -n "$CC"; then
1702   echo "$ac_t""$CC" 1>&6
1703 else
1704   echo "$ac_t""no" 1>&6
1705 fi
1706
1707   if test -z "$CC"; then
1708     case "`uname -s`" in
1709     *win32* | *WIN32*)
1710       # Extract the first word of "cl", so it can be a program name with args.
1711 set dummy cl; ac_word=$2
1712 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1713 echo "configure:1714: checking for $ac_word" >&5
1714
1715 if test -n "$CC"; then
1716   ac_cv_prog_CC="$CC" # Let the user override the test.
1717 else
1718   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1719   ac_dummy="$PATH"
1720   for ac_dir in $ac_dummy; do
1721     test -z "$ac_dir" && ac_dir=.
1722     if test -f $ac_dir/$ac_word; then
1723       ac_cv_prog_CC="cl"
1724       break
1725     fi
1726   done
1727   IFS="$ac_save_ifs"
1728 fi
1729 CC="$ac_cv_prog_CC"
1730 if test -n "$CC"; then
1731   echo "$ac_t""$CC" 1>&6
1732 else
1733   echo "$ac_t""no" 1>&6
1734 fi
1735  ;;
1736     esac
1737   fi
1738   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1739 fi
1740
1741 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1742 echo "configure:1743: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1743
1744 ac_ext=c
1745 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1746 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1747 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1748 ac_cpp='$CPP '"$xe_cppflags"
1749 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1750 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1751 cross_compiling=no
1752
1753 cat > conftest.$ac_ext << EOF
1754
1755 #line 1756 "configure"
1756 #include "confdefs.h"
1757
1758 main(){return(0);}
1759 EOF
1760 if { (eval echo configure:1761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1761   ac_cv_prog_cc_works=yes
1762   # If we can't run a trivial program, we are probably using a cross compiler.
1763   if (./conftest; exit) 2>/dev/null; then
1764     ac_cv_prog_cc_cross=no
1765   else
1766     ac_cv_prog_cc_cross=yes
1767   fi
1768 else
1769   echo "configure: failed program was:" >&5
1770   cat conftest.$ac_ext >&5
1771   ac_cv_prog_cc_works=no
1772 fi
1773 rm -fr conftest*
1774 ac_ext=c
1775 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1776 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1777 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1778 ac_cpp='$CPP '"$xe_cppflags"
1779 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1780 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1781 cross_compiling=no
1782
1783 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1784 if test $ac_cv_prog_cc_works = no; then
1785   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1786 fi
1787 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1788 echo "configure:1789: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1789 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1790 cross_compiling=$ac_cv_prog_cc_cross
1791
1792 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1793 echo "configure:1794: checking whether we are using GNU C" >&5
1794
1795 cat > conftest.c <<EOF
1796 #ifdef __GNUC__
1797   yes;
1798 #endif
1799 EOF
1800 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1801   ac_cv_prog_gcc=yes
1802 else
1803   ac_cv_prog_gcc=no
1804 fi
1805
1806 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1807
1808 if test $ac_cv_prog_gcc = yes; then
1809   GCC=yes
1810 else
1811   GCC=
1812 fi
1813
1814 ac_test_CFLAGS="${CFLAGS+set}"
1815 ac_save_CFLAGS="$CFLAGS"
1816 CFLAGS=
1817 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1818 echo "configure:1819: checking whether ${CC-cc} accepts -g" >&5
1819
1820 echo 'void f(){}' > conftest.c
1821 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1822   ac_cv_prog_cc_g=yes
1823 else
1824   ac_cv_prog_cc_g=no
1825 fi
1826 rm -f conftest*
1827
1828
1829 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1830 if test "$ac_test_CFLAGS" = set; then
1831   CFLAGS="$ac_save_CFLAGS"
1832 elif test $ac_cv_prog_cc_g = yes; then
1833   if test "$GCC" = yes; then
1834     CFLAGS="-g -O2"
1835   else
1836     CFLAGS="-g"
1837   fi
1838 else
1839   if test "$GCC" = yes; then
1840     CFLAGS="-O2"
1841   else
1842     CFLAGS=
1843   fi
1844 fi
1845  
1846 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1847   CC=${NON_GNU_CC-cc}
1848   # Extract the first word of "gcc", so it can be a program name with args.
1849 set dummy gcc; ac_word=$2
1850 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1851 echo "configure:1852: checking for $ac_word" >&5
1852
1853 if test -n "$CC"; then
1854   ac_cv_prog_CC="$CC" # Let the user override the test.
1855 else
1856   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1857   ac_dummy="$PATH"
1858   for ac_dir in $ac_dummy; do
1859     test -z "$ac_dir" && ac_dir=.
1860     if test -f $ac_dir/$ac_word; then
1861       ac_cv_prog_CC="gcc"
1862       break
1863     fi
1864   done
1865   IFS="$ac_save_ifs"
1866 fi
1867 CC="$ac_cv_prog_CC"
1868 if test -n "$CC"; then
1869   echo "$ac_t""$CC" 1>&6
1870 else
1871   echo "$ac_t""no" 1>&6
1872 fi
1873
1874 if test -z "$CC"; then
1875   # Extract the first word of "cc", so it can be a program name with args.
1876 set dummy cc; ac_word=$2
1877 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1878 echo "configure:1879: checking for $ac_word" >&5
1879
1880 if test -n "$CC"; then
1881   ac_cv_prog_CC="$CC" # Let the user override the test.
1882 else
1883   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1884   ac_prog_rejected=no
1885   ac_dummy="$PATH"
1886   for ac_dir in $ac_dummy; do
1887     test -z "$ac_dir" && ac_dir=.
1888     if test -f $ac_dir/$ac_word; then
1889       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1890         ac_prog_rejected=yes
1891         continue
1892       fi
1893       ac_cv_prog_CC="cc"
1894       break
1895     fi
1896   done
1897   IFS="$ac_save_ifs"
1898 if test $ac_prog_rejected = yes; then
1899   # We found a bogon in the path, so make sure we never use it.
1900   set dummy $ac_cv_prog_CC
1901   shift
1902   if test $# -gt 0; then
1903     # We chose a different compiler from the bogus one.
1904     # However, it has the same basename, so the bogon will be chosen
1905     # first if we set CC to just the basename; use the full file name.
1906     shift
1907     set dummy "$ac_dir/$ac_word" "$@"
1908     shift
1909     ac_cv_prog_CC="$@"
1910   fi
1911 fi
1912 fi
1913 CC="$ac_cv_prog_CC"
1914 if test -n "$CC"; then
1915   echo "$ac_t""$CC" 1>&6
1916 else
1917   echo "$ac_t""no" 1>&6
1918 fi
1919
1920   if test -z "$CC"; then
1921     case "`uname -s`" in
1922     *win32* | *WIN32*)
1923       # Extract the first word of "cl", so it can be a program name with args.
1924 set dummy cl; ac_word=$2
1925 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1926 echo "configure:1927: checking for $ac_word" >&5
1927
1928 if test -n "$CC"; then
1929   ac_cv_prog_CC="$CC" # Let the user override the test.
1930 else
1931   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1932   ac_dummy="$PATH"
1933   for ac_dir in $ac_dummy; do
1934     test -z "$ac_dir" && ac_dir=.
1935     if test -f $ac_dir/$ac_word; then
1936       ac_cv_prog_CC="cl"
1937       break
1938     fi
1939   done
1940   IFS="$ac_save_ifs"
1941 fi
1942 CC="$ac_cv_prog_CC"
1943 if test -n "$CC"; then
1944   echo "$ac_t""$CC" 1>&6
1945 else
1946   echo "$ac_t""no" 1>&6
1947 fi
1948  ;;
1949     esac
1950   fi
1951   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1952 fi
1953
1954 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1955 echo "configure:1956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1956
1957 ac_ext=c
1958 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1959 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1960 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1961 ac_cpp='$CPP '"$xe_cppflags"
1962 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1963 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1964 cross_compiling=no
1965
1966 cat > conftest.$ac_ext << EOF
1967
1968 #line 1969 "configure"
1969 #include "confdefs.h"
1970
1971 main(){return(0);}
1972 EOF
1973 if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1974   ac_cv_prog_cc_works=yes
1975   # If we can't run a trivial program, we are probably using a cross compiler.
1976   if (./conftest; exit) 2>/dev/null; then
1977     ac_cv_prog_cc_cross=no
1978   else
1979     ac_cv_prog_cc_cross=yes
1980   fi
1981 else
1982   echo "configure: failed program was:" >&5
1983   cat conftest.$ac_ext >&5
1984   ac_cv_prog_cc_works=no
1985 fi
1986 rm -fr conftest*
1987 ac_ext=c
1988 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1989 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1990 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1991 ac_cpp='$CPP '"$xe_cppflags"
1992 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1993 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1994 cross_compiling=no
1995
1996 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1997 if test $ac_cv_prog_cc_works = no; then
1998   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1999 fi
2000 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2001 echo "configure:2002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2002 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2003 cross_compiling=$ac_cv_prog_cc_cross
2004
2005 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2006 echo "configure:2007: checking whether we are using GNU C" >&5
2007
2008 cat > conftest.c <<EOF
2009 #ifdef __GNUC__
2010   yes;
2011 #endif
2012 EOF
2013 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2014   ac_cv_prog_gcc=yes
2015 else
2016   ac_cv_prog_gcc=no
2017 fi
2018
2019 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2020
2021 if test $ac_cv_prog_gcc = yes; then
2022   GCC=yes
2023 else
2024   GCC=
2025 fi
2026
2027 ac_test_CFLAGS="${CFLAGS+set}"
2028 ac_save_CFLAGS="$CFLAGS"
2029 CFLAGS=
2030 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2031 echo "configure:2032: checking whether ${CC-cc} accepts -g" >&5
2032
2033 echo 'void f(){}' > conftest.c
2034 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2035   ac_cv_prog_cc_g=yes
2036 else
2037   ac_cv_prog_cc_g=no
2038 fi
2039 rm -f conftest*
2040
2041
2042 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2043 if test "$ac_test_CFLAGS" = set; then
2044   CFLAGS="$ac_save_CFLAGS"
2045 elif test $ac_cv_prog_cc_g = yes; then
2046   if test "$GCC" = yes; then
2047     CFLAGS="-g -O2"
2048   else
2049     CFLAGS="-g"
2050   fi
2051 else
2052   if test "$GCC" = yes; then
2053     CFLAGS="-O2"
2054   else
2055     CFLAGS=
2056   fi
2057 fi
2058
2059 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2060   CC=gcc
2061   # Extract the first word of "gcc", so it can be a program name with args.
2062 set dummy gcc; ac_word=$2
2063 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2064 echo "configure:2065: checking for $ac_word" >&5
2065
2066 if test -n "$CC"; then
2067   ac_cv_prog_CC="$CC" # Let the user override the test.
2068 else
2069   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2070   ac_dummy="$PATH"
2071   for ac_dir in $ac_dummy; do
2072     test -z "$ac_dir" && ac_dir=.
2073     if test -f $ac_dir/$ac_word; then
2074       ac_cv_prog_CC="gcc"
2075       break
2076     fi
2077   done
2078   IFS="$ac_save_ifs"
2079 fi
2080 CC="$ac_cv_prog_CC"
2081 if test -n "$CC"; then
2082   echo "$ac_t""$CC" 1>&6
2083 else
2084   echo "$ac_t""no" 1>&6
2085 fi
2086
2087 if test -z "$CC"; then
2088   # Extract the first word of "cc", so it can be a program name with args.
2089 set dummy cc; ac_word=$2
2090 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2091 echo "configure:2092: checking for $ac_word" >&5
2092
2093 if test -n "$CC"; then
2094   ac_cv_prog_CC="$CC" # Let the user override the test.
2095 else
2096   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2097   ac_prog_rejected=no
2098   ac_dummy="$PATH"
2099   for ac_dir in $ac_dummy; do
2100     test -z "$ac_dir" && ac_dir=.
2101     if test -f $ac_dir/$ac_word; then
2102       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2103         ac_prog_rejected=yes
2104         continue
2105       fi
2106       ac_cv_prog_CC="cc"
2107       break
2108     fi
2109   done
2110   IFS="$ac_save_ifs"
2111 if test $ac_prog_rejected = yes; then
2112   # We found a bogon in the path, so make sure we never use it.
2113   set dummy $ac_cv_prog_CC
2114   shift
2115   if test $# -gt 0; then
2116     # We chose a different compiler from the bogus one.
2117     # However, it has the same basename, so the bogon will be chosen
2118     # first if we set CC to just the basename; use the full file name.
2119     shift
2120     set dummy "$ac_dir/$ac_word" "$@"
2121     shift
2122     ac_cv_prog_CC="$@"
2123   fi
2124 fi
2125 fi
2126 CC="$ac_cv_prog_CC"
2127 if test -n "$CC"; then
2128   echo "$ac_t""$CC" 1>&6
2129 else
2130   echo "$ac_t""no" 1>&6
2131 fi
2132
2133   if test -z "$CC"; then
2134     case "`uname -s`" in
2135     *win32* | *WIN32*)
2136       # Extract the first word of "cl", so it can be a program name with args.
2137 set dummy cl; ac_word=$2
2138 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2139 echo "configure:2140: checking for $ac_word" >&5
2140
2141 if test -n "$CC"; then
2142   ac_cv_prog_CC="$CC" # Let the user override the test.
2143 else
2144   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2145   ac_dummy="$PATH"
2146   for ac_dir in $ac_dummy; do
2147     test -z "$ac_dir" && ac_dir=.
2148     if test -f $ac_dir/$ac_word; then
2149       ac_cv_prog_CC="cl"
2150       break
2151     fi
2152   done
2153   IFS="$ac_save_ifs"
2154 fi
2155 CC="$ac_cv_prog_CC"
2156 if test -n "$CC"; then
2157   echo "$ac_t""$CC" 1>&6
2158 else
2159   echo "$ac_t""no" 1>&6
2160 fi
2161  ;;
2162     esac
2163   fi
2164   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2165 fi
2166
2167 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2168 echo "configure:2169: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2169
2170 ac_ext=c
2171 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2172 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2173 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2174 ac_cpp='$CPP '"$xe_cppflags"
2175 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2176 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2177 cross_compiling=no
2178
2179 cat > conftest.$ac_ext << EOF
2180
2181 #line 2182 "configure"
2182 #include "confdefs.h"
2183
2184 main(){return(0);}
2185 EOF
2186 if { (eval echo configure:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2187   ac_cv_prog_cc_works=yes
2188   # If we can't run a trivial program, we are probably using a cross compiler.
2189   if (./conftest; exit) 2>/dev/null; then
2190     ac_cv_prog_cc_cross=no
2191   else
2192     ac_cv_prog_cc_cross=yes
2193   fi
2194 else
2195   echo "configure: failed program was:" >&5
2196   cat conftest.$ac_ext >&5
2197   ac_cv_prog_cc_works=no
2198 fi
2199 rm -fr conftest*
2200 ac_ext=c
2201 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2202 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2203 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2204 ac_cpp='$CPP '"$xe_cppflags"
2205 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2206 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2207 cross_compiling=no
2208
2209 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2210 if test $ac_cv_prog_cc_works = no; then
2211   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2212 fi
2213 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2214 echo "configure:2215: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2215 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2216 cross_compiling=$ac_cv_prog_cc_cross
2217
2218 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2219 echo "configure:2220: checking whether we are using GNU C" >&5
2220
2221 cat > conftest.c <<EOF
2222 #ifdef __GNUC__
2223   yes;
2224 #endif
2225 EOF
2226 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2227   ac_cv_prog_gcc=yes
2228 else
2229   ac_cv_prog_gcc=no
2230 fi
2231
2232 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2233
2234 if test $ac_cv_prog_gcc = yes; then
2235   GCC=yes
2236 else
2237   GCC=
2238 fi
2239
2240 ac_test_CFLAGS="${CFLAGS+set}"
2241 ac_save_CFLAGS="$CFLAGS"
2242 CFLAGS=
2243 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2244 echo "configure:2245: checking whether ${CC-cc} accepts -g" >&5
2245
2246 echo 'void f(){}' > conftest.c
2247 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2248   ac_cv_prog_cc_g=yes
2249 else
2250   ac_cv_prog_cc_g=no
2251 fi
2252 rm -f conftest*
2253
2254
2255 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2256 if test "$ac_test_CFLAGS" = set; then
2257   CFLAGS="$ac_save_CFLAGS"
2258 elif test $ac_cv_prog_cc_g = yes; then
2259   if test "$GCC" = yes; then
2260     CFLAGS="-g -O2"
2261   else
2262     CFLAGS="-g"
2263   fi
2264 else
2265   if test "$GCC" = yes; then
2266     CFLAGS="-O2"
2267   else
2268     CFLAGS=
2269   fi
2270 fi
2271
2272 fi
2273 CFLAGS="$xe_save_CFLAGS"
2274
2275
2276 test -n "$CPP" -a -d "$CPP" && CPP=
2277
2278 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2279
2280 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2281 echo "configure:2282: checking how to run the C preprocessor" >&5
2282 # On Suns, sometimes $CPP names a directory.
2283 if test -n "$CPP" && test -d "$CPP"; then
2284   CPP=
2285 fi
2286 if test -z "$CPP"; then
2287
2288   # This must be in double quotes, not single quotes, because CPP may get
2289   # substituted into the Makefile and "${CC-cc}" will confuse make.
2290   CPP="${CC-cc} -E"
2291   # On the NeXT, cc -E runs the code through the compiler's parser,
2292   # not just through cpp.
2293   cat > conftest.$ac_ext <<EOF
2294 #line 2295 "configure"
2295 #include "confdefs.h"
2296 #include <assert.h>
2297 Syntax Error
2298 EOF
2299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2300 { (eval echo configure:2301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2302 if test -z "$ac_err"; then
2303   :
2304 else
2305   echo "$ac_err" >&5
2306   echo "configure: failed program was:" >&5
2307   cat conftest.$ac_ext >&5
2308   rm -rf conftest*
2309   CPP="${CC-cc} -E -traditional-cpp"
2310   cat > conftest.$ac_ext <<EOF
2311 #line 2312 "configure"
2312 #include "confdefs.h"
2313 #include <assert.h>
2314 Syntax Error
2315 EOF
2316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2317 { (eval echo configure:2318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2319 if test -z "$ac_err"; then
2320   :
2321 else
2322   echo "$ac_err" >&5
2323   echo "configure: failed program was:" >&5
2324   cat conftest.$ac_ext >&5
2325   rm -rf conftest*
2326   CPP="${CC-cc} -nologo -E"
2327   cat > conftest.$ac_ext <<EOF
2328 #line 2329 "configure"
2329 #include "confdefs.h"
2330 #include <assert.h>
2331 Syntax Error
2332 EOF
2333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2334 { (eval echo configure:2335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2336 if test -z "$ac_err"; then
2337   :
2338 else
2339   echo "$ac_err" >&5
2340   echo "configure: failed program was:" >&5
2341   cat conftest.$ac_ext >&5
2342   rm -rf conftest*
2343   CPP=/lib/cpp
2344 fi
2345 rm -f conftest*
2346 fi
2347 rm -f conftest*
2348 fi
2349 rm -f conftest*
2350   ac_cv_prog_CPP="$CPP"
2351   CPP="$ac_cv_prog_CPP"
2352 else
2353   ac_cv_prog_CPP="$CPP"
2354 fi
2355 echo "$ac_t""$CPP" 1>&6
2356
2357
2358
2359 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2360 echo "configure:2361: checking for AIX" >&5
2361 cat > conftest.$ac_ext <<EOF
2362 #line 2363 "configure"
2363 #include "confdefs.h"
2364 #ifdef _AIX
2365   yes
2366 #endif
2367
2368 EOF
2369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2370   egrep "yes" >/dev/null 2>&1; then
2371   rm -rf conftest*
2372   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2373     Defining _ALL_SOURCE
2374 EOF
2375 cat >> confdefs.h <<\EOF
2376 #define _ALL_SOURCE 1
2377 EOF
2378 }
2379
2380 else
2381   rm -rf conftest*
2382   echo "$ac_t""no" 1>&6
2383 fi
2384 rm -f conftest*
2385
2386  
2387
2388 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2389 echo "configure:2390: checking for GNU libc" >&5
2390 cat > conftest.$ac_ext <<EOF
2391 #line 2392 "configure"
2392 #include "confdefs.h"
2393 #include <features.h>
2394 int main() {
2395
2396 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2397 #error Not a GNU libc system :-(
2398 ******* ======= ******** &&&&&&&&
2399 #endif
2400
2401 ; return 0; }
2402 EOF
2403 if { (eval echo configure:2404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2404   rm -rf conftest*
2405   have_glibc=yes
2406 else
2407   echo "configure: failed program was:" >&5
2408   cat conftest.$ac_ext >&5
2409   rm -rf conftest*
2410   have_glibc=no
2411 fi
2412 rm -f conftest*
2413 echo "$ac_t""$have_glibc" 1>&6
2414 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2415     Defining _GNU_SOURCE
2416 EOF
2417 cat >> confdefs.h <<\EOF
2418 #define _GNU_SOURCE 1
2419 EOF
2420 }
2421
2422
2423 case "$opsys" in
2424   sol2)
2425    { test "$extra_verbose" = "yes" && cat << \EOF
2426     Defining __EXTENSIONS__
2427 EOF
2428 cat >> confdefs.h <<\EOF
2429 #define __EXTENSIONS__ 1
2430 EOF
2431 }
2432
2433       if test "$os_release" -ge 55; then
2434      { test "$extra_verbose" = "yes" && cat << \EOF
2435     Defining _XOPEN_SOURCE = 500
2436 EOF
2437 cat >> confdefs.h <<\EOF
2438 #define _XOPEN_SOURCE 500
2439 EOF
2440 }
2441
2442      { test "$extra_verbose" = "yes" && cat << \EOF
2443     Defining _XOPEN_SOURCE_EXTENDED
2444 EOF
2445 cat >> confdefs.h <<\EOF
2446 #define _XOPEN_SOURCE_EXTENDED 1
2447 EOF
2448 }
2449
2450    fi ;;
2451   linux)
2452     { test "$extra_verbose" = "yes" && cat << \EOF
2453     Defining _POSIX_C_SOURCE = 199506L
2454 EOF
2455 cat >> confdefs.h <<\EOF
2456 #define _POSIX_C_SOURCE 199506L
2457 EOF
2458 }
2459
2460     { test "$extra_verbose" = "yes" && cat << \EOF
2461     Defining _XOPEN_SOURCE = 500
2462 EOF
2463 cat >> confdefs.h <<\EOF
2464 #define _XOPEN_SOURCE 500
2465 EOF
2466 }
2467
2468     { test "$extra_verbose" = "yes" && cat << \EOF
2469     Defining _XOPEN_SOURCE_EXTENDED
2470 EOF
2471 cat >> confdefs.h <<\EOF
2472 #define _XOPEN_SOURCE_EXTENDED 1
2473 EOF
2474 }
2475
2476     ;;
2477 esac
2478
2479 cat > conftest.$ac_ext <<EOF
2480 #line 2481 "configure"
2481 #include "confdefs.h"
2482 int main () {
2483 #if defined __SUNPRO_C
2484 return 11;
2485 #elif defined __DECC
2486 return 12;
2487 #elif defined __USLC__ && defined __SCO_VERSION__
2488 return 13;
2489 #else
2490 return 0;
2491 #endif
2492 }
2493 EOF
2494 if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2495 then
2496   :
2497 else
2498   conftest_rc="$?"
2499   echo "configure: failed program was:" >&5
2500   cat conftest.$ac_ext >&5
2501   rm -fr conftest*
2502   case "$conftest_rc" in
2503   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2504   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2505   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2506 esac
2507 fi
2508 rm -fr conftest*
2509
2510
2511
2512
2513 echo "Extracting information from the machine- and system-dependent headers..."
2514
2515 tempcname="conftest.c"
2516
2517
2518
2519 cat > $tempcname < confdefs.h
2520 cat >> $tempcname <<EOF
2521 #define NOT_C_CODE
2522 #define C_SWITCH_SITE
2523 #define C_SWITCH_X_SITE
2524 #define LD_SWITCH_SITE
2525 #define LD_SWITCH_X_SITE
2526 #define LD_SWITCH_X_SITE_AUX
2527 #define OS_RELEASE $os_release
2528
2529 #ifdef config_opsysfile
2530 #include "$srcdir/src/$opsysfile"
2531 #endif
2532
2533 #ifdef config_machfile
2534 #include "$srcdir/src/$machfile"
2535 #endif
2536
2537 #ifndef LIBS_MACHINE
2538 #define LIBS_MACHINE
2539 #endif
2540 configure___ libs_machine=LIBS_MACHINE
2541
2542 #ifndef LIBS_SYSTEM
2543 #define LIBS_SYSTEM
2544 #endif
2545 configure___ libs_system=LIBS_SYSTEM
2546
2547 #ifndef LIBS_TERMCAP
2548 #define LIBS_TERMCAP
2549 #endif
2550 configure___ libs_termcap=LIBS_TERMCAP
2551
2552 #ifndef LIB_STANDARD
2553 #define LIB_STANDARD
2554 #endif
2555 configure___ libs_standard=LIB_STANDARD
2556
2557
2558 #ifndef OBJECTS_MACHINE
2559 #define OBJECTS_MACHINE
2560 #endif
2561 configure___ objects_machine=OBJECTS_MACHINE
2562
2563 #ifndef OBJECTS_SYSTEM
2564 #define OBJECTS_SYSTEM
2565 #endif
2566 configure___ objects_system=OBJECTS_SYSTEM
2567
2568
2569 #ifndef C_SWITCH_MACHINE
2570 #define C_SWITCH_MACHINE
2571 #endif
2572 configure___ c_switch_machine=C_SWITCH_MACHINE
2573
2574 #ifndef C_SWITCH_SYSTEM
2575 #define C_SWITCH_SYSTEM
2576 #endif
2577 configure___ c_switch_system=C_SWITCH_SYSTEM
2578
2579
2580 #ifndef LD_SWITCH_MACHINE
2581 #define LD_SWITCH_MACHINE
2582 #endif
2583 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2584
2585 #ifndef LD_SWITCH_SYSTEM
2586 #define LD_SWITCH_SYSTEM
2587 #endif
2588 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2589
2590
2591 #ifndef UNEXEC
2592 #define UNEXEC "unexec.o"
2593 #endif
2594 configure___ unexec=UNEXEC
2595
2596
2597 #ifndef LD_SWITCH_SHARED
2598 #define LD_SWITCH_SHARED "-c"
2599 #endif
2600 configure___ ld_switch_shared=LD_SWITCH_SHARED
2601
2602
2603 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2604 configure___ ordinary_ld=ORDINARY_LD
2605
2606 #ifdef ORDINARY_LINK
2607 #define LD ORDINARY_LD
2608 #else /* no ORDINARY LINK */
2609 #ifdef COFF_ENCAPSULATE
2610 #define LD "\$(CC) -nostdlib"
2611 #else /* not COFF_ENCAPSULATE */
2612 #ifdef LINKER
2613 #define LD LINKER
2614 #else /* ! defined (LINKER) */
2615 #define LD "ld"
2616 #endif /* ! defined (LINKER) */
2617 #endif /* ! defined (COFF_ENCAPSULATE) */
2618 #endif /* not ORDINARY_LINK */
2619 configure___ ld=LD
2620
2621 #ifndef LIB_GCC
2622 #define LIB_GCC
2623 #endif
2624 configure___ lib_gcc=LIB_GCC
2625
2626 #ifndef LD_TEXT_START_ADDR
2627 #define LD_TEXT_START_ADDR
2628 #endif
2629 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2630
2631
2632 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2633 #ifdef NO_REMAP
2634 #ifdef COFF_ENCAPSULATE
2635 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2636 #else /* ! defined (COFF_ENCAPSULATE) */
2637 #define START_FILES "pre-crt0.o /lib/crt0.o"
2638 #endif /* ! defined (COFF_ENCAPSULATE) */
2639 #else /* ! defined (NO_REMAP) */
2640 #define START_FILES "ecrt0.o"
2641 #endif /* ! defined (NO_REMAP) */
2642 #endif /* no ORDINARY_LINK */
2643 #ifndef START_FILES
2644 #define START_FILES
2645 #endif
2646 configure___ start_files=START_FILES
2647
2648 #ifdef ORDINARY_LINK
2649 configure___ ordinary_link=yes
2650 #else
2651 configure___ ordinary_link=no
2652 #endif
2653
2654 #ifdef SYSTEM_MALLOC
2655 configure___ system_malloc=yes
2656 #else
2657 configure___ system_malloc=no
2658 #endif
2659
2660 #ifdef TERMINFO
2661 configure___ have_terminfo=yes
2662 #else
2663 configure___ have_terminfo=no
2664 #endif
2665
2666 #ifdef MAIL_USE_FLOCK
2667 configure___ mail_use_flock=yes
2668 #else
2669 configure___ mail_use_flock=no
2670 #endif
2671
2672 #ifdef MAIL_USE_LOCKF
2673 configure___ mail_use_lockf=yes
2674 #else
2675 configure___ mail_use_lockf=no
2676 #endif
2677
2678 #ifdef MAIL_USE_LOCKING
2679 configure___ mail_use_locking=yes
2680 #else
2681 configure___ mail_use_locking=no
2682 #endif
2683
2684 #ifdef HAVE_WIN32_PROCESSES
2685 configure___ win32_processes=yes
2686 #else
2687 configure___ win32_processes=no
2688 #endif
2689
2690 EOF
2691
2692 CPP=`eval "echo $CPP $CPPFLAGS"`
2693 eval `$CPP -Isrc $tempcname \
2694         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2695
2696 rm $tempcname
2697
2698 if test "$pdump" = "yes"; then
2699   ordinary_link="yes"
2700   ld="${ordinary_ld}"
2701   start_files=
2702   libs_standard=
2703   unexec=
2704   lib_gcc=
2705 fi
2706
2707 test "$extra_verbose" = "yes" && \
2708   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 ""
2709
2710 case "$opsys" in mingw* | cygwin*)
2711   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2712   cygwin_include=`eval "dirname $cygwin_include"` ;
2713   cygwin_include="-I$cygwin_include/../include" ;
2714   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2715   case "$opsys" in mingw*)
2716     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2717   esac
2718   ;;
2719 esac
2720
2721 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2722
2723
2724 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2725
2726 if test "$__USLC__" = yes; then
2727   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2728 echo "configure:2729: checking for whether the -Kalloca compiler flag is needed" >&5
2729   need_kalloca=no
2730   cat > conftest.$ac_ext <<EOF
2731 #line 2732 "configure"
2732 #include "confdefs.h"
2733
2734 int main() {
2735 void *x = alloca(4);
2736 ; return 0; }
2737 EOF
2738 if { (eval echo configure:2739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2739   rm -rf conftest*
2740   :
2741 else
2742   echo "configure: failed program was:" >&5
2743   cat conftest.$ac_ext >&5
2744   rm -rf conftest*
2745   
2746     xe_save_c_switch_system="$c_switch_system"
2747     c_switch_system="$c_switch_system -Kalloca"
2748     cat > conftest.$ac_ext <<EOF
2749 #line 2750 "configure"
2750 #include "confdefs.h"
2751
2752 int main() {
2753 void *x = alloca(4);
2754 ; return 0; }
2755 EOF
2756 if { (eval echo configure:2757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2757   rm -rf conftest*
2758    need_kalloca=yes 
2759 else
2760   echo "configure: failed program was:" >&5
2761   cat conftest.$ac_ext >&5
2762 fi
2763 rm -f conftest*
2764     c_switch_system="$xe_save_c_switch_system"
2765 fi
2766 rm -f conftest*
2767   echo "$ac_t""$need_kalloca" 1>&6
2768   test "$need_kalloca" = "yes" && c_switch_system="$c_switch_system -Kalloca" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-Kalloca\" to \$c_switch_system"; fi
2769 fi
2770
2771 if test "$cflags_specified" = "no"; then
2772       if   test "$GCC" = "yes"; then
2773     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2774         CFLAGS="$CFLAGS -Wsign-compare"
2775                 if test "$xemacs_compiler" != "g++"; then
2776       CFLAGS="$CFLAGS -Wshadow"
2777     fi
2778             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2779               elif test "$__SUNPRO_C" = "yes"; then
2780     case "$opsys" in
2781       sol2    ) CFLAGS="-v -xO4" ;;
2782       sunos4* ) CFLAGS="-xO2";;
2783     esac
2784   elif test "$__DECC" = "yes"; then
2785     CFLAGS="-O3"
2786   elif test "$CC" = "xlc"; then
2787     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2788     else
2789     CFLAGS="-O" ;  fi
2790 fi
2791
2792 if test "$GCC" = "yes"; then
2793 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2794 echo "configure:2795: checking for buggy gcc versions" >&5
2795 GCC_VERSION=`$CC --version`
2796 case `uname -s`:`uname -m`:$GCC_VERSION in
2797                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2798                         case "$CFLAGS" in
2799             *-O2*|*-O3*)
2800                 case "$CFLAGS" in
2801                     *-fno-schedule-insns*) ;;
2802                     *)
2803                         echo "$ac_t""yes" 1>&6
2804                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2805                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2806                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2807                         ;;
2808                 esac
2809                 ;;
2810         esac
2811         ;;
2812                     Linux:alpha:egcs-2.91.*)
2813         echo "$ac_t""yes" 1>&6
2814         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2815         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2816         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2817         ;;
2818     *:i*86*:2.7.2*)
2819         case "$CFLAGS" in
2820             *-O2*|*-O3*)
2821                 case "$GCC_VERSION" in
2822                     2.7.2)
2823                         case "$CFLAGS" in
2824                             *-fno-strength-reduce*) ;;
2825                             *)
2826                                 echo "$ac_t""yes" 1>&6
2827                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2828                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2829                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2830                                 ;;
2831                         esac
2832                         ;;
2833                 esac
2834                 case "$CFLAGS" in
2835                  *-fno-caller-saves*) ;;
2836                  *)
2837                     echo "$ac_t""yes" 1>&6
2838                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2839                     echo "configure: warning: -fno-caller-saves." 1>&2
2840                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2841                     ;;
2842                 esac
2843                 ;;
2844         esac
2845         ;;
2846 esac
2847 echo "$ac_t""no" 1>&6
2848 fi
2849
2850
2851 if test "$GCC" = "yes"; then
2852   set x $ld_switch_system; shift; ld_switch_system=""
2853   while test -n "$1"; do
2854     case $1 in
2855       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2856       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2857       -Xlinker* ) ;;
2858       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2859     esac
2860     shift
2861   done
2862 fi
2863
2864 if test "$GCC" = "yes"; then
2865   set x $ld_switch_machine; shift; ld_switch_machine=""
2866   while test -n "$1"; do
2867     case $1 in
2868       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2869       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2870       -Xlinker* ) ;;
2871       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2872     esac
2873     shift
2874   done
2875 fi
2876
2877 if test "$GCC" = "yes"; then
2878   set x $LDFLAGS; shift; LDFLAGS=""
2879   while test -n "$1"; do
2880     case $1 in
2881       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2882       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2883       -Xlinker* ) ;;
2884       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2885     esac
2886     shift
2887   done
2888 fi
2889
2890 if test "$GCC" = "yes"; then
2891   set x $ld_call_shared; shift; ld_call_shared=""
2892   while test -n "$1"; do
2893     case $1 in
2894       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2895       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2896       -Xlinker* ) ;;
2897       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2898     esac
2899     shift
2900   done
2901 fi
2902
2903 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2904    echo "    xemacs will be linked with \"$objects_machine\""
2905  fi
2906 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2907    echo "    xemacs will be linked with \"$objects_system\""
2908  fi
2909 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2910    echo "    xemacs will be linked with \"$unexec\""
2911  fi
2912 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2913    echo "    xemacs will be linked with \"dumper.o\""
2914  fi
2915
2916 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2917 echo "configure:2918: checking for dynodump" >&5
2918 if test "$unexec" != "unexsol2.o"; then
2919   echo "$ac_t""no" 1>&6
2920 else
2921   echo "$ac_t""yes" 1>&6
2922   { test "$extra_verbose" = "yes" && cat << \EOF
2923     Defining DYNODUMP
2924 EOF
2925 cat >> confdefs.h <<\EOF
2926 #define DYNODUMP 1
2927 EOF
2928 }
2929
2930   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2931   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2932   case "$machine" in
2933     sparc   ) dynodump_arch=sparc ;;
2934     *86*    ) dynodump_arch=i386  ;;
2935     powerpc ) dynodump_arch=ppc   ;;
2936   esac
2937     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
2938 fi
2939
2940
2941 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2942
2943 if test "$unexec" = "unexaix.o"; then
2944   if   test "$dynamic" = "no"; then
2945   start_flags="-Wl,-bnso,-bnodelcsect"
2946   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2947   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2948     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2949   done
2950   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2951     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2952   done
2953   
2954 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2955 echo "configure:2956: checking for terminateAndUnload in -lC" >&5
2956 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2957
2958 xe_check_libs=" -lC "
2959 cat > conftest.$ac_ext <<EOF
2960 #line 2961 "configure"
2961 #include "confdefs.h"
2962 /* Override any gcc2 internal prototype to avoid an error.  */
2963 /* We use char because int might match the return type of a gcc2
2964     builtin and then its argument prototype would still apply.  */
2965 char terminateAndUnload();
2966
2967 int main() {
2968 terminateAndUnload()
2969 ; return 0; }
2970 EOF
2971 if { (eval echo configure:2972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2972   rm -rf conftest*
2973   eval "ac_cv_lib_$ac_lib_var=yes"
2974 else
2975   echo "configure: failed program was:" >&5
2976   cat conftest.$ac_ext >&5
2977   rm -rf conftest*
2978   eval "ac_cv_lib_$ac_lib_var=no"
2979 fi
2980 rm -f conftest*
2981 xe_check_libs=""
2982
2983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2984   echo "$ac_t""yes" 1>&6
2985   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2986 else
2987   echo "$ac_t""no" 1>&6
2988 fi
2989
2990
2991   fi
2992 elif test -n "$ld_text_start_addr"; then
2993   start_flags="-T $ld_text_start_addr -e __start"
2994 fi
2995
2996
2997
2998
2999 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3000  test -z "$linker" &&  linker='$(CC) -nostdlib'
3001  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3002 fi
3003 test "$GCC" != "yes" && lib_gcc=
3004
3005
3006
3007
3008
3009 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3010 if test -n "$site_libraries"; then
3011   for arg in $site_libraries; do
3012     case "$arg" in
3013      -* ) ;;
3014      * ) test -d "$arg" || \
3015            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3016        arg="-L${arg}" ;;
3017     esac
3018     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3019   done
3020 fi
3021
3022 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3023 if test -n "$site_includes"; then
3024   for arg in $site_includes; do
3025     case "$arg" in
3026       -* ) ;;
3027       * ) test -d "$arg" || \
3028            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3029       arg="-I${arg}" ;;
3030     esac
3031     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3032   done
3033 fi
3034
3035 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3036 if test -n "$site_prefixes"; then
3037   for dir in $site_prefixes; do
3038     lib_dir="${dir}/lib"
3039     inc_dir="${dir}/include"
3040     if test ! -d "$dir"; then
3041       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3042     elif test ! -d "$lib_dir"; then
3043       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3044     else
3045       if test -d "$inc_dir"; then
3046         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
3047       fi
3048       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
3049     fi
3050   done
3051 fi
3052
3053
3054 for dir in "/usr/ccs/lib"; do
3055   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
3056 done
3057
3058 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3059 if test -n "$site_runtime_libraries"; then
3060   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3061   export LD_RUN_PATH
3062 fi
3063
3064
3065
3066
3067
3068 if test -n "$add_runtime_path"; then :;
3069 elif test "$dynamic" = "no"; then add_runtime_path=no
3070 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3071 else case "$opsys" in
3072        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3073        * ) add_runtime_path=no ;;
3074      esac
3075 fi
3076
3077 if test "$add_runtime_path" = "yes"; then
3078       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3079 echo "configure:3080: checking "for runtime libraries flag"" >&5
3080   case "$opsys" in
3081     sol2 ) dash_r="-R" ;;
3082     decosf* | linux* | irix*) dash_r="-rpath " ;;
3083     *)
3084       dash_r=""
3085       for try_dash_r in "-R" "-R " "-rpath "; do
3086         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3087         
3088 if test "$GCC" = "yes"; then
3089   set x $xe_check_libs; shift; xe_check_libs=""
3090   while test -n "$1"; do
3091     case $1 in
3092       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3093       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3094       -Xlinker* ) ;;
3095       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3096     esac
3097     shift
3098   done
3099 fi
3100         cat > conftest.$ac_ext <<EOF
3101 #line 3102 "configure"
3102 #include "confdefs.h"
3103
3104 int main() {
3105
3106 ; return 0; }
3107 EOF
3108 if { (eval echo configure:3109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3109   rm -rf conftest*
3110   dash_r="$try_dash_r"
3111 else
3112   echo "configure: failed program was:" >&5
3113   cat conftest.$ac_ext >&5
3114 fi
3115 rm -f conftest*
3116         xe_check_libs=""
3117         test -n "$dash_r" && break
3118       done ;;
3119   esac
3120   if test -n "$dash_r";
3121     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3122     else echo "$ac_t""NONE" 1>&6
3123   fi
3124 fi
3125
3126 xe_add_unique_runpath_dir='
3127   xe_add_p=yes
3128   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3129   done
3130   if test "$xe_add_p" = "yes"; then
3131     test -n "$runpath" && runpath="${runpath}:"
3132     runpath="${runpath}${xe_runpath_dir}"
3133     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3134   fi'
3135
3136
3137
3138
3139 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3140     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3141   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3142   
3143         runpath="" runpath_dirs=""
3144   if test -n "$LD_RUN_PATH"; then
3145     runpath="$LD_RUN_PATH"
3146   elif test "$GCC" = "yes"; then
3147         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3148     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3149     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3150     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3151       case "$arg" in P,* | -L* | -R* )
3152         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3153           {
3154 xe_runpath_dir="$dir"
3155   test "$xe_runpath_dir" != "/lib"     -a \
3156         "$xe_runpath_dir" != "/usr/lib" -a \
3157         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3158   eval "$xe_add_unique_runpath_dir"
3159 }
3160         done ;;
3161       esac
3162     done
3163     ld_switch_run="$ld_switch_run_save"
3164     rm -f conftest*
3165   else
3166         for arg in $ld_switch_site $ld_switch_x_site; do
3167       case "$arg" in -L*) {
3168 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3169   test "$xe_runpath_dir" != "/lib"     -a \
3170         "$xe_runpath_dir" != "/usr/lib" -a \
3171         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3172   eval "$xe_add_unique_runpath_dir"
3173 };; esac
3174     done
3175         if test "$opsys $need_motif" = "sol2 yes"; then
3176       xe_runpath_dir="/opt/SUNWdt/lib";
3177       eval "$xe_add_unique_runpath_dir";
3178     fi
3179   fi 
3180   if test -n "$runpath"; then
3181     ld_switch_run="${dash_r}${runpath}"
3182     
3183 if test "$GCC" = "yes"; then
3184   set x $ld_switch_run; shift; ld_switch_run=""
3185   while test -n "$1"; do
3186     case $1 in
3187       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3188       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3189       -Xlinker* ) ;;
3190       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3191     esac
3192     shift
3193   done
3194 fi
3195     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3196   fi
3197 fi
3198
3199
3200
3201 GNU_MALLOC=yes
3202 if test "$with_dlmalloc" != "no"; then
3203         doug_lea_malloc=yes
3204 else
3205         doug_lea_malloc=no
3206 fi
3207 after_morecore_hook_exists=yes
3208 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3209 echo "configure:3210: checking for malloc_set_state" >&5
3210
3211 cat > conftest.$ac_ext <<EOF
3212 #line 3213 "configure"
3213 #include "confdefs.h"
3214 /* System header to define __stub macros and hopefully few prototypes,
3215     which can conflict with char malloc_set_state(); below.  */
3216 #include <assert.h>
3217 /* Override any gcc2 internal prototype to avoid an error.  */
3218 /* We use char because int might match the return type of a gcc2
3219     builtin and then its argument prototype would still apply.  */
3220 char malloc_set_state();
3221
3222 int main() {
3223
3224 /* The GNU C library defines this for functions which it implements
3225     to always fail with ENOSYS.  Some functions are actually named
3226     something starting with __ and the normal name is an alias.  */
3227 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3228 choke me
3229 #else
3230 malloc_set_state();
3231 #endif
3232
3233 ; return 0; }
3234 EOF
3235 if { (eval echo configure:3236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3236   rm -rf conftest*
3237   eval "ac_cv_func_malloc_set_state=yes"
3238 else
3239   echo "configure: failed program was:" >&5
3240   cat conftest.$ac_ext >&5
3241   rm -rf conftest*
3242   eval "ac_cv_func_malloc_set_state=no"
3243 fi
3244 rm -f conftest*
3245
3246 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3247   echo "$ac_t""yes" 1>&6
3248   :
3249 else
3250   echo "$ac_t""no" 1>&6
3251 doug_lea_malloc=no
3252 fi
3253
3254 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3255 echo "configure:3256: checking whether __after_morecore_hook exists" >&5
3256 cat > conftest.$ac_ext <<EOF
3257 #line 3258 "configure"
3258 #include "confdefs.h"
3259 extern void (* __after_morecore_hook)();
3260 int main() {
3261 __after_morecore_hook = 0
3262 ; return 0; }
3263 EOF
3264 if { (eval echo configure:3265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3265   rm -rf conftest*
3266   echo "$ac_t""yes" 1>&6
3267 else
3268   echo "configure: failed program was:" >&5
3269   cat conftest.$ac_ext >&5
3270   rm -rf conftest*
3271   echo "$ac_t""no" 1>&6
3272    after_morecore_hook_exists=no
3273 fi
3274 rm -f conftest*
3275 if test "$system_malloc" = "yes" ; then
3276   GNU_MALLOC=no
3277   GNU_MALLOC_reason="
3278     - The GNU allocators don't work with this system configuration."
3279 elif test "$with_system_malloc" = "yes" ; then
3280   GNU_MALLOC=no
3281   GNU_MALLOC_reason="
3282     - User chose not to use GNU allocators."
3283 elif test "$with_debug_malloc" = "yes" ; then
3284   GNU_MALLOC=no
3285   GNU_MALLOC_reason="
3286     - User chose to use Debugging Malloc."
3287 fi
3288
3289 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3290   GNU_MALLOC_reason="
3291     - Using Doug Lea's new malloc from the GNU C Library."
3292   { test "$extra_verbose" = "yes" && cat << \EOF
3293     Defining DOUG_LEA_MALLOC
3294 EOF
3295 cat >> confdefs.h <<\EOF
3296 #define DOUG_LEA_MALLOC 1
3297 EOF
3298 }
3299
3300   if test "$after_morecore_hook_exists" = "no" ; then
3301     GNU_MALLOC_reason="
3302     - Using Doug Lea's new malloc from the Linux C Library."
3303     { test "$extra_verbose" = "yes" && cat << \EOF
3304     Defining _NO_MALLOC_WARNING_
3305 EOF
3306 cat >> confdefs.h <<\EOF
3307 #define _NO_MALLOC_WARNING_ 1
3308 EOF
3309 }
3310
3311   fi
3312 fi
3313
3314
3315
3316
3317 # Extract the first word of "ranlib", so it can be a program name with args.
3318 set dummy ranlib; ac_word=$2
3319 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3320 echo "configure:3321: checking for $ac_word" >&5
3321
3322 if test -n "$RANLIB"; then
3323   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3324 else
3325   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3326   ac_dummy="$PATH"
3327   for ac_dir in $ac_dummy; do
3328     test -z "$ac_dir" && ac_dir=.
3329     if test -f $ac_dir/$ac_word; then
3330       ac_cv_prog_RANLIB="ranlib"
3331       break
3332     fi
3333   done
3334   IFS="$ac_save_ifs"
3335   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3336 fi
3337 RANLIB="$ac_cv_prog_RANLIB"
3338 if test -n "$RANLIB"; then
3339   echo "$ac_t""$RANLIB" 1>&6
3340 else
3341   echo "$ac_t""no" 1>&6
3342 fi
3343
3344 ac_aux_dir=
3345 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3346   if test -f $ac_dir/install-sh; then
3347     ac_aux_dir=$ac_dir
3348     ac_install_sh="$ac_aux_dir/install-sh -c"
3349     break
3350   elif test -f $ac_dir/install.sh; then
3351     ac_aux_dir=$ac_dir
3352     ac_install_sh="$ac_aux_dir/install.sh -c"
3353     break
3354   fi
3355 done
3356 if test -z "$ac_aux_dir"; then
3357   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3358 fi
3359 ac_config_guess=$ac_aux_dir/config.guess
3360 ac_config_sub=$ac_aux_dir/config.sub
3361 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3362
3363 # Find a good install program.  We prefer a C program (faster),
3364 # so one script is as good as another.  But avoid the broken or
3365 # incompatible versions:
3366 # SysV /etc/install, /usr/sbin/install
3367 # SunOS /usr/etc/install
3368 # IRIX /sbin/install
3369 # AIX /bin/install
3370 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3371 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3372 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3373 # ./install, which can be erroneously created by make from ./install.sh.
3374 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3375 echo "configure:3376: checking for a BSD compatible install" >&5
3376 if test -z "$INSTALL"; then
3377
3378   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3379   for ac_dir in $PATH; do
3380     # Account for people who put trailing slashes in PATH elements.
3381     case "$ac_dir/" in
3382     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3383     *)
3384       # OSF1 and SCO ODT 3.0 have their own names for install.
3385       # Don't use installbsd from OSF since it installs stuff as root
3386       # by default.
3387       for ac_prog in ginstall scoinst install; do
3388         if test -f $ac_dir/$ac_prog; then
3389           if test $ac_prog = install &&
3390             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3391             # AIX install.  It has an incompatible calling convention.
3392             :
3393           else
3394             ac_cv_path_install="$ac_dir/$ac_prog -c"
3395             break 2
3396           fi
3397         fi
3398       done
3399       ;;
3400     esac
3401   done
3402   IFS="$ac_save_IFS"
3403
3404   if test "${ac_cv_path_install+set}" = set; then
3405     INSTALL="$ac_cv_path_install"
3406   else
3407     # As a last resort, use the slow shell script.  We don't cache a
3408     # path for INSTALL within a source directory, because that will
3409     # break other packages using the cache if that directory is
3410     # removed, or if the path is relative.
3411     INSTALL="$ac_install_sh"
3412   fi
3413 fi
3414 echo "$ac_t""$INSTALL" 1>&6
3415
3416 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3417 # It thinks the first close brace ends the variable substitution.
3418 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3419
3420 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3421
3422 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3423
3424 for ac_prog in 'bison -y' byacc
3425 do
3426 # Extract the first word of "$ac_prog", so it can be a program name with args.
3427 set dummy $ac_prog; ac_word=$2
3428 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3429 echo "configure:3430: checking for $ac_word" >&5
3430
3431 if test -n "$YACC"; then
3432   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3433 else
3434   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3435   ac_dummy="$PATH"
3436   for ac_dir in $ac_dummy; do
3437     test -z "$ac_dir" && ac_dir=.
3438     if test -f $ac_dir/$ac_word; then
3439       ac_cv_prog_YACC="$ac_prog"
3440       break
3441     fi
3442   done
3443   IFS="$ac_save_ifs"
3444 fi
3445 YACC="$ac_cv_prog_YACC"
3446 if test -n "$YACC"; then
3447   echo "$ac_t""$YACC" 1>&6
3448 else
3449   echo "$ac_t""no" 1>&6
3450 fi
3451
3452 test -n "$YACC" && break
3453 done
3454 test -n "$YACC" || YACC="yacc"
3455
3456
3457 for ac_hdr in   a.out.h   elf.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/time.h   sys/timeb.h   sys/un.h   ulimit.h   unistd.h 
3458 do
3459 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3460 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3461 echo "configure:3462: checking for $ac_hdr" >&5
3462
3463 cat > conftest.$ac_ext <<EOF
3464 #line 3465 "configure"
3465 #include "confdefs.h"
3466 #include <$ac_hdr>
3467 EOF
3468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3469 { (eval echo configure:3470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3471 if test -z "$ac_err"; then
3472   rm -rf conftest*
3473   eval "ac_cv_header_$ac_safe=yes"
3474 else
3475   echo "$ac_err" >&5
3476   echo "configure: failed program was:" >&5
3477   cat conftest.$ac_ext >&5
3478   rm -rf conftest*
3479   eval "ac_cv_header_$ac_safe=no"
3480 fi
3481 rm -f conftest*
3482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3483   echo "$ac_t""yes" 1>&6
3484     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3485   { test "$extra_verbose" = "yes" && cat << EOF
3486     Defining $ac_tr_hdr
3487 EOF
3488 cat >> confdefs.h <<EOF
3489 #define $ac_tr_hdr 1
3490 EOF
3491 }
3492  
3493 else
3494   echo "$ac_t""no" 1>&6
3495 fi
3496 done
3497
3498 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3499 echo "configure:3500: checking for sys/wait.h that is POSIX.1 compatible" >&5
3500
3501 cat > conftest.$ac_ext <<EOF
3502 #line 3503 "configure"
3503 #include "confdefs.h"
3504 #include <sys/types.h>
3505 #include <sys/wait.h>
3506 #ifndef WEXITSTATUS
3507 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3508 #endif
3509 #ifndef WIFEXITED
3510 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3511 #endif
3512 int main() {
3513 int s;
3514 wait (&s);
3515 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3516 ; return 0; }
3517 EOF
3518 if { (eval echo configure:3519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3519   rm -rf conftest*
3520   ac_cv_header_sys_wait_h=yes
3521 else
3522   echo "configure: failed program was:" >&5
3523   cat conftest.$ac_ext >&5
3524   rm -rf conftest*
3525   ac_cv_header_sys_wait_h=no
3526 fi
3527 rm -f conftest*
3528
3529 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3530 if test $ac_cv_header_sys_wait_h = yes; then
3531   { test "$extra_verbose" = "yes" && cat << \EOF
3532     Defining HAVE_SYS_WAIT_H
3533 EOF
3534 cat >> confdefs.h <<\EOF
3535 #define HAVE_SYS_WAIT_H 1
3536 EOF
3537 }
3538
3539 fi
3540
3541 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3542 echo "configure:3543: checking for ANSI C header files" >&5
3543
3544 cat > conftest.$ac_ext <<EOF
3545 #line 3546 "configure"
3546 #include "confdefs.h"
3547 #include <stdlib.h>
3548 #include <stdarg.h>
3549 #include <string.h>
3550 #include <float.h>
3551 EOF
3552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3553 { (eval echo configure:3554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3555 if test -z "$ac_err"; then
3556   rm -rf conftest*
3557   ac_cv_header_stdc=yes
3558 else
3559   echo "$ac_err" >&5
3560   echo "configure: failed program was:" >&5
3561   cat conftest.$ac_ext >&5
3562   rm -rf conftest*
3563   ac_cv_header_stdc=no
3564 fi
3565 rm -f conftest*
3566
3567 if test $ac_cv_header_stdc = yes; then
3568   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3569 cat > conftest.$ac_ext <<EOF
3570 #line 3571 "configure"
3571 #include "confdefs.h"
3572 #include <string.h>
3573 EOF
3574 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3575   egrep "memchr" >/dev/null 2>&1; then
3576   :
3577 else
3578   rm -rf conftest*
3579   ac_cv_header_stdc=no
3580 fi
3581 rm -f conftest*
3582
3583 fi
3584
3585 if test $ac_cv_header_stdc = yes; then
3586   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3587 cat > conftest.$ac_ext <<EOF
3588 #line 3589 "configure"
3589 #include "confdefs.h"
3590 #include <stdlib.h>
3591 EOF
3592 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3593   egrep "free" >/dev/null 2>&1; then
3594   :
3595 else
3596   rm -rf conftest*
3597   ac_cv_header_stdc=no
3598 fi
3599 rm -f conftest*
3600
3601 fi
3602
3603 if test $ac_cv_header_stdc = yes; then
3604   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3605 cat > conftest.$ac_ext <<EOF
3606 #line 3607 "configure"
3607 #include "confdefs.h"
3608 #include <ctype.h>
3609 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3610 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3611 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3612 int main () { int i; for (i = 0; i < 256; i++)
3613 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3614 exit (0); }
3615
3616 EOF
3617 if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3618 then
3619   :
3620 else
3621   conftest_rc="$?"
3622   echo "configure: failed program was:" >&5
3623   cat conftest.$ac_ext >&5
3624   rm -fr conftest*
3625   ac_cv_header_stdc=no
3626 fi
3627 rm -fr conftest*
3628 fi
3629
3630 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3631 if test $ac_cv_header_stdc = yes; then
3632   { test "$extra_verbose" = "yes" && cat << \EOF
3633     Defining STDC_HEADERS
3634 EOF
3635 cat >> confdefs.h <<\EOF
3636 #define STDC_HEADERS 1
3637 EOF
3638 }
3639
3640 fi
3641
3642 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3643 echo "configure:3644: checking whether time.h and sys/time.h may both be included" >&5
3644
3645 cat > conftest.$ac_ext <<EOF
3646 #line 3647 "configure"
3647 #include "confdefs.h"
3648 #include <sys/types.h>
3649 #include <sys/time.h>
3650 #include <time.h>
3651 int main() {
3652 struct tm *tp;
3653 ; return 0; }
3654 EOF
3655 if { (eval echo configure:3656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3656   rm -rf conftest*
3657   ac_cv_header_time=yes
3658 else
3659   echo "configure: failed program was:" >&5
3660   cat conftest.$ac_ext >&5
3661   rm -rf conftest*
3662   ac_cv_header_time=no
3663 fi
3664 rm -f conftest*
3665
3666 echo "$ac_t""$ac_cv_header_time" 1>&6
3667 if test $ac_cv_header_time = yes; then
3668   { test "$extra_verbose" = "yes" && cat << \EOF
3669     Defining TIME_WITH_SYS_TIME
3670 EOF
3671 cat >> confdefs.h <<\EOF
3672 #define TIME_WITH_SYS_TIME 1
3673 EOF
3674 }
3675
3676 fi
3677
3678 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3679 echo "configure:3680: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3680
3681 cat > conftest.$ac_ext <<EOF
3682 #line 3683 "configure"
3683 #include "confdefs.h"
3684 #include <sys/types.h>
3685 #include <signal.h>
3686 /* NetBSD declares sys_siglist in unistd.h.  */
3687 #ifdef HAVE_UNISTD_H
3688 #include <unistd.h>
3689 #endif
3690 int main() {
3691 char *msg = *(sys_siglist + 1);
3692 ; return 0; }
3693 EOF
3694 if { (eval echo configure:3695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3695   rm -rf conftest*
3696   ac_cv_decl_sys_siglist=yes
3697 else
3698   echo "configure: failed program was:" >&5
3699   cat conftest.$ac_ext >&5
3700   rm -rf conftest*
3701   ac_cv_decl_sys_siglist=no
3702 fi
3703 rm -f conftest*
3704
3705 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3706 if test $ac_cv_decl_sys_siglist = yes; then
3707   { test "$extra_verbose" = "yes" && cat << \EOF
3708     Defining SYS_SIGLIST_DECLARED
3709 EOF
3710 cat >> confdefs.h <<\EOF
3711 #define SYS_SIGLIST_DECLARED 1
3712 EOF
3713 }
3714
3715 fi
3716
3717
3718
3719 echo $ac_n "checking for utime""... $ac_c" 1>&6
3720 echo "configure:3721: checking for utime" >&5
3721 cat > conftest.$ac_ext <<EOF
3722 #line 3723 "configure"
3723 #include "confdefs.h"
3724 #include <sys/types.h>
3725 #include <utime.h>
3726 int main() {
3727 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3728 ; return 0; }
3729 EOF
3730 if { (eval echo configure:3731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3731   rm -rf conftest*
3732   echo "$ac_t""yes" 1>&6
3733    { test "$extra_verbose" = "yes" && cat << \EOF
3734     Defining HAVE_UTIME
3735 EOF
3736 cat >> confdefs.h <<\EOF
3737 #define HAVE_UTIME 1
3738 EOF
3739 }
3740
3741 else
3742   echo "configure: failed program was:" >&5
3743   cat conftest.$ac_ext >&5
3744   rm -rf conftest*
3745   echo "$ac_t""no" 1>&6
3746       for ac_func in utimes
3747 do
3748 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3749 echo "configure:3750: checking for $ac_func" >&5
3750
3751 cat > conftest.$ac_ext <<EOF
3752 #line 3753 "configure"
3753 #include "confdefs.h"
3754 /* System header to define __stub macros and hopefully few prototypes,
3755     which can conflict with char $ac_func(); below.  */
3756 #include <assert.h>
3757 /* Override any gcc2 internal prototype to avoid an error.  */
3758 /* We use char because int might match the return type of a gcc2
3759     builtin and then its argument prototype would still apply.  */
3760 char $ac_func();
3761
3762 int main() {
3763
3764 /* The GNU C library defines this for functions which it implements
3765     to always fail with ENOSYS.  Some functions are actually named
3766     something starting with __ and the normal name is an alias.  */
3767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3768 choke me
3769 #else
3770 $ac_func();
3771 #endif
3772
3773 ; return 0; }
3774 EOF
3775 if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3776   rm -rf conftest*
3777   eval "ac_cv_func_$ac_func=yes"
3778 else
3779   echo "configure: failed program was:" >&5
3780   cat conftest.$ac_ext >&5
3781   rm -rf conftest*
3782   eval "ac_cv_func_$ac_func=no"
3783 fi
3784 rm -f conftest*
3785
3786 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3787   echo "$ac_t""yes" 1>&6
3788     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3789   { test "$extra_verbose" = "yes" && cat << EOF
3790     Defining $ac_tr_func
3791 EOF
3792 cat >> confdefs.h <<EOF
3793 #define $ac_tr_func 1
3794 EOF
3795 }
3796  
3797 else
3798   echo "$ac_t""no" 1>&6
3799 fi
3800 done
3801
3802 fi
3803 rm -f conftest*
3804
3805
3806 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3807 echo "configure:3808: checking return type of signal handlers" >&5
3808
3809 cat > conftest.$ac_ext <<EOF
3810 #line 3811 "configure"
3811 #include "confdefs.h"
3812 #include <sys/types.h>
3813 #include <signal.h>
3814 #ifdef signal
3815 #undef signal
3816 #endif
3817 #ifdef __cplusplus
3818 extern "C" void (*signal (int, void (*)(int)))(int);
3819 #else
3820 void (*signal ()) ();
3821 #endif
3822
3823 int main() {
3824 int i;
3825 ; return 0; }
3826 EOF
3827 if { (eval echo configure:3828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3828   rm -rf conftest*
3829   ac_cv_type_signal=void
3830 else
3831   echo "configure: failed program was:" >&5
3832   cat conftest.$ac_ext >&5
3833   rm -rf conftest*
3834   ac_cv_type_signal=int
3835 fi
3836 rm -f conftest*
3837
3838 echo "$ac_t""$ac_cv_type_signal" 1>&6
3839 { test "$extra_verbose" = "yes" && cat << EOF
3840     Defining RETSIGTYPE = $ac_cv_type_signal
3841 EOF
3842 cat >> confdefs.h <<EOF
3843 #define RETSIGTYPE $ac_cv_type_signal
3844 EOF
3845 }
3846
3847
3848 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3849 echo "configure:3850: checking for size_t" >&5
3850
3851 cat > conftest.$ac_ext <<EOF
3852 #line 3853 "configure"
3853 #include "confdefs.h"
3854 #include <sys/types.h>
3855 #if STDC_HEADERS
3856 #include <stdlib.h>
3857 #include <stddef.h>
3858 #endif
3859 EOF
3860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3861   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3862   rm -rf conftest*
3863   ac_cv_type_size_t=yes
3864 else
3865   rm -rf conftest*
3866   ac_cv_type_size_t=no
3867 fi
3868 rm -f conftest*
3869
3870 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3871 if test $ac_cv_type_size_t = no; then
3872   { test "$extra_verbose" = "yes" && cat << \EOF
3873     Defining size_t = unsigned
3874 EOF
3875 cat >> confdefs.h <<\EOF
3876 #define size_t unsigned
3877 EOF
3878 }
3879
3880 fi
3881
3882 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3883 echo "configure:3884: checking for pid_t" >&5
3884
3885 cat > conftest.$ac_ext <<EOF
3886 #line 3887 "configure"
3887 #include "confdefs.h"
3888 #include <sys/types.h>
3889 #if STDC_HEADERS
3890 #include <stdlib.h>
3891 #include <stddef.h>
3892 #endif
3893 EOF
3894 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3895   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3896   rm -rf conftest*
3897   ac_cv_type_pid_t=yes
3898 else
3899   rm -rf conftest*
3900   ac_cv_type_pid_t=no
3901 fi
3902 rm -f conftest*
3903
3904 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3905 if test $ac_cv_type_pid_t = no; then
3906   { test "$extra_verbose" = "yes" && cat << \EOF
3907     Defining pid_t = int
3908 EOF
3909 cat >> confdefs.h <<\EOF
3910 #define pid_t int
3911 EOF
3912 }
3913
3914 fi
3915
3916 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3917 echo "configure:3918: checking for uid_t in sys/types.h" >&5
3918
3919 cat > conftest.$ac_ext <<EOF
3920 #line 3921 "configure"
3921 #include "confdefs.h"
3922 #include <sys/types.h>
3923 EOF
3924 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3925   egrep "uid_t" >/dev/null 2>&1; then
3926   rm -rf conftest*
3927   ac_cv_type_uid_t=yes
3928 else
3929   rm -rf conftest*
3930   ac_cv_type_uid_t=no
3931 fi
3932 rm -f conftest*
3933
3934
3935 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3936 if test $ac_cv_type_uid_t = no; then
3937   { test "$extra_verbose" = "yes" && cat << \EOF
3938     Defining uid_t = int
3939 EOF
3940 cat >> confdefs.h <<\EOF
3941 #define uid_t int
3942 EOF
3943 }
3944
3945   { test "$extra_verbose" = "yes" && cat << \EOF
3946     Defining gid_t = int
3947 EOF
3948 cat >> confdefs.h <<\EOF
3949 #define gid_t int
3950 EOF
3951 }
3952
3953 fi
3954
3955 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3956 echo "configure:3957: checking for mode_t" >&5
3957
3958 cat > conftest.$ac_ext <<EOF
3959 #line 3960 "configure"
3960 #include "confdefs.h"
3961 #include <sys/types.h>
3962 #if STDC_HEADERS
3963 #include <stdlib.h>
3964 #include <stddef.h>
3965 #endif
3966 EOF
3967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3968   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3969   rm -rf conftest*
3970   ac_cv_type_mode_t=yes
3971 else
3972   rm -rf conftest*
3973   ac_cv_type_mode_t=no
3974 fi
3975 rm -f conftest*
3976
3977 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3978 if test $ac_cv_type_mode_t = no; then
3979   { test "$extra_verbose" = "yes" && cat << \EOF
3980     Defining mode_t = int
3981 EOF
3982 cat >> confdefs.h <<\EOF
3983 #define mode_t int
3984 EOF
3985 }
3986
3987 fi
3988
3989 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3990 echo "configure:3991: checking for off_t" >&5
3991
3992 cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995 #include <sys/types.h>
3996 #if STDC_HEADERS
3997 #include <stdlib.h>
3998 #include <stddef.h>
3999 #endif
4000 EOF
4001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4002   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4003   rm -rf conftest*
4004   ac_cv_type_off_t=yes
4005 else
4006   rm -rf conftest*
4007   ac_cv_type_off_t=no
4008 fi
4009 rm -f conftest*
4010
4011 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4012 if test $ac_cv_type_off_t = no; then
4013   { test "$extra_verbose" = "yes" && cat << \EOF
4014     Defining off_t = long
4015 EOF
4016 cat >> confdefs.h <<\EOF
4017 #define off_t long
4018 EOF
4019 }
4020
4021 fi
4022
4023 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4024 echo "configure:4025: checking for ssize_t" >&5
4025
4026 cat > conftest.$ac_ext <<EOF
4027 #line 4028 "configure"
4028 #include "confdefs.h"
4029 #include <sys/types.h>
4030 #if STDC_HEADERS
4031 #include <stdlib.h>
4032 #include <stddef.h>
4033 #endif
4034 EOF
4035 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4036   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4037   rm -rf conftest*
4038   ac_cv_type_ssize_t=yes
4039 else
4040   rm -rf conftest*
4041   ac_cv_type_ssize_t=no
4042 fi
4043 rm -f conftest*
4044
4045 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4046 if test $ac_cv_type_ssize_t = no; then
4047   { test "$extra_verbose" = "yes" && cat << \EOF
4048     Defining ssize_t = int
4049 EOF
4050 cat >> confdefs.h <<\EOF
4051 #define ssize_t int
4052 EOF
4053 }
4054
4055 fi
4056
4057
4058 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4059 echo "configure:4060: checking for socklen_t" >&5
4060 cat > conftest.$ac_ext <<EOF
4061 #line 4062 "configure"
4062 #include "confdefs.h"
4063 #include <sys/socket.h>
4064 socklen_t x;
4065
4066 int main() {
4067
4068 ; return 0; }
4069 EOF
4070 if { (eval echo configure:4071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4071   rm -rf conftest*
4072   echo "$ac_t""yes" 1>&6
4073 else
4074   echo "configure: failed program was:" >&5
4075   cat conftest.$ac_ext >&5
4076   rm -rf conftest*
4077   
4078 cat > conftest.$ac_ext <<EOF
4079 #line 4080 "configure"
4080 #include "confdefs.h"
4081 #include <sys/socket.h>
4082 int accept (int, struct sockaddr *, size_t *);
4083
4084 int main() {
4085
4086 ; return 0; }
4087 EOF
4088 if { (eval echo configure:4089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4089   rm -rf conftest*
4090   
4091 echo "$ac_t""size_t" 1>&6
4092 { test "$extra_verbose" = "yes" && cat << \EOF
4093     Defining socklen_t = size_t
4094 EOF
4095 cat >> confdefs.h <<\EOF
4096 #define socklen_t size_t
4097 EOF
4098 }
4099
4100 else
4101   echo "configure: failed program was:" >&5
4102   cat conftest.$ac_ext >&5
4103   rm -rf conftest*
4104   
4105 echo "$ac_t""int" 1>&6
4106 { test "$extra_verbose" = "yes" && cat << \EOF
4107     Defining socklen_t = int
4108 EOF
4109 cat >> confdefs.h <<\EOF
4110 #define socklen_t int
4111 EOF
4112 }
4113
4114 fi
4115 rm -f conftest*
4116 fi
4117 rm -f conftest*
4118
4119 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4120 echo "configure:4121: checking for struct timeval" >&5
4121 cat > conftest.$ac_ext <<EOF
4122 #line 4123 "configure"
4123 #include "confdefs.h"
4124 #ifdef TIME_WITH_SYS_TIME
4125 #include <sys/time.h>
4126 #include <time.h>
4127 #else
4128 #ifdef HAVE_SYS_TIME_H
4129 #include <sys/time.h>
4130 #else
4131 #include <time.h>
4132 #endif
4133 #endif
4134 int main() {
4135 static struct timeval x; x.tv_sec = x.tv_usec;
4136 ; return 0; }
4137 EOF
4138 if { (eval echo configure:4139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4139   rm -rf conftest*
4140   echo "$ac_t""yes" 1>&6
4141   HAVE_TIMEVAL=yes
4142   { test "$extra_verbose" = "yes" && cat << \EOF
4143     Defining HAVE_TIMEVAL
4144 EOF
4145 cat >> confdefs.h <<\EOF
4146 #define HAVE_TIMEVAL 1
4147 EOF
4148 }
4149
4150 else
4151   echo "configure: failed program was:" >&5
4152   cat conftest.$ac_ext >&5
4153   rm -rf conftest*
4154   echo "$ac_t""no" 1>&6
4155    HAVE_TIMEVAL=no
4156 fi
4157 rm -f conftest*
4158
4159 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4160 echo "configure:4161: checking whether struct tm is in sys/time.h or time.h" >&5
4161
4162 cat > conftest.$ac_ext <<EOF
4163 #line 4164 "configure"
4164 #include "confdefs.h"
4165 #include <sys/types.h>
4166 #include <time.h>
4167 int main() {
4168 struct tm *tp; tp->tm_sec;
4169 ; return 0; }
4170 EOF
4171 if { (eval echo configure:4172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4172   rm -rf conftest*
4173   ac_cv_struct_tm=time.h
4174 else
4175   echo "configure: failed program was:" >&5
4176   cat conftest.$ac_ext >&5
4177   rm -rf conftest*
4178   ac_cv_struct_tm=sys/time.h
4179 fi
4180 rm -f conftest*
4181
4182 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4183 if test $ac_cv_struct_tm = sys/time.h; then
4184   { test "$extra_verbose" = "yes" && cat << \EOF
4185     Defining TM_IN_SYS_TIME
4186 EOF
4187 cat >> confdefs.h <<\EOF
4188 #define TM_IN_SYS_TIME 1
4189 EOF
4190 }
4191
4192 fi
4193
4194 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4195 echo "configure:4196: checking for tm_zone in struct tm" >&5
4196
4197 cat > conftest.$ac_ext <<EOF
4198 #line 4199 "configure"
4199 #include "confdefs.h"
4200 #include <sys/types.h>
4201 #include <$ac_cv_struct_tm>
4202 int main() {
4203 struct tm tm; tm.tm_zone;
4204 ; return 0; }
4205 EOF
4206 if { (eval echo configure:4207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4207   rm -rf conftest*
4208   ac_cv_struct_tm_zone=yes
4209 else
4210   echo "configure: failed program was:" >&5
4211   cat conftest.$ac_ext >&5
4212   rm -rf conftest*
4213   ac_cv_struct_tm_zone=no
4214 fi
4215 rm -f conftest*
4216
4217 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4218 if test "$ac_cv_struct_tm_zone" = yes; then
4219   { test "$extra_verbose" = "yes" && cat << \EOF
4220     Defining HAVE_TM_ZONE
4221 EOF
4222 cat >> confdefs.h <<\EOF
4223 #define HAVE_TM_ZONE 1
4224 EOF
4225 }
4226
4227 else
4228   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4229 echo "configure:4230: checking for tzname" >&5
4230
4231 cat > conftest.$ac_ext <<EOF
4232 #line 4233 "configure"
4233 #include "confdefs.h"
4234 #include <time.h>
4235 #ifndef tzname /* For SGI.  */
4236 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4237 #endif
4238 int main() {
4239 atoi(*tzname);
4240 ; return 0; }
4241 EOF
4242 if { (eval echo configure:4243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4243   rm -rf conftest*
4244   ac_cv_var_tzname=yes
4245 else
4246   echo "configure: failed program was:" >&5
4247   cat conftest.$ac_ext >&5
4248   rm -rf conftest*
4249   ac_cv_var_tzname=no
4250 fi
4251 rm -f conftest*
4252
4253 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4254   if test $ac_cv_var_tzname = yes; then
4255     { test "$extra_verbose" = "yes" && cat << \EOF
4256     Defining HAVE_TZNAME
4257 EOF
4258 cat >> confdefs.h <<\EOF
4259 #define HAVE_TZNAME 1
4260 EOF
4261 }
4262
4263   fi
4264 fi
4265
4266
4267 echo $ac_n "checking for working const""... $ac_c" 1>&6
4268 echo "configure:4269: checking for working const" >&5
4269
4270 cat > conftest.$ac_ext <<EOF
4271 #line 4272 "configure"
4272 #include "confdefs.h"
4273
4274 int main() {
4275
4276 /* Ultrix mips cc rejects this.  */
4277 typedef int charset[2]; const charset x;
4278 /* SunOS 4.1.1 cc rejects this.  */
4279 char const *const *ccp;
4280 char **p;
4281 /* NEC SVR4.0.2 mips cc rejects this.  */
4282 struct point {int x, y;};
4283 static struct point const zero = {0,0};
4284 /* AIX XL C 1.02.0.0 rejects this.
4285    It does not let you subtract one const X* pointer from another in an arm
4286    of an if-expression whose if-part is not a constant expression */
4287 const char *g = "string";
4288 ccp = &g + (g ? g-g : 0);
4289 /* HPUX 7.0 cc rejects these. */
4290 ++ccp;
4291 p = (char**) ccp;
4292 ccp = (char const *const *) p;
4293 { /* SCO 3.2v4 cc rejects this.  */
4294   char *t;
4295   char const *s = 0 ? (char *) 0 : (char const *) 0;
4296
4297   *t++ = 0;
4298 }
4299 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4300   int x[] = {25, 17};
4301   const int *foo = &x[0];
4302   ++foo;
4303 }
4304 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4305   typedef const int *iptr;
4306   iptr p = 0;
4307   ++p;
4308 }
4309 { /* AIX XL C 1.02.0.0 rejects this saying
4310      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4311   struct s { int j; const int *ap[3]; };
4312   struct s *b; b->j = 5;
4313 }
4314 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4315   const int foo = 10;
4316 }
4317
4318 ; return 0; }
4319 EOF
4320 if { (eval echo configure:4321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4321   rm -rf conftest*
4322   ac_cv_c_const=yes
4323 else
4324   echo "configure: failed program was:" >&5
4325   cat conftest.$ac_ext >&5
4326   rm -rf conftest*
4327   ac_cv_c_const=no
4328 fi
4329 rm -f conftest*
4330
4331 echo "$ac_t""$ac_cv_c_const" 1>&6
4332 if test $ac_cv_c_const = no; then
4333   { test "$extra_verbose" = "yes" && cat << \EOF
4334     Defining const = 
4335 EOF
4336 cat >> confdefs.h <<\EOF
4337 #define const 
4338 EOF
4339 }
4340
4341 fi
4342
4343
4344 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4345 echo "configure:4346: checking whether ${MAKE-make} sets \${MAKE}" >&5
4346 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4347
4348 cat > conftestmake <<\EOF
4349 all:
4350         @echo 'ac_maketemp="${MAKE}"'
4351 EOF
4352 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4353 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4354 if test -n "$ac_maketemp"; then
4355   eval ac_cv_prog_make_${ac_make}_set=yes
4356 else
4357   eval ac_cv_prog_make_${ac_make}_set=no
4358 fi
4359 rm -f conftestmake
4360 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4361   echo "$ac_t""yes" 1>&6
4362   SET_MAKE=
4363 else
4364   echo "$ac_t""no" 1>&6
4365   SET_MAKE="MAKE=${MAKE-make}"
4366 fi
4367
4368
4369 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4370 echo "configure:4371: checking whether byte ordering is bigendian" >&5
4371
4372 ac_cv_c_bigendian=unknown
4373 # See if sys/param.h defines the BYTE_ORDER macro.
4374 cat > conftest.$ac_ext <<EOF
4375 #line 4376 "configure"
4376 #include "confdefs.h"
4377 #include <sys/types.h>
4378 #include <sys/param.h>
4379 int main() {
4380
4381 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4382  bogus endian macros
4383 #endif
4384 ; return 0; }
4385 EOF
4386 if { (eval echo configure:4387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4387   rm -rf conftest*
4388   # It does; now see whether it defined to BIG_ENDIAN or not.
4389 cat > conftest.$ac_ext <<EOF
4390 #line 4391 "configure"
4391 #include "confdefs.h"
4392 #include <sys/types.h>
4393 #include <sys/param.h>
4394 int main() {
4395
4396 #if BYTE_ORDER != BIG_ENDIAN
4397  not big endian
4398 #endif
4399 ; return 0; }
4400 EOF
4401 if { (eval echo configure:4402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4402   rm -rf conftest*
4403   ac_cv_c_bigendian=yes
4404 else
4405   echo "configure: failed program was:" >&5
4406   cat conftest.$ac_ext >&5
4407   rm -rf conftest*
4408   ac_cv_c_bigendian=no
4409 fi
4410 rm -f conftest*
4411 else
4412   echo "configure: failed program was:" >&5
4413   cat conftest.$ac_ext >&5
4414 fi
4415 rm -f conftest*
4416 if test $ac_cv_c_bigendian = unknown; then
4417 cat > conftest.$ac_ext <<EOF
4418 #line 4419 "configure"
4419 #include "confdefs.h"
4420 main () {
4421   /* Are we little or big endian?  From Harbison&Steele.  */
4422   union
4423   {
4424     long l;
4425     char c[sizeof (long)];
4426   } u;
4427   u.l = 1;
4428   exit (u.c[sizeof (long) - 1] == 1);
4429 }
4430 EOF
4431 if { (eval echo configure:4432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4432 then
4433   ac_cv_c_bigendian=no
4434 else
4435   conftest_rc="$?"
4436   echo "configure: failed program was:" >&5
4437   cat conftest.$ac_ext >&5
4438   rm -fr conftest*
4439   ac_cv_c_bigendian=yes
4440 fi
4441 rm -fr conftest*
4442 fi
4443
4444 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4445 if test $ac_cv_c_bigendian = yes; then
4446   { test "$extra_verbose" = "yes" && cat << \EOF
4447     Defining WORDS_BIGENDIAN
4448 EOF
4449 cat >> confdefs.h <<\EOF
4450 #define WORDS_BIGENDIAN 1
4451 EOF
4452 }
4453
4454 fi
4455
4456
4457 echo $ac_n "checking size of short""... $ac_c" 1>&6
4458 echo "configure:4459: checking size of short" >&5
4459
4460 cat > conftest.$ac_ext <<EOF
4461 #line 4462 "configure"
4462 #include "confdefs.h"
4463 #include <stdio.h>
4464 #include <sys/types.h>
4465 main()
4466 {
4467   FILE *f=fopen("conftestval", "w");
4468   if (!f) exit(1);
4469   fprintf(f, "%d\n", sizeof(short));
4470   exit(0);
4471 }
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4474 then
4475   ac_cv_sizeof_short=`cat conftestval`
4476 else
4477   conftest_rc="$?"
4478   echo "configure: failed program was:" >&5
4479   cat conftest.$ac_ext >&5
4480   rm -fr conftest*
4481   ac_cv_sizeof_short=0
4482 fi
4483 rm -fr conftest*
4484 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4485 { test "$extra_verbose" = "yes" && cat << EOF
4486     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4487 EOF
4488 cat >> confdefs.h <<EOF
4489 #define SIZEOF_SHORT $ac_cv_sizeof_short
4490 EOF
4491 }
4492
4493
4494 if test "$ac_cv_sizeof_short" = 0; then
4495   echo ""
4496   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4497   echo "*** PANIC *** Please examine config.log for compilation errors."
4498   exit 1
4499 fi
4500 echo $ac_n "checking size of int""... $ac_c" 1>&6
4501 echo "configure:4502: checking size of int" >&5
4502
4503 cat > conftest.$ac_ext <<EOF
4504 #line 4505 "configure"
4505 #include "confdefs.h"
4506 #include <stdio.h>
4507 #include <sys/types.h>
4508 main()
4509 {
4510   FILE *f=fopen("conftestval", "w");
4511   if (!f) exit(1);
4512   fprintf(f, "%d\n", sizeof(int));
4513   exit(0);
4514 }
4515 EOF
4516 if { (eval echo configure:4517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4517 then
4518   ac_cv_sizeof_int=`cat conftestval`
4519 else
4520   conftest_rc="$?"
4521   echo "configure: failed program was:" >&5
4522   cat conftest.$ac_ext >&5
4523   rm -fr conftest*
4524   ac_cv_sizeof_int=0
4525 fi
4526 rm -fr conftest*
4527 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4528 { test "$extra_verbose" = "yes" && cat << EOF
4529     Defining SIZEOF_INT = $ac_cv_sizeof_int
4530 EOF
4531 cat >> confdefs.h <<EOF
4532 #define SIZEOF_INT $ac_cv_sizeof_int
4533 EOF
4534 }
4535
4536
4537 echo $ac_n "checking size of long""... $ac_c" 1>&6
4538 echo "configure:4539: checking size of long" >&5
4539
4540 cat > conftest.$ac_ext <<EOF
4541 #line 4542 "configure"
4542 #include "confdefs.h"
4543 #include <stdio.h>
4544 #include <sys/types.h>
4545 main()
4546 {
4547   FILE *f=fopen("conftestval", "w");
4548   if (!f) exit(1);
4549   fprintf(f, "%d\n", sizeof(long));
4550   exit(0);
4551 }
4552 EOF
4553 if { (eval echo configure:4554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4554 then
4555   ac_cv_sizeof_long=`cat conftestval`
4556 else
4557   conftest_rc="$?"
4558   echo "configure: failed program was:" >&5
4559   cat conftest.$ac_ext >&5
4560   rm -fr conftest*
4561   ac_cv_sizeof_long=0
4562 fi
4563 rm -fr conftest*
4564 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4565 { test "$extra_verbose" = "yes" && cat << EOF
4566     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4567 EOF
4568 cat >> confdefs.h <<EOF
4569 #define SIZEOF_LONG $ac_cv_sizeof_long
4570 EOF
4571 }
4572
4573
4574 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4575 echo "configure:4576: checking size of long long" >&5
4576
4577 cat > conftest.$ac_ext <<EOF
4578 #line 4579 "configure"
4579 #include "confdefs.h"
4580 #include <stdio.h>
4581 #include <sys/types.h>
4582 main()
4583 {
4584   FILE *f=fopen("conftestval", "w");
4585   if (!f) exit(1);
4586   fprintf(f, "%d\n", sizeof(long long));
4587   exit(0);
4588 }
4589 EOF
4590 if { (eval echo configure:4591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4591 then
4592   ac_cv_sizeof_long_long=`cat conftestval`
4593 else
4594   conftest_rc="$?"
4595   echo "configure: failed program was:" >&5
4596   cat conftest.$ac_ext >&5
4597   rm -fr conftest*
4598   ac_cv_sizeof_long_long=0
4599 fi
4600 rm -fr conftest*
4601 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4602 { test "$extra_verbose" = "yes" && cat << EOF
4603     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4604 EOF
4605 cat >> confdefs.h <<EOF
4606 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4607 EOF
4608 }
4609
4610
4611 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4612 echo "configure:4613: checking size of void *" >&5
4613
4614 cat > conftest.$ac_ext <<EOF
4615 #line 4616 "configure"
4616 #include "confdefs.h"
4617 #include <stdio.h>
4618 #include <sys/types.h>
4619 main()
4620 {
4621   FILE *f=fopen("conftestval", "w");
4622   if (!f) exit(1);
4623   fprintf(f, "%d\n", sizeof(void *));
4624   exit(0);
4625 }
4626 EOF
4627 if { (eval echo configure:4628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4628 then
4629   ac_cv_sizeof_void_p=`cat conftestval`
4630 else
4631   conftest_rc="$?"
4632   echo "configure: failed program was:" >&5
4633   cat conftest.$ac_ext >&5
4634   rm -fr conftest*
4635   ac_cv_sizeof_void_p=0
4636 fi
4637 rm -fr conftest*
4638 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4639 { test "$extra_verbose" = "yes" && cat << EOF
4640     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4641 EOF
4642 cat >> confdefs.h <<EOF
4643 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4644 EOF
4645 }
4646
4647
4648
4649 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4650 echo "configure:4651: checking for long file names" >&5
4651
4652 ac_cv_sys_long_file_names=yes
4653 # Test for long file names in all the places we know might matter:
4654 #      .                the current directory, where building will happen
4655 #      $prefix/lib      where we will be installing things
4656 #      $exec_prefix/lib likewise
4657 # eval it to expand exec_prefix.
4658 #      $TMPDIR          if set, where it might want to write temporary files
4659 # if $TMPDIR is not set:
4660 #      /tmp             where it might want to write temporary files
4661 #      /var/tmp         likewise
4662 #      /usr/tmp         likewise
4663 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4664   ac_tmpdirs="$TMPDIR"
4665 else
4666   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4667 fi
4668 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4669   test -d $ac_dir || continue
4670   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4671   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4672   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4673   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4674   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4675     ac_cv_sys_long_file_names=no
4676     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4677     break
4678   fi
4679   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4680 done
4681
4682 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4683 if test $ac_cv_sys_long_file_names = yes; then
4684   { test "$extra_verbose" = "yes" && cat << \EOF
4685     Defining HAVE_LONG_FILE_NAMES
4686 EOF
4687 cat >> confdefs.h <<\EOF
4688 #define HAVE_LONG_FILE_NAMES 1
4689 EOF
4690 }
4691
4692 fi
4693
4694
4695 echo $ac_n "checking for sin""... $ac_c" 1>&6
4696 echo "configure:4697: checking for sin" >&5
4697
4698 cat > conftest.$ac_ext <<EOF
4699 #line 4700 "configure"
4700 #include "confdefs.h"
4701 /* System header to define __stub macros and hopefully few prototypes,
4702     which can conflict with char sin(); below.  */
4703 #include <assert.h>
4704 /* Override any gcc2 internal prototype to avoid an error.  */
4705 /* We use char because int might match the return type of a gcc2
4706     builtin and then its argument prototype would still apply.  */
4707 char sin();
4708
4709 int main() {
4710
4711 /* The GNU C library defines this for functions which it implements
4712     to always fail with ENOSYS.  Some functions are actually named
4713     something starting with __ and the normal name is an alias.  */
4714 #if defined (__stub_sin) || defined (__stub___sin)
4715 choke me
4716 #else
4717 sin();
4718 #endif
4719
4720 ; return 0; }
4721 EOF
4722 if { (eval echo configure:4723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4723   rm -rf conftest*
4724   eval "ac_cv_func_sin=yes"
4725 else
4726   echo "configure: failed program was:" >&5
4727   cat conftest.$ac_ext >&5
4728   rm -rf conftest*
4729   eval "ac_cv_func_sin=no"
4730 fi
4731 rm -f conftest*
4732
4733 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4734   echo "$ac_t""yes" 1>&6
4735   :
4736 else
4737   echo "$ac_t""no" 1>&6
4738
4739 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4740 echo "configure:4741: checking for sin in -lm" >&5
4741 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4742
4743 xe_check_libs=" -lm "
4744 cat > conftest.$ac_ext <<EOF
4745 #line 4746 "configure"
4746 #include "confdefs.h"
4747 /* Override any gcc2 internal prototype to avoid an error.  */
4748 /* We use char because int might match the return type of a gcc2
4749     builtin and then its argument prototype would still apply.  */
4750 char sin();
4751
4752 int main() {
4753 sin()
4754 ; return 0; }
4755 EOF
4756 if { (eval echo configure:4757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4757   rm -rf conftest*
4758   eval "ac_cv_lib_$ac_lib_var=yes"
4759 else
4760   echo "configure: failed program was:" >&5
4761   cat conftest.$ac_ext >&5
4762   rm -rf conftest*
4763   eval "ac_cv_lib_$ac_lib_var=no"
4764 fi
4765 rm -f conftest*
4766 xe_check_libs=""
4767
4768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4769   echo "$ac_t""yes" 1>&6
4770     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4771     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4772   { test "$extra_verbose" = "yes" && cat << EOF
4773     Defining $ac_tr_lib
4774 EOF
4775 cat >> confdefs.h <<EOF
4776 #define $ac_tr_lib 1
4777 EOF
4778 }
4779
4780   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4781
4782 else
4783   echo "$ac_t""no" 1>&6
4784 fi
4785
4786
4787 fi
4788
4789
4790 { test "$extra_verbose" = "yes" && cat << \EOF
4791     Defining LISP_FLOAT_TYPE
4792 EOF
4793 cat >> confdefs.h <<\EOF
4794 #define LISP_FLOAT_TYPE 1
4795 EOF
4796 }
4797
4798
4799 cat > conftest.$ac_ext <<EOF
4800 #line 4801 "configure"
4801 #include "confdefs.h"
4802 #include <math.h>
4803 int main() {
4804 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4805 ; return 0; }
4806 EOF
4807 if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4808   rm -rf conftest*
4809   { test "$extra_verbose" = "yes" && cat << \EOF
4810     Defining HAVE_INVERSE_HYPERBOLIC
4811 EOF
4812 cat >> confdefs.h <<\EOF
4813 #define HAVE_INVERSE_HYPERBOLIC 1
4814 EOF
4815 }
4816
4817 else
4818   echo "configure: failed program was:" >&5
4819   cat conftest.$ac_ext >&5
4820 fi
4821 rm -f conftest*
4822
4823 echo "checking type of mail spool file locking" 1>&6
4824 echo "configure:4825: checking type of mail spool file locking" >&5
4825 for ac_func in lockf flock
4826 do
4827 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4828 echo "configure:4829: checking for $ac_func" >&5
4829
4830 cat > conftest.$ac_ext <<EOF
4831 #line 4832 "configure"
4832 #include "confdefs.h"
4833 /* System header to define __stub macros and hopefully few prototypes,
4834     which can conflict with char $ac_func(); below.  */
4835 #include <assert.h>
4836 /* Override any gcc2 internal prototype to avoid an error.  */
4837 /* We use char because int might match the return type of a gcc2
4838     builtin and then its argument prototype would still apply.  */
4839 char $ac_func();
4840
4841 int main() {
4842
4843 /* The GNU C library defines this for functions which it implements
4844     to always fail with ENOSYS.  Some functions are actually named
4845     something starting with __ and the normal name is an alias.  */
4846 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4847 choke me
4848 #else
4849 $ac_func();
4850 #endif
4851
4852 ; return 0; }
4853 EOF
4854 if { (eval echo configure:4855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4855   rm -rf conftest*
4856   eval "ac_cv_func_$ac_func=yes"
4857 else
4858   echo "configure: failed program was:" >&5
4859   cat conftest.$ac_ext >&5
4860   rm -rf conftest*
4861   eval "ac_cv_func_$ac_func=no"
4862 fi
4863 rm -f conftest*
4864
4865 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4866   echo "$ac_t""yes" 1>&6
4867     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4868   { test "$extra_verbose" = "yes" && cat << EOF
4869     Defining $ac_tr_func
4870 EOF
4871 cat >> confdefs.h <<EOF
4872 #define $ac_tr_func 1
4873 EOF
4874 }
4875  
4876 else
4877   echo "$ac_t""no" 1>&6
4878 fi
4879 done
4880
4881 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4882 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4883 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4884 if   test -z "$mail_locking"; then
4885   case "$opsys" in cygwin* | mingw*)
4886     mail_locking=pop ;;
4887   esac
4888 fi
4889
4890 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4891     Defining MAIL_LOCK_LOCKF
4892 EOF
4893 cat >> confdefs.h <<\EOF
4894 #define MAIL_LOCK_LOCKF 1
4895 EOF
4896 }
4897
4898 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4899     Defining MAIL_LOCK_FLOCK
4900 EOF
4901 cat >> confdefs.h <<\EOF
4902 #define MAIL_LOCK_FLOCK 1
4903 EOF
4904 }
4905
4906 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4907     Defining MAIL_LOCK_LOCKING
4908 EOF
4909 cat >> confdefs.h <<\EOF
4910 #define MAIL_LOCK_LOCKING 1
4911 EOF
4912 }
4913
4914 elif test "$mail_locking" = "pop"; then
4915   with_pop=yes
4916   mail_locking=
4917 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4918     Defining MAIL_LOCK_DOT
4919 EOF
4920 cat >> confdefs.h <<\EOF
4921 #define MAIL_LOCK_DOT 1
4922 EOF
4923 }
4924
4925 fi
4926 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4927   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4928 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4929   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4930 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4931   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4932
4933 case "$opsys" in decosf*)
4934   
4935 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4936 echo "configure:4937: checking for cma_open in -lpthreads" >&5
4937 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4938
4939 xe_check_libs=" -lpthreads "
4940 cat > conftest.$ac_ext <<EOF
4941 #line 4942 "configure"
4942 #include "confdefs.h"
4943 /* Override any gcc2 internal prototype to avoid an error.  */
4944 /* We use char because int might match the return type of a gcc2
4945     builtin and then its argument prototype would still apply.  */
4946 char cma_open();
4947
4948 int main() {
4949 cma_open()
4950 ; return 0; }
4951 EOF
4952 if { (eval echo configure:4953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4953   rm -rf conftest*
4954   eval "ac_cv_lib_$ac_lib_var=yes"
4955 else
4956   echo "configure: failed program was:" >&5
4957   cat conftest.$ac_ext >&5
4958   rm -rf conftest*
4959   eval "ac_cv_lib_$ac_lib_var=no"
4960 fi
4961 rm -f conftest*
4962 xe_check_libs=""
4963
4964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4965   echo "$ac_t""yes" 1>&6
4966     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4967     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4968   { test "$extra_verbose" = "yes" && cat << EOF
4969     Defining $ac_tr_lib
4970 EOF
4971 cat >> confdefs.h <<EOF
4972 #define $ac_tr_lib 1
4973 EOF
4974 }
4975
4976   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4977
4978 else
4979   echo "$ac_t""no" 1>&6
4980 fi
4981
4982
4983   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4984     c_switch_site="$c_switch_site -threads" ;;
4985 esac
4986
4987
4988 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4989 echo "configure:4990: checking whether the -xildoff compiler flag is required" >&5
4990 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4991   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4992     then echo "$ac_t""no" 1>&6;
4993     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
4994   fi
4995   else echo "$ac_t""no" 1>&6
4996 fi
4997
4998 if test "$opsys" = "sol2"; then
4999   if test "$os_release" -ge 56; then
5000     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5001 echo "configure:5002: checking for \"-z ignore\" linker flag" >&5
5002     case "`ld -h 2>&1`" in
5003       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5004         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5005       *) echo "$ac_t""no" 1>&6 ;;
5006     esac
5007   fi
5008 fi
5009
5010 if test "$pdump" != "yes"; then
5011   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
5012 echo "configure:5013: checking for \"-z nocombreloc\" linker flag" >&5
5013   case "`ld --help 2>&1`" in
5014     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
5015       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
5016     *) echo "$ac_t""no" 1>&6 ;;
5017   esac
5018 fi
5019
5020
5021 echo "checking "for specified window system"" 1>&6
5022 echo "configure:5023: checking "for specified window system"" >&5
5023
5024
5025 GNOME_CONFIG=no
5026 GTK_CONFIG=no
5027
5028 if test "$with_gnome" != "no"; then
5029    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5030 echo "configure:5031: checking for GNOME configuration script" >&5
5031    for possible in gnome-config
5032    do
5033       possible_version=`${possible} --version 2> /dev/null`
5034       if test "x${possible_version}" != "x"; then
5035               GNOME_CONFIG="${possible}"
5036               with_gnome=yes
5037               with_gtk=yes
5038               break
5039       fi
5040    done
5041    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5042 fi
5043
5044 if test "${GNOME_CONFIG}" != "no"; then
5045       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5046       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5047       { test "$extra_verbose" = "yes" && cat << \EOF
5048     Defining HAVE_GNOME
5049 EOF
5050 cat >> confdefs.h <<\EOF
5051 #define HAVE_GNOME 1
5052 EOF
5053 }
5054
5055       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5056       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5057 fi
5058
5059 if test "$with_gtk" != "no";then
5060    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5061 echo "configure:5062: checking for GTK configuration script" >&5
5062    for possible in gtk12-config gtk14-config gtk-config
5063    do
5064       possible_version=`${possible} --version 2> /dev/null`
5065       if test "x${possible_version}" != "x"; then
5066               GTK_CONFIG="${possible}"
5067       fi
5068       case "${possible_version}" in
5069         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5070         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5071         1.2.*)
5072                 with_gtk=yes
5073                 break
5074                 ;;
5075         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5076       esac
5077    done
5078    echo "$ac_t""${GTK_CONFIG}" 1>&6
5079 fi
5080
5081 if test "${GTK_CONFIG}" != "no"; then
5082       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5083 echo "configure:5084: checking gtk version" >&5
5084       GTK_VERSION=`${GTK_CONFIG} --version`
5085       echo "$ac_t""${GTK_VERSION}" 1>&6
5086
5087       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5088 echo "configure:5089: checking gtk libs" >&5
5089       GTK_LIBS=`${GTK_CONFIG} --libs`
5090       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5091       echo "$ac_t""${GTK_LIBS}" 1>&6
5092
5093       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5094 echo "configure:5095: checking gtk cflags" >&5
5095       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5096       if test "$GCC" = "yes"; then
5097         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5098       fi
5099       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5100       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5101
5102       
5103 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5104 echo "configure:5105: checking for main in -lgdk_imlib" >&5
5105 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5106
5107 xe_check_libs=" -lgdk_imlib "
5108 cat > conftest.$ac_ext <<EOF
5109 #line 5110 "configure"
5110 #include "confdefs.h"
5111
5112 int main() {
5113 main()
5114 ; return 0; }
5115 EOF
5116 if { (eval echo configure:5117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5117   rm -rf conftest*
5118   eval "ac_cv_lib_$ac_lib_var=yes"
5119 else
5120   echo "configure: failed program was:" >&5
5121   cat conftest.$ac_ext >&5
5122   rm -rf conftest*
5123   eval "ac_cv_lib_$ac_lib_var=no"
5124 fi
5125 rm -f conftest*
5126 xe_check_libs=""
5127
5128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5129   echo "$ac_t""yes" 1>&6
5130   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5131 else
5132   echo "$ac_t""no" 1>&6
5133 fi
5134
5135
5136       
5137 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5138 echo "configure:5139: checking for Imlib_init in -lImlib" >&5
5139 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5140
5141 xe_check_libs=" -lImlib "
5142 cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145 /* Override any gcc2 internal prototype to avoid an error.  */
5146 /* We use char because int might match the return type of a gcc2
5147     builtin and then its argument prototype would still apply.  */
5148 char Imlib_init();
5149
5150 int main() {
5151 Imlib_init()
5152 ; return 0; }
5153 EOF
5154 if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5155   rm -rf conftest*
5156   eval "ac_cv_lib_$ac_lib_var=yes"
5157 else
5158   echo "configure: failed program was:" >&5
5159   cat conftest.$ac_ext >&5
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=no"
5162 fi
5163 rm -f conftest*
5164 xe_check_libs=""
5165
5166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5167   echo "$ac_t""yes" 1>&6
5168   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5169 else
5170   echo "$ac_t""no" 1>&6
5171 fi
5172
5173
5174       for ac_func in gdk_imlib_init
5175 do
5176 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5177 echo "configure:5178: checking for $ac_func" >&5
5178
5179 cat > conftest.$ac_ext <<EOF
5180 #line 5181 "configure"
5181 #include "confdefs.h"
5182 /* System header to define __stub macros and hopefully few prototypes,
5183     which can conflict with char $ac_func(); below.  */
5184 #include <assert.h>
5185 /* Override any gcc2 internal prototype to avoid an error.  */
5186 /* We use char because int might match the return type of a gcc2
5187     builtin and then its argument prototype would still apply.  */
5188 char $ac_func();
5189
5190 int main() {
5191
5192 /* The GNU C library defines this for functions which it implements
5193     to always fail with ENOSYS.  Some functions are actually named
5194     something starting with __ and the normal name is an alias.  */
5195 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5196 choke me
5197 #else
5198 $ac_func();
5199 #endif
5200
5201 ; return 0; }
5202 EOF
5203 if { (eval echo configure:5204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5204   rm -rf conftest*
5205   eval "ac_cv_func_$ac_func=yes"
5206 else
5207   echo "configure: failed program was:" >&5
5208   cat conftest.$ac_ext >&5
5209   rm -rf conftest*
5210   eval "ac_cv_func_$ac_func=no"
5211 fi
5212 rm -f conftest*
5213
5214 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5215   echo "$ac_t""yes" 1>&6
5216     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5217   { test "$extra_verbose" = "yes" && cat << EOF
5218     Defining $ac_tr_func
5219 EOF
5220 cat >> confdefs.h <<EOF
5221 #define $ac_tr_func 1
5222 EOF
5223 }
5224  
5225 else
5226   echo "$ac_t""no" 1>&6
5227 fi
5228 done
5229
5230
5231       { test "$extra_verbose" = "yes" && cat << \EOF
5232     Defining HAVE_XPM
5233 EOF
5234 cat >> confdefs.h <<\EOF
5235 #define HAVE_XPM 1
5236 EOF
5237 }
5238
5239       { test "$extra_verbose" = "yes" && cat << \EOF
5240     Defining HAVE_GTK
5241 EOF
5242 cat >> confdefs.h <<\EOF
5243 #define HAVE_GTK 1
5244 EOF
5245 }
5246
5247       
5248
5249       window_system=gtk
5250       with_gtk=yes
5251       with_x11=no
5252
5253       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5254       test "${with_toolbars}" != no && with_toolbars=gtk
5255       test "${with_menubars}" != "no" && with_menubars=gtk
5256       test "${with_dialogs}" != "no" && with_dialogs=gtk
5257       test "${with_widgets}" != "no" && with_widgets=gtk
5258
5259       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5260    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5261  fi
5262       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5263    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5264  fi
5265       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5266    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5267  fi
5268       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5269    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5270  fi
5271
5272             OLD_CFLAGS="${CFLAGS}"
5273       OLD_CPPFLAGS="${CPPFLAGS}"
5274       OLD_LDFLAGS="${LDFLAGS}"
5275       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5276       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5277       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5278       for ac_hdr in glade/glade.h glade.h
5279 do
5280 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5281 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5282 echo "configure:5283: checking for $ac_hdr" >&5
5283
5284 cat > conftest.$ac_ext <<EOF
5285 #line 5286 "configure"
5286 #include "confdefs.h"
5287 #include <$ac_hdr>
5288 EOF
5289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5290 { (eval echo configure:5291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5292 if test -z "$ac_err"; then
5293   rm -rf conftest*
5294   eval "ac_cv_header_$ac_safe=yes"
5295 else
5296   echo "$ac_err" >&5
5297   echo "configure: failed program was:" >&5
5298   cat conftest.$ac_ext >&5
5299   rm -rf conftest*
5300   eval "ac_cv_header_$ac_safe=no"
5301 fi
5302 rm -f conftest*
5303 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5304   echo "$ac_t""yes" 1>&6
5305     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5306   { test "$extra_verbose" = "yes" && cat << EOF
5307     Defining $ac_tr_hdr
5308 EOF
5309 cat >> confdefs.h <<EOF
5310 #define $ac_tr_hdr 1
5311 EOF
5312 }
5313  
5314 else
5315   echo "$ac_t""no" 1>&6
5316 fi
5317 done
5318
5319       
5320 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5321 echo "configure:5322: checking for main in -lxml" >&5
5322 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5323
5324 xe_check_libs=" -lxml "
5325 cat > conftest.$ac_ext <<EOF
5326 #line 5327 "configure"
5327 #include "confdefs.h"
5328
5329 int main() {
5330 main()
5331 ; return 0; }
5332 EOF
5333 if { (eval echo configure:5334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5334   rm -rf conftest*
5335   eval "ac_cv_lib_$ac_lib_var=yes"
5336 else
5337   echo "configure: failed program was:" >&5
5338   cat conftest.$ac_ext >&5
5339   rm -rf conftest*
5340   eval "ac_cv_lib_$ac_lib_var=no"
5341 fi
5342 rm -f conftest*
5343 xe_check_libs=""
5344
5345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5346   echo "$ac_t""yes" 1>&6
5347   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5348 else
5349   echo "$ac_t""no" 1>&6
5350 fi
5351
5352
5353       
5354 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5355 echo "configure:5356: checking for main in -lglade" >&5
5356 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5357
5358 xe_check_libs=" -lglade "
5359 cat > conftest.$ac_ext <<EOF
5360 #line 5361 "configure"
5361 #include "confdefs.h"
5362
5363 int main() {
5364 main()
5365 ; return 0; }
5366 EOF
5367 if { (eval echo configure:5368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5368   rm -rf conftest*
5369   eval "ac_cv_lib_$ac_lib_var=yes"
5370 else
5371   echo "configure: failed program was:" >&5
5372   cat conftest.$ac_ext >&5
5373   rm -rf conftest*
5374   eval "ac_cv_lib_$ac_lib_var=no"
5375 fi
5376 rm -f conftest*
5377 xe_check_libs=""
5378
5379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5380   echo "$ac_t""yes" 1>&6
5381   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5382 else
5383   echo "$ac_t""no" 1>&6
5384 fi
5385
5386
5387       
5388 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5389 echo "configure:5390: checking for main in -lglade-gnome" >&5
5390 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5391
5392 xe_check_libs=" -lglade-gnome "
5393 cat > conftest.$ac_ext <<EOF
5394 #line 5395 "configure"
5395 #include "confdefs.h"
5396
5397 int main() {
5398 main()
5399 ; return 0; }
5400 EOF
5401 if { (eval echo configure:5402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5402   rm -rf conftest*
5403   eval "ac_cv_lib_$ac_lib_var=yes"
5404 else
5405   echo "configure: failed program was:" >&5
5406   cat conftest.$ac_ext >&5
5407   rm -rf conftest*
5408   eval "ac_cv_lib_$ac_lib_var=no"
5409 fi
5410 rm -f conftest*
5411 xe_check_libs=""
5412
5413 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5414   echo "$ac_t""yes" 1>&6
5415   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5416 else
5417   echo "$ac_t""no" 1>&6
5418 fi
5419
5420
5421       cat > conftest.$ac_ext <<EOF
5422 #line 5423 "configure"
5423 #include "confdefs.h"
5424 #include <glade/glade-xml.h>
5425 EOF
5426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5427   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5428   rm -rf conftest*
5429   echo "$ac_t""yes" 1>&6
5430                        { test "$extra_verbose" = "yes" && cat << \EOF
5431     Defining LIBGLADE_XML_TXTDOMAIN = 1
5432 EOF
5433 cat >> confdefs.h <<\EOF
5434 #define LIBGLADE_XML_TXTDOMAIN 1
5435 EOF
5436 }
5437
5438 else
5439   rm -rf conftest*
5440   echo "$ac_t""no" 1>&6
5441 fi
5442 rm -f conftest*
5443
5444       CFLAGS="${OLD_CFLAGS}"
5445       CPPFLAGS="${OLD_CPPFLAGS}"
5446       LDFLAGS="${OLD_LDFLAGS}"
5447 fi
5448
5449
5450 if test "$with_x11" != "no"; then
5451     test "$x_includes $x_libraries" != "NONE NONE" && \
5452    window_system=x11 with_x11=yes
5453
5454         
5455       if test "$x_includes $x_libraries" = "NONE NONE" \
5456     -a -n "$OPENWINHOME" \
5457     -a "$OPENWINHOME" != "/usr/openwin" \
5458     -a -d "$OPENWINHOME"; then
5459       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5460       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5461       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5462   fi
5463
5464   if test "$x_includes" = "NONE"; then
5465                     for dir in "/usr/X11" "/usr/X11R6"; do
5466       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5467     done
5468   fi
5469
5470   if test "$x_libraries" = "NONE"; then
5471     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5472       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5473     done
5474   fi
5475
5476   # If we find X, set shell vars x_includes and x_libraries to the
5477 # paths, otherwise set no_x=yes.
5478 # Uses ac_ vars as temps to allow command line to override cache and checks.
5479 # --without-x overrides everything else, but does not touch the cache.
5480 echo $ac_n "checking for X""... $ac_c" 1>&6
5481 echo "configure:5482: checking for X" >&5
5482
5483 # Check whether --with-x or --without-x was given.
5484 if test "${with_x+set}" = set; then
5485   withval="$with_x"
5486   :
5487 fi
5488
5489 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5490 if test "x$with_x" = xno; then
5491   # The user explicitly disabled X.
5492   have_x=disabled
5493 else
5494   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5495     # Both variables are already set.
5496     have_x=yes
5497   else
5498
5499 # One or both of the vars are not set, and there is no cached value.
5500 ac_x_includes=NO ac_x_libraries=NO
5501 rm -fr conftestdir
5502 if mkdir conftestdir; then
5503   cd conftestdir
5504   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5505   cat > Imakefile <<'EOF'
5506 acfindx:
5507         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5508 EOF
5509   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5510     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5511     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5512     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5513     for ac_extension in a so sl; do
5514       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5515         test -f $ac_im_libdir/libX11.$ac_extension; then
5516         ac_im_usrlibdir=$ac_im_libdir; break
5517       fi
5518     done
5519     # Screen out bogus values from the imake configuration.  They are
5520     # bogus both because they are the default anyway, and because
5521     # using them would break gcc on systems where it needs fixed includes.
5522     case "$ac_im_incroot" in
5523         /usr/include) ;;
5524         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5525     esac
5526     case "$ac_im_usrlibdir" in
5527         /usr/lib | /lib) ;;
5528         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5529     esac
5530   fi
5531   cd ..
5532   rm -fr conftestdir
5533 fi
5534
5535 if test "$ac_x_includes" = NO; then
5536   # Guess where to find include files, by looking for this one X11 .h file.
5537   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5538
5539   # First, try using that file with no special directory specified.
5540 cat > conftest.$ac_ext <<EOF
5541 #line 5542 "configure"
5542 #include "confdefs.h"
5543 #include <$x_direct_test_include>
5544 EOF
5545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5546 { (eval echo configure:5547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5548 if test -z "$ac_err"; then
5549   rm -rf conftest*
5550   # We can compile using X headers with no special include directory.
5551 ac_x_includes=
5552 else
5553   echo "$ac_err" >&5
5554   echo "configure: failed program was:" >&5
5555   cat conftest.$ac_ext >&5
5556   rm -rf conftest*
5557   # Look for the header file in a standard set of common directories.
5558 # Check X11 before X11Rn because it is often a symlink to the current release.
5559   for ac_dir in               \
5560     /usr/X11/include          \
5561     /usr/X11R6/include        \
5562     /usr/X11R5/include        \
5563     /usr/X11R4/include        \
5564                               \
5565     /usr/include/X11          \
5566     /usr/include/X11R6        \
5567     /usr/include/X11R5        \
5568     /usr/include/X11R4        \
5569                               \
5570     /usr/local/X11/include    \
5571     /usr/local/X11R6/include  \
5572     /usr/local/X11R5/include  \
5573     /usr/local/X11R4/include  \
5574                               \
5575     /usr/local/include/X11    \
5576     /usr/local/include/X11R6  \
5577     /usr/local/include/X11R5  \
5578     /usr/local/include/X11R4  \
5579                               \
5580     /usr/X386/include         \
5581     /usr/x386/include         \
5582     /usr/XFree86/include/X11  \
5583                               \
5584     /usr/include              \
5585     /usr/local/include        \
5586     /usr/unsupported/include  \
5587     /usr/athena/include       \
5588     /usr/local/x11r5/include  \
5589     /usr/lpp/Xamples/include  \
5590                               \
5591     /usr/openwin/include      \
5592     /usr/openwin/share/include \
5593     ; \
5594   do
5595     if test -r "$ac_dir/$x_direct_test_include"; then
5596       ac_x_includes=$ac_dir
5597       break
5598     fi
5599   done
5600 fi
5601 rm -f conftest*
5602 fi # $ac_x_includes = NO
5603
5604 if test "$ac_x_libraries" = NO; then
5605   # Check for the libraries.
5606
5607   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5608   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5609
5610   # See if we find them without any special options.
5611   # Don't add to $LIBS permanently.
5612   ac_save_LIBS="$LIBS"
5613   LIBS="-l$x_direct_test_library $LIBS"
5614 cat > conftest.$ac_ext <<EOF
5615 #line 5616 "configure"
5616 #include "confdefs.h"
5617
5618 int main() {
5619 ${x_direct_test_function}()
5620 ; return 0; }
5621 EOF
5622 if { (eval echo configure:5623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5623   rm -rf conftest*
5624   LIBS="$ac_save_LIBS"
5625 # We can link X programs with no special library path.
5626 ac_x_libraries=
5627 else
5628   echo "configure: failed program was:" >&5
5629   cat conftest.$ac_ext >&5
5630   rm -rf conftest*
5631   LIBS="$ac_save_LIBS"
5632 # First see if replacing the include by lib works.
5633 # Check X11 before X11Rn because it is often a symlink to the current release.
5634 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5635     /usr/X11/lib          \
5636     /usr/X11R6/lib        \
5637     /usr/X11R5/lib        \
5638     /usr/X11R4/lib        \
5639                           \
5640     /usr/lib/X11          \
5641     /usr/lib/X11R6        \
5642     /usr/lib/X11R5        \
5643     /usr/lib/X11R4        \
5644                           \
5645     /usr/local/X11/lib    \
5646     /usr/local/X11R6/lib  \
5647     /usr/local/X11R5/lib  \
5648     /usr/local/X11R4/lib  \
5649                           \
5650     /usr/local/lib/X11    \
5651     /usr/local/lib/X11R6  \
5652     /usr/local/lib/X11R5  \
5653     /usr/local/lib/X11R4  \
5654                           \
5655     /usr/X386/lib         \
5656     /usr/x386/lib         \
5657     /usr/XFree86/lib/X11  \
5658                           \
5659     /usr/lib              \
5660     /usr/local/lib        \
5661     /usr/unsupported/lib  \
5662     /usr/athena/lib       \
5663     /usr/local/x11r5/lib  \
5664     /usr/lpp/Xamples/lib  \
5665     /lib/usr/lib/X11      \
5666                           \
5667     /usr/openwin/lib      \
5668     /usr/openwin/share/lib \
5669     ; \
5670 do
5671   for ac_extension in a so sl; do
5672     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5673       ac_x_libraries=$ac_dir
5674       break 2
5675     fi
5676   done
5677 done
5678 fi
5679 rm -f conftest*
5680 fi # $ac_x_libraries = NO
5681
5682 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5683   # Didn't find X anywhere.  Cache the known absence of X.
5684   ac_cv_have_x="have_x=no"
5685 else
5686   # Record where we found X for the cache.
5687   ac_cv_have_x="have_x=yes \
5688                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5689 fi
5690   fi
5691   eval "$ac_cv_have_x"
5692 fi # $with_x != no
5693
5694 if test "$have_x" != yes; then
5695   echo "$ac_t""$have_x" 1>&6
5696   no_x=yes
5697 else
5698   # If each of the values was on the command line, it overrides each guess.
5699   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5700   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5701   # Update the cache value to reflect the command line values.
5702   ac_cv_have_x="have_x=yes \
5703                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5704   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5705 fi
5706
5707 if test "$no_x" = yes; then
5708   # Not all programs may use this symbol, but it does not hurt to define it.
5709   { test "$extra_verbose" = "yes" && cat << \EOF
5710     Defining X_DISPLAY_MISSING
5711 EOF
5712 cat >> confdefs.h <<\EOF
5713 #define X_DISPLAY_MISSING 1
5714 EOF
5715 }
5716
5717   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5718 else
5719   if test -n "$x_includes"; then
5720     X_CFLAGS="$X_CFLAGS -I$x_includes"
5721   fi
5722
5723   # It would also be nice to do this for all -L options, not just this one.
5724   if test -n "$x_libraries"; then
5725     X_LIBS="$X_LIBS -L$x_libraries"
5726     # For Solaris; some versions of Sun CC require a space after -R and
5727     # others require no space.  Words are not sufficient . . . .
5728     case "`(uname -sr) 2>/dev/null`" in
5729     "SunOS 5"*)
5730       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5731 echo "configure:5732: checking whether -R must be followed by a space" >&5
5732       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5733       cat > conftest.$ac_ext <<EOF
5734 #line 5735 "configure"
5735 #include "confdefs.h"
5736
5737 int main() {
5738
5739 ; return 0; }
5740 EOF
5741 if { (eval echo configure:5742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5742   rm -rf conftest*
5743   ac_R_nospace=yes
5744 else
5745   echo "configure: failed program was:" >&5
5746   cat conftest.$ac_ext >&5
5747   rm -rf conftest*
5748   ac_R_nospace=no
5749 fi
5750 rm -f conftest*
5751       if test $ac_R_nospace = yes; then
5752         echo "$ac_t""no" 1>&6
5753         X_LIBS="$X_LIBS -R$x_libraries"
5754       else
5755         LIBS="$ac_xsave_LIBS -R $x_libraries"
5756         cat > conftest.$ac_ext <<EOF
5757 #line 5758 "configure"
5758 #include "confdefs.h"
5759
5760 int main() {
5761
5762 ; return 0; }
5763 EOF
5764 if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5765   rm -rf conftest*
5766   ac_R_space=yes
5767 else
5768   echo "configure: failed program was:" >&5
5769   cat conftest.$ac_ext >&5
5770   rm -rf conftest*
5771   ac_R_space=no
5772 fi
5773 rm -f conftest*
5774         if test $ac_R_space = yes; then
5775           echo "$ac_t""yes" 1>&6
5776           X_LIBS="$X_LIBS -R $x_libraries"
5777         else
5778           echo "$ac_t""neither works" 1>&6
5779         fi
5780       fi
5781       LIBS="$ac_xsave_LIBS"
5782     esac
5783   fi
5784
5785   # Check for system-dependent libraries X programs must link with.
5786   # Do this before checking for the system-independent R6 libraries
5787   # (-lICE), since we may need -lsocket or whatever for X linking.
5788
5789   if test "$ISC" = yes; then
5790     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5791   else
5792     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5793     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5794     # the Alpha needs dnet_stub (dnet does not exist).
5795     if test "$with_dnet" = "no" ; then
5796 ac_cv_lib_dnet_dnet_ntoa=no
5797 else
5798
5799 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5800 echo "configure:5801: checking for dnet_ntoa in -ldnet" >&5
5801 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5802
5803 xe_check_libs=" -ldnet "
5804 cat > conftest.$ac_ext <<EOF
5805 #line 5806 "configure"
5806 #include "confdefs.h"
5807 /* Override any gcc2 internal prototype to avoid an error.  */
5808 /* We use char because int might match the return type of a gcc2
5809     builtin and then its argument prototype would still apply.  */
5810 char dnet_ntoa();
5811
5812 int main() {
5813 dnet_ntoa()
5814 ; return 0; }
5815 EOF
5816 if { (eval echo configure:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5817   rm -rf conftest*
5818   eval "ac_cv_lib_$ac_lib_var=yes"
5819 else
5820   echo "configure: failed program was:" >&5
5821   cat conftest.$ac_ext >&5
5822   rm -rf conftest*
5823   eval "ac_cv_lib_$ac_lib_var=no"
5824 fi
5825 rm -f conftest*
5826 xe_check_libs=""
5827
5828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5829   echo "$ac_t""yes" 1>&6
5830   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5831 else
5832   echo "$ac_t""no" 1>&6
5833 fi
5834
5835 fi
5836
5837     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5838       
5839 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5840 echo "configure:5841: checking for dnet_ntoa in -ldnet_stub" >&5
5841 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5842
5843 xe_check_libs=" -ldnet_stub "
5844 cat > conftest.$ac_ext <<EOF
5845 #line 5846 "configure"
5846 #include "confdefs.h"
5847 /* Override any gcc2 internal prototype to avoid an error.  */
5848 /* We use char because int might match the return type of a gcc2
5849     builtin and then its argument prototype would still apply.  */
5850 char dnet_ntoa();
5851
5852 int main() {
5853 dnet_ntoa()
5854 ; return 0; }
5855 EOF
5856 if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5857   rm -rf conftest*
5858   eval "ac_cv_lib_$ac_lib_var=yes"
5859 else
5860   echo "configure: failed program was:" >&5
5861   cat conftest.$ac_ext >&5
5862   rm -rf conftest*
5863   eval "ac_cv_lib_$ac_lib_var=no"
5864 fi
5865 rm -f conftest*
5866 xe_check_libs=""
5867
5868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5869   echo "$ac_t""yes" 1>&6
5870   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5871 else
5872   echo "$ac_t""no" 1>&6
5873 fi
5874
5875
5876     fi
5877
5878     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5879     # to get the SysV transport functions.
5880     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5881     # needs -lnsl.
5882     # The nsl library prevents programs from opening the X display
5883     # on Irix 5.2, according to dickey@clark.net.
5884     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5885 echo "configure:5886: checking for gethostbyname" >&5
5886
5887 cat > conftest.$ac_ext <<EOF
5888 #line 5889 "configure"
5889 #include "confdefs.h"
5890 /* System header to define __stub macros and hopefully few prototypes,
5891     which can conflict with char gethostbyname(); below.  */
5892 #include <assert.h>
5893 /* Override any gcc2 internal prototype to avoid an error.  */
5894 /* We use char because int might match the return type of a gcc2
5895     builtin and then its argument prototype would still apply.  */
5896 char gethostbyname();
5897
5898 int main() {
5899
5900 /* The GNU C library defines this for functions which it implements
5901     to always fail with ENOSYS.  Some functions are actually named
5902     something starting with __ and the normal name is an alias.  */
5903 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5904 choke me
5905 #else
5906 gethostbyname();
5907 #endif
5908
5909 ; return 0; }
5910 EOF
5911 if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5912   rm -rf conftest*
5913   eval "ac_cv_func_gethostbyname=yes"
5914 else
5915   echo "configure: failed program was:" >&5
5916   cat conftest.$ac_ext >&5
5917   rm -rf conftest*
5918   eval "ac_cv_func_gethostbyname=no"
5919 fi
5920 rm -f conftest*
5921
5922 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5923   echo "$ac_t""yes" 1>&6
5924   :
5925 else
5926   echo "$ac_t""no" 1>&6
5927 fi
5928
5929     if test $ac_cv_func_gethostbyname = no; then
5930       
5931 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5932 echo "configure:5933: checking for gethostbyname in -lnsl" >&5
5933 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5934
5935 xe_check_libs=" -lnsl "
5936 cat > conftest.$ac_ext <<EOF
5937 #line 5938 "configure"
5938 #include "confdefs.h"
5939 /* Override any gcc2 internal prototype to avoid an error.  */
5940 /* We use char because int might match the return type of a gcc2
5941     builtin and then its argument prototype would still apply.  */
5942 char gethostbyname();
5943
5944 int main() {
5945 gethostbyname()
5946 ; return 0; }
5947 EOF
5948 if { (eval echo configure:5949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5949   rm -rf conftest*
5950   eval "ac_cv_lib_$ac_lib_var=yes"
5951 else
5952   echo "configure: failed program was:" >&5
5953   cat conftest.$ac_ext >&5
5954   rm -rf conftest*
5955   eval "ac_cv_lib_$ac_lib_var=no"
5956 fi
5957 rm -f conftest*
5958 xe_check_libs=""
5959
5960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5961   echo "$ac_t""yes" 1>&6
5962   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5963 else
5964   echo "$ac_t""no" 1>&6
5965 fi
5966
5967
5968     fi
5969
5970     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5971     # socket/setsockopt and other routines are undefined under SCO ODT
5972     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5973     # on later versions), says simon@lia.di.epfl.ch: it contains
5974     # gethostby* variants that don't use the nameserver (or something).
5975     # -lsocket must be given before -lnsl if both are needed.
5976     # We assume that if connect needs -lnsl, so does gethostbyname.
5977     echo $ac_n "checking for connect""... $ac_c" 1>&6
5978 echo "configure:5979: checking for connect" >&5
5979
5980 cat > conftest.$ac_ext <<EOF
5981 #line 5982 "configure"
5982 #include "confdefs.h"
5983 /* System header to define __stub macros and hopefully few prototypes,
5984     which can conflict with char connect(); below.  */
5985 #include <assert.h>
5986 /* Override any gcc2 internal prototype to avoid an error.  */
5987 /* We use char because int might match the return type of a gcc2
5988     builtin and then its argument prototype would still apply.  */
5989 char connect();
5990
5991 int main() {
5992
5993 /* The GNU C library defines this for functions which it implements
5994     to always fail with ENOSYS.  Some functions are actually named
5995     something starting with __ and the normal name is an alias.  */
5996 #if defined (__stub_connect) || defined (__stub___connect)
5997 choke me
5998 #else
5999 connect();
6000 #endif
6001
6002 ; return 0; }
6003 EOF
6004 if { (eval echo configure:6005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6005   rm -rf conftest*
6006   eval "ac_cv_func_connect=yes"
6007 else
6008   echo "configure: failed program was:" >&5
6009   cat conftest.$ac_ext >&5
6010   rm -rf conftest*
6011   eval "ac_cv_func_connect=no"
6012 fi
6013 rm -f conftest*
6014
6015 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6016   echo "$ac_t""yes" 1>&6
6017   :
6018 else
6019   echo "$ac_t""no" 1>&6
6020 fi
6021
6022     if test $ac_cv_func_connect = no; then
6023       
6024 xe_msg_checking="for connect in -lsocket"
6025 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6026 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6027 echo "configure:6028: checking "$xe_msg_checking"" >&5
6028 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6029
6030 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6031 cat > conftest.$ac_ext <<EOF
6032 #line 6033 "configure"
6033 #include "confdefs.h"
6034 /* Override any gcc2 internal prototype to avoid an error.  */
6035 /* We use char because int might match the return type of a gcc2
6036     builtin and then its argument prototype would still apply.  */
6037 char connect();
6038
6039 int main() {
6040 connect()
6041 ; return 0; }
6042 EOF
6043 if { (eval echo configure:6044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6044   rm -rf conftest*
6045   eval "ac_cv_lib_$ac_lib_var=yes"
6046 else
6047   echo "configure: failed program was:" >&5
6048   cat conftest.$ac_ext >&5
6049   rm -rf conftest*
6050   eval "ac_cv_lib_$ac_lib_var=no"
6051 fi
6052 rm -f conftest*
6053 xe_check_libs=""
6054
6055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6056   echo "$ac_t""yes" 1>&6
6057   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6058 else
6059   echo "$ac_t""no" 1>&6
6060 fi
6061
6062
6063     fi
6064
6065     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6066     echo $ac_n "checking for remove""... $ac_c" 1>&6
6067 echo "configure:6068: checking for remove" >&5
6068
6069 cat > conftest.$ac_ext <<EOF
6070 #line 6071 "configure"
6071 #include "confdefs.h"
6072 /* System header to define __stub macros and hopefully few prototypes,
6073     which can conflict with char remove(); below.  */
6074 #include <assert.h>
6075 /* Override any gcc2 internal prototype to avoid an error.  */
6076 /* We use char because int might match the return type of a gcc2
6077     builtin and then its argument prototype would still apply.  */
6078 char remove();
6079
6080 int main() {
6081
6082 /* The GNU C library defines this for functions which it implements
6083     to always fail with ENOSYS.  Some functions are actually named
6084     something starting with __ and the normal name is an alias.  */
6085 #if defined (__stub_remove) || defined (__stub___remove)
6086 choke me
6087 #else
6088 remove();
6089 #endif
6090
6091 ; return 0; }
6092 EOF
6093 if { (eval echo configure:6094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6094   rm -rf conftest*
6095   eval "ac_cv_func_remove=yes"
6096 else
6097   echo "configure: failed program was:" >&5
6098   cat conftest.$ac_ext >&5
6099   rm -rf conftest*
6100   eval "ac_cv_func_remove=no"
6101 fi
6102 rm -f conftest*
6103
6104 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6105   echo "$ac_t""yes" 1>&6
6106   :
6107 else
6108   echo "$ac_t""no" 1>&6
6109 fi
6110
6111     if test $ac_cv_func_remove = no; then
6112       
6113 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6114 echo "configure:6115: checking for remove in -lposix" >&5
6115 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6116
6117 xe_check_libs=" -lposix "
6118 cat > conftest.$ac_ext <<EOF
6119 #line 6120 "configure"
6120 #include "confdefs.h"
6121 /* Override any gcc2 internal prototype to avoid an error.  */
6122 /* We use char because int might match the return type of a gcc2
6123     builtin and then its argument prototype would still apply.  */
6124 char remove();
6125
6126 int main() {
6127 remove()
6128 ; return 0; }
6129 EOF
6130 if { (eval echo configure:6131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6131   rm -rf conftest*
6132   eval "ac_cv_lib_$ac_lib_var=yes"
6133 else
6134   echo "configure: failed program was:" >&5
6135   cat conftest.$ac_ext >&5
6136   rm -rf conftest*
6137   eval "ac_cv_lib_$ac_lib_var=no"
6138 fi
6139 rm -f conftest*
6140 xe_check_libs=""
6141
6142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6143   echo "$ac_t""yes" 1>&6
6144   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6145 else
6146   echo "$ac_t""no" 1>&6
6147 fi
6148
6149
6150     fi
6151
6152     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6153     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6154 echo "configure:6155: checking for shmat" >&5
6155
6156 cat > conftest.$ac_ext <<EOF
6157 #line 6158 "configure"
6158 #include "confdefs.h"
6159 /* System header to define __stub macros and hopefully few prototypes,
6160     which can conflict with char shmat(); below.  */
6161 #include <assert.h>
6162 /* Override any gcc2 internal prototype to avoid an error.  */
6163 /* We use char because int might match the return type of a gcc2
6164     builtin and then its argument prototype would still apply.  */
6165 char shmat();
6166
6167 int main() {
6168
6169 /* The GNU C library defines this for functions which it implements
6170     to always fail with ENOSYS.  Some functions are actually named
6171     something starting with __ and the normal name is an alias.  */
6172 #if defined (__stub_shmat) || defined (__stub___shmat)
6173 choke me
6174 #else
6175 shmat();
6176 #endif
6177
6178 ; return 0; }
6179 EOF
6180 if { (eval echo configure:6181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6181   rm -rf conftest*
6182   eval "ac_cv_func_shmat=yes"
6183 else
6184   echo "configure: failed program was:" >&5
6185   cat conftest.$ac_ext >&5
6186   rm -rf conftest*
6187   eval "ac_cv_func_shmat=no"
6188 fi
6189 rm -f conftest*
6190
6191 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6192   echo "$ac_t""yes" 1>&6
6193   :
6194 else
6195   echo "$ac_t""no" 1>&6
6196 fi
6197
6198     if test $ac_cv_func_shmat = no; then
6199       
6200 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6201 echo "configure:6202: checking for shmat in -lipc" >&5
6202 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6203
6204 xe_check_libs=" -lipc "
6205 cat > conftest.$ac_ext <<EOF
6206 #line 6207 "configure"
6207 #include "confdefs.h"
6208 /* Override any gcc2 internal prototype to avoid an error.  */
6209 /* We use char because int might match the return type of a gcc2
6210     builtin and then its argument prototype would still apply.  */
6211 char shmat();
6212
6213 int main() {
6214 shmat()
6215 ; return 0; }
6216 EOF
6217 if { (eval echo configure:6218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6218   rm -rf conftest*
6219   eval "ac_cv_lib_$ac_lib_var=yes"
6220 else
6221   echo "configure: failed program was:" >&5
6222   cat conftest.$ac_ext >&5
6223   rm -rf conftest*
6224   eval "ac_cv_lib_$ac_lib_var=no"
6225 fi
6226 rm -f conftest*
6227 xe_check_libs=""
6228
6229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6230   echo "$ac_t""yes" 1>&6
6231   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6232 else
6233   echo "$ac_t""no" 1>&6
6234 fi
6235
6236
6237     fi
6238   fi
6239
6240   # Check for libraries that X11R6 Xt/Xaw programs need.
6241   ac_save_LDFLAGS="$LDFLAGS"
6242   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6243   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6244   # check for ICE first), but we must link in the order -lSM -lICE or
6245   # we get undefined symbols.  So assume we have SM if we have ICE.
6246   # These have to be linked with before -lX11, unlike the other
6247   # libraries we check for below, so use a different variable.
6248   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6249   
6250 xe_msg_checking="for IceConnectionNumber in -lICE"
6251 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6252 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6253 echo "configure:6254: checking "$xe_msg_checking"" >&5
6254 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6255
6256 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6257 cat > conftest.$ac_ext <<EOF
6258 #line 6259 "configure"
6259 #include "confdefs.h"
6260 /* Override any gcc2 internal prototype to avoid an error.  */
6261 /* We use char because int might match the return type of a gcc2
6262     builtin and then its argument prototype would still apply.  */
6263 char IceConnectionNumber();
6264
6265 int main() {
6266 IceConnectionNumber()
6267 ; return 0; }
6268 EOF
6269 if { (eval echo configure:6270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6270   rm -rf conftest*
6271   eval "ac_cv_lib_$ac_lib_var=yes"
6272 else
6273   echo "configure: failed program was:" >&5
6274   cat conftest.$ac_ext >&5
6275   rm -rf conftest*
6276   eval "ac_cv_lib_$ac_lib_var=no"
6277 fi
6278 rm -f conftest*
6279 xe_check_libs=""
6280
6281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6282   echo "$ac_t""yes" 1>&6
6283   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6284 else
6285   echo "$ac_t""no" 1>&6
6286 fi
6287
6288
6289   LDFLAGS="$ac_save_LDFLAGS"
6290
6291 fi
6292  # Autoconf claims to find X library and include dirs for us.
6293   if test "$no_x" = "yes"
6294   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6295   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6296   fi
6297 fi
6298
6299
6300 if test "$with_x11" = "yes"; then
6301   { test "$extra_verbose" = "yes" && cat << \EOF
6302     Defining HAVE_X_WINDOWS
6303 EOF
6304 cat >> confdefs.h <<\EOF
6305 #define HAVE_X_WINDOWS 1
6306 EOF
6307 }
6308
6309   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6310   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6311
6312       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6313     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6314     if test -d "$lib_dir" -a -d "$inc_dir"; then
6315       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6316         x_libraries="$lib_dir $x_libraries"
6317         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6318       esac
6319       case "$x_includes" in "$inc_dir"* ) ;; *)
6320         x_includes="$inc_dir $x_includes"
6321         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6322       esac
6323       break;       fi
6324   done
6325
6326     for rel in "X11R6" "X11R5" "X11R4"; do
6327     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6328     if test -d "$lib_dir" -a -d "$inc_dir"; then
6329       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6330         x_libraries="$x_libraries $lib_dir"
6331         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6332       esac
6333       case "$x_includes" in "$inc_dir"* ) ;; *)
6334         x_includes="$x_includes $inc_dir"
6335         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6336       esac
6337       break;     fi
6338   done
6339
6340     case "$opsys" in
6341   decosf*) 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 ;;
6342   esac
6343
6344   ld_switch_x_site="$X_LIBS"
6345
6346   
6347 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6348     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6349   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6350   
6351         runpath="" runpath_dirs=""
6352   if test -n "$LD_RUN_PATH"; then
6353     runpath="$LD_RUN_PATH"
6354   elif test "$GCC" = "yes"; then
6355         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6356     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6357     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6358     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6359       case "$arg" in P,* | -L* | -R* )
6360         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6361           {
6362 xe_runpath_dir="$dir"
6363   test "$xe_runpath_dir" != "/lib"     -a \
6364         "$xe_runpath_dir" != "/usr/lib" -a \
6365         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6366   eval "$xe_add_unique_runpath_dir"
6367 }
6368         done ;;
6369       esac
6370     done
6371     ld_switch_run="$ld_switch_run_save"
6372     rm -f conftest*
6373   else
6374         for arg in $ld_switch_site $ld_switch_x_site; do
6375       case "$arg" in -L*) {
6376 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6377   test "$xe_runpath_dir" != "/lib"     -a \
6378         "$xe_runpath_dir" != "/usr/lib" -a \
6379         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6380   eval "$xe_add_unique_runpath_dir"
6381 };; esac
6382     done
6383         if test "$opsys $need_motif" = "sol2 yes"; then
6384       xe_runpath_dir="/opt/SUNWdt/lib";
6385       eval "$xe_add_unique_runpath_dir";
6386     fi
6387   fi 
6388   if test -n "$runpath"; then
6389     ld_switch_run="${dash_r}${runpath}"
6390     
6391 if test "$GCC" = "yes"; then
6392   set x $ld_switch_run; shift; ld_switch_run=""
6393   while test -n "$1"; do
6394     case $1 in
6395       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6396       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6397       -Xlinker* ) ;;
6398       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6399     esac
6400     shift
6401   done
6402 fi
6403     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6404   fi
6405 fi
6406
6407
6408   if test "$extra_verbose" = "yes"; then
6409     echo; echo "X11 compilation variables:"
6410     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6411     echo
6412   fi
6413
6414             bitmapdirs=
6415   if test "$x_includes" != NONE; then
6416     for i in $x_includes; do
6417       if test -d "$i/bitmaps"; then
6418         bitmapdirs="$i/bitmaps:$bitmapdirs"
6419       fi
6420       if test -d "$i/X11/bitmaps"; then
6421         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6422       fi
6423     done
6424     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6425   fi
6426   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6427     Defining BITMAPDIR = "$bitmapdirs"
6428 EOF
6429 cat >> confdefs.h <<EOF
6430 #define BITMAPDIR "$bitmapdirs"
6431 EOF
6432 }
6433
6434
6435     echo "checking for X defines extracted by xmkmf" 1>&6
6436 echo "configure:6437: checking for X defines extracted by xmkmf" >&5
6437   rm -fr conftestdir
6438   if mkdir conftestdir; then
6439     cd conftestdir
6440     cat > Imakefile <<'EOF'
6441 xetest:
6442         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6443 EOF
6444     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6445       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6446       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6447     fi
6448     cd ..
6449     rm -fr conftestdir
6450     for word in $xmkmf_defines; do
6451       case "$word" in 
6452       -D__STDC__*) ;;
6453       -D* )
6454         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6455         case "$word" in
6456           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6457           *     ) val=1 ;;
6458         esac
6459         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6460           if test "$val" = "1"
6461             then { test "$extra_verbose" = "yes" && cat << EOF
6462     Defining $sym
6463 EOF
6464 cat >> confdefs.h <<EOF
6465 #define $sym 1
6466 EOF
6467 }
6468
6469             else { test "$extra_verbose" = "yes" && cat << EOF
6470     Defining $sym = $val
6471 EOF
6472 cat >> confdefs.h <<EOF
6473 #define $sym $val
6474 EOF
6475 }
6476
6477           fi
6478         fi  ;;
6479       esac
6480     done
6481   fi
6482
6483     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6484 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6485 echo "configure:6486: checking for X11/Intrinsic.h" >&5
6486
6487 cat > conftest.$ac_ext <<EOF
6488 #line 6489 "configure"
6489 #include "confdefs.h"
6490 #include <X11/Intrinsic.h>
6491 EOF
6492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6493 { (eval echo configure:6494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6495 if test -z "$ac_err"; then
6496   rm -rf conftest*
6497   eval "ac_cv_header_$ac_safe=yes"
6498 else
6499   echo "$ac_err" >&5
6500   echo "configure: failed program was:" >&5
6501   cat conftest.$ac_ext >&5
6502   rm -rf conftest*
6503   eval "ac_cv_header_$ac_safe=no"
6504 fi
6505 rm -f conftest*
6506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6507   echo "$ac_t""yes" 1>&6
6508   :
6509 else
6510   echo "$ac_t""no" 1>&6
6511 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6512 fi
6513
6514
6515       
6516 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6517 echo "configure:6518: checking for XOpenDisplay in -lX11" >&5
6518 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6519
6520 xe_check_libs=" -lX11 "
6521 cat > conftest.$ac_ext <<EOF
6522 #line 6523 "configure"
6523 #include "confdefs.h"
6524 /* Override any gcc2 internal prototype to avoid an error.  */
6525 /* We use char because int might match the return type of a gcc2
6526     builtin and then its argument prototype would still apply.  */
6527 char XOpenDisplay();
6528
6529 int main() {
6530 XOpenDisplay()
6531 ; return 0; }
6532 EOF
6533 if { (eval echo configure:6534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6534   rm -rf conftest*
6535   eval "ac_cv_lib_$ac_lib_var=yes"
6536 else
6537   echo "configure: failed program was:" >&5
6538   cat conftest.$ac_ext >&5
6539   rm -rf conftest*
6540   eval "ac_cv_lib_$ac_lib_var=no"
6541 fi
6542 rm -f conftest*
6543 xe_check_libs=""
6544
6545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6546   echo "$ac_t""yes" 1>&6
6547   have_lib_x11=yes
6548 else
6549   echo "$ac_t""no" 1>&6
6550 fi
6551
6552
6553   if test "$have_lib_x11" != "yes"; then
6554     
6555 xe_msg_checking="for XGetFontProperty in -lX11"
6556 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6557 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6558 echo "configure:6559: checking "$xe_msg_checking"" >&5
6559 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6560
6561 xe_check_libs=" -lX11 -b i486-linuxaout"
6562 cat > conftest.$ac_ext <<EOF
6563 #line 6564 "configure"
6564 #include "confdefs.h"
6565 /* Override any gcc2 internal prototype to avoid an error.  */
6566 /* We use char because int might match the return type of a gcc2
6567     builtin and then its argument prototype would still apply.  */
6568 char XGetFontProperty();
6569
6570 int main() {
6571 XGetFontProperty()
6572 ; return 0; }
6573 EOF
6574 if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6575   rm -rf conftest*
6576   eval "ac_cv_lib_$ac_lib_var=yes"
6577 else
6578   echo "configure: failed program was:" >&5
6579   cat conftest.$ac_ext >&5
6580   rm -rf conftest*
6581   eval "ac_cv_lib_$ac_lib_var=no"
6582 fi
6583 rm -f conftest*
6584 xe_check_libs=""
6585
6586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6587   echo "$ac_t""yes" 1>&6
6588   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6589 else
6590   echo "$ac_t""no" 1>&6
6591 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6592 fi
6593
6594
6595   fi
6596   libs_x="-lX11"
6597   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6598
6599     
6600 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6601 echo "configure:6602: checking for XShapeSelectInput in -lXext" >&5
6602 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6603
6604 xe_check_libs=" -lXext "
6605 cat > conftest.$ac_ext <<EOF
6606 #line 6607 "configure"
6607 #include "confdefs.h"
6608 /* Override any gcc2 internal prototype to avoid an error.  */
6609 /* We use char because int might match the return type of a gcc2
6610     builtin and then its argument prototype would still apply.  */
6611 char XShapeSelectInput();
6612
6613 int main() {
6614 XShapeSelectInput()
6615 ; return 0; }
6616 EOF
6617 if { (eval echo configure:6618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6618   rm -rf conftest*
6619   eval "ac_cv_lib_$ac_lib_var=yes"
6620 else
6621   echo "configure: failed program was:" >&5
6622   cat conftest.$ac_ext >&5
6623   rm -rf conftest*
6624   eval "ac_cv_lib_$ac_lib_var=no"
6625 fi
6626 rm -f conftest*
6627 xe_check_libs=""
6628
6629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6630   echo "$ac_t""yes" 1>&6
6631   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6632 else
6633   echo "$ac_t""no" 1>&6
6634 fi
6635
6636
6637
6638     
6639 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6640 echo "configure:6641: checking for XtOpenDisplay in -lXt" >&5
6641 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6642
6643 xe_check_libs=" -lXt "
6644 cat > conftest.$ac_ext <<EOF
6645 #line 6646 "configure"
6646 #include "confdefs.h"
6647 /* Override any gcc2 internal prototype to avoid an error.  */
6648 /* We use char because int might match the return type of a gcc2
6649     builtin and then its argument prototype would still apply.  */
6650 char XtOpenDisplay();
6651
6652 int main() {
6653 XtOpenDisplay()
6654 ; return 0; }
6655 EOF
6656 if { (eval echo configure:6657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6657   rm -rf conftest*
6658   eval "ac_cv_lib_$ac_lib_var=yes"
6659 else
6660   echo "configure: failed program was:" >&5
6661   cat conftest.$ac_ext >&5
6662   rm -rf conftest*
6663   eval "ac_cv_lib_$ac_lib_var=no"
6664 fi
6665 rm -f conftest*
6666 xe_check_libs=""
6667
6668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6669   echo "$ac_t""yes" 1>&6
6670   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6671 else
6672   echo "$ac_t""no" 1>&6
6673 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6674 fi
6675
6676
6677
6678   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6679 echo "configure:6680: checking the version of X11 being used" >&5
6680   cat > conftest.$ac_ext <<EOF
6681 #line 6682 "configure"
6682 #include "confdefs.h"
6683 #include <X11/Intrinsic.h>
6684     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6685 EOF
6686 if { (eval echo configure:6687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6687 then
6688   ./conftest foobar; x11_release=$?
6689 else
6690   conftest_rc="$?"
6691   echo "configure: failed program was:" >&5
6692   cat conftest.$ac_ext >&5
6693   rm -fr conftest*
6694   x11_release=4
6695 fi
6696 rm -fr conftest*
6697   echo "$ac_t""R${x11_release}" 1>&6
6698   { test "$extra_verbose" = "yes" && cat << EOF
6699     Defining THIS_IS_X11R${x11_release}
6700 EOF
6701 cat >> confdefs.h <<EOF
6702 #define THIS_IS_X11R${x11_release} 1
6703 EOF
6704 }
6705
6706
6707   if test "${x11_release}" = "4"; then
6708     case "$with_widgets" in
6709       "" | "no") with_widgets=no ;;
6710       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6711     esac
6712   fi
6713
6714   for ac_func in XConvertCase
6715 do
6716 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6717 echo "configure:6718: checking for $ac_func" >&5
6718
6719 cat > conftest.$ac_ext <<EOF
6720 #line 6721 "configure"
6721 #include "confdefs.h"
6722 /* System header to define __stub macros and hopefully few prototypes,
6723     which can conflict with char $ac_func(); below.  */
6724 #include <assert.h>
6725 /* Override any gcc2 internal prototype to avoid an error.  */
6726 /* We use char because int might match the return type of a gcc2
6727     builtin and then its argument prototype would still apply.  */
6728 char $ac_func();
6729
6730 int main() {
6731
6732 /* The GNU C library defines this for functions which it implements
6733     to always fail with ENOSYS.  Some functions are actually named
6734     something starting with __ and the normal name is an alias.  */
6735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6736 choke me
6737 #else
6738 $ac_func();
6739 #endif
6740
6741 ; return 0; }
6742 EOF
6743 if { (eval echo configure:6744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6744   rm -rf conftest*
6745   eval "ac_cv_func_$ac_func=yes"
6746 else
6747   echo "configure: failed program was:" >&5
6748   cat conftest.$ac_ext >&5
6749   rm -rf conftest*
6750   eval "ac_cv_func_$ac_func=no"
6751 fi
6752 rm -f conftest*
6753
6754 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6755   echo "$ac_t""yes" 1>&6
6756     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6757   { test "$extra_verbose" = "yes" && cat << EOF
6758     Defining $ac_tr_func
6759 EOF
6760 cat >> confdefs.h <<EOF
6761 #define $ac_tr_func 1
6762 EOF
6763 }
6764  
6765 else
6766   echo "$ac_t""no" 1>&6
6767 fi
6768 done
6769
6770
6771   for ac_hdr in X11/Xlocale.h
6772 do
6773 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6774 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6775 echo "configure:6776: checking for $ac_hdr" >&5
6776
6777 cat > conftest.$ac_ext <<EOF
6778 #line 6779 "configure"
6779 #include "confdefs.h"
6780 #include <$ac_hdr>
6781 EOF
6782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6783 { (eval echo configure:6784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6784 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6785 if test -z "$ac_err"; then
6786   rm -rf conftest*
6787   eval "ac_cv_header_$ac_safe=yes"
6788 else
6789   echo "$ac_err" >&5
6790   echo "configure: failed program was:" >&5
6791   cat conftest.$ac_ext >&5
6792   rm -rf conftest*
6793   eval "ac_cv_header_$ac_safe=no"
6794 fi
6795 rm -f conftest*
6796 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6797   echo "$ac_t""yes" 1>&6
6798     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6799   { test "$extra_verbose" = "yes" && cat << EOF
6800     Defining $ac_tr_hdr
6801 EOF
6802 cat >> confdefs.h <<EOF
6803 #define $ac_tr_hdr 1
6804 EOF
6805 }
6806  
6807 else
6808   echo "$ac_t""no" 1>&6
6809 fi
6810 done
6811
6812
6813     for ac_func in XRegisterIMInstantiateCallback
6814 do
6815 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6816 echo "configure:6817: checking for $ac_func" >&5
6817
6818 cat > conftest.$ac_ext <<EOF
6819 #line 6820 "configure"
6820 #include "confdefs.h"
6821 /* System header to define __stub macros and hopefully few prototypes,
6822     which can conflict with char $ac_func(); below.  */
6823 #include <assert.h>
6824 /* Override any gcc2 internal prototype to avoid an error.  */
6825 /* We use char because int might match the return type of a gcc2
6826     builtin and then its argument prototype would still apply.  */
6827 char $ac_func();
6828
6829 int main() {
6830
6831 /* The GNU C library defines this for functions which it implements
6832     to always fail with ENOSYS.  Some functions are actually named
6833     something starting with __ and the normal name is an alias.  */
6834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6835 choke me
6836 #else
6837 $ac_func();
6838 #endif
6839
6840 ; return 0; }
6841 EOF
6842 if { (eval echo configure:6843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6843   rm -rf conftest*
6844   eval "ac_cv_func_$ac_func=yes"
6845 else
6846   echo "configure: failed program was:" >&5
6847   cat conftest.$ac_ext >&5
6848   rm -rf conftest*
6849   eval "ac_cv_func_$ac_func=no"
6850 fi
6851 rm -f conftest*
6852
6853 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6854   echo "$ac_t""yes" 1>&6
6855     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6856   { test "$extra_verbose" = "yes" && cat << EOF
6857     Defining $ac_tr_func
6858 EOF
6859 cat >> confdefs.h <<EOF
6860 #define $ac_tr_func 1
6861 EOF
6862 }
6863  
6864 else
6865   echo "$ac_t""no" 1>&6
6866 fi
6867 done
6868
6869   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6870 echo "configure:6871: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6871   cat > conftest.$ac_ext <<EOF
6872 #line 6873 "configure"
6873 #include "confdefs.h"
6874
6875 #define NeedFunctionPrototypes 1
6876 #include <X11/Xlib.h>
6877 extern Bool XRegisterIMInstantiateCallback(
6878    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6879
6880 int main() {
6881
6882 ; return 0; }
6883 EOF
6884 if { (eval echo configure:6885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6885   rm -rf conftest*
6886   echo "$ac_t""yes" 1>&6
6887 else
6888   echo "configure: failed program was:" >&5
6889   cat conftest.$ac_ext >&5
6890   rm -rf conftest*
6891   echo "$ac_t""no" 1>&6
6892    { test "$extra_verbose" = "yes" && cat << \EOF
6893     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6894 EOF
6895 cat >> confdefs.h <<\EOF
6896 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6897 EOF
6898 }
6899
6900 fi
6901 rm -f conftest*
6902
6903     test -z "$with_xmu" && { 
6904 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6905 echo "configure:6906: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6906 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6907
6908 xe_check_libs=" -lXmu "
6909 cat > conftest.$ac_ext <<EOF
6910 #line 6911 "configure"
6911 #include "confdefs.h"
6912 /* Override any gcc2 internal prototype to avoid an error.  */
6913 /* We use char because int might match the return type of a gcc2
6914     builtin and then its argument prototype would still apply.  */
6915 char XmuReadBitmapDataFromFile();
6916
6917 int main() {
6918 XmuReadBitmapDataFromFile()
6919 ; return 0; }
6920 EOF
6921 if { (eval echo configure:6922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6922   rm -rf conftest*
6923   eval "ac_cv_lib_$ac_lib_var=yes"
6924 else
6925   echo "configure: failed program was:" >&5
6926   cat conftest.$ac_ext >&5
6927   rm -rf conftest*
6928   eval "ac_cv_lib_$ac_lib_var=no"
6929 fi
6930 rm -f conftest*
6931 xe_check_libs=""
6932
6933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6934   echo "$ac_t""yes" 1>&6
6935   with_xmu=yes
6936 else
6937   echo "$ac_t""no" 1>&6
6938 with_xmu=no
6939 fi
6940
6941  }
6942   if test "$with_xmu" = "no"; then
6943     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6944    echo "    xemacs will be linked with \"xmu.o\""
6945  fi
6946   else
6947     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6948     { test "$extra_verbose" = "yes" && cat << \EOF
6949     Defining HAVE_XMU
6950 EOF
6951 cat >> confdefs.h <<\EOF
6952 #define HAVE_XMU 1
6953 EOF
6954 }
6955
6956   fi
6957
6958       
6959 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6960 echo "configure:6961: checking for main in -lXbsd" >&5
6961 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6962
6963 xe_check_libs=" -lXbsd "
6964 cat > conftest.$ac_ext <<EOF
6965 #line 6966 "configure"
6966 #include "confdefs.h"
6967
6968 int main() {
6969 main()
6970 ; return 0; }
6971 EOF
6972 if { (eval echo configure:6973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6973   rm -rf conftest*
6974   eval "ac_cv_lib_$ac_lib_var=yes"
6975 else
6976   echo "configure: failed program was:" >&5
6977   cat conftest.$ac_ext >&5
6978   rm -rf conftest*
6979   eval "ac_cv_lib_$ac_lib_var=no"
6980 fi
6981 rm -f conftest*
6982 xe_check_libs=""
6983
6984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6985   echo "$ac_t""yes" 1>&6
6986   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6987 else
6988   echo "$ac_t""no" 1>&6
6989 fi
6990
6991
6992
6993     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6994         if test "$GCC" = "yes"; then
6995       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6996       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6997     else
6998       case "$CC" in
6999         "xlc" ) CC="xlc_r" ;;
7000         "xlC" ) CC="xlC_r" ;;
7001         "cc"  ) CC="cc_r" ;;
7002       esac
7003     fi
7004   fi
7005
7006 fi 
7007 if test "$with_msw" != "no"; then
7008   echo "checking for MS-Windows" 1>&6
7009 echo "configure:7010: checking for MS-Windows" >&5
7010   
7011 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7012 echo "configure:7013: checking for main in -lgdi32" >&5
7013 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7014
7015 xe_check_libs=" -lgdi32 "
7016 cat > conftest.$ac_ext <<EOF
7017 #line 7018 "configure"
7018 #include "confdefs.h"
7019
7020 int main() {
7021 main()
7022 ; return 0; }
7023 EOF
7024 if { (eval echo configure:7025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7025   rm -rf conftest*
7026   eval "ac_cv_lib_$ac_lib_var=yes"
7027 else
7028   echo "configure: failed program was:" >&5
7029   cat conftest.$ac_ext >&5
7030   rm -rf conftest*
7031   eval "ac_cv_lib_$ac_lib_var=no"
7032 fi
7033 rm -f conftest*
7034 xe_check_libs=""
7035
7036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7037   echo "$ac_t""yes" 1>&6
7038   with_msw=yes
7039 else
7040   echo "$ac_t""no" 1>&6
7041 fi
7042
7043
7044   if test "$with_msw" = "yes"; then
7045     { test "$extra_verbose" = "yes" && cat << \EOF
7046     Defining HAVE_MS_WINDOWS
7047 EOF
7048 cat >> confdefs.h <<\EOF
7049 #define HAVE_MS_WINDOWS 1
7050 EOF
7051 }
7052
7053
7054         if test "$with_netinstall" = "yes"; then
7055       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7056       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7057       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7058     fi
7059
7060     install_pp="$blddir/lib-src/installexe.sh"
7061     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
7062     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7063     if test "$window_system" != x11; then
7064         window_system=msw
7065         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7066             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7067    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7068  fi
7069         test "$with_menubars"   != "no" && with_menubars=msw \
7070             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7071    echo "    xemacs will be linked with \"menubar-msw.o\""
7072  fi
7073         test "$with_toolbars"   != "no" && with_toolbars=msw \
7074             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7075    echo "    xemacs will be linked with \"toolbar-msw.o\""
7076  fi
7077         test "$with_dialogs"   != "no" && with_dialogs=msw \
7078             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7079    echo "    xemacs will be linked with \"dialog-msw.o\""
7080  fi
7081         test "$with_widgets"   != "no" && with_widgets=msw
7082     else
7083         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7084    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7085  fi
7086         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7087    echo "    xemacs will be linked with \"menubar-msw.o\""
7088  fi
7089         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7090    echo "    xemacs will be linked with \"toolbar-msw.o\""
7091  fi
7092         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7093    echo "    xemacs will be linked with \"dialog-msw.o\""
7094  fi
7095     fi
7096         cat > conftest.$ac_ext <<EOF
7097 #line 7098 "configure"
7098 #include "confdefs.h"
7099 #include <fcntl.h>
7100     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7101 EOF
7102 if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7103 then
7104   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7105     Defining HAVE_MSG_SELECT
7106 EOF
7107 cat >> confdefs.h <<\EOF
7108 #define HAVE_MSG_SELECT 1
7109 EOF
7110 }
7111
7112 else
7113   conftest_rc="$?"
7114   echo "configure: failed program was:" >&5
7115   cat conftest.$ac_ext >&5
7116 fi
7117 rm -fr conftest*
7118     with_file_coding=yes
7119     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
7120    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\""
7121  fi
7122   fi
7123 fi
7124
7125
7126
7127 test -z "$window_system" && window_system="none"
7128
7129 if test "$window_system" = "none"; then
7130   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7131   do
7132     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7133        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7134     fi
7135     eval "with_${feature}=no"
7136   done
7137 else
7138   test -z "$with_toolbars" && with_toolbars=yes
7139 fi
7140
7141 if test "$with_msw" != "yes"; then
7142   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7143   do
7144     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7145        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7146     fi
7147     eval "with_${feature}=no"
7148   done
7149 else
7150   :
7151 fi
7152
7153 if test "$with_x11" != "yes"; then
7154             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7155   do
7156     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7157        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7158     fi
7159     eval "with_${feature}=no"
7160   done
7161 fi
7162
7163 if test "$with_x11" = "yes"; then
7164   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7165 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7166 echo "configure:7167: checking for X11/extensions/shape.h" >&5
7167
7168 cat > conftest.$ac_ext <<EOF
7169 #line 7170 "configure"
7170 #include "confdefs.h"
7171 #include <X11/extensions/shape.h>
7172 EOF
7173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7174 { (eval echo configure:7175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7176 if test -z "$ac_err"; then
7177   rm -rf conftest*
7178   eval "ac_cv_header_$ac_safe=yes"
7179 else
7180   echo "$ac_err" >&5
7181   echo "configure: failed program was:" >&5
7182   cat conftest.$ac_ext >&5
7183   rm -rf conftest*
7184   eval "ac_cv_header_$ac_safe=no"
7185 fi
7186 rm -f conftest*
7187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7188   echo "$ac_t""yes" 1>&6
7189   
7190    { test "$extra_verbose" = "yes" && cat << \EOF
7191     Defining HAVE_BALLOON_HELP
7192 EOF
7193 cat >> confdefs.h <<\EOF
7194 #define HAVE_BALLOON_HELP 1
7195 EOF
7196 }
7197
7198    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7199    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7200  fi
7201 else
7202   echo "$ac_t""no" 1>&6
7203 fi
7204
7205 fi
7206
7207 bitmapdir=
7208
7209 case "$window_system" in
7210   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7211   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7212   gtk  )
7213        HAVE_X_WINDOWS=no
7214        test "$with_gnome" = "yes" && echo "  Using GNOME."
7215        test "$with_gnome" = "no" && echo "  Using GTK."
7216        ;;
7217   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7218 esac
7219
7220 case "$x_libraries" in *X11R4* )
7221   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7222   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7223 esac
7224
7225 echo "checking for WM_COMMAND option" 1>&6
7226 echo "configure:7227: checking for WM_COMMAND option" >&5;
7227 if test "$with_wmcommand" != "no"; then
7228   { test "$extra_verbose" = "yes" && cat << \EOF
7229     Defining HAVE_WMCOMMAND
7230 EOF
7231 cat >> confdefs.h <<\EOF
7232 #define HAVE_WMCOMMAND 1
7233 EOF
7234 }
7235
7236 fi
7237
7238 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7239 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7240 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7241 echo "configure:7242: checking for X11/Xauth.h" >&5
7242
7243 cat > conftest.$ac_ext <<EOF
7244 #line 7245 "configure"
7245 #include "confdefs.h"
7246 #include <X11/Xauth.h>
7247 EOF
7248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7249 { (eval echo configure:7250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7251 if test -z "$ac_err"; then
7252   rm -rf conftest*
7253   eval "ac_cv_header_$ac_safe=yes"
7254 else
7255   echo "$ac_err" >&5
7256   echo "configure: failed program was:" >&5
7257   cat conftest.$ac_ext >&5
7258   rm -rf conftest*
7259   eval "ac_cv_header_$ac_safe=no"
7260 fi
7261 rm -f conftest*
7262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7263   echo "$ac_t""yes" 1>&6
7264   :
7265 else
7266   echo "$ac_t""no" 1>&6
7267 with_xauth=no
7268 fi
7269  }
7270 test -z "$with_xauth" && { 
7271 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7272 echo "configure:7273: checking for XauGetAuthByAddr in -lXau" >&5
7273 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7274
7275 xe_check_libs=" -lXau "
7276 cat > conftest.$ac_ext <<EOF
7277 #line 7278 "configure"
7278 #include "confdefs.h"
7279 /* Override any gcc2 internal prototype to avoid an error.  */
7280 /* We use char because int might match the return type of a gcc2
7281     builtin and then its argument prototype would still apply.  */
7282 char XauGetAuthByAddr();
7283
7284 int main() {
7285 XauGetAuthByAddr()
7286 ; return 0; }
7287 EOF
7288 if { (eval echo configure:7289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7289   rm -rf conftest*
7290   eval "ac_cv_lib_$ac_lib_var=yes"
7291 else
7292   echo "configure: failed program was:" >&5
7293   cat conftest.$ac_ext >&5
7294   rm -rf conftest*
7295   eval "ac_cv_lib_$ac_lib_var=no"
7296 fi
7297 rm -f conftest*
7298 xe_check_libs=""
7299
7300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7301   echo "$ac_t""yes" 1>&6
7302   :
7303 else
7304   echo "$ac_t""no" 1>&6
7305 with_xauth=no
7306 fi
7307
7308  }
7309 test -z "$with_xauth" && with_xauth=yes
7310 if test "$with_xauth" = "yes"; then
7311   { test "$extra_verbose" = "yes" && cat << \EOF
7312     Defining HAVE_XAUTH
7313 EOF
7314 cat >> confdefs.h <<\EOF
7315 #define HAVE_XAUTH 1
7316 EOF
7317 }
7318
7319   
7320 T=""
7321 for W in $GTK_LIBS $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
7322 libs_xauth="$T"
7323
7324 fi
7325
7326
7327
7328
7329 if test "$with_tooltalk" != "no" ; then
7330       for dir in "" "Tt/" "desktop/" ; do
7331     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7332 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7333 echo "configure:7334: checking for ${dir}tt_c.h" >&5
7334
7335 cat > conftest.$ac_ext <<EOF
7336 #line 7337 "configure"
7337 #include "confdefs.h"
7338 #include <${dir}tt_c.h>
7339 EOF
7340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7341 { (eval echo configure:7342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7343 if test -z "$ac_err"; then
7344   rm -rf conftest*
7345   eval "ac_cv_header_$ac_safe=yes"
7346 else
7347   echo "$ac_err" >&5
7348   echo "configure: failed program was:" >&5
7349   cat conftest.$ac_ext >&5
7350   rm -rf conftest*
7351   eval "ac_cv_header_$ac_safe=no"
7352 fi
7353 rm -f conftest*
7354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7355   echo "$ac_t""yes" 1>&6
7356   tt_c_h_file="${dir}tt_c.h"; break
7357 else
7358   echo "$ac_t""no" 1>&6
7359 fi
7360
7361   done
7362   if test -z "$tt_c_h_file"; then
7363     if test "$with_tooltalk" = "yes"; then
7364       (echo "$progname: Usage error:"
7365 echo " " "Unable to find required tooltalk header files."
7366 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7367     fi
7368     with_tooltalk=no
7369   fi
7370 fi
7371 if test "$with_tooltalk" != "no" ; then
7372   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7373     
7374 xe_msg_checking="for tt_message_create in -ltt"
7375 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7376 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7377 echo "configure:7378: checking "$xe_msg_checking"" >&5
7378 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7379
7380 xe_check_libs=" -ltt $extra_libs"
7381 cat > conftest.$ac_ext <<EOF
7382 #line 7383 "configure"
7383 #include "confdefs.h"
7384 /* Override any gcc2 internal prototype to avoid an error.  */
7385 /* We use char because int might match the return type of a gcc2
7386     builtin and then its argument prototype would still apply.  */
7387 char tt_message_create();
7388
7389 int main() {
7390 tt_message_create()
7391 ; return 0; }
7392 EOF
7393 if { (eval echo configure:7394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7394   rm -rf conftest*
7395   eval "ac_cv_lib_$ac_lib_var=yes"
7396 else
7397   echo "configure: failed program was:" >&5
7398   cat conftest.$ac_ext >&5
7399   rm -rf conftest*
7400   eval "ac_cv_lib_$ac_lib_var=no"
7401 fi
7402 rm -f conftest*
7403 xe_check_libs=""
7404
7405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7406   echo "$ac_t""yes" 1>&6
7407   tt_libs="-ltt $extra_libs"; break
7408 else
7409   echo "$ac_t""no" 1>&6
7410 :
7411 fi
7412
7413
7414   done
7415   if test -z "$tt_libs"; then
7416     if test "$with_tooltalk" = "yes"; then
7417       (echo "$progname: Usage error:"
7418 echo " " "Unable to find required tooltalk libraries."
7419 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7420     fi
7421     with_tooltalk=no
7422   fi
7423 fi
7424 test -z "$with_tooltalk" && with_tooltalk=yes
7425 if test "$with_tooltalk" = "yes"; then
7426   { test "$extra_verbose" = "yes" && cat << \EOF
7427     Defining TOOLTALK
7428 EOF
7429 cat >> confdefs.h <<\EOF
7430 #define TOOLTALK 1
7431 EOF
7432 }
7433
7434   { test "$extra_verbose" = "yes" && cat << EOF
7435     Defining TT_C_H_FILE = "$tt_c_h_file"
7436 EOF
7437 cat >> confdefs.h <<EOF
7438 #define TT_C_H_FILE "$tt_c_h_file"
7439 EOF
7440 }
7441
7442   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7443   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7444    echo "    xemacs will be linked with \"tooltalk.o\""
7445  fi
7446 fi
7447
7448 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7449 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7450 echo "configure:7451: checking for Dt/Dt.h" >&5
7451
7452 cat > conftest.$ac_ext <<EOF
7453 #line 7454 "configure"
7454 #include "confdefs.h"
7455 #include <Dt/Dt.h>
7456 EOF
7457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7458 { (eval echo configure:7459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7460 if test -z "$ac_err"; then
7461   rm -rf conftest*
7462   eval "ac_cv_header_$ac_safe=yes"
7463 else
7464   echo "$ac_err" >&5
7465   echo "configure: failed program was:" >&5
7466   cat conftest.$ac_ext >&5
7467   rm -rf conftest*
7468   eval "ac_cv_header_$ac_safe=no"
7469 fi
7470 rm -f conftest*
7471 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7472   echo "$ac_t""yes" 1>&6
7473   :
7474 else
7475   echo "$ac_t""no" 1>&6
7476 with_cde=no
7477 fi
7478  }
7479 test -z "$with_cde" && { 
7480 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7481 echo "configure:7482: checking for DtDndDragStart in -lDtSvc" >&5
7482 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7483
7484 xe_check_libs=" -lDtSvc "
7485 cat > conftest.$ac_ext <<EOF
7486 #line 7487 "configure"
7487 #include "confdefs.h"
7488 /* Override any gcc2 internal prototype to avoid an error.  */
7489 /* We use char because int might match the return type of a gcc2
7490     builtin and then its argument prototype would still apply.  */
7491 char DtDndDragStart();
7492
7493 int main() {
7494 DtDndDragStart()
7495 ; return 0; }
7496 EOF
7497 if { (eval echo configure:7498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7498   rm -rf conftest*
7499   eval "ac_cv_lib_$ac_lib_var=yes"
7500 else
7501   echo "configure: failed program was:" >&5
7502   cat conftest.$ac_ext >&5
7503   rm -rf conftest*
7504   eval "ac_cv_lib_$ac_lib_var=no"
7505 fi
7506 rm -f conftest*
7507 xe_check_libs=""
7508
7509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7510   echo "$ac_t""yes" 1>&6
7511   :
7512 else
7513   echo "$ac_t""no" 1>&6
7514 with_cde=no
7515 fi
7516
7517  }
7518 test -z "$with_cde" && with_cde=yes
7519 if test "$with_dragndrop" = no; then
7520   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7521   with_cde=no
7522 fi
7523 if test "$with_cde" = "yes" ; then
7524   { test "$extra_verbose" = "yes" && cat << \EOF
7525     Defining HAVE_CDE
7526 EOF
7527 cat >> confdefs.h <<\EOF
7528 #define HAVE_CDE 1
7529 EOF
7530 }
7531
7532   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7533   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7534   with_tooltalk=yes # CDE requires Tooltalk
7535   need_motif=yes    # CDE requires Motif
7536 fi
7537
7538 test "$window_system" != "x11" && with_offix=no
7539 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7540   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7541   with_offix=no
7542 fi
7543 if test "$with_dragndrop" = no; then
7544   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7545   with_offix=no
7546 fi
7547 if test "$with_cde" = yes; then
7548   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7549   with_offix=no
7550 fi
7551 test -z "$with_offix" && with_offix=no
7552 if test "$with_offix" = "yes"; then
7553   { test "$extra_verbose" = "yes" && cat << \EOF
7554     Defining HAVE_OFFIX_DND
7555 EOF
7556 cat >> confdefs.h <<\EOF
7557 #define HAVE_OFFIX_DND 1
7558 EOF
7559 }
7560
7561   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7562   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7563 fi
7564 if test "$with_gtk" = "yes"; then
7565    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7566 fi
7567
7568 if test "$with_dragndrop" != "no" ; then
7569   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7570 echo "configure:7571: checking if drag and drop API is needed" >&5
7571   if test -n "$dragndrop_proto" ; then
7572     with_dragndrop=yes
7573     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7574     { test "$extra_verbose" = "yes" && cat << \EOF
7575     Defining HAVE_DRAGNDROP
7576 EOF
7577 cat >> confdefs.h <<\EOF
7578 #define HAVE_DRAGNDROP 1
7579 EOF
7580 }
7581
7582     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7583   else
7584     with_dragndrop=no
7585     echo "$ac_t""no" 1>&6
7586   fi
7587 fi
7588
7589 echo "checking for LDAP" 1>&6
7590 echo "configure:7591: checking for LDAP" >&5
7591 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7592 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7593 echo "configure:7594: checking for ldap.h" >&5
7594
7595 cat > conftest.$ac_ext <<EOF
7596 #line 7597 "configure"
7597 #include "confdefs.h"
7598 #include <ldap.h>
7599 EOF
7600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7601 { (eval echo configure:7602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7603 if test -z "$ac_err"; then
7604   rm -rf conftest*
7605   eval "ac_cv_header_$ac_safe=yes"
7606 else
7607   echo "$ac_err" >&5
7608   echo "configure: failed program was:" >&5
7609   cat conftest.$ac_ext >&5
7610   rm -rf conftest*
7611   eval "ac_cv_header_$ac_safe=no"
7612 fi
7613 rm -f conftest*
7614 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7615   echo "$ac_t""yes" 1>&6
7616   :
7617 else
7618   echo "$ac_t""no" 1>&6
7619 with_ldap=no
7620 fi
7621  }
7622 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7623 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7624 echo "configure:7625: checking for lber.h" >&5
7625
7626 cat > conftest.$ac_ext <<EOF
7627 #line 7628 "configure"
7628 #include "confdefs.h"
7629 #include <lber.h>
7630 EOF
7631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7632 { (eval echo configure:7633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7634 if test -z "$ac_err"; then
7635   rm -rf conftest*
7636   eval "ac_cv_header_$ac_safe=yes"
7637 else
7638   echo "$ac_err" >&5
7639   echo "configure: failed program was:" >&5
7640   cat conftest.$ac_ext >&5
7641   rm -rf conftest*
7642   eval "ac_cv_header_$ac_safe=no"
7643 fi
7644 rm -f conftest*
7645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7646   echo "$ac_t""yes" 1>&6
7647   :
7648 else
7649   echo "$ac_t""no" 1>&6
7650 with_ldap=no
7651 fi
7652  }
7653 if test "$with_ldap" != "no"; then
7654   
7655 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7656 echo "configure:7657: checking for ldap_search in -lldap" >&5
7657 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7658
7659 xe_check_libs=" -lldap "
7660 cat > conftest.$ac_ext <<EOF
7661 #line 7662 "configure"
7662 #include "confdefs.h"
7663 /* Override any gcc2 internal prototype to avoid an error.  */
7664 /* We use char because int might match the return type of a gcc2
7665     builtin and then its argument prototype would still apply.  */
7666 char ldap_search();
7667
7668 int main() {
7669 ldap_search()
7670 ; return 0; }
7671 EOF
7672 if { (eval echo configure:7673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7673   rm -rf conftest*
7674   eval "ac_cv_lib_$ac_lib_var=yes"
7675 else
7676   echo "configure: failed program was:" >&5
7677   cat conftest.$ac_ext >&5
7678   rm -rf conftest*
7679   eval "ac_cv_lib_$ac_lib_var=no"
7680 fi
7681 rm -f conftest*
7682 xe_check_libs=""
7683
7684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7685   echo "$ac_t""yes" 1>&6
7686   with_ldap_nolber=yes
7687 else
7688   echo "$ac_t""no" 1>&6
7689 with_ldap_nolber=no
7690 fi
7691
7692
7693   test "$with_ldap_nolber" = "no" && { 
7694 xe_msg_checking="for ldap_open in -lldap"
7695 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7696 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7697 echo "configure:7698: checking "$xe_msg_checking"" >&5
7698 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7699
7700 xe_check_libs=" -lldap -llber"
7701 cat > conftest.$ac_ext <<EOF
7702 #line 7703 "configure"
7703 #include "confdefs.h"
7704 /* Override any gcc2 internal prototype to avoid an error.  */
7705 /* We use char because int might match the return type of a gcc2
7706     builtin and then its argument prototype would still apply.  */
7707 char ldap_open();
7708
7709 int main() {
7710 ldap_open()
7711 ; return 0; }
7712 EOF
7713 if { (eval echo configure:7714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7714   rm -rf conftest*
7715   eval "ac_cv_lib_$ac_lib_var=yes"
7716 else
7717   echo "configure: failed program was:" >&5
7718   cat conftest.$ac_ext >&5
7719   rm -rf conftest*
7720   eval "ac_cv_lib_$ac_lib_var=no"
7721 fi
7722 rm -f conftest*
7723 xe_check_libs=""
7724
7725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7726   echo "$ac_t""yes" 1>&6
7727   with_ldap_lber=yes
7728 else
7729   echo "$ac_t""no" 1>&6
7730 with_ldap_lber=no
7731 fi
7732
7733  }
7734   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7735 xe_msg_checking="for ldap_open in -lldap"
7736 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7737 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7738 echo "configure:7739: checking "$xe_msg_checking"" >&5
7739 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7740
7741 xe_check_libs=" -lldap -llber -lkrb"
7742 cat > conftest.$ac_ext <<EOF
7743 #line 7744 "configure"
7744 #include "confdefs.h"
7745 /* Override any gcc2 internal prototype to avoid an error.  */
7746 /* We use char because int might match the return type of a gcc2
7747     builtin and then its argument prototype would still apply.  */
7748 char ldap_open();
7749
7750 int main() {
7751 ldap_open()
7752 ; return 0; }
7753 EOF
7754 if { (eval echo configure:7755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7755   rm -rf conftest*
7756   eval "ac_cv_lib_$ac_lib_var=yes"
7757 else
7758   echo "configure: failed program was:" >&5
7759   cat conftest.$ac_ext >&5
7760   rm -rf conftest*
7761   eval "ac_cv_lib_$ac_lib_var=no"
7762 fi
7763 rm -f conftest*
7764 xe_check_libs=""
7765
7766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7767   echo "$ac_t""yes" 1>&6
7768   with_ldap_krb=yes
7769 else
7770   echo "$ac_t""no" 1>&6
7771 with_ldap_krb=no
7772 fi
7773
7774  }
7775   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7776 xe_msg_checking="for ldap_open in -lldap"
7777 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7778 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7779 echo "configure:7780: checking "$xe_msg_checking"" >&5
7780 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7781
7782 xe_check_libs=" -lldap -llber -lkrb -ldes"
7783 cat > conftest.$ac_ext <<EOF
7784 #line 7785 "configure"
7785 #include "confdefs.h"
7786 /* Override any gcc2 internal prototype to avoid an error.  */
7787 /* We use char because int might match the return type of a gcc2
7788     builtin and then its argument prototype would still apply.  */
7789 char ldap_open();
7790
7791 int main() {
7792 ldap_open()
7793 ; return 0; }
7794 EOF
7795 if { (eval echo configure:7796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7796   rm -rf conftest*
7797   eval "ac_cv_lib_$ac_lib_var=yes"
7798 else
7799   echo "configure: failed program was:" >&5
7800   cat conftest.$ac_ext >&5
7801   rm -rf conftest*
7802   eval "ac_cv_lib_$ac_lib_var=no"
7803 fi
7804 rm -f conftest*
7805 xe_check_libs=""
7806
7807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7808   echo "$ac_t""yes" 1>&6
7809   with_ldap_krbdes=yes
7810 else
7811   echo "$ac_t""no" 1>&6
7812 with_ldap_krbdes=no
7813 fi
7814
7815  }
7816   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
7817 fi
7818 if test "$with_ldap" = "yes"; then
7819   { test "$extra_verbose" = "yes" && cat << \EOF
7820     Defining HAVE_LDAP
7821 EOF
7822 cat >> confdefs.h <<\EOF
7823 #define HAVE_LDAP 1
7824 EOF
7825 }
7826
7827   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7828    echo "    xemacs will be linked with \"eldap.o\""
7829  fi
7830   if test "$with_ldap_nolber" = "yes" ; then
7831     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7832   else
7833     if test "$with_ldap_krb" = "yes" ; then
7834       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7835     fi
7836     if test "$with_ldap_krbdes" = "yes" ; then
7837       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7838       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7839     fi
7840     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7841     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7842   fi
7843   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7844 do
7845 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7846 echo "configure:7847: checking for $ac_func" >&5
7847
7848 cat > conftest.$ac_ext <<EOF
7849 #line 7850 "configure"
7850 #include "confdefs.h"
7851 /* System header to define __stub macros and hopefully few prototypes,
7852     which can conflict with char $ac_func(); below.  */
7853 #include <assert.h>
7854 /* Override any gcc2 internal prototype to avoid an error.  */
7855 /* We use char because int might match the return type of a gcc2
7856     builtin and then its argument prototype would still apply.  */
7857 char $ac_func();
7858
7859 int main() {
7860
7861 /* The GNU C library defines this for functions which it implements
7862     to always fail with ENOSYS.  Some functions are actually named
7863     something starting with __ and the normal name is an alias.  */
7864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7865 choke me
7866 #else
7867 $ac_func();
7868 #endif
7869
7870 ; return 0; }
7871 EOF
7872 if { (eval echo configure:7873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7873   rm -rf conftest*
7874   eval "ac_cv_func_$ac_func=yes"
7875 else
7876   echo "configure: failed program was:" >&5
7877   cat conftest.$ac_ext >&5
7878   rm -rf conftest*
7879   eval "ac_cv_func_$ac_func=no"
7880 fi
7881 rm -f conftest*
7882
7883 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7884   echo "$ac_t""yes" 1>&6
7885     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7886   { test "$extra_verbose" = "yes" && cat << EOF
7887     Defining $ac_tr_func
7888 EOF
7889 cat >> confdefs.h <<EOF
7890 #define $ac_tr_func 1
7891 EOF
7892 }
7893  
7894 else
7895   echo "$ac_t""no" 1>&6
7896 fi
7897 done
7898
7899 fi
7900
7901 if test "$with_postgresql" != "no"; then
7902   echo "checking for PostgreSQL" 1>&6
7903 echo "configure:7904: checking for PostgreSQL" >&5
7904
7905   for header_dir in "" "pgsql/" "postgresql/"; do
7906     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7907 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7908 echo "configure:7909: checking for ${header_dir}libpq-fe.h" >&5
7909
7910 cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913 #include <${header_dir}libpq-fe.h>
7914 EOF
7915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7916 { (eval echo configure:7917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7918 if test -z "$ac_err"; then
7919   rm -rf conftest*
7920   eval "ac_cv_header_$ac_safe=yes"
7921 else
7922   echo "$ac_err" >&5
7923   echo "configure: failed program was:" >&5
7924   cat conftest.$ac_ext >&5
7925   rm -rf conftest*
7926   eval "ac_cv_header_$ac_safe=no"
7927 fi
7928 rm -f conftest*
7929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7930   echo "$ac_t""yes" 1>&6
7931   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7932 else
7933   echo "$ac_t""no" 1>&6
7934 fi
7935
7936   done
7937
7938   test -n "$libpq_fe_h_file" && { 
7939 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7940 echo "configure:7941: checking for PQconnectdb in -lpq" >&5
7941 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7942
7943 xe_check_libs=" -lpq "
7944 cat > conftest.$ac_ext <<EOF
7945 #line 7946 "configure"
7946 #include "confdefs.h"
7947 /* Override any gcc2 internal prototype to avoid an error.  */
7948 /* We use char because int might match the return type of a gcc2
7949     builtin and then its argument prototype would still apply.  */
7950 char PQconnectdb();
7951
7952 int main() {
7953 PQconnectdb()
7954 ; return 0; }
7955 EOF
7956 if { (eval echo configure:7957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7957   rm -rf conftest*
7958   eval "ac_cv_lib_$ac_lib_var=yes"
7959 else
7960   echo "configure: failed program was:" >&5
7961   cat conftest.$ac_ext >&5
7962   rm -rf conftest*
7963   eval "ac_cv_lib_$ac_lib_var=no"
7964 fi
7965 rm -f conftest*
7966 xe_check_libs=""
7967
7968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7969   echo "$ac_t""yes" 1>&6
7970   have_libpq=yes
7971 else
7972   echo "$ac_t""no" 1>&6
7973 fi
7974
7975  }
7976
7977   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7978     with_postgresql=yes
7979     { test "$extra_verbose" = "yes" && cat << \EOF
7980     Defining HAVE_POSTGRESQL
7981 EOF
7982 cat >> confdefs.h <<\EOF
7983 #define HAVE_POSTGRESQL 1
7984 EOF
7985 }
7986
7987     
7988 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7989 echo "configure:7990: checking for PQconnectStart in -lpq" >&5
7990 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7991
7992 xe_check_libs=" -lpq "
7993 cat > conftest.$ac_ext <<EOF
7994 #line 7995 "configure"
7995 #include "confdefs.h"
7996 /* Override any gcc2 internal prototype to avoid an error.  */
7997 /* We use char because int might match the return type of a gcc2
7998     builtin and then its argument prototype would still apply.  */
7999 char PQconnectStart();
8000
8001 int main() {
8002 PQconnectStart()
8003 ; return 0; }
8004 EOF
8005 if { (eval echo configure:8006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8006   rm -rf conftest*
8007   eval "ac_cv_lib_$ac_lib_var=yes"
8008 else
8009   echo "configure: failed program was:" >&5
8010   cat conftest.$ac_ext >&5
8011   rm -rf conftest*
8012   eval "ac_cv_lib_$ac_lib_var=no"
8013 fi
8014 rm -f conftest*
8015 xe_check_libs=""
8016
8017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8018   echo "$ac_t""yes" 1>&6
8019   with_postgresqlv7=yes;
8020                  { test "$extra_verbose" = "yes" && cat << \EOF
8021     Defining HAVE_POSTGRESQLV7
8022 EOF
8023 cat >> confdefs.h <<\EOF
8024 #define HAVE_POSTGRESQLV7 1
8025 EOF
8026 }
8027
8028 else
8029   echo "$ac_t""no" 1>&6
8030 fi
8031
8032
8033     { test "$extra_verbose" = "yes" && cat << EOF
8034     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8035 EOF
8036 cat >> confdefs.h <<EOF
8037 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8038 EOF
8039 }
8040
8041     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8042     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8043    echo "    xemacs will be linked with \"postgresql.o\""
8044  fi
8045   elif test "$with_postgresql" = "yes"; then
8046     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8047   fi
8048 fi
8049
8050
8051 if test "$window_system" != "none"; then
8052   echo "checking for graphics libraries" 1>&6
8053 echo "configure:8054: checking for graphics libraries" >&5
8054
8055       libpath_xpm=
8056   incpath_xpm=
8057   case "$opsys" in 
8058     cygwin*)
8059       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8060       cygwin_top=`eval "dirname ${cygwin_top}"`;
8061       cygwin_top="${cygwin_top}/..";
8062       case "$window_system" in
8063                 x11)  ;;
8064                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8065              incpath_xpm="-I${cygwin_top}/include/noX"
8066               ;;
8067                 gtk)  ;;
8068                 none) ;;
8069                 *)    ;;
8070       esac
8071       ;;
8072         *) ;;
8073   esac
8074     xpm_problem=""
8075   if test -z "$with_xpm"; then
8076     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8077     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8078     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8079 echo "configure:8080: checking for Xpm - no older than 3.4f" >&5
8080     xe_check_libs=-lXpm
8081     cat > conftest.$ac_ext <<EOF
8082 #line 8083 "configure"
8083 #include "confdefs.h"
8084 #define XPM_NUMBERS
8085 #include <X11/xpm.h>
8086     int main(int c, char **v) {
8087     return c == 1 ? 0 :
8088       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8089       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8090 EOF
8091 if { (eval echo configure:8092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8092 then
8093   ./conftest dummy_arg; xpm_status=$?;
8094       if test "$xpm_status" = "0"; then
8095         with_xpm=yes;
8096       else
8097         with_xpm=no;
8098         if test "$xpm_status" = "1"; then
8099           xpm_problem="Xpm library version and header file version don't match!"
8100         elif test "$xpm_status" = "2"; then
8101           xpm_problem="Xpm library version is too old!"
8102         else
8103           xpm_problem="Internal xpm detection logic error!"
8104         fi
8105         echo "
8106 *** WARNING *** $xpm_problem
8107   I'm not touching that with a 10-foot pole!
8108   If you really want to use the installed version of Xpm, rerun
8109   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8110     fi
8111 else
8112   conftest_rc="$?"
8113   echo "configure: failed program was:" >&5
8114   cat conftest.$ac_ext >&5
8115   rm -fr conftest*
8116   with_xpm=no
8117 fi
8118 rm -fr conftest*
8119     xe_check_libs=
8120     echo "$ac_t""$with_xpm" 1>&6
8121   fi
8122   if test "$with_xpm" = "yes"; then
8123                 { test "$extra_verbose" = "yes" && cat << \EOF
8124     Defining HAVE_XPM
8125 EOF
8126 cat >> confdefs.h <<\EOF
8127 #define HAVE_XPM 1
8128 EOF
8129 }
8130
8131     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8132     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8133     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8134     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8135 echo "configure:8136: checking for \"FOR_MSW\" xpm" >&5
8136     xe_check_libs=-lXpm
8137     cat > conftest.$ac_ext <<EOF
8138 #line 8139 "configure"
8139 #include "confdefs.h"
8140
8141 int main() {
8142 XpmCreatePixmapFromData()
8143 ; return 0; }
8144 EOF
8145 if { (eval echo configure:8146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8146   rm -rf conftest*
8147   xpm_for_msw=no
8148 else
8149   echo "configure: failed program was:" >&5
8150   cat conftest.$ac_ext >&5
8151   rm -rf conftest*
8152   xpm_for_msw=yes
8153 fi
8154 rm -f conftest*
8155     xe_check_libs=
8156     echo "$ac_t""$xpm_for_msw" 1>&6
8157     if test "$xpm_for_msw" = "yes"; then
8158       { test "$extra_verbose" = "yes" && cat << \EOF
8159     Defining FOR_MSW
8160 EOF
8161 cat >> confdefs.h <<\EOF
8162 #define FOR_MSW 1
8163 EOF
8164 }
8165
8166     fi
8167   fi
8168
8169     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8170 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8171 echo "configure:8172: checking for compface.h" >&5
8172
8173 cat > conftest.$ac_ext <<EOF
8174 #line 8175 "configure"
8175 #include "confdefs.h"
8176 #include <compface.h>
8177 EOF
8178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8179 { (eval echo configure:8180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8181 if test -z "$ac_err"; then
8182   rm -rf conftest*
8183   eval "ac_cv_header_$ac_safe=yes"
8184 else
8185   echo "$ac_err" >&5
8186   echo "configure: failed program was:" >&5
8187   cat conftest.$ac_ext >&5
8188   rm -rf conftest*
8189   eval "ac_cv_header_$ac_safe=no"
8190 fi
8191 rm -f conftest*
8192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8193   echo "$ac_t""yes" 1>&6
8194   :
8195 else
8196   echo "$ac_t""no" 1>&6
8197 with_xface=no
8198 fi
8199  }
8200   test -z "$with_xface" && { 
8201 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8202 echo "configure:8203: checking for UnGenFace in -lcompface" >&5
8203 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8204
8205 xe_check_libs=" -lcompface "
8206 cat > conftest.$ac_ext <<EOF
8207 #line 8208 "configure"
8208 #include "confdefs.h"
8209 /* Override any gcc2 internal prototype to avoid an error.  */
8210 /* We use char because int might match the return type of a gcc2
8211     builtin and then its argument prototype would still apply.  */
8212 char UnGenFace();
8213
8214 int main() {
8215 UnGenFace()
8216 ; return 0; }
8217 EOF
8218 if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8219   rm -rf conftest*
8220   eval "ac_cv_lib_$ac_lib_var=yes"
8221 else
8222   echo "configure: failed program was:" >&5
8223   cat conftest.$ac_ext >&5
8224   rm -rf conftest*
8225   eval "ac_cv_lib_$ac_lib_var=no"
8226 fi
8227 rm -f conftest*
8228 xe_check_libs=""
8229
8230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8231   echo "$ac_t""yes" 1>&6
8232   : 
8233 else
8234   echo "$ac_t""no" 1>&6
8235 with_xface=no
8236 fi
8237
8238  }
8239   test -z "$with_xface" && with_xface=yes
8240   if test "$with_xface" = "yes"; then
8241     { test "$extra_verbose" = "yes" && cat << \EOF
8242     Defining HAVE_XFACE
8243 EOF
8244 cat >> confdefs.h <<\EOF
8245 #define HAVE_XFACE 1
8246 EOF
8247 }
8248
8249     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8250   fi
8251
8252         if test "$with_gif" != "no"; then
8253     with_gif="yes"
8254     { test "$extra_verbose" = "yes" && cat << \EOF
8255     Defining HAVE_GIF
8256 EOF
8257 cat >> confdefs.h <<\EOF
8258 #define HAVE_GIF 1
8259 EOF
8260 }
8261
8262     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8263    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8264  fi
8265   fi
8266
8267       if test "$with_png $with_tiff" != "no no"; then
8268     
8269 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8270 echo "configure:8271: checking for inflate in -lc" >&5
8271 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8272
8273 xe_check_libs=" -lc "
8274 cat > conftest.$ac_ext <<EOF
8275 #line 8276 "configure"
8276 #include "confdefs.h"
8277 /* Override any gcc2 internal prototype to avoid an error.  */
8278 /* We use char because int might match the return type of a gcc2
8279     builtin and then its argument prototype would still apply.  */
8280 char inflate();
8281
8282 int main() {
8283 inflate()
8284 ; return 0; }
8285 EOF
8286 if { (eval echo configure:8287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8287   rm -rf conftest*
8288   eval "ac_cv_lib_$ac_lib_var=yes"
8289 else
8290   echo "configure: failed program was:" >&5
8291   cat conftest.$ac_ext >&5
8292   rm -rf conftest*
8293   eval "ac_cv_lib_$ac_lib_var=no"
8294 fi
8295 rm -f conftest*
8296 xe_check_libs=""
8297
8298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8299   echo "$ac_t""yes" 1>&6
8300   :
8301 else
8302   echo "$ac_t""no" 1>&6
8303
8304 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8305 echo "configure:8306: checking for inflate in -lz" >&5
8306 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8307
8308 xe_check_libs=" -lz "
8309 cat > conftest.$ac_ext <<EOF
8310 #line 8311 "configure"
8311 #include "confdefs.h"
8312 /* Override any gcc2 internal prototype to avoid an error.  */
8313 /* We use char because int might match the return type of a gcc2
8314     builtin and then its argument prototype would still apply.  */
8315 char inflate();
8316
8317 int main() {
8318 inflate()
8319 ; return 0; }
8320 EOF
8321 if { (eval echo configure:8322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8322   rm -rf conftest*
8323   eval "ac_cv_lib_$ac_lib_var=yes"
8324 else
8325   echo "configure: failed program was:" >&5
8326   cat conftest.$ac_ext >&5
8327   rm -rf conftest*
8328   eval "ac_cv_lib_$ac_lib_var=no"
8329 fi
8330 rm -f conftest*
8331 xe_check_libs=""
8332
8333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8334   echo "$ac_t""yes" 1>&6
8335   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8336 else
8337   echo "$ac_t""no" 1>&6
8338
8339 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8340 echo "configure:8341: checking for inflate in -lgz" >&5
8341 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8342
8343 xe_check_libs=" -lgz "
8344 cat > conftest.$ac_ext <<EOF
8345 #line 8346 "configure"
8346 #include "confdefs.h"
8347 /* Override any gcc2 internal prototype to avoid an error.  */
8348 /* We use char because int might match the return type of a gcc2
8349     builtin and then its argument prototype would still apply.  */
8350 char inflate();
8351
8352 int main() {
8353 inflate()
8354 ; return 0; }
8355 EOF
8356 if { (eval echo configure:8357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8357   rm -rf conftest*
8358   eval "ac_cv_lib_$ac_lib_var=yes"
8359 else
8360   echo "configure: failed program was:" >&5
8361   cat conftest.$ac_ext >&5
8362   rm -rf conftest*
8363   eval "ac_cv_lib_$ac_lib_var=no"
8364 fi
8365 rm -f conftest*
8366 xe_check_libs=""
8367
8368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8369   echo "$ac_t""yes" 1>&6
8370   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8371 else
8372   echo "$ac_t""no" 1>&6
8373 fi
8374
8375
8376 fi
8377
8378
8379 fi
8380
8381
8382   fi
8383
8384     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8385 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8386 echo "configure:8387: checking for jpeglib.h" >&5
8387
8388 cat > conftest.$ac_ext <<EOF
8389 #line 8390 "configure"
8390 #include "confdefs.h"
8391 #include <jpeglib.h>
8392 EOF
8393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8394 { (eval echo configure:8395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8396 if test -z "$ac_err"; then
8397   rm -rf conftest*
8398   eval "ac_cv_header_$ac_safe=yes"
8399 else
8400   echo "$ac_err" >&5
8401   echo "configure: failed program was:" >&5
8402   cat conftest.$ac_ext >&5
8403   rm -rf conftest*
8404   eval "ac_cv_header_$ac_safe=no"
8405 fi
8406 rm -f conftest*
8407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8408   echo "$ac_t""yes" 1>&6
8409   :
8410 else
8411   echo "$ac_t""no" 1>&6
8412 with_jpeg=no
8413 fi
8414  }
8415   test -z "$with_jpeg" && { 
8416 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8417 echo "configure:8418: checking for jpeg_destroy_decompress in -ljpeg" >&5
8418 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8419
8420 xe_check_libs=" -ljpeg "
8421 cat > conftest.$ac_ext <<EOF
8422 #line 8423 "configure"
8423 #include "confdefs.h"
8424 /* Override any gcc2 internal prototype to avoid an error.  */
8425 /* We use char because int might match the return type of a gcc2
8426     builtin and then its argument prototype would still apply.  */
8427 char jpeg_destroy_decompress();
8428
8429 int main() {
8430 jpeg_destroy_decompress()
8431 ; return 0; }
8432 EOF
8433 if { (eval echo configure:8434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8434   rm -rf conftest*
8435   eval "ac_cv_lib_$ac_lib_var=yes"
8436 else
8437   echo "configure: failed program was:" >&5
8438   cat conftest.$ac_ext >&5
8439   rm -rf conftest*
8440   eval "ac_cv_lib_$ac_lib_var=no"
8441 fi
8442 rm -f conftest*
8443 xe_check_libs=""
8444
8445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8446   echo "$ac_t""yes" 1>&6
8447   :
8448 else
8449   echo "$ac_t""no" 1>&6
8450 with_jpeg=no
8451 fi
8452
8453  }
8454   test -z "$with_jpeg" && with_jpeg=yes
8455   if test "$with_jpeg" = "yes"; then
8456     { test "$extra_verbose" = "yes" && cat << \EOF
8457     Defining HAVE_JPEG
8458 EOF
8459 cat >> confdefs.h <<\EOF
8460 #define HAVE_JPEG 1
8461 EOF
8462 }
8463
8464     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8465   fi
8466
8467     png_problem=""
8468   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8469 echo "configure:8470: checking for pow" >&5
8470
8471 cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474 /* System header to define __stub macros and hopefully few prototypes,
8475     which can conflict with char pow(); below.  */
8476 #include <assert.h>
8477 /* Override any gcc2 internal prototype to avoid an error.  */
8478 /* We use char because int might match the return type of a gcc2
8479     builtin and then its argument prototype would still apply.  */
8480 char pow();
8481
8482 int main() {
8483
8484 /* The GNU C library defines this for functions which it implements
8485     to always fail with ENOSYS.  Some functions are actually named
8486     something starting with __ and the normal name is an alias.  */
8487 #if defined (__stub_pow) || defined (__stub___pow)
8488 choke me
8489 #else
8490 pow();
8491 #endif
8492
8493 ; return 0; }
8494 EOF
8495 if { (eval echo configure:8496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8496   rm -rf conftest*
8497   eval "ac_cv_func_pow=yes"
8498 else
8499   echo "configure: failed program was:" >&5
8500   cat conftest.$ac_ext >&5
8501   rm -rf conftest*
8502   eval "ac_cv_func_pow=no"
8503 fi
8504 rm -f conftest*
8505
8506 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8507   echo "$ac_t""yes" 1>&6
8508   :
8509 else
8510   echo "$ac_t""no" 1>&6
8511 with_png=no
8512 fi
8513  }
8514   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8515 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8516 echo "configure:8517: checking for png.h" >&5
8517
8518 cat > conftest.$ac_ext <<EOF
8519 #line 8520 "configure"
8520 #include "confdefs.h"
8521 #include <png.h>
8522 EOF
8523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8524 { (eval echo configure:8525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8526 if test -z "$ac_err"; then
8527   rm -rf conftest*
8528   eval "ac_cv_header_$ac_safe=yes"
8529 else
8530   echo "$ac_err" >&5
8531   echo "configure: failed program was:" >&5
8532   cat conftest.$ac_ext >&5
8533   rm -rf conftest*
8534   eval "ac_cv_header_$ac_safe=no"
8535 fi
8536 rm -f conftest*
8537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8538   echo "$ac_t""yes" 1>&6
8539   :
8540 else
8541   echo "$ac_t""no" 1>&6
8542 with_png=no
8543 fi
8544  }
8545   test -z "$with_png" && { 
8546 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8547 echo "configure:8548: checking for png_read_image in -lpng" >&5
8548 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8549
8550 xe_check_libs=" -lpng "
8551 cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 /* Override any gcc2 internal prototype to avoid an error.  */
8555 /* We use char because int might match the return type of a gcc2
8556     builtin and then its argument prototype would still apply.  */
8557 char png_read_image();
8558
8559 int main() {
8560 png_read_image()
8561 ; return 0; }
8562 EOF
8563 if { (eval echo configure:8564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8564   rm -rf conftest*
8565   eval "ac_cv_lib_$ac_lib_var=yes"
8566 else
8567   echo "configure: failed program was:" >&5
8568   cat conftest.$ac_ext >&5
8569   rm -rf conftest*
8570   eval "ac_cv_lib_$ac_lib_var=no"
8571 fi
8572 rm -f conftest*
8573 xe_check_libs=""
8574
8575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8576   echo "$ac_t""yes" 1>&6
8577   :
8578 else
8579   echo "$ac_t""no" 1>&6
8580 with_png=no
8581 fi
8582
8583  }
8584   if test -z "$with_png"; then
8585     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8586 echo "configure:8587: checking for workable png version information" >&5
8587     xe_check_libs="-lpng -lz"
8588     cat > conftest.$ac_ext <<EOF
8589 #line 8590 "configure"
8590 #include "confdefs.h"
8591 #include <png.h>
8592     int main(int c, char **v) {
8593     if (c == 1) return 0;
8594     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8595     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8596 EOF
8597 if { (eval echo configure:8598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8598 then
8599   ./conftest dummy_arg; png_status=$?;
8600       if test "$png_status" = "0"; then
8601         with_png=yes;
8602       else
8603         with_png=no;
8604         if test "$png_status" = "1"; then
8605           png_problem="PNG library version and header file don't match!"
8606         elif test "$png_status" = "2"; then
8607           png_problem="PNG library version too old (pre 1.0.2)!"
8608         fi
8609         echo "
8610 *** WARNING *** $png_problem
8611   I'm not touching that with a 10-foot pole!
8612   If you really want to use the installed version of libPNG, rerun
8613   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8614     fi
8615 else
8616   conftest_rc="$?"
8617   echo "configure: failed program was:" >&5
8618   cat conftest.$ac_ext >&5
8619   rm -fr conftest*
8620   with_png=no
8621 fi
8622 rm -fr conftest*
8623     xe_check_libs=
8624     echo "$ac_t""$with_png" 1>&6
8625   fi
8626   if test "$with_png" = "yes"; then
8627     { test "$extra_verbose" = "yes" && cat << \EOF
8628     Defining HAVE_PNG
8629 EOF
8630 cat >> confdefs.h <<\EOF
8631 #define HAVE_PNG 1
8632 EOF
8633 }
8634
8635     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8636   fi
8637
8638     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8639 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8640 echo "configure:8641: checking for tiffio.h" >&5
8641
8642 cat > conftest.$ac_ext <<EOF
8643 #line 8644 "configure"
8644 #include "confdefs.h"
8645 #include <tiffio.h>
8646 EOF
8647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8648 { (eval echo configure:8649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8650 if test -z "$ac_err"; then
8651   rm -rf conftest*
8652   eval "ac_cv_header_$ac_safe=yes"
8653 else
8654   echo "$ac_err" >&5
8655   echo "configure: failed program was:" >&5
8656   cat conftest.$ac_ext >&5
8657   rm -rf conftest*
8658   eval "ac_cv_header_$ac_safe=no"
8659 fi
8660 rm -f conftest*
8661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8662   echo "$ac_t""yes" 1>&6
8663   :
8664 else
8665   echo "$ac_t""no" 1>&6
8666 with_tiff=no
8667 fi
8668  }
8669   test -z "$with_tiff" && { 
8670 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8671 echo "configure:8672: checking for TIFFClientOpen in -ltiff" >&5
8672 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8673
8674 xe_check_libs=" -ltiff "
8675 cat > conftest.$ac_ext <<EOF
8676 #line 8677 "configure"
8677 #include "confdefs.h"
8678 /* Override any gcc2 internal prototype to avoid an error.  */
8679 /* We use char because int might match the return type of a gcc2
8680     builtin and then its argument prototype would still apply.  */
8681 char TIFFClientOpen();
8682
8683 int main() {
8684 TIFFClientOpen()
8685 ; return 0; }
8686 EOF
8687 if { (eval echo configure:8688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8688   rm -rf conftest*
8689   eval "ac_cv_lib_$ac_lib_var=yes"
8690 else
8691   echo "configure: failed program was:" >&5
8692   cat conftest.$ac_ext >&5
8693   rm -rf conftest*
8694   eval "ac_cv_lib_$ac_lib_var=no"
8695 fi
8696 rm -f conftest*
8697 xe_check_libs=""
8698
8699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8700   echo "$ac_t""yes" 1>&6
8701   :
8702 else
8703   echo "$ac_t""no" 1>&6
8704 with_tiff=no
8705 fi
8706
8707  }
8708   test -z "$with_tiff" && with_tiff=yes
8709   if test "$with_tiff" = "yes"; then
8710     { test "$extra_verbose" = "yes" && cat << \EOF
8711     Defining HAVE_TIFF
8712 EOF
8713 cat >> confdefs.h <<\EOF
8714 #define HAVE_TIFF 1
8715 EOF
8716 }
8717
8718     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8719   fi
8720 fi
8721
8722
8723 if test "$with_gtk" = "yes"; then
8724     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8725 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8726 echo "configure:8727: checking for compface.h" >&5
8727
8728 cat > conftest.$ac_ext <<EOF
8729 #line 8730 "configure"
8730 #include "confdefs.h"
8731 #include <compface.h>
8732 EOF
8733 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8734 { (eval echo configure:8735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8735 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8736 if test -z "$ac_err"; then
8737   rm -rf conftest*
8738   eval "ac_cv_header_$ac_safe=yes"
8739 else
8740   echo "$ac_err" >&5
8741   echo "configure: failed program was:" >&5
8742   cat conftest.$ac_ext >&5
8743   rm -rf conftest*
8744   eval "ac_cv_header_$ac_safe=no"
8745 fi
8746 rm -f conftest*
8747 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8748   echo "$ac_t""yes" 1>&6
8749   :
8750 else
8751   echo "$ac_t""no" 1>&6
8752 with_xface=no
8753 fi
8754  }
8755   test -z "$with_xface" && { 
8756 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8757 echo "configure:8758: checking for UnGenFace in -lcompface" >&5
8758 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8759
8760 xe_check_libs=" -lcompface "
8761 cat > conftest.$ac_ext <<EOF
8762 #line 8763 "configure"
8763 #include "confdefs.h"
8764 /* Override any gcc2 internal prototype to avoid an error.  */
8765 /* We use char because int might match the return type of a gcc2
8766     builtin and then its argument prototype would still apply.  */
8767 char UnGenFace();
8768
8769 int main() {
8770 UnGenFace()
8771 ; return 0; }
8772 EOF
8773 if { (eval echo configure:8774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8774   rm -rf conftest*
8775   eval "ac_cv_lib_$ac_lib_var=yes"
8776 else
8777   echo "configure: failed program was:" >&5
8778   cat conftest.$ac_ext >&5
8779   rm -rf conftest*
8780   eval "ac_cv_lib_$ac_lib_var=no"
8781 fi
8782 rm -f conftest*
8783 xe_check_libs=""
8784
8785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8786   echo "$ac_t""yes" 1>&6
8787   : 
8788 else
8789   echo "$ac_t""no" 1>&6
8790 with_xface=no
8791 fi
8792
8793  }
8794   test -z "$with_xface" && with_xface=yes
8795   if test "$with_xface" = "yes"; then
8796     { test "$extra_verbose" = "yes" && cat << \EOF
8797     Defining HAVE_XFACE
8798 EOF
8799 cat >> confdefs.h <<\EOF
8800 #define HAVE_XFACE 1
8801 EOF
8802 }
8803
8804     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8805   fi
8806 fi
8807
8808
8809
8810 if test "$with_x11" = "yes"; then
8811   echo "checking for X11 graphics libraries" 1>&6
8812 echo "configure:8813: checking for X11 graphics libraries" >&5
8813 fi
8814
8815 case "$with_widgets" in
8816   "yes" | "athena")             detect_athena=yes ;;
8817    *)                           detect_athena=no ;;
8818 esac
8819
8820 if test "$with_x11" = "yes" -a "$detect_athena" = "yes" ; then
8821   echo "checking for the Athena widgets" 1>&6
8822 echo "configure:8823: checking for the Athena widgets" >&5
8823
8824     case "$with_athena" in
8825         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8826     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8827     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8828     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8829     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8830     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8831   esac
8832
8833     if test "$athena_3d" = "no"; then
8834     
8835 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8836 echo "configure:8837: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8837 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8838
8839 xe_check_libs=" -l$athena_variant "
8840 cat > conftest.$ac_ext <<EOF
8841 #line 8842 "configure"
8842 #include "confdefs.h"
8843 /* Override any gcc2 internal prototype to avoid an error.  */
8844 /* We use char because int might match the return type of a gcc2
8845     builtin and then its argument prototype would still apply.  */
8846 char XawScrollbarSetThumb();
8847
8848 int main() {
8849 XawScrollbarSetThumb()
8850 ; return 0; }
8851 EOF
8852 if { (eval echo configure:8853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8853   rm -rf conftest*
8854   eval "ac_cv_lib_$ac_lib_var=yes"
8855 else
8856   echo "configure: failed program was:" >&5
8857   cat conftest.$ac_ext >&5
8858   rm -rf conftest*
8859   eval "ac_cv_lib_$ac_lib_var=no"
8860 fi
8861 rm -f conftest*
8862 xe_check_libs=""
8863
8864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8865   echo "$ac_t""yes" 1>&6
8866           
8867 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8868 echo "configure:8869: checking for threeDClassRec in -l$athena_variant" >&5
8869 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8870
8871 xe_check_libs=" -l$athena_variant "
8872 cat > conftest.$ac_ext <<EOF
8873 #line 8874 "configure"
8874 #include "confdefs.h"
8875 /* Override any gcc2 internal prototype to avoid an error.  */
8876 /* We use char because int might match the return type of a gcc2
8877     builtin and then its argument prototype would still apply.  */
8878 char threeDClassRec();
8879
8880 int main() {
8881 threeDClassRec()
8882 ; return 0; }
8883 EOF
8884 if { (eval echo configure:8885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8885   rm -rf conftest*
8886   eval "ac_cv_lib_$ac_lib_var=yes"
8887 else
8888   echo "configure: failed program was:" >&5
8889   cat conftest.$ac_ext >&5
8890   rm -rf conftest*
8891   eval "ac_cv_lib_$ac_lib_var=no"
8892 fi
8893 rm -f conftest*
8894 xe_check_libs=""
8895
8896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8897   echo "$ac_t""yes" 1>&6
8898   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8899 else
8900   echo "$ac_t""no" 1>&6
8901 athena_lib=$athena_variant
8902 fi
8903
8904
8905       
8906 else
8907   echo "$ac_t""no" 1>&6
8908 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8909 fi
8910
8911
8912   else
8913         
8914 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8915 echo "configure:8916: checking for threeDClassRec in -l$athena_variant" >&5
8916 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8917
8918 xe_check_libs=" -l$athena_variant "
8919 cat > conftest.$ac_ext <<EOF
8920 #line 8921 "configure"
8921 #include "confdefs.h"
8922 /* Override any gcc2 internal prototype to avoid an error.  */
8923 /* We use char because int might match the return type of a gcc2
8924     builtin and then its argument prototype would still apply.  */
8925 char threeDClassRec();
8926
8927 int main() {
8928 threeDClassRec()
8929 ; return 0; }
8930 EOF
8931 if { (eval echo configure:8932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8932   rm -rf conftest*
8933   eval "ac_cv_lib_$ac_lib_var=yes"
8934 else
8935   echo "configure: failed program was:" >&5
8936   cat conftest.$ac_ext >&5
8937   rm -rf conftest*
8938   eval "ac_cv_lib_$ac_lib_var=no"
8939 fi
8940 rm -f conftest*
8941 xe_check_libs=""
8942
8943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8944   echo "$ac_t""yes" 1>&6
8945   athena_lib=$athena_variant
8946 else
8947   echo "$ac_t""no" 1>&6
8948 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8949 echo "configure:8950: checking for threeDClassRec in -lXaw" >&5
8950 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8951
8952 xe_check_libs=" -lXaw "
8953 cat > conftest.$ac_ext <<EOF
8954 #line 8955 "configure"
8955 #include "confdefs.h"
8956 /* Override any gcc2 internal prototype to avoid an error.  */
8957 /* We use char because int might match the return type of a gcc2
8958     builtin and then its argument prototype would still apply.  */
8959 char threeDClassRec();
8960
8961 int main() {
8962 threeDClassRec()
8963 ; return 0; }
8964 EOF
8965 if { (eval echo configure:8966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8966   rm -rf conftest*
8967   eval "ac_cv_lib_$ac_lib_var=yes"
8968 else
8969   echo "configure: failed program was:" >&5
8970   cat conftest.$ac_ext >&5
8971   rm -rf conftest*
8972   eval "ac_cv_lib_$ac_lib_var=no"
8973 fi
8974 rm -f conftest*
8975 xe_check_libs=""
8976
8977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8978   echo "$ac_t""yes" 1>&6
8979   athena_lib=Xaw;
8980           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8981         
8982 else
8983   echo "$ac_t""no" 1>&6
8984 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8985 fi
8986
8987
8988 fi
8989
8990
8991   fi
8992
8993     if test "$athena_3d" = "no"; then
8994     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8995 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8996 echo "configure:8997: checking for X11/Xaw/ThreeD.h" >&5
8997
8998 cat > conftest.$ac_ext <<EOF
8999 #line 9000 "configure"
9000 #include "confdefs.h"
9001 #include <X11/Xaw/ThreeD.h>
9002 EOF
9003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9004 { (eval echo configure:9005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9005 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9006 if test -z "$ac_err"; then
9007   rm -rf conftest*
9008   eval "ac_cv_header_$ac_safe=yes"
9009 else
9010   echo "$ac_err" >&5
9011   echo "configure: failed program was:" >&5
9012   cat conftest.$ac_ext >&5
9013   rm -rf conftest*
9014   eval "ac_cv_header_$ac_safe=no"
9015 fi
9016 rm -f conftest*
9017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9018   echo "$ac_t""yes" 1>&6
9019   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9020 else
9021   echo "$ac_t""no" 1>&6
9022 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9023 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9024 echo "configure:9025: checking for X11/Xaw/XawInit.h" >&5
9025
9026 cat > conftest.$ac_ext <<EOF
9027 #line 9028 "configure"
9028 #include "confdefs.h"
9029 #include <X11/Xaw/XawInit.h>
9030 EOF
9031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9032 { (eval echo configure:9033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9034 if test -z "$ac_err"; then
9035   rm -rf conftest*
9036   eval "ac_cv_header_$ac_safe=yes"
9037 else
9038   echo "$ac_err" >&5
9039   echo "configure: failed program was:" >&5
9040   cat conftest.$ac_ext >&5
9041   rm -rf conftest*
9042   eval "ac_cv_header_$ac_safe=no"
9043 fi
9044 rm -f conftest*
9045 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9046   echo "$ac_t""yes" 1>&6
9047   athena_h_path=X11/Xaw
9048 else
9049   echo "$ac_t""no" 1>&6
9050 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9051 fi
9052
9053 fi
9054
9055   else
9056             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9057 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9058 echo "configure:9059: checking for X11/$athena_variant/XawInit.h" >&5
9059
9060 cat > conftest.$ac_ext <<EOF
9061 #line 9062 "configure"
9062 #include "confdefs.h"
9063 #include <X11/$athena_variant/XawInit.h>
9064 EOF
9065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9066 { (eval echo configure:9067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9068 if test -z "$ac_err"; then
9069   rm -rf conftest*
9070   eval "ac_cv_header_$ac_safe=yes"
9071 else
9072   echo "$ac_err" >&5
9073   echo "configure: failed program was:" >&5
9074   cat conftest.$ac_ext >&5
9075   rm -rf conftest*
9076   eval "ac_cv_header_$ac_safe=no"
9077 fi
9078 rm -f conftest*
9079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9080   echo "$ac_t""yes" 1>&6
9081   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9082 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9083 echo "configure:9084: checking for X11/$athena_variant/ThreeD.h" >&5
9084
9085 cat > conftest.$ac_ext <<EOF
9086 #line 9087 "configure"
9087 #include "confdefs.h"
9088 #include <X11/$athena_variant/ThreeD.h>
9089 EOF
9090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9091 { (eval echo configure:9092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9093 if test -z "$ac_err"; then
9094   rm -rf conftest*
9095   eval "ac_cv_header_$ac_safe=yes"
9096 else
9097   echo "$ac_err" >&5
9098   echo "configure: failed program was:" >&5
9099   cat conftest.$ac_ext >&5
9100   rm -rf conftest*
9101   eval "ac_cv_header_$ac_safe=no"
9102 fi
9103 rm -f conftest*
9104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9105   echo "$ac_t""yes" 1>&6
9106   athena_h_path=X11/$athena_variant
9107 else
9108   echo "$ac_t""no" 1>&6
9109 fi
9110
9111 else
9112   echo "$ac_t""no" 1>&6
9113 fi
9114
9115
9116         if test -z "$athena_h_path"; then
9117       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9118 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9119 echo "configure:9120: checking for $athena_variant/XawInit.h" >&5
9120
9121 cat > conftest.$ac_ext <<EOF
9122 #line 9123 "configure"
9123 #include "confdefs.h"
9124 #include <$athena_variant/XawInit.h>
9125 EOF
9126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9127 { (eval echo configure:9128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9129 if test -z "$ac_err"; then
9130   rm -rf conftest*
9131   eval "ac_cv_header_$ac_safe=yes"
9132 else
9133   echo "$ac_err" >&5
9134   echo "configure: failed program was:" >&5
9135   cat conftest.$ac_ext >&5
9136   rm -rf conftest*
9137   eval "ac_cv_header_$ac_safe=no"
9138 fi
9139 rm -f conftest*
9140 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9141   echo "$ac_t""yes" 1>&6
9142   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9143 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9144 echo "configure:9145: checking for $athena_variant/ThreeD.h" >&5
9145
9146 cat > conftest.$ac_ext <<EOF
9147 #line 9148 "configure"
9148 #include "confdefs.h"
9149 #include <$athena_variant/ThreeD.h>
9150 EOF
9151 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9152 { (eval echo configure:9153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9153 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9154 if test -z "$ac_err"; then
9155   rm -rf conftest*
9156   eval "ac_cv_header_$ac_safe=yes"
9157 else
9158   echo "$ac_err" >&5
9159   echo "configure: failed program was:" >&5
9160   cat conftest.$ac_ext >&5
9161   rm -rf conftest*
9162   eval "ac_cv_header_$ac_safe=no"
9163 fi
9164 rm -f conftest*
9165 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9166   echo "$ac_t""yes" 1>&6
9167   athena_h_path=$athena_variant
9168 else
9169   echo "$ac_t""no" 1>&6
9170 fi
9171
9172 else
9173   echo "$ac_t""no" 1>&6
9174 fi
9175
9176     fi
9177
9178         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9179       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9180 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9181 echo "configure:9182: checking for X11/Xaw3d/XawInit.h" >&5
9182
9183 cat > conftest.$ac_ext <<EOF
9184 #line 9185 "configure"
9185 #include "confdefs.h"
9186 #include <X11/Xaw3d/XawInit.h>
9187 EOF
9188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9189 { (eval echo configure:9190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9191 if test -z "$ac_err"; then
9192   rm -rf conftest*
9193   eval "ac_cv_header_$ac_safe=yes"
9194 else
9195   echo "$ac_err" >&5
9196   echo "configure: failed program was:" >&5
9197   cat conftest.$ac_ext >&5
9198   rm -rf conftest*
9199   eval "ac_cv_header_$ac_safe=no"
9200 fi
9201 rm -f conftest*
9202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9203   echo "$ac_t""yes" 1>&6
9204   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9205 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9206 echo "configure:9207: checking for X11/Xaw3d/ThreeD.h" >&5
9207
9208 cat > conftest.$ac_ext <<EOF
9209 #line 9210 "configure"
9210 #include "confdefs.h"
9211 #include <X11/Xaw3d/ThreeD.h>
9212 EOF
9213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9214 { (eval echo configure:9215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9216 if test -z "$ac_err"; then
9217   rm -rf conftest*
9218   eval "ac_cv_header_$ac_safe=yes"
9219 else
9220   echo "$ac_err" >&5
9221   echo "configure: failed program was:" >&5
9222   cat conftest.$ac_ext >&5
9223   rm -rf conftest*
9224   eval "ac_cv_header_$ac_safe=no"
9225 fi
9226 rm -f conftest*
9227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9228   echo "$ac_t""yes" 1>&6
9229   
9230             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9231             athena_h_path=X11/Xaw3d
9232           
9233 else
9234   echo "$ac_t""no" 1>&6
9235 fi
9236
9237 else
9238   echo "$ac_t""no" 1>&6
9239 fi
9240
9241     fi
9242
9243         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9244       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9245 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9246 echo "configure:9247: checking for Xaw3d/XawInit.h" >&5
9247
9248 cat > conftest.$ac_ext <<EOF
9249 #line 9250 "configure"
9250 #include "confdefs.h"
9251 #include <Xaw3d/XawInit.h>
9252 EOF
9253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9254 { (eval echo configure:9255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9256 if test -z "$ac_err"; then
9257   rm -rf conftest*
9258   eval "ac_cv_header_$ac_safe=yes"
9259 else
9260   echo "$ac_err" >&5
9261   echo "configure: failed program was:" >&5
9262   cat conftest.$ac_ext >&5
9263   rm -rf conftest*
9264   eval "ac_cv_header_$ac_safe=no"
9265 fi
9266 rm -f conftest*
9267 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9268   echo "$ac_t""yes" 1>&6
9269   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9270 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9271 echo "configure:9272: checking for Xaw3d/ThreeD.h" >&5
9272
9273 cat > conftest.$ac_ext <<EOF
9274 #line 9275 "configure"
9275 #include "confdefs.h"
9276 #include <Xaw3d/ThreeD.h>
9277 EOF
9278 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9279 { (eval echo configure:9280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9280 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9281 if test -z "$ac_err"; then
9282   rm -rf conftest*
9283   eval "ac_cv_header_$ac_safe=yes"
9284 else
9285   echo "$ac_err" >&5
9286   echo "configure: failed program was:" >&5
9287   cat conftest.$ac_ext >&5
9288   rm -rf conftest*
9289   eval "ac_cv_header_$ac_safe=no"
9290 fi
9291 rm -f conftest*
9292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9293   echo "$ac_t""yes" 1>&6
9294   
9295             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9296             athena_h_path=Xaw3d
9297           
9298 else
9299   echo "$ac_t""no" 1>&6
9300 fi
9301
9302 else
9303   echo "$ac_t""no" 1>&6
9304 fi
9305
9306     fi
9307
9308             if test -z "$athena_h_path"; then
9309       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9310 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9311 echo "configure:9312: checking for X11/Xaw/ThreeD.h" >&5
9312
9313 cat > conftest.$ac_ext <<EOF
9314 #line 9315 "configure"
9315 #include "confdefs.h"
9316 #include <X11/Xaw/ThreeD.h>
9317 EOF
9318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9319 { (eval echo configure:9320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9321 if test -z "$ac_err"; then
9322   rm -rf conftest*
9323   eval "ac_cv_header_$ac_safe=yes"
9324 else
9325   echo "$ac_err" >&5
9326   echo "configure: failed program was:" >&5
9327   cat conftest.$ac_ext >&5
9328   rm -rf conftest*
9329   eval "ac_cv_header_$ac_safe=no"
9330 fi
9331 rm -f conftest*
9332 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9333   echo "$ac_t""yes" 1>&6
9334   
9335           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9336           athena_h_path=X11/Xaw
9337         
9338 else
9339   echo "$ac_t""no" 1>&6
9340 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9341 fi
9342
9343     fi
9344   fi
9345
9346     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9347     have_xaw=yes
9348   else
9349     have_xaw=no
9350   fi
9351
9352 else
9353   have_xaw=no
9354 fi 
9355 if test "$with_x11" = "yes"; then
9356     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9357 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9358 echo "configure:9359: checking for Xm/Xm.h" >&5
9359
9360 cat > conftest.$ac_ext <<EOF
9361 #line 9362 "configure"
9362 #include "confdefs.h"
9363 #include <Xm/Xm.h>
9364 EOF
9365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9366 { (eval echo configure:9367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9368 if test -z "$ac_err"; then
9369   rm -rf conftest*
9370   eval "ac_cv_header_$ac_safe=yes"
9371 else
9372   echo "$ac_err" >&5
9373   echo "configure: failed program was:" >&5
9374   cat conftest.$ac_ext >&5
9375   rm -rf conftest*
9376   eval "ac_cv_header_$ac_safe=no"
9377 fi
9378 rm -f conftest*
9379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9380   echo "$ac_t""yes" 1>&6
9381   
9382 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9383 echo "configure:9384: checking for XmStringFree in -lXm" >&5
9384 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9385
9386 xe_check_libs=" -lXm "
9387 cat > conftest.$ac_ext <<EOF
9388 #line 9389 "configure"
9389 #include "confdefs.h"
9390 /* Override any gcc2 internal prototype to avoid an error.  */
9391 /* We use char because int might match the return type of a gcc2
9392     builtin and then its argument prototype would still apply.  */
9393 char XmStringFree();
9394
9395 int main() {
9396 XmStringFree()
9397 ; return 0; }
9398 EOF
9399 if { (eval echo configure:9400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9400   rm -rf conftest*
9401   eval "ac_cv_lib_$ac_lib_var=yes"
9402 else
9403   echo "configure: failed program was:" >&5
9404   cat conftest.$ac_ext >&5
9405   rm -rf conftest*
9406   eval "ac_cv_lib_$ac_lib_var=no"
9407 fi
9408 rm -f conftest*
9409 xe_check_libs=""
9410
9411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9412   echo "$ac_t""yes" 1>&6
9413   have_motif=yes
9414 else
9415   echo "$ac_t""no" 1>&6
9416 have_motif=no
9417 fi
9418
9419
9420 else
9421   echo "$ac_t""no" 1>&6
9422 have_motif=no
9423 fi
9424
9425
9426   if test "$have_motif" = "yes"; then
9427         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9428 echo "configure:9429: checking for Lesstif" >&5
9429     cat > conftest.$ac_ext <<EOF
9430 #line 9431 "configure"
9431 #include "confdefs.h"
9432 #include <Xm/Xm.h>
9433 #ifdef LESSTIF_VERSION
9434 yes
9435 #endif
9436
9437 EOF
9438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9439   egrep "yes" >/dev/null 2>&1; then
9440   rm -rf conftest*
9441   have_lesstif=yes
9442 else
9443   rm -rf conftest*
9444   have_lesstif=no
9445 fi
9446 rm -f conftest*
9447
9448   echo "$ac_t""$have_lesstif" 1>&6
9449   fi
9450
9451 fi 
9452
9453 case "$with_menubars" in "" | "yes" | "athena" )
9454   with_menubars="lucid" ;;
9455 esac
9456 case "$with_dialogs" in "" | "yes" | "lucid" )
9457   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9458   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9459   else with_dialogs=no
9460   fi ;;
9461 esac
9462 case "$with_scrollbars" in "" | "yes" )
9463   with_scrollbars="lucid" ;;
9464 esac
9465 case "$with_widgets" in "" | "yes" | "lucid")
9466   if   test "$have_motif" = "yes"; then with_widgets="motif"
9467   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9468   else with_widgets=no
9469   fi ;;
9470 esac
9471
9472 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9473
9474 case "$all_widgets" in
9475   *athena* )
9476     if test "$have_xaw" != "yes"; then
9477       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9478     fi
9479
9480         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9481
9482         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9483
9484                     { test "$extra_verbose" = "yes" && cat << EOF
9485     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9486 EOF
9487 cat >> confdefs.h <<EOF
9488 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9489 EOF
9490 }
9491
9492     { test "$extra_verbose" = "yes" && cat << EOF
9493     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9494 EOF
9495 cat >> confdefs.h <<EOF
9496 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9497 EOF
9498 }
9499
9500     { test "$extra_verbose" = "yes" && cat << EOF
9501     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9502 EOF
9503 cat >> confdefs.h <<EOF
9504 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9505 EOF
9506 }
9507
9508     { test "$extra_verbose" = "yes" && cat << EOF
9509     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9510 EOF
9511 cat >> confdefs.h <<EOF
9512 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9513 EOF
9514 }
9515
9516     { test "$extra_verbose" = "yes" && cat << EOF
9517     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9518 EOF
9519 cat >> confdefs.h <<EOF
9520 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9521 EOF
9522 }
9523
9524     { test "$extra_verbose" = "yes" && cat << EOF
9525     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9526 EOF
9527 cat >> confdefs.h <<EOF
9528 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9529 EOF
9530 }
9531
9532     { test "$extra_verbose" = "yes" && cat << EOF
9533     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9534 EOF
9535 cat >> confdefs.h <<EOF
9536 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9537 EOF
9538 }
9539
9540     { test "$extra_verbose" = "yes" && cat << EOF
9541     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9542 EOF
9543 cat >> confdefs.h <<EOF
9544 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9545 EOF
9546 }
9547
9548     { test "$extra_verbose" = "yes" && cat << EOF
9549     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9550 EOF
9551 cat >> confdefs.h <<EOF
9552 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9553 EOF
9554 }
9555
9556     { test "$extra_verbose" = "yes" && cat << EOF
9557     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9558 EOF
9559 cat >> confdefs.h <<EOF
9560 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9561 EOF
9562 }
9563
9564
9565     { test "$extra_verbose" = "yes" && cat << \EOF
9566     Defining LWLIB_USES_ATHENA
9567 EOF
9568 cat >> confdefs.h <<\EOF
9569 #define LWLIB_USES_ATHENA 1
9570 EOF
9571 }
9572
9573     { test "$extra_verbose" = "yes" && cat << \EOF
9574     Defining NEED_ATHENA
9575 EOF
9576 cat >> confdefs.h <<\EOF
9577 #define NEED_ATHENA 1
9578 EOF
9579 }
9580
9581     need_athena="yes"
9582
9583     if test "$athena_3d" = "yes"; then
9584       { test "$extra_verbose" = "yes" && cat << \EOF
9585     Defining HAVE_ATHENA_3D
9586 EOF
9587 cat >> confdefs.h <<\EOF
9588 #define HAVE_ATHENA_3D 1
9589 EOF
9590 }
9591
9592     fi
9593   ;;
9594 esac
9595
9596 case "$all_widgets" in *motif* )
9597   { test "$extra_verbose" = "yes" && cat << \EOF
9598     Defining LWLIB_USES_MOTIF
9599 EOF
9600 cat >> confdefs.h <<\EOF
9601 #define LWLIB_USES_MOTIF 1
9602 EOF
9603 }
9604
9605   { test "$extra_verbose" = "yes" && cat << \EOF
9606     Defining NEED_MOTIF
9607 EOF
9608 cat >> confdefs.h <<\EOF
9609 #define NEED_MOTIF 1
9610 EOF
9611 }
9612
9613   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9614   need_motif=yes ;;
9615 esac
9616
9617 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9618 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9619 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9620 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9621         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9622 case "$with_widgets" in athena* )
9623         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;;
9624 esac
9625 case "$all_widgets" in *lucid* )
9626   { test "$extra_verbose" = "yes" && cat << \EOF
9627     Defining NEED_LUCID
9628 EOF
9629 cat >> confdefs.h <<\EOF
9630 #define NEED_LUCID 1
9631 EOF
9632 }
9633
9634   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9635 esac
9636
9637
9638
9639 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9640     Defining LWLIB_SCROLLBARS_ATHENA
9641 EOF
9642 cat >> confdefs.h <<\EOF
9643 #define LWLIB_SCROLLBARS_ATHENA 1
9644 EOF
9645 }
9646
9647 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9648     Defining LWLIB_DIALOGS_ATHENA
9649 EOF
9650 cat >> confdefs.h <<\EOF
9651 #define LWLIB_DIALOGS_ATHENA 1
9652 EOF
9653 }
9654
9655
9656 if test "$athena_3d" = "yes"; then
9657   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9658     Defining LWLIB_SCROLLBARS_ATHENA3D
9659 EOF
9660 cat >> confdefs.h <<\EOF
9661 #define LWLIB_SCROLLBARS_ATHENA3D 1
9662 EOF
9663 }
9664
9665   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9666     Defining LWLIB_DIALOGS_ATHENA3D
9667 EOF
9668 cat >> confdefs.h <<\EOF
9669 #define LWLIB_DIALOGS_ATHENA3D 1
9670 EOF
9671 }
9672
9673 fi
9674
9675 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9676     Defining LWLIB_WIDGETS_ATHENA
9677 EOF
9678 cat >> confdefs.h <<\EOF
9679 #define LWLIB_WIDGETS_ATHENA 1
9680 EOF
9681 }
9682 ;; esac
9683 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9684         { test "$extra_verbose" = "yes" && cat << \EOF
9685     Defining LWLIB_TABS_LUCID
9686 EOF
9687 cat >> confdefs.h <<\EOF
9688 #define LWLIB_TABS_LUCID 1
9689 EOF
9690 }
9691
9692
9693 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9694     Defining HAVE_MENUBARS
9695 EOF
9696 cat >> confdefs.h <<\EOF
9697 #define HAVE_MENUBARS 1
9698 EOF
9699 }
9700
9701 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9702     Defining HAVE_SCROLLBARS
9703 EOF
9704 cat >> confdefs.h <<\EOF
9705 #define HAVE_SCROLLBARS 1
9706 EOF
9707 }
9708
9709 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9710     Defining HAVE_DIALOGS
9711 EOF
9712 cat >> confdefs.h <<\EOF
9713 #define HAVE_DIALOGS 1
9714 EOF
9715 }
9716
9717 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9718     Defining HAVE_TOOLBARS
9719 EOF
9720 cat >> confdefs.h <<\EOF
9721 #define HAVE_TOOLBARS 1
9722 EOF
9723 }
9724
9725 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9726     Defining HAVE_WIDGETS
9727 EOF
9728 cat >> confdefs.h <<\EOF
9729 #define HAVE_WIDGETS 1
9730 EOF
9731 }
9732
9733
9734 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9735     Defining LWLIB_MENUBARS_LUCID
9736 EOF
9737 cat >> confdefs.h <<\EOF
9738 #define LWLIB_MENUBARS_LUCID 1
9739 EOF
9740 }
9741
9742 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9743     Defining LWLIB_SCROLLBARS_LUCID
9744 EOF
9745 cat >> confdefs.h <<\EOF
9746 #define LWLIB_SCROLLBARS_LUCID 1
9747 EOF
9748 }
9749
9750
9751 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9752     Defining LWLIB_MENUBARS_MOTIF
9753 EOF
9754 cat >> confdefs.h <<\EOF
9755 #define LWLIB_MENUBARS_MOTIF 1
9756 EOF
9757 }
9758
9759 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9760     Defining LWLIB_SCROLLBARS_MOTIF
9761 EOF
9762 cat >> confdefs.h <<\EOF
9763 #define LWLIB_SCROLLBARS_MOTIF 1
9764 EOF
9765 }
9766
9767 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9768     Defining LWLIB_DIALOGS_MOTIF
9769 EOF
9770 cat >> confdefs.h <<\EOF
9771 #define LWLIB_DIALOGS_MOTIF 1
9772 EOF
9773 }
9774
9775 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9776     Defining LWLIB_WIDGETS_MOTIF
9777 EOF
9778 cat >> confdefs.h <<\EOF
9779 #define LWLIB_WIDGETS_MOTIF 1
9780 EOF
9781 }
9782
9783
9784 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9785    echo "    xemacs will be linked with \"menubar.o\""
9786  fi
9787 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9788    echo "    xemacs will be linked with \"scrollbar.o\""
9789  fi
9790 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9791    echo "    xemacs will be linked with \"dialog.o\""
9792  fi
9793 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9794    echo "    xemacs will be linked with \"toolbar.o\""
9795  fi
9796
9797 if test "$with_gtk" = "yes"; then
9798   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9799    echo "    xemacs will be linked with \"menubar-gtk.o\""
9800  fi
9801   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9802    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9803  fi
9804   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9805    echo "    xemacs will be linked with \"dialog-gtk.o\""
9806  fi
9807   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9808    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9809  fi
9810   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9811    echo "    xemacs will be linked with \"gui-gtk.o\""
9812  fi
9813 fi
9814
9815 if test "$with_x11" = "yes"; then
9816   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9817    echo "    xemacs will be linked with \"menubar-x.o\""
9818  fi
9819   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9820    echo "    xemacs will be linked with \"scrollbar-x.o\""
9821  fi
9822   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9823    echo "    xemacs will be linked with \"dialog-x.o\""
9824  fi
9825   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9826    echo "    xemacs will be linked with \"toolbar-x.o\""
9827  fi
9828   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9829    echo "    xemacs will be linked with \"gui-x.o\""
9830  fi
9831 fi
9832
9833
9834 test -z "$with_mule" && with_mule=no
9835 test -z "$with_file_coding" && with_file_coding=no
9836
9837
9838 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9839   { test "$extra_verbose" = "yes" && cat << \EOF
9840     Defining FILE_CODING
9841 EOF
9842 cat >> confdefs.h <<\EOF
9843 #define FILE_CODING 1
9844 EOF
9845 }
9846
9847   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9848    echo "    xemacs will be linked with \"file-coding.o\""
9849  fi
9850 fi
9851
9852 if test "$with_mule" = "yes" ; then
9853   echo "checking for Mule-related features" 1>&6
9854 echo "configure:9855: checking for Mule-related features" >&5
9855   { test "$extra_verbose" = "yes" && cat << \EOF
9856     Defining MULE
9857 EOF
9858 cat >> confdefs.h <<\EOF
9859 #define MULE 1
9860 EOF
9861 }
9862
9863   { test "$extra_verbose" = "yes" && cat << \EOF
9864     Defining FILE_CODING
9865 EOF
9866 cat >> confdefs.h <<\EOF
9867 #define FILE_CODING 1
9868 EOF
9869 }
9870
9871   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9872    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9873  fi
9874   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9875     { test "$extra_verbose" = "yes" && cat << \EOF
9876     Defining TEXT_CODING
9877 EOF
9878 cat >> confdefs.h <<\EOF
9879 #define TEXT_CODING 1
9880 EOF
9881 }
9882
9883     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9884    echo "    xemacs will be linked with \"text-coding.o\""
9885  fi
9886   else
9887     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9888    echo "    xemacs will be linked with \"file-coding.o\""
9889  fi
9890   fi
9891     for ac_hdr in libintl.h
9892 do
9893 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9894 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9895 echo "configure:9896: checking for $ac_hdr" >&5
9896
9897 cat > conftest.$ac_ext <<EOF
9898 #line 9899 "configure"
9899 #include "confdefs.h"
9900 #include <$ac_hdr>
9901 EOF
9902 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9903 { (eval echo configure:9904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9904 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9905 if test -z "$ac_err"; then
9906   rm -rf conftest*
9907   eval "ac_cv_header_$ac_safe=yes"
9908 else
9909   echo "$ac_err" >&5
9910   echo "configure: failed program was:" >&5
9911   cat conftest.$ac_ext >&5
9912   rm -rf conftest*
9913   eval "ac_cv_header_$ac_safe=no"
9914 fi
9915 rm -f conftest*
9916 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9917   echo "$ac_t""yes" 1>&6
9918     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9919   { test "$extra_verbose" = "yes" && cat << EOF
9920     Defining $ac_tr_hdr
9921 EOF
9922 cat >> confdefs.h <<EOF
9923 #define $ac_tr_hdr 1
9924 EOF
9925 }
9926  
9927 else
9928   echo "$ac_t""no" 1>&6
9929 fi
9930 done
9931
9932   
9933 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9934 echo "configure:9935: checking for strerror in -lintl" >&5
9935 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9936
9937 xe_check_libs=" -lintl "
9938 cat > conftest.$ac_ext <<EOF
9939 #line 9940 "configure"
9940 #include "confdefs.h"
9941 /* Override any gcc2 internal prototype to avoid an error.  */
9942 /* We use char because int might match the return type of a gcc2
9943     builtin and then its argument prototype would still apply.  */
9944 char strerror();
9945
9946 int main() {
9947 strerror()
9948 ; return 0; }
9949 EOF
9950 if { (eval echo configure:9951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9951   rm -rf conftest*
9952   eval "ac_cv_lib_$ac_lib_var=yes"
9953 else
9954   echo "configure: failed program was:" >&5
9955   cat conftest.$ac_ext >&5
9956   rm -rf conftest*
9957   eval "ac_cv_lib_$ac_lib_var=no"
9958 fi
9959 rm -f conftest*
9960 xe_check_libs=""
9961
9962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9963   echo "$ac_t""yes" 1>&6
9964     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9965     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9966   { test "$extra_verbose" = "yes" && cat << EOF
9967     Defining $ac_tr_lib
9968 EOF
9969 cat >> confdefs.h <<EOF
9970 #define $ac_tr_lib 1
9971 EOF
9972 }
9973
9974   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9975
9976 else
9977   echo "$ac_t""no" 1>&6
9978 fi
9979
9980
9981
9982   if test "$with_utf_2000" = "yes" ; then
9983     { test "$extra_verbose" = "yes" && cat << \EOF
9984     Defining CHAR_IS_UCS4
9985 EOF
9986 cat >> confdefs.h <<\EOF
9987 #define CHAR_IS_UCS4 1
9988 EOF
9989 }
9990
9991     { test "$extra_verbose" = "yes" && cat << \EOF
9992     Defining UTF2000
9993 EOF
9994 cat >> confdefs.h <<\EOF
9995 #define UTF2000 1
9996 EOF
9997 }
9998
9999   fi
10000
10001   echo "checking for Mule input methods" 1>&6
10002 echo "configure:10003: checking for Mule input methods" >&5
10003         case "$with_xim" in "" | "yes" )
10004     echo "checking for XIM" 1>&6
10005 echo "configure:10006: checking for XIM" >&5
10006     
10007 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
10008 echo "configure:10009: checking for XOpenIM in -lX11" >&5
10009 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
10010
10011 xe_check_libs=" -lX11 "
10012 cat > conftest.$ac_ext <<EOF
10013 #line 10014 "configure"
10014 #include "confdefs.h"
10015 /* Override any gcc2 internal prototype to avoid an error.  */
10016 /* We use char because int might match the return type of a gcc2
10017     builtin and then its argument prototype would still apply.  */
10018 char XOpenIM();
10019
10020 int main() {
10021 XOpenIM()
10022 ; return 0; }
10023 EOF
10024 if { (eval echo configure:10025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10025   rm -rf conftest*
10026   eval "ac_cv_lib_$ac_lib_var=yes"
10027 else
10028   echo "configure: failed program was:" >&5
10029   cat conftest.$ac_ext >&5
10030   rm -rf conftest*
10031   eval "ac_cv_lib_$ac_lib_var=no"
10032 fi
10033 rm -f conftest*
10034 xe_check_libs=""
10035
10036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10037   echo "$ac_t""yes" 1>&6
10038   with_xim=xlib
10039 else
10040   echo "$ac_t""no" 1>&6
10041 with_xim=no
10042 fi
10043
10044
10045         if test "$have_motif $have_lesstif" = "yes no"; then
10046       
10047 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10048 echo "configure:10049: checking for XmImMbLookupString in -lXm" >&5
10049 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10050
10051 xe_check_libs=" -lXm "
10052 cat > conftest.$ac_ext <<EOF
10053 #line 10054 "configure"
10054 #include "confdefs.h"
10055 /* Override any gcc2 internal prototype to avoid an error.  */
10056 /* We use char because int might match the return type of a gcc2
10057     builtin and then its argument prototype would still apply.  */
10058 char XmImMbLookupString();
10059
10060 int main() {
10061 XmImMbLookupString()
10062 ; return 0; }
10063 EOF
10064 if { (eval echo configure:10065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10065   rm -rf conftest*
10066   eval "ac_cv_lib_$ac_lib_var=yes"
10067 else
10068   echo "configure: failed program was:" >&5
10069   cat conftest.$ac_ext >&5
10070   rm -rf conftest*
10071   eval "ac_cv_lib_$ac_lib_var=no"
10072 fi
10073 rm -f conftest*
10074 xe_check_libs=""
10075
10076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10077   echo "$ac_t""yes" 1>&6
10078   with_xim=motif
10079 else
10080   echo "$ac_t""no" 1>&6
10081 fi
10082
10083
10084     fi ;;
10085   esac
10086   if test "$with_xim" != "no"; then
10087     { test "$extra_verbose" = "yes" && cat << \EOF
10088     Defining HAVE_XIM
10089 EOF
10090 cat >> confdefs.h <<\EOF
10091 #define HAVE_XIM 1
10092 EOF
10093 }
10094
10095     if test "$with_xim" = "xlib"; then
10096       { test "$extra_verbose" = "yes" && cat << \EOF
10097     Defining XIM_XLIB
10098 EOF
10099 cat >> confdefs.h <<\EOF
10100 #define XIM_XLIB 1
10101 EOF
10102 }
10103
10104       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10105    echo "    xemacs will be linked with \"input-method-xlib.o\""
10106  fi
10107     fi
10108     if test "$with_xim" = "motif"; then
10109       { test "$extra_verbose" = "yes" && cat << \EOF
10110     Defining XIM_MOTIF
10111 EOF
10112 cat >> confdefs.h <<\EOF
10113 #define XIM_MOTIF 1
10114 EOF
10115 }
10116
10117       need_motif=yes
10118       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10119    echo "    xemacs will be linked with \"input-method-motif.o\""
10120  fi
10121     fi
10122     if test "$with_xim" = "motif"; then
10123       with_xfs=no
10124     fi
10125   fi
10126
10127     if test "$with_xfs" = "yes" ; then
10128     echo "checking for XFontSet" 1>&6
10129 echo "configure:10130: checking for XFontSet" >&5
10130     
10131 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10132 echo "configure:10133: checking for XmbDrawString in -lX11" >&5
10133 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10134
10135 xe_check_libs=" -lX11 "
10136 cat > conftest.$ac_ext <<EOF
10137 #line 10138 "configure"
10138 #include "confdefs.h"
10139 /* Override any gcc2 internal prototype to avoid an error.  */
10140 /* We use char because int might match the return type of a gcc2
10141     builtin and then its argument prototype would still apply.  */
10142 char XmbDrawString();
10143
10144 int main() {
10145 XmbDrawString()
10146 ; return 0; }
10147 EOF
10148 if { (eval echo configure:10149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10149   rm -rf conftest*
10150   eval "ac_cv_lib_$ac_lib_var=yes"
10151 else
10152   echo "configure: failed program was:" >&5
10153   cat conftest.$ac_ext >&5
10154   rm -rf conftest*
10155   eval "ac_cv_lib_$ac_lib_var=no"
10156 fi
10157 rm -f conftest*
10158 xe_check_libs=""
10159
10160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10161   echo "$ac_t""yes" 1>&6
10162   :
10163 else
10164   echo "$ac_t""no" 1>&6
10165 with_xfs=no
10166 fi
10167
10168
10169     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10170       { test "$extra_verbose" = "yes" && cat << \EOF
10171     Defining USE_XFONTSET
10172 EOF
10173 cat >> confdefs.h <<\EOF
10174 #define USE_XFONTSET 1
10175 EOF
10176 }
10177
10178       if test "$with_xim" = "no" ; then
10179         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10180    echo "    xemacs will be linked with \"input-method-xlib.o\""
10181  fi
10182       fi
10183     fi
10184   fi 
10185     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10186   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10187 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10188 echo "configure:10189: checking for wnn/jllib.h" >&5
10189
10190 cat > conftest.$ac_ext <<EOF
10191 #line 10192 "configure"
10192 #include "confdefs.h"
10193 #include <wnn/jllib.h>
10194 EOF
10195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10196 { (eval echo configure:10197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10198 if test -z "$ac_err"; then
10199   rm -rf conftest*
10200   eval "ac_cv_header_$ac_safe=yes"
10201 else
10202   echo "$ac_err" >&5
10203   echo "configure: failed program was:" >&5
10204   cat conftest.$ac_ext >&5
10205   rm -rf conftest*
10206   eval "ac_cv_header_$ac_safe=no"
10207 fi
10208 rm -f conftest*
10209 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10210   echo "$ac_t""yes" 1>&6
10211   :
10212 else
10213   echo "$ac_t""no" 1>&6
10214 with_wnn=no
10215 fi
10216  }
10217     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10218 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10219 echo "configure:10220: checking for wnn/commonhd.h" >&5
10220
10221 cat > conftest.$ac_ext <<EOF
10222 #line 10223 "configure"
10223 #include "confdefs.h"
10224 #include <wnn/commonhd.h>
10225 EOF
10226 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10227 { (eval echo configure:10228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10228 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10229 if test -z "$ac_err"; then
10230   rm -rf conftest*
10231   eval "ac_cv_header_$ac_safe=yes"
10232 else
10233   echo "$ac_err" >&5
10234   echo "configure: failed program was:" >&5
10235   cat conftest.$ac_ext >&5
10236   rm -rf conftest*
10237   eval "ac_cv_header_$ac_safe=no"
10238 fi
10239 rm -f conftest*
10240 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10241   echo "$ac_t""yes" 1>&6
10242   :
10243 else
10244   echo "$ac_t""no" 1>&6
10245 with_wnn=no
10246 fi
10247  }
10248     if test "$with_wnn" != "no"; then
10249     for ac_func in crypt
10250 do
10251 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10252 echo "configure:10253: checking for $ac_func" >&5
10253
10254 cat > conftest.$ac_ext <<EOF
10255 #line 10256 "configure"
10256 #include "confdefs.h"
10257 /* System header to define __stub macros and hopefully few prototypes,
10258     which can conflict with char $ac_func(); below.  */
10259 #include <assert.h>
10260 /* Override any gcc2 internal prototype to avoid an error.  */
10261 /* We use char because int might match the return type of a gcc2
10262     builtin and then its argument prototype would still apply.  */
10263 char $ac_func();
10264
10265 int main() {
10266
10267 /* The GNU C library defines this for functions which it implements
10268     to always fail with ENOSYS.  Some functions are actually named
10269     something starting with __ and the normal name is an alias.  */
10270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10271 choke me
10272 #else
10273 $ac_func();
10274 #endif
10275
10276 ; return 0; }
10277 EOF
10278 if { (eval echo configure:10279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10279   rm -rf conftest*
10280   eval "ac_cv_func_$ac_func=yes"
10281 else
10282   echo "configure: failed program was:" >&5
10283   cat conftest.$ac_ext >&5
10284   rm -rf conftest*
10285   eval "ac_cv_func_$ac_func=no"
10286 fi
10287 rm -f conftest*
10288
10289 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10290   echo "$ac_t""yes" 1>&6
10291     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10292   { test "$extra_verbose" = "yes" && cat << EOF
10293     Defining $ac_tr_func
10294 EOF
10295 cat >> confdefs.h <<EOF
10296 #define $ac_tr_func 1
10297 EOF
10298 }
10299  
10300 else
10301   echo "$ac_t""no" 1>&6
10302 fi
10303 done
10304
10305     test "$ac_cv_func_crypt" != "yes" && { 
10306 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10307 echo "configure:10308: checking for crypt in -lcrypt" >&5
10308 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10309
10310 xe_check_libs=" -lcrypt "
10311 cat > conftest.$ac_ext <<EOF
10312 #line 10313 "configure"
10313 #include "confdefs.h"
10314 /* Override any gcc2 internal prototype to avoid an error.  */
10315 /* We use char because int might match the return type of a gcc2
10316     builtin and then its argument prototype would still apply.  */
10317 char crypt();
10318
10319 int main() {
10320 crypt()
10321 ; return 0; }
10322 EOF
10323 if { (eval echo configure:10324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10324   rm -rf conftest*
10325   eval "ac_cv_lib_$ac_lib_var=yes"
10326 else
10327   echo "configure: failed program was:" >&5
10328   cat conftest.$ac_ext >&5
10329   rm -rf conftest*
10330   eval "ac_cv_lib_$ac_lib_var=no"
10331 fi
10332 rm -f conftest*
10333 xe_check_libs=""
10334
10335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10336   echo "$ac_t""yes" 1>&6
10337     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10338     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10339   { test "$extra_verbose" = "yes" && cat << EOF
10340     Defining $ac_tr_lib
10341 EOF
10342 cat >> confdefs.h <<EOF
10343 #define $ac_tr_lib 1
10344 EOF
10345 }
10346
10347   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10348
10349 else
10350   echo "$ac_t""no" 1>&6
10351 fi
10352
10353  }
10354   fi
10355     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10356     
10357 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10358 echo "configure:10359: checking for jl_dic_list_e in -lwnn" >&5
10359 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10360
10361 xe_check_libs=" -lwnn "
10362 cat > conftest.$ac_ext <<EOF
10363 #line 10364 "configure"
10364 #include "confdefs.h"
10365 /* Override any gcc2 internal prototype to avoid an error.  */
10366 /* We use char because int might match the return type of a gcc2
10367     builtin and then its argument prototype would still apply.  */
10368 char jl_dic_list_e();
10369
10370 int main() {
10371 jl_dic_list_e()
10372 ; return 0; }
10373 EOF
10374 if { (eval echo configure:10375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10375   rm -rf conftest*
10376   eval "ac_cv_lib_$ac_lib_var=yes"
10377 else
10378   echo "configure: failed program was:" >&5
10379   cat conftest.$ac_ext >&5
10380   rm -rf conftest*
10381   eval "ac_cv_lib_$ac_lib_var=no"
10382 fi
10383 rm -f conftest*
10384 xe_check_libs=""
10385
10386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10387   echo "$ac_t""yes" 1>&6
10388   libwnn=wnn
10389 else
10390   echo "$ac_t""no" 1>&6
10391 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10392 echo "configure:10393: checking for jl_dic_list_e in -lwnn4" >&5
10393 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10394
10395 xe_check_libs=" -lwnn4 "
10396 cat > conftest.$ac_ext <<EOF
10397 #line 10398 "configure"
10398 #include "confdefs.h"
10399 /* Override any gcc2 internal prototype to avoid an error.  */
10400 /* We use char because int might match the return type of a gcc2
10401     builtin and then its argument prototype would still apply.  */
10402 char jl_dic_list_e();
10403
10404 int main() {
10405 jl_dic_list_e()
10406 ; return 0; }
10407 EOF
10408 if { (eval echo configure:10409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10409   rm -rf conftest*
10410   eval "ac_cv_lib_$ac_lib_var=yes"
10411 else
10412   echo "configure: failed program was:" >&5
10413   cat conftest.$ac_ext >&5
10414   rm -rf conftest*
10415   eval "ac_cv_lib_$ac_lib_var=no"
10416 fi
10417 rm -f conftest*
10418 xe_check_libs=""
10419
10420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10421   echo "$ac_t""yes" 1>&6
10422   libwnn=wnn4
10423 else
10424   echo "$ac_t""no" 1>&6
10425 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10426 echo "configure:10427: checking for jl_dic_list_e in -lwnn6" >&5
10427 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10428
10429 xe_check_libs=" -lwnn6 "
10430 cat > conftest.$ac_ext <<EOF
10431 #line 10432 "configure"
10432 #include "confdefs.h"
10433 /* Override any gcc2 internal prototype to avoid an error.  */
10434 /* We use char because int might match the return type of a gcc2
10435     builtin and then its argument prototype would still apply.  */
10436 char jl_dic_list_e();
10437
10438 int main() {
10439 jl_dic_list_e()
10440 ; return 0; }
10441 EOF
10442 if { (eval echo configure:10443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10443   rm -rf conftest*
10444   eval "ac_cv_lib_$ac_lib_var=yes"
10445 else
10446   echo "configure: failed program was:" >&5
10447   cat conftest.$ac_ext >&5
10448   rm -rf conftest*
10449   eval "ac_cv_lib_$ac_lib_var=no"
10450 fi
10451 rm -f conftest*
10452 xe_check_libs=""
10453
10454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10455   echo "$ac_t""yes" 1>&6
10456   libwnn=wnn6
10457 else
10458   echo "$ac_t""no" 1>&6
10459 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10460 echo "configure:10461: checking for dic_list_e in -lwnn6_fromsrc" >&5
10461 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10462
10463 xe_check_libs=" -lwnn6_fromsrc "
10464 cat > conftest.$ac_ext <<EOF
10465 #line 10466 "configure"
10466 #include "confdefs.h"
10467 /* Override any gcc2 internal prototype to avoid an error.  */
10468 /* We use char because int might match the return type of a gcc2
10469     builtin and then its argument prototype would still apply.  */
10470 char dic_list_e();
10471
10472 int main() {
10473 dic_list_e()
10474 ; return 0; }
10475 EOF
10476 if { (eval echo configure:10477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10477   rm -rf conftest*
10478   eval "ac_cv_lib_$ac_lib_var=yes"
10479 else
10480   echo "configure: failed program was:" >&5
10481   cat conftest.$ac_ext >&5
10482   rm -rf conftest*
10483   eval "ac_cv_lib_$ac_lib_var=no"
10484 fi
10485 rm -f conftest*
10486 xe_check_libs=""
10487
10488 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10489   echo "$ac_t""yes" 1>&6
10490   libwnn=wnn6_fromsrc
10491 else
10492   echo "$ac_t""no" 1>&6
10493 with_wnn=no
10494 fi
10495
10496
10497 fi
10498
10499
10500 fi
10501
10502
10503 fi
10504
10505
10506   fi
10507   test -z "$with_wnn" && with_wnn=yes
10508   if test "$with_wnn" = "yes"; then
10509     { test "$extra_verbose" = "yes" && cat << \EOF
10510     Defining HAVE_WNN
10511 EOF
10512 cat >> confdefs.h <<\EOF
10513 #define HAVE_WNN 1
10514 EOF
10515 }
10516
10517     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10518     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10519    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10520  fi
10521     if test "$with_wnn6" != "no"; then
10522       
10523 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10524 echo "configure:10525: checking for jl_fi_dic_list in -l$libwnn" >&5
10525 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10526
10527 xe_check_libs=" -l$libwnn "
10528 cat > conftest.$ac_ext <<EOF
10529 #line 10530 "configure"
10530 #include "confdefs.h"
10531 /* Override any gcc2 internal prototype to avoid an error.  */
10532 /* We use char because int might match the return type of a gcc2
10533     builtin and then its argument prototype would still apply.  */
10534 char jl_fi_dic_list();
10535
10536 int main() {
10537 jl_fi_dic_list()
10538 ; return 0; }
10539 EOF
10540 if { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10541   rm -rf conftest*
10542   eval "ac_cv_lib_$ac_lib_var=yes"
10543 else
10544   echo "configure: failed program was:" >&5
10545   cat conftest.$ac_ext >&5
10546   rm -rf conftest*
10547   eval "ac_cv_lib_$ac_lib_var=no"
10548 fi
10549 rm -f conftest*
10550 xe_check_libs=""
10551
10552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10553   echo "$ac_t""yes" 1>&6
10554   with_wnn6=yes
10555 else
10556   echo "$ac_t""no" 1>&6
10557 fi
10558
10559
10560       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10561     Defining WNN6
10562 EOF
10563 cat >> confdefs.h <<\EOF
10564 #define WNN6 1
10565 EOF
10566 }
10567
10568     fi
10569   fi
10570
10571     canna_includes_found=no
10572   if test "$with_canna" != "no"; then
10573     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10574 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10575 echo "configure:10576: checking for canna/jrkanji.h" >&5
10576
10577 cat > conftest.$ac_ext <<EOF
10578 #line 10579 "configure"
10579 #include "confdefs.h"
10580 #include <canna/jrkanji.h>
10581 EOF
10582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10583 { (eval echo configure:10584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10585 if test -z "$ac_err"; then
10586   rm -rf conftest*
10587   eval "ac_cv_header_$ac_safe=yes"
10588 else
10589   echo "$ac_err" >&5
10590   echo "configure: failed program was:" >&5
10591   cat conftest.$ac_ext >&5
10592   rm -rf conftest*
10593   eval "ac_cv_header_$ac_safe=no"
10594 fi
10595 rm -f conftest*
10596 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10597   echo "$ac_t""yes" 1>&6
10598   canna_includes_found=yes
10599 else
10600   echo "$ac_t""no" 1>&6
10601 fi
10602
10603   fi
10604   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10605       -d "/usr/local/canna/include"; then
10606     save_c_switch_site="$c_switch_site"
10607     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10608     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10609 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10610 echo "configure:10611: checking for canna/jrkanji.h" >&5
10611
10612 cat > conftest.$ac_ext <<EOF
10613 #line 10614 "configure"
10614 #include "confdefs.h"
10615 #include <canna/jrkanji.h>
10616 EOF
10617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10618 { (eval echo configure:10619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10620 if test -z "$ac_err"; then
10621   rm -rf conftest*
10622   eval "ac_cv_header_$ac_safe=yes"
10623 else
10624   echo "$ac_err" >&5
10625   echo "configure: failed program was:" >&5
10626   cat conftest.$ac_ext >&5
10627   rm -rf conftest*
10628   eval "ac_cv_header_$ac_safe=no"
10629 fi
10630 rm -f conftest*
10631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10632   echo "$ac_t""yes" 1>&6
10633   canna_includes_found=yes
10634 else
10635   echo "$ac_t""no" 1>&6
10636 fi
10637
10638     if test "$canna_includes_found" != "yes"; then
10639       c_switch_site="$save_c_switch_site"
10640       with_canna="no"
10641     fi
10642   fi
10643
10644   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10645 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10646 echo "configure:10647: checking for canna/RK.h" >&5
10647
10648 cat > conftest.$ac_ext <<EOF
10649 #line 10650 "configure"
10650 #include "confdefs.h"
10651 #include <canna/RK.h>
10652 EOF
10653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10654 { (eval echo configure:10655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10656 if test -z "$ac_err"; then
10657   rm -rf conftest*
10658   eval "ac_cv_header_$ac_safe=yes"
10659 else
10660   echo "$ac_err" >&5
10661   echo "configure: failed program was:" >&5
10662   cat conftest.$ac_ext >&5
10663   rm -rf conftest*
10664   eval "ac_cv_header_$ac_safe=no"
10665 fi
10666 rm -f conftest*
10667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10668   echo "$ac_t""yes" 1>&6
10669   :
10670 else
10671   echo "$ac_t""no" 1>&6
10672 with_canna=no
10673 fi
10674  }
10675   test -z "$with_canna" && { 
10676 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10677 echo "configure:10678: checking for RkBgnBun in -lRKC" >&5
10678 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10679
10680 xe_check_libs=" -lRKC "
10681 cat > conftest.$ac_ext <<EOF
10682 #line 10683 "configure"
10683 #include "confdefs.h"
10684 /* Override any gcc2 internal prototype to avoid an error.  */
10685 /* We use char because int might match the return type of a gcc2
10686     builtin and then its argument prototype would still apply.  */
10687 char RkBgnBun();
10688
10689 int main() {
10690 RkBgnBun()
10691 ; return 0; }
10692 EOF
10693 if { (eval echo configure:10694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10694   rm -rf conftest*
10695   eval "ac_cv_lib_$ac_lib_var=yes"
10696 else
10697   echo "configure: failed program was:" >&5
10698   cat conftest.$ac_ext >&5
10699   rm -rf conftest*
10700   eval "ac_cv_lib_$ac_lib_var=no"
10701 fi
10702 rm -f conftest*
10703 xe_check_libs=""
10704
10705 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10706   echo "$ac_t""yes" 1>&6
10707   :
10708 else
10709   echo "$ac_t""no" 1>&6
10710 with_canna=no
10711 fi
10712
10713  }
10714   test -z "$with_canna" && { 
10715 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10716 echo "configure:10717: checking for jrKanjiControl in -lcanna" >&5
10717 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10718
10719 xe_check_libs=" -lcanna "
10720 cat > conftest.$ac_ext <<EOF
10721 #line 10722 "configure"
10722 #include "confdefs.h"
10723 /* Override any gcc2 internal prototype to avoid an error.  */
10724 /* We use char because int might match the return type of a gcc2
10725     builtin and then its argument prototype would still apply.  */
10726 char jrKanjiControl();
10727
10728 int main() {
10729 jrKanjiControl()
10730 ; return 0; }
10731 EOF
10732 if { (eval echo configure:10733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10733   rm -rf conftest*
10734   eval "ac_cv_lib_$ac_lib_var=yes"
10735 else
10736   echo "configure: failed program was:" >&5
10737   cat conftest.$ac_ext >&5
10738   rm -rf conftest*
10739   eval "ac_cv_lib_$ac_lib_var=no"
10740 fi
10741 rm -f conftest*
10742 xe_check_libs=""
10743
10744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10745   echo "$ac_t""yes" 1>&6
10746   :
10747 else
10748   echo "$ac_t""no" 1>&6
10749 with_canna=no
10750 fi
10751
10752  }
10753   test -z "$with_canna" && with_canna=yes
10754   if test "$with_canna" = "yes"; then
10755     { test "$extra_verbose" = "yes" && cat << \EOF
10756     Defining HAVE_CANNA
10757 EOF
10758 cat >> confdefs.h <<\EOF
10759 #define HAVE_CANNA 1
10760 EOF
10761 }
10762
10763     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10764     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10765    echo "    xemacs will be linked with \"mule-canna.o\""
10766  fi
10767   fi
10768
10769 else   for feature in xim canna wnn; do
10770     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10771       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10772     fi
10773     eval "with_${feature}=no"
10774   done
10775 fi 
10776
10777 if test "$need_motif" = "yes" ; then
10778   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10779     
10780 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10781 echo "configure:10782: checking for layout_object_getvalue in -li18n" >&5
10782 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10783
10784 xe_check_libs=" -li18n "
10785 cat > conftest.$ac_ext <<EOF
10786 #line 10787 "configure"
10787 #include "confdefs.h"
10788 /* Override any gcc2 internal prototype to avoid an error.  */
10789 /* We use char because int might match the return type of a gcc2
10790     builtin and then its argument prototype would still apply.  */
10791 char layout_object_getvalue();
10792
10793 int main() {
10794 layout_object_getvalue()
10795 ; return 0; }
10796 EOF
10797 if { (eval echo configure:10798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10798   rm -rf conftest*
10799   eval "ac_cv_lib_$ac_lib_var=yes"
10800 else
10801   echo "configure: failed program was:" >&5
10802   cat conftest.$ac_ext >&5
10803   rm -rf conftest*
10804   eval "ac_cv_lib_$ac_lib_var=no"
10805 fi
10806 rm -f conftest*
10807 xe_check_libs=""
10808
10809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10810   echo "$ac_t""yes" 1>&6
10811   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10812 else
10813   echo "$ac_t""no" 1>&6
10814 fi
10815
10816
10817   
10818 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10819     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10820   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10821   
10822         runpath="" runpath_dirs=""
10823   if test -n "$LD_RUN_PATH"; then
10824     runpath="$LD_RUN_PATH"
10825   elif test "$GCC" = "yes"; then
10826         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10827     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10828     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10829     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10830       case "$arg" in P,* | -L* | -R* )
10831         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10832           {
10833 xe_runpath_dir="$dir"
10834   test "$xe_runpath_dir" != "/lib"     -a \
10835         "$xe_runpath_dir" != "/usr/lib" -a \
10836         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10837   eval "$xe_add_unique_runpath_dir"
10838 }
10839         done ;;
10840       esac
10841     done
10842     ld_switch_run="$ld_switch_run_save"
10843     rm -f conftest*
10844   else
10845         for arg in $ld_switch_site $ld_switch_x_site; do
10846       case "$arg" in -L*) {
10847 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10848   test "$xe_runpath_dir" != "/lib"     -a \
10849         "$xe_runpath_dir" != "/usr/lib" -a \
10850         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10851   eval "$xe_add_unique_runpath_dir"
10852 };; esac
10853     done
10854         if test "$opsys $need_motif" = "sol2 yes"; then
10855       xe_runpath_dir="/opt/SUNWdt/lib";
10856       eval "$xe_add_unique_runpath_dir";
10857     fi
10858   fi 
10859   if test -n "$runpath"; then
10860     ld_switch_run="${dash_r}${runpath}"
10861     
10862 if test "$GCC" = "yes"; then
10863   set x $ld_switch_run; shift; ld_switch_run=""
10864   while test -n "$1"; do
10865     case $1 in
10866       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10867       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10868       -Xlinker* ) ;;
10869       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10870     esac
10871     shift
10872   done
10873 fi
10874     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10875   fi
10876 fi
10877
10878 fi
10879
10880 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror tzset ulimit usleep waitpid vsnprintf fsync ftruncate umask
10881 do
10882 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10883 echo "configure:10884: checking for $ac_func" >&5
10884
10885 cat > conftest.$ac_ext <<EOF
10886 #line 10887 "configure"
10887 #include "confdefs.h"
10888 /* System header to define __stub macros and hopefully few prototypes,
10889     which can conflict with char $ac_func(); below.  */
10890 #include <assert.h>
10891 /* Override any gcc2 internal prototype to avoid an error.  */
10892 /* We use char because int might match the return type of a gcc2
10893     builtin and then its argument prototype would still apply.  */
10894 char $ac_func();
10895
10896 int main() {
10897
10898 /* The GNU C library defines this for functions which it implements
10899     to always fail with ENOSYS.  Some functions are actually named
10900     something starting with __ and the normal name is an alias.  */
10901 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10902 choke me
10903 #else
10904 $ac_func();
10905 #endif
10906
10907 ; return 0; }
10908 EOF
10909 if { (eval echo configure:10910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10910   rm -rf conftest*
10911   eval "ac_cv_func_$ac_func=yes"
10912 else
10913   echo "configure: failed program was:" >&5
10914   cat conftest.$ac_ext >&5
10915   rm -rf conftest*
10916   eval "ac_cv_func_$ac_func=no"
10917 fi
10918 rm -f conftest*
10919
10920 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10921   echo "$ac_t""yes" 1>&6
10922     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10923   { test "$extra_verbose" = "yes" && cat << EOF
10924     Defining $ac_tr_func
10925 EOF
10926 cat >> confdefs.h <<EOF
10927 #define $ac_tr_func 1
10928 EOF
10929 }
10930  
10931 else
10932   echo "$ac_t""no" 1>&6
10933 fi
10934 done
10935
10936
10937
10938 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10939 do
10940 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10941 echo "configure:10942: checking for $ac_func" >&5
10942
10943 cat > conftest.$ac_ext <<EOF
10944 #line 10945 "configure"
10945 #include "confdefs.h"
10946 /* System header to define __stub macros and hopefully few prototypes,
10947     which can conflict with char $ac_func(); below.  */
10948 #include <assert.h>
10949 /* Override any gcc2 internal prototype to avoid an error.  */
10950 /* We use char because int might match the return type of a gcc2
10951     builtin and then its argument prototype would still apply.  */
10952 char $ac_func();
10953
10954 int main() {
10955
10956 /* The GNU C library defines this for functions which it implements
10957     to always fail with ENOSYS.  Some functions are actually named
10958     something starting with __ and the normal name is an alias.  */
10959 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10960 choke me
10961 #else
10962 $ac_func();
10963 #endif
10964
10965 ; return 0; }
10966 EOF
10967 if { (eval echo configure:10968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10968   rm -rf conftest*
10969   eval "ac_cv_func_$ac_func=yes"
10970 else
10971   echo "configure: failed program was:" >&5
10972   cat conftest.$ac_ext >&5
10973   rm -rf conftest*
10974   eval "ac_cv_func_$ac_func=no"
10975 fi
10976 rm -f conftest*
10977
10978 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10979   echo "$ac_t""yes" 1>&6
10980     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10981   { test "$extra_verbose" = "yes" && cat << EOF
10982     Defining $ac_tr_func
10983 EOF
10984 cat >> confdefs.h <<EOF
10985 #define $ac_tr_func 1
10986 EOF
10987 }
10988  
10989 else
10990   echo "$ac_t""no" 1>&6
10991 fi
10992 done
10993
10994
10995 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10996 echo "configure:10997: checking for openpty" >&5
10997
10998 cat > conftest.$ac_ext <<EOF
10999 #line 11000 "configure"
11000 #include "confdefs.h"
11001 /* System header to define __stub macros and hopefully few prototypes,
11002     which can conflict with char openpty(); below.  */
11003 #include <assert.h>
11004 /* Override any gcc2 internal prototype to avoid an error.  */
11005 /* We use char because int might match the return type of a gcc2
11006     builtin and then its argument prototype would still apply.  */
11007 char openpty();
11008
11009 int main() {
11010
11011 /* The GNU C library defines this for functions which it implements
11012     to always fail with ENOSYS.  Some functions are actually named
11013     something starting with __ and the normal name is an alias.  */
11014 #if defined (__stub_openpty) || defined (__stub___openpty)
11015 choke me
11016 #else
11017 openpty();
11018 #endif
11019
11020 ; return 0; }
11021 EOF
11022 if { (eval echo configure:11023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11023   rm -rf conftest*
11024   eval "ac_cv_func_openpty=yes"
11025 else
11026   echo "configure: failed program was:" >&5
11027   cat conftest.$ac_ext >&5
11028   rm -rf conftest*
11029   eval "ac_cv_func_openpty=no"
11030 fi
11031 rm -f conftest*
11032
11033 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11034   echo "$ac_t""yes" 1>&6
11035   have_openpty=yes
11036 else
11037   echo "$ac_t""no" 1>&6
11038
11039   
11040 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11041 echo "configure:11042: checking for openpty in -lutil" >&5
11042 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11043
11044 xe_check_libs=" -lutil "
11045 cat > conftest.$ac_ext <<EOF
11046 #line 11047 "configure"
11047 #include "confdefs.h"
11048 /* Override any gcc2 internal prototype to avoid an error.  */
11049 /* We use char because int might match the return type of a gcc2
11050     builtin and then its argument prototype would still apply.  */
11051 char openpty();
11052
11053 int main() {
11054 openpty()
11055 ; return 0; }
11056 EOF
11057 if { (eval echo configure:11058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11058   rm -rf conftest*
11059   eval "ac_cv_lib_$ac_lib_var=yes"
11060 else
11061   echo "configure: failed program was:" >&5
11062   cat conftest.$ac_ext >&5
11063   rm -rf conftest*
11064   eval "ac_cv_lib_$ac_lib_var=no"
11065 fi
11066 rm -f conftest*
11067 xe_check_libs=""
11068
11069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11070   echo "$ac_t""yes" 1>&6
11071   have_openpty=yes need_libutil=yes
11072 else
11073   echo "$ac_t""no" 1>&6
11074 fi
11075
11076
11077 fi
11078
11079 if test "$have_openpty" = "yes"; then
11080   { test "$extra_verbose" = "yes" && cat << \EOF
11081     Defining HAVE_OPENPTY
11082 EOF
11083 cat >> confdefs.h <<\EOF
11084 #define HAVE_OPENPTY 1
11085 EOF
11086 }
11087
11088   for ac_hdr in pty.h libutil.h util.h
11089 do
11090 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11091 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11092 echo "configure:11093: checking for $ac_hdr" >&5
11093
11094 cat > conftest.$ac_ext <<EOF
11095 #line 11096 "configure"
11096 #include "confdefs.h"
11097 #include <$ac_hdr>
11098 EOF
11099 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11100 { (eval echo configure:11101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11101 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11102 if test -z "$ac_err"; then
11103   rm -rf conftest*
11104   eval "ac_cv_header_$ac_safe=yes"
11105 else
11106   echo "$ac_err" >&5
11107   echo "configure: failed program was:" >&5
11108   cat conftest.$ac_ext >&5
11109   rm -rf conftest*
11110   eval "ac_cv_header_$ac_safe=no"
11111 fi
11112 rm -f conftest*
11113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11114   echo "$ac_t""yes" 1>&6
11115     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11116   { test "$extra_verbose" = "yes" && cat << EOF
11117     Defining $ac_tr_hdr
11118 EOF
11119 cat >> confdefs.h <<EOF
11120 #define $ac_tr_hdr 1
11121 EOF
11122 }
11123  break
11124 else
11125   echo "$ac_t""no" 1>&6
11126 fi
11127 done
11128
11129   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11130 fi
11131
11132 for ac_hdr in stropts.h
11133 do
11134 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11135 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11136 echo "configure:11137: checking for $ac_hdr" >&5
11137
11138 cat > conftest.$ac_ext <<EOF
11139 #line 11140 "configure"
11140 #include "confdefs.h"
11141 #include <$ac_hdr>
11142 EOF
11143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11144 { (eval echo configure:11145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11146 if test -z "$ac_err"; then
11147   rm -rf conftest*
11148   eval "ac_cv_header_$ac_safe=yes"
11149 else
11150   echo "$ac_err" >&5
11151   echo "configure: failed program was:" >&5
11152   cat conftest.$ac_ext >&5
11153   rm -rf conftest*
11154   eval "ac_cv_header_$ac_safe=no"
11155 fi
11156 rm -f conftest*
11157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11158   echo "$ac_t""yes" 1>&6
11159     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11160   { test "$extra_verbose" = "yes" && cat << EOF
11161     Defining $ac_tr_hdr
11162 EOF
11163 cat >> confdefs.h <<EOF
11164 #define $ac_tr_hdr 1
11165 EOF
11166 }
11167  
11168 else
11169   echo "$ac_t""no" 1>&6
11170 fi
11171 done
11172
11173 if test "$ac_cv_header_stropts_h" = "yes"; then
11174   for ac_func in isastream
11175 do
11176 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11177 echo "configure:11178: checking for $ac_func" >&5
11178
11179 cat > conftest.$ac_ext <<EOF
11180 #line 11181 "configure"
11181 #include "confdefs.h"
11182 /* System header to define __stub macros and hopefully few prototypes,
11183     which can conflict with char $ac_func(); below.  */
11184 #include <assert.h>
11185 /* Override any gcc2 internal prototype to avoid an error.  */
11186 /* We use char because int might match the return type of a gcc2
11187     builtin and then its argument prototype would still apply.  */
11188 char $ac_func();
11189
11190 int main() {
11191
11192 /* The GNU C library defines this for functions which it implements
11193     to always fail with ENOSYS.  Some functions are actually named
11194     something starting with __ and the normal name is an alias.  */
11195 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11196 choke me
11197 #else
11198 $ac_func();
11199 #endif
11200
11201 ; return 0; }
11202 EOF
11203 if { (eval echo configure:11204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11204   rm -rf conftest*
11205   eval "ac_cv_func_$ac_func=yes"
11206 else
11207   echo "configure: failed program was:" >&5
11208   cat conftest.$ac_ext >&5
11209   rm -rf conftest*
11210   eval "ac_cv_func_$ac_func=no"
11211 fi
11212 rm -f conftest*
11213
11214 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11215   echo "$ac_t""yes" 1>&6
11216     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11217   { test "$extra_verbose" = "yes" && cat << EOF
11218     Defining $ac_tr_func
11219 EOF
11220 cat >> confdefs.h <<EOF
11221 #define $ac_tr_func 1
11222 EOF
11223 }
11224  
11225 else
11226   echo "$ac_t""no" 1>&6
11227 fi
11228 done
11229
11230   for ac_hdr in strtio.h
11231 do
11232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11234 echo "configure:11235: checking for $ac_hdr" >&5
11235
11236 cat > conftest.$ac_ext <<EOF
11237 #line 11238 "configure"
11238 #include "confdefs.h"
11239 #include <$ac_hdr>
11240 EOF
11241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11242 { (eval echo configure:11243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11244 if test -z "$ac_err"; then
11245   rm -rf conftest*
11246   eval "ac_cv_header_$ac_safe=yes"
11247 else
11248   echo "$ac_err" >&5
11249   echo "configure: failed program was:" >&5
11250   cat conftest.$ac_ext >&5
11251   rm -rf conftest*
11252   eval "ac_cv_header_$ac_safe=no"
11253 fi
11254 rm -f conftest*
11255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11256   echo "$ac_t""yes" 1>&6
11257     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11258   { test "$extra_verbose" = "yes" && cat << EOF
11259     Defining $ac_tr_hdr
11260 EOF
11261 cat >> confdefs.h <<EOF
11262 #define $ac_tr_hdr 1
11263 EOF
11264 }
11265  
11266 else
11267   echo "$ac_t""no" 1>&6
11268 fi
11269 done
11270  fi
11271
11272 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11273    echo "    xemacs will be linked with \"realpath.o\""
11274  fi
11275
11276 for ac_func in getloadavg
11277 do
11278 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11279 echo "configure:11280: checking for $ac_func" >&5
11280
11281 cat > conftest.$ac_ext <<EOF
11282 #line 11283 "configure"
11283 #include "confdefs.h"
11284 /* System header to define __stub macros and hopefully few prototypes,
11285     which can conflict with char $ac_func(); below.  */
11286 #include <assert.h>
11287 /* Override any gcc2 internal prototype to avoid an error.  */
11288 /* We use char because int might match the return type of a gcc2
11289     builtin and then its argument prototype would still apply.  */
11290 char $ac_func();
11291
11292 int main() {
11293
11294 /* The GNU C library defines this for functions which it implements
11295     to always fail with ENOSYS.  Some functions are actually named
11296     something starting with __ and the normal name is an alias.  */
11297 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11298 choke me
11299 #else
11300 $ac_func();
11301 #endif
11302
11303 ; return 0; }
11304 EOF
11305 if { (eval echo configure:11306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11306   rm -rf conftest*
11307   eval "ac_cv_func_$ac_func=yes"
11308 else
11309   echo "configure: failed program was:" >&5
11310   cat conftest.$ac_ext >&5
11311   rm -rf conftest*
11312   eval "ac_cv_func_$ac_func=no"
11313 fi
11314 rm -f conftest*
11315
11316 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11317   echo "$ac_t""yes" 1>&6
11318     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11319   { test "$extra_verbose" = "yes" && cat << EOF
11320     Defining $ac_tr_func
11321 EOF
11322 cat >> confdefs.h <<EOF
11323 #define $ac_tr_func 1
11324 EOF
11325 }
11326  
11327 else
11328   echo "$ac_t""no" 1>&6
11329 fi
11330 done
11331
11332
11333 if test "$ac_cv_func_getloadavg" = "yes"; then
11334         for ac_hdr in sys/loadavg.h
11335 do
11336 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11337 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11338 echo "configure:11339: checking for $ac_hdr" >&5
11339
11340 cat > conftest.$ac_ext <<EOF
11341 #line 11342 "configure"
11342 #include "confdefs.h"
11343 #include <$ac_hdr>
11344 EOF
11345 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11346 { (eval echo configure:11347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11347 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11348 if test -z "$ac_err"; then
11349   rm -rf conftest*
11350   eval "ac_cv_header_$ac_safe=yes"
11351 else
11352   echo "$ac_err" >&5
11353   echo "configure: failed program was:" >&5
11354   cat conftest.$ac_ext >&5
11355   rm -rf conftest*
11356   eval "ac_cv_header_$ac_safe=no"
11357 fi
11358 rm -f conftest*
11359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11360   echo "$ac_t""yes" 1>&6
11361     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11362   { test "$extra_verbose" = "yes" && cat << EOF
11363     Defining $ac_tr_hdr
11364 EOF
11365 cat >> confdefs.h <<EOF
11366 #define $ac_tr_hdr 1
11367 EOF
11368 }
11369  
11370 else
11371   echo "$ac_t""no" 1>&6
11372 fi
11373 done
11374
11375 else
11376     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11377    echo "    xemacs will be linked with \"getloadavg.o\""
11378  fi
11379
11380     
11381 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11382 echo "configure:11383: checking for kstat_open in -lkstat" >&5
11383 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11384
11385 xe_check_libs=" -lkstat "
11386 cat > conftest.$ac_ext <<EOF
11387 #line 11388 "configure"
11388 #include "confdefs.h"
11389 /* Override any gcc2 internal prototype to avoid an error.  */
11390 /* We use char because int might match the return type of a gcc2
11391     builtin and then its argument prototype would still apply.  */
11392 char kstat_open();
11393
11394 int main() {
11395 kstat_open()
11396 ; return 0; }
11397 EOF
11398 if { (eval echo configure:11399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11399   rm -rf conftest*
11400   eval "ac_cv_lib_$ac_lib_var=yes"
11401 else
11402   echo "configure: failed program was:" >&5
11403   cat conftest.$ac_ext >&5
11404   rm -rf conftest*
11405   eval "ac_cv_lib_$ac_lib_var=no"
11406 fi
11407 rm -f conftest*
11408 xe_check_libs=""
11409
11410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11411   echo "$ac_t""yes" 1>&6
11412     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11413     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11414   { test "$extra_verbose" = "yes" && cat << EOF
11415     Defining $ac_tr_lib
11416 EOF
11417 cat >> confdefs.h <<EOF
11418 #define $ac_tr_lib 1
11419 EOF
11420 }
11421
11422   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11423
11424 else
11425   echo "$ac_t""no" 1>&6
11426 fi
11427
11428
11429   for ac_hdr in kstat.h
11430 do
11431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11433 echo "configure:11434: checking for $ac_hdr" >&5
11434
11435 cat > conftest.$ac_ext <<EOF
11436 #line 11437 "configure"
11437 #include "confdefs.h"
11438 #include <$ac_hdr>
11439 EOF
11440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11441 { (eval echo configure:11442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11443 if test -z "$ac_err"; then
11444   rm -rf conftest*
11445   eval "ac_cv_header_$ac_safe=yes"
11446 else
11447   echo "$ac_err" >&5
11448   echo "configure: failed program was:" >&5
11449   cat conftest.$ac_ext >&5
11450   rm -rf conftest*
11451   eval "ac_cv_header_$ac_safe=no"
11452 fi
11453 rm -f conftest*
11454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11455   echo "$ac_t""yes" 1>&6
11456     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11457   { test "$extra_verbose" = "yes" && cat << EOF
11458     Defining $ac_tr_hdr
11459 EOF
11460 cat >> confdefs.h <<EOF
11461 #define $ac_tr_hdr 1
11462 EOF
11463 }
11464  
11465 else
11466   echo "$ac_t""no" 1>&6
11467 fi
11468 done
11469
11470
11471     
11472 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11473 echo "configure:11474: checking for kvm_read in -lkvm" >&5
11474 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11475
11476 xe_check_libs=" -lkvm "
11477 cat > conftest.$ac_ext <<EOF
11478 #line 11479 "configure"
11479 #include "confdefs.h"
11480 /* Override any gcc2 internal prototype to avoid an error.  */
11481 /* We use char because int might match the return type of a gcc2
11482     builtin and then its argument prototype would still apply.  */
11483 char kvm_read();
11484
11485 int main() {
11486 kvm_read()
11487 ; return 0; }
11488 EOF
11489 if { (eval echo configure:11490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11490   rm -rf conftest*
11491   eval "ac_cv_lib_$ac_lib_var=yes"
11492 else
11493   echo "configure: failed program was:" >&5
11494   cat conftest.$ac_ext >&5
11495   rm -rf conftest*
11496   eval "ac_cv_lib_$ac_lib_var=no"
11497 fi
11498 rm -f conftest*
11499 xe_check_libs=""
11500
11501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11502   echo "$ac_t""yes" 1>&6
11503     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11504     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11505   { test "$extra_verbose" = "yes" && cat << EOF
11506     Defining $ac_tr_lib
11507 EOF
11508 cat >> confdefs.h <<EOF
11509 #define $ac_tr_lib 1
11510 EOF
11511 }
11512
11513   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11514
11515 else
11516   echo "$ac_t""no" 1>&6
11517 fi
11518
11519
11520 fi
11521
11522 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11523 echo "configure:11524: checking whether netdb declares h_errno" >&5
11524 cat > conftest.$ac_ext <<EOF
11525 #line 11526 "configure"
11526 #include "confdefs.h"
11527 #include <netdb.h>
11528 int main() {
11529 return h_errno;
11530 ; return 0; }
11531 EOF
11532 if { (eval echo configure:11533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11533   rm -rf conftest*
11534   echo "$ac_t""yes" 1>&6
11535    { test "$extra_verbose" = "yes" && cat << \EOF
11536     Defining HAVE_H_ERRNO
11537 EOF
11538 cat >> confdefs.h <<\EOF
11539 #define HAVE_H_ERRNO 1
11540 EOF
11541 }
11542
11543 else
11544   echo "configure: failed program was:" >&5
11545   cat conftest.$ac_ext >&5
11546   rm -rf conftest*
11547   echo "$ac_t""no" 1>&6
11548 fi
11549 rm -f conftest*
11550
11551 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11552 echo "configure:11553: checking for sigsetjmp" >&5
11553 cat > conftest.$ac_ext <<EOF
11554 #line 11555 "configure"
11555 #include "confdefs.h"
11556 #include <setjmp.h>
11557 int main() {
11558 sigjmp_buf bar; sigsetjmp (bar, 0);
11559 ; return 0; }
11560 EOF
11561 if { (eval echo configure:11562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11562   rm -rf conftest*
11563   echo "$ac_t""yes" 1>&6
11564    { test "$extra_verbose" = "yes" && cat << \EOF
11565     Defining HAVE_SIGSETJMP
11566 EOF
11567 cat >> confdefs.h <<\EOF
11568 #define HAVE_SIGSETJMP 1
11569 EOF
11570 }
11571
11572 else
11573   echo "configure: failed program was:" >&5
11574   cat conftest.$ac_ext >&5
11575   rm -rf conftest*
11576   echo "$ac_t""no" 1>&6
11577 fi
11578 rm -f conftest*
11579
11580 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11581 echo "configure:11582: checking whether localtime caches TZ" >&5
11582
11583 if test "$ac_cv_func_tzset" = "yes"; then
11584 cat > conftest.$ac_ext <<EOF
11585 #line 11586 "configure"
11586 #include "confdefs.h"
11587 #include <time.h>
11588 #if STDC_HEADERS
11589 # include <stdlib.h>
11590 #endif
11591 extern char **environ;
11592 unset_TZ ()
11593 {
11594   char **from, **to;
11595   for (to = from = environ; (*to = *from); from++)
11596     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11597       to++;
11598 }
11599 char TZ_GMT0[] = "TZ=GMT0";
11600 char TZ_PST8[] = "TZ=PST8";
11601 main()
11602 {
11603   time_t now = time ((time_t *) 0);
11604   int hour_GMT0, hour_unset;
11605   if (putenv (TZ_GMT0) != 0)
11606     exit (1);
11607   hour_GMT0 = localtime (&now)->tm_hour;
11608   unset_TZ ();
11609   hour_unset = localtime (&now)->tm_hour;
11610   if (putenv (TZ_PST8) != 0)
11611     exit (1);
11612   if (localtime (&now)->tm_hour == hour_GMT0)
11613     exit (1);
11614   unset_TZ ();
11615   if (localtime (&now)->tm_hour != hour_unset)
11616     exit (1);
11617   exit (0);
11618 }
11619 EOF
11620 if { (eval echo configure:11621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11621 then
11622   emacs_cv_localtime_cache=no
11623 else
11624   conftest_rc="$?"
11625   echo "configure: failed program was:" >&5
11626   cat conftest.$ac_ext >&5
11627   rm -fr conftest*
11628   emacs_cv_localtime_cache=yes
11629 fi
11630 rm -fr conftest*
11631 else
11632         # If we lack tzset, report that localtime does not cache TZ,
11633         # since we can't invalidate the cache if we don't have tzset.
11634         emacs_cv_localtime_cache=no
11635 fi
11636 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11637 if test $emacs_cv_localtime_cache = yes; then
11638   { test "$extra_verbose" = "yes" && cat << \EOF
11639     Defining LOCALTIME_CACHE
11640 EOF
11641 cat >> confdefs.h <<\EOF
11642 #define LOCALTIME_CACHE 1
11643 EOF
11644 }
11645
11646 fi
11647
11648 if test "$HAVE_TIMEVAL" = "yes"; then
11649 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11650 echo "configure:11651: checking whether gettimeofday accepts one or two arguments" >&5
11651 cat > conftest.$ac_ext <<EOF
11652 #line 11653 "configure"
11653 #include "confdefs.h"
11654
11655 #ifdef TIME_WITH_SYS_TIME
11656 #include <sys/time.h>
11657 #include <time.h>
11658 #else
11659 #ifdef HAVE_SYS_TIME_H
11660 #include <sys/time.h>
11661 #else
11662 #include <time.h>
11663 #endif
11664 #endif
11665   
11666 int main() {
11667
11668   struct timeval time;
11669   gettimeofday (&time, 0);
11670
11671 ; return 0; }
11672 EOF
11673 if { (eval echo configure:11674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11674   rm -rf conftest*
11675   echo "$ac_t""two" 1>&6
11676 else
11677   echo "configure: failed program was:" >&5
11678   cat conftest.$ac_ext >&5
11679   rm -rf conftest*
11680   echo "$ac_t""one" 1>&6
11681    { test "$extra_verbose" = "yes" && cat << \EOF
11682     Defining GETTIMEOFDAY_ONE_ARGUMENT
11683 EOF
11684 cat >> confdefs.h <<\EOF
11685 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11686 EOF
11687 }
11688
11689 fi
11690 rm -f conftest*
11691 fi
11692
11693
11694 echo $ac_n "checking for inline""... $ac_c" 1>&6
11695 echo "configure:11696: checking for inline" >&5
11696
11697 ac_cv_c_inline=no
11698 for ac_kw in inline __inline__ __inline; do
11699   cat > conftest.$ac_ext <<EOF
11700 #line 11701 "configure"
11701 #include "confdefs.h"
11702
11703 int main() {
11704 } $ac_kw foo() {
11705 ; return 0; }
11706 EOF
11707 if { (eval echo configure:11708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11708   rm -rf conftest*
11709   ac_cv_c_inline=$ac_kw; break
11710 else
11711   echo "configure: failed program was:" >&5
11712   cat conftest.$ac_ext >&5
11713 fi
11714 rm -f conftest*
11715 done
11716
11717
11718 echo "$ac_t""$ac_cv_c_inline" 1>&6
11719 case "$ac_cv_c_inline" in
11720   inline | yes) ;;
11721   no) { test "$extra_verbose" = "yes" && cat << \EOF
11722     Defining inline = 
11723 EOF
11724 cat >> confdefs.h <<\EOF
11725 #define inline 
11726 EOF
11727 }
11728  ;;
11729   *)  { test "$extra_verbose" = "yes" && cat << EOF
11730     Defining inline = $ac_cv_c_inline
11731 EOF
11732 cat >> confdefs.h <<EOF
11733 #define inline $ac_cv_c_inline
11734 EOF
11735 }
11736  ;;
11737 esac
11738
11739 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11740    echo "    xemacs will be linked with \"inline.o\""
11741  fi
11742
11743
11744 if test "$__DECC" != "yes"; then
11745   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11746 # for constant arguments.  Useless!
11747 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11748 echo "configure:11749: checking for working alloca.h" >&5
11749
11750 cat > conftest.$ac_ext <<EOF
11751 #line 11752 "configure"
11752 #include "confdefs.h"
11753 #include <alloca.h>
11754 int main() {
11755 char *p = alloca(2 * sizeof(int));
11756 ; return 0; }
11757 EOF
11758 if { (eval echo configure:11759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11759   rm -rf conftest*
11760   ac_cv_header_alloca_h=yes
11761 else
11762   echo "configure: failed program was:" >&5
11763   cat conftest.$ac_ext >&5
11764   rm -rf conftest*
11765   ac_cv_header_alloca_h=no
11766 fi
11767 rm -f conftest*
11768
11769 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11770 if test $ac_cv_header_alloca_h = yes; then
11771   { test "$extra_verbose" = "yes" && cat << \EOF
11772     Defining HAVE_ALLOCA_H
11773 EOF
11774 cat >> confdefs.h <<\EOF
11775 #define HAVE_ALLOCA_H 1
11776 EOF
11777 }
11778
11779 fi
11780
11781 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11782 echo "configure:11783: checking for alloca" >&5
11783
11784 cat > conftest.$ac_ext <<EOF
11785 #line 11786 "configure"
11786 #include "confdefs.h"
11787
11788 #ifdef __GNUC__
11789 # define alloca __builtin_alloca
11790 #else
11791 # ifdef _MSC_VER
11792 #  include <malloc.h>
11793 #  define alloca _alloca
11794 # else
11795 #  if HAVE_ALLOCA_H
11796 #   include <alloca.h>
11797 #  else
11798 #   ifdef _AIX
11799  #pragma alloca
11800 #   else
11801 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11802 char *alloca ();
11803 #    endif
11804 #   endif
11805 #  endif
11806 # endif
11807 #endif
11808
11809 int main() {
11810 char *p = (char *) alloca(1);
11811 ; return 0; }
11812 EOF
11813 if { (eval echo configure:11814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11814   rm -rf conftest*
11815   ac_cv_func_alloca_works=yes
11816 else
11817   echo "configure: failed program was:" >&5
11818   cat conftest.$ac_ext >&5
11819   rm -rf conftest*
11820   ac_cv_func_alloca_works=no
11821 fi
11822 rm -f conftest*
11823
11824 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11825 if test $ac_cv_func_alloca_works = yes; then
11826   { test "$extra_verbose" = "yes" && cat << \EOF
11827     Defining HAVE_ALLOCA
11828 EOF
11829 cat >> confdefs.h <<\EOF
11830 #define HAVE_ALLOCA 1
11831 EOF
11832 }
11833
11834 fi
11835
11836 if test $ac_cv_func_alloca_works = no; then
11837   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11838   # that cause trouble.  Some versions do not even contain alloca or
11839   # contain a buggy version.  If you still want to use their alloca,
11840   # use ar to extract alloca.o from them instead of compiling alloca.c.
11841   ALLOCA=alloca.${ac_objext}
11842   { test "$extra_verbose" = "yes" && cat << \EOF
11843     Defining C_ALLOCA
11844 EOF
11845 cat >> confdefs.h <<\EOF
11846 #define C_ALLOCA 1
11847 EOF
11848 }
11849
11850
11851 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11852 echo "configure:11853: checking whether alloca needs Cray hooks" >&5
11853
11854 cat > conftest.$ac_ext <<EOF
11855 #line 11856 "configure"
11856 #include "confdefs.h"
11857 #if defined(CRAY) && ! defined(CRAY2)
11858 webecray
11859 #else
11860 wenotbecray
11861 #endif
11862
11863 EOF
11864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11865   egrep "webecray" >/dev/null 2>&1; then
11866   rm -rf conftest*
11867   ac_cv_os_cray=yes
11868 else
11869   rm -rf conftest*
11870   ac_cv_os_cray=no
11871 fi
11872 rm -f conftest*
11873
11874
11875 echo "$ac_t""$ac_cv_os_cray" 1>&6
11876 if test $ac_cv_os_cray = yes; then
11877 for ac_func in _getb67 GETB67 getb67; do
11878   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11879 echo "configure:11880: checking for $ac_func" >&5
11880
11881 cat > conftest.$ac_ext <<EOF
11882 #line 11883 "configure"
11883 #include "confdefs.h"
11884 /* System header to define __stub macros and hopefully few prototypes,
11885     which can conflict with char $ac_func(); below.  */
11886 #include <assert.h>
11887 /* Override any gcc2 internal prototype to avoid an error.  */
11888 /* We use char because int might match the return type of a gcc2
11889     builtin and then its argument prototype would still apply.  */
11890 char $ac_func();
11891
11892 int main() {
11893
11894 /* The GNU C library defines this for functions which it implements
11895     to always fail with ENOSYS.  Some functions are actually named
11896     something starting with __ and the normal name is an alias.  */
11897 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11898 choke me
11899 #else
11900 $ac_func();
11901 #endif
11902
11903 ; return 0; }
11904 EOF
11905 if { (eval echo configure:11906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11906   rm -rf conftest*
11907   eval "ac_cv_func_$ac_func=yes"
11908 else
11909   echo "configure: failed program was:" >&5
11910   cat conftest.$ac_ext >&5
11911   rm -rf conftest*
11912   eval "ac_cv_func_$ac_func=no"
11913 fi
11914 rm -f conftest*
11915
11916 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11917   echo "$ac_t""yes" 1>&6
11918   { test "$extra_verbose" = "yes" && cat << EOF
11919     Defining CRAY_STACKSEG_END = $ac_func
11920 EOF
11921 cat >> confdefs.h <<EOF
11922 #define CRAY_STACKSEG_END $ac_func
11923 EOF
11924 }
11925
11926   break
11927 else
11928   echo "$ac_t""no" 1>&6
11929 fi
11930
11931 done
11932 fi
11933
11934 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11935 echo "configure:11936: checking stack direction for C alloca" >&5
11936
11937 cat > conftest.$ac_ext <<EOF
11938 #line 11939 "configure"
11939 #include "confdefs.h"
11940 find_stack_direction ()
11941 {
11942   static char *addr = 0;
11943   auto char dummy;
11944   if (addr == 0)
11945     {
11946       addr = &dummy;
11947       return find_stack_direction ();
11948     }
11949   else
11950     return (&dummy > addr) ? 1 : -1;
11951 }
11952 main ()
11953 {
11954   exit (find_stack_direction() < 0);
11955 }
11956 EOF
11957 if { (eval echo configure:11958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11958 then
11959   ac_cv_c_stack_direction=1
11960 else
11961   conftest_rc="$?"
11962   echo "configure: failed program was:" >&5
11963   cat conftest.$ac_ext >&5
11964   rm -fr conftest*
11965   ac_cv_c_stack_direction=-1
11966 fi
11967 rm -fr conftest*
11968
11969 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11970 { test "$extra_verbose" = "yes" && cat << EOF
11971     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11972 EOF
11973 cat >> confdefs.h <<EOF
11974 #define STACK_DIRECTION $ac_cv_c_stack_direction
11975 EOF
11976 }
11977
11978 fi
11979
11980   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11981    echo "    xemacs will be linked with \"$ALLOCA\""
11982  fi
11983 fi
11984
11985 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11986 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11987 echo "configure:11988: checking for vfork.h" >&5
11988
11989 cat > conftest.$ac_ext <<EOF
11990 #line 11991 "configure"
11991 #include "confdefs.h"
11992 #include <vfork.h>
11993 EOF
11994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11995 { (eval echo configure:11996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11997 if test -z "$ac_err"; then
11998   rm -rf conftest*
11999   eval "ac_cv_header_$ac_safe=yes"
12000 else
12001   echo "$ac_err" >&5
12002   echo "configure: failed program was:" >&5
12003   cat conftest.$ac_ext >&5
12004   rm -rf conftest*
12005   eval "ac_cv_header_$ac_safe=no"
12006 fi
12007 rm -f conftest*
12008 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12009   echo "$ac_t""yes" 1>&6
12010   { test "$extra_verbose" = "yes" && cat << \EOF
12011     Defining HAVE_VFORK_H
12012 EOF
12013 cat >> confdefs.h <<\EOF
12014 #define HAVE_VFORK_H 1
12015 EOF
12016 }
12017
12018 else
12019   echo "$ac_t""no" 1>&6
12020 fi
12021
12022 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12023 echo "configure:12024: checking for working vfork" >&5
12024
12025 cat > conftest.$ac_ext <<EOF
12026 #line 12027 "configure"
12027 #include "confdefs.h"
12028 /* Thanks to Paul Eggert for this test.  */
12029 #include <stdio.h>
12030 #include <sys/types.h>
12031 #include <sys/stat.h>
12032 #ifdef HAVE_UNISTD_H
12033 #include <unistd.h>
12034 #endif
12035 #ifdef HAVE_VFORK_H
12036 #include <vfork.h>
12037 #endif
12038 /* On some sparc systems, changes by the child to local and incoming
12039    argument registers are propagated back to the parent.
12040    The compiler is told about this with #include <vfork.h>,
12041    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12042    Test for this by using a static variable whose address
12043    is put into a register that is clobbered by the vfork.  */
12044 static
12045 #ifdef __cplusplus
12046 sparc_address_test (int arg)
12047 #else
12048 sparc_address_test (arg) int arg;
12049 #endif
12050 {
12051   static pid_t child;
12052   if (!child) {
12053     child = vfork ();
12054     if (child < 0) {
12055       perror ("vfork");
12056       _exit(2);
12057     }
12058     if (!child) {
12059       arg = getpid();
12060       write(-1, "", 0);
12061       _exit (arg);
12062     }
12063   }
12064 }
12065 main() {
12066   pid_t parent = getpid ();
12067   pid_t child;
12068
12069   sparc_address_test ();
12070
12071   child = vfork ();
12072
12073   if (child == 0) {
12074     /* Here is another test for sparc vfork register problems.
12075        This test uses lots of local variables, at least
12076        as many local variables as main has allocated so far
12077        including compiler temporaries.  4 locals are enough for
12078        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12079        A buggy compiler should reuse the register of parent
12080        for one of the local variables, since it will think that
12081        parent can't possibly be used any more in this routine.
12082        Assigning to the local variable will thus munge parent
12083        in the parent process.  */
12084     pid_t
12085       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12086       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12087     /* Convince the compiler that p..p7 are live; otherwise, it might
12088        use the same hardware register for all 8 local variables.  */
12089     if (p != p1 || p != p2 || p != p3 || p != p4
12090         || p != p5 || p != p6 || p != p7)
12091       _exit(1);
12092
12093     /* On some systems (e.g. IRIX 3.3),
12094        vfork doesn't separate parent from child file descriptors.
12095        If the child closes a descriptor before it execs or exits,
12096        this munges the parent's descriptor as well.
12097        Test for this by closing stdout in the child.  */
12098     _exit(close(fileno(stdout)) != 0);
12099   } else {
12100     int status;
12101     struct stat st;
12102
12103     while (wait(&status) != child)
12104       ;
12105     exit(
12106          /* Was there some problem with vforking?  */
12107          child < 0
12108
12109          /* Did the child fail?  (This shouldn't happen.)  */
12110          || status
12111
12112          /* Did the vfork/compiler bug occur?  */
12113          || parent != getpid()
12114
12115          /* Did the file descriptor bug occur?  */
12116          || fstat(fileno(stdout), &st) != 0
12117          );
12118   }
12119 }
12120 EOF
12121 if { (eval echo configure:12122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12122 then
12123   ac_cv_func_vfork_works=yes
12124 else
12125   conftest_rc="$?"
12126   echo "configure: failed program was:" >&5
12127   cat conftest.$ac_ext >&5
12128   rm -fr conftest*
12129   ac_cv_func_vfork_works=no
12130 fi
12131 rm -fr conftest*
12132
12133 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12134 if test $ac_cv_func_vfork_works = no; then
12135   { test "$extra_verbose" = "yes" && cat << \EOF
12136     Defining vfork = fork
12137 EOF
12138 cat >> confdefs.h <<\EOF
12139 #define vfork fork
12140 EOF
12141 }
12142
12143 fi
12144
12145
12146 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12147 echo "configure:12148: checking for working strcoll" >&5
12148
12149 cat > conftest.$ac_ext <<EOF
12150 #line 12151 "configure"
12151 #include "confdefs.h"
12152 #include <string.h>
12153 main ()
12154 {
12155   exit (strcoll ("abc", "def") >= 0 ||
12156         strcoll ("ABC", "DEF") >= 0 ||
12157         strcoll ("123", "456") >= 0);
12158 }
12159 EOF
12160 if { (eval echo configure:12161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12161 then
12162   ac_cv_func_strcoll_works=yes
12163 else
12164   conftest_rc="$?"
12165   echo "configure: failed program was:" >&5
12166   cat conftest.$ac_ext >&5
12167   rm -fr conftest*
12168   ac_cv_func_strcoll_works=no
12169 fi
12170 rm -fr conftest*
12171
12172 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12173 if test $ac_cv_func_strcoll_works = yes; then
12174   { test "$extra_verbose" = "yes" && cat << \EOF
12175     Defining HAVE_STRCOLL
12176 EOF
12177 cat >> confdefs.h <<\EOF
12178 #define HAVE_STRCOLL 1
12179 EOF
12180 }
12181
12182 fi
12183
12184
12185 for ac_func in getpgrp
12186 do
12187 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12188 echo "configure:12189: checking for $ac_func" >&5
12189
12190 cat > conftest.$ac_ext <<EOF
12191 #line 12192 "configure"
12192 #include "confdefs.h"
12193 /* System header to define __stub macros and hopefully few prototypes,
12194     which can conflict with char $ac_func(); below.  */
12195 #include <assert.h>
12196 /* Override any gcc2 internal prototype to avoid an error.  */
12197 /* We use char because int might match the return type of a gcc2
12198     builtin and then its argument prototype would still apply.  */
12199 char $ac_func();
12200
12201 int main() {
12202
12203 /* The GNU C library defines this for functions which it implements
12204     to always fail with ENOSYS.  Some functions are actually named
12205     something starting with __ and the normal name is an alias.  */
12206 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12207 choke me
12208 #else
12209 $ac_func();
12210 #endif
12211
12212 ; return 0; }
12213 EOF
12214 if { (eval echo configure:12215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12215   rm -rf conftest*
12216   eval "ac_cv_func_$ac_func=yes"
12217 else
12218   echo "configure: failed program was:" >&5
12219   cat conftest.$ac_ext >&5
12220   rm -rf conftest*
12221   eval "ac_cv_func_$ac_func=no"
12222 fi
12223 rm -f conftest*
12224
12225 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12226   echo "$ac_t""yes" 1>&6
12227     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12228   { test "$extra_verbose" = "yes" && cat << EOF
12229     Defining $ac_tr_func
12230 EOF
12231 cat >> confdefs.h <<EOF
12232 #define $ac_tr_func 1
12233 EOF
12234 }
12235  
12236 else
12237   echo "$ac_t""no" 1>&6
12238 fi
12239 done
12240
12241 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12242 echo "configure:12243: checking whether getpgrp takes no argument" >&5
12243
12244 cat > conftest.$ac_ext <<EOF
12245 #line 12246 "configure"
12246 #include "confdefs.h"
12247
12248 /*
12249  * If this system has a BSD-style getpgrp(),
12250  * which takes a pid argument, exit unsuccessfully.
12251  *
12252  * Snarfed from Chet Ramey's bash pgrp.c test program
12253  */
12254 #include <stdio.h>
12255 #include <sys/types.h>
12256
12257 int     pid;
12258 int     pg1, pg2, pg3, pg4;
12259 int     ng, np, s, child;
12260
12261 main()
12262 {
12263         pid = getpid();
12264         pg1 = getpgrp(0);
12265         pg2 = getpgrp();
12266         pg3 = getpgrp(pid);
12267         pg4 = getpgrp(1);
12268
12269         /*
12270          * If all of these values are the same, it's pretty sure that
12271          * we're on a system that ignores getpgrp's first argument.
12272          */
12273         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12274                 exit(0);
12275
12276         child = fork();
12277         if (child < 0)
12278                 exit(1);
12279         else if (child == 0) {
12280                 np = getpid();
12281                 /*
12282                  * If this is Sys V, this will not work; pgrp will be
12283                  * set to np because setpgrp just changes a pgrp to be
12284                  * the same as the pid.
12285                  */
12286                 setpgrp(np, pg1);
12287                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12288                 if (ng == pg1) {
12289                         exit(1);
12290                 } else {
12291                         exit(0);
12292                 }
12293         } else {
12294                 wait(&s);
12295                 exit(s>>8);
12296         }
12297 }
12298
12299 EOF
12300 if { (eval echo configure:12301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12301 then
12302   ac_cv_func_getpgrp_void=yes
12303 else
12304   conftest_rc="$?"
12305   echo "configure: failed program was:" >&5
12306   cat conftest.$ac_ext >&5
12307   rm -fr conftest*
12308   ac_cv_func_getpgrp_void=no
12309 fi
12310 rm -fr conftest*
12311
12312
12313 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12314 if test $ac_cv_func_getpgrp_void = yes; then
12315   { test "$extra_verbose" = "yes" && cat << \EOF
12316     Defining GETPGRP_VOID
12317 EOF
12318 cat >> confdefs.h <<\EOF
12319 #define GETPGRP_VOID 1
12320 EOF
12321 }
12322
12323 fi
12324
12325
12326 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12327 echo "configure:12328: checking for working mmap" >&5
12328 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12329 cat > conftest.$ac_ext <<EOF
12330 #line 12331 "configure"
12331 #include "confdefs.h"
12332 #include <stdio.h>
12333 #include <unistd.h>
12334 #include <fcntl.h>
12335 #include <sys/mman.h>
12336
12337 #ifndef MAP_VARIABLE
12338 #define MAP_VARIABLE 0
12339 #endif
12340
12341 #ifndef MAP_FAILED
12342 #define MAP_FAILED -1
12343 #endif
12344
12345 int main (int argc, char *argv[])
12346 {
12347   int fd = -1;
12348   caddr_t p;
12349 #ifndef MAP_ANONYMOUS
12350   fd = open ("/dev/zero", O_RDWR);
12351   if (fd < 0)
12352     return 1;
12353 #define MAP_ANONYMOUS 0
12354 #endif
12355   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12356            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12357            fd, 0) != (void *) MAP_FAILED)
12358     return 0;
12359   perror ("conftest: mmap failed");
12360   return 1;
12361 }
12362 EOF
12363 if { (eval echo configure:12364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12364 then
12365   have_mmap=yes
12366 else
12367   conftest_rc="$?"
12368   echo "configure: failed program was:" >&5
12369   cat conftest.$ac_ext >&5
12370   rm -fr conftest*
12371   have_mmap=no
12372 fi
12373 rm -fr conftest* ;;
12374 esac
12375 echo "$ac_t""$have_mmap" 1>&6
12376 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12377     Defining HAVE_MMAP
12378 EOF
12379 cat >> confdefs.h <<\EOF
12380 #define HAVE_MMAP 1
12381 EOF
12382 }
12383
12384
12385 case "$opsys" in cygwin*) 
12386         test "$rel_alloc" = "default" && rel_alloc=no ;;
12387 esac
12388 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12389 if test "$rel_alloc $have_mmap" = "default yes"; then
12390   if test "$doug_lea_malloc" = "yes"; then
12391         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12392 echo "configure:12393: checking for M_MMAP_THRESHOLD" >&5
12393     cat > conftest.$ac_ext <<EOF
12394 #line 12395 "configure"
12395 #include "confdefs.h"
12396 #include <malloc.h>
12397 int main() {
12398
12399 #ifndef M_MMAP_THRESHOLD
12400 #error No M_MMAP_THRESHOLD :-(
12401 !@+$%^&*_)(_ - unlikely to compile...
12402 #endif
12403
12404 ; return 0; }
12405 EOF
12406 if { (eval echo configure:12407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12407   rm -rf conftest*
12408   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12409 else
12410   echo "configure: failed program was:" >&5
12411   cat conftest.$ac_ext >&5
12412   rm -rf conftest*
12413   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12414 fi
12415 rm -f conftest*
12416   else
12417     rel_alloc=yes
12418   fi
12419 fi
12420 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12421     Defining REL_ALLOC
12422 EOF
12423 cat >> confdefs.h <<\EOF
12424 #define REL_ALLOC 1
12425 EOF
12426 }
12427
12428
12429 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12430 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12431 echo "configure:12432: checking for termios.h" >&5
12432
12433 cat > conftest.$ac_ext <<EOF
12434 #line 12435 "configure"
12435 #include "confdefs.h"
12436 #include <termios.h>
12437 EOF
12438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12439 { (eval echo configure:12440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12441 if test -z "$ac_err"; then
12442   rm -rf conftest*
12443   eval "ac_cv_header_$ac_safe=yes"
12444 else
12445   echo "$ac_err" >&5
12446   echo "configure: failed program was:" >&5
12447   cat conftest.$ac_ext >&5
12448   rm -rf conftest*
12449   eval "ac_cv_header_$ac_safe=no"
12450 fi
12451 rm -f conftest*
12452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12453   echo "$ac_t""yes" 1>&6
12454   { test "$extra_verbose" = "yes" && cat << \EOF
12455     Defining HAVE_TERMIOS
12456 EOF
12457 cat >> confdefs.h <<\EOF
12458 #define HAVE_TERMIOS 1
12459 EOF
12460 }
12461
12462   { test "$extra_verbose" = "yes" && cat << \EOF
12463     Defining SIGNALS_VIA_CHARACTERS
12464 EOF
12465 cat >> confdefs.h <<\EOF
12466 #define SIGNALS_VIA_CHARACTERS 1
12467 EOF
12468 }
12469
12470   { test "$extra_verbose" = "yes" && cat << \EOF
12471     Defining NO_TERMIO
12472 EOF
12473 cat >> confdefs.h <<\EOF
12474 #define NO_TERMIO 1
12475 EOF
12476 }
12477
12478 else
12479   echo "$ac_t""no" 1>&6
12480 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12481 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12482 echo "configure:12483: checking for termio.h" >&5
12483
12484 cat > conftest.$ac_ext <<EOF
12485 #line 12486 "configure"
12486 #include "confdefs.h"
12487 #include <termio.h>
12488 EOF
12489 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12490 { (eval echo configure:12491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12491 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12492 if test -z "$ac_err"; then
12493   rm -rf conftest*
12494   eval "ac_cv_header_$ac_safe=yes"
12495 else
12496   echo "$ac_err" >&5
12497   echo "configure: failed program was:" >&5
12498   cat conftest.$ac_ext >&5
12499   rm -rf conftest*
12500   eval "ac_cv_header_$ac_safe=no"
12501 fi
12502 rm -f conftest*
12503 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12504   echo "$ac_t""yes" 1>&6
12505   { test "$extra_verbose" = "yes" && cat << \EOF
12506     Defining HAVE_TERMIO
12507 EOF
12508 cat >> confdefs.h <<\EOF
12509 #define HAVE_TERMIO 1
12510 EOF
12511 }
12512
12513 else
12514   echo "$ac_t""no" 1>&6
12515 fi
12516
12517 fi
12518
12519
12520
12521 echo $ac_n "checking for socket""... $ac_c" 1>&6
12522 echo "configure:12523: checking for socket" >&5
12523
12524 cat > conftest.$ac_ext <<EOF
12525 #line 12526 "configure"
12526 #include "confdefs.h"
12527 /* System header to define __stub macros and hopefully few prototypes,
12528     which can conflict with char socket(); below.  */
12529 #include <assert.h>
12530 /* Override any gcc2 internal prototype to avoid an error.  */
12531 /* We use char because int might match the return type of a gcc2
12532     builtin and then its argument prototype would still apply.  */
12533 char socket();
12534
12535 int main() {
12536
12537 /* The GNU C library defines this for functions which it implements
12538     to always fail with ENOSYS.  Some functions are actually named
12539     something starting with __ and the normal name is an alias.  */
12540 #if defined (__stub_socket) || defined (__stub___socket)
12541 choke me
12542 #else
12543 socket();
12544 #endif
12545
12546 ; return 0; }
12547 EOF
12548 if { (eval echo configure:12549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12549   rm -rf conftest*
12550   eval "ac_cv_func_socket=yes"
12551 else
12552   echo "configure: failed program was:" >&5
12553   cat conftest.$ac_ext >&5
12554   rm -rf conftest*
12555   eval "ac_cv_func_socket=no"
12556 fi
12557 rm -f conftest*
12558
12559 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12560   echo "$ac_t""yes" 1>&6
12561   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12562 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12563 echo "configure:12564: checking for netinet/in.h" >&5
12564
12565 cat > conftest.$ac_ext <<EOF
12566 #line 12567 "configure"
12567 #include "confdefs.h"
12568 #include <netinet/in.h>
12569 EOF
12570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12571 { (eval echo configure:12572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12573 if test -z "$ac_err"; then
12574   rm -rf conftest*
12575   eval "ac_cv_header_$ac_safe=yes"
12576 else
12577   echo "$ac_err" >&5
12578   echo "configure: failed program was:" >&5
12579   cat conftest.$ac_ext >&5
12580   rm -rf conftest*
12581   eval "ac_cv_header_$ac_safe=no"
12582 fi
12583 rm -f conftest*
12584 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12585   echo "$ac_t""yes" 1>&6
12586   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12587 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12588 echo "configure:12589: checking for arpa/inet.h" >&5
12589
12590 cat > conftest.$ac_ext <<EOF
12591 #line 12592 "configure"
12592 #include "confdefs.h"
12593 #include <arpa/inet.h>
12594 EOF
12595 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12596 { (eval echo configure:12597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12597 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12598 if test -z "$ac_err"; then
12599   rm -rf conftest*
12600   eval "ac_cv_header_$ac_safe=yes"
12601 else
12602   echo "$ac_err" >&5
12603   echo "configure: failed program was:" >&5
12604   cat conftest.$ac_ext >&5
12605   rm -rf conftest*
12606   eval "ac_cv_header_$ac_safe=no"
12607 fi
12608 rm -f conftest*
12609 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12610   echo "$ac_t""yes" 1>&6
12611   
12612   { test "$extra_verbose" = "yes" && cat << \EOF
12613     Defining HAVE_SOCKETS
12614 EOF
12615 cat >> confdefs.h <<\EOF
12616 #define HAVE_SOCKETS 1
12617 EOF
12618 }
12619
12620       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12621 echo "configure:12622: checking "for sun_len member in struct sockaddr_un"" >&5
12622       cat > conftest.$ac_ext <<EOF
12623 #line 12624 "configure"
12624 #include "confdefs.h"
12625
12626 #include <sys/types.h>
12627 #include <sys/socket.h>
12628 #include <sys/un.h>
12629       
12630 int main() {
12631 static struct sockaddr_un x; x.sun_len = 1;
12632 ; return 0; }
12633 EOF
12634 if { (eval echo configure:12635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12635   rm -rf conftest*
12636   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12637     Defining HAVE_SOCKADDR_SUN_LEN
12638 EOF
12639 cat >> confdefs.h <<\EOF
12640 #define HAVE_SOCKADDR_SUN_LEN 1
12641 EOF
12642 }
12643
12644 else
12645   echo "configure: failed program was:" >&5
12646   cat conftest.$ac_ext >&5
12647   rm -rf conftest*
12648   echo "$ac_t""no" 1>&6
12649 fi
12650 rm -f conftest*
12651       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12652 echo "configure:12653: checking "for ip_mreq struct in netinet/in.h"" >&5
12653       cat > conftest.$ac_ext <<EOF
12654 #line 12655 "configure"
12655 #include "confdefs.h"
12656
12657 #include <sys/types.h>
12658 #include <netinet/in.h>
12659       
12660 int main() {
12661 static struct ip_mreq x;
12662 ; return 0; }
12663 EOF
12664 if { (eval echo configure:12665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12665   rm -rf conftest*
12666   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12667     Defining HAVE_MULTICAST
12668 EOF
12669 cat >> confdefs.h <<\EOF
12670 #define HAVE_MULTICAST 1
12671 EOF
12672 }
12673
12674 else
12675   echo "configure: failed program was:" >&5
12676   cat conftest.$ac_ext >&5
12677   rm -rf conftest*
12678   echo "$ac_t""no" 1>&6
12679 fi
12680 rm -f conftest*
12681 else
12682   echo "$ac_t""no" 1>&6
12683 fi
12684
12685 else
12686   echo "$ac_t""no" 1>&6
12687 fi
12688
12689 else
12690   echo "$ac_t""no" 1>&6
12691 fi
12692
12693
12694 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12695 echo "configure:12696: checking for msgget" >&5
12696
12697 cat > conftest.$ac_ext <<EOF
12698 #line 12699 "configure"
12699 #include "confdefs.h"
12700 /* System header to define __stub macros and hopefully few prototypes,
12701     which can conflict with char msgget(); below.  */
12702 #include <assert.h>
12703 /* Override any gcc2 internal prototype to avoid an error.  */
12704 /* We use char because int might match the return type of a gcc2
12705     builtin and then its argument prototype would still apply.  */
12706 char msgget();
12707
12708 int main() {
12709
12710 /* The GNU C library defines this for functions which it implements
12711     to always fail with ENOSYS.  Some functions are actually named
12712     something starting with __ and the normal name is an alias.  */
12713 #if defined (__stub_msgget) || defined (__stub___msgget)
12714 choke me
12715 #else
12716 msgget();
12717 #endif
12718
12719 ; return 0; }
12720 EOF
12721 if { (eval echo configure:12722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12722   rm -rf conftest*
12723   eval "ac_cv_func_msgget=yes"
12724 else
12725   echo "configure: failed program was:" >&5
12726   cat conftest.$ac_ext >&5
12727   rm -rf conftest*
12728   eval "ac_cv_func_msgget=no"
12729 fi
12730 rm -f conftest*
12731
12732 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12733   echo "$ac_t""yes" 1>&6
12734   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12735 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12736 echo "configure:12737: checking for sys/ipc.h" >&5
12737
12738 cat > conftest.$ac_ext <<EOF
12739 #line 12740 "configure"
12740 #include "confdefs.h"
12741 #include <sys/ipc.h>
12742 EOF
12743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12744 { (eval echo configure:12745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12746 if test -z "$ac_err"; then
12747   rm -rf conftest*
12748   eval "ac_cv_header_$ac_safe=yes"
12749 else
12750   echo "$ac_err" >&5
12751   echo "configure: failed program was:" >&5
12752   cat conftest.$ac_ext >&5
12753   rm -rf conftest*
12754   eval "ac_cv_header_$ac_safe=no"
12755 fi
12756 rm -f conftest*
12757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12758   echo "$ac_t""yes" 1>&6
12759   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12760 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12761 echo "configure:12762: checking for sys/msg.h" >&5
12762
12763 cat > conftest.$ac_ext <<EOF
12764 #line 12765 "configure"
12765 #include "confdefs.h"
12766 #include <sys/msg.h>
12767 EOF
12768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12769 { (eval echo configure:12770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12771 if test -z "$ac_err"; then
12772   rm -rf conftest*
12773   eval "ac_cv_header_$ac_safe=yes"
12774 else
12775   echo "$ac_err" >&5
12776   echo "configure: failed program was:" >&5
12777   cat conftest.$ac_ext >&5
12778   rm -rf conftest*
12779   eval "ac_cv_header_$ac_safe=no"
12780 fi
12781 rm -f conftest*
12782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12783   echo "$ac_t""yes" 1>&6
12784   { test "$extra_verbose" = "yes" && cat << \EOF
12785     Defining HAVE_SYSVIPC
12786 EOF
12787 cat >> confdefs.h <<\EOF
12788 #define HAVE_SYSVIPC 1
12789 EOF
12790 }
12791
12792 else
12793   echo "$ac_t""no" 1>&6
12794 fi
12795
12796 else
12797   echo "$ac_t""no" 1>&6
12798 fi
12799
12800 else
12801   echo "$ac_t""no" 1>&6
12802 fi
12803
12804
12805 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12806 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12807 echo "configure:12808: checking for dirent.h" >&5
12808
12809 cat > conftest.$ac_ext <<EOF
12810 #line 12811 "configure"
12811 #include "confdefs.h"
12812 #include <dirent.h>
12813 EOF
12814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12815 { (eval echo configure:12816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12817 if test -z "$ac_err"; then
12818   rm -rf conftest*
12819   eval "ac_cv_header_$ac_safe=yes"
12820 else
12821   echo "$ac_err" >&5
12822   echo "configure: failed program was:" >&5
12823   cat conftest.$ac_ext >&5
12824   rm -rf conftest*
12825   eval "ac_cv_header_$ac_safe=no"
12826 fi
12827 rm -f conftest*
12828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12829   echo "$ac_t""yes" 1>&6
12830   { test "$extra_verbose" = "yes" && cat << \EOF
12831     Defining SYSV_SYSTEM_DIR
12832 EOF
12833 cat >> confdefs.h <<\EOF
12834 #define SYSV_SYSTEM_DIR 1
12835 EOF
12836 }
12837
12838 else
12839   echo "$ac_t""no" 1>&6
12840 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12841 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12842 echo "configure:12843: checking for sys/dir.h" >&5
12843
12844 cat > conftest.$ac_ext <<EOF
12845 #line 12846 "configure"
12846 #include "confdefs.h"
12847 #include <sys/dir.h>
12848 EOF
12849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12850 { (eval echo configure:12851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12852 if test -z "$ac_err"; then
12853   rm -rf conftest*
12854   eval "ac_cv_header_$ac_safe=yes"
12855 else
12856   echo "$ac_err" >&5
12857   echo "configure: failed program was:" >&5
12858   cat conftest.$ac_ext >&5
12859   rm -rf conftest*
12860   eval "ac_cv_header_$ac_safe=no"
12861 fi
12862 rm -f conftest*
12863 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12864   echo "$ac_t""yes" 1>&6
12865   :
12866 else
12867   echo "$ac_t""no" 1>&6
12868 { test "$extra_verbose" = "yes" && cat << \EOF
12869     Defining NONSYSTEM_DIR_LIBRARY
12870 EOF
12871 cat >> confdefs.h <<\EOF
12872 #define NONSYSTEM_DIR_LIBRARY 1
12873 EOF
12874 }
12875
12876 fi
12877
12878 fi
12879
12880
12881 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12882 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12883 echo "configure:12884: checking for nlist.h" >&5
12884
12885 cat > conftest.$ac_ext <<EOF
12886 #line 12887 "configure"
12887 #include "confdefs.h"
12888 #include <nlist.h>
12889 EOF
12890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12891 { (eval echo configure:12892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12893 if test -z "$ac_err"; then
12894   rm -rf conftest*
12895   eval "ac_cv_header_$ac_safe=yes"
12896 else
12897   echo "$ac_err" >&5
12898   echo "configure: failed program was:" >&5
12899   cat conftest.$ac_ext >&5
12900   rm -rf conftest*
12901   eval "ac_cv_header_$ac_safe=no"
12902 fi
12903 rm -f conftest*
12904 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12905   echo "$ac_t""yes" 1>&6
12906   { test "$extra_verbose" = "yes" && cat << \EOF
12907     Defining NLIST_STRUCT
12908 EOF
12909 cat >> confdefs.h <<\EOF
12910 #define NLIST_STRUCT 1
12911 EOF
12912 }
12913
12914 else
12915   echo "$ac_t""no" 1>&6
12916 fi
12917
12918
12919
12920 echo "checking "for sound support"" 1>&6
12921 echo "configure:12922: checking "for sound support"" >&5
12922 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12923
12924 if test "$with_native_sound" != "no"; then
12925     if test -n "$native_sound_lib"; then
12926     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12927 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12928 echo "configure:12929: checking for multimedia/audio_device.h" >&5
12929
12930 cat > conftest.$ac_ext <<EOF
12931 #line 12932 "configure"
12932 #include "confdefs.h"
12933 #include <multimedia/audio_device.h>
12934 EOF
12935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12936 { (eval echo configure:12937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12938 if test -z "$ac_err"; then
12939   rm -rf conftest*
12940   eval "ac_cv_header_$ac_safe=yes"
12941 else
12942   echo "$ac_err" >&5
12943   echo "configure: failed program was:" >&5
12944   cat conftest.$ac_ext >&5
12945   rm -rf conftest*
12946   eval "ac_cv_header_$ac_safe=no"
12947 fi
12948 rm -f conftest*
12949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12950   echo "$ac_t""yes" 1>&6
12951   sound_found=yes sound_cflags=""
12952       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12953    echo "    xemacs will be linked with \"sunplay.o\""
12954  fi
12955 else
12956   echo "$ac_t""no" 1>&6
12957 fi
12958
12959   fi
12960
12961     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12962     sound_found=yes
12963     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12964    echo "    xemacs will be linked with \"sunplay.o\""
12965  fi
12966     if test -d "/usr/demo/SOUND/include"
12967       then sound_cflags="-I/usr/demo/SOUND/include"
12968       else sound_cflags="-I/usr/demo/SOUND"
12969     fi
12970     if test -z "$native_sound_lib" ; then
12971       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12972         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12973         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12974       fi
12975     fi
12976   fi
12977
12978     if test -z "$sound_found"; then
12979     case "$canonical" in
12980     *-sgi-* )
12981       if test -z "$native_sound_lib"; then
12982         
12983 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12984 echo "configure:12985: checking for ALopenport in -laudio" >&5
12985 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12986
12987 xe_check_libs=" -laudio "
12988 cat > conftest.$ac_ext <<EOF
12989 #line 12990 "configure"
12990 #include "confdefs.h"
12991 /* Override any gcc2 internal prototype to avoid an error.  */
12992 /* We use char because int might match the return type of a gcc2
12993     builtin and then its argument prototype would still apply.  */
12994 char ALopenport();
12995
12996 int main() {
12997 ALopenport()
12998 ; return 0; }
12999 EOF
13000 if { (eval echo configure:13001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13001   rm -rf conftest*
13002   eval "ac_cv_lib_$ac_lib_var=yes"
13003 else
13004   echo "configure: failed program was:" >&5
13005   cat conftest.$ac_ext >&5
13006   rm -rf conftest*
13007   eval "ac_cv_lib_$ac_lib_var=no"
13008 fi
13009 rm -f conftest*
13010 xe_check_libs=""
13011
13012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13013   echo "$ac_t""yes" 1>&6
13014   native_sound_lib="-laudio"
13015 else
13016   echo "$ac_t""no" 1>&6
13017 fi
13018
13019
13020       fi
13021       if test -n "$native_sound_lib"; then
13022         sound_found=yes sound_cflags=""
13023         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13024    echo "    xemacs will be linked with \"sgiplay.o\""
13025  fi
13026       fi ;;
13027     hppa*-hp-hpux* )
13028       if test -z "$native_sound_lib"; then
13029         
13030 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13031 echo "configure:13032: checking for AOpenAudio in -lAlib" >&5
13032 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13033
13034 xe_check_libs=" -lAlib "
13035 cat > conftest.$ac_ext <<EOF
13036 #line 13037 "configure"
13037 #include "confdefs.h"
13038 /* Override any gcc2 internal prototype to avoid an error.  */
13039 /* We use char because int might match the return type of a gcc2
13040     builtin and then its argument prototype would still apply.  */
13041 char AOpenAudio();
13042
13043 int main() {
13044 AOpenAudio()
13045 ; return 0; }
13046 EOF
13047 if { (eval echo configure:13048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13048   rm -rf conftest*
13049   eval "ac_cv_lib_$ac_lib_var=yes"
13050 else
13051   echo "configure: failed program was:" >&5
13052   cat conftest.$ac_ext >&5
13053   rm -rf conftest*
13054   eval "ac_cv_lib_$ac_lib_var=no"
13055 fi
13056 rm -f conftest*
13057 xe_check_libs=""
13058
13059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13060   echo "$ac_t""yes" 1>&6
13061   native_sound_lib="-lAlib"
13062 else
13063   echo "$ac_t""no" 1>&6
13064 fi
13065
13066
13067       fi
13068       if test -n "$native_sound_lib"; then
13069         sound_found=yes
13070         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13071    echo "    xemacs will be linked with \"hpplay.o\""
13072  fi
13073         if test "$GCC" = "yes" # Kludge city
13074           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13075           else sound_cflags="+e -I/usr/audio/examples"
13076         fi
13077       fi ;;
13078     esac
13079   fi
13080
13081     if test -z "$sound_found"; then
13082     if test "$with_msw" = "yes"; then
13083     sound_found=yes
13084     native_sound_lib=
13085     fi
13086   fi
13087
13088     if test -z "$sound_found"; then
13089     for dir in "machine" "sys" "linux"; do
13090       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13091 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13092 echo "configure:13093: checking for ${dir}/soundcard.h" >&5
13093
13094 cat > conftest.$ac_ext <<EOF
13095 #line 13096 "configure"
13096 #include "confdefs.h"
13097 #include <${dir}/soundcard.h>
13098 EOF
13099 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13100 { (eval echo configure:13101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13101 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13102 if test -z "$ac_err"; then
13103   rm -rf conftest*
13104   eval "ac_cv_header_$ac_safe=yes"
13105 else
13106   echo "$ac_err" >&5
13107   echo "configure: failed program was:" >&5
13108   cat conftest.$ac_ext >&5
13109   rm -rf conftest*
13110   eval "ac_cv_header_$ac_safe=no"
13111 fi
13112 rm -f conftest*
13113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13114   echo "$ac_t""yes" 1>&6
13115   sound_found=yes
13116        need_miscplay=yes
13117         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13118    echo "    xemacs will be linked with \"linuxplay.o\""
13119  fi
13120         { test "$extra_verbose" = "yes" && cat << EOF
13121     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13122 EOF
13123 cat >> confdefs.h <<EOF
13124 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13125 EOF
13126 }
13127
13128         break
13129 else
13130   echo "$ac_t""no" 1>&6
13131 fi
13132
13133     done
13134   fi
13135
13136   test "$sound_found" = "yes" && with_native_sound=yes
13137 fi
13138
13139 if test "$with_native_sound" = "yes"; then
13140   { test "$extra_verbose" = "yes" && cat << \EOF
13141     Defining HAVE_NATIVE_SOUND
13142 EOF
13143 cat >> confdefs.h <<\EOF
13144 #define HAVE_NATIVE_SOUND 1
13145 EOF
13146 }
13147
13148   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13149 fi
13150
13151 if test "$with_nas_sound" != "no"; then
13152   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13153 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13154 echo "configure:13155: checking for audio/audiolib.h" >&5
13155
13156 cat > conftest.$ac_ext <<EOF
13157 #line 13158 "configure"
13158 #include "confdefs.h"
13159 #include <audio/audiolib.h>
13160 EOF
13161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13162 { (eval echo configure:13163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13164 if test -z "$ac_err"; then
13165   rm -rf conftest*
13166   eval "ac_cv_header_$ac_safe=yes"
13167 else
13168   echo "$ac_err" >&5
13169   echo "configure: failed program was:" >&5
13170   cat conftest.$ac_ext >&5
13171   rm -rf conftest*
13172   eval "ac_cv_header_$ac_safe=no"
13173 fi
13174 rm -f conftest*
13175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13176   echo "$ac_t""yes" 1>&6
13177   
13178     
13179 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13180 echo "configure:13181: checking for AuOpenServer in -laudio" >&5
13181 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13182
13183 xe_check_libs=" -laudio "
13184 cat > conftest.$ac_ext <<EOF
13185 #line 13186 "configure"
13186 #include "confdefs.h"
13187 /* Override any gcc2 internal prototype to avoid an error.  */
13188 /* We use char because int might match the return type of a gcc2
13189     builtin and then its argument prototype would still apply.  */
13190 char AuOpenServer();
13191
13192 int main() {
13193 AuOpenServer()
13194 ; return 0; }
13195 EOF
13196 if { (eval echo configure:13197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13197   rm -rf conftest*
13198   eval "ac_cv_lib_$ac_lib_var=yes"
13199 else
13200   echo "configure: failed program was:" >&5
13201   cat conftest.$ac_ext >&5
13202   rm -rf conftest*
13203   eval "ac_cv_lib_$ac_lib_var=no"
13204 fi
13205 rm -f conftest*
13206 xe_check_libs=""
13207
13208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13209   echo "$ac_t""yes" 1>&6
13210   have_nas_sound=yes
13211 else
13212   echo "$ac_t""no" 1>&6
13213 fi
13214
13215
13216 else
13217   echo "$ac_t""no" 1>&6
13218 fi
13219
13220   if test "$have_nas_sound" = "yes"; then
13221     with_nas_sound=yes
13222     { test "$extra_verbose" = "yes" && cat << \EOF
13223     Defining HAVE_NAS_SOUND
13224 EOF
13225 cat >> confdefs.h <<\EOF
13226 #define HAVE_NAS_SOUND 1
13227 EOF
13228 }
13229
13230     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13231    echo "    xemacs will be linked with \"nas.o\""
13232  fi
13233     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13234             cat > conftest.$ac_ext <<EOF
13235 #line 13236 "configure"
13236 #include "confdefs.h"
13237 #include <audio/Xtutil.h>
13238 EOF
13239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13240   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13241   :
13242 else
13243   rm -rf conftest*
13244   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13245     Defining NAS_NO_ERROR_JUMP
13246 EOF
13247 cat >> confdefs.h <<\EOF
13248 #define NAS_NO_ERROR_JUMP 1
13249 EOF
13250 }
13251
13252 fi
13253 rm -f conftest*
13254
13255   else
13256     test "$with_nas_sound" = "yes" && \
13257       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13258     with_nas_sound=no
13259   fi
13260 fi
13261
13262 if test "$with_esd_sound" != "no"; then
13263   # Extract the first word of "esd-config", so it can be a program name with args.
13264 set dummy esd-config; ac_word=$2
13265 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13266 echo "configure:13267: checking for $ac_word" >&5
13267
13268 if test -n "$have_esd_config"; then
13269   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13270 else
13271   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13272   ac_dummy="$PATH"
13273   for ac_dir in $ac_dummy; do
13274     test -z "$ac_dir" && ac_dir=.
13275     if test -f $ac_dir/$ac_word; then
13276       ac_cv_prog_have_esd_config="yes"
13277       break
13278     fi
13279   done
13280   IFS="$ac_save_ifs"
13281   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13282 fi
13283 have_esd_config="$ac_cv_prog_have_esd_config"
13284 if test -n "$have_esd_config"; then
13285   echo "$ac_t""$have_esd_config" 1>&6
13286 else
13287   echo "$ac_t""no" 1>&6
13288 fi
13289
13290   if test "$have_esd_config" = "yes"; then
13291     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13292     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
13293     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13294     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13295 echo "configure:13296: checking for esd_play_stream" >&5
13296
13297 cat > conftest.$ac_ext <<EOF
13298 #line 13299 "configure"
13299 #include "confdefs.h"
13300 /* System header to define __stub macros and hopefully few prototypes,
13301     which can conflict with char esd_play_stream(); below.  */
13302 #include <assert.h>
13303 /* Override any gcc2 internal prototype to avoid an error.  */
13304 /* We use char because int might match the return type of a gcc2
13305     builtin and then its argument prototype would still apply.  */
13306 char esd_play_stream();
13307
13308 int main() {
13309
13310 /* The GNU C library defines this for functions which it implements
13311     to always fail with ENOSYS.  Some functions are actually named
13312     something starting with __ and the normal name is an alias.  */
13313 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13314 choke me
13315 #else
13316 esd_play_stream();
13317 #endif
13318
13319 ; return 0; }
13320 EOF
13321 if { (eval echo configure:13322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13322   rm -rf conftest*
13323   eval "ac_cv_func_esd_play_stream=yes"
13324 else
13325   echo "configure: failed program was:" >&5
13326   cat conftest.$ac_ext >&5
13327   rm -rf conftest*
13328   eval "ac_cv_func_esd_play_stream=no"
13329 fi
13330 rm -f conftest*
13331
13332 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13333   echo "$ac_t""yes" 1>&6
13334   have_esd_sound=yes
13335 else
13336   echo "$ac_t""no" 1>&6
13337 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13338 fi
13339
13340   fi
13341
13342   if test "$have_esd_sound" = "yes"; then
13343     with_esd_sound=yes
13344     need_miscplay=yes
13345     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13346    echo "    xemacs will be linked with \"esd.o\""
13347  fi
13348     { test "$extra_verbose" = "yes" && cat << \EOF
13349     Defining HAVE_ESD_SOUND
13350 EOF
13351 cat >> confdefs.h <<\EOF
13352 #define HAVE_ESD_SOUND 1
13353 EOF
13354 }
13355
13356   else
13357     test "$with_esd_sound" = "yes" && \
13358       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13359     with_esd_sound=no
13360   fi
13361 fi
13362
13363 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13364    echo "    xemacs will be linked with \"miscplay.o\""
13365  fi
13366
13367
13368 test -z "$with_tty" && with_tty=yes
13369
13370 if test "$with_tty" = "yes"  ; then
13371   echo "checking for TTY-related features" 1>&6
13372 echo "configure:13373: checking for TTY-related features" >&5
13373   { test "$extra_verbose" = "yes" && cat << \EOF
13374     Defining HAVE_TTY
13375 EOF
13376 cat >> confdefs.h <<\EOF
13377 #define HAVE_TTY 1
13378 EOF
13379 }
13380
13381   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
13382    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\""
13383  fi
13384
13385     if test -z "$with_ncurses"; then
13386     
13387 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13388 echo "configure:13389: checking for tgetent in -lncurses" >&5
13389 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13390
13391 xe_check_libs=" -lncurses "
13392 cat > conftest.$ac_ext <<EOF
13393 #line 13394 "configure"
13394 #include "confdefs.h"
13395 /* Override any gcc2 internal prototype to avoid an error.  */
13396 /* We use char because int might match the return type of a gcc2
13397     builtin and then its argument prototype would still apply.  */
13398 char tgetent();
13399
13400 int main() {
13401 tgetent()
13402 ; return 0; }
13403 EOF
13404 if { (eval echo configure:13405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13405   rm -rf conftest*
13406   eval "ac_cv_lib_$ac_lib_var=yes"
13407 else
13408   echo "configure: failed program was:" >&5
13409   cat conftest.$ac_ext >&5
13410   rm -rf conftest*
13411   eval "ac_cv_lib_$ac_lib_var=no"
13412 fi
13413 rm -f conftest*
13414 xe_check_libs=""
13415
13416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13417   echo "$ac_t""yes" 1>&6
13418   with_ncurses=yes
13419 else
13420   echo "$ac_t""no" 1>&6
13421 with_ncurses=no
13422 fi
13423
13424
13425   fi
13426   if test "$with_ncurses" = "yes"; then
13427     { test "$extra_verbose" = "yes" && cat << \EOF
13428     Defining HAVE_NCURSES
13429 EOF
13430 cat >> confdefs.h <<\EOF
13431 #define HAVE_NCURSES 1
13432 EOF
13433 }
13434
13435     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13436 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13437 echo "configure:13438: checking for ncurses/curses.h" >&5
13438
13439 cat > conftest.$ac_ext <<EOF
13440 #line 13441 "configure"
13441 #include "confdefs.h"
13442 #include <ncurses/curses.h>
13443 EOF
13444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13445 { (eval echo configure:13446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13447 if test -z "$ac_err"; then
13448   rm -rf conftest*
13449   eval "ac_cv_header_$ac_safe=yes"
13450 else
13451   echo "$ac_err" >&5
13452   echo "configure: failed program was:" >&5
13453   cat conftest.$ac_ext >&5
13454   rm -rf conftest*
13455   eval "ac_cv_header_$ac_safe=no"
13456 fi
13457 rm -f conftest*
13458 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13459   echo "$ac_t""yes" 1>&6
13460   curses_h_file=ncurses/curses.h
13461 else
13462   echo "$ac_t""no" 1>&6
13463 fi
13464
13465     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13466 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13467 echo "configure:13468: checking for ncurses/term.h" >&5
13468
13469 cat > conftest.$ac_ext <<EOF
13470 #line 13471 "configure"
13471 #include "confdefs.h"
13472 #include <ncurses/term.h>
13473 EOF
13474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13475 { (eval echo configure:13476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13477 if test -z "$ac_err"; then
13478   rm -rf conftest*
13479   eval "ac_cv_header_$ac_safe=yes"
13480 else
13481   echo "$ac_err" >&5
13482   echo "configure: failed program was:" >&5
13483   cat conftest.$ac_ext >&5
13484   rm -rf conftest*
13485   eval "ac_cv_header_$ac_safe=no"
13486 fi
13487 rm -f conftest*
13488 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13489   echo "$ac_t""yes" 1>&6
13490   term_h_file=ncurses/term.h
13491 else
13492   echo "$ac_t""no" 1>&6
13493 fi
13494
13495     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13496    echo "    xemacs will be linked with \"terminfo.o\""
13497  fi
13498     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13499
13500     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13501                         save_c_switch_site="$c_switch_site"
13502       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13503       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13504 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13505 echo "configure:13506: checking for ncurses/curses.h" >&5
13506
13507 cat > conftest.$ac_ext <<EOF
13508 #line 13509 "configure"
13509 #include "confdefs.h"
13510 #include <ncurses/curses.h>
13511 EOF
13512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13513 { (eval echo configure:13514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13515 if test -z "$ac_err"; then
13516   rm -rf conftest*
13517   eval "ac_cv_header_$ac_safe=yes"
13518 else
13519   echo "$ac_err" >&5
13520   echo "configure: failed program was:" >&5
13521   cat conftest.$ac_ext >&5
13522   rm -rf conftest*
13523   eval "ac_cv_header_$ac_safe=no"
13524 fi
13525 rm -f conftest*
13526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13527   echo "$ac_t""yes" 1>&6
13528   curses_h_file=ncurses/curses.h
13529 else
13530   echo "$ac_t""no" 1>&6
13531 fi
13532
13533       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13534         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13535         else c_switch_site="$save_c_switch_site"
13536       fi
13537     fi
13538   else         if test "$have_terminfo" = "yes"; then
13539       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13540    echo "    xemacs will be linked with \"terminfo.o\""
13541  fi
13542       if test -n "$libs_termcap"; then
13543         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13544       else
13545         for lib in curses termlib termcap; do
13546           
13547 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13548 echo "configure:13549: checking for tgetent in -l$lib" >&5
13549 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13550
13551 xe_check_libs=" -l$lib "
13552 cat > conftest.$ac_ext <<EOF
13553 #line 13554 "configure"
13554 #include "confdefs.h"
13555 /* Override any gcc2 internal prototype to avoid an error.  */
13556 /* We use char because int might match the return type of a gcc2
13557     builtin and then its argument prototype would still apply.  */
13558 char tgetent();
13559
13560 int main() {
13561 tgetent()
13562 ; return 0; }
13563 EOF
13564 if { (eval echo configure:13565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13565   rm -rf conftest*
13566   eval "ac_cv_lib_$ac_lib_var=yes"
13567 else
13568   echo "configure: failed program was:" >&5
13569   cat conftest.$ac_ext >&5
13570   rm -rf conftest*
13571   eval "ac_cv_lib_$ac_lib_var=no"
13572 fi
13573 rm -f conftest*
13574 xe_check_libs=""
13575
13576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13577   echo "$ac_t""yes" 1>&6
13578   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13579 else
13580   echo "$ac_t""no" 1>&6
13581 fi
13582
13583
13584         done
13585       fi
13586     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13587    echo "    xemacs will be linked with \"tparam.o\""
13588  fi
13589                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13590       if test -n "$libs_termcap"; then
13591         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13592       else
13593         
13594 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13595 echo "configure:13596: checking for tgetent in -lcurses" >&5
13596 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13597
13598 xe_check_libs=" -lcurses "
13599 cat > conftest.$ac_ext <<EOF
13600 #line 13601 "configure"
13601 #include "confdefs.h"
13602 /* Override any gcc2 internal prototype to avoid an error.  */
13603 /* We use char because int might match the return type of a gcc2
13604     builtin and then its argument prototype would still apply.  */
13605 char tgetent();
13606
13607 int main() {
13608 tgetent()
13609 ; return 0; }
13610 EOF
13611 if { (eval echo configure:13612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13612   rm -rf conftest*
13613   eval "ac_cv_lib_$ac_lib_var=yes"
13614 else
13615   echo "configure: failed program was:" >&5
13616   cat conftest.$ac_ext >&5
13617   rm -rf conftest*
13618   eval "ac_cv_lib_$ac_lib_var=no"
13619 fi
13620 rm -f conftest*
13621 xe_check_libs=""
13622
13623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13624   echo "$ac_t""yes" 1>&6
13625   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13626 else
13627   echo "$ac_t""no" 1>&6
13628 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13629 echo "configure:13630: checking for tgetent in -ltermcap" >&5
13630 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13631
13632 xe_check_libs=" -ltermcap "
13633 cat > conftest.$ac_ext <<EOF
13634 #line 13635 "configure"
13635 #include "confdefs.h"
13636 /* Override any gcc2 internal prototype to avoid an error.  */
13637 /* We use char because int might match the return type of a gcc2
13638     builtin and then its argument prototype would still apply.  */
13639 char tgetent();
13640
13641 int main() {
13642 tgetent()
13643 ; return 0; }
13644 EOF
13645 if { (eval echo configure:13646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13646   rm -rf conftest*
13647   eval "ac_cv_lib_$ac_lib_var=yes"
13648 else
13649   echo "configure: failed program was:" >&5
13650   cat conftest.$ac_ext >&5
13651   rm -rf conftest*
13652   eval "ac_cv_lib_$ac_lib_var=no"
13653 fi
13654 rm -f conftest*
13655 xe_check_libs=""
13656
13657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13658   echo "$ac_t""yes" 1>&6
13659   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13660 else
13661   echo "$ac_t""no" 1>&6
13662 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13663    echo "    xemacs will be linked with \"termcap.o\""
13664  fi
13665 fi
13666
13667
13668 fi
13669
13670
13671       fi
13672     fi
13673   fi
13674   { test "$extra_verbose" = "yes" && cat << EOF
13675     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13676 EOF
13677 cat >> confdefs.h <<EOF
13678 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13679 EOF
13680 }
13681
13682   { test "$extra_verbose" = "yes" && cat << EOF
13683     Defining TERM_H_FILE = "${term_h_file-term.h}"
13684 EOF
13685 cat >> confdefs.h <<EOF
13686 #define TERM_H_FILE "${term_h_file-term.h}"
13687 EOF
13688 }
13689
13690
13691     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13692 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13693 echo "configure:13694: checking for gpm.h" >&5
13694
13695 cat > conftest.$ac_ext <<EOF
13696 #line 13697 "configure"
13697 #include "confdefs.h"
13698 #include <gpm.h>
13699 EOF
13700 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13701 { (eval echo configure:13702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13702 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13703 if test -z "$ac_err"; then
13704   rm -rf conftest*
13705   eval "ac_cv_header_$ac_safe=yes"
13706 else
13707   echo "$ac_err" >&5
13708   echo "configure: failed program was:" >&5
13709   cat conftest.$ac_ext >&5
13710   rm -rf conftest*
13711   eval "ac_cv_header_$ac_safe=no"
13712 fi
13713 rm -f conftest*
13714 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13715   echo "$ac_t""yes" 1>&6
13716   :
13717 else
13718   echo "$ac_t""no" 1>&6
13719 with_gpm=no
13720 fi
13721  }
13722   test -z "$with_gpm" && { 
13723 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13724 echo "configure:13725: checking for Gpm_Open in -lgpm" >&5
13725 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13726
13727 xe_check_libs=" -lgpm "
13728 cat > conftest.$ac_ext <<EOF
13729 #line 13730 "configure"
13730 #include "confdefs.h"
13731 /* Override any gcc2 internal prototype to avoid an error.  */
13732 /* We use char because int might match the return type of a gcc2
13733     builtin and then its argument prototype would still apply.  */
13734 char Gpm_Open();
13735
13736 int main() {
13737 Gpm_Open()
13738 ; return 0; }
13739 EOF
13740 if { (eval echo configure:13741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13741   rm -rf conftest*
13742   eval "ac_cv_lib_$ac_lib_var=yes"
13743 else
13744   echo "configure: failed program was:" >&5
13745   cat conftest.$ac_ext >&5
13746   rm -rf conftest*
13747   eval "ac_cv_lib_$ac_lib_var=no"
13748 fi
13749 rm -f conftest*
13750 xe_check_libs=""
13751
13752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13753   echo "$ac_t""yes" 1>&6
13754   with_gpm=yes
13755 else
13756   echo "$ac_t""no" 1>&6
13757 with_gpm=no
13758 fi
13759
13760  }
13761   if test "$with_gpm" = "yes"; then
13762     { test "$extra_verbose" = "yes" && cat << \EOF
13763     Defining HAVE_GPM
13764 EOF
13765 cat >> confdefs.h <<\EOF
13766 #define HAVE_GPM 1
13767 EOF
13768 }
13769
13770     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13771    echo "    xemacs will be linked with \"gpmevent.o\""
13772  fi
13773     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13774   fi
13775
13776 else   for feature in ncurses gpm; do
13777     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13778       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13779     fi
13780     eval "with_${feature}=no"
13781   done
13782 fi 
13783 test "$with_x11" = "yes" -o "$with_tty" = "yes" -o "$need_event_unixoid" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13784    echo "    xemacs will be linked with \"event-unixoid.o\""
13785  fi
13786
13787
13788 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13789   != "no no no" && echo "checking for database support" 1>&6
13790 echo "configure:13791: checking for database support" >&5
13791
13792 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13793   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13794 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13795 echo "configure:13796: checking for ndbm.h" >&5
13796
13797 cat > conftest.$ac_ext <<EOF
13798 #line 13799 "configure"
13799 #include "confdefs.h"
13800 #include <ndbm.h>
13801 EOF
13802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13803 { (eval echo configure:13804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13805 if test -z "$ac_err"; then
13806   rm -rf conftest*
13807   eval "ac_cv_header_$ac_safe=yes"
13808 else
13809   echo "$ac_err" >&5
13810   echo "configure: failed program was:" >&5
13811   cat conftest.$ac_ext >&5
13812   rm -rf conftest*
13813   eval "ac_cv_header_$ac_safe=no"
13814 fi
13815 rm -f conftest*
13816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13817   echo "$ac_t""yes" 1>&6
13818   :
13819 else
13820   echo "$ac_t""no" 1>&6
13821
13822     test "$with_database_gdbm" = "yes" -o \
13823          "$with_database_dbm"  = "yes" && \
13824       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13825     with_database_gdbm=no with_database_dbm=no
13826 fi
13827
13828 fi
13829
13830 if test "$with_database_gdbm" != "no"; then
13831   
13832 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13833 echo "configure:13834: checking for dbm_open in -lgdbm" >&5
13834 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13835
13836 xe_check_libs=" -lgdbm "
13837 cat > conftest.$ac_ext <<EOF
13838 #line 13839 "configure"
13839 #include "confdefs.h"
13840 /* Override any gcc2 internal prototype to avoid an error.  */
13841 /* We use char because int might match the return type of a gcc2
13842     builtin and then its argument prototype would still apply.  */
13843 char dbm_open();
13844
13845 int main() {
13846 dbm_open()
13847 ; return 0; }
13848 EOF
13849 if { (eval echo configure:13850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13850   rm -rf conftest*
13851   eval "ac_cv_lib_$ac_lib_var=yes"
13852 else
13853   echo "configure: failed program was:" >&5
13854   cat conftest.$ac_ext >&5
13855   rm -rf conftest*
13856   eval "ac_cv_lib_$ac_lib_var=no"
13857 fi
13858 rm -f conftest*
13859 xe_check_libs=""
13860
13861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13862   echo "$ac_t""yes" 1>&6
13863   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13864 else
13865   echo "$ac_t""no" 1>&6
13866 if test "$with_database_gdbm" = "yes"; then
13867      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13868    fi
13869    with_database_gdbm=no
13870 fi
13871
13872
13873 fi
13874
13875 if test "$with_database_dbm" != "no"; then
13876   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13877 echo "configure:13878: checking for dbm_open" >&5
13878
13879 cat > conftest.$ac_ext <<EOF
13880 #line 13881 "configure"
13881 #include "confdefs.h"
13882 /* System header to define __stub macros and hopefully few prototypes,
13883     which can conflict with char dbm_open(); below.  */
13884 #include <assert.h>
13885 /* Override any gcc2 internal prototype to avoid an error.  */
13886 /* We use char because int might match the return type of a gcc2
13887     builtin and then its argument prototype would still apply.  */
13888 char dbm_open();
13889
13890 int main() {
13891
13892 /* The GNU C library defines this for functions which it implements
13893     to always fail with ENOSYS.  Some functions are actually named
13894     something starting with __ and the normal name is an alias.  */
13895 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13896 choke me
13897 #else
13898 dbm_open();
13899 #endif
13900
13901 ; return 0; }
13902 EOF
13903 if { (eval echo configure:13904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13904   rm -rf conftest*
13905   eval "ac_cv_func_dbm_open=yes"
13906 else
13907   echo "configure: failed program was:" >&5
13908   cat conftest.$ac_ext >&5
13909   rm -rf conftest*
13910   eval "ac_cv_func_dbm_open=no"
13911 fi
13912 rm -f conftest*
13913
13914 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13915   echo "$ac_t""yes" 1>&6
13916   with_database_dbm=yes libdbm=
13917 else
13918   echo "$ac_t""no" 1>&6
13919
13920     
13921 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13922 echo "configure:13923: checking for dbm_open in -ldbm" >&5
13923 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13924
13925 xe_check_libs=" -ldbm "
13926 cat > conftest.$ac_ext <<EOF
13927 #line 13928 "configure"
13928 #include "confdefs.h"
13929 /* Override any gcc2 internal prototype to avoid an error.  */
13930 /* We use char because int might match the return type of a gcc2
13931     builtin and then its argument prototype would still apply.  */
13932 char dbm_open();
13933
13934 int main() {
13935 dbm_open()
13936 ; return 0; }
13937 EOF
13938 if { (eval echo configure:13939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13939   rm -rf conftest*
13940   eval "ac_cv_lib_$ac_lib_var=yes"
13941 else
13942   echo "configure: failed program was:" >&5
13943   cat conftest.$ac_ext >&5
13944   rm -rf conftest*
13945   eval "ac_cv_lib_$ac_lib_var=no"
13946 fi
13947 rm -f conftest*
13948 xe_check_libs=""
13949
13950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13951   echo "$ac_t""yes" 1>&6
13952   with_database_dbm=yes libdbm=-ldbm
13953 else
13954   echo "$ac_t""no" 1>&6
13955 test "$with_database_dbm" = "yes" && \
13956         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13957       with_database_dbm=no
13958 fi
13959
13960
13961 fi
13962
13963 fi
13964
13965 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13966 test "$with_database_gdbm" = "yes" -o \
13967      "$with_database_dbm"  = "yes" && \
13968   { test "$extra_verbose" = "yes" && cat << \EOF
13969     Defining HAVE_DBM
13970 EOF
13971 cat >> confdefs.h <<\EOF
13972 #define HAVE_DBM 1
13973 EOF
13974 }
13975
13976
13977 if test "$with_database_berkdb" != "no"; then
13978   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13979 echo "configure:13980: checking for Berkeley db.h" >&5
13980   for header in "db/db.h" "db.h"; do
13981     cat > conftest.$ac_ext <<EOF
13982 #line 13983 "configure"
13983 #include "confdefs.h"
13984
13985 #include <stdlib.h>
13986 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13987 #ifdef HAVE_INTTYPES_H
13988 #define __BIT_TYPES_DEFINED__
13989 #include <inttypes.h>
13990 typedef uint8_t  u_int8_t;
13991 typedef uint16_t u_int16_t;
13992 typedef uint32_t u_int32_t;
13993 #ifdef WE_DONT_NEED_QUADS
13994 typedef uint64_t u_int64_t;
13995 #endif
13996 #endif
13997 #endif
13998 #include <$header>
13999
14000 int main() {
14001
14002 ; return 0; }
14003 EOF
14004 if { (eval echo configure:14005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14005   rm -rf conftest*
14006   db_h_file="$header"; break
14007 else
14008   echo "configure: failed program was:" >&5
14009   cat conftest.$ac_ext >&5
14010 fi
14011 rm -f conftest*
14012   done
14013   if test -z "$db_h_file"
14014   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14015   else echo "$ac_t""$db_h_file" 1>&6
14016   fi
14017
14018   if test "$with_database_berkdb" != "no"; then
14019     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14020 echo "configure:14021: checking for Berkeley DB version" >&5
14021     cat > conftest.$ac_ext <<EOF
14022 #line 14023 "configure"
14023 #include "confdefs.h"
14024 #include <$db_h_file>
14025 #if DB_VERSION_MAJOR > 1
14026 yes
14027 #endif
14028
14029 EOF
14030 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14031   egrep "yes" >/dev/null 2>&1; then
14032   rm -rf conftest*
14033   cat > conftest.$ac_ext <<EOF
14034 #line 14035 "configure"
14035 #include "confdefs.h"
14036 #include <$db_h_file>
14037 #if DB_VERSION_MAJOR > 2
14038 yes
14039 #endif
14040
14041 EOF
14042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14043   egrep "yes" >/dev/null 2>&1; then
14044   rm -rf conftest*
14045   echo "$ac_t""3" 1>&6; dbfunc=db_create
14046 else
14047   rm -rf conftest*
14048   
14049     echo "$ac_t""2" 1>&6; dbfunc=db_open
14050 fi
14051 rm -f conftest*
14052
14053 else
14054   rm -rf conftest*
14055   
14056     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14057 fi
14058 rm -f conftest*
14059
14060     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14061 echo "configure:14062: checking for $dbfunc" >&5
14062
14063 cat > conftest.$ac_ext <<EOF
14064 #line 14065 "configure"
14065 #include "confdefs.h"
14066 /* System header to define __stub macros and hopefully few prototypes,
14067     which can conflict with char $dbfunc(); below.  */
14068 #include <assert.h>
14069 /* Override any gcc2 internal prototype to avoid an error.  */
14070 /* We use char because int might match the return type of a gcc2
14071     builtin and then its argument prototype would still apply.  */
14072 char $dbfunc();
14073
14074 int main() {
14075
14076 /* The GNU C library defines this for functions which it implements
14077     to always fail with ENOSYS.  Some functions are actually named
14078     something starting with __ and the normal name is an alias.  */
14079 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14080 choke me
14081 #else
14082 $dbfunc();
14083 #endif
14084
14085 ; return 0; }
14086 EOF
14087 if { (eval echo configure:14088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14088   rm -rf conftest*
14089   eval "ac_cv_func_$dbfunc=yes"
14090 else
14091   echo "configure: failed program was:" >&5
14092   cat conftest.$ac_ext >&5
14093   rm -rf conftest*
14094   eval "ac_cv_func_$dbfunc=no"
14095 fi
14096 rm -f conftest*
14097
14098 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14099   echo "$ac_t""yes" 1>&6
14100   with_database_berkdb=yes need_libdb=no
14101 else
14102   echo "$ac_t""no" 1>&6
14103
14104     
14105 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14106 echo "configure:14107: checking for $dbfunc in -ldb" >&5
14107 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14108
14109 xe_check_libs=" -ldb "
14110 cat > conftest.$ac_ext <<EOF
14111 #line 14112 "configure"
14112 #include "confdefs.h"
14113 /* Override any gcc2 internal prototype to avoid an error.  */
14114 /* We use char because int might match the return type of a gcc2
14115     builtin and then its argument prototype would still apply.  */
14116 char $dbfunc();
14117
14118 int main() {
14119 $dbfunc()
14120 ; return 0; }
14121 EOF
14122 if { (eval echo configure:14123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14123   rm -rf conftest*
14124   eval "ac_cv_lib_$ac_lib_var=yes"
14125 else
14126   echo "configure: failed program was:" >&5
14127   cat conftest.$ac_ext >&5
14128   rm -rf conftest*
14129   eval "ac_cv_lib_$ac_lib_var=no"
14130 fi
14131 rm -f conftest*
14132 xe_check_libs=""
14133
14134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14135   echo "$ac_t""yes" 1>&6
14136   with_database_berkdb=yes need_libdb=yes
14137 else
14138   echo "$ac_t""no" 1>&6
14139 fi
14140
14141
14142 fi
14143
14144   fi
14145
14146   if test "$with_database_berkdb" = "yes"; then
14147     { test "$extra_verbose" = "yes" && cat << EOF
14148     Defining DB_H_FILE = "$db_h_file"
14149 EOF
14150 cat >> confdefs.h <<EOF
14151 #define DB_H_FILE "$db_h_file"
14152 EOF
14153 }
14154
14155     { test "$extra_verbose" = "yes" && cat << \EOF
14156     Defining HAVE_BERKELEY_DB
14157 EOF
14158 cat >> confdefs.h <<\EOF
14159 #define HAVE_BERKELEY_DB 1
14160 EOF
14161 }
14162
14163     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14164   else with_database_berkdb=no
14165   fi
14166 fi
14167
14168 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14169      != "no no no"; then
14170   { test "$extra_verbose" = "yes" && cat << \EOF
14171     Defining HAVE_DATABASE
14172 EOF
14173 cat >> confdefs.h <<\EOF
14174 #define HAVE_DATABASE 1
14175 EOF
14176 }
14177
14178   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14179    echo "    xemacs will be linked with \"database.o\""
14180  fi
14181   if test "$with_utf_2000" = "yes"; then
14182     { test "$extra_verbose" = "yes" && cat << \EOF
14183     Defining HAVE_CHISE_CLIENT
14184 EOF
14185 cat >> confdefs.h <<\EOF
14186 #define HAVE_CHISE_CLIENT 1
14187 EOF
14188 }
14189
14190   fi
14191 fi
14192
14193 if test "$with_socks" = "yes"; then
14194   
14195 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14196 echo "configure:14197: checking for SOCKSinit in -lsocks" >&5
14197 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14198
14199 xe_check_libs=" -lsocks "
14200 cat > conftest.$ac_ext <<EOF
14201 #line 14202 "configure"
14202 #include "confdefs.h"
14203 /* Override any gcc2 internal prototype to avoid an error.  */
14204 /* We use char because int might match the return type of a gcc2
14205     builtin and then its argument prototype would still apply.  */
14206 char SOCKSinit();
14207
14208 int main() {
14209 SOCKSinit()
14210 ; return 0; }
14211 EOF
14212 if { (eval echo configure:14213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14213   rm -rf conftest*
14214   eval "ac_cv_lib_$ac_lib_var=yes"
14215 else
14216   echo "configure: failed program was:" >&5
14217   cat conftest.$ac_ext >&5
14218   rm -rf conftest*
14219   eval "ac_cv_lib_$ac_lib_var=no"
14220 fi
14221 rm -f conftest*
14222 xe_check_libs=""
14223
14224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14225   echo "$ac_t""yes" 1>&6
14226     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14227     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14228   { test "$extra_verbose" = "yes" && cat << EOF
14229     Defining $ac_tr_lib
14230 EOF
14231 cat >> confdefs.h <<EOF
14232 #define $ac_tr_lib 1
14233 EOF
14234 }
14235
14236   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14237
14238 else
14239   echo "$ac_t""no" 1>&6
14240 fi
14241
14242
14243   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14244     Defining HAVE_SOCKS
14245 EOF
14246 cat >> confdefs.h <<\EOF
14247 #define HAVE_SOCKS 1
14248 EOF
14249 }
14250
14251 fi
14252
14253 if test "$usage_tracking" = "yes"; then
14254   { test "$extra_verbose" = "yes" && cat << \EOF
14255     Defining USAGE_TRACKING
14256 EOF
14257 cat >> confdefs.h <<\EOF
14258 #define USAGE_TRACKING 1
14259 EOF
14260 }
14261
14262   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14263 fi
14264
14265 if test "$with_modules" != "no"; then
14266   echo "checking for module support" 1>&6
14267 echo "configure:14268: checking for module support" >&5
14268
14269     if test "$with_msw" = "yes"; then
14270     have_dl=yes;
14271   else
14272         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14273 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14274 echo "configure:14275: checking for dlfcn.h" >&5
14275
14276 cat > conftest.$ac_ext <<EOF
14277 #line 14278 "configure"
14278 #include "confdefs.h"
14279 #include <dlfcn.h>
14280 EOF
14281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14282 { (eval echo configure:14283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14284 if test -z "$ac_err"; then
14285   rm -rf conftest*
14286   eval "ac_cv_header_$ac_safe=yes"
14287 else
14288   echo "$ac_err" >&5
14289   echo "configure: failed program was:" >&5
14290   cat conftest.$ac_ext >&5
14291   rm -rf conftest*
14292   eval "ac_cv_header_$ac_safe=no"
14293 fi
14294 rm -f conftest*
14295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14296   echo "$ac_t""yes" 1>&6
14297   
14298       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14299 echo "configure:14300: checking for dlopen in -lc" >&5
14300       cat > conftest.$ac_ext <<EOF
14301 #line 14302 "configure"
14302 #include "confdefs.h"
14303 #include <dlfcn.h>
14304 int main() {
14305         dlopen ("", 0);
14306 ; return 0; }
14307 EOF
14308 if { (eval echo configure:14309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14309   rm -rf conftest*
14310    have_dl=yes 
14311 else
14312   echo "configure: failed program was:" >&5
14313   cat conftest.$ac_ext >&5
14314   rm -rf conftest*
14315   
14316       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14317 echo "configure:14318: checking for dlopen in -ldl" >&5
14318       ac_save_LIBS="$LIBS"
14319       LIBS="-ldl $LIBS"
14320       cat > conftest.$ac_ext <<EOF
14321 #line 14322 "configure"
14322 #include "confdefs.h"
14323 #include <dlfcn.h>
14324 int main() {
14325         dlopen ("", 0);
14326 ; return 0; }
14327 EOF
14328 if { (eval echo configure:14329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14329   rm -rf conftest*
14330    have_dl=yes 
14331 else
14332   echo "configure: failed program was:" >&5
14333   cat conftest.$ac_ext >&5
14334   rm -rf conftest*
14335   LIBS="$ac_save_LIBS"
14336 fi
14337 rm -f conftest*
14338       ac_save_LIBS=
14339 fi
14340 rm -f conftest*
14341 else
14342   echo "$ac_t""no" 1>&6
14343 fi
14344
14345     if test -n "$have_dl"; then
14346       { test "$extra_verbose" = "yes" && cat << \EOF
14347     Defining HAVE_DLOPEN
14348 EOF
14349 cat >> confdefs.h <<\EOF
14350 #define HAVE_DLOPEN 1
14351 EOF
14352 }
14353
14354     else
14355       
14356 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14357 echo "configure:14358: checking for shl_load in -ldld" >&5
14358 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14359
14360 xe_check_libs=" -ldld "
14361 cat > conftest.$ac_ext <<EOF
14362 #line 14363 "configure"
14363 #include "confdefs.h"
14364 /* Override any gcc2 internal prototype to avoid an error.  */
14365 /* We use char because int might match the return type of a gcc2
14366     builtin and then its argument prototype would still apply.  */
14367 char shl_load();
14368
14369 int main() {
14370 shl_load()
14371 ; return 0; }
14372 EOF
14373 if { (eval echo configure:14374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14374   rm -rf conftest*
14375   eval "ac_cv_lib_$ac_lib_var=yes"
14376 else
14377   echo "configure: failed program was:" >&5
14378   cat conftest.$ac_ext >&5
14379   rm -rf conftest*
14380   eval "ac_cv_lib_$ac_lib_var=no"
14381 fi
14382 rm -f conftest*
14383 xe_check_libs=""
14384
14385 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14386   echo "$ac_t""yes" 1>&6
14387   libdl=dld have_dl=yes;
14388         { test "$extra_verbose" = "yes" && cat << \EOF
14389     Defining HAVE_SHL_LOAD
14390 EOF
14391 cat >> confdefs.h <<\EOF
14392 #define HAVE_SHL_LOAD 1
14393 EOF
14394 }
14395
14396 else
14397   echo "$ac_t""no" 1>&6
14398
14399 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14400 echo "configure:14401: checking for dld_init in -ldld" >&5
14401 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14402
14403 xe_check_libs=" -ldld "
14404 cat > conftest.$ac_ext <<EOF
14405 #line 14406 "configure"
14406 #include "confdefs.h"
14407 /* Override any gcc2 internal prototype to avoid an error.  */
14408 /* We use char because int might match the return type of a gcc2
14409     builtin and then its argument prototype would still apply.  */
14410 char dld_init();
14411
14412 int main() {
14413 dld_init()
14414 ; return 0; }
14415 EOF
14416 if { (eval echo configure:14417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14417   rm -rf conftest*
14418   eval "ac_cv_lib_$ac_lib_var=yes"
14419 else
14420   echo "configure: failed program was:" >&5
14421   cat conftest.$ac_ext >&5
14422   rm -rf conftest*
14423   eval "ac_cv_lib_$ac_lib_var=no"
14424 fi
14425 rm -f conftest*
14426 xe_check_libs=""
14427
14428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14429   echo "$ac_t""yes" 1>&6
14430   libdl=dld have_dl=yes;
14431         { test "$extra_verbose" = "yes" && cat << \EOF
14432     Defining HAVE_DLD_INIT
14433 EOF
14434 cat >> confdefs.h <<\EOF
14435 #define HAVE_DLD_INIT 1
14436 EOF
14437 }
14438
14439 else
14440   echo "$ac_t""no" 1>&6
14441 fi
14442
14443
14444 fi
14445
14446
14447     fi
14448   fi 
14449   if test -n "$have_dl"; then
14450         
14451 dll_ld=
14452 dll_ldflags=
14453 dll_cflags=
14454 dll_post=
14455 dll_ldo="-o"
14456 ld_dynamic_link_flags=
14457 xehost=$canonical
14458 xealias=$internal_configuration
14459
14460 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14461 echo "configure:14462: checking how to build dynamic libraries for ${xehost}" >&5
14462 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14463 case "$xehost" in
14464 *-*-linux-gnu*) ;;
14465 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14466 esac
14467
14468 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14469 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14470 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14471
14472 case "$xehost_os" in
14473 aix3*)
14474   # AIX sometimes has problems with the GCC collect2 program.  For some
14475   # reason, if we set the COLLECT_NAMES environment variable, the problems
14476   # vanish in a puff of smoke.
14477   if test "${COLLECT_NAMES+set}" != set; then
14478     COLLECT_NAMES=
14479     export COLLECT_NAMES
14480   fi
14481   ;;
14482 esac
14483
14484 # Now see if the compiler is really GCC.
14485 if test "$GCC" = "yes"; then
14486   XEGCC=yes
14487 else
14488   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14489 echo "configure:14490: checking checking whether we are using GNU C" >&5
14490   cat > conftest.$ac_ext <<EOF
14491 #line 14492 "configure"
14492 #include "confdefs.h"
14493
14494 #ifdef __GNUC__
14495   yes;
14496 #endif
14497
14498 EOF
14499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14500   egrep "yes" >/dev/null 2>&1; then
14501   rm -rf conftest*
14502   XEGCC=yes
14503 else
14504   rm -rf conftest*
14505   XEGCC=no
14506 fi
14507 rm -f conftest*
14508
14509   echo "$ac_t""${XEGCC}" 1>&6
14510 fi
14511
14512 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14513 echo "configure:14514: checking how to produce PIC code" >&5
14514 wl=
14515
14516 can_build_shared=yes
14517 if test "$XEGCC" = yes; then
14518   wl='-Wl,'
14519
14520   case "$xehost_os" in
14521   aix[3-9]* | irix[5-9]* | osf[3-9])
14522     # PIC is the default for these OSes.
14523     ;;
14524
14525   os2*)
14526     # We can build DLLs from non-PIC.
14527     ;;
14528   amigaos*)
14529     # FIXME: we need at least 68020 code to build shared libraries, but
14530     # adding the `-m68020' flag to GCC prevents building anything better,
14531     # like `-m68040'.
14532     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14533     ;;
14534   *cygwin* | *mingw* )
14535     # PIC is the default
14536     ;;
14537   *)
14538     dll_cflags='-fPIC'
14539     ;;
14540   esac
14541 else
14542   # PORTME Check for PIC flags for the system compiler.
14543   case "$xehost_os" in
14544   hpux9* | hpux1[0-9]*)
14545     # Is there a better link_static_flag that works with the bundled CC?
14546     wl='-Wl,'
14547     dll_cflags='+Z'
14548     ;;
14549
14550   irix[5-9]*)
14551     wl='-Wl,'
14552     # PIC (with -KPIC) is the default.
14553     ;;
14554
14555   os2*)
14556     # We can build DLLs from non-PIC.
14557     ;;
14558
14559   osf[3-9]*)
14560     # All OSF/1 code is PIC.
14561     wl='-Wl,'
14562     ;;
14563
14564   aix[3-9]*)
14565     # All AIX code is PIC.
14566     wl='-Wl,'
14567     ;;
14568
14569   sco3.2v5*)
14570     dll_cflags='-belf -Kpic'
14571     wl='-Wl,'
14572     ;;
14573
14574   unixware*)
14575     dll_cflags="-KPIC"
14576     wl="-Wl,"
14577     ;;
14578
14579   sysv4*)
14580     dll_cflags="-KPIC"
14581     wl="-Wl,"
14582     ;;
14583
14584   sysv5*)
14585     dll_cflags="-KPIC"
14586     wl="-Wl,"
14587     ;;
14588
14589   solaris2*)
14590     dll_cflags='-KPIC'
14591     wl='-Wl,'
14592     ;;
14593
14594   sunos4*)
14595     dll_cflags='-PIC'
14596     wl='-Qoption ld '
14597     ;;
14598
14599   uts4*)
14600     dll_cflags='-pic'
14601     ;;
14602
14603   *)
14604     can_build_shared=no
14605     ;;
14606   esac
14607 fi
14608
14609 if test -n "$dll_cflags"; then
14610   echo "$ac_t""${dll_cflags}" 1>&6
14611
14612   # Check to make sure the dll_cflags actually works.
14613   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14614 echo "configure:14615: checking if PIC flag ${dll_cflags} really works" >&5
14615   save_CFLAGS="$CFLAGS"
14616   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14617   cat > conftest.$ac_ext <<EOF
14618 #line 14619 "configure"
14619 #include "confdefs.h"
14620
14621 int main() {
14622 int x=0;
14623 ; return 0; }
14624 EOF
14625 if { (eval echo configure:14626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14626   rm -rf conftest*
14627   
14628     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14629     # reports no error.  So, we need to grep stderr for (Bundled).
14630     if grep '(Bundled)' config.log >/dev/null; then
14631       echo "$ac_t""no" 1>&6
14632       can_build_shared=no
14633       dll_cflags=
14634     else
14635       echo "$ac_t""yes" 1>&6
14636     fi
14637 else
14638   echo "configure: failed program was:" >&5
14639   cat conftest.$ac_ext >&5
14640   rm -rf conftest*
14641   echo "$ac_t""no" 1>&6
14642     can_build_shared=no
14643     dll_cflags=
14644 fi
14645 rm -f conftest*
14646   CFLAGS="$save_CFLAGS"
14647 else
14648   echo "$ac_t""none" 1>&6
14649 fi
14650
14651 if test "$can_build_shared" = "yes"; then
14652 cc_produces_so=no
14653 xldf=
14654 xcldf=
14655 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14656 echo "configure:14657: checking if C compiler can produce shared libraries" >&5
14657 if test "$XEGCC" = yes; then
14658   xcldf="-shared"
14659   xldf="-shared"
14660 else # Not using GCC
14661   case "$xehost_os" in
14662     aix[3-9]*)
14663       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14664       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14665       ;;
14666
14667     freebsd2* | netbsd* | openbsd*)
14668       xldf="-Bshareable"
14669       xcldf="${wl}-Bshareable"
14670       ;;
14671
14672     freebsd3*)
14673       xcldf="-shared"
14674       ;;
14675
14676     hpux*)
14677       xldf="-b +s"
14678       xcldf="${wl}-b ${wl}+s"
14679       ;;
14680
14681     irix[5-9]* | osf[3-9]*)
14682       xcldf="${wl}-shared"
14683       xldf="-shared"
14684       ;;
14685
14686     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14687       xcldf="-G"
14688       xldf="-G"
14689       ;;
14690
14691     sunos4*)
14692       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14693       xldf="-assert pure-text -Bstatic"
14694       ;;
14695   esac
14696 fi # End if if we are using gcc
14697
14698 if test -n "$xcldf"; then
14699   save_LDFLAGS=$LDFLAGS
14700   save_LIBS=$LIBS
14701   save_xe_libs=$xe_libs
14702   LDFLAGS="$xcldf $LDFLAGS"
14703   LIBS=
14704   xe_libs=
14705   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14706   cat > conftest.$ac_ext <<EOF
14707 #line 14708 "configure"
14708 #include "confdefs.h"
14709
14710 int main() {
14711 int x=0;
14712 ; return 0; }
14713 EOF
14714 if { (eval echo configure:14715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14715   rm -rf conftest*
14716   cc_produces_so=yes
14717 else
14718   echo "configure: failed program was:" >&5
14719   cat conftest.$ac_ext >&5
14720   rm -rf conftest*
14721   cc_produces_so=no
14722 fi
14723 rm -f conftest*
14724   LDFLAGS=$save_LDFLAGS
14725   LIBS=$save_LIBS
14726   xe_libs=$save_xe_libs
14727   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14728 else
14729   cc_produces_so=no
14730 fi
14731 echo "$ac_t""${cc_produces_so}" 1>&6
14732
14733 LTLD=$LD
14734 if test -z "$LTLD"; then
14735   ac_prog=ld
14736   if test "$XEGCC" = yes; then
14737     # Check if gcc -print-prog-name=ld gives a path.
14738     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14739 echo "configure:14740: checking for ld used by GCC" >&5
14740     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14741     case "$ac_prog" in
14742     # Accept absolute paths.
14743     /*)
14744       if test -z "$LTLD"; then
14745 #        case "$ac_prog" in
14746 #          *gcc-lib*) LTLD="$CC"
14747 #                     ;;
14748 #          *)
14749          LTLD="$ac_prog"
14750 #                     ;;
14751 #        esac
14752       fi
14753       ;;
14754     "")
14755       # If it fails, then pretend we aren't using GCC.
14756       ac_prog=ld
14757       ;;
14758     *)
14759       # If it is relative, then search for the first ld in PATH.
14760       with_gnu_ld=unknown
14761       ;;
14762     esac
14763   else
14764     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14765 echo "configure:14766: checking for GNU ld" >&5
14766   fi
14767
14768   if test -z "$LTLD"; then
14769     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14770     for ac_dir in $PATH; do
14771       test -z "$ac_dir" && ac_dir=.
14772       if test -f "$ac_dir/$ac_prog"; then
14773         LTLD="$ac_dir/$ac_prog"
14774         # Check to see if the program is GNU ld.  I'd rather use --version,
14775         # but apparently some GNU ld's only accept -v.
14776         # Break only if it was the GNU/non-GNU ld that we prefer.
14777         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14778           xe_gnu_ld=yes
14779         else
14780           xe_gnu_ld=no
14781         fi
14782       fi
14783     done
14784     IFS="$ac_save_ifs"
14785   fi
14786
14787   if test -n "$LTLD"; then
14788     echo "$ac_t""${LTLD}" 1>&6
14789   else
14790     echo "$ac_t""no" 1>&6
14791   fi
14792
14793   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14794     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14795     exit 1
14796   fi
14797 fi
14798
14799 ld_dynamic_link_flags=
14800
14801 # Check to see if it really is or isn't GNU ld.
14802 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14803 echo "configure:14804: checking if the linker is GNU ld" >&5
14804 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14805 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14806   xe_gnu_ld=yes
14807 else
14808   xe_gnu_ld=no
14809 fi
14810 echo "$ac_t""${xe_gnu_ld}" 1>&6
14811
14812 case "$xehost_os" in
14813   amigaos* | sunos4*)
14814     # On these operating systems, we should treat GNU ld like the system ld.
14815     gnu_ld_acts_native=yes
14816     ;;
14817   *)
14818     gnu_ld_acts_native=no
14819     ;;
14820 esac
14821
14822 if test "$cc_produces_so" = "yes"; then
14823   dll_ld=$CC
14824   dll_ldflags=$xcldf
14825   can_build_shared=yes
14826   ld_shlibs=yes
14827 else
14828   # OK - only NOW do we futz about with ld.
14829   # See if the linker supports building shared libraries.
14830   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14831 echo "configure:14832: checking whether the linker supports shared libraries" >&5
14832   dll_ld=$CC
14833   dll_ldflags=$LDFLAGS
14834   ld_shlibs=yes
14835   can_build_shared=yes
14836   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14837     # See if GNU ld supports shared libraries.
14838     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14839       dll_ld=$CC
14840       dll_ldflags="-shared"
14841       ld_shlibs=yes
14842     else
14843       ld_shlibs=no
14844     fi
14845   else
14846     # PORTME fill in a description of your system's linker (not GNU ld)
14847     case "$xehost_os" in
14848     aix3*)
14849       dll_ld=$LTLD
14850       dll_ldflags=$xldf
14851       ;;
14852
14853     aix[4-9]*)
14854       dll_ldflags=$xcldf
14855       ;;
14856
14857     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14858     # support.  Future versions do this automatically, but an explicit c++rt0.o
14859     # doesn't break anything, and helps significantly (at the cost of a little
14860     # extra space).
14861     freebsd2.2*)
14862       dll_ld=$LTLD
14863       dll_ldflags=$xldf
14864       dll_post="/usr/lib/c++rt0.o"
14865       ;;
14866
14867     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14868     freebsd2*)
14869       dll_ld=$LTLD
14870       dll_ldflags="-Bshareable"
14871       ;;
14872
14873     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14874     freebsd3*)
14875       dll_ldflags="-shared"
14876       ;;
14877
14878     hpux*)
14879       dll_ld=$LTLD
14880       dll_ldflags=$xldf
14881       ;;
14882
14883     irix[5-9]*)
14884       dll_ld=$LTLD
14885       dll_ldflags=$xldf
14886       ;;
14887
14888     netbsd*)
14889       # Tested with NetBSD 1.2 ld
14890       dll_ld=$LTLD
14891       dll_ldflags=$xldf
14892       ;;
14893
14894     openbsd*)
14895       dll_ld=$LTLD
14896       dll_ldflags=$xldf
14897       ;;
14898
14899     osf3* | osf4*)
14900       dll_ld=$LTLD
14901       dll_ldflags=$xldf
14902       ;;
14903
14904     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14905     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14906       dll_ld=$LTLD
14907       case "$dll_ld" in
14908         *gcc*) dll_ldflags="-shared"
14909                dll_ld=$CC
14910                ;;
14911         *)     dll_ldflags="-G"
14912                ;;
14913       esac
14914       ;;
14915
14916     sunos4*)
14917       if test "$XEGCC" = yes; then
14918         dll_ld=$CC
14919       else
14920         dll_ld=$LTLD
14921       fi
14922       dll_ldflags=$xldf
14923       ;;
14924
14925     uts4*)
14926       dll_ld=$LTLD
14927       dll_ldflags="-G"
14928       ;;
14929
14930     bsdi*)
14931       dll_ldflags="-r"
14932       dll_ld="shlicc2"
14933       ;;
14934
14935     *)
14936       ld_shlibs=no
14937       can_build_shared=no
14938       ;;
14939     esac
14940   fi
14941   echo "$ac_t""${ld_shlibs}" 1>&6
14942   if test "$ld_shlibs" = "no"; then
14943     can_build_shared=no
14944   fi
14945 fi # End of if cc_produces_so = no
14946
14947
14948 if test "$xe_gnu_ld" = yes; then
14949   if test "$ld_shlibs" = yes; then
14950     ld_dynamic_link_flags="${wl}-export-dynamic"
14951   fi
14952 fi
14953
14954 if test -z "$ld_dynamic_link_flags"; then
14955   case "$xehost_os" in
14956   aix[3-9]*)
14957     ld_dynamic_link_flags=
14958     ;;
14959
14960   freebsd2.2*)
14961     ld_dynamic_link_flags=
14962     ;;
14963
14964   freebsd2*)
14965     ld_dynamic_link_flags=
14966     ;;
14967
14968   freebsd3*)
14969     ld_dynamic_link_flags=
14970     ;;
14971
14972   hpux*)
14973     ld_dynamic_link_flags="${wl}-E"
14974     ;;
14975
14976   irix[5-9]*)
14977     ld_dynamic_link_flags=
14978     ;;
14979
14980   netbsd*)
14981     ld_dynamic_link_flags=
14982     ;;
14983
14984   openbsd*)
14985     ld_dynamic_link_flags=
14986     ;;
14987
14988   osf3* | osf4*)
14989     ld_dynamic_link_flags=
14990     ;;
14991
14992   solaris2* | solaris7*)
14993     ld_dynamic_link_flags=
14994     ;;
14995
14996   sco3.2v5* | unixware* | sysv5* | sysv4*)
14997     ld_dynamic_link_flags="${wl}-Bexport"
14998     ;;
14999
15000   sunos4*)
15001     ld_dynamic_link_flags=
15002     ;;
15003
15004   uts4*)
15005     ld_dynamic_link_flags=
15006     ;;
15007
15008   bsdi*)
15009     ld_dynamic_link_flags=
15010     ;;
15011
15012   esac
15013 fi # End of if -z ld_dynamic_link_flags
15014 fi # End of if test "$can_build_shared" = "yes"
15015
15016
15017
15018
15019
15020
15021
15022
15023   fi
15024
15025   if test "$can_build_shared" = "yes"; then
15026     { test "$extra_verbose" = "yes" && cat << \EOF
15027     Defining HAVE_SHLIB
15028 EOF
15029 cat >> confdefs.h <<\EOF
15030 #define HAVE_SHLIB 1
15031 EOF
15032 }
15033
15034     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15035    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15036  fi
15037     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15038     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15039     for ac_func in dlerror _dlerror
15040 do
15041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15042 echo "configure:15043: checking for $ac_func" >&5
15043
15044 cat > conftest.$ac_ext <<EOF
15045 #line 15046 "configure"
15046 #include "confdefs.h"
15047 /* System header to define __stub macros and hopefully few prototypes,
15048     which can conflict with char $ac_func(); below.  */
15049 #include <assert.h>
15050 /* Override any gcc2 internal prototype to avoid an error.  */
15051 /* We use char because int might match the return type of a gcc2
15052     builtin and then its argument prototype would still apply.  */
15053 char $ac_func();
15054
15055 int main() {
15056
15057 /* The GNU C library defines this for functions which it implements
15058     to always fail with ENOSYS.  Some functions are actually named
15059     something starting with __ and the normal name is an alias.  */
15060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15061 choke me
15062 #else
15063 $ac_func();
15064 #endif
15065
15066 ; return 0; }
15067 EOF
15068 if { (eval echo configure:15069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15069   rm -rf conftest*
15070   eval "ac_cv_func_$ac_func=yes"
15071 else
15072   echo "configure: failed program was:" >&5
15073   cat conftest.$ac_ext >&5
15074   rm -rf conftest*
15075   eval "ac_cv_func_$ac_func=no"
15076 fi
15077 rm -f conftest*
15078
15079 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15080   echo "$ac_t""yes" 1>&6
15081     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15082   { test "$extra_verbose" = "yes" && cat << EOF
15083     Defining $ac_tr_func
15084 EOF
15085 cat >> confdefs.h <<EOF
15086 #define $ac_tr_func 1
15087 EOF
15088 }
15089  
15090 else
15091   echo "$ac_t""no" 1>&6
15092 fi
15093 done
15094
15095     with_modules=yes
15096   else
15097     if test "$with_modules" = "yes"; then
15098       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15099     else
15100       echo "configure: warning: "Module support cannot be provided."" 1>&2
15101     fi
15102     with_modules=no
15103   fi
15104 fi
15105
15106 cat > conftest.$ac_ext <<EOF
15107 #line 15108 "configure"
15108 #include "confdefs.h"
15109 int main(int c,char *v[]){return 0;}
15110 EOF
15111 if { (eval echo configure:15112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15112 then
15113   :
15114 else
15115   conftest_rc="$?"
15116   echo "configure: failed program was:" >&5
15117   cat conftest.$ac_ext >&5
15118   rm -fr conftest*
15119   
15120   echo ""
15121   echo "*** PANIC *** The C compiler can no longer build working executables."
15122   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15123   echo "*** PANIC *** The most likely reason for this problem is that configure"
15124   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15125   echo "*** PANIC *** found at run time."
15126   echo "*** PANIC ***"
15127   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15128   echo "*** PANIC *** On other systems, try telling configure where to find the"
15129   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15130   echo "*** PANIC ***"
15131   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15132   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15133   echo "*** PANIC *** on your system.  Don't do that."
15134   exit 1
15135 fi
15136 rm -fr conftest*
15137
15138 if test "$win32_processes" = "yes"; then
15139   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15140    echo "    xemacs will be linked with \"process-nt.o\""
15141  fi
15142 else
15143   { test "$extra_verbose" = "yes" && cat << \EOF
15144     Defining HAVE_UNIX_PROCESSES
15145 EOF
15146 cat >> confdefs.h <<\EOF
15147 #define HAVE_UNIX_PROCESSES 1
15148 EOF
15149 }
15150
15151   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15152    echo "    xemacs will be linked with \"process-unix.o\""
15153  fi
15154 fi
15155
15156
15157
15158 T=""
15159 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15160 CFLAGS="$T"
15161
15162
15163 T=""
15164 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15165 extra_objs="$T"
15166
15167
15168 T=""
15169 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
15170 c_switch_general="$T"
15171
15172
15173 T=""
15174 for W in $c_switch_x_site $c_switch_gtk $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15175 c_switch_window_system="$T"
15176
15177
15178 T=""
15179 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15180 c_switch_all="$T"
15181
15182
15183 T=""
15184 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
15185 ld_switch_general="$T"
15186
15187
15188 T=""
15189 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15190 ld_switch_window_system="$T"
15191
15192
15193 T=""
15194 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15195 ld_switch_all="$T"
15196
15197
15198 T=""
15199 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15200 ld_libs_general="$T"
15201
15202
15203 T=""
15204 for W in $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15205 ld_libs_window_system="$T"
15206
15207
15208 T=""
15209 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15210 ld_libs_all="$T"
15211
15212
15213
15214 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15215 internal_makefile_list="Makefile.in"
15216 SUBDIR_MAKEFILES=''
15217 test -d lock || mkdir lock
15218 for dir in $MAKE_SUBDIR; do
15219   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15220         test -d "$d" || mkdir "$d"; cd "$d"
15221       done ) ;;
15222    * ) test -d "$dir" || mkdir "$dir" ;;
15223   esac
15224   
15225 T=""
15226 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15227 SUBDIR_MAKEFILES="$T"
15228
15229   
15230 T=""
15231 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15232 internal_makefile_list="$T"
15233
15234 done
15235
15236
15237
15238
15239 for dir in src/s src/m; do
15240   if test ! -d "$dir" ; then
15241     echo Making symbolic link to "$srcdir/$dir"
15242     ${LN_S} "$srcdir/$dir" "$dir"
15243   fi
15244 done
15245
15246 if test "$extra_verbose" = "yes"; then
15247   echo ""
15248   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
15249   echo ""
15250 fi
15251
15252
15253 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15254   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15255   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15256 fi
15257
15258 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15259   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15260   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15261 fi
15262
15263 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15264   test "$extra_verbose" = "yes" && echo "creating TAGS"
15265   echo "\f
15266 $srcdir/TAGS,include" > "TAGS"
15267 fi
15268
15269 if test "$__SUNPRO_C" = "yes"; then
15270   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15271   ( echo "# For use with Sun WorkShop's Source browser."
15272     echo "# See sbquery(1) and sbinit(4) for more information"
15273     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15274   ) > .sbinit
15275 fi
15276
15277 rm -f core
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298 PREFIX=$prefix
15299 while true; do
15300   case "$PREFIX" in
15301     *\$* ) eval "PREFIX=$PREFIX" ;;
15302     *) break ;;
15303   esac
15304 done
15305
15306
15307
15308
15309 EXEC_PREFIX=$exec_prefix
15310 while true; do
15311   case "$EXEC_PREFIX" in
15312     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15313     *) break ;;
15314   esac
15315 done
15316
15317
15318
15319
15320 INFODIR=$infodir
15321 while true; do
15322   case "$INFODIR" in
15323     *\$* ) eval "INFODIR=$INFODIR" ;;
15324     *) break ;;
15325   esac
15326 done
15327
15328
15329
15330
15331 INFOPATH=$infopath
15332 while true; do
15333   case "$INFOPATH" in
15334     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15335     *) break ;;
15336   esac
15337 done
15338
15339
15340
15341
15342 PACKAGE_PATH=$package_path
15343 while true; do
15344   case "$PACKAGE_PATH" in
15345     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15346     *) break ;;
15347   esac
15348 done
15349
15350
15351
15352
15353 LISPDIR=$lispdir
15354 while true; do
15355   case "$LISPDIR" in
15356     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15357     *) break ;;
15358   esac
15359 done
15360
15361
15362
15363
15364 MODULEDIR=$moduledir
15365 while true; do
15366   case "$MODULEDIR" in
15367     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15368     *) break ;;
15369   esac
15370 done
15371
15372
15373
15374
15375 SITELISPDIR=$sitelispdir
15376 while true; do
15377   case "$SITELISPDIR" in
15378     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15379     *) break ;;
15380   esac
15381 done
15382
15383
15384
15385
15386 SITEMODULEDIR=$sitemoduledir
15387 while true; do
15388   case "$SITEMODULEDIR" in
15389     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15390     *) break ;;
15391   esac
15392 done
15393
15394
15395
15396
15397 ETCDIR=$etcdir
15398 while true; do
15399   case "$ETCDIR" in
15400     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15401     *) break ;;
15402   esac
15403 done
15404
15405
15406
15407
15408 DOCDIR=$docdir
15409 while true; do
15410   case "$DOCDIR" in
15411     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15412     *) break ;;
15413   esac
15414 done
15415
15416
15417
15418
15419 ARCHLIBDIR=$archlibdir
15420 while true; do
15421   case "$ARCHLIBDIR" in
15422     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15423     *) break ;;
15424   esac
15425 done
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15447
15448
15449
15450
15451
15452
15453
15454 : ${XEMACS_CC:=$CC}
15455
15456
15457 if test "$with_prefix" = "yes"; then
15458   { test "$extra_verbose" = "yes" && cat << \EOF
15459     Defining PREFIX_USER_DEFINED
15460 EOF
15461 cat >> confdefs.h <<\EOF
15462 #define PREFIX_USER_DEFINED 1
15463 EOF
15464 }
15465
15466 fi
15467
15468 if test "$with_site_lisp" = "no"; then
15469   { test "$extra_verbose" = "yes" && cat << \EOF
15470     Defining INHIBIT_SITE_LISP
15471 EOF
15472 cat >> confdefs.h <<\EOF
15473 #define INHIBIT_SITE_LISP 1
15474 EOF
15475 }
15476
15477 fi
15478 if test "$with_site_modules" = "no"; then
15479   { test "$extra_verbose" = "yes" && cat << \EOF
15480     Defining INHIBIT_SITE_MODULES
15481 EOF
15482 cat >> confdefs.h <<\EOF
15483 #define INHIBIT_SITE_MODULES 1
15484 EOF
15485 }
15486
15487 fi
15488
15489
15490 T=""
15491 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15492 ac_configure_args="$T"
15493
15494 { test "$extra_verbose" = "yes" && cat << EOF
15495     Defining EMACS_CONFIGURATION = "$configuration"
15496 EOF
15497 cat >> confdefs.h <<EOF
15498 #define EMACS_CONFIGURATION "$configuration"
15499 EOF
15500 }
15501
15502 { test "$extra_verbose" = "yes" && cat << EOF
15503     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15504 EOF
15505 cat >> confdefs.h <<EOF
15506 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15507 EOF
15508 }
15509
15510
15511
15512 null_string=""
15513 { test "$extra_verbose" = "yes" && cat << EOF
15514     Defining LD_SWITCH_X_SITE = $null_string
15515 EOF
15516 cat >> confdefs.h <<EOF
15517 #define LD_SWITCH_X_SITE $null_string
15518 EOF
15519 }
15520
15521 { test "$extra_verbose" = "yes" && cat << EOF
15522     Defining LD_SWITCH_X_SITE_AUX = $null_string
15523 EOF
15524 cat >> confdefs.h <<EOF
15525 #define LD_SWITCH_X_SITE_AUX $null_string
15526 EOF
15527 }
15528
15529 { test "$extra_verbose" = "yes" && cat << EOF
15530     Defining C_SWITCH_X_SITE = $null_string
15531 EOF
15532 cat >> confdefs.h <<EOF
15533 #define C_SWITCH_X_SITE $null_string
15534 EOF
15535 }
15536
15537 { test "$extra_verbose" = "yes" && cat << EOF
15538     Defining LD_SWITCH_SITE = $null_string
15539 EOF
15540 cat >> confdefs.h <<EOF
15541 #define LD_SWITCH_SITE $null_string
15542 EOF
15543 }
15544
15545 { test "$extra_verbose" = "yes" && cat << EOF
15546     Defining C_SWITCH_SITE = $null_string
15547 EOF
15548 cat >> confdefs.h <<EOF
15549 #define C_SWITCH_SITE $null_string
15550 EOF
15551 }
15552
15553
15554
15555 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15556     Defining GNU_MALLOC
15557 EOF
15558 cat >> confdefs.h <<\EOF
15559 #define GNU_MALLOC 1
15560 EOF
15561 }
15562
15563 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15564     Defining USE_SYSTEM_MALLOC
15565 EOF
15566 cat >> confdefs.h <<\EOF
15567 #define USE_SYSTEM_MALLOC 1
15568 EOF
15569 }
15570
15571 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15572     Defining USE_DEBUG_MALLOC
15573 EOF
15574 cat >> confdefs.h <<\EOF
15575 #define USE_DEBUG_MALLOC 1
15576 EOF
15577 }
15578
15579                                               { test "$extra_verbose" = "yes" && cat << \EOF
15580     Defining USE_SYSTEM_MALLOC
15581 EOF
15582 cat >> confdefs.h <<\EOF
15583 #define USE_SYSTEM_MALLOC 1
15584 EOF
15585 }
15586
15587 fi
15588 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15589     Defining I18N3
15590 EOF
15591 cat >> confdefs.h <<\EOF
15592 #define I18N3 1
15593 EOF
15594 }
15595
15596 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15597     Defining USE_GCC
15598 EOF
15599 cat >> confdefs.h <<\EOF
15600 #define USE_GCC 1
15601 EOF
15602 }
15603
15604 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15605     Defining EXTERNAL_WIDGET
15606 EOF
15607 cat >> confdefs.h <<\EOF
15608 #define EXTERNAL_WIDGET 1
15609 EOF
15610 }
15611
15612 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15613     Defining QUICK_BUILD
15614 EOF
15615 cat >> confdefs.h <<\EOF
15616 #define QUICK_BUILD 1
15617 EOF
15618 }
15619
15620 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15621     Defining PURIFY
15622 EOF
15623 cat >> confdefs.h <<\EOF
15624 #define PURIFY 1
15625 EOF
15626 }
15627
15628 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15629     Defining QUANTIFY
15630 EOF
15631 cat >> confdefs.h <<\EOF
15632 #define QUANTIFY 1
15633 EOF
15634 }
15635
15636 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15637     Defining MAIL_USE_POP
15638 EOF
15639 cat >> confdefs.h <<\EOF
15640 #define MAIL_USE_POP 1
15641 EOF
15642 }
15643
15644 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15645     Defining KERBEROS
15646 EOF
15647 cat >> confdefs.h <<\EOF
15648 #define KERBEROS 1
15649 EOF
15650 }
15651
15652 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15653     Defining HESIOD
15654 EOF
15655 cat >> confdefs.h <<\EOF
15656 #define HESIOD 1
15657 EOF
15658 }
15659
15660 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15661     Defining USE_UNION_TYPE
15662 EOF
15663 cat >> confdefs.h <<\EOF
15664 #define USE_UNION_TYPE 1
15665 EOF
15666 }
15667
15668 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15669     Defining PDUMP
15670 EOF
15671 cat >> confdefs.h <<\EOF
15672 #define PDUMP 1
15673 EOF
15674 }
15675
15676 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15677     Defining IPV6_CANONICALIZE
15678 EOF
15679 cat >> confdefs.h <<\EOF
15680 #define IPV6_CANONICALIZE 1
15681 EOF
15682 }
15683
15684
15685
15686 (
15687 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15688 else
15689   echo "uname -a: `uname -a`"
15690 fi
15691 echo ""
15692 echo "$0 $quoted_arguments"
15693 ) > Installation
15694
15695 if test ! -z ${emacs_beta_version} ; then
15696   if test -z "${emacs_is_beta}" ; then
15697         xemacs_betaname=".${emacs_beta_version}"
15698   else
15699         xemacs_betaname="-b${emacs_beta_version}"
15700   fi
15701 else
15702   xemacs_betaname=""
15703 fi
15704
15705 (
15706 echo "
15707
15708 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15709 "
15710 echo "
15711 Compilation / Installation:"
15712 echo "  Source code location:              $srcdir"
15713 echo "  Installation prefix:               $prefix"
15714 if test -n "$site_includes"; then
15715   echo "  Additional header files:           $site_includes"
15716 fi
15717 if test -n "$site_libraries"; then
15718   echo "  Additional libraries:              $site_libraries"
15719 fi
15720 if test -n "$site_prefixes"; then
15721   echo "  Additional prefixes:               $site_prefixes"
15722 fi
15723 if test -n "$runpath"; then
15724   echo "  Runtime library search path:       $runpath"
15725 fi
15726
15727 if test -n "$opsysfile"
15728 then echo "  Operating system description file: \`$opsysfile'"
15729 else echo "  Not using any operating system description file"
15730 fi
15731 if test -n "$machfile"
15732 then echo "  Machine description file:          \`$machfile'"
15733 else echo "  Not using any machine description file"
15734 fi
15735
15736 echo "  Compiler:                          $CC $CFLAGS"
15737 echo "  Relocating allocator for buffers:  $rel_alloc"
15738 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15739 case "$ld_switch_site" in
15740   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
15741     - Consider configuring with --pdump." ;;
15742 esac
15743
15744 echo "
15745 Window System:"
15746 if test "$with_msw" = "yes"; then
15747   echo "  Compiling in support for the Microsoft window system."
15748 fi
15749 if test "$with_x11" = "yes"; then
15750   echo "  Compiling in support for the X window system:"
15751   echo "    - X Windows headers location:                 $x_includes"
15752   echo "    - X Windows libraries location:               $x_libraries"
15753   if test "$with_xauth" != yes; then
15754     echo "    - Xau (X authority) not available."
15755   fi
15756   if test "$with_xmu" != yes; then
15757     echo "    - Xmu library not available; substituting equivalent routines."
15758   fi
15759   if test "$with_wmcommand" != no; then
15760     echo "    - Handling WM_COMMAND properly."
15761   fi
15762 fi
15763 if test "$need_athena" = "yes"; then
15764   echo "  Compiling in support for the Athena widget set:"
15765   echo "    - Athena headers location:                    $athena_h_path"
15766   echo "    - Athena library to link:                     $athena_lib"
15767 fi
15768 case "$with_menubars" in
15769   gtk   ) echo "  Using GTK menubars."   ;;
15770   lucid ) echo "  Using Lucid menubars." ;;
15771   motif ) echo "  Using Motif menubars."
15772           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15773           echo "             We recommend using the Lucid menubar instead."
15774           echo "             Re-run configure with --with-menubars='lucid'." ;;
15775     msw ) echo "  Using MS-Windows menubars." ;;
15776 esac
15777 case "$with_scrollbars" in
15778   gtk    ) echo "  Using GTK scrollbars."        ;;
15779   lucid  ) echo "  Using Lucid scrollbars."      ;;
15780   motif  ) echo "  Using Motif scrollbars."      ;;
15781   athena ) echo "  Using Athena scrollbars."     ;;
15782      msw ) echo "  Using MS-Windows scrollbars." ;;
15783 esac
15784 case "$with_dialogs" in
15785   gtk    ) echo "  Using GTK dialog boxes." ;;
15786   motif  ) echo "  Using Motif dialog boxes."
15787            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15788              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15789              echo "             We recommend using the Athena dialog boxes instead."
15790              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15791              echo "             Read the PROBLEMS file for more information."
15792            fi; fi ;;
15793   athena ) echo "  Using Athena dialog boxes."     ;;
15794      msw ) echo "  Using MS-Windows dialog boxes." ;;
15795 esac
15796 case "$with_widgets" in
15797   gtk    ) echo "  Using GTK native widgets."        ;;
15798   motif  ) echo "  Using Motif native widgets."      ;;
15799   athena ) echo "  Using Athena native widgets."     ;;
15800      msw ) echo "  Using MS-Windows native widgets." ;;
15801 esac
15802 if test "$with_dragndrop" = yes; then
15803   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15804   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15805 fi
15806
15807 echo "
15808 TTY:"
15809 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15810 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15811
15812 echo "
15813 Images:"
15814 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15815 if test "$with_xpm" = yes; then
15816   echo "  Compiling in support for XPM  images."
15817 elif test "$with_x11" = yes; then
15818   echo "  WARNING: -----------------------------------------------------------"
15819   echo "  WARNING: Compiling without XPM image support."
15820   if test "$xpm_problem" != ""; then
15821     echo "  Reason: $xpm_problem"
15822   fi
15823   echo "  WARNING: You should strongly consider installing XPM."
15824   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15825   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15826   echo "  WARNING: -----------------------------------------------------------"
15827 fi
15828 if test "$with_png" = yes; then
15829   echo "  Compiling in support for PNG  images."
15830 elif test "$window_system" != "none"; then
15831   echo "  WARNING: -----------------------------------------------------------"
15832   echo "  WARNING: Compiling without PNG image support."
15833   if test "$png_problem" != ""; then
15834     echo "  Reason: $png_problem"
15835   fi
15836   echo "  WARNING: You should strongly consider installing the PNG libraries."
15837   echo "  WARNING: Otherwise certain images and glyphs may not display."
15838   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15839   echo "  WARNING: -----------------------------------------------------------"
15840 fi
15841 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15842 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15843 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15844
15845 echo "
15846 Sound:"
15847 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15848 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15849 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15850 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15851
15852 echo "
15853 Databases:"
15854 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15855 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15856 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15857 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15858 if test "$with_postgresql" = yes; then
15859   echo "  Compiling in support for PostgreSQL."
15860   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15861   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15862 fi
15863
15864 echo "
15865 Internationalization:"
15866 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15867 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15868 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15869 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15870 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15871 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15872 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15873 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15874 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15875 if test "$with_wnn" = yes; then
15876   echo "  Compiling in support for the WNN input method on Mule."
15877   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15878 fi
15879 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15880
15881 echo "
15882 Mail:"
15883 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15884 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15885 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15886 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15887
15888 echo "
15889 Other Features:"
15890 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
15891 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15892 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15893 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15894 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15895 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15896 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15897 test "$pdump" = yes && echo "  Using the new portable dumper."
15898 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15899 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15900 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15901   != "no no no no no no"; then
15902   echo "  WARNING: ---------------------------------------------------------"
15903   echo "  WARNING: Compiling in support for runtime error checking."
15904   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15905   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15906   echo "  WARNING: ---------------------------------------------------------"
15907 fi
15908 echo ""
15909 ) | tee -a Installation
15910 echo ""
15911
15912
15913 # Remove any trailing slashes in these variables.
15914 test -n "$prefix" &&
15915   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15916 test -n "$exec_prefix" &&
15917   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15918
15919
15920 for file in $internal_makefile_list; do
15921   test "$file" = src/Makefile.in && \
15922     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15923   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15924 done
15925 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15926 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
15927
15928 trap '' 1 2 15
15929
15930 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15931
15932 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15933 # Let make expand exec_prefix.
15934 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15935
15936 # Any assignment to VPATH causes Sun make to only execute
15937 # the first set of double-colon rules, so remove it if not needed.
15938 # If there is a colon in the path, we need to keep it.
15939 if test "x$srcdir" = x.; then
15940   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15941 fi
15942
15943 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15944
15945 DEFS=-DHAVE_CONFIG_H
15946
15947 # Without the "./", some shells look in PATH for config.status.
15948 : ${CONFIG_STATUS=./config.status}
15949
15950 echo creating $CONFIG_STATUS
15951 rm -f $CONFIG_STATUS
15952 cat > $CONFIG_STATUS <<EOF
15953 #! /bin/sh
15954 # Generated automatically by configure.
15955 # Run this file to recreate the current configuration.
15956 # This directory was configured as follows,
15957 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15958 #
15959 # $0 $ac_configure_args
15960 #
15961 # Compiler output produced by configure, useful for debugging
15962 # configure, is in ./config.log if it exists.
15963
15964 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15965 for ac_option
15966 do
15967   case "\$ac_option" in
15968   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15969     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15970     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15971   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15972     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15973     exit 0 ;;
15974   -help | --help | --hel | --he | --h)
15975     echo "\$ac_cs_usage"; exit 0 ;;
15976   *) echo "\$ac_cs_usage"; exit 1 ;;
15977   esac
15978 done
15979
15980 ac_given_srcdir=$srcdir
15981 ac_given_INSTALL="$INSTALL"
15982
15983 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15984 EOF
15985 cat >> $CONFIG_STATUS <<EOF
15986
15987 # Protect against being on the right side of a sed subst in config.status.
15988 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15989  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15990 $ac_vpsub
15991 $extrasub
15992 s%@SHELL@%$SHELL%g
15993 s%@CFLAGS@%$CFLAGS%g
15994 s%@CPPFLAGS@%$CPPFLAGS%g
15995 s%@CXXFLAGS@%$CXXFLAGS%g
15996 s%@FFLAGS@%$FFLAGS%g
15997 s%@DEFS@%$DEFS%g
15998 s%@LDFLAGS@%$LDFLAGS%g
15999 s%@LIBS@%$LIBS%g
16000 s%@exec_prefix@%$exec_prefix%g
16001 s%@prefix@%$prefix%g
16002 s%@program_transform_name@%$program_transform_name%g
16003 s%@bindir@%$bindir%g
16004 s%@sbindir@%$sbindir%g
16005 s%@libexecdir@%$libexecdir%g
16006 s%@datadir@%$datadir%g
16007 s%@sysconfdir@%$sysconfdir%g
16008 s%@sharedstatedir@%$sharedstatedir%g
16009 s%@localstatedir@%$localstatedir%g
16010 s%@libdir@%$libdir%g
16011 s%@includedir@%$includedir%g
16012 s%@oldincludedir@%$oldincludedir%g
16013 s%@infodir@%$infodir%g
16014 s%@mandir@%$mandir%g
16015 s%@LN_S@%$LN_S%g
16016 s%@blddir@%$blddir%g
16017 s%@CC@%$CC%g
16018 s%@CPP@%$CPP%g
16019 s%@start_flags@%$start_flags%g
16020 s%@ld_switch_shared@%$ld_switch_shared%g
16021 s%@start_files@%$start_files%g
16022 s%@ld@%$ld%g
16023 s%@lib_gcc@%$lib_gcc%g
16024 s%@RANLIB@%$RANLIB%g
16025 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16026 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16027 s%@INSTALL_DATA@%$INSTALL_DATA%g
16028 s%@YACC@%$YACC%g
16029 s%@SET_MAKE@%$SET_MAKE%g
16030 s%@GTK_CONFIG@%$GTK_CONFIG%g
16031 s%@X_CFLAGS@%$X_CFLAGS%g
16032 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16033 s%@X_LIBS@%$X_LIBS%g
16034 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16035 s%@install_pp@%$install_pp%g
16036 s%@libs_xauth@%$libs_xauth%g
16037 s%@dnd_objs@%$dnd_objs%g
16038 s%@lwlib_objs@%$lwlib_objs%g
16039 s%@ALLOCA@%$ALLOCA%g
16040 s%@have_esd_config@%$have_esd_config%g
16041 s%@dll_ld@%$dll_ld%g
16042 s%@dll_cflags@%$dll_cflags%g
16043 s%@dll_ldflags@%$dll_ldflags%g
16044 s%@dll_post@%$dll_post%g
16045 s%@dll_ldo@%$dll_ldo%g
16046 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16047 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16048 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16049 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16050 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16051 s%@PROGNAME@%$PROGNAME%g
16052 s%@version@%$version%g
16053 s%@configuration@%$configuration%g
16054 s%@canonical@%$canonical%g
16055 s%@inststaticdir@%$inststaticdir%g
16056 s%@instvardir@%$instvardir%g
16057 s%@srcdir@%$srcdir%g
16058 s%@pkgdir@%$pkgdir%g
16059 s%@statedir@%$statedir%g
16060 s%@extra_includes@%$extra_includes%g
16061 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16062 s%@PREFIX@%$PREFIX%g
16063 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16064 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16065 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16066 s%@INFODIR@%$INFODIR%g
16067 s%@infopath@%$infopath%g
16068 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16069 s%@INFOPATH@%$INFOPATH%g
16070 s%@package_path@%$package_path%g
16071 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16072 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16073 s%@lispdir@%$lispdir%g
16074 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16075 s%@LISPDIR@%$LISPDIR%g
16076 s%@moduledir@%$moduledir%g
16077 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16078 s%@MODULEDIR@%$MODULEDIR%g
16079 s%@sitelispdir@%$sitelispdir%g
16080 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16081 s%@SITELISPDIR@%$SITELISPDIR%g
16082 s%@sitemoduledir@%$sitemoduledir%g
16083 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16084 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16085 s%@etcdir@%$etcdir%g
16086 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16087 s%@ETCDIR@%$ETCDIR%g
16088 s%@docdir@%$docdir%g
16089 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16090 s%@DOCDIR@%$DOCDIR%g
16091 s%@archlibdir@%$archlibdir%g
16092 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16093 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16094 s%@bitmapdir@%$bitmapdir%g
16095 s%@extra_objs@%$extra_objs%g
16096 s%@machfile@%$machfile%g
16097 s%@opsysfile@%$opsysfile%g
16098 s%@c_switch_general@%$c_switch_general%g
16099 s%@c_switch_window_system@%$c_switch_window_system%g
16100 s%@c_switch_all@%$c_switch_all%g
16101 s%@ld_switch_general@%$ld_switch_general%g
16102 s%@ld_switch_window_system@%$ld_switch_window_system%g
16103 s%@ld_switch_all@%$ld_switch_all%g
16104 s%@ld_libs_general@%$ld_libs_general%g
16105 s%@ld_libs_window_system@%$ld_libs_window_system%g
16106 s%@ld_libs_all@%$ld_libs_all%g
16107 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16108 s%@native_sound_lib@%$native_sound_lib%g
16109 s%@sound_cflags@%$sound_cflags%g
16110 s%@dynodump_arch@%$dynodump_arch%g
16111 s%@XEMACS_CC@%$XEMACS_CC%g
16112 s%@internal_makefile_list@%$internal_makefile_list%g
16113
16114 CEOF
16115 EOF
16116
16117 cat >> $CONFIG_STATUS <<\EOF
16118
16119 # Split the substitutions into bite-sized pieces for seds with
16120 # small command number limits, like on Digital OSF/1 and HP-UX.
16121 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16122 ac_file=1 # Number of current file.
16123 ac_beg=1 # First line for current file.
16124 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16125 ac_more_lines=:
16126 ac_sed_cmds=""
16127 while $ac_more_lines; do
16128   if test $ac_beg -gt 1; then
16129     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16130   else
16131     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16132   fi
16133   if test ! -s conftest.s$ac_file; then
16134     ac_more_lines=false
16135     rm -f conftest.s$ac_file
16136   else
16137     if test -z "$ac_sed_cmds"; then
16138       ac_sed_cmds="sed -f conftest.s$ac_file"
16139     else
16140       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16141     fi
16142     ac_file=`expr $ac_file + 1`
16143     ac_beg=$ac_end
16144     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16145   fi
16146 done
16147 if test -z "$ac_sed_cmds"; then
16148   ac_sed_cmds=cat
16149 fi
16150 EOF
16151
16152 cat >> $CONFIG_STATUS <<EOF
16153
16154 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16155 EOF
16156 cat >> $CONFIG_STATUS <<\EOF
16157 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16158   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16159   case "$ac_file" in
16160   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16161        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16162   *) ac_file_in="${ac_file}.in" ;;
16163   esac
16164
16165   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16166
16167   # Remove last slash and all that follows it.  Not all systems have dirname.
16168   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16169   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16170     # The file is in a subdirectory.
16171     test ! -d "$ac_dir" && mkdir "$ac_dir"
16172     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16173     # A "../" for each directory in $ac_dir_suffix.
16174     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16175   else
16176     ac_dir_suffix= ac_dots=
16177   fi
16178
16179   case "$ac_given_srcdir" in
16180   .)  srcdir=.
16181       if test -z "$ac_dots"; then top_srcdir=.
16182       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16183   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16184   *) # Relative path.
16185     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16186     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16187   esac
16188
16189   case "$ac_given_INSTALL" in
16190   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16191   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16192   esac
16193
16194   echo creating "$ac_file"
16195   rm -f "$ac_file"
16196   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16197   case "$ac_file" in
16198   *Makefile*) ac_comsub="1i\\
16199 # $configure_input" ;;
16200   *) ac_comsub= ;;
16201   esac
16202
16203   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16204   sed -e "$ac_comsub
16205 s%@configure_input@%$configure_input%g
16206 s%@srcdir@%$srcdir%g
16207 s%@top_srcdir@%$top_srcdir%g
16208 s%@INSTALL@%$INSTALL%g
16209 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16210 fi; done
16211 rm -f conftest.s*
16212
16213 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16214 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16215 #
16216 # ac_d sets the value in "#define NAME VALUE" lines.
16217 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16218 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16219 ac_dC='\3'
16220 ac_dD='%g'
16221 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16222 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16223 ac_uB='\([      ]\)%\1#\2define\3'
16224 ac_uC=' '
16225 ac_uD='\4%g'
16226 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16227 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16228 ac_eB='$%\1#\2define\3'
16229 ac_eC=' '
16230 ac_eD='%g'
16231
16232 if test "${CONFIG_HEADERS+set}" != set; then
16233 EOF
16234 cat >> $CONFIG_STATUS <<EOF
16235   CONFIG_HEADERS="src/config.h lwlib/config.h"
16236 EOF
16237 cat >> $CONFIG_STATUS <<\EOF
16238 fi
16239 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16240   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16241   case "$ac_file" in
16242   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16243        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16244   *) ac_file_in="${ac_file}.in" ;;
16245   esac
16246
16247   echo creating $ac_file
16248
16249   rm -f conftest.frag conftest.in conftest.out
16250   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16251   cat $ac_file_inputs > conftest.in
16252
16253 EOF
16254
16255 # Transform confdefs.h into a sed script conftest.vals that substitutes
16256 # the proper values into config.h.in to produce config.h.  And first:
16257 # Protect against being on the right side of a sed subst in config.status.
16258 # Protect against being in an unquoted here document in config.status.
16259 rm -f conftest.vals
16260 cat > conftest.hdr <<\EOF
16261 s/[\\&%]/\\&/g
16262 s%[\\$`]%\\&%g
16263 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16264 s%ac_d%ac_u%gp
16265 s%ac_u%ac_e%gp
16266 EOF
16267 sed -n -f conftest.hdr confdefs.h > conftest.vals
16268 rm -f conftest.hdr
16269
16270 # This sed command replaces #undef with comments.  This is necessary, for
16271 # example, in the case of _POSIX_SOURCE, which is predefined and required
16272 # on some systems where configure will not decide to define it.
16273 cat >> conftest.vals <<\EOF
16274 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16275 EOF
16276
16277 # Break up conftest.vals because some shells have a limit on
16278 # the size of here documents, and old seds have small limits too.
16279
16280 rm -f conftest.tail
16281 while :
16282 do
16283   ac_lines=`grep -c . conftest.vals`
16284   # grep -c gives empty output for an empty file on some AIX systems.
16285   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16286   # Write a limited-size here document to conftest.frag.
16287   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16288   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16289   echo 'CEOF
16290   sed -f conftest.frag conftest.in > conftest.out
16291   rm -f conftest.in
16292   mv conftest.out conftest.in
16293 ' >> $CONFIG_STATUS
16294   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16295   rm -f conftest.vals
16296   mv conftest.tail conftest.vals
16297 done
16298 rm -f conftest.vals
16299
16300 cat >> $CONFIG_STATUS <<\EOF
16301   rm -f conftest.frag conftest.h
16302   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16303   cat conftest.in >> conftest.h
16304   rm -f conftest.in
16305   if cmp -s $ac_file conftest.h 2>/dev/null; then
16306     echo "$ac_file is unchanged"
16307     rm -f conftest.h
16308   else
16309     # Remove last slash and all that follows it.  Not all systems have dirname.
16310       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16311       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16312       # The file is in a subdirectory.
16313       test ! -d "$ac_dir" && mkdir "$ac_dir"
16314     fi
16315     rm -f $ac_file
16316     mv conftest.h $ac_file
16317   fi
16318 fi; done
16319
16320 EOF
16321 cat >> $CONFIG_STATUS <<EOF
16322 CPP="$CPP"
16323  top_srcdir="$srcdir"
16324  MAKE_SUBDIR="$MAKE_SUBDIR"
16325
16326 EOF
16327 cat >> $CONFIG_STATUS <<\EOF
16328 for dir in . $MAKE_SUBDIR; do
16329   (
16330     cd $dir
16331     rm -f junk.c
16332     < Makefile.in \
16333       sed -e '/^# Generated/d' \
16334           -e 's%/\*\*/#.*%%' \
16335           -e 's/^ *# */#/' \
16336           -e '/^##/d' \
16337           -e '/^#/ {
16338 p
16339 d
16340 }'        \
16341           -e '/./ {
16342 s/\([\"]\)/\\\1/g
16343 s/^/"/
16344 s/$/"/
16345 }'  > junk.c;
16346
16347
16348
16349     echo creating $dir/Makefile
16350 $CPP -I. -I${top_srcdir}/src  junk.c \
16351   | sed -e 's/^\#.*//'          \
16352         -e 's/^[        ][      ]*$//'\
16353         -e 's/^ /       /'              \
16354         -e '/^[ \f]*$/d' \
16355         -e '/^\"/ {
16356         s/\\\([\"]\)/\1/g
16357         s/^[    ]*\"//
16358         s/\"[   ]*$//
16359 }' > Makefile.new
16360     chmod 444 Makefile.new
16361     mv -f Makefile.new Makefile
16362
16363     echo creating $dir/GNUmakefile
16364 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16365   | sed -e 's/^\#.*//'          \
16366         -e 's/^[        ][      ]*$//'\
16367         -e 's/^ /       /'              \
16368         -e '/^[ \f]*$/d' \
16369         -e '/^\"/ {
16370         s/\\\([\"]\)/\1/g
16371         s/^[    ]*\"//
16372         s/\"[   ]*$//
16373 }' > Makefile.new
16374     chmod 444 Makefile.new
16375     mv -f Makefile.new GNUmakefile
16376
16377     rm -f junk.c
16378   )
16379 done
16380
16381 sed < config.status >> lib-src/config.values \
16382   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16383   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16384   -e 's/^\([^ ]*\) $/\1 ""/' \
16385   -e 's/ 1$/ t/'
16386
16387
16388 exit 0
16389 EOF
16390 chmod +x $CONFIG_STATUS
16391 rm -fr confdefs* $ac_clean_files
16392 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1