Merge r21-4-3-utf-2000-0_19-b1-b5c2.
[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
20 ### This file is part of XEmacs.
21
22 ### XEmacs is free software; you can redistribute it and/or modify it
23 ### under the terms of the GNU General Public License as published by
24 ### the Free Software Foundation; either version 2, or (at your
25 ### option) any later version.
26
27 ### XEmacs is distributed in the hope that it will be useful, but
28 ### WITHOUT ANY WARRANTY; without even the implied warranty of
29 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30 ### General Public License for more details.
31
32 ### You should have received a copy of the GNU General Public License
33 ### along with XEmacs; see the file COPYING.  If not, write to the Free
34 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35 ### 02111-1307, USA.
36
37 ### For usage, run `./configure --help'
38 ### For more detailed information on building and installing XEmacs,
39 ### read the file `INSTALL'.
40 ###
41 ### If configure succeeds, it leaves its status in config.status.
42 ### A log of configuration tests can be found in config.log.
43 ### If configure fails after disturbing the status quo,
44 ###     config.status is removed.
45
46 ac_help="$ac_help
47   --with-x                use the X Window System"
48
49
50
51 if test -n "$ZSH_VERSION"; then
52     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
53   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
54   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
55   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
56       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
57 elif test -n "$BASH_VERSION"; then
58     set -o posix
59   unset CDPATH
60 else
61   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
62 fi
63
64 exec_prefix=NONE
65 host=NONE
66 no_create=
67 nonopt=NONE
68 no_recursion=
69 prefix=NONE
70 program_prefix=NONE
71 program_suffix=NONE
72 program_transform_name=s,x,x,
73 silent=
74 site=
75 srcdir=
76 target=NONE
77 verbose=
78 x_includes=NONE
79 x_libraries=NONE
80
81 subdirs=
82 MFLAGS= MAKEFLAGS=
83 SHELL=${CONFIG_SHELL-/bin/sh}
84 ac_max_here_lines=12
85
86 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
87
88 # File descriptor usage:
89 # 0 standard input
90 # 1 file creation
91 # 2 errors and warnings
92 # 3 some systems may open it to /dev/tty
93 # 4 used on the Kubota Titan
94 # 6 checking for... messages and results
95 # 5 compiler messages saved in config.log
96 if test "$silent" = yes; then
97   exec 6>/dev/null
98 else
99   exec 6>&1
100 fi
101 exec 5>./config.log
102
103 echo "\
104 This file contains any messages produced by compilers while
105 running configure, to aid debugging if configure makes a mistake.
106 " 1>&5
107
108 # Strip out --no-create and --no-recursion so they do not pile up.
109 # Also quote any args containing shell metacharacters.
110 ac_configure_args=
111 for ac_arg
112 do
113   case "$ac_arg" in
114   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
115   | --no-cr | --no-c) ;;
116   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
117   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
118   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
119   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
120   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
121   esac
122 done
123
124 # NLS nuisances.
125 # Only set these to C if already set.  These must not be set unconditionally
126 # because not all systems understand e.g. LANG=C (notably SCO).
127 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
128 # Non-C LC_CTYPE values break the ctype check.
129 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
130 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
131 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
132 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
133
134 # confdefs.h avoids OS command line length limits that DEFS can exceed.
135 rm -rf conftest* confdefs.h
136 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
137 echo > confdefs.h
138
139 # A filename unique to this package, relative to the directory that
140 # configure is in, which we can look for to find out if srcdir is correct.
141 ac_unique_file=src/lisp.h
142
143 # Find the source files, if location was not specified.
144 if test -z "$srcdir"; then
145   ac_srcdir_defaulted=yes
146   # Try the directory containing this script, then its parent.
147   ac_prog=$0
148   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
149   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
150   srcdir=$ac_confdir
151   if test ! -r $srcdir/$ac_unique_file; then
152     srcdir=..
153   fi
154 else
155   ac_srcdir_defaulted=no
156 fi
157 if test ! -r $srcdir/$ac_unique_file; then
158   if test "$ac_srcdir_defaulted" = yes; then
159     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
160   else
161     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
162   fi
163 fi
164 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
165
166 # Prefer explicitly selected file to automatically selected ones.
167 if test -z "$CONFIG_SITE"; then
168   if test "x$prefix" != xNONE; then
169     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
170   else
171     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
172   fi
173 fi
174 for ac_site_file in $CONFIG_SITE; do
175   if test -r "$ac_site_file"; then
176     echo "loading site script $ac_site_file"
177     . "$ac_site_file"
178   fi
179 done
180
181
182 ac_ext=c
183 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
184 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
185 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'
186 ac_cpp='$CPP '"$xe_cppflags"
187 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
188 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
189 cross_compiling=no
190
191 ac_exeext=
192 ac_objext=o
193 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
194   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
195   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
196     ac_n= ac_c='
197 ' ac_t='        '
198   else
199     ac_n=-n ac_c= ac_t=
200   fi
201 else
202   ac_n= ac_c='\c' ac_t=
203 fi
204
205
206 progname="`echo $0 | sed 's:^\./\./:\./:'`"
207
208
209 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
210 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
211
212 prefix='/usr/local'
213 exec_prefix='${prefix}'
214 bindir='${exec_prefix}/bin'
215 datadir='${prefix}/lib'
216 statedir='${prefix}/lib'
217 libdir='${exec_prefix}/lib'
218 mandir='${prefix}/man/man1'
219 inststaticdir='${PROGNAME}'
220 instvardir='${PROGNAME}-${version}'
221 infodir='${datadir}/${instvardir}/info'
222 infopath=''
223 install_pp=''
224 lispdir='${datadir}/${instvardir}/lisp'
225 moduledir='${datadir}/${instvardir}/${configuration}/modules'
226 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
227 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
228 pkgdir='${datadir}/${instvardir}/lisp'
229 package_path=''
230 etcdir='${datadir}/${instvardir}/etc'
231 archlibdir='${datadir}/${instvardir}/${configuration}'
232 docdir='${archlibdir}'
233 with_netinstall="no"
234 with_prefix='yes'
235 with_site_lisp='no'
236 with_site_modules='yes'
237 with_menubars=''
238 with_scrollbars=''
239 with_widgets=''
240 with_dialogs=''
241 with_file_coding=''
242 cpp='' cppflags='' libs='' ldflags=''
243 extra_includes=''
244 dynamic=''
245 with_x11=''
246 with_msw=''
247 rel_alloc='default'
248 with_system_malloc='default'
249 with_dlmalloc='default'
250 with_esd_sound='no'
251 native_sound_lib=''
252 with_gtk='no'
253 with_gnome='no'
254 use_assertions="yes"
255 with_toolbars=""
256 with_tty=""
257 use_union_type="no"
258 with_dnet=""
259 pdump="no"
260 with_dragndrop="no"
261 with_ipv6_cname="yes"
262
263
264
265
266 arguments="$@"
267
268 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
269 quoted_arguments=
270 for i in "$@"; do
271    case "$i" in
272    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
273    | --no-cr | --no-c) ;;
274    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
275    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
276    *)
277    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
278    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
279    esac
280 done
281
282 while test $# != 0; do
283   arg="$1"; shift
284   case "$arg" in
285     --no-create|--no-recursion) ;;
286         -* )
287             case "$arg" in
288         -*=*)
289           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
290           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
291           valomitted=no
292         ;;
293                                                                           -*)
294                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
295           val="yes" valomitted=yes
296         ;;
297       esac
298
299             optname="$opt"
300       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
301
302             case "${valomitted}-${opt}" in yes-without_* )
303         opt=`echo $opt | sed 's/without/with/'`
304         valomitted="no" val="no" ;;
305       esac
306
307             case "$opt" in
308
309         with_site_lisp  | \
310         with_prefix     | \
311         with_site_modules | \
312         with_x          | \
313         with_x11        | \
314         with_gtk        | \
315         with_gnome      | \
316         with_msw        | \
317         with_gcc        | \
318         dynamic         | \
319         with_ncurses    | \
320         with_dnet       | \
321         with_socks      | \
322         with_dragndrop  | \
323         with_cde        | \
324         with_offix      | \
325         with_gpm        | \
326         with_xpm        | \
327         with_xface      | \
328         with_gif        | \
329         with_jpeg       | \
330         with_png        | \
331         with_tiff       | \
332         with_wmcommand  | \
333         with_xmu        | \
334         with_purify     | \
335         with_quantify   | \
336         with_toolbars   | \
337         with_tty        | \
338         with_xfs        | \
339         with_i18n3      | \
340         with_mule       | \
341         with_utf_2000   | \
342         with_text_coding| \
343         with_file_coding| \
344         with_canna      | \
345         with_wnn        | \
346         with_wnn6       | \
347         with_workshop   | \
348         with_sparcworks | \
349         with_tooltalk   | \
350         with_ldap       | \
351         with_postgresql | \
352         with_pop        | \
353         with_kerberos   | \
354         with_hesiod     | \
355         with_dnet       | \
356         with_infodock   | \
357         with_netinstall | \
358         with_ipv6_cname | \
359         external_widget | \
360         verbose         | \
361         extra_verbose   | \
362         usage_tracking  | \
363         use_union_type  | \
364         pdump           | \
365         debug           | \
366         use_assertions  | \
367         memory_usage_stats | \
368         with_clash_detection | \
369         with_modules | \
370         quick_build )
371                   case "$val" in
372             y | ye | yes )      val=yes ;;
373             n | no )            val=no  ;;
374             * ) (echo "$progname: Usage error:"
375 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
376 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
377           esac
378           eval "$opt=\"$val\"" ;;
379
380
381                         srcdir          | \
382         compiler        | \
383         cflags          | \
384         cpp             | \
385         cppflags        | \
386         libs            | \
387         ldflags         | \
388         cache_file      | \
389         native_sound_lib| \
390         site_lisp       | \
391         x_includes      | \
392         x_libraries     | \
393         site_includes   | \
394         site_libraries  | \
395         site_prefixes   | \
396         site_runtime_libraries )
397                   if test "$valomitted" = "yes" ; then
398                     if test "$#" = 0 ; then
399               (echo "$progname: Usage error:"
400 echo " " "The \`--$optname' option requires a value."
401 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
402             fi
403             val="$1"; shift
404           fi
405           eval "$opt=\"$val\""
406         ;;
407
408                 rel_alloc | \
409         with_dlmalloc | \
410         with_debug_malloc  | use_debug_malloc | \
411         with_system_malloc | use_system_malloc )
412           case "$val" in
413             y | ye | yes )      val=yes ;;
414             n | no )            val=no  ;;
415             d | de | def | defa | defau | defaul | default ) val=default ;;
416             * ) (echo "$progname: Usage error:"
417 echo " " "The \`--$optname' option requires one of these values:
418   \`yes', \`no', or \`default'."
419 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
420           esac
421           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
422           eval "$opt=\"$val\""
423         ;;
424
425                 "with_database" )
426           with_database_berkdb=no
427           with_database_dbm=no
428           with_database_gdbm=no
429           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
430             case "$x" in
431               no ) ;;
432               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
433               d | db | dbm )                               with_database_dbm=yes    ;;
434               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
435               * ) (echo "$progname: Usage error:"
436 echo " " "The \`--$optname' option value
437   must be either \`no' or a comma-separated list
438   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
439 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
440             esac
441           done
442           if test "$with_database_dbm"  = "yes" -a \
443                   "$with_database_gdbm" = "yes"; then
444           (echo "$progname: Usage error:"
445 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
446   with the \`--$optname' option."
447 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
448           fi
449         ;;
450
451                 "with_sound" )
452                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
453             case "$x" in
454                       n | no | non | none ) new_sdefault=no ;;
455               a | al | all | both ) new_sdefault=yes ;;
456
457               native )       with_native_sound=yes ;;
458               nonative )     with_native_sound=no ;;
459
460               nas )          with_nas_sound=yes ;;
461               nonas )        with_nas_sound=no ;;
462
463               esd )          with_esd_sound=yes ;;
464               noesd )        with_esd_sound=no ;;
465
466               * ) bogus_sound=yes ;;
467             esac
468             if test "$bogus_sound" -o \
469                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
470                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
471                 (echo "$progname: Usage error:"
472 echo " " "Valid types for the \`--$optname' option are:
473   $types.
474 Option \`all' or \`none' must be first in the list.
475 The default is to autodetect native and NAS sound support."
476 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
477             elif test -n "$new_sdefault" ; then
478                 with_native_sound=$new_sdefault
479                 with_nas_sound=$new_sdefault
480                 with_esd_sound=$new_sdefault
481                 new_sdefault=   # reset this
482             fi
483             sound_notfirst=true
484           done
485         ;;
486
487                         "with_athena" )
488           case "$val" in
489             xa | xaw )                    val=xaw    ;;
490             3 | 3d | xaw3d )              val=3d     ;;
491                         ne | nex | next | naxtaw)     val=next   ;;
492                         9 | 95 | xaw95 )              val=95     ;;
493             xp | xpm | xawxpm )           val=xpm    ;;
494             * ) (echo "$progname: Usage error:"
495 echo " " "The \`--$optname' option must have one of these values:
496   \`xaw', \`3d', \`next', \`95', or \`xpm'."
497 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
498           esac
499           eval "$opt=\"$val\""
500         ;;
501
502                 "with_xim" )
503           case "$val" in
504             y | ye | yes )                val=yes   ;;
505             n | no | non | none )         val=no    ;;
506             x | xl | xli | xlib )         val=xlib  ;;
507             m | mo | mot | moti | motif ) val=motif ;;
508             * ) (echo "$progname: Usage error:"
509 echo " " "The \`--$optname' option must have one of these values:
510   \`motif', \`xlib', \`yes', or \`no'."
511 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
512           esac
513           eval "$opt=\"$val\""
514         ;;
515
516                 "mail_locking" )
517           case "$val" in
518             lockf )     val=lockf ;;
519             flock )     val=flock ;;
520             file | dot ) val=file  ;;
521             locking )   val=locking  ;;
522             * ) (echo "$progname: Usage error:"
523 echo " " "The \`--$optname' option must have one of these values:
524   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
525 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
526           esac
527           eval "$opt=\"$val\""
528         ;;
529
530                 "error_checking" )
531                           
532           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
533             case "$x" in
534                       n | no | non | none ) new_default=no ;;
535               a | al | all )        new_default=yes ;;
536
537               extents )       error_check_extents=yes ;;
538               noextents )     error_check_extents=no ;;
539
540               typecheck )     error_check_typecheck=yes ;;
541               notypecheck )   error_check_typecheck=no ;;
542
543               bufpos )        error_check_bufpos=yes ;;
544               nobufpos )      error_check_bufpos=no ;;
545
546               gc )            error_check_gc=yes ;;
547               nogc )          error_check_gc=no ;;
548
549               malloc )        error_check_malloc=yes ;;
550               nomalloc )      error_check_malloc=no ;;
551
552               byte_code )     error_check_byte_code=yes ;;
553               nobyte_code )   error_check_byte_code=no ;;
554
555               glyphs )     error_check_glyphs=yes ;;
556               noglyphs )   error_check_glyphs=no ;;
557
558               * ) bogus_error_check=yes ;;
559             esac
560             if test "$bogus_error_check" -o \
561                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
562                 if test "$error_check_default" = yes ; then
563                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
564                 else
565                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
566                 fi
567                 (echo "$progname: Usage error:"
568 echo " " "Valid types for the \`--$optname' option are:
569   $types."
570 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
571             elif test -n "$new_default" ; then
572                 error_check_extents=$new_default
573                 error_check_typecheck=$new_default
574                 error_check_bufpos=$new_default
575                 error_check_gc=$new_default
576                 error_check_malloc=$new_default
577                 error_check_byte_code=$new_default
578                 error_check_glyphs=$new_default
579                 new_default=    # reset this
580             fi
581             echeck_notfirst=true
582           done
583         ;;
584
585                                 
586                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
587         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
588         archlibdir | docdir | package_path )
589                    if test "$valomitted" = "yes"; then
590              if test "$#" = 0; then
591                  (echo "$progname: Usage error:"
592 echo " " "The \`--$optname' option requires a value."
593 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
594              fi
595              val="$1"; shift
596            fi
597            eval "$opt=\"$val\""
598
599                            case "$opt" in
600                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
601     Defining EXEC_PREFIX_USER_DEFINED
602 EOF
603 cat >> confdefs.h <<\EOF
604 #define EXEC_PREFIX_USER_DEFINED 1
605 EOF
606 }
607  ;;
608              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
609     Defining LISPDIR_USER_DEFINED
610 EOF
611 cat >> confdefs.h <<\EOF
612 #define LISPDIR_USER_DEFINED 1
613 EOF
614 }
615  ;;
616              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
617     Defining SITELISPDIR_USER_DEFINED
618 EOF
619 cat >> confdefs.h <<\EOF
620 #define SITELISPDIR_USER_DEFINED 1
621 EOF
622 }
623  ;;
624              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
625     Defining MODULEDIR_USER_DEFINED
626 EOF
627 cat >> confdefs.h <<\EOF
628 #define MODULEDIR_USER_DEFINED 1
629 EOF
630 }
631  ;;
632              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
633     Defining ETCDIR_USER_DEFINED
634 EOF
635 cat >> confdefs.h <<\EOF
636 #define ETCDIR_USER_DEFINED 1
637 EOF
638 }
639  ;;
640              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
641     Defining INFODIR_USER_DEFINED
642 EOF
643 cat >> confdefs.h <<\EOF
644 #define INFODIR_USER_DEFINED 1
645 EOF
646 }
647  ;;
648              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
649     Defining INFOPATH_USER_DEFINED
650 EOF
651 cat >> confdefs.h <<\EOF
652 #define INFOPATH_USER_DEFINED 1
653 EOF
654 }
655  ;;
656              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
657     Defining PACKAGE_PATH_USER_DEFINED
658 EOF
659 cat >> confdefs.h <<\EOF
660 #define PACKAGE_PATH_USER_DEFINED 1
661 EOF
662 }
663  ;;
664              datadir )
665                 { test "$extra_verbose" = "yes" && cat << \EOF
666     Defining INFODIR_USER_DEFINED
667 EOF
668 cat >> confdefs.h <<\EOF
669 #define INFODIR_USER_DEFINED 1
670 EOF
671 }
672
673                 { test "$extra_verbose" = "yes" && cat << \EOF
674     Defining LISPDIR_USER_DEFINED
675 EOF
676 cat >> confdefs.h <<\EOF
677 #define LISPDIR_USER_DEFINED 1
678 EOF
679 }
680
681                 { test "$extra_verbose" = "yes" && cat << \EOF
682     Defining MODULEDIR_USER_DEFINED
683 EOF
684 cat >> confdefs.h <<\EOF
685 #define MODULEDIR_USER_DEFINED 1
686 EOF
687 }
688
689                 { test "$extra_verbose" = "yes" && cat << \EOF
690     Defining ETCDIR_USER_DEFINED
691 EOF
692 cat >> confdefs.h <<\EOF
693 #define ETCDIR_USER_DEFINED 1
694 EOF
695 }
696
697                 { test "$extra_verbose" = "yes" && cat << \EOF
698     Defining DOCDIR_USER_DEFINED
699 EOF
700 cat >> confdefs.h <<\EOF
701 #define DOCDIR_USER_DEFINED 1
702 EOF
703 }
704
705                 { test "$extra_verbose" = "yes" && cat << \EOF
706     Defining ARCHLIBDIR_USER_DEFINED
707 EOF
708 cat >> confdefs.h <<\EOF
709 #define ARCHLIBDIR_USER_DEFINED 1
710 EOF
711 }
712  ;;
713              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
714     Defining DOCDIR_USER_DEFINED
715 EOF
716 cat >> confdefs.h <<\EOF
717 #define DOCDIR_USER_DEFINED 1
718 EOF
719 }
720  ;;
721              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
722     Defining ARCHLIBDIR_USER_DEFINED
723 EOF
724 cat >> confdefs.h <<\EOF
725 #define ARCHLIBDIR_USER_DEFINED 1
726 EOF
727 }
728  ;;
729            esac
730         ;;
731
732                 "no_create" ) ;;
733
734                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
735
736                 "with_menubars"   | \
737         "with_scrollbars" | \
738         "with_dialogs"    | \
739         "with_widgets" )
740           case "$val" in
741             l | lu | luc | luci | lucid )               val=lucid  ;;
742             mo | mot | moti | motif )                   val=motif  ;;
743             a | at | ath | athe | athen | athena )      val=athena ;;
744             n | no | non | none )                       val=no     ;;
745             y | ye | yes )                              val=yes    ;;
746             g | gt | gtk )                              val=gtk    ;;
747             ms | msw )                                  val=msw    ;;
748             * ) (echo "$progname: Usage error:"
749 echo " " "The \`--$optname' option must have one of these values:
750   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
751 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
752           esac
753           eval "$opt=\"$val\""
754         ;;
755
756                 "use_minimal_tagbits" | \
757         "use_indexed_lrecord_implementation" | \
758         "run_in_place"  | \
759         "const_is_losing" | \
760         "with_gnu_make" )
761           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
762         ;;
763
764                 * ) (echo "$progname: Usage error:"
765 echo " " "Unrecognized option: $arg"
766 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
767
768       esac
769     ;;
770
771         *-*-*) configuration="$arg" ;;
772
773         *) (echo "$progname: Usage error:"
774 echo " " "Unrecognized argument: $arg"
775 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
776
777   esac
778 done
779
780
781 test -n "$cpp"      && CPP="$cpp"
782 test -n "$cppflags" && CPPFLAGS="$cppflags"
783 test -n "$libs"     && LIBS="$libs"
784 test -n "$ldflags"  && LDFLAGS="$ldflags"
785
786 eval set x "$quoted_arguments"; shift
787
788 test "$extra_verbose" = "yes" && verbose=yes
789
790 test -n "$with_x" && with_x11="$with_x"
791
792 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
793   test "$with_system_malloc" = "default" && with_system_malloc=yes
794 fi
795
796
797
798 if test "$with_cde $with_tooltalk" = "yes no"; then
799   (echo "$progname: Usage error:"
800 echo " " "--with-cde requires --with-tooltalk"
801 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
802 elif test "$with_tooltalk" = "no" ; then with_cde=no
803 elif test "$with_cde" = "yes"; then with_tooltalk=yes
804 fi
805
806
807 case "$srcdir" in
808
809     "" )
810     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
811       if test -f "$dir/src/lisp.h" -a \
812               -f "$dir/lisp/version.el" ; then
813         srcdir="$dir"
814         break
815       fi
816     done
817     if test -z "$srcdir" ; then
818       (echo "$progname: Usage error:"
819 echo " " "Neither the current directory nor its parent seem to
820   contain the XEmacs sources.  If you do not want to build XEmacs in its
821   source tree, you should run \`$progname' in the directory in which
822   you wish to build XEmacs, using the \`--srcdir' option to say where the
823   sources may be found."
824 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
825     fi
826   ;;
827
828     * )
829     if test ! -f "$srcdir/src/lisp.h" -o \
830             ! -f "$srcdir/lisp/version.el" ; then
831       (echo "$progname: Usage error:"
832 echo " " "The directory specified with the \`--srcdir' option,
833   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
834   either run the \`$progname' script at the top of the XEmacs source
835   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
836 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
837     fi
838   ;;
839 esac
840
841 if test -z "$configuration"; then
842     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
843   if test -z "$configuration"; then
844     (echo "$progname: Usage error:"
845 echo " " "XEmacs has not been ported to this host type.
846 Try explicitly specifying the CONFIGURATION when rerunning configure."
847 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
848   fi
849 fi
850
851 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
852 echo "configure:853: checking whether ln -s works" >&5
853
854 rm -f conftestdata
855 if ln -s X conftestdata 2>/dev/null
856 then
857   rm -f conftestdata
858   ac_cv_prog_LN_S="ln -s"
859 else
860   ac_cv_prog_LN_S=ln
861 fi
862 LN_S="$ac_cv_prog_LN_S"
863 if test "$ac_cv_prog_LN_S" = "ln -s"; then
864   echo "$ac_t""yes" 1>&6
865 else
866   echo "$ac_t""no" 1>&6
867 fi
868
869
870 for dir in lisp etc man info tests; do
871   if test ! -d "$dir" ; then
872     echo Making symbolic link to "$srcdir/$dir"
873     ${LN_S} "$srcdir/$dir" "$dir"
874   fi
875 done
876
877
878 absolute_pwd="`pwd`";
879 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
880 then blddir="$PWD"
881 else blddir="$absolute_pwd"; if test -d "/net"; then
882   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
883   blddir=`echo "$blddir" | \
884    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
885 fi
886 fi
887
888
889 case "$srcdir" in
890   /* ) ;;
891   .  ) srcdir="$blddir" ;;
892   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
893   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
894   srcdir=`echo "$srcdir" | \
895    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
896 fi ;;
897 esac
898
899 if test `pwd` != `sh -c cd $srcdir && pwd`  \
900    && test -f "$srcdir/src/config.h"; then
901   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
902    echo "   as a build directory right now; it has been configured in its own"
903    echo "   right.  To configure in another directory as well, you MUST"
904    echo "   use GNU make.  If you do not have GNU make, then you must"
905    echo "   now do \`make distclean' in $srcdir,"
906    echo "   and then run $progname again.") >&2
907   extrasub='/^VPATH[     ]*=/c\
908 vpath %.c $(srcdir)\
909 vpath %.h $(srcdir)\
910 vpath %.y $(srcdir)\
911 vpath %.l $(srcdir)\
912 vpath %.s $(srcdir)\
913 vpath %.in $(srcdir)'
914 fi
915
916 . "$srcdir/version.sh" || exit 1;
917 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
918 : "${extra_verbose=$beta}"
919 version="${emacs_major_version}.${emacs_minor_version}"
920 { test "$extra_verbose" = "yes" && cat << EOF
921     Defining EMACS_MAJOR_VERSION = $emacs_major_version
922 EOF
923 cat >> confdefs.h <<EOF
924 #define EMACS_MAJOR_VERSION $emacs_major_version
925 EOF
926 }
927
928 { test "$extra_verbose" = "yes" && cat << EOF
929     Defining EMACS_MINOR_VERSION = $emacs_minor_version
930 EOF
931 cat >> confdefs.h <<EOF
932 #define EMACS_MINOR_VERSION $emacs_minor_version
933 EOF
934 }
935
936 if test -n "$emacs_beta_version" ; then
937   if test "$beta" = "yes"; then
938         version="${version}-b${emacs_beta_version}"
939         { test "$extra_verbose" = "yes" && cat << EOF
940     Defining EMACS_BETA_VERSION = $emacs_beta_version
941 EOF
942 cat >> confdefs.h <<EOF
943 #define EMACS_BETA_VERSION $emacs_beta_version
944 EOF
945 }
946
947   else
948         version="${version}.${emacs_beta_version}"
949         { test "$extra_verbose" = "yes" && cat << EOF
950     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
951 EOF
952 cat >> confdefs.h <<EOF
953 #define EMACS_PATCH_LEVEL $emacs_beta_version
954 EOF
955 }
956
957   fi
958 fi
959 { test "$extra_verbose" = "yes" && cat << EOF
960     Defining XEMACS_CODENAME = "$xemacs_codename"
961 EOF
962 cat >> confdefs.h <<EOF
963 #define XEMACS_CODENAME "$xemacs_codename"
964 EOF
965 }
966
967 { test "$extra_verbose" = "yes" && cat << EOF
968     Defining EMACS_VERSION = "$version"
969 EOF
970 cat >> confdefs.h <<EOF
971 #define EMACS_VERSION "$version"
972 EOF
973 }
974
975
976 if test "$with_infodock" = "yes"; then
977   if test ! -f ../../ID-INSTALL; then
978     echo "Cannot build InfoDock without InfoDock sources"
979     with_infodock=no
980   fi
981 fi
982
983 if test "$with_infodock" = "yes"; then
984       { test "$extra_verbose" = "yes" && cat << EOF
985     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
986 EOF
987 cat >> confdefs.h <<EOF
988 #define INFODOCK_MAJOR_VERSION $infodock_major_version
989 EOF
990 }
991
992   { test "$extra_verbose" = "yes" && cat << EOF
993     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
994 EOF
995 cat >> confdefs.h <<EOF
996 #define INFODOCK_MINOR_VERSION $infodock_minor_version
997 EOF
998 }
999
1000   { test "$extra_verbose" = "yes" && cat << EOF
1001     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1002 EOF
1003 cat >> confdefs.h <<EOF
1004 #define INFODOCK_BUILD_VERSION $infodock_build_version
1005 EOF
1006 }
1007
1008   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1009   PROGNAME=infodock
1010   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1011 else
1012   PROGNAME=xemacs
1013 fi
1014
1015 { test "$extra_verbose" = "yes" && cat << EOF
1016     Defining EMACS_PROGNAME = "$PROGNAME"
1017 EOF
1018 cat >> confdefs.h <<EOF
1019 #define EMACS_PROGNAME "$PROGNAME"
1020 EOF
1021 }
1022
1023
1024 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1025 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1026     Defining ERROR_CHECK_EXTENTS
1027 EOF
1028 cat >> confdefs.h <<\EOF
1029 #define ERROR_CHECK_EXTENTS 1
1030 EOF
1031 }
1032
1033 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1034     Defining ERROR_CHECK_TYPECHECK
1035 EOF
1036 cat >> confdefs.h <<\EOF
1037 #define ERROR_CHECK_TYPECHECK 1
1038 EOF
1039 }
1040
1041 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1042     Defining ERROR_CHECK_BUFPOS
1043 EOF
1044 cat >> confdefs.h <<\EOF
1045 #define ERROR_CHECK_BUFPOS 1
1046 EOF
1047 }
1048
1049 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1050     Defining ERROR_CHECK_GC
1051 EOF
1052 cat >> confdefs.h <<\EOF
1053 #define ERROR_CHECK_GC 1
1054 EOF
1055 }
1056
1057 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1058     Defining ERROR_CHECK_MALLOC
1059 EOF
1060 cat >> confdefs.h <<\EOF
1061 #define ERROR_CHECK_MALLOC 1
1062 EOF
1063 }
1064
1065 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1066     Defining ERROR_CHECK_BYTE_CODE
1067 EOF
1068 cat >> confdefs.h <<\EOF
1069 #define ERROR_CHECK_BYTE_CODE 1
1070 EOF
1071 }
1072
1073 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1074     Defining ERROR_CHECK_GLYPHS
1075 EOF
1076 cat >> confdefs.h <<\EOF
1077 #define ERROR_CHECK_GLYPHS 1
1078 EOF
1079 }
1080
1081 if test "${debug:=$beta}" = "yes"; then
1082   use_assertions=yes memory_usage_stats=yes
1083   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1084    echo "    xemacs will be linked with \"debug.o\""
1085  fi
1086   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1087    echo "    xemacs will be linked with \"tests.o\""
1088  fi
1089   { test "$extra_verbose" = "yes" && cat << \EOF
1090     Defining DEBUG_XEMACS
1091 EOF
1092 cat >> confdefs.h <<\EOF
1093 #define DEBUG_XEMACS 1
1094 EOF
1095 }
1096
1097 fi
1098 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1099     Defining USE_ASSERTIONS
1100 EOF
1101 cat >> confdefs.h <<\EOF
1102 #define USE_ASSERTIONS 1
1103 EOF
1104 }
1105
1106 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1107     Defining MEMORY_USAGE_STATS
1108 EOF
1109 cat >> confdefs.h <<\EOF
1110 #define MEMORY_USAGE_STATS 1
1111 EOF
1112 }
1113
1114
1115
1116 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1117 echo "configure:1118: checking "host system type"" >&5
1118 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1119 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1120 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1121 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1122 echo "$ac_t""$configuration" 1>&6
1123
1124
1125
1126
1127
1128 machine='' opsys=''
1129
1130 case "$canonical" in
1131   sparc-*-*        ) machine=sparc ;;
1132   alpha*-*-*       ) machine=alpha ;;
1133   vax-*-*          ) machine=vax ;;
1134   mips-dec-*       ) machine=pmax ;;
1135   mips-sgi-irix6*  ) machine=iris6d ;;
1136   mips-sgi-*       ) machine=iris4d ;;
1137   mips*-linux      ) machine=mips ;;
1138   romp-ibm-*       ) machine=ibmrt ;;
1139   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1140   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1141   powerpc*-*       ) machine=powerpc ;;
1142   hppa-*-*         ) machine=hp800 ;;
1143   m88k-dg-*        ) machine=aviion ;;
1144   m68*-sony-*      ) machine=news ;;
1145   mips-sony-*      ) machine=news-risc ;;
1146   clipper-*        ) machine=clipper ;;
1147   arm*             ) machine=arm ;;
1148   ns32k-*          ) machine=ns32000 ;;
1149 esac
1150
1151 case "$canonical" in
1152   *-*-linux*    ) opsys=linux ;;
1153   *-*-netbsd*   ) opsys=netbsd ;;
1154   *-*-openbsd*  ) opsys=openbsd ;;
1155   *-*-nextstep* ) opsys=nextstep ;;
1156   *-*-vms       ) opsys=vms ;;
1157
1158     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1159   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1160   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1161   *-dec-osf3*                ) opsys=decosf3-1 ;;
1162   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1163
1164     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1165   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1166   *-*-ultrix* )         opsys=ultrix4-3 ;;
1167
1168     *-*-aix3.1*  ) opsys=aix3-1 ;;
1169   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1170   *-*-aix3*    ) opsys=aix3-2   ;;
1171   *-*-aix4.0*  ) opsys=aix4     ;;
1172   *-*-aix4.1*  ) opsys=aix4-1   ;;
1173   *-*-aix4*    ) opsys=aix4-2   ;;
1174
1175     *-gnu* )                    opsys=gnu    ;;
1176   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1177   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1178   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1179   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1180   *-*-aos*   )                  opsys=bsd4-3 ;;
1181   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1182   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1183   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1184   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1185   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1186   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1187         if test -z "$NON_GNU_CPP" ; then
1188           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1189             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1190           done
1191         fi
1192         opsys=usg5-4-2 ;;
1193     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1194     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1195 esac
1196
1197 case "$canonical" in
1198
1199     *-*-netbsd* )
1200     case "$canonical" in
1201       i[3-9]86-*-netbsd*) machine=intel386 ;;
1202       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1203                                             machine=hp9000s300 ;;
1204       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1205       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1206     esac
1207   ;;
1208
1209     *-*-openbsd* )
1210     case "${canonical}" in
1211       i386-*-openbsd*)          machine=intel386 ;;
1212       m68k-*-openbsd*)          machine=hp9000s300 ;;
1213       mipsel-*-openbsd*)        machine=pmax ;;
1214      esac
1215    ;;
1216
1217     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1218   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1219
1220     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1221   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1222
1223     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1224
1225     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1226
1227     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1228
1229     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1230
1231     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1232
1233     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1234   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1235   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1236
1237   
1238     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1239
1240     *-convex-bsd* | *-convex-convexos* )
1241     machine=convex opsys=bsd4-3
1242     NON_GNU_CPP="cc -E -P"
1243   ;;
1244
1245     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1246
1247     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1248   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1249   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1250   m88k-dg-dgux*                           ) opsys=dgux     ;;
1251
1252     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1253   m88k-motorola-sysv4* )
1254                     machine=delta88k opsys=usg5-4-2
1255   ;;
1256   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1257
1258     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1259   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1260
1261     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1262
1263     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1264   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1265   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1266
1267       m88k-harris-cxux* )
1268         case "`uname -r`" in
1269        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1270        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1271     esac
1272     NON_GNU_CPP="/lib/cpp"
1273   ;;
1274     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1275     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1276
1277     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1278
1279     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1280
1281     *-hp-hpux* )
1282         case "$canonical" in
1283       m68*  ) machine=hp9000s300 ;;
1284       hppa* ) machine=hp800      ;;
1285     esac
1286
1287     case "$canonical" in
1288       *-hp-hpux7*  )  opsys=hpux   ;;
1289       *-hp-hpux8*  )  opsys=hpux8  ;;
1290       *-hp-hpux9*  )  opsys=hpux9  ;;
1291       *-hp-hpux10* )  opsys=hpux10 ;;
1292       *-hp-hpux11* )  opsys=hpux11 ;;
1293       *            )  opsys=hpux   ;;
1294     esac
1295
1296         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1297    echo "    xemacs will be linked with \"strcat.o\""
1298  fi ;; esac
1299
1300     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1301         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1302     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1303
1304     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1305   ;;
1306
1307     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1308   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1309
1310     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1311   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1312   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1313   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1314   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1315   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1316
1317     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1318   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1319
1320     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1321
1322     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1323
1324     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1325
1326     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1327
1328       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1329
1330     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1331
1332     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1333
1334     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1335
1336     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1337
1338         mips-mips-usg* ) machine=mips4 ;;
1339   mips-mips-riscos4 )
1340     machine=mips4
1341     NON_GNU_CC="cc -systype bsd43"
1342     NON_GNU_CPP="cc -systype bsd43 -E"
1343     case "$canonical" in
1344       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1345       mips-mips-riscos5* ) opsys=riscos5 ;;
1346     esac
1347   ;;
1348   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1349   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1350
1351     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1352
1353     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1354
1355     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1356   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1357
1358     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1359
1360     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1361
1362     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1363
1364     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1365
1366     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1367   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1368
1369     mips-siemens-sysv* | mips-sni-sysv*)
1370     machine=mips-siemens opsys=usg5-4
1371     NON_GNU_CC=/usr/ccs/bin/cc
1372     NON_GNU_CPP=/usr/ccs/lib/cpp
1373   ;;
1374
1375     mips-nec-sysv*)
1376     machine=mips-nec
1377     NON_GNU_CC=/usr/ccs/bin/cc
1378     NON_GNU_CPP=/usr/ccs/lib/cpp
1379   ;;
1380
1381       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1382   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1383     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1384   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1385   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1386   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1387   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1388   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1389   mips-sgi-irix*      ) opsys=irix5-0 ;;
1390
1391     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1392   *-sony-news* ) opsys=newsos5 ;;
1393
1394     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1395
1396     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1397         case "$canonical" in
1398       m68*-sunos1* )             machine=sun1     ;;
1399       m68*-sunos2* )             machine=sun2     ;;
1400       m68* )                     machine=sun3     ;;
1401       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1402       i*86-*-* )                 machine=intel386 ;;
1403       rs6000* )                  machine=rs6000   ;;
1404     esac
1405
1406         case "$canonical" in *-sunos5*)
1407       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1408     esac
1409
1410                     case "$canonical" in
1411       *-sunos4* )
1412         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1413         : ;;
1414       *-solaris2* )
1415         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1416         RANLIB=':' ;;
1417     esac
1418
1419     case "$canonical" in
1420       *-solaris*          )
1421         opsys=sol2
1422         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1423         { test "$extra_verbose" = "yes" && cat << EOF
1424     Defining OS_RELEASE = $os_release
1425 EOF
1426 cat >> confdefs.h <<EOF
1427 #define OS_RELEASE $os_release
1428 EOF
1429 }
1430  ;;
1431
1432             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1433       *-sunos4.0*         ) opsys=sunos4-0      ;;
1434       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1435       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1436       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1437       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1438       *-mach*             ) opsys=mach-bsd4-3   ;;
1439       *                   ) opsys=bsd4-2        ;;
1440     esac
1441
1442     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1443
1444         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1445   ;;
1446
1447     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1448
1449     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1450   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1451
1452     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1453
1454     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1455
1456     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1457       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1458
1459     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1460
1461     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1462
1463     vax-dec-* )
1464     case "$canonical" in
1465       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1466       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1467       *-mach* )                         opsys=mach-bsd4-3 ;;
1468     esac
1469   ;;
1470
1471     ns16k-whitechapel-* ) machine=mg1 ;;
1472
1473     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1474
1475     i[3-9]86-*-* )
1476     machine=intel386
1477     case "$canonical" in
1478       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1479       *-isc2.2* )               opsys=isc2-2 ;;
1480       *-isc4.0* )               opsys=isc4-0 ;;
1481       *-isc4.* )                opsys=isc4-1
1482                                 GCC_TEST_OPTIONS=-posix
1483                                 NON_GCC_TEST_OPTIONS=-Xp
1484                                 ;;
1485       *-isc* )                  opsys=isc3-0 ;;
1486       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1487       *-esix* )                 opsys=esix ;;
1488       *-mach* )                 opsys=mach-bsd4-3 ;;
1489       *-xenix* )                opsys=xenix ;;
1490       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1491       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1492       *-bsdi4* )                opsys=bsdos4 ;;
1493       *-bsdi3* )                opsys=bsdos3 ;;
1494       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1495       *-bsdi2* )                opsys=bsdos2 ;;
1496       *-sco3.2v5* )             opsys=sco5 ;;
1497       *-sysv5* )                opsys=sco7 ;;
1498       *-386bsd* )               opsys=386bsd ;;
1499       *-freebsd* )              opsys=freebsd ;;
1500       *-nextstep* )             opsys=nextstep ;;
1501       *-pc-cygwin* )            opsys=cygwin32 ;;
1502       *-pc-mingw* )             opsys=mingw32 ;
1503                                 test -z "$with_tty" && with_tty="no";;
1504           esac
1505   ;;
1506
1507     m68k-*-linux* ) machine=m68k opsys=linux ;;
1508
1509 esac
1510
1511 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1512
1513 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1514
1515 if test -r "${srcdir}/src/m/${machine}.h"; then
1516   machfile="m/${machine}.h"
1517   { test "$extra_verbose" = "yes" && cat << EOF
1518     Defining config_machfile = "$machfile"
1519 EOF
1520 cat >> confdefs.h <<EOF
1521 #define config_machfile "$machfile"
1522 EOF
1523 }
1524
1525 else
1526   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1527   echo "Using configure-time autodetection only."
1528 fi
1529
1530 if test -r "${srcdir}/src/s/${opsys}.h"; then
1531   opsysfile="s/${opsys}.h"
1532   { test "$extra_verbose" = "yes" && cat << EOF
1533     Defining config_opsysfile = "$opsysfile"
1534 EOF
1535 cat >> confdefs.h <<EOF
1536 #define config_opsysfile "$opsysfile"
1537 EOF
1538 }
1539
1540 else
1541   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1542   echo "Using configure-time autodetection only."
1543 fi
1544
1545
1546 if test -z "$dynamic"; then
1547   case "$opsys" in
1548     hpux* | sunos4* ) dynamic=no ;;
1549     *) dynamic=yes ;;
1550   esac
1551 fi
1552 if test "$dynamic" = "yes"; then
1553   case "$opsys" in
1554     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1555     decosf* ) ld_call_shared="-call_shared" ;;
1556   esac
1557 else   case "$opsys" in
1558     sol2 )
1559       echo "Static linking is not supported on Solaris 2."
1560       echo "Rerun configure without specifying --dynamic=no."
1561       exit 1 ;;
1562     linux   ) ld_call_shared="-Bstatic" ;;
1563     decosf* ) ld_call_shared="-non_shared" ;;
1564   esac
1565 fi
1566
1567 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1568
1569 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1570 { test "$extra_verbose" = "yes" && cat << EOF
1571     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1572 EOF
1573 cat >> confdefs.h <<EOF
1574 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1575 EOF
1576 }
1577
1578
1579
1580 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1581 if test "$with_workshop $with_tooltalk" = "yes no"; then
1582   (echo "$progname: Usage error:"
1583 echo " " "--with-workshop requires --with-tooltalk"
1584 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1585 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1586 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1587 fi
1588
1589 if test "$with_workshop" = "yes"; then
1590   { test "$extra_verbose" = "yes" && cat << \EOF
1591     Defining SUNPRO
1592 EOF
1593 cat >> confdefs.h <<\EOF
1594 #define SUNPRO 1
1595 EOF
1596 }
1597
1598   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1599    echo "    xemacs will be linked with \"sunpro.o\""
1600  fi
1601 fi
1602
1603 if test "$with_clash_detection" != "no"; then
1604   { test "$extra_verbose" = "yes" && cat << \EOF
1605     Defining CLASH_DETECTION
1606 EOF
1607 cat >> confdefs.h <<\EOF
1608 #define CLASH_DETECTION 1
1609 EOF
1610 }
1611
1612   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1613    echo "    xemacs will be linked with \"filelock.o\""
1614  fi
1615 fi
1616
1617 test -n "$compiler" && CC="$compiler"
1618 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1619 fi
1620
1621 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1622 if test "${CFLAGS-unset}" != unset
1623   then cflags_specified=yes;
1624   else cflags_specified=no;
1625 fi
1626
1627 xe_save_CFLAGS="$CFLAGS"
1628
1629 # Extract the first word of "gcc", so it can be a program name with args.
1630 set dummy gcc; ac_word=$2
1631 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1632 echo "configure:1633: checking for $ac_word" >&5
1633
1634 if test -n "$CC"; then
1635   ac_cv_prog_CC="$CC" # Let the user override the test.
1636 else
1637   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1638   ac_dummy="$PATH"
1639   for ac_dir in $ac_dummy; do
1640     test -z "$ac_dir" && ac_dir=.
1641     if test -f $ac_dir/$ac_word; then
1642       ac_cv_prog_CC="gcc"
1643       break
1644     fi
1645   done
1646   IFS="$ac_save_ifs"
1647 fi
1648 CC="$ac_cv_prog_CC"
1649 if test -n "$CC"; then
1650   echo "$ac_t""$CC" 1>&6
1651 else
1652   echo "$ac_t""no" 1>&6
1653 fi
1654
1655 if test -z "$CC"; then
1656   # Extract the first word of "cc", so it can be a program name with args.
1657 set dummy cc; ac_word=$2
1658 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1659 echo "configure:1660: checking for $ac_word" >&5
1660
1661 if test -n "$CC"; then
1662   ac_cv_prog_CC="$CC" # Let the user override the test.
1663 else
1664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1665   ac_prog_rejected=no
1666   ac_dummy="$PATH"
1667   for ac_dir in $ac_dummy; do
1668     test -z "$ac_dir" && ac_dir=.
1669     if test -f $ac_dir/$ac_word; then
1670       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1671         ac_prog_rejected=yes
1672         continue
1673       fi
1674       ac_cv_prog_CC="cc"
1675       break
1676     fi
1677   done
1678   IFS="$ac_save_ifs"
1679 if test $ac_prog_rejected = yes; then
1680   # We found a bogon in the path, so make sure we never use it.
1681   set dummy $ac_cv_prog_CC
1682   shift
1683   if test $# -gt 0; then
1684     # We chose a different compiler from the bogus one.
1685     # However, it has the same basename, so the bogon will be chosen
1686     # first if we set CC to just the basename; use the full file name.
1687     shift
1688     set dummy "$ac_dir/$ac_word" "$@"
1689     shift
1690     ac_cv_prog_CC="$@"
1691   fi
1692 fi
1693 fi
1694 CC="$ac_cv_prog_CC"
1695 if test -n "$CC"; then
1696   echo "$ac_t""$CC" 1>&6
1697 else
1698   echo "$ac_t""no" 1>&6
1699 fi
1700
1701   if test -z "$CC"; then
1702     case "`uname -s`" in
1703     *win32* | *WIN32*)
1704       # Extract the first word of "cl", so it can be a program name with args.
1705 set dummy cl; ac_word=$2
1706 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1707 echo "configure:1708: checking for $ac_word" >&5
1708
1709 if test -n "$CC"; then
1710   ac_cv_prog_CC="$CC" # Let the user override the test.
1711 else
1712   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1713   ac_dummy="$PATH"
1714   for ac_dir in $ac_dummy; do
1715     test -z "$ac_dir" && ac_dir=.
1716     if test -f $ac_dir/$ac_word; then
1717       ac_cv_prog_CC="cl"
1718       break
1719     fi
1720   done
1721   IFS="$ac_save_ifs"
1722 fi
1723 CC="$ac_cv_prog_CC"
1724 if test -n "$CC"; then
1725   echo "$ac_t""$CC" 1>&6
1726 else
1727   echo "$ac_t""no" 1>&6
1728 fi
1729  ;;
1730     esac
1731   fi
1732   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1733 fi
1734
1735 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1736 echo "configure:1737: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1737
1738 ac_ext=c
1739 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1740 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1741 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'
1742 ac_cpp='$CPP '"$xe_cppflags"
1743 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1744 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1745 cross_compiling=no
1746
1747 cat > conftest.$ac_ext << EOF
1748
1749 #line 1750 "configure"
1750 #include "confdefs.h"
1751
1752 main(){return(0);}
1753 EOF
1754 if { (eval echo configure:1755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1755   ac_cv_prog_cc_works=yes
1756   # If we can't run a trivial program, we are probably using a cross compiler.
1757   if (./conftest; exit) 2>/dev/null; then
1758     ac_cv_prog_cc_cross=no
1759   else
1760     ac_cv_prog_cc_cross=yes
1761   fi
1762 else
1763   echo "configure: failed program was:" >&5
1764   cat conftest.$ac_ext >&5
1765   ac_cv_prog_cc_works=no
1766 fi
1767 rm -fr conftest*
1768 ac_ext=c
1769 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1770 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1771 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'
1772 ac_cpp='$CPP '"$xe_cppflags"
1773 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1774 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1775 cross_compiling=no
1776
1777 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1778 if test $ac_cv_prog_cc_works = no; then
1779   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1780 fi
1781 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1782 echo "configure:1783: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1783 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1784 cross_compiling=$ac_cv_prog_cc_cross
1785
1786 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1787 echo "configure:1788: checking whether we are using GNU C" >&5
1788
1789 cat > conftest.c <<EOF
1790 #ifdef __GNUC__
1791   yes;
1792 #endif
1793 EOF
1794 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1795   ac_cv_prog_gcc=yes
1796 else
1797   ac_cv_prog_gcc=no
1798 fi
1799
1800 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1801
1802 if test $ac_cv_prog_gcc = yes; then
1803   GCC=yes
1804 else
1805   GCC=
1806 fi
1807
1808 ac_test_CFLAGS="${CFLAGS+set}"
1809 ac_save_CFLAGS="$CFLAGS"
1810 CFLAGS=
1811 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1812 echo "configure:1813: checking whether ${CC-cc} accepts -g" >&5
1813
1814 echo 'void f(){}' > conftest.c
1815 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1816   ac_cv_prog_cc_g=yes
1817 else
1818   ac_cv_prog_cc_g=no
1819 fi
1820 rm -f conftest*
1821
1822
1823 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1824 if test "$ac_test_CFLAGS" = set; then
1825   CFLAGS="$ac_save_CFLAGS"
1826 elif test $ac_cv_prog_cc_g = yes; then
1827   if test "$GCC" = yes; then
1828     CFLAGS="-g -O2"
1829   else
1830     CFLAGS="-g"
1831   fi
1832 else
1833   if test "$GCC" = yes; then
1834     CFLAGS="-O2"
1835   else
1836     CFLAGS=
1837   fi
1838 fi
1839  
1840 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1841   CC=${NON_GNU_CC-cc}
1842   # Extract the first word of "gcc", so it can be a program name with args.
1843 set dummy gcc; ac_word=$2
1844 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1845 echo "configure:1846: checking for $ac_word" >&5
1846
1847 if test -n "$CC"; then
1848   ac_cv_prog_CC="$CC" # Let the user override the test.
1849 else
1850   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1851   ac_dummy="$PATH"
1852   for ac_dir in $ac_dummy; do
1853     test -z "$ac_dir" && ac_dir=.
1854     if test -f $ac_dir/$ac_word; then
1855       ac_cv_prog_CC="gcc"
1856       break
1857     fi
1858   done
1859   IFS="$ac_save_ifs"
1860 fi
1861 CC="$ac_cv_prog_CC"
1862 if test -n "$CC"; then
1863   echo "$ac_t""$CC" 1>&6
1864 else
1865   echo "$ac_t""no" 1>&6
1866 fi
1867
1868 if test -z "$CC"; then
1869   # Extract the first word of "cc", so it can be a program name with args.
1870 set dummy cc; ac_word=$2
1871 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1872 echo "configure:1873: checking for $ac_word" >&5
1873
1874 if test -n "$CC"; then
1875   ac_cv_prog_CC="$CC" # Let the user override the test.
1876 else
1877   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1878   ac_prog_rejected=no
1879   ac_dummy="$PATH"
1880   for ac_dir in $ac_dummy; do
1881     test -z "$ac_dir" && ac_dir=.
1882     if test -f $ac_dir/$ac_word; then
1883       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1884         ac_prog_rejected=yes
1885         continue
1886       fi
1887       ac_cv_prog_CC="cc"
1888       break
1889     fi
1890   done
1891   IFS="$ac_save_ifs"
1892 if test $ac_prog_rejected = yes; then
1893   # We found a bogon in the path, so make sure we never use it.
1894   set dummy $ac_cv_prog_CC
1895   shift
1896   if test $# -gt 0; then
1897     # We chose a different compiler from the bogus one.
1898     # However, it has the same basename, so the bogon will be chosen
1899     # first if we set CC to just the basename; use the full file name.
1900     shift
1901     set dummy "$ac_dir/$ac_word" "$@"
1902     shift
1903     ac_cv_prog_CC="$@"
1904   fi
1905 fi
1906 fi
1907 CC="$ac_cv_prog_CC"
1908 if test -n "$CC"; then
1909   echo "$ac_t""$CC" 1>&6
1910 else
1911   echo "$ac_t""no" 1>&6
1912 fi
1913
1914   if test -z "$CC"; then
1915     case "`uname -s`" in
1916     *win32* | *WIN32*)
1917       # Extract the first word of "cl", so it can be a program name with args.
1918 set dummy cl; ac_word=$2
1919 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1920 echo "configure:1921: checking for $ac_word" >&5
1921
1922 if test -n "$CC"; then
1923   ac_cv_prog_CC="$CC" # Let the user override the test.
1924 else
1925   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1926   ac_dummy="$PATH"
1927   for ac_dir in $ac_dummy; do
1928     test -z "$ac_dir" && ac_dir=.
1929     if test -f $ac_dir/$ac_word; then
1930       ac_cv_prog_CC="cl"
1931       break
1932     fi
1933   done
1934   IFS="$ac_save_ifs"
1935 fi
1936 CC="$ac_cv_prog_CC"
1937 if test -n "$CC"; then
1938   echo "$ac_t""$CC" 1>&6
1939 else
1940   echo "$ac_t""no" 1>&6
1941 fi
1942  ;;
1943     esac
1944   fi
1945   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1946 fi
1947
1948 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1949 echo "configure:1950: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1950
1951 ac_ext=c
1952 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1953 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1954 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'
1955 ac_cpp='$CPP '"$xe_cppflags"
1956 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1957 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1958 cross_compiling=no
1959
1960 cat > conftest.$ac_ext << EOF
1961
1962 #line 1963 "configure"
1963 #include "confdefs.h"
1964
1965 main(){return(0);}
1966 EOF
1967 if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1968   ac_cv_prog_cc_works=yes
1969   # If we can't run a trivial program, we are probably using a cross compiler.
1970   if (./conftest; exit) 2>/dev/null; then
1971     ac_cv_prog_cc_cross=no
1972   else
1973     ac_cv_prog_cc_cross=yes
1974   fi
1975 else
1976   echo "configure: failed program was:" >&5
1977   cat conftest.$ac_ext >&5
1978   ac_cv_prog_cc_works=no
1979 fi
1980 rm -fr conftest*
1981 ac_ext=c
1982 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1983 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1984 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'
1985 ac_cpp='$CPP '"$xe_cppflags"
1986 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1987 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1988 cross_compiling=no
1989
1990 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1991 if test $ac_cv_prog_cc_works = no; then
1992   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1993 fi
1994 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1995 echo "configure:1996: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1996 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1997 cross_compiling=$ac_cv_prog_cc_cross
1998
1999 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2000 echo "configure:2001: checking whether we are using GNU C" >&5
2001
2002 cat > conftest.c <<EOF
2003 #ifdef __GNUC__
2004   yes;
2005 #endif
2006 EOF
2007 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2008   ac_cv_prog_gcc=yes
2009 else
2010   ac_cv_prog_gcc=no
2011 fi
2012
2013 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2014
2015 if test $ac_cv_prog_gcc = yes; then
2016   GCC=yes
2017 else
2018   GCC=
2019 fi
2020
2021 ac_test_CFLAGS="${CFLAGS+set}"
2022 ac_save_CFLAGS="$CFLAGS"
2023 CFLAGS=
2024 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2025 echo "configure:2026: checking whether ${CC-cc} accepts -g" >&5
2026
2027 echo 'void f(){}' > conftest.c
2028 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2029   ac_cv_prog_cc_g=yes
2030 else
2031   ac_cv_prog_cc_g=no
2032 fi
2033 rm -f conftest*
2034
2035
2036 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2037 if test "$ac_test_CFLAGS" = set; then
2038   CFLAGS="$ac_save_CFLAGS"
2039 elif test $ac_cv_prog_cc_g = yes; then
2040   if test "$GCC" = yes; then
2041     CFLAGS="-g -O2"
2042   else
2043     CFLAGS="-g"
2044   fi
2045 else
2046   if test "$GCC" = yes; then
2047     CFLAGS="-O2"
2048   else
2049     CFLAGS=
2050   fi
2051 fi
2052
2053 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2054   CC=gcc
2055   # Extract the first word of "gcc", so it can be a program name with args.
2056 set dummy gcc; ac_word=$2
2057 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2058 echo "configure:2059: checking for $ac_word" >&5
2059
2060 if test -n "$CC"; then
2061   ac_cv_prog_CC="$CC" # Let the user override the test.
2062 else
2063   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2064   ac_dummy="$PATH"
2065   for ac_dir in $ac_dummy; do
2066     test -z "$ac_dir" && ac_dir=.
2067     if test -f $ac_dir/$ac_word; then
2068       ac_cv_prog_CC="gcc"
2069       break
2070     fi
2071   done
2072   IFS="$ac_save_ifs"
2073 fi
2074 CC="$ac_cv_prog_CC"
2075 if test -n "$CC"; then
2076   echo "$ac_t""$CC" 1>&6
2077 else
2078   echo "$ac_t""no" 1>&6
2079 fi
2080
2081 if test -z "$CC"; then
2082   # Extract the first word of "cc", so it can be a program name with args.
2083 set dummy cc; ac_word=$2
2084 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2085 echo "configure:2086: checking for $ac_word" >&5
2086
2087 if test -n "$CC"; then
2088   ac_cv_prog_CC="$CC" # Let the user override the test.
2089 else
2090   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2091   ac_prog_rejected=no
2092   ac_dummy="$PATH"
2093   for ac_dir in $ac_dummy; do
2094     test -z "$ac_dir" && ac_dir=.
2095     if test -f $ac_dir/$ac_word; then
2096       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2097         ac_prog_rejected=yes
2098         continue
2099       fi
2100       ac_cv_prog_CC="cc"
2101       break
2102     fi
2103   done
2104   IFS="$ac_save_ifs"
2105 if test $ac_prog_rejected = yes; then
2106   # We found a bogon in the path, so make sure we never use it.
2107   set dummy $ac_cv_prog_CC
2108   shift
2109   if test $# -gt 0; then
2110     # We chose a different compiler from the bogus one.
2111     # However, it has the same basename, so the bogon will be chosen
2112     # first if we set CC to just the basename; use the full file name.
2113     shift
2114     set dummy "$ac_dir/$ac_word" "$@"
2115     shift
2116     ac_cv_prog_CC="$@"
2117   fi
2118 fi
2119 fi
2120 CC="$ac_cv_prog_CC"
2121 if test -n "$CC"; then
2122   echo "$ac_t""$CC" 1>&6
2123 else
2124   echo "$ac_t""no" 1>&6
2125 fi
2126
2127   if test -z "$CC"; then
2128     case "`uname -s`" in
2129     *win32* | *WIN32*)
2130       # Extract the first word of "cl", so it can be a program name with args.
2131 set dummy cl; ac_word=$2
2132 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2133 echo "configure:2134: checking for $ac_word" >&5
2134
2135 if test -n "$CC"; then
2136   ac_cv_prog_CC="$CC" # Let the user override the test.
2137 else
2138   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2139   ac_dummy="$PATH"
2140   for ac_dir in $ac_dummy; do
2141     test -z "$ac_dir" && ac_dir=.
2142     if test -f $ac_dir/$ac_word; then
2143       ac_cv_prog_CC="cl"
2144       break
2145     fi
2146   done
2147   IFS="$ac_save_ifs"
2148 fi
2149 CC="$ac_cv_prog_CC"
2150 if test -n "$CC"; then
2151   echo "$ac_t""$CC" 1>&6
2152 else
2153   echo "$ac_t""no" 1>&6
2154 fi
2155  ;;
2156     esac
2157   fi
2158   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2159 fi
2160
2161 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2162 echo "configure:2163: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2163
2164 ac_ext=c
2165 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2166 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2167 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'
2168 ac_cpp='$CPP '"$xe_cppflags"
2169 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2170 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2171 cross_compiling=no
2172
2173 cat > conftest.$ac_ext << EOF
2174
2175 #line 2176 "configure"
2176 #include "confdefs.h"
2177
2178 main(){return(0);}
2179 EOF
2180 if { (eval echo configure:2181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2181   ac_cv_prog_cc_works=yes
2182   # If we can't run a trivial program, we are probably using a cross compiler.
2183   if (./conftest; exit) 2>/dev/null; then
2184     ac_cv_prog_cc_cross=no
2185   else
2186     ac_cv_prog_cc_cross=yes
2187   fi
2188 else
2189   echo "configure: failed program was:" >&5
2190   cat conftest.$ac_ext >&5
2191   ac_cv_prog_cc_works=no
2192 fi
2193 rm -fr conftest*
2194 ac_ext=c
2195 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2196 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2197 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'
2198 ac_cpp='$CPP '"$xe_cppflags"
2199 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2200 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2201 cross_compiling=no
2202
2203 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2204 if test $ac_cv_prog_cc_works = no; then
2205   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2206 fi
2207 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2208 echo "configure:2209: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2209 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2210 cross_compiling=$ac_cv_prog_cc_cross
2211
2212 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2213 echo "configure:2214: checking whether we are using GNU C" >&5
2214
2215 cat > conftest.c <<EOF
2216 #ifdef __GNUC__
2217   yes;
2218 #endif
2219 EOF
2220 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2221   ac_cv_prog_gcc=yes
2222 else
2223   ac_cv_prog_gcc=no
2224 fi
2225
2226 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2227
2228 if test $ac_cv_prog_gcc = yes; then
2229   GCC=yes
2230 else
2231   GCC=
2232 fi
2233
2234 ac_test_CFLAGS="${CFLAGS+set}"
2235 ac_save_CFLAGS="$CFLAGS"
2236 CFLAGS=
2237 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2238 echo "configure:2239: checking whether ${CC-cc} accepts -g" >&5
2239
2240 echo 'void f(){}' > conftest.c
2241 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2242   ac_cv_prog_cc_g=yes
2243 else
2244   ac_cv_prog_cc_g=no
2245 fi
2246 rm -f conftest*
2247
2248
2249 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2250 if test "$ac_test_CFLAGS" = set; then
2251   CFLAGS="$ac_save_CFLAGS"
2252 elif test $ac_cv_prog_cc_g = yes; then
2253   if test "$GCC" = yes; then
2254     CFLAGS="-g -O2"
2255   else
2256     CFLAGS="-g"
2257   fi
2258 else
2259   if test "$GCC" = yes; then
2260     CFLAGS="-O2"
2261   else
2262     CFLAGS=
2263   fi
2264 fi
2265
2266 fi
2267 CFLAGS="$xe_save_CFLAGS"
2268
2269
2270 test -n "$CPP" -a -d "$CPP" && CPP=
2271
2272 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2273
2274 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2275 echo "configure:2276: checking how to run the C preprocessor" >&5
2276 # On Suns, sometimes $CPP names a directory.
2277 if test -n "$CPP" && test -d "$CPP"; then
2278   CPP=
2279 fi
2280 if test -z "$CPP"; then
2281
2282   # This must be in double quotes, not single quotes, because CPP may get
2283   # substituted into the Makefile and "${CC-cc}" will confuse make.
2284   CPP="${CC-cc} -E"
2285   # On the NeXT, cc -E runs the code through the compiler's parser,
2286   # not just through cpp.
2287   cat > conftest.$ac_ext <<EOF
2288 #line 2289 "configure"
2289 #include "confdefs.h"
2290 #include <assert.h>
2291 Syntax Error
2292 EOF
2293 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2294 { (eval echo configure:2295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2296 if test -z "$ac_err"; then
2297   :
2298 else
2299   echo "$ac_err" >&5
2300   echo "configure: failed program was:" >&5
2301   cat conftest.$ac_ext >&5
2302   rm -rf conftest*
2303   CPP="${CC-cc} -E -traditional-cpp"
2304   cat > conftest.$ac_ext <<EOF
2305 #line 2306 "configure"
2306 #include "confdefs.h"
2307 #include <assert.h>
2308 Syntax Error
2309 EOF
2310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2311 { (eval echo configure:2312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2313 if test -z "$ac_err"; then
2314   :
2315 else
2316   echo "$ac_err" >&5
2317   echo "configure: failed program was:" >&5
2318   cat conftest.$ac_ext >&5
2319   rm -rf conftest*
2320   CPP="${CC-cc} -nologo -E"
2321   cat > conftest.$ac_ext <<EOF
2322 #line 2323 "configure"
2323 #include "confdefs.h"
2324 #include <assert.h>
2325 Syntax Error
2326 EOF
2327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2328 { (eval echo configure:2329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2330 if test -z "$ac_err"; then
2331   :
2332 else
2333   echo "$ac_err" >&5
2334   echo "configure: failed program was:" >&5
2335   cat conftest.$ac_ext >&5
2336   rm -rf conftest*
2337   CPP=/lib/cpp
2338 fi
2339 rm -f conftest*
2340 fi
2341 rm -f conftest*
2342 fi
2343 rm -f conftest*
2344   ac_cv_prog_CPP="$CPP"
2345   CPP="$ac_cv_prog_CPP"
2346 else
2347   ac_cv_prog_CPP="$CPP"
2348 fi
2349 echo "$ac_t""$CPP" 1>&6
2350
2351
2352
2353 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2354 echo "configure:2355: checking for AIX" >&5
2355 cat > conftest.$ac_ext <<EOF
2356 #line 2357 "configure"
2357 #include "confdefs.h"
2358 #ifdef _AIX
2359   yes
2360 #endif
2361
2362 EOF
2363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2364   egrep "yes" >/dev/null 2>&1; then
2365   rm -rf conftest*
2366   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2367     Defining _ALL_SOURCE
2368 EOF
2369 cat >> confdefs.h <<\EOF
2370 #define _ALL_SOURCE 1
2371 EOF
2372 }
2373
2374 else
2375   rm -rf conftest*
2376   echo "$ac_t""no" 1>&6
2377 fi
2378 rm -f conftest*
2379
2380  
2381
2382 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2383 echo "configure:2384: checking for GNU libc" >&5
2384 cat > conftest.$ac_ext <<EOF
2385 #line 2386 "configure"
2386 #include "confdefs.h"
2387 #include <features.h>
2388 int main() {
2389
2390 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2391 #error Not a GNU libc system :-(
2392 ******* ======= ******** &&&&&&&&
2393 #endif
2394
2395 ; return 0; }
2396 EOF
2397 if { (eval echo configure:2398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2398   rm -rf conftest*
2399   have_glibc=yes
2400 else
2401   echo "configure: failed program was:" >&5
2402   cat conftest.$ac_ext >&5
2403   rm -rf conftest*
2404   have_glibc=no
2405 fi
2406 rm -f conftest*
2407 echo "$ac_t""$have_glibc" 1>&6
2408 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2409     Defining _GNU_SOURCE
2410 EOF
2411 cat >> confdefs.h <<\EOF
2412 #define _GNU_SOURCE 1
2413 EOF
2414 }
2415
2416
2417 case "$opsys" in
2418   sol2)
2419    { test "$extra_verbose" = "yes" && cat << \EOF
2420     Defining __EXTENSIONS__
2421 EOF
2422 cat >> confdefs.h <<\EOF
2423 #define __EXTENSIONS__ 1
2424 EOF
2425 }
2426
2427       if test "$os_release" -ge 55; then
2428      { test "$extra_verbose" = "yes" && cat << \EOF
2429     Defining _XOPEN_SOURCE = 500
2430 EOF
2431 cat >> confdefs.h <<\EOF
2432 #define _XOPEN_SOURCE 500
2433 EOF
2434 }
2435
2436      { test "$extra_verbose" = "yes" && cat << \EOF
2437     Defining _XOPEN_SOURCE_EXTENDED
2438 EOF
2439 cat >> confdefs.h <<\EOF
2440 #define _XOPEN_SOURCE_EXTENDED 1
2441 EOF
2442 }
2443
2444    fi ;;
2445   linux)
2446     { test "$extra_verbose" = "yes" && cat << \EOF
2447     Defining _POSIX_C_SOURCE = 199506L
2448 EOF
2449 cat >> confdefs.h <<\EOF
2450 #define _POSIX_C_SOURCE 199506L
2451 EOF
2452 }
2453
2454     { test "$extra_verbose" = "yes" && cat << \EOF
2455     Defining _XOPEN_SOURCE = 500
2456 EOF
2457 cat >> confdefs.h <<\EOF
2458 #define _XOPEN_SOURCE 500
2459 EOF
2460 }
2461
2462     { test "$extra_verbose" = "yes" && cat << \EOF
2463     Defining _XOPEN_SOURCE_EXTENDED
2464 EOF
2465 cat >> confdefs.h <<\EOF
2466 #define _XOPEN_SOURCE_EXTENDED 1
2467 EOF
2468 }
2469
2470     ;;
2471 esac
2472
2473 cat > conftest.$ac_ext <<EOF
2474 #line 2475 "configure"
2475 #include "confdefs.h"
2476 int main () {
2477 #if defined __SUNPRO_C
2478 return 11;
2479 #elif defined __DECC
2480 return 12;
2481 #elif defined __USLC__ && defined __SCO_VERSION__
2482 return 13;
2483 #else
2484 return 0;
2485 #endif
2486 }
2487 EOF
2488 if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2489 then
2490   :
2491 else
2492   conftest_rc="$?"
2493   echo "configure: failed program was:" >&5
2494   cat conftest.$ac_ext >&5
2495   rm -fr conftest*
2496   case "$conftest_rc" in
2497   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2498   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2499   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2500 esac
2501 fi
2502 rm -fr conftest*
2503
2504
2505
2506
2507 echo "Extracting information from the machine- and system-dependent headers..."
2508
2509 tempcname="conftest.c"
2510
2511
2512
2513 cat > $tempcname < confdefs.h
2514 cat >> $tempcname <<EOF
2515 #define NOT_C_CODE
2516 #define C_SWITCH_SITE
2517 #define C_SWITCH_X_SITE
2518 #define LD_SWITCH_SITE
2519 #define LD_SWITCH_X_SITE
2520 #define LD_SWITCH_X_SITE_AUX
2521 #define OS_RELEASE $os_release
2522
2523 #ifdef config_opsysfile
2524 #include "$srcdir/src/$opsysfile"
2525 #endif
2526
2527 #ifdef config_machfile
2528 #include "$srcdir/src/$machfile"
2529 #endif
2530
2531 #ifndef LIBS_MACHINE
2532 #define LIBS_MACHINE
2533 #endif
2534 configure___ libs_machine=LIBS_MACHINE
2535
2536 #ifndef LIBS_SYSTEM
2537 #define LIBS_SYSTEM
2538 #endif
2539 configure___ libs_system=LIBS_SYSTEM
2540
2541 #ifndef LIBS_TERMCAP
2542 #define LIBS_TERMCAP
2543 #endif
2544 configure___ libs_termcap=LIBS_TERMCAP
2545
2546 #ifndef LIB_STANDARD
2547 #define LIB_STANDARD
2548 #endif
2549 configure___ libs_standard=LIB_STANDARD
2550
2551
2552 #ifndef OBJECTS_MACHINE
2553 #define OBJECTS_MACHINE
2554 #endif
2555 configure___ objects_machine=OBJECTS_MACHINE
2556
2557 #ifndef OBJECTS_SYSTEM
2558 #define OBJECTS_SYSTEM
2559 #endif
2560 configure___ objects_system=OBJECTS_SYSTEM
2561
2562
2563 #ifndef C_SWITCH_MACHINE
2564 #define C_SWITCH_MACHINE
2565 #endif
2566 configure___ c_switch_machine=C_SWITCH_MACHINE
2567
2568 #ifndef C_SWITCH_SYSTEM
2569 #define C_SWITCH_SYSTEM
2570 #endif
2571 configure___ c_switch_system=C_SWITCH_SYSTEM
2572
2573
2574 #ifndef LD_SWITCH_MACHINE
2575 #define LD_SWITCH_MACHINE
2576 #endif
2577 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2578
2579 #ifndef LD_SWITCH_SYSTEM
2580 #define LD_SWITCH_SYSTEM
2581 #endif
2582 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2583
2584
2585 #ifndef UNEXEC
2586 #define UNEXEC "unexec.o"
2587 #endif
2588 configure___ unexec=UNEXEC
2589
2590
2591 #ifndef LD_SWITCH_SHARED
2592 #define LD_SWITCH_SHARED "-c"
2593 #endif
2594 configure___ ld_switch_shared=LD_SWITCH_SHARED
2595
2596
2597 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2598 configure___ ordinary_ld=ORDINARY_LD
2599
2600 #ifdef ORDINARY_LINK
2601 #define LD ORDINARY_LD
2602 #else /* no ORDINARY LINK */
2603 #ifdef COFF_ENCAPSULATE
2604 #define LD "\$(CC) -nostdlib"
2605 #else /* not COFF_ENCAPSULATE */
2606 #ifdef LINKER
2607 #define LD LINKER
2608 #else /* ! defined (LINKER) */
2609 #define LD "ld"
2610 #endif /* ! defined (LINKER) */
2611 #endif /* ! defined (COFF_ENCAPSULATE) */
2612 #endif /* not ORDINARY_LINK */
2613 configure___ ld=LD
2614
2615 #ifndef LIB_GCC
2616 #define LIB_GCC
2617 #endif
2618 configure___ lib_gcc=LIB_GCC
2619
2620 #ifndef LD_TEXT_START_ADDR
2621 #define LD_TEXT_START_ADDR
2622 #endif
2623 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2624
2625
2626 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2627 #ifdef NO_REMAP
2628 #ifdef COFF_ENCAPSULATE
2629 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2630 #else /* ! defined (COFF_ENCAPSULATE) */
2631 #define START_FILES "pre-crt0.o /lib/crt0.o"
2632 #endif /* ! defined (COFF_ENCAPSULATE) */
2633 #else /* ! defined (NO_REMAP) */
2634 #define START_FILES "ecrt0.o"
2635 #endif /* ! defined (NO_REMAP) */
2636 #endif /* no ORDINARY_LINK */
2637 #ifndef START_FILES
2638 #define START_FILES
2639 #endif
2640 configure___ start_files=START_FILES
2641
2642 #ifdef ORDINARY_LINK
2643 configure___ ordinary_link=yes
2644 #else
2645 configure___ ordinary_link=no
2646 #endif
2647
2648 #ifdef SYSTEM_MALLOC
2649 configure___ system_malloc=yes
2650 #else
2651 configure___ system_malloc=no
2652 #endif
2653
2654 #ifdef TERMINFO
2655 configure___ have_terminfo=yes
2656 #else
2657 configure___ have_terminfo=no
2658 #endif
2659
2660 #ifdef MAIL_USE_FLOCK
2661 configure___ mail_use_flock=yes
2662 #else
2663 configure___ mail_use_flock=no
2664 #endif
2665
2666 #ifdef MAIL_USE_LOCKF
2667 configure___ mail_use_lockf=yes
2668 #else
2669 configure___ mail_use_lockf=no
2670 #endif
2671
2672 #ifdef MAIL_USE_LOCKING
2673 configure___ mail_use_locking=yes
2674 #else
2675 configure___ mail_use_locking=no
2676 #endif
2677
2678 #ifdef HAVE_WIN32_PROCESSES
2679 configure___ win32_processes=yes
2680 #else
2681 configure___ win32_processes=no
2682 #endif
2683
2684 EOF
2685
2686 CPP=`eval "echo $CPP $CPPFLAGS"`
2687 eval `$CPP -Isrc $tempcname \
2688         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2689
2690 rm $tempcname
2691
2692 if test "$pdump" = "yes"; then
2693   ordinary_link="yes"
2694   ld="${ordinary_ld}"
2695   start_files=
2696   libs_standard=
2697   unexec=
2698   lib_gcc=
2699 fi
2700
2701 test "$extra_verbose" = "yes" && \
2702   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 ""
2703
2704 case "$opsys" in mingw* | cygwin*)
2705   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2706   cygwin_include=`eval "dirname $cygwin_include"` ;
2707   cygwin_include="-I$cygwin_include/../include" ;
2708   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2709   case "$opsys" in mingw*)
2710     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2711   esac
2712   ;;
2713 esac
2714
2715 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2716
2717
2718 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2719
2720 if test "$__USLC__" = yes; then
2721   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2722 echo "configure:2723: checking for whether the -Kalloca compiler flag is needed" >&5
2723   need_kalloca=no
2724   cat > conftest.$ac_ext <<EOF
2725 #line 2726 "configure"
2726 #include "confdefs.h"
2727
2728 int main() {
2729 void *x = alloca(4);
2730 ; return 0; }
2731 EOF
2732 if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2733   rm -rf conftest*
2734   :
2735 else
2736   echo "configure: failed program was:" >&5
2737   cat conftest.$ac_ext >&5
2738   rm -rf conftest*
2739   
2740     xe_save_c_switch_system="$c_switch_system"
2741     c_switch_system="$c_switch_system -Kalloca"
2742     cat > conftest.$ac_ext <<EOF
2743 #line 2744 "configure"
2744 #include "confdefs.h"
2745
2746 int main() {
2747 void *x = alloca(4);
2748 ; return 0; }
2749 EOF
2750 if { (eval echo configure:2751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2751   rm -rf conftest*
2752    need_kalloca=yes 
2753 else
2754   echo "configure: failed program was:" >&5
2755   cat conftest.$ac_ext >&5
2756 fi
2757 rm -f conftest*
2758     c_switch_system="$xe_save_c_switch_system"
2759 fi
2760 rm -f conftest*
2761   echo "$ac_t""$need_kalloca" 1>&6
2762   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
2763 fi
2764
2765 if test "$cflags_specified" = "no"; then
2766       if   test "$GCC" = "yes"; then
2767     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wshadow"
2768         CFLAGS="$CFLAGS -Wsign-compare"
2769             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2770               elif test "$__SUNPRO_C" = "yes"; then
2771     case "$opsys" in
2772       sol2    ) CFLAGS="-v -xO4" ;;
2773       sunos4* ) CFLAGS="-xO2";;
2774     esac
2775   elif test "$__DECC" = "yes"; then
2776     CFLAGS="-O3"
2777   elif test "$CC" = "xlc"; then
2778     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2779     else
2780     CFLAGS="-O" ;  fi
2781 fi
2782
2783 if test "$GCC" = "yes"; then
2784 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2785 echo "configure:2786: checking for buggy gcc versions" >&5
2786 GCC_VERSION=`$CC --version`
2787 case `uname -s`:`uname -m`:$GCC_VERSION in
2788                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2789                         case "$CFLAGS" in
2790             *-O2*|*-O3*)
2791                 case "$CFLAGS" in
2792                     *-fno-schedule-insns*) ;;
2793                     *)
2794                         echo "$ac_t""yes" 1>&6
2795                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2796                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2797                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2798                         ;;
2799                 esac
2800                 ;;
2801         esac
2802         ;;
2803                     Linux:alpha:egcs-2.91.*)
2804         echo "$ac_t""yes" 1>&6
2805         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2806         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2807         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2808         ;;
2809     *:i*86*:2.7.2*)
2810         case "$CFLAGS" in
2811             *-O2*|*-O3*)
2812                 case "$GCC_VERSION" in
2813                     2.7.2)
2814                         case "$CFLAGS" in
2815                             *-fno-strength-reduce*) ;;
2816                             *)
2817                                 echo "$ac_t""yes" 1>&6
2818                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2819                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2820                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2821                                 ;;
2822                         esac
2823                         ;;
2824                 esac
2825                 case "$CFLAGS" in
2826                  *-fno-caller-saves*) ;;
2827                  *)
2828                     echo "$ac_t""yes" 1>&6
2829                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2830                     echo "configure: warning: -fno-caller-saves." 1>&2
2831                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2832                     ;;
2833                 esac
2834                 ;;
2835         esac
2836         ;;
2837 esac
2838 echo "$ac_t""no" 1>&6
2839 fi
2840
2841
2842 if test "$GCC" = "yes"; then
2843   set x $ld_switch_system; shift; ld_switch_system=""
2844   while test -n "$1"; do
2845     case $1 in
2846       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2847       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2848       -Xlinker* ) ;;
2849       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2850     esac
2851     shift
2852   done
2853 fi
2854
2855 if test "$GCC" = "yes"; then
2856   set x $ld_switch_machine; shift; ld_switch_machine=""
2857   while test -n "$1"; do
2858     case $1 in
2859       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2860       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2861       -Xlinker* ) ;;
2862       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2863     esac
2864     shift
2865   done
2866 fi
2867
2868 if test "$GCC" = "yes"; then
2869   set x $LDFLAGS; shift; LDFLAGS=""
2870   while test -n "$1"; do
2871     case $1 in
2872       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2873       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2874       -Xlinker* ) ;;
2875       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2876     esac
2877     shift
2878   done
2879 fi
2880
2881 if test "$GCC" = "yes"; then
2882   set x $ld_call_shared; shift; ld_call_shared=""
2883   while test -n "$1"; do
2884     case $1 in
2885       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2886       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2887       -Xlinker* ) ;;
2888       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2889     esac
2890     shift
2891   done
2892 fi
2893
2894 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2895    echo "    xemacs will be linked with \"$objects_machine\""
2896  fi
2897 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2898    echo "    xemacs will be linked with \"$objects_system\""
2899  fi
2900 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2901    echo "    xemacs will be linked with \"$unexec\""
2902  fi
2903 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2904    echo "    xemacs will be linked with \"dumper.o\""
2905  fi
2906
2907 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2908 echo "configure:2909: checking for dynodump" >&5
2909 if test "$unexec" != "unexsol2.o"; then
2910   echo "$ac_t""no" 1>&6
2911 else
2912   echo "$ac_t""yes" 1>&6
2913   { test "$extra_verbose" = "yes" && cat << \EOF
2914     Defining DYNODUMP
2915 EOF
2916 cat >> confdefs.h <<\EOF
2917 #define DYNODUMP 1
2918 EOF
2919 }
2920
2921   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2922   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2923   case "$machine" in
2924     sparc   ) dynodump_arch=sparc ;;
2925     *86*    ) dynodump_arch=i386  ;;
2926     powerpc ) dynodump_arch=ppc   ;;
2927   esac
2928     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
2929 fi
2930
2931
2932 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2933
2934 if test "$unexec" = "unexaix.o"; then
2935   if   test "$dynamic" = "no"; then
2936   start_flags="-Wl,-bnso,-bnodelcsect"
2937   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2938   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2939     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2940   done
2941   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2942     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2943   done
2944   
2945 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2946 echo "configure:2947: checking for terminateAndUnload in -lC" >&5
2947 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2948
2949 xe_check_libs=" -lC "
2950 cat > conftest.$ac_ext <<EOF
2951 #line 2952 "configure"
2952 #include "confdefs.h"
2953 /* Override any gcc2 internal prototype to avoid an error.  */
2954 /* We use char because int might match the return type of a gcc2
2955     builtin and then its argument prototype would still apply.  */
2956 char terminateAndUnload();
2957
2958 int main() {
2959 terminateAndUnload()
2960 ; return 0; }
2961 EOF
2962 if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2963   rm -rf conftest*
2964   eval "ac_cv_lib_$ac_lib_var=yes"
2965 else
2966   echo "configure: failed program was:" >&5
2967   cat conftest.$ac_ext >&5
2968   rm -rf conftest*
2969   eval "ac_cv_lib_$ac_lib_var=no"
2970 fi
2971 rm -f conftest*
2972 xe_check_libs=""
2973
2974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2975   echo "$ac_t""yes" 1>&6
2976   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2977 else
2978   echo "$ac_t""no" 1>&6
2979 fi
2980
2981
2982   fi
2983 elif test -n "$ld_text_start_addr"; then
2984   start_flags="-T $ld_text_start_addr -e __start"
2985 fi
2986
2987
2988
2989
2990 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2991  test -z "$linker" &&  linker='$(CC) -nostdlib'
2992  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2993 fi
2994 test "$GCC" != "yes" && lib_gcc=
2995
2996
2997
2998
2999
3000 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3001 if test -n "$site_libraries"; then
3002   for arg in $site_libraries; do
3003     case "$arg" in
3004      -* ) ;;
3005      * ) test -d "$arg" || \
3006            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3007        arg="-L${arg}" ;;
3008     esac
3009     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3010   done
3011 fi
3012
3013 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3014 if test -n "$site_includes"; then
3015   for arg in $site_includes; do
3016     case "$arg" in
3017       -* ) ;;
3018       * ) test -d "$arg" || \
3019            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3020       arg="-I${arg}" ;;
3021     esac
3022     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3023   done
3024 fi
3025
3026 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3027 if test -n "$site_prefixes"; then
3028   for dir in $site_prefixes; do
3029     lib_dir="${dir}/lib"
3030     inc_dir="${dir}/include"
3031     if test ! -d "$dir"; then
3032       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3033     elif test ! -d "$lib_dir"; then
3034       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3035     else
3036       if test -d "$inc_dir"; then
3037         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
3038       fi
3039       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
3040     fi
3041   done
3042 fi
3043
3044
3045 for dir in "/usr/ccs/lib"; do
3046   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
3047 done
3048
3049 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3050 if test -n "$site_runtime_libraries"; then
3051   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3052   export LD_RUN_PATH
3053 fi
3054
3055
3056
3057
3058
3059 if test -n "$add_runtime_path"; then :;
3060 elif test "$dynamic" = "no"; then add_runtime_path=no
3061 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3062 else case "$opsys" in
3063        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3064        * ) add_runtime_path=no ;;
3065      esac
3066 fi
3067
3068 if test "$add_runtime_path" = "yes"; then
3069       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3070 echo "configure:3071: checking "for runtime libraries flag"" >&5
3071   case "$opsys" in
3072     sol2 ) dash_r="-R" ;;
3073     decosf* | linux* | irix*) dash_r="-rpath " ;;
3074     *)
3075       dash_r=""
3076       for try_dash_r in "-R" "-R " "-rpath "; do
3077         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3078         
3079 if test "$GCC" = "yes"; then
3080   set x $xe_check_libs; shift; xe_check_libs=""
3081   while test -n "$1"; do
3082     case $1 in
3083       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3084       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3085       -Xlinker* ) ;;
3086       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3087     esac
3088     shift
3089   done
3090 fi
3091         cat > conftest.$ac_ext <<EOF
3092 #line 3093 "configure"
3093 #include "confdefs.h"
3094
3095 int main() {
3096
3097 ; return 0; }
3098 EOF
3099 if { (eval echo configure:3100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3100   rm -rf conftest*
3101   dash_r="$try_dash_r"
3102 else
3103   echo "configure: failed program was:" >&5
3104   cat conftest.$ac_ext >&5
3105 fi
3106 rm -f conftest*
3107         xe_check_libs=""
3108         test -n "$dash_r" && break
3109       done ;;
3110   esac
3111   if test -n "$dash_r";
3112     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3113     else echo "$ac_t""NONE" 1>&6
3114   fi
3115 fi
3116
3117 xe_add_unique_runpath_dir='
3118   xe_add_p=yes
3119   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3120   done
3121   if test "$xe_add_p" = "yes"; then
3122     test -n "$runpath" && runpath="${runpath}:"
3123     runpath="${runpath}${xe_runpath_dir}"
3124     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3125   fi'
3126
3127
3128
3129
3130 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3131     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3132   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3133   
3134         runpath="" runpath_dirs=""
3135   if test -n "$LD_RUN_PATH"; then
3136     runpath="$LD_RUN_PATH"
3137   elif test "$GCC" = "yes"; then
3138         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3139     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3140     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3141     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3142       case "$arg" in P,* | -L* | -R* )
3143         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3144           {
3145 xe_runpath_dir="$dir"
3146   test "$xe_runpath_dir" != "/lib"     -a \
3147         "$xe_runpath_dir" != "/usr/lib" -a \
3148         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3149   eval "$xe_add_unique_runpath_dir"
3150 }
3151         done ;;
3152       esac
3153     done
3154     ld_switch_run="$ld_switch_run_save"
3155     rm -f conftest*
3156   else
3157         for arg in $ld_switch_site $ld_switch_x_site; do
3158       case "$arg" in -L*) {
3159 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3160   test "$xe_runpath_dir" != "/lib"     -a \
3161         "$xe_runpath_dir" != "/usr/lib" -a \
3162         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3163   eval "$xe_add_unique_runpath_dir"
3164 };; esac
3165     done
3166         if test "$opsys $need_motif" = "sol2 yes"; then
3167       xe_runpath_dir="/opt/SUNWdt/lib";
3168       eval "$xe_add_unique_runpath_dir";
3169     fi
3170   fi 
3171   if test -n "$runpath"; then
3172     ld_switch_run="${dash_r}${runpath}"
3173     
3174 if test "$GCC" = "yes"; then
3175   set x $ld_switch_run; shift; ld_switch_run=""
3176   while test -n "$1"; do
3177     case $1 in
3178       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3179       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3180       -Xlinker* ) ;;
3181       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3182     esac
3183     shift
3184   done
3185 fi
3186     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3187   fi
3188 fi
3189
3190
3191
3192 GNU_MALLOC=yes
3193 if test "$with_dlmalloc" != "no"; then
3194         doug_lea_malloc=yes
3195 else
3196         doug_lea_malloc=no
3197 fi
3198 after_morecore_hook_exists=yes
3199 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3200 echo "configure:3201: checking for malloc_set_state" >&5
3201
3202 cat > conftest.$ac_ext <<EOF
3203 #line 3204 "configure"
3204 #include "confdefs.h"
3205 /* System header to define __stub macros and hopefully few prototypes,
3206     which can conflict with char malloc_set_state(); below.  */
3207 #include <assert.h>
3208 /* Override any gcc2 internal prototype to avoid an error.  */
3209 /* We use char because int might match the return type of a gcc2
3210     builtin and then its argument prototype would still apply.  */
3211 char malloc_set_state();
3212
3213 int main() {
3214
3215 /* The GNU C library defines this for functions which it implements
3216     to always fail with ENOSYS.  Some functions are actually named
3217     something starting with __ and the normal name is an alias.  */
3218 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3219 choke me
3220 #else
3221 malloc_set_state();
3222 #endif
3223
3224 ; return 0; }
3225 EOF
3226 if { (eval echo configure:3227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3227   rm -rf conftest*
3228   eval "ac_cv_func_malloc_set_state=yes"
3229 else
3230   echo "configure: failed program was:" >&5
3231   cat conftest.$ac_ext >&5
3232   rm -rf conftest*
3233   eval "ac_cv_func_malloc_set_state=no"
3234 fi
3235 rm -f conftest*
3236
3237 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3238   echo "$ac_t""yes" 1>&6
3239   :
3240 else
3241   echo "$ac_t""no" 1>&6
3242 doug_lea_malloc=no
3243 fi
3244
3245 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3246 echo "configure:3247: checking whether __after_morecore_hook exists" >&5
3247 cat > conftest.$ac_ext <<EOF
3248 #line 3249 "configure"
3249 #include "confdefs.h"
3250 extern void (* __after_morecore_hook)();
3251 int main() {
3252 __after_morecore_hook = 0
3253 ; return 0; }
3254 EOF
3255 if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3256   rm -rf conftest*
3257   echo "$ac_t""yes" 1>&6
3258 else
3259   echo "configure: failed program was:" >&5
3260   cat conftest.$ac_ext >&5
3261   rm -rf conftest*
3262   echo "$ac_t""no" 1>&6
3263    after_morecore_hook_exists=no
3264 fi
3265 rm -f conftest*
3266 if test "$system_malloc" = "yes" ; then
3267   GNU_MALLOC=no
3268   GNU_MALLOC_reason="
3269     - The GNU allocators don't work with this system configuration."
3270 elif test "$with_system_malloc" = "yes" ; then
3271   GNU_MALLOC=no
3272   GNU_MALLOC_reason="
3273     - User chose not to use GNU allocators."
3274 elif test "$with_debug_malloc" = "yes" ; then
3275   GNU_MALLOC=no
3276   GNU_MALLOC_reason="
3277     - User chose to use Debugging Malloc."
3278 fi
3279
3280 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3281   GNU_MALLOC_reason="
3282     - Using Doug Lea's new malloc from the GNU C Library."
3283   { test "$extra_verbose" = "yes" && cat << \EOF
3284     Defining DOUG_LEA_MALLOC
3285 EOF
3286 cat >> confdefs.h <<\EOF
3287 #define DOUG_LEA_MALLOC 1
3288 EOF
3289 }
3290
3291   if test "$after_morecore_hook_exists" = "no" ; then
3292     GNU_MALLOC_reason="
3293     - Using Doug Lea's new malloc from the Linux C Library."
3294     { test "$extra_verbose" = "yes" && cat << \EOF
3295     Defining _NO_MALLOC_WARNING_
3296 EOF
3297 cat >> confdefs.h <<\EOF
3298 #define _NO_MALLOC_WARNING_ 1
3299 EOF
3300 }
3301
3302   fi
3303 fi
3304
3305
3306
3307
3308 # Extract the first word of "ranlib", so it can be a program name with args.
3309 set dummy ranlib; ac_word=$2
3310 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3311 echo "configure:3312: checking for $ac_word" >&5
3312
3313 if test -n "$RANLIB"; then
3314   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3315 else
3316   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3317   ac_dummy="$PATH"
3318   for ac_dir in $ac_dummy; do
3319     test -z "$ac_dir" && ac_dir=.
3320     if test -f $ac_dir/$ac_word; then
3321       ac_cv_prog_RANLIB="ranlib"
3322       break
3323     fi
3324   done
3325   IFS="$ac_save_ifs"
3326   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3327 fi
3328 RANLIB="$ac_cv_prog_RANLIB"
3329 if test -n "$RANLIB"; then
3330   echo "$ac_t""$RANLIB" 1>&6
3331 else
3332   echo "$ac_t""no" 1>&6
3333 fi
3334
3335 ac_aux_dir=
3336 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3337   if test -f $ac_dir/install-sh; then
3338     ac_aux_dir=$ac_dir
3339     ac_install_sh="$ac_aux_dir/install-sh -c"
3340     break
3341   elif 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   fi
3346 done
3347 if test -z "$ac_aux_dir"; then
3348   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3349 fi
3350 ac_config_guess=$ac_aux_dir/config.guess
3351 ac_config_sub=$ac_aux_dir/config.sub
3352 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3353
3354 # Find a good install program.  We prefer a C program (faster),
3355 # so one script is as good as another.  But avoid the broken or
3356 # incompatible versions:
3357 # SysV /etc/install, /usr/sbin/install
3358 # SunOS /usr/etc/install
3359 # IRIX /sbin/install
3360 # AIX /bin/install
3361 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3362 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3363 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3364 # ./install, which can be erroneously created by make from ./install.sh.
3365 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3366 echo "configure:3367: checking for a BSD compatible install" >&5
3367 if test -z "$INSTALL"; then
3368
3369   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3370   for ac_dir in $PATH; do
3371     # Account for people who put trailing slashes in PATH elements.
3372     case "$ac_dir/" in
3373     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3374     *)
3375       # OSF1 and SCO ODT 3.0 have their own names for install.
3376       # Don't use installbsd from OSF since it installs stuff as root
3377       # by default.
3378       for ac_prog in ginstall scoinst install; do
3379         if test -f $ac_dir/$ac_prog; then
3380           if test $ac_prog = install &&
3381             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3382             # AIX install.  It has an incompatible calling convention.
3383             :
3384           else
3385             ac_cv_path_install="$ac_dir/$ac_prog -c"
3386             break 2
3387           fi
3388         fi
3389       done
3390       ;;
3391     esac
3392   done
3393   IFS="$ac_save_IFS"
3394
3395   if test "${ac_cv_path_install+set}" = set; then
3396     INSTALL="$ac_cv_path_install"
3397   else
3398     # As a last resort, use the slow shell script.  We don't cache a
3399     # path for INSTALL within a source directory, because that will
3400     # break other packages using the cache if that directory is
3401     # removed, or if the path is relative.
3402     INSTALL="$ac_install_sh"
3403   fi
3404 fi
3405 echo "$ac_t""$INSTALL" 1>&6
3406
3407 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3408 # It thinks the first close brace ends the variable substitution.
3409 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3410
3411 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3412
3413 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3414
3415 for ac_prog in 'bison -y' byacc
3416 do
3417 # Extract the first word of "$ac_prog", so it can be a program name with args.
3418 set dummy $ac_prog; ac_word=$2
3419 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3420 echo "configure:3421: checking for $ac_word" >&5
3421
3422 if test -n "$YACC"; then
3423   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3424 else
3425   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3426   ac_dummy="$PATH"
3427   for ac_dir in $ac_dummy; do
3428     test -z "$ac_dir" && ac_dir=.
3429     if test -f $ac_dir/$ac_word; then
3430       ac_cv_prog_YACC="$ac_prog"
3431       break
3432     fi
3433   done
3434   IFS="$ac_save_ifs"
3435 fi
3436 YACC="$ac_cv_prog_YACC"
3437 if test -n "$YACC"; then
3438   echo "$ac_t""$YACC" 1>&6
3439 else
3440   echo "$ac_t""no" 1>&6
3441 fi
3442
3443 test -n "$YACC" && break
3444 done
3445 test -n "$YACC" || YACC="yacc"
3446
3447
3448 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 
3449 do
3450 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3451 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3452 echo "configure:3453: checking for $ac_hdr" >&5
3453
3454 cat > conftest.$ac_ext <<EOF
3455 #line 3456 "configure"
3456 #include "confdefs.h"
3457 #include <$ac_hdr>
3458 EOF
3459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3460 { (eval echo configure:3461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3462 if test -z "$ac_err"; then
3463   rm -rf conftest*
3464   eval "ac_cv_header_$ac_safe=yes"
3465 else
3466   echo "$ac_err" >&5
3467   echo "configure: failed program was:" >&5
3468   cat conftest.$ac_ext >&5
3469   rm -rf conftest*
3470   eval "ac_cv_header_$ac_safe=no"
3471 fi
3472 rm -f conftest*
3473 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3474   echo "$ac_t""yes" 1>&6
3475     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3476   { test "$extra_verbose" = "yes" && cat << EOF
3477     Defining $ac_tr_hdr
3478 EOF
3479 cat >> confdefs.h <<EOF
3480 #define $ac_tr_hdr 1
3481 EOF
3482 }
3483  
3484 else
3485   echo "$ac_t""no" 1>&6
3486 fi
3487 done
3488
3489 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3490 echo "configure:3491: checking for sys/wait.h that is POSIX.1 compatible" >&5
3491
3492 cat > conftest.$ac_ext <<EOF
3493 #line 3494 "configure"
3494 #include "confdefs.h"
3495 #include <sys/types.h>
3496 #include <sys/wait.h>
3497 #ifndef WEXITSTATUS
3498 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3499 #endif
3500 #ifndef WIFEXITED
3501 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3502 #endif
3503 int main() {
3504 int s;
3505 wait (&s);
3506 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3507 ; return 0; }
3508 EOF
3509 if { (eval echo configure:3510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3510   rm -rf conftest*
3511   ac_cv_header_sys_wait_h=yes
3512 else
3513   echo "configure: failed program was:" >&5
3514   cat conftest.$ac_ext >&5
3515   rm -rf conftest*
3516   ac_cv_header_sys_wait_h=no
3517 fi
3518 rm -f conftest*
3519
3520 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3521 if test $ac_cv_header_sys_wait_h = yes; then
3522   { test "$extra_verbose" = "yes" && cat << \EOF
3523     Defining HAVE_SYS_WAIT_H
3524 EOF
3525 cat >> confdefs.h <<\EOF
3526 #define HAVE_SYS_WAIT_H 1
3527 EOF
3528 }
3529
3530 fi
3531
3532 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3533 echo "configure:3534: checking for ANSI C header files" >&5
3534
3535 cat > conftest.$ac_ext <<EOF
3536 #line 3537 "configure"
3537 #include "confdefs.h"
3538 #include <stdlib.h>
3539 #include <stdarg.h>
3540 #include <string.h>
3541 #include <float.h>
3542 EOF
3543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3544 { (eval echo configure:3545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3546 if test -z "$ac_err"; then
3547   rm -rf conftest*
3548   ac_cv_header_stdc=yes
3549 else
3550   echo "$ac_err" >&5
3551   echo "configure: failed program was:" >&5
3552   cat conftest.$ac_ext >&5
3553   rm -rf conftest*
3554   ac_cv_header_stdc=no
3555 fi
3556 rm -f conftest*
3557
3558 if test $ac_cv_header_stdc = yes; then
3559   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3560 cat > conftest.$ac_ext <<EOF
3561 #line 3562 "configure"
3562 #include "confdefs.h"
3563 #include <string.h>
3564 EOF
3565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3566   egrep "memchr" >/dev/null 2>&1; then
3567   :
3568 else
3569   rm -rf conftest*
3570   ac_cv_header_stdc=no
3571 fi
3572 rm -f conftest*
3573
3574 fi
3575
3576 if test $ac_cv_header_stdc = yes; then
3577   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3578 cat > conftest.$ac_ext <<EOF
3579 #line 3580 "configure"
3580 #include "confdefs.h"
3581 #include <stdlib.h>
3582 EOF
3583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3584   egrep "free" >/dev/null 2>&1; then
3585   :
3586 else
3587   rm -rf conftest*
3588   ac_cv_header_stdc=no
3589 fi
3590 rm -f conftest*
3591
3592 fi
3593
3594 if test $ac_cv_header_stdc = yes; then
3595   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3596 cat > conftest.$ac_ext <<EOF
3597 #line 3598 "configure"
3598 #include "confdefs.h"
3599 #include <ctype.h>
3600 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3601 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3602 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3603 int main () { int i; for (i = 0; i < 256; i++)
3604 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3605 exit (0); }
3606
3607 EOF
3608 if { (eval echo configure:3609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3609 then
3610   :
3611 else
3612   conftest_rc="$?"
3613   echo "configure: failed program was:" >&5
3614   cat conftest.$ac_ext >&5
3615   rm -fr conftest*
3616   ac_cv_header_stdc=no
3617 fi
3618 rm -fr conftest*
3619 fi
3620
3621 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3622 if test $ac_cv_header_stdc = yes; then
3623   { test "$extra_verbose" = "yes" && cat << \EOF
3624     Defining STDC_HEADERS
3625 EOF
3626 cat >> confdefs.h <<\EOF
3627 #define STDC_HEADERS 1
3628 EOF
3629 }
3630
3631 fi
3632
3633 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3634 echo "configure:3635: checking whether time.h and sys/time.h may both be included" >&5
3635
3636 cat > conftest.$ac_ext <<EOF
3637 #line 3638 "configure"
3638 #include "confdefs.h"
3639 #include <sys/types.h>
3640 #include <sys/time.h>
3641 #include <time.h>
3642 int main() {
3643 struct tm *tp;
3644 ; return 0; }
3645 EOF
3646 if { (eval echo configure:3647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3647   rm -rf conftest*
3648   ac_cv_header_time=yes
3649 else
3650   echo "configure: failed program was:" >&5
3651   cat conftest.$ac_ext >&5
3652   rm -rf conftest*
3653   ac_cv_header_time=no
3654 fi
3655 rm -f conftest*
3656
3657 echo "$ac_t""$ac_cv_header_time" 1>&6
3658 if test $ac_cv_header_time = yes; then
3659   { test "$extra_verbose" = "yes" && cat << \EOF
3660     Defining TIME_WITH_SYS_TIME
3661 EOF
3662 cat >> confdefs.h <<\EOF
3663 #define TIME_WITH_SYS_TIME 1
3664 EOF
3665 }
3666
3667 fi
3668
3669 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3670 echo "configure:3671: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3671
3672 cat > conftest.$ac_ext <<EOF
3673 #line 3674 "configure"
3674 #include "confdefs.h"
3675 #include <sys/types.h>
3676 #include <signal.h>
3677 /* NetBSD declares sys_siglist in unistd.h.  */
3678 #ifdef HAVE_UNISTD_H
3679 #include <unistd.h>
3680 #endif
3681 int main() {
3682 char *msg = *(sys_siglist + 1);
3683 ; return 0; }
3684 EOF
3685 if { (eval echo configure:3686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3686   rm -rf conftest*
3687   ac_cv_decl_sys_siglist=yes
3688 else
3689   echo "configure: failed program was:" >&5
3690   cat conftest.$ac_ext >&5
3691   rm -rf conftest*
3692   ac_cv_decl_sys_siglist=no
3693 fi
3694 rm -f conftest*
3695
3696 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3697 if test $ac_cv_decl_sys_siglist = yes; then
3698   { test "$extra_verbose" = "yes" && cat << \EOF
3699     Defining SYS_SIGLIST_DECLARED
3700 EOF
3701 cat >> confdefs.h <<\EOF
3702 #define SYS_SIGLIST_DECLARED 1
3703 EOF
3704 }
3705
3706 fi
3707
3708
3709
3710 echo $ac_n "checking for utime""... $ac_c" 1>&6
3711 echo "configure:3712: checking for utime" >&5
3712 cat > conftest.$ac_ext <<EOF
3713 #line 3714 "configure"
3714 #include "confdefs.h"
3715 #include <sys/types.h>
3716 #include <utime.h>
3717 int main() {
3718 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3719 ; return 0; }
3720 EOF
3721 if { (eval echo configure:3722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3722   rm -rf conftest*
3723   echo "$ac_t""yes" 1>&6
3724    { test "$extra_verbose" = "yes" && cat << \EOF
3725     Defining HAVE_UTIME
3726 EOF
3727 cat >> confdefs.h <<\EOF
3728 #define HAVE_UTIME 1
3729 EOF
3730 }
3731
3732 else
3733   echo "configure: failed program was:" >&5
3734   cat conftest.$ac_ext >&5
3735   rm -rf conftest*
3736   echo "$ac_t""no" 1>&6
3737       for ac_func in utimes
3738 do
3739 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3740 echo "configure:3741: checking for $ac_func" >&5
3741
3742 cat > conftest.$ac_ext <<EOF
3743 #line 3744 "configure"
3744 #include "confdefs.h"
3745 /* System header to define __stub macros and hopefully few prototypes,
3746     which can conflict with char $ac_func(); below.  */
3747 #include <assert.h>
3748 /* Override any gcc2 internal prototype to avoid an error.  */
3749 /* We use char because int might match the return type of a gcc2
3750     builtin and then its argument prototype would still apply.  */
3751 char $ac_func();
3752
3753 int main() {
3754
3755 /* The GNU C library defines this for functions which it implements
3756     to always fail with ENOSYS.  Some functions are actually named
3757     something starting with __ and the normal name is an alias.  */
3758 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3759 choke me
3760 #else
3761 $ac_func();
3762 #endif
3763
3764 ; return 0; }
3765 EOF
3766 if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3767   rm -rf conftest*
3768   eval "ac_cv_func_$ac_func=yes"
3769 else
3770   echo "configure: failed program was:" >&5
3771   cat conftest.$ac_ext >&5
3772   rm -rf conftest*
3773   eval "ac_cv_func_$ac_func=no"
3774 fi
3775 rm -f conftest*
3776
3777 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3778   echo "$ac_t""yes" 1>&6
3779     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3780   { test "$extra_verbose" = "yes" && cat << EOF
3781     Defining $ac_tr_func
3782 EOF
3783 cat >> confdefs.h <<EOF
3784 #define $ac_tr_func 1
3785 EOF
3786 }
3787  
3788 else
3789   echo "$ac_t""no" 1>&6
3790 fi
3791 done
3792
3793 fi
3794 rm -f conftest*
3795
3796
3797 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3798 echo "configure:3799: checking return type of signal handlers" >&5
3799
3800 cat > conftest.$ac_ext <<EOF
3801 #line 3802 "configure"
3802 #include "confdefs.h"
3803 #include <sys/types.h>
3804 #include <signal.h>
3805 #ifdef signal
3806 #undef signal
3807 #endif
3808 #ifdef __cplusplus
3809 extern "C" void (*signal (int, void (*)(int)))(int);
3810 #else
3811 void (*signal ()) ();
3812 #endif
3813
3814 int main() {
3815 int i;
3816 ; return 0; }
3817 EOF
3818 if { (eval echo configure:3819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3819   rm -rf conftest*
3820   ac_cv_type_signal=void
3821 else
3822   echo "configure: failed program was:" >&5
3823   cat conftest.$ac_ext >&5
3824   rm -rf conftest*
3825   ac_cv_type_signal=int
3826 fi
3827 rm -f conftest*
3828
3829 echo "$ac_t""$ac_cv_type_signal" 1>&6
3830 { test "$extra_verbose" = "yes" && cat << EOF
3831     Defining RETSIGTYPE = $ac_cv_type_signal
3832 EOF
3833 cat >> confdefs.h <<EOF
3834 #define RETSIGTYPE $ac_cv_type_signal
3835 EOF
3836 }
3837
3838
3839 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3840 echo "configure:3841: checking for size_t" >&5
3841
3842 cat > conftest.$ac_ext <<EOF
3843 #line 3844 "configure"
3844 #include "confdefs.h"
3845 #include <sys/types.h>
3846 #if STDC_HEADERS
3847 #include <stdlib.h>
3848 #include <stddef.h>
3849 #endif
3850 EOF
3851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3852   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3853   rm -rf conftest*
3854   ac_cv_type_size_t=yes
3855 else
3856   rm -rf conftest*
3857   ac_cv_type_size_t=no
3858 fi
3859 rm -f conftest*
3860
3861 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3862 if test $ac_cv_type_size_t = no; then
3863   { test "$extra_verbose" = "yes" && cat << \EOF
3864     Defining size_t = unsigned
3865 EOF
3866 cat >> confdefs.h <<\EOF
3867 #define size_t unsigned
3868 EOF
3869 }
3870
3871 fi
3872
3873 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3874 echo "configure:3875: checking for pid_t" >&5
3875
3876 cat > conftest.$ac_ext <<EOF
3877 #line 3878 "configure"
3878 #include "confdefs.h"
3879 #include <sys/types.h>
3880 #if STDC_HEADERS
3881 #include <stdlib.h>
3882 #include <stddef.h>
3883 #endif
3884 EOF
3885 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3886   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3887   rm -rf conftest*
3888   ac_cv_type_pid_t=yes
3889 else
3890   rm -rf conftest*
3891   ac_cv_type_pid_t=no
3892 fi
3893 rm -f conftest*
3894
3895 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3896 if test $ac_cv_type_pid_t = no; then
3897   { test "$extra_verbose" = "yes" && cat << \EOF
3898     Defining pid_t = int
3899 EOF
3900 cat >> confdefs.h <<\EOF
3901 #define pid_t int
3902 EOF
3903 }
3904
3905 fi
3906
3907 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3908 echo "configure:3909: checking for uid_t in sys/types.h" >&5
3909
3910 cat > conftest.$ac_ext <<EOF
3911 #line 3912 "configure"
3912 #include "confdefs.h"
3913 #include <sys/types.h>
3914 EOF
3915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3916   egrep "uid_t" >/dev/null 2>&1; then
3917   rm -rf conftest*
3918   ac_cv_type_uid_t=yes
3919 else
3920   rm -rf conftest*
3921   ac_cv_type_uid_t=no
3922 fi
3923 rm -f conftest*
3924
3925
3926 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3927 if test $ac_cv_type_uid_t = no; then
3928   { test "$extra_verbose" = "yes" && cat << \EOF
3929     Defining uid_t = int
3930 EOF
3931 cat >> confdefs.h <<\EOF
3932 #define uid_t int
3933 EOF
3934 }
3935
3936   { test "$extra_verbose" = "yes" && cat << \EOF
3937     Defining gid_t = int
3938 EOF
3939 cat >> confdefs.h <<\EOF
3940 #define gid_t int
3941 EOF
3942 }
3943
3944 fi
3945
3946 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3947 echo "configure:3948: checking for mode_t" >&5
3948
3949 cat > conftest.$ac_ext <<EOF
3950 #line 3951 "configure"
3951 #include "confdefs.h"
3952 #include <sys/types.h>
3953 #if STDC_HEADERS
3954 #include <stdlib.h>
3955 #include <stddef.h>
3956 #endif
3957 EOF
3958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3959   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3960   rm -rf conftest*
3961   ac_cv_type_mode_t=yes
3962 else
3963   rm -rf conftest*
3964   ac_cv_type_mode_t=no
3965 fi
3966 rm -f conftest*
3967
3968 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3969 if test $ac_cv_type_mode_t = no; then
3970   { test "$extra_verbose" = "yes" && cat << \EOF
3971     Defining mode_t = int
3972 EOF
3973 cat >> confdefs.h <<\EOF
3974 #define mode_t int
3975 EOF
3976 }
3977
3978 fi
3979
3980 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3981 echo "configure:3982: checking for off_t" >&5
3982
3983 cat > conftest.$ac_ext <<EOF
3984 #line 3985 "configure"
3985 #include "confdefs.h"
3986 #include <sys/types.h>
3987 #if STDC_HEADERS
3988 #include <stdlib.h>
3989 #include <stddef.h>
3990 #endif
3991 EOF
3992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3993   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3994   rm -rf conftest*
3995   ac_cv_type_off_t=yes
3996 else
3997   rm -rf conftest*
3998   ac_cv_type_off_t=no
3999 fi
4000 rm -f conftest*
4001
4002 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4003 if test $ac_cv_type_off_t = no; then
4004   { test "$extra_verbose" = "yes" && cat << \EOF
4005     Defining off_t = long
4006 EOF
4007 cat >> confdefs.h <<\EOF
4008 #define off_t long
4009 EOF
4010 }
4011
4012 fi
4013
4014 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4015 echo "configure:4016: checking for ssize_t" >&5
4016
4017 cat > conftest.$ac_ext <<EOF
4018 #line 4019 "configure"
4019 #include "confdefs.h"
4020 #include <sys/types.h>
4021 #if STDC_HEADERS
4022 #include <stdlib.h>
4023 #include <stddef.h>
4024 #endif
4025 EOF
4026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4027   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4028   rm -rf conftest*
4029   ac_cv_type_ssize_t=yes
4030 else
4031   rm -rf conftest*
4032   ac_cv_type_ssize_t=no
4033 fi
4034 rm -f conftest*
4035
4036 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4037 if test $ac_cv_type_ssize_t = no; then
4038   { test "$extra_verbose" = "yes" && cat << \EOF
4039     Defining ssize_t = int
4040 EOF
4041 cat >> confdefs.h <<\EOF
4042 #define ssize_t int
4043 EOF
4044 }
4045
4046 fi
4047
4048
4049 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4050 echo "configure:4051: checking for socklen_t" >&5
4051 cat > conftest.$ac_ext <<EOF
4052 #line 4053 "configure"
4053 #include "confdefs.h"
4054 #include <sys/socket.h>
4055 socklen_t x;
4056
4057 int main() {
4058
4059 ; return 0; }
4060 EOF
4061 if { (eval echo configure:4062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4062   rm -rf conftest*
4063   echo "$ac_t""yes" 1>&6
4064 else
4065   echo "configure: failed program was:" >&5
4066   cat conftest.$ac_ext >&5
4067   rm -rf conftest*
4068   
4069 cat > conftest.$ac_ext <<EOF
4070 #line 4071 "configure"
4071 #include "confdefs.h"
4072 #include <sys/socket.h>
4073 int accept (int, struct sockaddr *, size_t *);
4074
4075 int main() {
4076
4077 ; return 0; }
4078 EOF
4079 if { (eval echo configure:4080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4080   rm -rf conftest*
4081   
4082 echo "$ac_t""size_t" 1>&6
4083 { test "$extra_verbose" = "yes" && cat << \EOF
4084     Defining socklen_t = size_t
4085 EOF
4086 cat >> confdefs.h <<\EOF
4087 #define socklen_t size_t
4088 EOF
4089 }
4090
4091 else
4092   echo "configure: failed program was:" >&5
4093   cat conftest.$ac_ext >&5
4094   rm -rf conftest*
4095   
4096 echo "$ac_t""int" 1>&6
4097 { test "$extra_verbose" = "yes" && cat << \EOF
4098     Defining socklen_t = int
4099 EOF
4100 cat >> confdefs.h <<\EOF
4101 #define socklen_t int
4102 EOF
4103 }
4104
4105 fi
4106 rm -f conftest*
4107 fi
4108 rm -f conftest*
4109
4110 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4111 echo "configure:4112: checking for struct timeval" >&5
4112 cat > conftest.$ac_ext <<EOF
4113 #line 4114 "configure"
4114 #include "confdefs.h"
4115 #ifdef TIME_WITH_SYS_TIME
4116 #include <sys/time.h>
4117 #include <time.h>
4118 #else
4119 #ifdef HAVE_SYS_TIME_H
4120 #include <sys/time.h>
4121 #else
4122 #include <time.h>
4123 #endif
4124 #endif
4125 int main() {
4126 static struct timeval x; x.tv_sec = x.tv_usec;
4127 ; return 0; }
4128 EOF
4129 if { (eval echo configure:4130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4130   rm -rf conftest*
4131   echo "$ac_t""yes" 1>&6
4132   HAVE_TIMEVAL=yes
4133   { test "$extra_verbose" = "yes" && cat << \EOF
4134     Defining HAVE_TIMEVAL
4135 EOF
4136 cat >> confdefs.h <<\EOF
4137 #define HAVE_TIMEVAL 1
4138 EOF
4139 }
4140
4141 else
4142   echo "configure: failed program was:" >&5
4143   cat conftest.$ac_ext >&5
4144   rm -rf conftest*
4145   echo "$ac_t""no" 1>&6
4146    HAVE_TIMEVAL=no
4147 fi
4148 rm -f conftest*
4149
4150 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4151 echo "configure:4152: checking whether struct tm is in sys/time.h or time.h" >&5
4152
4153 cat > conftest.$ac_ext <<EOF
4154 #line 4155 "configure"
4155 #include "confdefs.h"
4156 #include <sys/types.h>
4157 #include <time.h>
4158 int main() {
4159 struct tm *tp; tp->tm_sec;
4160 ; return 0; }
4161 EOF
4162 if { (eval echo configure:4163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4163   rm -rf conftest*
4164   ac_cv_struct_tm=time.h
4165 else
4166   echo "configure: failed program was:" >&5
4167   cat conftest.$ac_ext >&5
4168   rm -rf conftest*
4169   ac_cv_struct_tm=sys/time.h
4170 fi
4171 rm -f conftest*
4172
4173 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4174 if test $ac_cv_struct_tm = sys/time.h; then
4175   { test "$extra_verbose" = "yes" && cat << \EOF
4176     Defining TM_IN_SYS_TIME
4177 EOF
4178 cat >> confdefs.h <<\EOF
4179 #define TM_IN_SYS_TIME 1
4180 EOF
4181 }
4182
4183 fi
4184
4185 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4186 echo "configure:4187: checking for tm_zone in struct tm" >&5
4187
4188 cat > conftest.$ac_ext <<EOF
4189 #line 4190 "configure"
4190 #include "confdefs.h"
4191 #include <sys/types.h>
4192 #include <$ac_cv_struct_tm>
4193 int main() {
4194 struct tm tm; tm.tm_zone;
4195 ; return 0; }
4196 EOF
4197 if { (eval echo configure:4198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4198   rm -rf conftest*
4199   ac_cv_struct_tm_zone=yes
4200 else
4201   echo "configure: failed program was:" >&5
4202   cat conftest.$ac_ext >&5
4203   rm -rf conftest*
4204   ac_cv_struct_tm_zone=no
4205 fi
4206 rm -f conftest*
4207
4208 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4209 if test "$ac_cv_struct_tm_zone" = yes; then
4210   { test "$extra_verbose" = "yes" && cat << \EOF
4211     Defining HAVE_TM_ZONE
4212 EOF
4213 cat >> confdefs.h <<\EOF
4214 #define HAVE_TM_ZONE 1
4215 EOF
4216 }
4217
4218 else
4219   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4220 echo "configure:4221: checking for tzname" >&5
4221
4222 cat > conftest.$ac_ext <<EOF
4223 #line 4224 "configure"
4224 #include "confdefs.h"
4225 #include <time.h>
4226 #ifndef tzname /* For SGI.  */
4227 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4228 #endif
4229 int main() {
4230 atoi(*tzname);
4231 ; return 0; }
4232 EOF
4233 if { (eval echo configure:4234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4234   rm -rf conftest*
4235   ac_cv_var_tzname=yes
4236 else
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   ac_cv_var_tzname=no
4241 fi
4242 rm -f conftest*
4243
4244 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4245   if test $ac_cv_var_tzname = yes; then
4246     { test "$extra_verbose" = "yes" && cat << \EOF
4247     Defining HAVE_TZNAME
4248 EOF
4249 cat >> confdefs.h <<\EOF
4250 #define HAVE_TZNAME 1
4251 EOF
4252 }
4253
4254   fi
4255 fi
4256
4257
4258 echo $ac_n "checking for working const""... $ac_c" 1>&6
4259 echo "configure:4260: checking for working const" >&5
4260
4261 cat > conftest.$ac_ext <<EOF
4262 #line 4263 "configure"
4263 #include "confdefs.h"
4264
4265 int main() {
4266
4267 /* Ultrix mips cc rejects this.  */
4268 typedef int charset[2]; const charset x;
4269 /* SunOS 4.1.1 cc rejects this.  */
4270 char const *const *ccp;
4271 char **p;
4272 /* NEC SVR4.0.2 mips cc rejects this.  */
4273 struct point {int x, y;};
4274 static struct point const zero = {0,0};
4275 /* AIX XL C 1.02.0.0 rejects this.
4276    It does not let you subtract one const X* pointer from another in an arm
4277    of an if-expression whose if-part is not a constant expression */
4278 const char *g = "string";
4279 ccp = &g + (g ? g-g : 0);
4280 /* HPUX 7.0 cc rejects these. */
4281 ++ccp;
4282 p = (char**) ccp;
4283 ccp = (char const *const *) p;
4284 { /* SCO 3.2v4 cc rejects this.  */
4285   char *t;
4286   char const *s = 0 ? (char *) 0 : (char const *) 0;
4287
4288   *t++ = 0;
4289 }
4290 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4291   int x[] = {25, 17};
4292   const int *foo = &x[0];
4293   ++foo;
4294 }
4295 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4296   typedef const int *iptr;
4297   iptr p = 0;
4298   ++p;
4299 }
4300 { /* AIX XL C 1.02.0.0 rejects this saying
4301      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4302   struct s { int j; const int *ap[3]; };
4303   struct s *b; b->j = 5;
4304 }
4305 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4306   const int foo = 10;
4307 }
4308
4309 ; return 0; }
4310 EOF
4311 if { (eval echo configure:4312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4312   rm -rf conftest*
4313   ac_cv_c_const=yes
4314 else
4315   echo "configure: failed program was:" >&5
4316   cat conftest.$ac_ext >&5
4317   rm -rf conftest*
4318   ac_cv_c_const=no
4319 fi
4320 rm -f conftest*
4321
4322 echo "$ac_t""$ac_cv_c_const" 1>&6
4323 if test $ac_cv_c_const = no; then
4324   { test "$extra_verbose" = "yes" && cat << \EOF
4325     Defining const = 
4326 EOF
4327 cat >> confdefs.h <<\EOF
4328 #define const 
4329 EOF
4330 }
4331
4332 fi
4333
4334
4335 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4336 echo "configure:4337: checking whether ${MAKE-make} sets \${MAKE}" >&5
4337 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4338
4339 cat > conftestmake <<\EOF
4340 all:
4341         @echo 'ac_maketemp="${MAKE}"'
4342 EOF
4343 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4344 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4345 if test -n "$ac_maketemp"; then
4346   eval ac_cv_prog_make_${ac_make}_set=yes
4347 else
4348   eval ac_cv_prog_make_${ac_make}_set=no
4349 fi
4350 rm -f conftestmake
4351 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4352   echo "$ac_t""yes" 1>&6
4353   SET_MAKE=
4354 else
4355   echo "$ac_t""no" 1>&6
4356   SET_MAKE="MAKE=${MAKE-make}"
4357 fi
4358
4359
4360 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4361 echo "configure:4362: checking whether byte ordering is bigendian" >&5
4362
4363 ac_cv_c_bigendian=unknown
4364 # See if sys/param.h defines the BYTE_ORDER macro.
4365 cat > conftest.$ac_ext <<EOF
4366 #line 4367 "configure"
4367 #include "confdefs.h"
4368 #include <sys/types.h>
4369 #include <sys/param.h>
4370 int main() {
4371
4372 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4373  bogus endian macros
4374 #endif
4375 ; return 0; }
4376 EOF
4377 if { (eval echo configure:4378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4378   rm -rf conftest*
4379   # It does; now see whether it defined to BIG_ENDIAN or not.
4380 cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4383 #include <sys/types.h>
4384 #include <sys/param.h>
4385 int main() {
4386
4387 #if BYTE_ORDER != BIG_ENDIAN
4388  not big endian
4389 #endif
4390 ; return 0; }
4391 EOF
4392 if { (eval echo configure:4393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4393   rm -rf conftest*
4394   ac_cv_c_bigendian=yes
4395 else
4396   echo "configure: failed program was:" >&5
4397   cat conftest.$ac_ext >&5
4398   rm -rf conftest*
4399   ac_cv_c_bigendian=no
4400 fi
4401 rm -f conftest*
4402 else
4403   echo "configure: failed program was:" >&5
4404   cat conftest.$ac_ext >&5
4405 fi
4406 rm -f conftest*
4407 if test $ac_cv_c_bigendian = unknown; then
4408 cat > conftest.$ac_ext <<EOF
4409 #line 4410 "configure"
4410 #include "confdefs.h"
4411 main () {
4412   /* Are we little or big endian?  From Harbison&Steele.  */
4413   union
4414   {
4415     long l;
4416     char c[sizeof (long)];
4417   } u;
4418   u.l = 1;
4419   exit (u.c[sizeof (long) - 1] == 1);
4420 }
4421 EOF
4422 if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4423 then
4424   ac_cv_c_bigendian=no
4425 else
4426   conftest_rc="$?"
4427   echo "configure: failed program was:" >&5
4428   cat conftest.$ac_ext >&5
4429   rm -fr conftest*
4430   ac_cv_c_bigendian=yes
4431 fi
4432 rm -fr conftest*
4433 fi
4434
4435 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4436 if test $ac_cv_c_bigendian = yes; then
4437   { test "$extra_verbose" = "yes" && cat << \EOF
4438     Defining WORDS_BIGENDIAN
4439 EOF
4440 cat >> confdefs.h <<\EOF
4441 #define WORDS_BIGENDIAN 1
4442 EOF
4443 }
4444
4445 fi
4446
4447
4448 echo $ac_n "checking size of short""... $ac_c" 1>&6
4449 echo "configure:4450: checking size of short" >&5
4450
4451 cat > conftest.$ac_ext <<EOF
4452 #line 4453 "configure"
4453 #include "confdefs.h"
4454 #include <stdio.h>
4455 #include <sys/types.h>
4456 main()
4457 {
4458   FILE *f=fopen("conftestval", "w");
4459   if (!f) exit(1);
4460   fprintf(f, "%d\n", sizeof(short));
4461   exit(0);
4462 }
4463 EOF
4464 if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4465 then
4466   ac_cv_sizeof_short=`cat conftestval`
4467 else
4468   conftest_rc="$?"
4469   echo "configure: failed program was:" >&5
4470   cat conftest.$ac_ext >&5
4471   rm -fr conftest*
4472   ac_cv_sizeof_short=0
4473 fi
4474 rm -fr conftest*
4475 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4476 { test "$extra_verbose" = "yes" && cat << EOF
4477     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4478 EOF
4479 cat >> confdefs.h <<EOF
4480 #define SIZEOF_SHORT $ac_cv_sizeof_short
4481 EOF
4482 }
4483
4484
4485 if test "$ac_cv_sizeof_short" = 0; then
4486   echo ""
4487   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4488   echo "*** PANIC *** Please examine config.log for compilation errors."
4489   exit 1
4490 fi
4491 echo $ac_n "checking size of int""... $ac_c" 1>&6
4492 echo "configure:4493: checking size of int" >&5
4493
4494 cat > conftest.$ac_ext <<EOF
4495 #line 4496 "configure"
4496 #include "confdefs.h"
4497 #include <stdio.h>
4498 #include <sys/types.h>
4499 main()
4500 {
4501   FILE *f=fopen("conftestval", "w");
4502   if (!f) exit(1);
4503   fprintf(f, "%d\n", sizeof(int));
4504   exit(0);
4505 }
4506 EOF
4507 if { (eval echo configure:4508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4508 then
4509   ac_cv_sizeof_int=`cat conftestval`
4510 else
4511   conftest_rc="$?"
4512   echo "configure: failed program was:" >&5
4513   cat conftest.$ac_ext >&5
4514   rm -fr conftest*
4515   ac_cv_sizeof_int=0
4516 fi
4517 rm -fr conftest*
4518 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4519 { test "$extra_verbose" = "yes" && cat << EOF
4520     Defining SIZEOF_INT = $ac_cv_sizeof_int
4521 EOF
4522 cat >> confdefs.h <<EOF
4523 #define SIZEOF_INT $ac_cv_sizeof_int
4524 EOF
4525 }
4526
4527
4528 echo $ac_n "checking size of long""... $ac_c" 1>&6
4529 echo "configure:4530: checking size of long" >&5
4530
4531 cat > conftest.$ac_ext <<EOF
4532 #line 4533 "configure"
4533 #include "confdefs.h"
4534 #include <stdio.h>
4535 #include <sys/types.h>
4536 main()
4537 {
4538   FILE *f=fopen("conftestval", "w");
4539   if (!f) exit(1);
4540   fprintf(f, "%d\n", sizeof(long));
4541   exit(0);
4542 }
4543 EOF
4544 if { (eval echo configure:4545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4545 then
4546   ac_cv_sizeof_long=`cat conftestval`
4547 else
4548   conftest_rc="$?"
4549   echo "configure: failed program was:" >&5
4550   cat conftest.$ac_ext >&5
4551   rm -fr conftest*
4552   ac_cv_sizeof_long=0
4553 fi
4554 rm -fr conftest*
4555 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4556 { test "$extra_verbose" = "yes" && cat << EOF
4557     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4558 EOF
4559 cat >> confdefs.h <<EOF
4560 #define SIZEOF_LONG $ac_cv_sizeof_long
4561 EOF
4562 }
4563
4564
4565 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4566 echo "configure:4567: checking size of long long" >&5
4567
4568 cat > conftest.$ac_ext <<EOF
4569 #line 4570 "configure"
4570 #include "confdefs.h"
4571 #include <stdio.h>
4572 #include <sys/types.h>
4573 main()
4574 {
4575   FILE *f=fopen("conftestval", "w");
4576   if (!f) exit(1);
4577   fprintf(f, "%d\n", sizeof(long long));
4578   exit(0);
4579 }
4580 EOF
4581 if { (eval echo configure:4582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4582 then
4583   ac_cv_sizeof_long_long=`cat conftestval`
4584 else
4585   conftest_rc="$?"
4586   echo "configure: failed program was:" >&5
4587   cat conftest.$ac_ext >&5
4588   rm -fr conftest*
4589   ac_cv_sizeof_long_long=0
4590 fi
4591 rm -fr conftest*
4592 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4593 { test "$extra_verbose" = "yes" && cat << EOF
4594     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4595 EOF
4596 cat >> confdefs.h <<EOF
4597 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4598 EOF
4599 }
4600
4601
4602 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4603 echo "configure:4604: checking size of void *" >&5
4604
4605 cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 #include <stdio.h>
4609 #include <sys/types.h>
4610 main()
4611 {
4612   FILE *f=fopen("conftestval", "w");
4613   if (!f) exit(1);
4614   fprintf(f, "%d\n", sizeof(void *));
4615   exit(0);
4616 }
4617 EOF
4618 if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4619 then
4620   ac_cv_sizeof_void_p=`cat conftestval`
4621 else
4622   conftest_rc="$?"
4623   echo "configure: failed program was:" >&5
4624   cat conftest.$ac_ext >&5
4625   rm -fr conftest*
4626   ac_cv_sizeof_void_p=0
4627 fi
4628 rm -fr conftest*
4629 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4630 { test "$extra_verbose" = "yes" && cat << EOF
4631     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4632 EOF
4633 cat >> confdefs.h <<EOF
4634 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4635 EOF
4636 }
4637
4638
4639
4640 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4641 echo "configure:4642: checking for long file names" >&5
4642
4643 ac_cv_sys_long_file_names=yes
4644 # Test for long file names in all the places we know might matter:
4645 #      .                the current directory, where building will happen
4646 #      $prefix/lib      where we will be installing things
4647 #      $exec_prefix/lib likewise
4648 # eval it to expand exec_prefix.
4649 #      $TMPDIR          if set, where it might want to write temporary files
4650 # if $TMPDIR is not set:
4651 #      /tmp             where it might want to write temporary files
4652 #      /var/tmp         likewise
4653 #      /usr/tmp         likewise
4654 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4655   ac_tmpdirs="$TMPDIR"
4656 else
4657   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4658 fi
4659 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4660   test -d $ac_dir || continue
4661   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4662   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4663   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4664   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4665   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4666     ac_cv_sys_long_file_names=no
4667     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4668     break
4669   fi
4670   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4671 done
4672
4673 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4674 if test $ac_cv_sys_long_file_names = yes; then
4675   { test "$extra_verbose" = "yes" && cat << \EOF
4676     Defining HAVE_LONG_FILE_NAMES
4677 EOF
4678 cat >> confdefs.h <<\EOF
4679 #define HAVE_LONG_FILE_NAMES 1
4680 EOF
4681 }
4682
4683 fi
4684
4685
4686 echo $ac_n "checking for sin""... $ac_c" 1>&6
4687 echo "configure:4688: checking for sin" >&5
4688
4689 cat > conftest.$ac_ext <<EOF
4690 #line 4691 "configure"
4691 #include "confdefs.h"
4692 /* System header to define __stub macros and hopefully few prototypes,
4693     which can conflict with char sin(); below.  */
4694 #include <assert.h>
4695 /* Override any gcc2 internal prototype to avoid an error.  */
4696 /* We use char because int might match the return type of a gcc2
4697     builtin and then its argument prototype would still apply.  */
4698 char sin();
4699
4700 int main() {
4701
4702 /* The GNU C library defines this for functions which it implements
4703     to always fail with ENOSYS.  Some functions are actually named
4704     something starting with __ and the normal name is an alias.  */
4705 #if defined (__stub_sin) || defined (__stub___sin)
4706 choke me
4707 #else
4708 sin();
4709 #endif
4710
4711 ; return 0; }
4712 EOF
4713 if { (eval echo configure:4714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4714   rm -rf conftest*
4715   eval "ac_cv_func_sin=yes"
4716 else
4717   echo "configure: failed program was:" >&5
4718   cat conftest.$ac_ext >&5
4719   rm -rf conftest*
4720   eval "ac_cv_func_sin=no"
4721 fi
4722 rm -f conftest*
4723
4724 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4725   echo "$ac_t""yes" 1>&6
4726   :
4727 else
4728   echo "$ac_t""no" 1>&6
4729
4730 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4731 echo "configure:4732: checking for sin in -lm" >&5
4732 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4733
4734 xe_check_libs=" -lm "
4735 cat > conftest.$ac_ext <<EOF
4736 #line 4737 "configure"
4737 #include "confdefs.h"
4738 /* Override any gcc2 internal prototype to avoid an error.  */
4739 /* We use char because int might match the return type of a gcc2
4740     builtin and then its argument prototype would still apply.  */
4741 char sin();
4742
4743 int main() {
4744 sin()
4745 ; return 0; }
4746 EOF
4747 if { (eval echo configure:4748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4748   rm -rf conftest*
4749   eval "ac_cv_lib_$ac_lib_var=yes"
4750 else
4751   echo "configure: failed program was:" >&5
4752   cat conftest.$ac_ext >&5
4753   rm -rf conftest*
4754   eval "ac_cv_lib_$ac_lib_var=no"
4755 fi
4756 rm -f conftest*
4757 xe_check_libs=""
4758
4759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4760   echo "$ac_t""yes" 1>&6
4761     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4762     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4763   { test "$extra_verbose" = "yes" && cat << EOF
4764     Defining $ac_tr_lib
4765 EOF
4766 cat >> confdefs.h <<EOF
4767 #define $ac_tr_lib 1
4768 EOF
4769 }
4770
4771   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4772
4773 else
4774   echo "$ac_t""no" 1>&6
4775 fi
4776
4777
4778 fi
4779
4780
4781 { test "$extra_verbose" = "yes" && cat << \EOF
4782     Defining LISP_FLOAT_TYPE
4783 EOF
4784 cat >> confdefs.h <<\EOF
4785 #define LISP_FLOAT_TYPE 1
4786 EOF
4787 }
4788
4789
4790 cat > conftest.$ac_ext <<EOF
4791 #line 4792 "configure"
4792 #include "confdefs.h"
4793 #include <math.h>
4794 int main() {
4795 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4796 ; return 0; }
4797 EOF
4798 if { (eval echo configure:4799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4799   rm -rf conftest*
4800   { test "$extra_verbose" = "yes" && cat << \EOF
4801     Defining HAVE_INVERSE_HYPERBOLIC
4802 EOF
4803 cat >> confdefs.h <<\EOF
4804 #define HAVE_INVERSE_HYPERBOLIC 1
4805 EOF
4806 }
4807
4808 else
4809   echo "configure: failed program was:" >&5
4810   cat conftest.$ac_ext >&5
4811 fi
4812 rm -f conftest*
4813
4814 echo "checking type of mail spool file locking" 1>&6
4815 echo "configure:4816: checking type of mail spool file locking" >&5
4816 for ac_func in lockf flock
4817 do
4818 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4819 echo "configure:4820: checking for $ac_func" >&5
4820
4821 cat > conftest.$ac_ext <<EOF
4822 #line 4823 "configure"
4823 #include "confdefs.h"
4824 /* System header to define __stub macros and hopefully few prototypes,
4825     which can conflict with char $ac_func(); below.  */
4826 #include <assert.h>
4827 /* Override any gcc2 internal prototype to avoid an error.  */
4828 /* We use char because int might match the return type of a gcc2
4829     builtin and then its argument prototype would still apply.  */
4830 char $ac_func();
4831
4832 int main() {
4833
4834 /* The GNU C library defines this for functions which it implements
4835     to always fail with ENOSYS.  Some functions are actually named
4836     something starting with __ and the normal name is an alias.  */
4837 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4838 choke me
4839 #else
4840 $ac_func();
4841 #endif
4842
4843 ; return 0; }
4844 EOF
4845 if { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4846   rm -rf conftest*
4847   eval "ac_cv_func_$ac_func=yes"
4848 else
4849   echo "configure: failed program was:" >&5
4850   cat conftest.$ac_ext >&5
4851   rm -rf conftest*
4852   eval "ac_cv_func_$ac_func=no"
4853 fi
4854 rm -f conftest*
4855
4856 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4857   echo "$ac_t""yes" 1>&6
4858     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4859   { test "$extra_verbose" = "yes" && cat << EOF
4860     Defining $ac_tr_func
4861 EOF
4862 cat >> confdefs.h <<EOF
4863 #define $ac_tr_func 1
4864 EOF
4865 }
4866  
4867 else
4868   echo "$ac_t""no" 1>&6
4869 fi
4870 done
4871
4872 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4873 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4874 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4875 if   test -z "$mail_locking"; then
4876   case "$opsys" in cygwin* | mingw*)
4877     mail_locking=pop ;;
4878   esac
4879 fi
4880
4881 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4882     Defining MAIL_LOCK_LOCKF
4883 EOF
4884 cat >> confdefs.h <<\EOF
4885 #define MAIL_LOCK_LOCKF 1
4886 EOF
4887 }
4888
4889 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4890     Defining MAIL_LOCK_FLOCK
4891 EOF
4892 cat >> confdefs.h <<\EOF
4893 #define MAIL_LOCK_FLOCK 1
4894 EOF
4895 }
4896
4897 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4898     Defining MAIL_LOCK_LOCKING
4899 EOF
4900 cat >> confdefs.h <<\EOF
4901 #define MAIL_LOCK_LOCKING 1
4902 EOF
4903 }
4904
4905 elif test "$mail_locking" = "pop"; then
4906   with_pop=yes
4907   mail_locking=
4908 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4909     Defining MAIL_LOCK_DOT
4910 EOF
4911 cat >> confdefs.h <<\EOF
4912 #define MAIL_LOCK_DOT 1
4913 EOF
4914 }
4915
4916 fi
4917 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4918   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4919 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4920   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4921 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4922   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4923
4924 case "$opsys" in decosf*)
4925   
4926 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4927 echo "configure:4928: checking for cma_open in -lpthreads" >&5
4928 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4929
4930 xe_check_libs=" -lpthreads "
4931 cat > conftest.$ac_ext <<EOF
4932 #line 4933 "configure"
4933 #include "confdefs.h"
4934 /* Override any gcc2 internal prototype to avoid an error.  */
4935 /* We use char because int might match the return type of a gcc2
4936     builtin and then its argument prototype would still apply.  */
4937 char cma_open();
4938
4939 int main() {
4940 cma_open()
4941 ; return 0; }
4942 EOF
4943 if { (eval echo configure:4944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4944   rm -rf conftest*
4945   eval "ac_cv_lib_$ac_lib_var=yes"
4946 else
4947   echo "configure: failed program was:" >&5
4948   cat conftest.$ac_ext >&5
4949   rm -rf conftest*
4950   eval "ac_cv_lib_$ac_lib_var=no"
4951 fi
4952 rm -f conftest*
4953 xe_check_libs=""
4954
4955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4956   echo "$ac_t""yes" 1>&6
4957     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4958     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4959   { test "$extra_verbose" = "yes" && cat << EOF
4960     Defining $ac_tr_lib
4961 EOF
4962 cat >> confdefs.h <<EOF
4963 #define $ac_tr_lib 1
4964 EOF
4965 }
4966
4967   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4968
4969 else
4970   echo "$ac_t""no" 1>&6
4971 fi
4972
4973
4974   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4975     c_switch_site="$c_switch_site -threads" ;;
4976 esac
4977
4978 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4979 echo "configure:4980: checking whether the -xildoff compiler flag is required" >&5
4980 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4981   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4982     then echo "$ac_t""no" 1>&6;
4983     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
4984   fi
4985   else echo "$ac_t""no" 1>&6
4986 fi
4987
4988 if test "$opsys" = "sol2"; then
4989   if test "$os_release" -ge 56; then
4990     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4991 echo "configure:4992: checking for \"-z ignore\" linker flag" >&5
4992     case "`ld -h 2>&1`" in
4993       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4994         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4995       *) echo "$ac_t""no" 1>&6 ;;
4996     esac
4997   fi
4998 fi
4999
5000
5001 echo "checking "for specified window system"" 1>&6
5002 echo "configure:5003: checking "for specified window system"" >&5
5003
5004
5005 GNOME_CONFIG=no
5006 GTK_CONFIG=no
5007
5008 if test "$with_gnome" != "no"; then
5009    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5010 echo "configure:5011: checking for GNOME configuration script" >&5
5011    for possible in gnome-config
5012    do
5013       possible_version=`${possible} --version 2> /dev/null`
5014       if test "x${possible_version}" != "x"; then
5015               GNOME_CONFIG="${possible}"
5016               with_gnome=yes
5017               with_gtk=yes
5018               break
5019       fi
5020    done
5021    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5022 fi
5023
5024 if test "${GNOME_CONFIG}" != "no"; then
5025       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5026       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5027       { test "$extra_verbose" = "yes" && cat << \EOF
5028     Defining HAVE_GNOME
5029 EOF
5030 cat >> confdefs.h <<\EOF
5031 #define HAVE_GNOME 1
5032 EOF
5033 }
5034
5035       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5036       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5037 fi
5038
5039 if test "$with_gtk" != "no";then
5040    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5041 echo "configure:5042: checking for GTK configuration script" >&5
5042    for possible in gtk12-config gtk14-config gtk-config
5043    do
5044       possible_version=`${possible} --version 2> /dev/null`
5045       if test "x${possible_version}" != "x"; then
5046               GTK_CONFIG="${possible}"
5047       fi
5048       case "${possible_version}" in
5049         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5050         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5051         1.2.*)
5052                 with_gtk=yes
5053                 break
5054                 ;;
5055         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5056       esac
5057    done
5058    echo "$ac_t""${GTK_CONFIG}" 1>&6
5059 fi
5060
5061 if test "${GTK_CONFIG}" != "no"; then
5062       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5063 echo "configure:5064: checking gtk version" >&5
5064       GTK_VERSION=`${GTK_CONFIG} --version`
5065       echo "$ac_t""${GTK_VERSION}" 1>&6
5066
5067       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5068 echo "configure:5069: checking gtk libs" >&5
5069       GTK_LIBS=`${GTK_CONFIG} --libs`
5070       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5071       echo "$ac_t""${GTK_LIBS}" 1>&6
5072
5073       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5074 echo "configure:5075: checking gtk cflags" >&5
5075       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5076       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5077       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5078
5079       
5080 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5081 echo "configure:5082: checking for main in -lgdk_imlib" >&5
5082 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5083
5084 xe_check_libs=" -lgdk_imlib "
5085 cat > conftest.$ac_ext <<EOF
5086 #line 5087 "configure"
5087 #include "confdefs.h"
5088
5089 int main() {
5090 main()
5091 ; return 0; }
5092 EOF
5093 if { (eval echo configure:5094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5094   rm -rf conftest*
5095   eval "ac_cv_lib_$ac_lib_var=yes"
5096 else
5097   echo "configure: failed program was:" >&5
5098   cat conftest.$ac_ext >&5
5099   rm -rf conftest*
5100   eval "ac_cv_lib_$ac_lib_var=no"
5101 fi
5102 rm -f conftest*
5103 xe_check_libs=""
5104
5105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5106   echo "$ac_t""yes" 1>&6
5107   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5108 else
5109   echo "$ac_t""no" 1>&6
5110 fi
5111
5112
5113       
5114 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5115 echo "configure:5116: checking for Imlib_init in -lImlib" >&5
5116 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5117
5118 xe_check_libs=" -lImlib "
5119 cat > conftest.$ac_ext <<EOF
5120 #line 5121 "configure"
5121 #include "confdefs.h"
5122 /* Override any gcc2 internal prototype to avoid an error.  */
5123 /* We use char because int might match the return type of a gcc2
5124     builtin and then its argument prototype would still apply.  */
5125 char Imlib_init();
5126
5127 int main() {
5128 Imlib_init()
5129 ; return 0; }
5130 EOF
5131 if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5132   rm -rf conftest*
5133   eval "ac_cv_lib_$ac_lib_var=yes"
5134 else
5135   echo "configure: failed program was:" >&5
5136   cat conftest.$ac_ext >&5
5137   rm -rf conftest*
5138   eval "ac_cv_lib_$ac_lib_var=no"
5139 fi
5140 rm -f conftest*
5141 xe_check_libs=""
5142
5143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5144   echo "$ac_t""yes" 1>&6
5145   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5146 else
5147   echo "$ac_t""no" 1>&6
5148 fi
5149
5150
5151       for ac_func in gdk_imlib_init
5152 do
5153 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5154 echo "configure:5155: checking for $ac_func" >&5
5155
5156 cat > conftest.$ac_ext <<EOF
5157 #line 5158 "configure"
5158 #include "confdefs.h"
5159 /* System header to define __stub macros and hopefully few prototypes,
5160     which can conflict with char $ac_func(); below.  */
5161 #include <assert.h>
5162 /* Override any gcc2 internal prototype to avoid an error.  */
5163 /* We use char because int might match the return type of a gcc2
5164     builtin and then its argument prototype would still apply.  */
5165 char $ac_func();
5166
5167 int main() {
5168
5169 /* The GNU C library defines this for functions which it implements
5170     to always fail with ENOSYS.  Some functions are actually named
5171     something starting with __ and the normal name is an alias.  */
5172 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5173 choke me
5174 #else
5175 $ac_func();
5176 #endif
5177
5178 ; return 0; }
5179 EOF
5180 if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5181   rm -rf conftest*
5182   eval "ac_cv_func_$ac_func=yes"
5183 else
5184   echo "configure: failed program was:" >&5
5185   cat conftest.$ac_ext >&5
5186   rm -rf conftest*
5187   eval "ac_cv_func_$ac_func=no"
5188 fi
5189 rm -f conftest*
5190
5191 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5192   echo "$ac_t""yes" 1>&6
5193     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5194   { test "$extra_verbose" = "yes" && cat << EOF
5195     Defining $ac_tr_func
5196 EOF
5197 cat >> confdefs.h <<EOF
5198 #define $ac_tr_func 1
5199 EOF
5200 }
5201  
5202 else
5203   echo "$ac_t""no" 1>&6
5204 fi
5205 done
5206
5207
5208       { test "$extra_verbose" = "yes" && cat << \EOF
5209     Defining HAVE_XPM
5210 EOF
5211 cat >> confdefs.h <<\EOF
5212 #define HAVE_XPM 1
5213 EOF
5214 }
5215
5216       { test "$extra_verbose" = "yes" && cat << \EOF
5217     Defining HAVE_GTK
5218 EOF
5219 cat >> confdefs.h <<\EOF
5220 #define HAVE_GTK 1
5221 EOF
5222 }
5223
5224       
5225
5226       window_system=gtk
5227       with_gtk=yes
5228       with_x11=no
5229
5230       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5231       test "${with_toolbars}" != no && with_toolbars=gtk
5232       test "${with_menubars}" != "no" && with_menubars=gtk
5233       test "${with_dialogs}" != "no" && with_dialogs=gtk
5234       test "${with_widgets}" != "no" && with_widgets=gtk
5235
5236       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5237    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5238  fi
5239       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5240    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5241  fi
5242       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5243    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5244  fi
5245       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5246    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5247  fi
5248
5249             OLD_CFLAGS="${CFLAGS}"
5250       OLD_CPPFLAGS="${CPPFLAGS}"
5251       OLD_LDFLAGS="${LDFLAGS}"
5252       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5253       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5254       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5255       for ac_hdr in glade/glade.h glade.h
5256 do
5257 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5258 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5259 echo "configure:5260: checking for $ac_hdr" >&5
5260
5261 cat > conftest.$ac_ext <<EOF
5262 #line 5263 "configure"
5263 #include "confdefs.h"
5264 #include <$ac_hdr>
5265 EOF
5266 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5267 { (eval echo configure:5268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5268 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5269 if test -z "$ac_err"; then
5270   rm -rf conftest*
5271   eval "ac_cv_header_$ac_safe=yes"
5272 else
5273   echo "$ac_err" >&5
5274   echo "configure: failed program was:" >&5
5275   cat conftest.$ac_ext >&5
5276   rm -rf conftest*
5277   eval "ac_cv_header_$ac_safe=no"
5278 fi
5279 rm -f conftest*
5280 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5281   echo "$ac_t""yes" 1>&6
5282     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5283   { test "$extra_verbose" = "yes" && cat << EOF
5284     Defining $ac_tr_hdr
5285 EOF
5286 cat >> confdefs.h <<EOF
5287 #define $ac_tr_hdr 1
5288 EOF
5289 }
5290  
5291 else
5292   echo "$ac_t""no" 1>&6
5293 fi
5294 done
5295
5296       
5297 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5298 echo "configure:5299: checking for main in -lxml" >&5
5299 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5300
5301 xe_check_libs=" -lxml "
5302 cat > conftest.$ac_ext <<EOF
5303 #line 5304 "configure"
5304 #include "confdefs.h"
5305
5306 int main() {
5307 main()
5308 ; return 0; }
5309 EOF
5310 if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5311   rm -rf conftest*
5312   eval "ac_cv_lib_$ac_lib_var=yes"
5313 else
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316   rm -rf conftest*
5317   eval "ac_cv_lib_$ac_lib_var=no"
5318 fi
5319 rm -f conftest*
5320 xe_check_libs=""
5321
5322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5323   echo "$ac_t""yes" 1>&6
5324   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5325 else
5326   echo "$ac_t""no" 1>&6
5327 fi
5328
5329
5330       
5331 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5332 echo "configure:5333: checking for main in -lglade" >&5
5333 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5334
5335 xe_check_libs=" -lglade "
5336 cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339
5340 int main() {
5341 main()
5342 ; return 0; }
5343 EOF
5344 if { (eval echo configure:5345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5345   rm -rf conftest*
5346   eval "ac_cv_lib_$ac_lib_var=yes"
5347 else
5348   echo "configure: failed program was:" >&5
5349   cat conftest.$ac_ext >&5
5350   rm -rf conftest*
5351   eval "ac_cv_lib_$ac_lib_var=no"
5352 fi
5353 rm -f conftest*
5354 xe_check_libs=""
5355
5356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5357   echo "$ac_t""yes" 1>&6
5358   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5359 else
5360   echo "$ac_t""no" 1>&6
5361 fi
5362
5363
5364       
5365 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5366 echo "configure:5367: checking for main in -lglade-gnome" >&5
5367 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5368
5369 xe_check_libs=" -lglade-gnome "
5370 cat > conftest.$ac_ext <<EOF
5371 #line 5372 "configure"
5372 #include "confdefs.h"
5373
5374 int main() {
5375 main()
5376 ; return 0; }
5377 EOF
5378 if { (eval echo configure:5379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5379   rm -rf conftest*
5380   eval "ac_cv_lib_$ac_lib_var=yes"
5381 else
5382   echo "configure: failed program was:" >&5
5383   cat conftest.$ac_ext >&5
5384   rm -rf conftest*
5385   eval "ac_cv_lib_$ac_lib_var=no"
5386 fi
5387 rm -f conftest*
5388 xe_check_libs=""
5389
5390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5391   echo "$ac_t""yes" 1>&6
5392   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5393 else
5394   echo "$ac_t""no" 1>&6
5395 fi
5396
5397
5398       cat > conftest.$ac_ext <<EOF
5399 #line 5400 "configure"
5400 #include "confdefs.h"
5401 #include <glade/glade-xml.h>
5402 EOF
5403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5404   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5405   rm -rf conftest*
5406   echo "$ac_t""yes" 1>&6
5407                        { test "$extra_verbose" = "yes" && cat << \EOF
5408     Defining LIBGLADE_XML_TXTDOMAIN = 1
5409 EOF
5410 cat >> confdefs.h <<\EOF
5411 #define LIBGLADE_XML_TXTDOMAIN 1
5412 EOF
5413 }
5414
5415 else
5416   rm -rf conftest*
5417   echo "$ac_t""no" 1>&6
5418 fi
5419 rm -f conftest*
5420
5421       CFLAGS="${OLD_CFLAGS}"
5422       CPPFLAGS="${OLD_CPPFLAGS}"
5423       LDFLAGS="${OLD_LDFLAGS}"
5424 fi
5425
5426
5427 if test "$with_x11" != "no"; then
5428     test "$x_includes $x_libraries" != "NONE NONE" && \
5429    window_system=x11 with_x11=yes
5430
5431         
5432       if test "$x_includes $x_libraries" = "NONE NONE" \
5433     -a -n "$OPENWINHOME" \
5434     -a "$OPENWINHOME" != "/usr/openwin" \
5435     -a -d "$OPENWINHOME"; then
5436       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5437       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5438       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5439   fi
5440
5441   if test "$x_includes" = "NONE"; then
5442                     for dir in "/usr/X11" "/usr/X11R6"; do
5443       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5444     done
5445   fi
5446
5447   if test "$x_libraries" = "NONE"; then
5448     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5449       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5450     done
5451   fi
5452
5453   # If we find X, set shell vars x_includes and x_libraries to the
5454 # paths, otherwise set no_x=yes.
5455 # Uses ac_ vars as temps to allow command line to override cache and checks.
5456 # --without-x overrides everything else, but does not touch the cache.
5457 echo $ac_n "checking for X""... $ac_c" 1>&6
5458 echo "configure:5459: checking for X" >&5
5459
5460 # Check whether --with-x or --without-x was given.
5461 if test "${with_x+set}" = set; then
5462   withval="$with_x"
5463   :
5464 fi
5465
5466 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5467 if test "x$with_x" = xno; then
5468   # The user explicitly disabled X.
5469   have_x=disabled
5470 else
5471   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5472     # Both variables are already set.
5473     have_x=yes
5474   else
5475
5476 # One or both of the vars are not set, and there is no cached value.
5477 ac_x_includes=NO ac_x_libraries=NO
5478 rm -fr conftestdir
5479 if mkdir conftestdir; then
5480   cd conftestdir
5481   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5482   cat > Imakefile <<'EOF'
5483 acfindx:
5484         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5485 EOF
5486   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5487     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5488     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5489     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5490     for ac_extension in a so sl; do
5491       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5492         test -f $ac_im_libdir/libX11.$ac_extension; then
5493         ac_im_usrlibdir=$ac_im_libdir; break
5494       fi
5495     done
5496     # Screen out bogus values from the imake configuration.  They are
5497     # bogus both because they are the default anyway, and because
5498     # using them would break gcc on systems where it needs fixed includes.
5499     case "$ac_im_incroot" in
5500         /usr/include) ;;
5501         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5502     esac
5503     case "$ac_im_usrlibdir" in
5504         /usr/lib | /lib) ;;
5505         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5506     esac
5507   fi
5508   cd ..
5509   rm -fr conftestdir
5510 fi
5511
5512 if test "$ac_x_includes" = NO; then
5513   # Guess where to find include files, by looking for this one X11 .h file.
5514   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5515
5516   # First, try using that file with no special directory specified.
5517 cat > conftest.$ac_ext <<EOF
5518 #line 5519 "configure"
5519 #include "confdefs.h"
5520 #include <$x_direct_test_include>
5521 EOF
5522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5523 { (eval echo configure:5524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5525 if test -z "$ac_err"; then
5526   rm -rf conftest*
5527   # We can compile using X headers with no special include directory.
5528 ac_x_includes=
5529 else
5530   echo "$ac_err" >&5
5531   echo "configure: failed program was:" >&5
5532   cat conftest.$ac_ext >&5
5533   rm -rf conftest*
5534   # Look for the header file in a standard set of common directories.
5535 # Check X11 before X11Rn because it is often a symlink to the current release.
5536   for ac_dir in               \
5537     /usr/X11/include          \
5538     /usr/X11R6/include        \
5539     /usr/X11R5/include        \
5540     /usr/X11R4/include        \
5541                               \
5542     /usr/include/X11          \
5543     /usr/include/X11R6        \
5544     /usr/include/X11R5        \
5545     /usr/include/X11R4        \
5546                               \
5547     /usr/local/X11/include    \
5548     /usr/local/X11R6/include  \
5549     /usr/local/X11R5/include  \
5550     /usr/local/X11R4/include  \
5551                               \
5552     /usr/local/include/X11    \
5553     /usr/local/include/X11R6  \
5554     /usr/local/include/X11R5  \
5555     /usr/local/include/X11R4  \
5556                               \
5557     /usr/X386/include         \
5558     /usr/x386/include         \
5559     /usr/XFree86/include/X11  \
5560                               \
5561     /usr/include              \
5562     /usr/local/include        \
5563     /usr/unsupported/include  \
5564     /usr/athena/include       \
5565     /usr/local/x11r5/include  \
5566     /usr/lpp/Xamples/include  \
5567                               \
5568     /usr/openwin/include      \
5569     /usr/openwin/share/include \
5570     ; \
5571   do
5572     if test -r "$ac_dir/$x_direct_test_include"; then
5573       ac_x_includes=$ac_dir
5574       break
5575     fi
5576   done
5577 fi
5578 rm -f conftest*
5579 fi # $ac_x_includes = NO
5580
5581 if test "$ac_x_libraries" = NO; then
5582   # Check for the libraries.
5583
5584   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5585   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5586
5587   # See if we find them without any special options.
5588   # Don't add to $LIBS permanently.
5589   ac_save_LIBS="$LIBS"
5590   LIBS="-l$x_direct_test_library $LIBS"
5591 cat > conftest.$ac_ext <<EOF
5592 #line 5593 "configure"
5593 #include "confdefs.h"
5594
5595 int main() {
5596 ${x_direct_test_function}()
5597 ; return 0; }
5598 EOF
5599 if { (eval echo configure:5600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5600   rm -rf conftest*
5601   LIBS="$ac_save_LIBS"
5602 # We can link X programs with no special library path.
5603 ac_x_libraries=
5604 else
5605   echo "configure: failed program was:" >&5
5606   cat conftest.$ac_ext >&5
5607   rm -rf conftest*
5608   LIBS="$ac_save_LIBS"
5609 # First see if replacing the include by lib works.
5610 # Check X11 before X11Rn because it is often a symlink to the current release.
5611 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5612     /usr/X11/lib          \
5613     /usr/X11R6/lib        \
5614     /usr/X11R5/lib        \
5615     /usr/X11R4/lib        \
5616                           \
5617     /usr/lib/X11          \
5618     /usr/lib/X11R6        \
5619     /usr/lib/X11R5        \
5620     /usr/lib/X11R4        \
5621                           \
5622     /usr/local/X11/lib    \
5623     /usr/local/X11R6/lib  \
5624     /usr/local/X11R5/lib  \
5625     /usr/local/X11R4/lib  \
5626                           \
5627     /usr/local/lib/X11    \
5628     /usr/local/lib/X11R6  \
5629     /usr/local/lib/X11R5  \
5630     /usr/local/lib/X11R4  \
5631                           \
5632     /usr/X386/lib         \
5633     /usr/x386/lib         \
5634     /usr/XFree86/lib/X11  \
5635                           \
5636     /usr/lib              \
5637     /usr/local/lib        \
5638     /usr/unsupported/lib  \
5639     /usr/athena/lib       \
5640     /usr/local/x11r5/lib  \
5641     /usr/lpp/Xamples/lib  \
5642     /lib/usr/lib/X11      \
5643                           \
5644     /usr/openwin/lib      \
5645     /usr/openwin/share/lib \
5646     ; \
5647 do
5648   for ac_extension in a so sl; do
5649     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5650       ac_x_libraries=$ac_dir
5651       break 2
5652     fi
5653   done
5654 done
5655 fi
5656 rm -f conftest*
5657 fi # $ac_x_libraries = NO
5658
5659 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5660   # Didn't find X anywhere.  Cache the known absence of X.
5661   ac_cv_have_x="have_x=no"
5662 else
5663   # Record where we found X for the cache.
5664   ac_cv_have_x="have_x=yes \
5665                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5666 fi
5667   fi
5668   eval "$ac_cv_have_x"
5669 fi # $with_x != no
5670
5671 if test "$have_x" != yes; then
5672   echo "$ac_t""$have_x" 1>&6
5673   no_x=yes
5674 else
5675   # If each of the values was on the command line, it overrides each guess.
5676   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5677   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5678   # Update the cache value to reflect the command line values.
5679   ac_cv_have_x="have_x=yes \
5680                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5681   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5682 fi
5683
5684 if test "$no_x" = yes; then
5685   # Not all programs may use this symbol, but it does not hurt to define it.
5686   { test "$extra_verbose" = "yes" && cat << \EOF
5687     Defining X_DISPLAY_MISSING
5688 EOF
5689 cat >> confdefs.h <<\EOF
5690 #define X_DISPLAY_MISSING 1
5691 EOF
5692 }
5693
5694   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5695 else
5696   if test -n "$x_includes"; then
5697     X_CFLAGS="$X_CFLAGS -I$x_includes"
5698   fi
5699
5700   # It would also be nice to do this for all -L options, not just this one.
5701   if test -n "$x_libraries"; then
5702     X_LIBS="$X_LIBS -L$x_libraries"
5703     # For Solaris; some versions of Sun CC require a space after -R and
5704     # others require no space.  Words are not sufficient . . . .
5705     case "`(uname -sr) 2>/dev/null`" in
5706     "SunOS 5"*)
5707       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5708 echo "configure:5709: checking whether -R must be followed by a space" >&5
5709       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5710       cat > conftest.$ac_ext <<EOF
5711 #line 5712 "configure"
5712 #include "confdefs.h"
5713
5714 int main() {
5715
5716 ; return 0; }
5717 EOF
5718 if { (eval echo configure:5719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5719   rm -rf conftest*
5720   ac_R_nospace=yes
5721 else
5722   echo "configure: failed program was:" >&5
5723   cat conftest.$ac_ext >&5
5724   rm -rf conftest*
5725   ac_R_nospace=no
5726 fi
5727 rm -f conftest*
5728       if test $ac_R_nospace = yes; then
5729         echo "$ac_t""no" 1>&6
5730         X_LIBS="$X_LIBS -R$x_libraries"
5731       else
5732         LIBS="$ac_xsave_LIBS -R $x_libraries"
5733         cat > conftest.$ac_ext <<EOF
5734 #line 5735 "configure"
5735 #include "confdefs.h"
5736
5737 int main() {
5738
5739 ; return 0; }
5740 EOF
5741 if { (eval echo configure:5742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5742   rm -rf conftest*
5743   ac_R_space=yes
5744 else
5745   echo "configure: failed program was:" >&5
5746   cat conftest.$ac_ext >&5
5747   rm -rf conftest*
5748   ac_R_space=no
5749 fi
5750 rm -f conftest*
5751         if test $ac_R_space = yes; then
5752           echo "$ac_t""yes" 1>&6
5753           X_LIBS="$X_LIBS -R $x_libraries"
5754         else
5755           echo "$ac_t""neither works" 1>&6
5756         fi
5757       fi
5758       LIBS="$ac_xsave_LIBS"
5759     esac
5760   fi
5761
5762   # Check for system-dependent libraries X programs must link with.
5763   # Do this before checking for the system-independent R6 libraries
5764   # (-lICE), since we may need -lsocket or whatever for X linking.
5765
5766   if test "$ISC" = yes; then
5767     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5768   else
5769     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5770     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5771     # the Alpha needs dnet_stub (dnet does not exist).
5772     if test "$with_dnet" = "no" ; then
5773 ac_cv_lib_dnet_dnet_ntoa=no
5774 else
5775
5776 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5777 echo "configure:5778: checking for dnet_ntoa in -ldnet" >&5
5778 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5779
5780 xe_check_libs=" -ldnet "
5781 cat > conftest.$ac_ext <<EOF
5782 #line 5783 "configure"
5783 #include "confdefs.h"
5784 /* Override any gcc2 internal prototype to avoid an error.  */
5785 /* We use char because int might match the return type of a gcc2
5786     builtin and then its argument prototype would still apply.  */
5787 char dnet_ntoa();
5788
5789 int main() {
5790 dnet_ntoa()
5791 ; return 0; }
5792 EOF
5793 if { (eval echo configure:5794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5794   rm -rf conftest*
5795   eval "ac_cv_lib_$ac_lib_var=yes"
5796 else
5797   echo "configure: failed program was:" >&5
5798   cat conftest.$ac_ext >&5
5799   rm -rf conftest*
5800   eval "ac_cv_lib_$ac_lib_var=no"
5801 fi
5802 rm -f conftest*
5803 xe_check_libs=""
5804
5805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5806   echo "$ac_t""yes" 1>&6
5807   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5808 else
5809   echo "$ac_t""no" 1>&6
5810 fi
5811
5812 fi
5813
5814     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5815       
5816 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5817 echo "configure:5818: checking for dnet_ntoa in -ldnet_stub" >&5
5818 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5819
5820 xe_check_libs=" -ldnet_stub "
5821 cat > conftest.$ac_ext <<EOF
5822 #line 5823 "configure"
5823 #include "confdefs.h"
5824 /* Override any gcc2 internal prototype to avoid an error.  */
5825 /* We use char because int might match the return type of a gcc2
5826     builtin and then its argument prototype would still apply.  */
5827 char dnet_ntoa();
5828
5829 int main() {
5830 dnet_ntoa()
5831 ; return 0; }
5832 EOF
5833 if { (eval echo configure:5834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5834   rm -rf conftest*
5835   eval "ac_cv_lib_$ac_lib_var=yes"
5836 else
5837   echo "configure: failed program was:" >&5
5838   cat conftest.$ac_ext >&5
5839   rm -rf conftest*
5840   eval "ac_cv_lib_$ac_lib_var=no"
5841 fi
5842 rm -f conftest*
5843 xe_check_libs=""
5844
5845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5846   echo "$ac_t""yes" 1>&6
5847   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5848 else
5849   echo "$ac_t""no" 1>&6
5850 fi
5851
5852
5853     fi
5854
5855     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5856     # to get the SysV transport functions.
5857     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5858     # needs -lnsl.
5859     # The nsl library prevents programs from opening the X display
5860     # on Irix 5.2, according to dickey@clark.net.
5861     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5862 echo "configure:5863: checking for gethostbyname" >&5
5863
5864 cat > conftest.$ac_ext <<EOF
5865 #line 5866 "configure"
5866 #include "confdefs.h"
5867 /* System header to define __stub macros and hopefully few prototypes,
5868     which can conflict with char gethostbyname(); below.  */
5869 #include <assert.h>
5870 /* Override any gcc2 internal prototype to avoid an error.  */
5871 /* We use char because int might match the return type of a gcc2
5872     builtin and then its argument prototype would still apply.  */
5873 char gethostbyname();
5874
5875 int main() {
5876
5877 /* The GNU C library defines this for functions which it implements
5878     to always fail with ENOSYS.  Some functions are actually named
5879     something starting with __ and the normal name is an alias.  */
5880 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5881 choke me
5882 #else
5883 gethostbyname();
5884 #endif
5885
5886 ; return 0; }
5887 EOF
5888 if { (eval echo configure:5889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5889   rm -rf conftest*
5890   eval "ac_cv_func_gethostbyname=yes"
5891 else
5892   echo "configure: failed program was:" >&5
5893   cat conftest.$ac_ext >&5
5894   rm -rf conftest*
5895   eval "ac_cv_func_gethostbyname=no"
5896 fi
5897 rm -f conftest*
5898
5899 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5900   echo "$ac_t""yes" 1>&6
5901   :
5902 else
5903   echo "$ac_t""no" 1>&6
5904 fi
5905
5906     if test $ac_cv_func_gethostbyname = no; then
5907       
5908 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5909 echo "configure:5910: checking for gethostbyname in -lnsl" >&5
5910 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5911
5912 xe_check_libs=" -lnsl "
5913 cat > conftest.$ac_ext <<EOF
5914 #line 5915 "configure"
5915 #include "confdefs.h"
5916 /* Override any gcc2 internal prototype to avoid an error.  */
5917 /* We use char because int might match the return type of a gcc2
5918     builtin and then its argument prototype would still apply.  */
5919 char gethostbyname();
5920
5921 int main() {
5922 gethostbyname()
5923 ; return 0; }
5924 EOF
5925 if { (eval echo configure:5926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5926   rm -rf conftest*
5927   eval "ac_cv_lib_$ac_lib_var=yes"
5928 else
5929   echo "configure: failed program was:" >&5
5930   cat conftest.$ac_ext >&5
5931   rm -rf conftest*
5932   eval "ac_cv_lib_$ac_lib_var=no"
5933 fi
5934 rm -f conftest*
5935 xe_check_libs=""
5936
5937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5938   echo "$ac_t""yes" 1>&6
5939   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5940 else
5941   echo "$ac_t""no" 1>&6
5942 fi
5943
5944
5945     fi
5946
5947     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5948     # socket/setsockopt and other routines are undefined under SCO ODT
5949     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5950     # on later versions), says simon@lia.di.epfl.ch: it contains
5951     # gethostby* variants that don't use the nameserver (or something).
5952     # -lsocket must be given before -lnsl if both are needed.
5953     # We assume that if connect needs -lnsl, so does gethostbyname.
5954     echo $ac_n "checking for connect""... $ac_c" 1>&6
5955 echo "configure:5956: checking for connect" >&5
5956
5957 cat > conftest.$ac_ext <<EOF
5958 #line 5959 "configure"
5959 #include "confdefs.h"
5960 /* System header to define __stub macros and hopefully few prototypes,
5961     which can conflict with char connect(); below.  */
5962 #include <assert.h>
5963 /* Override any gcc2 internal prototype to avoid an error.  */
5964 /* We use char because int might match the return type of a gcc2
5965     builtin and then its argument prototype would still apply.  */
5966 char connect();
5967
5968 int main() {
5969
5970 /* The GNU C library defines this for functions which it implements
5971     to always fail with ENOSYS.  Some functions are actually named
5972     something starting with __ and the normal name is an alias.  */
5973 #if defined (__stub_connect) || defined (__stub___connect)
5974 choke me
5975 #else
5976 connect();
5977 #endif
5978
5979 ; return 0; }
5980 EOF
5981 if { (eval echo configure:5982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5982   rm -rf conftest*
5983   eval "ac_cv_func_connect=yes"
5984 else
5985   echo "configure: failed program was:" >&5
5986   cat conftest.$ac_ext >&5
5987   rm -rf conftest*
5988   eval "ac_cv_func_connect=no"
5989 fi
5990 rm -f conftest*
5991
5992 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5993   echo "$ac_t""yes" 1>&6
5994   :
5995 else
5996   echo "$ac_t""no" 1>&6
5997 fi
5998
5999     if test $ac_cv_func_connect = no; then
6000       
6001 xe_msg_checking="for connect in -lsocket"
6002 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6003 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6004 echo "configure:6005: checking "$xe_msg_checking"" >&5
6005 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6006
6007 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6008 cat > conftest.$ac_ext <<EOF
6009 #line 6010 "configure"
6010 #include "confdefs.h"
6011 /* Override any gcc2 internal prototype to avoid an error.  */
6012 /* We use char because int might match the return type of a gcc2
6013     builtin and then its argument prototype would still apply.  */
6014 char connect();
6015
6016 int main() {
6017 connect()
6018 ; return 0; }
6019 EOF
6020 if { (eval echo configure:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6021   rm -rf conftest*
6022   eval "ac_cv_lib_$ac_lib_var=yes"
6023 else
6024   echo "configure: failed program was:" >&5
6025   cat conftest.$ac_ext >&5
6026   rm -rf conftest*
6027   eval "ac_cv_lib_$ac_lib_var=no"
6028 fi
6029 rm -f conftest*
6030 xe_check_libs=""
6031
6032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6033   echo "$ac_t""yes" 1>&6
6034   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6035 else
6036   echo "$ac_t""no" 1>&6
6037 fi
6038
6039
6040     fi
6041
6042     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6043     echo $ac_n "checking for remove""... $ac_c" 1>&6
6044 echo "configure:6045: checking for remove" >&5
6045
6046 cat > conftest.$ac_ext <<EOF
6047 #line 6048 "configure"
6048 #include "confdefs.h"
6049 /* System header to define __stub macros and hopefully few prototypes,
6050     which can conflict with char remove(); below.  */
6051 #include <assert.h>
6052 /* Override any gcc2 internal prototype to avoid an error.  */
6053 /* We use char because int might match the return type of a gcc2
6054     builtin and then its argument prototype would still apply.  */
6055 char remove();
6056
6057 int main() {
6058
6059 /* The GNU C library defines this for functions which it implements
6060     to always fail with ENOSYS.  Some functions are actually named
6061     something starting with __ and the normal name is an alias.  */
6062 #if defined (__stub_remove) || defined (__stub___remove)
6063 choke me
6064 #else
6065 remove();
6066 #endif
6067
6068 ; return 0; }
6069 EOF
6070 if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6071   rm -rf conftest*
6072   eval "ac_cv_func_remove=yes"
6073 else
6074   echo "configure: failed program was:" >&5
6075   cat conftest.$ac_ext >&5
6076   rm -rf conftest*
6077   eval "ac_cv_func_remove=no"
6078 fi
6079 rm -f conftest*
6080
6081 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6082   echo "$ac_t""yes" 1>&6
6083   :
6084 else
6085   echo "$ac_t""no" 1>&6
6086 fi
6087
6088     if test $ac_cv_func_remove = no; then
6089       
6090 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6091 echo "configure:6092: checking for remove in -lposix" >&5
6092 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6093
6094 xe_check_libs=" -lposix "
6095 cat > conftest.$ac_ext <<EOF
6096 #line 6097 "configure"
6097 #include "confdefs.h"
6098 /* Override any gcc2 internal prototype to avoid an error.  */
6099 /* We use char because int might match the return type of a gcc2
6100     builtin and then its argument prototype would still apply.  */
6101 char remove();
6102
6103 int main() {
6104 remove()
6105 ; return 0; }
6106 EOF
6107 if { (eval echo configure:6108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6108   rm -rf conftest*
6109   eval "ac_cv_lib_$ac_lib_var=yes"
6110 else
6111   echo "configure: failed program was:" >&5
6112   cat conftest.$ac_ext >&5
6113   rm -rf conftest*
6114   eval "ac_cv_lib_$ac_lib_var=no"
6115 fi
6116 rm -f conftest*
6117 xe_check_libs=""
6118
6119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6120   echo "$ac_t""yes" 1>&6
6121   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6122 else
6123   echo "$ac_t""no" 1>&6
6124 fi
6125
6126
6127     fi
6128
6129     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6130     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6131 echo "configure:6132: checking for shmat" >&5
6132
6133 cat > conftest.$ac_ext <<EOF
6134 #line 6135 "configure"
6135 #include "confdefs.h"
6136 /* System header to define __stub macros and hopefully few prototypes,
6137     which can conflict with char shmat(); below.  */
6138 #include <assert.h>
6139 /* Override any gcc2 internal prototype to avoid an error.  */
6140 /* We use char because int might match the return type of a gcc2
6141     builtin and then its argument prototype would still apply.  */
6142 char shmat();
6143
6144 int main() {
6145
6146 /* The GNU C library defines this for functions which it implements
6147     to always fail with ENOSYS.  Some functions are actually named
6148     something starting with __ and the normal name is an alias.  */
6149 #if defined (__stub_shmat) || defined (__stub___shmat)
6150 choke me
6151 #else
6152 shmat();
6153 #endif
6154
6155 ; return 0; }
6156 EOF
6157 if { (eval echo configure:6158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6158   rm -rf conftest*
6159   eval "ac_cv_func_shmat=yes"
6160 else
6161   echo "configure: failed program was:" >&5
6162   cat conftest.$ac_ext >&5
6163   rm -rf conftest*
6164   eval "ac_cv_func_shmat=no"
6165 fi
6166 rm -f conftest*
6167
6168 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6169   echo "$ac_t""yes" 1>&6
6170   :
6171 else
6172   echo "$ac_t""no" 1>&6
6173 fi
6174
6175     if test $ac_cv_func_shmat = no; then
6176       
6177 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6178 echo "configure:6179: checking for shmat in -lipc" >&5
6179 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6180
6181 xe_check_libs=" -lipc "
6182 cat > conftest.$ac_ext <<EOF
6183 #line 6184 "configure"
6184 #include "confdefs.h"
6185 /* Override any gcc2 internal prototype to avoid an error.  */
6186 /* We use char because int might match the return type of a gcc2
6187     builtin and then its argument prototype would still apply.  */
6188 char shmat();
6189
6190 int main() {
6191 shmat()
6192 ; return 0; }
6193 EOF
6194 if { (eval echo configure:6195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6195   rm -rf conftest*
6196   eval "ac_cv_lib_$ac_lib_var=yes"
6197 else
6198   echo "configure: failed program was:" >&5
6199   cat conftest.$ac_ext >&5
6200   rm -rf conftest*
6201   eval "ac_cv_lib_$ac_lib_var=no"
6202 fi
6203 rm -f conftest*
6204 xe_check_libs=""
6205
6206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6207   echo "$ac_t""yes" 1>&6
6208   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6209 else
6210   echo "$ac_t""no" 1>&6
6211 fi
6212
6213
6214     fi
6215   fi
6216
6217   # Check for libraries that X11R6 Xt/Xaw programs need.
6218   ac_save_LDFLAGS="$LDFLAGS"
6219   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6220   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6221   # check for ICE first), but we must link in the order -lSM -lICE or
6222   # we get undefined symbols.  So assume we have SM if we have ICE.
6223   # These have to be linked with before -lX11, unlike the other
6224   # libraries we check for below, so use a different variable.
6225   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6226   
6227 xe_msg_checking="for IceConnectionNumber in -lICE"
6228 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6229 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6230 echo "configure:6231: checking "$xe_msg_checking"" >&5
6231 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6232
6233 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6234 cat > conftest.$ac_ext <<EOF
6235 #line 6236 "configure"
6236 #include "confdefs.h"
6237 /* Override any gcc2 internal prototype to avoid an error.  */
6238 /* We use char because int might match the return type of a gcc2
6239     builtin and then its argument prototype would still apply.  */
6240 char IceConnectionNumber();
6241
6242 int main() {
6243 IceConnectionNumber()
6244 ; return 0; }
6245 EOF
6246 if { (eval echo configure:6247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6247   rm -rf conftest*
6248   eval "ac_cv_lib_$ac_lib_var=yes"
6249 else
6250   echo "configure: failed program was:" >&5
6251   cat conftest.$ac_ext >&5
6252   rm -rf conftest*
6253   eval "ac_cv_lib_$ac_lib_var=no"
6254 fi
6255 rm -f conftest*
6256 xe_check_libs=""
6257
6258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6259   echo "$ac_t""yes" 1>&6
6260   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6261 else
6262   echo "$ac_t""no" 1>&6
6263 fi
6264
6265
6266   LDFLAGS="$ac_save_LDFLAGS"
6267
6268 fi
6269  # Autoconf claims to find X library and include dirs for us.
6270   if test "$no_x" = "yes"
6271   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6272   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6273   fi
6274 fi
6275
6276
6277 if test "$with_x11" = "yes"; then
6278   { test "$extra_verbose" = "yes" && cat << \EOF
6279     Defining HAVE_X_WINDOWS
6280 EOF
6281 cat >> confdefs.h <<\EOF
6282 #define HAVE_X_WINDOWS 1
6283 EOF
6284 }
6285
6286   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6287   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6288
6289       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6290     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6291     if test -d "$lib_dir" -a -d "$inc_dir"; then
6292       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6293         x_libraries="$lib_dir $x_libraries"
6294         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6295       esac
6296       case "$x_includes" in "$inc_dir"* ) ;; *)
6297         x_includes="$inc_dir $x_includes"
6298         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6299       esac
6300       break;       fi
6301   done
6302
6303     for rel in "X11R6" "X11R5" "X11R4"; do
6304     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6305     if test -d "$lib_dir" -a -d "$inc_dir"; then
6306       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6307         x_libraries="$x_libraries $lib_dir"
6308         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6309       esac
6310       case "$x_includes" in "$inc_dir"* ) ;; *)
6311         x_includes="$x_includes $inc_dir"
6312         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6313       esac
6314       break;     fi
6315   done
6316
6317     case "$opsys" in
6318   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 ;;
6319   esac
6320
6321   ld_switch_x_site="$X_LIBS"
6322
6323   
6324 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6325     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6326   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6327   
6328         runpath="" runpath_dirs=""
6329   if test -n "$LD_RUN_PATH"; then
6330     runpath="$LD_RUN_PATH"
6331   elif test "$GCC" = "yes"; then
6332         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6333     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6334     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6335     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6336       case "$arg" in P,* | -L* | -R* )
6337         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6338           {
6339 xe_runpath_dir="$dir"
6340   test "$xe_runpath_dir" != "/lib"     -a \
6341         "$xe_runpath_dir" != "/usr/lib" -a \
6342         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6343   eval "$xe_add_unique_runpath_dir"
6344 }
6345         done ;;
6346       esac
6347     done
6348     ld_switch_run="$ld_switch_run_save"
6349     rm -f conftest*
6350   else
6351         for arg in $ld_switch_site $ld_switch_x_site; do
6352       case "$arg" in -L*) {
6353 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6354   test "$xe_runpath_dir" != "/lib"     -a \
6355         "$xe_runpath_dir" != "/usr/lib" -a \
6356         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6357   eval "$xe_add_unique_runpath_dir"
6358 };; esac
6359     done
6360         if test "$opsys $need_motif" = "sol2 yes"; then
6361       xe_runpath_dir="/opt/SUNWdt/lib";
6362       eval "$xe_add_unique_runpath_dir";
6363     fi
6364   fi 
6365   if test -n "$runpath"; then
6366     ld_switch_run="${dash_r}${runpath}"
6367     
6368 if test "$GCC" = "yes"; then
6369   set x $ld_switch_run; shift; ld_switch_run=""
6370   while test -n "$1"; do
6371     case $1 in
6372       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6373       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6374       -Xlinker* ) ;;
6375       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6376     esac
6377     shift
6378   done
6379 fi
6380     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6381   fi
6382 fi
6383
6384
6385   if test "$extra_verbose" = "yes"; then
6386     echo; echo "X11 compilation variables:"
6387     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6388     echo
6389   fi
6390
6391             bitmapdirs=
6392   if test "$x_includes" != NONE; then
6393     for i in $x_includes; do
6394       if test -d "$i/bitmaps"; then
6395         bitmapdirs="$i/bitmaps:$bitmapdirs"
6396       fi
6397       if test -d "$i/X11/bitmaps"; then
6398         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6399       fi
6400     done
6401     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6402   fi
6403   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6404     Defining BITMAPDIR = "$bitmapdirs"
6405 EOF
6406 cat >> confdefs.h <<EOF
6407 #define BITMAPDIR "$bitmapdirs"
6408 EOF
6409 }
6410
6411
6412     echo "checking for X defines extracted by xmkmf" 1>&6
6413 echo "configure:6414: checking for X defines extracted by xmkmf" >&5
6414   rm -fr conftestdir
6415   if mkdir conftestdir; then
6416     cd conftestdir
6417     cat > Imakefile <<'EOF'
6418 xetest:
6419         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6420 EOF
6421     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6422       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6423       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6424     fi
6425     cd ..
6426     rm -fr conftestdir
6427     for word in $xmkmf_defines; do
6428       case "$word" in 
6429       -D__STDC__*) ;;
6430       -D* )
6431         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6432         case "$word" in
6433           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6434           *     ) val=1 ;;
6435         esac
6436         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6437           if test "$val" = "1"
6438             then { test "$extra_verbose" = "yes" && cat << EOF
6439     Defining $sym
6440 EOF
6441 cat >> confdefs.h <<EOF
6442 #define $sym 1
6443 EOF
6444 }
6445
6446             else { test "$extra_verbose" = "yes" && cat << EOF
6447     Defining $sym = $val
6448 EOF
6449 cat >> confdefs.h <<EOF
6450 #define $sym $val
6451 EOF
6452 }
6453
6454           fi
6455         fi  ;;
6456       esac
6457     done
6458   fi
6459
6460     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6461 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6462 echo "configure:6463: checking for X11/Intrinsic.h" >&5
6463
6464 cat > conftest.$ac_ext <<EOF
6465 #line 6466 "configure"
6466 #include "confdefs.h"
6467 #include <X11/Intrinsic.h>
6468 EOF
6469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6470 { (eval echo configure:6471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6472 if test -z "$ac_err"; then
6473   rm -rf conftest*
6474   eval "ac_cv_header_$ac_safe=yes"
6475 else
6476   echo "$ac_err" >&5
6477   echo "configure: failed program was:" >&5
6478   cat conftest.$ac_ext >&5
6479   rm -rf conftest*
6480   eval "ac_cv_header_$ac_safe=no"
6481 fi
6482 rm -f conftest*
6483 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6484   echo "$ac_t""yes" 1>&6
6485   :
6486 else
6487   echo "$ac_t""no" 1>&6
6488 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6489 fi
6490
6491
6492       
6493 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6494 echo "configure:6495: checking for XOpenDisplay in -lX11" >&5
6495 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6496
6497 xe_check_libs=" -lX11 "
6498 cat > conftest.$ac_ext <<EOF
6499 #line 6500 "configure"
6500 #include "confdefs.h"
6501 /* Override any gcc2 internal prototype to avoid an error.  */
6502 /* We use char because int might match the return type of a gcc2
6503     builtin and then its argument prototype would still apply.  */
6504 char XOpenDisplay();
6505
6506 int main() {
6507 XOpenDisplay()
6508 ; return 0; }
6509 EOF
6510 if { (eval echo configure:6511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6511   rm -rf conftest*
6512   eval "ac_cv_lib_$ac_lib_var=yes"
6513 else
6514   echo "configure: failed program was:" >&5
6515   cat conftest.$ac_ext >&5
6516   rm -rf conftest*
6517   eval "ac_cv_lib_$ac_lib_var=no"
6518 fi
6519 rm -f conftest*
6520 xe_check_libs=""
6521
6522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6523   echo "$ac_t""yes" 1>&6
6524   have_lib_x11=yes
6525 else
6526   echo "$ac_t""no" 1>&6
6527 fi
6528
6529
6530   if test "$have_lib_x11" != "yes"; then
6531     
6532 xe_msg_checking="for XGetFontProperty in -lX11"
6533 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6534 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6535 echo "configure:6536: checking "$xe_msg_checking"" >&5
6536 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6537
6538 xe_check_libs=" -lX11 -b i486-linuxaout"
6539 cat > conftest.$ac_ext <<EOF
6540 #line 6541 "configure"
6541 #include "confdefs.h"
6542 /* Override any gcc2 internal prototype to avoid an error.  */
6543 /* We use char because int might match the return type of a gcc2
6544     builtin and then its argument prototype would still apply.  */
6545 char XGetFontProperty();
6546
6547 int main() {
6548 XGetFontProperty()
6549 ; return 0; }
6550 EOF
6551 if { (eval echo configure:6552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6552   rm -rf conftest*
6553   eval "ac_cv_lib_$ac_lib_var=yes"
6554 else
6555   echo "configure: failed program was:" >&5
6556   cat conftest.$ac_ext >&5
6557   rm -rf conftest*
6558   eval "ac_cv_lib_$ac_lib_var=no"
6559 fi
6560 rm -f conftest*
6561 xe_check_libs=""
6562
6563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6564   echo "$ac_t""yes" 1>&6
6565   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6566 else
6567   echo "$ac_t""no" 1>&6
6568 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6569 fi
6570
6571
6572   fi
6573   libs_x="-lX11"
6574   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6575
6576     
6577 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6578 echo "configure:6579: checking for XShapeSelectInput in -lXext" >&5
6579 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6580
6581 xe_check_libs=" -lXext "
6582 cat > conftest.$ac_ext <<EOF
6583 #line 6584 "configure"
6584 #include "confdefs.h"
6585 /* Override any gcc2 internal prototype to avoid an error.  */
6586 /* We use char because int might match the return type of a gcc2
6587     builtin and then its argument prototype would still apply.  */
6588 char XShapeSelectInput();
6589
6590 int main() {
6591 XShapeSelectInput()
6592 ; return 0; }
6593 EOF
6594 if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6595   rm -rf conftest*
6596   eval "ac_cv_lib_$ac_lib_var=yes"
6597 else
6598   echo "configure: failed program was:" >&5
6599   cat conftest.$ac_ext >&5
6600   rm -rf conftest*
6601   eval "ac_cv_lib_$ac_lib_var=no"
6602 fi
6603 rm -f conftest*
6604 xe_check_libs=""
6605
6606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6607   echo "$ac_t""yes" 1>&6
6608   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6609 else
6610   echo "$ac_t""no" 1>&6
6611 fi
6612
6613
6614
6615     
6616 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6617 echo "configure:6618: checking for XtOpenDisplay in -lXt" >&5
6618 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6619
6620 xe_check_libs=" -lXt "
6621 cat > conftest.$ac_ext <<EOF
6622 #line 6623 "configure"
6623 #include "confdefs.h"
6624 /* Override any gcc2 internal prototype to avoid an error.  */
6625 /* We use char because int might match the return type of a gcc2
6626     builtin and then its argument prototype would still apply.  */
6627 char XtOpenDisplay();
6628
6629 int main() {
6630 XtOpenDisplay()
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6634   rm -rf conftest*
6635   eval "ac_cv_lib_$ac_lib_var=yes"
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   eval "ac_cv_lib_$ac_lib_var=no"
6641 fi
6642 rm -f conftest*
6643 xe_check_libs=""
6644
6645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6646   echo "$ac_t""yes" 1>&6
6647   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6648 else
6649   echo "$ac_t""no" 1>&6
6650 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6651 fi
6652
6653
6654
6655   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6656 echo "configure:6657: checking the version of X11 being used" >&5
6657   cat > conftest.$ac_ext <<EOF
6658 #line 6659 "configure"
6659 #include "confdefs.h"
6660 #include <X11/Intrinsic.h>
6661     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6662 EOF
6663 if { (eval echo configure:6664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6664 then
6665   ./conftest foobar; x11_release=$?
6666 else
6667   conftest_rc="$?"
6668   echo "configure: failed program was:" >&5
6669   cat conftest.$ac_ext >&5
6670   rm -fr conftest*
6671   x11_release=4
6672 fi
6673 rm -fr conftest*
6674   echo "$ac_t""R${x11_release}" 1>&6
6675   { test "$extra_verbose" = "yes" && cat << EOF
6676     Defining THIS_IS_X11R${x11_release}
6677 EOF
6678 cat >> confdefs.h <<EOF
6679 #define THIS_IS_X11R${x11_release} 1
6680 EOF
6681 }
6682
6683
6684   if test "${x11_release}" = "4"; then
6685     case "$with_widgets" in
6686       "" | "no") with_widgets=no ;;
6687       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6688     esac
6689   fi
6690
6691   for ac_func in XConvertCase
6692 do
6693 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6694 echo "configure:6695: checking for $ac_func" >&5
6695
6696 cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 /* System header to define __stub macros and hopefully few prototypes,
6700     which can conflict with char $ac_func(); below.  */
6701 #include <assert.h>
6702 /* Override any gcc2 internal prototype to avoid an error.  */
6703 /* We use char because int might match the return type of a gcc2
6704     builtin and then its argument prototype would still apply.  */
6705 char $ac_func();
6706
6707 int main() {
6708
6709 /* The GNU C library defines this for functions which it implements
6710     to always fail with ENOSYS.  Some functions are actually named
6711     something starting with __ and the normal name is an alias.  */
6712 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6713 choke me
6714 #else
6715 $ac_func();
6716 #endif
6717
6718 ; return 0; }
6719 EOF
6720 if { (eval echo configure:6721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6721   rm -rf conftest*
6722   eval "ac_cv_func_$ac_func=yes"
6723 else
6724   echo "configure: failed program was:" >&5
6725   cat conftest.$ac_ext >&5
6726   rm -rf conftest*
6727   eval "ac_cv_func_$ac_func=no"
6728 fi
6729 rm -f conftest*
6730
6731 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6732   echo "$ac_t""yes" 1>&6
6733     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6734   { test "$extra_verbose" = "yes" && cat << EOF
6735     Defining $ac_tr_func
6736 EOF
6737 cat >> confdefs.h <<EOF
6738 #define $ac_tr_func 1
6739 EOF
6740 }
6741  
6742 else
6743   echo "$ac_t""no" 1>&6
6744 fi
6745 done
6746
6747
6748   for ac_hdr in X11/Xlocale.h
6749 do
6750 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6751 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6752 echo "configure:6753: checking for $ac_hdr" >&5
6753
6754 cat > conftest.$ac_ext <<EOF
6755 #line 6756 "configure"
6756 #include "confdefs.h"
6757 #include <$ac_hdr>
6758 EOF
6759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6760 { (eval echo configure:6761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6762 if test -z "$ac_err"; then
6763   rm -rf conftest*
6764   eval "ac_cv_header_$ac_safe=yes"
6765 else
6766   echo "$ac_err" >&5
6767   echo "configure: failed program was:" >&5
6768   cat conftest.$ac_ext >&5
6769   rm -rf conftest*
6770   eval "ac_cv_header_$ac_safe=no"
6771 fi
6772 rm -f conftest*
6773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6774   echo "$ac_t""yes" 1>&6
6775     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6776   { test "$extra_verbose" = "yes" && cat << EOF
6777     Defining $ac_tr_hdr
6778 EOF
6779 cat >> confdefs.h <<EOF
6780 #define $ac_tr_hdr 1
6781 EOF
6782 }
6783  
6784 else
6785   echo "$ac_t""no" 1>&6
6786 fi
6787 done
6788
6789
6790     for ac_func in XRegisterIMInstantiateCallback
6791 do
6792 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6793 echo "configure:6794: checking for $ac_func" >&5
6794
6795 cat > conftest.$ac_ext <<EOF
6796 #line 6797 "configure"
6797 #include "confdefs.h"
6798 /* System header to define __stub macros and hopefully few prototypes,
6799     which can conflict with char $ac_func(); below.  */
6800 #include <assert.h>
6801 /* Override any gcc2 internal prototype to avoid an error.  */
6802 /* We use char because int might match the return type of a gcc2
6803     builtin and then its argument prototype would still apply.  */
6804 char $ac_func();
6805
6806 int main() {
6807
6808 /* The GNU C library defines this for functions which it implements
6809     to always fail with ENOSYS.  Some functions are actually named
6810     something starting with __ and the normal name is an alias.  */
6811 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6812 choke me
6813 #else
6814 $ac_func();
6815 #endif
6816
6817 ; return 0; }
6818 EOF
6819 if { (eval echo configure:6820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6820   rm -rf conftest*
6821   eval "ac_cv_func_$ac_func=yes"
6822 else
6823   echo "configure: failed program was:" >&5
6824   cat conftest.$ac_ext >&5
6825   rm -rf conftest*
6826   eval "ac_cv_func_$ac_func=no"
6827 fi
6828 rm -f conftest*
6829
6830 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6831   echo "$ac_t""yes" 1>&6
6832     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6833   { test "$extra_verbose" = "yes" && cat << EOF
6834     Defining $ac_tr_func
6835 EOF
6836 cat >> confdefs.h <<EOF
6837 #define $ac_tr_func 1
6838 EOF
6839 }
6840  
6841 else
6842   echo "$ac_t""no" 1>&6
6843 fi
6844 done
6845
6846   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6847 echo "configure:6848: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6848   cat > conftest.$ac_ext <<EOF
6849 #line 6850 "configure"
6850 #include "confdefs.h"
6851
6852 #define NeedFunctionPrototypes 1
6853 #include <X11/Xlib.h>
6854 extern Bool XRegisterIMInstantiateCallback(
6855    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6856
6857 int main() {
6858
6859 ; return 0; }
6860 EOF
6861 if { (eval echo configure:6862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6862   rm -rf conftest*
6863   echo "$ac_t""yes" 1>&6
6864 else
6865   echo "configure: failed program was:" >&5
6866   cat conftest.$ac_ext >&5
6867   rm -rf conftest*
6868   echo "$ac_t""no" 1>&6
6869    { test "$extra_verbose" = "yes" && cat << \EOF
6870     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6871 EOF
6872 cat >> confdefs.h <<\EOF
6873 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6874 EOF
6875 }
6876
6877 fi
6878 rm -f conftest*
6879
6880     test -z "$with_xmu" && { 
6881 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6882 echo "configure:6883: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6883 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6884
6885 xe_check_libs=" -lXmu "
6886 cat > conftest.$ac_ext <<EOF
6887 #line 6888 "configure"
6888 #include "confdefs.h"
6889 /* Override any gcc2 internal prototype to avoid an error.  */
6890 /* We use char because int might match the return type of a gcc2
6891     builtin and then its argument prototype would still apply.  */
6892 char XmuReadBitmapDataFromFile();
6893
6894 int main() {
6895 XmuReadBitmapDataFromFile()
6896 ; return 0; }
6897 EOF
6898 if { (eval echo configure:6899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6899   rm -rf conftest*
6900   eval "ac_cv_lib_$ac_lib_var=yes"
6901 else
6902   echo "configure: failed program was:" >&5
6903   cat conftest.$ac_ext >&5
6904   rm -rf conftest*
6905   eval "ac_cv_lib_$ac_lib_var=no"
6906 fi
6907 rm -f conftest*
6908 xe_check_libs=""
6909
6910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6911   echo "$ac_t""yes" 1>&6
6912   with_xmu=yes
6913 else
6914   echo "$ac_t""no" 1>&6
6915 with_xmu=no
6916 fi
6917
6918  }
6919   if test "$with_xmu" = "no"; then
6920     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6921    echo "    xemacs will be linked with \"xmu.o\""
6922  fi
6923   else
6924     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6925     { test "$extra_verbose" = "yes" && cat << \EOF
6926     Defining HAVE_XMU
6927 EOF
6928 cat >> confdefs.h <<\EOF
6929 #define HAVE_XMU 1
6930 EOF
6931 }
6932
6933   fi
6934
6935       
6936 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6937 echo "configure:6938: checking for main in -lXbsd" >&5
6938 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6939
6940 xe_check_libs=" -lXbsd "
6941 cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944
6945 int main() {
6946 main()
6947 ; return 0; }
6948 EOF
6949 if { (eval echo configure:6950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6950   rm -rf conftest*
6951   eval "ac_cv_lib_$ac_lib_var=yes"
6952 else
6953   echo "configure: failed program was:" >&5
6954   cat conftest.$ac_ext >&5
6955   rm -rf conftest*
6956   eval "ac_cv_lib_$ac_lib_var=no"
6957 fi
6958 rm -f conftest*
6959 xe_check_libs=""
6960
6961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6962   echo "$ac_t""yes" 1>&6
6963   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6964 else
6965   echo "$ac_t""no" 1>&6
6966 fi
6967
6968
6969
6970     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6971         if test "$GCC" = "yes"; then
6972       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6973       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6974     else
6975       case "$CC" in
6976         "xlc" ) CC="xlc_r" ;;
6977         "xlC" ) CC="xlC_r" ;;
6978         "cc"  ) CC="cc_r" ;;
6979       esac
6980     fi
6981   fi
6982
6983 fi 
6984 if test "$with_msw" != "no"; then
6985   echo "checking for MS-Windows" 1>&6
6986 echo "configure:6987: checking for MS-Windows" >&5
6987   
6988 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6989 echo "configure:6990: checking for main in -lgdi32" >&5
6990 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6991
6992 xe_check_libs=" -lgdi32 "
6993 cat > conftest.$ac_ext <<EOF
6994 #line 6995 "configure"
6995 #include "confdefs.h"
6996
6997 int main() {
6998 main()
6999 ; return 0; }
7000 EOF
7001 if { (eval echo configure:7002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7002   rm -rf conftest*
7003   eval "ac_cv_lib_$ac_lib_var=yes"
7004 else
7005   echo "configure: failed program was:" >&5
7006   cat conftest.$ac_ext >&5
7007   rm -rf conftest*
7008   eval "ac_cv_lib_$ac_lib_var=no"
7009 fi
7010 rm -f conftest*
7011 xe_check_libs=""
7012
7013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7014   echo "$ac_t""yes" 1>&6
7015   with_msw=yes
7016 else
7017   echo "$ac_t""no" 1>&6
7018 fi
7019
7020
7021   if test "$with_msw" = "yes"; then
7022     { test "$extra_verbose" = "yes" && cat << \EOF
7023     Defining HAVE_MS_WINDOWS
7024 EOF
7025 cat >> confdefs.h <<\EOF
7026 #define HAVE_MS_WINDOWS 1
7027 EOF
7028 }
7029
7030
7031         if test "$with_netinstall" = "yes"; then
7032       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7033       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7034       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7035     fi
7036
7037     install_pp="$blddir/lib-src/installexe.sh"
7038     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
7039     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7040     if test "$window_system" != x11; then
7041         window_system=msw
7042         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7043             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7044    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7045  fi
7046         test "$with_menubars"   != "no" && with_menubars=msw \
7047             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7048    echo "    xemacs will be linked with \"menubar-msw.o\""
7049  fi
7050         test "$with_toolbars"   != "no" && with_toolbars=msw \
7051             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7052    echo "    xemacs will be linked with \"toolbar-msw.o\""
7053  fi
7054         test "$with_dialogs"   != "no" && with_dialogs=msw \
7055             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7056    echo "    xemacs will be linked with \"dialog-msw.o\""
7057  fi
7058         test "$with_widgets"   != "no" && with_widgets=msw
7059     else
7060         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7061    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7062  fi
7063         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7064    echo "    xemacs will be linked with \"menubar-msw.o\""
7065  fi
7066         test "$with_toolbars"   != "no" && 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" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7070    echo "    xemacs will be linked with \"dialog-msw.o\""
7071  fi
7072     fi
7073         cat > conftest.$ac_ext <<EOF
7074 #line 7075 "configure"
7075 #include "confdefs.h"
7076 #include <fcntl.h>
7077     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7078 EOF
7079 if { (eval echo configure:7080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7080 then
7081   { test "$extra_verbose" = "yes" && cat << \EOF
7082     Defining HAVE_MSG_SELECT
7083 EOF
7084 cat >> confdefs.h <<\EOF
7085 #define HAVE_MSG_SELECT 1
7086 EOF
7087 }
7088
7089 else
7090   conftest_rc="$?"
7091   echo "configure: failed program was:" >&5
7092   cat conftest.$ac_ext >&5
7093 fi
7094 rm -fr conftest*
7095     with_file_coding=yes
7096     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
7097    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\""
7098  fi
7099   fi
7100 fi
7101
7102
7103
7104 test -z "$window_system" && window_system="none"
7105
7106 if test "$window_system" = "none"; then
7107   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7108   do
7109     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7110        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7111     fi
7112     eval "with_${feature}=no"
7113   done
7114 else
7115   test -z "$with_toolbars" && with_toolbars=yes
7116 fi
7117
7118 if test "$with_msw" != "yes"; then
7119   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7120   do
7121     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7122        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7123     fi
7124     eval "with_${feature}=no"
7125   done
7126 else
7127   :
7128 fi
7129
7130 if test "$with_x11" != "yes"; then
7131             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7132   do
7133     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7134        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7135     fi
7136     eval "with_${feature}=no"
7137   done
7138 fi
7139
7140 if test "$with_x11" = "yes"; then
7141   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7142 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7143 echo "configure:7144: checking for X11/extensions/shape.h" >&5
7144
7145 cat > conftest.$ac_ext <<EOF
7146 #line 7147 "configure"
7147 #include "confdefs.h"
7148 #include <X11/extensions/shape.h>
7149 EOF
7150 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7151 { (eval echo configure:7152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7152 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7153 if test -z "$ac_err"; then
7154   rm -rf conftest*
7155   eval "ac_cv_header_$ac_safe=yes"
7156 else
7157   echo "$ac_err" >&5
7158   echo "configure: failed program was:" >&5
7159   cat conftest.$ac_ext >&5
7160   rm -rf conftest*
7161   eval "ac_cv_header_$ac_safe=no"
7162 fi
7163 rm -f conftest*
7164 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7165   echo "$ac_t""yes" 1>&6
7166   
7167    { test "$extra_verbose" = "yes" && cat << \EOF
7168     Defining HAVE_BALLOON_HELP
7169 EOF
7170 cat >> confdefs.h <<\EOF
7171 #define HAVE_BALLOON_HELP 1
7172 EOF
7173 }
7174
7175    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7176    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7177  fi
7178 else
7179   echo "$ac_t""no" 1>&6
7180 fi
7181
7182 fi
7183
7184 bitmapdir=
7185
7186 case "$window_system" in
7187   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7188   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7189   gtk  )
7190        HAVE_X_WINDOWS=no
7191        test "$with_gnome" = "yes" && echo "  Using GNOME."
7192        test "$with_gnome" = "no" && echo "  Using GTK."
7193        ;;
7194   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7195 esac
7196
7197 case "$x_libraries" in *X11R4* )
7198   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7199   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7200 esac
7201
7202 echo "checking for WM_COMMAND option" 1>&6
7203 echo "configure:7204: checking for WM_COMMAND option" >&5;
7204 if test "$with_wmcommand" != "no"; then
7205   { test "$extra_verbose" = "yes" && cat << \EOF
7206     Defining HAVE_WMCOMMAND
7207 EOF
7208 cat >> confdefs.h <<\EOF
7209 #define HAVE_WMCOMMAND 1
7210 EOF
7211 }
7212
7213 fi
7214
7215 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7216 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7217 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7218 echo "configure:7219: checking for X11/Xauth.h" >&5
7219
7220 cat > conftest.$ac_ext <<EOF
7221 #line 7222 "configure"
7222 #include "confdefs.h"
7223 #include <X11/Xauth.h>
7224 EOF
7225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7226 { (eval echo configure:7227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7228 if test -z "$ac_err"; then
7229   rm -rf conftest*
7230   eval "ac_cv_header_$ac_safe=yes"
7231 else
7232   echo "$ac_err" >&5
7233   echo "configure: failed program was:" >&5
7234   cat conftest.$ac_ext >&5
7235   rm -rf conftest*
7236   eval "ac_cv_header_$ac_safe=no"
7237 fi
7238 rm -f conftest*
7239 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7240   echo "$ac_t""yes" 1>&6
7241   :
7242 else
7243   echo "$ac_t""no" 1>&6
7244 with_xauth=no
7245 fi
7246  }
7247 test -z "$with_xauth" && { 
7248 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7249 echo "configure:7250: checking for XauGetAuthByAddr in -lXau" >&5
7250 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7251
7252 xe_check_libs=" -lXau "
7253 cat > conftest.$ac_ext <<EOF
7254 #line 7255 "configure"
7255 #include "confdefs.h"
7256 /* Override any gcc2 internal prototype to avoid an error.  */
7257 /* We use char because int might match the return type of a gcc2
7258     builtin and then its argument prototype would still apply.  */
7259 char XauGetAuthByAddr();
7260
7261 int main() {
7262 XauGetAuthByAddr()
7263 ; return 0; }
7264 EOF
7265 if { (eval echo configure:7266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7266   rm -rf conftest*
7267   eval "ac_cv_lib_$ac_lib_var=yes"
7268 else
7269   echo "configure: failed program was:" >&5
7270   cat conftest.$ac_ext >&5
7271   rm -rf conftest*
7272   eval "ac_cv_lib_$ac_lib_var=no"
7273 fi
7274 rm -f conftest*
7275 xe_check_libs=""
7276
7277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7278   echo "$ac_t""yes" 1>&6
7279   :
7280 else
7281   echo "$ac_t""no" 1>&6
7282 with_xauth=no
7283 fi
7284
7285  }
7286 test -z "$with_xauth" && with_xauth=yes
7287 if test "$with_xauth" = "yes"; then
7288   { test "$extra_verbose" = "yes" && cat << \EOF
7289     Defining HAVE_XAUTH
7290 EOF
7291 cat >> confdefs.h <<\EOF
7292 #define HAVE_XAUTH 1
7293 EOF
7294 }
7295
7296   
7297 T=""
7298 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
7299 libs_xauth="$T"
7300
7301 fi
7302
7303
7304
7305
7306 if test "$with_tooltalk" != "no" ; then
7307       for dir in "" "Tt/" "desktop/" ; do
7308     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7309 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7310 echo "configure:7311: checking for ${dir}tt_c.h" >&5
7311
7312 cat > conftest.$ac_ext <<EOF
7313 #line 7314 "configure"
7314 #include "confdefs.h"
7315 #include <${dir}tt_c.h>
7316 EOF
7317 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7318 { (eval echo configure:7319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7319 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7320 if test -z "$ac_err"; then
7321   rm -rf conftest*
7322   eval "ac_cv_header_$ac_safe=yes"
7323 else
7324   echo "$ac_err" >&5
7325   echo "configure: failed program was:" >&5
7326   cat conftest.$ac_ext >&5
7327   rm -rf conftest*
7328   eval "ac_cv_header_$ac_safe=no"
7329 fi
7330 rm -f conftest*
7331 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7332   echo "$ac_t""yes" 1>&6
7333   tt_c_h_file="${dir}tt_c.h"; break
7334 else
7335   echo "$ac_t""no" 1>&6
7336 fi
7337
7338   done
7339   if test -z "$tt_c_h_file"; then
7340     if test "$with_tooltalk" = "yes"; then
7341       (echo "$progname: Usage error:"
7342 echo " " "Unable to find required tooltalk header files."
7343 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7344     fi
7345     with_tooltalk=no
7346   fi
7347 fi
7348 if test "$with_tooltalk" != "no" ; then
7349   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7350     
7351 xe_msg_checking="for tt_message_create in -ltt"
7352 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7353 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7354 echo "configure:7355: checking "$xe_msg_checking"" >&5
7355 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7356
7357 xe_check_libs=" -ltt $extra_libs"
7358 cat > conftest.$ac_ext <<EOF
7359 #line 7360 "configure"
7360 #include "confdefs.h"
7361 /* Override any gcc2 internal prototype to avoid an error.  */
7362 /* We use char because int might match the return type of a gcc2
7363     builtin and then its argument prototype would still apply.  */
7364 char tt_message_create();
7365
7366 int main() {
7367 tt_message_create()
7368 ; return 0; }
7369 EOF
7370 if { (eval echo configure:7371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7371   rm -rf conftest*
7372   eval "ac_cv_lib_$ac_lib_var=yes"
7373 else
7374   echo "configure: failed program was:" >&5
7375   cat conftest.$ac_ext >&5
7376   rm -rf conftest*
7377   eval "ac_cv_lib_$ac_lib_var=no"
7378 fi
7379 rm -f conftest*
7380 xe_check_libs=""
7381
7382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7383   echo "$ac_t""yes" 1>&6
7384   tt_libs="-ltt $extra_libs"; break
7385 else
7386   echo "$ac_t""no" 1>&6
7387 :
7388 fi
7389
7390
7391   done
7392   if test -z "$tt_libs"; then
7393     if test "$with_tooltalk" = "yes"; then
7394       (echo "$progname: Usage error:"
7395 echo " " "Unable to find required tooltalk libraries."
7396 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7397     fi
7398     with_tooltalk=no
7399   fi
7400 fi
7401 test -z "$with_tooltalk" && with_tooltalk=yes
7402 if test "$with_tooltalk" = "yes"; then
7403   { test "$extra_verbose" = "yes" && cat << \EOF
7404     Defining TOOLTALK
7405 EOF
7406 cat >> confdefs.h <<\EOF
7407 #define TOOLTALK 1
7408 EOF
7409 }
7410
7411   { test "$extra_verbose" = "yes" && cat << EOF
7412     Defining TT_C_H_FILE = "$tt_c_h_file"
7413 EOF
7414 cat >> confdefs.h <<EOF
7415 #define TT_C_H_FILE "$tt_c_h_file"
7416 EOF
7417 }
7418
7419   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7420   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7421    echo "    xemacs will be linked with \"tooltalk.o\""
7422  fi
7423 fi
7424
7425 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7426 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7427 echo "configure:7428: checking for Dt/Dt.h" >&5
7428
7429 cat > conftest.$ac_ext <<EOF
7430 #line 7431 "configure"
7431 #include "confdefs.h"
7432 #include <Dt/Dt.h>
7433 EOF
7434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7435 { (eval echo configure:7436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7437 if test -z "$ac_err"; then
7438   rm -rf conftest*
7439   eval "ac_cv_header_$ac_safe=yes"
7440 else
7441   echo "$ac_err" >&5
7442   echo "configure: failed program was:" >&5
7443   cat conftest.$ac_ext >&5
7444   rm -rf conftest*
7445   eval "ac_cv_header_$ac_safe=no"
7446 fi
7447 rm -f conftest*
7448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7449   echo "$ac_t""yes" 1>&6
7450   :
7451 else
7452   echo "$ac_t""no" 1>&6
7453 with_cde=no
7454 fi
7455  }
7456 test -z "$with_cde" && { 
7457 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7458 echo "configure:7459: checking for DtDndDragStart in -lDtSvc" >&5
7459 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7460
7461 xe_check_libs=" -lDtSvc "
7462 cat > conftest.$ac_ext <<EOF
7463 #line 7464 "configure"
7464 #include "confdefs.h"
7465 /* Override any gcc2 internal prototype to avoid an error.  */
7466 /* We use char because int might match the return type of a gcc2
7467     builtin and then its argument prototype would still apply.  */
7468 char DtDndDragStart();
7469
7470 int main() {
7471 DtDndDragStart()
7472 ; return 0; }
7473 EOF
7474 if { (eval echo configure:7475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7475   rm -rf conftest*
7476   eval "ac_cv_lib_$ac_lib_var=yes"
7477 else
7478   echo "configure: failed program was:" >&5
7479   cat conftest.$ac_ext >&5
7480   rm -rf conftest*
7481   eval "ac_cv_lib_$ac_lib_var=no"
7482 fi
7483 rm -f conftest*
7484 xe_check_libs=""
7485
7486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7487   echo "$ac_t""yes" 1>&6
7488   :
7489 else
7490   echo "$ac_t""no" 1>&6
7491 with_cde=no
7492 fi
7493
7494  }
7495 test -z "$with_cde" && with_cde=yes
7496 if test "$with_dragndrop" = no; then
7497   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7498   with_cde=no
7499 fi
7500 if test "$with_cde" = "yes" ; then
7501   { test "$extra_verbose" = "yes" && cat << \EOF
7502     Defining HAVE_CDE
7503 EOF
7504 cat >> confdefs.h <<\EOF
7505 #define HAVE_CDE 1
7506 EOF
7507 }
7508
7509   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7510   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7511   with_tooltalk=yes # CDE requires Tooltalk
7512   need_motif=yes    # CDE requires Motif
7513 fi
7514
7515 test "$window_system" != "x11" && with_offix=no
7516 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7517   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7518   with_offix=no
7519 fi
7520 if test "$with_dragndrop" = no; then
7521   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7522   with_offix=no
7523 fi
7524 if test "$with_cde" = yes; then
7525   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7526   with_offix=no
7527 fi
7528 test -z "$with_offix" && with_offix=no
7529 if test "$with_offix" = "yes"; then
7530   { test "$extra_verbose" = "yes" && cat << \EOF
7531     Defining HAVE_OFFIX_DND
7532 EOF
7533 cat >> confdefs.h <<\EOF
7534 #define HAVE_OFFIX_DND 1
7535 EOF
7536 }
7537
7538   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7539   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7540 fi
7541 if test "$with_gtk" = "yes"; then
7542    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7543 fi
7544
7545 if test "$with_dragndrop" != "no" ; then
7546   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7547 echo "configure:7548: checking if drag and drop API is needed" >&5
7548   if test -n "$dragndrop_proto" ; then
7549     with_dragndrop=yes
7550     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7551     { test "$extra_verbose" = "yes" && cat << \EOF
7552     Defining HAVE_DRAGNDROP
7553 EOF
7554 cat >> confdefs.h <<\EOF
7555 #define HAVE_DRAGNDROP 1
7556 EOF
7557 }
7558
7559     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7560   else
7561     with_dragndrop=no
7562     echo "$ac_t""no" 1>&6
7563   fi
7564 fi
7565
7566 echo "checking for LDAP" 1>&6
7567 echo "configure:7568: checking for LDAP" >&5
7568 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7569 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7570 echo "configure:7571: checking for ldap.h" >&5
7571
7572 cat > conftest.$ac_ext <<EOF
7573 #line 7574 "configure"
7574 #include "confdefs.h"
7575 #include <ldap.h>
7576 EOF
7577 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7578 { (eval echo configure:7579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7579 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7580 if test -z "$ac_err"; then
7581   rm -rf conftest*
7582   eval "ac_cv_header_$ac_safe=yes"
7583 else
7584   echo "$ac_err" >&5
7585   echo "configure: failed program was:" >&5
7586   cat conftest.$ac_ext >&5
7587   rm -rf conftest*
7588   eval "ac_cv_header_$ac_safe=no"
7589 fi
7590 rm -f conftest*
7591 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7592   echo "$ac_t""yes" 1>&6
7593   :
7594 else
7595   echo "$ac_t""no" 1>&6
7596 with_ldap=no
7597 fi
7598  }
7599 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7600 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7601 echo "configure:7602: checking for lber.h" >&5
7602
7603 cat > conftest.$ac_ext <<EOF
7604 #line 7605 "configure"
7605 #include "confdefs.h"
7606 #include <lber.h>
7607 EOF
7608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7609 { (eval echo configure:7610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7611 if test -z "$ac_err"; then
7612   rm -rf conftest*
7613   eval "ac_cv_header_$ac_safe=yes"
7614 else
7615   echo "$ac_err" >&5
7616   echo "configure: failed program was:" >&5
7617   cat conftest.$ac_ext >&5
7618   rm -rf conftest*
7619   eval "ac_cv_header_$ac_safe=no"
7620 fi
7621 rm -f conftest*
7622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7623   echo "$ac_t""yes" 1>&6
7624   :
7625 else
7626   echo "$ac_t""no" 1>&6
7627 with_ldap=no
7628 fi
7629  }
7630 if test "$with_ldap" != "no"; then
7631   
7632 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7633 echo "configure:7634: checking for ldap_search in -lldap" >&5
7634 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7635
7636 xe_check_libs=" -lldap "
7637 cat > conftest.$ac_ext <<EOF
7638 #line 7639 "configure"
7639 #include "confdefs.h"
7640 /* Override any gcc2 internal prototype to avoid an error.  */
7641 /* We use char because int might match the return type of a gcc2
7642     builtin and then its argument prototype would still apply.  */
7643 char ldap_search();
7644
7645 int main() {
7646 ldap_search()
7647 ; return 0; }
7648 EOF
7649 if { (eval echo configure:7650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7650   rm -rf conftest*
7651   eval "ac_cv_lib_$ac_lib_var=yes"
7652 else
7653   echo "configure: failed program was:" >&5
7654   cat conftest.$ac_ext >&5
7655   rm -rf conftest*
7656   eval "ac_cv_lib_$ac_lib_var=no"
7657 fi
7658 rm -f conftest*
7659 xe_check_libs=""
7660
7661 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7662   echo "$ac_t""yes" 1>&6
7663   with_ldap_nolber=yes
7664 else
7665   echo "$ac_t""no" 1>&6
7666 with_ldap_nolber=no
7667 fi
7668
7669
7670   test "$with_ldap_nolber" = "no" && { 
7671 xe_msg_checking="for ldap_open in -lldap"
7672 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7673 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7674 echo "configure:7675: checking "$xe_msg_checking"" >&5
7675 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7676
7677 xe_check_libs=" -lldap -llber"
7678 cat > conftest.$ac_ext <<EOF
7679 #line 7680 "configure"
7680 #include "confdefs.h"
7681 /* Override any gcc2 internal prototype to avoid an error.  */
7682 /* We use char because int might match the return type of a gcc2
7683     builtin and then its argument prototype would still apply.  */
7684 char ldap_open();
7685
7686 int main() {
7687 ldap_open()
7688 ; return 0; }
7689 EOF
7690 if { (eval echo configure:7691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7691   rm -rf conftest*
7692   eval "ac_cv_lib_$ac_lib_var=yes"
7693 else
7694   echo "configure: failed program was:" >&5
7695   cat conftest.$ac_ext >&5
7696   rm -rf conftest*
7697   eval "ac_cv_lib_$ac_lib_var=no"
7698 fi
7699 rm -f conftest*
7700 xe_check_libs=""
7701
7702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7703   echo "$ac_t""yes" 1>&6
7704   with_ldap_lber=yes
7705 else
7706   echo "$ac_t""no" 1>&6
7707 with_ldap_lber=no
7708 fi
7709
7710  }
7711   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7712 xe_msg_checking="for ldap_open in -lldap"
7713 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7714 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7715 echo "configure:7716: checking "$xe_msg_checking"" >&5
7716 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7717
7718 xe_check_libs=" -lldap -llber -lkrb"
7719 cat > conftest.$ac_ext <<EOF
7720 #line 7721 "configure"
7721 #include "confdefs.h"
7722 /* Override any gcc2 internal prototype to avoid an error.  */
7723 /* We use char because int might match the return type of a gcc2
7724     builtin and then its argument prototype would still apply.  */
7725 char ldap_open();
7726
7727 int main() {
7728 ldap_open()
7729 ; return 0; }
7730 EOF
7731 if { (eval echo configure:7732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7732   rm -rf conftest*
7733   eval "ac_cv_lib_$ac_lib_var=yes"
7734 else
7735   echo "configure: failed program was:" >&5
7736   cat conftest.$ac_ext >&5
7737   rm -rf conftest*
7738   eval "ac_cv_lib_$ac_lib_var=no"
7739 fi
7740 rm -f conftest*
7741 xe_check_libs=""
7742
7743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7744   echo "$ac_t""yes" 1>&6
7745   with_ldap_krb=yes
7746 else
7747   echo "$ac_t""no" 1>&6
7748 with_ldap_krb=no
7749 fi
7750
7751  }
7752   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7753 xe_msg_checking="for ldap_open in -lldap"
7754 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7755 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7756 echo "configure:7757: checking "$xe_msg_checking"" >&5
7757 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7758
7759 xe_check_libs=" -lldap -llber -lkrb -ldes"
7760 cat > conftest.$ac_ext <<EOF
7761 #line 7762 "configure"
7762 #include "confdefs.h"
7763 /* Override any gcc2 internal prototype to avoid an error.  */
7764 /* We use char because int might match the return type of a gcc2
7765     builtin and then its argument prototype would still apply.  */
7766 char ldap_open();
7767
7768 int main() {
7769 ldap_open()
7770 ; return 0; }
7771 EOF
7772 if { (eval echo configure:7773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7773   rm -rf conftest*
7774   eval "ac_cv_lib_$ac_lib_var=yes"
7775 else
7776   echo "configure: failed program was:" >&5
7777   cat conftest.$ac_ext >&5
7778   rm -rf conftest*
7779   eval "ac_cv_lib_$ac_lib_var=no"
7780 fi
7781 rm -f conftest*
7782 xe_check_libs=""
7783
7784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7785   echo "$ac_t""yes" 1>&6
7786   with_ldap_krbdes=yes
7787 else
7788   echo "$ac_t""no" 1>&6
7789 with_ldap_krbdes=no
7790 fi
7791
7792  }
7793   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
7794 fi
7795 if test "$with_ldap" = "yes"; then
7796   { test "$extra_verbose" = "yes" && cat << \EOF
7797     Defining HAVE_LDAP
7798 EOF
7799 cat >> confdefs.h <<\EOF
7800 #define HAVE_LDAP 1
7801 EOF
7802 }
7803
7804   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7805    echo "    xemacs will be linked with \"eldap.o\""
7806  fi
7807   if test "$with_ldap_nolber" = "yes" ; then
7808     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7809   else
7810     if test "$with_ldap_krb" = "yes" ; then
7811       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7812     fi
7813     if test "$with_ldap_krbdes" = "yes" ; then
7814       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7815       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7816     fi
7817     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7818     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7819   fi
7820   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7821 do
7822 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7823 echo "configure:7824: checking for $ac_func" >&5
7824
7825 cat > conftest.$ac_ext <<EOF
7826 #line 7827 "configure"
7827 #include "confdefs.h"
7828 /* System header to define __stub macros and hopefully few prototypes,
7829     which can conflict with char $ac_func(); below.  */
7830 #include <assert.h>
7831 /* Override any gcc2 internal prototype to avoid an error.  */
7832 /* We use char because int might match the return type of a gcc2
7833     builtin and then its argument prototype would still apply.  */
7834 char $ac_func();
7835
7836 int main() {
7837
7838 /* The GNU C library defines this for functions which it implements
7839     to always fail with ENOSYS.  Some functions are actually named
7840     something starting with __ and the normal name is an alias.  */
7841 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7842 choke me
7843 #else
7844 $ac_func();
7845 #endif
7846
7847 ; return 0; }
7848 EOF
7849 if { (eval echo configure:7850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7850   rm -rf conftest*
7851   eval "ac_cv_func_$ac_func=yes"
7852 else
7853   echo "configure: failed program was:" >&5
7854   cat conftest.$ac_ext >&5
7855   rm -rf conftest*
7856   eval "ac_cv_func_$ac_func=no"
7857 fi
7858 rm -f conftest*
7859
7860 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7861   echo "$ac_t""yes" 1>&6
7862     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7863   { test "$extra_verbose" = "yes" && cat << EOF
7864     Defining $ac_tr_func
7865 EOF
7866 cat >> confdefs.h <<EOF
7867 #define $ac_tr_func 1
7868 EOF
7869 }
7870  
7871 else
7872   echo "$ac_t""no" 1>&6
7873 fi
7874 done
7875
7876 fi
7877
7878 if test "$with_postgresql" != "no"; then
7879   echo "checking for PostgreSQL" 1>&6
7880 echo "configure:7881: checking for PostgreSQL" >&5
7881
7882   for header_dir in "" "pgsql/" "postgresql/"; do
7883     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7884 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7885 echo "configure:7886: checking for ${header_dir}libpq-fe.h" >&5
7886
7887 cat > conftest.$ac_ext <<EOF
7888 #line 7889 "configure"
7889 #include "confdefs.h"
7890 #include <${header_dir}libpq-fe.h>
7891 EOF
7892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7893 { (eval echo configure:7894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7895 if test -z "$ac_err"; then
7896   rm -rf conftest*
7897   eval "ac_cv_header_$ac_safe=yes"
7898 else
7899   echo "$ac_err" >&5
7900   echo "configure: failed program was:" >&5
7901   cat conftest.$ac_ext >&5
7902   rm -rf conftest*
7903   eval "ac_cv_header_$ac_safe=no"
7904 fi
7905 rm -f conftest*
7906 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7907   echo "$ac_t""yes" 1>&6
7908   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7909 else
7910   echo "$ac_t""no" 1>&6
7911 fi
7912
7913   done
7914
7915   test -n "$libpq_fe_h_file" && { 
7916 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7917 echo "configure:7918: checking for PQconnectdb in -lpq" >&5
7918 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7919
7920 xe_check_libs=" -lpq "
7921 cat > conftest.$ac_ext <<EOF
7922 #line 7923 "configure"
7923 #include "confdefs.h"
7924 /* Override any gcc2 internal prototype to avoid an error.  */
7925 /* We use char because int might match the return type of a gcc2
7926     builtin and then its argument prototype would still apply.  */
7927 char PQconnectdb();
7928
7929 int main() {
7930 PQconnectdb()
7931 ; return 0; }
7932 EOF
7933 if { (eval echo configure:7934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7934   rm -rf conftest*
7935   eval "ac_cv_lib_$ac_lib_var=yes"
7936 else
7937   echo "configure: failed program was:" >&5
7938   cat conftest.$ac_ext >&5
7939   rm -rf conftest*
7940   eval "ac_cv_lib_$ac_lib_var=no"
7941 fi
7942 rm -f conftest*
7943 xe_check_libs=""
7944
7945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7946   echo "$ac_t""yes" 1>&6
7947   have_libpq=yes
7948 else
7949   echo "$ac_t""no" 1>&6
7950 fi
7951
7952  }
7953
7954   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7955     with_postgresql=yes
7956     { test "$extra_verbose" = "yes" && cat << \EOF
7957     Defining HAVE_POSTGRESQL
7958 EOF
7959 cat >> confdefs.h <<\EOF
7960 #define HAVE_POSTGRESQL 1
7961 EOF
7962 }
7963
7964     
7965 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7966 echo "configure:7967: checking for PQconnectStart in -lpq" >&5
7967 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7968
7969 xe_check_libs=" -lpq "
7970 cat > conftest.$ac_ext <<EOF
7971 #line 7972 "configure"
7972 #include "confdefs.h"
7973 /* Override any gcc2 internal prototype to avoid an error.  */
7974 /* We use char because int might match the return type of a gcc2
7975     builtin and then its argument prototype would still apply.  */
7976 char PQconnectStart();
7977
7978 int main() {
7979 PQconnectStart()
7980 ; return 0; }
7981 EOF
7982 if { (eval echo configure:7983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7983   rm -rf conftest*
7984   eval "ac_cv_lib_$ac_lib_var=yes"
7985 else
7986   echo "configure: failed program was:" >&5
7987   cat conftest.$ac_ext >&5
7988   rm -rf conftest*
7989   eval "ac_cv_lib_$ac_lib_var=no"
7990 fi
7991 rm -f conftest*
7992 xe_check_libs=""
7993
7994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7995   echo "$ac_t""yes" 1>&6
7996   with_postgresqlv7=yes;
7997                  { test "$extra_verbose" = "yes" && cat << \EOF
7998     Defining HAVE_POSTGRESQLV7
7999 EOF
8000 cat >> confdefs.h <<\EOF
8001 #define HAVE_POSTGRESQLV7 1
8002 EOF
8003 }
8004
8005 else
8006   echo "$ac_t""no" 1>&6
8007 fi
8008
8009
8010     { test "$extra_verbose" = "yes" && cat << EOF
8011     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8012 EOF
8013 cat >> confdefs.h <<EOF
8014 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8015 EOF
8016 }
8017
8018     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8019     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8020    echo "    xemacs will be linked with \"postgresql.o\""
8021  fi
8022   elif test "$with_postgresql" = "yes"; then
8023     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8024   fi
8025 fi
8026
8027
8028 if test "$window_system" != "none"; then
8029   echo "checking for graphics libraries" 1>&6
8030 echo "configure:8031: checking for graphics libraries" >&5
8031
8032     xpm_problem=""
8033   if test -z "$with_xpm"; then
8034     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8035 echo "configure:8036: checking for Xpm - no older than 3.4f" >&5
8036     xe_check_libs=-lXpm
8037     cat > conftest.$ac_ext <<EOF
8038 #line 8039 "configure"
8039 #include "confdefs.h"
8040 #define XPM_NUMBERS
8041 #include <X11/xpm.h>
8042     int main(int c, char **v) {
8043     return c == 1 ? 0 :
8044       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8045       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8046 EOF
8047 if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8048 then
8049   ./conftest dummy_arg; xpm_status=$?;
8050       if test "$xpm_status" = "0"; then
8051         with_xpm=yes;
8052       else
8053         with_xpm=no;
8054         if test "$xpm_status" = "1"; then
8055           xpm_problem="Xpm library version and header file version don't match!"
8056         elif test "$xpm_status" = "2"; then
8057           xpm_problem="Xpm library version is too old!"
8058         else
8059           xpm_problem="Internal xpm detection logic error!"
8060         fi
8061         echo "
8062 *** WARNING *** $xpm_problem
8063   I'm not touching that with a 10-foot pole!
8064   If you really want to use the installed version of Xpm, rerun
8065   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8066     fi
8067 else
8068   conftest_rc="$?"
8069   echo "configure: failed program was:" >&5
8070   cat conftest.$ac_ext >&5
8071   rm -fr conftest*
8072   with_xpm=no
8073 fi
8074 rm -fr conftest*
8075     xe_check_libs=
8076     echo "$ac_t""$with_xpm" 1>&6
8077   fi
8078   if test "$with_xpm" = "yes"; then
8079                 { test "$extra_verbose" = "yes" && cat << \EOF
8080     Defining HAVE_XPM
8081 EOF
8082 cat >> confdefs.h <<\EOF
8083 #define HAVE_XPM 1
8084 EOF
8085 }
8086
8087     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8088     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8089 echo "configure:8090: checking for \"FOR_MSW\" xpm" >&5
8090     xe_check_libs=-lXpm
8091     cat > conftest.$ac_ext <<EOF
8092 #line 8093 "configure"
8093 #include "confdefs.h"
8094
8095 int main() {
8096 XpmCreatePixmapFromData()
8097 ; return 0; }
8098 EOF
8099 if { (eval echo configure:8100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8100   rm -rf conftest*
8101   xpm_for_msw=no
8102 else
8103   echo "configure: failed program was:" >&5
8104   cat conftest.$ac_ext >&5
8105   rm -rf conftest*
8106   xpm_for_msw=yes
8107 fi
8108 rm -f conftest*
8109     xe_check_libs=
8110     echo "$ac_t""$xpm_for_msw" 1>&6
8111     if test "$xpm_for_msw" = "yes"; then
8112       { test "$extra_verbose" = "yes" && cat << \EOF
8113     Defining FOR_MSW
8114 EOF
8115 cat >> confdefs.h <<\EOF
8116 #define FOR_MSW 1
8117 EOF
8118 }
8119
8120     fi
8121   fi
8122
8123     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8124 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8125 echo "configure:8126: checking for compface.h" >&5
8126
8127 cat > conftest.$ac_ext <<EOF
8128 #line 8129 "configure"
8129 #include "confdefs.h"
8130 #include <compface.h>
8131 EOF
8132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8133 { (eval echo configure:8134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8135 if test -z "$ac_err"; then
8136   rm -rf conftest*
8137   eval "ac_cv_header_$ac_safe=yes"
8138 else
8139   echo "$ac_err" >&5
8140   echo "configure: failed program was:" >&5
8141   cat conftest.$ac_ext >&5
8142   rm -rf conftest*
8143   eval "ac_cv_header_$ac_safe=no"
8144 fi
8145 rm -f conftest*
8146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8147   echo "$ac_t""yes" 1>&6
8148   :
8149 else
8150   echo "$ac_t""no" 1>&6
8151 with_xface=no
8152 fi
8153  }
8154   test -z "$with_xface" && { 
8155 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8156 echo "configure:8157: checking for UnGenFace in -lcompface" >&5
8157 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8158
8159 xe_check_libs=" -lcompface "
8160 cat > conftest.$ac_ext <<EOF
8161 #line 8162 "configure"
8162 #include "confdefs.h"
8163 /* Override any gcc2 internal prototype to avoid an error.  */
8164 /* We use char because int might match the return type of a gcc2
8165     builtin and then its argument prototype would still apply.  */
8166 char UnGenFace();
8167
8168 int main() {
8169 UnGenFace()
8170 ; return 0; }
8171 EOF
8172 if { (eval echo configure:8173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8173   rm -rf conftest*
8174   eval "ac_cv_lib_$ac_lib_var=yes"
8175 else
8176   echo "configure: failed program was:" >&5
8177   cat conftest.$ac_ext >&5
8178   rm -rf conftest*
8179   eval "ac_cv_lib_$ac_lib_var=no"
8180 fi
8181 rm -f conftest*
8182 xe_check_libs=""
8183
8184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = 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  }
8193   test -z "$with_xface" && with_xface=yes
8194   if test "$with_xface" = "yes"; then
8195     { test "$extra_verbose" = "yes" && cat << \EOF
8196     Defining HAVE_XFACE
8197 EOF
8198 cat >> confdefs.h <<\EOF
8199 #define HAVE_XFACE 1
8200 EOF
8201 }
8202
8203     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8204   fi
8205
8206         if test "$with_gif" != "no"; then
8207     with_gif="yes"
8208     { test "$extra_verbose" = "yes" && cat << \EOF
8209     Defining HAVE_GIF
8210 EOF
8211 cat >> confdefs.h <<\EOF
8212 #define HAVE_GIF 1
8213 EOF
8214 }
8215
8216     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8217    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8218  fi
8219   fi
8220
8221       if test "$with_png $with_tiff" != "no no"; then
8222     
8223 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8224 echo "configure:8225: checking for inflate in -lc" >&5
8225 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8226
8227 xe_check_libs=" -lc "
8228 cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 /* Override any gcc2 internal prototype to avoid an error.  */
8232 /* We use char because int might match the return type of a gcc2
8233     builtin and then its argument prototype would still apply.  */
8234 char inflate();
8235
8236 int main() {
8237 inflate()
8238 ; return 0; }
8239 EOF
8240 if { (eval echo configure:8241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8241   rm -rf conftest*
8242   eval "ac_cv_lib_$ac_lib_var=yes"
8243 else
8244   echo "configure: failed program was:" >&5
8245   cat conftest.$ac_ext >&5
8246   rm -rf conftest*
8247   eval "ac_cv_lib_$ac_lib_var=no"
8248 fi
8249 rm -f conftest*
8250 xe_check_libs=""
8251
8252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8253   echo "$ac_t""yes" 1>&6
8254   :
8255 else
8256   echo "$ac_t""no" 1>&6
8257
8258 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8259 echo "configure:8260: checking for inflate in -lz" >&5
8260 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8261
8262 xe_check_libs=" -lz "
8263 cat > conftest.$ac_ext <<EOF
8264 #line 8265 "configure"
8265 #include "confdefs.h"
8266 /* Override any gcc2 internal prototype to avoid an error.  */
8267 /* We use char because int might match the return type of a gcc2
8268     builtin and then its argument prototype would still apply.  */
8269 char inflate();
8270
8271 int main() {
8272 inflate()
8273 ; return 0; }
8274 EOF
8275 if { (eval echo configure:8276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8276   rm -rf conftest*
8277   eval "ac_cv_lib_$ac_lib_var=yes"
8278 else
8279   echo "configure: failed program was:" >&5
8280   cat conftest.$ac_ext >&5
8281   rm -rf conftest*
8282   eval "ac_cv_lib_$ac_lib_var=no"
8283 fi
8284 rm -f conftest*
8285 xe_check_libs=""
8286
8287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8288   echo "$ac_t""yes" 1>&6
8289   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8290 else
8291   echo "$ac_t""no" 1>&6
8292
8293 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8294 echo "configure:8295: checking for inflate in -lgz" >&5
8295 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8296
8297 xe_check_libs=" -lgz "
8298 cat > conftest.$ac_ext <<EOF
8299 #line 8300 "configure"
8300 #include "confdefs.h"
8301 /* Override any gcc2 internal prototype to avoid an error.  */
8302 /* We use char because int might match the return type of a gcc2
8303     builtin and then its argument prototype would still apply.  */
8304 char inflate();
8305
8306 int main() {
8307 inflate()
8308 ; return 0; }
8309 EOF
8310 if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8311   rm -rf conftest*
8312   eval "ac_cv_lib_$ac_lib_var=yes"
8313 else
8314   echo "configure: failed program was:" >&5
8315   cat conftest.$ac_ext >&5
8316   rm -rf conftest*
8317   eval "ac_cv_lib_$ac_lib_var=no"
8318 fi
8319 rm -f conftest*
8320 xe_check_libs=""
8321
8322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8323   echo "$ac_t""yes" 1>&6
8324   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8325 else
8326   echo "$ac_t""no" 1>&6
8327 fi
8328
8329
8330 fi
8331
8332
8333 fi
8334
8335
8336   fi
8337
8338     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8339 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8340 echo "configure:8341: checking for jpeglib.h" >&5
8341
8342 cat > conftest.$ac_ext <<EOF
8343 #line 8344 "configure"
8344 #include "confdefs.h"
8345 #include <jpeglib.h>
8346 EOF
8347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8348 { (eval echo configure:8349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8350 if test -z "$ac_err"; then
8351   rm -rf conftest*
8352   eval "ac_cv_header_$ac_safe=yes"
8353 else
8354   echo "$ac_err" >&5
8355   echo "configure: failed program was:" >&5
8356   cat conftest.$ac_ext >&5
8357   rm -rf conftest*
8358   eval "ac_cv_header_$ac_safe=no"
8359 fi
8360 rm -f conftest*
8361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8362   echo "$ac_t""yes" 1>&6
8363   :
8364 else
8365   echo "$ac_t""no" 1>&6
8366 with_jpeg=no
8367 fi
8368  }
8369   test -z "$with_jpeg" && { 
8370 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8371 echo "configure:8372: checking for jpeg_destroy_decompress in -ljpeg" >&5
8372 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8373
8374 xe_check_libs=" -ljpeg "
8375 cat > conftest.$ac_ext <<EOF
8376 #line 8377 "configure"
8377 #include "confdefs.h"
8378 /* Override any gcc2 internal prototype to avoid an error.  */
8379 /* We use char because int might match the return type of a gcc2
8380     builtin and then its argument prototype would still apply.  */
8381 char jpeg_destroy_decompress();
8382
8383 int main() {
8384 jpeg_destroy_decompress()
8385 ; return 0; }
8386 EOF
8387 if { (eval echo configure:8388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8388   rm -rf conftest*
8389   eval "ac_cv_lib_$ac_lib_var=yes"
8390 else
8391   echo "configure: failed program was:" >&5
8392   cat conftest.$ac_ext >&5
8393   rm -rf conftest*
8394   eval "ac_cv_lib_$ac_lib_var=no"
8395 fi
8396 rm -f conftest*
8397 xe_check_libs=""
8398
8399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = 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  }
8408   test -z "$with_jpeg" && with_jpeg=yes
8409   if test "$with_jpeg" = "yes"; then
8410     { test "$extra_verbose" = "yes" && cat << \EOF
8411     Defining HAVE_JPEG
8412 EOF
8413 cat >> confdefs.h <<\EOF
8414 #define HAVE_JPEG 1
8415 EOF
8416 }
8417
8418     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8419   fi
8420
8421     png_problem=""
8422   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8423 echo "configure:8424: checking for pow" >&5
8424
8425 cat > conftest.$ac_ext <<EOF
8426 #line 8427 "configure"
8427 #include "confdefs.h"
8428 /* System header to define __stub macros and hopefully few prototypes,
8429     which can conflict with char pow(); below.  */
8430 #include <assert.h>
8431 /* Override any gcc2 internal prototype to avoid an error.  */
8432 /* We use char because int might match the return type of a gcc2
8433     builtin and then its argument prototype would still apply.  */
8434 char pow();
8435
8436 int main() {
8437
8438 /* The GNU C library defines this for functions which it implements
8439     to always fail with ENOSYS.  Some functions are actually named
8440     something starting with __ and the normal name is an alias.  */
8441 #if defined (__stub_pow) || defined (__stub___pow)
8442 choke me
8443 #else
8444 pow();
8445 #endif
8446
8447 ; return 0; }
8448 EOF
8449 if { (eval echo configure:8450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8450   rm -rf conftest*
8451   eval "ac_cv_func_pow=yes"
8452 else
8453   echo "configure: failed program was:" >&5
8454   cat conftest.$ac_ext >&5
8455   rm -rf conftest*
8456   eval "ac_cv_func_pow=no"
8457 fi
8458 rm -f conftest*
8459
8460 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8461   echo "$ac_t""yes" 1>&6
8462   :
8463 else
8464   echo "$ac_t""no" 1>&6
8465 with_png=no
8466 fi
8467  }
8468   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8469 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8470 echo "configure:8471: checking for png.h" >&5
8471
8472 cat > conftest.$ac_ext <<EOF
8473 #line 8474 "configure"
8474 #include "confdefs.h"
8475 #include <png.h>
8476 EOF
8477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8478 { (eval echo configure:8479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8480 if test -z "$ac_err"; then
8481   rm -rf conftest*
8482   eval "ac_cv_header_$ac_safe=yes"
8483 else
8484   echo "$ac_err" >&5
8485   echo "configure: failed program was:" >&5
8486   cat conftest.$ac_ext >&5
8487   rm -rf conftest*
8488   eval "ac_cv_header_$ac_safe=no"
8489 fi
8490 rm -f conftest*
8491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8492   echo "$ac_t""yes" 1>&6
8493   :
8494 else
8495   echo "$ac_t""no" 1>&6
8496 with_png=no
8497 fi
8498  }
8499   test -z "$with_png" && { 
8500 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8501 echo "configure:8502: checking for png_read_image in -lpng" >&5
8502 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8503
8504 xe_check_libs=" -lpng "
8505 cat > conftest.$ac_ext <<EOF
8506 #line 8507 "configure"
8507 #include "confdefs.h"
8508 /* Override any gcc2 internal prototype to avoid an error.  */
8509 /* We use char because int might match the return type of a gcc2
8510     builtin and then its argument prototype would still apply.  */
8511 char png_read_image();
8512
8513 int main() {
8514 png_read_image()
8515 ; return 0; }
8516 EOF
8517 if { (eval echo configure:8518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8518   rm -rf conftest*
8519   eval "ac_cv_lib_$ac_lib_var=yes"
8520 else
8521   echo "configure: failed program was:" >&5
8522   cat conftest.$ac_ext >&5
8523   rm -rf conftest*
8524   eval "ac_cv_lib_$ac_lib_var=no"
8525 fi
8526 rm -f conftest*
8527 xe_check_libs=""
8528
8529 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = 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  }
8538   if test -z "$with_png"; then
8539     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8540 echo "configure:8541: checking for workable png version information" >&5
8541     xe_check_libs="-lpng -lz"
8542     cat > conftest.$ac_ext <<EOF
8543 #line 8544 "configure"
8544 #include "confdefs.h"
8545 #include <png.h>
8546     int main(int c, char **v) {
8547     if (c == 1) return 0;
8548     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8549     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8550 EOF
8551 if { (eval echo configure:8552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8552 then
8553   ./conftest dummy_arg; png_status=$?;
8554       if test "$png_status" = "0"; then
8555         with_png=yes;
8556       else
8557         with_png=no;
8558         if test "$png_status" = "1"; then
8559           png_problem="PNG library version and header file don't match!"
8560         elif test "$png_status" = "2"; then
8561           png_problem="PNG library version too old (pre 1.0.2)!"
8562         fi
8563         echo "
8564 *** WARNING *** $png_problem
8565   I'm not touching that with a 10-foot pole!
8566   If you really want to use the installed version of libPNG, rerun
8567   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8568     fi
8569 else
8570   conftest_rc="$?"
8571   echo "configure: failed program was:" >&5
8572   cat conftest.$ac_ext >&5
8573   rm -fr conftest*
8574   with_png=no
8575 fi
8576 rm -fr conftest*
8577     xe_check_libs=
8578     echo "$ac_t""$with_png" 1>&6
8579   fi
8580   if test "$with_png" = "yes"; then
8581     { test "$extra_verbose" = "yes" && cat << \EOF
8582     Defining HAVE_PNG
8583 EOF
8584 cat >> confdefs.h <<\EOF
8585 #define HAVE_PNG 1
8586 EOF
8587 }
8588
8589     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8590   fi
8591
8592     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8593 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8594 echo "configure:8595: checking for tiffio.h" >&5
8595
8596 cat > conftest.$ac_ext <<EOF
8597 #line 8598 "configure"
8598 #include "confdefs.h"
8599 #include <tiffio.h>
8600 EOF
8601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8602 { (eval echo configure:8603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8604 if test -z "$ac_err"; then
8605   rm -rf conftest*
8606   eval "ac_cv_header_$ac_safe=yes"
8607 else
8608   echo "$ac_err" >&5
8609   echo "configure: failed program was:" >&5
8610   cat conftest.$ac_ext >&5
8611   rm -rf conftest*
8612   eval "ac_cv_header_$ac_safe=no"
8613 fi
8614 rm -f conftest*
8615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8616   echo "$ac_t""yes" 1>&6
8617   :
8618 else
8619   echo "$ac_t""no" 1>&6
8620 with_tiff=no
8621 fi
8622  }
8623   test -z "$with_tiff" && { 
8624 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8625 echo "configure:8626: checking for TIFFClientOpen in -ltiff" >&5
8626 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8627
8628 xe_check_libs=" -ltiff "
8629 cat > conftest.$ac_ext <<EOF
8630 #line 8631 "configure"
8631 #include "confdefs.h"
8632 /* Override any gcc2 internal prototype to avoid an error.  */
8633 /* We use char because int might match the return type of a gcc2
8634     builtin and then its argument prototype would still apply.  */
8635 char TIFFClientOpen();
8636
8637 int main() {
8638 TIFFClientOpen()
8639 ; return 0; }
8640 EOF
8641 if { (eval echo configure:8642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8642   rm -rf conftest*
8643   eval "ac_cv_lib_$ac_lib_var=yes"
8644 else
8645   echo "configure: failed program was:" >&5
8646   cat conftest.$ac_ext >&5
8647   rm -rf conftest*
8648   eval "ac_cv_lib_$ac_lib_var=no"
8649 fi
8650 rm -f conftest*
8651 xe_check_libs=""
8652
8653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = 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  }
8662   test -z "$with_tiff" && with_tiff=yes
8663   if test "$with_tiff" = "yes"; then
8664     { test "$extra_verbose" = "yes" && cat << \EOF
8665     Defining HAVE_TIFF
8666 EOF
8667 cat >> confdefs.h <<\EOF
8668 #define HAVE_TIFF 1
8669 EOF
8670 }
8671
8672     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8673   fi
8674 fi
8675
8676
8677 if test "$with_gtk" = "yes"; then
8678     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8679 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8680 echo "configure:8681: checking for compface.h" >&5
8681
8682 cat > conftest.$ac_ext <<EOF
8683 #line 8684 "configure"
8684 #include "confdefs.h"
8685 #include <compface.h>
8686 EOF
8687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8688 { (eval echo configure:8689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8690 if test -z "$ac_err"; then
8691   rm -rf conftest*
8692   eval "ac_cv_header_$ac_safe=yes"
8693 else
8694   echo "$ac_err" >&5
8695   echo "configure: failed program was:" >&5
8696   cat conftest.$ac_ext >&5
8697   rm -rf conftest*
8698   eval "ac_cv_header_$ac_safe=no"
8699 fi
8700 rm -f conftest*
8701 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8702   echo "$ac_t""yes" 1>&6
8703   :
8704 else
8705   echo "$ac_t""no" 1>&6
8706 with_xface=no
8707 fi
8708  }
8709   test -z "$with_xface" && { 
8710 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8711 echo "configure:8712: checking for UnGenFace in -lcompface" >&5
8712 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8713
8714 xe_check_libs=" -lcompface "
8715 cat > conftest.$ac_ext <<EOF
8716 #line 8717 "configure"
8717 #include "confdefs.h"
8718 /* Override any gcc2 internal prototype to avoid an error.  */
8719 /* We use char because int might match the return type of a gcc2
8720     builtin and then its argument prototype would still apply.  */
8721 char UnGenFace();
8722
8723 int main() {
8724 UnGenFace()
8725 ; return 0; }
8726 EOF
8727 if { (eval echo configure:8728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8728   rm -rf conftest*
8729   eval "ac_cv_lib_$ac_lib_var=yes"
8730 else
8731   echo "configure: failed program was:" >&5
8732   cat conftest.$ac_ext >&5
8733   rm -rf conftest*
8734   eval "ac_cv_lib_$ac_lib_var=no"
8735 fi
8736 rm -f conftest*
8737 xe_check_libs=""
8738
8739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = 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  }
8748   test -z "$with_xface" && with_xface=yes
8749   if test "$with_xface" = "yes"; then
8750     { test "$extra_verbose" = "yes" && cat << \EOF
8751     Defining HAVE_XFACE
8752 EOF
8753 cat >> confdefs.h <<\EOF
8754 #define HAVE_XFACE 1
8755 EOF
8756 }
8757
8758     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8759   fi
8760 fi
8761
8762
8763
8764 if test "$with_x11" = "yes"; then
8765   echo "checking for X11 graphics libraries" 1>&6
8766 echo "configure:8767: checking for X11 graphics libraries" >&5
8767 fi
8768
8769 if test "$with_x11" = "yes" -a "$with_widgets" = "athena"; then
8770   echo "checking for the Athena widgets" 1>&6
8771 echo "configure:8772: checking for the Athena widgets" >&5
8772
8773     case "$with_athena" in
8774         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8775     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8776     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8777     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8778     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8779     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8780   esac
8781
8782     if test "$athena_3d" = "no"; then
8783     
8784 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8785 echo "configure:8786: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8786 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8787
8788 xe_check_libs=" -l$athena_variant "
8789 cat > conftest.$ac_ext <<EOF
8790 #line 8791 "configure"
8791 #include "confdefs.h"
8792 /* Override any gcc2 internal prototype to avoid an error.  */
8793 /* We use char because int might match the return type of a gcc2
8794     builtin and then its argument prototype would still apply.  */
8795 char XawScrollbarSetThumb();
8796
8797 int main() {
8798 XawScrollbarSetThumb()
8799 ; return 0; }
8800 EOF
8801 if { (eval echo configure:8802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8802   rm -rf conftest*
8803   eval "ac_cv_lib_$ac_lib_var=yes"
8804 else
8805   echo "configure: failed program was:" >&5
8806   cat conftest.$ac_ext >&5
8807   rm -rf conftest*
8808   eval "ac_cv_lib_$ac_lib_var=no"
8809 fi
8810 rm -f conftest*
8811 xe_check_libs=""
8812
8813 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8814   echo "$ac_t""yes" 1>&6
8815           
8816 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8817 echo "configure:8818: checking for threeDClassRec in -l$athena_variant" >&5
8818 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8819
8820 xe_check_libs=" -l$athena_variant "
8821 cat > conftest.$ac_ext <<EOF
8822 #line 8823 "configure"
8823 #include "confdefs.h"
8824 /* Override any gcc2 internal prototype to avoid an error.  */
8825 /* We use char because int might match the return type of a gcc2
8826     builtin and then its argument prototype would still apply.  */
8827 char threeDClassRec();
8828
8829 int main() {
8830 threeDClassRec()
8831 ; return 0; }
8832 EOF
8833 if { (eval echo configure:8834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8834   rm -rf conftest*
8835   eval "ac_cv_lib_$ac_lib_var=yes"
8836 else
8837   echo "configure: failed program was:" >&5
8838   cat conftest.$ac_ext >&5
8839   rm -rf conftest*
8840   eval "ac_cv_lib_$ac_lib_var=no"
8841 fi
8842 rm -f conftest*
8843 xe_check_libs=""
8844
8845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8846   echo "$ac_t""yes" 1>&6
8847   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8848 else
8849   echo "$ac_t""no" 1>&6
8850 athena_lib=$athena_variant
8851 fi
8852
8853
8854       
8855 else
8856   echo "$ac_t""no" 1>&6
8857 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8858 fi
8859
8860
8861   else
8862         
8863 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8864 echo "configure:8865: checking for threeDClassRec in -l$athena_variant" >&5
8865 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8866
8867 xe_check_libs=" -l$athena_variant "
8868 cat > conftest.$ac_ext <<EOF
8869 #line 8870 "configure"
8870 #include "confdefs.h"
8871 /* Override any gcc2 internal prototype to avoid an error.  */
8872 /* We use char because int might match the return type of a gcc2
8873     builtin and then its argument prototype would still apply.  */
8874 char threeDClassRec();
8875
8876 int main() {
8877 threeDClassRec()
8878 ; return 0; }
8879 EOF
8880 if { (eval echo configure:8881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8881   rm -rf conftest*
8882   eval "ac_cv_lib_$ac_lib_var=yes"
8883 else
8884   echo "configure: failed program was:" >&5
8885   cat conftest.$ac_ext >&5
8886   rm -rf conftest*
8887   eval "ac_cv_lib_$ac_lib_var=no"
8888 fi
8889 rm -f conftest*
8890 xe_check_libs=""
8891
8892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8893   echo "$ac_t""yes" 1>&6
8894   athena_lib=$athena_variant
8895 else
8896   echo "$ac_t""no" 1>&6
8897 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8898 echo "configure:8899: checking for threeDClassRec in -lXaw" >&5
8899 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8900
8901 xe_check_libs=" -lXaw "
8902 cat > conftest.$ac_ext <<EOF
8903 #line 8904 "configure"
8904 #include "confdefs.h"
8905 /* Override any gcc2 internal prototype to avoid an error.  */
8906 /* We use char because int might match the return type of a gcc2
8907     builtin and then its argument prototype would still apply.  */
8908 char threeDClassRec();
8909
8910 int main() {
8911 threeDClassRec()
8912 ; return 0; }
8913 EOF
8914 if { (eval echo configure:8915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8915   rm -rf conftest*
8916   eval "ac_cv_lib_$ac_lib_var=yes"
8917 else
8918   echo "configure: failed program was:" >&5
8919   cat conftest.$ac_ext >&5
8920   rm -rf conftest*
8921   eval "ac_cv_lib_$ac_lib_var=no"
8922 fi
8923 rm -f conftest*
8924 xe_check_libs=""
8925
8926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8927   echo "$ac_t""yes" 1>&6
8928   athena_lib=Xaw;
8929           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8930         
8931 else
8932   echo "$ac_t""no" 1>&6
8933 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8934 fi
8935
8936
8937 fi
8938
8939
8940   fi
8941
8942     if test "$athena_3d" = "no"; then
8943     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8944 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8945 echo "configure:8946: checking for X11/Xaw/ThreeD.h" >&5
8946
8947 cat > conftest.$ac_ext <<EOF
8948 #line 8949 "configure"
8949 #include "confdefs.h"
8950 #include <X11/Xaw/ThreeD.h>
8951 EOF
8952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8953 { (eval echo configure:8954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8955 if test -z "$ac_err"; then
8956   rm -rf conftest*
8957   eval "ac_cv_header_$ac_safe=yes"
8958 else
8959   echo "$ac_err" >&5
8960   echo "configure: failed program was:" >&5
8961   cat conftest.$ac_ext >&5
8962   rm -rf conftest*
8963   eval "ac_cv_header_$ac_safe=no"
8964 fi
8965 rm -f conftest*
8966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8967   echo "$ac_t""yes" 1>&6
8968   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8969 else
8970   echo "$ac_t""no" 1>&6
8971 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8972 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8973 echo "configure:8974: checking for X11/Xaw/XawInit.h" >&5
8974
8975 cat > conftest.$ac_ext <<EOF
8976 #line 8977 "configure"
8977 #include "confdefs.h"
8978 #include <X11/Xaw/XawInit.h>
8979 EOF
8980 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8981 { (eval echo configure:8982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8982 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8983 if test -z "$ac_err"; then
8984   rm -rf conftest*
8985   eval "ac_cv_header_$ac_safe=yes"
8986 else
8987   echo "$ac_err" >&5
8988   echo "configure: failed program was:" >&5
8989   cat conftest.$ac_ext >&5
8990   rm -rf conftest*
8991   eval "ac_cv_header_$ac_safe=no"
8992 fi
8993 rm -f conftest*
8994 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8995   echo "$ac_t""yes" 1>&6
8996   athena_h_path=X11/Xaw
8997 else
8998   echo "$ac_t""no" 1>&6
8999 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9000 fi
9001
9002 fi
9003
9004   else
9005             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9006 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9007 echo "configure:9008: checking for X11/$athena_variant/XawInit.h" >&5
9008
9009 cat > conftest.$ac_ext <<EOF
9010 #line 9011 "configure"
9011 #include "confdefs.h"
9012 #include <X11/$athena_variant/XawInit.h>
9013 EOF
9014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9015 { (eval echo configure:9016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9017 if test -z "$ac_err"; then
9018   rm -rf conftest*
9019   eval "ac_cv_header_$ac_safe=yes"
9020 else
9021   echo "$ac_err" >&5
9022   echo "configure: failed program was:" >&5
9023   cat conftest.$ac_ext >&5
9024   rm -rf conftest*
9025   eval "ac_cv_header_$ac_safe=no"
9026 fi
9027 rm -f conftest*
9028 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9029   echo "$ac_t""yes" 1>&6
9030   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9031 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9032 echo "configure:9033: checking for X11/$athena_variant/ThreeD.h" >&5
9033
9034 cat > conftest.$ac_ext <<EOF
9035 #line 9036 "configure"
9036 #include "confdefs.h"
9037 #include <X11/$athena_variant/ThreeD.h>
9038 EOF
9039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9040 { (eval echo configure:9041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9042 if test -z "$ac_err"; then
9043   rm -rf conftest*
9044   eval "ac_cv_header_$ac_safe=yes"
9045 else
9046   echo "$ac_err" >&5
9047   echo "configure: failed program was:" >&5
9048   cat conftest.$ac_ext >&5
9049   rm -rf conftest*
9050   eval "ac_cv_header_$ac_safe=no"
9051 fi
9052 rm -f conftest*
9053 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9054   echo "$ac_t""yes" 1>&6
9055   athena_h_path=X11/$athena_variant
9056 else
9057   echo "$ac_t""no" 1>&6
9058 fi
9059
9060 else
9061   echo "$ac_t""no" 1>&6
9062 fi
9063
9064
9065         if test -z "$athena_h_path"; then
9066       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9067 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9068 echo "configure:9069: checking for $athena_variant/XawInit.h" >&5
9069
9070 cat > conftest.$ac_ext <<EOF
9071 #line 9072 "configure"
9072 #include "confdefs.h"
9073 #include <$athena_variant/XawInit.h>
9074 EOF
9075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9076 { (eval echo configure:9077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9078 if test -z "$ac_err"; then
9079   rm -rf conftest*
9080   eval "ac_cv_header_$ac_safe=yes"
9081 else
9082   echo "$ac_err" >&5
9083   echo "configure: failed program was:" >&5
9084   cat conftest.$ac_ext >&5
9085   rm -rf conftest*
9086   eval "ac_cv_header_$ac_safe=no"
9087 fi
9088 rm -f conftest*
9089 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9090   echo "$ac_t""yes" 1>&6
9091   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9092 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9093 echo "configure:9094: checking for $athena_variant/ThreeD.h" >&5
9094
9095 cat > conftest.$ac_ext <<EOF
9096 #line 9097 "configure"
9097 #include "confdefs.h"
9098 #include <$athena_variant/ThreeD.h>
9099 EOF
9100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9101 { (eval echo configure:9102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9103 if test -z "$ac_err"; then
9104   rm -rf conftest*
9105   eval "ac_cv_header_$ac_safe=yes"
9106 else
9107   echo "$ac_err" >&5
9108   echo "configure: failed program was:" >&5
9109   cat conftest.$ac_ext >&5
9110   rm -rf conftest*
9111   eval "ac_cv_header_$ac_safe=no"
9112 fi
9113 rm -f conftest*
9114 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9115   echo "$ac_t""yes" 1>&6
9116   athena_h_path=$athena_variant
9117 else
9118   echo "$ac_t""no" 1>&6
9119 fi
9120
9121 else
9122   echo "$ac_t""no" 1>&6
9123 fi
9124
9125     fi
9126
9127         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9128       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9129 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9130 echo "configure:9131: checking for X11/Xaw3d/XawInit.h" >&5
9131
9132 cat > conftest.$ac_ext <<EOF
9133 #line 9134 "configure"
9134 #include "confdefs.h"
9135 #include <X11/Xaw3d/XawInit.h>
9136 EOF
9137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9138 { (eval echo configure:9139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9140 if test -z "$ac_err"; then
9141   rm -rf conftest*
9142   eval "ac_cv_header_$ac_safe=yes"
9143 else
9144   echo "$ac_err" >&5
9145   echo "configure: failed program was:" >&5
9146   cat conftest.$ac_ext >&5
9147   rm -rf conftest*
9148   eval "ac_cv_header_$ac_safe=no"
9149 fi
9150 rm -f conftest*
9151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9152   echo "$ac_t""yes" 1>&6
9153   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9154 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9155 echo "configure:9156: checking for X11/Xaw3d/ThreeD.h" >&5
9156
9157 cat > conftest.$ac_ext <<EOF
9158 #line 9159 "configure"
9159 #include "confdefs.h"
9160 #include <X11/Xaw3d/ThreeD.h>
9161 EOF
9162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9163 { (eval echo configure:9164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9165 if test -z "$ac_err"; then
9166   rm -rf conftest*
9167   eval "ac_cv_header_$ac_safe=yes"
9168 else
9169   echo "$ac_err" >&5
9170   echo "configure: failed program was:" >&5
9171   cat conftest.$ac_ext >&5
9172   rm -rf conftest*
9173   eval "ac_cv_header_$ac_safe=no"
9174 fi
9175 rm -f conftest*
9176 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9177   echo "$ac_t""yes" 1>&6
9178   
9179             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9180             athena_h_path=X11/Xaw3d
9181           
9182 else
9183   echo "$ac_t""no" 1>&6
9184 fi
9185
9186 else
9187   echo "$ac_t""no" 1>&6
9188 fi
9189
9190     fi
9191
9192         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9193       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9194 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9195 echo "configure:9196: checking for Xaw3d/XawInit.h" >&5
9196
9197 cat > conftest.$ac_ext <<EOF
9198 #line 9199 "configure"
9199 #include "confdefs.h"
9200 #include <Xaw3d/XawInit.h>
9201 EOF
9202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9203 { (eval echo configure:9204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9205 if test -z "$ac_err"; then
9206   rm -rf conftest*
9207   eval "ac_cv_header_$ac_safe=yes"
9208 else
9209   echo "$ac_err" >&5
9210   echo "configure: failed program was:" >&5
9211   cat conftest.$ac_ext >&5
9212   rm -rf conftest*
9213   eval "ac_cv_header_$ac_safe=no"
9214 fi
9215 rm -f conftest*
9216 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9217   echo "$ac_t""yes" 1>&6
9218   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9219 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9220 echo "configure:9221: checking for Xaw3d/ThreeD.h" >&5
9221
9222 cat > conftest.$ac_ext <<EOF
9223 #line 9224 "configure"
9224 #include "confdefs.h"
9225 #include <Xaw3d/ThreeD.h>
9226 EOF
9227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9228 { (eval echo configure:9229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9230 if test -z "$ac_err"; then
9231   rm -rf conftest*
9232   eval "ac_cv_header_$ac_safe=yes"
9233 else
9234   echo "$ac_err" >&5
9235   echo "configure: failed program was:" >&5
9236   cat conftest.$ac_ext >&5
9237   rm -rf conftest*
9238   eval "ac_cv_header_$ac_safe=no"
9239 fi
9240 rm -f conftest*
9241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9242   echo "$ac_t""yes" 1>&6
9243   
9244             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9245             athena_h_path=Xaw3d
9246           
9247 else
9248   echo "$ac_t""no" 1>&6
9249 fi
9250
9251 else
9252   echo "$ac_t""no" 1>&6
9253 fi
9254
9255     fi
9256
9257             if test -z "$athena_h_path"; then
9258       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9259 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9260 echo "configure:9261: checking for X11/Xaw/ThreeD.h" >&5
9261
9262 cat > conftest.$ac_ext <<EOF
9263 #line 9264 "configure"
9264 #include "confdefs.h"
9265 #include <X11/Xaw/ThreeD.h>
9266 EOF
9267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9268 { (eval echo configure:9269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9270 if test -z "$ac_err"; then
9271   rm -rf conftest*
9272   eval "ac_cv_header_$ac_safe=yes"
9273 else
9274   echo "$ac_err" >&5
9275   echo "configure: failed program was:" >&5
9276   cat conftest.$ac_ext >&5
9277   rm -rf conftest*
9278   eval "ac_cv_header_$ac_safe=no"
9279 fi
9280 rm -f conftest*
9281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9282   echo "$ac_t""yes" 1>&6
9283   
9284           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9285           athena_h_path=X11/Xaw
9286         
9287 else
9288   echo "$ac_t""no" 1>&6
9289 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9290 fi
9291
9292     fi
9293   fi
9294
9295     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9296     have_xaw=yes
9297   else
9298     have_xaw=no
9299   fi
9300
9301 else
9302   have_xaw=no
9303 fi 
9304 if test "$with_x11" = "yes"; then
9305     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9306 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9307 echo "configure:9308: checking for Xm/Xm.h" >&5
9308
9309 cat > conftest.$ac_ext <<EOF
9310 #line 9311 "configure"
9311 #include "confdefs.h"
9312 #include <Xm/Xm.h>
9313 EOF
9314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9315 { (eval echo configure:9316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9317 if test -z "$ac_err"; then
9318   rm -rf conftest*
9319   eval "ac_cv_header_$ac_safe=yes"
9320 else
9321   echo "$ac_err" >&5
9322   echo "configure: failed program was:" >&5
9323   cat conftest.$ac_ext >&5
9324   rm -rf conftest*
9325   eval "ac_cv_header_$ac_safe=no"
9326 fi
9327 rm -f conftest*
9328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9329   echo "$ac_t""yes" 1>&6
9330   
9331 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9332 echo "configure:9333: checking for XmStringFree in -lXm" >&5
9333 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9334
9335 xe_check_libs=" -lXm "
9336 cat > conftest.$ac_ext <<EOF
9337 #line 9338 "configure"
9338 #include "confdefs.h"
9339 /* Override any gcc2 internal prototype to avoid an error.  */
9340 /* We use char because int might match the return type of a gcc2
9341     builtin and then its argument prototype would still apply.  */
9342 char XmStringFree();
9343
9344 int main() {
9345 XmStringFree()
9346 ; return 0; }
9347 EOF
9348 if { (eval echo configure:9349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9349   rm -rf conftest*
9350   eval "ac_cv_lib_$ac_lib_var=yes"
9351 else
9352   echo "configure: failed program was:" >&5
9353   cat conftest.$ac_ext >&5
9354   rm -rf conftest*
9355   eval "ac_cv_lib_$ac_lib_var=no"
9356 fi
9357 rm -f conftest*
9358 xe_check_libs=""
9359
9360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9361   echo "$ac_t""yes" 1>&6
9362   have_motif=yes
9363 else
9364   echo "$ac_t""no" 1>&6
9365 have_motif=no
9366 fi
9367
9368
9369 else
9370   echo "$ac_t""no" 1>&6
9371 have_motif=no
9372 fi
9373
9374
9375   if test "$have_motif" = "yes"; then
9376         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9377 echo "configure:9378: checking for Lesstif" >&5
9378     cat > conftest.$ac_ext <<EOF
9379 #line 9380 "configure"
9380 #include "confdefs.h"
9381 #include <Xm/Xm.h>
9382 #ifdef LESSTIF_VERSION
9383 yes
9384 #endif
9385
9386 EOF
9387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9388   egrep "yes" >/dev/null 2>&1; then
9389   rm -rf conftest*
9390   have_lesstif=yes
9391 else
9392   rm -rf conftest*
9393   have_lesstif=no
9394 fi
9395 rm -f conftest*
9396
9397   echo "$ac_t""$have_lesstif" 1>&6
9398   fi
9399
9400 fi 
9401
9402 case "$with_menubars" in "" | "yes" | "athena" )
9403   with_menubars="lucid" ;;
9404 esac
9405 case "$with_dialogs" in "" | "yes" | "lucid" )
9406   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9407   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9408   else with_dialogs=no
9409   fi ;;
9410 esac
9411 case "$with_scrollbars" in "" | "yes" )
9412   with_scrollbars="lucid" ;;
9413 esac
9414 case "$with_widgets" in "" | "yes" | "lucid")
9415   if   test "$have_motif" = "yes"; then with_widgets="motif"
9416   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9417   else with_widgets=no
9418   fi ;;
9419 esac
9420
9421 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9422
9423 case "$all_widgets" in
9424   *athena* )
9425     if test "$have_xaw" != "yes"; then
9426       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9427     fi
9428
9429         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9430
9431         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9432
9433                     { test "$extra_verbose" = "yes" && cat << EOF
9434     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9435 EOF
9436 cat >> confdefs.h <<EOF
9437 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9438 EOF
9439 }
9440
9441     { test "$extra_verbose" = "yes" && cat << EOF
9442     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9443 EOF
9444 cat >> confdefs.h <<EOF
9445 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9446 EOF
9447 }
9448
9449     { test "$extra_verbose" = "yes" && cat << EOF
9450     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9451 EOF
9452 cat >> confdefs.h <<EOF
9453 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9454 EOF
9455 }
9456
9457     { test "$extra_verbose" = "yes" && cat << EOF
9458     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9459 EOF
9460 cat >> confdefs.h <<EOF
9461 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9462 EOF
9463 }
9464
9465     { test "$extra_verbose" = "yes" && cat << EOF
9466     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9467 EOF
9468 cat >> confdefs.h <<EOF
9469 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9470 EOF
9471 }
9472
9473     { test "$extra_verbose" = "yes" && cat << EOF
9474     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9475 EOF
9476 cat >> confdefs.h <<EOF
9477 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9478 EOF
9479 }
9480
9481     { test "$extra_verbose" = "yes" && cat << EOF
9482     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9483 EOF
9484 cat >> confdefs.h <<EOF
9485 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9486 EOF
9487 }
9488
9489     { test "$extra_verbose" = "yes" && cat << EOF
9490     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9491 EOF
9492 cat >> confdefs.h <<EOF
9493 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9494 EOF
9495 }
9496
9497     { test "$extra_verbose" = "yes" && cat << EOF
9498     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9499 EOF
9500 cat >> confdefs.h <<EOF
9501 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9502 EOF
9503 }
9504
9505     { test "$extra_verbose" = "yes" && cat << EOF
9506     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9507 EOF
9508 cat >> confdefs.h <<EOF
9509 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9510 EOF
9511 }
9512
9513
9514     { test "$extra_verbose" = "yes" && cat << \EOF
9515     Defining LWLIB_USES_ATHENA
9516 EOF
9517 cat >> confdefs.h <<\EOF
9518 #define LWLIB_USES_ATHENA 1
9519 EOF
9520 }
9521
9522     { test "$extra_verbose" = "yes" && cat << \EOF
9523     Defining NEED_ATHENA
9524 EOF
9525 cat >> confdefs.h <<\EOF
9526 #define NEED_ATHENA 1
9527 EOF
9528 }
9529
9530     need_athena="yes"
9531
9532     if test "$athena_3d" = "yes"; then
9533       { test "$extra_verbose" = "yes" && cat << \EOF
9534     Defining HAVE_ATHENA_3D
9535 EOF
9536 cat >> confdefs.h <<\EOF
9537 #define HAVE_ATHENA_3D 1
9538 EOF
9539 }
9540
9541     fi
9542   ;;
9543 esac
9544
9545 case "$all_widgets" in *motif* )
9546   { test "$extra_verbose" = "yes" && cat << \EOF
9547     Defining LWLIB_USES_MOTIF
9548 EOF
9549 cat >> confdefs.h <<\EOF
9550 #define LWLIB_USES_MOTIF 1
9551 EOF
9552 }
9553
9554   { test "$extra_verbose" = "yes" && cat << \EOF
9555     Defining NEED_MOTIF
9556 EOF
9557 cat >> confdefs.h <<\EOF
9558 #define NEED_MOTIF 1
9559 EOF
9560 }
9561
9562   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9563   need_motif=yes ;;
9564 esac
9565
9566 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9567 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9568 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9569 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9570         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9571 case "$with_widgets" in athena* )
9572         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;;
9573 esac
9574 case "$all_widgets" in *lucid* )
9575   { test "$extra_verbose" = "yes" && cat << \EOF
9576     Defining NEED_LUCID
9577 EOF
9578 cat >> confdefs.h <<\EOF
9579 #define NEED_LUCID 1
9580 EOF
9581 }
9582
9583   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9584 esac
9585
9586
9587
9588 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9589     Defining LWLIB_SCROLLBARS_ATHENA
9590 EOF
9591 cat >> confdefs.h <<\EOF
9592 #define LWLIB_SCROLLBARS_ATHENA 1
9593 EOF
9594 }
9595
9596 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9597     Defining LWLIB_DIALOGS_ATHENA
9598 EOF
9599 cat >> confdefs.h <<\EOF
9600 #define LWLIB_DIALOGS_ATHENA 1
9601 EOF
9602 }
9603
9604
9605 if test "$athena_3d" = "yes"; then
9606   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9607     Defining LWLIB_SCROLLBARS_ATHENA3D
9608 EOF
9609 cat >> confdefs.h <<\EOF
9610 #define LWLIB_SCROLLBARS_ATHENA3D 1
9611 EOF
9612 }
9613
9614   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9615     Defining LWLIB_DIALOGS_ATHENA3D
9616 EOF
9617 cat >> confdefs.h <<\EOF
9618 #define LWLIB_DIALOGS_ATHENA3D 1
9619 EOF
9620 }
9621
9622 fi
9623
9624 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9625     Defining LWLIB_WIDGETS_ATHENA
9626 EOF
9627 cat >> confdefs.h <<\EOF
9628 #define LWLIB_WIDGETS_ATHENA 1
9629 EOF
9630 }
9631 ;; esac
9632 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9633         { test "$extra_verbose" = "yes" && cat << \EOF
9634     Defining LWLIB_TABS_LUCID
9635 EOF
9636 cat >> confdefs.h <<\EOF
9637 #define LWLIB_TABS_LUCID 1
9638 EOF
9639 }
9640
9641
9642 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9643     Defining HAVE_MENUBARS
9644 EOF
9645 cat >> confdefs.h <<\EOF
9646 #define HAVE_MENUBARS 1
9647 EOF
9648 }
9649
9650 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9651     Defining HAVE_SCROLLBARS
9652 EOF
9653 cat >> confdefs.h <<\EOF
9654 #define HAVE_SCROLLBARS 1
9655 EOF
9656 }
9657
9658 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9659     Defining HAVE_DIALOGS
9660 EOF
9661 cat >> confdefs.h <<\EOF
9662 #define HAVE_DIALOGS 1
9663 EOF
9664 }
9665
9666 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9667     Defining HAVE_TOOLBARS
9668 EOF
9669 cat >> confdefs.h <<\EOF
9670 #define HAVE_TOOLBARS 1
9671 EOF
9672 }
9673
9674 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9675     Defining HAVE_WIDGETS
9676 EOF
9677 cat >> confdefs.h <<\EOF
9678 #define HAVE_WIDGETS 1
9679 EOF
9680 }
9681
9682
9683 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9684     Defining LWLIB_MENUBARS_LUCID
9685 EOF
9686 cat >> confdefs.h <<\EOF
9687 #define LWLIB_MENUBARS_LUCID 1
9688 EOF
9689 }
9690
9691 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9692     Defining LWLIB_SCROLLBARS_LUCID
9693 EOF
9694 cat >> confdefs.h <<\EOF
9695 #define LWLIB_SCROLLBARS_LUCID 1
9696 EOF
9697 }
9698
9699
9700 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9701     Defining LWLIB_MENUBARS_MOTIF
9702 EOF
9703 cat >> confdefs.h <<\EOF
9704 #define LWLIB_MENUBARS_MOTIF 1
9705 EOF
9706 }
9707
9708 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9709     Defining LWLIB_SCROLLBARS_MOTIF
9710 EOF
9711 cat >> confdefs.h <<\EOF
9712 #define LWLIB_SCROLLBARS_MOTIF 1
9713 EOF
9714 }
9715
9716 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9717     Defining LWLIB_DIALOGS_MOTIF
9718 EOF
9719 cat >> confdefs.h <<\EOF
9720 #define LWLIB_DIALOGS_MOTIF 1
9721 EOF
9722 }
9723
9724 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9725     Defining LWLIB_WIDGETS_MOTIF
9726 EOF
9727 cat >> confdefs.h <<\EOF
9728 #define LWLIB_WIDGETS_MOTIF 1
9729 EOF
9730 }
9731
9732
9733 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9734    echo "    xemacs will be linked with \"menubar.o\""
9735  fi
9736 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9737    echo "    xemacs will be linked with \"scrollbar.o\""
9738  fi
9739 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9740    echo "    xemacs will be linked with \"dialog.o\""
9741  fi
9742 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9743    echo "    xemacs will be linked with \"toolbar.o\""
9744  fi
9745
9746 if test "$with_gtk" = "yes"; then
9747   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9748    echo "    xemacs will be linked with \"menubar-gtk.o\""
9749  fi
9750   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9751    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9752  fi
9753   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9754    echo "    xemacs will be linked with \"dialog-gtk.o\""
9755  fi
9756   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9757    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9758  fi
9759   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9760    echo "    xemacs will be linked with \"gui-gtk.o\""
9761  fi
9762 fi
9763
9764 if test "$with_x11" = "yes"; then
9765   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9766    echo "    xemacs will be linked with \"menubar-x.o\""
9767  fi
9768   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9769    echo "    xemacs will be linked with \"scrollbar-x.o\""
9770  fi
9771   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9772    echo "    xemacs will be linked with \"dialog-x.o\""
9773  fi
9774   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9775    echo "    xemacs will be linked with \"toolbar-x.o\""
9776  fi
9777   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9778    echo "    xemacs will be linked with \"gui-x.o\""
9779  fi
9780 fi
9781
9782
9783 test -z "$with_mule" && with_mule=no
9784 test -z "$with_file_coding" && with_file_coding=no
9785
9786
9787 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9788   { test "$extra_verbose" = "yes" && cat << \EOF
9789     Defining FILE_CODING
9790 EOF
9791 cat >> confdefs.h <<\EOF
9792 #define FILE_CODING 1
9793 EOF
9794 }
9795
9796   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9797    echo "    xemacs will be linked with \"file-coding.o\""
9798  fi
9799 fi
9800
9801 if test "$with_mule" = "yes" ; then
9802   echo "checking for Mule-related features" 1>&6
9803 echo "configure:9804: checking for Mule-related features" >&5
9804   { test "$extra_verbose" = "yes" && cat << \EOF
9805     Defining MULE
9806 EOF
9807 cat >> confdefs.h <<\EOF
9808 #define MULE 1
9809 EOF
9810 }
9811
9812   { test "$extra_verbose" = "yes" && cat << \EOF
9813     Defining FILE_CODING
9814 EOF
9815 cat >> confdefs.h <<\EOF
9816 #define FILE_CODING 1
9817 EOF
9818 }
9819
9820   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9821    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9822  fi
9823   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9824     { test "$extra_verbose" = "yes" && cat << \EOF
9825     Defining TEXT_CODING
9826 EOF
9827 cat >> confdefs.h <<\EOF
9828 #define TEXT_CODING 1
9829 EOF
9830 }
9831
9832     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9833    echo "    xemacs will be linked with \"text-coding.o\""
9834  fi
9835   else
9836     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9837    echo "    xemacs will be linked with \"file-coding.o\""
9838  fi
9839   fi
9840     for ac_hdr in libintl.h
9841 do
9842 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9843 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9844 echo "configure:9845: checking for $ac_hdr" >&5
9845
9846 cat > conftest.$ac_ext <<EOF
9847 #line 9848 "configure"
9848 #include "confdefs.h"
9849 #include <$ac_hdr>
9850 EOF
9851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9852 { (eval echo configure:9853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9854 if test -z "$ac_err"; then
9855   rm -rf conftest*
9856   eval "ac_cv_header_$ac_safe=yes"
9857 else
9858   echo "$ac_err" >&5
9859   echo "configure: failed program was:" >&5
9860   cat conftest.$ac_ext >&5
9861   rm -rf conftest*
9862   eval "ac_cv_header_$ac_safe=no"
9863 fi
9864 rm -f conftest*
9865 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9866   echo "$ac_t""yes" 1>&6
9867     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9868   { test "$extra_verbose" = "yes" && cat << EOF
9869     Defining $ac_tr_hdr
9870 EOF
9871 cat >> confdefs.h <<EOF
9872 #define $ac_tr_hdr 1
9873 EOF
9874 }
9875  
9876 else
9877   echo "$ac_t""no" 1>&6
9878 fi
9879 done
9880
9881   
9882 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9883 echo "configure:9884: checking for strerror in -lintl" >&5
9884 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9885
9886 xe_check_libs=" -lintl "
9887 cat > conftest.$ac_ext <<EOF
9888 #line 9889 "configure"
9889 #include "confdefs.h"
9890 /* Override any gcc2 internal prototype to avoid an error.  */
9891 /* We use char because int might match the return type of a gcc2
9892     builtin and then its argument prototype would still apply.  */
9893 char strerror();
9894
9895 int main() {
9896 strerror()
9897 ; return 0; }
9898 EOF
9899 if { (eval echo configure:9900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9900   rm -rf conftest*
9901   eval "ac_cv_lib_$ac_lib_var=yes"
9902 else
9903   echo "configure: failed program was:" >&5
9904   cat conftest.$ac_ext >&5
9905   rm -rf conftest*
9906   eval "ac_cv_lib_$ac_lib_var=no"
9907 fi
9908 rm -f conftest*
9909 xe_check_libs=""
9910
9911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9912   echo "$ac_t""yes" 1>&6
9913     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9914     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9915   { test "$extra_verbose" = "yes" && cat << EOF
9916     Defining $ac_tr_lib
9917 EOF
9918 cat >> confdefs.h <<EOF
9919 #define $ac_tr_lib 1
9920 EOF
9921 }
9922
9923   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9924
9925 else
9926   echo "$ac_t""no" 1>&6
9927 fi
9928
9929
9930
9931   if test "$with_utf_2000" = "yes" ; then
9932     { test "$extra_verbose" = "yes" && cat << \EOF
9933     Defining CHAR_IS_UCS4
9934 EOF
9935 cat >> confdefs.h <<\EOF
9936 #define CHAR_IS_UCS4 1
9937 EOF
9938 }
9939
9940     { test "$extra_verbose" = "yes" && cat << \EOF
9941     Defining UTF2000
9942 EOF
9943 cat >> confdefs.h <<\EOF
9944 #define UTF2000 1
9945 EOF
9946 }
9947
9948   fi
9949
9950   echo "checking for Mule input methods" 1>&6
9951 echo "configure:9952: checking for Mule input methods" >&5
9952         case "$with_xim" in "" | "yes" )
9953     echo "checking for XIM" 1>&6
9954 echo "configure:9955: checking for XIM" >&5
9955     
9956 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9957 echo "configure:9958: checking for XOpenIM in -lX11" >&5
9958 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9959
9960 xe_check_libs=" -lX11 "
9961 cat > conftest.$ac_ext <<EOF
9962 #line 9963 "configure"
9963 #include "confdefs.h"
9964 /* Override any gcc2 internal prototype to avoid an error.  */
9965 /* We use char because int might match the return type of a gcc2
9966     builtin and then its argument prototype would still apply.  */
9967 char XOpenIM();
9968
9969 int main() {
9970 XOpenIM()
9971 ; return 0; }
9972 EOF
9973 if { (eval echo configure:9974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9974   rm -rf conftest*
9975   eval "ac_cv_lib_$ac_lib_var=yes"
9976 else
9977   echo "configure: failed program was:" >&5
9978   cat conftest.$ac_ext >&5
9979   rm -rf conftest*
9980   eval "ac_cv_lib_$ac_lib_var=no"
9981 fi
9982 rm -f conftest*
9983 xe_check_libs=""
9984
9985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9986   echo "$ac_t""yes" 1>&6
9987   with_xim=xlib
9988 else
9989   echo "$ac_t""no" 1>&6
9990 with_xim=no
9991 fi
9992
9993
9994         if test "$have_motif $have_lesstif" = "yes no"; then
9995       
9996 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9997 echo "configure:9998: checking for XmImMbLookupString in -lXm" >&5
9998 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9999
10000 xe_check_libs=" -lXm "
10001 cat > conftest.$ac_ext <<EOF
10002 #line 10003 "configure"
10003 #include "confdefs.h"
10004 /* Override any gcc2 internal prototype to avoid an error.  */
10005 /* We use char because int might match the return type of a gcc2
10006     builtin and then its argument prototype would still apply.  */
10007 char XmImMbLookupString();
10008
10009 int main() {
10010 XmImMbLookupString()
10011 ; return 0; }
10012 EOF
10013 if { (eval echo configure:10014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10014   rm -rf conftest*
10015   eval "ac_cv_lib_$ac_lib_var=yes"
10016 else
10017   echo "configure: failed program was:" >&5
10018   cat conftest.$ac_ext >&5
10019   rm -rf conftest*
10020   eval "ac_cv_lib_$ac_lib_var=no"
10021 fi
10022 rm -f conftest*
10023 xe_check_libs=""
10024
10025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10026   echo "$ac_t""yes" 1>&6
10027   with_xim=motif
10028 else
10029   echo "$ac_t""no" 1>&6
10030 fi
10031
10032
10033     fi ;;
10034   esac
10035   if test "$with_xim" != "no"; then
10036     { test "$extra_verbose" = "yes" && cat << \EOF
10037     Defining HAVE_XIM
10038 EOF
10039 cat >> confdefs.h <<\EOF
10040 #define HAVE_XIM 1
10041 EOF
10042 }
10043
10044     if test "$with_xim" = "xlib"; then
10045       { test "$extra_verbose" = "yes" && cat << \EOF
10046     Defining XIM_XLIB
10047 EOF
10048 cat >> confdefs.h <<\EOF
10049 #define XIM_XLIB 1
10050 EOF
10051 }
10052
10053       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10054    echo "    xemacs will be linked with \"input-method-xlib.o\""
10055  fi
10056     fi
10057     if test "$with_xim" = "motif"; then
10058       { test "$extra_verbose" = "yes" && cat << \EOF
10059     Defining XIM_MOTIF
10060 EOF
10061 cat >> confdefs.h <<\EOF
10062 #define XIM_MOTIF 1
10063 EOF
10064 }
10065
10066       need_motif=yes
10067       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10068    echo "    xemacs will be linked with \"input-method-motif.o\""
10069  fi
10070     fi
10071     if test "$with_xim" = "motif"; then
10072       with_xfs=no
10073     fi
10074   fi
10075
10076     if test "$with_xfs" = "yes" ; then
10077     echo "checking for XFontSet" 1>&6
10078 echo "configure:10079: checking for XFontSet" >&5
10079     
10080 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10081 echo "configure:10082: checking for XmbDrawString in -lX11" >&5
10082 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10083
10084 xe_check_libs=" -lX11 "
10085 cat > conftest.$ac_ext <<EOF
10086 #line 10087 "configure"
10087 #include "confdefs.h"
10088 /* Override any gcc2 internal prototype to avoid an error.  */
10089 /* We use char because int might match the return type of a gcc2
10090     builtin and then its argument prototype would still apply.  */
10091 char XmbDrawString();
10092
10093 int main() {
10094 XmbDrawString()
10095 ; return 0; }
10096 EOF
10097 if { (eval echo configure:10098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10098   rm -rf conftest*
10099   eval "ac_cv_lib_$ac_lib_var=yes"
10100 else
10101   echo "configure: failed program was:" >&5
10102   cat conftest.$ac_ext >&5
10103   rm -rf conftest*
10104   eval "ac_cv_lib_$ac_lib_var=no"
10105 fi
10106 rm -f conftest*
10107 xe_check_libs=""
10108
10109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10110   echo "$ac_t""yes" 1>&6
10111   :
10112 else
10113   echo "$ac_t""no" 1>&6
10114 with_xfs=no
10115 fi
10116
10117
10118     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10119       { test "$extra_verbose" = "yes" && cat << \EOF
10120     Defining USE_XFONTSET
10121 EOF
10122 cat >> confdefs.h <<\EOF
10123 #define USE_XFONTSET 1
10124 EOF
10125 }
10126
10127       if test "$with_xim" = "no" ; then
10128         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10129    echo "    xemacs will be linked with \"input-method-xlib.o\""
10130  fi
10131       fi
10132     fi
10133   fi 
10134     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10135   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10136 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10137 echo "configure:10138: checking for wnn/jllib.h" >&5
10138
10139 cat > conftest.$ac_ext <<EOF
10140 #line 10141 "configure"
10141 #include "confdefs.h"
10142 #include <wnn/jllib.h>
10143 EOF
10144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10145 { (eval echo configure:10146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10147 if test -z "$ac_err"; then
10148   rm -rf conftest*
10149   eval "ac_cv_header_$ac_safe=yes"
10150 else
10151   echo "$ac_err" >&5
10152   echo "configure: failed program was:" >&5
10153   cat conftest.$ac_ext >&5
10154   rm -rf conftest*
10155   eval "ac_cv_header_$ac_safe=no"
10156 fi
10157 rm -f conftest*
10158 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10159   echo "$ac_t""yes" 1>&6
10160   :
10161 else
10162   echo "$ac_t""no" 1>&6
10163 with_wnn=no
10164 fi
10165  }
10166     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10167 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10168 echo "configure:10169: checking for wnn/commonhd.h" >&5
10169
10170 cat > conftest.$ac_ext <<EOF
10171 #line 10172 "configure"
10172 #include "confdefs.h"
10173 #include <wnn/commonhd.h>
10174 EOF
10175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10176 { (eval echo configure:10177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10178 if test -z "$ac_err"; then
10179   rm -rf conftest*
10180   eval "ac_cv_header_$ac_safe=yes"
10181 else
10182   echo "$ac_err" >&5
10183   echo "configure: failed program was:" >&5
10184   cat conftest.$ac_ext >&5
10185   rm -rf conftest*
10186   eval "ac_cv_header_$ac_safe=no"
10187 fi
10188 rm -f conftest*
10189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10190   echo "$ac_t""yes" 1>&6
10191   :
10192 else
10193   echo "$ac_t""no" 1>&6
10194 with_wnn=no
10195 fi
10196  }
10197     if test "$with_wnn" != "no"; then
10198     for ac_func in crypt
10199 do
10200 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10201 echo "configure:10202: checking for $ac_func" >&5
10202
10203 cat > conftest.$ac_ext <<EOF
10204 #line 10205 "configure"
10205 #include "confdefs.h"
10206 /* System header to define __stub macros and hopefully few prototypes,
10207     which can conflict with char $ac_func(); below.  */
10208 #include <assert.h>
10209 /* Override any gcc2 internal prototype to avoid an error.  */
10210 /* We use char because int might match the return type of a gcc2
10211     builtin and then its argument prototype would still apply.  */
10212 char $ac_func();
10213
10214 int main() {
10215
10216 /* The GNU C library defines this for functions which it implements
10217     to always fail with ENOSYS.  Some functions are actually named
10218     something starting with __ and the normal name is an alias.  */
10219 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10220 choke me
10221 #else
10222 $ac_func();
10223 #endif
10224
10225 ; return 0; }
10226 EOF
10227 if { (eval echo configure:10228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10228   rm -rf conftest*
10229   eval "ac_cv_func_$ac_func=yes"
10230 else
10231   echo "configure: failed program was:" >&5
10232   cat conftest.$ac_ext >&5
10233   rm -rf conftest*
10234   eval "ac_cv_func_$ac_func=no"
10235 fi
10236 rm -f conftest*
10237
10238 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10239   echo "$ac_t""yes" 1>&6
10240     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10241   { test "$extra_verbose" = "yes" && cat << EOF
10242     Defining $ac_tr_func
10243 EOF
10244 cat >> confdefs.h <<EOF
10245 #define $ac_tr_func 1
10246 EOF
10247 }
10248  
10249 else
10250   echo "$ac_t""no" 1>&6
10251 fi
10252 done
10253
10254     test "$ac_cv_func_crypt" != "yes" && { 
10255 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10256 echo "configure:10257: checking for crypt in -lcrypt" >&5
10257 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10258
10259 xe_check_libs=" -lcrypt "
10260 cat > conftest.$ac_ext <<EOF
10261 #line 10262 "configure"
10262 #include "confdefs.h"
10263 /* Override any gcc2 internal prototype to avoid an error.  */
10264 /* We use char because int might match the return type of a gcc2
10265     builtin and then its argument prototype would still apply.  */
10266 char crypt();
10267
10268 int main() {
10269 crypt()
10270 ; return 0; }
10271 EOF
10272 if { (eval echo configure:10273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10273   rm -rf conftest*
10274   eval "ac_cv_lib_$ac_lib_var=yes"
10275 else
10276   echo "configure: failed program was:" >&5
10277   cat conftest.$ac_ext >&5
10278   rm -rf conftest*
10279   eval "ac_cv_lib_$ac_lib_var=no"
10280 fi
10281 rm -f conftest*
10282 xe_check_libs=""
10283
10284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10285   echo "$ac_t""yes" 1>&6
10286     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10287     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10288   { test "$extra_verbose" = "yes" && cat << EOF
10289     Defining $ac_tr_lib
10290 EOF
10291 cat >> confdefs.h <<EOF
10292 #define $ac_tr_lib 1
10293 EOF
10294 }
10295
10296   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10297
10298 else
10299   echo "$ac_t""no" 1>&6
10300 fi
10301
10302  }
10303   fi
10304     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10305     
10306 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10307 echo "configure:10308: checking for jl_dic_list_e in -lwnn" >&5
10308 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10309
10310 xe_check_libs=" -lwnn "
10311 cat > conftest.$ac_ext <<EOF
10312 #line 10313 "configure"
10313 #include "confdefs.h"
10314 /* Override any gcc2 internal prototype to avoid an error.  */
10315 /* We use char because int might match the return type of a gcc2
10316     builtin and then its argument prototype would still apply.  */
10317 char jl_dic_list_e();
10318
10319 int main() {
10320 jl_dic_list_e()
10321 ; return 0; }
10322 EOF
10323 if { (eval echo configure:10324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10324   rm -rf conftest*
10325   eval "ac_cv_lib_$ac_lib_var=yes"
10326 else
10327   echo "configure: failed program was:" >&5
10328   cat conftest.$ac_ext >&5
10329   rm -rf conftest*
10330   eval "ac_cv_lib_$ac_lib_var=no"
10331 fi
10332 rm -f conftest*
10333 xe_check_libs=""
10334
10335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10336   echo "$ac_t""yes" 1>&6
10337   libwnn=wnn
10338 else
10339   echo "$ac_t""no" 1>&6
10340 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10341 echo "configure:10342: checking for jl_dic_list_e in -lwnn4" >&5
10342 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10343
10344 xe_check_libs=" -lwnn4 "
10345 cat > conftest.$ac_ext <<EOF
10346 #line 10347 "configure"
10347 #include "confdefs.h"
10348 /* Override any gcc2 internal prototype to avoid an error.  */
10349 /* We use char because int might match the return type of a gcc2
10350     builtin and then its argument prototype would still apply.  */
10351 char jl_dic_list_e();
10352
10353 int main() {
10354 jl_dic_list_e()
10355 ; return 0; }
10356 EOF
10357 if { (eval echo configure:10358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10358   rm -rf conftest*
10359   eval "ac_cv_lib_$ac_lib_var=yes"
10360 else
10361   echo "configure: failed program was:" >&5
10362   cat conftest.$ac_ext >&5
10363   rm -rf conftest*
10364   eval "ac_cv_lib_$ac_lib_var=no"
10365 fi
10366 rm -f conftest*
10367 xe_check_libs=""
10368
10369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10370   echo "$ac_t""yes" 1>&6
10371   libwnn=wnn4
10372 else
10373   echo "$ac_t""no" 1>&6
10374 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10375 echo "configure:10376: checking for jl_dic_list_e in -lwnn6" >&5
10376 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10377
10378 xe_check_libs=" -lwnn6 "
10379 cat > conftest.$ac_ext <<EOF
10380 #line 10381 "configure"
10381 #include "confdefs.h"
10382 /* Override any gcc2 internal prototype to avoid an error.  */
10383 /* We use char because int might match the return type of a gcc2
10384     builtin and then its argument prototype would still apply.  */
10385 char jl_dic_list_e();
10386
10387 int main() {
10388 jl_dic_list_e()
10389 ; return 0; }
10390 EOF
10391 if { (eval echo configure:10392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10392   rm -rf conftest*
10393   eval "ac_cv_lib_$ac_lib_var=yes"
10394 else
10395   echo "configure: failed program was:" >&5
10396   cat conftest.$ac_ext >&5
10397   rm -rf conftest*
10398   eval "ac_cv_lib_$ac_lib_var=no"
10399 fi
10400 rm -f conftest*
10401 xe_check_libs=""
10402
10403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10404   echo "$ac_t""yes" 1>&6
10405   libwnn=wnn6
10406 else
10407   echo "$ac_t""no" 1>&6
10408 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10409 echo "configure:10410: checking for dic_list_e in -lwnn6_fromsrc" >&5
10410 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10411
10412 xe_check_libs=" -lwnn6_fromsrc "
10413 cat > conftest.$ac_ext <<EOF
10414 #line 10415 "configure"
10415 #include "confdefs.h"
10416 /* Override any gcc2 internal prototype to avoid an error.  */
10417 /* We use char because int might match the return type of a gcc2
10418     builtin and then its argument prototype would still apply.  */
10419 char dic_list_e();
10420
10421 int main() {
10422 dic_list_e()
10423 ; return 0; }
10424 EOF
10425 if { (eval echo configure:10426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10426   rm -rf conftest*
10427   eval "ac_cv_lib_$ac_lib_var=yes"
10428 else
10429   echo "configure: failed program was:" >&5
10430   cat conftest.$ac_ext >&5
10431   rm -rf conftest*
10432   eval "ac_cv_lib_$ac_lib_var=no"
10433 fi
10434 rm -f conftest*
10435 xe_check_libs=""
10436
10437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10438   echo "$ac_t""yes" 1>&6
10439   libwnn=wnn6_fromsrc
10440 else
10441   echo "$ac_t""no" 1>&6
10442 with_wnn=no
10443 fi
10444
10445
10446 fi
10447
10448
10449 fi
10450
10451
10452 fi
10453
10454
10455   fi
10456   test -z "$with_wnn" && with_wnn=yes
10457   if test "$with_wnn" = "yes"; then
10458     { test "$extra_verbose" = "yes" && cat << \EOF
10459     Defining HAVE_WNN
10460 EOF
10461 cat >> confdefs.h <<\EOF
10462 #define HAVE_WNN 1
10463 EOF
10464 }
10465
10466     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10467     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10468    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10469  fi
10470     if test "$with_wnn6" != "no"; then
10471       
10472 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10473 echo "configure:10474: checking for jl_fi_dic_list in -l$libwnn" >&5
10474 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10475
10476 xe_check_libs=" -l$libwnn "
10477 cat > conftest.$ac_ext <<EOF
10478 #line 10479 "configure"
10479 #include "confdefs.h"
10480 /* Override any gcc2 internal prototype to avoid an error.  */
10481 /* We use char because int might match the return type of a gcc2
10482     builtin and then its argument prototype would still apply.  */
10483 char jl_fi_dic_list();
10484
10485 int main() {
10486 jl_fi_dic_list()
10487 ; return 0; }
10488 EOF
10489 if { (eval echo configure:10490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10490   rm -rf conftest*
10491   eval "ac_cv_lib_$ac_lib_var=yes"
10492 else
10493   echo "configure: failed program was:" >&5
10494   cat conftest.$ac_ext >&5
10495   rm -rf conftest*
10496   eval "ac_cv_lib_$ac_lib_var=no"
10497 fi
10498 rm -f conftest*
10499 xe_check_libs=""
10500
10501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10502   echo "$ac_t""yes" 1>&6
10503   with_wnn6=yes
10504 else
10505   echo "$ac_t""no" 1>&6
10506 fi
10507
10508
10509       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10510     Defining WNN6
10511 EOF
10512 cat >> confdefs.h <<\EOF
10513 #define WNN6 1
10514 EOF
10515 }
10516
10517     fi
10518   fi
10519
10520     canna_includes_found=no
10521   if test "$with_canna" != "no"; then
10522     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10523 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10524 echo "configure:10525: checking for canna/jrkanji.h" >&5
10525
10526 cat > conftest.$ac_ext <<EOF
10527 #line 10528 "configure"
10528 #include "confdefs.h"
10529 #include <canna/jrkanji.h>
10530 EOF
10531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10532 { (eval echo configure:10533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10534 if test -z "$ac_err"; then
10535   rm -rf conftest*
10536   eval "ac_cv_header_$ac_safe=yes"
10537 else
10538   echo "$ac_err" >&5
10539   echo "configure: failed program was:" >&5
10540   cat conftest.$ac_ext >&5
10541   rm -rf conftest*
10542   eval "ac_cv_header_$ac_safe=no"
10543 fi
10544 rm -f conftest*
10545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10546   echo "$ac_t""yes" 1>&6
10547   canna_includes_found=yes
10548 else
10549   echo "$ac_t""no" 1>&6
10550 fi
10551
10552   fi
10553   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10554       -d "/usr/local/canna/include"; then
10555     save_c_switch_site="$c_switch_site"
10556     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10557     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10558 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10559 echo "configure:10560: checking for canna/jrkanji.h" >&5
10560
10561 cat > conftest.$ac_ext <<EOF
10562 #line 10563 "configure"
10563 #include "confdefs.h"
10564 #include <canna/jrkanji.h>
10565 EOF
10566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10567 { (eval echo configure:10568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10569 if test -z "$ac_err"; then
10570   rm -rf conftest*
10571   eval "ac_cv_header_$ac_safe=yes"
10572 else
10573   echo "$ac_err" >&5
10574   echo "configure: failed program was:" >&5
10575   cat conftest.$ac_ext >&5
10576   rm -rf conftest*
10577   eval "ac_cv_header_$ac_safe=no"
10578 fi
10579 rm -f conftest*
10580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10581   echo "$ac_t""yes" 1>&6
10582   canna_includes_found=yes
10583 else
10584   echo "$ac_t""no" 1>&6
10585 fi
10586
10587     if test "$canna_includes_found" != "yes"; then
10588       c_switch_site="$save_c_switch_site"
10589       with_canna="no"
10590     fi
10591   fi
10592
10593   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10594 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10595 echo "configure:10596: checking for canna/RK.h" >&5
10596
10597 cat > conftest.$ac_ext <<EOF
10598 #line 10599 "configure"
10599 #include "confdefs.h"
10600 #include <canna/RK.h>
10601 EOF
10602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10603 { (eval echo configure:10604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10605 if test -z "$ac_err"; then
10606   rm -rf conftest*
10607   eval "ac_cv_header_$ac_safe=yes"
10608 else
10609   echo "$ac_err" >&5
10610   echo "configure: failed program was:" >&5
10611   cat conftest.$ac_ext >&5
10612   rm -rf conftest*
10613   eval "ac_cv_header_$ac_safe=no"
10614 fi
10615 rm -f conftest*
10616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10617   echo "$ac_t""yes" 1>&6
10618   :
10619 else
10620   echo "$ac_t""no" 1>&6
10621 with_canna=no
10622 fi
10623  }
10624   test -z "$with_canna" && { 
10625 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10626 echo "configure:10627: checking for RkBgnBun in -lRKC" >&5
10627 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10628
10629 xe_check_libs=" -lRKC "
10630 cat > conftest.$ac_ext <<EOF
10631 #line 10632 "configure"
10632 #include "confdefs.h"
10633 /* Override any gcc2 internal prototype to avoid an error.  */
10634 /* We use char because int might match the return type of a gcc2
10635     builtin and then its argument prototype would still apply.  */
10636 char RkBgnBun();
10637
10638 int main() {
10639 RkBgnBun()
10640 ; return 0; }
10641 EOF
10642 if { (eval echo configure:10643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10643   rm -rf conftest*
10644   eval "ac_cv_lib_$ac_lib_var=yes"
10645 else
10646   echo "configure: failed program was:" >&5
10647   cat conftest.$ac_ext >&5
10648   rm -rf conftest*
10649   eval "ac_cv_lib_$ac_lib_var=no"
10650 fi
10651 rm -f conftest*
10652 xe_check_libs=""
10653
10654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = 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  }
10663   test -z "$with_canna" && { 
10664 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10665 echo "configure:10666: checking for jrKanjiControl in -lcanna" >&5
10666 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10667
10668 xe_check_libs=" -lcanna "
10669 cat > conftest.$ac_ext <<EOF
10670 #line 10671 "configure"
10671 #include "confdefs.h"
10672 /* Override any gcc2 internal prototype to avoid an error.  */
10673 /* We use char because int might match the return type of a gcc2
10674     builtin and then its argument prototype would still apply.  */
10675 char jrKanjiControl();
10676
10677 int main() {
10678 jrKanjiControl()
10679 ; return 0; }
10680 EOF
10681 if { (eval echo configure:10682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10682   rm -rf conftest*
10683   eval "ac_cv_lib_$ac_lib_var=yes"
10684 else
10685   echo "configure: failed program was:" >&5
10686   cat conftest.$ac_ext >&5
10687   rm -rf conftest*
10688   eval "ac_cv_lib_$ac_lib_var=no"
10689 fi
10690 rm -f conftest*
10691 xe_check_libs=""
10692
10693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10694   echo "$ac_t""yes" 1>&6
10695   :
10696 else
10697   echo "$ac_t""no" 1>&6
10698 with_canna=no
10699 fi
10700
10701  }
10702   test -z "$with_canna" && with_canna=yes
10703   if test "$with_canna" = "yes"; then
10704     { test "$extra_verbose" = "yes" && cat << \EOF
10705     Defining HAVE_CANNA
10706 EOF
10707 cat >> confdefs.h <<\EOF
10708 #define HAVE_CANNA 1
10709 EOF
10710 }
10711
10712     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10713     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10714    echo "    xemacs will be linked with \"mule-canna.o\""
10715  fi
10716   fi
10717
10718 else   for feature in xim canna wnn; do
10719     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10720       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10721     fi
10722     eval "with_${feature}=no"
10723   done
10724 fi 
10725
10726 if test "$need_motif" = "yes" ; then
10727   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10728     
10729 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10730 echo "configure:10731: checking for layout_object_getvalue in -li18n" >&5
10731 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10732
10733 xe_check_libs=" -li18n "
10734 cat > conftest.$ac_ext <<EOF
10735 #line 10736 "configure"
10736 #include "confdefs.h"
10737 /* Override any gcc2 internal prototype to avoid an error.  */
10738 /* We use char because int might match the return type of a gcc2
10739     builtin and then its argument prototype would still apply.  */
10740 char layout_object_getvalue();
10741
10742 int main() {
10743 layout_object_getvalue()
10744 ; return 0; }
10745 EOF
10746 if { (eval echo configure:10747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10747   rm -rf conftest*
10748   eval "ac_cv_lib_$ac_lib_var=yes"
10749 else
10750   echo "configure: failed program was:" >&5
10751   cat conftest.$ac_ext >&5
10752   rm -rf conftest*
10753   eval "ac_cv_lib_$ac_lib_var=no"
10754 fi
10755 rm -f conftest*
10756 xe_check_libs=""
10757
10758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10759   echo "$ac_t""yes" 1>&6
10760   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10761 else
10762   echo "$ac_t""no" 1>&6
10763 fi
10764
10765
10766   
10767 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10768     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10769   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10770   
10771         runpath="" runpath_dirs=""
10772   if test -n "$LD_RUN_PATH"; then
10773     runpath="$LD_RUN_PATH"
10774   elif test "$GCC" = "yes"; then
10775         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10776     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10777     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10778     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10779       case "$arg" in P,* | -L* | -R* )
10780         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10781           {
10782 xe_runpath_dir="$dir"
10783   test "$xe_runpath_dir" != "/lib"     -a \
10784         "$xe_runpath_dir" != "/usr/lib" -a \
10785         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10786   eval "$xe_add_unique_runpath_dir"
10787 }
10788         done ;;
10789       esac
10790     done
10791     ld_switch_run="$ld_switch_run_save"
10792     rm -f conftest*
10793   else
10794         for arg in $ld_switch_site $ld_switch_x_site; do
10795       case "$arg" in -L*) {
10796 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10797   test "$xe_runpath_dir" != "/lib"     -a \
10798         "$xe_runpath_dir" != "/usr/lib" -a \
10799         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10800   eval "$xe_add_unique_runpath_dir"
10801 };; esac
10802     done
10803         if test "$opsys $need_motif" = "sol2 yes"; then
10804       xe_runpath_dir="/opt/SUNWdt/lib";
10805       eval "$xe_add_unique_runpath_dir";
10806     fi
10807   fi 
10808   if test -n "$runpath"; then
10809     ld_switch_run="${dash_r}${runpath}"
10810     
10811 if test "$GCC" = "yes"; then
10812   set x $ld_switch_run; shift; ld_switch_run=""
10813   while test -n "$1"; do
10814     case $1 in
10815       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10816       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10817       -Xlinker* ) ;;
10818       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10819     esac
10820     shift
10821   done
10822 fi
10823     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10824   fi
10825 fi
10826
10827 fi
10828
10829 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
10830 do
10831 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10832 echo "configure:10833: checking for $ac_func" >&5
10833
10834 cat > conftest.$ac_ext <<EOF
10835 #line 10836 "configure"
10836 #include "confdefs.h"
10837 /* System header to define __stub macros and hopefully few prototypes,
10838     which can conflict with char $ac_func(); below.  */
10839 #include <assert.h>
10840 /* Override any gcc2 internal prototype to avoid an error.  */
10841 /* We use char because int might match the return type of a gcc2
10842     builtin and then its argument prototype would still apply.  */
10843 char $ac_func();
10844
10845 int main() {
10846
10847 /* The GNU C library defines this for functions which it implements
10848     to always fail with ENOSYS.  Some functions are actually named
10849     something starting with __ and the normal name is an alias.  */
10850 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10851 choke me
10852 #else
10853 $ac_func();
10854 #endif
10855
10856 ; return 0; }
10857 EOF
10858 if { (eval echo configure:10859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10859   rm -rf conftest*
10860   eval "ac_cv_func_$ac_func=yes"
10861 else
10862   echo "configure: failed program was:" >&5
10863   cat conftest.$ac_ext >&5
10864   rm -rf conftest*
10865   eval "ac_cv_func_$ac_func=no"
10866 fi
10867 rm -f conftest*
10868
10869 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10870   echo "$ac_t""yes" 1>&6
10871     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10872   { test "$extra_verbose" = "yes" && cat << EOF
10873     Defining $ac_tr_func
10874 EOF
10875 cat >> confdefs.h <<EOF
10876 #define $ac_tr_func 1
10877 EOF
10878 }
10879  
10880 else
10881   echo "$ac_t""no" 1>&6
10882 fi
10883 done
10884
10885
10886
10887 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10888 do
10889 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10890 echo "configure:10891: checking for $ac_func" >&5
10891
10892 cat > conftest.$ac_ext <<EOF
10893 #line 10894 "configure"
10894 #include "confdefs.h"
10895 /* System header to define __stub macros and hopefully few prototypes,
10896     which can conflict with char $ac_func(); below.  */
10897 #include <assert.h>
10898 /* Override any gcc2 internal prototype to avoid an error.  */
10899 /* We use char because int might match the return type of a gcc2
10900     builtin and then its argument prototype would still apply.  */
10901 char $ac_func();
10902
10903 int main() {
10904
10905 /* The GNU C library defines this for functions which it implements
10906     to always fail with ENOSYS.  Some functions are actually named
10907     something starting with __ and the normal name is an alias.  */
10908 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10909 choke me
10910 #else
10911 $ac_func();
10912 #endif
10913
10914 ; return 0; }
10915 EOF
10916 if { (eval echo configure:10917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10917   rm -rf conftest*
10918   eval "ac_cv_func_$ac_func=yes"
10919 else
10920   echo "configure: failed program was:" >&5
10921   cat conftest.$ac_ext >&5
10922   rm -rf conftest*
10923   eval "ac_cv_func_$ac_func=no"
10924 fi
10925 rm -f conftest*
10926
10927 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10928   echo "$ac_t""yes" 1>&6
10929     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10930   { test "$extra_verbose" = "yes" && cat << EOF
10931     Defining $ac_tr_func
10932 EOF
10933 cat >> confdefs.h <<EOF
10934 #define $ac_tr_func 1
10935 EOF
10936 }
10937  
10938 else
10939   echo "$ac_t""no" 1>&6
10940 fi
10941 done
10942
10943
10944 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10945 echo "configure:10946: checking for openpty" >&5
10946
10947 cat > conftest.$ac_ext <<EOF
10948 #line 10949 "configure"
10949 #include "confdefs.h"
10950 /* System header to define __stub macros and hopefully few prototypes,
10951     which can conflict with char openpty(); below.  */
10952 #include <assert.h>
10953 /* Override any gcc2 internal prototype to avoid an error.  */
10954 /* We use char because int might match the return type of a gcc2
10955     builtin and then its argument prototype would still apply.  */
10956 char openpty();
10957
10958 int main() {
10959
10960 /* The GNU C library defines this for functions which it implements
10961     to always fail with ENOSYS.  Some functions are actually named
10962     something starting with __ and the normal name is an alias.  */
10963 #if defined (__stub_openpty) || defined (__stub___openpty)
10964 choke me
10965 #else
10966 openpty();
10967 #endif
10968
10969 ; return 0; }
10970 EOF
10971 if { (eval echo configure:10972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10972   rm -rf conftest*
10973   eval "ac_cv_func_openpty=yes"
10974 else
10975   echo "configure: failed program was:" >&5
10976   cat conftest.$ac_ext >&5
10977   rm -rf conftest*
10978   eval "ac_cv_func_openpty=no"
10979 fi
10980 rm -f conftest*
10981
10982 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10983   echo "$ac_t""yes" 1>&6
10984   have_openpty=yes
10985 else
10986   echo "$ac_t""no" 1>&6
10987
10988   
10989 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10990 echo "configure:10991: checking for openpty in -lutil" >&5
10991 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10992
10993 xe_check_libs=" -lutil "
10994 cat > conftest.$ac_ext <<EOF
10995 #line 10996 "configure"
10996 #include "confdefs.h"
10997 /* Override any gcc2 internal prototype to avoid an error.  */
10998 /* We use char because int might match the return type of a gcc2
10999     builtin and then its argument prototype would still apply.  */
11000 char openpty();
11001
11002 int main() {
11003 openpty()
11004 ; return 0; }
11005 EOF
11006 if { (eval echo configure:11007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11007   rm -rf conftest*
11008   eval "ac_cv_lib_$ac_lib_var=yes"
11009 else
11010   echo "configure: failed program was:" >&5
11011   cat conftest.$ac_ext >&5
11012   rm -rf conftest*
11013   eval "ac_cv_lib_$ac_lib_var=no"
11014 fi
11015 rm -f conftest*
11016 xe_check_libs=""
11017
11018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11019   echo "$ac_t""yes" 1>&6
11020   have_openpty=yes need_libutil=yes
11021 else
11022   echo "$ac_t""no" 1>&6
11023 fi
11024
11025
11026 fi
11027
11028 if test "$have_openpty" = "yes"; then
11029   { test "$extra_verbose" = "yes" && cat << \EOF
11030     Defining HAVE_OPENPTY
11031 EOF
11032 cat >> confdefs.h <<\EOF
11033 #define HAVE_OPENPTY 1
11034 EOF
11035 }
11036
11037   for ac_hdr in pty.h libutil.h util.h
11038 do
11039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11041 echo "configure:11042: checking for $ac_hdr" >&5
11042
11043 cat > conftest.$ac_ext <<EOF
11044 #line 11045 "configure"
11045 #include "confdefs.h"
11046 #include <$ac_hdr>
11047 EOF
11048 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11049 { (eval echo configure:11050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11050 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11051 if test -z "$ac_err"; then
11052   rm -rf conftest*
11053   eval "ac_cv_header_$ac_safe=yes"
11054 else
11055   echo "$ac_err" >&5
11056   echo "configure: failed program was:" >&5
11057   cat conftest.$ac_ext >&5
11058   rm -rf conftest*
11059   eval "ac_cv_header_$ac_safe=no"
11060 fi
11061 rm -f conftest*
11062 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11063   echo "$ac_t""yes" 1>&6
11064     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11065   { test "$extra_verbose" = "yes" && cat << EOF
11066     Defining $ac_tr_hdr
11067 EOF
11068 cat >> confdefs.h <<EOF
11069 #define $ac_tr_hdr 1
11070 EOF
11071 }
11072  break
11073 else
11074   echo "$ac_t""no" 1>&6
11075 fi
11076 done
11077
11078   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11079 fi
11080
11081 for ac_hdr in stropts.h
11082 do
11083 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11084 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11085 echo "configure:11086: checking for $ac_hdr" >&5
11086
11087 cat > conftest.$ac_ext <<EOF
11088 #line 11089 "configure"
11089 #include "confdefs.h"
11090 #include <$ac_hdr>
11091 EOF
11092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11093 { (eval echo configure:11094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11095 if test -z "$ac_err"; then
11096   rm -rf conftest*
11097   eval "ac_cv_header_$ac_safe=yes"
11098 else
11099   echo "$ac_err" >&5
11100   echo "configure: failed program was:" >&5
11101   cat conftest.$ac_ext >&5
11102   rm -rf conftest*
11103   eval "ac_cv_header_$ac_safe=no"
11104 fi
11105 rm -f conftest*
11106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11107   echo "$ac_t""yes" 1>&6
11108     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11109   { test "$extra_verbose" = "yes" && cat << EOF
11110     Defining $ac_tr_hdr
11111 EOF
11112 cat >> confdefs.h <<EOF
11113 #define $ac_tr_hdr 1
11114 EOF
11115 }
11116  
11117 else
11118   echo "$ac_t""no" 1>&6
11119 fi
11120 done
11121
11122 if test "$ac_cv_header_stropts_h" = "yes"; then
11123   for ac_func in isastream
11124 do
11125 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11126 echo "configure:11127: checking for $ac_func" >&5
11127
11128 cat > conftest.$ac_ext <<EOF
11129 #line 11130 "configure"
11130 #include "confdefs.h"
11131 /* System header to define __stub macros and hopefully few prototypes,
11132     which can conflict with char $ac_func(); below.  */
11133 #include <assert.h>
11134 /* Override any gcc2 internal prototype to avoid an error.  */
11135 /* We use char because int might match the return type of a gcc2
11136     builtin and then its argument prototype would still apply.  */
11137 char $ac_func();
11138
11139 int main() {
11140
11141 /* The GNU C library defines this for functions which it implements
11142     to always fail with ENOSYS.  Some functions are actually named
11143     something starting with __ and the normal name is an alias.  */
11144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11145 choke me
11146 #else
11147 $ac_func();
11148 #endif
11149
11150 ; return 0; }
11151 EOF
11152 if { (eval echo configure:11153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11153   rm -rf conftest*
11154   eval "ac_cv_func_$ac_func=yes"
11155 else
11156   echo "configure: failed program was:" >&5
11157   cat conftest.$ac_ext >&5
11158   rm -rf conftest*
11159   eval "ac_cv_func_$ac_func=no"
11160 fi
11161 rm -f conftest*
11162
11163 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11164   echo "$ac_t""yes" 1>&6
11165     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11166   { test "$extra_verbose" = "yes" && cat << EOF
11167     Defining $ac_tr_func
11168 EOF
11169 cat >> confdefs.h <<EOF
11170 #define $ac_tr_func 1
11171 EOF
11172 }
11173  
11174 else
11175   echo "$ac_t""no" 1>&6
11176 fi
11177 done
11178
11179   for ac_hdr in strtio.h
11180 do
11181 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11182 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11183 echo "configure:11184: checking for $ac_hdr" >&5
11184
11185 cat > conftest.$ac_ext <<EOF
11186 #line 11187 "configure"
11187 #include "confdefs.h"
11188 #include <$ac_hdr>
11189 EOF
11190 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11191 { (eval echo configure:11192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11192 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11193 if test -z "$ac_err"; then
11194   rm -rf conftest*
11195   eval "ac_cv_header_$ac_safe=yes"
11196 else
11197   echo "$ac_err" >&5
11198   echo "configure: failed program was:" >&5
11199   cat conftest.$ac_ext >&5
11200   rm -rf conftest*
11201   eval "ac_cv_header_$ac_safe=no"
11202 fi
11203 rm -f conftest*
11204 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11205   echo "$ac_t""yes" 1>&6
11206     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11207   { test "$extra_verbose" = "yes" && cat << EOF
11208     Defining $ac_tr_hdr
11209 EOF
11210 cat >> confdefs.h <<EOF
11211 #define $ac_tr_hdr 1
11212 EOF
11213 }
11214  
11215 else
11216   echo "$ac_t""no" 1>&6
11217 fi
11218 done
11219  fi
11220
11221 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11222    echo "    xemacs will be linked with \"realpath.o\""
11223  fi
11224
11225 for ac_func in getloadavg
11226 do
11227 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11228 echo "configure:11229: checking for $ac_func" >&5
11229
11230 cat > conftest.$ac_ext <<EOF
11231 #line 11232 "configure"
11232 #include "confdefs.h"
11233 /* System header to define __stub macros and hopefully few prototypes,
11234     which can conflict with char $ac_func(); below.  */
11235 #include <assert.h>
11236 /* Override any gcc2 internal prototype to avoid an error.  */
11237 /* We use char because int might match the return type of a gcc2
11238     builtin and then its argument prototype would still apply.  */
11239 char $ac_func();
11240
11241 int main() {
11242
11243 /* The GNU C library defines this for functions which it implements
11244     to always fail with ENOSYS.  Some functions are actually named
11245     something starting with __ and the normal name is an alias.  */
11246 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11247 choke me
11248 #else
11249 $ac_func();
11250 #endif
11251
11252 ; return 0; }
11253 EOF
11254 if { (eval echo configure:11255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11255   rm -rf conftest*
11256   eval "ac_cv_func_$ac_func=yes"
11257 else
11258   echo "configure: failed program was:" >&5
11259   cat conftest.$ac_ext >&5
11260   rm -rf conftest*
11261   eval "ac_cv_func_$ac_func=no"
11262 fi
11263 rm -f conftest*
11264
11265 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11266   echo "$ac_t""yes" 1>&6
11267     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11268   { test "$extra_verbose" = "yes" && cat << EOF
11269     Defining $ac_tr_func
11270 EOF
11271 cat >> confdefs.h <<EOF
11272 #define $ac_tr_func 1
11273 EOF
11274 }
11275  
11276 else
11277   echo "$ac_t""no" 1>&6
11278 fi
11279 done
11280
11281
11282 if test "$ac_cv_func_getloadavg" = "yes"; then
11283         for ac_hdr in sys/loadavg.h
11284 do
11285 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11286 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11287 echo "configure:11288: checking for $ac_hdr" >&5
11288
11289 cat > conftest.$ac_ext <<EOF
11290 #line 11291 "configure"
11291 #include "confdefs.h"
11292 #include <$ac_hdr>
11293 EOF
11294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11295 { (eval echo configure:11296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11297 if test -z "$ac_err"; then
11298   rm -rf conftest*
11299   eval "ac_cv_header_$ac_safe=yes"
11300 else
11301   echo "$ac_err" >&5
11302   echo "configure: failed program was:" >&5
11303   cat conftest.$ac_ext >&5
11304   rm -rf conftest*
11305   eval "ac_cv_header_$ac_safe=no"
11306 fi
11307 rm -f conftest*
11308 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11309   echo "$ac_t""yes" 1>&6
11310     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11311   { test "$extra_verbose" = "yes" && cat << EOF
11312     Defining $ac_tr_hdr
11313 EOF
11314 cat >> confdefs.h <<EOF
11315 #define $ac_tr_hdr 1
11316 EOF
11317 }
11318  
11319 else
11320   echo "$ac_t""no" 1>&6
11321 fi
11322 done
11323
11324 else
11325     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11326    echo "    xemacs will be linked with \"getloadavg.o\""
11327  fi
11328
11329     
11330 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11331 echo "configure:11332: checking for kstat_open in -lkstat" >&5
11332 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11333
11334 xe_check_libs=" -lkstat "
11335 cat > conftest.$ac_ext <<EOF
11336 #line 11337 "configure"
11337 #include "confdefs.h"
11338 /* Override any gcc2 internal prototype to avoid an error.  */
11339 /* We use char because int might match the return type of a gcc2
11340     builtin and then its argument prototype would still apply.  */
11341 char kstat_open();
11342
11343 int main() {
11344 kstat_open()
11345 ; return 0; }
11346 EOF
11347 if { (eval echo configure:11348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11348   rm -rf conftest*
11349   eval "ac_cv_lib_$ac_lib_var=yes"
11350 else
11351   echo "configure: failed program was:" >&5
11352   cat conftest.$ac_ext >&5
11353   rm -rf conftest*
11354   eval "ac_cv_lib_$ac_lib_var=no"
11355 fi
11356 rm -f conftest*
11357 xe_check_libs=""
11358
11359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11360   echo "$ac_t""yes" 1>&6
11361     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11362     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11363   { test "$extra_verbose" = "yes" && cat << EOF
11364     Defining $ac_tr_lib
11365 EOF
11366 cat >> confdefs.h <<EOF
11367 #define $ac_tr_lib 1
11368 EOF
11369 }
11370
11371   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11372
11373 else
11374   echo "$ac_t""no" 1>&6
11375 fi
11376
11377
11378   for ac_hdr in kstat.h
11379 do
11380 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11381 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11382 echo "configure:11383: checking for $ac_hdr" >&5
11383
11384 cat > conftest.$ac_ext <<EOF
11385 #line 11386 "configure"
11386 #include "confdefs.h"
11387 #include <$ac_hdr>
11388 EOF
11389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11390 { (eval echo configure:11391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11392 if test -z "$ac_err"; then
11393   rm -rf conftest*
11394   eval "ac_cv_header_$ac_safe=yes"
11395 else
11396   echo "$ac_err" >&5
11397   echo "configure: failed program was:" >&5
11398   cat conftest.$ac_ext >&5
11399   rm -rf conftest*
11400   eval "ac_cv_header_$ac_safe=no"
11401 fi
11402 rm -f conftest*
11403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11404   echo "$ac_t""yes" 1>&6
11405     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11406   { test "$extra_verbose" = "yes" && cat << EOF
11407     Defining $ac_tr_hdr
11408 EOF
11409 cat >> confdefs.h <<EOF
11410 #define $ac_tr_hdr 1
11411 EOF
11412 }
11413  
11414 else
11415   echo "$ac_t""no" 1>&6
11416 fi
11417 done
11418
11419
11420     
11421 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11422 echo "configure:11423: checking for kvm_read in -lkvm" >&5
11423 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11424
11425 xe_check_libs=" -lkvm "
11426 cat > conftest.$ac_ext <<EOF
11427 #line 11428 "configure"
11428 #include "confdefs.h"
11429 /* Override any gcc2 internal prototype to avoid an error.  */
11430 /* We use char because int might match the return type of a gcc2
11431     builtin and then its argument prototype would still apply.  */
11432 char kvm_read();
11433
11434 int main() {
11435 kvm_read()
11436 ; return 0; }
11437 EOF
11438 if { (eval echo configure:11439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11439   rm -rf conftest*
11440   eval "ac_cv_lib_$ac_lib_var=yes"
11441 else
11442   echo "configure: failed program was:" >&5
11443   cat conftest.$ac_ext >&5
11444   rm -rf conftest*
11445   eval "ac_cv_lib_$ac_lib_var=no"
11446 fi
11447 rm -f conftest*
11448 xe_check_libs=""
11449
11450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11451   echo "$ac_t""yes" 1>&6
11452     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11453     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11454   { test "$extra_verbose" = "yes" && cat << EOF
11455     Defining $ac_tr_lib
11456 EOF
11457 cat >> confdefs.h <<EOF
11458 #define $ac_tr_lib 1
11459 EOF
11460 }
11461
11462   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11463
11464 else
11465   echo "$ac_t""no" 1>&6
11466 fi
11467
11468
11469 fi
11470
11471 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11472 echo "configure:11473: checking whether netdb declares h_errno" >&5
11473 cat > conftest.$ac_ext <<EOF
11474 #line 11475 "configure"
11475 #include "confdefs.h"
11476 #include <netdb.h>
11477 int main() {
11478 return h_errno;
11479 ; return 0; }
11480 EOF
11481 if { (eval echo configure:11482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11482   rm -rf conftest*
11483   echo "$ac_t""yes" 1>&6
11484    { test "$extra_verbose" = "yes" && cat << \EOF
11485     Defining HAVE_H_ERRNO
11486 EOF
11487 cat >> confdefs.h <<\EOF
11488 #define HAVE_H_ERRNO 1
11489 EOF
11490 }
11491
11492 else
11493   echo "configure: failed program was:" >&5
11494   cat conftest.$ac_ext >&5
11495   rm -rf conftest*
11496   echo "$ac_t""no" 1>&6
11497 fi
11498 rm -f conftest*
11499
11500 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11501 echo "configure:11502: checking for sigsetjmp" >&5
11502 cat > conftest.$ac_ext <<EOF
11503 #line 11504 "configure"
11504 #include "confdefs.h"
11505 #include <setjmp.h>
11506 int main() {
11507 sigjmp_buf bar; sigsetjmp (bar, 0);
11508 ; return 0; }
11509 EOF
11510 if { (eval echo configure:11511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11511   rm -rf conftest*
11512   echo "$ac_t""yes" 1>&6
11513    { test "$extra_verbose" = "yes" && cat << \EOF
11514     Defining HAVE_SIGSETJMP
11515 EOF
11516 cat >> confdefs.h <<\EOF
11517 #define HAVE_SIGSETJMP 1
11518 EOF
11519 }
11520
11521 else
11522   echo "configure: failed program was:" >&5
11523   cat conftest.$ac_ext >&5
11524   rm -rf conftest*
11525   echo "$ac_t""no" 1>&6
11526 fi
11527 rm -f conftest*
11528
11529 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11530 echo "configure:11531: checking whether localtime caches TZ" >&5
11531
11532 if test "$ac_cv_func_tzset" = "yes"; then
11533 cat > conftest.$ac_ext <<EOF
11534 #line 11535 "configure"
11535 #include "confdefs.h"
11536 #include <time.h>
11537 #if STDC_HEADERS
11538 # include <stdlib.h>
11539 #endif
11540 extern char **environ;
11541 unset_TZ ()
11542 {
11543   char **from, **to;
11544   for (to = from = environ; (*to = *from); from++)
11545     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11546       to++;
11547 }
11548 char TZ_GMT0[] = "TZ=GMT0";
11549 char TZ_PST8[] = "TZ=PST8";
11550 main()
11551 {
11552   time_t now = time ((time_t *) 0);
11553   int hour_GMT0, hour_unset;
11554   if (putenv (TZ_GMT0) != 0)
11555     exit (1);
11556   hour_GMT0 = localtime (&now)->tm_hour;
11557   unset_TZ ();
11558   hour_unset = localtime (&now)->tm_hour;
11559   if (putenv (TZ_PST8) != 0)
11560     exit (1);
11561   if (localtime (&now)->tm_hour == hour_GMT0)
11562     exit (1);
11563   unset_TZ ();
11564   if (localtime (&now)->tm_hour != hour_unset)
11565     exit (1);
11566   exit (0);
11567 }
11568 EOF
11569 if { (eval echo configure:11570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11570 then
11571   emacs_cv_localtime_cache=no
11572 else
11573   conftest_rc="$?"
11574   echo "configure: failed program was:" >&5
11575   cat conftest.$ac_ext >&5
11576   rm -fr conftest*
11577   emacs_cv_localtime_cache=yes
11578 fi
11579 rm -fr conftest*
11580 else
11581         # If we lack tzset, report that localtime does not cache TZ,
11582         # since we can't invalidate the cache if we don't have tzset.
11583         emacs_cv_localtime_cache=no
11584 fi
11585 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11586 if test $emacs_cv_localtime_cache = yes; then
11587   { test "$extra_verbose" = "yes" && cat << \EOF
11588     Defining LOCALTIME_CACHE
11589 EOF
11590 cat >> confdefs.h <<\EOF
11591 #define LOCALTIME_CACHE 1
11592 EOF
11593 }
11594
11595 fi
11596
11597 if test "$HAVE_TIMEVAL" = "yes"; then
11598 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11599 echo "configure:11600: checking whether gettimeofday accepts one or two arguments" >&5
11600 cat > conftest.$ac_ext <<EOF
11601 #line 11602 "configure"
11602 #include "confdefs.h"
11603
11604 #ifdef TIME_WITH_SYS_TIME
11605 #include <sys/time.h>
11606 #include <time.h>
11607 #else
11608 #ifdef HAVE_SYS_TIME_H
11609 #include <sys/time.h>
11610 #else
11611 #include <time.h>
11612 #endif
11613 #endif
11614   
11615 int main() {
11616
11617   struct timeval time;
11618   gettimeofday (&time, 0);
11619
11620 ; return 0; }
11621 EOF
11622 if { (eval echo configure:11623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11623   rm -rf conftest*
11624   echo "$ac_t""two" 1>&6
11625 else
11626   echo "configure: failed program was:" >&5
11627   cat conftest.$ac_ext >&5
11628   rm -rf conftest*
11629   echo "$ac_t""one" 1>&6
11630    { test "$extra_verbose" = "yes" && cat << \EOF
11631     Defining GETTIMEOFDAY_ONE_ARGUMENT
11632 EOF
11633 cat >> confdefs.h <<\EOF
11634 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11635 EOF
11636 }
11637
11638 fi
11639 rm -f conftest*
11640 fi
11641
11642
11643 echo $ac_n "checking for inline""... $ac_c" 1>&6
11644 echo "configure:11645: checking for inline" >&5
11645
11646 ac_cv_c_inline=no
11647 for ac_kw in inline __inline__ __inline; do
11648   cat > conftest.$ac_ext <<EOF
11649 #line 11650 "configure"
11650 #include "confdefs.h"
11651
11652 int main() {
11653 } $ac_kw foo() {
11654 ; return 0; }
11655 EOF
11656 if { (eval echo configure:11657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11657   rm -rf conftest*
11658   ac_cv_c_inline=$ac_kw; break
11659 else
11660   echo "configure: failed program was:" >&5
11661   cat conftest.$ac_ext >&5
11662 fi
11663 rm -f conftest*
11664 done
11665
11666
11667 echo "$ac_t""$ac_cv_c_inline" 1>&6
11668 case "$ac_cv_c_inline" in
11669   inline | yes) ;;
11670   no) { test "$extra_verbose" = "yes" && cat << \EOF
11671     Defining inline = 
11672 EOF
11673 cat >> confdefs.h <<\EOF
11674 #define inline 
11675 EOF
11676 }
11677  ;;
11678   *)  { test "$extra_verbose" = "yes" && cat << EOF
11679     Defining inline = $ac_cv_c_inline
11680 EOF
11681 cat >> confdefs.h <<EOF
11682 #define inline $ac_cv_c_inline
11683 EOF
11684 }
11685  ;;
11686 esac
11687
11688 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11689    echo "    xemacs will be linked with \"inline.o\""
11690  fi
11691
11692
11693 if test "$__DECC" != "yes"; then
11694   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11695 # for constant arguments.  Useless!
11696 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11697 echo "configure:11698: checking for working alloca.h" >&5
11698
11699 cat > conftest.$ac_ext <<EOF
11700 #line 11701 "configure"
11701 #include "confdefs.h"
11702 #include <alloca.h>
11703 int main() {
11704 char *p = alloca(2 * sizeof(int));
11705 ; return 0; }
11706 EOF
11707 if { (eval echo configure:11708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11708   rm -rf conftest*
11709   ac_cv_header_alloca_h=yes
11710 else
11711   echo "configure: failed program was:" >&5
11712   cat conftest.$ac_ext >&5
11713   rm -rf conftest*
11714   ac_cv_header_alloca_h=no
11715 fi
11716 rm -f conftest*
11717
11718 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11719 if test $ac_cv_header_alloca_h = yes; then
11720   { test "$extra_verbose" = "yes" && cat << \EOF
11721     Defining HAVE_ALLOCA_H
11722 EOF
11723 cat >> confdefs.h <<\EOF
11724 #define HAVE_ALLOCA_H 1
11725 EOF
11726 }
11727
11728 fi
11729
11730 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11731 echo "configure:11732: checking for alloca" >&5
11732
11733 cat > conftest.$ac_ext <<EOF
11734 #line 11735 "configure"
11735 #include "confdefs.h"
11736
11737 #ifdef __GNUC__
11738 # define alloca __builtin_alloca
11739 #else
11740 # ifdef _MSC_VER
11741 #  include <malloc.h>
11742 #  define alloca _alloca
11743 # else
11744 #  if HAVE_ALLOCA_H
11745 #   include <alloca.h>
11746 #  else
11747 #   ifdef _AIX
11748  #pragma alloca
11749 #   else
11750 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11751 char *alloca ();
11752 #    endif
11753 #   endif
11754 #  endif
11755 # endif
11756 #endif
11757
11758 int main() {
11759 char *p = (char *) alloca(1);
11760 ; return 0; }
11761 EOF
11762 if { (eval echo configure:11763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11763   rm -rf conftest*
11764   ac_cv_func_alloca_works=yes
11765 else
11766   echo "configure: failed program was:" >&5
11767   cat conftest.$ac_ext >&5
11768   rm -rf conftest*
11769   ac_cv_func_alloca_works=no
11770 fi
11771 rm -f conftest*
11772
11773 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11774 if test $ac_cv_func_alloca_works = yes; then
11775   { test "$extra_verbose" = "yes" && cat << \EOF
11776     Defining HAVE_ALLOCA
11777 EOF
11778 cat >> confdefs.h <<\EOF
11779 #define HAVE_ALLOCA 1
11780 EOF
11781 }
11782
11783 fi
11784
11785 if test $ac_cv_func_alloca_works = no; then
11786   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11787   # that cause trouble.  Some versions do not even contain alloca or
11788   # contain a buggy version.  If you still want to use their alloca,
11789   # use ar to extract alloca.o from them instead of compiling alloca.c.
11790   ALLOCA=alloca.${ac_objext}
11791   { test "$extra_verbose" = "yes" && cat << \EOF
11792     Defining C_ALLOCA
11793 EOF
11794 cat >> confdefs.h <<\EOF
11795 #define C_ALLOCA 1
11796 EOF
11797 }
11798
11799
11800 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11801 echo "configure:11802: checking whether alloca needs Cray hooks" >&5
11802
11803 cat > conftest.$ac_ext <<EOF
11804 #line 11805 "configure"
11805 #include "confdefs.h"
11806 #if defined(CRAY) && ! defined(CRAY2)
11807 webecray
11808 #else
11809 wenotbecray
11810 #endif
11811
11812 EOF
11813 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11814   egrep "webecray" >/dev/null 2>&1; then
11815   rm -rf conftest*
11816   ac_cv_os_cray=yes
11817 else
11818   rm -rf conftest*
11819   ac_cv_os_cray=no
11820 fi
11821 rm -f conftest*
11822
11823
11824 echo "$ac_t""$ac_cv_os_cray" 1>&6
11825 if test $ac_cv_os_cray = yes; then
11826 for ac_func in _getb67 GETB67 getb67; do
11827   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11828 echo "configure:11829: checking for $ac_func" >&5
11829
11830 cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 /* System header to define __stub macros and hopefully few prototypes,
11834     which can conflict with char $ac_func(); below.  */
11835 #include <assert.h>
11836 /* Override any gcc2 internal prototype to avoid an error.  */
11837 /* We use char because int might match the return type of a gcc2
11838     builtin and then its argument prototype would still apply.  */
11839 char $ac_func();
11840
11841 int main() {
11842
11843 /* The GNU C library defines this for functions which it implements
11844     to always fail with ENOSYS.  Some functions are actually named
11845     something starting with __ and the normal name is an alias.  */
11846 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11847 choke me
11848 #else
11849 $ac_func();
11850 #endif
11851
11852 ; return 0; }
11853 EOF
11854 if { (eval echo configure:11855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11855   rm -rf conftest*
11856   eval "ac_cv_func_$ac_func=yes"
11857 else
11858   echo "configure: failed program was:" >&5
11859   cat conftest.$ac_ext >&5
11860   rm -rf conftest*
11861   eval "ac_cv_func_$ac_func=no"
11862 fi
11863 rm -f conftest*
11864
11865 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11866   echo "$ac_t""yes" 1>&6
11867   { test "$extra_verbose" = "yes" && cat << EOF
11868     Defining CRAY_STACKSEG_END = $ac_func
11869 EOF
11870 cat >> confdefs.h <<EOF
11871 #define CRAY_STACKSEG_END $ac_func
11872 EOF
11873 }
11874
11875   break
11876 else
11877   echo "$ac_t""no" 1>&6
11878 fi
11879
11880 done
11881 fi
11882
11883 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11884 echo "configure:11885: checking stack direction for C alloca" >&5
11885
11886 cat > conftest.$ac_ext <<EOF
11887 #line 11888 "configure"
11888 #include "confdefs.h"
11889 find_stack_direction ()
11890 {
11891   static char *addr = 0;
11892   auto char dummy;
11893   if (addr == 0)
11894     {
11895       addr = &dummy;
11896       return find_stack_direction ();
11897     }
11898   else
11899     return (&dummy > addr) ? 1 : -1;
11900 }
11901 main ()
11902 {
11903   exit (find_stack_direction() < 0);
11904 }
11905 EOF
11906 if { (eval echo configure:11907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11907 then
11908   ac_cv_c_stack_direction=1
11909 else
11910   conftest_rc="$?"
11911   echo "configure: failed program was:" >&5
11912   cat conftest.$ac_ext >&5
11913   rm -fr conftest*
11914   ac_cv_c_stack_direction=-1
11915 fi
11916 rm -fr conftest*
11917
11918 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11919 { test "$extra_verbose" = "yes" && cat << EOF
11920     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11921 EOF
11922 cat >> confdefs.h <<EOF
11923 #define STACK_DIRECTION $ac_cv_c_stack_direction
11924 EOF
11925 }
11926
11927 fi
11928
11929   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11930    echo "    xemacs will be linked with \"$ALLOCA\""
11931  fi
11932 fi
11933
11934 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11935 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11936 echo "configure:11937: checking for vfork.h" >&5
11937
11938 cat > conftest.$ac_ext <<EOF
11939 #line 11940 "configure"
11940 #include "confdefs.h"
11941 #include <vfork.h>
11942 EOF
11943 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11944 { (eval echo configure:11945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11945 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11946 if test -z "$ac_err"; then
11947   rm -rf conftest*
11948   eval "ac_cv_header_$ac_safe=yes"
11949 else
11950   echo "$ac_err" >&5
11951   echo "configure: failed program was:" >&5
11952   cat conftest.$ac_ext >&5
11953   rm -rf conftest*
11954   eval "ac_cv_header_$ac_safe=no"
11955 fi
11956 rm -f conftest*
11957 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11958   echo "$ac_t""yes" 1>&6
11959   { test "$extra_verbose" = "yes" && cat << \EOF
11960     Defining HAVE_VFORK_H
11961 EOF
11962 cat >> confdefs.h <<\EOF
11963 #define HAVE_VFORK_H 1
11964 EOF
11965 }
11966
11967 else
11968   echo "$ac_t""no" 1>&6
11969 fi
11970
11971 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11972 echo "configure:11973: checking for working vfork" >&5
11973
11974 cat > conftest.$ac_ext <<EOF
11975 #line 11976 "configure"
11976 #include "confdefs.h"
11977 /* Thanks to Paul Eggert for this test.  */
11978 #include <stdio.h>
11979 #include <sys/types.h>
11980 #include <sys/stat.h>
11981 #ifdef HAVE_UNISTD_H
11982 #include <unistd.h>
11983 #endif
11984 #ifdef HAVE_VFORK_H
11985 #include <vfork.h>
11986 #endif
11987 /* On some sparc systems, changes by the child to local and incoming
11988    argument registers are propagated back to the parent.
11989    The compiler is told about this with #include <vfork.h>,
11990    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11991    Test for this by using a static variable whose address
11992    is put into a register that is clobbered by the vfork.  */
11993 static
11994 #ifdef __cplusplus
11995 sparc_address_test (int arg)
11996 #else
11997 sparc_address_test (arg) int arg;
11998 #endif
11999 {
12000   static pid_t child;
12001   if (!child) {
12002     child = vfork ();
12003     if (child < 0) {
12004       perror ("vfork");
12005       _exit(2);
12006     }
12007     if (!child) {
12008       arg = getpid();
12009       write(-1, "", 0);
12010       _exit (arg);
12011     }
12012   }
12013 }
12014 main() {
12015   pid_t parent = getpid ();
12016   pid_t child;
12017
12018   sparc_address_test ();
12019
12020   child = vfork ();
12021
12022   if (child == 0) {
12023     /* Here is another test for sparc vfork register problems.
12024        This test uses lots of local variables, at least
12025        as many local variables as main has allocated so far
12026        including compiler temporaries.  4 locals are enough for
12027        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12028        A buggy compiler should reuse the register of parent
12029        for one of the local variables, since it will think that
12030        parent can't possibly be used any more in this routine.
12031        Assigning to the local variable will thus munge parent
12032        in the parent process.  */
12033     pid_t
12034       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12035       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12036     /* Convince the compiler that p..p7 are live; otherwise, it might
12037        use the same hardware register for all 8 local variables.  */
12038     if (p != p1 || p != p2 || p != p3 || p != p4
12039         || p != p5 || p != p6 || p != p7)
12040       _exit(1);
12041
12042     /* On some systems (e.g. IRIX 3.3),
12043        vfork doesn't separate parent from child file descriptors.
12044        If the child closes a descriptor before it execs or exits,
12045        this munges the parent's descriptor as well.
12046        Test for this by closing stdout in the child.  */
12047     _exit(close(fileno(stdout)) != 0);
12048   } else {
12049     int status;
12050     struct stat st;
12051
12052     while (wait(&status) != child)
12053       ;
12054     exit(
12055          /* Was there some problem with vforking?  */
12056          child < 0
12057
12058          /* Did the child fail?  (This shouldn't happen.)  */
12059          || status
12060
12061          /* Did the vfork/compiler bug occur?  */
12062          || parent != getpid()
12063
12064          /* Did the file descriptor bug occur?  */
12065          || fstat(fileno(stdout), &st) != 0
12066          );
12067   }
12068 }
12069 EOF
12070 if { (eval echo configure:12071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12071 then
12072   ac_cv_func_vfork_works=yes
12073 else
12074   conftest_rc="$?"
12075   echo "configure: failed program was:" >&5
12076   cat conftest.$ac_ext >&5
12077   rm -fr conftest*
12078   ac_cv_func_vfork_works=no
12079 fi
12080 rm -fr conftest*
12081
12082 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12083 if test $ac_cv_func_vfork_works = no; then
12084   { test "$extra_verbose" = "yes" && cat << \EOF
12085     Defining vfork = fork
12086 EOF
12087 cat >> confdefs.h <<\EOF
12088 #define vfork fork
12089 EOF
12090 }
12091
12092 fi
12093
12094
12095 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12096 echo "configure:12097: checking for working strcoll" >&5
12097
12098 cat > conftest.$ac_ext <<EOF
12099 #line 12100 "configure"
12100 #include "confdefs.h"
12101 #include <string.h>
12102 main ()
12103 {
12104   exit (strcoll ("abc", "def") >= 0 ||
12105         strcoll ("ABC", "DEF") >= 0 ||
12106         strcoll ("123", "456") >= 0);
12107 }
12108 EOF
12109 if { (eval echo configure:12110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12110 then
12111   ac_cv_func_strcoll_works=yes
12112 else
12113   conftest_rc="$?"
12114   echo "configure: failed program was:" >&5
12115   cat conftest.$ac_ext >&5
12116   rm -fr conftest*
12117   ac_cv_func_strcoll_works=no
12118 fi
12119 rm -fr conftest*
12120
12121 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12122 if test $ac_cv_func_strcoll_works = yes; then
12123   { test "$extra_verbose" = "yes" && cat << \EOF
12124     Defining HAVE_STRCOLL
12125 EOF
12126 cat >> confdefs.h <<\EOF
12127 #define HAVE_STRCOLL 1
12128 EOF
12129 }
12130
12131 fi
12132
12133
12134 for ac_func in getpgrp
12135 do
12136 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12137 echo "configure:12138: checking for $ac_func" >&5
12138
12139 cat > conftest.$ac_ext <<EOF
12140 #line 12141 "configure"
12141 #include "confdefs.h"
12142 /* System header to define __stub macros and hopefully few prototypes,
12143     which can conflict with char $ac_func(); below.  */
12144 #include <assert.h>
12145 /* Override any gcc2 internal prototype to avoid an error.  */
12146 /* We use char because int might match the return type of a gcc2
12147     builtin and then its argument prototype would still apply.  */
12148 char $ac_func();
12149
12150 int main() {
12151
12152 /* The GNU C library defines this for functions which it implements
12153     to always fail with ENOSYS.  Some functions are actually named
12154     something starting with __ and the normal name is an alias.  */
12155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12156 choke me
12157 #else
12158 $ac_func();
12159 #endif
12160
12161 ; return 0; }
12162 EOF
12163 if { (eval echo configure:12164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12164   rm -rf conftest*
12165   eval "ac_cv_func_$ac_func=yes"
12166 else
12167   echo "configure: failed program was:" >&5
12168   cat conftest.$ac_ext >&5
12169   rm -rf conftest*
12170   eval "ac_cv_func_$ac_func=no"
12171 fi
12172 rm -f conftest*
12173
12174 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12175   echo "$ac_t""yes" 1>&6
12176     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12177   { test "$extra_verbose" = "yes" && cat << EOF
12178     Defining $ac_tr_func
12179 EOF
12180 cat >> confdefs.h <<EOF
12181 #define $ac_tr_func 1
12182 EOF
12183 }
12184  
12185 else
12186   echo "$ac_t""no" 1>&6
12187 fi
12188 done
12189
12190 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12191 echo "configure:12192: checking whether getpgrp takes no argument" >&5
12192
12193 cat > conftest.$ac_ext <<EOF
12194 #line 12195 "configure"
12195 #include "confdefs.h"
12196
12197 /*
12198  * If this system has a BSD-style getpgrp(),
12199  * which takes a pid argument, exit unsuccessfully.
12200  *
12201  * Snarfed from Chet Ramey's bash pgrp.c test program
12202  */
12203 #include <stdio.h>
12204 #include <sys/types.h>
12205
12206 int     pid;
12207 int     pg1, pg2, pg3, pg4;
12208 int     ng, np, s, child;
12209
12210 main()
12211 {
12212         pid = getpid();
12213         pg1 = getpgrp(0);
12214         pg2 = getpgrp();
12215         pg3 = getpgrp(pid);
12216         pg4 = getpgrp(1);
12217
12218         /*
12219          * If all of these values are the same, it's pretty sure that
12220          * we're on a system that ignores getpgrp's first argument.
12221          */
12222         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12223                 exit(0);
12224
12225         child = fork();
12226         if (child < 0)
12227                 exit(1);
12228         else if (child == 0) {
12229                 np = getpid();
12230                 /*
12231                  * If this is Sys V, this will not work; pgrp will be
12232                  * set to np because setpgrp just changes a pgrp to be
12233                  * the same as the pid.
12234                  */
12235                 setpgrp(np, pg1);
12236                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12237                 if (ng == pg1) {
12238                         exit(1);
12239                 } else {
12240                         exit(0);
12241                 }
12242         } else {
12243                 wait(&s);
12244                 exit(s>>8);
12245         }
12246 }
12247
12248 EOF
12249 if { (eval echo configure:12250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12250 then
12251   ac_cv_func_getpgrp_void=yes
12252 else
12253   conftest_rc="$?"
12254   echo "configure: failed program was:" >&5
12255   cat conftest.$ac_ext >&5
12256   rm -fr conftest*
12257   ac_cv_func_getpgrp_void=no
12258 fi
12259 rm -fr conftest*
12260
12261
12262 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12263 if test $ac_cv_func_getpgrp_void = yes; then
12264   { test "$extra_verbose" = "yes" && cat << \EOF
12265     Defining GETPGRP_VOID
12266 EOF
12267 cat >> confdefs.h <<\EOF
12268 #define GETPGRP_VOID 1
12269 EOF
12270 }
12271
12272 fi
12273
12274
12275 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12276 echo "configure:12277: checking for working mmap" >&5
12277 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12278 cat > conftest.$ac_ext <<EOF
12279 #line 12280 "configure"
12280 #include "confdefs.h"
12281 #include <stdio.h>
12282 #include <unistd.h>
12283 #include <fcntl.h>
12284 #include <sys/mman.h>
12285
12286 #ifndef MAP_VARIABLE
12287 #define MAP_VARIABLE 0
12288 #endif
12289
12290 #ifndef MAP_FAILED
12291 #define MAP_FAILED -1
12292 #endif
12293
12294 int main (int argc, char *argv[])
12295 {
12296   int fd = -1;
12297   caddr_t p;
12298 #ifndef MAP_ANONYMOUS
12299   fd = open ("/dev/zero", O_RDWR);
12300   if (fd < 0)
12301     return 1;
12302 #define MAP_ANONYMOUS 0
12303 #endif
12304   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12305            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12306            fd, 0) != (void *) MAP_FAILED)
12307     return 0;
12308   perror ("conftest: mmap failed");
12309   return 1;
12310 }
12311 EOF
12312 if { (eval echo configure:12313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12313 then
12314   have_mmap=yes
12315 else
12316   conftest_rc="$?"
12317   echo "configure: failed program was:" >&5
12318   cat conftest.$ac_ext >&5
12319   rm -fr conftest*
12320   have_mmap=no
12321 fi
12322 rm -fr conftest* ;;
12323 esac
12324 echo "$ac_t""$have_mmap" 1>&6
12325 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12326     Defining HAVE_MMAP
12327 EOF
12328 cat >> confdefs.h <<\EOF
12329 #define HAVE_MMAP 1
12330 EOF
12331 }
12332
12333
12334 case "$opsys" in cygwin*) 
12335         test "$rel_alloc" = "default" && rel_alloc=no ;;
12336 esac
12337 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12338 if test "$rel_alloc $have_mmap" = "default yes"; then
12339   if test "$doug_lea_malloc" = "yes"; then
12340         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12341 echo "configure:12342: checking for M_MMAP_THRESHOLD" >&5
12342     cat > conftest.$ac_ext <<EOF
12343 #line 12344 "configure"
12344 #include "confdefs.h"
12345 #include <malloc.h>
12346 int main() {
12347
12348 #ifndef M_MMAP_THRESHOLD
12349 #error No M_MMAP_THRESHOLD :-(
12350 !@+$%^&*_)(_ - unlikely to compile...
12351 #endif
12352
12353 ; return 0; }
12354 EOF
12355 if { (eval echo configure:12356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12356   rm -rf conftest*
12357   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12358 else
12359   echo "configure: failed program was:" >&5
12360   cat conftest.$ac_ext >&5
12361   rm -rf conftest*
12362   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12363 fi
12364 rm -f conftest*
12365   else
12366     rel_alloc=yes
12367   fi
12368 fi
12369 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12370     Defining REL_ALLOC
12371 EOF
12372 cat >> confdefs.h <<\EOF
12373 #define REL_ALLOC 1
12374 EOF
12375 }
12376
12377
12378 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12379 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12380 echo "configure:12381: checking for termios.h" >&5
12381
12382 cat > conftest.$ac_ext <<EOF
12383 #line 12384 "configure"
12384 #include "confdefs.h"
12385 #include <termios.h>
12386 EOF
12387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12388 { (eval echo configure:12389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12389 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12390 if test -z "$ac_err"; then
12391   rm -rf conftest*
12392   eval "ac_cv_header_$ac_safe=yes"
12393 else
12394   echo "$ac_err" >&5
12395   echo "configure: failed program was:" >&5
12396   cat conftest.$ac_ext >&5
12397   rm -rf conftest*
12398   eval "ac_cv_header_$ac_safe=no"
12399 fi
12400 rm -f conftest*
12401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12402   echo "$ac_t""yes" 1>&6
12403   { test "$extra_verbose" = "yes" && cat << \EOF
12404     Defining HAVE_TERMIOS
12405 EOF
12406 cat >> confdefs.h <<\EOF
12407 #define HAVE_TERMIOS 1
12408 EOF
12409 }
12410
12411   { test "$extra_verbose" = "yes" && cat << \EOF
12412     Defining SIGNALS_VIA_CHARACTERS
12413 EOF
12414 cat >> confdefs.h <<\EOF
12415 #define SIGNALS_VIA_CHARACTERS 1
12416 EOF
12417 }
12418
12419   { test "$extra_verbose" = "yes" && cat << \EOF
12420     Defining NO_TERMIO
12421 EOF
12422 cat >> confdefs.h <<\EOF
12423 #define NO_TERMIO 1
12424 EOF
12425 }
12426
12427 else
12428   echo "$ac_t""no" 1>&6
12429 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12430 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12431 echo "configure:12432: checking for termio.h" >&5
12432
12433 cat > conftest.$ac_ext <<EOF
12434 #line 12435 "configure"
12435 #include "confdefs.h"
12436 #include <termio.h>
12437 EOF
12438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12439 { (eval echo configure:12440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12441 if test -z "$ac_err"; then
12442   rm -rf conftest*
12443   eval "ac_cv_header_$ac_safe=yes"
12444 else
12445   echo "$ac_err" >&5
12446   echo "configure: failed program was:" >&5
12447   cat conftest.$ac_ext >&5
12448   rm -rf conftest*
12449   eval "ac_cv_header_$ac_safe=no"
12450 fi
12451 rm -f conftest*
12452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12453   echo "$ac_t""yes" 1>&6
12454   { test "$extra_verbose" = "yes" && cat << \EOF
12455     Defining HAVE_TERMIO
12456 EOF
12457 cat >> confdefs.h <<\EOF
12458 #define HAVE_TERMIO 1
12459 EOF
12460 }
12461
12462 else
12463   echo "$ac_t""no" 1>&6
12464 fi
12465
12466 fi
12467
12468
12469
12470 echo $ac_n "checking for socket""... $ac_c" 1>&6
12471 echo "configure:12472: checking for socket" >&5
12472
12473 cat > conftest.$ac_ext <<EOF
12474 #line 12475 "configure"
12475 #include "confdefs.h"
12476 /* System header to define __stub macros and hopefully few prototypes,
12477     which can conflict with char socket(); below.  */
12478 #include <assert.h>
12479 /* Override any gcc2 internal prototype to avoid an error.  */
12480 /* We use char because int might match the return type of a gcc2
12481     builtin and then its argument prototype would still apply.  */
12482 char socket();
12483
12484 int main() {
12485
12486 /* The GNU C library defines this for functions which it implements
12487     to always fail with ENOSYS.  Some functions are actually named
12488     something starting with __ and the normal name is an alias.  */
12489 #if defined (__stub_socket) || defined (__stub___socket)
12490 choke me
12491 #else
12492 socket();
12493 #endif
12494
12495 ; return 0; }
12496 EOF
12497 if { (eval echo configure:12498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12498   rm -rf conftest*
12499   eval "ac_cv_func_socket=yes"
12500 else
12501   echo "configure: failed program was:" >&5
12502   cat conftest.$ac_ext >&5
12503   rm -rf conftest*
12504   eval "ac_cv_func_socket=no"
12505 fi
12506 rm -f conftest*
12507
12508 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12509   echo "$ac_t""yes" 1>&6
12510   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12511 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12512 echo "configure:12513: checking for netinet/in.h" >&5
12513
12514 cat > conftest.$ac_ext <<EOF
12515 #line 12516 "configure"
12516 #include "confdefs.h"
12517 #include <netinet/in.h>
12518 EOF
12519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12520 { (eval echo configure:12521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12522 if test -z "$ac_err"; then
12523   rm -rf conftest*
12524   eval "ac_cv_header_$ac_safe=yes"
12525 else
12526   echo "$ac_err" >&5
12527   echo "configure: failed program was:" >&5
12528   cat conftest.$ac_ext >&5
12529   rm -rf conftest*
12530   eval "ac_cv_header_$ac_safe=no"
12531 fi
12532 rm -f conftest*
12533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12534   echo "$ac_t""yes" 1>&6
12535   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12536 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12537 echo "configure:12538: checking for arpa/inet.h" >&5
12538
12539 cat > conftest.$ac_ext <<EOF
12540 #line 12541 "configure"
12541 #include "confdefs.h"
12542 #include <arpa/inet.h>
12543 EOF
12544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12545 { (eval echo configure:12546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12547 if test -z "$ac_err"; then
12548   rm -rf conftest*
12549   eval "ac_cv_header_$ac_safe=yes"
12550 else
12551   echo "$ac_err" >&5
12552   echo "configure: failed program was:" >&5
12553   cat conftest.$ac_ext >&5
12554   rm -rf conftest*
12555   eval "ac_cv_header_$ac_safe=no"
12556 fi
12557 rm -f conftest*
12558 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12559   echo "$ac_t""yes" 1>&6
12560   
12561   { test "$extra_verbose" = "yes" && cat << \EOF
12562     Defining HAVE_SOCKETS
12563 EOF
12564 cat >> confdefs.h <<\EOF
12565 #define HAVE_SOCKETS 1
12566 EOF
12567 }
12568
12569       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12570 echo "configure:12571: checking "for sun_len member in struct sockaddr_un"" >&5
12571       cat > conftest.$ac_ext <<EOF
12572 #line 12573 "configure"
12573 #include "confdefs.h"
12574
12575 #include <sys/types.h>
12576 #include <sys/socket.h>
12577 #include <sys/un.h>
12578       
12579 int main() {
12580 static struct sockaddr_un x; x.sun_len = 1;
12581 ; return 0; }
12582 EOF
12583 if { (eval echo configure:12584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12584   rm -rf conftest*
12585   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12586     Defining HAVE_SOCKADDR_SUN_LEN
12587 EOF
12588 cat >> confdefs.h <<\EOF
12589 #define HAVE_SOCKADDR_SUN_LEN 1
12590 EOF
12591 }
12592
12593 else
12594   echo "configure: failed program was:" >&5
12595   cat conftest.$ac_ext >&5
12596   rm -rf conftest*
12597   echo "$ac_t""no" 1>&6
12598 fi
12599 rm -f conftest*
12600       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12601 echo "configure:12602: checking "for ip_mreq struct in netinet/in.h"" >&5
12602       cat > conftest.$ac_ext <<EOF
12603 #line 12604 "configure"
12604 #include "confdefs.h"
12605
12606 #include <sys/types.h>
12607 #include <netinet/in.h>
12608       
12609 int main() {
12610 static struct ip_mreq x;
12611 ; return 0; }
12612 EOF
12613 if { (eval echo configure:12614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12614   rm -rf conftest*
12615   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12616     Defining HAVE_MULTICAST
12617 EOF
12618 cat >> confdefs.h <<\EOF
12619 #define HAVE_MULTICAST 1
12620 EOF
12621 }
12622
12623 else
12624   echo "configure: failed program was:" >&5
12625   cat conftest.$ac_ext >&5
12626   rm -rf conftest*
12627   echo "$ac_t""no" 1>&6
12628 fi
12629 rm -f conftest*
12630 else
12631   echo "$ac_t""no" 1>&6
12632 fi
12633
12634 else
12635   echo "$ac_t""no" 1>&6
12636 fi
12637
12638 else
12639   echo "$ac_t""no" 1>&6
12640 fi
12641
12642
12643 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12644 echo "configure:12645: checking for msgget" >&5
12645
12646 cat > conftest.$ac_ext <<EOF
12647 #line 12648 "configure"
12648 #include "confdefs.h"
12649 /* System header to define __stub macros and hopefully few prototypes,
12650     which can conflict with char msgget(); below.  */
12651 #include <assert.h>
12652 /* Override any gcc2 internal prototype to avoid an error.  */
12653 /* We use char because int might match the return type of a gcc2
12654     builtin and then its argument prototype would still apply.  */
12655 char msgget();
12656
12657 int main() {
12658
12659 /* The GNU C library defines this for functions which it implements
12660     to always fail with ENOSYS.  Some functions are actually named
12661     something starting with __ and the normal name is an alias.  */
12662 #if defined (__stub_msgget) || defined (__stub___msgget)
12663 choke me
12664 #else
12665 msgget();
12666 #endif
12667
12668 ; return 0; }
12669 EOF
12670 if { (eval echo configure:12671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12671   rm -rf conftest*
12672   eval "ac_cv_func_msgget=yes"
12673 else
12674   echo "configure: failed program was:" >&5
12675   cat conftest.$ac_ext >&5
12676   rm -rf conftest*
12677   eval "ac_cv_func_msgget=no"
12678 fi
12679 rm -f conftest*
12680
12681 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12682   echo "$ac_t""yes" 1>&6
12683   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12684 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12685 echo "configure:12686: checking for sys/ipc.h" >&5
12686
12687 cat > conftest.$ac_ext <<EOF
12688 #line 12689 "configure"
12689 #include "confdefs.h"
12690 #include <sys/ipc.h>
12691 EOF
12692 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12693 { (eval echo configure:12694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12694 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12695 if test -z "$ac_err"; then
12696   rm -rf conftest*
12697   eval "ac_cv_header_$ac_safe=yes"
12698 else
12699   echo "$ac_err" >&5
12700   echo "configure: failed program was:" >&5
12701   cat conftest.$ac_ext >&5
12702   rm -rf conftest*
12703   eval "ac_cv_header_$ac_safe=no"
12704 fi
12705 rm -f conftest*
12706 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12707   echo "$ac_t""yes" 1>&6
12708   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12709 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12710 echo "configure:12711: checking for sys/msg.h" >&5
12711
12712 cat > conftest.$ac_ext <<EOF
12713 #line 12714 "configure"
12714 #include "confdefs.h"
12715 #include <sys/msg.h>
12716 EOF
12717 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12718 { (eval echo configure:12719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12719 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12720 if test -z "$ac_err"; then
12721   rm -rf conftest*
12722   eval "ac_cv_header_$ac_safe=yes"
12723 else
12724   echo "$ac_err" >&5
12725   echo "configure: failed program was:" >&5
12726   cat conftest.$ac_ext >&5
12727   rm -rf conftest*
12728   eval "ac_cv_header_$ac_safe=no"
12729 fi
12730 rm -f conftest*
12731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12732   echo "$ac_t""yes" 1>&6
12733   { test "$extra_verbose" = "yes" && cat << \EOF
12734     Defining HAVE_SYSVIPC
12735 EOF
12736 cat >> confdefs.h <<\EOF
12737 #define HAVE_SYSVIPC 1
12738 EOF
12739 }
12740
12741 else
12742   echo "$ac_t""no" 1>&6
12743 fi
12744
12745 else
12746   echo "$ac_t""no" 1>&6
12747 fi
12748
12749 else
12750   echo "$ac_t""no" 1>&6
12751 fi
12752
12753
12754 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12755 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12756 echo "configure:12757: checking for dirent.h" >&5
12757
12758 cat > conftest.$ac_ext <<EOF
12759 #line 12760 "configure"
12760 #include "confdefs.h"
12761 #include <dirent.h>
12762 EOF
12763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12764 { (eval echo configure:12765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12766 if test -z "$ac_err"; then
12767   rm -rf conftest*
12768   eval "ac_cv_header_$ac_safe=yes"
12769 else
12770   echo "$ac_err" >&5
12771   echo "configure: failed program was:" >&5
12772   cat conftest.$ac_ext >&5
12773   rm -rf conftest*
12774   eval "ac_cv_header_$ac_safe=no"
12775 fi
12776 rm -f conftest*
12777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12778   echo "$ac_t""yes" 1>&6
12779   { test "$extra_verbose" = "yes" && cat << \EOF
12780     Defining SYSV_SYSTEM_DIR
12781 EOF
12782 cat >> confdefs.h <<\EOF
12783 #define SYSV_SYSTEM_DIR 1
12784 EOF
12785 }
12786
12787 else
12788   echo "$ac_t""no" 1>&6
12789 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12790 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12791 echo "configure:12792: checking for sys/dir.h" >&5
12792
12793 cat > conftest.$ac_ext <<EOF
12794 #line 12795 "configure"
12795 #include "confdefs.h"
12796 #include <sys/dir.h>
12797 EOF
12798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12799 { (eval echo configure:12800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12801 if test -z "$ac_err"; then
12802   rm -rf conftest*
12803   eval "ac_cv_header_$ac_safe=yes"
12804 else
12805   echo "$ac_err" >&5
12806   echo "configure: failed program was:" >&5
12807   cat conftest.$ac_ext >&5
12808   rm -rf conftest*
12809   eval "ac_cv_header_$ac_safe=no"
12810 fi
12811 rm -f conftest*
12812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12813   echo "$ac_t""yes" 1>&6
12814   :
12815 else
12816   echo "$ac_t""no" 1>&6
12817 { test "$extra_verbose" = "yes" && cat << \EOF
12818     Defining NONSYSTEM_DIR_LIBRARY
12819 EOF
12820 cat >> confdefs.h <<\EOF
12821 #define NONSYSTEM_DIR_LIBRARY 1
12822 EOF
12823 }
12824
12825 fi
12826
12827 fi
12828
12829
12830 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12831 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12832 echo "configure:12833: checking for nlist.h" >&5
12833
12834 cat > conftest.$ac_ext <<EOF
12835 #line 12836 "configure"
12836 #include "confdefs.h"
12837 #include <nlist.h>
12838 EOF
12839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12840 { (eval echo configure:12841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12842 if test -z "$ac_err"; then
12843   rm -rf conftest*
12844   eval "ac_cv_header_$ac_safe=yes"
12845 else
12846   echo "$ac_err" >&5
12847   echo "configure: failed program was:" >&5
12848   cat conftest.$ac_ext >&5
12849   rm -rf conftest*
12850   eval "ac_cv_header_$ac_safe=no"
12851 fi
12852 rm -f conftest*
12853 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12854   echo "$ac_t""yes" 1>&6
12855   { test "$extra_verbose" = "yes" && cat << \EOF
12856     Defining NLIST_STRUCT
12857 EOF
12858 cat >> confdefs.h <<\EOF
12859 #define NLIST_STRUCT 1
12860 EOF
12861 }
12862
12863 else
12864   echo "$ac_t""no" 1>&6
12865 fi
12866
12867
12868
12869 echo "checking "for sound support"" 1>&6
12870 echo "configure:12871: checking "for sound support"" >&5
12871 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12872
12873 if test "$with_native_sound" != "no"; then
12874     if test -n "$native_sound_lib"; then
12875     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12876 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12877 echo "configure:12878: checking for multimedia/audio_device.h" >&5
12878
12879 cat > conftest.$ac_ext <<EOF
12880 #line 12881 "configure"
12881 #include "confdefs.h"
12882 #include <multimedia/audio_device.h>
12883 EOF
12884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12885 { (eval echo configure:12886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12887 if test -z "$ac_err"; then
12888   rm -rf conftest*
12889   eval "ac_cv_header_$ac_safe=yes"
12890 else
12891   echo "$ac_err" >&5
12892   echo "configure: failed program was:" >&5
12893   cat conftest.$ac_ext >&5
12894   rm -rf conftest*
12895   eval "ac_cv_header_$ac_safe=no"
12896 fi
12897 rm -f conftest*
12898 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12899   echo "$ac_t""yes" 1>&6
12900   sound_found=yes sound_cflags=""
12901       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12902    echo "    xemacs will be linked with \"sunplay.o\""
12903  fi
12904 else
12905   echo "$ac_t""no" 1>&6
12906 fi
12907
12908   fi
12909
12910     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12911     sound_found=yes
12912     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12913    echo "    xemacs will be linked with \"sunplay.o\""
12914  fi
12915     if test -d "/usr/demo/SOUND/include"
12916       then sound_cflags="-I/usr/demo/SOUND/include"
12917       else sound_cflags="-I/usr/demo/SOUND"
12918     fi
12919     if test -z "$native_sound_lib" ; then
12920       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12921         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12922         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12923       fi
12924     fi
12925   fi
12926
12927     if test -z "$sound_found"; then
12928     case "$canonical" in
12929     *-sgi-* )
12930       if test -z "$native_sound_lib"; then
12931         
12932 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12933 echo "configure:12934: checking for ALopenport in -laudio" >&5
12934 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12935
12936 xe_check_libs=" -laudio "
12937 cat > conftest.$ac_ext <<EOF
12938 #line 12939 "configure"
12939 #include "confdefs.h"
12940 /* Override any gcc2 internal prototype to avoid an error.  */
12941 /* We use char because int might match the return type of a gcc2
12942     builtin and then its argument prototype would still apply.  */
12943 char ALopenport();
12944
12945 int main() {
12946 ALopenport()
12947 ; return 0; }
12948 EOF
12949 if { (eval echo configure:12950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12950   rm -rf conftest*
12951   eval "ac_cv_lib_$ac_lib_var=yes"
12952 else
12953   echo "configure: failed program was:" >&5
12954   cat conftest.$ac_ext >&5
12955   rm -rf conftest*
12956   eval "ac_cv_lib_$ac_lib_var=no"
12957 fi
12958 rm -f conftest*
12959 xe_check_libs=""
12960
12961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12962   echo "$ac_t""yes" 1>&6
12963   native_sound_lib="-laudio"
12964 else
12965   echo "$ac_t""no" 1>&6
12966 fi
12967
12968
12969       fi
12970       if test -n "$native_sound_lib"; then
12971         sound_found=yes sound_cflags=""
12972         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12973    echo "    xemacs will be linked with \"sgiplay.o\""
12974  fi
12975       fi ;;
12976     hppa*-hp-hpux* )
12977       if test -z "$native_sound_lib"; then
12978         
12979 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12980 echo "configure:12981: checking for AOpenAudio in -lAlib" >&5
12981 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12982
12983 xe_check_libs=" -lAlib "
12984 cat > conftest.$ac_ext <<EOF
12985 #line 12986 "configure"
12986 #include "confdefs.h"
12987 /* Override any gcc2 internal prototype to avoid an error.  */
12988 /* We use char because int might match the return type of a gcc2
12989     builtin and then its argument prototype would still apply.  */
12990 char AOpenAudio();
12991
12992 int main() {
12993 AOpenAudio()
12994 ; return 0; }
12995 EOF
12996 if { (eval echo configure:12997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12997   rm -rf conftest*
12998   eval "ac_cv_lib_$ac_lib_var=yes"
12999 else
13000   echo "configure: failed program was:" >&5
13001   cat conftest.$ac_ext >&5
13002   rm -rf conftest*
13003   eval "ac_cv_lib_$ac_lib_var=no"
13004 fi
13005 rm -f conftest*
13006 xe_check_libs=""
13007
13008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13009   echo "$ac_t""yes" 1>&6
13010   native_sound_lib="-lAlib"
13011 else
13012   echo "$ac_t""no" 1>&6
13013 fi
13014
13015
13016       fi
13017       if test -n "$native_sound_lib"; then
13018         sound_found=yes
13019         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13020    echo "    xemacs will be linked with \"hpplay.o\""
13021  fi
13022         if test "$GCC" = "yes" # Kludge city
13023           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13024           else sound_cflags="+e -I/usr/audio/examples"
13025         fi
13026       fi ;;
13027     esac
13028   fi
13029
13030     if test -z "$sound_found"; then
13031     if test "$with_msw" = "yes"; then
13032     sound_found=yes
13033     native_sound_lib=
13034     fi
13035   fi
13036
13037     if test -z "$sound_found"; then
13038     for dir in "machine" "sys" "linux"; do
13039       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13040 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13041 echo "configure:13042: checking for ${dir}/soundcard.h" >&5
13042
13043 cat > conftest.$ac_ext <<EOF
13044 #line 13045 "configure"
13045 #include "confdefs.h"
13046 #include <${dir}/soundcard.h>
13047 EOF
13048 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13049 { (eval echo configure:13050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13050 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13051 if test -z "$ac_err"; then
13052   rm -rf conftest*
13053   eval "ac_cv_header_$ac_safe=yes"
13054 else
13055   echo "$ac_err" >&5
13056   echo "configure: failed program was:" >&5
13057   cat conftest.$ac_ext >&5
13058   rm -rf conftest*
13059   eval "ac_cv_header_$ac_safe=no"
13060 fi
13061 rm -f conftest*
13062 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13063   echo "$ac_t""yes" 1>&6
13064   sound_found=yes
13065        need_miscplay=yes
13066         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13067    echo "    xemacs will be linked with \"linuxplay.o\""
13068  fi
13069         { test "$extra_verbose" = "yes" && cat << EOF
13070     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13071 EOF
13072 cat >> confdefs.h <<EOF
13073 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13074 EOF
13075 }
13076
13077         break
13078 else
13079   echo "$ac_t""no" 1>&6
13080 fi
13081
13082     done
13083   fi
13084
13085   test "$sound_found" = "yes" && with_native_sound=yes
13086 fi
13087
13088 if test "$with_native_sound" = "yes"; then
13089   { test "$extra_verbose" = "yes" && cat << \EOF
13090     Defining HAVE_NATIVE_SOUND
13091 EOF
13092 cat >> confdefs.h <<\EOF
13093 #define HAVE_NATIVE_SOUND 1
13094 EOF
13095 }
13096
13097   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13098 fi
13099
13100 if test "$with_nas_sound" != "no"; then
13101   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13102 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13103 echo "configure:13104: checking for audio/audiolib.h" >&5
13104
13105 cat > conftest.$ac_ext <<EOF
13106 #line 13107 "configure"
13107 #include "confdefs.h"
13108 #include <audio/audiolib.h>
13109 EOF
13110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13111 { (eval echo configure:13112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13113 if test -z "$ac_err"; then
13114   rm -rf conftest*
13115   eval "ac_cv_header_$ac_safe=yes"
13116 else
13117   echo "$ac_err" >&5
13118   echo "configure: failed program was:" >&5
13119   cat conftest.$ac_ext >&5
13120   rm -rf conftest*
13121   eval "ac_cv_header_$ac_safe=no"
13122 fi
13123 rm -f conftest*
13124 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13125   echo "$ac_t""yes" 1>&6
13126   
13127     
13128 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13129 echo "configure:13130: checking for AuOpenServer in -laudio" >&5
13130 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13131
13132 xe_check_libs=" -laudio "
13133 cat > conftest.$ac_ext <<EOF
13134 #line 13135 "configure"
13135 #include "confdefs.h"
13136 /* Override any gcc2 internal prototype to avoid an error.  */
13137 /* We use char because int might match the return type of a gcc2
13138     builtin and then its argument prototype would still apply.  */
13139 char AuOpenServer();
13140
13141 int main() {
13142 AuOpenServer()
13143 ; return 0; }
13144 EOF
13145 if { (eval echo configure:13146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13146   rm -rf conftest*
13147   eval "ac_cv_lib_$ac_lib_var=yes"
13148 else
13149   echo "configure: failed program was:" >&5
13150   cat conftest.$ac_ext >&5
13151   rm -rf conftest*
13152   eval "ac_cv_lib_$ac_lib_var=no"
13153 fi
13154 rm -f conftest*
13155 xe_check_libs=""
13156
13157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13158   echo "$ac_t""yes" 1>&6
13159   have_nas_sound=yes
13160 else
13161   echo "$ac_t""no" 1>&6
13162 fi
13163
13164
13165 else
13166   echo "$ac_t""no" 1>&6
13167 fi
13168
13169   if test "$have_nas_sound" = "yes"; then
13170     with_nas_sound=yes
13171     { test "$extra_verbose" = "yes" && cat << \EOF
13172     Defining HAVE_NAS_SOUND
13173 EOF
13174 cat >> confdefs.h <<\EOF
13175 #define HAVE_NAS_SOUND 1
13176 EOF
13177 }
13178
13179     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13180    echo "    xemacs will be linked with \"nas.o\""
13181  fi
13182     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13183             cat > conftest.$ac_ext <<EOF
13184 #line 13185 "configure"
13185 #include "confdefs.h"
13186 #include <audio/Xtutil.h>
13187 EOF
13188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13189   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13190   :
13191 else
13192   rm -rf conftest*
13193   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13194     Defining NAS_NO_ERROR_JUMP
13195 EOF
13196 cat >> confdefs.h <<\EOF
13197 #define NAS_NO_ERROR_JUMP 1
13198 EOF
13199 }
13200
13201 fi
13202 rm -f conftest*
13203
13204   else
13205     test "$with_nas_sound" = "yes" && \
13206       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13207     with_nas_sound=no
13208   fi
13209 fi
13210
13211 if test "$with_esd_sound" != "no"; then
13212   # Extract the first word of "esd-config", so it can be a program name with args.
13213 set dummy esd-config; ac_word=$2
13214 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13215 echo "configure:13216: checking for $ac_word" >&5
13216
13217 if test -n "$have_esd_config"; then
13218   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13219 else
13220   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13221   ac_dummy="$PATH"
13222   for ac_dir in $ac_dummy; do
13223     test -z "$ac_dir" && ac_dir=.
13224     if test -f $ac_dir/$ac_word; then
13225       ac_cv_prog_have_esd_config="yes"
13226       break
13227     fi
13228   done
13229   IFS="$ac_save_ifs"
13230   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13231 fi
13232 have_esd_config="$ac_cv_prog_have_esd_config"
13233 if test -n "$have_esd_config"; then
13234   echo "$ac_t""$have_esd_config" 1>&6
13235 else
13236   echo "$ac_t""no" 1>&6
13237 fi
13238
13239   if test "$have_esd_config" = "yes"; then
13240     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13241     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
13242     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13243     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13244 echo "configure:13245: checking for esd_play_stream" >&5
13245
13246 cat > conftest.$ac_ext <<EOF
13247 #line 13248 "configure"
13248 #include "confdefs.h"
13249 /* System header to define __stub macros and hopefully few prototypes,
13250     which can conflict with char esd_play_stream(); below.  */
13251 #include <assert.h>
13252 /* Override any gcc2 internal prototype to avoid an error.  */
13253 /* We use char because int might match the return type of a gcc2
13254     builtin and then its argument prototype would still apply.  */
13255 char esd_play_stream();
13256
13257 int main() {
13258
13259 /* The GNU C library defines this for functions which it implements
13260     to always fail with ENOSYS.  Some functions are actually named
13261     something starting with __ and the normal name is an alias.  */
13262 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13263 choke me
13264 #else
13265 esd_play_stream();
13266 #endif
13267
13268 ; return 0; }
13269 EOF
13270 if { (eval echo configure:13271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13271   rm -rf conftest*
13272   eval "ac_cv_func_esd_play_stream=yes"
13273 else
13274   echo "configure: failed program was:" >&5
13275   cat conftest.$ac_ext >&5
13276   rm -rf conftest*
13277   eval "ac_cv_func_esd_play_stream=no"
13278 fi
13279 rm -f conftest*
13280
13281 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13282   echo "$ac_t""yes" 1>&6
13283   have_esd_sound=yes
13284 else
13285   echo "$ac_t""no" 1>&6
13286 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13287 fi
13288
13289   fi
13290
13291   if test "$have_esd_sound" = "yes"; then
13292     with_esd_sound=yes
13293     need_miscplay=yes
13294     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13295    echo "    xemacs will be linked with \"esd.o\""
13296  fi
13297     { test "$extra_verbose" = "yes" && cat << \EOF
13298     Defining HAVE_ESD_SOUND
13299 EOF
13300 cat >> confdefs.h <<\EOF
13301 #define HAVE_ESD_SOUND 1
13302 EOF
13303 }
13304
13305   else
13306     test "$with_esd_sound" = "yes" && \
13307       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13308     with_esd_sound=no
13309   fi
13310 fi
13311
13312 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13313    echo "    xemacs will be linked with \"miscplay.o\""
13314  fi
13315
13316
13317 test -z "$with_tty" && with_tty=yes
13318
13319 if test "$with_tty" = "yes"  ; then
13320   echo "checking for TTY-related features" 1>&6
13321 echo "configure:13322: checking for TTY-related features" >&5
13322   { test "$extra_verbose" = "yes" && cat << \EOF
13323     Defining HAVE_TTY
13324 EOF
13325 cat >> confdefs.h <<\EOF
13326 #define HAVE_TTY 1
13327 EOF
13328 }
13329
13330   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
13331    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\""
13332  fi
13333
13334     if test -z "$with_ncurses"; then
13335     
13336 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13337 echo "configure:13338: checking for tgetent in -lncurses" >&5
13338 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13339
13340 xe_check_libs=" -lncurses "
13341 cat > conftest.$ac_ext <<EOF
13342 #line 13343 "configure"
13343 #include "confdefs.h"
13344 /* Override any gcc2 internal prototype to avoid an error.  */
13345 /* We use char because int might match the return type of a gcc2
13346     builtin and then its argument prototype would still apply.  */
13347 char tgetent();
13348
13349 int main() {
13350 tgetent()
13351 ; return 0; }
13352 EOF
13353 if { (eval echo configure:13354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13354   rm -rf conftest*
13355   eval "ac_cv_lib_$ac_lib_var=yes"
13356 else
13357   echo "configure: failed program was:" >&5
13358   cat conftest.$ac_ext >&5
13359   rm -rf conftest*
13360   eval "ac_cv_lib_$ac_lib_var=no"
13361 fi
13362 rm -f conftest*
13363 xe_check_libs=""
13364
13365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13366   echo "$ac_t""yes" 1>&6
13367   with_ncurses=yes
13368 else
13369   echo "$ac_t""no" 1>&6
13370 with_ncurses=no
13371 fi
13372
13373
13374   fi
13375   if test "$with_ncurses" = "yes"; then
13376     { test "$extra_verbose" = "yes" && cat << \EOF
13377     Defining HAVE_NCURSES
13378 EOF
13379 cat >> confdefs.h <<\EOF
13380 #define HAVE_NCURSES 1
13381 EOF
13382 }
13383
13384     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13385 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13386 echo "configure:13387: checking for ncurses/curses.h" >&5
13387
13388 cat > conftest.$ac_ext <<EOF
13389 #line 13390 "configure"
13390 #include "confdefs.h"
13391 #include <ncurses/curses.h>
13392 EOF
13393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13394 { (eval echo configure:13395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13396 if test -z "$ac_err"; then
13397   rm -rf conftest*
13398   eval "ac_cv_header_$ac_safe=yes"
13399 else
13400   echo "$ac_err" >&5
13401   echo "configure: failed program was:" >&5
13402   cat conftest.$ac_ext >&5
13403   rm -rf conftest*
13404   eval "ac_cv_header_$ac_safe=no"
13405 fi
13406 rm -f conftest*
13407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13408   echo "$ac_t""yes" 1>&6
13409   curses_h_file=ncurses/curses.h
13410 else
13411   echo "$ac_t""no" 1>&6
13412 fi
13413
13414     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13415 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13416 echo "configure:13417: checking for ncurses/term.h" >&5
13417
13418 cat > conftest.$ac_ext <<EOF
13419 #line 13420 "configure"
13420 #include "confdefs.h"
13421 #include <ncurses/term.h>
13422 EOF
13423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13424 { (eval echo configure:13425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13426 if test -z "$ac_err"; then
13427   rm -rf conftest*
13428   eval "ac_cv_header_$ac_safe=yes"
13429 else
13430   echo "$ac_err" >&5
13431   echo "configure: failed program was:" >&5
13432   cat conftest.$ac_ext >&5
13433   rm -rf conftest*
13434   eval "ac_cv_header_$ac_safe=no"
13435 fi
13436 rm -f conftest*
13437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13438   echo "$ac_t""yes" 1>&6
13439   term_h_file=ncurses/term.h
13440 else
13441   echo "$ac_t""no" 1>&6
13442 fi
13443
13444     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13445    echo "    xemacs will be linked with \"terminfo.o\""
13446  fi
13447     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13448
13449     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13450                         save_c_switch_site="$c_switch_site"
13451       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13452       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13453 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13454 echo "configure:13455: checking for ncurses/curses.h" >&5
13455
13456 cat > conftest.$ac_ext <<EOF
13457 #line 13458 "configure"
13458 #include "confdefs.h"
13459 #include <ncurses/curses.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   curses_h_file=ncurses/curses.h
13478 else
13479   echo "$ac_t""no" 1>&6
13480 fi
13481
13482       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13483         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13484         else c_switch_site="$save_c_switch_site"
13485       fi
13486     fi
13487   else         if test "$have_terminfo" = "yes"; then
13488       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13489    echo "    xemacs will be linked with \"terminfo.o\""
13490  fi
13491       if test -n "$libs_termcap"; then
13492         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13493       else
13494         for lib in curses termlib termcap; do
13495           
13496 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13497 echo "configure:13498: checking for tgetent in -l$lib" >&5
13498 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13499
13500 xe_check_libs=" -l$lib "
13501 cat > conftest.$ac_ext <<EOF
13502 #line 13503 "configure"
13503 #include "confdefs.h"
13504 /* Override any gcc2 internal prototype to avoid an error.  */
13505 /* We use char because int might match the return type of a gcc2
13506     builtin and then its argument prototype would still apply.  */
13507 char tgetent();
13508
13509 int main() {
13510 tgetent()
13511 ; return 0; }
13512 EOF
13513 if { (eval echo configure:13514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13514   rm -rf conftest*
13515   eval "ac_cv_lib_$ac_lib_var=yes"
13516 else
13517   echo "configure: failed program was:" >&5
13518   cat conftest.$ac_ext >&5
13519   rm -rf conftest*
13520   eval "ac_cv_lib_$ac_lib_var=no"
13521 fi
13522 rm -f conftest*
13523 xe_check_libs=""
13524
13525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13526   echo "$ac_t""yes" 1>&6
13527   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13528 else
13529   echo "$ac_t""no" 1>&6
13530 fi
13531
13532
13533         done
13534       fi
13535     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13536    echo "    xemacs will be linked with \"tparam.o\""
13537  fi
13538                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13539       if test -n "$libs_termcap"; then
13540         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13541       else
13542         
13543 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13544 echo "configure:13545: checking for tgetent in -lcurses" >&5
13545 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13546
13547 xe_check_libs=" -lcurses "
13548 cat > conftest.$ac_ext <<EOF
13549 #line 13550 "configure"
13550 #include "confdefs.h"
13551 /* Override any gcc2 internal prototype to avoid an error.  */
13552 /* We use char because int might match the return type of a gcc2
13553     builtin and then its argument prototype would still apply.  */
13554 char tgetent();
13555
13556 int main() {
13557 tgetent()
13558 ; return 0; }
13559 EOF
13560 if { (eval echo configure:13561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13561   rm -rf conftest*
13562   eval "ac_cv_lib_$ac_lib_var=yes"
13563 else
13564   echo "configure: failed program was:" >&5
13565   cat conftest.$ac_ext >&5
13566   rm -rf conftest*
13567   eval "ac_cv_lib_$ac_lib_var=no"
13568 fi
13569 rm -f conftest*
13570 xe_check_libs=""
13571
13572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13573   echo "$ac_t""yes" 1>&6
13574   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13575 else
13576   echo "$ac_t""no" 1>&6
13577 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13578 echo "configure:13579: checking for tgetent in -ltermcap" >&5
13579 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13580
13581 xe_check_libs=" -ltermcap "
13582 cat > conftest.$ac_ext <<EOF
13583 #line 13584 "configure"
13584 #include "confdefs.h"
13585 /* Override any gcc2 internal prototype to avoid an error.  */
13586 /* We use char because int might match the return type of a gcc2
13587     builtin and then its argument prototype would still apply.  */
13588 char tgetent();
13589
13590 int main() {
13591 tgetent()
13592 ; return 0; }
13593 EOF
13594 if { (eval echo configure:13595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13595   rm -rf conftest*
13596   eval "ac_cv_lib_$ac_lib_var=yes"
13597 else
13598   echo "configure: failed program was:" >&5
13599   cat conftest.$ac_ext >&5
13600   rm -rf conftest*
13601   eval "ac_cv_lib_$ac_lib_var=no"
13602 fi
13603 rm -f conftest*
13604 xe_check_libs=""
13605
13606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13607   echo "$ac_t""yes" 1>&6
13608   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13609 else
13610   echo "$ac_t""no" 1>&6
13611 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13612    echo "    xemacs will be linked with \"termcap.o\""
13613  fi
13614 fi
13615
13616
13617 fi
13618
13619
13620       fi
13621     fi
13622   fi
13623   { test "$extra_verbose" = "yes" && cat << EOF
13624     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13625 EOF
13626 cat >> confdefs.h <<EOF
13627 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13628 EOF
13629 }
13630
13631   { test "$extra_verbose" = "yes" && cat << EOF
13632     Defining TERM_H_FILE = "${term_h_file-term.h}"
13633 EOF
13634 cat >> confdefs.h <<EOF
13635 #define TERM_H_FILE "${term_h_file-term.h}"
13636 EOF
13637 }
13638
13639
13640     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13641 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13642 echo "configure:13643: checking for gpm.h" >&5
13643
13644 cat > conftest.$ac_ext <<EOF
13645 #line 13646 "configure"
13646 #include "confdefs.h"
13647 #include <gpm.h>
13648 EOF
13649 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13650 { (eval echo configure:13651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13651 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13652 if test -z "$ac_err"; then
13653   rm -rf conftest*
13654   eval "ac_cv_header_$ac_safe=yes"
13655 else
13656   echo "$ac_err" >&5
13657   echo "configure: failed program was:" >&5
13658   cat conftest.$ac_ext >&5
13659   rm -rf conftest*
13660   eval "ac_cv_header_$ac_safe=no"
13661 fi
13662 rm -f conftest*
13663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13664   echo "$ac_t""yes" 1>&6
13665   :
13666 else
13667   echo "$ac_t""no" 1>&6
13668 with_gpm=no
13669 fi
13670  }
13671   test -z "$with_gpm" && { 
13672 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13673 echo "configure:13674: checking for Gpm_Open in -lgpm" >&5
13674 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13675
13676 xe_check_libs=" -lgpm "
13677 cat > conftest.$ac_ext <<EOF
13678 #line 13679 "configure"
13679 #include "confdefs.h"
13680 /* Override any gcc2 internal prototype to avoid an error.  */
13681 /* We use char because int might match the return type of a gcc2
13682     builtin and then its argument prototype would still apply.  */
13683 char Gpm_Open();
13684
13685 int main() {
13686 Gpm_Open()
13687 ; return 0; }
13688 EOF
13689 if { (eval echo configure:13690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13690   rm -rf conftest*
13691   eval "ac_cv_lib_$ac_lib_var=yes"
13692 else
13693   echo "configure: failed program was:" >&5
13694   cat conftest.$ac_ext >&5
13695   rm -rf conftest*
13696   eval "ac_cv_lib_$ac_lib_var=no"
13697 fi
13698 rm -f conftest*
13699 xe_check_libs=""
13700
13701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13702   echo "$ac_t""yes" 1>&6
13703   with_gpm=yes
13704 else
13705   echo "$ac_t""no" 1>&6
13706 with_gpm=no
13707 fi
13708
13709  }
13710   if test "$with_gpm" = "yes"; then
13711     { test "$extra_verbose" = "yes" && cat << \EOF
13712     Defining HAVE_GPM
13713 EOF
13714 cat >> confdefs.h <<\EOF
13715 #define HAVE_GPM 1
13716 EOF
13717 }
13718
13719     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13720    echo "    xemacs will be linked with \"gpmevent.o\""
13721  fi
13722     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13723   fi
13724
13725 else   for feature in ncurses gpm; do
13726     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13727       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13728     fi
13729     eval "with_${feature}=no"
13730   done
13731 fi 
13732 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13733    echo "    xemacs will be linked with \"event-unixoid.o\""
13734  fi
13735
13736
13737 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13738   != "no no no" && echo "checking for database support" 1>&6
13739 echo "configure:13740: checking for database support" >&5
13740
13741 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13742   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13743 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13744 echo "configure:13745: checking for ndbm.h" >&5
13745
13746 cat > conftest.$ac_ext <<EOF
13747 #line 13748 "configure"
13748 #include "confdefs.h"
13749 #include <ndbm.h>
13750 EOF
13751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13752 { (eval echo configure:13753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13754 if test -z "$ac_err"; then
13755   rm -rf conftest*
13756   eval "ac_cv_header_$ac_safe=yes"
13757 else
13758   echo "$ac_err" >&5
13759   echo "configure: failed program was:" >&5
13760   cat conftest.$ac_ext >&5
13761   rm -rf conftest*
13762   eval "ac_cv_header_$ac_safe=no"
13763 fi
13764 rm -f conftest*
13765 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13766   echo "$ac_t""yes" 1>&6
13767   :
13768 else
13769   echo "$ac_t""no" 1>&6
13770
13771     test "$with_database_gdbm" = "yes" -o \
13772          "$with_database_dbm"  = "yes" && \
13773       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13774     with_database_gdbm=no with_database_dbm=no
13775 fi
13776
13777 fi
13778
13779 if test "$with_database_gdbm" != "no"; then
13780   
13781 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13782 echo "configure:13783: checking for dbm_open in -lgdbm" >&5
13783 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13784
13785 xe_check_libs=" -lgdbm "
13786 cat > conftest.$ac_ext <<EOF
13787 #line 13788 "configure"
13788 #include "confdefs.h"
13789 /* Override any gcc2 internal prototype to avoid an error.  */
13790 /* We use char because int might match the return type of a gcc2
13791     builtin and then its argument prototype would still apply.  */
13792 char dbm_open();
13793
13794 int main() {
13795 dbm_open()
13796 ; return 0; }
13797 EOF
13798 if { (eval echo configure:13799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13799   rm -rf conftest*
13800   eval "ac_cv_lib_$ac_lib_var=yes"
13801 else
13802   echo "configure: failed program was:" >&5
13803   cat conftest.$ac_ext >&5
13804   rm -rf conftest*
13805   eval "ac_cv_lib_$ac_lib_var=no"
13806 fi
13807 rm -f conftest*
13808 xe_check_libs=""
13809
13810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13811   echo "$ac_t""yes" 1>&6
13812   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13813 else
13814   echo "$ac_t""no" 1>&6
13815 if test "$with_database_gdbm" = "yes"; then
13816      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13817    fi
13818    with_database_gdbm=no
13819 fi
13820
13821
13822 fi
13823
13824 if test "$with_database_dbm" != "no"; then
13825   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13826 echo "configure:13827: checking for dbm_open" >&5
13827
13828 cat > conftest.$ac_ext <<EOF
13829 #line 13830 "configure"
13830 #include "confdefs.h"
13831 /* System header to define __stub macros and hopefully few prototypes,
13832     which can conflict with char dbm_open(); below.  */
13833 #include <assert.h>
13834 /* Override any gcc2 internal prototype to avoid an error.  */
13835 /* We use char because int might match the return type of a gcc2
13836     builtin and then its argument prototype would still apply.  */
13837 char dbm_open();
13838
13839 int main() {
13840
13841 /* The GNU C library defines this for functions which it implements
13842     to always fail with ENOSYS.  Some functions are actually named
13843     something starting with __ and the normal name is an alias.  */
13844 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13845 choke me
13846 #else
13847 dbm_open();
13848 #endif
13849
13850 ; return 0; }
13851 EOF
13852 if { (eval echo configure:13853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13853   rm -rf conftest*
13854   eval "ac_cv_func_dbm_open=yes"
13855 else
13856   echo "configure: failed program was:" >&5
13857   cat conftest.$ac_ext >&5
13858   rm -rf conftest*
13859   eval "ac_cv_func_dbm_open=no"
13860 fi
13861 rm -f conftest*
13862
13863 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13864   echo "$ac_t""yes" 1>&6
13865   with_database_dbm=yes libdbm=
13866 else
13867   echo "$ac_t""no" 1>&6
13868
13869     
13870 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13871 echo "configure:13872: checking for dbm_open in -ldbm" >&5
13872 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13873
13874 xe_check_libs=" -ldbm "
13875 cat > conftest.$ac_ext <<EOF
13876 #line 13877 "configure"
13877 #include "confdefs.h"
13878 /* Override any gcc2 internal prototype to avoid an error.  */
13879 /* We use char because int might match the return type of a gcc2
13880     builtin and then its argument prototype would still apply.  */
13881 char dbm_open();
13882
13883 int main() {
13884 dbm_open()
13885 ; return 0; }
13886 EOF
13887 if { (eval echo configure:13888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13888   rm -rf conftest*
13889   eval "ac_cv_lib_$ac_lib_var=yes"
13890 else
13891   echo "configure: failed program was:" >&5
13892   cat conftest.$ac_ext >&5
13893   rm -rf conftest*
13894   eval "ac_cv_lib_$ac_lib_var=no"
13895 fi
13896 rm -f conftest*
13897 xe_check_libs=""
13898
13899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13900   echo "$ac_t""yes" 1>&6
13901   with_database_dbm=yes libdbm=-ldbm
13902 else
13903   echo "$ac_t""no" 1>&6
13904 test "$with_database_dbm" = "yes" && \
13905         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13906       with_database_dbm=no
13907 fi
13908
13909
13910 fi
13911
13912 fi
13913
13914 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13915 test "$with_database_gdbm" = "yes" -o \
13916      "$with_database_dbm"  = "yes" && \
13917   { test "$extra_verbose" = "yes" && cat << \EOF
13918     Defining HAVE_DBM
13919 EOF
13920 cat >> confdefs.h <<\EOF
13921 #define HAVE_DBM 1
13922 EOF
13923 }
13924
13925
13926 if test "$with_database_berkdb" != "no"; then
13927   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13928 echo "configure:13929: checking for Berkeley db.h" >&5
13929   for header in "db/db.h" "db.h"; do
13930     cat > conftest.$ac_ext <<EOF
13931 #line 13932 "configure"
13932 #include "confdefs.h"
13933
13934 #include <stdlib.h>
13935 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13936 #ifdef HAVE_INTTYPES_H
13937 #define __BIT_TYPES_DEFINED__
13938 #include <inttypes.h>
13939 typedef uint8_t  u_int8_t;
13940 typedef uint16_t u_int16_t;
13941 typedef uint32_t u_int32_t;
13942 #ifdef WE_DONT_NEED_QUADS
13943 typedef uint64_t u_int64_t;
13944 #endif
13945 #endif
13946 #endif
13947 #include <$header>
13948
13949 int main() {
13950
13951 ; return 0; }
13952 EOF
13953 if { (eval echo configure:13954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13954   rm -rf conftest*
13955   db_h_file="$header"; break
13956 else
13957   echo "configure: failed program was:" >&5
13958   cat conftest.$ac_ext >&5
13959 fi
13960 rm -f conftest*
13961   done
13962   if test -z "$db_h_file"
13963   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13964   else echo "$ac_t""$db_h_file" 1>&6
13965   fi
13966
13967   if test "$with_database_berkdb" != "no"; then
13968     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13969 echo "configure:13970: checking for Berkeley DB version" >&5
13970     cat > conftest.$ac_ext <<EOF
13971 #line 13972 "configure"
13972 #include "confdefs.h"
13973 #include <$db_h_file>
13974 #if DB_VERSION_MAJOR > 1
13975 yes
13976 #endif
13977
13978 EOF
13979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13980   egrep "yes" >/dev/null 2>&1; then
13981   rm -rf conftest*
13982   cat > conftest.$ac_ext <<EOF
13983 #line 13984 "configure"
13984 #include "confdefs.h"
13985 #include <$db_h_file>
13986 #if DB_VERSION_MAJOR > 2
13987 yes
13988 #endif
13989
13990 EOF
13991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13992   egrep "yes" >/dev/null 2>&1; then
13993   rm -rf conftest*
13994   echo "$ac_t""3" 1>&6; dbfunc=db_create
13995 else
13996   rm -rf conftest*
13997   
13998     echo "$ac_t""2" 1>&6; dbfunc=db_open
13999 fi
14000 rm -f conftest*
14001
14002 else
14003   rm -rf conftest*
14004   
14005     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14006 fi
14007 rm -f conftest*
14008
14009     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14010 echo "configure:14011: checking for $dbfunc" >&5
14011
14012 cat > conftest.$ac_ext <<EOF
14013 #line 14014 "configure"
14014 #include "confdefs.h"
14015 /* System header to define __stub macros and hopefully few prototypes,
14016     which can conflict with char $dbfunc(); below.  */
14017 #include <assert.h>
14018 /* Override any gcc2 internal prototype to avoid an error.  */
14019 /* We use char because int might match the return type of a gcc2
14020     builtin and then its argument prototype would still apply.  */
14021 char $dbfunc();
14022
14023 int main() {
14024
14025 /* The GNU C library defines this for functions which it implements
14026     to always fail with ENOSYS.  Some functions are actually named
14027     something starting with __ and the normal name is an alias.  */
14028 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14029 choke me
14030 #else
14031 $dbfunc();
14032 #endif
14033
14034 ; return 0; }
14035 EOF
14036 if { (eval echo configure:14037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14037   rm -rf conftest*
14038   eval "ac_cv_func_$dbfunc=yes"
14039 else
14040   echo "configure: failed program was:" >&5
14041   cat conftest.$ac_ext >&5
14042   rm -rf conftest*
14043   eval "ac_cv_func_$dbfunc=no"
14044 fi
14045 rm -f conftest*
14046
14047 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14048   echo "$ac_t""yes" 1>&6
14049   with_database_berkdb=yes need_libdb=no
14050 else
14051   echo "$ac_t""no" 1>&6
14052
14053     
14054 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14055 echo "configure:14056: checking for $dbfunc in -ldb" >&5
14056 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14057
14058 xe_check_libs=" -ldb "
14059 cat > conftest.$ac_ext <<EOF
14060 #line 14061 "configure"
14061 #include "confdefs.h"
14062 /* Override any gcc2 internal prototype to avoid an error.  */
14063 /* We use char because int might match the return type of a gcc2
14064     builtin and then its argument prototype would still apply.  */
14065 char $dbfunc();
14066
14067 int main() {
14068 $dbfunc()
14069 ; return 0; }
14070 EOF
14071 if { (eval echo configure:14072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14072   rm -rf conftest*
14073   eval "ac_cv_lib_$ac_lib_var=yes"
14074 else
14075   echo "configure: failed program was:" >&5
14076   cat conftest.$ac_ext >&5
14077   rm -rf conftest*
14078   eval "ac_cv_lib_$ac_lib_var=no"
14079 fi
14080 rm -f conftest*
14081 xe_check_libs=""
14082
14083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14084   echo "$ac_t""yes" 1>&6
14085   with_database_berkdb=yes need_libdb=yes
14086 else
14087   echo "$ac_t""no" 1>&6
14088 fi
14089
14090
14091 fi
14092
14093   fi
14094
14095   if test "$with_database_berkdb" = "yes"; then
14096     { test "$extra_verbose" = "yes" && cat << EOF
14097     Defining DB_H_FILE = "$db_h_file"
14098 EOF
14099 cat >> confdefs.h <<EOF
14100 #define DB_H_FILE "$db_h_file"
14101 EOF
14102 }
14103
14104     { test "$extra_verbose" = "yes" && cat << \EOF
14105     Defining HAVE_BERKELEY_DB
14106 EOF
14107 cat >> confdefs.h <<\EOF
14108 #define HAVE_BERKELEY_DB 1
14109 EOF
14110 }
14111
14112     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14113   else with_database_berkdb=no
14114   fi
14115 fi
14116
14117 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14118      != "no no no"; then
14119   { test "$extra_verbose" = "yes" && cat << \EOF
14120     Defining HAVE_DATABASE
14121 EOF
14122 cat >> confdefs.h <<\EOF
14123 #define HAVE_DATABASE 1
14124 EOF
14125 }
14126
14127   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14128    echo "    xemacs will be linked with \"database.o\""
14129  fi
14130   if test "$with_utf_2000" = "yes"; then
14131     { test "$extra_verbose" = "yes" && cat << \EOF
14132     Defining HAVE_CHISE_CLIENT
14133 EOF
14134 cat >> confdefs.h <<\EOF
14135 #define HAVE_CHISE_CLIENT 1
14136 EOF
14137 }
14138
14139   fi
14140 fi
14141
14142 if test "$with_socks" = "yes"; then
14143   
14144 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14145 echo "configure:14146: checking for SOCKSinit in -lsocks" >&5
14146 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14147
14148 xe_check_libs=" -lsocks "
14149 cat > conftest.$ac_ext <<EOF
14150 #line 14151 "configure"
14151 #include "confdefs.h"
14152 /* Override any gcc2 internal prototype to avoid an error.  */
14153 /* We use char because int might match the return type of a gcc2
14154     builtin and then its argument prototype would still apply.  */
14155 char SOCKSinit();
14156
14157 int main() {
14158 SOCKSinit()
14159 ; return 0; }
14160 EOF
14161 if { (eval echo configure:14162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14162   rm -rf conftest*
14163   eval "ac_cv_lib_$ac_lib_var=yes"
14164 else
14165   echo "configure: failed program was:" >&5
14166   cat conftest.$ac_ext >&5
14167   rm -rf conftest*
14168   eval "ac_cv_lib_$ac_lib_var=no"
14169 fi
14170 rm -f conftest*
14171 xe_check_libs=""
14172
14173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14174   echo "$ac_t""yes" 1>&6
14175     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14176     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14177   { test "$extra_verbose" = "yes" && cat << EOF
14178     Defining $ac_tr_lib
14179 EOF
14180 cat >> confdefs.h <<EOF
14181 #define $ac_tr_lib 1
14182 EOF
14183 }
14184
14185   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14186
14187 else
14188   echo "$ac_t""no" 1>&6
14189 fi
14190
14191
14192   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14193     Defining HAVE_SOCKS
14194 EOF
14195 cat >> confdefs.h <<\EOF
14196 #define HAVE_SOCKS 1
14197 EOF
14198 }
14199
14200 fi
14201
14202 if test "$usage_tracking" = "yes"; then
14203   { test "$extra_verbose" = "yes" && cat << \EOF
14204     Defining USAGE_TRACKING
14205 EOF
14206 cat >> confdefs.h <<\EOF
14207 #define USAGE_TRACKING 1
14208 EOF
14209 }
14210
14211   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14212 fi
14213
14214 if test "$with_modules" != "no"; then
14215   echo "checking for module support" 1>&6
14216 echo "configure:14217: checking for module support" >&5
14217
14218     if test "$with_msw" = "yes"; then
14219     have_dl=yes;
14220   else
14221         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14222 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14223 echo "configure:14224: checking for dlfcn.h" >&5
14224
14225 cat > conftest.$ac_ext <<EOF
14226 #line 14227 "configure"
14227 #include "confdefs.h"
14228 #include <dlfcn.h>
14229 EOF
14230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14231 { (eval echo configure:14232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14233 if test -z "$ac_err"; then
14234   rm -rf conftest*
14235   eval "ac_cv_header_$ac_safe=yes"
14236 else
14237   echo "$ac_err" >&5
14238   echo "configure: failed program was:" >&5
14239   cat conftest.$ac_ext >&5
14240   rm -rf conftest*
14241   eval "ac_cv_header_$ac_safe=no"
14242 fi
14243 rm -f conftest*
14244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14245   echo "$ac_t""yes" 1>&6
14246   
14247       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14248 echo "configure:14249: checking for dlopen in -lc" >&5
14249       cat > conftest.$ac_ext <<EOF
14250 #line 14251 "configure"
14251 #include "confdefs.h"
14252 #include <dlfcn.h>
14253 int main() {
14254         dlopen ("", 0);
14255 ; return 0; }
14256 EOF
14257 if { (eval echo configure:14258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14258   rm -rf conftest*
14259    have_dl=yes 
14260 else
14261   echo "configure: failed program was:" >&5
14262   cat conftest.$ac_ext >&5
14263   rm -rf conftest*
14264   
14265       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14266 echo "configure:14267: checking for dlopen in -ldl" >&5
14267       ac_save_LIBS="$LIBS"
14268       LIBS="-ldl $LIBS"
14269       cat > conftest.$ac_ext <<EOF
14270 #line 14271 "configure"
14271 #include "confdefs.h"
14272 #include <dlfcn.h>
14273 int main() {
14274         dlopen ("", 0);
14275 ; return 0; }
14276 EOF
14277 if { (eval echo configure:14278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14278   rm -rf conftest*
14279    have_dl=yes 
14280 else
14281   echo "configure: failed program was:" >&5
14282   cat conftest.$ac_ext >&5
14283   rm -rf conftest*
14284   LIBS="$ac_save_LIBS"
14285 fi
14286 rm -f conftest*
14287       ac_save_LIBS=
14288 fi
14289 rm -f conftest*
14290 else
14291   echo "$ac_t""no" 1>&6
14292 fi
14293
14294     if test -n "$have_dl"; then
14295       { test "$extra_verbose" = "yes" && cat << \EOF
14296     Defining HAVE_DLOPEN
14297 EOF
14298 cat >> confdefs.h <<\EOF
14299 #define HAVE_DLOPEN 1
14300 EOF
14301 }
14302
14303     else
14304       
14305 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14306 echo "configure:14307: checking for shl_load in -ldld" >&5
14307 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14308
14309 xe_check_libs=" -ldld "
14310 cat > conftest.$ac_ext <<EOF
14311 #line 14312 "configure"
14312 #include "confdefs.h"
14313 /* Override any gcc2 internal prototype to avoid an error.  */
14314 /* We use char because int might match the return type of a gcc2
14315     builtin and then its argument prototype would still apply.  */
14316 char shl_load();
14317
14318 int main() {
14319 shl_load()
14320 ; return 0; }
14321 EOF
14322 if { (eval echo configure:14323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14323   rm -rf conftest*
14324   eval "ac_cv_lib_$ac_lib_var=yes"
14325 else
14326   echo "configure: failed program was:" >&5
14327   cat conftest.$ac_ext >&5
14328   rm -rf conftest*
14329   eval "ac_cv_lib_$ac_lib_var=no"
14330 fi
14331 rm -f conftest*
14332 xe_check_libs=""
14333
14334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14335   echo "$ac_t""yes" 1>&6
14336   libdl=dld have_dl=yes;
14337         { test "$extra_verbose" = "yes" && cat << \EOF
14338     Defining HAVE_SHL_LOAD
14339 EOF
14340 cat >> confdefs.h <<\EOF
14341 #define HAVE_SHL_LOAD 1
14342 EOF
14343 }
14344
14345 else
14346   echo "$ac_t""no" 1>&6
14347
14348 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14349 echo "configure:14350: checking for dld_init in -ldld" >&5
14350 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14351
14352 xe_check_libs=" -ldld "
14353 cat > conftest.$ac_ext <<EOF
14354 #line 14355 "configure"
14355 #include "confdefs.h"
14356 /* Override any gcc2 internal prototype to avoid an error.  */
14357 /* We use char because int might match the return type of a gcc2
14358     builtin and then its argument prototype would still apply.  */
14359 char dld_init();
14360
14361 int main() {
14362 dld_init()
14363 ; return 0; }
14364 EOF
14365 if { (eval echo configure:14366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14366   rm -rf conftest*
14367   eval "ac_cv_lib_$ac_lib_var=yes"
14368 else
14369   echo "configure: failed program was:" >&5
14370   cat conftest.$ac_ext >&5
14371   rm -rf conftest*
14372   eval "ac_cv_lib_$ac_lib_var=no"
14373 fi
14374 rm -f conftest*
14375 xe_check_libs=""
14376
14377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14378   echo "$ac_t""yes" 1>&6
14379   libdl=dld have_dl=yes;
14380         { test "$extra_verbose" = "yes" && cat << \EOF
14381     Defining HAVE_DLD_INIT
14382 EOF
14383 cat >> confdefs.h <<\EOF
14384 #define HAVE_DLD_INIT 1
14385 EOF
14386 }
14387
14388 else
14389   echo "$ac_t""no" 1>&6
14390 fi
14391
14392
14393 fi
14394
14395
14396     fi
14397   fi 
14398   if test -n "$have_dl"; then
14399         
14400 dll_ld=
14401 dll_ldflags=
14402 dll_cflags=
14403 dll_post=
14404 dll_ldo="-o"
14405 ld_dynamic_link_flags=
14406 xehost=$canonical
14407 xealias=$internal_configuration
14408
14409 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14410 echo "configure:14411: checking how to build dynamic libraries for ${xehost}" >&5
14411 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14412 case "$xehost" in
14413 *-*-linux-gnu*) ;;
14414 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14415 esac
14416
14417 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14418 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14419 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14420
14421 case "$xehost_os" in
14422 aix3*)
14423   # AIX sometimes has problems with the GCC collect2 program.  For some
14424   # reason, if we set the COLLECT_NAMES environment variable, the problems
14425   # vanish in a puff of smoke.
14426   if test "${COLLECT_NAMES+set}" != set; then
14427     COLLECT_NAMES=
14428     export COLLECT_NAMES
14429   fi
14430   ;;
14431 esac
14432
14433 # Now see if the compiler is really GCC.
14434 if test "$GCC" = "yes"; then
14435   XEGCC=yes
14436 else
14437   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14438 echo "configure:14439: checking checking whether we are using GNU C" >&5
14439   cat > conftest.$ac_ext <<EOF
14440 #line 14441 "configure"
14441 #include "confdefs.h"
14442
14443 #ifdef __GNUC__
14444   yes;
14445 #endif
14446
14447 EOF
14448 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14449   egrep "yes" >/dev/null 2>&1; then
14450   rm -rf conftest*
14451   XEGCC=yes
14452 else
14453   rm -rf conftest*
14454   XEGCC=no
14455 fi
14456 rm -f conftest*
14457
14458   echo "$ac_t""${XEGCC}" 1>&6
14459 fi
14460
14461 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14462 echo "configure:14463: checking how to produce PIC code" >&5
14463 wl=
14464
14465 can_build_shared=yes
14466 if test "$XEGCC" = yes; then
14467   wl='-Wl,'
14468
14469   case "$xehost_os" in
14470   aix[3-9]* | irix[5-9]* | osf[3-9])
14471     # PIC is the default for these OSes.
14472     ;;
14473
14474   os2*)
14475     # We can build DLLs from non-PIC.
14476     ;;
14477   amigaos*)
14478     # FIXME: we need at least 68020 code to build shared libraries, but
14479     # adding the `-m68020' flag to GCC prevents building anything better,
14480     # like `-m68040'.
14481     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14482     ;;
14483   *cygwin* | *mingw* )
14484     # PIC is the default
14485     ;;
14486   *)
14487     dll_cflags='-fPIC'
14488     ;;
14489   esac
14490 else
14491   # PORTME Check for PIC flags for the system compiler.
14492   case "$xehost_os" in
14493   hpux9* | hpux1[0-9]*)
14494     # Is there a better link_static_flag that works with the bundled CC?
14495     wl='-Wl,'
14496     dll_cflags='+Z'
14497     ;;
14498
14499   irix[5-9]*)
14500     wl='-Wl,'
14501     # PIC (with -KPIC) is the default.
14502     ;;
14503
14504   os2*)
14505     # We can build DLLs from non-PIC.
14506     ;;
14507
14508   osf[3-9]*)
14509     # All OSF/1 code is PIC.
14510     wl='-Wl,'
14511     ;;
14512
14513   aix[3-9]*)
14514     # All AIX code is PIC.
14515     wl='-Wl,'
14516     ;;
14517
14518   sco3.2v5*)
14519     dll_cflags='-belf -Kpic'
14520     wl='-Wl,'
14521     ;;
14522
14523   unixware*)
14524     dll_cflags="-KPIC"
14525     wl="-Wl,"
14526     ;;
14527
14528   sysv4*)
14529     dll_cflags="-KPIC"
14530     wl="-Wl,"
14531     ;;
14532
14533   sysv5*)
14534     dll_cflags="-KPIC"
14535     wl="-Wl,"
14536     ;;
14537
14538   solaris2*)
14539     dll_cflags='-KPIC'
14540     wl='-Wl,'
14541     ;;
14542
14543   sunos4*)
14544     dll_cflags='-PIC'
14545     wl='-Qoption ld '
14546     ;;
14547
14548   uts4*)
14549     dll_cflags='-pic'
14550     ;;
14551
14552   *)
14553     can_build_shared=no
14554     ;;
14555   esac
14556 fi
14557
14558 if test -n "$dll_cflags"; then
14559   echo "$ac_t""${dll_cflags}" 1>&6
14560
14561   # Check to make sure the dll_cflags actually works.
14562   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14563 echo "configure:14564: checking if PIC flag ${dll_cflags} really works" >&5
14564   save_CFLAGS="$CFLAGS"
14565   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14566   cat > conftest.$ac_ext <<EOF
14567 #line 14568 "configure"
14568 #include "confdefs.h"
14569
14570 int main() {
14571 int x=0;
14572 ; return 0; }
14573 EOF
14574 if { (eval echo configure:14575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14575   rm -rf conftest*
14576   
14577     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14578     # reports no error.  So, we need to grep stderr for (Bundled).
14579     if grep '(Bundled)' config.log >/dev/null; then
14580       echo "$ac_t""no" 1>&6
14581       can_build_shared=no
14582       dll_cflags=
14583     else
14584       echo "$ac_t""yes" 1>&6
14585     fi
14586 else
14587   echo "configure: failed program was:" >&5
14588   cat conftest.$ac_ext >&5
14589   rm -rf conftest*
14590   echo "$ac_t""no" 1>&6
14591     can_build_shared=no
14592     dll_cflags=
14593 fi
14594 rm -f conftest*
14595   CFLAGS="$save_CFLAGS"
14596 else
14597   echo "$ac_t""none" 1>&6
14598 fi
14599
14600 if test "$can_build_shared" = "yes"; then
14601 cc_produces_so=no
14602 xldf=
14603 xcldf=
14604 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14605 echo "configure:14606: checking if C compiler can produce shared libraries" >&5
14606 if test "$XEGCC" = yes; then
14607   xcldf="-shared"
14608   xldf="-shared"
14609 else # Not using GCC
14610   case "$xehost_os" in
14611     aix[3-9]*)
14612       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14613       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14614       ;;
14615
14616     freebsd2* | netbsd* | openbsd*)
14617       xldf="-Bshareable"
14618       xcldf="${wl}-Bshareable"
14619       ;;
14620
14621     freebsd3*)
14622       xcldf="-shared"
14623       ;;
14624
14625     hpux*)
14626       xldf="-b +s"
14627       xcldf="${wl}-b ${wl}+s"
14628       ;;
14629
14630     irix[5-9]* | osf[3-9]*)
14631       xcldf="${wl}-shared"
14632       xldf="-shared"
14633       ;;
14634
14635     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14636       xcldf="-G"
14637       xldf="-G"
14638       ;;
14639
14640     sunos4*)
14641       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14642       xldf="-assert pure-text -Bstatic"
14643       ;;
14644   esac
14645 fi # End if if we are using gcc
14646
14647 if test -n "$xcldf"; then
14648   save_LDFLAGS=$LDFLAGS
14649   save_LIBS=$LIBS
14650   save_xe_libs=$xe_libs
14651   LDFLAGS="$xcldf $LDFLAGS"
14652   LIBS=
14653   xe_libs=
14654   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14655   cat > conftest.$ac_ext <<EOF
14656 #line 14657 "configure"
14657 #include "confdefs.h"
14658
14659 int main() {
14660 int x=0;
14661 ; return 0; }
14662 EOF
14663 if { (eval echo configure:14664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14664   rm -rf conftest*
14665   cc_produces_so=yes
14666 else
14667   echo "configure: failed program was:" >&5
14668   cat conftest.$ac_ext >&5
14669   rm -rf conftest*
14670   cc_produces_so=no
14671 fi
14672 rm -f conftest*
14673   LDFLAGS=$save_LDFLAGS
14674   LIBS=$save_LIBS
14675   xe_libs=$save_xe_libs
14676   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14677 else
14678   cc_produces_so=no
14679 fi
14680 echo "$ac_t""${cc_produces_so}" 1>&6
14681
14682 LTLD=$LD
14683 if test -z "$LTLD"; then
14684   ac_prog=ld
14685   if test "$XEGCC" = yes; then
14686     # Check if gcc -print-prog-name=ld gives a path.
14687     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14688 echo "configure:14689: checking for ld used by GCC" >&5
14689     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14690     case "$ac_prog" in
14691     # Accept absolute paths.
14692     /*)
14693       if test -z "$LTLD"; then
14694 #        case "$ac_prog" in
14695 #          *gcc-lib*) LTLD="$CC"
14696 #                     ;;
14697 #          *)
14698          LTLD="$ac_prog"
14699 #                     ;;
14700 #        esac
14701       fi
14702       ;;
14703     "")
14704       # If it fails, then pretend we aren't using GCC.
14705       ac_prog=ld
14706       ;;
14707     *)
14708       # If it is relative, then search for the first ld in PATH.
14709       with_gnu_ld=unknown
14710       ;;
14711     esac
14712   else
14713     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14714 echo "configure:14715: checking for GNU ld" >&5
14715   fi
14716
14717   if test -z "$LTLD"; then
14718     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14719     for ac_dir in $PATH; do
14720       test -z "$ac_dir" && ac_dir=.
14721       if test -f "$ac_dir/$ac_prog"; then
14722         LTLD="$ac_dir/$ac_prog"
14723         # Check to see if the program is GNU ld.  I'd rather use --version,
14724         # but apparently some GNU ld's only accept -v.
14725         # Break only if it was the GNU/non-GNU ld that we prefer.
14726         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14727           xe_gnu_ld=yes
14728         else
14729           xe_gnu_ld=no
14730         fi
14731       fi
14732     done
14733     IFS="$ac_save_ifs"
14734   fi
14735
14736   if test -n "$LTLD"; then
14737     echo "$ac_t""${LTLD}" 1>&6
14738   else
14739     echo "$ac_t""no" 1>&6
14740   fi
14741
14742   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14743     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14744     exit 1
14745   fi
14746 fi
14747
14748 ld_dynamic_link_flags=
14749
14750 # Check to see if it really is or isn't GNU ld.
14751 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14752 echo "configure:14753: checking if the linker is GNU ld" >&5
14753 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14754 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14755   xe_gnu_ld=yes
14756 else
14757   xe_gnu_ld=no
14758 fi
14759 echo "$ac_t""${xe_gnu_ld}" 1>&6
14760
14761 case "$xehost_os" in
14762   amigaos* | sunos4*)
14763     # On these operating systems, we should treat GNU ld like the system ld.
14764     gnu_ld_acts_native=yes
14765     ;;
14766   *)
14767     gnu_ld_acts_native=no
14768     ;;
14769 esac
14770
14771 if test "$cc_produces_so" = "yes"; then
14772   dll_ld=$CC
14773   dll_ldflags=$xcldf
14774   can_build_shared=yes
14775   ld_shlibs=yes
14776 else
14777   # OK - only NOW do we futz about with ld.
14778   # See if the linker supports building shared libraries.
14779   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14780 echo "configure:14781: checking whether the linker supports shared libraries" >&5
14781   dll_ld=$CC
14782   dll_ldflags=$LDFLAGS
14783   ld_shlibs=yes
14784   can_build_shared=yes
14785   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14786     # See if GNU ld supports shared libraries.
14787     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14788       dll_ld=$CC
14789       dll_ldflags="-shared"
14790       ld_shlibs=yes
14791     else
14792       ld_shlibs=no
14793     fi
14794   else
14795     # PORTME fill in a description of your system's linker (not GNU ld)
14796     case "$xehost_os" in
14797     aix3*)
14798       dll_ld=$LTLD
14799       dll_ldflags=$xldf
14800       ;;
14801
14802     aix[4-9]*)
14803       dll_ldflags=$xcldf
14804       ;;
14805
14806     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14807     # support.  Future versions do this automatically, but an explicit c++rt0.o
14808     # doesn't break anything, and helps significantly (at the cost of a little
14809     # extra space).
14810     freebsd2.2*)
14811       dll_ld=$LTLD
14812       dll_ldflags=$xldf
14813       dll_post="/usr/lib/c++rt0.o"
14814       ;;
14815
14816     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14817     freebsd2*)
14818       dll_ld=$LTLD
14819       dll_ldflags="-Bshareable"
14820       ;;
14821
14822     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14823     freebsd3*)
14824       dll_ldflags="-shared"
14825       ;;
14826
14827     hpux*)
14828       dll_ld=$LTLD
14829       dll_ldflags=$xldf
14830       ;;
14831
14832     irix[5-9]*)
14833       dll_ld=$LTLD
14834       dll_ldflags=$xldf
14835       ;;
14836
14837     netbsd*)
14838       # Tested with NetBSD 1.2 ld
14839       dll_ld=$LTLD
14840       dll_ldflags=$xldf
14841       ;;
14842
14843     openbsd*)
14844       dll_ld=$LTLD
14845       dll_ldflags=$xldf
14846       ;;
14847
14848     osf3* | osf4*)
14849       dll_ld=$LTLD
14850       dll_ldflags=$xldf
14851       ;;
14852
14853     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14854     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14855       dll_ld=$LTLD
14856       case "$dll_ld" in
14857         *gcc*) dll_ldflags="-shared"
14858                dll_ld=$CC
14859                ;;
14860         *)     dll_ldflags="-G"
14861                ;;
14862       esac
14863       ;;
14864
14865     sunos4*)
14866       if test "$XEGCC" = yes; then
14867         dll_ld=$CC
14868       else
14869         dll_ld=$LTLD
14870       fi
14871       dll_ldflags=$xldf
14872       ;;
14873
14874     uts4*)
14875       dll_ld=$LTLD
14876       dll_ldflags="-G"
14877       ;;
14878
14879     bsdi*)
14880       dll_ldflags="-r"
14881       dll_ld="shlicc2"
14882       ;;
14883
14884     *)
14885       ld_shlibs=no
14886       can_build_shared=no
14887       ;;
14888     esac
14889   fi
14890   echo "$ac_t""${ld_shlibs}" 1>&6
14891   if test "$ld_shlibs" = "no"; then
14892     can_build_shared=no
14893   fi
14894 fi # End of if cc_produces_so = no
14895
14896
14897 if test "$xe_gnu_ld" = yes; then
14898   if test "$ld_shlibs" = yes; then
14899     ld_dynamic_link_flags="${wl}-export-dynamic"
14900   fi
14901 fi
14902
14903 if test -z "$ld_dynamic_link_flags"; then
14904   case "$xehost_os" in
14905   aix[3-9]*)
14906     ld_dynamic_link_flags=
14907     ;;
14908
14909   freebsd2.2*)
14910     ld_dynamic_link_flags=
14911     ;;
14912
14913   freebsd2*)
14914     ld_dynamic_link_flags=
14915     ;;
14916
14917   freebsd3*)
14918     ld_dynamic_link_flags=
14919     ;;
14920
14921   hpux*)
14922     ld_dynamic_link_flags="${wl}-E"
14923     ;;
14924
14925   irix[5-9]*)
14926     ld_dynamic_link_flags=
14927     ;;
14928
14929   netbsd*)
14930     ld_dynamic_link_flags=
14931     ;;
14932
14933   openbsd*)
14934     ld_dynamic_link_flags=
14935     ;;
14936
14937   osf3* | osf4*)
14938     ld_dynamic_link_flags=
14939     ;;
14940
14941   solaris2* | solaris7*)
14942     ld_dynamic_link_flags=
14943     ;;
14944
14945   sco3.2v5* | unixware* | sysv5* | sysv4*)
14946     ld_dynamic_link_flags="${wl}-Bexport"
14947     ;;
14948
14949   sunos4*)
14950     ld_dynamic_link_flags=
14951     ;;
14952
14953   uts4*)
14954     ld_dynamic_link_flags=
14955     ;;
14956
14957   bsdi*)
14958     ld_dynamic_link_flags=
14959     ;;
14960
14961   esac
14962 fi # End of if -z ld_dynamic_link_flags
14963 fi # End of if test "$can_build_shared" = "yes"
14964
14965
14966
14967
14968
14969
14970
14971
14972   fi
14973
14974   if test "$can_build_shared" = "yes"; then
14975     { test "$extra_verbose" = "yes" && cat << \EOF
14976     Defining HAVE_SHLIB
14977 EOF
14978 cat >> confdefs.h <<\EOF
14979 #define HAVE_SHLIB 1
14980 EOF
14981 }
14982
14983     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14984    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14985  fi
14986     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14987     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14988     for ac_func in dlerror _dlerror
14989 do
14990 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14991 echo "configure:14992: checking for $ac_func" >&5
14992
14993 cat > conftest.$ac_ext <<EOF
14994 #line 14995 "configure"
14995 #include "confdefs.h"
14996 /* System header to define __stub macros and hopefully few prototypes,
14997     which can conflict with char $ac_func(); below.  */
14998 #include <assert.h>
14999 /* Override any gcc2 internal prototype to avoid an error.  */
15000 /* We use char because int might match the return type of a gcc2
15001     builtin and then its argument prototype would still apply.  */
15002 char $ac_func();
15003
15004 int main() {
15005
15006 /* The GNU C library defines this for functions which it implements
15007     to always fail with ENOSYS.  Some functions are actually named
15008     something starting with __ and the normal name is an alias.  */
15009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15010 choke me
15011 #else
15012 $ac_func();
15013 #endif
15014
15015 ; return 0; }
15016 EOF
15017 if { (eval echo configure:15018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15018   rm -rf conftest*
15019   eval "ac_cv_func_$ac_func=yes"
15020 else
15021   echo "configure: failed program was:" >&5
15022   cat conftest.$ac_ext >&5
15023   rm -rf conftest*
15024   eval "ac_cv_func_$ac_func=no"
15025 fi
15026 rm -f conftest*
15027
15028 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15029   echo "$ac_t""yes" 1>&6
15030     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15031   { test "$extra_verbose" = "yes" && cat << EOF
15032     Defining $ac_tr_func
15033 EOF
15034 cat >> confdefs.h <<EOF
15035 #define $ac_tr_func 1
15036 EOF
15037 }
15038  
15039 else
15040   echo "$ac_t""no" 1>&6
15041 fi
15042 done
15043
15044     with_modules=yes
15045   else
15046     if test "$with_modules" = "yes"; then
15047       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15048     else
15049       echo "configure: warning: "Module support cannot be provided."" 1>&2
15050     fi
15051     with_modules=no
15052   fi
15053 fi
15054
15055 cat > conftest.$ac_ext <<EOF
15056 #line 15057 "configure"
15057 #include "confdefs.h"
15058 int main(int c,char *v[]){return 0;}
15059 EOF
15060 if { (eval echo configure:15061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15061 then
15062   :
15063 else
15064   conftest_rc="$?"
15065   echo "configure: failed program was:" >&5
15066   cat conftest.$ac_ext >&5
15067   rm -fr conftest*
15068   
15069   echo ""
15070   echo "*** PANIC *** The C compiler can no longer build working executables."
15071   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15072   echo "*** PANIC *** The most likely reason for this problem is that configure"
15073   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15074   echo "*** PANIC *** found at run time."
15075   echo "*** PANIC ***"
15076   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15077   echo "*** PANIC *** On other systems, try telling configure where to find the"
15078   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15079   echo "*** PANIC ***"
15080   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15081   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15082   echo "*** PANIC *** on your system.  Don't do that."
15083   exit 1
15084 fi
15085 rm -fr conftest*
15086
15087 if test "$win32_processes" = "yes"; then
15088   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15089    echo "    xemacs will be linked with \"process-nt.o\""
15090  fi
15091 else
15092   { test "$extra_verbose" = "yes" && cat << \EOF
15093     Defining HAVE_UNIX_PROCESSES
15094 EOF
15095 cat >> confdefs.h <<\EOF
15096 #define HAVE_UNIX_PROCESSES 1
15097 EOF
15098 }
15099
15100   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15101    echo "    xemacs will be linked with \"process-unix.o\""
15102  fi
15103 fi
15104
15105
15106
15107 T=""
15108 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15109 CFLAGS="$T"
15110
15111
15112 T=""
15113 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15114 extra_objs="$T"
15115
15116
15117 T=""
15118 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
15119 c_switch_general="$T"
15120
15121
15122 T=""
15123 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
15124 c_switch_window_system="$T"
15125
15126
15127 T=""
15128 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15129 c_switch_all="$T"
15130
15131
15132 T=""
15133 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
15134 ld_switch_general="$T"
15135
15136
15137 T=""
15138 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15139 ld_switch_window_system="$T"
15140
15141
15142 T=""
15143 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15144 ld_switch_all="$T"
15145
15146
15147 T=""
15148 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15149 ld_libs_general="$T"
15150
15151
15152 T=""
15153 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
15154 ld_libs_window_system="$T"
15155
15156
15157 T=""
15158 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15159 ld_libs_all="$T"
15160
15161
15162
15163 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15164 internal_makefile_list="Makefile.in"
15165 SUBDIR_MAKEFILES=''
15166 test -d lock || mkdir lock
15167 for dir in $MAKE_SUBDIR; do
15168   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15169         test -d "$d" || mkdir "$d"; cd "$d"
15170       done ) ;;
15171    * ) test -d "$dir" || mkdir "$dir" ;;
15172   esac
15173   
15174 T=""
15175 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15176 SUBDIR_MAKEFILES="$T"
15177
15178   
15179 T=""
15180 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15181 internal_makefile_list="$T"
15182
15183 done
15184
15185
15186
15187
15188 for dir in src/s src/m; do
15189   if test ! -d "$dir" ; then
15190     echo Making symbolic link to "$srcdir/$dir"
15191     ${LN_S} "$srcdir/$dir" "$dir"
15192   fi
15193 done
15194
15195 if test "$extra_verbose" = "yes"; then
15196   echo ""
15197   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
15198   echo ""
15199 fi
15200
15201
15202 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15203   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15204   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15205 fi
15206
15207 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15208   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15209   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15210 fi
15211
15212 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15213   test "$extra_verbose" = "yes" && echo "creating TAGS"
15214   echo "\f
15215 $srcdir/TAGS,include" > "TAGS"
15216 fi
15217
15218 if test "$__SUNPRO_C" = "yes"; then
15219   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15220   ( echo "# For use with Sun WorkShop's Source browser."
15221     echo "# See sbquery(1) and sbinit(4) for more information"
15222     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15223   ) > .sbinit
15224 fi
15225
15226 rm -f core
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247 PREFIX=$prefix
15248 while true; do
15249   case "$PREFIX" in
15250     *\$* ) eval "PREFIX=$PREFIX" ;;
15251     *) break ;;
15252   esac
15253 done
15254
15255
15256
15257
15258 EXEC_PREFIX=$exec_prefix
15259 while true; do
15260   case "$EXEC_PREFIX" in
15261     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15262     *) break ;;
15263   esac
15264 done
15265
15266
15267
15268
15269 INFODIR=$infodir
15270 while true; do
15271   case "$INFODIR" in
15272     *\$* ) eval "INFODIR=$INFODIR" ;;
15273     *) break ;;
15274   esac
15275 done
15276
15277
15278
15279
15280 INFOPATH=$infopath
15281 while true; do
15282   case "$INFOPATH" in
15283     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15284     *) break ;;
15285   esac
15286 done
15287
15288
15289
15290
15291 PACKAGE_PATH=$package_path
15292 while true; do
15293   case "$PACKAGE_PATH" in
15294     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15295     *) break ;;
15296   esac
15297 done
15298
15299
15300
15301
15302 LISPDIR=$lispdir
15303 while true; do
15304   case "$LISPDIR" in
15305     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15306     *) break ;;
15307   esac
15308 done
15309
15310
15311
15312
15313 MODULEDIR=$moduledir
15314 while true; do
15315   case "$MODULEDIR" in
15316     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15317     *) break ;;
15318   esac
15319 done
15320
15321
15322
15323
15324 SITELISPDIR=$sitelispdir
15325 while true; do
15326   case "$SITELISPDIR" in
15327     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15328     *) break ;;
15329   esac
15330 done
15331
15332
15333
15334
15335 SITEMODULEDIR=$sitemoduledir
15336 while true; do
15337   case "$SITEMODULEDIR" in
15338     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15339     *) break ;;
15340   esac
15341 done
15342
15343
15344
15345
15346 ETCDIR=$etcdir
15347 while true; do
15348   case "$ETCDIR" in
15349     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15350     *) break ;;
15351   esac
15352 done
15353
15354
15355
15356
15357 DOCDIR=$docdir
15358 while true; do
15359   case "$DOCDIR" in
15360     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15361     *) break ;;
15362   esac
15363 done
15364
15365
15366
15367
15368 ARCHLIBDIR=$archlibdir
15369 while true; do
15370   case "$ARCHLIBDIR" in
15371     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15372     *) break ;;
15373   esac
15374 done
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15396
15397
15398
15399
15400
15401
15402
15403 : ${XEMACS_CC:=$CC}
15404
15405
15406 if test "$with_prefix" = "yes"; then
15407   { test "$extra_verbose" = "yes" && cat << \EOF
15408     Defining PREFIX_USER_DEFINED
15409 EOF
15410 cat >> confdefs.h <<\EOF
15411 #define PREFIX_USER_DEFINED 1
15412 EOF
15413 }
15414
15415 fi
15416
15417 if test "$with_site_lisp" = "no"; then
15418   { test "$extra_verbose" = "yes" && cat << \EOF
15419     Defining INHIBIT_SITE_LISP
15420 EOF
15421 cat >> confdefs.h <<\EOF
15422 #define INHIBIT_SITE_LISP 1
15423 EOF
15424 }
15425
15426 fi
15427 if test "$with_site_modules" = "no"; then
15428   { test "$extra_verbose" = "yes" && cat << \EOF
15429     Defining INHIBIT_SITE_MODULES
15430 EOF
15431 cat >> confdefs.h <<\EOF
15432 #define INHIBIT_SITE_MODULES 1
15433 EOF
15434 }
15435
15436 fi
15437
15438
15439 T=""
15440 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15441 ac_configure_args="$T"
15442
15443 { test "$extra_verbose" = "yes" && cat << EOF
15444     Defining EMACS_CONFIGURATION = "$configuration"
15445 EOF
15446 cat >> confdefs.h <<EOF
15447 #define EMACS_CONFIGURATION "$configuration"
15448 EOF
15449 }
15450
15451 { test "$extra_verbose" = "yes" && cat << EOF
15452     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15453 EOF
15454 cat >> confdefs.h <<EOF
15455 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15456 EOF
15457 }
15458
15459
15460
15461 null_string=""
15462 { test "$extra_verbose" = "yes" && cat << EOF
15463     Defining LD_SWITCH_X_SITE = $null_string
15464 EOF
15465 cat >> confdefs.h <<EOF
15466 #define LD_SWITCH_X_SITE $null_string
15467 EOF
15468 }
15469
15470 { test "$extra_verbose" = "yes" && cat << EOF
15471     Defining LD_SWITCH_X_SITE_AUX = $null_string
15472 EOF
15473 cat >> confdefs.h <<EOF
15474 #define LD_SWITCH_X_SITE_AUX $null_string
15475 EOF
15476 }
15477
15478 { test "$extra_verbose" = "yes" && cat << EOF
15479     Defining C_SWITCH_X_SITE = $null_string
15480 EOF
15481 cat >> confdefs.h <<EOF
15482 #define C_SWITCH_X_SITE $null_string
15483 EOF
15484 }
15485
15486 { test "$extra_verbose" = "yes" && cat << EOF
15487     Defining LD_SWITCH_SITE = $null_string
15488 EOF
15489 cat >> confdefs.h <<EOF
15490 #define LD_SWITCH_SITE $null_string
15491 EOF
15492 }
15493
15494 { test "$extra_verbose" = "yes" && cat << EOF
15495     Defining C_SWITCH_SITE = $null_string
15496 EOF
15497 cat >> confdefs.h <<EOF
15498 #define C_SWITCH_SITE $null_string
15499 EOF
15500 }
15501
15502
15503
15504 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15505     Defining GNU_MALLOC
15506 EOF
15507 cat >> confdefs.h <<\EOF
15508 #define GNU_MALLOC 1
15509 EOF
15510 }
15511
15512 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15513     Defining USE_SYSTEM_MALLOC
15514 EOF
15515 cat >> confdefs.h <<\EOF
15516 #define USE_SYSTEM_MALLOC 1
15517 EOF
15518 }
15519
15520 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15521     Defining USE_DEBUG_MALLOC
15522 EOF
15523 cat >> confdefs.h <<\EOF
15524 #define USE_DEBUG_MALLOC 1
15525 EOF
15526 }
15527
15528                                               { test "$extra_verbose" = "yes" && cat << \EOF
15529     Defining USE_SYSTEM_MALLOC
15530 EOF
15531 cat >> confdefs.h <<\EOF
15532 #define USE_SYSTEM_MALLOC 1
15533 EOF
15534 }
15535
15536 fi
15537 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15538     Defining I18N3
15539 EOF
15540 cat >> confdefs.h <<\EOF
15541 #define I18N3 1
15542 EOF
15543 }
15544
15545 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15546     Defining USE_GCC
15547 EOF
15548 cat >> confdefs.h <<\EOF
15549 #define USE_GCC 1
15550 EOF
15551 }
15552
15553 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15554     Defining EXTERNAL_WIDGET
15555 EOF
15556 cat >> confdefs.h <<\EOF
15557 #define EXTERNAL_WIDGET 1
15558 EOF
15559 }
15560
15561 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15562     Defining QUICK_BUILD
15563 EOF
15564 cat >> confdefs.h <<\EOF
15565 #define QUICK_BUILD 1
15566 EOF
15567 }
15568
15569 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15570     Defining PURIFY
15571 EOF
15572 cat >> confdefs.h <<\EOF
15573 #define PURIFY 1
15574 EOF
15575 }
15576
15577 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15578     Defining QUANTIFY
15579 EOF
15580 cat >> confdefs.h <<\EOF
15581 #define QUANTIFY 1
15582 EOF
15583 }
15584
15585 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15586     Defining MAIL_USE_POP
15587 EOF
15588 cat >> confdefs.h <<\EOF
15589 #define MAIL_USE_POP 1
15590 EOF
15591 }
15592
15593 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15594     Defining KERBEROS
15595 EOF
15596 cat >> confdefs.h <<\EOF
15597 #define KERBEROS 1
15598 EOF
15599 }
15600
15601 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15602     Defining HESIOD
15603 EOF
15604 cat >> confdefs.h <<\EOF
15605 #define HESIOD 1
15606 EOF
15607 }
15608
15609 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15610     Defining USE_UNION_TYPE
15611 EOF
15612 cat >> confdefs.h <<\EOF
15613 #define USE_UNION_TYPE 1
15614 EOF
15615 }
15616
15617 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15618     Defining PDUMP
15619 EOF
15620 cat >> confdefs.h <<\EOF
15621 #define PDUMP 1
15622 EOF
15623 }
15624
15625 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15626     Defining IPV6_CANONICALIZE
15627 EOF
15628 cat >> confdefs.h <<\EOF
15629 #define IPV6_CANONICALIZE 1
15630 EOF
15631 }
15632
15633
15634
15635 (
15636 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15637 else
15638   echo "uname -a: `uname -a`"
15639 fi
15640 echo ""
15641 echo "$0 $quoted_arguments"
15642 ) > Installation
15643
15644 if test ! -z ${emacs_beta_version} ; then
15645   if test -z "${emacs_is_beta}" ; then
15646         xemacs_betaname=".${emacs_beta_version}"
15647   else
15648         xemacs_betaname="-b${emacs_beta_version}"
15649   fi
15650 else
15651   xemacs_betaname=""
15652 fi
15653
15654 (
15655 echo "
15656
15657 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15658 "
15659 echo "
15660 Compilation / Installation:"
15661 echo "  Source code location:              $srcdir"
15662 echo "  Installation prefix:               $prefix"
15663 if test -n "$site_includes"; then
15664   echo "  Additional header files:           $site_includes"
15665 fi
15666 if test -n "$site_libraries"; then
15667   echo "  Additional libraries:              $site_libraries"
15668 fi
15669 if test -n "$site_prefixes"; then
15670   echo "  Additional prefixes:               $site_prefixes"
15671 fi
15672 if test -n "$runpath"; then
15673   echo "  Runtime library search path:       $runpath"
15674 fi
15675
15676 if test -n "$opsysfile"
15677 then echo "  Operating system description file: \`$opsysfile'"
15678 else echo "  Not using any operating system description file"
15679 fi
15680 if test -n "$machfile"
15681 then echo "  Machine description file:          \`$machfile'"
15682 else echo "  Not using any machine description file"
15683 fi
15684
15685 echo "  Compiler:                          $CC $CFLAGS"
15686 echo "  Relocating allocator for buffers:  $rel_alloc"
15687 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15688
15689 echo "
15690 Window System:"
15691 if test "$with_msw" = "yes"; then
15692   echo "  Compiling in support for the Microsoft window system."
15693 fi
15694 if test "$with_x11" = "yes"; then
15695   echo "  Compiling in support for the X window system:"
15696   echo "    - X Windows headers location:                 $x_includes"
15697   echo "    - X Windows libraries location:               $x_libraries"
15698   if test "$with_xauth" != yes; then
15699     echo "    - Xau (X authority) not available."
15700   fi
15701   if test "$with_xmu" != yes; then
15702     echo "    - Xmu library not available; substituting equivalent routines."
15703   fi
15704   if test "$with_wmcommand" != no; then
15705     echo "    - Handling WM_COMMAND properly."
15706   fi
15707 fi
15708 if test "$need_athena" = "yes"; then
15709   echo "  Compiling in support for the Athena widget set:"
15710   echo "    - Athena headers location:                    $athena_h_path"
15711   echo "    - Athena library to link:                     $athena_lib"
15712 fi
15713 case "$with_menubars" in
15714   gtk   ) echo "  Using GTK menubars."   ;;
15715   lucid ) echo "  Using Lucid menubars." ;;
15716   motif ) echo "  Using Motif menubars."
15717           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15718           echo "             We recommend using the Lucid menubar instead."
15719           echo "             Re-run configure with --with-menubars='lucid'." ;;
15720     msw ) echo "  Using MS-Windows menubars." ;;
15721 esac
15722 case "$with_scrollbars" in
15723   gtk    ) echo "  Using GTK scrollbars."        ;;
15724   lucid  ) echo "  Using Lucid scrollbars."      ;;
15725   motif  ) echo "  Using Motif scrollbars."      ;;
15726   athena ) echo "  Using Athena scrollbars."     ;;
15727      msw ) echo "  Using MS-Windows scrollbars." ;;
15728 esac
15729 case "$with_dialogs" in
15730   gtk    ) echo "  Using GTK dialog boxes." ;;
15731   motif  ) echo "  Using Motif dialog boxes."
15732            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15733              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15734              echo "             We recommend using the Athena dialog boxes instead."
15735              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15736              echo "             Read the PROBLEMS file for more information."
15737            fi; fi ;;
15738   athena ) echo "  Using Athena dialog boxes."     ;;
15739      msw ) echo "  Using MS-Windows dialog boxes." ;;
15740 esac
15741 case "$with_widgets" in
15742   gtk    ) echo "  Using GTK native widgets."        ;;
15743   motif  ) echo "  Using Motif native widgets."      ;;
15744   athena ) echo "  Using Athena native widgets."     ;;
15745      msw ) echo "  Using MS-Windows native widgets." ;;
15746 esac
15747 if test "$with_dragndrop" = yes; then
15748   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15749   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15750 fi
15751
15752 echo "
15753 TTY:"
15754 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15755 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15756
15757 echo "
15758 Images:"
15759 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15760 if test "$with_xpm" = yes; then
15761   echo "  Compiling in support for XPM  images."
15762 elif test "$with_x11" = yes; then
15763   echo "  WARNING: -----------------------------------------------------------"
15764   echo "  WARNING: Compiling without XPM image support."
15765   if test "$xpm_problem" != ""; then
15766     echo "  Reason: $xpm_problem"
15767   fi
15768   echo "  WARNING: You should strongly consider installing XPM."
15769   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15770   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15771   echo "  WARNING: -----------------------------------------------------------"
15772 fi
15773 if test "$with_png" = yes; then
15774   echo "  Compiling in support for PNG  images."
15775 elif test "$window_system" != "none"; then
15776   echo "  WARNING: -----------------------------------------------------------"
15777   echo "  WARNING: Compiling without PNG image support."
15778   if test "$png_problem" != ""; then
15779     echo "  Reason: $png_problem"
15780   fi
15781   echo "  WARNING: You should strongly consider installing the PNG libraries."
15782   echo "  WARNING: Otherwise certain images and glyphs may not display."
15783   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15784   echo "  WARNING: -----------------------------------------------------------"
15785 fi
15786 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15787 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15788 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15789
15790 echo "
15791 Sound:"
15792 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15793 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15794 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15795 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15796
15797 echo "
15798 Databases:"
15799 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15800 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15801 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15802 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15803 if test "$with_postgresql" = yes; then
15804   echo "  Compiling in support for PostgreSQL."
15805   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15806   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15807 fi
15808
15809 echo "
15810 Internationalization:"
15811 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15812 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15813 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15814 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15815 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15816 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15817 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15818 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15819 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15820 if test "$with_wnn" = yes; then
15821   echo "  Compiling in support for the WNN input method on Mule."
15822   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15823 fi
15824 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15825
15826 echo "
15827 Mail:"
15828 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15829 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15830 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15831 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15832
15833 echo "
15834 Other Features:"
15835 test "with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
15836 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15837 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15838 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15839 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15840 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15841 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15842 test "$pdump" = yes && echo "  Using the new portable dumper."
15843 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15844 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15845 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15846   != "no no no no no no"; then
15847   echo "  WARNING: ---------------------------------------------------------"
15848   echo "  WARNING: Compiling in support for runtime error checking."
15849   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15850   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15851   echo "  WARNING: ---------------------------------------------------------"
15852 fi
15853 echo ""
15854 ) | tee -a Installation
15855 echo ""
15856
15857
15858 # Remove any trailing slashes in these variables.
15859 test -n "$prefix" &&
15860   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15861 test -n "$exec_prefix" &&
15862   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15863
15864
15865 for file in $internal_makefile_list; do
15866   test "$file" = src/Makefile.in && \
15867     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15868   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15869 done
15870 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15871 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
15872
15873 trap '' 1 2 15
15874
15875 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15876
15877 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15878 # Let make expand exec_prefix.
15879 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15880
15881 # Any assignment to VPATH causes Sun make to only execute
15882 # the first set of double-colon rules, so remove it if not needed.
15883 # If there is a colon in the path, we need to keep it.
15884 if test "x$srcdir" = x.; then
15885   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15886 fi
15887
15888 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15889
15890 DEFS=-DHAVE_CONFIG_H
15891
15892 # Without the "./", some shells look in PATH for config.status.
15893 : ${CONFIG_STATUS=./config.status}
15894
15895 echo creating $CONFIG_STATUS
15896 rm -f $CONFIG_STATUS
15897 cat > $CONFIG_STATUS <<EOF
15898 #! /bin/sh
15899 # Generated automatically by configure.
15900 # Run this file to recreate the current configuration.
15901 # This directory was configured as follows,
15902 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15903 #
15904 # $0 $ac_configure_args
15905 #
15906 # Compiler output produced by configure, useful for debugging
15907 # configure, is in ./config.log if it exists.
15908
15909 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15910 for ac_option
15911 do
15912   case "\$ac_option" in
15913   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15914     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15915     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15916   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15917     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15918     exit 0 ;;
15919   -help | --help | --hel | --he | --h)
15920     echo "\$ac_cs_usage"; exit 0 ;;
15921   *) echo "\$ac_cs_usage"; exit 1 ;;
15922   esac
15923 done
15924
15925 ac_given_srcdir=$srcdir
15926 ac_given_INSTALL="$INSTALL"
15927
15928 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15929 EOF
15930 cat >> $CONFIG_STATUS <<EOF
15931
15932 # Protect against being on the right side of a sed subst in config.status.
15933 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15934  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15935 $ac_vpsub
15936 $extrasub
15937 s%@SHELL@%$SHELL%g
15938 s%@CFLAGS@%$CFLAGS%g
15939 s%@CPPFLAGS@%$CPPFLAGS%g
15940 s%@CXXFLAGS@%$CXXFLAGS%g
15941 s%@FFLAGS@%$FFLAGS%g
15942 s%@DEFS@%$DEFS%g
15943 s%@LDFLAGS@%$LDFLAGS%g
15944 s%@LIBS@%$LIBS%g
15945 s%@exec_prefix@%$exec_prefix%g
15946 s%@prefix@%$prefix%g
15947 s%@program_transform_name@%$program_transform_name%g
15948 s%@bindir@%$bindir%g
15949 s%@sbindir@%$sbindir%g
15950 s%@libexecdir@%$libexecdir%g
15951 s%@datadir@%$datadir%g
15952 s%@sysconfdir@%$sysconfdir%g
15953 s%@sharedstatedir@%$sharedstatedir%g
15954 s%@localstatedir@%$localstatedir%g
15955 s%@libdir@%$libdir%g
15956 s%@includedir@%$includedir%g
15957 s%@oldincludedir@%$oldincludedir%g
15958 s%@infodir@%$infodir%g
15959 s%@mandir@%$mandir%g
15960 s%@LN_S@%$LN_S%g
15961 s%@blddir@%$blddir%g
15962 s%@CC@%$CC%g
15963 s%@CPP@%$CPP%g
15964 s%@start_flags@%$start_flags%g
15965 s%@ld_switch_shared@%$ld_switch_shared%g
15966 s%@start_files@%$start_files%g
15967 s%@ld@%$ld%g
15968 s%@lib_gcc@%$lib_gcc%g
15969 s%@RANLIB@%$RANLIB%g
15970 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15971 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15972 s%@INSTALL_DATA@%$INSTALL_DATA%g
15973 s%@YACC@%$YACC%g
15974 s%@SET_MAKE@%$SET_MAKE%g
15975 s%@GTK_CONFIG@%$GTK_CONFIG%g
15976 s%@X_CFLAGS@%$X_CFLAGS%g
15977 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15978 s%@X_LIBS@%$X_LIBS%g
15979 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15980 s%@install_pp@%$install_pp%g
15981 s%@libs_xauth@%$libs_xauth%g
15982 s%@dnd_objs@%$dnd_objs%g
15983 s%@lwlib_objs@%$lwlib_objs%g
15984 s%@ALLOCA@%$ALLOCA%g
15985 s%@have_esd_config@%$have_esd_config%g
15986 s%@dll_ld@%$dll_ld%g
15987 s%@dll_cflags@%$dll_cflags%g
15988 s%@dll_ldflags@%$dll_ldflags%g
15989 s%@dll_post@%$dll_post%g
15990 s%@dll_ldo@%$dll_ldo%g
15991 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15992 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15993 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15994 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15995 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15996 s%@PROGNAME@%$PROGNAME%g
15997 s%@version@%$version%g
15998 s%@configuration@%$configuration%g
15999 s%@canonical@%$canonical%g
16000 s%@inststaticdir@%$inststaticdir%g
16001 s%@instvardir@%$instvardir%g
16002 s%@srcdir@%$srcdir%g
16003 s%@pkgdir@%$pkgdir%g
16004 s%@statedir@%$statedir%g
16005 s%@extra_includes@%$extra_includes%g
16006 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16007 s%@PREFIX@%$PREFIX%g
16008 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16009 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16010 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16011 s%@INFODIR@%$INFODIR%g
16012 s%@infopath@%$infopath%g
16013 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16014 s%@INFOPATH@%$INFOPATH%g
16015 s%@package_path@%$package_path%g
16016 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16017 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16018 s%@lispdir@%$lispdir%g
16019 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16020 s%@LISPDIR@%$LISPDIR%g
16021 s%@moduledir@%$moduledir%g
16022 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16023 s%@MODULEDIR@%$MODULEDIR%g
16024 s%@sitelispdir@%$sitelispdir%g
16025 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16026 s%@SITELISPDIR@%$SITELISPDIR%g
16027 s%@sitemoduledir@%$sitemoduledir%g
16028 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16029 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16030 s%@etcdir@%$etcdir%g
16031 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16032 s%@ETCDIR@%$ETCDIR%g
16033 s%@docdir@%$docdir%g
16034 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16035 s%@DOCDIR@%$DOCDIR%g
16036 s%@archlibdir@%$archlibdir%g
16037 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16038 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16039 s%@bitmapdir@%$bitmapdir%g
16040 s%@extra_objs@%$extra_objs%g
16041 s%@machfile@%$machfile%g
16042 s%@opsysfile@%$opsysfile%g
16043 s%@c_switch_general@%$c_switch_general%g
16044 s%@c_switch_window_system@%$c_switch_window_system%g
16045 s%@c_switch_all@%$c_switch_all%g
16046 s%@ld_switch_general@%$ld_switch_general%g
16047 s%@ld_switch_window_system@%$ld_switch_window_system%g
16048 s%@ld_switch_all@%$ld_switch_all%g
16049 s%@ld_libs_general@%$ld_libs_general%g
16050 s%@ld_libs_window_system@%$ld_libs_window_system%g
16051 s%@ld_libs_all@%$ld_libs_all%g
16052 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16053 s%@native_sound_lib@%$native_sound_lib%g
16054 s%@sound_cflags@%$sound_cflags%g
16055 s%@dynodump_arch@%$dynodump_arch%g
16056 s%@XEMACS_CC@%$XEMACS_CC%g
16057 s%@internal_makefile_list@%$internal_makefile_list%g
16058
16059 CEOF
16060 EOF
16061
16062 cat >> $CONFIG_STATUS <<\EOF
16063
16064 # Split the substitutions into bite-sized pieces for seds with
16065 # small command number limits, like on Digital OSF/1 and HP-UX.
16066 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16067 ac_file=1 # Number of current file.
16068 ac_beg=1 # First line for current file.
16069 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16070 ac_more_lines=:
16071 ac_sed_cmds=""
16072 while $ac_more_lines; do
16073   if test $ac_beg -gt 1; then
16074     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16075   else
16076     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16077   fi
16078   if test ! -s conftest.s$ac_file; then
16079     ac_more_lines=false
16080     rm -f conftest.s$ac_file
16081   else
16082     if test -z "$ac_sed_cmds"; then
16083       ac_sed_cmds="sed -f conftest.s$ac_file"
16084     else
16085       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16086     fi
16087     ac_file=`expr $ac_file + 1`
16088     ac_beg=$ac_end
16089     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16090   fi
16091 done
16092 if test -z "$ac_sed_cmds"; then
16093   ac_sed_cmds=cat
16094 fi
16095 EOF
16096
16097 cat >> $CONFIG_STATUS <<EOF
16098
16099 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16100 EOF
16101 cat >> $CONFIG_STATUS <<\EOF
16102 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16103   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16104   case "$ac_file" in
16105   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16106        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16107   *) ac_file_in="${ac_file}.in" ;;
16108   esac
16109
16110   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16111
16112   # Remove last slash and all that follows it.  Not all systems have dirname.
16113   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16114   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16115     # The file is in a subdirectory.
16116     test ! -d "$ac_dir" && mkdir "$ac_dir"
16117     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16118     # A "../" for each directory in $ac_dir_suffix.
16119     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16120   else
16121     ac_dir_suffix= ac_dots=
16122   fi
16123
16124   case "$ac_given_srcdir" in
16125   .)  srcdir=.
16126       if test -z "$ac_dots"; then top_srcdir=.
16127       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16128   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16129   *) # Relative path.
16130     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16131     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16132   esac
16133
16134   case "$ac_given_INSTALL" in
16135   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16136   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16137   esac
16138
16139   echo creating "$ac_file"
16140   rm -f "$ac_file"
16141   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16142   case "$ac_file" in
16143   *Makefile*) ac_comsub="1i\\
16144 # $configure_input" ;;
16145   *) ac_comsub= ;;
16146   esac
16147
16148   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16149   sed -e "$ac_comsub
16150 s%@configure_input@%$configure_input%g
16151 s%@srcdir@%$srcdir%g
16152 s%@top_srcdir@%$top_srcdir%g
16153 s%@INSTALL@%$INSTALL%g
16154 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16155 fi; done
16156 rm -f conftest.s*
16157
16158 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16159 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16160 #
16161 # ac_d sets the value in "#define NAME VALUE" lines.
16162 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16163 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16164 ac_dC='\3'
16165 ac_dD='%g'
16166 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16167 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16168 ac_uB='\([      ]\)%\1#\2define\3'
16169 ac_uC=' '
16170 ac_uD='\4%g'
16171 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16172 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16173 ac_eB='$%\1#\2define\3'
16174 ac_eC=' '
16175 ac_eD='%g'
16176
16177 if test "${CONFIG_HEADERS+set}" != set; then
16178 EOF
16179 cat >> $CONFIG_STATUS <<EOF
16180   CONFIG_HEADERS="src/config.h lwlib/config.h"
16181 EOF
16182 cat >> $CONFIG_STATUS <<\EOF
16183 fi
16184 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16185   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16186   case "$ac_file" in
16187   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16188        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16189   *) ac_file_in="${ac_file}.in" ;;
16190   esac
16191
16192   echo creating $ac_file
16193
16194   rm -f conftest.frag conftest.in conftest.out
16195   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16196   cat $ac_file_inputs > conftest.in
16197
16198 EOF
16199
16200 # Transform confdefs.h into a sed script conftest.vals that substitutes
16201 # the proper values into config.h.in to produce config.h.  And first:
16202 # Protect against being on the right side of a sed subst in config.status.
16203 # Protect against being in an unquoted here document in config.status.
16204 rm -f conftest.vals
16205 cat > conftest.hdr <<\EOF
16206 s/[\\&%]/\\&/g
16207 s%[\\$`]%\\&%g
16208 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16209 s%ac_d%ac_u%gp
16210 s%ac_u%ac_e%gp
16211 EOF
16212 sed -n -f conftest.hdr confdefs.h > conftest.vals
16213 rm -f conftest.hdr
16214
16215 # This sed command replaces #undef with comments.  This is necessary, for
16216 # example, in the case of _POSIX_SOURCE, which is predefined and required
16217 # on some systems where configure will not decide to define it.
16218 cat >> conftest.vals <<\EOF
16219 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16220 EOF
16221
16222 # Break up conftest.vals because some shells have a limit on
16223 # the size of here documents, and old seds have small limits too.
16224
16225 rm -f conftest.tail
16226 while :
16227 do
16228   ac_lines=`grep -c . conftest.vals`
16229   # grep -c gives empty output for an empty file on some AIX systems.
16230   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16231   # Write a limited-size here document to conftest.frag.
16232   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16233   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16234   echo 'CEOF
16235   sed -f conftest.frag conftest.in > conftest.out
16236   rm -f conftest.in
16237   mv conftest.out conftest.in
16238 ' >> $CONFIG_STATUS
16239   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16240   rm -f conftest.vals
16241   mv conftest.tail conftest.vals
16242 done
16243 rm -f conftest.vals
16244
16245 cat >> $CONFIG_STATUS <<\EOF
16246   rm -f conftest.frag conftest.h
16247   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16248   cat conftest.in >> conftest.h
16249   rm -f conftest.in
16250   if cmp -s $ac_file conftest.h 2>/dev/null; then
16251     echo "$ac_file is unchanged"
16252     rm -f conftest.h
16253   else
16254     # Remove last slash and all that follows it.  Not all systems have dirname.
16255       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16256       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16257       # The file is in a subdirectory.
16258       test ! -d "$ac_dir" && mkdir "$ac_dir"
16259     fi
16260     rm -f $ac_file
16261     mv conftest.h $ac_file
16262   fi
16263 fi; done
16264
16265 EOF
16266 cat >> $CONFIG_STATUS <<EOF
16267 CPP="$CPP"
16268  top_srcdir="$srcdir"
16269  MAKE_SUBDIR="$MAKE_SUBDIR"
16270
16271 EOF
16272 cat >> $CONFIG_STATUS <<\EOF
16273 for dir in . $MAKE_SUBDIR; do
16274   (
16275     cd $dir
16276     rm -f junk.c
16277     < Makefile.in \
16278       sed -e '/^# Generated/d' \
16279           -e 's%/\*\*/#.*%%' \
16280           -e 's/^ *# */#/' \
16281           -e '/^##/d' \
16282           -e '/^#/ {
16283 p
16284 d
16285 }'        \
16286           -e '/./ {
16287 s/\([\"]\)/\\\1/g
16288 s/^/"/
16289 s/$/"/
16290 }'  > junk.c;
16291
16292
16293
16294     echo creating $dir/Makefile
16295 $CPP -I. -I${top_srcdir}/src  junk.c \
16296   | sed -e 's/^\#.*//'          \
16297         -e 's/^[        ][      ]*$//'\
16298         -e 's/^ /       /'              \
16299         -e '/^[ \f]*$/d' \
16300         -e '/^\"/ {
16301         s/\\\([\"]\)/\1/g
16302         s/^[    ]*\"//
16303         s/\"[   ]*$//
16304 }' > Makefile.new
16305     chmod 444 Makefile.new
16306     mv -f Makefile.new Makefile
16307
16308     echo creating $dir/GNUmakefile
16309 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16310   | sed -e 's/^\#.*//'          \
16311         -e 's/^[        ][      ]*$//'\
16312         -e 's/^ /       /'              \
16313         -e '/^[ \f]*$/d' \
16314         -e '/^\"/ {
16315         s/\\\([\"]\)/\1/g
16316         s/^[    ]*\"//
16317         s/\"[   ]*$//
16318 }' > Makefile.new
16319     chmod 444 Makefile.new
16320     mv -f Makefile.new GNUmakefile
16321
16322     rm -f junk.c
16323   )
16324 done
16325
16326 sed < config.status >> lib-src/config.values \
16327   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16328   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16329   -e 's/^\([^ ]*\) $/\1 ""/' \
16330   -e 's/ 1$/ t/'
16331
16332
16333 exit 0
16334 EOF
16335 chmod +x $CONFIG_STATUS
16336 rm -fr confdefs* $ac_clean_files
16337 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1