ef07554758777c20026a9c94aaacd215f6ad5e37
[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 )
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             g | gt | gtk )                              val=gtk    ;;
748             ms | msw )                                  val=msw    ;;
749             * ) (echo "$progname: Usage error:"
750 echo " " "The \`--$optname' option must have one of these values:
751   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
752 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
753           esac
754           eval "$opt=\"$val\""
755         ;;
756
757                 "use_minimal_tagbits" | \
758         "use_indexed_lrecord_implementation" | \
759         "run_in_place"  | \
760         "const_is_losing" | \
761         "with_gnu_make" )
762           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
763         ;;
764
765                 * ) (echo "$progname: Usage error:"
766 echo " " "Unrecognized option: $arg"
767 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
768
769       esac
770     ;;
771
772         *-*-*) configuration="$arg" ;;
773
774         *) (echo "$progname: Usage error:"
775 echo " " "Unrecognized argument: $arg"
776 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
777
778   esac
779 done
780
781
782 test -n "$cpp"      && CPP="$cpp"
783 test -n "$cppflags" && CPPFLAGS="$cppflags"
784 test -n "$libs"     && LIBS="$libs"
785 test -n "$ldflags"  && LDFLAGS="$ldflags"
786
787 eval set x "$quoted_arguments"; shift
788
789 test "$extra_verbose" = "yes" && verbose=yes
790
791 test -n "$with_x" && with_x11="$with_x"
792
793 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
794   test "$with_system_malloc" = "default" && with_system_malloc=yes
795 fi
796
797
798
799 if test "$with_cde $with_tooltalk" = "yes no"; then
800   (echo "$progname: Usage error:"
801 echo " " "--with-cde requires --with-tooltalk"
802 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
803 elif test "$with_tooltalk" = "no" ; then with_cde=no
804 elif test "$with_cde" = "yes"; then with_tooltalk=yes
805 fi
806
807
808 case "$srcdir" in
809
810     "" )
811     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
812       if test -f "$dir/src/lisp.h" -a \
813               -f "$dir/lisp/version.el" ; then
814         srcdir="$dir"
815         break
816       fi
817     done
818     if test -z "$srcdir" ; then
819       (echo "$progname: Usage error:"
820 echo " " "Neither the current directory nor its parent seem to
821   contain the XEmacs sources.  If you do not want to build XEmacs in its
822   source tree, you should run \`$progname' in the directory in which
823   you wish to build XEmacs, using the \`--srcdir' option to say where the
824   sources may be found."
825 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
826     fi
827   ;;
828
829     * )
830     if test ! -f "$srcdir/src/lisp.h" -o \
831             ! -f "$srcdir/lisp/version.el" ; then
832       (echo "$progname: Usage error:"
833 echo " " "The directory specified with the \`--srcdir' option,
834   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
835   either run the \`$progname' script at the top of the XEmacs source
836   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
837 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
838     fi
839   ;;
840 esac
841
842 if test -z "$configuration"; then
843     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
844   if test -z "$configuration"; then
845     (echo "$progname: Usage error:"
846 echo " " "XEmacs has not been ported to this host type.
847 Try explicitly specifying the CONFIGURATION when rerunning configure."
848 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
849   fi
850 fi
851
852 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
853 echo "configure:854: checking whether ln -s works" >&5
854
855 rm -f conftestdata
856 if ln -s X conftestdata 2>/dev/null
857 then
858   rm -f conftestdata
859   ac_cv_prog_LN_S="ln -s"
860 else
861   ac_cv_prog_LN_S=ln
862 fi
863 LN_S="$ac_cv_prog_LN_S"
864 if test "$ac_cv_prog_LN_S" = "ln -s"; then
865   echo "$ac_t""yes" 1>&6
866 else
867   echo "$ac_t""no" 1>&6
868 fi
869
870
871 for dir in lisp etc man info tests; do
872   if test ! -d "$dir" ; then
873     echo Making symbolic link to "$srcdir/$dir"
874     ${LN_S} "$srcdir/$dir" "$dir"
875   fi
876 done
877
878
879 absolute_pwd="`pwd`";
880 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
881 then blddir="$PWD"
882 else blddir="$absolute_pwd"; if test -d "/net"; then
883   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
884   blddir=`echo "$blddir" | \
885    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
886 fi
887 fi
888
889
890 case "$srcdir" in
891   /* ) ;;
892   .  ) srcdir="$blddir" ;;
893   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
894   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
895   srcdir=`echo "$srcdir" | \
896    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
897 fi ;;
898 esac
899
900 if test `pwd` != `sh -c cd $srcdir && pwd`  \
901    && test -f "$srcdir/src/config.h"; then
902   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
903    echo "   as a build directory right now; it has been configured in its own"
904    echo "   right.  To configure in another directory as well, you MUST"
905    echo "   use GNU make.  If you do not have GNU make, then you must"
906    echo "   now do \`make distclean' in $srcdir,"
907    echo "   and then run $progname again.") >&2
908   extrasub='/^VPATH[     ]*=/c\
909 vpath %.c $(srcdir)\
910 vpath %.h $(srcdir)\
911 vpath %.y $(srcdir)\
912 vpath %.l $(srcdir)\
913 vpath %.s $(srcdir)\
914 vpath %.in $(srcdir)'
915 fi
916
917 . "$srcdir/version.sh" || exit 1;
918 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
919 : "${extra_verbose=$beta}"
920 version="${emacs_major_version}.${emacs_minor_version}"
921 { test "$extra_verbose" = "yes" && cat << EOF
922     Defining EMACS_MAJOR_VERSION = $emacs_major_version
923 EOF
924 cat >> confdefs.h <<EOF
925 #define EMACS_MAJOR_VERSION $emacs_major_version
926 EOF
927 }
928
929 { test "$extra_verbose" = "yes" && cat << EOF
930     Defining EMACS_MINOR_VERSION = $emacs_minor_version
931 EOF
932 cat >> confdefs.h <<EOF
933 #define EMACS_MINOR_VERSION $emacs_minor_version
934 EOF
935 }
936
937 if test -n "$emacs_beta_version" ; then
938   if test "$beta" = "yes"; then
939         version="${version}-b${emacs_beta_version}"
940         { test "$extra_verbose" = "yes" && cat << EOF
941     Defining EMACS_BETA_VERSION = $emacs_beta_version
942 EOF
943 cat >> confdefs.h <<EOF
944 #define EMACS_BETA_VERSION $emacs_beta_version
945 EOF
946 }
947
948   else
949         version="${version}.${emacs_beta_version}"
950         { test "$extra_verbose" = "yes" && cat << EOF
951     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
952 EOF
953 cat >> confdefs.h <<EOF
954 #define EMACS_PATCH_LEVEL $emacs_beta_version
955 EOF
956 }
957
958   fi
959 fi
960 { test "$extra_verbose" = "yes" && cat << EOF
961     Defining XEMACS_CODENAME = "$xemacs_codename"
962 EOF
963 cat >> confdefs.h <<EOF
964 #define XEMACS_CODENAME "$xemacs_codename"
965 EOF
966 }
967
968 { test "$extra_verbose" = "yes" && cat << EOF
969     Defining EMACS_VERSION = "$version"
970 EOF
971 cat >> confdefs.h <<EOF
972 #define EMACS_VERSION "$version"
973 EOF
974 }
975
976
977 if test "$with_infodock" = "yes"; then
978   if test ! -f ../../ID-INSTALL; then
979     echo "Cannot build InfoDock without InfoDock sources"
980     with_infodock=no
981   fi
982 fi
983
984 if test "$with_infodock" = "yes"; then
985       { test "$extra_verbose" = "yes" && cat << EOF
986     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
987 EOF
988 cat >> confdefs.h <<EOF
989 #define INFODOCK_MAJOR_VERSION $infodock_major_version
990 EOF
991 }
992
993   { test "$extra_verbose" = "yes" && cat << EOF
994     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
995 EOF
996 cat >> confdefs.h <<EOF
997 #define INFODOCK_MINOR_VERSION $infodock_minor_version
998 EOF
999 }
1000
1001   { test "$extra_verbose" = "yes" && cat << EOF
1002     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1003 EOF
1004 cat >> confdefs.h <<EOF
1005 #define INFODOCK_BUILD_VERSION $infodock_build_version
1006 EOF
1007 }
1008
1009   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1010   PROGNAME=infodock
1011   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1012 else
1013   PROGNAME=xemacs
1014 fi
1015
1016 { test "$extra_verbose" = "yes" && cat << EOF
1017     Defining EMACS_PROGNAME = "$PROGNAME"
1018 EOF
1019 cat >> confdefs.h <<EOF
1020 #define EMACS_PROGNAME "$PROGNAME"
1021 EOF
1022 }
1023
1024
1025 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1026 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1027     Defining ERROR_CHECK_EXTENTS
1028 EOF
1029 cat >> confdefs.h <<\EOF
1030 #define ERROR_CHECK_EXTENTS 1
1031 EOF
1032 }
1033
1034 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1035     Defining ERROR_CHECK_TYPECHECK
1036 EOF
1037 cat >> confdefs.h <<\EOF
1038 #define ERROR_CHECK_TYPECHECK 1
1039 EOF
1040 }
1041
1042 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1043     Defining ERROR_CHECK_BUFPOS
1044 EOF
1045 cat >> confdefs.h <<\EOF
1046 #define ERROR_CHECK_BUFPOS 1
1047 EOF
1048 }
1049
1050 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1051     Defining ERROR_CHECK_GC
1052 EOF
1053 cat >> confdefs.h <<\EOF
1054 #define ERROR_CHECK_GC 1
1055 EOF
1056 }
1057
1058 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1059     Defining ERROR_CHECK_MALLOC
1060 EOF
1061 cat >> confdefs.h <<\EOF
1062 #define ERROR_CHECK_MALLOC 1
1063 EOF
1064 }
1065
1066 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1067     Defining ERROR_CHECK_BYTE_CODE
1068 EOF
1069 cat >> confdefs.h <<\EOF
1070 #define ERROR_CHECK_BYTE_CODE 1
1071 EOF
1072 }
1073
1074 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1075     Defining ERROR_CHECK_GLYPHS
1076 EOF
1077 cat >> confdefs.h <<\EOF
1078 #define ERROR_CHECK_GLYPHS 1
1079 EOF
1080 }
1081
1082 if test "${debug:=$beta}" = "yes"; then
1083   use_assertions=yes memory_usage_stats=yes
1084   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1085    echo "    xemacs will be linked with \"debug.o\""
1086  fi
1087   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1088    echo "    xemacs will be linked with \"tests.o\""
1089  fi
1090   { test "$extra_verbose" = "yes" && cat << \EOF
1091     Defining DEBUG_XEMACS
1092 EOF
1093 cat >> confdefs.h <<\EOF
1094 #define DEBUG_XEMACS 1
1095 EOF
1096 }
1097
1098 fi
1099 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1100     Defining USE_ASSERTIONS
1101 EOF
1102 cat >> confdefs.h <<\EOF
1103 #define USE_ASSERTIONS 1
1104 EOF
1105 }
1106
1107 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1108     Defining MEMORY_USAGE_STATS
1109 EOF
1110 cat >> confdefs.h <<\EOF
1111 #define MEMORY_USAGE_STATS 1
1112 EOF
1113 }
1114
1115
1116
1117 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1118 echo "configure:1119: checking "host system type"" >&5
1119 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1120 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1121 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1122 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1123 echo "$ac_t""$configuration" 1>&6
1124
1125
1126
1127
1128
1129 machine='' opsys=''
1130
1131 case "$canonical" in
1132   sparc-*-*        ) machine=sparc ;;
1133   alpha*-*-*       ) machine=alpha ;;
1134   vax-*-*          ) machine=vax ;;
1135   mips-dec-*       ) machine=pmax ;;
1136   mips-sgi-irix6*  ) machine=iris6d ;;
1137   mips-sgi-*       ) machine=iris4d ;;
1138   mips*-linux      ) machine=mips ;;
1139   romp-ibm-*       ) machine=ibmrt ;;
1140   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1141   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1142   powerpc*-*       ) machine=powerpc ;;
1143   hppa-*-*         ) machine=hp800 ;;
1144   m88k-dg-*        ) machine=aviion ;;
1145   m68*-sony-*      ) machine=news ;;
1146   mips-sony-*      ) machine=news-risc ;;
1147   clipper-*        ) machine=clipper ;;
1148   arm*             ) machine=arm ;;
1149   ns32k-*          ) machine=ns32000 ;;
1150 esac
1151
1152 case "$canonical" in
1153   *-*-linux*    ) opsys=linux ;;
1154   *-*-netbsd*   ) opsys=netbsd ;;
1155   *-*-openbsd*  ) opsys=openbsd ;;
1156   *-*-nextstep* ) opsys=nextstep ;;
1157   *-*-vms       ) opsys=vms ;;
1158
1159     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1160   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1161   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1162   *-dec-osf3*                ) opsys=decosf3-1 ;;
1163   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1164
1165     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1166   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1167   *-*-ultrix* )         opsys=ultrix4-3 ;;
1168
1169     *-*-aix3.1*  ) opsys=aix3-1 ;;
1170   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1171   *-*-aix3*    ) opsys=aix3-2   ;;
1172   *-*-aix4.0*  ) opsys=aix4     ;;
1173   *-*-aix4.1*  ) opsys=aix4-1   ;;
1174   *-*-aix4*    ) opsys=aix4-2   ;;
1175
1176     *-gnu* )                    opsys=gnu    ;;
1177   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1178   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1179   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1180   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1181   *-*-aos*   )                  opsys=bsd4-3 ;;
1182   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1183   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1184   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1185   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1186   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1187   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1188         if test -z "$NON_GNU_CPP" ; then
1189           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1190             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1191           done
1192         fi
1193         opsys=usg5-4-2 ;;
1194     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1195     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1196 esac
1197
1198 case "$canonical" in
1199
1200     *-*-netbsd* )
1201     case "$canonical" in
1202       i[3-9]86-*-netbsd*) machine=intel386 ;;
1203       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1204                                             machine=hp9000s300 ;;
1205       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1206       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1207     esac
1208   ;;
1209
1210     *-*-openbsd* )
1211     case "${canonical}" in
1212       i386-*-openbsd*)          machine=intel386 ;;
1213       m68k-*-openbsd*)          machine=hp9000s300 ;;
1214       mipsel-*-openbsd*)        machine=pmax ;;
1215      esac
1216    ;;
1217
1218     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1219   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1220
1221     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1222   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1223
1224     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1225
1226     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1227
1228     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1229
1230     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1231
1232     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1233
1234     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1235   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1236   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1237
1238   
1239     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1240
1241     *-convex-bsd* | *-convex-convexos* )
1242     machine=convex opsys=bsd4-3
1243     NON_GNU_CPP="cc -E -P"
1244   ;;
1245
1246     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1247
1248     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1249   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1250   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1251   m88k-dg-dgux*                           ) opsys=dgux     ;;
1252
1253     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1254   m88k-motorola-sysv4* )
1255                     machine=delta88k opsys=usg5-4-2
1256   ;;
1257   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1258
1259     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1260   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1261
1262     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1263
1264     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1265   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1266   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1267
1268       m88k-harris-cxux* )
1269         case "`uname -r`" in
1270        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1271        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1272     esac
1273     NON_GNU_CPP="/lib/cpp"
1274   ;;
1275     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1276     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1277
1278     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1279
1280     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1281
1282     *-hp-hpux* )
1283         case "$canonical" in
1284       m68*  ) machine=hp9000s300 ;;
1285       hppa* ) machine=hp800      ;;
1286     esac
1287
1288     case "$canonical" in
1289       *-hp-hpux7*  )  opsys=hpux   ;;
1290       *-hp-hpux8*  )  opsys=hpux8  ;;
1291       *-hp-hpux9*  )  opsys=hpux9  ;;
1292       *-hp-hpux10* )  opsys=hpux10 ;;
1293       *-hp-hpux11* )  opsys=hpux11 ;;
1294       *            )  opsys=hpux   ;;
1295     esac
1296
1297         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1298    echo "    xemacs will be linked with \"strcat.o\""
1299  fi ;; esac
1300
1301     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1302         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1303     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1304
1305     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1306   ;;
1307
1308     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1309   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1310
1311     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1312   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1313   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1314   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1315   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1316   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1317
1318     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1319   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1320
1321     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1322
1323     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1324
1325     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1326
1327     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1328
1329       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1330
1331     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1332
1333     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1334
1335     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1336
1337     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1338
1339         mips-mips-usg* ) machine=mips4 ;;
1340   mips-mips-riscos4 )
1341     machine=mips4
1342     NON_GNU_CC="cc -systype bsd43"
1343     NON_GNU_CPP="cc -systype bsd43 -E"
1344     case "$canonical" in
1345       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1346       mips-mips-riscos5* ) opsys=riscos5 ;;
1347     esac
1348   ;;
1349   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1350   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1351
1352     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1353
1354     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1355
1356     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1357   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1358
1359     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1360
1361     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1362
1363     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1364
1365     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1366
1367     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1368   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1369
1370     mips-siemens-sysv* | mips-sni-sysv*)
1371     machine=mips-siemens opsys=usg5-4
1372     NON_GNU_CC=/usr/ccs/bin/cc
1373     NON_GNU_CPP=/usr/ccs/lib/cpp
1374   ;;
1375
1376     mips-nec-sysv*)
1377     machine=mips-nec
1378     NON_GNU_CC=/usr/ccs/bin/cc
1379     NON_GNU_CPP=/usr/ccs/lib/cpp
1380   ;;
1381
1382       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1383   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1384     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1385   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1386   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1387   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1388   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1389   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1390   mips-sgi-irix*      ) opsys=irix5-0 ;;
1391
1392     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1393   *-sony-news* ) opsys=newsos5 ;;
1394
1395     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1396
1397     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1398         case "$canonical" in
1399       m68*-sunos1* )             machine=sun1     ;;
1400       m68*-sunos2* )             machine=sun2     ;;
1401       m68* )                     machine=sun3     ;;
1402       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1403       i*86-*-* )                 machine=intel386 ;;
1404       rs6000* )                  machine=rs6000   ;;
1405     esac
1406
1407         case "$canonical" in *-sunos5*)
1408       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1409     esac
1410
1411                     case "$canonical" in
1412       *-sunos4* )
1413         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1414         : ;;
1415       *-solaris2* )
1416         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1417         RANLIB=':' ;;
1418     esac
1419
1420     case "$canonical" in
1421       *-solaris*          )
1422         opsys=sol2
1423         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1424         { test "$extra_verbose" = "yes" && cat << EOF
1425     Defining OS_RELEASE = $os_release
1426 EOF
1427 cat >> confdefs.h <<EOF
1428 #define OS_RELEASE $os_release
1429 EOF
1430 }
1431  ;;
1432
1433             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1434       *-sunos4.0*         ) opsys=sunos4-0      ;;
1435       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1436       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1437       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1438       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1439       *-mach*             ) opsys=mach-bsd4-3   ;;
1440       *                   ) opsys=bsd4-2        ;;
1441     esac
1442
1443     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1444
1445         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1446   ;;
1447
1448     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1449
1450     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1451   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1452
1453     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1454
1455     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1456
1457     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1458       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1459
1460     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1461
1462     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1463
1464     vax-dec-* )
1465     case "$canonical" in
1466       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1467       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1468       *-mach* )                         opsys=mach-bsd4-3 ;;
1469     esac
1470   ;;
1471
1472     ns16k-whitechapel-* ) machine=mg1 ;;
1473
1474     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1475
1476     i[3-9]86-*-* )
1477     machine=intel386
1478     case "$canonical" in
1479       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1480       *-isc2.2* )               opsys=isc2-2 ;;
1481       *-isc4.0* )               opsys=isc4-0 ;;
1482       *-isc4.* )                opsys=isc4-1
1483                                 GCC_TEST_OPTIONS=-posix
1484                                 NON_GCC_TEST_OPTIONS=-Xp
1485                                 ;;
1486       *-isc* )                  opsys=isc3-0 ;;
1487       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1488       *-esix* )                 opsys=esix ;;
1489       *-mach* )                 opsys=mach-bsd4-3 ;;
1490       *-xenix* )                opsys=xenix ;;
1491       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1492       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1493       *-bsdi4* )                opsys=bsdos4 ;;
1494       *-bsdi3* )                opsys=bsdos3 ;;
1495       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1496       *-bsdi2* )                opsys=bsdos2 ;;
1497       *-sco3.2v5* )             opsys=sco5 ;;
1498       *-sysv5* )                opsys=sco7 ;;
1499       *-386bsd* )               opsys=386bsd ;;
1500       *-freebsd* )              opsys=freebsd ;;
1501       *-nextstep* )             opsys=nextstep ;;
1502       *-pc-cygwin* )            opsys=cygwin32 ;;
1503       *-pc-mingw* )             opsys=mingw32 ;
1504                                 test -z "$with_tty" && with_tty="no";;
1505           esac
1506   ;;
1507
1508     m68k-*-linux* ) machine=m68k opsys=linux ;;
1509
1510 esac
1511
1512 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1513
1514 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1515
1516 if test -r "${srcdir}/src/m/${machine}.h"; then
1517   machfile="m/${machine}.h"
1518   { test "$extra_verbose" = "yes" && cat << EOF
1519     Defining config_machfile = "$machfile"
1520 EOF
1521 cat >> confdefs.h <<EOF
1522 #define config_machfile "$machfile"
1523 EOF
1524 }
1525
1526 else
1527   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1528   echo "Using configure-time autodetection only."
1529 fi
1530
1531 if test -r "${srcdir}/src/s/${opsys}.h"; then
1532   opsysfile="s/${opsys}.h"
1533   { test "$extra_verbose" = "yes" && cat << EOF
1534     Defining config_opsysfile = "$opsysfile"
1535 EOF
1536 cat >> confdefs.h <<EOF
1537 #define config_opsysfile "$opsysfile"
1538 EOF
1539 }
1540
1541 else
1542   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1543   echo "Using configure-time autodetection only."
1544 fi
1545
1546
1547 if test -z "$dynamic"; then
1548   case "$opsys" in
1549     hpux* | sunos4* ) dynamic=no ;;
1550     *) dynamic=yes ;;
1551   esac
1552 fi
1553 if test "$dynamic" = "yes"; then
1554   case "$opsys" in
1555     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1556     decosf* ) ld_call_shared="-call_shared" ;;
1557   esac
1558 else   case "$opsys" in
1559     sol2 )
1560       echo "Static linking is not supported on Solaris 2."
1561       echo "Rerun configure without specifying --dynamic=no."
1562       exit 1 ;;
1563     linux   ) ld_call_shared="-Bstatic" ;;
1564     decosf* ) ld_call_shared="-non_shared" ;;
1565   esac
1566 fi
1567
1568 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1569
1570 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1571 { test "$extra_verbose" = "yes" && cat << EOF
1572     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1573 EOF
1574 cat >> confdefs.h <<EOF
1575 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1576 EOF
1577 }
1578
1579
1580
1581 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1582 if test "$with_workshop $with_tooltalk" = "yes no"; then
1583   (echo "$progname: Usage error:"
1584 echo " " "--with-workshop requires --with-tooltalk"
1585 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1586 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1587 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1588 fi
1589
1590 if test "$with_workshop" = "yes"; then
1591   { test "$extra_verbose" = "yes" && cat << \EOF
1592     Defining SUNPRO
1593 EOF
1594 cat >> confdefs.h <<\EOF
1595 #define SUNPRO 1
1596 EOF
1597 }
1598
1599   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1600    echo "    xemacs will be linked with \"sunpro.o\""
1601  fi
1602 fi
1603
1604 if test "$with_clash_detection" != "no"; then
1605   { test "$extra_verbose" = "yes" && cat << \EOF
1606     Defining CLASH_DETECTION
1607 EOF
1608 cat >> confdefs.h <<\EOF
1609 #define CLASH_DETECTION 1
1610 EOF
1611 }
1612
1613   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1614    echo "    xemacs will be linked with \"filelock.o\""
1615  fi
1616 fi
1617
1618 test -n "$compiler" && CC="$compiler"
1619 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1620 fi
1621
1622 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1623 if test "${CFLAGS-unset}" != unset
1624   then cflags_specified=yes;
1625   else cflags_specified=no;
1626 fi
1627
1628 xe_save_CFLAGS="$CFLAGS"
1629
1630 # Extract the first word of "gcc", so it can be a program name with args.
1631 set dummy gcc; ac_word=$2
1632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1633 echo "configure:1634: checking for $ac_word" >&5
1634
1635 if test -n "$CC"; then
1636   ac_cv_prog_CC="$CC" # Let the user override the test.
1637 else
1638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1639   ac_dummy="$PATH"
1640   for ac_dir in $ac_dummy; do
1641     test -z "$ac_dir" && ac_dir=.
1642     if test -f $ac_dir/$ac_word; then
1643       ac_cv_prog_CC="gcc"
1644       break
1645     fi
1646   done
1647   IFS="$ac_save_ifs"
1648 fi
1649 CC="$ac_cv_prog_CC"
1650 if test -n "$CC"; then
1651   echo "$ac_t""$CC" 1>&6
1652 else
1653   echo "$ac_t""no" 1>&6
1654 fi
1655
1656 if test -z "$CC"; then
1657   # Extract the first word of "cc", so it can be a program name with args.
1658 set dummy cc; ac_word=$2
1659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1660 echo "configure:1661: checking for $ac_word" >&5
1661
1662 if test -n "$CC"; then
1663   ac_cv_prog_CC="$CC" # Let the user override the test.
1664 else
1665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1666   ac_prog_rejected=no
1667   ac_dummy="$PATH"
1668   for ac_dir in $ac_dummy; do
1669     test -z "$ac_dir" && ac_dir=.
1670     if test -f $ac_dir/$ac_word; then
1671       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1672         ac_prog_rejected=yes
1673         continue
1674       fi
1675       ac_cv_prog_CC="cc"
1676       break
1677     fi
1678   done
1679   IFS="$ac_save_ifs"
1680 if test $ac_prog_rejected = yes; then
1681   # We found a bogon in the path, so make sure we never use it.
1682   set dummy $ac_cv_prog_CC
1683   shift
1684   if test $# -gt 0; then
1685     # We chose a different compiler from the bogus one.
1686     # However, it has the same basename, so the bogon will be chosen
1687     # first if we set CC to just the basename; use the full file name.
1688     shift
1689     set dummy "$ac_dir/$ac_word" "$@"
1690     shift
1691     ac_cv_prog_CC="$@"
1692   fi
1693 fi
1694 fi
1695 CC="$ac_cv_prog_CC"
1696 if test -n "$CC"; then
1697   echo "$ac_t""$CC" 1>&6
1698 else
1699   echo "$ac_t""no" 1>&6
1700 fi
1701
1702   if test -z "$CC"; then
1703     case "`uname -s`" in
1704     *win32* | *WIN32*)
1705       # Extract the first word of "cl", so it can be a program name with args.
1706 set dummy cl; ac_word=$2
1707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1708 echo "configure:1709: checking for $ac_word" >&5
1709
1710 if test -n "$CC"; then
1711   ac_cv_prog_CC="$CC" # Let the user override the test.
1712 else
1713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1714   ac_dummy="$PATH"
1715   for ac_dir in $ac_dummy; do
1716     test -z "$ac_dir" && ac_dir=.
1717     if test -f $ac_dir/$ac_word; then
1718       ac_cv_prog_CC="cl"
1719       break
1720     fi
1721   done
1722   IFS="$ac_save_ifs"
1723 fi
1724 CC="$ac_cv_prog_CC"
1725 if test -n "$CC"; then
1726   echo "$ac_t""$CC" 1>&6
1727 else
1728   echo "$ac_t""no" 1>&6
1729 fi
1730  ;;
1731     esac
1732   fi
1733   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1734 fi
1735
1736 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1737 echo "configure:1738: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1738
1739 ac_ext=c
1740 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1741 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1742 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'
1743 ac_cpp='$CPP '"$xe_cppflags"
1744 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1745 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1746 cross_compiling=no
1747
1748 cat > conftest.$ac_ext << EOF
1749
1750 #line 1751 "configure"
1751 #include "confdefs.h"
1752
1753 main(){return(0);}
1754 EOF
1755 if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1756   ac_cv_prog_cc_works=yes
1757   # If we can't run a trivial program, we are probably using a cross compiler.
1758   if (./conftest; exit) 2>/dev/null; then
1759     ac_cv_prog_cc_cross=no
1760   else
1761     ac_cv_prog_cc_cross=yes
1762   fi
1763 else
1764   echo "configure: failed program was:" >&5
1765   cat conftest.$ac_ext >&5
1766   ac_cv_prog_cc_works=no
1767 fi
1768 rm -fr conftest*
1769 ac_ext=c
1770 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1771 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1772 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'
1773 ac_cpp='$CPP '"$xe_cppflags"
1774 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1775 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1776 cross_compiling=no
1777
1778 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1779 if test $ac_cv_prog_cc_works = no; then
1780   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1781 fi
1782 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1783 echo "configure:1784: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1784 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1785 cross_compiling=$ac_cv_prog_cc_cross
1786
1787 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1788 echo "configure:1789: checking whether we are using GNU C" >&5
1789
1790 cat > conftest.c <<EOF
1791 #ifdef __GNUC__
1792   yes;
1793 #endif
1794 EOF
1795 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1796   ac_cv_prog_gcc=yes
1797 else
1798   ac_cv_prog_gcc=no
1799 fi
1800
1801 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1802
1803 if test $ac_cv_prog_gcc = yes; then
1804   GCC=yes
1805 else
1806   GCC=
1807 fi
1808
1809 ac_test_CFLAGS="${CFLAGS+set}"
1810 ac_save_CFLAGS="$CFLAGS"
1811 CFLAGS=
1812 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1813 echo "configure:1814: checking whether ${CC-cc} accepts -g" >&5
1814
1815 echo 'void f(){}' > conftest.c
1816 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1817   ac_cv_prog_cc_g=yes
1818 else
1819   ac_cv_prog_cc_g=no
1820 fi
1821 rm -f conftest*
1822
1823
1824 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1825 if test "$ac_test_CFLAGS" = set; then
1826   CFLAGS="$ac_save_CFLAGS"
1827 elif test $ac_cv_prog_cc_g = yes; then
1828   if test "$GCC" = yes; then
1829     CFLAGS="-g -O2"
1830   else
1831     CFLAGS="-g"
1832   fi
1833 else
1834   if test "$GCC" = yes; then
1835     CFLAGS="-O2"
1836   else
1837     CFLAGS=
1838   fi
1839 fi
1840  
1841 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1842   CC=${NON_GNU_CC-cc}
1843   # Extract the first word of "gcc", so it can be a program name with args.
1844 set dummy gcc; ac_word=$2
1845 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1846 echo "configure:1847: checking for $ac_word" >&5
1847
1848 if test -n "$CC"; then
1849   ac_cv_prog_CC="$CC" # Let the user override the test.
1850 else
1851   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1852   ac_dummy="$PATH"
1853   for ac_dir in $ac_dummy; do
1854     test -z "$ac_dir" && ac_dir=.
1855     if test -f $ac_dir/$ac_word; then
1856       ac_cv_prog_CC="gcc"
1857       break
1858     fi
1859   done
1860   IFS="$ac_save_ifs"
1861 fi
1862 CC="$ac_cv_prog_CC"
1863 if test -n "$CC"; then
1864   echo "$ac_t""$CC" 1>&6
1865 else
1866   echo "$ac_t""no" 1>&6
1867 fi
1868
1869 if test -z "$CC"; then
1870   # Extract the first word of "cc", so it can be a program name with args.
1871 set dummy cc; ac_word=$2
1872 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1873 echo "configure:1874: checking for $ac_word" >&5
1874
1875 if test -n "$CC"; then
1876   ac_cv_prog_CC="$CC" # Let the user override the test.
1877 else
1878   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1879   ac_prog_rejected=no
1880   ac_dummy="$PATH"
1881   for ac_dir in $ac_dummy; do
1882     test -z "$ac_dir" && ac_dir=.
1883     if test -f $ac_dir/$ac_word; then
1884       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1885         ac_prog_rejected=yes
1886         continue
1887       fi
1888       ac_cv_prog_CC="cc"
1889       break
1890     fi
1891   done
1892   IFS="$ac_save_ifs"
1893 if test $ac_prog_rejected = yes; then
1894   # We found a bogon in the path, so make sure we never use it.
1895   set dummy $ac_cv_prog_CC
1896   shift
1897   if test $# -gt 0; then
1898     # We chose a different compiler from the bogus one.
1899     # However, it has the same basename, so the bogon will be chosen
1900     # first if we set CC to just the basename; use the full file name.
1901     shift
1902     set dummy "$ac_dir/$ac_word" "$@"
1903     shift
1904     ac_cv_prog_CC="$@"
1905   fi
1906 fi
1907 fi
1908 CC="$ac_cv_prog_CC"
1909 if test -n "$CC"; then
1910   echo "$ac_t""$CC" 1>&6
1911 else
1912   echo "$ac_t""no" 1>&6
1913 fi
1914
1915   if test -z "$CC"; then
1916     case "`uname -s`" in
1917     *win32* | *WIN32*)
1918       # Extract the first word of "cl", so it can be a program name with args.
1919 set dummy cl; ac_word=$2
1920 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1921 echo "configure:1922: checking for $ac_word" >&5
1922
1923 if test -n "$CC"; then
1924   ac_cv_prog_CC="$CC" # Let the user override the test.
1925 else
1926   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1927   ac_dummy="$PATH"
1928   for ac_dir in $ac_dummy; do
1929     test -z "$ac_dir" && ac_dir=.
1930     if test -f $ac_dir/$ac_word; then
1931       ac_cv_prog_CC="cl"
1932       break
1933     fi
1934   done
1935   IFS="$ac_save_ifs"
1936 fi
1937 CC="$ac_cv_prog_CC"
1938 if test -n "$CC"; then
1939   echo "$ac_t""$CC" 1>&6
1940 else
1941   echo "$ac_t""no" 1>&6
1942 fi
1943  ;;
1944     esac
1945   fi
1946   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1947 fi
1948
1949 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1950 echo "configure:1951: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1951
1952 ac_ext=c
1953 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1954 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1955 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'
1956 ac_cpp='$CPP '"$xe_cppflags"
1957 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1958 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1959 cross_compiling=no
1960
1961 cat > conftest.$ac_ext << EOF
1962
1963 #line 1964 "configure"
1964 #include "confdefs.h"
1965
1966 main(){return(0);}
1967 EOF
1968 if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1969   ac_cv_prog_cc_works=yes
1970   # If we can't run a trivial program, we are probably using a cross compiler.
1971   if (./conftest; exit) 2>/dev/null; then
1972     ac_cv_prog_cc_cross=no
1973   else
1974     ac_cv_prog_cc_cross=yes
1975   fi
1976 else
1977   echo "configure: failed program was:" >&5
1978   cat conftest.$ac_ext >&5
1979   ac_cv_prog_cc_works=no
1980 fi
1981 rm -fr conftest*
1982 ac_ext=c
1983 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1984 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1985 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'
1986 ac_cpp='$CPP '"$xe_cppflags"
1987 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1988 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1989 cross_compiling=no
1990
1991 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1992 if test $ac_cv_prog_cc_works = no; then
1993   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1994 fi
1995 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1996 echo "configure:1997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1997 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1998 cross_compiling=$ac_cv_prog_cc_cross
1999
2000 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2001 echo "configure:2002: checking whether we are using GNU C" >&5
2002
2003 cat > conftest.c <<EOF
2004 #ifdef __GNUC__
2005   yes;
2006 #endif
2007 EOF
2008 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2009   ac_cv_prog_gcc=yes
2010 else
2011   ac_cv_prog_gcc=no
2012 fi
2013
2014 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2015
2016 if test $ac_cv_prog_gcc = yes; then
2017   GCC=yes
2018 else
2019   GCC=
2020 fi
2021
2022 ac_test_CFLAGS="${CFLAGS+set}"
2023 ac_save_CFLAGS="$CFLAGS"
2024 CFLAGS=
2025 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2026 echo "configure:2027: checking whether ${CC-cc} accepts -g" >&5
2027
2028 echo 'void f(){}' > conftest.c
2029 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2030   ac_cv_prog_cc_g=yes
2031 else
2032   ac_cv_prog_cc_g=no
2033 fi
2034 rm -f conftest*
2035
2036
2037 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2038 if test "$ac_test_CFLAGS" = set; then
2039   CFLAGS="$ac_save_CFLAGS"
2040 elif test $ac_cv_prog_cc_g = yes; then
2041   if test "$GCC" = yes; then
2042     CFLAGS="-g -O2"
2043   else
2044     CFLAGS="-g"
2045   fi
2046 else
2047   if test "$GCC" = yes; then
2048     CFLAGS="-O2"
2049   else
2050     CFLAGS=
2051   fi
2052 fi
2053
2054 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2055   CC=gcc
2056   # Extract the first word of "gcc", so it can be a program name with args.
2057 set dummy gcc; ac_word=$2
2058 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2059 echo "configure:2060: checking for $ac_word" >&5
2060
2061 if test -n "$CC"; then
2062   ac_cv_prog_CC="$CC" # Let the user override the test.
2063 else
2064   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2065   ac_dummy="$PATH"
2066   for ac_dir in $ac_dummy; do
2067     test -z "$ac_dir" && ac_dir=.
2068     if test -f $ac_dir/$ac_word; then
2069       ac_cv_prog_CC="gcc"
2070       break
2071     fi
2072   done
2073   IFS="$ac_save_ifs"
2074 fi
2075 CC="$ac_cv_prog_CC"
2076 if test -n "$CC"; then
2077   echo "$ac_t""$CC" 1>&6
2078 else
2079   echo "$ac_t""no" 1>&6
2080 fi
2081
2082 if test -z "$CC"; then
2083   # Extract the first word of "cc", so it can be a program name with args.
2084 set dummy cc; ac_word=$2
2085 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2086 echo "configure:2087: checking for $ac_word" >&5
2087
2088 if test -n "$CC"; then
2089   ac_cv_prog_CC="$CC" # Let the user override the test.
2090 else
2091   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2092   ac_prog_rejected=no
2093   ac_dummy="$PATH"
2094   for ac_dir in $ac_dummy; do
2095     test -z "$ac_dir" && ac_dir=.
2096     if test -f $ac_dir/$ac_word; then
2097       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2098         ac_prog_rejected=yes
2099         continue
2100       fi
2101       ac_cv_prog_CC="cc"
2102       break
2103     fi
2104   done
2105   IFS="$ac_save_ifs"
2106 if test $ac_prog_rejected = yes; then
2107   # We found a bogon in the path, so make sure we never use it.
2108   set dummy $ac_cv_prog_CC
2109   shift
2110   if test $# -gt 0; then
2111     # We chose a different compiler from the bogus one.
2112     # However, it has the same basename, so the bogon will be chosen
2113     # first if we set CC to just the basename; use the full file name.
2114     shift
2115     set dummy "$ac_dir/$ac_word" "$@"
2116     shift
2117     ac_cv_prog_CC="$@"
2118   fi
2119 fi
2120 fi
2121 CC="$ac_cv_prog_CC"
2122 if test -n "$CC"; then
2123   echo "$ac_t""$CC" 1>&6
2124 else
2125   echo "$ac_t""no" 1>&6
2126 fi
2127
2128   if test -z "$CC"; then
2129     case "`uname -s`" in
2130     *win32* | *WIN32*)
2131       # Extract the first word of "cl", so it can be a program name with args.
2132 set dummy cl; ac_word=$2
2133 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2134 echo "configure:2135: checking for $ac_word" >&5
2135
2136 if test -n "$CC"; then
2137   ac_cv_prog_CC="$CC" # Let the user override the test.
2138 else
2139   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2140   ac_dummy="$PATH"
2141   for ac_dir in $ac_dummy; do
2142     test -z "$ac_dir" && ac_dir=.
2143     if test -f $ac_dir/$ac_word; then
2144       ac_cv_prog_CC="cl"
2145       break
2146     fi
2147   done
2148   IFS="$ac_save_ifs"
2149 fi
2150 CC="$ac_cv_prog_CC"
2151 if test -n "$CC"; then
2152   echo "$ac_t""$CC" 1>&6
2153 else
2154   echo "$ac_t""no" 1>&6
2155 fi
2156  ;;
2157     esac
2158   fi
2159   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2160 fi
2161
2162 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2163 echo "configure:2164: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2164
2165 ac_ext=c
2166 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2167 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2168 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'
2169 ac_cpp='$CPP '"$xe_cppflags"
2170 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2171 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2172 cross_compiling=no
2173
2174 cat > conftest.$ac_ext << EOF
2175
2176 #line 2177 "configure"
2177 #include "confdefs.h"
2178
2179 main(){return(0);}
2180 EOF
2181 if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2182   ac_cv_prog_cc_works=yes
2183   # If we can't run a trivial program, we are probably using a cross compiler.
2184   if (./conftest; exit) 2>/dev/null; then
2185     ac_cv_prog_cc_cross=no
2186   else
2187     ac_cv_prog_cc_cross=yes
2188   fi
2189 else
2190   echo "configure: failed program was:" >&5
2191   cat conftest.$ac_ext >&5
2192   ac_cv_prog_cc_works=no
2193 fi
2194 rm -fr conftest*
2195 ac_ext=c
2196 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2197 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2198 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'
2199 ac_cpp='$CPP '"$xe_cppflags"
2200 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2201 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2202 cross_compiling=no
2203
2204 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2205 if test $ac_cv_prog_cc_works = no; then
2206   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2207 fi
2208 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2209 echo "configure:2210: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2210 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2211 cross_compiling=$ac_cv_prog_cc_cross
2212
2213 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2214 echo "configure:2215: checking whether we are using GNU C" >&5
2215
2216 cat > conftest.c <<EOF
2217 #ifdef __GNUC__
2218   yes;
2219 #endif
2220 EOF
2221 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2222   ac_cv_prog_gcc=yes
2223 else
2224   ac_cv_prog_gcc=no
2225 fi
2226
2227 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2228
2229 if test $ac_cv_prog_gcc = yes; then
2230   GCC=yes
2231 else
2232   GCC=
2233 fi
2234
2235 ac_test_CFLAGS="${CFLAGS+set}"
2236 ac_save_CFLAGS="$CFLAGS"
2237 CFLAGS=
2238 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2239 echo "configure:2240: checking whether ${CC-cc} accepts -g" >&5
2240
2241 echo 'void f(){}' > conftest.c
2242 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2243   ac_cv_prog_cc_g=yes
2244 else
2245   ac_cv_prog_cc_g=no
2246 fi
2247 rm -f conftest*
2248
2249
2250 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2251 if test "$ac_test_CFLAGS" = set; then
2252   CFLAGS="$ac_save_CFLAGS"
2253 elif test $ac_cv_prog_cc_g = yes; then
2254   if test "$GCC" = yes; then
2255     CFLAGS="-g -O2"
2256   else
2257     CFLAGS="-g"
2258   fi
2259 else
2260   if test "$GCC" = yes; then
2261     CFLAGS="-O2"
2262   else
2263     CFLAGS=
2264   fi
2265 fi
2266
2267 fi
2268 CFLAGS="$xe_save_CFLAGS"
2269
2270
2271 test -n "$CPP" -a -d "$CPP" && CPP=
2272
2273 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2274
2275 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2276 echo "configure:2277: checking how to run the C preprocessor" >&5
2277 # On Suns, sometimes $CPP names a directory.
2278 if test -n "$CPP" && test -d "$CPP"; then
2279   CPP=
2280 fi
2281 if test -z "$CPP"; then
2282
2283   # This must be in double quotes, not single quotes, because CPP may get
2284   # substituted into the Makefile and "${CC-cc}" will confuse make.
2285   CPP="${CC-cc} -E"
2286   # On the NeXT, cc -E runs the code through the compiler's parser,
2287   # not just through cpp.
2288   cat > conftest.$ac_ext <<EOF
2289 #line 2290 "configure"
2290 #include "confdefs.h"
2291 #include <assert.h>
2292 Syntax Error
2293 EOF
2294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2295 { (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2297 if test -z "$ac_err"; then
2298   :
2299 else
2300   echo "$ac_err" >&5
2301   echo "configure: failed program was:" >&5
2302   cat conftest.$ac_ext >&5
2303   rm -rf conftest*
2304   CPP="${CC-cc} -E -traditional-cpp"
2305   cat > conftest.$ac_ext <<EOF
2306 #line 2307 "configure"
2307 #include "confdefs.h"
2308 #include <assert.h>
2309 Syntax Error
2310 EOF
2311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2312 { (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2314 if test -z "$ac_err"; then
2315   :
2316 else
2317   echo "$ac_err" >&5
2318   echo "configure: failed program was:" >&5
2319   cat conftest.$ac_ext >&5
2320   rm -rf conftest*
2321   CPP="${CC-cc} -nologo -E"
2322   cat > conftest.$ac_ext <<EOF
2323 #line 2324 "configure"
2324 #include "confdefs.h"
2325 #include <assert.h>
2326 Syntax Error
2327 EOF
2328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2329 { (eval echo configure:2330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2331 if test -z "$ac_err"; then
2332   :
2333 else
2334   echo "$ac_err" >&5
2335   echo "configure: failed program was:" >&5
2336   cat conftest.$ac_ext >&5
2337   rm -rf conftest*
2338   CPP=/lib/cpp
2339 fi
2340 rm -f conftest*
2341 fi
2342 rm -f conftest*
2343 fi
2344 rm -f conftest*
2345   ac_cv_prog_CPP="$CPP"
2346   CPP="$ac_cv_prog_CPP"
2347 else
2348   ac_cv_prog_CPP="$CPP"
2349 fi
2350 echo "$ac_t""$CPP" 1>&6
2351
2352
2353
2354 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2355 echo "configure:2356: checking for AIX" >&5
2356 cat > conftest.$ac_ext <<EOF
2357 #line 2358 "configure"
2358 #include "confdefs.h"
2359 #ifdef _AIX
2360   yes
2361 #endif
2362
2363 EOF
2364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2365   egrep "yes" >/dev/null 2>&1; then
2366   rm -rf conftest*
2367   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2368     Defining _ALL_SOURCE
2369 EOF
2370 cat >> confdefs.h <<\EOF
2371 #define _ALL_SOURCE 1
2372 EOF
2373 }
2374
2375 else
2376   rm -rf conftest*
2377   echo "$ac_t""no" 1>&6
2378 fi
2379 rm -f conftest*
2380
2381  
2382
2383 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2384 echo "configure:2385: checking for GNU libc" >&5
2385 cat > conftest.$ac_ext <<EOF
2386 #line 2387 "configure"
2387 #include "confdefs.h"
2388 #include <features.h>
2389 int main() {
2390
2391 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2392 #error Not a GNU libc system :-(
2393 ******* ======= ******** &&&&&&&&
2394 #endif
2395
2396 ; return 0; }
2397 EOF
2398 if { (eval echo configure:2399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2399   rm -rf conftest*
2400   have_glibc=yes
2401 else
2402   echo "configure: failed program was:" >&5
2403   cat conftest.$ac_ext >&5
2404   rm -rf conftest*
2405   have_glibc=no
2406 fi
2407 rm -f conftest*
2408 echo "$ac_t""$have_glibc" 1>&6
2409 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2410     Defining _GNU_SOURCE
2411 EOF
2412 cat >> confdefs.h <<\EOF
2413 #define _GNU_SOURCE 1
2414 EOF
2415 }
2416
2417
2418 case "$opsys" in
2419   sol2)
2420    { test "$extra_verbose" = "yes" && cat << \EOF
2421     Defining __EXTENSIONS__
2422 EOF
2423 cat >> confdefs.h <<\EOF
2424 #define __EXTENSIONS__ 1
2425 EOF
2426 }
2427
2428       if test "$os_release" -ge 55; then
2429      { test "$extra_verbose" = "yes" && cat << \EOF
2430     Defining _XOPEN_SOURCE = 500
2431 EOF
2432 cat >> confdefs.h <<\EOF
2433 #define _XOPEN_SOURCE 500
2434 EOF
2435 }
2436
2437      { test "$extra_verbose" = "yes" && cat << \EOF
2438     Defining _XOPEN_SOURCE_EXTENDED
2439 EOF
2440 cat >> confdefs.h <<\EOF
2441 #define _XOPEN_SOURCE_EXTENDED 1
2442 EOF
2443 }
2444
2445    fi ;;
2446   linux)
2447     { test "$extra_verbose" = "yes" && cat << \EOF
2448     Defining _POSIX_C_SOURCE = 199506L
2449 EOF
2450 cat >> confdefs.h <<\EOF
2451 #define _POSIX_C_SOURCE 199506L
2452 EOF
2453 }
2454
2455     { test "$extra_verbose" = "yes" && cat << \EOF
2456     Defining _XOPEN_SOURCE = 500
2457 EOF
2458 cat >> confdefs.h <<\EOF
2459 #define _XOPEN_SOURCE 500
2460 EOF
2461 }
2462
2463     { test "$extra_verbose" = "yes" && cat << \EOF
2464     Defining _XOPEN_SOURCE_EXTENDED
2465 EOF
2466 cat >> confdefs.h <<\EOF
2467 #define _XOPEN_SOURCE_EXTENDED 1
2468 EOF
2469 }
2470
2471     ;;
2472 esac
2473
2474 cat > conftest.$ac_ext <<EOF
2475 #line 2476 "configure"
2476 #include "confdefs.h"
2477 int main () {
2478 #if defined __SUNPRO_C
2479 return 11;
2480 #elif defined __DECC
2481 return 12;
2482 #elif defined __USLC__ && defined __SCO_VERSION__
2483 return 13;
2484 #else
2485 return 0;
2486 #endif
2487 }
2488 EOF
2489 if { (eval echo configure:2490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2490 then
2491   :
2492 else
2493   conftest_rc="$?"
2494   echo "configure: failed program was:" >&5
2495   cat conftest.$ac_ext >&5
2496   rm -fr conftest*
2497   case "$conftest_rc" in
2498   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2499   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2500   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2501 esac
2502 fi
2503 rm -fr conftest*
2504
2505
2506
2507
2508 echo "Extracting information from the machine- and system-dependent headers..."
2509
2510 tempcname="conftest.c"
2511
2512
2513
2514 cat > $tempcname < confdefs.h
2515 cat >> $tempcname <<EOF
2516 #define NOT_C_CODE
2517 #define C_SWITCH_SITE
2518 #define C_SWITCH_X_SITE
2519 #define LD_SWITCH_SITE
2520 #define LD_SWITCH_X_SITE
2521 #define LD_SWITCH_X_SITE_AUX
2522 #define OS_RELEASE $os_release
2523
2524 #ifdef config_opsysfile
2525 #include "$srcdir/src/$opsysfile"
2526 #endif
2527
2528 #ifdef config_machfile
2529 #include "$srcdir/src/$machfile"
2530 #endif
2531
2532 #ifndef LIBS_MACHINE
2533 #define LIBS_MACHINE
2534 #endif
2535 configure___ libs_machine=LIBS_MACHINE
2536
2537 #ifndef LIBS_SYSTEM
2538 #define LIBS_SYSTEM
2539 #endif
2540 configure___ libs_system=LIBS_SYSTEM
2541
2542 #ifndef LIBS_TERMCAP
2543 #define LIBS_TERMCAP
2544 #endif
2545 configure___ libs_termcap=LIBS_TERMCAP
2546
2547 #ifndef LIB_STANDARD
2548 #define LIB_STANDARD
2549 #endif
2550 configure___ libs_standard=LIB_STANDARD
2551
2552
2553 #ifndef OBJECTS_MACHINE
2554 #define OBJECTS_MACHINE
2555 #endif
2556 configure___ objects_machine=OBJECTS_MACHINE
2557
2558 #ifndef OBJECTS_SYSTEM
2559 #define OBJECTS_SYSTEM
2560 #endif
2561 configure___ objects_system=OBJECTS_SYSTEM
2562
2563
2564 #ifndef C_SWITCH_MACHINE
2565 #define C_SWITCH_MACHINE
2566 #endif
2567 configure___ c_switch_machine=C_SWITCH_MACHINE
2568
2569 #ifndef C_SWITCH_SYSTEM
2570 #define C_SWITCH_SYSTEM
2571 #endif
2572 configure___ c_switch_system=C_SWITCH_SYSTEM
2573
2574
2575 #ifndef LD_SWITCH_MACHINE
2576 #define LD_SWITCH_MACHINE
2577 #endif
2578 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2579
2580 #ifndef LD_SWITCH_SYSTEM
2581 #define LD_SWITCH_SYSTEM
2582 #endif
2583 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2584
2585
2586 #ifndef UNEXEC
2587 #define UNEXEC "unexec.o"
2588 #endif
2589 configure___ unexec=UNEXEC
2590
2591
2592 #ifndef LD_SWITCH_SHARED
2593 #define LD_SWITCH_SHARED "-c"
2594 #endif
2595 configure___ ld_switch_shared=LD_SWITCH_SHARED
2596
2597
2598 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2599 configure___ ordinary_ld=ORDINARY_LD
2600
2601 #ifdef ORDINARY_LINK
2602 #define LD ORDINARY_LD
2603 #else /* no ORDINARY LINK */
2604 #ifdef COFF_ENCAPSULATE
2605 #define LD "\$(CC) -nostdlib"
2606 #else /* not COFF_ENCAPSULATE */
2607 #ifdef LINKER
2608 #define LD LINKER
2609 #else /* ! defined (LINKER) */
2610 #define LD "ld"
2611 #endif /* ! defined (LINKER) */
2612 #endif /* ! defined (COFF_ENCAPSULATE) */
2613 #endif /* not ORDINARY_LINK */
2614 configure___ ld=LD
2615
2616 #ifndef LIB_GCC
2617 #define LIB_GCC
2618 #endif
2619 configure___ lib_gcc=LIB_GCC
2620
2621 #ifndef LD_TEXT_START_ADDR
2622 #define LD_TEXT_START_ADDR
2623 #endif
2624 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2625
2626
2627 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2628 #ifdef NO_REMAP
2629 #ifdef COFF_ENCAPSULATE
2630 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2631 #else /* ! defined (COFF_ENCAPSULATE) */
2632 #define START_FILES "pre-crt0.o /lib/crt0.o"
2633 #endif /* ! defined (COFF_ENCAPSULATE) */
2634 #else /* ! defined (NO_REMAP) */
2635 #define START_FILES "ecrt0.o"
2636 #endif /* ! defined (NO_REMAP) */
2637 #endif /* no ORDINARY_LINK */
2638 #ifndef START_FILES
2639 #define START_FILES
2640 #endif
2641 configure___ start_files=START_FILES
2642
2643 #ifdef ORDINARY_LINK
2644 configure___ ordinary_link=yes
2645 #else
2646 configure___ ordinary_link=no
2647 #endif
2648
2649 #ifdef SYSTEM_MALLOC
2650 configure___ system_malloc=yes
2651 #else
2652 configure___ system_malloc=no
2653 #endif
2654
2655 #ifdef TERMINFO
2656 configure___ have_terminfo=yes
2657 #else
2658 configure___ have_terminfo=no
2659 #endif
2660
2661 #ifdef MAIL_USE_FLOCK
2662 configure___ mail_use_flock=yes
2663 #else
2664 configure___ mail_use_flock=no
2665 #endif
2666
2667 #ifdef MAIL_USE_LOCKF
2668 configure___ mail_use_lockf=yes
2669 #else
2670 configure___ mail_use_lockf=no
2671 #endif
2672
2673 #ifdef MAIL_USE_LOCKING
2674 configure___ mail_use_locking=yes
2675 #else
2676 configure___ mail_use_locking=no
2677 #endif
2678
2679 #ifdef HAVE_WIN32_PROCESSES
2680 configure___ win32_processes=yes
2681 #else
2682 configure___ win32_processes=no
2683 #endif
2684
2685 EOF
2686
2687 CPP=`eval "echo $CPP $CPPFLAGS"`
2688 eval `$CPP -Isrc $tempcname \
2689         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2690
2691 rm $tempcname
2692
2693 if test "$pdump" = "yes"; then
2694   ordinary_link="yes"
2695   ld="${ordinary_ld}"
2696   start_files=
2697   libs_standard=
2698   unexec=
2699   lib_gcc=
2700 fi
2701
2702 test "$extra_verbose" = "yes" && \
2703   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 ""
2704
2705 case "$opsys" in mingw* | cygwin*)
2706   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2707   cygwin_include=`eval "dirname $cygwin_include"` ;
2708   cygwin_include="-I$cygwin_include/../include" ;
2709   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2710   case "$opsys" in mingw*)
2711     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2712   esac
2713   ;;
2714 esac
2715
2716 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2717
2718
2719 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2720
2721 if test "$__USLC__" = yes; then
2722   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2723 echo "configure:2724: checking for whether the -Kalloca compiler flag is needed" >&5
2724   need_kalloca=no
2725   cat > conftest.$ac_ext <<EOF
2726 #line 2727 "configure"
2727 #include "confdefs.h"
2728
2729 int main() {
2730 void *x = alloca(4);
2731 ; return 0; }
2732 EOF
2733 if { (eval echo configure:2734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2734   rm -rf conftest*
2735   :
2736 else
2737   echo "configure: failed program was:" >&5
2738   cat conftest.$ac_ext >&5
2739   rm -rf conftest*
2740   
2741     xe_save_c_switch_system="$c_switch_system"
2742     c_switch_system="$c_switch_system -Kalloca"
2743     cat > conftest.$ac_ext <<EOF
2744 #line 2745 "configure"
2745 #include "confdefs.h"
2746
2747 int main() {
2748 void *x = alloca(4);
2749 ; return 0; }
2750 EOF
2751 if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2752   rm -rf conftest*
2753    need_kalloca=yes 
2754 else
2755   echo "configure: failed program was:" >&5
2756   cat conftest.$ac_ext >&5
2757 fi
2758 rm -f conftest*
2759     c_switch_system="$xe_save_c_switch_system"
2760 fi
2761 rm -f conftest*
2762   echo "$ac_t""$need_kalloca" 1>&6
2763   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
2764 fi
2765
2766 if test "$cflags_specified" = "no"; then
2767       if   test "$GCC" = "yes"; then
2768     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2769         CFLAGS="$CFLAGS -Wsign-compare"
2770                 if test "$xemacs_compiler" != "g++"; then
2771       CFLAGS="$CFLAGS -Wshadow"
2772     fi
2773             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2774               elif test "$__SUNPRO_C" = "yes"; then
2775     case "$opsys" in
2776       sol2    ) CFLAGS="-v -xO4" ;;
2777       sunos4* ) CFLAGS="-xO2";;
2778     esac
2779   elif test "$__DECC" = "yes"; then
2780     CFLAGS="-O3"
2781   elif test "$CC" = "xlc"; then
2782     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2783     else
2784     CFLAGS="-O" ;  fi
2785 fi
2786
2787 if test "$GCC" = "yes"; then
2788 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2789 echo "configure:2790: checking for buggy gcc versions" >&5
2790 GCC_VERSION=`$CC --version`
2791 case `uname -s`:`uname -m`:$GCC_VERSION in
2792                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2793                         case "$CFLAGS" in
2794             *-O2*|*-O3*)
2795                 case "$CFLAGS" in
2796                     *-fno-schedule-insns*) ;;
2797                     *)
2798                         echo "$ac_t""yes" 1>&6
2799                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2800                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2801                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2802                         ;;
2803                 esac
2804                 ;;
2805         esac
2806         ;;
2807                     Linux:alpha:egcs-2.91.*)
2808         echo "$ac_t""yes" 1>&6
2809         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2810         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2811         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2812         ;;
2813     *:i*86*:2.7.2*)
2814         case "$CFLAGS" in
2815             *-O2*|*-O3*)
2816                 case "$GCC_VERSION" in
2817                     2.7.2)
2818                         case "$CFLAGS" in
2819                             *-fno-strength-reduce*) ;;
2820                             *)
2821                                 echo "$ac_t""yes" 1>&6
2822                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2823                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2824                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2825                                 ;;
2826                         esac
2827                         ;;
2828                 esac
2829                 case "$CFLAGS" in
2830                  *-fno-caller-saves*) ;;
2831                  *)
2832                     echo "$ac_t""yes" 1>&6
2833                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2834                     echo "configure: warning: -fno-caller-saves." 1>&2
2835                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2836                     ;;
2837                 esac
2838                 ;;
2839         esac
2840         ;;
2841 esac
2842 echo "$ac_t""no" 1>&6
2843 fi
2844
2845
2846 if test "$GCC" = "yes"; then
2847   set x $ld_switch_system; shift; ld_switch_system=""
2848   while test -n "$1"; do
2849     case $1 in
2850       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2851       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2852       -Xlinker* ) ;;
2853       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2854     esac
2855     shift
2856   done
2857 fi
2858
2859 if test "$GCC" = "yes"; then
2860   set x $ld_switch_machine; shift; ld_switch_machine=""
2861   while test -n "$1"; do
2862     case $1 in
2863       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2864       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2865       -Xlinker* ) ;;
2866       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2867     esac
2868     shift
2869   done
2870 fi
2871
2872 if test "$GCC" = "yes"; then
2873   set x $LDFLAGS; shift; LDFLAGS=""
2874   while test -n "$1"; do
2875     case $1 in
2876       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2877       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2878       -Xlinker* ) ;;
2879       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2880     esac
2881     shift
2882   done
2883 fi
2884
2885 if test "$GCC" = "yes"; then
2886   set x $ld_call_shared; shift; ld_call_shared=""
2887   while test -n "$1"; do
2888     case $1 in
2889       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2890       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2891       -Xlinker* ) ;;
2892       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2893     esac
2894     shift
2895   done
2896 fi
2897
2898 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2899    echo "    xemacs will be linked with \"$objects_machine\""
2900  fi
2901 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2902    echo "    xemacs will be linked with \"$objects_system\""
2903  fi
2904 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2905    echo "    xemacs will be linked with \"$unexec\""
2906  fi
2907 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2908    echo "    xemacs will be linked with \"dumper.o\""
2909  fi
2910
2911 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2912 echo "configure:2913: checking for dynodump" >&5
2913 if test "$unexec" != "unexsol2.o"; then
2914   echo "$ac_t""no" 1>&6
2915 else
2916   echo "$ac_t""yes" 1>&6
2917   { test "$extra_verbose" = "yes" && cat << \EOF
2918     Defining DYNODUMP
2919 EOF
2920 cat >> confdefs.h <<\EOF
2921 #define DYNODUMP 1
2922 EOF
2923 }
2924
2925   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2926   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2927   case "$machine" in
2928     sparc   ) dynodump_arch=sparc ;;
2929     *86*    ) dynodump_arch=i386  ;;
2930     powerpc ) dynodump_arch=ppc   ;;
2931   esac
2932     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
2933 fi
2934
2935
2936 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2937
2938 if test "$unexec" = "unexaix.o"; then
2939   if   test "$dynamic" = "no"; then
2940   start_flags="-Wl,-bnso,-bnodelcsect"
2941   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2942   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2943     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2944   done
2945   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2946     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2947   done
2948   
2949 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2950 echo "configure:2951: checking for terminateAndUnload in -lC" >&5
2951 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2952
2953 xe_check_libs=" -lC "
2954 cat > conftest.$ac_ext <<EOF
2955 #line 2956 "configure"
2956 #include "confdefs.h"
2957 /* Override any gcc2 internal prototype to avoid an error.  */
2958 /* We use char because int might match the return type of a gcc2
2959     builtin and then its argument prototype would still apply.  */
2960 char terminateAndUnload();
2961
2962 int main() {
2963 terminateAndUnload()
2964 ; return 0; }
2965 EOF
2966 if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2967   rm -rf conftest*
2968   eval "ac_cv_lib_$ac_lib_var=yes"
2969 else
2970   echo "configure: failed program was:" >&5
2971   cat conftest.$ac_ext >&5
2972   rm -rf conftest*
2973   eval "ac_cv_lib_$ac_lib_var=no"
2974 fi
2975 rm -f conftest*
2976 xe_check_libs=""
2977
2978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2979   echo "$ac_t""yes" 1>&6
2980   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2981 else
2982   echo "$ac_t""no" 1>&6
2983 fi
2984
2985
2986   fi
2987 elif test -n "$ld_text_start_addr"; then
2988   start_flags="-T $ld_text_start_addr -e __start"
2989 fi
2990
2991
2992
2993
2994 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2995  test -z "$linker" &&  linker='$(CC) -nostdlib'
2996  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2997 fi
2998 test "$GCC" != "yes" && lib_gcc=
2999
3000
3001
3002
3003
3004 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3005 if test -n "$site_libraries"; then
3006   for arg in $site_libraries; do
3007     case "$arg" in
3008      -* ) ;;
3009      * ) test -d "$arg" || \
3010            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3011        arg="-L${arg}" ;;
3012     esac
3013     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3014   done
3015 fi
3016
3017 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3018 if test -n "$site_includes"; then
3019   for arg in $site_includes; do
3020     case "$arg" in
3021       -* ) ;;
3022       * ) test -d "$arg" || \
3023            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3024       arg="-I${arg}" ;;
3025     esac
3026     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3027   done
3028 fi
3029
3030 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3031 if test -n "$site_prefixes"; then
3032   for dir in $site_prefixes; do
3033     lib_dir="${dir}/lib"
3034     inc_dir="${dir}/include"
3035     if test ! -d "$dir"; then
3036       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3037     elif test ! -d "$lib_dir"; then
3038       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3039     else
3040       if test -d "$inc_dir"; then
3041         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
3042       fi
3043       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
3044     fi
3045   done
3046 fi
3047
3048
3049 for dir in "/usr/ccs/lib"; do
3050   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
3051 done
3052
3053 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3054 if test -n "$site_runtime_libraries"; then
3055   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3056   export LD_RUN_PATH
3057 fi
3058
3059
3060
3061
3062
3063 if test -n "$add_runtime_path"; then :;
3064 elif test "$dynamic" = "no"; then add_runtime_path=no
3065 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3066 else case "$opsys" in
3067        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3068        * ) add_runtime_path=no ;;
3069      esac
3070 fi
3071
3072 if test "$add_runtime_path" = "yes"; then
3073       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3074 echo "configure:3075: checking "for runtime libraries flag"" >&5
3075   case "$opsys" in
3076     sol2 ) dash_r="-R" ;;
3077     decosf* | linux* | irix*) dash_r="-rpath " ;;
3078     *)
3079       dash_r=""
3080       for try_dash_r in "-R" "-R " "-rpath "; do
3081         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3082         
3083 if test "$GCC" = "yes"; then
3084   set x $xe_check_libs; shift; xe_check_libs=""
3085   while test -n "$1"; do
3086     case $1 in
3087       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3088       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3089       -Xlinker* ) ;;
3090       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3091     esac
3092     shift
3093   done
3094 fi
3095         cat > conftest.$ac_ext <<EOF
3096 #line 3097 "configure"
3097 #include "confdefs.h"
3098
3099 int main() {
3100
3101 ; return 0; }
3102 EOF
3103 if { (eval echo configure:3104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3104   rm -rf conftest*
3105   dash_r="$try_dash_r"
3106 else
3107   echo "configure: failed program was:" >&5
3108   cat conftest.$ac_ext >&5
3109 fi
3110 rm -f conftest*
3111         xe_check_libs=""
3112         test -n "$dash_r" && break
3113       done ;;
3114   esac
3115   if test -n "$dash_r";
3116     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3117     else echo "$ac_t""NONE" 1>&6
3118   fi
3119 fi
3120
3121 xe_add_unique_runpath_dir='
3122   xe_add_p=yes
3123   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3124   done
3125   if test "$xe_add_p" = "yes"; then
3126     test -n "$runpath" && runpath="${runpath}:"
3127     runpath="${runpath}${xe_runpath_dir}"
3128     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3129   fi'
3130
3131
3132
3133
3134 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3135     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3136   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3137   
3138         runpath="" runpath_dirs=""
3139   if test -n "$LD_RUN_PATH"; then
3140     runpath="$LD_RUN_PATH"
3141   elif test "$GCC" = "yes"; then
3142         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3143     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3144     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3145     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3146       case "$arg" in P,* | -L* | -R* )
3147         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3148           {
3149 xe_runpath_dir="$dir"
3150   test "$xe_runpath_dir" != "/lib"     -a \
3151         "$xe_runpath_dir" != "/usr/lib" -a \
3152         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3153   eval "$xe_add_unique_runpath_dir"
3154 }
3155         done ;;
3156       esac
3157     done
3158     ld_switch_run="$ld_switch_run_save"
3159     rm -f conftest*
3160   else
3161         for arg in $ld_switch_site $ld_switch_x_site; do
3162       case "$arg" in -L*) {
3163 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3164   test "$xe_runpath_dir" != "/lib"     -a \
3165         "$xe_runpath_dir" != "/usr/lib" -a \
3166         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3167   eval "$xe_add_unique_runpath_dir"
3168 };; esac
3169     done
3170         if test "$opsys $need_motif" = "sol2 yes"; then
3171       xe_runpath_dir="/opt/SUNWdt/lib";
3172       eval "$xe_add_unique_runpath_dir";
3173     fi
3174   fi 
3175   if test -n "$runpath"; then
3176     ld_switch_run="${dash_r}${runpath}"
3177     
3178 if test "$GCC" = "yes"; then
3179   set x $ld_switch_run; shift; ld_switch_run=""
3180   while test -n "$1"; do
3181     case $1 in
3182       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3183       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3184       -Xlinker* ) ;;
3185       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3186     esac
3187     shift
3188   done
3189 fi
3190     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3191   fi
3192 fi
3193
3194
3195
3196 GNU_MALLOC=yes
3197 if test "$with_dlmalloc" != "no"; then
3198         doug_lea_malloc=yes
3199 else
3200         doug_lea_malloc=no
3201 fi
3202 after_morecore_hook_exists=yes
3203 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3204 echo "configure:3205: checking for malloc_set_state" >&5
3205
3206 cat > conftest.$ac_ext <<EOF
3207 #line 3208 "configure"
3208 #include "confdefs.h"
3209 /* System header to define __stub macros and hopefully few prototypes,
3210     which can conflict with char malloc_set_state(); below.  */
3211 #include <assert.h>
3212 /* Override any gcc2 internal prototype to avoid an error.  */
3213 /* We use char because int might match the return type of a gcc2
3214     builtin and then its argument prototype would still apply.  */
3215 char malloc_set_state();
3216
3217 int main() {
3218
3219 /* The GNU C library defines this for functions which it implements
3220     to always fail with ENOSYS.  Some functions are actually named
3221     something starting with __ and the normal name is an alias.  */
3222 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3223 choke me
3224 #else
3225 malloc_set_state();
3226 #endif
3227
3228 ; return 0; }
3229 EOF
3230 if { (eval echo configure:3231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3231   rm -rf conftest*
3232   eval "ac_cv_func_malloc_set_state=yes"
3233 else
3234   echo "configure: failed program was:" >&5
3235   cat conftest.$ac_ext >&5
3236   rm -rf conftest*
3237   eval "ac_cv_func_malloc_set_state=no"
3238 fi
3239 rm -f conftest*
3240
3241 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3242   echo "$ac_t""yes" 1>&6
3243   :
3244 else
3245   echo "$ac_t""no" 1>&6
3246 doug_lea_malloc=no
3247 fi
3248
3249 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3250 echo "configure:3251: checking whether __after_morecore_hook exists" >&5
3251 cat > conftest.$ac_ext <<EOF
3252 #line 3253 "configure"
3253 #include "confdefs.h"
3254 extern void (* __after_morecore_hook)();
3255 int main() {
3256 __after_morecore_hook = 0
3257 ; return 0; }
3258 EOF
3259 if { (eval echo configure:3260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3260   rm -rf conftest*
3261   echo "$ac_t""yes" 1>&6
3262 else
3263   echo "configure: failed program was:" >&5
3264   cat conftest.$ac_ext >&5
3265   rm -rf conftest*
3266   echo "$ac_t""no" 1>&6
3267    after_morecore_hook_exists=no
3268 fi
3269 rm -f conftest*
3270 if test "$system_malloc" = "yes" ; then
3271   GNU_MALLOC=no
3272   GNU_MALLOC_reason="
3273     - The GNU allocators don't work with this system configuration."
3274 elif test "$with_system_malloc" = "yes" ; then
3275   GNU_MALLOC=no
3276   GNU_MALLOC_reason="
3277     - User chose not to use GNU allocators."
3278 elif test "$with_debug_malloc" = "yes" ; then
3279   GNU_MALLOC=no
3280   GNU_MALLOC_reason="
3281     - User chose to use Debugging Malloc."
3282 fi
3283
3284 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3285   GNU_MALLOC_reason="
3286     - Using Doug Lea's new malloc from the GNU C Library."
3287   { test "$extra_verbose" = "yes" && cat << \EOF
3288     Defining DOUG_LEA_MALLOC
3289 EOF
3290 cat >> confdefs.h <<\EOF
3291 #define DOUG_LEA_MALLOC 1
3292 EOF
3293 }
3294
3295   if test "$after_morecore_hook_exists" = "no" ; then
3296     GNU_MALLOC_reason="
3297     - Using Doug Lea's new malloc from the Linux C Library."
3298     { test "$extra_verbose" = "yes" && cat << \EOF
3299     Defining _NO_MALLOC_WARNING_
3300 EOF
3301 cat >> confdefs.h <<\EOF
3302 #define _NO_MALLOC_WARNING_ 1
3303 EOF
3304 }
3305
3306   fi
3307 fi
3308
3309
3310
3311
3312 # Extract the first word of "ranlib", so it can be a program name with args.
3313 set dummy ranlib; ac_word=$2
3314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3315 echo "configure:3316: checking for $ac_word" >&5
3316
3317 if test -n "$RANLIB"; then
3318   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3319 else
3320   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3321   ac_dummy="$PATH"
3322   for ac_dir in $ac_dummy; do
3323     test -z "$ac_dir" && ac_dir=.
3324     if test -f $ac_dir/$ac_word; then
3325       ac_cv_prog_RANLIB="ranlib"
3326       break
3327     fi
3328   done
3329   IFS="$ac_save_ifs"
3330   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3331 fi
3332 RANLIB="$ac_cv_prog_RANLIB"
3333 if test -n "$RANLIB"; then
3334   echo "$ac_t""$RANLIB" 1>&6
3335 else
3336   echo "$ac_t""no" 1>&6
3337 fi
3338
3339 ac_aux_dir=
3340 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3341   if test -f $ac_dir/install-sh; then
3342     ac_aux_dir=$ac_dir
3343     ac_install_sh="$ac_aux_dir/install-sh -c"
3344     break
3345   elif test -f $ac_dir/install.sh; then
3346     ac_aux_dir=$ac_dir
3347     ac_install_sh="$ac_aux_dir/install.sh -c"
3348     break
3349   fi
3350 done
3351 if test -z "$ac_aux_dir"; then
3352   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3353 fi
3354 ac_config_guess=$ac_aux_dir/config.guess
3355 ac_config_sub=$ac_aux_dir/config.sub
3356 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3357
3358 # Find a good install program.  We prefer a C program (faster),
3359 # so one script is as good as another.  But avoid the broken or
3360 # incompatible versions:
3361 # SysV /etc/install, /usr/sbin/install
3362 # SunOS /usr/etc/install
3363 # IRIX /sbin/install
3364 # AIX /bin/install
3365 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3366 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3367 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3368 # ./install, which can be erroneously created by make from ./install.sh.
3369 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3370 echo "configure:3371: checking for a BSD compatible install" >&5
3371 if test -z "$INSTALL"; then
3372
3373   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3374   for ac_dir in $PATH; do
3375     # Account for people who put trailing slashes in PATH elements.
3376     case "$ac_dir/" in
3377     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3378     *)
3379       # OSF1 and SCO ODT 3.0 have their own names for install.
3380       # Don't use installbsd from OSF since it installs stuff as root
3381       # by default.
3382       for ac_prog in ginstall scoinst install; do
3383         if test -f $ac_dir/$ac_prog; then
3384           if test $ac_prog = install &&
3385             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3386             # AIX install.  It has an incompatible calling convention.
3387             :
3388           else
3389             ac_cv_path_install="$ac_dir/$ac_prog -c"
3390             break 2
3391           fi
3392         fi
3393       done
3394       ;;
3395     esac
3396   done
3397   IFS="$ac_save_IFS"
3398
3399   if test "${ac_cv_path_install+set}" = set; then
3400     INSTALL="$ac_cv_path_install"
3401   else
3402     # As a last resort, use the slow shell script.  We don't cache a
3403     # path for INSTALL within a source directory, because that will
3404     # break other packages using the cache if that directory is
3405     # removed, or if the path is relative.
3406     INSTALL="$ac_install_sh"
3407   fi
3408 fi
3409 echo "$ac_t""$INSTALL" 1>&6
3410
3411 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3412 # It thinks the first close brace ends the variable substitution.
3413 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3414
3415 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3416
3417 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3418
3419 for ac_prog in 'bison -y' byacc
3420 do
3421 # Extract the first word of "$ac_prog", so it can be a program name with args.
3422 set dummy $ac_prog; ac_word=$2
3423 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3424 echo "configure:3425: checking for $ac_word" >&5
3425
3426 if test -n "$YACC"; then
3427   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3428 else
3429   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3430   ac_dummy="$PATH"
3431   for ac_dir in $ac_dummy; do
3432     test -z "$ac_dir" && ac_dir=.
3433     if test -f $ac_dir/$ac_word; then
3434       ac_cv_prog_YACC="$ac_prog"
3435       break
3436     fi
3437   done
3438   IFS="$ac_save_ifs"
3439 fi
3440 YACC="$ac_cv_prog_YACC"
3441 if test -n "$YACC"; then
3442   echo "$ac_t""$YACC" 1>&6
3443 else
3444   echo "$ac_t""no" 1>&6
3445 fi
3446
3447 test -n "$YACC" && break
3448 done
3449 test -n "$YACC" || YACC="yacc"
3450
3451
3452 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 
3453 do
3454 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3455 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3456 echo "configure:3457: checking for $ac_hdr" >&5
3457
3458 cat > conftest.$ac_ext <<EOF
3459 #line 3460 "configure"
3460 #include "confdefs.h"
3461 #include <$ac_hdr>
3462 EOF
3463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3464 { (eval echo configure:3465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3466 if test -z "$ac_err"; then
3467   rm -rf conftest*
3468   eval "ac_cv_header_$ac_safe=yes"
3469 else
3470   echo "$ac_err" >&5
3471   echo "configure: failed program was:" >&5
3472   cat conftest.$ac_ext >&5
3473   rm -rf conftest*
3474   eval "ac_cv_header_$ac_safe=no"
3475 fi
3476 rm -f conftest*
3477 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3478   echo "$ac_t""yes" 1>&6
3479     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3480   { test "$extra_verbose" = "yes" && cat << EOF
3481     Defining $ac_tr_hdr
3482 EOF
3483 cat >> confdefs.h <<EOF
3484 #define $ac_tr_hdr 1
3485 EOF
3486 }
3487  
3488 else
3489   echo "$ac_t""no" 1>&6
3490 fi
3491 done
3492
3493 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3494 echo "configure:3495: checking for sys/wait.h that is POSIX.1 compatible" >&5
3495
3496 cat > conftest.$ac_ext <<EOF
3497 #line 3498 "configure"
3498 #include "confdefs.h"
3499 #include <sys/types.h>
3500 #include <sys/wait.h>
3501 #ifndef WEXITSTATUS
3502 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3503 #endif
3504 #ifndef WIFEXITED
3505 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3506 #endif
3507 int main() {
3508 int s;
3509 wait (&s);
3510 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3511 ; return 0; }
3512 EOF
3513 if { (eval echo configure:3514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3514   rm -rf conftest*
3515   ac_cv_header_sys_wait_h=yes
3516 else
3517   echo "configure: failed program was:" >&5
3518   cat conftest.$ac_ext >&5
3519   rm -rf conftest*
3520   ac_cv_header_sys_wait_h=no
3521 fi
3522 rm -f conftest*
3523
3524 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3525 if test $ac_cv_header_sys_wait_h = yes; then
3526   { test "$extra_verbose" = "yes" && cat << \EOF
3527     Defining HAVE_SYS_WAIT_H
3528 EOF
3529 cat >> confdefs.h <<\EOF
3530 #define HAVE_SYS_WAIT_H 1
3531 EOF
3532 }
3533
3534 fi
3535
3536 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3537 echo "configure:3538: checking for ANSI C header files" >&5
3538
3539 cat > conftest.$ac_ext <<EOF
3540 #line 3541 "configure"
3541 #include "confdefs.h"
3542 #include <stdlib.h>
3543 #include <stdarg.h>
3544 #include <string.h>
3545 #include <float.h>
3546 EOF
3547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3548 { (eval echo configure:3549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3550 if test -z "$ac_err"; then
3551   rm -rf conftest*
3552   ac_cv_header_stdc=yes
3553 else
3554   echo "$ac_err" >&5
3555   echo "configure: failed program was:" >&5
3556   cat conftest.$ac_ext >&5
3557   rm -rf conftest*
3558   ac_cv_header_stdc=no
3559 fi
3560 rm -f conftest*
3561
3562 if test $ac_cv_header_stdc = yes; then
3563   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3564 cat > conftest.$ac_ext <<EOF
3565 #line 3566 "configure"
3566 #include "confdefs.h"
3567 #include <string.h>
3568 EOF
3569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3570   egrep "memchr" >/dev/null 2>&1; then
3571   :
3572 else
3573   rm -rf conftest*
3574   ac_cv_header_stdc=no
3575 fi
3576 rm -f conftest*
3577
3578 fi
3579
3580 if test $ac_cv_header_stdc = yes; then
3581   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3582 cat > conftest.$ac_ext <<EOF
3583 #line 3584 "configure"
3584 #include "confdefs.h"
3585 #include <stdlib.h>
3586 EOF
3587 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3588   egrep "free" >/dev/null 2>&1; then
3589   :
3590 else
3591   rm -rf conftest*
3592   ac_cv_header_stdc=no
3593 fi
3594 rm -f conftest*
3595
3596 fi
3597
3598 if test $ac_cv_header_stdc = yes; then
3599   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3600 cat > conftest.$ac_ext <<EOF
3601 #line 3602 "configure"
3602 #include "confdefs.h"
3603 #include <ctype.h>
3604 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3605 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3606 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3607 int main () { int i; for (i = 0; i < 256; i++)
3608 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3609 exit (0); }
3610
3611 EOF
3612 if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3613 then
3614   :
3615 else
3616   conftest_rc="$?"
3617   echo "configure: failed program was:" >&5
3618   cat conftest.$ac_ext >&5
3619   rm -fr conftest*
3620   ac_cv_header_stdc=no
3621 fi
3622 rm -fr conftest*
3623 fi
3624
3625 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3626 if test $ac_cv_header_stdc = yes; then
3627   { test "$extra_verbose" = "yes" && cat << \EOF
3628     Defining STDC_HEADERS
3629 EOF
3630 cat >> confdefs.h <<\EOF
3631 #define STDC_HEADERS 1
3632 EOF
3633 }
3634
3635 fi
3636
3637 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3638 echo "configure:3639: checking whether time.h and sys/time.h may both be included" >&5
3639
3640 cat > conftest.$ac_ext <<EOF
3641 #line 3642 "configure"
3642 #include "confdefs.h"
3643 #include <sys/types.h>
3644 #include <sys/time.h>
3645 #include <time.h>
3646 int main() {
3647 struct tm *tp;
3648 ; return 0; }
3649 EOF
3650 if { (eval echo configure:3651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3651   rm -rf conftest*
3652   ac_cv_header_time=yes
3653 else
3654   echo "configure: failed program was:" >&5
3655   cat conftest.$ac_ext >&5
3656   rm -rf conftest*
3657   ac_cv_header_time=no
3658 fi
3659 rm -f conftest*
3660
3661 echo "$ac_t""$ac_cv_header_time" 1>&6
3662 if test $ac_cv_header_time = yes; then
3663   { test "$extra_verbose" = "yes" && cat << \EOF
3664     Defining TIME_WITH_SYS_TIME
3665 EOF
3666 cat >> confdefs.h <<\EOF
3667 #define TIME_WITH_SYS_TIME 1
3668 EOF
3669 }
3670
3671 fi
3672
3673 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3674 echo "configure:3675: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3675
3676 cat > conftest.$ac_ext <<EOF
3677 #line 3678 "configure"
3678 #include "confdefs.h"
3679 #include <sys/types.h>
3680 #include <signal.h>
3681 /* NetBSD declares sys_siglist in unistd.h.  */
3682 #ifdef HAVE_UNISTD_H
3683 #include <unistd.h>
3684 #endif
3685 int main() {
3686 char *msg = *(sys_siglist + 1);
3687 ; return 0; }
3688 EOF
3689 if { (eval echo configure:3690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3690   rm -rf conftest*
3691   ac_cv_decl_sys_siglist=yes
3692 else
3693   echo "configure: failed program was:" >&5
3694   cat conftest.$ac_ext >&5
3695   rm -rf conftest*
3696   ac_cv_decl_sys_siglist=no
3697 fi
3698 rm -f conftest*
3699
3700 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3701 if test $ac_cv_decl_sys_siglist = yes; then
3702   { test "$extra_verbose" = "yes" && cat << \EOF
3703     Defining SYS_SIGLIST_DECLARED
3704 EOF
3705 cat >> confdefs.h <<\EOF
3706 #define SYS_SIGLIST_DECLARED 1
3707 EOF
3708 }
3709
3710 fi
3711
3712
3713
3714 echo $ac_n "checking for utime""... $ac_c" 1>&6
3715 echo "configure:3716: checking for utime" >&5
3716 cat > conftest.$ac_ext <<EOF
3717 #line 3718 "configure"
3718 #include "confdefs.h"
3719 #include <sys/types.h>
3720 #include <utime.h>
3721 int main() {
3722 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3723 ; return 0; }
3724 EOF
3725 if { (eval echo configure:3726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3726   rm -rf conftest*
3727   echo "$ac_t""yes" 1>&6
3728    { test "$extra_verbose" = "yes" && cat << \EOF
3729     Defining HAVE_UTIME
3730 EOF
3731 cat >> confdefs.h <<\EOF
3732 #define HAVE_UTIME 1
3733 EOF
3734 }
3735
3736 else
3737   echo "configure: failed program was:" >&5
3738   cat conftest.$ac_ext >&5
3739   rm -rf conftest*
3740   echo "$ac_t""no" 1>&6
3741       for ac_func in utimes
3742 do
3743 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3744 echo "configure:3745: checking for $ac_func" >&5
3745
3746 cat > conftest.$ac_ext <<EOF
3747 #line 3748 "configure"
3748 #include "confdefs.h"
3749 /* System header to define __stub macros and hopefully few prototypes,
3750     which can conflict with char $ac_func(); below.  */
3751 #include <assert.h>
3752 /* Override any gcc2 internal prototype to avoid an error.  */
3753 /* We use char because int might match the return type of a gcc2
3754     builtin and then its argument prototype would still apply.  */
3755 char $ac_func();
3756
3757 int main() {
3758
3759 /* The GNU C library defines this for functions which it implements
3760     to always fail with ENOSYS.  Some functions are actually named
3761     something starting with __ and the normal name is an alias.  */
3762 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3763 choke me
3764 #else
3765 $ac_func();
3766 #endif
3767
3768 ; return 0; }
3769 EOF
3770 if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3771   rm -rf conftest*
3772   eval "ac_cv_func_$ac_func=yes"
3773 else
3774   echo "configure: failed program was:" >&5
3775   cat conftest.$ac_ext >&5
3776   rm -rf conftest*
3777   eval "ac_cv_func_$ac_func=no"
3778 fi
3779 rm -f conftest*
3780
3781 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3782   echo "$ac_t""yes" 1>&6
3783     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3784   { test "$extra_verbose" = "yes" && cat << EOF
3785     Defining $ac_tr_func
3786 EOF
3787 cat >> confdefs.h <<EOF
3788 #define $ac_tr_func 1
3789 EOF
3790 }
3791  
3792 else
3793   echo "$ac_t""no" 1>&6
3794 fi
3795 done
3796
3797 fi
3798 rm -f conftest*
3799
3800
3801 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3802 echo "configure:3803: checking return type of signal handlers" >&5
3803
3804 cat > conftest.$ac_ext <<EOF
3805 #line 3806 "configure"
3806 #include "confdefs.h"
3807 #include <sys/types.h>
3808 #include <signal.h>
3809 #ifdef signal
3810 #undef signal
3811 #endif
3812 #ifdef __cplusplus
3813 extern "C" void (*signal (int, void (*)(int)))(int);
3814 #else
3815 void (*signal ()) ();
3816 #endif
3817
3818 int main() {
3819 int i;
3820 ; return 0; }
3821 EOF
3822 if { (eval echo configure:3823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3823   rm -rf conftest*
3824   ac_cv_type_signal=void
3825 else
3826   echo "configure: failed program was:" >&5
3827   cat conftest.$ac_ext >&5
3828   rm -rf conftest*
3829   ac_cv_type_signal=int
3830 fi
3831 rm -f conftest*
3832
3833 echo "$ac_t""$ac_cv_type_signal" 1>&6
3834 { test "$extra_verbose" = "yes" && cat << EOF
3835     Defining RETSIGTYPE = $ac_cv_type_signal
3836 EOF
3837 cat >> confdefs.h <<EOF
3838 #define RETSIGTYPE $ac_cv_type_signal
3839 EOF
3840 }
3841
3842
3843 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3844 echo "configure:3845: checking for size_t" >&5
3845
3846 cat > conftest.$ac_ext <<EOF
3847 #line 3848 "configure"
3848 #include "confdefs.h"
3849 #include <sys/types.h>
3850 #if STDC_HEADERS
3851 #include <stdlib.h>
3852 #include <stddef.h>
3853 #endif
3854 EOF
3855 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3856   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3857   rm -rf conftest*
3858   ac_cv_type_size_t=yes
3859 else
3860   rm -rf conftest*
3861   ac_cv_type_size_t=no
3862 fi
3863 rm -f conftest*
3864
3865 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3866 if test $ac_cv_type_size_t = no; then
3867   { test "$extra_verbose" = "yes" && cat << \EOF
3868     Defining size_t = unsigned
3869 EOF
3870 cat >> confdefs.h <<\EOF
3871 #define size_t unsigned
3872 EOF
3873 }
3874
3875 fi
3876
3877 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3878 echo "configure:3879: checking for pid_t" >&5
3879
3880 cat > conftest.$ac_ext <<EOF
3881 #line 3882 "configure"
3882 #include "confdefs.h"
3883 #include <sys/types.h>
3884 #if STDC_HEADERS
3885 #include <stdlib.h>
3886 #include <stddef.h>
3887 #endif
3888 EOF
3889 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3890   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3891   rm -rf conftest*
3892   ac_cv_type_pid_t=yes
3893 else
3894   rm -rf conftest*
3895   ac_cv_type_pid_t=no
3896 fi
3897 rm -f conftest*
3898
3899 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3900 if test $ac_cv_type_pid_t = no; then
3901   { test "$extra_verbose" = "yes" && cat << \EOF
3902     Defining pid_t = int
3903 EOF
3904 cat >> confdefs.h <<\EOF
3905 #define pid_t int
3906 EOF
3907 }
3908
3909 fi
3910
3911 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3912 echo "configure:3913: checking for uid_t in sys/types.h" >&5
3913
3914 cat > conftest.$ac_ext <<EOF
3915 #line 3916 "configure"
3916 #include "confdefs.h"
3917 #include <sys/types.h>
3918 EOF
3919 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3920   egrep "uid_t" >/dev/null 2>&1; then
3921   rm -rf conftest*
3922   ac_cv_type_uid_t=yes
3923 else
3924   rm -rf conftest*
3925   ac_cv_type_uid_t=no
3926 fi
3927 rm -f conftest*
3928
3929
3930 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3931 if test $ac_cv_type_uid_t = no; then
3932   { test "$extra_verbose" = "yes" && cat << \EOF
3933     Defining uid_t = int
3934 EOF
3935 cat >> confdefs.h <<\EOF
3936 #define uid_t int
3937 EOF
3938 }
3939
3940   { test "$extra_verbose" = "yes" && cat << \EOF
3941     Defining gid_t = int
3942 EOF
3943 cat >> confdefs.h <<\EOF
3944 #define gid_t int
3945 EOF
3946 }
3947
3948 fi
3949
3950 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3951 echo "configure:3952: checking for mode_t" >&5
3952
3953 cat > conftest.$ac_ext <<EOF
3954 #line 3955 "configure"
3955 #include "confdefs.h"
3956 #include <sys/types.h>
3957 #if STDC_HEADERS
3958 #include <stdlib.h>
3959 #include <stddef.h>
3960 #endif
3961 EOF
3962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3963   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3964   rm -rf conftest*
3965   ac_cv_type_mode_t=yes
3966 else
3967   rm -rf conftest*
3968   ac_cv_type_mode_t=no
3969 fi
3970 rm -f conftest*
3971
3972 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3973 if test $ac_cv_type_mode_t = no; then
3974   { test "$extra_verbose" = "yes" && cat << \EOF
3975     Defining mode_t = int
3976 EOF
3977 cat >> confdefs.h <<\EOF
3978 #define mode_t int
3979 EOF
3980 }
3981
3982 fi
3983
3984 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3985 echo "configure:3986: checking for off_t" >&5
3986
3987 cat > conftest.$ac_ext <<EOF
3988 #line 3989 "configure"
3989 #include "confdefs.h"
3990 #include <sys/types.h>
3991 #if STDC_HEADERS
3992 #include <stdlib.h>
3993 #include <stddef.h>
3994 #endif
3995 EOF
3996 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3997   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3998   rm -rf conftest*
3999   ac_cv_type_off_t=yes
4000 else
4001   rm -rf conftest*
4002   ac_cv_type_off_t=no
4003 fi
4004 rm -f conftest*
4005
4006 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4007 if test $ac_cv_type_off_t = no; then
4008   { test "$extra_verbose" = "yes" && cat << \EOF
4009     Defining off_t = long
4010 EOF
4011 cat >> confdefs.h <<\EOF
4012 #define off_t long
4013 EOF
4014 }
4015
4016 fi
4017
4018 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4019 echo "configure:4020: checking for ssize_t" >&5
4020
4021 cat > conftest.$ac_ext <<EOF
4022 #line 4023 "configure"
4023 #include "confdefs.h"
4024 #include <sys/types.h>
4025 #if STDC_HEADERS
4026 #include <stdlib.h>
4027 #include <stddef.h>
4028 #endif
4029 EOF
4030 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4031   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4032   rm -rf conftest*
4033   ac_cv_type_ssize_t=yes
4034 else
4035   rm -rf conftest*
4036   ac_cv_type_ssize_t=no
4037 fi
4038 rm -f conftest*
4039
4040 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4041 if test $ac_cv_type_ssize_t = no; then
4042   { test "$extra_verbose" = "yes" && cat << \EOF
4043     Defining ssize_t = int
4044 EOF
4045 cat >> confdefs.h <<\EOF
4046 #define ssize_t int
4047 EOF
4048 }
4049
4050 fi
4051
4052
4053 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4054 echo "configure:4055: checking for socklen_t" >&5
4055 cat > conftest.$ac_ext <<EOF
4056 #line 4057 "configure"
4057 #include "confdefs.h"
4058 #include <sys/socket.h>
4059 socklen_t x;
4060
4061 int main() {
4062
4063 ; return 0; }
4064 EOF
4065 if { (eval echo configure:4066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4066   rm -rf conftest*
4067   echo "$ac_t""yes" 1>&6
4068 else
4069   echo "configure: failed program was:" >&5
4070   cat conftest.$ac_ext >&5
4071   rm -rf conftest*
4072   
4073 cat > conftest.$ac_ext <<EOF
4074 #line 4075 "configure"
4075 #include "confdefs.h"
4076 #include <sys/socket.h>
4077 int accept (int, struct sockaddr *, size_t *);
4078
4079 int main() {
4080
4081 ; return 0; }
4082 EOF
4083 if { (eval echo configure:4084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4084   rm -rf conftest*
4085   
4086 echo "$ac_t""size_t" 1>&6
4087 { test "$extra_verbose" = "yes" && cat << \EOF
4088     Defining socklen_t = size_t
4089 EOF
4090 cat >> confdefs.h <<\EOF
4091 #define socklen_t size_t
4092 EOF
4093 }
4094
4095 else
4096   echo "configure: failed program was:" >&5
4097   cat conftest.$ac_ext >&5
4098   rm -rf conftest*
4099   
4100 echo "$ac_t""int" 1>&6
4101 { test "$extra_verbose" = "yes" && cat << \EOF
4102     Defining socklen_t = int
4103 EOF
4104 cat >> confdefs.h <<\EOF
4105 #define socklen_t int
4106 EOF
4107 }
4108
4109 fi
4110 rm -f conftest*
4111 fi
4112 rm -f conftest*
4113
4114 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4115 echo "configure:4116: checking for struct timeval" >&5
4116 cat > conftest.$ac_ext <<EOF
4117 #line 4118 "configure"
4118 #include "confdefs.h"
4119 #ifdef TIME_WITH_SYS_TIME
4120 #include <sys/time.h>
4121 #include <time.h>
4122 #else
4123 #ifdef HAVE_SYS_TIME_H
4124 #include <sys/time.h>
4125 #else
4126 #include <time.h>
4127 #endif
4128 #endif
4129 int main() {
4130 static struct timeval x; x.tv_sec = x.tv_usec;
4131 ; return 0; }
4132 EOF
4133 if { (eval echo configure:4134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4134   rm -rf conftest*
4135   echo "$ac_t""yes" 1>&6
4136   HAVE_TIMEVAL=yes
4137   { test "$extra_verbose" = "yes" && cat << \EOF
4138     Defining HAVE_TIMEVAL
4139 EOF
4140 cat >> confdefs.h <<\EOF
4141 #define HAVE_TIMEVAL 1
4142 EOF
4143 }
4144
4145 else
4146   echo "configure: failed program was:" >&5
4147   cat conftest.$ac_ext >&5
4148   rm -rf conftest*
4149   echo "$ac_t""no" 1>&6
4150    HAVE_TIMEVAL=no
4151 fi
4152 rm -f conftest*
4153
4154 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4155 echo "configure:4156: checking whether struct tm is in sys/time.h or time.h" >&5
4156
4157 cat > conftest.$ac_ext <<EOF
4158 #line 4159 "configure"
4159 #include "confdefs.h"
4160 #include <sys/types.h>
4161 #include <time.h>
4162 int main() {
4163 struct tm *tp; tp->tm_sec;
4164 ; return 0; }
4165 EOF
4166 if { (eval echo configure:4167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4167   rm -rf conftest*
4168   ac_cv_struct_tm=time.h
4169 else
4170   echo "configure: failed program was:" >&5
4171   cat conftest.$ac_ext >&5
4172   rm -rf conftest*
4173   ac_cv_struct_tm=sys/time.h
4174 fi
4175 rm -f conftest*
4176
4177 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4178 if test $ac_cv_struct_tm = sys/time.h; then
4179   { test "$extra_verbose" = "yes" && cat << \EOF
4180     Defining TM_IN_SYS_TIME
4181 EOF
4182 cat >> confdefs.h <<\EOF
4183 #define TM_IN_SYS_TIME 1
4184 EOF
4185 }
4186
4187 fi
4188
4189 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4190 echo "configure:4191: checking for tm_zone in struct tm" >&5
4191
4192 cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195 #include <sys/types.h>
4196 #include <$ac_cv_struct_tm>
4197 int main() {
4198 struct tm tm; tm.tm_zone;
4199 ; return 0; }
4200 EOF
4201 if { (eval echo configure:4202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4202   rm -rf conftest*
4203   ac_cv_struct_tm_zone=yes
4204 else
4205   echo "configure: failed program was:" >&5
4206   cat conftest.$ac_ext >&5
4207   rm -rf conftest*
4208   ac_cv_struct_tm_zone=no
4209 fi
4210 rm -f conftest*
4211
4212 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4213 if test "$ac_cv_struct_tm_zone" = yes; then
4214   { test "$extra_verbose" = "yes" && cat << \EOF
4215     Defining HAVE_TM_ZONE
4216 EOF
4217 cat >> confdefs.h <<\EOF
4218 #define HAVE_TM_ZONE 1
4219 EOF
4220 }
4221
4222 else
4223   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4224 echo "configure:4225: checking for tzname" >&5
4225
4226 cat > conftest.$ac_ext <<EOF
4227 #line 4228 "configure"
4228 #include "confdefs.h"
4229 #include <time.h>
4230 #ifndef tzname /* For SGI.  */
4231 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4232 #endif
4233 int main() {
4234 atoi(*tzname);
4235 ; return 0; }
4236 EOF
4237 if { (eval echo configure:4238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4238   rm -rf conftest*
4239   ac_cv_var_tzname=yes
4240 else
4241   echo "configure: failed program was:" >&5
4242   cat conftest.$ac_ext >&5
4243   rm -rf conftest*
4244   ac_cv_var_tzname=no
4245 fi
4246 rm -f conftest*
4247
4248 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4249   if test $ac_cv_var_tzname = yes; then
4250     { test "$extra_verbose" = "yes" && cat << \EOF
4251     Defining HAVE_TZNAME
4252 EOF
4253 cat >> confdefs.h <<\EOF
4254 #define HAVE_TZNAME 1
4255 EOF
4256 }
4257
4258   fi
4259 fi
4260
4261
4262 echo $ac_n "checking for working const""... $ac_c" 1>&6
4263 echo "configure:4264: checking for working const" >&5
4264
4265 cat > conftest.$ac_ext <<EOF
4266 #line 4267 "configure"
4267 #include "confdefs.h"
4268
4269 int main() {
4270
4271 /* Ultrix mips cc rejects this.  */
4272 typedef int charset[2]; const charset x;
4273 /* SunOS 4.1.1 cc rejects this.  */
4274 char const *const *ccp;
4275 char **p;
4276 /* NEC SVR4.0.2 mips cc rejects this.  */
4277 struct point {int x, y;};
4278 static struct point const zero = {0,0};
4279 /* AIX XL C 1.02.0.0 rejects this.
4280    It does not let you subtract one const X* pointer from another in an arm
4281    of an if-expression whose if-part is not a constant expression */
4282 const char *g = "string";
4283 ccp = &g + (g ? g-g : 0);
4284 /* HPUX 7.0 cc rejects these. */
4285 ++ccp;
4286 p = (char**) ccp;
4287 ccp = (char const *const *) p;
4288 { /* SCO 3.2v4 cc rejects this.  */
4289   char *t;
4290   char const *s = 0 ? (char *) 0 : (char const *) 0;
4291
4292   *t++ = 0;
4293 }
4294 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4295   int x[] = {25, 17};
4296   const int *foo = &x[0];
4297   ++foo;
4298 }
4299 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4300   typedef const int *iptr;
4301   iptr p = 0;
4302   ++p;
4303 }
4304 { /* AIX XL C 1.02.0.0 rejects this saying
4305      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4306   struct s { int j; const int *ap[3]; };
4307   struct s *b; b->j = 5;
4308 }
4309 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4310   const int foo = 10;
4311 }
4312
4313 ; return 0; }
4314 EOF
4315 if { (eval echo configure:4316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4316   rm -rf conftest*
4317   ac_cv_c_const=yes
4318 else
4319   echo "configure: failed program was:" >&5
4320   cat conftest.$ac_ext >&5
4321   rm -rf conftest*
4322   ac_cv_c_const=no
4323 fi
4324 rm -f conftest*
4325
4326 echo "$ac_t""$ac_cv_c_const" 1>&6
4327 if test $ac_cv_c_const = no; then
4328   { test "$extra_verbose" = "yes" && cat << \EOF
4329     Defining const = 
4330 EOF
4331 cat >> confdefs.h <<\EOF
4332 #define const 
4333 EOF
4334 }
4335
4336 fi
4337
4338
4339 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4340 echo "configure:4341: checking whether ${MAKE-make} sets \${MAKE}" >&5
4341 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4342
4343 cat > conftestmake <<\EOF
4344 all:
4345         @echo 'ac_maketemp="${MAKE}"'
4346 EOF
4347 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4348 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4349 if test -n "$ac_maketemp"; then
4350   eval ac_cv_prog_make_${ac_make}_set=yes
4351 else
4352   eval ac_cv_prog_make_${ac_make}_set=no
4353 fi
4354 rm -f conftestmake
4355 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4356   echo "$ac_t""yes" 1>&6
4357   SET_MAKE=
4358 else
4359   echo "$ac_t""no" 1>&6
4360   SET_MAKE="MAKE=${MAKE-make}"
4361 fi
4362
4363
4364 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4365 echo "configure:4366: checking whether byte ordering is bigendian" >&5
4366
4367 ac_cv_c_bigendian=unknown
4368 # See if sys/param.h defines the BYTE_ORDER macro.
4369 cat > conftest.$ac_ext <<EOF
4370 #line 4371 "configure"
4371 #include "confdefs.h"
4372 #include <sys/types.h>
4373 #include <sys/param.h>
4374 int main() {
4375
4376 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4377  bogus endian macros
4378 #endif
4379 ; return 0; }
4380 EOF
4381 if { (eval echo configure:4382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4382   rm -rf conftest*
4383   # It does; now see whether it defined to BIG_ENDIAN or not.
4384 cat > conftest.$ac_ext <<EOF
4385 #line 4386 "configure"
4386 #include "confdefs.h"
4387 #include <sys/types.h>
4388 #include <sys/param.h>
4389 int main() {
4390
4391 #if BYTE_ORDER != BIG_ENDIAN
4392  not big endian
4393 #endif
4394 ; return 0; }
4395 EOF
4396 if { (eval echo configure:4397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4397   rm -rf conftest*
4398   ac_cv_c_bigendian=yes
4399 else
4400   echo "configure: failed program was:" >&5
4401   cat conftest.$ac_ext >&5
4402   rm -rf conftest*
4403   ac_cv_c_bigendian=no
4404 fi
4405 rm -f conftest*
4406 else
4407   echo "configure: failed program was:" >&5
4408   cat conftest.$ac_ext >&5
4409 fi
4410 rm -f conftest*
4411 if test $ac_cv_c_bigendian = unknown; then
4412 cat > conftest.$ac_ext <<EOF
4413 #line 4414 "configure"
4414 #include "confdefs.h"
4415 main () {
4416   /* Are we little or big endian?  From Harbison&Steele.  */
4417   union
4418   {
4419     long l;
4420     char c[sizeof (long)];
4421   } u;
4422   u.l = 1;
4423   exit (u.c[sizeof (long) - 1] == 1);
4424 }
4425 EOF
4426 if { (eval echo configure:4427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4427 then
4428   ac_cv_c_bigendian=no
4429 else
4430   conftest_rc="$?"
4431   echo "configure: failed program was:" >&5
4432   cat conftest.$ac_ext >&5
4433   rm -fr conftest*
4434   ac_cv_c_bigendian=yes
4435 fi
4436 rm -fr conftest*
4437 fi
4438
4439 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4440 if test $ac_cv_c_bigendian = yes; then
4441   { test "$extra_verbose" = "yes" && cat << \EOF
4442     Defining WORDS_BIGENDIAN
4443 EOF
4444 cat >> confdefs.h <<\EOF
4445 #define WORDS_BIGENDIAN 1
4446 EOF
4447 }
4448
4449 fi
4450
4451
4452 echo $ac_n "checking size of short""... $ac_c" 1>&6
4453 echo "configure:4454: checking size of short" >&5
4454
4455 cat > conftest.$ac_ext <<EOF
4456 #line 4457 "configure"
4457 #include "confdefs.h"
4458 #include <stdio.h>
4459 #include <sys/types.h>
4460 main()
4461 {
4462   FILE *f=fopen("conftestval", "w");
4463   if (!f) exit(1);
4464   fprintf(f, "%d\n", sizeof(short));
4465   exit(0);
4466 }
4467 EOF
4468 if { (eval echo configure:4469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4469 then
4470   ac_cv_sizeof_short=`cat conftestval`
4471 else
4472   conftest_rc="$?"
4473   echo "configure: failed program was:" >&5
4474   cat conftest.$ac_ext >&5
4475   rm -fr conftest*
4476   ac_cv_sizeof_short=0
4477 fi
4478 rm -fr conftest*
4479 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4480 { test "$extra_verbose" = "yes" && cat << EOF
4481     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4482 EOF
4483 cat >> confdefs.h <<EOF
4484 #define SIZEOF_SHORT $ac_cv_sizeof_short
4485 EOF
4486 }
4487
4488
4489 if test "$ac_cv_sizeof_short" = 0; then
4490   echo ""
4491   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4492   echo "*** PANIC *** Please examine config.log for compilation errors."
4493   exit 1
4494 fi
4495 echo $ac_n "checking size of int""... $ac_c" 1>&6
4496 echo "configure:4497: checking size of int" >&5
4497
4498 cat > conftest.$ac_ext <<EOF
4499 #line 4500 "configure"
4500 #include "confdefs.h"
4501 #include <stdio.h>
4502 #include <sys/types.h>
4503 main()
4504 {
4505   FILE *f=fopen("conftestval", "w");
4506   if (!f) exit(1);
4507   fprintf(f, "%d\n", sizeof(int));
4508   exit(0);
4509 }
4510 EOF
4511 if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4512 then
4513   ac_cv_sizeof_int=`cat conftestval`
4514 else
4515   conftest_rc="$?"
4516   echo "configure: failed program was:" >&5
4517   cat conftest.$ac_ext >&5
4518   rm -fr conftest*
4519   ac_cv_sizeof_int=0
4520 fi
4521 rm -fr conftest*
4522 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4523 { test "$extra_verbose" = "yes" && cat << EOF
4524     Defining SIZEOF_INT = $ac_cv_sizeof_int
4525 EOF
4526 cat >> confdefs.h <<EOF
4527 #define SIZEOF_INT $ac_cv_sizeof_int
4528 EOF
4529 }
4530
4531
4532 echo $ac_n "checking size of long""... $ac_c" 1>&6
4533 echo "configure:4534: checking size of long" >&5
4534
4535 cat > conftest.$ac_ext <<EOF
4536 #line 4537 "configure"
4537 #include "confdefs.h"
4538 #include <stdio.h>
4539 #include <sys/types.h>
4540 main()
4541 {
4542   FILE *f=fopen("conftestval", "w");
4543   if (!f) exit(1);
4544   fprintf(f, "%d\n", sizeof(long));
4545   exit(0);
4546 }
4547 EOF
4548 if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4549 then
4550   ac_cv_sizeof_long=`cat conftestval`
4551 else
4552   conftest_rc="$?"
4553   echo "configure: failed program was:" >&5
4554   cat conftest.$ac_ext >&5
4555   rm -fr conftest*
4556   ac_cv_sizeof_long=0
4557 fi
4558 rm -fr conftest*
4559 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4560 { test "$extra_verbose" = "yes" && cat << EOF
4561     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4562 EOF
4563 cat >> confdefs.h <<EOF
4564 #define SIZEOF_LONG $ac_cv_sizeof_long
4565 EOF
4566 }
4567
4568
4569 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4570 echo "configure:4571: checking size of long long" >&5
4571
4572 cat > conftest.$ac_ext <<EOF
4573 #line 4574 "configure"
4574 #include "confdefs.h"
4575 #include <stdio.h>
4576 #include <sys/types.h>
4577 main()
4578 {
4579   FILE *f=fopen("conftestval", "w");
4580   if (!f) exit(1);
4581   fprintf(f, "%d\n", sizeof(long long));
4582   exit(0);
4583 }
4584 EOF
4585 if { (eval echo configure:4586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4586 then
4587   ac_cv_sizeof_long_long=`cat conftestval`
4588 else
4589   conftest_rc="$?"
4590   echo "configure: failed program was:" >&5
4591   cat conftest.$ac_ext >&5
4592   rm -fr conftest*
4593   ac_cv_sizeof_long_long=0
4594 fi
4595 rm -fr conftest*
4596 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4597 { test "$extra_verbose" = "yes" && cat << EOF
4598     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4599 EOF
4600 cat >> confdefs.h <<EOF
4601 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4602 EOF
4603 }
4604
4605
4606 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4607 echo "configure:4608: checking size of void *" >&5
4608
4609 cat > conftest.$ac_ext <<EOF
4610 #line 4611 "configure"
4611 #include "confdefs.h"
4612 #include <stdio.h>
4613 #include <sys/types.h>
4614 main()
4615 {
4616   FILE *f=fopen("conftestval", "w");
4617   if (!f) exit(1);
4618   fprintf(f, "%d\n", sizeof(void *));
4619   exit(0);
4620 }
4621 EOF
4622 if { (eval echo configure:4623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4623 then
4624   ac_cv_sizeof_void_p=`cat conftestval`
4625 else
4626   conftest_rc="$?"
4627   echo "configure: failed program was:" >&5
4628   cat conftest.$ac_ext >&5
4629   rm -fr conftest*
4630   ac_cv_sizeof_void_p=0
4631 fi
4632 rm -fr conftest*
4633 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4634 { test "$extra_verbose" = "yes" && cat << EOF
4635     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4636 EOF
4637 cat >> confdefs.h <<EOF
4638 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4639 EOF
4640 }
4641
4642
4643
4644 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4645 echo "configure:4646: checking for long file names" >&5
4646
4647 ac_cv_sys_long_file_names=yes
4648 # Test for long file names in all the places we know might matter:
4649 #      .                the current directory, where building will happen
4650 #      $prefix/lib      where we will be installing things
4651 #      $exec_prefix/lib likewise
4652 # eval it to expand exec_prefix.
4653 #      $TMPDIR          if set, where it might want to write temporary files
4654 # if $TMPDIR is not set:
4655 #      /tmp             where it might want to write temporary files
4656 #      /var/tmp         likewise
4657 #      /usr/tmp         likewise
4658 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4659   ac_tmpdirs="$TMPDIR"
4660 else
4661   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4662 fi
4663 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4664   test -d $ac_dir || continue
4665   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4666   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4667   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4668   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4669   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4670     ac_cv_sys_long_file_names=no
4671     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4672     break
4673   fi
4674   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4675 done
4676
4677 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4678 if test $ac_cv_sys_long_file_names = yes; then
4679   { test "$extra_verbose" = "yes" && cat << \EOF
4680     Defining HAVE_LONG_FILE_NAMES
4681 EOF
4682 cat >> confdefs.h <<\EOF
4683 #define HAVE_LONG_FILE_NAMES 1
4684 EOF
4685 }
4686
4687 fi
4688
4689
4690 echo $ac_n "checking for sin""... $ac_c" 1>&6
4691 echo "configure:4692: checking for sin" >&5
4692
4693 cat > conftest.$ac_ext <<EOF
4694 #line 4695 "configure"
4695 #include "confdefs.h"
4696 /* System header to define __stub macros and hopefully few prototypes,
4697     which can conflict with char sin(); below.  */
4698 #include <assert.h>
4699 /* Override any gcc2 internal prototype to avoid an error.  */
4700 /* We use char because int might match the return type of a gcc2
4701     builtin and then its argument prototype would still apply.  */
4702 char sin();
4703
4704 int main() {
4705
4706 /* The GNU C library defines this for functions which it implements
4707     to always fail with ENOSYS.  Some functions are actually named
4708     something starting with __ and the normal name is an alias.  */
4709 #if defined (__stub_sin) || defined (__stub___sin)
4710 choke me
4711 #else
4712 sin();
4713 #endif
4714
4715 ; return 0; }
4716 EOF
4717 if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4718   rm -rf conftest*
4719   eval "ac_cv_func_sin=yes"
4720 else
4721   echo "configure: failed program was:" >&5
4722   cat conftest.$ac_ext >&5
4723   rm -rf conftest*
4724   eval "ac_cv_func_sin=no"
4725 fi
4726 rm -f conftest*
4727
4728 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4729   echo "$ac_t""yes" 1>&6
4730   :
4731 else
4732   echo "$ac_t""no" 1>&6
4733
4734 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4735 echo "configure:4736: checking for sin in -lm" >&5
4736 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4737
4738 xe_check_libs=" -lm "
4739 cat > conftest.$ac_ext <<EOF
4740 #line 4741 "configure"
4741 #include "confdefs.h"
4742 /* Override any gcc2 internal prototype to avoid an error.  */
4743 /* We use char because int might match the return type of a gcc2
4744     builtin and then its argument prototype would still apply.  */
4745 char sin();
4746
4747 int main() {
4748 sin()
4749 ; return 0; }
4750 EOF
4751 if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4752   rm -rf conftest*
4753   eval "ac_cv_lib_$ac_lib_var=yes"
4754 else
4755   echo "configure: failed program was:" >&5
4756   cat conftest.$ac_ext >&5
4757   rm -rf conftest*
4758   eval "ac_cv_lib_$ac_lib_var=no"
4759 fi
4760 rm -f conftest*
4761 xe_check_libs=""
4762
4763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4764   echo "$ac_t""yes" 1>&6
4765     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4766     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4767   { test "$extra_verbose" = "yes" && cat << EOF
4768     Defining $ac_tr_lib
4769 EOF
4770 cat >> confdefs.h <<EOF
4771 #define $ac_tr_lib 1
4772 EOF
4773 }
4774
4775   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4776
4777 else
4778   echo "$ac_t""no" 1>&6
4779 fi
4780
4781
4782 fi
4783
4784
4785 { test "$extra_verbose" = "yes" && cat << \EOF
4786     Defining LISP_FLOAT_TYPE
4787 EOF
4788 cat >> confdefs.h <<\EOF
4789 #define LISP_FLOAT_TYPE 1
4790 EOF
4791 }
4792
4793
4794 cat > conftest.$ac_ext <<EOF
4795 #line 4796 "configure"
4796 #include "confdefs.h"
4797 #include <math.h>
4798 int main() {
4799 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4800 ; return 0; }
4801 EOF
4802 if { (eval echo configure:4803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4803   rm -rf conftest*
4804   { test "$extra_verbose" = "yes" && cat << \EOF
4805     Defining HAVE_INVERSE_HYPERBOLIC
4806 EOF
4807 cat >> confdefs.h <<\EOF
4808 #define HAVE_INVERSE_HYPERBOLIC 1
4809 EOF
4810 }
4811
4812 else
4813   echo "configure: failed program was:" >&5
4814   cat conftest.$ac_ext >&5
4815 fi
4816 rm -f conftest*
4817
4818 echo "checking type of mail spool file locking" 1>&6
4819 echo "configure:4820: checking type of mail spool file locking" >&5
4820 for ac_func in lockf flock
4821 do
4822 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4823 echo "configure:4824: checking for $ac_func" >&5
4824
4825 cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828 /* System header to define __stub macros and hopefully few prototypes,
4829     which can conflict with char $ac_func(); below.  */
4830 #include <assert.h>
4831 /* Override any gcc2 internal prototype to avoid an error.  */
4832 /* We use char because int might match the return type of a gcc2
4833     builtin and then its argument prototype would still apply.  */
4834 char $ac_func();
4835
4836 int main() {
4837
4838 /* The GNU C library defines this for functions which it implements
4839     to always fail with ENOSYS.  Some functions are actually named
4840     something starting with __ and the normal name is an alias.  */
4841 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4842 choke me
4843 #else
4844 $ac_func();
4845 #endif
4846
4847 ; return 0; }
4848 EOF
4849 if { (eval echo configure:4850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4850   rm -rf conftest*
4851   eval "ac_cv_func_$ac_func=yes"
4852 else
4853   echo "configure: failed program was:" >&5
4854   cat conftest.$ac_ext >&5
4855   rm -rf conftest*
4856   eval "ac_cv_func_$ac_func=no"
4857 fi
4858 rm -f conftest*
4859
4860 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4861   echo "$ac_t""yes" 1>&6
4862     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4863   { test "$extra_verbose" = "yes" && cat << EOF
4864     Defining $ac_tr_func
4865 EOF
4866 cat >> confdefs.h <<EOF
4867 #define $ac_tr_func 1
4868 EOF
4869 }
4870  
4871 else
4872   echo "$ac_t""no" 1>&6
4873 fi
4874 done
4875
4876 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4877 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4878 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4879 if   test -z "$mail_locking"; then
4880   case "$opsys" in cygwin* | mingw*)
4881     mail_locking=pop ;;
4882   esac
4883 fi
4884
4885 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4886     Defining MAIL_LOCK_LOCKF
4887 EOF
4888 cat >> confdefs.h <<\EOF
4889 #define MAIL_LOCK_LOCKF 1
4890 EOF
4891 }
4892
4893 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4894     Defining MAIL_LOCK_FLOCK
4895 EOF
4896 cat >> confdefs.h <<\EOF
4897 #define MAIL_LOCK_FLOCK 1
4898 EOF
4899 }
4900
4901 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4902     Defining MAIL_LOCK_LOCKING
4903 EOF
4904 cat >> confdefs.h <<\EOF
4905 #define MAIL_LOCK_LOCKING 1
4906 EOF
4907 }
4908
4909 elif test "$mail_locking" = "pop"; then
4910   with_pop=yes
4911   mail_locking=
4912 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4913     Defining MAIL_LOCK_DOT
4914 EOF
4915 cat >> confdefs.h <<\EOF
4916 #define MAIL_LOCK_DOT 1
4917 EOF
4918 }
4919
4920 fi
4921 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4922   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4923 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4924   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4925 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4926   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4927
4928 case "$opsys" in decosf*)
4929   
4930 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4931 echo "configure:4932: checking for cma_open in -lpthreads" >&5
4932 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4933
4934 xe_check_libs=" -lpthreads "
4935 cat > conftest.$ac_ext <<EOF
4936 #line 4937 "configure"
4937 #include "confdefs.h"
4938 /* Override any gcc2 internal prototype to avoid an error.  */
4939 /* We use char because int might match the return type of a gcc2
4940     builtin and then its argument prototype would still apply.  */
4941 char cma_open();
4942
4943 int main() {
4944 cma_open()
4945 ; return 0; }
4946 EOF
4947 if { (eval echo configure:4948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4948   rm -rf conftest*
4949   eval "ac_cv_lib_$ac_lib_var=yes"
4950 else
4951   echo "configure: failed program was:" >&5
4952   cat conftest.$ac_ext >&5
4953   rm -rf conftest*
4954   eval "ac_cv_lib_$ac_lib_var=no"
4955 fi
4956 rm -f conftest*
4957 xe_check_libs=""
4958
4959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4960   echo "$ac_t""yes" 1>&6
4961     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4962     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4963   { test "$extra_verbose" = "yes" && cat << EOF
4964     Defining $ac_tr_lib
4965 EOF
4966 cat >> confdefs.h <<EOF
4967 #define $ac_tr_lib 1
4968 EOF
4969 }
4970
4971   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4972
4973 else
4974   echo "$ac_t""no" 1>&6
4975 fi
4976
4977
4978   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4979     c_switch_site="$c_switch_site -threads" ;;
4980 esac
4981
4982
4983 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4984 echo "configure:4985: checking whether the -xildoff compiler flag is required" >&5
4985 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4986   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4987     then echo "$ac_t""no" 1>&6;
4988     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
4989   fi
4990   else echo "$ac_t""no" 1>&6
4991 fi
4992
4993 if test "$opsys" = "sol2"; then
4994   if test "$os_release" -ge 56; then
4995     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4996 echo "configure:4997: checking for \"-z ignore\" linker flag" >&5
4997     case "`ld -h 2>&1`" in
4998       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4999         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5000       *) echo "$ac_t""no" 1>&6 ;;
5001     esac
5002   fi
5003 fi
5004
5005 if test "$pdump" != "yes"; then
5006   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
5007 echo "configure:5008: checking for \"-z nocombreloc\" linker flag" >&5
5008   case "`ld --help 2>&1`" in
5009     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
5010       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
5011     *) echo "$ac_t""no" 1>&6 ;;
5012   esac
5013 fi
5014
5015
5016 echo "checking "for specified window system"" 1>&6
5017 echo "configure:5018: checking "for specified window system"" >&5
5018
5019
5020 GNOME_CONFIG=no
5021 GTK_CONFIG=no
5022
5023 if test "$with_gnome" != "no"; then
5024    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5025 echo "configure:5026: checking for GNOME configuration script" >&5
5026    for possible in gnome-config
5027    do
5028       possible_version=`${possible} --version 2> /dev/null`
5029       if test "x${possible_version}" != "x"; then
5030               GNOME_CONFIG="${possible}"
5031               with_gnome=yes
5032               with_gtk=yes
5033               break
5034       fi
5035    done
5036    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5037 fi
5038
5039 if test "${GNOME_CONFIG}" != "no"; then
5040       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5041       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5042       { test "$extra_verbose" = "yes" && cat << \EOF
5043     Defining HAVE_GNOME
5044 EOF
5045 cat >> confdefs.h <<\EOF
5046 #define HAVE_GNOME 1
5047 EOF
5048 }
5049
5050       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5051       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5052 fi
5053
5054 if test "$with_gtk" != "no";then
5055    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5056 echo "configure:5057: checking for GTK configuration script" >&5
5057    for possible in gtk12-config gtk14-config gtk-config
5058    do
5059       possible_version=`${possible} --version 2> /dev/null`
5060       if test "x${possible_version}" != "x"; then
5061               GTK_CONFIG="${possible}"
5062       fi
5063       case "${possible_version}" in
5064         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5065         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5066         1.2.*)
5067                 with_gtk=yes
5068                 break
5069                 ;;
5070         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5071       esac
5072    done
5073    echo "$ac_t""${GTK_CONFIG}" 1>&6
5074 fi
5075
5076 if test "${GTK_CONFIG}" != "no"; then
5077       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5078 echo "configure:5079: checking gtk version" >&5
5079       GTK_VERSION=`${GTK_CONFIG} --version`
5080       echo "$ac_t""${GTK_VERSION}" 1>&6
5081
5082       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5083 echo "configure:5084: checking gtk libs" >&5
5084       GTK_LIBS=`${GTK_CONFIG} --libs`
5085       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5086       echo "$ac_t""${GTK_LIBS}" 1>&6
5087
5088       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5089 echo "configure:5090: checking gtk cflags" >&5
5090       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5091       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5092       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5093
5094       
5095 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5096 echo "configure:5097: checking for main in -lgdk_imlib" >&5
5097 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5098
5099 xe_check_libs=" -lgdk_imlib "
5100 cat > conftest.$ac_ext <<EOF
5101 #line 5102 "configure"
5102 #include "confdefs.h"
5103
5104 int main() {
5105 main()
5106 ; return 0; }
5107 EOF
5108 if { (eval echo configure:5109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5109   rm -rf conftest*
5110   eval "ac_cv_lib_$ac_lib_var=yes"
5111 else
5112   echo "configure: failed program was:" >&5
5113   cat conftest.$ac_ext >&5
5114   rm -rf conftest*
5115   eval "ac_cv_lib_$ac_lib_var=no"
5116 fi
5117 rm -f conftest*
5118 xe_check_libs=""
5119
5120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5121   echo "$ac_t""yes" 1>&6
5122   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5123 else
5124   echo "$ac_t""no" 1>&6
5125 fi
5126
5127
5128       
5129 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5130 echo "configure:5131: checking for Imlib_init in -lImlib" >&5
5131 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5132
5133 xe_check_libs=" -lImlib "
5134 cat > conftest.$ac_ext <<EOF
5135 #line 5136 "configure"
5136 #include "confdefs.h"
5137 /* Override any gcc2 internal prototype to avoid an error.  */
5138 /* We use char because int might match the return type of a gcc2
5139     builtin and then its argument prototype would still apply.  */
5140 char Imlib_init();
5141
5142 int main() {
5143 Imlib_init()
5144 ; return 0; }
5145 EOF
5146 if { (eval echo configure:5147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5147   rm -rf conftest*
5148   eval "ac_cv_lib_$ac_lib_var=yes"
5149 else
5150   echo "configure: failed program was:" >&5
5151   cat conftest.$ac_ext >&5
5152   rm -rf conftest*
5153   eval "ac_cv_lib_$ac_lib_var=no"
5154 fi
5155 rm -f conftest*
5156 xe_check_libs=""
5157
5158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5159   echo "$ac_t""yes" 1>&6
5160   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5161 else
5162   echo "$ac_t""no" 1>&6
5163 fi
5164
5165
5166       for ac_func in gdk_imlib_init
5167 do
5168 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5169 echo "configure:5170: checking for $ac_func" >&5
5170
5171 cat > conftest.$ac_ext <<EOF
5172 #line 5173 "configure"
5173 #include "confdefs.h"
5174 /* System header to define __stub macros and hopefully few prototypes,
5175     which can conflict with char $ac_func(); below.  */
5176 #include <assert.h>
5177 /* Override any gcc2 internal prototype to avoid an error.  */
5178 /* We use char because int might match the return type of a gcc2
5179     builtin and then its argument prototype would still apply.  */
5180 char $ac_func();
5181
5182 int main() {
5183
5184 /* The GNU C library defines this for functions which it implements
5185     to always fail with ENOSYS.  Some functions are actually named
5186     something starting with __ and the normal name is an alias.  */
5187 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5188 choke me
5189 #else
5190 $ac_func();
5191 #endif
5192
5193 ; return 0; }
5194 EOF
5195 if { (eval echo configure:5196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5196   rm -rf conftest*
5197   eval "ac_cv_func_$ac_func=yes"
5198 else
5199   echo "configure: failed program was:" >&5
5200   cat conftest.$ac_ext >&5
5201   rm -rf conftest*
5202   eval "ac_cv_func_$ac_func=no"
5203 fi
5204 rm -f conftest*
5205
5206 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5207   echo "$ac_t""yes" 1>&6
5208     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5209   { test "$extra_verbose" = "yes" && cat << EOF
5210     Defining $ac_tr_func
5211 EOF
5212 cat >> confdefs.h <<EOF
5213 #define $ac_tr_func 1
5214 EOF
5215 }
5216  
5217 else
5218   echo "$ac_t""no" 1>&6
5219 fi
5220 done
5221
5222
5223       { test "$extra_verbose" = "yes" && cat << \EOF
5224     Defining HAVE_XPM
5225 EOF
5226 cat >> confdefs.h <<\EOF
5227 #define HAVE_XPM 1
5228 EOF
5229 }
5230
5231       { test "$extra_verbose" = "yes" && cat << \EOF
5232     Defining HAVE_GTK
5233 EOF
5234 cat >> confdefs.h <<\EOF
5235 #define HAVE_GTK 1
5236 EOF
5237 }
5238
5239       
5240
5241       window_system=gtk
5242       with_gtk=yes
5243       with_x11=no
5244
5245       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5246       test "${with_toolbars}" != no && with_toolbars=gtk
5247       test "${with_menubars}" != "no" && with_menubars=gtk
5248       test "${with_dialogs}" != "no" && with_dialogs=gtk
5249       test "${with_widgets}" != "no" && with_widgets=gtk
5250
5251       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5252    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5253  fi
5254       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5255    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5256  fi
5257       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5258    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5259  fi
5260       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5261    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5262  fi
5263
5264             OLD_CFLAGS="${CFLAGS}"
5265       OLD_CPPFLAGS="${CPPFLAGS}"
5266       OLD_LDFLAGS="${LDFLAGS}"
5267       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5268       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5269       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5270       for ac_hdr in glade/glade.h glade.h
5271 do
5272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5274 echo "configure:5275: checking for $ac_hdr" >&5
5275
5276 cat > conftest.$ac_ext <<EOF
5277 #line 5278 "configure"
5278 #include "confdefs.h"
5279 #include <$ac_hdr>
5280 EOF
5281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5282 { (eval echo configure:5283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5284 if test -z "$ac_err"; then
5285   rm -rf conftest*
5286   eval "ac_cv_header_$ac_safe=yes"
5287 else
5288   echo "$ac_err" >&5
5289   echo "configure: failed program was:" >&5
5290   cat conftest.$ac_ext >&5
5291   rm -rf conftest*
5292   eval "ac_cv_header_$ac_safe=no"
5293 fi
5294 rm -f conftest*
5295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5296   echo "$ac_t""yes" 1>&6
5297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5298   { test "$extra_verbose" = "yes" && cat << EOF
5299     Defining $ac_tr_hdr
5300 EOF
5301 cat >> confdefs.h <<EOF
5302 #define $ac_tr_hdr 1
5303 EOF
5304 }
5305  
5306 else
5307   echo "$ac_t""no" 1>&6
5308 fi
5309 done
5310
5311       
5312 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5313 echo "configure:5314: checking for main in -lxml" >&5
5314 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5315
5316 xe_check_libs=" -lxml "
5317 cat > conftest.$ac_ext <<EOF
5318 #line 5319 "configure"
5319 #include "confdefs.h"
5320
5321 int main() {
5322 main()
5323 ; return 0; }
5324 EOF
5325 if { (eval echo configure:5326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5326   rm -rf conftest*
5327   eval "ac_cv_lib_$ac_lib_var=yes"
5328 else
5329   echo "configure: failed program was:" >&5
5330   cat conftest.$ac_ext >&5
5331   rm -rf conftest*
5332   eval "ac_cv_lib_$ac_lib_var=no"
5333 fi
5334 rm -f conftest*
5335 xe_check_libs=""
5336
5337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5338   echo "$ac_t""yes" 1>&6
5339   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5340 else
5341   echo "$ac_t""no" 1>&6
5342 fi
5343
5344
5345       
5346 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5347 echo "configure:5348: checking for main in -lglade" >&5
5348 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5349
5350 xe_check_libs=" -lglade "
5351 cat > conftest.$ac_ext <<EOF
5352 #line 5353 "configure"
5353 #include "confdefs.h"
5354
5355 int main() {
5356 main()
5357 ; return 0; }
5358 EOF
5359 if { (eval echo configure:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5360   rm -rf conftest*
5361   eval "ac_cv_lib_$ac_lib_var=yes"
5362 else
5363   echo "configure: failed program was:" >&5
5364   cat conftest.$ac_ext >&5
5365   rm -rf conftest*
5366   eval "ac_cv_lib_$ac_lib_var=no"
5367 fi
5368 rm -f conftest*
5369 xe_check_libs=""
5370
5371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5372   echo "$ac_t""yes" 1>&6
5373   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5374 else
5375   echo "$ac_t""no" 1>&6
5376 fi
5377
5378
5379       
5380 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5381 echo "configure:5382: checking for main in -lglade-gnome" >&5
5382 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5383
5384 xe_check_libs=" -lglade-gnome "
5385 cat > conftest.$ac_ext <<EOF
5386 #line 5387 "configure"
5387 #include "confdefs.h"
5388
5389 int main() {
5390 main()
5391 ; return 0; }
5392 EOF
5393 if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5394   rm -rf conftest*
5395   eval "ac_cv_lib_$ac_lib_var=yes"
5396 else
5397   echo "configure: failed program was:" >&5
5398   cat conftest.$ac_ext >&5
5399   rm -rf conftest*
5400   eval "ac_cv_lib_$ac_lib_var=no"
5401 fi
5402 rm -f conftest*
5403 xe_check_libs=""
5404
5405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5406   echo "$ac_t""yes" 1>&6
5407   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5408 else
5409   echo "$ac_t""no" 1>&6
5410 fi
5411
5412
5413       cat > conftest.$ac_ext <<EOF
5414 #line 5415 "configure"
5415 #include "confdefs.h"
5416 #include <glade/glade-xml.h>
5417 EOF
5418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5419   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5420   rm -rf conftest*
5421   echo "$ac_t""yes" 1>&6
5422                        { test "$extra_verbose" = "yes" && cat << \EOF
5423     Defining LIBGLADE_XML_TXTDOMAIN = 1
5424 EOF
5425 cat >> confdefs.h <<\EOF
5426 #define LIBGLADE_XML_TXTDOMAIN 1
5427 EOF
5428 }
5429
5430 else
5431   rm -rf conftest*
5432   echo "$ac_t""no" 1>&6
5433 fi
5434 rm -f conftest*
5435
5436       CFLAGS="${OLD_CFLAGS}"
5437       CPPFLAGS="${OLD_CPPFLAGS}"
5438       LDFLAGS="${OLD_LDFLAGS}"
5439 fi
5440
5441
5442 if test "$with_x11" != "no"; then
5443     test "$x_includes $x_libraries" != "NONE NONE" && \
5444    window_system=x11 with_x11=yes
5445
5446         
5447       if test "$x_includes $x_libraries" = "NONE NONE" \
5448     -a -n "$OPENWINHOME" \
5449     -a "$OPENWINHOME" != "/usr/openwin" \
5450     -a -d "$OPENWINHOME"; then
5451       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5452       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5453       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5454   fi
5455
5456   if test "$x_includes" = "NONE"; then
5457                     for dir in "/usr/X11" "/usr/X11R6"; do
5458       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5459     done
5460   fi
5461
5462   if test "$x_libraries" = "NONE"; then
5463     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5464       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5465     done
5466   fi
5467
5468   # If we find X, set shell vars x_includes and x_libraries to the
5469 # paths, otherwise set no_x=yes.
5470 # Uses ac_ vars as temps to allow command line to override cache and checks.
5471 # --without-x overrides everything else, but does not touch the cache.
5472 echo $ac_n "checking for X""... $ac_c" 1>&6
5473 echo "configure:5474: checking for X" >&5
5474
5475 # Check whether --with-x or --without-x was given.
5476 if test "${with_x+set}" = set; then
5477   withval="$with_x"
5478   :
5479 fi
5480
5481 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5482 if test "x$with_x" = xno; then
5483   # The user explicitly disabled X.
5484   have_x=disabled
5485 else
5486   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5487     # Both variables are already set.
5488     have_x=yes
5489   else
5490
5491 # One or both of the vars are not set, and there is no cached value.
5492 ac_x_includes=NO ac_x_libraries=NO
5493 rm -fr conftestdir
5494 if mkdir conftestdir; then
5495   cd conftestdir
5496   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5497   cat > Imakefile <<'EOF'
5498 acfindx:
5499         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5500 EOF
5501   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5502     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5503     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5504     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5505     for ac_extension in a so sl; do
5506       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5507         test -f $ac_im_libdir/libX11.$ac_extension; then
5508         ac_im_usrlibdir=$ac_im_libdir; break
5509       fi
5510     done
5511     # Screen out bogus values from the imake configuration.  They are
5512     # bogus both because they are the default anyway, and because
5513     # using them would break gcc on systems where it needs fixed includes.
5514     case "$ac_im_incroot" in
5515         /usr/include) ;;
5516         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5517     esac
5518     case "$ac_im_usrlibdir" in
5519         /usr/lib | /lib) ;;
5520         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5521     esac
5522   fi
5523   cd ..
5524   rm -fr conftestdir
5525 fi
5526
5527 if test "$ac_x_includes" = NO; then
5528   # Guess where to find include files, by looking for this one X11 .h file.
5529   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5530
5531   # First, try using that file with no special directory specified.
5532 cat > conftest.$ac_ext <<EOF
5533 #line 5534 "configure"
5534 #include "confdefs.h"
5535 #include <$x_direct_test_include>
5536 EOF
5537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5538 { (eval echo configure:5539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5540 if test -z "$ac_err"; then
5541   rm -rf conftest*
5542   # We can compile using X headers with no special include directory.
5543 ac_x_includes=
5544 else
5545   echo "$ac_err" >&5
5546   echo "configure: failed program was:" >&5
5547   cat conftest.$ac_ext >&5
5548   rm -rf conftest*
5549   # Look for the header file in a standard set of common directories.
5550 # Check X11 before X11Rn because it is often a symlink to the current release.
5551   for ac_dir in               \
5552     /usr/X11/include          \
5553     /usr/X11R6/include        \
5554     /usr/X11R5/include        \
5555     /usr/X11R4/include        \
5556                               \
5557     /usr/include/X11          \
5558     /usr/include/X11R6        \
5559     /usr/include/X11R5        \
5560     /usr/include/X11R4        \
5561                               \
5562     /usr/local/X11/include    \
5563     /usr/local/X11R6/include  \
5564     /usr/local/X11R5/include  \
5565     /usr/local/X11R4/include  \
5566                               \
5567     /usr/local/include/X11    \
5568     /usr/local/include/X11R6  \
5569     /usr/local/include/X11R5  \
5570     /usr/local/include/X11R4  \
5571                               \
5572     /usr/X386/include         \
5573     /usr/x386/include         \
5574     /usr/XFree86/include/X11  \
5575                               \
5576     /usr/include              \
5577     /usr/local/include        \
5578     /usr/unsupported/include  \
5579     /usr/athena/include       \
5580     /usr/local/x11r5/include  \
5581     /usr/lpp/Xamples/include  \
5582                               \
5583     /usr/openwin/include      \
5584     /usr/openwin/share/include \
5585     ; \
5586   do
5587     if test -r "$ac_dir/$x_direct_test_include"; then
5588       ac_x_includes=$ac_dir
5589       break
5590     fi
5591   done
5592 fi
5593 rm -f conftest*
5594 fi # $ac_x_includes = NO
5595
5596 if test "$ac_x_libraries" = NO; then
5597   # Check for the libraries.
5598
5599   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5600   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5601
5602   # See if we find them without any special options.
5603   # Don't add to $LIBS permanently.
5604   ac_save_LIBS="$LIBS"
5605   LIBS="-l$x_direct_test_library $LIBS"
5606 cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5609
5610 int main() {
5611 ${x_direct_test_function}()
5612 ; return 0; }
5613 EOF
5614 if { (eval echo configure:5615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5615   rm -rf conftest*
5616   LIBS="$ac_save_LIBS"
5617 # We can link X programs with no special library path.
5618 ac_x_libraries=
5619 else
5620   echo "configure: failed program was:" >&5
5621   cat conftest.$ac_ext >&5
5622   rm -rf conftest*
5623   LIBS="$ac_save_LIBS"
5624 # First see if replacing the include by lib works.
5625 # Check X11 before X11Rn because it is often a symlink to the current release.
5626 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5627     /usr/X11/lib          \
5628     /usr/X11R6/lib        \
5629     /usr/X11R5/lib        \
5630     /usr/X11R4/lib        \
5631                           \
5632     /usr/lib/X11          \
5633     /usr/lib/X11R6        \
5634     /usr/lib/X11R5        \
5635     /usr/lib/X11R4        \
5636                           \
5637     /usr/local/X11/lib    \
5638     /usr/local/X11R6/lib  \
5639     /usr/local/X11R5/lib  \
5640     /usr/local/X11R4/lib  \
5641                           \
5642     /usr/local/lib/X11    \
5643     /usr/local/lib/X11R6  \
5644     /usr/local/lib/X11R5  \
5645     /usr/local/lib/X11R4  \
5646                           \
5647     /usr/X386/lib         \
5648     /usr/x386/lib         \
5649     /usr/XFree86/lib/X11  \
5650                           \
5651     /usr/lib              \
5652     /usr/local/lib        \
5653     /usr/unsupported/lib  \
5654     /usr/athena/lib       \
5655     /usr/local/x11r5/lib  \
5656     /usr/lpp/Xamples/lib  \
5657     /lib/usr/lib/X11      \
5658                           \
5659     /usr/openwin/lib      \
5660     /usr/openwin/share/lib \
5661     ; \
5662 do
5663   for ac_extension in a so sl; do
5664     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5665       ac_x_libraries=$ac_dir
5666       break 2
5667     fi
5668   done
5669 done
5670 fi
5671 rm -f conftest*
5672 fi # $ac_x_libraries = NO
5673
5674 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5675   # Didn't find X anywhere.  Cache the known absence of X.
5676   ac_cv_have_x="have_x=no"
5677 else
5678   # Record where we found X for the cache.
5679   ac_cv_have_x="have_x=yes \
5680                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5681 fi
5682   fi
5683   eval "$ac_cv_have_x"
5684 fi # $with_x != no
5685
5686 if test "$have_x" != yes; then
5687   echo "$ac_t""$have_x" 1>&6
5688   no_x=yes
5689 else
5690   # If each of the values was on the command line, it overrides each guess.
5691   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5692   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5693   # Update the cache value to reflect the command line values.
5694   ac_cv_have_x="have_x=yes \
5695                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5696   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5697 fi
5698
5699 if test "$no_x" = yes; then
5700   # Not all programs may use this symbol, but it does not hurt to define it.
5701   { test "$extra_verbose" = "yes" && cat << \EOF
5702     Defining X_DISPLAY_MISSING
5703 EOF
5704 cat >> confdefs.h <<\EOF
5705 #define X_DISPLAY_MISSING 1
5706 EOF
5707 }
5708
5709   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5710 else
5711   if test -n "$x_includes"; then
5712     X_CFLAGS="$X_CFLAGS -I$x_includes"
5713   fi
5714
5715   # It would also be nice to do this for all -L options, not just this one.
5716   if test -n "$x_libraries"; then
5717     X_LIBS="$X_LIBS -L$x_libraries"
5718     # For Solaris; some versions of Sun CC require a space after -R and
5719     # others require no space.  Words are not sufficient . . . .
5720     case "`(uname -sr) 2>/dev/null`" in
5721     "SunOS 5"*)
5722       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5723 echo "configure:5724: checking whether -R must be followed by a space" >&5
5724       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5725       cat > conftest.$ac_ext <<EOF
5726 #line 5727 "configure"
5727 #include "confdefs.h"
5728
5729 int main() {
5730
5731 ; return 0; }
5732 EOF
5733 if { (eval echo configure:5734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5734   rm -rf conftest*
5735   ac_R_nospace=yes
5736 else
5737   echo "configure: failed program was:" >&5
5738   cat conftest.$ac_ext >&5
5739   rm -rf conftest*
5740   ac_R_nospace=no
5741 fi
5742 rm -f conftest*
5743       if test $ac_R_nospace = yes; then
5744         echo "$ac_t""no" 1>&6
5745         X_LIBS="$X_LIBS -R$x_libraries"
5746       else
5747         LIBS="$ac_xsave_LIBS -R $x_libraries"
5748         cat > conftest.$ac_ext <<EOF
5749 #line 5750 "configure"
5750 #include "confdefs.h"
5751
5752 int main() {
5753
5754 ; return 0; }
5755 EOF
5756 if { (eval echo configure:5757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5757   rm -rf conftest*
5758   ac_R_space=yes
5759 else
5760   echo "configure: failed program was:" >&5
5761   cat conftest.$ac_ext >&5
5762   rm -rf conftest*
5763   ac_R_space=no
5764 fi
5765 rm -f conftest*
5766         if test $ac_R_space = yes; then
5767           echo "$ac_t""yes" 1>&6
5768           X_LIBS="$X_LIBS -R $x_libraries"
5769         else
5770           echo "$ac_t""neither works" 1>&6
5771         fi
5772       fi
5773       LIBS="$ac_xsave_LIBS"
5774     esac
5775   fi
5776
5777   # Check for system-dependent libraries X programs must link with.
5778   # Do this before checking for the system-independent R6 libraries
5779   # (-lICE), since we may need -lsocket or whatever for X linking.
5780
5781   if test "$ISC" = yes; then
5782     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5783   else
5784     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5785     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5786     # the Alpha needs dnet_stub (dnet does not exist).
5787     if test "$with_dnet" = "no" ; then
5788 ac_cv_lib_dnet_dnet_ntoa=no
5789 else
5790
5791 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5792 echo "configure:5793: checking for dnet_ntoa in -ldnet" >&5
5793 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5794
5795 xe_check_libs=" -ldnet "
5796 cat > conftest.$ac_ext <<EOF
5797 #line 5798 "configure"
5798 #include "confdefs.h"
5799 /* Override any gcc2 internal prototype to avoid an error.  */
5800 /* We use char because int might match the return type of a gcc2
5801     builtin and then its argument prototype would still apply.  */
5802 char dnet_ntoa();
5803
5804 int main() {
5805 dnet_ntoa()
5806 ; return 0; }
5807 EOF
5808 if { (eval echo configure:5809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5809   rm -rf conftest*
5810   eval "ac_cv_lib_$ac_lib_var=yes"
5811 else
5812   echo "configure: failed program was:" >&5
5813   cat conftest.$ac_ext >&5
5814   rm -rf conftest*
5815   eval "ac_cv_lib_$ac_lib_var=no"
5816 fi
5817 rm -f conftest*
5818 xe_check_libs=""
5819
5820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5821   echo "$ac_t""yes" 1>&6
5822   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5823 else
5824   echo "$ac_t""no" 1>&6
5825 fi
5826
5827 fi
5828
5829     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5830       
5831 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5832 echo "configure:5833: checking for dnet_ntoa in -ldnet_stub" >&5
5833 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5834
5835 xe_check_libs=" -ldnet_stub "
5836 cat > conftest.$ac_ext <<EOF
5837 #line 5838 "configure"
5838 #include "confdefs.h"
5839 /* Override any gcc2 internal prototype to avoid an error.  */
5840 /* We use char because int might match the return type of a gcc2
5841     builtin and then its argument prototype would still apply.  */
5842 char dnet_ntoa();
5843
5844 int main() {
5845 dnet_ntoa()
5846 ; return 0; }
5847 EOF
5848 if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5849   rm -rf conftest*
5850   eval "ac_cv_lib_$ac_lib_var=yes"
5851 else
5852   echo "configure: failed program was:" >&5
5853   cat conftest.$ac_ext >&5
5854   rm -rf conftest*
5855   eval "ac_cv_lib_$ac_lib_var=no"
5856 fi
5857 rm -f conftest*
5858 xe_check_libs=""
5859
5860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5861   echo "$ac_t""yes" 1>&6
5862   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5863 else
5864   echo "$ac_t""no" 1>&6
5865 fi
5866
5867
5868     fi
5869
5870     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5871     # to get the SysV transport functions.
5872     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5873     # needs -lnsl.
5874     # The nsl library prevents programs from opening the X display
5875     # on Irix 5.2, according to dickey@clark.net.
5876     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5877 echo "configure:5878: checking for gethostbyname" >&5
5878
5879 cat > conftest.$ac_ext <<EOF
5880 #line 5881 "configure"
5881 #include "confdefs.h"
5882 /* System header to define __stub macros and hopefully few prototypes,
5883     which can conflict with char gethostbyname(); below.  */
5884 #include <assert.h>
5885 /* Override any gcc2 internal prototype to avoid an error.  */
5886 /* We use char because int might match the return type of a gcc2
5887     builtin and then its argument prototype would still apply.  */
5888 char gethostbyname();
5889
5890 int main() {
5891
5892 /* The GNU C library defines this for functions which it implements
5893     to always fail with ENOSYS.  Some functions are actually named
5894     something starting with __ and the normal name is an alias.  */
5895 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5896 choke me
5897 #else
5898 gethostbyname();
5899 #endif
5900
5901 ; return 0; }
5902 EOF
5903 if { (eval echo configure:5904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5904   rm -rf conftest*
5905   eval "ac_cv_func_gethostbyname=yes"
5906 else
5907   echo "configure: failed program was:" >&5
5908   cat conftest.$ac_ext >&5
5909   rm -rf conftest*
5910   eval "ac_cv_func_gethostbyname=no"
5911 fi
5912 rm -f conftest*
5913
5914 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5915   echo "$ac_t""yes" 1>&6
5916   :
5917 else
5918   echo "$ac_t""no" 1>&6
5919 fi
5920
5921     if test $ac_cv_func_gethostbyname = no; then
5922       
5923 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5924 echo "configure:5925: checking for gethostbyname in -lnsl" >&5
5925 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5926
5927 xe_check_libs=" -lnsl "
5928 cat > conftest.$ac_ext <<EOF
5929 #line 5930 "configure"
5930 #include "confdefs.h"
5931 /* Override any gcc2 internal prototype to avoid an error.  */
5932 /* We use char because int might match the return type of a gcc2
5933     builtin and then its argument prototype would still apply.  */
5934 char gethostbyname();
5935
5936 int main() {
5937 gethostbyname()
5938 ; return 0; }
5939 EOF
5940 if { (eval echo configure:5941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5941   rm -rf conftest*
5942   eval "ac_cv_lib_$ac_lib_var=yes"
5943 else
5944   echo "configure: failed program was:" >&5
5945   cat conftest.$ac_ext >&5
5946   rm -rf conftest*
5947   eval "ac_cv_lib_$ac_lib_var=no"
5948 fi
5949 rm -f conftest*
5950 xe_check_libs=""
5951
5952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5953   echo "$ac_t""yes" 1>&6
5954   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5955 else
5956   echo "$ac_t""no" 1>&6
5957 fi
5958
5959
5960     fi
5961
5962     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5963     # socket/setsockopt and other routines are undefined under SCO ODT
5964     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5965     # on later versions), says simon@lia.di.epfl.ch: it contains
5966     # gethostby* variants that don't use the nameserver (or something).
5967     # -lsocket must be given before -lnsl if both are needed.
5968     # We assume that if connect needs -lnsl, so does gethostbyname.
5969     echo $ac_n "checking for connect""... $ac_c" 1>&6
5970 echo "configure:5971: checking for connect" >&5
5971
5972 cat > conftest.$ac_ext <<EOF
5973 #line 5974 "configure"
5974 #include "confdefs.h"
5975 /* System header to define __stub macros and hopefully few prototypes,
5976     which can conflict with char connect(); below.  */
5977 #include <assert.h>
5978 /* Override any gcc2 internal prototype to avoid an error.  */
5979 /* We use char because int might match the return type of a gcc2
5980     builtin and then its argument prototype would still apply.  */
5981 char connect();
5982
5983 int main() {
5984
5985 /* The GNU C library defines this for functions which it implements
5986     to always fail with ENOSYS.  Some functions are actually named
5987     something starting with __ and the normal name is an alias.  */
5988 #if defined (__stub_connect) || defined (__stub___connect)
5989 choke me
5990 #else
5991 connect();
5992 #endif
5993
5994 ; return 0; }
5995 EOF
5996 if { (eval echo configure:5997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5997   rm -rf conftest*
5998   eval "ac_cv_func_connect=yes"
5999 else
6000   echo "configure: failed program was:" >&5
6001   cat conftest.$ac_ext >&5
6002   rm -rf conftest*
6003   eval "ac_cv_func_connect=no"
6004 fi
6005 rm -f conftest*
6006
6007 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6008   echo "$ac_t""yes" 1>&6
6009   :
6010 else
6011   echo "$ac_t""no" 1>&6
6012 fi
6013
6014     if test $ac_cv_func_connect = no; then
6015       
6016 xe_msg_checking="for connect in -lsocket"
6017 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6018 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6019 echo "configure:6020: checking "$xe_msg_checking"" >&5
6020 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6021
6022 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6023 cat > conftest.$ac_ext <<EOF
6024 #line 6025 "configure"
6025 #include "confdefs.h"
6026 /* Override any gcc2 internal prototype to avoid an error.  */
6027 /* We use char because int might match the return type of a gcc2
6028     builtin and then its argument prototype would still apply.  */
6029 char connect();
6030
6031 int main() {
6032 connect()
6033 ; return 0; }
6034 EOF
6035 if { (eval echo configure:6036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6036   rm -rf conftest*
6037   eval "ac_cv_lib_$ac_lib_var=yes"
6038 else
6039   echo "configure: failed program was:" >&5
6040   cat conftest.$ac_ext >&5
6041   rm -rf conftest*
6042   eval "ac_cv_lib_$ac_lib_var=no"
6043 fi
6044 rm -f conftest*
6045 xe_check_libs=""
6046
6047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6048   echo "$ac_t""yes" 1>&6
6049   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6050 else
6051   echo "$ac_t""no" 1>&6
6052 fi
6053
6054
6055     fi
6056
6057     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6058     echo $ac_n "checking for remove""... $ac_c" 1>&6
6059 echo "configure:6060: checking for remove" >&5
6060
6061 cat > conftest.$ac_ext <<EOF
6062 #line 6063 "configure"
6063 #include "confdefs.h"
6064 /* System header to define __stub macros and hopefully few prototypes,
6065     which can conflict with char remove(); below.  */
6066 #include <assert.h>
6067 /* Override any gcc2 internal prototype to avoid an error.  */
6068 /* We use char because int might match the return type of a gcc2
6069     builtin and then its argument prototype would still apply.  */
6070 char remove();
6071
6072 int main() {
6073
6074 /* The GNU C library defines this for functions which it implements
6075     to always fail with ENOSYS.  Some functions are actually named
6076     something starting with __ and the normal name is an alias.  */
6077 #if defined (__stub_remove) || defined (__stub___remove)
6078 choke me
6079 #else
6080 remove();
6081 #endif
6082
6083 ; return 0; }
6084 EOF
6085 if { (eval echo configure:6086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6086   rm -rf conftest*
6087   eval "ac_cv_func_remove=yes"
6088 else
6089   echo "configure: failed program was:" >&5
6090   cat conftest.$ac_ext >&5
6091   rm -rf conftest*
6092   eval "ac_cv_func_remove=no"
6093 fi
6094 rm -f conftest*
6095
6096 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6097   echo "$ac_t""yes" 1>&6
6098   :
6099 else
6100   echo "$ac_t""no" 1>&6
6101 fi
6102
6103     if test $ac_cv_func_remove = no; then
6104       
6105 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6106 echo "configure:6107: checking for remove in -lposix" >&5
6107 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6108
6109 xe_check_libs=" -lposix "
6110 cat > conftest.$ac_ext <<EOF
6111 #line 6112 "configure"
6112 #include "confdefs.h"
6113 /* Override any gcc2 internal prototype to avoid an error.  */
6114 /* We use char because int might match the return type of a gcc2
6115     builtin and then its argument prototype would still apply.  */
6116 char remove();
6117
6118 int main() {
6119 remove()
6120 ; return 0; }
6121 EOF
6122 if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6123   rm -rf conftest*
6124   eval "ac_cv_lib_$ac_lib_var=yes"
6125 else
6126   echo "configure: failed program was:" >&5
6127   cat conftest.$ac_ext >&5
6128   rm -rf conftest*
6129   eval "ac_cv_lib_$ac_lib_var=no"
6130 fi
6131 rm -f conftest*
6132 xe_check_libs=""
6133
6134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6135   echo "$ac_t""yes" 1>&6
6136   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6137 else
6138   echo "$ac_t""no" 1>&6
6139 fi
6140
6141
6142     fi
6143
6144     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6145     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6146 echo "configure:6147: checking for shmat" >&5
6147
6148 cat > conftest.$ac_ext <<EOF
6149 #line 6150 "configure"
6150 #include "confdefs.h"
6151 /* System header to define __stub macros and hopefully few prototypes,
6152     which can conflict with char shmat(); below.  */
6153 #include <assert.h>
6154 /* Override any gcc2 internal prototype to avoid an error.  */
6155 /* We use char because int might match the return type of a gcc2
6156     builtin and then its argument prototype would still apply.  */
6157 char shmat();
6158
6159 int main() {
6160
6161 /* The GNU C library defines this for functions which it implements
6162     to always fail with ENOSYS.  Some functions are actually named
6163     something starting with __ and the normal name is an alias.  */
6164 #if defined (__stub_shmat) || defined (__stub___shmat)
6165 choke me
6166 #else
6167 shmat();
6168 #endif
6169
6170 ; return 0; }
6171 EOF
6172 if { (eval echo configure:6173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6173   rm -rf conftest*
6174   eval "ac_cv_func_shmat=yes"
6175 else
6176   echo "configure: failed program was:" >&5
6177   cat conftest.$ac_ext >&5
6178   rm -rf conftest*
6179   eval "ac_cv_func_shmat=no"
6180 fi
6181 rm -f conftest*
6182
6183 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6184   echo "$ac_t""yes" 1>&6
6185   :
6186 else
6187   echo "$ac_t""no" 1>&6
6188 fi
6189
6190     if test $ac_cv_func_shmat = no; then
6191       
6192 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6193 echo "configure:6194: checking for shmat in -lipc" >&5
6194 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6195
6196 xe_check_libs=" -lipc "
6197 cat > conftest.$ac_ext <<EOF
6198 #line 6199 "configure"
6199 #include "confdefs.h"
6200 /* Override any gcc2 internal prototype to avoid an error.  */
6201 /* We use char because int might match the return type of a gcc2
6202     builtin and then its argument prototype would still apply.  */
6203 char shmat();
6204
6205 int main() {
6206 shmat()
6207 ; return 0; }
6208 EOF
6209 if { (eval echo configure:6210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6210   rm -rf conftest*
6211   eval "ac_cv_lib_$ac_lib_var=yes"
6212 else
6213   echo "configure: failed program was:" >&5
6214   cat conftest.$ac_ext >&5
6215   rm -rf conftest*
6216   eval "ac_cv_lib_$ac_lib_var=no"
6217 fi
6218 rm -f conftest*
6219 xe_check_libs=""
6220
6221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6222   echo "$ac_t""yes" 1>&6
6223   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6224 else
6225   echo "$ac_t""no" 1>&6
6226 fi
6227
6228
6229     fi
6230   fi
6231
6232   # Check for libraries that X11R6 Xt/Xaw programs need.
6233   ac_save_LDFLAGS="$LDFLAGS"
6234   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6235   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6236   # check for ICE first), but we must link in the order -lSM -lICE or
6237   # we get undefined symbols.  So assume we have SM if we have ICE.
6238   # These have to be linked with before -lX11, unlike the other
6239   # libraries we check for below, so use a different variable.
6240   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6241   
6242 xe_msg_checking="for IceConnectionNumber in -lICE"
6243 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6244 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6245 echo "configure:6246: checking "$xe_msg_checking"" >&5
6246 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6247
6248 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6249 cat > conftest.$ac_ext <<EOF
6250 #line 6251 "configure"
6251 #include "confdefs.h"
6252 /* Override any gcc2 internal prototype to avoid an error.  */
6253 /* We use char because int might match the return type of a gcc2
6254     builtin and then its argument prototype would still apply.  */
6255 char IceConnectionNumber();
6256
6257 int main() {
6258 IceConnectionNumber()
6259 ; return 0; }
6260 EOF
6261 if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6262   rm -rf conftest*
6263   eval "ac_cv_lib_$ac_lib_var=yes"
6264 else
6265   echo "configure: failed program was:" >&5
6266   cat conftest.$ac_ext >&5
6267   rm -rf conftest*
6268   eval "ac_cv_lib_$ac_lib_var=no"
6269 fi
6270 rm -f conftest*
6271 xe_check_libs=""
6272
6273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6274   echo "$ac_t""yes" 1>&6
6275   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6276 else
6277   echo "$ac_t""no" 1>&6
6278 fi
6279
6280
6281   LDFLAGS="$ac_save_LDFLAGS"
6282
6283 fi
6284  # Autoconf claims to find X library and include dirs for us.
6285   if test "$no_x" = "yes"
6286   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6287   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6288   fi
6289 fi
6290
6291
6292 if test "$with_x11" = "yes"; then
6293   { test "$extra_verbose" = "yes" && cat << \EOF
6294     Defining HAVE_X_WINDOWS
6295 EOF
6296 cat >> confdefs.h <<\EOF
6297 #define HAVE_X_WINDOWS 1
6298 EOF
6299 }
6300
6301   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6302   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6303
6304       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6305     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6306     if test -d "$lib_dir" -a -d "$inc_dir"; then
6307       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6308         x_libraries="$lib_dir $x_libraries"
6309         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6310       esac
6311       case "$x_includes" in "$inc_dir"* ) ;; *)
6312         x_includes="$inc_dir $x_includes"
6313         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6314       esac
6315       break;       fi
6316   done
6317
6318     for rel in "X11R6" "X11R5" "X11R4"; do
6319     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6320     if test -d "$lib_dir" -a -d "$inc_dir"; then
6321       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6322         x_libraries="$x_libraries $lib_dir"
6323         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6324       esac
6325       case "$x_includes" in "$inc_dir"* ) ;; *)
6326         x_includes="$x_includes $inc_dir"
6327         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6328       esac
6329       break;     fi
6330   done
6331
6332     case "$opsys" in
6333   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 ;;
6334   esac
6335
6336   ld_switch_x_site="$X_LIBS"
6337
6338   
6339 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6340     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6341   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6342   
6343         runpath="" runpath_dirs=""
6344   if test -n "$LD_RUN_PATH"; then
6345     runpath="$LD_RUN_PATH"
6346   elif test "$GCC" = "yes"; then
6347         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6348     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6349     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6350     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6351       case "$arg" in P,* | -L* | -R* )
6352         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6353           {
6354 xe_runpath_dir="$dir"
6355   test "$xe_runpath_dir" != "/lib"     -a \
6356         "$xe_runpath_dir" != "/usr/lib" -a \
6357         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6358   eval "$xe_add_unique_runpath_dir"
6359 }
6360         done ;;
6361       esac
6362     done
6363     ld_switch_run="$ld_switch_run_save"
6364     rm -f conftest*
6365   else
6366         for arg in $ld_switch_site $ld_switch_x_site; do
6367       case "$arg" in -L*) {
6368 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6369   test "$xe_runpath_dir" != "/lib"     -a \
6370         "$xe_runpath_dir" != "/usr/lib" -a \
6371         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6372   eval "$xe_add_unique_runpath_dir"
6373 };; esac
6374     done
6375         if test "$opsys $need_motif" = "sol2 yes"; then
6376       xe_runpath_dir="/opt/SUNWdt/lib";
6377       eval "$xe_add_unique_runpath_dir";
6378     fi
6379   fi 
6380   if test -n "$runpath"; then
6381     ld_switch_run="${dash_r}${runpath}"
6382     
6383 if test "$GCC" = "yes"; then
6384   set x $ld_switch_run; shift; ld_switch_run=""
6385   while test -n "$1"; do
6386     case $1 in
6387       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6388       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6389       -Xlinker* ) ;;
6390       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6391     esac
6392     shift
6393   done
6394 fi
6395     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6396   fi
6397 fi
6398
6399
6400   if test "$extra_verbose" = "yes"; then
6401     echo; echo "X11 compilation variables:"
6402     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6403     echo
6404   fi
6405
6406             bitmapdirs=
6407   if test "$x_includes" != NONE; then
6408     for i in $x_includes; do
6409       if test -d "$i/bitmaps"; then
6410         bitmapdirs="$i/bitmaps:$bitmapdirs"
6411       fi
6412       if test -d "$i/X11/bitmaps"; then
6413         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6414       fi
6415     done
6416     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6417   fi
6418   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6419     Defining BITMAPDIR = "$bitmapdirs"
6420 EOF
6421 cat >> confdefs.h <<EOF
6422 #define BITMAPDIR "$bitmapdirs"
6423 EOF
6424 }
6425
6426
6427     echo "checking for X defines extracted by xmkmf" 1>&6
6428 echo "configure:6429: checking for X defines extracted by xmkmf" >&5
6429   rm -fr conftestdir
6430   if mkdir conftestdir; then
6431     cd conftestdir
6432     cat > Imakefile <<'EOF'
6433 xetest:
6434         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6435 EOF
6436     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6437       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6438       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6439     fi
6440     cd ..
6441     rm -fr conftestdir
6442     for word in $xmkmf_defines; do
6443       case "$word" in 
6444       -D__STDC__*) ;;
6445       -D* )
6446         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6447         case "$word" in
6448           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6449           *     ) val=1 ;;
6450         esac
6451         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6452           if test "$val" = "1"
6453             then { test "$extra_verbose" = "yes" && cat << EOF
6454     Defining $sym
6455 EOF
6456 cat >> confdefs.h <<EOF
6457 #define $sym 1
6458 EOF
6459 }
6460
6461             else { test "$extra_verbose" = "yes" && cat << EOF
6462     Defining $sym = $val
6463 EOF
6464 cat >> confdefs.h <<EOF
6465 #define $sym $val
6466 EOF
6467 }
6468
6469           fi
6470         fi  ;;
6471       esac
6472     done
6473   fi
6474
6475     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6476 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6477 echo "configure:6478: checking for X11/Intrinsic.h" >&5
6478
6479 cat > conftest.$ac_ext <<EOF
6480 #line 6481 "configure"
6481 #include "confdefs.h"
6482 #include <X11/Intrinsic.h>
6483 EOF
6484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6485 { (eval echo configure:6486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6487 if test -z "$ac_err"; then
6488   rm -rf conftest*
6489   eval "ac_cv_header_$ac_safe=yes"
6490 else
6491   echo "$ac_err" >&5
6492   echo "configure: failed program was:" >&5
6493   cat conftest.$ac_ext >&5
6494   rm -rf conftest*
6495   eval "ac_cv_header_$ac_safe=no"
6496 fi
6497 rm -f conftest*
6498 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6499   echo "$ac_t""yes" 1>&6
6500   :
6501 else
6502   echo "$ac_t""no" 1>&6
6503 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6504 fi
6505
6506
6507       
6508 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6509 echo "configure:6510: checking for XOpenDisplay in -lX11" >&5
6510 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6511
6512 xe_check_libs=" -lX11 "
6513 cat > conftest.$ac_ext <<EOF
6514 #line 6515 "configure"
6515 #include "confdefs.h"
6516 /* Override any gcc2 internal prototype to avoid an error.  */
6517 /* We use char because int might match the return type of a gcc2
6518     builtin and then its argument prototype would still apply.  */
6519 char XOpenDisplay();
6520
6521 int main() {
6522 XOpenDisplay()
6523 ; return 0; }
6524 EOF
6525 if { (eval echo configure:6526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6526   rm -rf conftest*
6527   eval "ac_cv_lib_$ac_lib_var=yes"
6528 else
6529   echo "configure: failed program was:" >&5
6530   cat conftest.$ac_ext >&5
6531   rm -rf conftest*
6532   eval "ac_cv_lib_$ac_lib_var=no"
6533 fi
6534 rm -f conftest*
6535 xe_check_libs=""
6536
6537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6538   echo "$ac_t""yes" 1>&6
6539   have_lib_x11=yes
6540 else
6541   echo "$ac_t""no" 1>&6
6542 fi
6543
6544
6545   if test "$have_lib_x11" != "yes"; then
6546     
6547 xe_msg_checking="for XGetFontProperty in -lX11"
6548 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6549 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6550 echo "configure:6551: checking "$xe_msg_checking"" >&5
6551 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6552
6553 xe_check_libs=" -lX11 -b i486-linuxaout"
6554 cat > conftest.$ac_ext <<EOF
6555 #line 6556 "configure"
6556 #include "confdefs.h"
6557 /* Override any gcc2 internal prototype to avoid an error.  */
6558 /* We use char because int might match the return type of a gcc2
6559     builtin and then its argument prototype would still apply.  */
6560 char XGetFontProperty();
6561
6562 int main() {
6563 XGetFontProperty()
6564 ; return 0; }
6565 EOF
6566 if { (eval echo configure:6567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6567   rm -rf conftest*
6568   eval "ac_cv_lib_$ac_lib_var=yes"
6569 else
6570   echo "configure: failed program was:" >&5
6571   cat conftest.$ac_ext >&5
6572   rm -rf conftest*
6573   eval "ac_cv_lib_$ac_lib_var=no"
6574 fi
6575 rm -f conftest*
6576 xe_check_libs=""
6577
6578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6579   echo "$ac_t""yes" 1>&6
6580   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6581 else
6582   echo "$ac_t""no" 1>&6
6583 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6584 fi
6585
6586
6587   fi
6588   libs_x="-lX11"
6589   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6590
6591     
6592 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6593 echo "configure:6594: checking for XShapeSelectInput in -lXext" >&5
6594 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6595
6596 xe_check_libs=" -lXext "
6597 cat > conftest.$ac_ext <<EOF
6598 #line 6599 "configure"
6599 #include "confdefs.h"
6600 /* Override any gcc2 internal prototype to avoid an error.  */
6601 /* We use char because int might match the return type of a gcc2
6602     builtin and then its argument prototype would still apply.  */
6603 char XShapeSelectInput();
6604
6605 int main() {
6606 XShapeSelectInput()
6607 ; return 0; }
6608 EOF
6609 if { (eval echo configure:6610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6610   rm -rf conftest*
6611   eval "ac_cv_lib_$ac_lib_var=yes"
6612 else
6613   echo "configure: failed program was:" >&5
6614   cat conftest.$ac_ext >&5
6615   rm -rf conftest*
6616   eval "ac_cv_lib_$ac_lib_var=no"
6617 fi
6618 rm -f conftest*
6619 xe_check_libs=""
6620
6621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6622   echo "$ac_t""yes" 1>&6
6623   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6624 else
6625   echo "$ac_t""no" 1>&6
6626 fi
6627
6628
6629
6630     
6631 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6632 echo "configure:6633: checking for XtOpenDisplay in -lXt" >&5
6633 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6634
6635 xe_check_libs=" -lXt "
6636 cat > conftest.$ac_ext <<EOF
6637 #line 6638 "configure"
6638 #include "confdefs.h"
6639 /* Override any gcc2 internal prototype to avoid an error.  */
6640 /* We use char because int might match the return type of a gcc2
6641     builtin and then its argument prototype would still apply.  */
6642 char XtOpenDisplay();
6643
6644 int main() {
6645 XtOpenDisplay()
6646 ; return 0; }
6647 EOF
6648 if { (eval echo configure:6649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6649   rm -rf conftest*
6650   eval "ac_cv_lib_$ac_lib_var=yes"
6651 else
6652   echo "configure: failed program was:" >&5
6653   cat conftest.$ac_ext >&5
6654   rm -rf conftest*
6655   eval "ac_cv_lib_$ac_lib_var=no"
6656 fi
6657 rm -f conftest*
6658 xe_check_libs=""
6659
6660 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6661   echo "$ac_t""yes" 1>&6
6662   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6663 else
6664   echo "$ac_t""no" 1>&6
6665 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6666 fi
6667
6668
6669
6670   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6671 echo "configure:6672: checking the version of X11 being used" >&5
6672   cat > conftest.$ac_ext <<EOF
6673 #line 6674 "configure"
6674 #include "confdefs.h"
6675 #include <X11/Intrinsic.h>
6676     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6677 EOF
6678 if { (eval echo configure:6679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6679 then
6680   ./conftest foobar; x11_release=$?
6681 else
6682   conftest_rc="$?"
6683   echo "configure: failed program was:" >&5
6684   cat conftest.$ac_ext >&5
6685   rm -fr conftest*
6686   x11_release=4
6687 fi
6688 rm -fr conftest*
6689   echo "$ac_t""R${x11_release}" 1>&6
6690   { test "$extra_verbose" = "yes" && cat << EOF
6691     Defining THIS_IS_X11R${x11_release}
6692 EOF
6693 cat >> confdefs.h <<EOF
6694 #define THIS_IS_X11R${x11_release} 1
6695 EOF
6696 }
6697
6698
6699   if test "${x11_release}" = "4"; then
6700     case "$with_widgets" in
6701       "" | "no") with_widgets=no ;;
6702       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6703     esac
6704   fi
6705
6706   for ac_func in XConvertCase
6707 do
6708 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6709 echo "configure:6710: checking for $ac_func" >&5
6710
6711 cat > conftest.$ac_ext <<EOF
6712 #line 6713 "configure"
6713 #include "confdefs.h"
6714 /* System header to define __stub macros and hopefully few prototypes,
6715     which can conflict with char $ac_func(); below.  */
6716 #include <assert.h>
6717 /* Override any gcc2 internal prototype to avoid an error.  */
6718 /* We use char because int might match the return type of a gcc2
6719     builtin and then its argument prototype would still apply.  */
6720 char $ac_func();
6721
6722 int main() {
6723
6724 /* The GNU C library defines this for functions which it implements
6725     to always fail with ENOSYS.  Some functions are actually named
6726     something starting with __ and the normal name is an alias.  */
6727 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6728 choke me
6729 #else
6730 $ac_func();
6731 #endif
6732
6733 ; return 0; }
6734 EOF
6735 if { (eval echo configure:6736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6736   rm -rf conftest*
6737   eval "ac_cv_func_$ac_func=yes"
6738 else
6739   echo "configure: failed program was:" >&5
6740   cat conftest.$ac_ext >&5
6741   rm -rf conftest*
6742   eval "ac_cv_func_$ac_func=no"
6743 fi
6744 rm -f conftest*
6745
6746 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6747   echo "$ac_t""yes" 1>&6
6748     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6749   { test "$extra_verbose" = "yes" && cat << EOF
6750     Defining $ac_tr_func
6751 EOF
6752 cat >> confdefs.h <<EOF
6753 #define $ac_tr_func 1
6754 EOF
6755 }
6756  
6757 else
6758   echo "$ac_t""no" 1>&6
6759 fi
6760 done
6761
6762
6763   for ac_hdr in X11/Xlocale.h
6764 do
6765 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6766 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6767 echo "configure:6768: checking for $ac_hdr" >&5
6768
6769 cat > conftest.$ac_ext <<EOF
6770 #line 6771 "configure"
6771 #include "confdefs.h"
6772 #include <$ac_hdr>
6773 EOF
6774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6775 { (eval echo configure:6776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6777 if test -z "$ac_err"; then
6778   rm -rf conftest*
6779   eval "ac_cv_header_$ac_safe=yes"
6780 else
6781   echo "$ac_err" >&5
6782   echo "configure: failed program was:" >&5
6783   cat conftest.$ac_ext >&5
6784   rm -rf conftest*
6785   eval "ac_cv_header_$ac_safe=no"
6786 fi
6787 rm -f conftest*
6788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6789   echo "$ac_t""yes" 1>&6
6790     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6791   { test "$extra_verbose" = "yes" && cat << EOF
6792     Defining $ac_tr_hdr
6793 EOF
6794 cat >> confdefs.h <<EOF
6795 #define $ac_tr_hdr 1
6796 EOF
6797 }
6798  
6799 else
6800   echo "$ac_t""no" 1>&6
6801 fi
6802 done
6803
6804
6805     for ac_func in XRegisterIMInstantiateCallback
6806 do
6807 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6808 echo "configure:6809: checking for $ac_func" >&5
6809
6810 cat > conftest.$ac_ext <<EOF
6811 #line 6812 "configure"
6812 #include "confdefs.h"
6813 /* System header to define __stub macros and hopefully few prototypes,
6814     which can conflict with char $ac_func(); below.  */
6815 #include <assert.h>
6816 /* Override any gcc2 internal prototype to avoid an error.  */
6817 /* We use char because int might match the return type of a gcc2
6818     builtin and then its argument prototype would still apply.  */
6819 char $ac_func();
6820
6821 int main() {
6822
6823 /* The GNU C library defines this for functions which it implements
6824     to always fail with ENOSYS.  Some functions are actually named
6825     something starting with __ and the normal name is an alias.  */
6826 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6827 choke me
6828 #else
6829 $ac_func();
6830 #endif
6831
6832 ; return 0; }
6833 EOF
6834 if { (eval echo configure:6835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6835   rm -rf conftest*
6836   eval "ac_cv_func_$ac_func=yes"
6837 else
6838   echo "configure: failed program was:" >&5
6839   cat conftest.$ac_ext >&5
6840   rm -rf conftest*
6841   eval "ac_cv_func_$ac_func=no"
6842 fi
6843 rm -f conftest*
6844
6845 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6846   echo "$ac_t""yes" 1>&6
6847     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6848   { test "$extra_verbose" = "yes" && cat << EOF
6849     Defining $ac_tr_func
6850 EOF
6851 cat >> confdefs.h <<EOF
6852 #define $ac_tr_func 1
6853 EOF
6854 }
6855  
6856 else
6857   echo "$ac_t""no" 1>&6
6858 fi
6859 done
6860
6861   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6862 echo "configure:6863: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6863   cat > conftest.$ac_ext <<EOF
6864 #line 6865 "configure"
6865 #include "confdefs.h"
6866
6867 #define NeedFunctionPrototypes 1
6868 #include <X11/Xlib.h>
6869 extern Bool XRegisterIMInstantiateCallback(
6870    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6871
6872 int main() {
6873
6874 ; return 0; }
6875 EOF
6876 if { (eval echo configure:6877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6877   rm -rf conftest*
6878   echo "$ac_t""yes" 1>&6
6879 else
6880   echo "configure: failed program was:" >&5
6881   cat conftest.$ac_ext >&5
6882   rm -rf conftest*
6883   echo "$ac_t""no" 1>&6
6884    { test "$extra_verbose" = "yes" && cat << \EOF
6885     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6886 EOF
6887 cat >> confdefs.h <<\EOF
6888 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6889 EOF
6890 }
6891
6892 fi
6893 rm -f conftest*
6894
6895     test -z "$with_xmu" && { 
6896 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6897 echo "configure:6898: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6898 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6899
6900 xe_check_libs=" -lXmu "
6901 cat > conftest.$ac_ext <<EOF
6902 #line 6903 "configure"
6903 #include "confdefs.h"
6904 /* Override any gcc2 internal prototype to avoid an error.  */
6905 /* We use char because int might match the return type of a gcc2
6906     builtin and then its argument prototype would still apply.  */
6907 char XmuReadBitmapDataFromFile();
6908
6909 int main() {
6910 XmuReadBitmapDataFromFile()
6911 ; return 0; }
6912 EOF
6913 if { (eval echo configure:6914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6914   rm -rf conftest*
6915   eval "ac_cv_lib_$ac_lib_var=yes"
6916 else
6917   echo "configure: failed program was:" >&5
6918   cat conftest.$ac_ext >&5
6919   rm -rf conftest*
6920   eval "ac_cv_lib_$ac_lib_var=no"
6921 fi
6922 rm -f conftest*
6923 xe_check_libs=""
6924
6925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6926   echo "$ac_t""yes" 1>&6
6927   with_xmu=yes
6928 else
6929   echo "$ac_t""no" 1>&6
6930 with_xmu=no
6931 fi
6932
6933  }
6934   if test "$with_xmu" = "no"; then
6935     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6936    echo "    xemacs will be linked with \"xmu.o\""
6937  fi
6938   else
6939     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6940     { test "$extra_verbose" = "yes" && cat << \EOF
6941     Defining HAVE_XMU
6942 EOF
6943 cat >> confdefs.h <<\EOF
6944 #define HAVE_XMU 1
6945 EOF
6946 }
6947
6948   fi
6949
6950       
6951 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6952 echo "configure:6953: checking for main in -lXbsd" >&5
6953 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6954
6955 xe_check_libs=" -lXbsd "
6956 cat > conftest.$ac_ext <<EOF
6957 #line 6958 "configure"
6958 #include "confdefs.h"
6959
6960 int main() {
6961 main()
6962 ; return 0; }
6963 EOF
6964 if { (eval echo configure:6965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6965   rm -rf conftest*
6966   eval "ac_cv_lib_$ac_lib_var=yes"
6967 else
6968   echo "configure: failed program was:" >&5
6969   cat conftest.$ac_ext >&5
6970   rm -rf conftest*
6971   eval "ac_cv_lib_$ac_lib_var=no"
6972 fi
6973 rm -f conftest*
6974 xe_check_libs=""
6975
6976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6977   echo "$ac_t""yes" 1>&6
6978   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6979 else
6980   echo "$ac_t""no" 1>&6
6981 fi
6982
6983
6984
6985     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6986         if test "$GCC" = "yes"; then
6987       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6988       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6989     else
6990       case "$CC" in
6991         "xlc" ) CC="xlc_r" ;;
6992         "xlC" ) CC="xlC_r" ;;
6993         "cc"  ) CC="cc_r" ;;
6994       esac
6995     fi
6996   fi
6997
6998 fi 
6999 if test "$with_msw" != "no"; then
7000   echo "checking for MS-Windows" 1>&6
7001 echo "configure:7002: checking for MS-Windows" >&5
7002   
7003 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7004 echo "configure:7005: checking for main in -lgdi32" >&5
7005 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7006
7007 xe_check_libs=" -lgdi32 "
7008 cat > conftest.$ac_ext <<EOF
7009 #line 7010 "configure"
7010 #include "confdefs.h"
7011
7012 int main() {
7013 main()
7014 ; return 0; }
7015 EOF
7016 if { (eval echo configure:7017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7017   rm -rf conftest*
7018   eval "ac_cv_lib_$ac_lib_var=yes"
7019 else
7020   echo "configure: failed program was:" >&5
7021   cat conftest.$ac_ext >&5
7022   rm -rf conftest*
7023   eval "ac_cv_lib_$ac_lib_var=no"
7024 fi
7025 rm -f conftest*
7026 xe_check_libs=""
7027
7028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7029   echo "$ac_t""yes" 1>&6
7030   with_msw=yes
7031 else
7032   echo "$ac_t""no" 1>&6
7033 fi
7034
7035
7036   if test "$with_msw" = "yes"; then
7037     { test "$extra_verbose" = "yes" && cat << \EOF
7038     Defining HAVE_MS_WINDOWS
7039 EOF
7040 cat >> confdefs.h <<\EOF
7041 #define HAVE_MS_WINDOWS 1
7042 EOF
7043 }
7044
7045
7046         if test "$with_netinstall" = "yes"; then
7047       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7048       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7049       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7050     fi
7051
7052     install_pp="$blddir/lib-src/installexe.sh"
7053     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
7054     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7055     if test "$window_system" != x11; then
7056         window_system=msw
7057         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7058             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7059    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7060  fi
7061         test "$with_menubars"   != "no" && with_menubars=msw \
7062             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7063    echo "    xemacs will be linked with \"menubar-msw.o\""
7064  fi
7065         test "$with_toolbars"   != "no" && with_toolbars=msw \
7066             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7067    echo "    xemacs will be linked with \"toolbar-msw.o\""
7068  fi
7069         test "$with_dialogs"   != "no" && with_dialogs=msw \
7070             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7071    echo "    xemacs will be linked with \"dialog-msw.o\""
7072  fi
7073         test "$with_widgets"   != "no" && with_widgets=msw
7074     else
7075         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7076    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7077  fi
7078         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7079    echo "    xemacs will be linked with \"menubar-msw.o\""
7080  fi
7081         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7082    echo "    xemacs will be linked with \"toolbar-msw.o\""
7083  fi
7084         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7085    echo "    xemacs will be linked with \"dialog-msw.o\""
7086  fi
7087     fi
7088         cat > conftest.$ac_ext <<EOF
7089 #line 7090 "configure"
7090 #include "confdefs.h"
7091 #include <fcntl.h>
7092     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7093 EOF
7094 if { (eval echo configure:7095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7095 then
7096   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7097     Defining HAVE_MSG_SELECT
7098 EOF
7099 cat >> confdefs.h <<\EOF
7100 #define HAVE_MSG_SELECT 1
7101 EOF
7102 }
7103
7104 else
7105   conftest_rc="$?"
7106   echo "configure: failed program was:" >&5
7107   cat conftest.$ac_ext >&5
7108 fi
7109 rm -fr conftest*
7110     with_file_coding=yes
7111     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
7112    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\""
7113  fi
7114   fi
7115 fi
7116
7117
7118
7119 test -z "$window_system" && window_system="none"
7120
7121 if test "$window_system" = "none"; then
7122   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7123   do
7124     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7125        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7126     fi
7127     eval "with_${feature}=no"
7128   done
7129 else
7130   test -z "$with_toolbars" && with_toolbars=yes
7131 fi
7132
7133 if test "$with_msw" != "yes"; then
7134   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7135   do
7136     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7137        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7138     fi
7139     eval "with_${feature}=no"
7140   done
7141 else
7142   :
7143 fi
7144
7145 if test "$with_x11" != "yes"; then
7146             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7147   do
7148     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7149        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7150     fi
7151     eval "with_${feature}=no"
7152   done
7153 fi
7154
7155 if test "$with_x11" = "yes"; then
7156   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7157 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7158 echo "configure:7159: checking for X11/extensions/shape.h" >&5
7159
7160 cat > conftest.$ac_ext <<EOF
7161 #line 7162 "configure"
7162 #include "confdefs.h"
7163 #include <X11/extensions/shape.h>
7164 EOF
7165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7166 { (eval echo configure:7167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7168 if test -z "$ac_err"; then
7169   rm -rf conftest*
7170   eval "ac_cv_header_$ac_safe=yes"
7171 else
7172   echo "$ac_err" >&5
7173   echo "configure: failed program was:" >&5
7174   cat conftest.$ac_ext >&5
7175   rm -rf conftest*
7176   eval "ac_cv_header_$ac_safe=no"
7177 fi
7178 rm -f conftest*
7179 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7180   echo "$ac_t""yes" 1>&6
7181   
7182    { test "$extra_verbose" = "yes" && cat << \EOF
7183     Defining HAVE_BALLOON_HELP
7184 EOF
7185 cat >> confdefs.h <<\EOF
7186 #define HAVE_BALLOON_HELP 1
7187 EOF
7188 }
7189
7190    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7191    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7192  fi
7193 else
7194   echo "$ac_t""no" 1>&6
7195 fi
7196
7197 fi
7198
7199 bitmapdir=
7200
7201 case "$window_system" in
7202   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7203   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7204   gtk  )
7205        HAVE_X_WINDOWS=no
7206        test "$with_gnome" = "yes" && echo "  Using GNOME."
7207        test "$with_gnome" = "no" && echo "  Using GTK."
7208        ;;
7209   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7210 esac
7211
7212 case "$x_libraries" in *X11R4* )
7213   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7214   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7215 esac
7216
7217 echo "checking for WM_COMMAND option" 1>&6
7218 echo "configure:7219: checking for WM_COMMAND option" >&5;
7219 if test "$with_wmcommand" != "no"; then
7220   { test "$extra_verbose" = "yes" && cat << \EOF
7221     Defining HAVE_WMCOMMAND
7222 EOF
7223 cat >> confdefs.h <<\EOF
7224 #define HAVE_WMCOMMAND 1
7225 EOF
7226 }
7227
7228 fi
7229
7230 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7231 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7232 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7233 echo "configure:7234: checking for X11/Xauth.h" >&5
7234
7235 cat > conftest.$ac_ext <<EOF
7236 #line 7237 "configure"
7237 #include "confdefs.h"
7238 #include <X11/Xauth.h>
7239 EOF
7240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7241 { (eval echo configure:7242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7243 if test -z "$ac_err"; then
7244   rm -rf conftest*
7245   eval "ac_cv_header_$ac_safe=yes"
7246 else
7247   echo "$ac_err" >&5
7248   echo "configure: failed program was:" >&5
7249   cat conftest.$ac_ext >&5
7250   rm -rf conftest*
7251   eval "ac_cv_header_$ac_safe=no"
7252 fi
7253 rm -f conftest*
7254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7255   echo "$ac_t""yes" 1>&6
7256   :
7257 else
7258   echo "$ac_t""no" 1>&6
7259 with_xauth=no
7260 fi
7261  }
7262 test -z "$with_xauth" && { 
7263 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7264 echo "configure:7265: checking for XauGetAuthByAddr in -lXau" >&5
7265 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7266
7267 xe_check_libs=" -lXau "
7268 cat > conftest.$ac_ext <<EOF
7269 #line 7270 "configure"
7270 #include "confdefs.h"
7271 /* Override any gcc2 internal prototype to avoid an error.  */
7272 /* We use char because int might match the return type of a gcc2
7273     builtin and then its argument prototype would still apply.  */
7274 char XauGetAuthByAddr();
7275
7276 int main() {
7277 XauGetAuthByAddr()
7278 ; return 0; }
7279 EOF
7280 if { (eval echo configure:7281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7281   rm -rf conftest*
7282   eval "ac_cv_lib_$ac_lib_var=yes"
7283 else
7284   echo "configure: failed program was:" >&5
7285   cat conftest.$ac_ext >&5
7286   rm -rf conftest*
7287   eval "ac_cv_lib_$ac_lib_var=no"
7288 fi
7289 rm -f conftest*
7290 xe_check_libs=""
7291
7292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7293   echo "$ac_t""yes" 1>&6
7294   :
7295 else
7296   echo "$ac_t""no" 1>&6
7297 with_xauth=no
7298 fi
7299
7300  }
7301 test -z "$with_xauth" && with_xauth=yes
7302 if test "$with_xauth" = "yes"; then
7303   { test "$extra_verbose" = "yes" && cat << \EOF
7304     Defining HAVE_XAUTH
7305 EOF
7306 cat >> confdefs.h <<\EOF
7307 #define HAVE_XAUTH 1
7308 EOF
7309 }
7310
7311   
7312 T=""
7313 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
7314 libs_xauth="$T"
7315
7316 fi
7317
7318
7319
7320
7321 if test "$with_tooltalk" != "no" ; then
7322       for dir in "" "Tt/" "desktop/" ; do
7323     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7324 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7325 echo "configure:7326: checking for ${dir}tt_c.h" >&5
7326
7327 cat > conftest.$ac_ext <<EOF
7328 #line 7329 "configure"
7329 #include "confdefs.h"
7330 #include <${dir}tt_c.h>
7331 EOF
7332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7333 { (eval echo configure:7334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7335 if test -z "$ac_err"; then
7336   rm -rf conftest*
7337   eval "ac_cv_header_$ac_safe=yes"
7338 else
7339   echo "$ac_err" >&5
7340   echo "configure: failed program was:" >&5
7341   cat conftest.$ac_ext >&5
7342   rm -rf conftest*
7343   eval "ac_cv_header_$ac_safe=no"
7344 fi
7345 rm -f conftest*
7346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7347   echo "$ac_t""yes" 1>&6
7348   tt_c_h_file="${dir}tt_c.h"; break
7349 else
7350   echo "$ac_t""no" 1>&6
7351 fi
7352
7353   done
7354   if test -z "$tt_c_h_file"; then
7355     if test "$with_tooltalk" = "yes"; then
7356       (echo "$progname: Usage error:"
7357 echo " " "Unable to find required tooltalk header files."
7358 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7359     fi
7360     with_tooltalk=no
7361   fi
7362 fi
7363 if test "$with_tooltalk" != "no" ; then
7364   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7365     
7366 xe_msg_checking="for tt_message_create in -ltt"
7367 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7368 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7369 echo "configure:7370: checking "$xe_msg_checking"" >&5
7370 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7371
7372 xe_check_libs=" -ltt $extra_libs"
7373 cat > conftest.$ac_ext <<EOF
7374 #line 7375 "configure"
7375 #include "confdefs.h"
7376 /* Override any gcc2 internal prototype to avoid an error.  */
7377 /* We use char because int might match the return type of a gcc2
7378     builtin and then its argument prototype would still apply.  */
7379 char tt_message_create();
7380
7381 int main() {
7382 tt_message_create()
7383 ; return 0; }
7384 EOF
7385 if { (eval echo configure:7386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7386   rm -rf conftest*
7387   eval "ac_cv_lib_$ac_lib_var=yes"
7388 else
7389   echo "configure: failed program was:" >&5
7390   cat conftest.$ac_ext >&5
7391   rm -rf conftest*
7392   eval "ac_cv_lib_$ac_lib_var=no"
7393 fi
7394 rm -f conftest*
7395 xe_check_libs=""
7396
7397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7398   echo "$ac_t""yes" 1>&6
7399   tt_libs="-ltt $extra_libs"; break
7400 else
7401   echo "$ac_t""no" 1>&6
7402 :
7403 fi
7404
7405
7406   done
7407   if test -z "$tt_libs"; then
7408     if test "$with_tooltalk" = "yes"; then
7409       (echo "$progname: Usage error:"
7410 echo " " "Unable to find required tooltalk libraries."
7411 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7412     fi
7413     with_tooltalk=no
7414   fi
7415 fi
7416 test -z "$with_tooltalk" && with_tooltalk=yes
7417 if test "$with_tooltalk" = "yes"; then
7418   { test "$extra_verbose" = "yes" && cat << \EOF
7419     Defining TOOLTALK
7420 EOF
7421 cat >> confdefs.h <<\EOF
7422 #define TOOLTALK 1
7423 EOF
7424 }
7425
7426   { test "$extra_verbose" = "yes" && cat << EOF
7427     Defining TT_C_H_FILE = "$tt_c_h_file"
7428 EOF
7429 cat >> confdefs.h <<EOF
7430 #define TT_C_H_FILE "$tt_c_h_file"
7431 EOF
7432 }
7433
7434   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7435   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7436    echo "    xemacs will be linked with \"tooltalk.o\""
7437  fi
7438 fi
7439
7440 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7441 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7442 echo "configure:7443: checking for Dt/Dt.h" >&5
7443
7444 cat > conftest.$ac_ext <<EOF
7445 #line 7446 "configure"
7446 #include "confdefs.h"
7447 #include <Dt/Dt.h>
7448 EOF
7449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7450 { (eval echo configure:7451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7452 if test -z "$ac_err"; then
7453   rm -rf conftest*
7454   eval "ac_cv_header_$ac_safe=yes"
7455 else
7456   echo "$ac_err" >&5
7457   echo "configure: failed program was:" >&5
7458   cat conftest.$ac_ext >&5
7459   rm -rf conftest*
7460   eval "ac_cv_header_$ac_safe=no"
7461 fi
7462 rm -f conftest*
7463 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7464   echo "$ac_t""yes" 1>&6
7465   :
7466 else
7467   echo "$ac_t""no" 1>&6
7468 with_cde=no
7469 fi
7470  }
7471 test -z "$with_cde" && { 
7472 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7473 echo "configure:7474: checking for DtDndDragStart in -lDtSvc" >&5
7474 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7475
7476 xe_check_libs=" -lDtSvc "
7477 cat > conftest.$ac_ext <<EOF
7478 #line 7479 "configure"
7479 #include "confdefs.h"
7480 /* Override any gcc2 internal prototype to avoid an error.  */
7481 /* We use char because int might match the return type of a gcc2
7482     builtin and then its argument prototype would still apply.  */
7483 char DtDndDragStart();
7484
7485 int main() {
7486 DtDndDragStart()
7487 ; return 0; }
7488 EOF
7489 if { (eval echo configure:7490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7490   rm -rf conftest*
7491   eval "ac_cv_lib_$ac_lib_var=yes"
7492 else
7493   echo "configure: failed program was:" >&5
7494   cat conftest.$ac_ext >&5
7495   rm -rf conftest*
7496   eval "ac_cv_lib_$ac_lib_var=no"
7497 fi
7498 rm -f conftest*
7499 xe_check_libs=""
7500
7501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7502   echo "$ac_t""yes" 1>&6
7503   :
7504 else
7505   echo "$ac_t""no" 1>&6
7506 with_cde=no
7507 fi
7508
7509  }
7510 test -z "$with_cde" && with_cde=yes
7511 if test "$with_dragndrop" = no; then
7512   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7513   with_cde=no
7514 fi
7515 if test "$with_cde" = "yes" ; then
7516   { test "$extra_verbose" = "yes" && cat << \EOF
7517     Defining HAVE_CDE
7518 EOF
7519 cat >> confdefs.h <<\EOF
7520 #define HAVE_CDE 1
7521 EOF
7522 }
7523
7524   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7525   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7526   with_tooltalk=yes # CDE requires Tooltalk
7527   need_motif=yes    # CDE requires Motif
7528 fi
7529
7530 test "$window_system" != "x11" && with_offix=no
7531 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7532   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7533   with_offix=no
7534 fi
7535 if test "$with_dragndrop" = no; then
7536   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7537   with_offix=no
7538 fi
7539 if test "$with_cde" = yes; then
7540   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7541   with_offix=no
7542 fi
7543 test -z "$with_offix" && with_offix=no
7544 if test "$with_offix" = "yes"; then
7545   { test "$extra_verbose" = "yes" && cat << \EOF
7546     Defining HAVE_OFFIX_DND
7547 EOF
7548 cat >> confdefs.h <<\EOF
7549 #define HAVE_OFFIX_DND 1
7550 EOF
7551 }
7552
7553   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7554   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7555 fi
7556 if test "$with_gtk" = "yes"; then
7557    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7558 fi
7559
7560 if test "$with_dragndrop" != "no" ; then
7561   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7562 echo "configure:7563: checking if drag and drop API is needed" >&5
7563   if test -n "$dragndrop_proto" ; then
7564     with_dragndrop=yes
7565     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7566     { test "$extra_verbose" = "yes" && cat << \EOF
7567     Defining HAVE_DRAGNDROP
7568 EOF
7569 cat >> confdefs.h <<\EOF
7570 #define HAVE_DRAGNDROP 1
7571 EOF
7572 }
7573
7574     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7575   else
7576     with_dragndrop=no
7577     echo "$ac_t""no" 1>&6
7578   fi
7579 fi
7580
7581 echo "checking for LDAP" 1>&6
7582 echo "configure:7583: checking for LDAP" >&5
7583 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7584 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7585 echo "configure:7586: checking for ldap.h" >&5
7586
7587 cat > conftest.$ac_ext <<EOF
7588 #line 7589 "configure"
7589 #include "confdefs.h"
7590 #include <ldap.h>
7591 EOF
7592 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7593 { (eval echo configure:7594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7594 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7595 if test -z "$ac_err"; then
7596   rm -rf conftest*
7597   eval "ac_cv_header_$ac_safe=yes"
7598 else
7599   echo "$ac_err" >&5
7600   echo "configure: failed program was:" >&5
7601   cat conftest.$ac_ext >&5
7602   rm -rf conftest*
7603   eval "ac_cv_header_$ac_safe=no"
7604 fi
7605 rm -f conftest*
7606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7607   echo "$ac_t""yes" 1>&6
7608   :
7609 else
7610   echo "$ac_t""no" 1>&6
7611 with_ldap=no
7612 fi
7613  }
7614 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7615 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7616 echo "configure:7617: checking for lber.h" >&5
7617
7618 cat > conftest.$ac_ext <<EOF
7619 #line 7620 "configure"
7620 #include "confdefs.h"
7621 #include <lber.h>
7622 EOF
7623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7624 { (eval echo configure:7625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7626 if test -z "$ac_err"; then
7627   rm -rf conftest*
7628   eval "ac_cv_header_$ac_safe=yes"
7629 else
7630   echo "$ac_err" >&5
7631   echo "configure: failed program was:" >&5
7632   cat conftest.$ac_ext >&5
7633   rm -rf conftest*
7634   eval "ac_cv_header_$ac_safe=no"
7635 fi
7636 rm -f conftest*
7637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7638   echo "$ac_t""yes" 1>&6
7639   :
7640 else
7641   echo "$ac_t""no" 1>&6
7642 with_ldap=no
7643 fi
7644  }
7645 if test "$with_ldap" != "no"; then
7646   
7647 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7648 echo "configure:7649: checking for ldap_search in -lldap" >&5
7649 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7650
7651 xe_check_libs=" -lldap "
7652 cat > conftest.$ac_ext <<EOF
7653 #line 7654 "configure"
7654 #include "confdefs.h"
7655 /* Override any gcc2 internal prototype to avoid an error.  */
7656 /* We use char because int might match the return type of a gcc2
7657     builtin and then its argument prototype would still apply.  */
7658 char ldap_search();
7659
7660 int main() {
7661 ldap_search()
7662 ; return 0; }
7663 EOF
7664 if { (eval echo configure:7665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7665   rm -rf conftest*
7666   eval "ac_cv_lib_$ac_lib_var=yes"
7667 else
7668   echo "configure: failed program was:" >&5
7669   cat conftest.$ac_ext >&5
7670   rm -rf conftest*
7671   eval "ac_cv_lib_$ac_lib_var=no"
7672 fi
7673 rm -f conftest*
7674 xe_check_libs=""
7675
7676 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7677   echo "$ac_t""yes" 1>&6
7678   with_ldap_nolber=yes
7679 else
7680   echo "$ac_t""no" 1>&6
7681 with_ldap_nolber=no
7682 fi
7683
7684
7685   test "$with_ldap_nolber" = "no" && { 
7686 xe_msg_checking="for ldap_open in -lldap"
7687 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7688 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7689 echo "configure:7690: checking "$xe_msg_checking"" >&5
7690 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7691
7692 xe_check_libs=" -lldap -llber"
7693 cat > conftest.$ac_ext <<EOF
7694 #line 7695 "configure"
7695 #include "confdefs.h"
7696 /* Override any gcc2 internal prototype to avoid an error.  */
7697 /* We use char because int might match the return type of a gcc2
7698     builtin and then its argument prototype would still apply.  */
7699 char ldap_open();
7700
7701 int main() {
7702 ldap_open()
7703 ; return 0; }
7704 EOF
7705 if { (eval echo configure:7706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7706   rm -rf conftest*
7707   eval "ac_cv_lib_$ac_lib_var=yes"
7708 else
7709   echo "configure: failed program was:" >&5
7710   cat conftest.$ac_ext >&5
7711   rm -rf conftest*
7712   eval "ac_cv_lib_$ac_lib_var=no"
7713 fi
7714 rm -f conftest*
7715 xe_check_libs=""
7716
7717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7718   echo "$ac_t""yes" 1>&6
7719   with_ldap_lber=yes
7720 else
7721   echo "$ac_t""no" 1>&6
7722 with_ldap_lber=no
7723 fi
7724
7725  }
7726   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7727 xe_msg_checking="for ldap_open in -lldap"
7728 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7729 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7730 echo "configure:7731: checking "$xe_msg_checking"" >&5
7731 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7732
7733 xe_check_libs=" -lldap -llber -lkrb"
7734 cat > conftest.$ac_ext <<EOF
7735 #line 7736 "configure"
7736 #include "confdefs.h"
7737 /* Override any gcc2 internal prototype to avoid an error.  */
7738 /* We use char because int might match the return type of a gcc2
7739     builtin and then its argument prototype would still apply.  */
7740 char ldap_open();
7741
7742 int main() {
7743 ldap_open()
7744 ; return 0; }
7745 EOF
7746 if { (eval echo configure:7747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7747   rm -rf conftest*
7748   eval "ac_cv_lib_$ac_lib_var=yes"
7749 else
7750   echo "configure: failed program was:" >&5
7751   cat conftest.$ac_ext >&5
7752   rm -rf conftest*
7753   eval "ac_cv_lib_$ac_lib_var=no"
7754 fi
7755 rm -f conftest*
7756 xe_check_libs=""
7757
7758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7759   echo "$ac_t""yes" 1>&6
7760   with_ldap_krb=yes
7761 else
7762   echo "$ac_t""no" 1>&6
7763 with_ldap_krb=no
7764 fi
7765
7766  }
7767   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7768 xe_msg_checking="for ldap_open in -lldap"
7769 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7770 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7771 echo "configure:7772: checking "$xe_msg_checking"" >&5
7772 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7773
7774 xe_check_libs=" -lldap -llber -lkrb -ldes"
7775 cat > conftest.$ac_ext <<EOF
7776 #line 7777 "configure"
7777 #include "confdefs.h"
7778 /* Override any gcc2 internal prototype to avoid an error.  */
7779 /* We use char because int might match the return type of a gcc2
7780     builtin and then its argument prototype would still apply.  */
7781 char ldap_open();
7782
7783 int main() {
7784 ldap_open()
7785 ; return 0; }
7786 EOF
7787 if { (eval echo configure:7788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7788   rm -rf conftest*
7789   eval "ac_cv_lib_$ac_lib_var=yes"
7790 else
7791   echo "configure: failed program was:" >&5
7792   cat conftest.$ac_ext >&5
7793   rm -rf conftest*
7794   eval "ac_cv_lib_$ac_lib_var=no"
7795 fi
7796 rm -f conftest*
7797 xe_check_libs=""
7798
7799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7800   echo "$ac_t""yes" 1>&6
7801   with_ldap_krbdes=yes
7802 else
7803   echo "$ac_t""no" 1>&6
7804 with_ldap_krbdes=no
7805 fi
7806
7807  }
7808   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
7809 fi
7810 if test "$with_ldap" = "yes"; then
7811   { test "$extra_verbose" = "yes" && cat << \EOF
7812     Defining HAVE_LDAP
7813 EOF
7814 cat >> confdefs.h <<\EOF
7815 #define HAVE_LDAP 1
7816 EOF
7817 }
7818
7819   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7820    echo "    xemacs will be linked with \"eldap.o\""
7821  fi
7822   if test "$with_ldap_nolber" = "yes" ; then
7823     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7824   else
7825     if test "$with_ldap_krb" = "yes" ; then
7826       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7827     fi
7828     if test "$with_ldap_krbdes" = "yes" ; then
7829       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7830       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7831     fi
7832     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7833     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7834   fi
7835   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7836 do
7837 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7838 echo "configure:7839: checking for $ac_func" >&5
7839
7840 cat > conftest.$ac_ext <<EOF
7841 #line 7842 "configure"
7842 #include "confdefs.h"
7843 /* System header to define __stub macros and hopefully few prototypes,
7844     which can conflict with char $ac_func(); below.  */
7845 #include <assert.h>
7846 /* Override any gcc2 internal prototype to avoid an error.  */
7847 /* We use char because int might match the return type of a gcc2
7848     builtin and then its argument prototype would still apply.  */
7849 char $ac_func();
7850
7851 int main() {
7852
7853 /* The GNU C library defines this for functions which it implements
7854     to always fail with ENOSYS.  Some functions are actually named
7855     something starting with __ and the normal name is an alias.  */
7856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7857 choke me
7858 #else
7859 $ac_func();
7860 #endif
7861
7862 ; return 0; }
7863 EOF
7864 if { (eval echo configure:7865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7865   rm -rf conftest*
7866   eval "ac_cv_func_$ac_func=yes"
7867 else
7868   echo "configure: failed program was:" >&5
7869   cat conftest.$ac_ext >&5
7870   rm -rf conftest*
7871   eval "ac_cv_func_$ac_func=no"
7872 fi
7873 rm -f conftest*
7874
7875 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7876   echo "$ac_t""yes" 1>&6
7877     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7878   { test "$extra_verbose" = "yes" && cat << EOF
7879     Defining $ac_tr_func
7880 EOF
7881 cat >> confdefs.h <<EOF
7882 #define $ac_tr_func 1
7883 EOF
7884 }
7885  
7886 else
7887   echo "$ac_t""no" 1>&6
7888 fi
7889 done
7890
7891 fi
7892
7893 if test "$with_postgresql" != "no"; then
7894   echo "checking for PostgreSQL" 1>&6
7895 echo "configure:7896: checking for PostgreSQL" >&5
7896
7897   for header_dir in "" "pgsql/" "postgresql/"; do
7898     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7899 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7900 echo "configure:7901: checking for ${header_dir}libpq-fe.h" >&5
7901
7902 cat > conftest.$ac_ext <<EOF
7903 #line 7904 "configure"
7904 #include "confdefs.h"
7905 #include <${header_dir}libpq-fe.h>
7906 EOF
7907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7908 { (eval echo configure:7909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7910 if test -z "$ac_err"; then
7911   rm -rf conftest*
7912   eval "ac_cv_header_$ac_safe=yes"
7913 else
7914   echo "$ac_err" >&5
7915   echo "configure: failed program was:" >&5
7916   cat conftest.$ac_ext >&5
7917   rm -rf conftest*
7918   eval "ac_cv_header_$ac_safe=no"
7919 fi
7920 rm -f conftest*
7921 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7922   echo "$ac_t""yes" 1>&6
7923   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7924 else
7925   echo "$ac_t""no" 1>&6
7926 fi
7927
7928   done
7929
7930   test -n "$libpq_fe_h_file" && { 
7931 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7932 echo "configure:7933: checking for PQconnectdb in -lpq" >&5
7933 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7934
7935 xe_check_libs=" -lpq "
7936 cat > conftest.$ac_ext <<EOF
7937 #line 7938 "configure"
7938 #include "confdefs.h"
7939 /* Override any gcc2 internal prototype to avoid an error.  */
7940 /* We use char because int might match the return type of a gcc2
7941     builtin and then its argument prototype would still apply.  */
7942 char PQconnectdb();
7943
7944 int main() {
7945 PQconnectdb()
7946 ; return 0; }
7947 EOF
7948 if { (eval echo configure:7949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7949   rm -rf conftest*
7950   eval "ac_cv_lib_$ac_lib_var=yes"
7951 else
7952   echo "configure: failed program was:" >&5
7953   cat conftest.$ac_ext >&5
7954   rm -rf conftest*
7955   eval "ac_cv_lib_$ac_lib_var=no"
7956 fi
7957 rm -f conftest*
7958 xe_check_libs=""
7959
7960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7961   echo "$ac_t""yes" 1>&6
7962   have_libpq=yes
7963 else
7964   echo "$ac_t""no" 1>&6
7965 fi
7966
7967  }
7968
7969   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7970     with_postgresql=yes
7971     { test "$extra_verbose" = "yes" && cat << \EOF
7972     Defining HAVE_POSTGRESQL
7973 EOF
7974 cat >> confdefs.h <<\EOF
7975 #define HAVE_POSTGRESQL 1
7976 EOF
7977 }
7978
7979     
7980 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7981 echo "configure:7982: checking for PQconnectStart in -lpq" >&5
7982 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7983
7984 xe_check_libs=" -lpq "
7985 cat > conftest.$ac_ext <<EOF
7986 #line 7987 "configure"
7987 #include "confdefs.h"
7988 /* Override any gcc2 internal prototype to avoid an error.  */
7989 /* We use char because int might match the return type of a gcc2
7990     builtin and then its argument prototype would still apply.  */
7991 char PQconnectStart();
7992
7993 int main() {
7994 PQconnectStart()
7995 ; return 0; }
7996 EOF
7997 if { (eval echo configure:7998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7998   rm -rf conftest*
7999   eval "ac_cv_lib_$ac_lib_var=yes"
8000 else
8001   echo "configure: failed program was:" >&5
8002   cat conftest.$ac_ext >&5
8003   rm -rf conftest*
8004   eval "ac_cv_lib_$ac_lib_var=no"
8005 fi
8006 rm -f conftest*
8007 xe_check_libs=""
8008
8009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8010   echo "$ac_t""yes" 1>&6
8011   with_postgresqlv7=yes;
8012                  { test "$extra_verbose" = "yes" && cat << \EOF
8013     Defining HAVE_POSTGRESQLV7
8014 EOF
8015 cat >> confdefs.h <<\EOF
8016 #define HAVE_POSTGRESQLV7 1
8017 EOF
8018 }
8019
8020 else
8021   echo "$ac_t""no" 1>&6
8022 fi
8023
8024
8025     { test "$extra_verbose" = "yes" && cat << EOF
8026     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8027 EOF
8028 cat >> confdefs.h <<EOF
8029 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8030 EOF
8031 }
8032
8033     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8034     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8035    echo "    xemacs will be linked with \"postgresql.o\""
8036  fi
8037   elif test "$with_postgresql" = "yes"; then
8038     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8039   fi
8040 fi
8041
8042
8043 if test "$window_system" != "none"; then
8044   echo "checking for graphics libraries" 1>&6
8045 echo "configure:8046: checking for graphics libraries" >&5
8046
8047       libpath_xpm=
8048   incpath_xpm=
8049   case "$opsys" in 
8050     cygwin*)
8051       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8052       cygwin_top=`eval "dirname ${cygwin_top}"`;
8053       cygwin_top="${cygwin_top}/..";
8054       case "$window_system" in
8055                 x11)  ;;
8056                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8057              incpath_xpm="-I${cygwin_top}/include/noX"
8058               ;;
8059                 gtk)  ;;
8060                 none) ;;
8061                 *)    ;;
8062       esac
8063       ;;
8064         *) ;;
8065   esac
8066     xpm_problem=""
8067   if test -z "$with_xpm"; then
8068     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8069     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8070     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8071 echo "configure:8072: checking for Xpm - no older than 3.4f" >&5
8072     xe_check_libs=-lXpm
8073     cat > conftest.$ac_ext <<EOF
8074 #line 8075 "configure"
8075 #include "confdefs.h"
8076 #define XPM_NUMBERS
8077 #include <X11/xpm.h>
8078     int main(int c, char **v) {
8079     return c == 1 ? 0 :
8080       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8081       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8082 EOF
8083 if { (eval echo configure:8084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8084 then
8085   ./conftest dummy_arg; xpm_status=$?;
8086       if test "$xpm_status" = "0"; then
8087         with_xpm=yes;
8088       else
8089         with_xpm=no;
8090         if test "$xpm_status" = "1"; then
8091           xpm_problem="Xpm library version and header file version don't match!"
8092         elif test "$xpm_status" = "2"; then
8093           xpm_problem="Xpm library version is too old!"
8094         else
8095           xpm_problem="Internal xpm detection logic error!"
8096         fi
8097         echo "
8098 *** WARNING *** $xpm_problem
8099   I'm not touching that with a 10-foot pole!
8100   If you really want to use the installed version of Xpm, rerun
8101   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8102     fi
8103 else
8104   conftest_rc="$?"
8105   echo "configure: failed program was:" >&5
8106   cat conftest.$ac_ext >&5
8107   rm -fr conftest*
8108   with_xpm=no
8109 fi
8110 rm -fr conftest*
8111     xe_check_libs=
8112     echo "$ac_t""$with_xpm" 1>&6
8113   fi
8114   if test "$with_xpm" = "yes"; then
8115                 { test "$extra_verbose" = "yes" && cat << \EOF
8116     Defining HAVE_XPM
8117 EOF
8118 cat >> confdefs.h <<\EOF
8119 #define HAVE_XPM 1
8120 EOF
8121 }
8122
8123     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8124     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8125     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8126     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8127 echo "configure:8128: checking for \"FOR_MSW\" xpm" >&5
8128     xe_check_libs=-lXpm
8129     cat > conftest.$ac_ext <<EOF
8130 #line 8131 "configure"
8131 #include "confdefs.h"
8132
8133 int main() {
8134 XpmCreatePixmapFromData()
8135 ; return 0; }
8136 EOF
8137 if { (eval echo configure:8138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8138   rm -rf conftest*
8139   xpm_for_msw=no
8140 else
8141   echo "configure: failed program was:" >&5
8142   cat conftest.$ac_ext >&5
8143   rm -rf conftest*
8144   xpm_for_msw=yes
8145 fi
8146 rm -f conftest*
8147     xe_check_libs=
8148     echo "$ac_t""$xpm_for_msw" 1>&6
8149     if test "$xpm_for_msw" = "yes"; then
8150       { test "$extra_verbose" = "yes" && cat << \EOF
8151     Defining FOR_MSW
8152 EOF
8153 cat >> confdefs.h <<\EOF
8154 #define FOR_MSW 1
8155 EOF
8156 }
8157
8158     fi
8159   fi
8160
8161     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8162 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8163 echo "configure:8164: checking for compface.h" >&5
8164
8165 cat > conftest.$ac_ext <<EOF
8166 #line 8167 "configure"
8167 #include "confdefs.h"
8168 #include <compface.h>
8169 EOF
8170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8171 { (eval echo configure:8172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8173 if test -z "$ac_err"; then
8174   rm -rf conftest*
8175   eval "ac_cv_header_$ac_safe=yes"
8176 else
8177   echo "$ac_err" >&5
8178   echo "configure: failed program was:" >&5
8179   cat conftest.$ac_ext >&5
8180   rm -rf conftest*
8181   eval "ac_cv_header_$ac_safe=no"
8182 fi
8183 rm -f conftest*
8184 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8185   echo "$ac_t""yes" 1>&6
8186   :
8187 else
8188   echo "$ac_t""no" 1>&6
8189 with_xface=no
8190 fi
8191  }
8192   test -z "$with_xface" && { 
8193 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8194 echo "configure:8195: checking for UnGenFace in -lcompface" >&5
8195 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8196
8197 xe_check_libs=" -lcompface "
8198 cat > conftest.$ac_ext <<EOF
8199 #line 8200 "configure"
8200 #include "confdefs.h"
8201 /* Override any gcc2 internal prototype to avoid an error.  */
8202 /* We use char because int might match the return type of a gcc2
8203     builtin and then its argument prototype would still apply.  */
8204 char UnGenFace();
8205
8206 int main() {
8207 UnGenFace()
8208 ; return 0; }
8209 EOF
8210 if { (eval echo configure:8211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8211   rm -rf conftest*
8212   eval "ac_cv_lib_$ac_lib_var=yes"
8213 else
8214   echo "configure: failed program was:" >&5
8215   cat conftest.$ac_ext >&5
8216   rm -rf conftest*
8217   eval "ac_cv_lib_$ac_lib_var=no"
8218 fi
8219 rm -f conftest*
8220 xe_check_libs=""
8221
8222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8223   echo "$ac_t""yes" 1>&6
8224   : 
8225 else
8226   echo "$ac_t""no" 1>&6
8227 with_xface=no
8228 fi
8229
8230  }
8231   test -z "$with_xface" && with_xface=yes
8232   if test "$with_xface" = "yes"; then
8233     { test "$extra_verbose" = "yes" && cat << \EOF
8234     Defining HAVE_XFACE
8235 EOF
8236 cat >> confdefs.h <<\EOF
8237 #define HAVE_XFACE 1
8238 EOF
8239 }
8240
8241     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8242   fi
8243
8244         if test "$with_gif" != "no"; then
8245     with_gif="yes"
8246     { test "$extra_verbose" = "yes" && cat << \EOF
8247     Defining HAVE_GIF
8248 EOF
8249 cat >> confdefs.h <<\EOF
8250 #define HAVE_GIF 1
8251 EOF
8252 }
8253
8254     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8255    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8256  fi
8257   fi
8258
8259       if test "$with_png $with_tiff" != "no no"; then
8260     
8261 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8262 echo "configure:8263: checking for inflate in -lc" >&5
8263 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8264
8265 xe_check_libs=" -lc "
8266 cat > conftest.$ac_ext <<EOF
8267 #line 8268 "configure"
8268 #include "confdefs.h"
8269 /* Override any gcc2 internal prototype to avoid an error.  */
8270 /* We use char because int might match the return type of a gcc2
8271     builtin and then its argument prototype would still apply.  */
8272 char inflate();
8273
8274 int main() {
8275 inflate()
8276 ; return 0; }
8277 EOF
8278 if { (eval echo configure:8279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8279   rm -rf conftest*
8280   eval "ac_cv_lib_$ac_lib_var=yes"
8281 else
8282   echo "configure: failed program was:" >&5
8283   cat conftest.$ac_ext >&5
8284   rm -rf conftest*
8285   eval "ac_cv_lib_$ac_lib_var=no"
8286 fi
8287 rm -f conftest*
8288 xe_check_libs=""
8289
8290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8291   echo "$ac_t""yes" 1>&6
8292   :
8293 else
8294   echo "$ac_t""no" 1>&6
8295
8296 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8297 echo "configure:8298: checking for inflate in -lz" >&5
8298 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8299
8300 xe_check_libs=" -lz "
8301 cat > conftest.$ac_ext <<EOF
8302 #line 8303 "configure"
8303 #include "confdefs.h"
8304 /* Override any gcc2 internal prototype to avoid an error.  */
8305 /* We use char because int might match the return type of a gcc2
8306     builtin and then its argument prototype would still apply.  */
8307 char inflate();
8308
8309 int main() {
8310 inflate()
8311 ; return 0; }
8312 EOF
8313 if { (eval echo configure:8314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8314   rm -rf conftest*
8315   eval "ac_cv_lib_$ac_lib_var=yes"
8316 else
8317   echo "configure: failed program was:" >&5
8318   cat conftest.$ac_ext >&5
8319   rm -rf conftest*
8320   eval "ac_cv_lib_$ac_lib_var=no"
8321 fi
8322 rm -f conftest*
8323 xe_check_libs=""
8324
8325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8326   echo "$ac_t""yes" 1>&6
8327   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8328 else
8329   echo "$ac_t""no" 1>&6
8330
8331 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8332 echo "configure:8333: checking for inflate in -lgz" >&5
8333 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8334
8335 xe_check_libs=" -lgz "
8336 cat > conftest.$ac_ext <<EOF
8337 #line 8338 "configure"
8338 #include "confdefs.h"
8339 /* Override any gcc2 internal prototype to avoid an error.  */
8340 /* We use char because int might match the return type of a gcc2
8341     builtin and then its argument prototype would still apply.  */
8342 char inflate();
8343
8344 int main() {
8345 inflate()
8346 ; return 0; }
8347 EOF
8348 if { (eval echo configure:8349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8349   rm -rf conftest*
8350   eval "ac_cv_lib_$ac_lib_var=yes"
8351 else
8352   echo "configure: failed program was:" >&5
8353   cat conftest.$ac_ext >&5
8354   rm -rf conftest*
8355   eval "ac_cv_lib_$ac_lib_var=no"
8356 fi
8357 rm -f conftest*
8358 xe_check_libs=""
8359
8360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8361   echo "$ac_t""yes" 1>&6
8362   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8363 else
8364   echo "$ac_t""no" 1>&6
8365 fi
8366
8367
8368 fi
8369
8370
8371 fi
8372
8373
8374   fi
8375
8376     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8377 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8378 echo "configure:8379: checking for jpeglib.h" >&5
8379
8380 cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8383 #include <jpeglib.h>
8384 EOF
8385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8386 { (eval echo configure:8387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8388 if test -z "$ac_err"; then
8389   rm -rf conftest*
8390   eval "ac_cv_header_$ac_safe=yes"
8391 else
8392   echo "$ac_err" >&5
8393   echo "configure: failed program was:" >&5
8394   cat conftest.$ac_ext >&5
8395   rm -rf conftest*
8396   eval "ac_cv_header_$ac_safe=no"
8397 fi
8398 rm -f conftest*
8399 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8400   echo "$ac_t""yes" 1>&6
8401   :
8402 else
8403   echo "$ac_t""no" 1>&6
8404 with_jpeg=no
8405 fi
8406  }
8407   test -z "$with_jpeg" && { 
8408 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8409 echo "configure:8410: checking for jpeg_destroy_decompress in -ljpeg" >&5
8410 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8411
8412 xe_check_libs=" -ljpeg "
8413 cat > conftest.$ac_ext <<EOF
8414 #line 8415 "configure"
8415 #include "confdefs.h"
8416 /* Override any gcc2 internal prototype to avoid an error.  */
8417 /* We use char because int might match the return type of a gcc2
8418     builtin and then its argument prototype would still apply.  */
8419 char jpeg_destroy_decompress();
8420
8421 int main() {
8422 jpeg_destroy_decompress()
8423 ; return 0; }
8424 EOF
8425 if { (eval echo configure:8426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8426   rm -rf conftest*
8427   eval "ac_cv_lib_$ac_lib_var=yes"
8428 else
8429   echo "configure: failed program was:" >&5
8430   cat conftest.$ac_ext >&5
8431   rm -rf conftest*
8432   eval "ac_cv_lib_$ac_lib_var=no"
8433 fi
8434 rm -f conftest*
8435 xe_check_libs=""
8436
8437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8438   echo "$ac_t""yes" 1>&6
8439   :
8440 else
8441   echo "$ac_t""no" 1>&6
8442 with_jpeg=no
8443 fi
8444
8445  }
8446   test -z "$with_jpeg" && with_jpeg=yes
8447   if test "$with_jpeg" = "yes"; then
8448     { test "$extra_verbose" = "yes" && cat << \EOF
8449     Defining HAVE_JPEG
8450 EOF
8451 cat >> confdefs.h <<\EOF
8452 #define HAVE_JPEG 1
8453 EOF
8454 }
8455
8456     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8457   fi
8458
8459     png_problem=""
8460   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8461 echo "configure:8462: checking for pow" >&5
8462
8463 cat > conftest.$ac_ext <<EOF
8464 #line 8465 "configure"
8465 #include "confdefs.h"
8466 /* System header to define __stub macros and hopefully few prototypes,
8467     which can conflict with char pow(); below.  */
8468 #include <assert.h>
8469 /* Override any gcc2 internal prototype to avoid an error.  */
8470 /* We use char because int might match the return type of a gcc2
8471     builtin and then its argument prototype would still apply.  */
8472 char pow();
8473
8474 int main() {
8475
8476 /* The GNU C library defines this for functions which it implements
8477     to always fail with ENOSYS.  Some functions are actually named
8478     something starting with __ and the normal name is an alias.  */
8479 #if defined (__stub_pow) || defined (__stub___pow)
8480 choke me
8481 #else
8482 pow();
8483 #endif
8484
8485 ; return 0; }
8486 EOF
8487 if { (eval echo configure:8488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8488   rm -rf conftest*
8489   eval "ac_cv_func_pow=yes"
8490 else
8491   echo "configure: failed program was:" >&5
8492   cat conftest.$ac_ext >&5
8493   rm -rf conftest*
8494   eval "ac_cv_func_pow=no"
8495 fi
8496 rm -f conftest*
8497
8498 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8499   echo "$ac_t""yes" 1>&6
8500   :
8501 else
8502   echo "$ac_t""no" 1>&6
8503 with_png=no
8504 fi
8505  }
8506   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8507 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8508 echo "configure:8509: checking for png.h" >&5
8509
8510 cat > conftest.$ac_ext <<EOF
8511 #line 8512 "configure"
8512 #include "confdefs.h"
8513 #include <png.h>
8514 EOF
8515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8516 { (eval echo configure:8517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8518 if test -z "$ac_err"; then
8519   rm -rf conftest*
8520   eval "ac_cv_header_$ac_safe=yes"
8521 else
8522   echo "$ac_err" >&5
8523   echo "configure: failed program was:" >&5
8524   cat conftest.$ac_ext >&5
8525   rm -rf conftest*
8526   eval "ac_cv_header_$ac_safe=no"
8527 fi
8528 rm -f conftest*
8529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8530   echo "$ac_t""yes" 1>&6
8531   :
8532 else
8533   echo "$ac_t""no" 1>&6
8534 with_png=no
8535 fi
8536  }
8537   test -z "$with_png" && { 
8538 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8539 echo "configure:8540: checking for png_read_image in -lpng" >&5
8540 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8541
8542 xe_check_libs=" -lpng "
8543 cat > conftest.$ac_ext <<EOF
8544 #line 8545 "configure"
8545 #include "confdefs.h"
8546 /* Override any gcc2 internal prototype to avoid an error.  */
8547 /* We use char because int might match the return type of a gcc2
8548     builtin and then its argument prototype would still apply.  */
8549 char png_read_image();
8550
8551 int main() {
8552 png_read_image()
8553 ; return 0; }
8554 EOF
8555 if { (eval echo configure:8556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8556   rm -rf conftest*
8557   eval "ac_cv_lib_$ac_lib_var=yes"
8558 else
8559   echo "configure: failed program was:" >&5
8560   cat conftest.$ac_ext >&5
8561   rm -rf conftest*
8562   eval "ac_cv_lib_$ac_lib_var=no"
8563 fi
8564 rm -f conftest*
8565 xe_check_libs=""
8566
8567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8568   echo "$ac_t""yes" 1>&6
8569   :
8570 else
8571   echo "$ac_t""no" 1>&6
8572 with_png=no
8573 fi
8574
8575  }
8576   if test -z "$with_png"; then
8577     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8578 echo "configure:8579: checking for workable png version information" >&5
8579     xe_check_libs="-lpng -lz"
8580     cat > conftest.$ac_ext <<EOF
8581 #line 8582 "configure"
8582 #include "confdefs.h"
8583 #include <png.h>
8584     int main(int c, char **v) {
8585     if (c == 1) return 0;
8586     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8587     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8588 EOF
8589 if { (eval echo configure:8590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8590 then
8591   ./conftest dummy_arg; png_status=$?;
8592       if test "$png_status" = "0"; then
8593         with_png=yes;
8594       else
8595         with_png=no;
8596         if test "$png_status" = "1"; then
8597           png_problem="PNG library version and header file don't match!"
8598         elif test "$png_status" = "2"; then
8599           png_problem="PNG library version too old (pre 1.0.2)!"
8600         fi
8601         echo "
8602 *** WARNING *** $png_problem
8603   I'm not touching that with a 10-foot pole!
8604   If you really want to use the installed version of libPNG, rerun
8605   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8606     fi
8607 else
8608   conftest_rc="$?"
8609   echo "configure: failed program was:" >&5
8610   cat conftest.$ac_ext >&5
8611   rm -fr conftest*
8612   with_png=no
8613 fi
8614 rm -fr conftest*
8615     xe_check_libs=
8616     echo "$ac_t""$with_png" 1>&6
8617   fi
8618   if test "$with_png" = "yes"; then
8619     { test "$extra_verbose" = "yes" && cat << \EOF
8620     Defining HAVE_PNG
8621 EOF
8622 cat >> confdefs.h <<\EOF
8623 #define HAVE_PNG 1
8624 EOF
8625 }
8626
8627     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8628   fi
8629
8630     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8631 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8632 echo "configure:8633: checking for tiffio.h" >&5
8633
8634 cat > conftest.$ac_ext <<EOF
8635 #line 8636 "configure"
8636 #include "confdefs.h"
8637 #include <tiffio.h>
8638 EOF
8639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8640 { (eval echo configure:8641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8642 if test -z "$ac_err"; then
8643   rm -rf conftest*
8644   eval "ac_cv_header_$ac_safe=yes"
8645 else
8646   echo "$ac_err" >&5
8647   echo "configure: failed program was:" >&5
8648   cat conftest.$ac_ext >&5
8649   rm -rf conftest*
8650   eval "ac_cv_header_$ac_safe=no"
8651 fi
8652 rm -f conftest*
8653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8654   echo "$ac_t""yes" 1>&6
8655   :
8656 else
8657   echo "$ac_t""no" 1>&6
8658 with_tiff=no
8659 fi
8660  }
8661   test -z "$with_tiff" && { 
8662 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8663 echo "configure:8664: checking for TIFFClientOpen in -ltiff" >&5
8664 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8665
8666 xe_check_libs=" -ltiff "
8667 cat > conftest.$ac_ext <<EOF
8668 #line 8669 "configure"
8669 #include "confdefs.h"
8670 /* Override any gcc2 internal prototype to avoid an error.  */
8671 /* We use char because int might match the return type of a gcc2
8672     builtin and then its argument prototype would still apply.  */
8673 char TIFFClientOpen();
8674
8675 int main() {
8676 TIFFClientOpen()
8677 ; return 0; }
8678 EOF
8679 if { (eval echo configure:8680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8680   rm -rf conftest*
8681   eval "ac_cv_lib_$ac_lib_var=yes"
8682 else
8683   echo "configure: failed program was:" >&5
8684   cat conftest.$ac_ext >&5
8685   rm -rf conftest*
8686   eval "ac_cv_lib_$ac_lib_var=no"
8687 fi
8688 rm -f conftest*
8689 xe_check_libs=""
8690
8691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8692   echo "$ac_t""yes" 1>&6
8693   :
8694 else
8695   echo "$ac_t""no" 1>&6
8696 with_tiff=no
8697 fi
8698
8699  }
8700   test -z "$with_tiff" && with_tiff=yes
8701   if test "$with_tiff" = "yes"; then
8702     { test "$extra_verbose" = "yes" && cat << \EOF
8703     Defining HAVE_TIFF
8704 EOF
8705 cat >> confdefs.h <<\EOF
8706 #define HAVE_TIFF 1
8707 EOF
8708 }
8709
8710     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8711   fi
8712 fi
8713
8714
8715 if test "$with_gtk" = "yes"; then
8716     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8717 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8718 echo "configure:8719: checking for compface.h" >&5
8719
8720 cat > conftest.$ac_ext <<EOF
8721 #line 8722 "configure"
8722 #include "confdefs.h"
8723 #include <compface.h>
8724 EOF
8725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8726 { (eval echo configure:8727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8728 if test -z "$ac_err"; then
8729   rm -rf conftest*
8730   eval "ac_cv_header_$ac_safe=yes"
8731 else
8732   echo "$ac_err" >&5
8733   echo "configure: failed program was:" >&5
8734   cat conftest.$ac_ext >&5
8735   rm -rf conftest*
8736   eval "ac_cv_header_$ac_safe=no"
8737 fi
8738 rm -f conftest*
8739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8740   echo "$ac_t""yes" 1>&6
8741   :
8742 else
8743   echo "$ac_t""no" 1>&6
8744 with_xface=no
8745 fi
8746  }
8747   test -z "$with_xface" && { 
8748 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8749 echo "configure:8750: checking for UnGenFace in -lcompface" >&5
8750 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8751
8752 xe_check_libs=" -lcompface "
8753 cat > conftest.$ac_ext <<EOF
8754 #line 8755 "configure"
8755 #include "confdefs.h"
8756 /* Override any gcc2 internal prototype to avoid an error.  */
8757 /* We use char because int might match the return type of a gcc2
8758     builtin and then its argument prototype would still apply.  */
8759 char UnGenFace();
8760
8761 int main() {
8762 UnGenFace()
8763 ; return 0; }
8764 EOF
8765 if { (eval echo configure:8766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8766   rm -rf conftest*
8767   eval "ac_cv_lib_$ac_lib_var=yes"
8768 else
8769   echo "configure: failed program was:" >&5
8770   cat conftest.$ac_ext >&5
8771   rm -rf conftest*
8772   eval "ac_cv_lib_$ac_lib_var=no"
8773 fi
8774 rm -f conftest*
8775 xe_check_libs=""
8776
8777 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8778   echo "$ac_t""yes" 1>&6
8779   : 
8780 else
8781   echo "$ac_t""no" 1>&6
8782 with_xface=no
8783 fi
8784
8785  }
8786   test -z "$with_xface" && with_xface=yes
8787   if test "$with_xface" = "yes"; then
8788     { test "$extra_verbose" = "yes" && cat << \EOF
8789     Defining HAVE_XFACE
8790 EOF
8791 cat >> confdefs.h <<\EOF
8792 #define HAVE_XFACE 1
8793 EOF
8794 }
8795
8796     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8797   fi
8798 fi
8799
8800
8801
8802 if test "$with_x11" = "yes"; then
8803   echo "checking for X11 graphics libraries" 1>&6
8804 echo "configure:8805: checking for X11 graphics libraries" >&5
8805 fi
8806
8807 if test "$with_x11" = "yes" -a "$with_widgets" = "athena"; then
8808   echo "checking for the Athena widgets" 1>&6
8809 echo "configure:8810: checking for the Athena widgets" >&5
8810
8811     case "$with_athena" in
8812         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8813     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8814     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8815     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8816     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8817     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8818   esac
8819
8820     if test "$athena_3d" = "no"; then
8821     
8822 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8823 echo "configure:8824: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8824 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8825
8826 xe_check_libs=" -l$athena_variant "
8827 cat > conftest.$ac_ext <<EOF
8828 #line 8829 "configure"
8829 #include "confdefs.h"
8830 /* Override any gcc2 internal prototype to avoid an error.  */
8831 /* We use char because int might match the return type of a gcc2
8832     builtin and then its argument prototype would still apply.  */
8833 char XawScrollbarSetThumb();
8834
8835 int main() {
8836 XawScrollbarSetThumb()
8837 ; return 0; }
8838 EOF
8839 if { (eval echo configure:8840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8840   rm -rf conftest*
8841   eval "ac_cv_lib_$ac_lib_var=yes"
8842 else
8843   echo "configure: failed program was:" >&5
8844   cat conftest.$ac_ext >&5
8845   rm -rf conftest*
8846   eval "ac_cv_lib_$ac_lib_var=no"
8847 fi
8848 rm -f conftest*
8849 xe_check_libs=""
8850
8851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8852   echo "$ac_t""yes" 1>&6
8853           
8854 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8855 echo "configure:8856: checking for threeDClassRec in -l$athena_variant" >&5
8856 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8857
8858 xe_check_libs=" -l$athena_variant "
8859 cat > conftest.$ac_ext <<EOF
8860 #line 8861 "configure"
8861 #include "confdefs.h"
8862 /* Override any gcc2 internal prototype to avoid an error.  */
8863 /* We use char because int might match the return type of a gcc2
8864     builtin and then its argument prototype would still apply.  */
8865 char threeDClassRec();
8866
8867 int main() {
8868 threeDClassRec()
8869 ; return 0; }
8870 EOF
8871 if { (eval echo configure:8872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8872   rm -rf conftest*
8873   eval "ac_cv_lib_$ac_lib_var=yes"
8874 else
8875   echo "configure: failed program was:" >&5
8876   cat conftest.$ac_ext >&5
8877   rm -rf conftest*
8878   eval "ac_cv_lib_$ac_lib_var=no"
8879 fi
8880 rm -f conftest*
8881 xe_check_libs=""
8882
8883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8884   echo "$ac_t""yes" 1>&6
8885   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8886 else
8887   echo "$ac_t""no" 1>&6
8888 athena_lib=$athena_variant
8889 fi
8890
8891
8892       
8893 else
8894   echo "$ac_t""no" 1>&6
8895 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8896 fi
8897
8898
8899   else
8900         
8901 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8902 echo "configure:8903: checking for threeDClassRec in -l$athena_variant" >&5
8903 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8904
8905 xe_check_libs=" -l$athena_variant "
8906 cat > conftest.$ac_ext <<EOF
8907 #line 8908 "configure"
8908 #include "confdefs.h"
8909 /* Override any gcc2 internal prototype to avoid an error.  */
8910 /* We use char because int might match the return type of a gcc2
8911     builtin and then its argument prototype would still apply.  */
8912 char threeDClassRec();
8913
8914 int main() {
8915 threeDClassRec()
8916 ; return 0; }
8917 EOF
8918 if { (eval echo configure:8919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8919   rm -rf conftest*
8920   eval "ac_cv_lib_$ac_lib_var=yes"
8921 else
8922   echo "configure: failed program was:" >&5
8923   cat conftest.$ac_ext >&5
8924   rm -rf conftest*
8925   eval "ac_cv_lib_$ac_lib_var=no"
8926 fi
8927 rm -f conftest*
8928 xe_check_libs=""
8929
8930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8931   echo "$ac_t""yes" 1>&6
8932   athena_lib=$athena_variant
8933 else
8934   echo "$ac_t""no" 1>&6
8935 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8936 echo "configure:8937: checking for threeDClassRec in -lXaw" >&5
8937 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8938
8939 xe_check_libs=" -lXaw "
8940 cat > conftest.$ac_ext <<EOF
8941 #line 8942 "configure"
8942 #include "confdefs.h"
8943 /* Override any gcc2 internal prototype to avoid an error.  */
8944 /* We use char because int might match the return type of a gcc2
8945     builtin and then its argument prototype would still apply.  */
8946 char threeDClassRec();
8947
8948 int main() {
8949 threeDClassRec()
8950 ; return 0; }
8951 EOF
8952 if { (eval echo configure:8953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8953   rm -rf conftest*
8954   eval "ac_cv_lib_$ac_lib_var=yes"
8955 else
8956   echo "configure: failed program was:" >&5
8957   cat conftest.$ac_ext >&5
8958   rm -rf conftest*
8959   eval "ac_cv_lib_$ac_lib_var=no"
8960 fi
8961 rm -f conftest*
8962 xe_check_libs=""
8963
8964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8965   echo "$ac_t""yes" 1>&6
8966   athena_lib=Xaw;
8967           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8968         
8969 else
8970   echo "$ac_t""no" 1>&6
8971 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8972 fi
8973
8974
8975 fi
8976
8977
8978   fi
8979
8980     if test "$athena_3d" = "no"; then
8981     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8982 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8983 echo "configure:8984: checking for X11/Xaw/ThreeD.h" >&5
8984
8985 cat > conftest.$ac_ext <<EOF
8986 #line 8987 "configure"
8987 #include "confdefs.h"
8988 #include <X11/Xaw/ThreeD.h>
8989 EOF
8990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8991 { (eval echo configure:8992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8993 if test -z "$ac_err"; then
8994   rm -rf conftest*
8995   eval "ac_cv_header_$ac_safe=yes"
8996 else
8997   echo "$ac_err" >&5
8998   echo "configure: failed program was:" >&5
8999   cat conftest.$ac_ext >&5
9000   rm -rf conftest*
9001   eval "ac_cv_header_$ac_safe=no"
9002 fi
9003 rm -f conftest*
9004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9005   echo "$ac_t""yes" 1>&6
9006   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9007 else
9008   echo "$ac_t""no" 1>&6
9009 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9010 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9011 echo "configure:9012: checking for X11/Xaw/XawInit.h" >&5
9012
9013 cat > conftest.$ac_ext <<EOF
9014 #line 9015 "configure"
9015 #include "confdefs.h"
9016 #include <X11/Xaw/XawInit.h>
9017 EOF
9018 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9019 { (eval echo configure:9020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9020 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9021 if test -z "$ac_err"; then
9022   rm -rf conftest*
9023   eval "ac_cv_header_$ac_safe=yes"
9024 else
9025   echo "$ac_err" >&5
9026   echo "configure: failed program was:" >&5
9027   cat conftest.$ac_ext >&5
9028   rm -rf conftest*
9029   eval "ac_cv_header_$ac_safe=no"
9030 fi
9031 rm -f conftest*
9032 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9033   echo "$ac_t""yes" 1>&6
9034   athena_h_path=X11/Xaw
9035 else
9036   echo "$ac_t""no" 1>&6
9037 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9038 fi
9039
9040 fi
9041
9042   else
9043             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9044 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9045 echo "configure:9046: checking for X11/$athena_variant/XawInit.h" >&5
9046
9047 cat > conftest.$ac_ext <<EOF
9048 #line 9049 "configure"
9049 #include "confdefs.h"
9050 #include <X11/$athena_variant/XawInit.h>
9051 EOF
9052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9053 { (eval echo configure:9054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9055 if test -z "$ac_err"; then
9056   rm -rf conftest*
9057   eval "ac_cv_header_$ac_safe=yes"
9058 else
9059   echo "$ac_err" >&5
9060   echo "configure: failed program was:" >&5
9061   cat conftest.$ac_ext >&5
9062   rm -rf conftest*
9063   eval "ac_cv_header_$ac_safe=no"
9064 fi
9065 rm -f conftest*
9066 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9067   echo "$ac_t""yes" 1>&6
9068   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9069 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9070 echo "configure:9071: checking for X11/$athena_variant/ThreeD.h" >&5
9071
9072 cat > conftest.$ac_ext <<EOF
9073 #line 9074 "configure"
9074 #include "confdefs.h"
9075 #include <X11/$athena_variant/ThreeD.h>
9076 EOF
9077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9078 { (eval echo configure:9079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9080 if test -z "$ac_err"; then
9081   rm -rf conftest*
9082   eval "ac_cv_header_$ac_safe=yes"
9083 else
9084   echo "$ac_err" >&5
9085   echo "configure: failed program was:" >&5
9086   cat conftest.$ac_ext >&5
9087   rm -rf conftest*
9088   eval "ac_cv_header_$ac_safe=no"
9089 fi
9090 rm -f conftest*
9091 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9092   echo "$ac_t""yes" 1>&6
9093   athena_h_path=X11/$athena_variant
9094 else
9095   echo "$ac_t""no" 1>&6
9096 fi
9097
9098 else
9099   echo "$ac_t""no" 1>&6
9100 fi
9101
9102
9103         if test -z "$athena_h_path"; then
9104       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9105 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9106 echo "configure:9107: checking for $athena_variant/XawInit.h" >&5
9107
9108 cat > conftest.$ac_ext <<EOF
9109 #line 9110 "configure"
9110 #include "confdefs.h"
9111 #include <$athena_variant/XawInit.h>
9112 EOF
9113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9114 { (eval echo configure:9115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9116 if test -z "$ac_err"; then
9117   rm -rf conftest*
9118   eval "ac_cv_header_$ac_safe=yes"
9119 else
9120   echo "$ac_err" >&5
9121   echo "configure: failed program was:" >&5
9122   cat conftest.$ac_ext >&5
9123   rm -rf conftest*
9124   eval "ac_cv_header_$ac_safe=no"
9125 fi
9126 rm -f conftest*
9127 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9128   echo "$ac_t""yes" 1>&6
9129   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9130 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9131 echo "configure:9132: checking for $athena_variant/ThreeD.h" >&5
9132
9133 cat > conftest.$ac_ext <<EOF
9134 #line 9135 "configure"
9135 #include "confdefs.h"
9136 #include <$athena_variant/ThreeD.h>
9137 EOF
9138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9139 { (eval echo configure:9140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9141 if test -z "$ac_err"; then
9142   rm -rf conftest*
9143   eval "ac_cv_header_$ac_safe=yes"
9144 else
9145   echo "$ac_err" >&5
9146   echo "configure: failed program was:" >&5
9147   cat conftest.$ac_ext >&5
9148   rm -rf conftest*
9149   eval "ac_cv_header_$ac_safe=no"
9150 fi
9151 rm -f conftest*
9152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9153   echo "$ac_t""yes" 1>&6
9154   athena_h_path=$athena_variant
9155 else
9156   echo "$ac_t""no" 1>&6
9157 fi
9158
9159 else
9160   echo "$ac_t""no" 1>&6
9161 fi
9162
9163     fi
9164
9165         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9166       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9167 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9168 echo "configure:9169: checking for X11/Xaw3d/XawInit.h" >&5
9169
9170 cat > conftest.$ac_ext <<EOF
9171 #line 9172 "configure"
9172 #include "confdefs.h"
9173 #include <X11/Xaw3d/XawInit.h>
9174 EOF
9175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9176 { (eval echo configure:9177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9178 if test -z "$ac_err"; then
9179   rm -rf conftest*
9180   eval "ac_cv_header_$ac_safe=yes"
9181 else
9182   echo "$ac_err" >&5
9183   echo "configure: failed program was:" >&5
9184   cat conftest.$ac_ext >&5
9185   rm -rf conftest*
9186   eval "ac_cv_header_$ac_safe=no"
9187 fi
9188 rm -f conftest*
9189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9190   echo "$ac_t""yes" 1>&6
9191   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9192 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9193 echo "configure:9194: checking for X11/Xaw3d/ThreeD.h" >&5
9194
9195 cat > conftest.$ac_ext <<EOF
9196 #line 9197 "configure"
9197 #include "confdefs.h"
9198 #include <X11/Xaw3d/ThreeD.h>
9199 EOF
9200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9201 { (eval echo configure:9202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9203 if test -z "$ac_err"; then
9204   rm -rf conftest*
9205   eval "ac_cv_header_$ac_safe=yes"
9206 else
9207   echo "$ac_err" >&5
9208   echo "configure: failed program was:" >&5
9209   cat conftest.$ac_ext >&5
9210   rm -rf conftest*
9211   eval "ac_cv_header_$ac_safe=no"
9212 fi
9213 rm -f conftest*
9214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9215   echo "$ac_t""yes" 1>&6
9216   
9217             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9218             athena_h_path=X11/Xaw3d
9219           
9220 else
9221   echo "$ac_t""no" 1>&6
9222 fi
9223
9224 else
9225   echo "$ac_t""no" 1>&6
9226 fi
9227
9228     fi
9229
9230         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9231       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9232 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9233 echo "configure:9234: checking for Xaw3d/XawInit.h" >&5
9234
9235 cat > conftest.$ac_ext <<EOF
9236 #line 9237 "configure"
9237 #include "confdefs.h"
9238 #include <Xaw3d/XawInit.h>
9239 EOF
9240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9241 { (eval echo configure:9242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9243 if test -z "$ac_err"; then
9244   rm -rf conftest*
9245   eval "ac_cv_header_$ac_safe=yes"
9246 else
9247   echo "$ac_err" >&5
9248   echo "configure: failed program was:" >&5
9249   cat conftest.$ac_ext >&5
9250   rm -rf conftest*
9251   eval "ac_cv_header_$ac_safe=no"
9252 fi
9253 rm -f conftest*
9254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9255   echo "$ac_t""yes" 1>&6
9256   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9257 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9258 echo "configure:9259: checking for Xaw3d/ThreeD.h" >&5
9259
9260 cat > conftest.$ac_ext <<EOF
9261 #line 9262 "configure"
9262 #include "confdefs.h"
9263 #include <Xaw3d/ThreeD.h>
9264 EOF
9265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9266 { (eval echo configure:9267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9268 if test -z "$ac_err"; then
9269   rm -rf conftest*
9270   eval "ac_cv_header_$ac_safe=yes"
9271 else
9272   echo "$ac_err" >&5
9273   echo "configure: failed program was:" >&5
9274   cat conftest.$ac_ext >&5
9275   rm -rf conftest*
9276   eval "ac_cv_header_$ac_safe=no"
9277 fi
9278 rm -f conftest*
9279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9280   echo "$ac_t""yes" 1>&6
9281   
9282             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9283             athena_h_path=Xaw3d
9284           
9285 else
9286   echo "$ac_t""no" 1>&6
9287 fi
9288
9289 else
9290   echo "$ac_t""no" 1>&6
9291 fi
9292
9293     fi
9294
9295             if test -z "$athena_h_path"; then
9296       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9297 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9298 echo "configure:9299: checking for X11/Xaw/ThreeD.h" >&5
9299
9300 cat > conftest.$ac_ext <<EOF
9301 #line 9302 "configure"
9302 #include "confdefs.h"
9303 #include <X11/Xaw/ThreeD.h>
9304 EOF
9305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9306 { (eval echo configure:9307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9308 if test -z "$ac_err"; then
9309   rm -rf conftest*
9310   eval "ac_cv_header_$ac_safe=yes"
9311 else
9312   echo "$ac_err" >&5
9313   echo "configure: failed program was:" >&5
9314   cat conftest.$ac_ext >&5
9315   rm -rf conftest*
9316   eval "ac_cv_header_$ac_safe=no"
9317 fi
9318 rm -f conftest*
9319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9320   echo "$ac_t""yes" 1>&6
9321   
9322           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9323           athena_h_path=X11/Xaw
9324         
9325 else
9326   echo "$ac_t""no" 1>&6
9327 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9328 fi
9329
9330     fi
9331   fi
9332
9333     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9334     have_xaw=yes
9335   else
9336     have_xaw=no
9337   fi
9338
9339 else
9340   have_xaw=no
9341 fi 
9342 if test "$with_x11" = "yes"; then
9343     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9344 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9345 echo "configure:9346: checking for Xm/Xm.h" >&5
9346
9347 cat > conftest.$ac_ext <<EOF
9348 #line 9349 "configure"
9349 #include "confdefs.h"
9350 #include <Xm/Xm.h>
9351 EOF
9352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9353 { (eval echo configure:9354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9355 if test -z "$ac_err"; then
9356   rm -rf conftest*
9357   eval "ac_cv_header_$ac_safe=yes"
9358 else
9359   echo "$ac_err" >&5
9360   echo "configure: failed program was:" >&5
9361   cat conftest.$ac_ext >&5
9362   rm -rf conftest*
9363   eval "ac_cv_header_$ac_safe=no"
9364 fi
9365 rm -f conftest*
9366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9367   echo "$ac_t""yes" 1>&6
9368   
9369 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9370 echo "configure:9371: checking for XmStringFree in -lXm" >&5
9371 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9372
9373 xe_check_libs=" -lXm "
9374 cat > conftest.$ac_ext <<EOF
9375 #line 9376 "configure"
9376 #include "confdefs.h"
9377 /* Override any gcc2 internal prototype to avoid an error.  */
9378 /* We use char because int might match the return type of a gcc2
9379     builtin and then its argument prototype would still apply.  */
9380 char XmStringFree();
9381
9382 int main() {
9383 XmStringFree()
9384 ; return 0; }
9385 EOF
9386 if { (eval echo configure:9387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9387   rm -rf conftest*
9388   eval "ac_cv_lib_$ac_lib_var=yes"
9389 else
9390   echo "configure: failed program was:" >&5
9391   cat conftest.$ac_ext >&5
9392   rm -rf conftest*
9393   eval "ac_cv_lib_$ac_lib_var=no"
9394 fi
9395 rm -f conftest*
9396 xe_check_libs=""
9397
9398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9399   echo "$ac_t""yes" 1>&6
9400   have_motif=yes
9401 else
9402   echo "$ac_t""no" 1>&6
9403 have_motif=no
9404 fi
9405
9406
9407 else
9408   echo "$ac_t""no" 1>&6
9409 have_motif=no
9410 fi
9411
9412
9413   if test "$have_motif" = "yes"; then
9414         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9415 echo "configure:9416: checking for Lesstif" >&5
9416     cat > conftest.$ac_ext <<EOF
9417 #line 9418 "configure"
9418 #include "confdefs.h"
9419 #include <Xm/Xm.h>
9420 #ifdef LESSTIF_VERSION
9421 yes
9422 #endif
9423
9424 EOF
9425 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9426   egrep "yes" >/dev/null 2>&1; then
9427   rm -rf conftest*
9428   have_lesstif=yes
9429 else
9430   rm -rf conftest*
9431   have_lesstif=no
9432 fi
9433 rm -f conftest*
9434
9435   echo "$ac_t""$have_lesstif" 1>&6
9436   fi
9437
9438 fi 
9439
9440 case "$with_menubars" in "" | "yes" | "athena" )
9441   with_menubars="lucid" ;;
9442 esac
9443 case "$with_dialogs" in "" | "yes" | "lucid" )
9444   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9445   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9446   else with_dialogs=no
9447   fi ;;
9448 esac
9449 case "$with_scrollbars" in "" | "yes" )
9450   with_scrollbars="lucid" ;;
9451 esac
9452 case "$with_widgets" in "" | "yes" | "lucid")
9453   if   test "$have_motif" = "yes"; then with_widgets="motif"
9454   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9455   else with_widgets=no
9456   fi ;;
9457 esac
9458
9459 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9460
9461 case "$all_widgets" in
9462   *athena* )
9463     if test "$have_xaw" != "yes"; then
9464       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9465     fi
9466
9467         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9468
9469         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9470
9471                     { test "$extra_verbose" = "yes" && cat << EOF
9472     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9473 EOF
9474 cat >> confdefs.h <<EOF
9475 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9476 EOF
9477 }
9478
9479     { test "$extra_verbose" = "yes" && cat << EOF
9480     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9481 EOF
9482 cat >> confdefs.h <<EOF
9483 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9484 EOF
9485 }
9486
9487     { test "$extra_verbose" = "yes" && cat << EOF
9488     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9489 EOF
9490 cat >> confdefs.h <<EOF
9491 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9492 EOF
9493 }
9494
9495     { test "$extra_verbose" = "yes" && cat << EOF
9496     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9497 EOF
9498 cat >> confdefs.h <<EOF
9499 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9500 EOF
9501 }
9502
9503     { test "$extra_verbose" = "yes" && cat << EOF
9504     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9505 EOF
9506 cat >> confdefs.h <<EOF
9507 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9508 EOF
9509 }
9510
9511     { test "$extra_verbose" = "yes" && cat << EOF
9512     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9513 EOF
9514 cat >> confdefs.h <<EOF
9515 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9516 EOF
9517 }
9518
9519     { test "$extra_verbose" = "yes" && cat << EOF
9520     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9521 EOF
9522 cat >> confdefs.h <<EOF
9523 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9524 EOF
9525 }
9526
9527     { test "$extra_verbose" = "yes" && cat << EOF
9528     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9529 EOF
9530 cat >> confdefs.h <<EOF
9531 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9532 EOF
9533 }
9534
9535     { test "$extra_verbose" = "yes" && cat << EOF
9536     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9537 EOF
9538 cat >> confdefs.h <<EOF
9539 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9540 EOF
9541 }
9542
9543     { test "$extra_verbose" = "yes" && cat << EOF
9544     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9545 EOF
9546 cat >> confdefs.h <<EOF
9547 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9548 EOF
9549 }
9550
9551
9552     { test "$extra_verbose" = "yes" && cat << \EOF
9553     Defining LWLIB_USES_ATHENA
9554 EOF
9555 cat >> confdefs.h <<\EOF
9556 #define LWLIB_USES_ATHENA 1
9557 EOF
9558 }
9559
9560     { test "$extra_verbose" = "yes" && cat << \EOF
9561     Defining NEED_ATHENA
9562 EOF
9563 cat >> confdefs.h <<\EOF
9564 #define NEED_ATHENA 1
9565 EOF
9566 }
9567
9568     need_athena="yes"
9569
9570     if test "$athena_3d" = "yes"; then
9571       { test "$extra_verbose" = "yes" && cat << \EOF
9572     Defining HAVE_ATHENA_3D
9573 EOF
9574 cat >> confdefs.h <<\EOF
9575 #define HAVE_ATHENA_3D 1
9576 EOF
9577 }
9578
9579     fi
9580   ;;
9581 esac
9582
9583 case "$all_widgets" in *motif* )
9584   { test "$extra_verbose" = "yes" && cat << \EOF
9585     Defining LWLIB_USES_MOTIF
9586 EOF
9587 cat >> confdefs.h <<\EOF
9588 #define LWLIB_USES_MOTIF 1
9589 EOF
9590 }
9591
9592   { test "$extra_verbose" = "yes" && cat << \EOF
9593     Defining NEED_MOTIF
9594 EOF
9595 cat >> confdefs.h <<\EOF
9596 #define NEED_MOTIF 1
9597 EOF
9598 }
9599
9600   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9601   need_motif=yes ;;
9602 esac
9603
9604 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9605 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9606 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9607 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9608         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9609 case "$with_widgets" in athena* )
9610         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;;
9611 esac
9612 case "$all_widgets" in *lucid* )
9613   { test "$extra_verbose" = "yes" && cat << \EOF
9614     Defining NEED_LUCID
9615 EOF
9616 cat >> confdefs.h <<\EOF
9617 #define NEED_LUCID 1
9618 EOF
9619 }
9620
9621   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9622 esac
9623
9624
9625
9626 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9627     Defining LWLIB_SCROLLBARS_ATHENA
9628 EOF
9629 cat >> confdefs.h <<\EOF
9630 #define LWLIB_SCROLLBARS_ATHENA 1
9631 EOF
9632 }
9633
9634 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9635     Defining LWLIB_DIALOGS_ATHENA
9636 EOF
9637 cat >> confdefs.h <<\EOF
9638 #define LWLIB_DIALOGS_ATHENA 1
9639 EOF
9640 }
9641
9642
9643 if test "$athena_3d" = "yes"; then
9644   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9645     Defining LWLIB_SCROLLBARS_ATHENA3D
9646 EOF
9647 cat >> confdefs.h <<\EOF
9648 #define LWLIB_SCROLLBARS_ATHENA3D 1
9649 EOF
9650 }
9651
9652   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9653     Defining LWLIB_DIALOGS_ATHENA3D
9654 EOF
9655 cat >> confdefs.h <<\EOF
9656 #define LWLIB_DIALOGS_ATHENA3D 1
9657 EOF
9658 }
9659
9660 fi
9661
9662 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9663     Defining LWLIB_WIDGETS_ATHENA
9664 EOF
9665 cat >> confdefs.h <<\EOF
9666 #define LWLIB_WIDGETS_ATHENA 1
9667 EOF
9668 }
9669 ;; esac
9670 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9671         { test "$extra_verbose" = "yes" && cat << \EOF
9672     Defining LWLIB_TABS_LUCID
9673 EOF
9674 cat >> confdefs.h <<\EOF
9675 #define LWLIB_TABS_LUCID 1
9676 EOF
9677 }
9678
9679
9680 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9681     Defining HAVE_MENUBARS
9682 EOF
9683 cat >> confdefs.h <<\EOF
9684 #define HAVE_MENUBARS 1
9685 EOF
9686 }
9687
9688 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9689     Defining HAVE_SCROLLBARS
9690 EOF
9691 cat >> confdefs.h <<\EOF
9692 #define HAVE_SCROLLBARS 1
9693 EOF
9694 }
9695
9696 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9697     Defining HAVE_DIALOGS
9698 EOF
9699 cat >> confdefs.h <<\EOF
9700 #define HAVE_DIALOGS 1
9701 EOF
9702 }
9703
9704 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9705     Defining HAVE_TOOLBARS
9706 EOF
9707 cat >> confdefs.h <<\EOF
9708 #define HAVE_TOOLBARS 1
9709 EOF
9710 }
9711
9712 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9713     Defining HAVE_WIDGETS
9714 EOF
9715 cat >> confdefs.h <<\EOF
9716 #define HAVE_WIDGETS 1
9717 EOF
9718 }
9719
9720
9721 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9722     Defining LWLIB_MENUBARS_LUCID
9723 EOF
9724 cat >> confdefs.h <<\EOF
9725 #define LWLIB_MENUBARS_LUCID 1
9726 EOF
9727 }
9728
9729 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9730     Defining LWLIB_SCROLLBARS_LUCID
9731 EOF
9732 cat >> confdefs.h <<\EOF
9733 #define LWLIB_SCROLLBARS_LUCID 1
9734 EOF
9735 }
9736
9737
9738 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9739     Defining LWLIB_MENUBARS_MOTIF
9740 EOF
9741 cat >> confdefs.h <<\EOF
9742 #define LWLIB_MENUBARS_MOTIF 1
9743 EOF
9744 }
9745
9746 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9747     Defining LWLIB_SCROLLBARS_MOTIF
9748 EOF
9749 cat >> confdefs.h <<\EOF
9750 #define LWLIB_SCROLLBARS_MOTIF 1
9751 EOF
9752 }
9753
9754 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9755     Defining LWLIB_DIALOGS_MOTIF
9756 EOF
9757 cat >> confdefs.h <<\EOF
9758 #define LWLIB_DIALOGS_MOTIF 1
9759 EOF
9760 }
9761
9762 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9763     Defining LWLIB_WIDGETS_MOTIF
9764 EOF
9765 cat >> confdefs.h <<\EOF
9766 #define LWLIB_WIDGETS_MOTIF 1
9767 EOF
9768 }
9769
9770
9771 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9772    echo "    xemacs will be linked with \"menubar.o\""
9773  fi
9774 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9775    echo "    xemacs will be linked with \"scrollbar.o\""
9776  fi
9777 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9778    echo "    xemacs will be linked with \"dialog.o\""
9779  fi
9780 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9781    echo "    xemacs will be linked with \"toolbar.o\""
9782  fi
9783
9784 if test "$with_gtk" = "yes"; then
9785   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9786    echo "    xemacs will be linked with \"menubar-gtk.o\""
9787  fi
9788   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9789    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9790  fi
9791   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9792    echo "    xemacs will be linked with \"dialog-gtk.o\""
9793  fi
9794   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9795    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9796  fi
9797   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9798    echo "    xemacs will be linked with \"gui-gtk.o\""
9799  fi
9800 fi
9801
9802 if test "$with_x11" = "yes"; then
9803   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9804    echo "    xemacs will be linked with \"menubar-x.o\""
9805  fi
9806   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9807    echo "    xemacs will be linked with \"scrollbar-x.o\""
9808  fi
9809   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9810    echo "    xemacs will be linked with \"dialog-x.o\""
9811  fi
9812   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9813    echo "    xemacs will be linked with \"toolbar-x.o\""
9814  fi
9815   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9816    echo "    xemacs will be linked with \"gui-x.o\""
9817  fi
9818 fi
9819
9820
9821 test -z "$with_mule" && with_mule=no
9822 test -z "$with_file_coding" && with_file_coding=no
9823
9824
9825 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9826   { test "$extra_verbose" = "yes" && cat << \EOF
9827     Defining FILE_CODING
9828 EOF
9829 cat >> confdefs.h <<\EOF
9830 #define FILE_CODING 1
9831 EOF
9832 }
9833
9834   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9835    echo "    xemacs will be linked with \"file-coding.o\""
9836  fi
9837 fi
9838
9839 if test "$with_mule" = "yes" ; then
9840   echo "checking for Mule-related features" 1>&6
9841 echo "configure:9842: checking for Mule-related features" >&5
9842   { test "$extra_verbose" = "yes" && cat << \EOF
9843     Defining MULE
9844 EOF
9845 cat >> confdefs.h <<\EOF
9846 #define MULE 1
9847 EOF
9848 }
9849
9850   { test "$extra_verbose" = "yes" && cat << \EOF
9851     Defining FILE_CODING
9852 EOF
9853 cat >> confdefs.h <<\EOF
9854 #define FILE_CODING 1
9855 EOF
9856 }
9857
9858   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9859    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9860  fi
9861   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9862     { test "$extra_verbose" = "yes" && cat << \EOF
9863     Defining TEXT_CODING
9864 EOF
9865 cat >> confdefs.h <<\EOF
9866 #define TEXT_CODING 1
9867 EOF
9868 }
9869
9870     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9871    echo "    xemacs will be linked with \"text-coding.o\""
9872  fi
9873   else
9874     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9875    echo "    xemacs will be linked with \"file-coding.o\""
9876  fi
9877   fi
9878     for ac_hdr in libintl.h
9879 do
9880 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9881 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9882 echo "configure:9883: checking for $ac_hdr" >&5
9883
9884 cat > conftest.$ac_ext <<EOF
9885 #line 9886 "configure"
9886 #include "confdefs.h"
9887 #include <$ac_hdr>
9888 EOF
9889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9890 { (eval echo configure:9891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9892 if test -z "$ac_err"; then
9893   rm -rf conftest*
9894   eval "ac_cv_header_$ac_safe=yes"
9895 else
9896   echo "$ac_err" >&5
9897   echo "configure: failed program was:" >&5
9898   cat conftest.$ac_ext >&5
9899   rm -rf conftest*
9900   eval "ac_cv_header_$ac_safe=no"
9901 fi
9902 rm -f conftest*
9903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9904   echo "$ac_t""yes" 1>&6
9905     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9906   { test "$extra_verbose" = "yes" && cat << EOF
9907     Defining $ac_tr_hdr
9908 EOF
9909 cat >> confdefs.h <<EOF
9910 #define $ac_tr_hdr 1
9911 EOF
9912 }
9913  
9914 else
9915   echo "$ac_t""no" 1>&6
9916 fi
9917 done
9918
9919   
9920 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9921 echo "configure:9922: checking for strerror in -lintl" >&5
9922 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9923
9924 xe_check_libs=" -lintl "
9925 cat > conftest.$ac_ext <<EOF
9926 #line 9927 "configure"
9927 #include "confdefs.h"
9928 /* Override any gcc2 internal prototype to avoid an error.  */
9929 /* We use char because int might match the return type of a gcc2
9930     builtin and then its argument prototype would still apply.  */
9931 char strerror();
9932
9933 int main() {
9934 strerror()
9935 ; return 0; }
9936 EOF
9937 if { (eval echo configure:9938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9938   rm -rf conftest*
9939   eval "ac_cv_lib_$ac_lib_var=yes"
9940 else
9941   echo "configure: failed program was:" >&5
9942   cat conftest.$ac_ext >&5
9943   rm -rf conftest*
9944   eval "ac_cv_lib_$ac_lib_var=no"
9945 fi
9946 rm -f conftest*
9947 xe_check_libs=""
9948
9949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9950   echo "$ac_t""yes" 1>&6
9951     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9952     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9953   { test "$extra_verbose" = "yes" && cat << EOF
9954     Defining $ac_tr_lib
9955 EOF
9956 cat >> confdefs.h <<EOF
9957 #define $ac_tr_lib 1
9958 EOF
9959 }
9960
9961   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9962
9963 else
9964   echo "$ac_t""no" 1>&6
9965 fi
9966
9967
9968
9969   if test "$with_utf_2000" = "yes" ; then
9970     { test "$extra_verbose" = "yes" && cat << \EOF
9971     Defining CHAR_IS_UCS4
9972 EOF
9973 cat >> confdefs.h <<\EOF
9974 #define CHAR_IS_UCS4 1
9975 EOF
9976 }
9977
9978     { test "$extra_verbose" = "yes" && cat << \EOF
9979     Defining UTF2000
9980 EOF
9981 cat >> confdefs.h <<\EOF
9982 #define UTF2000 1
9983 EOF
9984 }
9985
9986   fi
9987
9988   echo "checking for Mule input methods" 1>&6
9989 echo "configure:9990: checking for Mule input methods" >&5
9990         case "$with_xim" in "" | "yes" )
9991     echo "checking for XIM" 1>&6
9992 echo "configure:9993: checking for XIM" >&5
9993     
9994 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9995 echo "configure:9996: checking for XOpenIM in -lX11" >&5
9996 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9997
9998 xe_check_libs=" -lX11 "
9999 cat > conftest.$ac_ext <<EOF
10000 #line 10001 "configure"
10001 #include "confdefs.h"
10002 /* Override any gcc2 internal prototype to avoid an error.  */
10003 /* We use char because int might match the return type of a gcc2
10004     builtin and then its argument prototype would still apply.  */
10005 char XOpenIM();
10006
10007 int main() {
10008 XOpenIM()
10009 ; return 0; }
10010 EOF
10011 if { (eval echo configure:10012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10012   rm -rf conftest*
10013   eval "ac_cv_lib_$ac_lib_var=yes"
10014 else
10015   echo "configure: failed program was:" >&5
10016   cat conftest.$ac_ext >&5
10017   rm -rf conftest*
10018   eval "ac_cv_lib_$ac_lib_var=no"
10019 fi
10020 rm -f conftest*
10021 xe_check_libs=""
10022
10023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10024   echo "$ac_t""yes" 1>&6
10025   with_xim=xlib
10026 else
10027   echo "$ac_t""no" 1>&6
10028 with_xim=no
10029 fi
10030
10031
10032         if test "$have_motif $have_lesstif" = "yes no"; then
10033       
10034 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10035 echo "configure:10036: checking for XmImMbLookupString in -lXm" >&5
10036 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10037
10038 xe_check_libs=" -lXm "
10039 cat > conftest.$ac_ext <<EOF
10040 #line 10041 "configure"
10041 #include "confdefs.h"
10042 /* Override any gcc2 internal prototype to avoid an error.  */
10043 /* We use char because int might match the return type of a gcc2
10044     builtin and then its argument prototype would still apply.  */
10045 char XmImMbLookupString();
10046
10047 int main() {
10048 XmImMbLookupString()
10049 ; return 0; }
10050 EOF
10051 if { (eval echo configure:10052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10052   rm -rf conftest*
10053   eval "ac_cv_lib_$ac_lib_var=yes"
10054 else
10055   echo "configure: failed program was:" >&5
10056   cat conftest.$ac_ext >&5
10057   rm -rf conftest*
10058   eval "ac_cv_lib_$ac_lib_var=no"
10059 fi
10060 rm -f conftest*
10061 xe_check_libs=""
10062
10063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10064   echo "$ac_t""yes" 1>&6
10065   with_xim=motif
10066 else
10067   echo "$ac_t""no" 1>&6
10068 fi
10069
10070
10071     fi ;;
10072   esac
10073   if test "$with_xim" != "no"; then
10074     { test "$extra_verbose" = "yes" && cat << \EOF
10075     Defining HAVE_XIM
10076 EOF
10077 cat >> confdefs.h <<\EOF
10078 #define HAVE_XIM 1
10079 EOF
10080 }
10081
10082     if test "$with_xim" = "xlib"; then
10083       { test "$extra_verbose" = "yes" && cat << \EOF
10084     Defining XIM_XLIB
10085 EOF
10086 cat >> confdefs.h <<\EOF
10087 #define XIM_XLIB 1
10088 EOF
10089 }
10090
10091       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10092    echo "    xemacs will be linked with \"input-method-xlib.o\""
10093  fi
10094     fi
10095     if test "$with_xim" = "motif"; then
10096       { test "$extra_verbose" = "yes" && cat << \EOF
10097     Defining XIM_MOTIF
10098 EOF
10099 cat >> confdefs.h <<\EOF
10100 #define XIM_MOTIF 1
10101 EOF
10102 }
10103
10104       need_motif=yes
10105       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10106    echo "    xemacs will be linked with \"input-method-motif.o\""
10107  fi
10108     fi
10109     if test "$with_xim" = "motif"; then
10110       with_xfs=no
10111     fi
10112   fi
10113
10114     if test "$with_xfs" = "yes" ; then
10115     echo "checking for XFontSet" 1>&6
10116 echo "configure:10117: checking for XFontSet" >&5
10117     
10118 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10119 echo "configure:10120: checking for XmbDrawString in -lX11" >&5
10120 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10121
10122 xe_check_libs=" -lX11 "
10123 cat > conftest.$ac_ext <<EOF
10124 #line 10125 "configure"
10125 #include "confdefs.h"
10126 /* Override any gcc2 internal prototype to avoid an error.  */
10127 /* We use char because int might match the return type of a gcc2
10128     builtin and then its argument prototype would still apply.  */
10129 char XmbDrawString();
10130
10131 int main() {
10132 XmbDrawString()
10133 ; return 0; }
10134 EOF
10135 if { (eval echo configure:10136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10136   rm -rf conftest*
10137   eval "ac_cv_lib_$ac_lib_var=yes"
10138 else
10139   echo "configure: failed program was:" >&5
10140   cat conftest.$ac_ext >&5
10141   rm -rf conftest*
10142   eval "ac_cv_lib_$ac_lib_var=no"
10143 fi
10144 rm -f conftest*
10145 xe_check_libs=""
10146
10147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10148   echo "$ac_t""yes" 1>&6
10149   :
10150 else
10151   echo "$ac_t""no" 1>&6
10152 with_xfs=no
10153 fi
10154
10155
10156     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10157       { test "$extra_verbose" = "yes" && cat << \EOF
10158     Defining USE_XFONTSET
10159 EOF
10160 cat >> confdefs.h <<\EOF
10161 #define USE_XFONTSET 1
10162 EOF
10163 }
10164
10165       if test "$with_xim" = "no" ; then
10166         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10167    echo "    xemacs will be linked with \"input-method-xlib.o\""
10168  fi
10169       fi
10170     fi
10171   fi 
10172     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10173   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10174 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10175 echo "configure:10176: checking for wnn/jllib.h" >&5
10176
10177 cat > conftest.$ac_ext <<EOF
10178 #line 10179 "configure"
10179 #include "confdefs.h"
10180 #include <wnn/jllib.h>
10181 EOF
10182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10183 { (eval echo configure:10184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10185 if test -z "$ac_err"; then
10186   rm -rf conftest*
10187   eval "ac_cv_header_$ac_safe=yes"
10188 else
10189   echo "$ac_err" >&5
10190   echo "configure: failed program was:" >&5
10191   cat conftest.$ac_ext >&5
10192   rm -rf conftest*
10193   eval "ac_cv_header_$ac_safe=no"
10194 fi
10195 rm -f conftest*
10196 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10197   echo "$ac_t""yes" 1>&6
10198   :
10199 else
10200   echo "$ac_t""no" 1>&6
10201 with_wnn=no
10202 fi
10203  }
10204     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10205 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10206 echo "configure:10207: checking for wnn/commonhd.h" >&5
10207
10208 cat > conftest.$ac_ext <<EOF
10209 #line 10210 "configure"
10210 #include "confdefs.h"
10211 #include <wnn/commonhd.h>
10212 EOF
10213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10214 { (eval echo configure:10215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10216 if test -z "$ac_err"; then
10217   rm -rf conftest*
10218   eval "ac_cv_header_$ac_safe=yes"
10219 else
10220   echo "$ac_err" >&5
10221   echo "configure: failed program was:" >&5
10222   cat conftest.$ac_ext >&5
10223   rm -rf conftest*
10224   eval "ac_cv_header_$ac_safe=no"
10225 fi
10226 rm -f conftest*
10227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10228   echo "$ac_t""yes" 1>&6
10229   :
10230 else
10231   echo "$ac_t""no" 1>&6
10232 with_wnn=no
10233 fi
10234  }
10235     if test "$with_wnn" != "no"; then
10236     for ac_func in crypt
10237 do
10238 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10239 echo "configure:10240: checking for $ac_func" >&5
10240
10241 cat > conftest.$ac_ext <<EOF
10242 #line 10243 "configure"
10243 #include "confdefs.h"
10244 /* System header to define __stub macros and hopefully few prototypes,
10245     which can conflict with char $ac_func(); below.  */
10246 #include <assert.h>
10247 /* Override any gcc2 internal prototype to avoid an error.  */
10248 /* We use char because int might match the return type of a gcc2
10249     builtin and then its argument prototype would still apply.  */
10250 char $ac_func();
10251
10252 int main() {
10253
10254 /* The GNU C library defines this for functions which it implements
10255     to always fail with ENOSYS.  Some functions are actually named
10256     something starting with __ and the normal name is an alias.  */
10257 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10258 choke me
10259 #else
10260 $ac_func();
10261 #endif
10262
10263 ; return 0; }
10264 EOF
10265 if { (eval echo configure:10266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10266   rm -rf conftest*
10267   eval "ac_cv_func_$ac_func=yes"
10268 else
10269   echo "configure: failed program was:" >&5
10270   cat conftest.$ac_ext >&5
10271   rm -rf conftest*
10272   eval "ac_cv_func_$ac_func=no"
10273 fi
10274 rm -f conftest*
10275
10276 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10277   echo "$ac_t""yes" 1>&6
10278     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10279   { test "$extra_verbose" = "yes" && cat << EOF
10280     Defining $ac_tr_func
10281 EOF
10282 cat >> confdefs.h <<EOF
10283 #define $ac_tr_func 1
10284 EOF
10285 }
10286  
10287 else
10288   echo "$ac_t""no" 1>&6
10289 fi
10290 done
10291
10292     test "$ac_cv_func_crypt" != "yes" && { 
10293 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10294 echo "configure:10295: checking for crypt in -lcrypt" >&5
10295 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10296
10297 xe_check_libs=" -lcrypt "
10298 cat > conftest.$ac_ext <<EOF
10299 #line 10300 "configure"
10300 #include "confdefs.h"
10301 /* Override any gcc2 internal prototype to avoid an error.  */
10302 /* We use char because int might match the return type of a gcc2
10303     builtin and then its argument prototype would still apply.  */
10304 char crypt();
10305
10306 int main() {
10307 crypt()
10308 ; return 0; }
10309 EOF
10310 if { (eval echo configure:10311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10311   rm -rf conftest*
10312   eval "ac_cv_lib_$ac_lib_var=yes"
10313 else
10314   echo "configure: failed program was:" >&5
10315   cat conftest.$ac_ext >&5
10316   rm -rf conftest*
10317   eval "ac_cv_lib_$ac_lib_var=no"
10318 fi
10319 rm -f conftest*
10320 xe_check_libs=""
10321
10322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10323   echo "$ac_t""yes" 1>&6
10324     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10325     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10326   { test "$extra_verbose" = "yes" && cat << EOF
10327     Defining $ac_tr_lib
10328 EOF
10329 cat >> confdefs.h <<EOF
10330 #define $ac_tr_lib 1
10331 EOF
10332 }
10333
10334   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10335
10336 else
10337   echo "$ac_t""no" 1>&6
10338 fi
10339
10340  }
10341   fi
10342     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10343     
10344 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10345 echo "configure:10346: checking for jl_dic_list_e in -lwnn" >&5
10346 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10347
10348 xe_check_libs=" -lwnn "
10349 cat > conftest.$ac_ext <<EOF
10350 #line 10351 "configure"
10351 #include "confdefs.h"
10352 /* Override any gcc2 internal prototype to avoid an error.  */
10353 /* We use char because int might match the return type of a gcc2
10354     builtin and then its argument prototype would still apply.  */
10355 char jl_dic_list_e();
10356
10357 int main() {
10358 jl_dic_list_e()
10359 ; return 0; }
10360 EOF
10361 if { (eval echo configure:10362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10362   rm -rf conftest*
10363   eval "ac_cv_lib_$ac_lib_var=yes"
10364 else
10365   echo "configure: failed program was:" >&5
10366   cat conftest.$ac_ext >&5
10367   rm -rf conftest*
10368   eval "ac_cv_lib_$ac_lib_var=no"
10369 fi
10370 rm -f conftest*
10371 xe_check_libs=""
10372
10373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10374   echo "$ac_t""yes" 1>&6
10375   libwnn=wnn
10376 else
10377   echo "$ac_t""no" 1>&6
10378 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10379 echo "configure:10380: checking for jl_dic_list_e in -lwnn4" >&5
10380 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10381
10382 xe_check_libs=" -lwnn4 "
10383 cat > conftest.$ac_ext <<EOF
10384 #line 10385 "configure"
10385 #include "confdefs.h"
10386 /* Override any gcc2 internal prototype to avoid an error.  */
10387 /* We use char because int might match the return type of a gcc2
10388     builtin and then its argument prototype would still apply.  */
10389 char jl_dic_list_e();
10390
10391 int main() {
10392 jl_dic_list_e()
10393 ; return 0; }
10394 EOF
10395 if { (eval echo configure:10396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10396   rm -rf conftest*
10397   eval "ac_cv_lib_$ac_lib_var=yes"
10398 else
10399   echo "configure: failed program was:" >&5
10400   cat conftest.$ac_ext >&5
10401   rm -rf conftest*
10402   eval "ac_cv_lib_$ac_lib_var=no"
10403 fi
10404 rm -f conftest*
10405 xe_check_libs=""
10406
10407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10408   echo "$ac_t""yes" 1>&6
10409   libwnn=wnn4
10410 else
10411   echo "$ac_t""no" 1>&6
10412 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10413 echo "configure:10414: checking for jl_dic_list_e in -lwnn6" >&5
10414 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10415
10416 xe_check_libs=" -lwnn6 "
10417 cat > conftest.$ac_ext <<EOF
10418 #line 10419 "configure"
10419 #include "confdefs.h"
10420 /* Override any gcc2 internal prototype to avoid an error.  */
10421 /* We use char because int might match the return type of a gcc2
10422     builtin and then its argument prototype would still apply.  */
10423 char jl_dic_list_e();
10424
10425 int main() {
10426 jl_dic_list_e()
10427 ; return 0; }
10428 EOF
10429 if { (eval echo configure:10430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10430   rm -rf conftest*
10431   eval "ac_cv_lib_$ac_lib_var=yes"
10432 else
10433   echo "configure: failed program was:" >&5
10434   cat conftest.$ac_ext >&5
10435   rm -rf conftest*
10436   eval "ac_cv_lib_$ac_lib_var=no"
10437 fi
10438 rm -f conftest*
10439 xe_check_libs=""
10440
10441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10442   echo "$ac_t""yes" 1>&6
10443   libwnn=wnn6
10444 else
10445   echo "$ac_t""no" 1>&6
10446 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10447 echo "configure:10448: checking for dic_list_e in -lwnn6_fromsrc" >&5
10448 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10449
10450 xe_check_libs=" -lwnn6_fromsrc "
10451 cat > conftest.$ac_ext <<EOF
10452 #line 10453 "configure"
10453 #include "confdefs.h"
10454 /* Override any gcc2 internal prototype to avoid an error.  */
10455 /* We use char because int might match the return type of a gcc2
10456     builtin and then its argument prototype would still apply.  */
10457 char dic_list_e();
10458
10459 int main() {
10460 dic_list_e()
10461 ; return 0; }
10462 EOF
10463 if { (eval echo configure:10464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10464   rm -rf conftest*
10465   eval "ac_cv_lib_$ac_lib_var=yes"
10466 else
10467   echo "configure: failed program was:" >&5
10468   cat conftest.$ac_ext >&5
10469   rm -rf conftest*
10470   eval "ac_cv_lib_$ac_lib_var=no"
10471 fi
10472 rm -f conftest*
10473 xe_check_libs=""
10474
10475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10476   echo "$ac_t""yes" 1>&6
10477   libwnn=wnn6_fromsrc
10478 else
10479   echo "$ac_t""no" 1>&6
10480 with_wnn=no
10481 fi
10482
10483
10484 fi
10485
10486
10487 fi
10488
10489
10490 fi
10491
10492
10493   fi
10494   test -z "$with_wnn" && with_wnn=yes
10495   if test "$with_wnn" = "yes"; then
10496     { test "$extra_verbose" = "yes" && cat << \EOF
10497     Defining HAVE_WNN
10498 EOF
10499 cat >> confdefs.h <<\EOF
10500 #define HAVE_WNN 1
10501 EOF
10502 }
10503
10504     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10505     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10506    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10507  fi
10508     if test "$with_wnn6" != "no"; then
10509       
10510 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10511 echo "configure:10512: checking for jl_fi_dic_list in -l$libwnn" >&5
10512 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10513
10514 xe_check_libs=" -l$libwnn "
10515 cat > conftest.$ac_ext <<EOF
10516 #line 10517 "configure"
10517 #include "confdefs.h"
10518 /* Override any gcc2 internal prototype to avoid an error.  */
10519 /* We use char because int might match the return type of a gcc2
10520     builtin and then its argument prototype would still apply.  */
10521 char jl_fi_dic_list();
10522
10523 int main() {
10524 jl_fi_dic_list()
10525 ; return 0; }
10526 EOF
10527 if { (eval echo configure:10528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10528   rm -rf conftest*
10529   eval "ac_cv_lib_$ac_lib_var=yes"
10530 else
10531   echo "configure: failed program was:" >&5
10532   cat conftest.$ac_ext >&5
10533   rm -rf conftest*
10534   eval "ac_cv_lib_$ac_lib_var=no"
10535 fi
10536 rm -f conftest*
10537 xe_check_libs=""
10538
10539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10540   echo "$ac_t""yes" 1>&6
10541   with_wnn6=yes
10542 else
10543   echo "$ac_t""no" 1>&6
10544 fi
10545
10546
10547       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10548     Defining WNN6
10549 EOF
10550 cat >> confdefs.h <<\EOF
10551 #define WNN6 1
10552 EOF
10553 }
10554
10555     fi
10556   fi
10557
10558     canna_includes_found=no
10559   if test "$with_canna" != "no"; then
10560     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10561 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10562 echo "configure:10563: checking for canna/jrkanji.h" >&5
10563
10564 cat > conftest.$ac_ext <<EOF
10565 #line 10566 "configure"
10566 #include "confdefs.h"
10567 #include <canna/jrkanji.h>
10568 EOF
10569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10570 { (eval echo configure:10571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10572 if test -z "$ac_err"; then
10573   rm -rf conftest*
10574   eval "ac_cv_header_$ac_safe=yes"
10575 else
10576   echo "$ac_err" >&5
10577   echo "configure: failed program was:" >&5
10578   cat conftest.$ac_ext >&5
10579   rm -rf conftest*
10580   eval "ac_cv_header_$ac_safe=no"
10581 fi
10582 rm -f conftest*
10583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10584   echo "$ac_t""yes" 1>&6
10585   canna_includes_found=yes
10586 else
10587   echo "$ac_t""no" 1>&6
10588 fi
10589
10590   fi
10591   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10592       -d "/usr/local/canna/include"; then
10593     save_c_switch_site="$c_switch_site"
10594     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10595     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10596 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10597 echo "configure:10598: checking for canna/jrkanji.h" >&5
10598
10599 cat > conftest.$ac_ext <<EOF
10600 #line 10601 "configure"
10601 #include "confdefs.h"
10602 #include <canna/jrkanji.h>
10603 EOF
10604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10605 { (eval echo configure:10606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10607 if test -z "$ac_err"; then
10608   rm -rf conftest*
10609   eval "ac_cv_header_$ac_safe=yes"
10610 else
10611   echo "$ac_err" >&5
10612   echo "configure: failed program was:" >&5
10613   cat conftest.$ac_ext >&5
10614   rm -rf conftest*
10615   eval "ac_cv_header_$ac_safe=no"
10616 fi
10617 rm -f conftest*
10618 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10619   echo "$ac_t""yes" 1>&6
10620   canna_includes_found=yes
10621 else
10622   echo "$ac_t""no" 1>&6
10623 fi
10624
10625     if test "$canna_includes_found" != "yes"; then
10626       c_switch_site="$save_c_switch_site"
10627       with_canna="no"
10628     fi
10629   fi
10630
10631   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10632 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10633 echo "configure:10634: checking for canna/RK.h" >&5
10634
10635 cat > conftest.$ac_ext <<EOF
10636 #line 10637 "configure"
10637 #include "confdefs.h"
10638 #include <canna/RK.h>
10639 EOF
10640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10641 { (eval echo configure:10642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10643 if test -z "$ac_err"; then
10644   rm -rf conftest*
10645   eval "ac_cv_header_$ac_safe=yes"
10646 else
10647   echo "$ac_err" >&5
10648   echo "configure: failed program was:" >&5
10649   cat conftest.$ac_ext >&5
10650   rm -rf conftest*
10651   eval "ac_cv_header_$ac_safe=no"
10652 fi
10653 rm -f conftest*
10654 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10655   echo "$ac_t""yes" 1>&6
10656   :
10657 else
10658   echo "$ac_t""no" 1>&6
10659 with_canna=no
10660 fi
10661  }
10662   test -z "$with_canna" && { 
10663 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10664 echo "configure:10665: checking for RkBgnBun in -lRKC" >&5
10665 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10666
10667 xe_check_libs=" -lRKC "
10668 cat > conftest.$ac_ext <<EOF
10669 #line 10670 "configure"
10670 #include "confdefs.h"
10671 /* Override any gcc2 internal prototype to avoid an error.  */
10672 /* We use char because int might match the return type of a gcc2
10673     builtin and then its argument prototype would still apply.  */
10674 char RkBgnBun();
10675
10676 int main() {
10677 RkBgnBun()
10678 ; return 0; }
10679 EOF
10680 if { (eval echo configure:10681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10681   rm -rf conftest*
10682   eval "ac_cv_lib_$ac_lib_var=yes"
10683 else
10684   echo "configure: failed program was:" >&5
10685   cat conftest.$ac_ext >&5
10686   rm -rf conftest*
10687   eval "ac_cv_lib_$ac_lib_var=no"
10688 fi
10689 rm -f conftest*
10690 xe_check_libs=""
10691
10692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10693   echo "$ac_t""yes" 1>&6
10694   :
10695 else
10696   echo "$ac_t""no" 1>&6
10697 with_canna=no
10698 fi
10699
10700  }
10701   test -z "$with_canna" && { 
10702 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10703 echo "configure:10704: checking for jrKanjiControl in -lcanna" >&5
10704 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10705
10706 xe_check_libs=" -lcanna "
10707 cat > conftest.$ac_ext <<EOF
10708 #line 10709 "configure"
10709 #include "confdefs.h"
10710 /* Override any gcc2 internal prototype to avoid an error.  */
10711 /* We use char because int might match the return type of a gcc2
10712     builtin and then its argument prototype would still apply.  */
10713 char jrKanjiControl();
10714
10715 int main() {
10716 jrKanjiControl()
10717 ; return 0; }
10718 EOF
10719 if { (eval echo configure:10720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10720   rm -rf conftest*
10721   eval "ac_cv_lib_$ac_lib_var=yes"
10722 else
10723   echo "configure: failed program was:" >&5
10724   cat conftest.$ac_ext >&5
10725   rm -rf conftest*
10726   eval "ac_cv_lib_$ac_lib_var=no"
10727 fi
10728 rm -f conftest*
10729 xe_check_libs=""
10730
10731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10732   echo "$ac_t""yes" 1>&6
10733   :
10734 else
10735   echo "$ac_t""no" 1>&6
10736 with_canna=no
10737 fi
10738
10739  }
10740   test -z "$with_canna" && with_canna=yes
10741   if test "$with_canna" = "yes"; then
10742     { test "$extra_verbose" = "yes" && cat << \EOF
10743     Defining HAVE_CANNA
10744 EOF
10745 cat >> confdefs.h <<\EOF
10746 #define HAVE_CANNA 1
10747 EOF
10748 }
10749
10750     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10751     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10752    echo "    xemacs will be linked with \"mule-canna.o\""
10753  fi
10754   fi
10755
10756 else   for feature in xim canna wnn; do
10757     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10758       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10759     fi
10760     eval "with_${feature}=no"
10761   done
10762 fi 
10763
10764 if test "$need_motif" = "yes" ; then
10765   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10766     
10767 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10768 echo "configure:10769: checking for layout_object_getvalue in -li18n" >&5
10769 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10770
10771 xe_check_libs=" -li18n "
10772 cat > conftest.$ac_ext <<EOF
10773 #line 10774 "configure"
10774 #include "confdefs.h"
10775 /* Override any gcc2 internal prototype to avoid an error.  */
10776 /* We use char because int might match the return type of a gcc2
10777     builtin and then its argument prototype would still apply.  */
10778 char layout_object_getvalue();
10779
10780 int main() {
10781 layout_object_getvalue()
10782 ; return 0; }
10783 EOF
10784 if { (eval echo configure:10785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10785   rm -rf conftest*
10786   eval "ac_cv_lib_$ac_lib_var=yes"
10787 else
10788   echo "configure: failed program was:" >&5
10789   cat conftest.$ac_ext >&5
10790   rm -rf conftest*
10791   eval "ac_cv_lib_$ac_lib_var=no"
10792 fi
10793 rm -f conftest*
10794 xe_check_libs=""
10795
10796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10797   echo "$ac_t""yes" 1>&6
10798   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10799 else
10800   echo "$ac_t""no" 1>&6
10801 fi
10802
10803
10804   
10805 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10806     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10807   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10808   
10809         runpath="" runpath_dirs=""
10810   if test -n "$LD_RUN_PATH"; then
10811     runpath="$LD_RUN_PATH"
10812   elif test "$GCC" = "yes"; then
10813         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10814     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10815     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10816     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10817       case "$arg" in P,* | -L* | -R* )
10818         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10819           {
10820 xe_runpath_dir="$dir"
10821   test "$xe_runpath_dir" != "/lib"     -a \
10822         "$xe_runpath_dir" != "/usr/lib" -a \
10823         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10824   eval "$xe_add_unique_runpath_dir"
10825 }
10826         done ;;
10827       esac
10828     done
10829     ld_switch_run="$ld_switch_run_save"
10830     rm -f conftest*
10831   else
10832         for arg in $ld_switch_site $ld_switch_x_site; do
10833       case "$arg" in -L*) {
10834 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10835   test "$xe_runpath_dir" != "/lib"     -a \
10836         "$xe_runpath_dir" != "/usr/lib" -a \
10837         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10838   eval "$xe_add_unique_runpath_dir"
10839 };; esac
10840     done
10841         if test "$opsys $need_motif" = "sol2 yes"; then
10842       xe_runpath_dir="/opt/SUNWdt/lib";
10843       eval "$xe_add_unique_runpath_dir";
10844     fi
10845   fi 
10846   if test -n "$runpath"; then
10847     ld_switch_run="${dash_r}${runpath}"
10848     
10849 if test "$GCC" = "yes"; then
10850   set x $ld_switch_run; shift; ld_switch_run=""
10851   while test -n "$1"; do
10852     case $1 in
10853       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10854       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10855       -Xlinker* ) ;;
10856       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10857     esac
10858     shift
10859   done
10860 fi
10861     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10862   fi
10863 fi
10864
10865 fi
10866
10867 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
10868 do
10869 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10870 echo "configure:10871: checking for $ac_func" >&5
10871
10872 cat > conftest.$ac_ext <<EOF
10873 #line 10874 "configure"
10874 #include "confdefs.h"
10875 /* System header to define __stub macros and hopefully few prototypes,
10876     which can conflict with char $ac_func(); below.  */
10877 #include <assert.h>
10878 /* Override any gcc2 internal prototype to avoid an error.  */
10879 /* We use char because int might match the return type of a gcc2
10880     builtin and then its argument prototype would still apply.  */
10881 char $ac_func();
10882
10883 int main() {
10884
10885 /* The GNU C library defines this for functions which it implements
10886     to always fail with ENOSYS.  Some functions are actually named
10887     something starting with __ and the normal name is an alias.  */
10888 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10889 choke me
10890 #else
10891 $ac_func();
10892 #endif
10893
10894 ; return 0; }
10895 EOF
10896 if { (eval echo configure:10897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10897   rm -rf conftest*
10898   eval "ac_cv_func_$ac_func=yes"
10899 else
10900   echo "configure: failed program was:" >&5
10901   cat conftest.$ac_ext >&5
10902   rm -rf conftest*
10903   eval "ac_cv_func_$ac_func=no"
10904 fi
10905 rm -f conftest*
10906
10907 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10908   echo "$ac_t""yes" 1>&6
10909     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10910   { test "$extra_verbose" = "yes" && cat << EOF
10911     Defining $ac_tr_func
10912 EOF
10913 cat >> confdefs.h <<EOF
10914 #define $ac_tr_func 1
10915 EOF
10916 }
10917  
10918 else
10919   echo "$ac_t""no" 1>&6
10920 fi
10921 done
10922
10923
10924
10925 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10926 do
10927 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10928 echo "configure:10929: checking for $ac_func" >&5
10929
10930 cat > conftest.$ac_ext <<EOF
10931 #line 10932 "configure"
10932 #include "confdefs.h"
10933 /* System header to define __stub macros and hopefully few prototypes,
10934     which can conflict with char $ac_func(); below.  */
10935 #include <assert.h>
10936 /* Override any gcc2 internal prototype to avoid an error.  */
10937 /* We use char because int might match the return type of a gcc2
10938     builtin and then its argument prototype would still apply.  */
10939 char $ac_func();
10940
10941 int main() {
10942
10943 /* The GNU C library defines this for functions which it implements
10944     to always fail with ENOSYS.  Some functions are actually named
10945     something starting with __ and the normal name is an alias.  */
10946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10947 choke me
10948 #else
10949 $ac_func();
10950 #endif
10951
10952 ; return 0; }
10953 EOF
10954 if { (eval echo configure:10955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10955   rm -rf conftest*
10956   eval "ac_cv_func_$ac_func=yes"
10957 else
10958   echo "configure: failed program was:" >&5
10959   cat conftest.$ac_ext >&5
10960   rm -rf conftest*
10961   eval "ac_cv_func_$ac_func=no"
10962 fi
10963 rm -f conftest*
10964
10965 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10966   echo "$ac_t""yes" 1>&6
10967     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10968   { test "$extra_verbose" = "yes" && cat << EOF
10969     Defining $ac_tr_func
10970 EOF
10971 cat >> confdefs.h <<EOF
10972 #define $ac_tr_func 1
10973 EOF
10974 }
10975  
10976 else
10977   echo "$ac_t""no" 1>&6
10978 fi
10979 done
10980
10981
10982 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10983 echo "configure:10984: checking for openpty" >&5
10984
10985 cat > conftest.$ac_ext <<EOF
10986 #line 10987 "configure"
10987 #include "confdefs.h"
10988 /* System header to define __stub macros and hopefully few prototypes,
10989     which can conflict with char openpty(); below.  */
10990 #include <assert.h>
10991 /* Override any gcc2 internal prototype to avoid an error.  */
10992 /* We use char because int might match the return type of a gcc2
10993     builtin and then its argument prototype would still apply.  */
10994 char openpty();
10995
10996 int main() {
10997
10998 /* The GNU C library defines this for functions which it implements
10999     to always fail with ENOSYS.  Some functions are actually named
11000     something starting with __ and the normal name is an alias.  */
11001 #if defined (__stub_openpty) || defined (__stub___openpty)
11002 choke me
11003 #else
11004 openpty();
11005 #endif
11006
11007 ; return 0; }
11008 EOF
11009 if { (eval echo configure:11010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11010   rm -rf conftest*
11011   eval "ac_cv_func_openpty=yes"
11012 else
11013   echo "configure: failed program was:" >&5
11014   cat conftest.$ac_ext >&5
11015   rm -rf conftest*
11016   eval "ac_cv_func_openpty=no"
11017 fi
11018 rm -f conftest*
11019
11020 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11021   echo "$ac_t""yes" 1>&6
11022   have_openpty=yes
11023 else
11024   echo "$ac_t""no" 1>&6
11025
11026   
11027 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11028 echo "configure:11029: checking for openpty in -lutil" >&5
11029 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11030
11031 xe_check_libs=" -lutil "
11032 cat > conftest.$ac_ext <<EOF
11033 #line 11034 "configure"
11034 #include "confdefs.h"
11035 /* Override any gcc2 internal prototype to avoid an error.  */
11036 /* We use char because int might match the return type of a gcc2
11037     builtin and then its argument prototype would still apply.  */
11038 char openpty();
11039
11040 int main() {
11041 openpty()
11042 ; return 0; }
11043 EOF
11044 if { (eval echo configure:11045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11045   rm -rf conftest*
11046   eval "ac_cv_lib_$ac_lib_var=yes"
11047 else
11048   echo "configure: failed program was:" >&5
11049   cat conftest.$ac_ext >&5
11050   rm -rf conftest*
11051   eval "ac_cv_lib_$ac_lib_var=no"
11052 fi
11053 rm -f conftest*
11054 xe_check_libs=""
11055
11056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11057   echo "$ac_t""yes" 1>&6
11058   have_openpty=yes need_libutil=yes
11059 else
11060   echo "$ac_t""no" 1>&6
11061 fi
11062
11063
11064 fi
11065
11066 if test "$have_openpty" = "yes"; then
11067   { test "$extra_verbose" = "yes" && cat << \EOF
11068     Defining HAVE_OPENPTY
11069 EOF
11070 cat >> confdefs.h <<\EOF
11071 #define HAVE_OPENPTY 1
11072 EOF
11073 }
11074
11075   for ac_hdr in pty.h libutil.h util.h
11076 do
11077 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11078 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11079 echo "configure:11080: checking for $ac_hdr" >&5
11080
11081 cat > conftest.$ac_ext <<EOF
11082 #line 11083 "configure"
11083 #include "confdefs.h"
11084 #include <$ac_hdr>
11085 EOF
11086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11087 { (eval echo configure:11088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11089 if test -z "$ac_err"; then
11090   rm -rf conftest*
11091   eval "ac_cv_header_$ac_safe=yes"
11092 else
11093   echo "$ac_err" >&5
11094   echo "configure: failed program was:" >&5
11095   cat conftest.$ac_ext >&5
11096   rm -rf conftest*
11097   eval "ac_cv_header_$ac_safe=no"
11098 fi
11099 rm -f conftest*
11100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11101   echo "$ac_t""yes" 1>&6
11102     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11103   { test "$extra_verbose" = "yes" && cat << EOF
11104     Defining $ac_tr_hdr
11105 EOF
11106 cat >> confdefs.h <<EOF
11107 #define $ac_tr_hdr 1
11108 EOF
11109 }
11110  break
11111 else
11112   echo "$ac_t""no" 1>&6
11113 fi
11114 done
11115
11116   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11117 fi
11118
11119 for ac_hdr in stropts.h
11120 do
11121 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11122 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11123 echo "configure:11124: checking for $ac_hdr" >&5
11124
11125 cat > conftest.$ac_ext <<EOF
11126 #line 11127 "configure"
11127 #include "confdefs.h"
11128 #include <$ac_hdr>
11129 EOF
11130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11131 { (eval echo configure:11132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11133 if test -z "$ac_err"; then
11134   rm -rf conftest*
11135   eval "ac_cv_header_$ac_safe=yes"
11136 else
11137   echo "$ac_err" >&5
11138   echo "configure: failed program was:" >&5
11139   cat conftest.$ac_ext >&5
11140   rm -rf conftest*
11141   eval "ac_cv_header_$ac_safe=no"
11142 fi
11143 rm -f conftest*
11144 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11145   echo "$ac_t""yes" 1>&6
11146     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11147   { test "$extra_verbose" = "yes" && cat << EOF
11148     Defining $ac_tr_hdr
11149 EOF
11150 cat >> confdefs.h <<EOF
11151 #define $ac_tr_hdr 1
11152 EOF
11153 }
11154  
11155 else
11156   echo "$ac_t""no" 1>&6
11157 fi
11158 done
11159
11160 if test "$ac_cv_header_stropts_h" = "yes"; then
11161   for ac_func in isastream
11162 do
11163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11164 echo "configure:11165: checking for $ac_func" >&5
11165
11166 cat > conftest.$ac_ext <<EOF
11167 #line 11168 "configure"
11168 #include "confdefs.h"
11169 /* System header to define __stub macros and hopefully few prototypes,
11170     which can conflict with char $ac_func(); below.  */
11171 #include <assert.h>
11172 /* Override any gcc2 internal prototype to avoid an error.  */
11173 /* We use char because int might match the return type of a gcc2
11174     builtin and then its argument prototype would still apply.  */
11175 char $ac_func();
11176
11177 int main() {
11178
11179 /* The GNU C library defines this for functions which it implements
11180     to always fail with ENOSYS.  Some functions are actually named
11181     something starting with __ and the normal name is an alias.  */
11182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11183 choke me
11184 #else
11185 $ac_func();
11186 #endif
11187
11188 ; return 0; }
11189 EOF
11190 if { (eval echo configure:11191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11191   rm -rf conftest*
11192   eval "ac_cv_func_$ac_func=yes"
11193 else
11194   echo "configure: failed program was:" >&5
11195   cat conftest.$ac_ext >&5
11196   rm -rf conftest*
11197   eval "ac_cv_func_$ac_func=no"
11198 fi
11199 rm -f conftest*
11200
11201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11202   echo "$ac_t""yes" 1>&6
11203     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11204   { test "$extra_verbose" = "yes" && cat << EOF
11205     Defining $ac_tr_func
11206 EOF
11207 cat >> confdefs.h <<EOF
11208 #define $ac_tr_func 1
11209 EOF
11210 }
11211  
11212 else
11213   echo "$ac_t""no" 1>&6
11214 fi
11215 done
11216
11217   for ac_hdr in strtio.h
11218 do
11219 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11220 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11221 echo "configure:11222: checking for $ac_hdr" >&5
11222
11223 cat > conftest.$ac_ext <<EOF
11224 #line 11225 "configure"
11225 #include "confdefs.h"
11226 #include <$ac_hdr>
11227 EOF
11228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11229 { (eval echo configure:11230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11231 if test -z "$ac_err"; then
11232   rm -rf conftest*
11233   eval "ac_cv_header_$ac_safe=yes"
11234 else
11235   echo "$ac_err" >&5
11236   echo "configure: failed program was:" >&5
11237   cat conftest.$ac_ext >&5
11238   rm -rf conftest*
11239   eval "ac_cv_header_$ac_safe=no"
11240 fi
11241 rm -f conftest*
11242 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11243   echo "$ac_t""yes" 1>&6
11244     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11245   { test "$extra_verbose" = "yes" && cat << EOF
11246     Defining $ac_tr_hdr
11247 EOF
11248 cat >> confdefs.h <<EOF
11249 #define $ac_tr_hdr 1
11250 EOF
11251 }
11252  
11253 else
11254   echo "$ac_t""no" 1>&6
11255 fi
11256 done
11257  fi
11258
11259 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11260    echo "    xemacs will be linked with \"realpath.o\""
11261  fi
11262
11263 for ac_func in getloadavg
11264 do
11265 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11266 echo "configure:11267: checking for $ac_func" >&5
11267
11268 cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11271 /* System header to define __stub macros and hopefully few prototypes,
11272     which can conflict with char $ac_func(); below.  */
11273 #include <assert.h>
11274 /* Override any gcc2 internal prototype to avoid an error.  */
11275 /* We use char because int might match the return type of a gcc2
11276     builtin and then its argument prototype would still apply.  */
11277 char $ac_func();
11278
11279 int main() {
11280
11281 /* The GNU C library defines this for functions which it implements
11282     to always fail with ENOSYS.  Some functions are actually named
11283     something starting with __ and the normal name is an alias.  */
11284 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11285 choke me
11286 #else
11287 $ac_func();
11288 #endif
11289
11290 ; return 0; }
11291 EOF
11292 if { (eval echo configure:11293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11293   rm -rf conftest*
11294   eval "ac_cv_func_$ac_func=yes"
11295 else
11296   echo "configure: failed program was:" >&5
11297   cat conftest.$ac_ext >&5
11298   rm -rf conftest*
11299   eval "ac_cv_func_$ac_func=no"
11300 fi
11301 rm -f conftest*
11302
11303 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11304   echo "$ac_t""yes" 1>&6
11305     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11306   { test "$extra_verbose" = "yes" && cat << EOF
11307     Defining $ac_tr_func
11308 EOF
11309 cat >> confdefs.h <<EOF
11310 #define $ac_tr_func 1
11311 EOF
11312 }
11313  
11314 else
11315   echo "$ac_t""no" 1>&6
11316 fi
11317 done
11318
11319
11320 if test "$ac_cv_func_getloadavg" = "yes"; then
11321         for ac_hdr in sys/loadavg.h
11322 do
11323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11325 echo "configure:11326: checking for $ac_hdr" >&5
11326
11327 cat > conftest.$ac_ext <<EOF
11328 #line 11329 "configure"
11329 #include "confdefs.h"
11330 #include <$ac_hdr>
11331 EOF
11332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11333 { (eval echo configure:11334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11335 if test -z "$ac_err"; then
11336   rm -rf conftest*
11337   eval "ac_cv_header_$ac_safe=yes"
11338 else
11339   echo "$ac_err" >&5
11340   echo "configure: failed program was:" >&5
11341   cat conftest.$ac_ext >&5
11342   rm -rf conftest*
11343   eval "ac_cv_header_$ac_safe=no"
11344 fi
11345 rm -f conftest*
11346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11347   echo "$ac_t""yes" 1>&6
11348     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11349   { test "$extra_verbose" = "yes" && cat << EOF
11350     Defining $ac_tr_hdr
11351 EOF
11352 cat >> confdefs.h <<EOF
11353 #define $ac_tr_hdr 1
11354 EOF
11355 }
11356  
11357 else
11358   echo "$ac_t""no" 1>&6
11359 fi
11360 done
11361
11362 else
11363     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11364    echo "    xemacs will be linked with \"getloadavg.o\""
11365  fi
11366
11367     
11368 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11369 echo "configure:11370: checking for kstat_open in -lkstat" >&5
11370 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11371
11372 xe_check_libs=" -lkstat "
11373 cat > conftest.$ac_ext <<EOF
11374 #line 11375 "configure"
11375 #include "confdefs.h"
11376 /* Override any gcc2 internal prototype to avoid an error.  */
11377 /* We use char because int might match the return type of a gcc2
11378     builtin and then its argument prototype would still apply.  */
11379 char kstat_open();
11380
11381 int main() {
11382 kstat_open()
11383 ; return 0; }
11384 EOF
11385 if { (eval echo configure:11386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11386   rm -rf conftest*
11387   eval "ac_cv_lib_$ac_lib_var=yes"
11388 else
11389   echo "configure: failed program was:" >&5
11390   cat conftest.$ac_ext >&5
11391   rm -rf conftest*
11392   eval "ac_cv_lib_$ac_lib_var=no"
11393 fi
11394 rm -f conftest*
11395 xe_check_libs=""
11396
11397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11398   echo "$ac_t""yes" 1>&6
11399     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11400     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11401   { test "$extra_verbose" = "yes" && cat << EOF
11402     Defining $ac_tr_lib
11403 EOF
11404 cat >> confdefs.h <<EOF
11405 #define $ac_tr_lib 1
11406 EOF
11407 }
11408
11409   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11410
11411 else
11412   echo "$ac_t""no" 1>&6
11413 fi
11414
11415
11416   for ac_hdr in kstat.h
11417 do
11418 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11419 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11420 echo "configure:11421: checking for $ac_hdr" >&5
11421
11422 cat > conftest.$ac_ext <<EOF
11423 #line 11424 "configure"
11424 #include "confdefs.h"
11425 #include <$ac_hdr>
11426 EOF
11427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11428 { (eval echo configure:11429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11430 if test -z "$ac_err"; then
11431   rm -rf conftest*
11432   eval "ac_cv_header_$ac_safe=yes"
11433 else
11434   echo "$ac_err" >&5
11435   echo "configure: failed program was:" >&5
11436   cat conftest.$ac_ext >&5
11437   rm -rf conftest*
11438   eval "ac_cv_header_$ac_safe=no"
11439 fi
11440 rm -f conftest*
11441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11442   echo "$ac_t""yes" 1>&6
11443     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11444   { test "$extra_verbose" = "yes" && cat << EOF
11445     Defining $ac_tr_hdr
11446 EOF
11447 cat >> confdefs.h <<EOF
11448 #define $ac_tr_hdr 1
11449 EOF
11450 }
11451  
11452 else
11453   echo "$ac_t""no" 1>&6
11454 fi
11455 done
11456
11457
11458     
11459 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11460 echo "configure:11461: checking for kvm_read in -lkvm" >&5
11461 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11462
11463 xe_check_libs=" -lkvm "
11464 cat > conftest.$ac_ext <<EOF
11465 #line 11466 "configure"
11466 #include "confdefs.h"
11467 /* Override any gcc2 internal prototype to avoid an error.  */
11468 /* We use char because int might match the return type of a gcc2
11469     builtin and then its argument prototype would still apply.  */
11470 char kvm_read();
11471
11472 int main() {
11473 kvm_read()
11474 ; return 0; }
11475 EOF
11476 if { (eval echo configure:11477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11477   rm -rf conftest*
11478   eval "ac_cv_lib_$ac_lib_var=yes"
11479 else
11480   echo "configure: failed program was:" >&5
11481   cat conftest.$ac_ext >&5
11482   rm -rf conftest*
11483   eval "ac_cv_lib_$ac_lib_var=no"
11484 fi
11485 rm -f conftest*
11486 xe_check_libs=""
11487
11488 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11489   echo "$ac_t""yes" 1>&6
11490     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11491     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11492   { test "$extra_verbose" = "yes" && cat << EOF
11493     Defining $ac_tr_lib
11494 EOF
11495 cat >> confdefs.h <<EOF
11496 #define $ac_tr_lib 1
11497 EOF
11498 }
11499
11500   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11501
11502 else
11503   echo "$ac_t""no" 1>&6
11504 fi
11505
11506
11507 fi
11508
11509 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11510 echo "configure:11511: checking whether netdb declares h_errno" >&5
11511 cat > conftest.$ac_ext <<EOF
11512 #line 11513 "configure"
11513 #include "confdefs.h"
11514 #include <netdb.h>
11515 int main() {
11516 return h_errno;
11517 ; return 0; }
11518 EOF
11519 if { (eval echo configure:11520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11520   rm -rf conftest*
11521   echo "$ac_t""yes" 1>&6
11522    { test "$extra_verbose" = "yes" && cat << \EOF
11523     Defining HAVE_H_ERRNO
11524 EOF
11525 cat >> confdefs.h <<\EOF
11526 #define HAVE_H_ERRNO 1
11527 EOF
11528 }
11529
11530 else
11531   echo "configure: failed program was:" >&5
11532   cat conftest.$ac_ext >&5
11533   rm -rf conftest*
11534   echo "$ac_t""no" 1>&6
11535 fi
11536 rm -f conftest*
11537
11538 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11539 echo "configure:11540: checking for sigsetjmp" >&5
11540 cat > conftest.$ac_ext <<EOF
11541 #line 11542 "configure"
11542 #include "confdefs.h"
11543 #include <setjmp.h>
11544 int main() {
11545 sigjmp_buf bar; sigsetjmp (bar, 0);
11546 ; return 0; }
11547 EOF
11548 if { (eval echo configure:11549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11549   rm -rf conftest*
11550   echo "$ac_t""yes" 1>&6
11551    { test "$extra_verbose" = "yes" && cat << \EOF
11552     Defining HAVE_SIGSETJMP
11553 EOF
11554 cat >> confdefs.h <<\EOF
11555 #define HAVE_SIGSETJMP 1
11556 EOF
11557 }
11558
11559 else
11560   echo "configure: failed program was:" >&5
11561   cat conftest.$ac_ext >&5
11562   rm -rf conftest*
11563   echo "$ac_t""no" 1>&6
11564 fi
11565 rm -f conftest*
11566
11567 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11568 echo "configure:11569: checking whether localtime caches TZ" >&5
11569
11570 if test "$ac_cv_func_tzset" = "yes"; then
11571 cat > conftest.$ac_ext <<EOF
11572 #line 11573 "configure"
11573 #include "confdefs.h"
11574 #include <time.h>
11575 #if STDC_HEADERS
11576 # include <stdlib.h>
11577 #endif
11578 extern char **environ;
11579 unset_TZ ()
11580 {
11581   char **from, **to;
11582   for (to = from = environ; (*to = *from); from++)
11583     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11584       to++;
11585 }
11586 char TZ_GMT0[] = "TZ=GMT0";
11587 char TZ_PST8[] = "TZ=PST8";
11588 main()
11589 {
11590   time_t now = time ((time_t *) 0);
11591   int hour_GMT0, hour_unset;
11592   if (putenv (TZ_GMT0) != 0)
11593     exit (1);
11594   hour_GMT0 = localtime (&now)->tm_hour;
11595   unset_TZ ();
11596   hour_unset = localtime (&now)->tm_hour;
11597   if (putenv (TZ_PST8) != 0)
11598     exit (1);
11599   if (localtime (&now)->tm_hour == hour_GMT0)
11600     exit (1);
11601   unset_TZ ();
11602   if (localtime (&now)->tm_hour != hour_unset)
11603     exit (1);
11604   exit (0);
11605 }
11606 EOF
11607 if { (eval echo configure:11608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11608 then
11609   emacs_cv_localtime_cache=no
11610 else
11611   conftest_rc="$?"
11612   echo "configure: failed program was:" >&5
11613   cat conftest.$ac_ext >&5
11614   rm -fr conftest*
11615   emacs_cv_localtime_cache=yes
11616 fi
11617 rm -fr conftest*
11618 else
11619         # If we lack tzset, report that localtime does not cache TZ,
11620         # since we can't invalidate the cache if we don't have tzset.
11621         emacs_cv_localtime_cache=no
11622 fi
11623 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11624 if test $emacs_cv_localtime_cache = yes; then
11625   { test "$extra_verbose" = "yes" && cat << \EOF
11626     Defining LOCALTIME_CACHE
11627 EOF
11628 cat >> confdefs.h <<\EOF
11629 #define LOCALTIME_CACHE 1
11630 EOF
11631 }
11632
11633 fi
11634
11635 if test "$HAVE_TIMEVAL" = "yes"; then
11636 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11637 echo "configure:11638: checking whether gettimeofday accepts one or two arguments" >&5
11638 cat > conftest.$ac_ext <<EOF
11639 #line 11640 "configure"
11640 #include "confdefs.h"
11641
11642 #ifdef TIME_WITH_SYS_TIME
11643 #include <sys/time.h>
11644 #include <time.h>
11645 #else
11646 #ifdef HAVE_SYS_TIME_H
11647 #include <sys/time.h>
11648 #else
11649 #include <time.h>
11650 #endif
11651 #endif
11652   
11653 int main() {
11654
11655   struct timeval time;
11656   gettimeofday (&time, 0);
11657
11658 ; return 0; }
11659 EOF
11660 if { (eval echo configure:11661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11661   rm -rf conftest*
11662   echo "$ac_t""two" 1>&6
11663 else
11664   echo "configure: failed program was:" >&5
11665   cat conftest.$ac_ext >&5
11666   rm -rf conftest*
11667   echo "$ac_t""one" 1>&6
11668    { test "$extra_verbose" = "yes" && cat << \EOF
11669     Defining GETTIMEOFDAY_ONE_ARGUMENT
11670 EOF
11671 cat >> confdefs.h <<\EOF
11672 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11673 EOF
11674 }
11675
11676 fi
11677 rm -f conftest*
11678 fi
11679
11680
11681 echo $ac_n "checking for inline""... $ac_c" 1>&6
11682 echo "configure:11683: checking for inline" >&5
11683
11684 ac_cv_c_inline=no
11685 for ac_kw in inline __inline__ __inline; do
11686   cat > conftest.$ac_ext <<EOF
11687 #line 11688 "configure"
11688 #include "confdefs.h"
11689
11690 int main() {
11691 } $ac_kw foo() {
11692 ; return 0; }
11693 EOF
11694 if { (eval echo configure:11695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11695   rm -rf conftest*
11696   ac_cv_c_inline=$ac_kw; break
11697 else
11698   echo "configure: failed program was:" >&5
11699   cat conftest.$ac_ext >&5
11700 fi
11701 rm -f conftest*
11702 done
11703
11704
11705 echo "$ac_t""$ac_cv_c_inline" 1>&6
11706 case "$ac_cv_c_inline" in
11707   inline | yes) ;;
11708   no) { test "$extra_verbose" = "yes" && cat << \EOF
11709     Defining inline = 
11710 EOF
11711 cat >> confdefs.h <<\EOF
11712 #define inline 
11713 EOF
11714 }
11715  ;;
11716   *)  { test "$extra_verbose" = "yes" && cat << EOF
11717     Defining inline = $ac_cv_c_inline
11718 EOF
11719 cat >> confdefs.h <<EOF
11720 #define inline $ac_cv_c_inline
11721 EOF
11722 }
11723  ;;
11724 esac
11725
11726 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11727    echo "    xemacs will be linked with \"inline.o\""
11728  fi
11729
11730
11731 if test "$__DECC" != "yes"; then
11732   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11733 # for constant arguments.  Useless!
11734 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11735 echo "configure:11736: checking for working alloca.h" >&5
11736
11737 cat > conftest.$ac_ext <<EOF
11738 #line 11739 "configure"
11739 #include "confdefs.h"
11740 #include <alloca.h>
11741 int main() {
11742 char *p = alloca(2 * sizeof(int));
11743 ; return 0; }
11744 EOF
11745 if { (eval echo configure:11746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11746   rm -rf conftest*
11747   ac_cv_header_alloca_h=yes
11748 else
11749   echo "configure: failed program was:" >&5
11750   cat conftest.$ac_ext >&5
11751   rm -rf conftest*
11752   ac_cv_header_alloca_h=no
11753 fi
11754 rm -f conftest*
11755
11756 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11757 if test $ac_cv_header_alloca_h = yes; then
11758   { test "$extra_verbose" = "yes" && cat << \EOF
11759     Defining HAVE_ALLOCA_H
11760 EOF
11761 cat >> confdefs.h <<\EOF
11762 #define HAVE_ALLOCA_H 1
11763 EOF
11764 }
11765
11766 fi
11767
11768 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11769 echo "configure:11770: checking for alloca" >&5
11770
11771 cat > conftest.$ac_ext <<EOF
11772 #line 11773 "configure"
11773 #include "confdefs.h"
11774
11775 #ifdef __GNUC__
11776 # define alloca __builtin_alloca
11777 #else
11778 # ifdef _MSC_VER
11779 #  include <malloc.h>
11780 #  define alloca _alloca
11781 # else
11782 #  if HAVE_ALLOCA_H
11783 #   include <alloca.h>
11784 #  else
11785 #   ifdef _AIX
11786  #pragma alloca
11787 #   else
11788 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11789 char *alloca ();
11790 #    endif
11791 #   endif
11792 #  endif
11793 # endif
11794 #endif
11795
11796 int main() {
11797 char *p = (char *) alloca(1);
11798 ; return 0; }
11799 EOF
11800 if { (eval echo configure:11801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11801   rm -rf conftest*
11802   ac_cv_func_alloca_works=yes
11803 else
11804   echo "configure: failed program was:" >&5
11805   cat conftest.$ac_ext >&5
11806   rm -rf conftest*
11807   ac_cv_func_alloca_works=no
11808 fi
11809 rm -f conftest*
11810
11811 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11812 if test $ac_cv_func_alloca_works = yes; then
11813   { test "$extra_verbose" = "yes" && cat << \EOF
11814     Defining HAVE_ALLOCA
11815 EOF
11816 cat >> confdefs.h <<\EOF
11817 #define HAVE_ALLOCA 1
11818 EOF
11819 }
11820
11821 fi
11822
11823 if test $ac_cv_func_alloca_works = no; then
11824   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11825   # that cause trouble.  Some versions do not even contain alloca or
11826   # contain a buggy version.  If you still want to use their alloca,
11827   # use ar to extract alloca.o from them instead of compiling alloca.c.
11828   ALLOCA=alloca.${ac_objext}
11829   { test "$extra_verbose" = "yes" && cat << \EOF
11830     Defining C_ALLOCA
11831 EOF
11832 cat >> confdefs.h <<\EOF
11833 #define C_ALLOCA 1
11834 EOF
11835 }
11836
11837
11838 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11839 echo "configure:11840: checking whether alloca needs Cray hooks" >&5
11840
11841 cat > conftest.$ac_ext <<EOF
11842 #line 11843 "configure"
11843 #include "confdefs.h"
11844 #if defined(CRAY) && ! defined(CRAY2)
11845 webecray
11846 #else
11847 wenotbecray
11848 #endif
11849
11850 EOF
11851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11852   egrep "webecray" >/dev/null 2>&1; then
11853   rm -rf conftest*
11854   ac_cv_os_cray=yes
11855 else
11856   rm -rf conftest*
11857   ac_cv_os_cray=no
11858 fi
11859 rm -f conftest*
11860
11861
11862 echo "$ac_t""$ac_cv_os_cray" 1>&6
11863 if test $ac_cv_os_cray = yes; then
11864 for ac_func in _getb67 GETB67 getb67; do
11865   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11866 echo "configure:11867: checking for $ac_func" >&5
11867
11868 cat > conftest.$ac_ext <<EOF
11869 #line 11870 "configure"
11870 #include "confdefs.h"
11871 /* System header to define __stub macros and hopefully few prototypes,
11872     which can conflict with char $ac_func(); below.  */
11873 #include <assert.h>
11874 /* Override any gcc2 internal prototype to avoid an error.  */
11875 /* We use char because int might match the return type of a gcc2
11876     builtin and then its argument prototype would still apply.  */
11877 char $ac_func();
11878
11879 int main() {
11880
11881 /* The GNU C library defines this for functions which it implements
11882     to always fail with ENOSYS.  Some functions are actually named
11883     something starting with __ and the normal name is an alias.  */
11884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11885 choke me
11886 #else
11887 $ac_func();
11888 #endif
11889
11890 ; return 0; }
11891 EOF
11892 if { (eval echo configure:11893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11893   rm -rf conftest*
11894   eval "ac_cv_func_$ac_func=yes"
11895 else
11896   echo "configure: failed program was:" >&5
11897   cat conftest.$ac_ext >&5
11898   rm -rf conftest*
11899   eval "ac_cv_func_$ac_func=no"
11900 fi
11901 rm -f conftest*
11902
11903 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11904   echo "$ac_t""yes" 1>&6
11905   { test "$extra_verbose" = "yes" && cat << EOF
11906     Defining CRAY_STACKSEG_END = $ac_func
11907 EOF
11908 cat >> confdefs.h <<EOF
11909 #define CRAY_STACKSEG_END $ac_func
11910 EOF
11911 }
11912
11913   break
11914 else
11915   echo "$ac_t""no" 1>&6
11916 fi
11917
11918 done
11919 fi
11920
11921 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11922 echo "configure:11923: checking stack direction for C alloca" >&5
11923
11924 cat > conftest.$ac_ext <<EOF
11925 #line 11926 "configure"
11926 #include "confdefs.h"
11927 find_stack_direction ()
11928 {
11929   static char *addr = 0;
11930   auto char dummy;
11931   if (addr == 0)
11932     {
11933       addr = &dummy;
11934       return find_stack_direction ();
11935     }
11936   else
11937     return (&dummy > addr) ? 1 : -1;
11938 }
11939 main ()
11940 {
11941   exit (find_stack_direction() < 0);
11942 }
11943 EOF
11944 if { (eval echo configure:11945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11945 then
11946   ac_cv_c_stack_direction=1
11947 else
11948   conftest_rc="$?"
11949   echo "configure: failed program was:" >&5
11950   cat conftest.$ac_ext >&5
11951   rm -fr conftest*
11952   ac_cv_c_stack_direction=-1
11953 fi
11954 rm -fr conftest*
11955
11956 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11957 { test "$extra_verbose" = "yes" && cat << EOF
11958     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11959 EOF
11960 cat >> confdefs.h <<EOF
11961 #define STACK_DIRECTION $ac_cv_c_stack_direction
11962 EOF
11963 }
11964
11965 fi
11966
11967   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11968    echo "    xemacs will be linked with \"$ALLOCA\""
11969  fi
11970 fi
11971
11972 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11973 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11974 echo "configure:11975: checking for vfork.h" >&5
11975
11976 cat > conftest.$ac_ext <<EOF
11977 #line 11978 "configure"
11978 #include "confdefs.h"
11979 #include <vfork.h>
11980 EOF
11981 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11982 { (eval echo configure:11983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11983 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11984 if test -z "$ac_err"; then
11985   rm -rf conftest*
11986   eval "ac_cv_header_$ac_safe=yes"
11987 else
11988   echo "$ac_err" >&5
11989   echo "configure: failed program was:" >&5
11990   cat conftest.$ac_ext >&5
11991   rm -rf conftest*
11992   eval "ac_cv_header_$ac_safe=no"
11993 fi
11994 rm -f conftest*
11995 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11996   echo "$ac_t""yes" 1>&6
11997   { test "$extra_verbose" = "yes" && cat << \EOF
11998     Defining HAVE_VFORK_H
11999 EOF
12000 cat >> confdefs.h <<\EOF
12001 #define HAVE_VFORK_H 1
12002 EOF
12003 }
12004
12005 else
12006   echo "$ac_t""no" 1>&6
12007 fi
12008
12009 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12010 echo "configure:12011: checking for working vfork" >&5
12011
12012 cat > conftest.$ac_ext <<EOF
12013 #line 12014 "configure"
12014 #include "confdefs.h"
12015 /* Thanks to Paul Eggert for this test.  */
12016 #include <stdio.h>
12017 #include <sys/types.h>
12018 #include <sys/stat.h>
12019 #ifdef HAVE_UNISTD_H
12020 #include <unistd.h>
12021 #endif
12022 #ifdef HAVE_VFORK_H
12023 #include <vfork.h>
12024 #endif
12025 /* On some sparc systems, changes by the child to local and incoming
12026    argument registers are propagated back to the parent.
12027    The compiler is told about this with #include <vfork.h>,
12028    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12029    Test for this by using a static variable whose address
12030    is put into a register that is clobbered by the vfork.  */
12031 static
12032 #ifdef __cplusplus
12033 sparc_address_test (int arg)
12034 #else
12035 sparc_address_test (arg) int arg;
12036 #endif
12037 {
12038   static pid_t child;
12039   if (!child) {
12040     child = vfork ();
12041     if (child < 0) {
12042       perror ("vfork");
12043       _exit(2);
12044     }
12045     if (!child) {
12046       arg = getpid();
12047       write(-1, "", 0);
12048       _exit (arg);
12049     }
12050   }
12051 }
12052 main() {
12053   pid_t parent = getpid ();
12054   pid_t child;
12055
12056   sparc_address_test ();
12057
12058   child = vfork ();
12059
12060   if (child == 0) {
12061     /* Here is another test for sparc vfork register problems.
12062        This test uses lots of local variables, at least
12063        as many local variables as main has allocated so far
12064        including compiler temporaries.  4 locals are enough for
12065        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12066        A buggy compiler should reuse the register of parent
12067        for one of the local variables, since it will think that
12068        parent can't possibly be used any more in this routine.
12069        Assigning to the local variable will thus munge parent
12070        in the parent process.  */
12071     pid_t
12072       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12073       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12074     /* Convince the compiler that p..p7 are live; otherwise, it might
12075        use the same hardware register for all 8 local variables.  */
12076     if (p != p1 || p != p2 || p != p3 || p != p4
12077         || p != p5 || p != p6 || p != p7)
12078       _exit(1);
12079
12080     /* On some systems (e.g. IRIX 3.3),
12081        vfork doesn't separate parent from child file descriptors.
12082        If the child closes a descriptor before it execs or exits,
12083        this munges the parent's descriptor as well.
12084        Test for this by closing stdout in the child.  */
12085     _exit(close(fileno(stdout)) != 0);
12086   } else {
12087     int status;
12088     struct stat st;
12089
12090     while (wait(&status) != child)
12091       ;
12092     exit(
12093          /* Was there some problem with vforking?  */
12094          child < 0
12095
12096          /* Did the child fail?  (This shouldn't happen.)  */
12097          || status
12098
12099          /* Did the vfork/compiler bug occur?  */
12100          || parent != getpid()
12101
12102          /* Did the file descriptor bug occur?  */
12103          || fstat(fileno(stdout), &st) != 0
12104          );
12105   }
12106 }
12107 EOF
12108 if { (eval echo configure:12109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12109 then
12110   ac_cv_func_vfork_works=yes
12111 else
12112   conftest_rc="$?"
12113   echo "configure: failed program was:" >&5
12114   cat conftest.$ac_ext >&5
12115   rm -fr conftest*
12116   ac_cv_func_vfork_works=no
12117 fi
12118 rm -fr conftest*
12119
12120 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12121 if test $ac_cv_func_vfork_works = no; then
12122   { test "$extra_verbose" = "yes" && cat << \EOF
12123     Defining vfork = fork
12124 EOF
12125 cat >> confdefs.h <<\EOF
12126 #define vfork fork
12127 EOF
12128 }
12129
12130 fi
12131
12132
12133 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12134 echo "configure:12135: checking for working strcoll" >&5
12135
12136 cat > conftest.$ac_ext <<EOF
12137 #line 12138 "configure"
12138 #include "confdefs.h"
12139 #include <string.h>
12140 main ()
12141 {
12142   exit (strcoll ("abc", "def") >= 0 ||
12143         strcoll ("ABC", "DEF") >= 0 ||
12144         strcoll ("123", "456") >= 0);
12145 }
12146 EOF
12147 if { (eval echo configure:12148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12148 then
12149   ac_cv_func_strcoll_works=yes
12150 else
12151   conftest_rc="$?"
12152   echo "configure: failed program was:" >&5
12153   cat conftest.$ac_ext >&5
12154   rm -fr conftest*
12155   ac_cv_func_strcoll_works=no
12156 fi
12157 rm -fr conftest*
12158
12159 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12160 if test $ac_cv_func_strcoll_works = yes; then
12161   { test "$extra_verbose" = "yes" && cat << \EOF
12162     Defining HAVE_STRCOLL
12163 EOF
12164 cat >> confdefs.h <<\EOF
12165 #define HAVE_STRCOLL 1
12166 EOF
12167 }
12168
12169 fi
12170
12171
12172 for ac_func in getpgrp
12173 do
12174 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12175 echo "configure:12176: checking for $ac_func" >&5
12176
12177 cat > conftest.$ac_ext <<EOF
12178 #line 12179 "configure"
12179 #include "confdefs.h"
12180 /* System header to define __stub macros and hopefully few prototypes,
12181     which can conflict with char $ac_func(); below.  */
12182 #include <assert.h>
12183 /* Override any gcc2 internal prototype to avoid an error.  */
12184 /* We use char because int might match the return type of a gcc2
12185     builtin and then its argument prototype would still apply.  */
12186 char $ac_func();
12187
12188 int main() {
12189
12190 /* The GNU C library defines this for functions which it implements
12191     to always fail with ENOSYS.  Some functions are actually named
12192     something starting with __ and the normal name is an alias.  */
12193 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12194 choke me
12195 #else
12196 $ac_func();
12197 #endif
12198
12199 ; return 0; }
12200 EOF
12201 if { (eval echo configure:12202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12202   rm -rf conftest*
12203   eval "ac_cv_func_$ac_func=yes"
12204 else
12205   echo "configure: failed program was:" >&5
12206   cat conftest.$ac_ext >&5
12207   rm -rf conftest*
12208   eval "ac_cv_func_$ac_func=no"
12209 fi
12210 rm -f conftest*
12211
12212 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12213   echo "$ac_t""yes" 1>&6
12214     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12215   { test "$extra_verbose" = "yes" && cat << EOF
12216     Defining $ac_tr_func
12217 EOF
12218 cat >> confdefs.h <<EOF
12219 #define $ac_tr_func 1
12220 EOF
12221 }
12222  
12223 else
12224   echo "$ac_t""no" 1>&6
12225 fi
12226 done
12227
12228 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12229 echo "configure:12230: checking whether getpgrp takes no argument" >&5
12230
12231 cat > conftest.$ac_ext <<EOF
12232 #line 12233 "configure"
12233 #include "confdefs.h"
12234
12235 /*
12236  * If this system has a BSD-style getpgrp(),
12237  * which takes a pid argument, exit unsuccessfully.
12238  *
12239  * Snarfed from Chet Ramey's bash pgrp.c test program
12240  */
12241 #include <stdio.h>
12242 #include <sys/types.h>
12243
12244 int     pid;
12245 int     pg1, pg2, pg3, pg4;
12246 int     ng, np, s, child;
12247
12248 main()
12249 {
12250         pid = getpid();
12251         pg1 = getpgrp(0);
12252         pg2 = getpgrp();
12253         pg3 = getpgrp(pid);
12254         pg4 = getpgrp(1);
12255
12256         /*
12257          * If all of these values are the same, it's pretty sure that
12258          * we're on a system that ignores getpgrp's first argument.
12259          */
12260         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12261                 exit(0);
12262
12263         child = fork();
12264         if (child < 0)
12265                 exit(1);
12266         else if (child == 0) {
12267                 np = getpid();
12268                 /*
12269                  * If this is Sys V, this will not work; pgrp will be
12270                  * set to np because setpgrp just changes a pgrp to be
12271                  * the same as the pid.
12272                  */
12273                 setpgrp(np, pg1);
12274                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12275                 if (ng == pg1) {
12276                         exit(1);
12277                 } else {
12278                         exit(0);
12279                 }
12280         } else {
12281                 wait(&s);
12282                 exit(s>>8);
12283         }
12284 }
12285
12286 EOF
12287 if { (eval echo configure:12288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12288 then
12289   ac_cv_func_getpgrp_void=yes
12290 else
12291   conftest_rc="$?"
12292   echo "configure: failed program was:" >&5
12293   cat conftest.$ac_ext >&5
12294   rm -fr conftest*
12295   ac_cv_func_getpgrp_void=no
12296 fi
12297 rm -fr conftest*
12298
12299
12300 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12301 if test $ac_cv_func_getpgrp_void = yes; then
12302   { test "$extra_verbose" = "yes" && cat << \EOF
12303     Defining GETPGRP_VOID
12304 EOF
12305 cat >> confdefs.h <<\EOF
12306 #define GETPGRP_VOID 1
12307 EOF
12308 }
12309
12310 fi
12311
12312
12313 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12314 echo "configure:12315: checking for working mmap" >&5
12315 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12316 cat > conftest.$ac_ext <<EOF
12317 #line 12318 "configure"
12318 #include "confdefs.h"
12319 #include <stdio.h>
12320 #include <unistd.h>
12321 #include <fcntl.h>
12322 #include <sys/mman.h>
12323
12324 #ifndef MAP_VARIABLE
12325 #define MAP_VARIABLE 0
12326 #endif
12327
12328 #ifndef MAP_FAILED
12329 #define MAP_FAILED -1
12330 #endif
12331
12332 int main (int argc, char *argv[])
12333 {
12334   int fd = -1;
12335   caddr_t p;
12336 #ifndef MAP_ANONYMOUS
12337   fd = open ("/dev/zero", O_RDWR);
12338   if (fd < 0)
12339     return 1;
12340 #define MAP_ANONYMOUS 0
12341 #endif
12342   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12343            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12344            fd, 0) != (void *) MAP_FAILED)
12345     return 0;
12346   perror ("conftest: mmap failed");
12347   return 1;
12348 }
12349 EOF
12350 if { (eval echo configure:12351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12351 then
12352   have_mmap=yes
12353 else
12354   conftest_rc="$?"
12355   echo "configure: failed program was:" >&5
12356   cat conftest.$ac_ext >&5
12357   rm -fr conftest*
12358   have_mmap=no
12359 fi
12360 rm -fr conftest* ;;
12361 esac
12362 echo "$ac_t""$have_mmap" 1>&6
12363 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12364     Defining HAVE_MMAP
12365 EOF
12366 cat >> confdefs.h <<\EOF
12367 #define HAVE_MMAP 1
12368 EOF
12369 }
12370
12371
12372 case "$opsys" in cygwin*) 
12373         test "$rel_alloc" = "default" && rel_alloc=no ;;
12374 esac
12375 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12376 if test "$rel_alloc $have_mmap" = "default yes"; then
12377   if test "$doug_lea_malloc" = "yes"; then
12378         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12379 echo "configure:12380: checking for M_MMAP_THRESHOLD" >&5
12380     cat > conftest.$ac_ext <<EOF
12381 #line 12382 "configure"
12382 #include "confdefs.h"
12383 #include <malloc.h>
12384 int main() {
12385
12386 #ifndef M_MMAP_THRESHOLD
12387 #error No M_MMAP_THRESHOLD :-(
12388 !@+$%^&*_)(_ - unlikely to compile...
12389 #endif
12390
12391 ; return 0; }
12392 EOF
12393 if { (eval echo configure:12394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12394   rm -rf conftest*
12395   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12396 else
12397   echo "configure: failed program was:" >&5
12398   cat conftest.$ac_ext >&5
12399   rm -rf conftest*
12400   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12401 fi
12402 rm -f conftest*
12403   else
12404     rel_alloc=yes
12405   fi
12406 fi
12407 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12408     Defining REL_ALLOC
12409 EOF
12410 cat >> confdefs.h <<\EOF
12411 #define REL_ALLOC 1
12412 EOF
12413 }
12414
12415
12416 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12417 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12418 echo "configure:12419: checking for termios.h" >&5
12419
12420 cat > conftest.$ac_ext <<EOF
12421 #line 12422 "configure"
12422 #include "confdefs.h"
12423 #include <termios.h>
12424 EOF
12425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12426 { (eval echo configure:12427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12428 if test -z "$ac_err"; then
12429   rm -rf conftest*
12430   eval "ac_cv_header_$ac_safe=yes"
12431 else
12432   echo "$ac_err" >&5
12433   echo "configure: failed program was:" >&5
12434   cat conftest.$ac_ext >&5
12435   rm -rf conftest*
12436   eval "ac_cv_header_$ac_safe=no"
12437 fi
12438 rm -f conftest*
12439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12440   echo "$ac_t""yes" 1>&6
12441   { test "$extra_verbose" = "yes" && cat << \EOF
12442     Defining HAVE_TERMIOS
12443 EOF
12444 cat >> confdefs.h <<\EOF
12445 #define HAVE_TERMIOS 1
12446 EOF
12447 }
12448
12449   { test "$extra_verbose" = "yes" && cat << \EOF
12450     Defining SIGNALS_VIA_CHARACTERS
12451 EOF
12452 cat >> confdefs.h <<\EOF
12453 #define SIGNALS_VIA_CHARACTERS 1
12454 EOF
12455 }
12456
12457   { test "$extra_verbose" = "yes" && cat << \EOF
12458     Defining NO_TERMIO
12459 EOF
12460 cat >> confdefs.h <<\EOF
12461 #define NO_TERMIO 1
12462 EOF
12463 }
12464
12465 else
12466   echo "$ac_t""no" 1>&6
12467 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12468 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12469 echo "configure:12470: checking for termio.h" >&5
12470
12471 cat > conftest.$ac_ext <<EOF
12472 #line 12473 "configure"
12473 #include "confdefs.h"
12474 #include <termio.h>
12475 EOF
12476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12477 { (eval echo configure:12478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12479 if test -z "$ac_err"; then
12480   rm -rf conftest*
12481   eval "ac_cv_header_$ac_safe=yes"
12482 else
12483   echo "$ac_err" >&5
12484   echo "configure: failed program was:" >&5
12485   cat conftest.$ac_ext >&5
12486   rm -rf conftest*
12487   eval "ac_cv_header_$ac_safe=no"
12488 fi
12489 rm -f conftest*
12490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12491   echo "$ac_t""yes" 1>&6
12492   { test "$extra_verbose" = "yes" && cat << \EOF
12493     Defining HAVE_TERMIO
12494 EOF
12495 cat >> confdefs.h <<\EOF
12496 #define HAVE_TERMIO 1
12497 EOF
12498 }
12499
12500 else
12501   echo "$ac_t""no" 1>&6
12502 fi
12503
12504 fi
12505
12506
12507
12508 echo $ac_n "checking for socket""... $ac_c" 1>&6
12509 echo "configure:12510: checking for socket" >&5
12510
12511 cat > conftest.$ac_ext <<EOF
12512 #line 12513 "configure"
12513 #include "confdefs.h"
12514 /* System header to define __stub macros and hopefully few prototypes,
12515     which can conflict with char socket(); below.  */
12516 #include <assert.h>
12517 /* Override any gcc2 internal prototype to avoid an error.  */
12518 /* We use char because int might match the return type of a gcc2
12519     builtin and then its argument prototype would still apply.  */
12520 char socket();
12521
12522 int main() {
12523
12524 /* The GNU C library defines this for functions which it implements
12525     to always fail with ENOSYS.  Some functions are actually named
12526     something starting with __ and the normal name is an alias.  */
12527 #if defined (__stub_socket) || defined (__stub___socket)
12528 choke me
12529 #else
12530 socket();
12531 #endif
12532
12533 ; return 0; }
12534 EOF
12535 if { (eval echo configure:12536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12536   rm -rf conftest*
12537   eval "ac_cv_func_socket=yes"
12538 else
12539   echo "configure: failed program was:" >&5
12540   cat conftest.$ac_ext >&5
12541   rm -rf conftest*
12542   eval "ac_cv_func_socket=no"
12543 fi
12544 rm -f conftest*
12545
12546 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12547   echo "$ac_t""yes" 1>&6
12548   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12549 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12550 echo "configure:12551: checking for netinet/in.h" >&5
12551
12552 cat > conftest.$ac_ext <<EOF
12553 #line 12554 "configure"
12554 #include "confdefs.h"
12555 #include <netinet/in.h>
12556 EOF
12557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12558 { (eval echo configure:12559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12560 if test -z "$ac_err"; then
12561   rm -rf conftest*
12562   eval "ac_cv_header_$ac_safe=yes"
12563 else
12564   echo "$ac_err" >&5
12565   echo "configure: failed program was:" >&5
12566   cat conftest.$ac_ext >&5
12567   rm -rf conftest*
12568   eval "ac_cv_header_$ac_safe=no"
12569 fi
12570 rm -f conftest*
12571 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12572   echo "$ac_t""yes" 1>&6
12573   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12574 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12575 echo "configure:12576: checking for arpa/inet.h" >&5
12576
12577 cat > conftest.$ac_ext <<EOF
12578 #line 12579 "configure"
12579 #include "confdefs.h"
12580 #include <arpa/inet.h>
12581 EOF
12582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12583 { (eval echo configure:12584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12585 if test -z "$ac_err"; then
12586   rm -rf conftest*
12587   eval "ac_cv_header_$ac_safe=yes"
12588 else
12589   echo "$ac_err" >&5
12590   echo "configure: failed program was:" >&5
12591   cat conftest.$ac_ext >&5
12592   rm -rf conftest*
12593   eval "ac_cv_header_$ac_safe=no"
12594 fi
12595 rm -f conftest*
12596 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12597   echo "$ac_t""yes" 1>&6
12598   
12599   { test "$extra_verbose" = "yes" && cat << \EOF
12600     Defining HAVE_SOCKETS
12601 EOF
12602 cat >> confdefs.h <<\EOF
12603 #define HAVE_SOCKETS 1
12604 EOF
12605 }
12606
12607       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12608 echo "configure:12609: checking "for sun_len member in struct sockaddr_un"" >&5
12609       cat > conftest.$ac_ext <<EOF
12610 #line 12611 "configure"
12611 #include "confdefs.h"
12612
12613 #include <sys/types.h>
12614 #include <sys/socket.h>
12615 #include <sys/un.h>
12616       
12617 int main() {
12618 static struct sockaddr_un x; x.sun_len = 1;
12619 ; return 0; }
12620 EOF
12621 if { (eval echo configure:12622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12622   rm -rf conftest*
12623   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12624     Defining HAVE_SOCKADDR_SUN_LEN
12625 EOF
12626 cat >> confdefs.h <<\EOF
12627 #define HAVE_SOCKADDR_SUN_LEN 1
12628 EOF
12629 }
12630
12631 else
12632   echo "configure: failed program was:" >&5
12633   cat conftest.$ac_ext >&5
12634   rm -rf conftest*
12635   echo "$ac_t""no" 1>&6
12636 fi
12637 rm -f conftest*
12638       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12639 echo "configure:12640: checking "for ip_mreq struct in netinet/in.h"" >&5
12640       cat > conftest.$ac_ext <<EOF
12641 #line 12642 "configure"
12642 #include "confdefs.h"
12643
12644 #include <sys/types.h>
12645 #include <netinet/in.h>
12646       
12647 int main() {
12648 static struct ip_mreq x;
12649 ; return 0; }
12650 EOF
12651 if { (eval echo configure:12652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12652   rm -rf conftest*
12653   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12654     Defining HAVE_MULTICAST
12655 EOF
12656 cat >> confdefs.h <<\EOF
12657 #define HAVE_MULTICAST 1
12658 EOF
12659 }
12660
12661 else
12662   echo "configure: failed program was:" >&5
12663   cat conftest.$ac_ext >&5
12664   rm -rf conftest*
12665   echo "$ac_t""no" 1>&6
12666 fi
12667 rm -f conftest*
12668 else
12669   echo "$ac_t""no" 1>&6
12670 fi
12671
12672 else
12673   echo "$ac_t""no" 1>&6
12674 fi
12675
12676 else
12677   echo "$ac_t""no" 1>&6
12678 fi
12679
12680
12681 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12682 echo "configure:12683: checking for msgget" >&5
12683
12684 cat > conftest.$ac_ext <<EOF
12685 #line 12686 "configure"
12686 #include "confdefs.h"
12687 /* System header to define __stub macros and hopefully few prototypes,
12688     which can conflict with char msgget(); below.  */
12689 #include <assert.h>
12690 /* Override any gcc2 internal prototype to avoid an error.  */
12691 /* We use char because int might match the return type of a gcc2
12692     builtin and then its argument prototype would still apply.  */
12693 char msgget();
12694
12695 int main() {
12696
12697 /* The GNU C library defines this for functions which it implements
12698     to always fail with ENOSYS.  Some functions are actually named
12699     something starting with __ and the normal name is an alias.  */
12700 #if defined (__stub_msgget) || defined (__stub___msgget)
12701 choke me
12702 #else
12703 msgget();
12704 #endif
12705
12706 ; return 0; }
12707 EOF
12708 if { (eval echo configure:12709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12709   rm -rf conftest*
12710   eval "ac_cv_func_msgget=yes"
12711 else
12712   echo "configure: failed program was:" >&5
12713   cat conftest.$ac_ext >&5
12714   rm -rf conftest*
12715   eval "ac_cv_func_msgget=no"
12716 fi
12717 rm -f conftest*
12718
12719 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12720   echo "$ac_t""yes" 1>&6
12721   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12722 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12723 echo "configure:12724: checking for sys/ipc.h" >&5
12724
12725 cat > conftest.$ac_ext <<EOF
12726 #line 12727 "configure"
12727 #include "confdefs.h"
12728 #include <sys/ipc.h>
12729 EOF
12730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12731 { (eval echo configure:12732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12733 if test -z "$ac_err"; then
12734   rm -rf conftest*
12735   eval "ac_cv_header_$ac_safe=yes"
12736 else
12737   echo "$ac_err" >&5
12738   echo "configure: failed program was:" >&5
12739   cat conftest.$ac_ext >&5
12740   rm -rf conftest*
12741   eval "ac_cv_header_$ac_safe=no"
12742 fi
12743 rm -f conftest*
12744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12745   echo "$ac_t""yes" 1>&6
12746   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12747 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12748 echo "configure:12749: checking for sys/msg.h" >&5
12749
12750 cat > conftest.$ac_ext <<EOF
12751 #line 12752 "configure"
12752 #include "confdefs.h"
12753 #include <sys/msg.h>
12754 EOF
12755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12756 { (eval echo configure:12757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12758 if test -z "$ac_err"; then
12759   rm -rf conftest*
12760   eval "ac_cv_header_$ac_safe=yes"
12761 else
12762   echo "$ac_err" >&5
12763   echo "configure: failed program was:" >&5
12764   cat conftest.$ac_ext >&5
12765   rm -rf conftest*
12766   eval "ac_cv_header_$ac_safe=no"
12767 fi
12768 rm -f conftest*
12769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12770   echo "$ac_t""yes" 1>&6
12771   { test "$extra_verbose" = "yes" && cat << \EOF
12772     Defining HAVE_SYSVIPC
12773 EOF
12774 cat >> confdefs.h <<\EOF
12775 #define HAVE_SYSVIPC 1
12776 EOF
12777 }
12778
12779 else
12780   echo "$ac_t""no" 1>&6
12781 fi
12782
12783 else
12784   echo "$ac_t""no" 1>&6
12785 fi
12786
12787 else
12788   echo "$ac_t""no" 1>&6
12789 fi
12790
12791
12792 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12793 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12794 echo "configure:12795: checking for dirent.h" >&5
12795
12796 cat > conftest.$ac_ext <<EOF
12797 #line 12798 "configure"
12798 #include "confdefs.h"
12799 #include <dirent.h>
12800 EOF
12801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12802 { (eval echo configure:12803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12804 if test -z "$ac_err"; then
12805   rm -rf conftest*
12806   eval "ac_cv_header_$ac_safe=yes"
12807 else
12808   echo "$ac_err" >&5
12809   echo "configure: failed program was:" >&5
12810   cat conftest.$ac_ext >&5
12811   rm -rf conftest*
12812   eval "ac_cv_header_$ac_safe=no"
12813 fi
12814 rm -f conftest*
12815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12816   echo "$ac_t""yes" 1>&6
12817   { test "$extra_verbose" = "yes" && cat << \EOF
12818     Defining SYSV_SYSTEM_DIR
12819 EOF
12820 cat >> confdefs.h <<\EOF
12821 #define SYSV_SYSTEM_DIR 1
12822 EOF
12823 }
12824
12825 else
12826   echo "$ac_t""no" 1>&6
12827 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12828 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12829 echo "configure:12830: checking for sys/dir.h" >&5
12830
12831 cat > conftest.$ac_ext <<EOF
12832 #line 12833 "configure"
12833 #include "confdefs.h"
12834 #include <sys/dir.h>
12835 EOF
12836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12837 { (eval echo configure:12838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12839 if test -z "$ac_err"; then
12840   rm -rf conftest*
12841   eval "ac_cv_header_$ac_safe=yes"
12842 else
12843   echo "$ac_err" >&5
12844   echo "configure: failed program was:" >&5
12845   cat conftest.$ac_ext >&5
12846   rm -rf conftest*
12847   eval "ac_cv_header_$ac_safe=no"
12848 fi
12849 rm -f conftest*
12850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12851   echo "$ac_t""yes" 1>&6
12852   :
12853 else
12854   echo "$ac_t""no" 1>&6
12855 { test "$extra_verbose" = "yes" && cat << \EOF
12856     Defining NONSYSTEM_DIR_LIBRARY
12857 EOF
12858 cat >> confdefs.h <<\EOF
12859 #define NONSYSTEM_DIR_LIBRARY 1
12860 EOF
12861 }
12862
12863 fi
12864
12865 fi
12866
12867
12868 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12869 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12870 echo "configure:12871: checking for nlist.h" >&5
12871
12872 cat > conftest.$ac_ext <<EOF
12873 #line 12874 "configure"
12874 #include "confdefs.h"
12875 #include <nlist.h>
12876 EOF
12877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12878 { (eval echo configure:12879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12880 if test -z "$ac_err"; then
12881   rm -rf conftest*
12882   eval "ac_cv_header_$ac_safe=yes"
12883 else
12884   echo "$ac_err" >&5
12885   echo "configure: failed program was:" >&5
12886   cat conftest.$ac_ext >&5
12887   rm -rf conftest*
12888   eval "ac_cv_header_$ac_safe=no"
12889 fi
12890 rm -f conftest*
12891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12892   echo "$ac_t""yes" 1>&6
12893   { test "$extra_verbose" = "yes" && cat << \EOF
12894     Defining NLIST_STRUCT
12895 EOF
12896 cat >> confdefs.h <<\EOF
12897 #define NLIST_STRUCT 1
12898 EOF
12899 }
12900
12901 else
12902   echo "$ac_t""no" 1>&6
12903 fi
12904
12905
12906
12907 echo "checking "for sound support"" 1>&6
12908 echo "configure:12909: checking "for sound support"" >&5
12909 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12910
12911 if test "$with_native_sound" != "no"; then
12912     if test -n "$native_sound_lib"; then
12913     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12914 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12915 echo "configure:12916: checking for multimedia/audio_device.h" >&5
12916
12917 cat > conftest.$ac_ext <<EOF
12918 #line 12919 "configure"
12919 #include "confdefs.h"
12920 #include <multimedia/audio_device.h>
12921 EOF
12922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12923 { (eval echo configure:12924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12925 if test -z "$ac_err"; then
12926   rm -rf conftest*
12927   eval "ac_cv_header_$ac_safe=yes"
12928 else
12929   echo "$ac_err" >&5
12930   echo "configure: failed program was:" >&5
12931   cat conftest.$ac_ext >&5
12932   rm -rf conftest*
12933   eval "ac_cv_header_$ac_safe=no"
12934 fi
12935 rm -f conftest*
12936 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12937   echo "$ac_t""yes" 1>&6
12938   sound_found=yes sound_cflags=""
12939       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12940    echo "    xemacs will be linked with \"sunplay.o\""
12941  fi
12942 else
12943   echo "$ac_t""no" 1>&6
12944 fi
12945
12946   fi
12947
12948     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12949     sound_found=yes
12950     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12951    echo "    xemacs will be linked with \"sunplay.o\""
12952  fi
12953     if test -d "/usr/demo/SOUND/include"
12954       then sound_cflags="-I/usr/demo/SOUND/include"
12955       else sound_cflags="-I/usr/demo/SOUND"
12956     fi
12957     if test -z "$native_sound_lib" ; then
12958       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12959         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12960         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12961       fi
12962     fi
12963   fi
12964
12965     if test -z "$sound_found"; then
12966     case "$canonical" in
12967     *-sgi-* )
12968       if test -z "$native_sound_lib"; then
12969         
12970 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12971 echo "configure:12972: checking for ALopenport in -laudio" >&5
12972 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12973
12974 xe_check_libs=" -laudio "
12975 cat > conftest.$ac_ext <<EOF
12976 #line 12977 "configure"
12977 #include "confdefs.h"
12978 /* Override any gcc2 internal prototype to avoid an error.  */
12979 /* We use char because int might match the return type of a gcc2
12980     builtin and then its argument prototype would still apply.  */
12981 char ALopenport();
12982
12983 int main() {
12984 ALopenport()
12985 ; return 0; }
12986 EOF
12987 if { (eval echo configure:12988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12988   rm -rf conftest*
12989   eval "ac_cv_lib_$ac_lib_var=yes"
12990 else
12991   echo "configure: failed program was:" >&5
12992   cat conftest.$ac_ext >&5
12993   rm -rf conftest*
12994   eval "ac_cv_lib_$ac_lib_var=no"
12995 fi
12996 rm -f conftest*
12997 xe_check_libs=""
12998
12999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13000   echo "$ac_t""yes" 1>&6
13001   native_sound_lib="-laudio"
13002 else
13003   echo "$ac_t""no" 1>&6
13004 fi
13005
13006
13007       fi
13008       if test -n "$native_sound_lib"; then
13009         sound_found=yes sound_cflags=""
13010         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13011    echo "    xemacs will be linked with \"sgiplay.o\""
13012  fi
13013       fi ;;
13014     hppa*-hp-hpux* )
13015       if test -z "$native_sound_lib"; then
13016         
13017 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13018 echo "configure:13019: checking for AOpenAudio in -lAlib" >&5
13019 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13020
13021 xe_check_libs=" -lAlib "
13022 cat > conftest.$ac_ext <<EOF
13023 #line 13024 "configure"
13024 #include "confdefs.h"
13025 /* Override any gcc2 internal prototype to avoid an error.  */
13026 /* We use char because int might match the return type of a gcc2
13027     builtin and then its argument prototype would still apply.  */
13028 char AOpenAudio();
13029
13030 int main() {
13031 AOpenAudio()
13032 ; return 0; }
13033 EOF
13034 if { (eval echo configure:13035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13035   rm -rf conftest*
13036   eval "ac_cv_lib_$ac_lib_var=yes"
13037 else
13038   echo "configure: failed program was:" >&5
13039   cat conftest.$ac_ext >&5
13040   rm -rf conftest*
13041   eval "ac_cv_lib_$ac_lib_var=no"
13042 fi
13043 rm -f conftest*
13044 xe_check_libs=""
13045
13046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13047   echo "$ac_t""yes" 1>&6
13048   native_sound_lib="-lAlib"
13049 else
13050   echo "$ac_t""no" 1>&6
13051 fi
13052
13053
13054       fi
13055       if test -n "$native_sound_lib"; then
13056         sound_found=yes
13057         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13058    echo "    xemacs will be linked with \"hpplay.o\""
13059  fi
13060         if test "$GCC" = "yes" # Kludge city
13061           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13062           else sound_cflags="+e -I/usr/audio/examples"
13063         fi
13064       fi ;;
13065     esac
13066   fi
13067
13068     if test -z "$sound_found"; then
13069     if test "$with_msw" = "yes"; then
13070     sound_found=yes
13071     native_sound_lib=
13072     fi
13073   fi
13074
13075     if test -z "$sound_found"; then
13076     for dir in "machine" "sys" "linux"; do
13077       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13078 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13079 echo "configure:13080: checking for ${dir}/soundcard.h" >&5
13080
13081 cat > conftest.$ac_ext <<EOF
13082 #line 13083 "configure"
13083 #include "confdefs.h"
13084 #include <${dir}/soundcard.h>
13085 EOF
13086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13087 { (eval echo configure:13088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13089 if test -z "$ac_err"; then
13090   rm -rf conftest*
13091   eval "ac_cv_header_$ac_safe=yes"
13092 else
13093   echo "$ac_err" >&5
13094   echo "configure: failed program was:" >&5
13095   cat conftest.$ac_ext >&5
13096   rm -rf conftest*
13097   eval "ac_cv_header_$ac_safe=no"
13098 fi
13099 rm -f conftest*
13100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13101   echo "$ac_t""yes" 1>&6
13102   sound_found=yes
13103        need_miscplay=yes
13104         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13105    echo "    xemacs will be linked with \"linuxplay.o\""
13106  fi
13107         { test "$extra_verbose" = "yes" && cat << EOF
13108     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13109 EOF
13110 cat >> confdefs.h <<EOF
13111 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13112 EOF
13113 }
13114
13115         break
13116 else
13117   echo "$ac_t""no" 1>&6
13118 fi
13119
13120     done
13121   fi
13122
13123   test "$sound_found" = "yes" && with_native_sound=yes
13124 fi
13125
13126 if test "$with_native_sound" = "yes"; then
13127   { test "$extra_verbose" = "yes" && cat << \EOF
13128     Defining HAVE_NATIVE_SOUND
13129 EOF
13130 cat >> confdefs.h <<\EOF
13131 #define HAVE_NATIVE_SOUND 1
13132 EOF
13133 }
13134
13135   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13136 fi
13137
13138 if test "$with_nas_sound" != "no"; then
13139   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13140 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13141 echo "configure:13142: checking for audio/audiolib.h" >&5
13142
13143 cat > conftest.$ac_ext <<EOF
13144 #line 13145 "configure"
13145 #include "confdefs.h"
13146 #include <audio/audiolib.h>
13147 EOF
13148 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13149 { (eval echo configure:13150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13150 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13151 if test -z "$ac_err"; then
13152   rm -rf conftest*
13153   eval "ac_cv_header_$ac_safe=yes"
13154 else
13155   echo "$ac_err" >&5
13156   echo "configure: failed program was:" >&5
13157   cat conftest.$ac_ext >&5
13158   rm -rf conftest*
13159   eval "ac_cv_header_$ac_safe=no"
13160 fi
13161 rm -f conftest*
13162 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13163   echo "$ac_t""yes" 1>&6
13164   
13165     
13166 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13167 echo "configure:13168: checking for AuOpenServer in -laudio" >&5
13168 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13169
13170 xe_check_libs=" -laudio "
13171 cat > conftest.$ac_ext <<EOF
13172 #line 13173 "configure"
13173 #include "confdefs.h"
13174 /* Override any gcc2 internal prototype to avoid an error.  */
13175 /* We use char because int might match the return type of a gcc2
13176     builtin and then its argument prototype would still apply.  */
13177 char AuOpenServer();
13178
13179 int main() {
13180 AuOpenServer()
13181 ; return 0; }
13182 EOF
13183 if { (eval echo configure:13184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13184   rm -rf conftest*
13185   eval "ac_cv_lib_$ac_lib_var=yes"
13186 else
13187   echo "configure: failed program was:" >&5
13188   cat conftest.$ac_ext >&5
13189   rm -rf conftest*
13190   eval "ac_cv_lib_$ac_lib_var=no"
13191 fi
13192 rm -f conftest*
13193 xe_check_libs=""
13194
13195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13196   echo "$ac_t""yes" 1>&6
13197   have_nas_sound=yes
13198 else
13199   echo "$ac_t""no" 1>&6
13200 fi
13201
13202
13203 else
13204   echo "$ac_t""no" 1>&6
13205 fi
13206
13207   if test "$have_nas_sound" = "yes"; then
13208     with_nas_sound=yes
13209     { test "$extra_verbose" = "yes" && cat << \EOF
13210     Defining HAVE_NAS_SOUND
13211 EOF
13212 cat >> confdefs.h <<\EOF
13213 #define HAVE_NAS_SOUND 1
13214 EOF
13215 }
13216
13217     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13218    echo "    xemacs will be linked with \"nas.o\""
13219  fi
13220     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13221             cat > conftest.$ac_ext <<EOF
13222 #line 13223 "configure"
13223 #include "confdefs.h"
13224 #include <audio/Xtutil.h>
13225 EOF
13226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13227   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13228   :
13229 else
13230   rm -rf conftest*
13231   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13232     Defining NAS_NO_ERROR_JUMP
13233 EOF
13234 cat >> confdefs.h <<\EOF
13235 #define NAS_NO_ERROR_JUMP 1
13236 EOF
13237 }
13238
13239 fi
13240 rm -f conftest*
13241
13242   else
13243     test "$with_nas_sound" = "yes" && \
13244       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13245     with_nas_sound=no
13246   fi
13247 fi
13248
13249 if test "$with_esd_sound" != "no"; then
13250   # Extract the first word of "esd-config", so it can be a program name with args.
13251 set dummy esd-config; ac_word=$2
13252 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13253 echo "configure:13254: checking for $ac_word" >&5
13254
13255 if test -n "$have_esd_config"; then
13256   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13257 else
13258   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13259   ac_dummy="$PATH"
13260   for ac_dir in $ac_dummy; do
13261     test -z "$ac_dir" && ac_dir=.
13262     if test -f $ac_dir/$ac_word; then
13263       ac_cv_prog_have_esd_config="yes"
13264       break
13265     fi
13266   done
13267   IFS="$ac_save_ifs"
13268   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13269 fi
13270 have_esd_config="$ac_cv_prog_have_esd_config"
13271 if test -n "$have_esd_config"; then
13272   echo "$ac_t""$have_esd_config" 1>&6
13273 else
13274   echo "$ac_t""no" 1>&6
13275 fi
13276
13277   if test "$have_esd_config" = "yes"; then
13278     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13279     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
13280     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13281     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13282 echo "configure:13283: checking for esd_play_stream" >&5
13283
13284 cat > conftest.$ac_ext <<EOF
13285 #line 13286 "configure"
13286 #include "confdefs.h"
13287 /* System header to define __stub macros and hopefully few prototypes,
13288     which can conflict with char esd_play_stream(); below.  */
13289 #include <assert.h>
13290 /* Override any gcc2 internal prototype to avoid an error.  */
13291 /* We use char because int might match the return type of a gcc2
13292     builtin and then its argument prototype would still apply.  */
13293 char esd_play_stream();
13294
13295 int main() {
13296
13297 /* The GNU C library defines this for functions which it implements
13298     to always fail with ENOSYS.  Some functions are actually named
13299     something starting with __ and the normal name is an alias.  */
13300 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13301 choke me
13302 #else
13303 esd_play_stream();
13304 #endif
13305
13306 ; return 0; }
13307 EOF
13308 if { (eval echo configure:13309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13309   rm -rf conftest*
13310   eval "ac_cv_func_esd_play_stream=yes"
13311 else
13312   echo "configure: failed program was:" >&5
13313   cat conftest.$ac_ext >&5
13314   rm -rf conftest*
13315   eval "ac_cv_func_esd_play_stream=no"
13316 fi
13317 rm -f conftest*
13318
13319 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13320   echo "$ac_t""yes" 1>&6
13321   have_esd_sound=yes
13322 else
13323   echo "$ac_t""no" 1>&6
13324 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13325 fi
13326
13327   fi
13328
13329   if test "$have_esd_sound" = "yes"; then
13330     with_esd_sound=yes
13331     need_miscplay=yes
13332     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13333    echo "    xemacs will be linked with \"esd.o\""
13334  fi
13335     { test "$extra_verbose" = "yes" && cat << \EOF
13336     Defining HAVE_ESD_SOUND
13337 EOF
13338 cat >> confdefs.h <<\EOF
13339 #define HAVE_ESD_SOUND 1
13340 EOF
13341 }
13342
13343   else
13344     test "$with_esd_sound" = "yes" && \
13345       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13346     with_esd_sound=no
13347   fi
13348 fi
13349
13350 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13351    echo "    xemacs will be linked with \"miscplay.o\""
13352  fi
13353
13354
13355 test -z "$with_tty" && with_tty=yes
13356
13357 if test "$with_tty" = "yes"  ; then
13358   echo "checking for TTY-related features" 1>&6
13359 echo "configure:13360: checking for TTY-related features" >&5
13360   { test "$extra_verbose" = "yes" && cat << \EOF
13361     Defining HAVE_TTY
13362 EOF
13363 cat >> confdefs.h <<\EOF
13364 #define HAVE_TTY 1
13365 EOF
13366 }
13367
13368   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
13369    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\""
13370  fi
13371
13372     if test -z "$with_ncurses"; then
13373     
13374 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13375 echo "configure:13376: checking for tgetent in -lncurses" >&5
13376 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13377
13378 xe_check_libs=" -lncurses "
13379 cat > conftest.$ac_ext <<EOF
13380 #line 13381 "configure"
13381 #include "confdefs.h"
13382 /* Override any gcc2 internal prototype to avoid an error.  */
13383 /* We use char because int might match the return type of a gcc2
13384     builtin and then its argument prototype would still apply.  */
13385 char tgetent();
13386
13387 int main() {
13388 tgetent()
13389 ; return 0; }
13390 EOF
13391 if { (eval echo configure:13392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13392   rm -rf conftest*
13393   eval "ac_cv_lib_$ac_lib_var=yes"
13394 else
13395   echo "configure: failed program was:" >&5
13396   cat conftest.$ac_ext >&5
13397   rm -rf conftest*
13398   eval "ac_cv_lib_$ac_lib_var=no"
13399 fi
13400 rm -f conftest*
13401 xe_check_libs=""
13402
13403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13404   echo "$ac_t""yes" 1>&6
13405   with_ncurses=yes
13406 else
13407   echo "$ac_t""no" 1>&6
13408 with_ncurses=no
13409 fi
13410
13411
13412   fi
13413   if test "$with_ncurses" = "yes"; then
13414     { test "$extra_verbose" = "yes" && cat << \EOF
13415     Defining HAVE_NCURSES
13416 EOF
13417 cat >> confdefs.h <<\EOF
13418 #define HAVE_NCURSES 1
13419 EOF
13420 }
13421
13422     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13423 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13424 echo "configure:13425: checking for ncurses/curses.h" >&5
13425
13426 cat > conftest.$ac_ext <<EOF
13427 #line 13428 "configure"
13428 #include "confdefs.h"
13429 #include <ncurses/curses.h>
13430 EOF
13431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13432 { (eval echo configure:13433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13434 if test -z "$ac_err"; then
13435   rm -rf conftest*
13436   eval "ac_cv_header_$ac_safe=yes"
13437 else
13438   echo "$ac_err" >&5
13439   echo "configure: failed program was:" >&5
13440   cat conftest.$ac_ext >&5
13441   rm -rf conftest*
13442   eval "ac_cv_header_$ac_safe=no"
13443 fi
13444 rm -f conftest*
13445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13446   echo "$ac_t""yes" 1>&6
13447   curses_h_file=ncurses/curses.h
13448 else
13449   echo "$ac_t""no" 1>&6
13450 fi
13451
13452     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13453 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13454 echo "configure:13455: checking for ncurses/term.h" >&5
13455
13456 cat > conftest.$ac_ext <<EOF
13457 #line 13458 "configure"
13458 #include "confdefs.h"
13459 #include <ncurses/term.h>
13460 EOF
13461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13462 { (eval echo configure:13463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13464 if test -z "$ac_err"; then
13465   rm -rf conftest*
13466   eval "ac_cv_header_$ac_safe=yes"
13467 else
13468   echo "$ac_err" >&5
13469   echo "configure: failed program was:" >&5
13470   cat conftest.$ac_ext >&5
13471   rm -rf conftest*
13472   eval "ac_cv_header_$ac_safe=no"
13473 fi
13474 rm -f conftest*
13475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13476   echo "$ac_t""yes" 1>&6
13477   term_h_file=ncurses/term.h
13478 else
13479   echo "$ac_t""no" 1>&6
13480 fi
13481
13482     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13483    echo "    xemacs will be linked with \"terminfo.o\""
13484  fi
13485     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13486
13487     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13488                         save_c_switch_site="$c_switch_site"
13489       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13490       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13491 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13492 echo "configure:13493: checking for ncurses/curses.h" >&5
13493
13494 cat > conftest.$ac_ext <<EOF
13495 #line 13496 "configure"
13496 #include "confdefs.h"
13497 #include <ncurses/curses.h>
13498 EOF
13499 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13500 { (eval echo configure:13501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13501 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13502 if test -z "$ac_err"; then
13503   rm -rf conftest*
13504   eval "ac_cv_header_$ac_safe=yes"
13505 else
13506   echo "$ac_err" >&5
13507   echo "configure: failed program was:" >&5
13508   cat conftest.$ac_ext >&5
13509   rm -rf conftest*
13510   eval "ac_cv_header_$ac_safe=no"
13511 fi
13512 rm -f conftest*
13513 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13514   echo "$ac_t""yes" 1>&6
13515   curses_h_file=ncurses/curses.h
13516 else
13517   echo "$ac_t""no" 1>&6
13518 fi
13519
13520       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13521         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13522         else c_switch_site="$save_c_switch_site"
13523       fi
13524     fi
13525   else         if test "$have_terminfo" = "yes"; then
13526       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13527    echo "    xemacs will be linked with \"terminfo.o\""
13528  fi
13529       if test -n "$libs_termcap"; then
13530         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13531       else
13532         for lib in curses termlib termcap; do
13533           
13534 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13535 echo "configure:13536: checking for tgetent in -l$lib" >&5
13536 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13537
13538 xe_check_libs=" -l$lib "
13539 cat > conftest.$ac_ext <<EOF
13540 #line 13541 "configure"
13541 #include "confdefs.h"
13542 /* Override any gcc2 internal prototype to avoid an error.  */
13543 /* We use char because int might match the return type of a gcc2
13544     builtin and then its argument prototype would still apply.  */
13545 char tgetent();
13546
13547 int main() {
13548 tgetent()
13549 ; return 0; }
13550 EOF
13551 if { (eval echo configure:13552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13552   rm -rf conftest*
13553   eval "ac_cv_lib_$ac_lib_var=yes"
13554 else
13555   echo "configure: failed program was:" >&5
13556   cat conftest.$ac_ext >&5
13557   rm -rf conftest*
13558   eval "ac_cv_lib_$ac_lib_var=no"
13559 fi
13560 rm -f conftest*
13561 xe_check_libs=""
13562
13563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13564   echo "$ac_t""yes" 1>&6
13565   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13566 else
13567   echo "$ac_t""no" 1>&6
13568 fi
13569
13570
13571         done
13572       fi
13573     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13574    echo "    xemacs will be linked with \"tparam.o\""
13575  fi
13576                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13577       if test -n "$libs_termcap"; then
13578         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13579       else
13580         
13581 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13582 echo "configure:13583: checking for tgetent in -lcurses" >&5
13583 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13584
13585 xe_check_libs=" -lcurses "
13586 cat > conftest.$ac_ext <<EOF
13587 #line 13588 "configure"
13588 #include "confdefs.h"
13589 /* Override any gcc2 internal prototype to avoid an error.  */
13590 /* We use char because int might match the return type of a gcc2
13591     builtin and then its argument prototype would still apply.  */
13592 char tgetent();
13593
13594 int main() {
13595 tgetent()
13596 ; return 0; }
13597 EOF
13598 if { (eval echo configure:13599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13599   rm -rf conftest*
13600   eval "ac_cv_lib_$ac_lib_var=yes"
13601 else
13602   echo "configure: failed program was:" >&5
13603   cat conftest.$ac_ext >&5
13604   rm -rf conftest*
13605   eval "ac_cv_lib_$ac_lib_var=no"
13606 fi
13607 rm -f conftest*
13608 xe_check_libs=""
13609
13610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13611   echo "$ac_t""yes" 1>&6
13612   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13613 else
13614   echo "$ac_t""no" 1>&6
13615 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13616 echo "configure:13617: checking for tgetent in -ltermcap" >&5
13617 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13618
13619 xe_check_libs=" -ltermcap "
13620 cat > conftest.$ac_ext <<EOF
13621 #line 13622 "configure"
13622 #include "confdefs.h"
13623 /* Override any gcc2 internal prototype to avoid an error.  */
13624 /* We use char because int might match the return type of a gcc2
13625     builtin and then its argument prototype would still apply.  */
13626 char tgetent();
13627
13628 int main() {
13629 tgetent()
13630 ; return 0; }
13631 EOF
13632 if { (eval echo configure:13633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13633   rm -rf conftest*
13634   eval "ac_cv_lib_$ac_lib_var=yes"
13635 else
13636   echo "configure: failed program was:" >&5
13637   cat conftest.$ac_ext >&5
13638   rm -rf conftest*
13639   eval "ac_cv_lib_$ac_lib_var=no"
13640 fi
13641 rm -f conftest*
13642 xe_check_libs=""
13643
13644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13645   echo "$ac_t""yes" 1>&6
13646   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13647 else
13648   echo "$ac_t""no" 1>&6
13649 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13650    echo "    xemacs will be linked with \"termcap.o\""
13651  fi
13652 fi
13653
13654
13655 fi
13656
13657
13658       fi
13659     fi
13660   fi
13661   { test "$extra_verbose" = "yes" && cat << EOF
13662     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13663 EOF
13664 cat >> confdefs.h <<EOF
13665 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13666 EOF
13667 }
13668
13669   { test "$extra_verbose" = "yes" && cat << EOF
13670     Defining TERM_H_FILE = "${term_h_file-term.h}"
13671 EOF
13672 cat >> confdefs.h <<EOF
13673 #define TERM_H_FILE "${term_h_file-term.h}"
13674 EOF
13675 }
13676
13677
13678     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13679 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13680 echo "configure:13681: checking for gpm.h" >&5
13681
13682 cat > conftest.$ac_ext <<EOF
13683 #line 13684 "configure"
13684 #include "confdefs.h"
13685 #include <gpm.h>
13686 EOF
13687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13688 { (eval echo configure:13689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13690 if test -z "$ac_err"; then
13691   rm -rf conftest*
13692   eval "ac_cv_header_$ac_safe=yes"
13693 else
13694   echo "$ac_err" >&5
13695   echo "configure: failed program was:" >&5
13696   cat conftest.$ac_ext >&5
13697   rm -rf conftest*
13698   eval "ac_cv_header_$ac_safe=no"
13699 fi
13700 rm -f conftest*
13701 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13702   echo "$ac_t""yes" 1>&6
13703   :
13704 else
13705   echo "$ac_t""no" 1>&6
13706 with_gpm=no
13707 fi
13708  }
13709   test -z "$with_gpm" && { 
13710 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13711 echo "configure:13712: checking for Gpm_Open in -lgpm" >&5
13712 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13713
13714 xe_check_libs=" -lgpm "
13715 cat > conftest.$ac_ext <<EOF
13716 #line 13717 "configure"
13717 #include "confdefs.h"
13718 /* Override any gcc2 internal prototype to avoid an error.  */
13719 /* We use char because int might match the return type of a gcc2
13720     builtin and then its argument prototype would still apply.  */
13721 char Gpm_Open();
13722
13723 int main() {
13724 Gpm_Open()
13725 ; return 0; }
13726 EOF
13727 if { (eval echo configure:13728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13728   rm -rf conftest*
13729   eval "ac_cv_lib_$ac_lib_var=yes"
13730 else
13731   echo "configure: failed program was:" >&5
13732   cat conftest.$ac_ext >&5
13733   rm -rf conftest*
13734   eval "ac_cv_lib_$ac_lib_var=no"
13735 fi
13736 rm -f conftest*
13737 xe_check_libs=""
13738
13739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13740   echo "$ac_t""yes" 1>&6
13741   with_gpm=yes
13742 else
13743   echo "$ac_t""no" 1>&6
13744 with_gpm=no
13745 fi
13746
13747  }
13748   if test "$with_gpm" = "yes"; then
13749     { test "$extra_verbose" = "yes" && cat << \EOF
13750     Defining HAVE_GPM
13751 EOF
13752 cat >> confdefs.h <<\EOF
13753 #define HAVE_GPM 1
13754 EOF
13755 }
13756
13757     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13758    echo "    xemacs will be linked with \"gpmevent.o\""
13759  fi
13760     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13761   fi
13762
13763 else   for feature in ncurses gpm; do
13764     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13765       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13766     fi
13767     eval "with_${feature}=no"
13768   done
13769 fi 
13770 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
13771    echo "    xemacs will be linked with \"event-unixoid.o\""
13772  fi
13773
13774
13775 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13776   != "no no no" && echo "checking for database support" 1>&6
13777 echo "configure:13778: checking for database support" >&5
13778
13779 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13780   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13781 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13782 echo "configure:13783: checking for ndbm.h" >&5
13783
13784 cat > conftest.$ac_ext <<EOF
13785 #line 13786 "configure"
13786 #include "confdefs.h"
13787 #include <ndbm.h>
13788 EOF
13789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13790 { (eval echo configure:13791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13792 if test -z "$ac_err"; then
13793   rm -rf conftest*
13794   eval "ac_cv_header_$ac_safe=yes"
13795 else
13796   echo "$ac_err" >&5
13797   echo "configure: failed program was:" >&5
13798   cat conftest.$ac_ext >&5
13799   rm -rf conftest*
13800   eval "ac_cv_header_$ac_safe=no"
13801 fi
13802 rm -f conftest*
13803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13804   echo "$ac_t""yes" 1>&6
13805   :
13806 else
13807   echo "$ac_t""no" 1>&6
13808
13809     test "$with_database_gdbm" = "yes" -o \
13810          "$with_database_dbm"  = "yes" && \
13811       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13812     with_database_gdbm=no with_database_dbm=no
13813 fi
13814
13815 fi
13816
13817 if test "$with_database_gdbm" != "no"; then
13818   
13819 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13820 echo "configure:13821: checking for dbm_open in -lgdbm" >&5
13821 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13822
13823 xe_check_libs=" -lgdbm "
13824 cat > conftest.$ac_ext <<EOF
13825 #line 13826 "configure"
13826 #include "confdefs.h"
13827 /* Override any gcc2 internal prototype to avoid an error.  */
13828 /* We use char because int might match the return type of a gcc2
13829     builtin and then its argument prototype would still apply.  */
13830 char dbm_open();
13831
13832 int main() {
13833 dbm_open()
13834 ; return 0; }
13835 EOF
13836 if { (eval echo configure:13837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13837   rm -rf conftest*
13838   eval "ac_cv_lib_$ac_lib_var=yes"
13839 else
13840   echo "configure: failed program was:" >&5
13841   cat conftest.$ac_ext >&5
13842   rm -rf conftest*
13843   eval "ac_cv_lib_$ac_lib_var=no"
13844 fi
13845 rm -f conftest*
13846 xe_check_libs=""
13847
13848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13849   echo "$ac_t""yes" 1>&6
13850   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13851 else
13852   echo "$ac_t""no" 1>&6
13853 if test "$with_database_gdbm" = "yes"; then
13854      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13855    fi
13856    with_database_gdbm=no
13857 fi
13858
13859
13860 fi
13861
13862 if test "$with_database_dbm" != "no"; then
13863   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13864 echo "configure:13865: checking for dbm_open" >&5
13865
13866 cat > conftest.$ac_ext <<EOF
13867 #line 13868 "configure"
13868 #include "confdefs.h"
13869 /* System header to define __stub macros and hopefully few prototypes,
13870     which can conflict with char dbm_open(); below.  */
13871 #include <assert.h>
13872 /* Override any gcc2 internal prototype to avoid an error.  */
13873 /* We use char because int might match the return type of a gcc2
13874     builtin and then its argument prototype would still apply.  */
13875 char dbm_open();
13876
13877 int main() {
13878
13879 /* The GNU C library defines this for functions which it implements
13880     to always fail with ENOSYS.  Some functions are actually named
13881     something starting with __ and the normal name is an alias.  */
13882 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13883 choke me
13884 #else
13885 dbm_open();
13886 #endif
13887
13888 ; return 0; }
13889 EOF
13890 if { (eval echo configure:13891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13891   rm -rf conftest*
13892   eval "ac_cv_func_dbm_open=yes"
13893 else
13894   echo "configure: failed program was:" >&5
13895   cat conftest.$ac_ext >&5
13896   rm -rf conftest*
13897   eval "ac_cv_func_dbm_open=no"
13898 fi
13899 rm -f conftest*
13900
13901 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13902   echo "$ac_t""yes" 1>&6
13903   with_database_dbm=yes libdbm=
13904 else
13905   echo "$ac_t""no" 1>&6
13906
13907     
13908 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13909 echo "configure:13910: checking for dbm_open in -ldbm" >&5
13910 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13911
13912 xe_check_libs=" -ldbm "
13913 cat > conftest.$ac_ext <<EOF
13914 #line 13915 "configure"
13915 #include "confdefs.h"
13916 /* Override any gcc2 internal prototype to avoid an error.  */
13917 /* We use char because int might match the return type of a gcc2
13918     builtin and then its argument prototype would still apply.  */
13919 char dbm_open();
13920
13921 int main() {
13922 dbm_open()
13923 ; return 0; }
13924 EOF
13925 if { (eval echo configure:13926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13926   rm -rf conftest*
13927   eval "ac_cv_lib_$ac_lib_var=yes"
13928 else
13929   echo "configure: failed program was:" >&5
13930   cat conftest.$ac_ext >&5
13931   rm -rf conftest*
13932   eval "ac_cv_lib_$ac_lib_var=no"
13933 fi
13934 rm -f conftest*
13935 xe_check_libs=""
13936
13937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13938   echo "$ac_t""yes" 1>&6
13939   with_database_dbm=yes libdbm=-ldbm
13940 else
13941   echo "$ac_t""no" 1>&6
13942 test "$with_database_dbm" = "yes" && \
13943         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13944       with_database_dbm=no
13945 fi
13946
13947
13948 fi
13949
13950 fi
13951
13952 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13953 test "$with_database_gdbm" = "yes" -o \
13954      "$with_database_dbm"  = "yes" && \
13955   { test "$extra_verbose" = "yes" && cat << \EOF
13956     Defining HAVE_DBM
13957 EOF
13958 cat >> confdefs.h <<\EOF
13959 #define HAVE_DBM 1
13960 EOF
13961 }
13962
13963
13964 if test "$with_database_berkdb" != "no"; then
13965   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13966 echo "configure:13967: checking for Berkeley db.h" >&5
13967   for header in "db/db.h" "db.h"; do
13968     cat > conftest.$ac_ext <<EOF
13969 #line 13970 "configure"
13970 #include "confdefs.h"
13971
13972 #include <stdlib.h>
13973 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13974 #ifdef HAVE_INTTYPES_H
13975 #define __BIT_TYPES_DEFINED__
13976 #include <inttypes.h>
13977 typedef uint8_t  u_int8_t;
13978 typedef uint16_t u_int16_t;
13979 typedef uint32_t u_int32_t;
13980 #ifdef WE_DONT_NEED_QUADS
13981 typedef uint64_t u_int64_t;
13982 #endif
13983 #endif
13984 #endif
13985 #include <$header>
13986
13987 int main() {
13988
13989 ; return 0; }
13990 EOF
13991 if { (eval echo configure:13992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13992   rm -rf conftest*
13993   db_h_file="$header"; break
13994 else
13995   echo "configure: failed program was:" >&5
13996   cat conftest.$ac_ext >&5
13997 fi
13998 rm -f conftest*
13999   done
14000   if test -z "$db_h_file"
14001   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14002   else echo "$ac_t""$db_h_file" 1>&6
14003   fi
14004
14005   if test "$with_database_berkdb" != "no"; then
14006     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14007 echo "configure:14008: checking for Berkeley DB version" >&5
14008     cat > conftest.$ac_ext <<EOF
14009 #line 14010 "configure"
14010 #include "confdefs.h"
14011 #include <$db_h_file>
14012 #if DB_VERSION_MAJOR > 1
14013 yes
14014 #endif
14015
14016 EOF
14017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14018   egrep "yes" >/dev/null 2>&1; then
14019   rm -rf conftest*
14020   cat > conftest.$ac_ext <<EOF
14021 #line 14022 "configure"
14022 #include "confdefs.h"
14023 #include <$db_h_file>
14024 #if DB_VERSION_MAJOR > 2
14025 yes
14026 #endif
14027
14028 EOF
14029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14030   egrep "yes" >/dev/null 2>&1; then
14031   rm -rf conftest*
14032   echo "$ac_t""3" 1>&6; dbfunc=db_create
14033 else
14034   rm -rf conftest*
14035   
14036     echo "$ac_t""2" 1>&6; dbfunc=db_open
14037 fi
14038 rm -f conftest*
14039
14040 else
14041   rm -rf conftest*
14042   
14043     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14044 fi
14045 rm -f conftest*
14046
14047     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14048 echo "configure:14049: checking for $dbfunc" >&5
14049
14050 cat > conftest.$ac_ext <<EOF
14051 #line 14052 "configure"
14052 #include "confdefs.h"
14053 /* System header to define __stub macros and hopefully few prototypes,
14054     which can conflict with char $dbfunc(); below.  */
14055 #include <assert.h>
14056 /* Override any gcc2 internal prototype to avoid an error.  */
14057 /* We use char because int might match the return type of a gcc2
14058     builtin and then its argument prototype would still apply.  */
14059 char $dbfunc();
14060
14061 int main() {
14062
14063 /* The GNU C library defines this for functions which it implements
14064     to always fail with ENOSYS.  Some functions are actually named
14065     something starting with __ and the normal name is an alias.  */
14066 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14067 choke me
14068 #else
14069 $dbfunc();
14070 #endif
14071
14072 ; return 0; }
14073 EOF
14074 if { (eval echo configure:14075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14075   rm -rf conftest*
14076   eval "ac_cv_func_$dbfunc=yes"
14077 else
14078   echo "configure: failed program was:" >&5
14079   cat conftest.$ac_ext >&5
14080   rm -rf conftest*
14081   eval "ac_cv_func_$dbfunc=no"
14082 fi
14083 rm -f conftest*
14084
14085 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14086   echo "$ac_t""yes" 1>&6
14087   with_database_berkdb=yes need_libdb=no
14088 else
14089   echo "$ac_t""no" 1>&6
14090
14091     
14092 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14093 echo "configure:14094: checking for $dbfunc in -ldb" >&5
14094 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14095
14096 xe_check_libs=" -ldb "
14097 cat > conftest.$ac_ext <<EOF
14098 #line 14099 "configure"
14099 #include "confdefs.h"
14100 /* Override any gcc2 internal prototype to avoid an error.  */
14101 /* We use char because int might match the return type of a gcc2
14102     builtin and then its argument prototype would still apply.  */
14103 char $dbfunc();
14104
14105 int main() {
14106 $dbfunc()
14107 ; return 0; }
14108 EOF
14109 if { (eval echo configure:14110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14110   rm -rf conftest*
14111   eval "ac_cv_lib_$ac_lib_var=yes"
14112 else
14113   echo "configure: failed program was:" >&5
14114   cat conftest.$ac_ext >&5
14115   rm -rf conftest*
14116   eval "ac_cv_lib_$ac_lib_var=no"
14117 fi
14118 rm -f conftest*
14119 xe_check_libs=""
14120
14121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14122   echo "$ac_t""yes" 1>&6
14123   with_database_berkdb=yes need_libdb=yes
14124 else
14125   echo "$ac_t""no" 1>&6
14126 fi
14127
14128
14129 fi
14130
14131   fi
14132
14133   if test "$with_database_berkdb" = "yes"; then
14134     { test "$extra_verbose" = "yes" && cat << EOF
14135     Defining DB_H_FILE = "$db_h_file"
14136 EOF
14137 cat >> confdefs.h <<EOF
14138 #define DB_H_FILE "$db_h_file"
14139 EOF
14140 }
14141
14142     { test "$extra_verbose" = "yes" && cat << \EOF
14143     Defining HAVE_BERKELEY_DB
14144 EOF
14145 cat >> confdefs.h <<\EOF
14146 #define HAVE_BERKELEY_DB 1
14147 EOF
14148 }
14149
14150     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14151   else with_database_berkdb=no
14152   fi
14153 fi
14154
14155 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14156      != "no no no"; then
14157   { test "$extra_verbose" = "yes" && cat << \EOF
14158     Defining HAVE_DATABASE
14159 EOF
14160 cat >> confdefs.h <<\EOF
14161 #define HAVE_DATABASE 1
14162 EOF
14163 }
14164
14165   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14166    echo "    xemacs will be linked with \"database.o\""
14167  fi
14168   if test "$with_utf_2000" = "yes"; then
14169     { test "$extra_verbose" = "yes" && cat << \EOF
14170     Defining HAVE_CHISE_CLIENT
14171 EOF
14172 cat >> confdefs.h <<\EOF
14173 #define HAVE_CHISE_CLIENT 1
14174 EOF
14175 }
14176
14177   fi
14178 fi
14179
14180 if test "$with_socks" = "yes"; then
14181   
14182 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14183 echo "configure:14184: checking for SOCKSinit in -lsocks" >&5
14184 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14185
14186 xe_check_libs=" -lsocks "
14187 cat > conftest.$ac_ext <<EOF
14188 #line 14189 "configure"
14189 #include "confdefs.h"
14190 /* Override any gcc2 internal prototype to avoid an error.  */
14191 /* We use char because int might match the return type of a gcc2
14192     builtin and then its argument prototype would still apply.  */
14193 char SOCKSinit();
14194
14195 int main() {
14196 SOCKSinit()
14197 ; return 0; }
14198 EOF
14199 if { (eval echo configure:14200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14200   rm -rf conftest*
14201   eval "ac_cv_lib_$ac_lib_var=yes"
14202 else
14203   echo "configure: failed program was:" >&5
14204   cat conftest.$ac_ext >&5
14205   rm -rf conftest*
14206   eval "ac_cv_lib_$ac_lib_var=no"
14207 fi
14208 rm -f conftest*
14209 xe_check_libs=""
14210
14211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14212   echo "$ac_t""yes" 1>&6
14213     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14214     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14215   { test "$extra_verbose" = "yes" && cat << EOF
14216     Defining $ac_tr_lib
14217 EOF
14218 cat >> confdefs.h <<EOF
14219 #define $ac_tr_lib 1
14220 EOF
14221 }
14222
14223   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14224
14225 else
14226   echo "$ac_t""no" 1>&6
14227 fi
14228
14229
14230   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14231     Defining HAVE_SOCKS
14232 EOF
14233 cat >> confdefs.h <<\EOF
14234 #define HAVE_SOCKS 1
14235 EOF
14236 }
14237
14238 fi
14239
14240 if test "$usage_tracking" = "yes"; then
14241   { test "$extra_verbose" = "yes" && cat << \EOF
14242     Defining USAGE_TRACKING
14243 EOF
14244 cat >> confdefs.h <<\EOF
14245 #define USAGE_TRACKING 1
14246 EOF
14247 }
14248
14249   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14250 fi
14251
14252 if test "$with_modules" != "no"; then
14253   echo "checking for module support" 1>&6
14254 echo "configure:14255: checking for module support" >&5
14255
14256     if test "$with_msw" = "yes"; then
14257     have_dl=yes;
14258   else
14259         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14260 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14261 echo "configure:14262: checking for dlfcn.h" >&5
14262
14263 cat > conftest.$ac_ext <<EOF
14264 #line 14265 "configure"
14265 #include "confdefs.h"
14266 #include <dlfcn.h>
14267 EOF
14268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14269 { (eval echo configure:14270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14271 if test -z "$ac_err"; then
14272   rm -rf conftest*
14273   eval "ac_cv_header_$ac_safe=yes"
14274 else
14275   echo "$ac_err" >&5
14276   echo "configure: failed program was:" >&5
14277   cat conftest.$ac_ext >&5
14278   rm -rf conftest*
14279   eval "ac_cv_header_$ac_safe=no"
14280 fi
14281 rm -f conftest*
14282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14283   echo "$ac_t""yes" 1>&6
14284   
14285       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14286 echo "configure:14287: checking for dlopen in -lc" >&5
14287       cat > conftest.$ac_ext <<EOF
14288 #line 14289 "configure"
14289 #include "confdefs.h"
14290 #include <dlfcn.h>
14291 int main() {
14292         dlopen ("", 0);
14293 ; return 0; }
14294 EOF
14295 if { (eval echo configure:14296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14296   rm -rf conftest*
14297    have_dl=yes 
14298 else
14299   echo "configure: failed program was:" >&5
14300   cat conftest.$ac_ext >&5
14301   rm -rf conftest*
14302   
14303       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14304 echo "configure:14305: checking for dlopen in -ldl" >&5
14305       ac_save_LIBS="$LIBS"
14306       LIBS="-ldl $LIBS"
14307       cat > conftest.$ac_ext <<EOF
14308 #line 14309 "configure"
14309 #include "confdefs.h"
14310 #include <dlfcn.h>
14311 int main() {
14312         dlopen ("", 0);
14313 ; return 0; }
14314 EOF
14315 if { (eval echo configure:14316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14316   rm -rf conftest*
14317    have_dl=yes 
14318 else
14319   echo "configure: failed program was:" >&5
14320   cat conftest.$ac_ext >&5
14321   rm -rf conftest*
14322   LIBS="$ac_save_LIBS"
14323 fi
14324 rm -f conftest*
14325       ac_save_LIBS=
14326 fi
14327 rm -f conftest*
14328 else
14329   echo "$ac_t""no" 1>&6
14330 fi
14331
14332     if test -n "$have_dl"; then
14333       { test "$extra_verbose" = "yes" && cat << \EOF
14334     Defining HAVE_DLOPEN
14335 EOF
14336 cat >> confdefs.h <<\EOF
14337 #define HAVE_DLOPEN 1
14338 EOF
14339 }
14340
14341     else
14342       
14343 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14344 echo "configure:14345: checking for shl_load in -ldld" >&5
14345 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14346
14347 xe_check_libs=" -ldld "
14348 cat > conftest.$ac_ext <<EOF
14349 #line 14350 "configure"
14350 #include "confdefs.h"
14351 /* Override any gcc2 internal prototype to avoid an error.  */
14352 /* We use char because int might match the return type of a gcc2
14353     builtin and then its argument prototype would still apply.  */
14354 char shl_load();
14355
14356 int main() {
14357 shl_load()
14358 ; return 0; }
14359 EOF
14360 if { (eval echo configure:14361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14361   rm -rf conftest*
14362   eval "ac_cv_lib_$ac_lib_var=yes"
14363 else
14364   echo "configure: failed program was:" >&5
14365   cat conftest.$ac_ext >&5
14366   rm -rf conftest*
14367   eval "ac_cv_lib_$ac_lib_var=no"
14368 fi
14369 rm -f conftest*
14370 xe_check_libs=""
14371
14372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14373   echo "$ac_t""yes" 1>&6
14374   libdl=dld have_dl=yes;
14375         { test "$extra_verbose" = "yes" && cat << \EOF
14376     Defining HAVE_SHL_LOAD
14377 EOF
14378 cat >> confdefs.h <<\EOF
14379 #define HAVE_SHL_LOAD 1
14380 EOF
14381 }
14382
14383 else
14384   echo "$ac_t""no" 1>&6
14385
14386 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14387 echo "configure:14388: checking for dld_init in -ldld" >&5
14388 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14389
14390 xe_check_libs=" -ldld "
14391 cat > conftest.$ac_ext <<EOF
14392 #line 14393 "configure"
14393 #include "confdefs.h"
14394 /* Override any gcc2 internal prototype to avoid an error.  */
14395 /* We use char because int might match the return type of a gcc2
14396     builtin and then its argument prototype would still apply.  */
14397 char dld_init();
14398
14399 int main() {
14400 dld_init()
14401 ; return 0; }
14402 EOF
14403 if { (eval echo configure:14404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14404   rm -rf conftest*
14405   eval "ac_cv_lib_$ac_lib_var=yes"
14406 else
14407   echo "configure: failed program was:" >&5
14408   cat conftest.$ac_ext >&5
14409   rm -rf conftest*
14410   eval "ac_cv_lib_$ac_lib_var=no"
14411 fi
14412 rm -f conftest*
14413 xe_check_libs=""
14414
14415 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14416   echo "$ac_t""yes" 1>&6
14417   libdl=dld have_dl=yes;
14418         { test "$extra_verbose" = "yes" && cat << \EOF
14419     Defining HAVE_DLD_INIT
14420 EOF
14421 cat >> confdefs.h <<\EOF
14422 #define HAVE_DLD_INIT 1
14423 EOF
14424 }
14425
14426 else
14427   echo "$ac_t""no" 1>&6
14428 fi
14429
14430
14431 fi
14432
14433
14434     fi
14435   fi 
14436   if test -n "$have_dl"; then
14437         
14438 dll_ld=
14439 dll_ldflags=
14440 dll_cflags=
14441 dll_post=
14442 dll_ldo="-o"
14443 ld_dynamic_link_flags=
14444 xehost=$canonical
14445 xealias=$internal_configuration
14446
14447 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14448 echo "configure:14449: checking how to build dynamic libraries for ${xehost}" >&5
14449 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14450 case "$xehost" in
14451 *-*-linux-gnu*) ;;
14452 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14453 esac
14454
14455 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14456 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14457 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14458
14459 case "$xehost_os" in
14460 aix3*)
14461   # AIX sometimes has problems with the GCC collect2 program.  For some
14462   # reason, if we set the COLLECT_NAMES environment variable, the problems
14463   # vanish in a puff of smoke.
14464   if test "${COLLECT_NAMES+set}" != set; then
14465     COLLECT_NAMES=
14466     export COLLECT_NAMES
14467   fi
14468   ;;
14469 esac
14470
14471 # Now see if the compiler is really GCC.
14472 if test "$GCC" = "yes"; then
14473   XEGCC=yes
14474 else
14475   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14476 echo "configure:14477: checking checking whether we are using GNU C" >&5
14477   cat > conftest.$ac_ext <<EOF
14478 #line 14479 "configure"
14479 #include "confdefs.h"
14480
14481 #ifdef __GNUC__
14482   yes;
14483 #endif
14484
14485 EOF
14486 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14487   egrep "yes" >/dev/null 2>&1; then
14488   rm -rf conftest*
14489   XEGCC=yes
14490 else
14491   rm -rf conftest*
14492   XEGCC=no
14493 fi
14494 rm -f conftest*
14495
14496   echo "$ac_t""${XEGCC}" 1>&6
14497 fi
14498
14499 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14500 echo "configure:14501: checking how to produce PIC code" >&5
14501 wl=
14502
14503 can_build_shared=yes
14504 if test "$XEGCC" = yes; then
14505   wl='-Wl,'
14506
14507   case "$xehost_os" in
14508   aix[3-9]* | irix[5-9]* | osf[3-9])
14509     # PIC is the default for these OSes.
14510     ;;
14511
14512   os2*)
14513     # We can build DLLs from non-PIC.
14514     ;;
14515   amigaos*)
14516     # FIXME: we need at least 68020 code to build shared libraries, but
14517     # adding the `-m68020' flag to GCC prevents building anything better,
14518     # like `-m68040'.
14519     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14520     ;;
14521   *cygwin* | *mingw* )
14522     # PIC is the default
14523     ;;
14524   *)
14525     dll_cflags='-fPIC'
14526     ;;
14527   esac
14528 else
14529   # PORTME Check for PIC flags for the system compiler.
14530   case "$xehost_os" in
14531   hpux9* | hpux1[0-9]*)
14532     # Is there a better link_static_flag that works with the bundled CC?
14533     wl='-Wl,'
14534     dll_cflags='+Z'
14535     ;;
14536
14537   irix[5-9]*)
14538     wl='-Wl,'
14539     # PIC (with -KPIC) is the default.
14540     ;;
14541
14542   os2*)
14543     # We can build DLLs from non-PIC.
14544     ;;
14545
14546   osf[3-9]*)
14547     # All OSF/1 code is PIC.
14548     wl='-Wl,'
14549     ;;
14550
14551   aix[3-9]*)
14552     # All AIX code is PIC.
14553     wl='-Wl,'
14554     ;;
14555
14556   sco3.2v5*)
14557     dll_cflags='-belf -Kpic'
14558     wl='-Wl,'
14559     ;;
14560
14561   unixware*)
14562     dll_cflags="-KPIC"
14563     wl="-Wl,"
14564     ;;
14565
14566   sysv4*)
14567     dll_cflags="-KPIC"
14568     wl="-Wl,"
14569     ;;
14570
14571   sysv5*)
14572     dll_cflags="-KPIC"
14573     wl="-Wl,"
14574     ;;
14575
14576   solaris2*)
14577     dll_cflags='-KPIC'
14578     wl='-Wl,'
14579     ;;
14580
14581   sunos4*)
14582     dll_cflags='-PIC'
14583     wl='-Qoption ld '
14584     ;;
14585
14586   uts4*)
14587     dll_cflags='-pic'
14588     ;;
14589
14590   *)
14591     can_build_shared=no
14592     ;;
14593   esac
14594 fi
14595
14596 if test -n "$dll_cflags"; then
14597   echo "$ac_t""${dll_cflags}" 1>&6
14598
14599   # Check to make sure the dll_cflags actually works.
14600   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14601 echo "configure:14602: checking if PIC flag ${dll_cflags} really works" >&5
14602   save_CFLAGS="$CFLAGS"
14603   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14604   cat > conftest.$ac_ext <<EOF
14605 #line 14606 "configure"
14606 #include "confdefs.h"
14607
14608 int main() {
14609 int x=0;
14610 ; return 0; }
14611 EOF
14612 if { (eval echo configure:14613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14613   rm -rf conftest*
14614   
14615     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14616     # reports no error.  So, we need to grep stderr for (Bundled).
14617     if grep '(Bundled)' config.log >/dev/null; then
14618       echo "$ac_t""no" 1>&6
14619       can_build_shared=no
14620       dll_cflags=
14621     else
14622       echo "$ac_t""yes" 1>&6
14623     fi
14624 else
14625   echo "configure: failed program was:" >&5
14626   cat conftest.$ac_ext >&5
14627   rm -rf conftest*
14628   echo "$ac_t""no" 1>&6
14629     can_build_shared=no
14630     dll_cflags=
14631 fi
14632 rm -f conftest*
14633   CFLAGS="$save_CFLAGS"
14634 else
14635   echo "$ac_t""none" 1>&6
14636 fi
14637
14638 if test "$can_build_shared" = "yes"; then
14639 cc_produces_so=no
14640 xldf=
14641 xcldf=
14642 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14643 echo "configure:14644: checking if C compiler can produce shared libraries" >&5
14644 if test "$XEGCC" = yes; then
14645   xcldf="-shared"
14646   xldf="-shared"
14647 else # Not using GCC
14648   case "$xehost_os" in
14649     aix[3-9]*)
14650       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14651       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14652       ;;
14653
14654     freebsd2* | netbsd* | openbsd*)
14655       xldf="-Bshareable"
14656       xcldf="${wl}-Bshareable"
14657       ;;
14658
14659     freebsd3*)
14660       xcldf="-shared"
14661       ;;
14662
14663     hpux*)
14664       xldf="-b +s"
14665       xcldf="${wl}-b ${wl}+s"
14666       ;;
14667
14668     irix[5-9]* | osf[3-9]*)
14669       xcldf="${wl}-shared"
14670       xldf="-shared"
14671       ;;
14672
14673     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14674       xcldf="-G"
14675       xldf="-G"
14676       ;;
14677
14678     sunos4*)
14679       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14680       xldf="-assert pure-text -Bstatic"
14681       ;;
14682   esac
14683 fi # End if if we are using gcc
14684
14685 if test -n "$xcldf"; then
14686   save_LDFLAGS=$LDFLAGS
14687   save_LIBS=$LIBS
14688   save_xe_libs=$xe_libs
14689   LDFLAGS="$xcldf $LDFLAGS"
14690   LIBS=
14691   xe_libs=
14692   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14693   cat > conftest.$ac_ext <<EOF
14694 #line 14695 "configure"
14695 #include "confdefs.h"
14696
14697 int main() {
14698 int x=0;
14699 ; return 0; }
14700 EOF
14701 if { (eval echo configure:14702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14702   rm -rf conftest*
14703   cc_produces_so=yes
14704 else
14705   echo "configure: failed program was:" >&5
14706   cat conftest.$ac_ext >&5
14707   rm -rf conftest*
14708   cc_produces_so=no
14709 fi
14710 rm -f conftest*
14711   LDFLAGS=$save_LDFLAGS
14712   LIBS=$save_LIBS
14713   xe_libs=$save_xe_libs
14714   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14715 else
14716   cc_produces_so=no
14717 fi
14718 echo "$ac_t""${cc_produces_so}" 1>&6
14719
14720 LTLD=$LD
14721 if test -z "$LTLD"; then
14722   ac_prog=ld
14723   if test "$XEGCC" = yes; then
14724     # Check if gcc -print-prog-name=ld gives a path.
14725     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14726 echo "configure:14727: checking for ld used by GCC" >&5
14727     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14728     case "$ac_prog" in
14729     # Accept absolute paths.
14730     /*)
14731       if test -z "$LTLD"; then
14732 #        case "$ac_prog" in
14733 #          *gcc-lib*) LTLD="$CC"
14734 #                     ;;
14735 #          *)
14736          LTLD="$ac_prog"
14737 #                     ;;
14738 #        esac
14739       fi
14740       ;;
14741     "")
14742       # If it fails, then pretend we aren't using GCC.
14743       ac_prog=ld
14744       ;;
14745     *)
14746       # If it is relative, then search for the first ld in PATH.
14747       with_gnu_ld=unknown
14748       ;;
14749     esac
14750   else
14751     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14752 echo "configure:14753: checking for GNU ld" >&5
14753   fi
14754
14755   if test -z "$LTLD"; then
14756     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14757     for ac_dir in $PATH; do
14758       test -z "$ac_dir" && ac_dir=.
14759       if test -f "$ac_dir/$ac_prog"; then
14760         LTLD="$ac_dir/$ac_prog"
14761         # Check to see if the program is GNU ld.  I'd rather use --version,
14762         # but apparently some GNU ld's only accept -v.
14763         # Break only if it was the GNU/non-GNU ld that we prefer.
14764         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14765           xe_gnu_ld=yes
14766         else
14767           xe_gnu_ld=no
14768         fi
14769       fi
14770     done
14771     IFS="$ac_save_ifs"
14772   fi
14773
14774   if test -n "$LTLD"; then
14775     echo "$ac_t""${LTLD}" 1>&6
14776   else
14777     echo "$ac_t""no" 1>&6
14778   fi
14779
14780   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14781     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14782     exit 1
14783   fi
14784 fi
14785
14786 ld_dynamic_link_flags=
14787
14788 # Check to see if it really is or isn't GNU ld.
14789 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14790 echo "configure:14791: checking if the linker is GNU ld" >&5
14791 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14792 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14793   xe_gnu_ld=yes
14794 else
14795   xe_gnu_ld=no
14796 fi
14797 echo "$ac_t""${xe_gnu_ld}" 1>&6
14798
14799 case "$xehost_os" in
14800   amigaos* | sunos4*)
14801     # On these operating systems, we should treat GNU ld like the system ld.
14802     gnu_ld_acts_native=yes
14803     ;;
14804   *)
14805     gnu_ld_acts_native=no
14806     ;;
14807 esac
14808
14809 if test "$cc_produces_so" = "yes"; then
14810   dll_ld=$CC
14811   dll_ldflags=$xcldf
14812   can_build_shared=yes
14813   ld_shlibs=yes
14814 else
14815   # OK - only NOW do we futz about with ld.
14816   # See if the linker supports building shared libraries.
14817   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14818 echo "configure:14819: checking whether the linker supports shared libraries" >&5
14819   dll_ld=$CC
14820   dll_ldflags=$LDFLAGS
14821   ld_shlibs=yes
14822   can_build_shared=yes
14823   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14824     # See if GNU ld supports shared libraries.
14825     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14826       dll_ld=$CC
14827       dll_ldflags="-shared"
14828       ld_shlibs=yes
14829     else
14830       ld_shlibs=no
14831     fi
14832   else
14833     # PORTME fill in a description of your system's linker (not GNU ld)
14834     case "$xehost_os" in
14835     aix3*)
14836       dll_ld=$LTLD
14837       dll_ldflags=$xldf
14838       ;;
14839
14840     aix[4-9]*)
14841       dll_ldflags=$xcldf
14842       ;;
14843
14844     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14845     # support.  Future versions do this automatically, but an explicit c++rt0.o
14846     # doesn't break anything, and helps significantly (at the cost of a little
14847     # extra space).
14848     freebsd2.2*)
14849       dll_ld=$LTLD
14850       dll_ldflags=$xldf
14851       dll_post="/usr/lib/c++rt0.o"
14852       ;;
14853
14854     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14855     freebsd2*)
14856       dll_ld=$LTLD
14857       dll_ldflags="-Bshareable"
14858       ;;
14859
14860     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14861     freebsd3*)
14862       dll_ldflags="-shared"
14863       ;;
14864
14865     hpux*)
14866       dll_ld=$LTLD
14867       dll_ldflags=$xldf
14868       ;;
14869
14870     irix[5-9]*)
14871       dll_ld=$LTLD
14872       dll_ldflags=$xldf
14873       ;;
14874
14875     netbsd*)
14876       # Tested with NetBSD 1.2 ld
14877       dll_ld=$LTLD
14878       dll_ldflags=$xldf
14879       ;;
14880
14881     openbsd*)
14882       dll_ld=$LTLD
14883       dll_ldflags=$xldf
14884       ;;
14885
14886     osf3* | osf4*)
14887       dll_ld=$LTLD
14888       dll_ldflags=$xldf
14889       ;;
14890
14891     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14892     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14893       dll_ld=$LTLD
14894       case "$dll_ld" in
14895         *gcc*) dll_ldflags="-shared"
14896                dll_ld=$CC
14897                ;;
14898         *)     dll_ldflags="-G"
14899                ;;
14900       esac
14901       ;;
14902
14903     sunos4*)
14904       if test "$XEGCC" = yes; then
14905         dll_ld=$CC
14906       else
14907         dll_ld=$LTLD
14908       fi
14909       dll_ldflags=$xldf
14910       ;;
14911
14912     uts4*)
14913       dll_ld=$LTLD
14914       dll_ldflags="-G"
14915       ;;
14916
14917     bsdi*)
14918       dll_ldflags="-r"
14919       dll_ld="shlicc2"
14920       ;;
14921
14922     *)
14923       ld_shlibs=no
14924       can_build_shared=no
14925       ;;
14926     esac
14927   fi
14928   echo "$ac_t""${ld_shlibs}" 1>&6
14929   if test "$ld_shlibs" = "no"; then
14930     can_build_shared=no
14931   fi
14932 fi # End of if cc_produces_so = no
14933
14934
14935 if test "$xe_gnu_ld" = yes; then
14936   if test "$ld_shlibs" = yes; then
14937     ld_dynamic_link_flags="${wl}-export-dynamic"
14938   fi
14939 fi
14940
14941 if test -z "$ld_dynamic_link_flags"; then
14942   case "$xehost_os" in
14943   aix[3-9]*)
14944     ld_dynamic_link_flags=
14945     ;;
14946
14947   freebsd2.2*)
14948     ld_dynamic_link_flags=
14949     ;;
14950
14951   freebsd2*)
14952     ld_dynamic_link_flags=
14953     ;;
14954
14955   freebsd3*)
14956     ld_dynamic_link_flags=
14957     ;;
14958
14959   hpux*)
14960     ld_dynamic_link_flags="${wl}-E"
14961     ;;
14962
14963   irix[5-9]*)
14964     ld_dynamic_link_flags=
14965     ;;
14966
14967   netbsd*)
14968     ld_dynamic_link_flags=
14969     ;;
14970
14971   openbsd*)
14972     ld_dynamic_link_flags=
14973     ;;
14974
14975   osf3* | osf4*)
14976     ld_dynamic_link_flags=
14977     ;;
14978
14979   solaris2* | solaris7*)
14980     ld_dynamic_link_flags=
14981     ;;
14982
14983   sco3.2v5* | unixware* | sysv5* | sysv4*)
14984     ld_dynamic_link_flags="${wl}-Bexport"
14985     ;;
14986
14987   sunos4*)
14988     ld_dynamic_link_flags=
14989     ;;
14990
14991   uts4*)
14992     ld_dynamic_link_flags=
14993     ;;
14994
14995   bsdi*)
14996     ld_dynamic_link_flags=
14997     ;;
14998
14999   esac
15000 fi # End of if -z ld_dynamic_link_flags
15001 fi # End of if test "$can_build_shared" = "yes"
15002
15003
15004
15005
15006
15007
15008
15009
15010   fi
15011
15012   if test "$can_build_shared" = "yes"; then
15013     { test "$extra_verbose" = "yes" && cat << \EOF
15014     Defining HAVE_SHLIB
15015 EOF
15016 cat >> confdefs.h <<\EOF
15017 #define HAVE_SHLIB 1
15018 EOF
15019 }
15020
15021     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15022    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15023  fi
15024     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15025     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15026     for ac_func in dlerror _dlerror
15027 do
15028 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15029 echo "configure:15030: checking for $ac_func" >&5
15030
15031 cat > conftest.$ac_ext <<EOF
15032 #line 15033 "configure"
15033 #include "confdefs.h"
15034 /* System header to define __stub macros and hopefully few prototypes,
15035     which can conflict with char $ac_func(); below.  */
15036 #include <assert.h>
15037 /* Override any gcc2 internal prototype to avoid an error.  */
15038 /* We use char because int might match the return type of a gcc2
15039     builtin and then its argument prototype would still apply.  */
15040 char $ac_func();
15041
15042 int main() {
15043
15044 /* The GNU C library defines this for functions which it implements
15045     to always fail with ENOSYS.  Some functions are actually named
15046     something starting with __ and the normal name is an alias.  */
15047 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15048 choke me
15049 #else
15050 $ac_func();
15051 #endif
15052
15053 ; return 0; }
15054 EOF
15055 if { (eval echo configure:15056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15056   rm -rf conftest*
15057   eval "ac_cv_func_$ac_func=yes"
15058 else
15059   echo "configure: failed program was:" >&5
15060   cat conftest.$ac_ext >&5
15061   rm -rf conftest*
15062   eval "ac_cv_func_$ac_func=no"
15063 fi
15064 rm -f conftest*
15065
15066 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15067   echo "$ac_t""yes" 1>&6
15068     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15069   { test "$extra_verbose" = "yes" && cat << EOF
15070     Defining $ac_tr_func
15071 EOF
15072 cat >> confdefs.h <<EOF
15073 #define $ac_tr_func 1
15074 EOF
15075 }
15076  
15077 else
15078   echo "$ac_t""no" 1>&6
15079 fi
15080 done
15081
15082     with_modules=yes
15083   else
15084     if test "$with_modules" = "yes"; then
15085       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15086     else
15087       echo "configure: warning: "Module support cannot be provided."" 1>&2
15088     fi
15089     with_modules=no
15090   fi
15091 fi
15092
15093 cat > conftest.$ac_ext <<EOF
15094 #line 15095 "configure"
15095 #include "confdefs.h"
15096 int main(int c,char *v[]){return 0;}
15097 EOF
15098 if { (eval echo configure:15099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15099 then
15100   :
15101 else
15102   conftest_rc="$?"
15103   echo "configure: failed program was:" >&5
15104   cat conftest.$ac_ext >&5
15105   rm -fr conftest*
15106   
15107   echo ""
15108   echo "*** PANIC *** The C compiler can no longer build working executables."
15109   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15110   echo "*** PANIC *** The most likely reason for this problem is that configure"
15111   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15112   echo "*** PANIC *** found at run time."
15113   echo "*** PANIC ***"
15114   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15115   echo "*** PANIC *** On other systems, try telling configure where to find the"
15116   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15117   echo "*** PANIC ***"
15118   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15119   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15120   echo "*** PANIC *** on your system.  Don't do that."
15121   exit 1
15122 fi
15123 rm -fr conftest*
15124
15125 if test "$win32_processes" = "yes"; then
15126   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15127    echo "    xemacs will be linked with \"process-nt.o\""
15128  fi
15129 else
15130   { test "$extra_verbose" = "yes" && cat << \EOF
15131     Defining HAVE_UNIX_PROCESSES
15132 EOF
15133 cat >> confdefs.h <<\EOF
15134 #define HAVE_UNIX_PROCESSES 1
15135 EOF
15136 }
15137
15138   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15139    echo "    xemacs will be linked with \"process-unix.o\""
15140  fi
15141 fi
15142
15143
15144
15145 T=""
15146 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15147 CFLAGS="$T"
15148
15149
15150 T=""
15151 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15152 extra_objs="$T"
15153
15154
15155 T=""
15156 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
15157 c_switch_general="$T"
15158
15159
15160 T=""
15161 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
15162 c_switch_window_system="$T"
15163
15164
15165 T=""
15166 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15167 c_switch_all="$T"
15168
15169
15170 T=""
15171 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
15172 ld_switch_general="$T"
15173
15174
15175 T=""
15176 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15177 ld_switch_window_system="$T"
15178
15179
15180 T=""
15181 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15182 ld_switch_all="$T"
15183
15184
15185 T=""
15186 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15187 ld_libs_general="$T"
15188
15189
15190 T=""
15191 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
15192 ld_libs_window_system="$T"
15193
15194
15195 T=""
15196 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15197 ld_libs_all="$T"
15198
15199
15200
15201 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15202 internal_makefile_list="Makefile.in"
15203 SUBDIR_MAKEFILES=''
15204 test -d lock || mkdir lock
15205 for dir in $MAKE_SUBDIR; do
15206   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15207         test -d "$d" || mkdir "$d"; cd "$d"
15208       done ) ;;
15209    * ) test -d "$dir" || mkdir "$dir" ;;
15210   esac
15211   
15212 T=""
15213 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15214 SUBDIR_MAKEFILES="$T"
15215
15216   
15217 T=""
15218 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15219 internal_makefile_list="$T"
15220
15221 done
15222
15223
15224
15225
15226 for dir in src/s src/m; do
15227   if test ! -d "$dir" ; then
15228     echo Making symbolic link to "$srcdir/$dir"
15229     ${LN_S} "$srcdir/$dir" "$dir"
15230   fi
15231 done
15232
15233 if test "$extra_verbose" = "yes"; then
15234   echo ""
15235   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
15236   echo ""
15237 fi
15238
15239
15240 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15241   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15242   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15243 fi
15244
15245 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15246   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15247   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15248 fi
15249
15250 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15251   test "$extra_verbose" = "yes" && echo "creating TAGS"
15252   echo "\f
15253 $srcdir/TAGS,include" > "TAGS"
15254 fi
15255
15256 if test "$__SUNPRO_C" = "yes"; then
15257   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15258   ( echo "# For use with Sun WorkShop's Source browser."
15259     echo "# See sbquery(1) and sbinit(4) for more information"
15260     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15261   ) > .sbinit
15262 fi
15263
15264 rm -f core
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285 PREFIX=$prefix
15286 while true; do
15287   case "$PREFIX" in
15288     *\$* ) eval "PREFIX=$PREFIX" ;;
15289     *) break ;;
15290   esac
15291 done
15292
15293
15294
15295
15296 EXEC_PREFIX=$exec_prefix
15297 while true; do
15298   case "$EXEC_PREFIX" in
15299     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15300     *) break ;;
15301   esac
15302 done
15303
15304
15305
15306
15307 INFODIR=$infodir
15308 while true; do
15309   case "$INFODIR" in
15310     *\$* ) eval "INFODIR=$INFODIR" ;;
15311     *) break ;;
15312   esac
15313 done
15314
15315
15316
15317
15318 INFOPATH=$infopath
15319 while true; do
15320   case "$INFOPATH" in
15321     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15322     *) break ;;
15323   esac
15324 done
15325
15326
15327
15328
15329 PACKAGE_PATH=$package_path
15330 while true; do
15331   case "$PACKAGE_PATH" in
15332     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15333     *) break ;;
15334   esac
15335 done
15336
15337
15338
15339
15340 LISPDIR=$lispdir
15341 while true; do
15342   case "$LISPDIR" in
15343     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15344     *) break ;;
15345   esac
15346 done
15347
15348
15349
15350
15351 MODULEDIR=$moduledir
15352 while true; do
15353   case "$MODULEDIR" in
15354     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15355     *) break ;;
15356   esac
15357 done
15358
15359
15360
15361
15362 SITELISPDIR=$sitelispdir
15363 while true; do
15364   case "$SITELISPDIR" in
15365     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15366     *) break ;;
15367   esac
15368 done
15369
15370
15371
15372
15373 SITEMODULEDIR=$sitemoduledir
15374 while true; do
15375   case "$SITEMODULEDIR" in
15376     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15377     *) break ;;
15378   esac
15379 done
15380
15381
15382
15383
15384 ETCDIR=$etcdir
15385 while true; do
15386   case "$ETCDIR" in
15387     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15388     *) break ;;
15389   esac
15390 done
15391
15392
15393
15394
15395 DOCDIR=$docdir
15396 while true; do
15397   case "$DOCDIR" in
15398     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15399     *) break ;;
15400   esac
15401 done
15402
15403
15404
15405
15406 ARCHLIBDIR=$archlibdir
15407 while true; do
15408   case "$ARCHLIBDIR" in
15409     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15410     *) break ;;
15411   esac
15412 done
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15434
15435
15436
15437
15438
15439
15440
15441 : ${XEMACS_CC:=$CC}
15442
15443
15444 if test "$with_prefix" = "yes"; then
15445   { test "$extra_verbose" = "yes" && cat << \EOF
15446     Defining PREFIX_USER_DEFINED
15447 EOF
15448 cat >> confdefs.h <<\EOF
15449 #define PREFIX_USER_DEFINED 1
15450 EOF
15451 }
15452
15453 fi
15454
15455 if test "$with_site_lisp" = "no"; then
15456   { test "$extra_verbose" = "yes" && cat << \EOF
15457     Defining INHIBIT_SITE_LISP
15458 EOF
15459 cat >> confdefs.h <<\EOF
15460 #define INHIBIT_SITE_LISP 1
15461 EOF
15462 }
15463
15464 fi
15465 if test "$with_site_modules" = "no"; then
15466   { test "$extra_verbose" = "yes" && cat << \EOF
15467     Defining INHIBIT_SITE_MODULES
15468 EOF
15469 cat >> confdefs.h <<\EOF
15470 #define INHIBIT_SITE_MODULES 1
15471 EOF
15472 }
15473
15474 fi
15475
15476
15477 T=""
15478 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15479 ac_configure_args="$T"
15480
15481 { test "$extra_verbose" = "yes" && cat << EOF
15482     Defining EMACS_CONFIGURATION = "$configuration"
15483 EOF
15484 cat >> confdefs.h <<EOF
15485 #define EMACS_CONFIGURATION "$configuration"
15486 EOF
15487 }
15488
15489 { test "$extra_verbose" = "yes" && cat << EOF
15490     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15491 EOF
15492 cat >> confdefs.h <<EOF
15493 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15494 EOF
15495 }
15496
15497
15498
15499 null_string=""
15500 { test "$extra_verbose" = "yes" && cat << EOF
15501     Defining LD_SWITCH_X_SITE = $null_string
15502 EOF
15503 cat >> confdefs.h <<EOF
15504 #define LD_SWITCH_X_SITE $null_string
15505 EOF
15506 }
15507
15508 { test "$extra_verbose" = "yes" && cat << EOF
15509     Defining LD_SWITCH_X_SITE_AUX = $null_string
15510 EOF
15511 cat >> confdefs.h <<EOF
15512 #define LD_SWITCH_X_SITE_AUX $null_string
15513 EOF
15514 }
15515
15516 { test "$extra_verbose" = "yes" && cat << EOF
15517     Defining C_SWITCH_X_SITE = $null_string
15518 EOF
15519 cat >> confdefs.h <<EOF
15520 #define C_SWITCH_X_SITE $null_string
15521 EOF
15522 }
15523
15524 { test "$extra_verbose" = "yes" && cat << EOF
15525     Defining LD_SWITCH_SITE = $null_string
15526 EOF
15527 cat >> confdefs.h <<EOF
15528 #define LD_SWITCH_SITE $null_string
15529 EOF
15530 }
15531
15532 { test "$extra_verbose" = "yes" && cat << EOF
15533     Defining C_SWITCH_SITE = $null_string
15534 EOF
15535 cat >> confdefs.h <<EOF
15536 #define C_SWITCH_SITE $null_string
15537 EOF
15538 }
15539
15540
15541
15542 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15543     Defining GNU_MALLOC
15544 EOF
15545 cat >> confdefs.h <<\EOF
15546 #define GNU_MALLOC 1
15547 EOF
15548 }
15549
15550 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15551     Defining USE_SYSTEM_MALLOC
15552 EOF
15553 cat >> confdefs.h <<\EOF
15554 #define USE_SYSTEM_MALLOC 1
15555 EOF
15556 }
15557
15558 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15559     Defining USE_DEBUG_MALLOC
15560 EOF
15561 cat >> confdefs.h <<\EOF
15562 #define USE_DEBUG_MALLOC 1
15563 EOF
15564 }
15565
15566                                               { test "$extra_verbose" = "yes" && cat << \EOF
15567     Defining USE_SYSTEM_MALLOC
15568 EOF
15569 cat >> confdefs.h <<\EOF
15570 #define USE_SYSTEM_MALLOC 1
15571 EOF
15572 }
15573
15574 fi
15575 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15576     Defining I18N3
15577 EOF
15578 cat >> confdefs.h <<\EOF
15579 #define I18N3 1
15580 EOF
15581 }
15582
15583 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15584     Defining USE_GCC
15585 EOF
15586 cat >> confdefs.h <<\EOF
15587 #define USE_GCC 1
15588 EOF
15589 }
15590
15591 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15592     Defining EXTERNAL_WIDGET
15593 EOF
15594 cat >> confdefs.h <<\EOF
15595 #define EXTERNAL_WIDGET 1
15596 EOF
15597 }
15598
15599 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15600     Defining QUICK_BUILD
15601 EOF
15602 cat >> confdefs.h <<\EOF
15603 #define QUICK_BUILD 1
15604 EOF
15605 }
15606
15607 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15608     Defining PURIFY
15609 EOF
15610 cat >> confdefs.h <<\EOF
15611 #define PURIFY 1
15612 EOF
15613 }
15614
15615 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15616     Defining QUANTIFY
15617 EOF
15618 cat >> confdefs.h <<\EOF
15619 #define QUANTIFY 1
15620 EOF
15621 }
15622
15623 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15624     Defining MAIL_USE_POP
15625 EOF
15626 cat >> confdefs.h <<\EOF
15627 #define MAIL_USE_POP 1
15628 EOF
15629 }
15630
15631 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15632     Defining KERBEROS
15633 EOF
15634 cat >> confdefs.h <<\EOF
15635 #define KERBEROS 1
15636 EOF
15637 }
15638
15639 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15640     Defining HESIOD
15641 EOF
15642 cat >> confdefs.h <<\EOF
15643 #define HESIOD 1
15644 EOF
15645 }
15646
15647 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15648     Defining USE_UNION_TYPE
15649 EOF
15650 cat >> confdefs.h <<\EOF
15651 #define USE_UNION_TYPE 1
15652 EOF
15653 }
15654
15655 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15656     Defining PDUMP
15657 EOF
15658 cat >> confdefs.h <<\EOF
15659 #define PDUMP 1
15660 EOF
15661 }
15662
15663 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15664     Defining IPV6_CANONICALIZE
15665 EOF
15666 cat >> confdefs.h <<\EOF
15667 #define IPV6_CANONICALIZE 1
15668 EOF
15669 }
15670
15671
15672
15673 (
15674 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15675 else
15676   echo "uname -a: `uname -a`"
15677 fi
15678 echo ""
15679 echo "$0 $quoted_arguments"
15680 ) > Installation
15681
15682 if test ! -z ${emacs_beta_version} ; then
15683   if test -z "${emacs_is_beta}" ; then
15684         xemacs_betaname=".${emacs_beta_version}"
15685   else
15686         xemacs_betaname="-b${emacs_beta_version}"
15687   fi
15688 else
15689   xemacs_betaname=""
15690 fi
15691
15692 (
15693 echo "
15694
15695 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15696 "
15697 echo "
15698 Compilation / Installation:"
15699 echo "  Source code location:              $srcdir"
15700 echo "  Installation prefix:               $prefix"
15701 if test -n "$site_includes"; then
15702   echo "  Additional header files:           $site_includes"
15703 fi
15704 if test -n "$site_libraries"; then
15705   echo "  Additional libraries:              $site_libraries"
15706 fi
15707 if test -n "$site_prefixes"; then
15708   echo "  Additional prefixes:               $site_prefixes"
15709 fi
15710 if test -n "$runpath"; then
15711   echo "  Runtime library search path:       $runpath"
15712 fi
15713
15714 if test -n "$opsysfile"
15715 then echo "  Operating system description file: \`$opsysfile'"
15716 else echo "  Not using any operating system description file"
15717 fi
15718 if test -n "$machfile"
15719 then echo "  Machine description file:          \`$machfile'"
15720 else echo "  Not using any machine description file"
15721 fi
15722
15723 echo "  Compiler:                          $CC $CFLAGS"
15724 echo "  Relocating allocator for buffers:  $rel_alloc"
15725 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15726 case "$ld_switch_site" in
15727   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
15728     - Consider configuring with --pdump." ;;
15729 esac
15730
15731 echo "
15732 Window System:"
15733 if test "$with_msw" = "yes"; then
15734   echo "  Compiling in support for the Microsoft window system."
15735 fi
15736 if test "$with_x11" = "yes"; then
15737   echo "  Compiling in support for the X window system:"
15738   echo "    - X Windows headers location:                 $x_includes"
15739   echo "    - X Windows libraries location:               $x_libraries"
15740   if test "$with_xauth" != yes; then
15741     echo "    - Xau (X authority) not available."
15742   fi
15743   if test "$with_xmu" != yes; then
15744     echo "    - Xmu library not available; substituting equivalent routines."
15745   fi
15746   if test "$with_wmcommand" != no; then
15747     echo "    - Handling WM_COMMAND properly."
15748   fi
15749 fi
15750 if test "$need_athena" = "yes"; then
15751   echo "  Compiling in support for the Athena widget set:"
15752   echo "    - Athena headers location:                    $athena_h_path"
15753   echo "    - Athena library to link:                     $athena_lib"
15754 fi
15755 case "$with_menubars" in
15756   gtk   ) echo "  Using GTK menubars."   ;;
15757   lucid ) echo "  Using Lucid menubars." ;;
15758   motif ) echo "  Using Motif menubars."
15759           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15760           echo "             We recommend using the Lucid menubar instead."
15761           echo "             Re-run configure with --with-menubars='lucid'." ;;
15762     msw ) echo "  Using MS-Windows menubars." ;;
15763 esac
15764 case "$with_scrollbars" in
15765   gtk    ) echo "  Using GTK scrollbars."        ;;
15766   lucid  ) echo "  Using Lucid scrollbars."      ;;
15767   motif  ) echo "  Using Motif scrollbars."      ;;
15768   athena ) echo "  Using Athena scrollbars."     ;;
15769      msw ) echo "  Using MS-Windows scrollbars." ;;
15770 esac
15771 case "$with_dialogs" in
15772   gtk    ) echo "  Using GTK dialog boxes." ;;
15773   motif  ) echo "  Using Motif dialog boxes."
15774            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15775              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15776              echo "             We recommend using the Athena dialog boxes instead."
15777              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15778              echo "             Read the PROBLEMS file for more information."
15779            fi; fi ;;
15780   athena ) echo "  Using Athena dialog boxes."     ;;
15781      msw ) echo "  Using MS-Windows dialog boxes." ;;
15782 esac
15783 case "$with_widgets" in
15784   gtk    ) echo "  Using GTK native widgets."        ;;
15785   motif  ) echo "  Using Motif native widgets."      ;;
15786   athena ) echo "  Using Athena native widgets."     ;;
15787      msw ) echo "  Using MS-Windows native widgets." ;;
15788 esac
15789 if test "$with_dragndrop" = yes; then
15790   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15791   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15792 fi
15793
15794 echo "
15795 TTY:"
15796 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15797 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15798
15799 echo "
15800 Images:"
15801 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15802 if test "$with_xpm" = yes; then
15803   echo "  Compiling in support for XPM  images."
15804 elif test "$with_x11" = yes; then
15805   echo "  WARNING: -----------------------------------------------------------"
15806   echo "  WARNING: Compiling without XPM image support."
15807   if test "$xpm_problem" != ""; then
15808     echo "  Reason: $xpm_problem"
15809   fi
15810   echo "  WARNING: You should strongly consider installing XPM."
15811   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15812   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15813   echo "  WARNING: -----------------------------------------------------------"
15814 fi
15815 if test "$with_png" = yes; then
15816   echo "  Compiling in support for PNG  images."
15817 elif test "$window_system" != "none"; then
15818   echo "  WARNING: -----------------------------------------------------------"
15819   echo "  WARNING: Compiling without PNG image support."
15820   if test "$png_problem" != ""; then
15821     echo "  Reason: $png_problem"
15822   fi
15823   echo "  WARNING: You should strongly consider installing the PNG libraries."
15824   echo "  WARNING: Otherwise certain images and glyphs may not display."
15825   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15826   echo "  WARNING: -----------------------------------------------------------"
15827 fi
15828 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15829 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15830 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15831
15832 echo "
15833 Sound:"
15834 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15835 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15836 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15837 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15838
15839 echo "
15840 Databases:"
15841 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15842 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15843 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15844 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15845 if test "$with_postgresql" = yes; then
15846   echo "  Compiling in support for PostgreSQL."
15847   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15848   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15849 fi
15850
15851 echo "
15852 Internationalization:"
15853 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15854 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15855 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15856 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15857 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15858 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15859 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15860 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15861 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15862 if test "$with_wnn" = yes; then
15863   echo "  Compiling in support for the WNN input method on Mule."
15864   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15865 fi
15866 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15867
15868 echo "
15869 Mail:"
15870 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15871 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15872 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15873 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15874
15875 echo "
15876 Other Features:"
15877 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
15878 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15879 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15880 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15881 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15882 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15883 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15884 test "$pdump" = yes && echo "  Using the new portable dumper."
15885 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15886 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15887 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15888   != "no no no no no no"; then
15889   echo "  WARNING: ---------------------------------------------------------"
15890   echo "  WARNING: Compiling in support for runtime error checking."
15891   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15892   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15893   echo "  WARNING: ---------------------------------------------------------"
15894 fi
15895 echo ""
15896 ) | tee -a Installation
15897 echo ""
15898
15899
15900 # Remove any trailing slashes in these variables.
15901 test -n "$prefix" &&
15902   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15903 test -n "$exec_prefix" &&
15904   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15905
15906
15907 for file in $internal_makefile_list; do
15908   test "$file" = src/Makefile.in && \
15909     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15910   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15911 done
15912 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15913 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
15914
15915 trap '' 1 2 15
15916
15917 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15918
15919 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15920 # Let make expand exec_prefix.
15921 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15922
15923 # Any assignment to VPATH causes Sun make to only execute
15924 # the first set of double-colon rules, so remove it if not needed.
15925 # If there is a colon in the path, we need to keep it.
15926 if test "x$srcdir" = x.; then
15927   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15928 fi
15929
15930 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15931
15932 DEFS=-DHAVE_CONFIG_H
15933
15934 # Without the "./", some shells look in PATH for config.status.
15935 : ${CONFIG_STATUS=./config.status}
15936
15937 echo creating $CONFIG_STATUS
15938 rm -f $CONFIG_STATUS
15939 cat > $CONFIG_STATUS <<EOF
15940 #! /bin/sh
15941 # Generated automatically by configure.
15942 # Run this file to recreate the current configuration.
15943 # This directory was configured as follows,
15944 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15945 #
15946 # $0 $ac_configure_args
15947 #
15948 # Compiler output produced by configure, useful for debugging
15949 # configure, is in ./config.log if it exists.
15950
15951 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15952 for ac_option
15953 do
15954   case "\$ac_option" in
15955   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15956     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15957     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15958   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15959     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15960     exit 0 ;;
15961   -help | --help | --hel | --he | --h)
15962     echo "\$ac_cs_usage"; exit 0 ;;
15963   *) echo "\$ac_cs_usage"; exit 1 ;;
15964   esac
15965 done
15966
15967 ac_given_srcdir=$srcdir
15968 ac_given_INSTALL="$INSTALL"
15969
15970 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15971 EOF
15972 cat >> $CONFIG_STATUS <<EOF
15973
15974 # Protect against being on the right side of a sed subst in config.status.
15975 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15976  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15977 $ac_vpsub
15978 $extrasub
15979 s%@SHELL@%$SHELL%g
15980 s%@CFLAGS@%$CFLAGS%g
15981 s%@CPPFLAGS@%$CPPFLAGS%g
15982 s%@CXXFLAGS@%$CXXFLAGS%g
15983 s%@FFLAGS@%$FFLAGS%g
15984 s%@DEFS@%$DEFS%g
15985 s%@LDFLAGS@%$LDFLAGS%g
15986 s%@LIBS@%$LIBS%g
15987 s%@exec_prefix@%$exec_prefix%g
15988 s%@prefix@%$prefix%g
15989 s%@program_transform_name@%$program_transform_name%g
15990 s%@bindir@%$bindir%g
15991 s%@sbindir@%$sbindir%g
15992 s%@libexecdir@%$libexecdir%g
15993 s%@datadir@%$datadir%g
15994 s%@sysconfdir@%$sysconfdir%g
15995 s%@sharedstatedir@%$sharedstatedir%g
15996 s%@localstatedir@%$localstatedir%g
15997 s%@libdir@%$libdir%g
15998 s%@includedir@%$includedir%g
15999 s%@oldincludedir@%$oldincludedir%g
16000 s%@infodir@%$infodir%g
16001 s%@mandir@%$mandir%g
16002 s%@LN_S@%$LN_S%g
16003 s%@blddir@%$blddir%g
16004 s%@CC@%$CC%g
16005 s%@CPP@%$CPP%g
16006 s%@start_flags@%$start_flags%g
16007 s%@ld_switch_shared@%$ld_switch_shared%g
16008 s%@start_files@%$start_files%g
16009 s%@ld@%$ld%g
16010 s%@lib_gcc@%$lib_gcc%g
16011 s%@RANLIB@%$RANLIB%g
16012 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16013 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16014 s%@INSTALL_DATA@%$INSTALL_DATA%g
16015 s%@YACC@%$YACC%g
16016 s%@SET_MAKE@%$SET_MAKE%g
16017 s%@GTK_CONFIG@%$GTK_CONFIG%g
16018 s%@X_CFLAGS@%$X_CFLAGS%g
16019 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16020 s%@X_LIBS@%$X_LIBS%g
16021 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16022 s%@install_pp@%$install_pp%g
16023 s%@libs_xauth@%$libs_xauth%g
16024 s%@dnd_objs@%$dnd_objs%g
16025 s%@lwlib_objs@%$lwlib_objs%g
16026 s%@ALLOCA@%$ALLOCA%g
16027 s%@have_esd_config@%$have_esd_config%g
16028 s%@dll_ld@%$dll_ld%g
16029 s%@dll_cflags@%$dll_cflags%g
16030 s%@dll_ldflags@%$dll_ldflags%g
16031 s%@dll_post@%$dll_post%g
16032 s%@dll_ldo@%$dll_ldo%g
16033 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16034 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16035 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16036 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16037 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16038 s%@PROGNAME@%$PROGNAME%g
16039 s%@version@%$version%g
16040 s%@configuration@%$configuration%g
16041 s%@canonical@%$canonical%g
16042 s%@inststaticdir@%$inststaticdir%g
16043 s%@instvardir@%$instvardir%g
16044 s%@srcdir@%$srcdir%g
16045 s%@pkgdir@%$pkgdir%g
16046 s%@statedir@%$statedir%g
16047 s%@extra_includes@%$extra_includes%g
16048 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16049 s%@PREFIX@%$PREFIX%g
16050 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16051 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16052 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16053 s%@INFODIR@%$INFODIR%g
16054 s%@infopath@%$infopath%g
16055 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16056 s%@INFOPATH@%$INFOPATH%g
16057 s%@package_path@%$package_path%g
16058 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16059 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16060 s%@lispdir@%$lispdir%g
16061 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16062 s%@LISPDIR@%$LISPDIR%g
16063 s%@moduledir@%$moduledir%g
16064 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16065 s%@MODULEDIR@%$MODULEDIR%g
16066 s%@sitelispdir@%$sitelispdir%g
16067 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16068 s%@SITELISPDIR@%$SITELISPDIR%g
16069 s%@sitemoduledir@%$sitemoduledir%g
16070 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16071 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16072 s%@etcdir@%$etcdir%g
16073 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16074 s%@ETCDIR@%$ETCDIR%g
16075 s%@docdir@%$docdir%g
16076 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16077 s%@DOCDIR@%$DOCDIR%g
16078 s%@archlibdir@%$archlibdir%g
16079 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16080 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16081 s%@bitmapdir@%$bitmapdir%g
16082 s%@extra_objs@%$extra_objs%g
16083 s%@machfile@%$machfile%g
16084 s%@opsysfile@%$opsysfile%g
16085 s%@c_switch_general@%$c_switch_general%g
16086 s%@c_switch_window_system@%$c_switch_window_system%g
16087 s%@c_switch_all@%$c_switch_all%g
16088 s%@ld_switch_general@%$ld_switch_general%g
16089 s%@ld_switch_window_system@%$ld_switch_window_system%g
16090 s%@ld_switch_all@%$ld_switch_all%g
16091 s%@ld_libs_general@%$ld_libs_general%g
16092 s%@ld_libs_window_system@%$ld_libs_window_system%g
16093 s%@ld_libs_all@%$ld_libs_all%g
16094 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16095 s%@native_sound_lib@%$native_sound_lib%g
16096 s%@sound_cflags@%$sound_cflags%g
16097 s%@dynodump_arch@%$dynodump_arch%g
16098 s%@XEMACS_CC@%$XEMACS_CC%g
16099 s%@internal_makefile_list@%$internal_makefile_list%g
16100
16101 CEOF
16102 EOF
16103
16104 cat >> $CONFIG_STATUS <<\EOF
16105
16106 # Split the substitutions into bite-sized pieces for seds with
16107 # small command number limits, like on Digital OSF/1 and HP-UX.
16108 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16109 ac_file=1 # Number of current file.
16110 ac_beg=1 # First line for current file.
16111 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16112 ac_more_lines=:
16113 ac_sed_cmds=""
16114 while $ac_more_lines; do
16115   if test $ac_beg -gt 1; then
16116     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16117   else
16118     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16119   fi
16120   if test ! -s conftest.s$ac_file; then
16121     ac_more_lines=false
16122     rm -f conftest.s$ac_file
16123   else
16124     if test -z "$ac_sed_cmds"; then
16125       ac_sed_cmds="sed -f conftest.s$ac_file"
16126     else
16127       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16128     fi
16129     ac_file=`expr $ac_file + 1`
16130     ac_beg=$ac_end
16131     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16132   fi
16133 done
16134 if test -z "$ac_sed_cmds"; then
16135   ac_sed_cmds=cat
16136 fi
16137 EOF
16138
16139 cat >> $CONFIG_STATUS <<EOF
16140
16141 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16142 EOF
16143 cat >> $CONFIG_STATUS <<\EOF
16144 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16145   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16146   case "$ac_file" in
16147   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16148        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16149   *) ac_file_in="${ac_file}.in" ;;
16150   esac
16151
16152   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16153
16154   # Remove last slash and all that follows it.  Not all systems have dirname.
16155   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16156   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16157     # The file is in a subdirectory.
16158     test ! -d "$ac_dir" && mkdir "$ac_dir"
16159     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16160     # A "../" for each directory in $ac_dir_suffix.
16161     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16162   else
16163     ac_dir_suffix= ac_dots=
16164   fi
16165
16166   case "$ac_given_srcdir" in
16167   .)  srcdir=.
16168       if test -z "$ac_dots"; then top_srcdir=.
16169       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16170   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16171   *) # Relative path.
16172     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16173     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16174   esac
16175
16176   case "$ac_given_INSTALL" in
16177   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16178   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16179   esac
16180
16181   echo creating "$ac_file"
16182   rm -f "$ac_file"
16183   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16184   case "$ac_file" in
16185   *Makefile*) ac_comsub="1i\\
16186 # $configure_input" ;;
16187   *) ac_comsub= ;;
16188   esac
16189
16190   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16191   sed -e "$ac_comsub
16192 s%@configure_input@%$configure_input%g
16193 s%@srcdir@%$srcdir%g
16194 s%@top_srcdir@%$top_srcdir%g
16195 s%@INSTALL@%$INSTALL%g
16196 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16197 fi; done
16198 rm -f conftest.s*
16199
16200 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16201 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16202 #
16203 # ac_d sets the value in "#define NAME VALUE" lines.
16204 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16205 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16206 ac_dC='\3'
16207 ac_dD='%g'
16208 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16209 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16210 ac_uB='\([      ]\)%\1#\2define\3'
16211 ac_uC=' '
16212 ac_uD='\4%g'
16213 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16214 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16215 ac_eB='$%\1#\2define\3'
16216 ac_eC=' '
16217 ac_eD='%g'
16218
16219 if test "${CONFIG_HEADERS+set}" != set; then
16220 EOF
16221 cat >> $CONFIG_STATUS <<EOF
16222   CONFIG_HEADERS="src/config.h lwlib/config.h"
16223 EOF
16224 cat >> $CONFIG_STATUS <<\EOF
16225 fi
16226 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16227   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16228   case "$ac_file" in
16229   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16230        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16231   *) ac_file_in="${ac_file}.in" ;;
16232   esac
16233
16234   echo creating $ac_file
16235
16236   rm -f conftest.frag conftest.in conftest.out
16237   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16238   cat $ac_file_inputs > conftest.in
16239
16240 EOF
16241
16242 # Transform confdefs.h into a sed script conftest.vals that substitutes
16243 # the proper values into config.h.in to produce config.h.  And first:
16244 # Protect against being on the right side of a sed subst in config.status.
16245 # Protect against being in an unquoted here document in config.status.
16246 rm -f conftest.vals
16247 cat > conftest.hdr <<\EOF
16248 s/[\\&%]/\\&/g
16249 s%[\\$`]%\\&%g
16250 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16251 s%ac_d%ac_u%gp
16252 s%ac_u%ac_e%gp
16253 EOF
16254 sed -n -f conftest.hdr confdefs.h > conftest.vals
16255 rm -f conftest.hdr
16256
16257 # This sed command replaces #undef with comments.  This is necessary, for
16258 # example, in the case of _POSIX_SOURCE, which is predefined and required
16259 # on some systems where configure will not decide to define it.
16260 cat >> conftest.vals <<\EOF
16261 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16262 EOF
16263
16264 # Break up conftest.vals because some shells have a limit on
16265 # the size of here documents, and old seds have small limits too.
16266
16267 rm -f conftest.tail
16268 while :
16269 do
16270   ac_lines=`grep -c . conftest.vals`
16271   # grep -c gives empty output for an empty file on some AIX systems.
16272   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16273   # Write a limited-size here document to conftest.frag.
16274   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16275   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16276   echo 'CEOF
16277   sed -f conftest.frag conftest.in > conftest.out
16278   rm -f conftest.in
16279   mv conftest.out conftest.in
16280 ' >> $CONFIG_STATUS
16281   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16282   rm -f conftest.vals
16283   mv conftest.tail conftest.vals
16284 done
16285 rm -f conftest.vals
16286
16287 cat >> $CONFIG_STATUS <<\EOF
16288   rm -f conftest.frag conftest.h
16289   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16290   cat conftest.in >> conftest.h
16291   rm -f conftest.in
16292   if cmp -s $ac_file conftest.h 2>/dev/null; then
16293     echo "$ac_file is unchanged"
16294     rm -f conftest.h
16295   else
16296     # Remove last slash and all that follows it.  Not all systems have dirname.
16297       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16298       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16299       # The file is in a subdirectory.
16300       test ! -d "$ac_dir" && mkdir "$ac_dir"
16301     fi
16302     rm -f $ac_file
16303     mv conftest.h $ac_file
16304   fi
16305 fi; done
16306
16307 EOF
16308 cat >> $CONFIG_STATUS <<EOF
16309 CPP="$CPP"
16310  top_srcdir="$srcdir"
16311  MAKE_SUBDIR="$MAKE_SUBDIR"
16312
16313 EOF
16314 cat >> $CONFIG_STATUS <<\EOF
16315 for dir in . $MAKE_SUBDIR; do
16316   (
16317     cd $dir
16318     rm -f junk.c
16319     < Makefile.in \
16320       sed -e '/^# Generated/d' \
16321           -e 's%/\*\*/#.*%%' \
16322           -e 's/^ *# */#/' \
16323           -e '/^##/d' \
16324           -e '/^#/ {
16325 p
16326 d
16327 }'        \
16328           -e '/./ {
16329 s/\([\"]\)/\\\1/g
16330 s/^/"/
16331 s/$/"/
16332 }'  > junk.c;
16333
16334
16335
16336     echo creating $dir/Makefile
16337 $CPP -I. -I${top_srcdir}/src  junk.c \
16338   | sed -e 's/^\#.*//'          \
16339         -e 's/^[        ][      ]*$//'\
16340         -e 's/^ /       /'              \
16341         -e '/^[ \f]*$/d' \
16342         -e '/^\"/ {
16343         s/\\\([\"]\)/\1/g
16344         s/^[    ]*\"//
16345         s/\"[   ]*$//
16346 }' > Makefile.new
16347     chmod 444 Makefile.new
16348     mv -f Makefile.new Makefile
16349
16350     echo creating $dir/GNUmakefile
16351 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16352   | sed -e 's/^\#.*//'          \
16353         -e 's/^[        ][      ]*$//'\
16354         -e 's/^ /       /'              \
16355         -e '/^[ \f]*$/d' \
16356         -e '/^\"/ {
16357         s/\\\([\"]\)/\1/g
16358         s/^[    ]*\"//
16359         s/\"[   ]*$//
16360 }' > Makefile.new
16361     chmod 444 Makefile.new
16362     mv -f Makefile.new GNUmakefile
16363
16364     rm -f junk.c
16365   )
16366 done
16367
16368 sed < config.status >> lib-src/config.values \
16369   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16370   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16371   -e 's/^\([^ ]*\) $/\1 ""/' \
16372   -e 's/ 1$/ t/'
16373
16374
16375 exit 0
16376 EOF
16377 chmod +x $CONFIG_STATUS
16378 rm -fr confdefs* $ac_clean_files
16379 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1