1c2a34f685630ad38555c6bf136f54842e631be9
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19 ### Note: this script has not yet been ported to autoconf version 2.5x.
20
21 ### This file is part of XEmacs.
22
23 ### XEmacs is free software; you can redistribute it and/or modify it
24 ### under the terms of the GNU General Public License as published by
25 ### the Free Software Foundation; either version 2, or (at your
26 ### option) any later version.
27
28 ### XEmacs is distributed in the hope that it will be useful, but
29 ### WITHOUT ANY WARRANTY; without even the implied warranty of
30 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31 ### General Public License for more details.
32
33 ### You should have received a copy of the GNU General Public License
34 ### along with XEmacs; see the file COPYING.  If not, write to the Free
35 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
36 ### 02111-1307, USA.
37
38 ### For usage, run `./configure --help'
39 ### For more detailed information on building and installing XEmacs,
40 ### read the file `INSTALL'.
41 ###
42 ### If configure succeeds, it leaves its status in config.status.
43 ### A log of configuration tests can be found in config.log.
44 ### If configure fails after disturbing the status quo,
45 ###     config.status is removed.
46
47 ac_help="$ac_help
48   --with-x                use the X Window System"
49
50
51
52 if test -n "$ZSH_VERSION"; then
53     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
54   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
55   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
56   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
57       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
58 elif test -n "$BASH_VERSION"; then
59     set -o posix
60   unset CDPATH
61 else
62   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
63 fi
64
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81
82 subdirs=
83 MFLAGS= MAKEFLAGS=
84 SHELL=${CONFIG_SHELL-/bin/sh}
85 ac_max_here_lines=12
86
87 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
88
89 # File descriptor usage:
90 # 0 standard input
91 # 1 file creation
92 # 2 errors and warnings
93 # 3 some systems may open it to /dev/tty
94 # 4 used on the Kubota Titan
95 # 6 checking for... messages and results
96 # 5 compiler messages saved in config.log
97 if test "$silent" = yes; then
98   exec 6>/dev/null
99 else
100   exec 6>&1
101 fi
102 exec 5>./config.log
103
104 echo "\
105 This file contains any messages produced by compilers while
106 running configure, to aid debugging if configure makes a mistake.
107 " 1>&5
108
109 # Strip out --no-create and --no-recursion so they do not pile up.
110 # Also quote any args containing shell metacharacters.
111 ac_configure_args=
112 for ac_arg
113 do
114   case "$ac_arg" in
115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
116   | --no-cr | --no-c) ;;
117   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
118   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
119   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
120   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
121   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
122   esac
123 done
124
125 # NLS nuisances.
126 # Only set these to C if already set.  These must not be set unconditionally
127 # because not all systems understand e.g. LANG=C (notably SCO).
128 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
129 # Non-C LC_CTYPE values break the ctype check.
130 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
131 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
132 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
133 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
134
135 # confdefs.h avoids OS command line length limits that DEFS can exceed.
136 rm -rf conftest* confdefs.h
137 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
138 echo > confdefs.h
139
140 # A filename unique to this package, relative to the directory that
141 # configure is in, which we can look for to find out if srcdir is correct.
142 ac_unique_file=src/lisp.h
143
144 # Find the source files, if location was not specified.
145 if test -z "$srcdir"; then
146   ac_srcdir_defaulted=yes
147   # Try the directory containing this script, then its parent.
148   ac_prog=$0
149   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
150   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
151   srcdir=$ac_confdir
152   if test ! -r $srcdir/$ac_unique_file; then
153     srcdir=..
154   fi
155 else
156   ac_srcdir_defaulted=no
157 fi
158 if test ! -r $srcdir/$ac_unique_file; then
159   if test "$ac_srcdir_defaulted" = yes; then
160     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
161   else
162     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
163   fi
164 fi
165 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
166
167 # Prefer explicitly selected file to automatically selected ones.
168 if test -z "$CONFIG_SITE"; then
169   if test "x$prefix" != xNONE; then
170     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
171   else
172     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
173   fi
174 fi
175 for ac_site_file in $CONFIG_SITE; do
176   if test -r "$ac_site_file"; then
177     echo "loading site script $ac_site_file"
178     . "$ac_site_file"
179   fi
180 done
181
182
183 ac_ext=c
184 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
185 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
186 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
187 ac_cpp='$CPP '"$xe_cppflags"
188 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
189 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
190 cross_compiling=no
191
192 ac_exeext=
193 ac_objext=o
194 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
195   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
196   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
197     ac_n= ac_c='
198 ' ac_t='        '
199   else
200     ac_n=-n ac_c= ac_t=
201   fi
202 else
203   ac_n= ac_c='\c' ac_t=
204 fi
205
206
207 progname="`echo $0 | sed 's:^\./\./:\./:'`"
208
209
210 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
211 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
212
213 prefix='/usr/local'
214 exec_prefix='${prefix}'
215 bindir='${exec_prefix}/bin'
216 datadir='${prefix}/lib'
217 statedir='${prefix}/lib'
218 libdir='${exec_prefix}/lib'
219 mandir='${prefix}/man/man1'
220 inststaticdir='${PROGNAME}'
221 instvardir='${PROGNAME}-${version}'
222 infodir='${datadir}/${instvardir}/info'
223 infopath=''
224 install_pp=''
225 lispdir='${datadir}/${instvardir}/lisp'
226 moduledir='${libdir}/${instvardir}/${configuration}/modules'
227 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
228 sitemoduledir='${libdir}/${inststaticdir}/site-modules'
229 pkgdir='${datadir}/${instvardir}/lisp'
230 package_path=''
231 etcdir='${datadir}/${instvardir}/etc'
232 archlibdir='${libdir}/${instvardir}/${configuration}'
233 docdir='${archlibdir}'
234 with_netinstall="no"
235 with_prefix='yes'
236 with_site_lisp='no'
237 with_site_modules='yes'
238 with_menubars=''
239 with_scrollbars=''
240 with_widgets=''
241 with_dialogs=''
242 with_file_coding=''
243 cpp='' cppflags='' libs='' ldflags=''
244 extra_includes=''
245 dynamic=''
246 with_x11=''
247 with_msw=''
248 rel_alloc='default'
249 with_system_malloc='default'
250 with_dlmalloc='default'
251 with_esd_sound='no'
252 native_sound_lib=''
253 with_gtk='no'
254 with_gnome='no'
255 use_assertions="yes"
256 with_toolbars=""
257 with_tty=""
258 use_union_type="no"
259 with_dnet=""
260 pdump="no"
261 with_dragndrop="no"
262 with_ipv6_cname="yes"
263
264
265
266
267 arguments="$@"
268
269 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
270 quoted_arguments=
271 for i in "$@"; do
272    case "$i" in
273    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
274    | --no-cr | --no-c) ;;
275    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
276    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
277    *)
278    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
279    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
280    esac
281 done
282
283 while test $# != 0; do
284   arg="$1"; shift
285   case "$arg" in
286     --no-create|--no-recursion) ;;
287         -* )
288             case "$arg" in
289         -*=*)
290           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
291           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
292           valomitted=no
293         ;;
294                                                                           -*)
295                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
296           val="yes" valomitted=yes
297         ;;
298       esac
299
300             optname="$opt"
301       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
302
303             case "${valomitted}-${opt}" in yes-without_* )
304         opt=`echo $opt | sed 's/without/with/'`
305         valomitted="no" val="no" ;;
306       esac
307
308             case "$opt" in
309
310         with_site_lisp  | \
311         with_prefix     | \
312         with_site_modules | \
313         with_x          | \
314         with_x11        | \
315         with_gtk        | \
316         with_gnome      | \
317         with_msw        | \
318         with_gcc        | \
319         dynamic         | \
320         with_ncurses    | \
321         with_dnet       | \
322         with_socks      | \
323         with_dragndrop  | \
324         with_cde        | \
325         with_offix      | \
326         with_gpm        | \
327         with_xpm        | \
328         with_xface      | \
329         with_gif        | \
330         with_jpeg       | \
331         with_png        | \
332         with_tiff       | \
333         with_wmcommand  | \
334         with_xmu        | \
335         with_purify     | \
336         with_quantify   | \
337         with_toolbars   | \
338         with_tty        | \
339         with_xfs        | \
340         with_i18n3      | \
341         with_mule       | \
342         with_file_coding| \
343         with_canna      | \
344         with_wnn        | \
345         with_wnn6       | \
346         with_workshop   | \
347         with_sparcworks | \
348         with_tooltalk   | \
349         with_ldap       | \
350         with_postgresql | \
351         with_pop        | \
352         with_kerberos   | \
353         with_hesiod     | \
354         with_dnet       | \
355         with_infodock   | \
356         with_netinstall | \
357         with_ipv6_cname | \
358         external_widget | \
359         verbose         | \
360         extra_verbose   | \
361         usage_tracking  | \
362         use_union_type  | \
363         pdump           | \
364         debug           | \
365         use_assertions  | \
366         memory_usage_stats | \
367         with_clash_detection | \
368         with_modules | \
369         quick_build )
370                   case "$val" in
371             y | ye | yes )      val=yes ;;
372             n | no )            val=no  ;;
373             * ) (echo "$progname: Usage error:"
374 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
375 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
376           esac
377           eval "$opt=\"$val\"" ;;
378
379
380                         srcdir          | \
381         compiler        | \
382         cflags          | \
383         cpp             | \
384         cppflags        | \
385         libs            | \
386         ldflags         | \
387         cache_file      | \
388         native_sound_lib| \
389         site_lisp       | \
390         x_includes      | \
391         x_libraries     | \
392         site_includes   | \
393         site_libraries  | \
394         site_prefixes   | \
395         site_runtime_libraries )
396                   if test "$valomitted" = "yes" ; then
397                     if test "$#" = 0 ; then
398               (echo "$progname: Usage error:"
399 echo " " "The \`--$optname' option requires a value."
400 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
401             fi
402             val="$1"; shift
403           fi
404           eval "$opt=\"$val\""
405         ;;
406
407                 rel_alloc | \
408         with_dlmalloc | \
409         with_debug_malloc  | use_debug_malloc | \
410         with_system_malloc | use_system_malloc )
411           case "$val" in
412             y | ye | yes )      val=yes ;;
413             n | no )            val=no  ;;
414             d | de | def | defa | defau | defaul | default ) val=default ;;
415             * ) (echo "$progname: Usage error:"
416 echo " " "The \`--$optname' option requires one of these values:
417   \`yes', \`no', or \`default'."
418 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
419           esac
420           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
421           eval "$opt=\"$val\""
422         ;;
423
424                 "with_database" )
425           with_database_berkdb=no
426           with_database_dbm=no
427           with_database_gdbm=no
428           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
429             case "$x" in
430               no ) ;;
431               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
432               d | db | dbm )                               with_database_dbm=yes    ;;
433               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
434               * ) (echo "$progname: Usage error:"
435 echo " " "The \`--$optname' option value
436   must be either \`no' or a comma-separated list
437   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
438 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
439             esac
440           done
441           if test "$with_database_dbm"  = "yes" -a \
442                   "$with_database_gdbm" = "yes"; then
443           (echo "$progname: Usage error:"
444 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
445   with the \`--$optname' option."
446 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
447           fi
448         ;;
449
450                 "with_sound" )
451                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
452             case "$x" in
453                       n | no | non | none ) new_sdefault=no ;;
454               a | al | all | both ) new_sdefault=yes ;;
455
456               native )       with_native_sound=yes ;;
457               nonative )     with_native_sound=no ;;
458
459               nas )          with_nas_sound=yes ;;
460               nonas )        with_nas_sound=no ;;
461
462               esd )          with_esd_sound=yes ;;
463               noesd )        with_esd_sound=no ;;
464
465               * ) bogus_sound=yes ;;
466             esac
467             if test "$bogus_sound" -o \
468                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
469                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
470                 (echo "$progname: Usage error:"
471 echo " " "Valid types for the \`--$optname' option are:
472   $types.
473 Option \`all' or \`none' must be first in the list.
474 The default is to autodetect native and NAS sound support."
475 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
476             elif test -n "$new_sdefault" ; then
477                 with_native_sound=$new_sdefault
478                 with_nas_sound=$new_sdefault
479                 with_esd_sound=$new_sdefault
480                 new_sdefault=   # reset this
481             fi
482             sound_notfirst=true
483           done
484         ;;
485
486                         "with_athena" )
487           case "$val" in
488             xa | xaw )                    val=xaw    ;;
489             3 | 3d | xaw3d )              val=3d     ;;
490                         ne | nex | next | naxtaw)     val=next   ;;
491                         9 | 95 | xaw95 )              val=95     ;;
492             xp | xpm | xawxpm )           val=xpm    ;;
493             * ) (echo "$progname: Usage error:"
494 echo " " "The \`--$optname' option must have one of these values:
495   \`xaw', \`3d', \`next', \`95', or \`xpm'."
496 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
497           esac
498           eval "$opt=\"$val\""
499         ;;
500
501                 "with_xim" )
502           case "$val" in
503             y | ye | yes )                val=yes   ;;
504             n | no | non | none )         val=no    ;;
505             x | xl | xli | xlib )         val=xlib  ;;
506             m | mo | mot | moti | motif ) val=motif ;;
507             * ) (echo "$progname: Usage error:"
508 echo " " "The \`--$optname' option must have one of these values:
509   \`motif', \`xlib', \`yes', or \`no'."
510 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
511           esac
512           eval "$opt=\"$val\""
513         ;;
514
515                 "mail_locking" )
516           case "$val" in
517             lockf )     val=lockf ;;
518             flock )     val=flock ;;
519             file | dot ) val=file  ;;
520             locking )   val=locking  ;;
521             * ) (echo "$progname: Usage error:"
522 echo " " "The \`--$optname' option must have one of these values:
523   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
524 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
525           esac
526           eval "$opt=\"$val\""
527         ;;
528
529                 "error_checking" )
530                           
531           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
532             case "$x" in
533                       n | no | non | none ) new_default=no ;;
534               a | al | all )        new_default=yes ;;
535
536               extents )       error_check_extents=yes ;;
537               noextents )     error_check_extents=no ;;
538
539               typecheck )     error_check_typecheck=yes ;;
540               notypecheck )   error_check_typecheck=no ;;
541
542               bufpos )        error_check_bufpos=yes ;;
543               nobufpos )      error_check_bufpos=no ;;
544
545               gc )            error_check_gc=yes ;;
546               nogc )          error_check_gc=no ;;
547
548               malloc )        error_check_malloc=yes ;;
549               nomalloc )      error_check_malloc=no ;;
550
551               byte_code )     error_check_byte_code=yes ;;
552               nobyte_code )   error_check_byte_code=no ;;
553
554               glyphs )     error_check_glyphs=yes ;;
555               noglyphs )   error_check_glyphs=no ;;
556
557               * ) bogus_error_check=yes ;;
558             esac
559             if test "$bogus_error_check" -o \
560                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
561                 if test "$error_check_default" = yes ; then
562                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
563                 else
564                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
565                 fi
566                 (echo "$progname: Usage error:"
567 echo " " "Valid types for the \`--$optname' option are:
568   $types."
569 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
570             elif test -n "$new_default" ; then
571                 error_check_extents=$new_default
572                 error_check_typecheck=$new_default
573                 error_check_bufpos=$new_default
574                 error_check_gc=$new_default
575                 error_check_malloc=$new_default
576                 error_check_byte_code=$new_default
577                 error_check_glyphs=$new_default
578                 new_default=    # reset this
579             fi
580             echeck_notfirst=true
581           done
582         ;;
583
584                                 
585                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
586         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
587         archlibdir | docdir | package_path )
588                    if test "$valomitted" = "yes"; then
589              if test "$#" = 0; then
590                  (echo "$progname: Usage error:"
591 echo " " "The \`--$optname' option requires a value."
592 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
593              fi
594              val="$1"; shift
595            fi
596            eval "$opt=\"$val\""
597
598                            case "$opt" in
599                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
600     Defining EXEC_PREFIX_USER_DEFINED
601 EOF
602 cat >> confdefs.h <<\EOF
603 #define EXEC_PREFIX_USER_DEFINED 1
604 EOF
605 }
606  ;;
607              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
608     Defining LISPDIR_USER_DEFINED
609 EOF
610 cat >> confdefs.h <<\EOF
611 #define LISPDIR_USER_DEFINED 1
612 EOF
613 }
614  ;;
615              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
616     Defining SITELISPDIR_USER_DEFINED
617 EOF
618 cat >> confdefs.h <<\EOF
619 #define SITELISPDIR_USER_DEFINED 1
620 EOF
621 }
622  ;;
623              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
624     Defining MODULEDIR_USER_DEFINED
625 EOF
626 cat >> confdefs.h <<\EOF
627 #define MODULEDIR_USER_DEFINED 1
628 EOF
629 }
630  ;;
631              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
632     Defining ETCDIR_USER_DEFINED
633 EOF
634 cat >> confdefs.h <<\EOF
635 #define ETCDIR_USER_DEFINED 1
636 EOF
637 }
638  ;;
639              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
640     Defining INFODIR_USER_DEFINED
641 EOF
642 cat >> confdefs.h <<\EOF
643 #define INFODIR_USER_DEFINED 1
644 EOF
645 }
646  ;;
647              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
648     Defining INFOPATH_USER_DEFINED
649 EOF
650 cat >> confdefs.h <<\EOF
651 #define INFOPATH_USER_DEFINED 1
652 EOF
653 }
654  ;;
655              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
656     Defining PACKAGE_PATH_USER_DEFINED
657 EOF
658 cat >> confdefs.h <<\EOF
659 #define PACKAGE_PATH_USER_DEFINED 1
660 EOF
661 }
662  ;;
663              datadir )
664                 { test "$extra_verbose" = "yes" && cat << \EOF
665     Defining INFODIR_USER_DEFINED
666 EOF
667 cat >> confdefs.h <<\EOF
668 #define INFODIR_USER_DEFINED 1
669 EOF
670 }
671
672                 { test "$extra_verbose" = "yes" && cat << \EOF
673     Defining LISPDIR_USER_DEFINED
674 EOF
675 cat >> confdefs.h <<\EOF
676 #define LISPDIR_USER_DEFINED 1
677 EOF
678 }
679
680                 { test "$extra_verbose" = "yes" && cat << \EOF
681     Defining MODULEDIR_USER_DEFINED
682 EOF
683 cat >> confdefs.h <<\EOF
684 #define MODULEDIR_USER_DEFINED 1
685 EOF
686 }
687
688                 { test "$extra_verbose" = "yes" && cat << \EOF
689     Defining ETCDIR_USER_DEFINED
690 EOF
691 cat >> confdefs.h <<\EOF
692 #define ETCDIR_USER_DEFINED 1
693 EOF
694 }
695
696                 { test "$extra_verbose" = "yes" && cat << \EOF
697     Defining DOCDIR_USER_DEFINED
698 EOF
699 cat >> confdefs.h <<\EOF
700 #define DOCDIR_USER_DEFINED 1
701 EOF
702 }
703
704                 { test "$extra_verbose" = "yes" && cat << \EOF
705     Defining ARCHLIBDIR_USER_DEFINED
706 EOF
707 cat >> confdefs.h <<\EOF
708 #define ARCHLIBDIR_USER_DEFINED 1
709 EOF
710 }
711  ;;
712              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
713     Defining DOCDIR_USER_DEFINED
714 EOF
715 cat >> confdefs.h <<\EOF
716 #define DOCDIR_USER_DEFINED 1
717 EOF
718 }
719  ;;
720              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
721     Defining ARCHLIBDIR_USER_DEFINED
722 EOF
723 cat >> confdefs.h <<\EOF
724 #define ARCHLIBDIR_USER_DEFINED 1
725 EOF
726 }
727  ;;
728            esac
729         ;;
730
731                 "no_create" ) ;;
732
733                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
734
735                 "with_menubars"   | \
736         "with_scrollbars" | \
737         "with_dialogs"    | \
738         "with_widgets" )
739           case "$val" in
740             l | lu | luc | luci | lucid )               val=lucid  ;;
741             mo | mot | moti | motif )                   val=motif  ;;
742             a | at | ath | athe | athen | athena )      val=athena ;;
743             n | no | non | none )                       val=no     ;;
744             y | ye | yes )                              val=yes    ;;
745             g | gt | gtk )                              val=gtk    ;;
746             ms | msw )                                  val=msw    ;;
747             * ) (echo "$progname: Usage error:"
748 echo " " "The \`--$optname' option must have one of these values:
749   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
750 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
751           esac
752           eval "$opt=\"$val\""
753         ;;
754
755                 "use_minimal_tagbits" | \
756         "use_indexed_lrecord_implementation" | \
757         "run_in_place"  | \
758         "const_is_losing" | \
759         "with_gnu_make" )
760           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
761         ;;
762
763                 * ) (echo "$progname: Usage error:"
764 echo " " "Unrecognized option: $arg"
765 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
766
767       esac
768     ;;
769
770         *-*-*) configuration="$arg" ;;
771
772         *) (echo "$progname: Usage error:"
773 echo " " "Unrecognized argument: $arg"
774 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
775
776   esac
777 done
778
779
780 test -n "$cpp"      && CPP="$cpp"
781 test -n "$cppflags" && CPPFLAGS="$cppflags"
782 test -n "$libs"     && LIBS="$libs"
783 test -n "$ldflags"  && LDFLAGS="$ldflags"
784
785 eval set x "$quoted_arguments"; shift
786
787 test "$extra_verbose" = "yes" && verbose=yes
788
789 test -n "$with_x" && with_x11="$with_x"
790
791 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
792   test "$with_system_malloc" = "default" && with_system_malloc=yes
793 fi
794
795
796
797 if test "$with_cde $with_tooltalk" = "yes no"; then
798   (echo "$progname: Usage error:"
799 echo " " "--with-cde requires --with-tooltalk"
800 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
801 elif test "$with_tooltalk" = "no" ; then with_cde=no
802 elif test "$with_cde" = "yes"; then with_tooltalk=yes
803 fi
804
805
806 case "$srcdir" in
807
808     "" )
809     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
810       if test -f "$dir/src/lisp.h" -a \
811               -f "$dir/lisp/version.el" ; then
812         srcdir="$dir"
813         break
814       fi
815     done
816     if test -z "$srcdir" ; then
817       (echo "$progname: Usage error:"
818 echo " " "Neither the current directory nor its parent seem to
819   contain the XEmacs sources.  If you do not want to build XEmacs in its
820   source tree, you should run \`$progname' in the directory in which
821   you wish to build XEmacs, using the \`--srcdir' option to say where the
822   sources may be found."
823 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
824     fi
825   ;;
826
827     * )
828     if test ! -f "$srcdir/src/lisp.h" -o \
829             ! -f "$srcdir/lisp/version.el" ; then
830       (echo "$progname: Usage error:"
831 echo " " "The directory specified with the \`--srcdir' option,
832   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
833   either run the \`$progname' script at the top of the XEmacs source
834   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
835 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
836     fi
837   ;;
838 esac
839
840 if test -z "$configuration"; then
841     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
842   if test -z "$configuration"; then
843     (echo "$progname: Usage error:"
844 echo " " "XEmacs has not been ported to this host type.
845 Try explicitly specifying the CONFIGURATION when rerunning configure."
846 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
847   fi
848 fi
849
850 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
851 echo "configure:852: checking whether ln -s works" >&5
852
853 rm -f conftestdata
854 if ln -s X conftestdata 2>/dev/null
855 then
856   rm -f conftestdata
857   ac_cv_prog_LN_S="ln -s"
858 else
859   ac_cv_prog_LN_S=ln
860 fi
861 LN_S="$ac_cv_prog_LN_S"
862 if test "$ac_cv_prog_LN_S" = "ln -s"; then
863   echo "$ac_t""yes" 1>&6
864 else
865   echo "$ac_t""no" 1>&6
866 fi
867
868
869 for dir in lisp etc man info tests; do
870   if test ! -d "$dir" ; then
871     echo Making symbolic link to "$srcdir/$dir"
872     ${LN_S} "$srcdir/$dir" "$dir"
873   fi
874 done
875
876
877 absolute_pwd="`pwd`";
878 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
879 then blddir="$PWD"
880 else blddir="$absolute_pwd"; if test -d "/net"; then
881   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
882   blddir=`echo "$blddir" | \
883    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
884 fi
885 fi
886
887
888 case "$srcdir" in
889   /* ) ;;
890   .  ) srcdir="$blddir" ;;
891   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
892   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
893   srcdir=`echo "$srcdir" | \
894    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
895 fi ;;
896 esac
897
898 if test `pwd` != `sh -c cd $srcdir && pwd`  \
899    && test -f "$srcdir/src/config.h"; then
900   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
901    echo "   as a build directory right now; it has been configured in its own"
902    echo "   right.  To configure in another directory as well, you MUST"
903    echo "   use GNU make.  If you do not have GNU make, then you must"
904    echo "   now do \`make distclean' in $srcdir,"
905    echo "   and then run $progname again.") >&2
906   extrasub='/^VPATH[     ]*=/c\
907 vpath %.c $(srcdir)\
908 vpath %.h $(srcdir)\
909 vpath %.y $(srcdir)\
910 vpath %.l $(srcdir)\
911 vpath %.s $(srcdir)\
912 vpath %.in $(srcdir)'
913 fi
914
915 . "$srcdir/version.sh" || exit 1;
916 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
917 : "${extra_verbose=$beta}"
918 version="${emacs_major_version}.${emacs_minor_version}"
919 { test "$extra_verbose" = "yes" && cat << EOF
920     Defining EMACS_MAJOR_VERSION = $emacs_major_version
921 EOF
922 cat >> confdefs.h <<EOF
923 #define EMACS_MAJOR_VERSION $emacs_major_version
924 EOF
925 }
926
927 { test "$extra_verbose" = "yes" && cat << EOF
928     Defining EMACS_MINOR_VERSION = $emacs_minor_version
929 EOF
930 cat >> confdefs.h <<EOF
931 #define EMACS_MINOR_VERSION $emacs_minor_version
932 EOF
933 }
934
935 if test -n "$emacs_beta_version" ; then
936   if test "$beta" = "yes"; then
937         version="${version}-b${emacs_beta_version}"
938         { test "$extra_verbose" = "yes" && cat << EOF
939     Defining EMACS_BETA_VERSION = $emacs_beta_version
940 EOF
941 cat >> confdefs.h <<EOF
942 #define EMACS_BETA_VERSION $emacs_beta_version
943 EOF
944 }
945
946   else
947         version="${version}.${emacs_beta_version}"
948         { test "$extra_verbose" = "yes" && cat << EOF
949     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
950 EOF
951 cat >> confdefs.h <<EOF
952 #define EMACS_PATCH_LEVEL $emacs_beta_version
953 EOF
954 }
955
956   fi
957 fi
958 { test "$extra_verbose" = "yes" && cat << EOF
959     Defining XEMACS_CODENAME = "$xemacs_codename"
960 EOF
961 cat >> confdefs.h <<EOF
962 #define XEMACS_CODENAME "$xemacs_codename"
963 EOF
964 }
965
966 { test "$extra_verbose" = "yes" && cat << EOF
967     Defining EMACS_VERSION = "$version"
968 EOF
969 cat >> confdefs.h <<EOF
970 #define EMACS_VERSION "$version"
971 EOF
972 }
973
974
975 if test "$with_infodock" = "yes"; then
976   if test ! -f ../../ID-INSTALL; then
977     echo "Cannot build InfoDock without InfoDock sources"
978     with_infodock=no
979   fi
980 fi
981
982 if test "$with_infodock" = "yes"; then
983       { test "$extra_verbose" = "yes" && cat << EOF
984     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
985 EOF
986 cat >> confdefs.h <<EOF
987 #define INFODOCK_MAJOR_VERSION $infodock_major_version
988 EOF
989 }
990
991   { test "$extra_verbose" = "yes" && cat << EOF
992     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
993 EOF
994 cat >> confdefs.h <<EOF
995 #define INFODOCK_MINOR_VERSION $infodock_minor_version
996 EOF
997 }
998
999   { test "$extra_verbose" = "yes" && cat << EOF
1000     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1001 EOF
1002 cat >> confdefs.h <<EOF
1003 #define INFODOCK_BUILD_VERSION $infodock_build_version
1004 EOF
1005 }
1006
1007   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1008   PROGNAME=infodock
1009   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1010 else
1011   PROGNAME=xemacs
1012 fi
1013
1014 { test "$extra_verbose" = "yes" && cat << EOF
1015     Defining EMACS_PROGNAME = "$PROGNAME"
1016 EOF
1017 cat >> confdefs.h <<EOF
1018 #define EMACS_PROGNAME "$PROGNAME"
1019 EOF
1020 }
1021
1022
1023 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1024 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1025     Defining ERROR_CHECK_EXTENTS
1026 EOF
1027 cat >> confdefs.h <<\EOF
1028 #define ERROR_CHECK_EXTENTS 1
1029 EOF
1030 }
1031
1032 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1033     Defining ERROR_CHECK_TYPECHECK
1034 EOF
1035 cat >> confdefs.h <<\EOF
1036 #define ERROR_CHECK_TYPECHECK 1
1037 EOF
1038 }
1039
1040 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1041     Defining ERROR_CHECK_BUFPOS
1042 EOF
1043 cat >> confdefs.h <<\EOF
1044 #define ERROR_CHECK_BUFPOS 1
1045 EOF
1046 }
1047
1048 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1049     Defining ERROR_CHECK_GC
1050 EOF
1051 cat >> confdefs.h <<\EOF
1052 #define ERROR_CHECK_GC 1
1053 EOF
1054 }
1055
1056 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1057     Defining ERROR_CHECK_MALLOC
1058 EOF
1059 cat >> confdefs.h <<\EOF
1060 #define ERROR_CHECK_MALLOC 1
1061 EOF
1062 }
1063
1064 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1065     Defining ERROR_CHECK_BYTE_CODE
1066 EOF
1067 cat >> confdefs.h <<\EOF
1068 #define ERROR_CHECK_BYTE_CODE 1
1069 EOF
1070 }
1071
1072 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1073     Defining ERROR_CHECK_GLYPHS
1074 EOF
1075 cat >> confdefs.h <<\EOF
1076 #define ERROR_CHECK_GLYPHS 1
1077 EOF
1078 }
1079
1080 if test "${debug:=$beta}" = "yes"; then
1081   use_assertions=yes memory_usage_stats=yes
1082   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1083    echo "    xemacs will be linked with \"debug.o\""
1084  fi
1085   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1086    echo "    xemacs will be linked with \"tests.o\""
1087  fi
1088   { test "$extra_verbose" = "yes" && cat << \EOF
1089     Defining DEBUG_XEMACS
1090 EOF
1091 cat >> confdefs.h <<\EOF
1092 #define DEBUG_XEMACS 1
1093 EOF
1094 }
1095
1096 fi
1097 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1098     Defining USE_ASSERTIONS
1099 EOF
1100 cat >> confdefs.h <<\EOF
1101 #define USE_ASSERTIONS 1
1102 EOF
1103 }
1104
1105 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1106     Defining MEMORY_USAGE_STATS
1107 EOF
1108 cat >> confdefs.h <<\EOF
1109 #define MEMORY_USAGE_STATS 1
1110 EOF
1111 }
1112
1113
1114
1115 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1116 echo "configure:1117: checking "host system type"" >&5
1117 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1118 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1119 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1120 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1121 echo "$ac_t""$configuration" 1>&6
1122
1123
1124
1125
1126
1127 machine='' opsys=''
1128
1129 case "$canonical" in
1130   sparc-*-*        ) machine=sparc ;;
1131   alpha*-*-*       ) machine=alpha ;;
1132   vax-*-*          ) machine=vax ;;
1133   mips-dec-*       ) machine=pmax ;;
1134   mips-sgi-irix6*  ) machine=iris6d ;;
1135   mips-sgi-*       ) machine=iris4d ;;
1136   mips*-linux      ) machine=mips ;;
1137   romp-ibm-*       ) machine=ibmrt ;;
1138   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1139   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1140   powerpc*-*       ) machine=powerpc ;;
1141   hppa-*-*         ) machine=hp800 ;;
1142   m88k-dg-*        ) machine=aviion ;;
1143   m68*-sony-*      ) machine=news ;;
1144   mips-sony-*      ) machine=news-risc ;;
1145   clipper-*        ) machine=clipper ;;
1146   arm*             ) machine=arm ;;
1147   ns32k-*          ) machine=ns32000 ;;
1148 esac
1149
1150 case "$canonical" in
1151   *-*-linux*    ) opsys=linux ;;
1152   *-*-netbsd*   ) opsys=netbsd ;;
1153   *-*-openbsd*  ) opsys=openbsd ;;
1154   *-*-nextstep* ) opsys=nextstep ;;
1155   *-*-vms       ) opsys=vms ;;
1156
1157     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1158   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1159   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1160   *-dec-osf3*                ) opsys=decosf3-1 ;;
1161   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1162
1163     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1164   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1165   *-*-ultrix* )         opsys=ultrix4-3 ;;
1166
1167     *-*-aix3.1*  ) opsys=aix3-1 ;;
1168   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1169   *-*-aix3*    ) opsys=aix3-2   ;;
1170   *-*-aix4.0*  ) opsys=aix4     ;;
1171   *-*-aix4.1*  ) opsys=aix4-1   ;;
1172   *-*-aix4*    ) opsys=aix4-2   ;;
1173
1174     *-gnu* )                    opsys=gnu    ;;
1175   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1176   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1177   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1178   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1179   *-*-aos*   )                  opsys=bsd4-3 ;;
1180   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1181   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1182   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1183   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1184   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1185   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1186         if test -z "$NON_GNU_CPP" ; then
1187           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1188             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1189           done
1190         fi
1191         opsys=usg5-4-2 ;;
1192     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1193     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1194 esac
1195
1196 case "$canonical" in
1197
1198     *-*-netbsd* )
1199     case "$canonical" in
1200       i[3-9]86-*-netbsd*) machine=intel386 ;;
1201       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1202                                             machine=hp9000s300 ;;
1203       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1204       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1205     esac
1206   ;;
1207
1208     *-*-openbsd* )
1209     case "${canonical}" in
1210       i386-*-openbsd*)          machine=intel386 ;;
1211       m68k-*-openbsd*)          machine=hp9000s300 ;;
1212       mipsel-*-openbsd*)        machine=pmax ;;
1213      esac
1214    ;;
1215
1216     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1217   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1218
1219     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1220   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1221
1222     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1223
1224     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1225
1226     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1227
1228     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1229
1230     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1231
1232     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1233   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1234   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1235
1236   
1237     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1238
1239     *-convex-bsd* | *-convex-convexos* )
1240     machine=convex opsys=bsd4-3
1241     NON_GNU_CPP="cc -E -P"
1242   ;;
1243
1244     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1245
1246     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1247   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1248   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1249   m88k-dg-dgux*                           ) opsys=dgux     ;;
1250
1251     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1252   m88k-motorola-sysv4* )
1253                     machine=delta88k opsys=usg5-4-2
1254   ;;
1255   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1256
1257     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1258   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1259
1260     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1261
1262     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1263   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1264   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1265
1266       m88k-harris-cxux* )
1267         case "`uname -r`" in
1268        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1269        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1270     esac
1271     NON_GNU_CPP="/lib/cpp"
1272   ;;
1273     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1274     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1275
1276     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1277
1278     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1279
1280     *-hp-hpux* )
1281         case "$canonical" in
1282       m68*  ) machine=hp9000s300 ;;
1283       hppa* ) machine=hp800      ;;
1284     esac
1285
1286     case "$canonical" in
1287       *-hp-hpux7*  )  opsys=hpux   ;;
1288       *-hp-hpux8*  )  opsys=hpux8  ;;
1289       *-hp-hpux9*  )  opsys=hpux9  ;;
1290       *-hp-hpux10* )  opsys=hpux10 ;;
1291       *-hp-hpux11* )  opsys=hpux11 ;;
1292       *            )  opsys=hpux   ;;
1293     esac
1294
1295         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1296    echo "    xemacs will be linked with \"strcat.o\""
1297  fi ;; esac
1298
1299     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1300         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1301     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1302
1303     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1304   ;;
1305
1306     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1307   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1308
1309     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1310   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1311   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1312   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1313   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1314   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1315
1316     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1317   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1318
1319     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1320
1321     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1322
1323     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1324
1325     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1326
1327       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1328
1329     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1330
1331     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1332
1333     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1334
1335     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1336
1337         mips-mips-usg* ) machine=mips4 ;;
1338   mips-mips-riscos4 )
1339     machine=mips4
1340     NON_GNU_CC="cc -systype bsd43"
1341     NON_GNU_CPP="cc -systype bsd43 -E"
1342     case "$canonical" in
1343       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1344       mips-mips-riscos5* ) opsys=riscos5 ;;
1345     esac
1346   ;;
1347   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1348   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1349
1350     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1351
1352     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1353
1354     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1355   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1356
1357     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1358
1359     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1360
1361     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1362
1363     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1364
1365     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1366   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1367
1368     mips-siemens-sysv* | mips-sni-sysv*)
1369     machine=mips-siemens opsys=usg5-4
1370     NON_GNU_CC=/usr/ccs/bin/cc
1371     NON_GNU_CPP=/usr/ccs/lib/cpp
1372   ;;
1373
1374     mips-nec-sysv*)
1375     machine=mips-nec
1376     NON_GNU_CC=/usr/ccs/bin/cc
1377     NON_GNU_CPP=/usr/ccs/lib/cpp
1378   ;;
1379
1380       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1381   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1382     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1383   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1384   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1385   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1386   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1387   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1388   mips-sgi-irix*      ) opsys=irix5-0 ;;
1389
1390     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1391   *-sony-news* ) opsys=newsos5 ;;
1392
1393     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1394
1395     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1396         case "$canonical" in
1397       m68*-sunos1* )             machine=sun1     ;;
1398       m68*-sunos2* )             machine=sun2     ;;
1399       m68* )                     machine=sun3     ;;
1400       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1401       i*86-*-* )                 machine=intel386 ;;
1402       rs6000* )                  machine=rs6000   ;;
1403     esac
1404
1405         case "$canonical" in *-sunos5*)
1406       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1407     esac
1408
1409                     case "$canonical" in
1410       *-sunos4* )
1411         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1412         : ;;
1413       *-solaris2* )
1414         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1415         RANLIB=':' ;;
1416     esac
1417
1418     case "$canonical" in
1419       *-solaris*          )
1420         opsys=sol2
1421         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1422         { test "$extra_verbose" = "yes" && cat << EOF
1423     Defining OS_RELEASE = $os_release
1424 EOF
1425 cat >> confdefs.h <<EOF
1426 #define OS_RELEASE $os_release
1427 EOF
1428 }
1429  ;;
1430
1431             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1432       *-sunos4.0*         ) opsys=sunos4-0      ;;
1433       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1434       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1435       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1436       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1437       *-mach*             ) opsys=mach-bsd4-3   ;;
1438       *                   ) opsys=bsd4-2        ;;
1439     esac
1440
1441     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1442
1443         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1444   ;;
1445
1446     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1447
1448     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1449   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1450
1451     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1452
1453     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1454
1455     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1456       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1457
1458     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1459
1460     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1461
1462     vax-dec-* )
1463     case "$canonical" in
1464       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1465       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1466       *-mach* )                         opsys=mach-bsd4-3 ;;
1467     esac
1468   ;;
1469
1470     ns16k-whitechapel-* ) machine=mg1 ;;
1471
1472     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1473
1474     i[3-9]86-*-* )
1475     machine=intel386
1476     case "$canonical" in
1477       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1478       *-isc2.2* )               opsys=isc2-2 ;;
1479       *-isc4.0* )               opsys=isc4-0 ;;
1480       *-isc4.* )                opsys=isc4-1
1481                                 GCC_TEST_OPTIONS=-posix
1482                                 NON_GCC_TEST_OPTIONS=-Xp
1483                                 ;;
1484       *-isc* )                  opsys=isc3-0 ;;
1485       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1486       *-esix* )                 opsys=esix ;;
1487       *-mach* )                 opsys=mach-bsd4-3 ;;
1488       *-xenix* )                opsys=xenix ;;
1489       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1490       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1491       *-bsdi4* )                opsys=bsdos4 ;;
1492       *-bsdi3* )                opsys=bsdos3 ;;
1493       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1494       *-bsdi2* )                opsys=bsdos2 ;;
1495       *-sco3.2v5* )             opsys=sco5 ;;
1496       *-sysv5* )                opsys=sco7 ;;
1497       *-386bsd* )               opsys=386bsd ;;
1498       *-freebsd* )              opsys=freebsd ;;
1499       *-nextstep* )             opsys=nextstep ;;
1500       *-pc-cygwin* )            opsys=cygwin32 ;;
1501       *-pc-mingw* )             opsys=mingw32 ;
1502                                 test -z "$with_tty" && with_tty="no";;
1503           esac
1504   ;;
1505
1506     m68k-*-linux* ) machine=m68k opsys=linux ;;
1507
1508 esac
1509
1510 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1511
1512 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1513
1514 if test -r "${srcdir}/src/m/${machine}.h"; then
1515   machfile="m/${machine}.h"
1516   { test "$extra_verbose" = "yes" && cat << EOF
1517     Defining config_machfile = "$machfile"
1518 EOF
1519 cat >> confdefs.h <<EOF
1520 #define config_machfile "$machfile"
1521 EOF
1522 }
1523
1524 else
1525   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1526   echo "Using configure-time autodetection only."
1527 fi
1528
1529 if test -r "${srcdir}/src/s/${opsys}.h"; then
1530   opsysfile="s/${opsys}.h"
1531   { test "$extra_verbose" = "yes" && cat << EOF
1532     Defining config_opsysfile = "$opsysfile"
1533 EOF
1534 cat >> confdefs.h <<EOF
1535 #define config_opsysfile "$opsysfile"
1536 EOF
1537 }
1538
1539 else
1540   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1541   echo "Using configure-time autodetection only."
1542 fi
1543
1544
1545 if test -z "$dynamic"; then
1546   case "$opsys" in
1547     hpux* | sunos4* ) dynamic=no ;;
1548     *) dynamic=yes ;;
1549   esac
1550 fi
1551 if test "$dynamic" = "yes"; then
1552   case "$opsys" in
1553     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1554     decosf* ) ld_call_shared="-call_shared" ;;
1555   esac
1556 else   case "$opsys" in
1557     sol2 )
1558       echo "Static linking is not supported on Solaris 2."
1559       echo "Rerun configure without specifying --dynamic=no."
1560       exit 1 ;;
1561     linux   ) ld_call_shared="-Bstatic" ;;
1562     decosf* ) ld_call_shared="-non_shared" ;;
1563   esac
1564 fi
1565
1566 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1567
1568 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1569 { test "$extra_verbose" = "yes" && cat << EOF
1570     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1571 EOF
1572 cat >> confdefs.h <<EOF
1573 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1574 EOF
1575 }
1576
1577
1578
1579 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1580 if test "$with_workshop $with_tooltalk" = "yes no"; then
1581   (echo "$progname: Usage error:"
1582 echo " " "--with-workshop requires --with-tooltalk"
1583 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1584 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1585 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1586 fi
1587
1588 if test "$with_workshop" = "yes"; then
1589   { test "$extra_verbose" = "yes" && cat << \EOF
1590     Defining SUNPRO
1591 EOF
1592 cat >> confdefs.h <<\EOF
1593 #define SUNPRO 1
1594 EOF
1595 }
1596
1597   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1598    echo "    xemacs will be linked with \"sunpro.o\""
1599  fi
1600 fi
1601
1602 if test "$with_clash_detection" != "no"; then
1603   { test "$extra_verbose" = "yes" && cat << \EOF
1604     Defining CLASH_DETECTION
1605 EOF
1606 cat >> confdefs.h <<\EOF
1607 #define CLASH_DETECTION 1
1608 EOF
1609 }
1610
1611   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1612    echo "    xemacs will be linked with \"filelock.o\""
1613  fi
1614 fi
1615
1616 test -n "$compiler" && CC="$compiler"
1617 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1618 fi
1619
1620 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1621 if test "${CFLAGS-unset}" != unset
1622   then cflags_specified=yes;
1623   else cflags_specified=no;
1624 fi
1625
1626 xe_save_CFLAGS="$CFLAGS"
1627
1628 # Extract the first word of "gcc", so it can be a program name with args.
1629 set dummy gcc; ac_word=$2
1630 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1631 echo "configure:1632: checking for $ac_word" >&5
1632
1633 if test -n "$CC"; then
1634   ac_cv_prog_CC="$CC" # Let the user override the test.
1635 else
1636   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1637   ac_dummy="$PATH"
1638   for ac_dir in $ac_dummy; do
1639     test -z "$ac_dir" && ac_dir=.
1640     if test -f $ac_dir/$ac_word; then
1641       ac_cv_prog_CC="gcc"
1642       break
1643     fi
1644   done
1645   IFS="$ac_save_ifs"
1646 fi
1647 CC="$ac_cv_prog_CC"
1648 if test -n "$CC"; then
1649   echo "$ac_t""$CC" 1>&6
1650 else
1651   echo "$ac_t""no" 1>&6
1652 fi
1653
1654 if test -z "$CC"; then
1655   # Extract the first word of "cc", so it can be a program name with args.
1656 set dummy cc; ac_word=$2
1657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1658 echo "configure:1659: checking for $ac_word" >&5
1659
1660 if test -n "$CC"; then
1661   ac_cv_prog_CC="$CC" # Let the user override the test.
1662 else
1663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1664   ac_prog_rejected=no
1665   ac_dummy="$PATH"
1666   for ac_dir in $ac_dummy; do
1667     test -z "$ac_dir" && ac_dir=.
1668     if test -f $ac_dir/$ac_word; then
1669       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1670         ac_prog_rejected=yes
1671         continue
1672       fi
1673       ac_cv_prog_CC="cc"
1674       break
1675     fi
1676   done
1677   IFS="$ac_save_ifs"
1678 if test $ac_prog_rejected = yes; then
1679   # We found a bogon in the path, so make sure we never use it.
1680   set dummy $ac_cv_prog_CC
1681   shift
1682   if test $# -gt 0; then
1683     # We chose a different compiler from the bogus one.
1684     # However, it has the same basename, so the bogon will be chosen
1685     # first if we set CC to just the basename; use the full file name.
1686     shift
1687     set dummy "$ac_dir/$ac_word" "$@"
1688     shift
1689     ac_cv_prog_CC="$@"
1690   fi
1691 fi
1692 fi
1693 CC="$ac_cv_prog_CC"
1694 if test -n "$CC"; then
1695   echo "$ac_t""$CC" 1>&6
1696 else
1697   echo "$ac_t""no" 1>&6
1698 fi
1699
1700   if test -z "$CC"; then
1701     case "`uname -s`" in
1702     *win32* | *WIN32*)
1703       # Extract the first word of "cl", so it can be a program name with args.
1704 set dummy cl; ac_word=$2
1705 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1706 echo "configure:1707: checking for $ac_word" >&5
1707
1708 if test -n "$CC"; then
1709   ac_cv_prog_CC="$CC" # Let the user override the test.
1710 else
1711   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1712   ac_dummy="$PATH"
1713   for ac_dir in $ac_dummy; do
1714     test -z "$ac_dir" && ac_dir=.
1715     if test -f $ac_dir/$ac_word; then
1716       ac_cv_prog_CC="cl"
1717       break
1718     fi
1719   done
1720   IFS="$ac_save_ifs"
1721 fi
1722 CC="$ac_cv_prog_CC"
1723 if test -n "$CC"; then
1724   echo "$ac_t""$CC" 1>&6
1725 else
1726   echo "$ac_t""no" 1>&6
1727 fi
1728  ;;
1729     esac
1730   fi
1731   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1732 fi
1733
1734 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1735 echo "configure:1736: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1736
1737 ac_ext=c
1738 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1739 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1740 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'
1741 ac_cpp='$CPP '"$xe_cppflags"
1742 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1743 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1744 cross_compiling=no
1745
1746 cat > conftest.$ac_ext << EOF
1747
1748 #line 1749 "configure"
1749 #include "confdefs.h"
1750
1751 main(){return(0);}
1752 EOF
1753 if { (eval echo configure:1754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1754   ac_cv_prog_cc_works=yes
1755   # If we can't run a trivial program, we are probably using a cross compiler.
1756   if (./conftest; exit) 2>/dev/null; then
1757     ac_cv_prog_cc_cross=no
1758   else
1759     ac_cv_prog_cc_cross=yes
1760   fi
1761 else
1762   echo "configure: failed program was:" >&5
1763   cat conftest.$ac_ext >&5
1764   ac_cv_prog_cc_works=no
1765 fi
1766 rm -fr conftest*
1767 ac_ext=c
1768 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1769 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1770 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'
1771 ac_cpp='$CPP '"$xe_cppflags"
1772 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1773 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1774 cross_compiling=no
1775
1776 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1777 if test $ac_cv_prog_cc_works = no; then
1778   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1779 fi
1780 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1781 echo "configure:1782: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1782 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1783 cross_compiling=$ac_cv_prog_cc_cross
1784
1785 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1786 echo "configure:1787: checking whether we are using GNU C" >&5
1787
1788 cat > conftest.c <<EOF
1789 #ifdef __GNUC__
1790   yes;
1791 #endif
1792 EOF
1793 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1794   ac_cv_prog_gcc=yes
1795 else
1796   ac_cv_prog_gcc=no
1797 fi
1798
1799 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1800
1801 if test $ac_cv_prog_gcc = yes; then
1802   GCC=yes
1803 else
1804   GCC=
1805 fi
1806
1807 ac_test_CFLAGS="${CFLAGS+set}"
1808 ac_save_CFLAGS="$CFLAGS"
1809 CFLAGS=
1810 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1811 echo "configure:1812: checking whether ${CC-cc} accepts -g" >&5
1812
1813 echo 'void f(){}' > conftest.c
1814 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1815   ac_cv_prog_cc_g=yes
1816 else
1817   ac_cv_prog_cc_g=no
1818 fi
1819 rm -f conftest*
1820
1821
1822 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1823 if test "$ac_test_CFLAGS" = set; then
1824   CFLAGS="$ac_save_CFLAGS"
1825 elif test $ac_cv_prog_cc_g = yes; then
1826   if test "$GCC" = yes; then
1827     CFLAGS="-g -O2"
1828   else
1829     CFLAGS="-g"
1830   fi
1831 else
1832   if test "$GCC" = yes; then
1833     CFLAGS="-O2"
1834   else
1835     CFLAGS=
1836   fi
1837 fi
1838  
1839 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1840   CC=${NON_GNU_CC-cc}
1841   # Extract the first word of "gcc", so it can be a program name with args.
1842 set dummy gcc; ac_word=$2
1843 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1844 echo "configure:1845: checking for $ac_word" >&5
1845
1846 if test -n "$CC"; then
1847   ac_cv_prog_CC="$CC" # Let the user override the test.
1848 else
1849   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1850   ac_dummy="$PATH"
1851   for ac_dir in $ac_dummy; do
1852     test -z "$ac_dir" && ac_dir=.
1853     if test -f $ac_dir/$ac_word; then
1854       ac_cv_prog_CC="gcc"
1855       break
1856     fi
1857   done
1858   IFS="$ac_save_ifs"
1859 fi
1860 CC="$ac_cv_prog_CC"
1861 if test -n "$CC"; then
1862   echo "$ac_t""$CC" 1>&6
1863 else
1864   echo "$ac_t""no" 1>&6
1865 fi
1866
1867 if test -z "$CC"; then
1868   # Extract the first word of "cc", so it can be a program name with args.
1869 set dummy cc; ac_word=$2
1870 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1871 echo "configure:1872: checking for $ac_word" >&5
1872
1873 if test -n "$CC"; then
1874   ac_cv_prog_CC="$CC" # Let the user override the test.
1875 else
1876   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1877   ac_prog_rejected=no
1878   ac_dummy="$PATH"
1879   for ac_dir in $ac_dummy; do
1880     test -z "$ac_dir" && ac_dir=.
1881     if test -f $ac_dir/$ac_word; then
1882       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1883         ac_prog_rejected=yes
1884         continue
1885       fi
1886       ac_cv_prog_CC="cc"
1887       break
1888     fi
1889   done
1890   IFS="$ac_save_ifs"
1891 if test $ac_prog_rejected = yes; then
1892   # We found a bogon in the path, so make sure we never use it.
1893   set dummy $ac_cv_prog_CC
1894   shift
1895   if test $# -gt 0; then
1896     # We chose a different compiler from the bogus one.
1897     # However, it has the same basename, so the bogon will be chosen
1898     # first if we set CC to just the basename; use the full file name.
1899     shift
1900     set dummy "$ac_dir/$ac_word" "$@"
1901     shift
1902     ac_cv_prog_CC="$@"
1903   fi
1904 fi
1905 fi
1906 CC="$ac_cv_prog_CC"
1907 if test -n "$CC"; then
1908   echo "$ac_t""$CC" 1>&6
1909 else
1910   echo "$ac_t""no" 1>&6
1911 fi
1912
1913   if test -z "$CC"; then
1914     case "`uname -s`" in
1915     *win32* | *WIN32*)
1916       # Extract the first word of "cl", so it can be a program name with args.
1917 set dummy cl; ac_word=$2
1918 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1919 echo "configure:1920: checking for $ac_word" >&5
1920
1921 if test -n "$CC"; then
1922   ac_cv_prog_CC="$CC" # Let the user override the test.
1923 else
1924   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1925   ac_dummy="$PATH"
1926   for ac_dir in $ac_dummy; do
1927     test -z "$ac_dir" && ac_dir=.
1928     if test -f $ac_dir/$ac_word; then
1929       ac_cv_prog_CC="cl"
1930       break
1931     fi
1932   done
1933   IFS="$ac_save_ifs"
1934 fi
1935 CC="$ac_cv_prog_CC"
1936 if test -n "$CC"; then
1937   echo "$ac_t""$CC" 1>&6
1938 else
1939   echo "$ac_t""no" 1>&6
1940 fi
1941  ;;
1942     esac
1943   fi
1944   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1945 fi
1946
1947 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1948 echo "configure:1949: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1949
1950 ac_ext=c
1951 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1952 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1953 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'
1954 ac_cpp='$CPP '"$xe_cppflags"
1955 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1956 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1957 cross_compiling=no
1958
1959 cat > conftest.$ac_ext << EOF
1960
1961 #line 1962 "configure"
1962 #include "confdefs.h"
1963
1964 main(){return(0);}
1965 EOF
1966 if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1967   ac_cv_prog_cc_works=yes
1968   # If we can't run a trivial program, we are probably using a cross compiler.
1969   if (./conftest; exit) 2>/dev/null; then
1970     ac_cv_prog_cc_cross=no
1971   else
1972     ac_cv_prog_cc_cross=yes
1973   fi
1974 else
1975   echo "configure: failed program was:" >&5
1976   cat conftest.$ac_ext >&5
1977   ac_cv_prog_cc_works=no
1978 fi
1979 rm -fr conftest*
1980 ac_ext=c
1981 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1982 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1983 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'
1984 ac_cpp='$CPP '"$xe_cppflags"
1985 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1986 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1987 cross_compiling=no
1988
1989 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1990 if test $ac_cv_prog_cc_works = no; then
1991   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1992 fi
1993 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1994 echo "configure:1995: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1995 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1996 cross_compiling=$ac_cv_prog_cc_cross
1997
1998 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1999 echo "configure:2000: checking whether we are using GNU C" >&5
2000
2001 cat > conftest.c <<EOF
2002 #ifdef __GNUC__
2003   yes;
2004 #endif
2005 EOF
2006 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2007   ac_cv_prog_gcc=yes
2008 else
2009   ac_cv_prog_gcc=no
2010 fi
2011
2012 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2013
2014 if test $ac_cv_prog_gcc = yes; then
2015   GCC=yes
2016 else
2017   GCC=
2018 fi
2019
2020 ac_test_CFLAGS="${CFLAGS+set}"
2021 ac_save_CFLAGS="$CFLAGS"
2022 CFLAGS=
2023 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2024 echo "configure:2025: checking whether ${CC-cc} accepts -g" >&5
2025
2026 echo 'void f(){}' > conftest.c
2027 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2028   ac_cv_prog_cc_g=yes
2029 else
2030   ac_cv_prog_cc_g=no
2031 fi
2032 rm -f conftest*
2033
2034
2035 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2036 if test "$ac_test_CFLAGS" = set; then
2037   CFLAGS="$ac_save_CFLAGS"
2038 elif test $ac_cv_prog_cc_g = yes; then
2039   if test "$GCC" = yes; then
2040     CFLAGS="-g -O2"
2041   else
2042     CFLAGS="-g"
2043   fi
2044 else
2045   if test "$GCC" = yes; then
2046     CFLAGS="-O2"
2047   else
2048     CFLAGS=
2049   fi
2050 fi
2051
2052 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2053   CC=gcc
2054   # Extract the first word of "gcc", so it can be a program name with args.
2055 set dummy gcc; ac_word=$2
2056 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2057 echo "configure:2058: checking for $ac_word" >&5
2058
2059 if test -n "$CC"; then
2060   ac_cv_prog_CC="$CC" # Let the user override the test.
2061 else
2062   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2063   ac_dummy="$PATH"
2064   for ac_dir in $ac_dummy; do
2065     test -z "$ac_dir" && ac_dir=.
2066     if test -f $ac_dir/$ac_word; then
2067       ac_cv_prog_CC="gcc"
2068       break
2069     fi
2070   done
2071   IFS="$ac_save_ifs"
2072 fi
2073 CC="$ac_cv_prog_CC"
2074 if test -n "$CC"; then
2075   echo "$ac_t""$CC" 1>&6
2076 else
2077   echo "$ac_t""no" 1>&6
2078 fi
2079
2080 if test -z "$CC"; then
2081   # Extract the first word of "cc", so it can be a program name with args.
2082 set dummy cc; ac_word=$2
2083 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2084 echo "configure:2085: checking for $ac_word" >&5
2085
2086 if test -n "$CC"; then
2087   ac_cv_prog_CC="$CC" # Let the user override the test.
2088 else
2089   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2090   ac_prog_rejected=no
2091   ac_dummy="$PATH"
2092   for ac_dir in $ac_dummy; do
2093     test -z "$ac_dir" && ac_dir=.
2094     if test -f $ac_dir/$ac_word; then
2095       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2096         ac_prog_rejected=yes
2097         continue
2098       fi
2099       ac_cv_prog_CC="cc"
2100       break
2101     fi
2102   done
2103   IFS="$ac_save_ifs"
2104 if test $ac_prog_rejected = yes; then
2105   # We found a bogon in the path, so make sure we never use it.
2106   set dummy $ac_cv_prog_CC
2107   shift
2108   if test $# -gt 0; then
2109     # We chose a different compiler from the bogus one.
2110     # However, it has the same basename, so the bogon will be chosen
2111     # first if we set CC to just the basename; use the full file name.
2112     shift
2113     set dummy "$ac_dir/$ac_word" "$@"
2114     shift
2115     ac_cv_prog_CC="$@"
2116   fi
2117 fi
2118 fi
2119 CC="$ac_cv_prog_CC"
2120 if test -n "$CC"; then
2121   echo "$ac_t""$CC" 1>&6
2122 else
2123   echo "$ac_t""no" 1>&6
2124 fi
2125
2126   if test -z "$CC"; then
2127     case "`uname -s`" in
2128     *win32* | *WIN32*)
2129       # Extract the first word of "cl", so it can be a program name with args.
2130 set dummy cl; ac_word=$2
2131 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2132 echo "configure:2133: checking for $ac_word" >&5
2133
2134 if test -n "$CC"; then
2135   ac_cv_prog_CC="$CC" # Let the user override the test.
2136 else
2137   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2138   ac_dummy="$PATH"
2139   for ac_dir in $ac_dummy; do
2140     test -z "$ac_dir" && ac_dir=.
2141     if test -f $ac_dir/$ac_word; then
2142       ac_cv_prog_CC="cl"
2143       break
2144     fi
2145   done
2146   IFS="$ac_save_ifs"
2147 fi
2148 CC="$ac_cv_prog_CC"
2149 if test -n "$CC"; then
2150   echo "$ac_t""$CC" 1>&6
2151 else
2152   echo "$ac_t""no" 1>&6
2153 fi
2154  ;;
2155     esac
2156   fi
2157   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2158 fi
2159
2160 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2161 echo "configure:2162: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2162
2163 ac_ext=c
2164 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2165 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2166 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'
2167 ac_cpp='$CPP '"$xe_cppflags"
2168 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2169 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2170 cross_compiling=no
2171
2172 cat > conftest.$ac_ext << EOF
2173
2174 #line 2175 "configure"
2175 #include "confdefs.h"
2176
2177 main(){return(0);}
2178 EOF
2179 if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2180   ac_cv_prog_cc_works=yes
2181   # If we can't run a trivial program, we are probably using a cross compiler.
2182   if (./conftest; exit) 2>/dev/null; then
2183     ac_cv_prog_cc_cross=no
2184   else
2185     ac_cv_prog_cc_cross=yes
2186   fi
2187 else
2188   echo "configure: failed program was:" >&5
2189   cat conftest.$ac_ext >&5
2190   ac_cv_prog_cc_works=no
2191 fi
2192 rm -fr conftest*
2193 ac_ext=c
2194 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2195 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2196 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'
2197 ac_cpp='$CPP '"$xe_cppflags"
2198 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2199 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2200 cross_compiling=no
2201
2202 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2203 if test $ac_cv_prog_cc_works = no; then
2204   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2205 fi
2206 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2207 echo "configure:2208: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2208 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2209 cross_compiling=$ac_cv_prog_cc_cross
2210
2211 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2212 echo "configure:2213: checking whether we are using GNU C" >&5
2213
2214 cat > conftest.c <<EOF
2215 #ifdef __GNUC__
2216   yes;
2217 #endif
2218 EOF
2219 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2220   ac_cv_prog_gcc=yes
2221 else
2222   ac_cv_prog_gcc=no
2223 fi
2224
2225 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2226
2227 if test $ac_cv_prog_gcc = yes; then
2228   GCC=yes
2229 else
2230   GCC=
2231 fi
2232
2233 ac_test_CFLAGS="${CFLAGS+set}"
2234 ac_save_CFLAGS="$CFLAGS"
2235 CFLAGS=
2236 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2237 echo "configure:2238: checking whether ${CC-cc} accepts -g" >&5
2238
2239 echo 'void f(){}' > conftest.c
2240 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2241   ac_cv_prog_cc_g=yes
2242 else
2243   ac_cv_prog_cc_g=no
2244 fi
2245 rm -f conftest*
2246
2247
2248 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2249 if test "$ac_test_CFLAGS" = set; then
2250   CFLAGS="$ac_save_CFLAGS"
2251 elif test $ac_cv_prog_cc_g = yes; then
2252   if test "$GCC" = yes; then
2253     CFLAGS="-g -O2"
2254   else
2255     CFLAGS="-g"
2256   fi
2257 else
2258   if test "$GCC" = yes; then
2259     CFLAGS="-O2"
2260   else
2261     CFLAGS=
2262   fi
2263 fi
2264
2265 fi
2266 CFLAGS="$xe_save_CFLAGS"
2267
2268
2269 test -n "$CPP" -a -d "$CPP" && CPP=
2270
2271 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2272
2273 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2274 echo "configure:2275: checking how to run the C preprocessor" >&5
2275 # On Suns, sometimes $CPP names a directory.
2276 if test -n "$CPP" && test -d "$CPP"; then
2277   CPP=
2278 fi
2279 if test -z "$CPP"; then
2280
2281   # This must be in double quotes, not single quotes, because CPP may get
2282   # substituted into the Makefile and "${CC-cc}" will confuse make.
2283   CPP="${CC-cc} -E"
2284   # On the NeXT, cc -E runs the code through the compiler's parser,
2285   # not just through cpp.
2286   cat > conftest.$ac_ext <<EOF
2287 #line 2288 "configure"
2288 #include "confdefs.h"
2289 #include <assert.h>
2290 Syntax Error
2291 EOF
2292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2293 { (eval echo configure:2294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2295 if test -z "$ac_err"; then
2296   :
2297 else
2298   echo "$ac_err" >&5
2299   echo "configure: failed program was:" >&5
2300   cat conftest.$ac_ext >&5
2301   rm -rf conftest*
2302   CPP="${CC-cc} -E -traditional-cpp"
2303   cat > conftest.$ac_ext <<EOF
2304 #line 2305 "configure"
2305 #include "confdefs.h"
2306 #include <assert.h>
2307 Syntax Error
2308 EOF
2309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2310 { (eval echo configure:2311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2312 if test -z "$ac_err"; then
2313   :
2314 else
2315   echo "$ac_err" >&5
2316   echo "configure: failed program was:" >&5
2317   cat conftest.$ac_ext >&5
2318   rm -rf conftest*
2319   CPP="${CC-cc} -nologo -E"
2320   cat > conftest.$ac_ext <<EOF
2321 #line 2322 "configure"
2322 #include "confdefs.h"
2323 #include <assert.h>
2324 Syntax Error
2325 EOF
2326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2327 { (eval echo configure:2328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2328 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2329 if test -z "$ac_err"; then
2330   :
2331 else
2332   echo "$ac_err" >&5
2333   echo "configure: failed program was:" >&5
2334   cat conftest.$ac_ext >&5
2335   rm -rf conftest*
2336   CPP=/lib/cpp
2337 fi
2338 rm -f conftest*
2339 fi
2340 rm -f conftest*
2341 fi
2342 rm -f conftest*
2343   ac_cv_prog_CPP="$CPP"
2344   CPP="$ac_cv_prog_CPP"
2345 else
2346   ac_cv_prog_CPP="$CPP"
2347 fi
2348 echo "$ac_t""$CPP" 1>&6
2349
2350
2351
2352 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2353 echo "configure:2354: checking for AIX" >&5
2354 cat > conftest.$ac_ext <<EOF
2355 #line 2356 "configure"
2356 #include "confdefs.h"
2357 #ifdef _AIX
2358   yes
2359 #endif
2360
2361 EOF
2362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2363   egrep "yes" >/dev/null 2>&1; then
2364   rm -rf conftest*
2365   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2366     Defining _ALL_SOURCE
2367 EOF
2368 cat >> confdefs.h <<\EOF
2369 #define _ALL_SOURCE 1
2370 EOF
2371 }
2372
2373 else
2374   rm -rf conftest*
2375   echo "$ac_t""no" 1>&6
2376 fi
2377 rm -f conftest*
2378
2379  
2380
2381 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2382 echo "configure:2383: checking for GNU libc" >&5
2383 cat > conftest.$ac_ext <<EOF
2384 #line 2385 "configure"
2385 #include "confdefs.h"
2386 #include <features.h>
2387 int main() {
2388
2389 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2390 #error Not a GNU libc system :-(
2391 ******* ======= ******** &&&&&&&&
2392 #endif
2393
2394 ; return 0; }
2395 EOF
2396 if { (eval echo configure:2397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2397   rm -rf conftest*
2398   have_glibc=yes
2399 else
2400   echo "configure: failed program was:" >&5
2401   cat conftest.$ac_ext >&5
2402   rm -rf conftest*
2403   have_glibc=no
2404 fi
2405 rm -f conftest*
2406 echo "$ac_t""$have_glibc" 1>&6
2407 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2408     Defining _GNU_SOURCE
2409 EOF
2410 cat >> confdefs.h <<\EOF
2411 #define _GNU_SOURCE 1
2412 EOF
2413 }
2414
2415
2416 case "$opsys" in
2417   sol2)
2418    { test "$extra_verbose" = "yes" && cat << \EOF
2419     Defining __EXTENSIONS__
2420 EOF
2421 cat >> confdefs.h <<\EOF
2422 #define __EXTENSIONS__ 1
2423 EOF
2424 }
2425
2426       if test "$os_release" -ge 55; then
2427      { test "$extra_verbose" = "yes" && cat << \EOF
2428     Defining _XOPEN_SOURCE = 500
2429 EOF
2430 cat >> confdefs.h <<\EOF
2431 #define _XOPEN_SOURCE 500
2432 EOF
2433 }
2434
2435      { test "$extra_verbose" = "yes" && cat << \EOF
2436     Defining _XOPEN_SOURCE_EXTENDED
2437 EOF
2438 cat >> confdefs.h <<\EOF
2439 #define _XOPEN_SOURCE_EXTENDED 1
2440 EOF
2441 }
2442
2443    fi ;;
2444   linux)
2445     { test "$extra_verbose" = "yes" && cat << \EOF
2446     Defining _POSIX_C_SOURCE = 199506L
2447 EOF
2448 cat >> confdefs.h <<\EOF
2449 #define _POSIX_C_SOURCE 199506L
2450 EOF
2451 }
2452
2453     { test "$extra_verbose" = "yes" && cat << \EOF
2454     Defining _XOPEN_SOURCE = 500
2455 EOF
2456 cat >> confdefs.h <<\EOF
2457 #define _XOPEN_SOURCE 500
2458 EOF
2459 }
2460
2461     { test "$extra_verbose" = "yes" && cat << \EOF
2462     Defining _XOPEN_SOURCE_EXTENDED
2463 EOF
2464 cat >> confdefs.h <<\EOF
2465 #define _XOPEN_SOURCE_EXTENDED 1
2466 EOF
2467 }
2468
2469     ;;
2470 esac
2471
2472 cat > conftest.$ac_ext <<EOF
2473 #line 2474 "configure"
2474 #include "confdefs.h"
2475 int main () {
2476 #if defined __SUNPRO_C
2477 return 11;
2478 #elif defined __DECC
2479 return 12;
2480 #elif defined __USLC__ && defined __SCO_VERSION__
2481 return 13;
2482 #else
2483 return 0;
2484 #endif
2485 }
2486 EOF
2487 if { (eval echo configure:2488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2488 then
2489   :
2490 else
2491   conftest_rc="$?"
2492   echo "configure: failed program was:" >&5
2493   cat conftest.$ac_ext >&5
2494   rm -fr conftest*
2495   case "$conftest_rc" in
2496   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2497   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2498   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2499 esac
2500 fi
2501 rm -fr conftest*
2502
2503
2504
2505
2506 echo "Extracting information from the machine- and system-dependent headers..."
2507
2508 tempcname="conftest.c"
2509
2510
2511
2512 cat > $tempcname < confdefs.h
2513 cat >> $tempcname <<EOF
2514 #define NOT_C_CODE
2515 #define C_SWITCH_SITE
2516 #define C_SWITCH_X_SITE
2517 #define LD_SWITCH_SITE
2518 #define LD_SWITCH_X_SITE
2519 #define LD_SWITCH_X_SITE_AUX
2520 #define OS_RELEASE $os_release
2521
2522 #ifdef config_opsysfile
2523 #include "$srcdir/src/$opsysfile"
2524 #endif
2525
2526 #ifdef config_machfile
2527 #include "$srcdir/src/$machfile"
2528 #endif
2529
2530 #ifndef LIBS_MACHINE
2531 #define LIBS_MACHINE
2532 #endif
2533 configure___ libs_machine=LIBS_MACHINE
2534
2535 #ifndef LIBS_SYSTEM
2536 #define LIBS_SYSTEM
2537 #endif
2538 configure___ libs_system=LIBS_SYSTEM
2539
2540 #ifndef LIBS_TERMCAP
2541 #define LIBS_TERMCAP
2542 #endif
2543 configure___ libs_termcap=LIBS_TERMCAP
2544
2545 #ifndef LIB_STANDARD
2546 #define LIB_STANDARD
2547 #endif
2548 configure___ libs_standard=LIB_STANDARD
2549
2550
2551 #ifndef OBJECTS_MACHINE
2552 #define OBJECTS_MACHINE
2553 #endif
2554 configure___ objects_machine=OBJECTS_MACHINE
2555
2556 #ifndef OBJECTS_SYSTEM
2557 #define OBJECTS_SYSTEM
2558 #endif
2559 configure___ objects_system=OBJECTS_SYSTEM
2560
2561
2562 #ifndef C_SWITCH_MACHINE
2563 #define C_SWITCH_MACHINE
2564 #endif
2565 configure___ c_switch_machine=C_SWITCH_MACHINE
2566
2567 #ifndef C_SWITCH_SYSTEM
2568 #define C_SWITCH_SYSTEM
2569 #endif
2570 configure___ c_switch_system=C_SWITCH_SYSTEM
2571
2572
2573 #ifndef LD_SWITCH_MACHINE
2574 #define LD_SWITCH_MACHINE
2575 #endif
2576 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2577
2578 #ifndef LD_SWITCH_SYSTEM
2579 #define LD_SWITCH_SYSTEM
2580 #endif
2581 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2582
2583
2584 #ifndef UNEXEC
2585 #define UNEXEC "unexec.o"
2586 #endif
2587 configure___ unexec=UNEXEC
2588
2589
2590 #ifndef LD_SWITCH_SHARED
2591 #define LD_SWITCH_SHARED "-c"
2592 #endif
2593 configure___ ld_switch_shared=LD_SWITCH_SHARED
2594
2595
2596 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2597 configure___ ordinary_ld=ORDINARY_LD
2598
2599 #ifdef ORDINARY_LINK
2600 #define LD ORDINARY_LD
2601 #else /* no ORDINARY LINK */
2602 #ifdef COFF_ENCAPSULATE
2603 #define LD "\$(CC) -nostdlib"
2604 #else /* not COFF_ENCAPSULATE */
2605 #ifdef LINKER
2606 #define LD LINKER
2607 #else /* ! defined (LINKER) */
2608 #define LD "ld"
2609 #endif /* ! defined (LINKER) */
2610 #endif /* ! defined (COFF_ENCAPSULATE) */
2611 #endif /* not ORDINARY_LINK */
2612 configure___ ld=LD
2613
2614 #ifndef LIB_GCC
2615 #define LIB_GCC
2616 #endif
2617 configure___ lib_gcc=LIB_GCC
2618
2619 #ifndef LD_TEXT_START_ADDR
2620 #define LD_TEXT_START_ADDR
2621 #endif
2622 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2623
2624
2625 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2626 #ifdef NO_REMAP
2627 #ifdef COFF_ENCAPSULATE
2628 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2629 #else /* ! defined (COFF_ENCAPSULATE) */
2630 #define START_FILES "pre-crt0.o /lib/crt0.o"
2631 #endif /* ! defined (COFF_ENCAPSULATE) */
2632 #else /* ! defined (NO_REMAP) */
2633 #define START_FILES "ecrt0.o"
2634 #endif /* ! defined (NO_REMAP) */
2635 #endif /* no ORDINARY_LINK */
2636 #ifndef START_FILES
2637 #define START_FILES
2638 #endif
2639 configure___ start_files=START_FILES
2640
2641 #ifdef ORDINARY_LINK
2642 configure___ ordinary_link=yes
2643 #else
2644 configure___ ordinary_link=no
2645 #endif
2646
2647 #ifdef SYSTEM_MALLOC
2648 configure___ system_malloc=yes
2649 #else
2650 configure___ system_malloc=no
2651 #endif
2652
2653 #ifdef TERMINFO
2654 configure___ have_terminfo=yes
2655 #else
2656 configure___ have_terminfo=no
2657 #endif
2658
2659 #ifdef MAIL_USE_FLOCK
2660 configure___ mail_use_flock=yes
2661 #else
2662 configure___ mail_use_flock=no
2663 #endif
2664
2665 #ifdef MAIL_USE_LOCKF
2666 configure___ mail_use_lockf=yes
2667 #else
2668 configure___ mail_use_lockf=no
2669 #endif
2670
2671 #ifdef MAIL_USE_LOCKING
2672 configure___ mail_use_locking=yes
2673 #else
2674 configure___ mail_use_locking=no
2675 #endif
2676
2677 #ifdef HAVE_WIN32_PROCESSES
2678 configure___ win32_processes=yes
2679 #else
2680 configure___ win32_processes=no
2681 #endif
2682
2683 EOF
2684
2685 CPP=`eval "echo $CPP $CPPFLAGS"`
2686 eval `$CPP -Isrc $tempcname \
2687         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2688
2689 rm $tempcname
2690
2691 if test "$pdump" = "yes"; then
2692   ordinary_link="yes"
2693   ld="${ordinary_ld}"
2694   start_files=
2695   libs_standard=
2696   unexec=
2697   lib_gcc=
2698 fi
2699
2700 test "$extra_verbose" = "yes" && \
2701   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 ""
2702
2703 case "$opsys" in mingw* | cygwin*)
2704   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2705   cygwin_include=`eval "dirname $cygwin_include"` ;
2706   cygwin_include="-I$cygwin_include/../include" ;
2707   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2708   case "$opsys" in mingw*)
2709     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2710   esac
2711   ;;
2712 esac
2713
2714 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2715
2716
2717 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2718
2719 if test "$__USLC__" = yes; then
2720   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2721 echo "configure:2722: checking for whether the -Kalloca compiler flag is needed" >&5
2722   need_kalloca=no
2723   cat > conftest.$ac_ext <<EOF
2724 #line 2725 "configure"
2725 #include "confdefs.h"
2726
2727 int main() {
2728 void *x = alloca(4);
2729 ; return 0; }
2730 EOF
2731 if { (eval echo configure:2732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2732   rm -rf conftest*
2733   :
2734 else
2735   echo "configure: failed program was:" >&5
2736   cat conftest.$ac_ext >&5
2737   rm -rf conftest*
2738   
2739     xe_save_c_switch_system="$c_switch_system"
2740     c_switch_system="$c_switch_system -Kalloca"
2741     cat > conftest.$ac_ext <<EOF
2742 #line 2743 "configure"
2743 #include "confdefs.h"
2744
2745 int main() {
2746 void *x = alloca(4);
2747 ; return 0; }
2748 EOF
2749 if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2750   rm -rf conftest*
2751    need_kalloca=yes 
2752 else
2753   echo "configure: failed program was:" >&5
2754   cat conftest.$ac_ext >&5
2755 fi
2756 rm -f conftest*
2757     c_switch_system="$xe_save_c_switch_system"
2758 fi
2759 rm -f conftest*
2760   echo "$ac_t""$need_kalloca" 1>&6
2761   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
2762 fi
2763
2764 if test "$cflags_specified" = "no"; then
2765       if   test "$GCC" = "yes"; then
2766     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2767         CFLAGS="$CFLAGS -Wsign-compare"
2768                 if test "$xemacs_compiler" != "g++"; then
2769       CFLAGS="$CFLAGS -Wshadow"
2770     fi
2771             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2772               elif test "$__SUNPRO_C" = "yes"; then
2773     case "$opsys" in
2774       sol2    ) CFLAGS="-v -xO4" ;;
2775       sunos4* ) CFLAGS="-xO2";;
2776     esac
2777   elif test "$__DECC" = "yes"; then
2778     CFLAGS="-O3"
2779   elif test "$CC" = "xlc"; then
2780     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2781     else
2782     CFLAGS="-O" ;  fi
2783 fi
2784
2785 if test "$GCC" = "yes"; then
2786 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2787 echo "configure:2788: checking for buggy gcc versions" >&5
2788 GCC_VERSION=`$CC --version`
2789 case `uname -s`:`uname -m`:$GCC_VERSION in
2790                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2791                         case "$CFLAGS" in
2792             *-O2*|*-O3*)
2793                 case "$CFLAGS" in
2794                     *-fno-schedule-insns*) ;;
2795                     *)
2796                         echo "$ac_t""yes" 1>&6
2797                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2798                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2799                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2800                         ;;
2801                 esac
2802                 ;;
2803         esac
2804         ;;
2805                     Linux:alpha:egcs-2.91.*)
2806         echo "$ac_t""yes" 1>&6
2807         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2808         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2809         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2810         ;;
2811     *:i*86*:2.7.2*)
2812         case "$CFLAGS" in
2813             *-O2*|*-O3*)
2814                 case "$GCC_VERSION" in
2815                     2.7.2)
2816                         case "$CFLAGS" in
2817                             *-fno-strength-reduce*) ;;
2818                             *)
2819                                 echo "$ac_t""yes" 1>&6
2820                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2821                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2822                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2823                                 ;;
2824                         esac
2825                         ;;
2826                 esac
2827                 case "$CFLAGS" in
2828                  *-fno-caller-saves*) ;;
2829                  *)
2830                     echo "$ac_t""yes" 1>&6
2831                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2832                     echo "configure: warning: -fno-caller-saves." 1>&2
2833                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2834                     ;;
2835                 esac
2836                 ;;
2837         esac
2838         ;;
2839 esac
2840 echo "$ac_t""no" 1>&6
2841 fi
2842
2843
2844 if test "$GCC" = "yes"; then
2845   set x $ld_switch_system; shift; ld_switch_system=""
2846   while test -n "$1"; do
2847     case $1 in
2848       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2849       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2850       -Xlinker* ) ;;
2851       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2852     esac
2853     shift
2854   done
2855 fi
2856
2857 if test "$GCC" = "yes"; then
2858   set x $ld_switch_machine; shift; ld_switch_machine=""
2859   while test -n "$1"; do
2860     case $1 in
2861       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2862       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2863       -Xlinker* ) ;;
2864       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2865     esac
2866     shift
2867   done
2868 fi
2869
2870 if test "$GCC" = "yes"; then
2871   set x $LDFLAGS; shift; LDFLAGS=""
2872   while test -n "$1"; do
2873     case $1 in
2874       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2875       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2876       -Xlinker* ) ;;
2877       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2878     esac
2879     shift
2880   done
2881 fi
2882
2883 if test "$GCC" = "yes"; then
2884   set x $ld_call_shared; shift; ld_call_shared=""
2885   while test -n "$1"; do
2886     case $1 in
2887       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2888       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2889       -Xlinker* ) ;;
2890       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2891     esac
2892     shift
2893   done
2894 fi
2895
2896 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2897    echo "    xemacs will be linked with \"$objects_machine\""
2898  fi
2899 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2900    echo "    xemacs will be linked with \"$objects_system\""
2901  fi
2902 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2903    echo "    xemacs will be linked with \"$unexec\""
2904  fi
2905 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2906    echo "    xemacs will be linked with \"dumper.o\""
2907  fi
2908
2909 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2910 echo "configure:2911: checking for dynodump" >&5
2911 if test "$unexec" != "unexsol2.o"; then
2912   echo "$ac_t""no" 1>&6
2913 else
2914   echo "$ac_t""yes" 1>&6
2915   { test "$extra_verbose" = "yes" && cat << \EOF
2916     Defining DYNODUMP
2917 EOF
2918 cat >> confdefs.h <<\EOF
2919 #define DYNODUMP 1
2920 EOF
2921 }
2922
2923   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2924   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2925   case "$machine" in
2926     sparc   ) dynodump_arch=sparc ;;
2927     *86*    ) dynodump_arch=i386  ;;
2928     powerpc ) dynodump_arch=ppc   ;;
2929   esac
2930     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
2931 fi
2932
2933
2934 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2935
2936 if test "$unexec" = "unexaix.o"; then
2937   if   test "$dynamic" = "no"; then
2938   start_flags="-Wl,-bnso,-bnodelcsect"
2939   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2940   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2941     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2942   done
2943   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2944     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2945   done
2946   
2947 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2948 echo "configure:2949: checking for terminateAndUnload in -lC" >&5
2949 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2950
2951 xe_check_libs=" -lC "
2952 cat > conftest.$ac_ext <<EOF
2953 #line 2954 "configure"
2954 #include "confdefs.h"
2955 /* Override any gcc2 internal prototype to avoid an error.  */
2956 /* We use char because int might match the return type of a gcc2
2957     builtin and then its argument prototype would still apply.  */
2958 char terminateAndUnload();
2959
2960 int main() {
2961 terminateAndUnload()
2962 ; return 0; }
2963 EOF
2964 if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2965   rm -rf conftest*
2966   eval "ac_cv_lib_$ac_lib_var=yes"
2967 else
2968   echo "configure: failed program was:" >&5
2969   cat conftest.$ac_ext >&5
2970   rm -rf conftest*
2971   eval "ac_cv_lib_$ac_lib_var=no"
2972 fi
2973 rm -f conftest*
2974 xe_check_libs=""
2975
2976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2977   echo "$ac_t""yes" 1>&6
2978   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2979 else
2980   echo "$ac_t""no" 1>&6
2981 fi
2982
2983
2984   fi
2985 elif test -n "$ld_text_start_addr"; then
2986   start_flags="-T $ld_text_start_addr -e __start"
2987 fi
2988
2989
2990
2991
2992 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2993  test -z "$linker" &&  linker='$(CC) -nostdlib'
2994  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2995 fi
2996 test "$GCC" != "yes" && lib_gcc=
2997
2998
2999
3000
3001
3002 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3003 if test -n "$site_libraries"; then
3004   for arg in $site_libraries; do
3005     case "$arg" in
3006      -* ) ;;
3007      * ) test -d "$arg" || \
3008            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3009        arg="-L${arg}" ;;
3010     esac
3011     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3012   done
3013 fi
3014
3015 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3016 if test -n "$site_includes"; then
3017   for arg in $site_includes; do
3018     case "$arg" in
3019       -* ) ;;
3020       * ) test -d "$arg" || \
3021            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3022       arg="-I${arg}" ;;
3023     esac
3024     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3025   done
3026 fi
3027
3028 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3029 if test -n "$site_prefixes"; then
3030   for dir in $site_prefixes; do
3031     lib_dir="${dir}/lib"
3032     inc_dir="${dir}/include"
3033     if test ! -d "$dir"; then
3034       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3035     elif test ! -d "$lib_dir"; then
3036       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3037     else
3038       if test -d "$inc_dir"; then
3039         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
3040       fi
3041       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
3042     fi
3043   done
3044 fi
3045
3046
3047 for dir in "/usr/ccs/lib"; do
3048   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
3049 done
3050
3051 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3052 if test -n "$site_runtime_libraries"; then
3053   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3054   export LD_RUN_PATH
3055 fi
3056
3057
3058
3059
3060
3061 if test -n "$add_runtime_path"; then :;
3062 elif test "$dynamic" = "no"; then add_runtime_path=no
3063 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3064 else case "$opsys" in
3065        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3066        * ) add_runtime_path=no ;;
3067      esac
3068 fi
3069
3070 if test "$add_runtime_path" = "yes"; then
3071       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3072 echo "configure:3073: checking "for runtime libraries flag"" >&5
3073   case "$opsys" in
3074     sol2 ) dash_r="-R" ;;
3075     decosf* | linux* | irix*) dash_r="-rpath " ;;
3076     *)
3077       dash_r=""
3078       for try_dash_r in "-R" "-R " "-rpath "; do
3079         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3080         
3081 if test "$GCC" = "yes"; then
3082   set x $xe_check_libs; shift; xe_check_libs=""
3083   while test -n "$1"; do
3084     case $1 in
3085       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3086       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3087       -Xlinker* ) ;;
3088       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3089     esac
3090     shift
3091   done
3092 fi
3093         cat > conftest.$ac_ext <<EOF
3094 #line 3095 "configure"
3095 #include "confdefs.h"
3096
3097 int main() {
3098
3099 ; return 0; }
3100 EOF
3101 if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3102   rm -rf conftest*
3103   dash_r="$try_dash_r"
3104 else
3105   echo "configure: failed program was:" >&5
3106   cat conftest.$ac_ext >&5
3107 fi
3108 rm -f conftest*
3109         xe_check_libs=""
3110         test -n "$dash_r" && break
3111       done ;;
3112   esac
3113   if test -n "$dash_r";
3114     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3115     else echo "$ac_t""NONE" 1>&6
3116   fi
3117 fi
3118
3119 xe_add_unique_runpath_dir='
3120   xe_add_p=yes
3121   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3122   done
3123   if test "$xe_add_p" = "yes"; then
3124     test -n "$runpath" && runpath="${runpath}:"
3125     runpath="${runpath}${xe_runpath_dir}"
3126     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3127   fi'
3128
3129
3130
3131
3132 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3133     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3134   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3135   
3136         runpath="" runpath_dirs=""
3137   if test -n "$LD_RUN_PATH"; then
3138     runpath="$LD_RUN_PATH"
3139   elif test "$GCC" = "yes"; then
3140         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3141     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3142     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3143     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3144       case "$arg" in P,* | -L* | -R* )
3145         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3146           {
3147 xe_runpath_dir="$dir"
3148   test "$xe_runpath_dir" != "/lib"     -a \
3149         "$xe_runpath_dir" != "/usr/lib" -a \
3150         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3151   eval "$xe_add_unique_runpath_dir"
3152 }
3153         done ;;
3154       esac
3155     done
3156     ld_switch_run="$ld_switch_run_save"
3157     rm -f conftest*
3158   else
3159         for arg in $ld_switch_site $ld_switch_x_site; do
3160       case "$arg" in -L*) {
3161 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3162   test "$xe_runpath_dir" != "/lib"     -a \
3163         "$xe_runpath_dir" != "/usr/lib" -a \
3164         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3165   eval "$xe_add_unique_runpath_dir"
3166 };; esac
3167     done
3168         if test "$opsys $need_motif" = "sol2 yes"; then
3169       xe_runpath_dir="/opt/SUNWdt/lib";
3170       eval "$xe_add_unique_runpath_dir";
3171     fi
3172   fi 
3173   if test -n "$runpath"; then
3174     ld_switch_run="${dash_r}${runpath}"
3175     
3176 if test "$GCC" = "yes"; then
3177   set x $ld_switch_run; shift; ld_switch_run=""
3178   while test -n "$1"; do
3179     case $1 in
3180       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3181       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3182       -Xlinker* ) ;;
3183       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3184     esac
3185     shift
3186   done
3187 fi
3188     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3189   fi
3190 fi
3191
3192
3193
3194 GNU_MALLOC=yes
3195 if test "$with_dlmalloc" != "no"; then
3196         doug_lea_malloc=yes
3197 else
3198         doug_lea_malloc=no
3199 fi
3200 after_morecore_hook_exists=yes
3201 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3202 echo "configure:3203: checking for malloc_set_state" >&5
3203
3204 cat > conftest.$ac_ext <<EOF
3205 #line 3206 "configure"
3206 #include "confdefs.h"
3207 /* System header to define __stub macros and hopefully few prototypes,
3208     which can conflict with char malloc_set_state(); below.  */
3209 #include <assert.h>
3210 /* Override any gcc2 internal prototype to avoid an error.  */
3211 /* We use char because int might match the return type of a gcc2
3212     builtin and then its argument prototype would still apply.  */
3213 char malloc_set_state();
3214
3215 int main() {
3216
3217 /* The GNU C library defines this for functions which it implements
3218     to always fail with ENOSYS.  Some functions are actually named
3219     something starting with __ and the normal name is an alias.  */
3220 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3221 choke me
3222 #else
3223 malloc_set_state();
3224 #endif
3225
3226 ; return 0; }
3227 EOF
3228 if { (eval echo configure:3229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3229   rm -rf conftest*
3230   eval "ac_cv_func_malloc_set_state=yes"
3231 else
3232   echo "configure: failed program was:" >&5
3233   cat conftest.$ac_ext >&5
3234   rm -rf conftest*
3235   eval "ac_cv_func_malloc_set_state=no"
3236 fi
3237 rm -f conftest*
3238
3239 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3240   echo "$ac_t""yes" 1>&6
3241   :
3242 else
3243   echo "$ac_t""no" 1>&6
3244 doug_lea_malloc=no
3245 fi
3246
3247 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3248 echo "configure:3249: checking whether __after_morecore_hook exists" >&5
3249 cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 extern void (* __after_morecore_hook)();
3253 int main() {
3254 __after_morecore_hook = 0
3255 ; return 0; }
3256 EOF
3257 if { (eval echo configure:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3258   rm -rf conftest*
3259   echo "$ac_t""yes" 1>&6
3260 else
3261   echo "configure: failed program was:" >&5
3262   cat conftest.$ac_ext >&5
3263   rm -rf conftest*
3264   echo "$ac_t""no" 1>&6
3265    after_morecore_hook_exists=no
3266 fi
3267 rm -f conftest*
3268 if test "$system_malloc" = "yes" ; then
3269   GNU_MALLOC=no
3270   GNU_MALLOC_reason="
3271     - The GNU allocators don't work with this system configuration."
3272 elif test "$with_system_malloc" = "yes" ; then
3273   GNU_MALLOC=no
3274   GNU_MALLOC_reason="
3275     - User chose not to use GNU allocators."
3276 elif test "$with_debug_malloc" = "yes" ; then
3277   GNU_MALLOC=no
3278   GNU_MALLOC_reason="
3279     - User chose to use Debugging Malloc."
3280 fi
3281
3282 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3283   GNU_MALLOC_reason="
3284     - Using Doug Lea's new malloc from the GNU C Library."
3285   { test "$extra_verbose" = "yes" && cat << \EOF
3286     Defining DOUG_LEA_MALLOC
3287 EOF
3288 cat >> confdefs.h <<\EOF
3289 #define DOUG_LEA_MALLOC 1
3290 EOF
3291 }
3292
3293   if test "$after_morecore_hook_exists" = "no" ; then
3294     GNU_MALLOC_reason="
3295     - Using Doug Lea's new malloc from the Linux C Library."
3296     { test "$extra_verbose" = "yes" && cat << \EOF
3297     Defining _NO_MALLOC_WARNING_
3298 EOF
3299 cat >> confdefs.h <<\EOF
3300 #define _NO_MALLOC_WARNING_ 1
3301 EOF
3302 }
3303
3304   fi
3305 fi
3306
3307
3308
3309
3310 # Extract the first word of "ranlib", so it can be a program name with args.
3311 set dummy ranlib; ac_word=$2
3312 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3313 echo "configure:3314: checking for $ac_word" >&5
3314
3315 if test -n "$RANLIB"; then
3316   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3317 else
3318   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3319   ac_dummy="$PATH"
3320   for ac_dir in $ac_dummy; do
3321     test -z "$ac_dir" && ac_dir=.
3322     if test -f $ac_dir/$ac_word; then
3323       ac_cv_prog_RANLIB="ranlib"
3324       break
3325     fi
3326   done
3327   IFS="$ac_save_ifs"
3328   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3329 fi
3330 RANLIB="$ac_cv_prog_RANLIB"
3331 if test -n "$RANLIB"; then
3332   echo "$ac_t""$RANLIB" 1>&6
3333 else
3334   echo "$ac_t""no" 1>&6
3335 fi
3336
3337 ac_aux_dir=
3338 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3339   if test -f $ac_dir/install-sh; then
3340     ac_aux_dir=$ac_dir
3341     ac_install_sh="$ac_aux_dir/install-sh -c"
3342     break
3343   elif test -f $ac_dir/install.sh; then
3344     ac_aux_dir=$ac_dir
3345     ac_install_sh="$ac_aux_dir/install.sh -c"
3346     break
3347   fi
3348 done
3349 if test -z "$ac_aux_dir"; then
3350   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3351 fi
3352 ac_config_guess=$ac_aux_dir/config.guess
3353 ac_config_sub=$ac_aux_dir/config.sub
3354 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3355
3356 # Find a good install program.  We prefer a C program (faster),
3357 # so one script is as good as another.  But avoid the broken or
3358 # incompatible versions:
3359 # SysV /etc/install, /usr/sbin/install
3360 # SunOS /usr/etc/install
3361 # IRIX /sbin/install
3362 # AIX /bin/install
3363 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3364 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3365 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3366 # ./install, which can be erroneously created by make from ./install.sh.
3367 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3368 echo "configure:3369: checking for a BSD compatible install" >&5
3369 if test -z "$INSTALL"; then
3370
3371   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3372   for ac_dir in $PATH; do
3373     # Account for people who put trailing slashes in PATH elements.
3374     case "$ac_dir/" in
3375     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3376     *)
3377       # OSF1 and SCO ODT 3.0 have their own names for install.
3378       # Don't use installbsd from OSF since it installs stuff as root
3379       # by default.
3380       for ac_prog in ginstall scoinst install; do
3381         if test -f $ac_dir/$ac_prog; then
3382           if test $ac_prog = install &&
3383             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3384             # AIX install.  It has an incompatible calling convention.
3385             :
3386           else
3387             ac_cv_path_install="$ac_dir/$ac_prog -c"
3388             break 2
3389           fi
3390         fi
3391       done
3392       ;;
3393     esac
3394   done
3395   IFS="$ac_save_IFS"
3396
3397   if test "${ac_cv_path_install+set}" = set; then
3398     INSTALL="$ac_cv_path_install"
3399   else
3400     # As a last resort, use the slow shell script.  We don't cache a
3401     # path for INSTALL within a source directory, because that will
3402     # break other packages using the cache if that directory is
3403     # removed, or if the path is relative.
3404     INSTALL="$ac_install_sh"
3405   fi
3406 fi
3407 echo "$ac_t""$INSTALL" 1>&6
3408
3409 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3410 # It thinks the first close brace ends the variable substitution.
3411 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3412
3413 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3414
3415 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3416
3417 for ac_prog in 'bison -y' byacc
3418 do
3419 # Extract the first word of "$ac_prog", so it can be a program name with args.
3420 set dummy $ac_prog; ac_word=$2
3421 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3422 echo "configure:3423: checking for $ac_word" >&5
3423
3424 if test -n "$YACC"; then
3425   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3426 else
3427   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3428   ac_dummy="$PATH"
3429   for ac_dir in $ac_dummy; do
3430     test -z "$ac_dir" && ac_dir=.
3431     if test -f $ac_dir/$ac_word; then
3432       ac_cv_prog_YACC="$ac_prog"
3433       break
3434     fi
3435   done
3436   IFS="$ac_save_ifs"
3437 fi
3438 YACC="$ac_cv_prog_YACC"
3439 if test -n "$YACC"; then
3440   echo "$ac_t""$YACC" 1>&6
3441 else
3442   echo "$ac_t""no" 1>&6
3443 fi
3444
3445 test -n "$YACC" && break
3446 done
3447 test -n "$YACC" || YACC="yacc"
3448
3449
3450 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 
3451 do
3452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3454 echo "configure:3455: checking for $ac_hdr" >&5
3455
3456 cat > conftest.$ac_ext <<EOF
3457 #line 3458 "configure"
3458 #include "confdefs.h"
3459 #include <$ac_hdr>
3460 EOF
3461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3462 { (eval echo configure:3463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3464 if test -z "$ac_err"; then
3465   rm -rf conftest*
3466   eval "ac_cv_header_$ac_safe=yes"
3467 else
3468   echo "$ac_err" >&5
3469   echo "configure: failed program was:" >&5
3470   cat conftest.$ac_ext >&5
3471   rm -rf conftest*
3472   eval "ac_cv_header_$ac_safe=no"
3473 fi
3474 rm -f conftest*
3475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3476   echo "$ac_t""yes" 1>&6
3477     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3478   { test "$extra_verbose" = "yes" && cat << EOF
3479     Defining $ac_tr_hdr
3480 EOF
3481 cat >> confdefs.h <<EOF
3482 #define $ac_tr_hdr 1
3483 EOF
3484 }
3485  
3486 else
3487   echo "$ac_t""no" 1>&6
3488 fi
3489 done
3490
3491 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3492 echo "configure:3493: checking for sys/wait.h that is POSIX.1 compatible" >&5
3493
3494 cat > conftest.$ac_ext <<EOF
3495 #line 3496 "configure"
3496 #include "confdefs.h"
3497 #include <sys/types.h>
3498 #include <sys/wait.h>
3499 #ifndef WEXITSTATUS
3500 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3501 #endif
3502 #ifndef WIFEXITED
3503 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3504 #endif
3505 int main() {
3506 int s;
3507 wait (&s);
3508 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3509 ; return 0; }
3510 EOF
3511 if { (eval echo configure:3512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3512   rm -rf conftest*
3513   ac_cv_header_sys_wait_h=yes
3514 else
3515   echo "configure: failed program was:" >&5
3516   cat conftest.$ac_ext >&5
3517   rm -rf conftest*
3518   ac_cv_header_sys_wait_h=no
3519 fi
3520 rm -f conftest*
3521
3522 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3523 if test $ac_cv_header_sys_wait_h = yes; then
3524   { test "$extra_verbose" = "yes" && cat << \EOF
3525     Defining HAVE_SYS_WAIT_H
3526 EOF
3527 cat >> confdefs.h <<\EOF
3528 #define HAVE_SYS_WAIT_H 1
3529 EOF
3530 }
3531
3532 fi
3533
3534 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3535 echo "configure:3536: checking for ANSI C header files" >&5
3536
3537 cat > conftest.$ac_ext <<EOF
3538 #line 3539 "configure"
3539 #include "confdefs.h"
3540 #include <stdlib.h>
3541 #include <stdarg.h>
3542 #include <string.h>
3543 #include <float.h>
3544 EOF
3545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3546 { (eval echo configure:3547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3548 if test -z "$ac_err"; then
3549   rm -rf conftest*
3550   ac_cv_header_stdc=yes
3551 else
3552   echo "$ac_err" >&5
3553   echo "configure: failed program was:" >&5
3554   cat conftest.$ac_ext >&5
3555   rm -rf conftest*
3556   ac_cv_header_stdc=no
3557 fi
3558 rm -f conftest*
3559
3560 if test $ac_cv_header_stdc = yes; then
3561   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3562 cat > conftest.$ac_ext <<EOF
3563 #line 3564 "configure"
3564 #include "confdefs.h"
3565 #include <string.h>
3566 EOF
3567 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3568   egrep "memchr" >/dev/null 2>&1; then
3569   :
3570 else
3571   rm -rf conftest*
3572   ac_cv_header_stdc=no
3573 fi
3574 rm -f conftest*
3575
3576 fi
3577
3578 if test $ac_cv_header_stdc = yes; then
3579   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3580 cat > conftest.$ac_ext <<EOF
3581 #line 3582 "configure"
3582 #include "confdefs.h"
3583 #include <stdlib.h>
3584 EOF
3585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3586   egrep "free" >/dev/null 2>&1; then
3587   :
3588 else
3589   rm -rf conftest*
3590   ac_cv_header_stdc=no
3591 fi
3592 rm -f conftest*
3593
3594 fi
3595
3596 if test $ac_cv_header_stdc = yes; then
3597   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3598 cat > conftest.$ac_ext <<EOF
3599 #line 3600 "configure"
3600 #include "confdefs.h"
3601 #include <ctype.h>
3602 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3603 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3604 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3605 int main () { int i; for (i = 0; i < 256; i++)
3606 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3607 exit (0); }
3608
3609 EOF
3610 if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3611 then
3612   :
3613 else
3614   conftest_rc="$?"
3615   echo "configure: failed program was:" >&5
3616   cat conftest.$ac_ext >&5
3617   rm -fr conftest*
3618   ac_cv_header_stdc=no
3619 fi
3620 rm -fr conftest*
3621 fi
3622
3623 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3624 if test $ac_cv_header_stdc = yes; then
3625   { test "$extra_verbose" = "yes" && cat << \EOF
3626     Defining STDC_HEADERS
3627 EOF
3628 cat >> confdefs.h <<\EOF
3629 #define STDC_HEADERS 1
3630 EOF
3631 }
3632
3633 fi
3634
3635 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3636 echo "configure:3637: checking whether time.h and sys/time.h may both be included" >&5
3637
3638 cat > conftest.$ac_ext <<EOF
3639 #line 3640 "configure"
3640 #include "confdefs.h"
3641 #include <sys/types.h>
3642 #include <sys/time.h>
3643 #include <time.h>
3644 int main() {
3645 struct tm *tp;
3646 ; return 0; }
3647 EOF
3648 if { (eval echo configure:3649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3649   rm -rf conftest*
3650   ac_cv_header_time=yes
3651 else
3652   echo "configure: failed program was:" >&5
3653   cat conftest.$ac_ext >&5
3654   rm -rf conftest*
3655   ac_cv_header_time=no
3656 fi
3657 rm -f conftest*
3658
3659 echo "$ac_t""$ac_cv_header_time" 1>&6
3660 if test $ac_cv_header_time = yes; then
3661   { test "$extra_verbose" = "yes" && cat << \EOF
3662     Defining TIME_WITH_SYS_TIME
3663 EOF
3664 cat >> confdefs.h <<\EOF
3665 #define TIME_WITH_SYS_TIME 1
3666 EOF
3667 }
3668
3669 fi
3670
3671 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3672 echo "configure:3673: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3673
3674 cat > conftest.$ac_ext <<EOF
3675 #line 3676 "configure"
3676 #include "confdefs.h"
3677 #include <sys/types.h>
3678 #include <signal.h>
3679 /* NetBSD declares sys_siglist in unistd.h.  */
3680 #ifdef HAVE_UNISTD_H
3681 #include <unistd.h>
3682 #endif
3683 int main() {
3684 char *msg = *(sys_siglist + 1);
3685 ; return 0; }
3686 EOF
3687 if { (eval echo configure:3688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3688   rm -rf conftest*
3689   ac_cv_decl_sys_siglist=yes
3690 else
3691   echo "configure: failed program was:" >&5
3692   cat conftest.$ac_ext >&5
3693   rm -rf conftest*
3694   ac_cv_decl_sys_siglist=no
3695 fi
3696 rm -f conftest*
3697
3698 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3699 if test $ac_cv_decl_sys_siglist = yes; then
3700   { test "$extra_verbose" = "yes" && cat << \EOF
3701     Defining SYS_SIGLIST_DECLARED
3702 EOF
3703 cat >> confdefs.h <<\EOF
3704 #define SYS_SIGLIST_DECLARED 1
3705 EOF
3706 }
3707
3708 fi
3709
3710
3711
3712 echo $ac_n "checking for utime""... $ac_c" 1>&6
3713 echo "configure:3714: checking for utime" >&5
3714 cat > conftest.$ac_ext <<EOF
3715 #line 3716 "configure"
3716 #include "confdefs.h"
3717 #include <sys/types.h>
3718 #include <utime.h>
3719 int main() {
3720 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3721 ; return 0; }
3722 EOF
3723 if { (eval echo configure:3724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3724   rm -rf conftest*
3725   echo "$ac_t""yes" 1>&6
3726    { test "$extra_verbose" = "yes" && cat << \EOF
3727     Defining HAVE_UTIME
3728 EOF
3729 cat >> confdefs.h <<\EOF
3730 #define HAVE_UTIME 1
3731 EOF
3732 }
3733
3734 else
3735   echo "configure: failed program was:" >&5
3736   cat conftest.$ac_ext >&5
3737   rm -rf conftest*
3738   echo "$ac_t""no" 1>&6
3739       for ac_func in utimes
3740 do
3741 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3742 echo "configure:3743: checking for $ac_func" >&5
3743
3744 cat > conftest.$ac_ext <<EOF
3745 #line 3746 "configure"
3746 #include "confdefs.h"
3747 /* System header to define __stub macros and hopefully few prototypes,
3748     which can conflict with char $ac_func(); below.  */
3749 #include <assert.h>
3750 /* Override any gcc2 internal prototype to avoid an error.  */
3751 /* We use char because int might match the return type of a gcc2
3752     builtin and then its argument prototype would still apply.  */
3753 char $ac_func();
3754
3755 int main() {
3756
3757 /* The GNU C library defines this for functions which it implements
3758     to always fail with ENOSYS.  Some functions are actually named
3759     something starting with __ and the normal name is an alias.  */
3760 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3761 choke me
3762 #else
3763 $ac_func();
3764 #endif
3765
3766 ; return 0; }
3767 EOF
3768 if { (eval echo configure:3769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3769   rm -rf conftest*
3770   eval "ac_cv_func_$ac_func=yes"
3771 else
3772   echo "configure: failed program was:" >&5
3773   cat conftest.$ac_ext >&5
3774   rm -rf conftest*
3775   eval "ac_cv_func_$ac_func=no"
3776 fi
3777 rm -f conftest*
3778
3779 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3780   echo "$ac_t""yes" 1>&6
3781     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3782   { test "$extra_verbose" = "yes" && cat << EOF
3783     Defining $ac_tr_func
3784 EOF
3785 cat >> confdefs.h <<EOF
3786 #define $ac_tr_func 1
3787 EOF
3788 }
3789  
3790 else
3791   echo "$ac_t""no" 1>&6
3792 fi
3793 done
3794
3795 fi
3796 rm -f conftest*
3797
3798
3799 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3800 echo "configure:3801: checking return type of signal handlers" >&5
3801
3802 cat > conftest.$ac_ext <<EOF
3803 #line 3804 "configure"
3804 #include "confdefs.h"
3805 #include <sys/types.h>
3806 #include <signal.h>
3807 #ifdef signal
3808 #undef signal
3809 #endif
3810 #ifdef __cplusplus
3811 extern "C" void (*signal (int, void (*)(int)))(int);
3812 #else
3813 void (*signal ()) ();
3814 #endif
3815
3816 int main() {
3817 int i;
3818 ; return 0; }
3819 EOF
3820 if { (eval echo configure:3821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3821   rm -rf conftest*
3822   ac_cv_type_signal=void
3823 else
3824   echo "configure: failed program was:" >&5
3825   cat conftest.$ac_ext >&5
3826   rm -rf conftest*
3827   ac_cv_type_signal=int
3828 fi
3829 rm -f conftest*
3830
3831 echo "$ac_t""$ac_cv_type_signal" 1>&6
3832 { test "$extra_verbose" = "yes" && cat << EOF
3833     Defining RETSIGTYPE = $ac_cv_type_signal
3834 EOF
3835 cat >> confdefs.h <<EOF
3836 #define RETSIGTYPE $ac_cv_type_signal
3837 EOF
3838 }
3839
3840
3841 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3842 echo "configure:3843: checking for size_t" >&5
3843
3844 cat > conftest.$ac_ext <<EOF
3845 #line 3846 "configure"
3846 #include "confdefs.h"
3847 #include <sys/types.h>
3848 #if STDC_HEADERS
3849 #include <stdlib.h>
3850 #include <stddef.h>
3851 #endif
3852 EOF
3853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3854   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3855   rm -rf conftest*
3856   ac_cv_type_size_t=yes
3857 else
3858   rm -rf conftest*
3859   ac_cv_type_size_t=no
3860 fi
3861 rm -f conftest*
3862
3863 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3864 if test $ac_cv_type_size_t = no; then
3865   { test "$extra_verbose" = "yes" && cat << \EOF
3866     Defining size_t = unsigned
3867 EOF
3868 cat >> confdefs.h <<\EOF
3869 #define size_t unsigned
3870 EOF
3871 }
3872
3873 fi
3874
3875 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3876 echo "configure:3877: checking for pid_t" >&5
3877
3878 cat > conftest.$ac_ext <<EOF
3879 #line 3880 "configure"
3880 #include "confdefs.h"
3881 #include <sys/types.h>
3882 #if STDC_HEADERS
3883 #include <stdlib.h>
3884 #include <stddef.h>
3885 #endif
3886 EOF
3887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3888   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3889   rm -rf conftest*
3890   ac_cv_type_pid_t=yes
3891 else
3892   rm -rf conftest*
3893   ac_cv_type_pid_t=no
3894 fi
3895 rm -f conftest*
3896
3897 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3898 if test $ac_cv_type_pid_t = no; then
3899   { test "$extra_verbose" = "yes" && cat << \EOF
3900     Defining pid_t = int
3901 EOF
3902 cat >> confdefs.h <<\EOF
3903 #define pid_t int
3904 EOF
3905 }
3906
3907 fi
3908
3909 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3910 echo "configure:3911: checking for uid_t in sys/types.h" >&5
3911
3912 cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915 #include <sys/types.h>
3916 EOF
3917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3918   egrep "uid_t" >/dev/null 2>&1; then
3919   rm -rf conftest*
3920   ac_cv_type_uid_t=yes
3921 else
3922   rm -rf conftest*
3923   ac_cv_type_uid_t=no
3924 fi
3925 rm -f conftest*
3926
3927
3928 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3929 if test $ac_cv_type_uid_t = no; then
3930   { test "$extra_verbose" = "yes" && cat << \EOF
3931     Defining uid_t = int
3932 EOF
3933 cat >> confdefs.h <<\EOF
3934 #define uid_t int
3935 EOF
3936 }
3937
3938   { test "$extra_verbose" = "yes" && cat << \EOF
3939     Defining gid_t = int
3940 EOF
3941 cat >> confdefs.h <<\EOF
3942 #define gid_t int
3943 EOF
3944 }
3945
3946 fi
3947
3948 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3949 echo "configure:3950: checking for mode_t" >&5
3950
3951 cat > conftest.$ac_ext <<EOF
3952 #line 3953 "configure"
3953 #include "confdefs.h"
3954 #include <sys/types.h>
3955 #if STDC_HEADERS
3956 #include <stdlib.h>
3957 #include <stddef.h>
3958 #endif
3959 EOF
3960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3961   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3962   rm -rf conftest*
3963   ac_cv_type_mode_t=yes
3964 else
3965   rm -rf conftest*
3966   ac_cv_type_mode_t=no
3967 fi
3968 rm -f conftest*
3969
3970 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3971 if test $ac_cv_type_mode_t = no; then
3972   { test "$extra_verbose" = "yes" && cat << \EOF
3973     Defining mode_t = int
3974 EOF
3975 cat >> confdefs.h <<\EOF
3976 #define mode_t int
3977 EOF
3978 }
3979
3980 fi
3981
3982 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3983 echo "configure:3984: checking for off_t" >&5
3984
3985 cat > conftest.$ac_ext <<EOF
3986 #line 3987 "configure"
3987 #include "confdefs.h"
3988 #include <sys/types.h>
3989 #if STDC_HEADERS
3990 #include <stdlib.h>
3991 #include <stddef.h>
3992 #endif
3993 EOF
3994 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3995   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3996   rm -rf conftest*
3997   ac_cv_type_off_t=yes
3998 else
3999   rm -rf conftest*
4000   ac_cv_type_off_t=no
4001 fi
4002 rm -f conftest*
4003
4004 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4005 if test $ac_cv_type_off_t = no; then
4006   { test "$extra_verbose" = "yes" && cat << \EOF
4007     Defining off_t = long
4008 EOF
4009 cat >> confdefs.h <<\EOF
4010 #define off_t long
4011 EOF
4012 }
4013
4014 fi
4015
4016 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4017 echo "configure:4018: checking for ssize_t" >&5
4018
4019 cat > conftest.$ac_ext <<EOF
4020 #line 4021 "configure"
4021 #include "confdefs.h"
4022 #include <sys/types.h>
4023 #if STDC_HEADERS
4024 #include <stdlib.h>
4025 #include <stddef.h>
4026 #endif
4027 EOF
4028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4029   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4030   rm -rf conftest*
4031   ac_cv_type_ssize_t=yes
4032 else
4033   rm -rf conftest*
4034   ac_cv_type_ssize_t=no
4035 fi
4036 rm -f conftest*
4037
4038 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4039 if test $ac_cv_type_ssize_t = no; then
4040   { test "$extra_verbose" = "yes" && cat << \EOF
4041     Defining ssize_t = int
4042 EOF
4043 cat >> confdefs.h <<\EOF
4044 #define ssize_t int
4045 EOF
4046 }
4047
4048 fi
4049
4050
4051 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4052 echo "configure:4053: checking for socklen_t" >&5
4053 cat > conftest.$ac_ext <<EOF
4054 #line 4055 "configure"
4055 #include "confdefs.h"
4056 #include <sys/socket.h>
4057 socklen_t x;
4058
4059 int main() {
4060
4061 ; return 0; }
4062 EOF
4063 if { (eval echo configure:4064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4064   rm -rf conftest*
4065   echo "$ac_t""yes" 1>&6
4066 else
4067   echo "configure: failed program was:" >&5
4068   cat conftest.$ac_ext >&5
4069   rm -rf conftest*
4070   
4071 cat > conftest.$ac_ext <<EOF
4072 #line 4073 "configure"
4073 #include "confdefs.h"
4074 #include <sys/socket.h>
4075 int accept (int, struct sockaddr *, size_t *);
4076
4077 int main() {
4078
4079 ; return 0; }
4080 EOF
4081 if { (eval echo configure:4082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4082   rm -rf conftest*
4083   
4084 echo "$ac_t""size_t" 1>&6
4085 { test "$extra_verbose" = "yes" && cat << \EOF
4086     Defining socklen_t = size_t
4087 EOF
4088 cat >> confdefs.h <<\EOF
4089 #define socklen_t size_t
4090 EOF
4091 }
4092
4093 else
4094   echo "configure: failed program was:" >&5
4095   cat conftest.$ac_ext >&5
4096   rm -rf conftest*
4097   
4098 echo "$ac_t""int" 1>&6
4099 { test "$extra_verbose" = "yes" && cat << \EOF
4100     Defining socklen_t = int
4101 EOF
4102 cat >> confdefs.h <<\EOF
4103 #define socklen_t int
4104 EOF
4105 }
4106
4107 fi
4108 rm -f conftest*
4109 fi
4110 rm -f conftest*
4111
4112 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4113 echo "configure:4114: checking for struct timeval" >&5
4114 cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 #ifdef TIME_WITH_SYS_TIME
4118 #include <sys/time.h>
4119 #include <time.h>
4120 #else
4121 #ifdef HAVE_SYS_TIME_H
4122 #include <sys/time.h>
4123 #else
4124 #include <time.h>
4125 #endif
4126 #endif
4127 int main() {
4128 static struct timeval x; x.tv_sec = x.tv_usec;
4129 ; return 0; }
4130 EOF
4131 if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4132   rm -rf conftest*
4133   echo "$ac_t""yes" 1>&6
4134   HAVE_TIMEVAL=yes
4135   { test "$extra_verbose" = "yes" && cat << \EOF
4136     Defining HAVE_TIMEVAL
4137 EOF
4138 cat >> confdefs.h <<\EOF
4139 #define HAVE_TIMEVAL 1
4140 EOF
4141 }
4142
4143 else
4144   echo "configure: failed program was:" >&5
4145   cat conftest.$ac_ext >&5
4146   rm -rf conftest*
4147   echo "$ac_t""no" 1>&6
4148    HAVE_TIMEVAL=no
4149 fi
4150 rm -f conftest*
4151
4152 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4153 echo "configure:4154: checking whether struct tm is in sys/time.h or time.h" >&5
4154
4155 cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 #include <sys/types.h>
4159 #include <time.h>
4160 int main() {
4161 struct tm *tp; tp->tm_sec;
4162 ; return 0; }
4163 EOF
4164 if { (eval echo configure:4165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4165   rm -rf conftest*
4166   ac_cv_struct_tm=time.h
4167 else
4168   echo "configure: failed program was:" >&5
4169   cat conftest.$ac_ext >&5
4170   rm -rf conftest*
4171   ac_cv_struct_tm=sys/time.h
4172 fi
4173 rm -f conftest*
4174
4175 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4176 if test $ac_cv_struct_tm = sys/time.h; then
4177   { test "$extra_verbose" = "yes" && cat << \EOF
4178     Defining TM_IN_SYS_TIME
4179 EOF
4180 cat >> confdefs.h <<\EOF
4181 #define TM_IN_SYS_TIME 1
4182 EOF
4183 }
4184
4185 fi
4186
4187 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4188 echo "configure:4189: checking for tm_zone in struct tm" >&5
4189
4190 cat > conftest.$ac_ext <<EOF
4191 #line 4192 "configure"
4192 #include "confdefs.h"
4193 #include <sys/types.h>
4194 #include <$ac_cv_struct_tm>
4195 int main() {
4196 struct tm tm; tm.tm_zone;
4197 ; return 0; }
4198 EOF
4199 if { (eval echo configure:4200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4200   rm -rf conftest*
4201   ac_cv_struct_tm_zone=yes
4202 else
4203   echo "configure: failed program was:" >&5
4204   cat conftest.$ac_ext >&5
4205   rm -rf conftest*
4206   ac_cv_struct_tm_zone=no
4207 fi
4208 rm -f conftest*
4209
4210 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4211 if test "$ac_cv_struct_tm_zone" = yes; then
4212   { test "$extra_verbose" = "yes" && cat << \EOF
4213     Defining HAVE_TM_ZONE
4214 EOF
4215 cat >> confdefs.h <<\EOF
4216 #define HAVE_TM_ZONE 1
4217 EOF
4218 }
4219
4220 else
4221   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4222 echo "configure:4223: checking for tzname" >&5
4223
4224 cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4227 #include <time.h>
4228 #ifndef tzname /* For SGI.  */
4229 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4230 #endif
4231 int main() {
4232 atoi(*tzname);
4233 ; return 0; }
4234 EOF
4235 if { (eval echo configure:4236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4236   rm -rf conftest*
4237   ac_cv_var_tzname=yes
4238 else
4239   echo "configure: failed program was:" >&5
4240   cat conftest.$ac_ext >&5
4241   rm -rf conftest*
4242   ac_cv_var_tzname=no
4243 fi
4244 rm -f conftest*
4245
4246 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4247   if test $ac_cv_var_tzname = yes; then
4248     { test "$extra_verbose" = "yes" && cat << \EOF
4249     Defining HAVE_TZNAME
4250 EOF
4251 cat >> confdefs.h <<\EOF
4252 #define HAVE_TZNAME 1
4253 EOF
4254 }
4255
4256   fi
4257 fi
4258
4259
4260 echo $ac_n "checking for working const""... $ac_c" 1>&6
4261 echo "configure:4262: checking for working const" >&5
4262
4263 cat > conftest.$ac_ext <<EOF
4264 #line 4265 "configure"
4265 #include "confdefs.h"
4266
4267 int main() {
4268
4269 /* Ultrix mips cc rejects this.  */
4270 typedef int charset[2]; const charset x;
4271 /* SunOS 4.1.1 cc rejects this.  */
4272 char const *const *ccp;
4273 char **p;
4274 /* NEC SVR4.0.2 mips cc rejects this.  */
4275 struct point {int x, y;};
4276 static struct point const zero = {0,0};
4277 /* AIX XL C 1.02.0.0 rejects this.
4278    It does not let you subtract one const X* pointer from another in an arm
4279    of an if-expression whose if-part is not a constant expression */
4280 const char *g = "string";
4281 ccp = &g + (g ? g-g : 0);
4282 /* HPUX 7.0 cc rejects these. */
4283 ++ccp;
4284 p = (char**) ccp;
4285 ccp = (char const *const *) p;
4286 { /* SCO 3.2v4 cc rejects this.  */
4287   char *t;
4288   char const *s = 0 ? (char *) 0 : (char const *) 0;
4289
4290   *t++ = 0;
4291 }
4292 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4293   int x[] = {25, 17};
4294   const int *foo = &x[0];
4295   ++foo;
4296 }
4297 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4298   typedef const int *iptr;
4299   iptr p = 0;
4300   ++p;
4301 }
4302 { /* AIX XL C 1.02.0.0 rejects this saying
4303      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4304   struct s { int j; const int *ap[3]; };
4305   struct s *b; b->j = 5;
4306 }
4307 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4308   const int foo = 10;
4309 }
4310
4311 ; return 0; }
4312 EOF
4313 if { (eval echo configure:4314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4314   rm -rf conftest*
4315   ac_cv_c_const=yes
4316 else
4317   echo "configure: failed program was:" >&5
4318   cat conftest.$ac_ext >&5
4319   rm -rf conftest*
4320   ac_cv_c_const=no
4321 fi
4322 rm -f conftest*
4323
4324 echo "$ac_t""$ac_cv_c_const" 1>&6
4325 if test $ac_cv_c_const = no; then
4326   { test "$extra_verbose" = "yes" && cat << \EOF
4327     Defining const = 
4328 EOF
4329 cat >> confdefs.h <<\EOF
4330 #define const 
4331 EOF
4332 }
4333
4334 fi
4335
4336
4337 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4338 echo "configure:4339: checking whether ${MAKE-make} sets \${MAKE}" >&5
4339 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4340
4341 cat > conftestmake <<\EOF
4342 all:
4343         @echo 'ac_maketemp="${MAKE}"'
4344 EOF
4345 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4346 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4347 if test -n "$ac_maketemp"; then
4348   eval ac_cv_prog_make_${ac_make}_set=yes
4349 else
4350   eval ac_cv_prog_make_${ac_make}_set=no
4351 fi
4352 rm -f conftestmake
4353 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4354   echo "$ac_t""yes" 1>&6
4355   SET_MAKE=
4356 else
4357   echo "$ac_t""no" 1>&6
4358   SET_MAKE="MAKE=${MAKE-make}"
4359 fi
4360
4361
4362 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4363 echo "configure:4364: checking whether byte ordering is bigendian" >&5
4364
4365 ac_cv_c_bigendian=unknown
4366 # See if sys/param.h defines the BYTE_ORDER macro.
4367 cat > conftest.$ac_ext <<EOF
4368 #line 4369 "configure"
4369 #include "confdefs.h"
4370 #include <sys/types.h>
4371 #include <sys/param.h>
4372 int main() {
4373
4374 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4375  bogus endian macros
4376 #endif
4377 ; return 0; }
4378 EOF
4379 if { (eval echo configure:4380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4380   rm -rf conftest*
4381   # It does; now see whether it defined to BIG_ENDIAN or not.
4382 cat > conftest.$ac_ext <<EOF
4383 #line 4384 "configure"
4384 #include "confdefs.h"
4385 #include <sys/types.h>
4386 #include <sys/param.h>
4387 int main() {
4388
4389 #if BYTE_ORDER != BIG_ENDIAN
4390  not big endian
4391 #endif
4392 ; return 0; }
4393 EOF
4394 if { (eval echo configure:4395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4395   rm -rf conftest*
4396   ac_cv_c_bigendian=yes
4397 else
4398   echo "configure: failed program was:" >&5
4399   cat conftest.$ac_ext >&5
4400   rm -rf conftest*
4401   ac_cv_c_bigendian=no
4402 fi
4403 rm -f conftest*
4404 else
4405   echo "configure: failed program was:" >&5
4406   cat conftest.$ac_ext >&5
4407 fi
4408 rm -f conftest*
4409 if test $ac_cv_c_bigendian = unknown; then
4410 cat > conftest.$ac_ext <<EOF
4411 #line 4412 "configure"
4412 #include "confdefs.h"
4413 main () {
4414   /* Are we little or big endian?  From Harbison&Steele.  */
4415   union
4416   {
4417     long l;
4418     char c[sizeof (long)];
4419   } u;
4420   u.l = 1;
4421   exit (u.c[sizeof (long) - 1] == 1);
4422 }
4423 EOF
4424 if { (eval echo configure:4425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4425 then
4426   ac_cv_c_bigendian=no
4427 else
4428   conftest_rc="$?"
4429   echo "configure: failed program was:" >&5
4430   cat conftest.$ac_ext >&5
4431   rm -fr conftest*
4432   ac_cv_c_bigendian=yes
4433 fi
4434 rm -fr conftest*
4435 fi
4436
4437 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4438 if test $ac_cv_c_bigendian = yes; then
4439   { test "$extra_verbose" = "yes" && cat << \EOF
4440     Defining WORDS_BIGENDIAN
4441 EOF
4442 cat >> confdefs.h <<\EOF
4443 #define WORDS_BIGENDIAN 1
4444 EOF
4445 }
4446
4447 fi
4448
4449
4450 echo $ac_n "checking size of short""... $ac_c" 1>&6
4451 echo "configure:4452: checking size of short" >&5
4452
4453 cat > conftest.$ac_ext <<EOF
4454 #line 4455 "configure"
4455 #include "confdefs.h"
4456 #include <stdio.h>
4457 #include <sys/types.h>
4458 main()
4459 {
4460   FILE *f=fopen("conftestval", "w");
4461   if (!f) exit(1);
4462   fprintf(f, "%d\n", sizeof(short));
4463   exit(0);
4464 }
4465 EOF
4466 if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4467 then
4468   ac_cv_sizeof_short=`cat conftestval`
4469 else
4470   conftest_rc="$?"
4471   echo "configure: failed program was:" >&5
4472   cat conftest.$ac_ext >&5
4473   rm -fr conftest*
4474   ac_cv_sizeof_short=0
4475 fi
4476 rm -fr conftest*
4477 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4478 { test "$extra_verbose" = "yes" && cat << EOF
4479     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4480 EOF
4481 cat >> confdefs.h <<EOF
4482 #define SIZEOF_SHORT $ac_cv_sizeof_short
4483 EOF
4484 }
4485
4486
4487 if test "$ac_cv_sizeof_short" = 0; then
4488   echo ""
4489   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4490   echo "*** PANIC *** Please examine config.log for compilation errors."
4491   exit 1
4492 fi
4493 echo $ac_n "checking size of int""... $ac_c" 1>&6
4494 echo "configure:4495: checking size of int" >&5
4495
4496 cat > conftest.$ac_ext <<EOF
4497 #line 4498 "configure"
4498 #include "confdefs.h"
4499 #include <stdio.h>
4500 #include <sys/types.h>
4501 main()
4502 {
4503   FILE *f=fopen("conftestval", "w");
4504   if (!f) exit(1);
4505   fprintf(f, "%d\n", sizeof(int));
4506   exit(0);
4507 }
4508 EOF
4509 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4510 then
4511   ac_cv_sizeof_int=`cat conftestval`
4512 else
4513   conftest_rc="$?"
4514   echo "configure: failed program was:" >&5
4515   cat conftest.$ac_ext >&5
4516   rm -fr conftest*
4517   ac_cv_sizeof_int=0
4518 fi
4519 rm -fr conftest*
4520 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4521 { test "$extra_verbose" = "yes" && cat << EOF
4522     Defining SIZEOF_INT = $ac_cv_sizeof_int
4523 EOF
4524 cat >> confdefs.h <<EOF
4525 #define SIZEOF_INT $ac_cv_sizeof_int
4526 EOF
4527 }
4528
4529
4530 echo $ac_n "checking size of long""... $ac_c" 1>&6
4531 echo "configure:4532: checking size of long" >&5
4532
4533 cat > conftest.$ac_ext <<EOF
4534 #line 4535 "configure"
4535 #include "confdefs.h"
4536 #include <stdio.h>
4537 #include <sys/types.h>
4538 main()
4539 {
4540   FILE *f=fopen("conftestval", "w");
4541   if (!f) exit(1);
4542   fprintf(f, "%d\n", sizeof(long));
4543   exit(0);
4544 }
4545 EOF
4546 if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4547 then
4548   ac_cv_sizeof_long=`cat conftestval`
4549 else
4550   conftest_rc="$?"
4551   echo "configure: failed program was:" >&5
4552   cat conftest.$ac_ext >&5
4553   rm -fr conftest*
4554   ac_cv_sizeof_long=0
4555 fi
4556 rm -fr conftest*
4557 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4558 { test "$extra_verbose" = "yes" && cat << EOF
4559     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4560 EOF
4561 cat >> confdefs.h <<EOF
4562 #define SIZEOF_LONG $ac_cv_sizeof_long
4563 EOF
4564 }
4565
4566
4567 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4568 echo "configure:4569: checking size of long long" >&5
4569
4570 cat > conftest.$ac_ext <<EOF
4571 #line 4572 "configure"
4572 #include "confdefs.h"
4573 #include <stdio.h>
4574 #include <sys/types.h>
4575 main()
4576 {
4577   FILE *f=fopen("conftestval", "w");
4578   if (!f) exit(1);
4579   fprintf(f, "%d\n", sizeof(long long));
4580   exit(0);
4581 }
4582 EOF
4583 if { (eval echo configure:4584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4584 then
4585   ac_cv_sizeof_long_long=`cat conftestval`
4586 else
4587   conftest_rc="$?"
4588   echo "configure: failed program was:" >&5
4589   cat conftest.$ac_ext >&5
4590   rm -fr conftest*
4591   ac_cv_sizeof_long_long=0
4592 fi
4593 rm -fr conftest*
4594 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4595 { test "$extra_verbose" = "yes" && cat << EOF
4596     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4597 EOF
4598 cat >> confdefs.h <<EOF
4599 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4600 EOF
4601 }
4602
4603
4604 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4605 echo "configure:4606: checking size of void *" >&5
4606
4607 cat > conftest.$ac_ext <<EOF
4608 #line 4609 "configure"
4609 #include "confdefs.h"
4610 #include <stdio.h>
4611 #include <sys/types.h>
4612 main()
4613 {
4614   FILE *f=fopen("conftestval", "w");
4615   if (!f) exit(1);
4616   fprintf(f, "%d\n", sizeof(void *));
4617   exit(0);
4618 }
4619 EOF
4620 if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4621 then
4622   ac_cv_sizeof_void_p=`cat conftestval`
4623 else
4624   conftest_rc="$?"
4625   echo "configure: failed program was:" >&5
4626   cat conftest.$ac_ext >&5
4627   rm -fr conftest*
4628   ac_cv_sizeof_void_p=0
4629 fi
4630 rm -fr conftest*
4631 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4632 { test "$extra_verbose" = "yes" && cat << EOF
4633     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4634 EOF
4635 cat >> confdefs.h <<EOF
4636 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4637 EOF
4638 }
4639
4640
4641
4642 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4643 echo "configure:4644: checking for long file names" >&5
4644
4645 ac_cv_sys_long_file_names=yes
4646 # Test for long file names in all the places we know might matter:
4647 #      .                the current directory, where building will happen
4648 #      $prefix/lib      where we will be installing things
4649 #      $exec_prefix/lib likewise
4650 # eval it to expand exec_prefix.
4651 #      $TMPDIR          if set, where it might want to write temporary files
4652 # if $TMPDIR is not set:
4653 #      /tmp             where it might want to write temporary files
4654 #      /var/tmp         likewise
4655 #      /usr/tmp         likewise
4656 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4657   ac_tmpdirs="$TMPDIR"
4658 else
4659   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4660 fi
4661 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4662   test -d $ac_dir || continue
4663   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4664   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4665   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4666   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4667   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4668     ac_cv_sys_long_file_names=no
4669     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4670     break
4671   fi
4672   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4673 done
4674
4675 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4676 if test $ac_cv_sys_long_file_names = yes; then
4677   { test "$extra_verbose" = "yes" && cat << \EOF
4678     Defining HAVE_LONG_FILE_NAMES
4679 EOF
4680 cat >> confdefs.h <<\EOF
4681 #define HAVE_LONG_FILE_NAMES 1
4682 EOF
4683 }
4684
4685 fi
4686
4687
4688 echo $ac_n "checking for sin""... $ac_c" 1>&6
4689 echo "configure:4690: checking for sin" >&5
4690
4691 cat > conftest.$ac_ext <<EOF
4692 #line 4693 "configure"
4693 #include "confdefs.h"
4694 /* System header to define __stub macros and hopefully few prototypes,
4695     which can conflict with char sin(); below.  */
4696 #include <assert.h>
4697 /* Override any gcc2 internal prototype to avoid an error.  */
4698 /* We use char because int might match the return type of a gcc2
4699     builtin and then its argument prototype would still apply.  */
4700 char sin();
4701
4702 int main() {
4703
4704 /* The GNU C library defines this for functions which it implements
4705     to always fail with ENOSYS.  Some functions are actually named
4706     something starting with __ and the normal name is an alias.  */
4707 #if defined (__stub_sin) || defined (__stub___sin)
4708 choke me
4709 #else
4710 sin();
4711 #endif
4712
4713 ; return 0; }
4714 EOF
4715 if { (eval echo configure:4716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4716   rm -rf conftest*
4717   eval "ac_cv_func_sin=yes"
4718 else
4719   echo "configure: failed program was:" >&5
4720   cat conftest.$ac_ext >&5
4721   rm -rf conftest*
4722   eval "ac_cv_func_sin=no"
4723 fi
4724 rm -f conftest*
4725
4726 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4727   echo "$ac_t""yes" 1>&6
4728   :
4729 else
4730   echo "$ac_t""no" 1>&6
4731
4732 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4733 echo "configure:4734: checking for sin in -lm" >&5
4734 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4735
4736 xe_check_libs=" -lm "
4737 cat > conftest.$ac_ext <<EOF
4738 #line 4739 "configure"
4739 #include "confdefs.h"
4740 /* Override any gcc2 internal prototype to avoid an error.  */
4741 /* We use char because int might match the return type of a gcc2
4742     builtin and then its argument prototype would still apply.  */
4743 char sin();
4744
4745 int main() {
4746 sin()
4747 ; return 0; }
4748 EOF
4749 if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4750   rm -rf conftest*
4751   eval "ac_cv_lib_$ac_lib_var=yes"
4752 else
4753   echo "configure: failed program was:" >&5
4754   cat conftest.$ac_ext >&5
4755   rm -rf conftest*
4756   eval "ac_cv_lib_$ac_lib_var=no"
4757 fi
4758 rm -f conftest*
4759 xe_check_libs=""
4760
4761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4762   echo "$ac_t""yes" 1>&6
4763     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4764     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4765   { test "$extra_verbose" = "yes" && cat << EOF
4766     Defining $ac_tr_lib
4767 EOF
4768 cat >> confdefs.h <<EOF
4769 #define $ac_tr_lib 1
4770 EOF
4771 }
4772
4773   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4774
4775 else
4776   echo "$ac_t""no" 1>&6
4777 fi
4778
4779
4780 fi
4781
4782
4783 { test "$extra_verbose" = "yes" && cat << \EOF
4784     Defining LISP_FLOAT_TYPE
4785 EOF
4786 cat >> confdefs.h <<\EOF
4787 #define LISP_FLOAT_TYPE 1
4788 EOF
4789 }
4790
4791
4792 cat > conftest.$ac_ext <<EOF
4793 #line 4794 "configure"
4794 #include "confdefs.h"
4795 #include <math.h>
4796 int main() {
4797 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4798 ; return 0; }
4799 EOF
4800 if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4801   rm -rf conftest*
4802   { test "$extra_verbose" = "yes" && cat << \EOF
4803     Defining HAVE_INVERSE_HYPERBOLIC
4804 EOF
4805 cat >> confdefs.h <<\EOF
4806 #define HAVE_INVERSE_HYPERBOLIC 1
4807 EOF
4808 }
4809
4810 else
4811   echo "configure: failed program was:" >&5
4812   cat conftest.$ac_ext >&5
4813 fi
4814 rm -f conftest*
4815
4816 echo "checking type of mail spool file locking" 1>&6
4817 echo "configure:4818: checking type of mail spool file locking" >&5
4818 for ac_func in lockf flock
4819 do
4820 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4821 echo "configure:4822: checking for $ac_func" >&5
4822
4823 cat > conftest.$ac_ext <<EOF
4824 #line 4825 "configure"
4825 #include "confdefs.h"
4826 /* System header to define __stub macros and hopefully few prototypes,
4827     which can conflict with char $ac_func(); below.  */
4828 #include <assert.h>
4829 /* Override any gcc2 internal prototype to avoid an error.  */
4830 /* We use char because int might match the return type of a gcc2
4831     builtin and then its argument prototype would still apply.  */
4832 char $ac_func();
4833
4834 int main() {
4835
4836 /* The GNU C library defines this for functions which it implements
4837     to always fail with ENOSYS.  Some functions are actually named
4838     something starting with __ and the normal name is an alias.  */
4839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4840 choke me
4841 #else
4842 $ac_func();
4843 #endif
4844
4845 ; return 0; }
4846 EOF
4847 if { (eval echo configure:4848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4848   rm -rf conftest*
4849   eval "ac_cv_func_$ac_func=yes"
4850 else
4851   echo "configure: failed program was:" >&5
4852   cat conftest.$ac_ext >&5
4853   rm -rf conftest*
4854   eval "ac_cv_func_$ac_func=no"
4855 fi
4856 rm -f conftest*
4857
4858 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4859   echo "$ac_t""yes" 1>&6
4860     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4861   { test "$extra_verbose" = "yes" && cat << EOF
4862     Defining $ac_tr_func
4863 EOF
4864 cat >> confdefs.h <<EOF
4865 #define $ac_tr_func 1
4866 EOF
4867 }
4868  
4869 else
4870   echo "$ac_t""no" 1>&6
4871 fi
4872 done
4873
4874 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4875 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4876 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4877 if   test -z "$mail_locking"; then
4878   case "$opsys" in cygwin* | mingw*)
4879     mail_locking=pop ;;
4880   esac
4881 fi
4882
4883 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4884     Defining MAIL_LOCK_LOCKF
4885 EOF
4886 cat >> confdefs.h <<\EOF
4887 #define MAIL_LOCK_LOCKF 1
4888 EOF
4889 }
4890
4891 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4892     Defining MAIL_LOCK_FLOCK
4893 EOF
4894 cat >> confdefs.h <<\EOF
4895 #define MAIL_LOCK_FLOCK 1
4896 EOF
4897 }
4898
4899 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4900     Defining MAIL_LOCK_LOCKING
4901 EOF
4902 cat >> confdefs.h <<\EOF
4903 #define MAIL_LOCK_LOCKING 1
4904 EOF
4905 }
4906
4907 elif test "$mail_locking" = "pop"; then
4908   with_pop=yes
4909   mail_locking=
4910 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4911     Defining MAIL_LOCK_DOT
4912 EOF
4913 cat >> confdefs.h <<\EOF
4914 #define MAIL_LOCK_DOT 1
4915 EOF
4916 }
4917
4918 fi
4919 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4920   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4921 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4922   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4923 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4924   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4925
4926 case "$opsys" in decosf*)
4927   
4928 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4929 echo "configure:4930: checking for cma_open in -lpthreads" >&5
4930 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4931
4932 xe_check_libs=" -lpthreads "
4933 cat > conftest.$ac_ext <<EOF
4934 #line 4935 "configure"
4935 #include "confdefs.h"
4936 /* Override any gcc2 internal prototype to avoid an error.  */
4937 /* We use char because int might match the return type of a gcc2
4938     builtin and then its argument prototype would still apply.  */
4939 char cma_open();
4940
4941 int main() {
4942 cma_open()
4943 ; return 0; }
4944 EOF
4945 if { (eval echo configure:4946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4946   rm -rf conftest*
4947   eval "ac_cv_lib_$ac_lib_var=yes"
4948 else
4949   echo "configure: failed program was:" >&5
4950   cat conftest.$ac_ext >&5
4951   rm -rf conftest*
4952   eval "ac_cv_lib_$ac_lib_var=no"
4953 fi
4954 rm -f conftest*
4955 xe_check_libs=""
4956
4957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4958   echo "$ac_t""yes" 1>&6
4959     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4960     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4961   { test "$extra_verbose" = "yes" && cat << EOF
4962     Defining $ac_tr_lib
4963 EOF
4964 cat >> confdefs.h <<EOF
4965 #define $ac_tr_lib 1
4966 EOF
4967 }
4968
4969   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4970
4971 else
4972   echo "$ac_t""no" 1>&6
4973 fi
4974
4975
4976   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4977     c_switch_site="$c_switch_site -threads" ;;
4978 esac
4979
4980 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4981 echo "configure:4982: checking whether the -xildoff compiler flag is required" >&5
4982 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4983   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4984     then echo "$ac_t""no" 1>&6;
4985     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
4986   fi
4987   else echo "$ac_t""no" 1>&6
4988 fi
4989
4990 if test "$opsys" = "sol2"; then
4991   if test "$os_release" -ge 56; then
4992     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4993 echo "configure:4994: checking for \"-z ignore\" linker flag" >&5
4994     case "`ld -h 2>&1`" in
4995       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4996         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4997       *) echo "$ac_t""no" 1>&6 ;;
4998     esac
4999   fi
5000 fi
5001
5002
5003 echo "checking "for specified window system"" 1>&6
5004 echo "configure:5005: checking "for specified window system"" >&5
5005
5006
5007 GNOME_CONFIG=no
5008 GTK_CONFIG=no
5009
5010 if test "$with_gnome" != "no"; then
5011    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5012 echo "configure:5013: checking for GNOME configuration script" >&5
5013    for possible in gnome-config
5014    do
5015       possible_version=`${possible} --version 2> /dev/null`
5016       if test "x${possible_version}" != "x"; then
5017               GNOME_CONFIG="${possible}"
5018               with_gnome=yes
5019               with_gtk=yes
5020               break
5021       fi
5022    done
5023    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5024 fi
5025
5026 if test "${GNOME_CONFIG}" != "no"; then
5027       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5028       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5029       { test "$extra_verbose" = "yes" && cat << \EOF
5030     Defining HAVE_GNOME
5031 EOF
5032 cat >> confdefs.h <<\EOF
5033 #define HAVE_GNOME 1
5034 EOF
5035 }
5036
5037       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5038       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5039 fi
5040
5041 if test "$with_gtk" != "no";then
5042    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5043 echo "configure:5044: checking for GTK configuration script" >&5
5044    for possible in gtk12-config gtk14-config gtk-config
5045    do
5046       possible_version=`${possible} --version 2> /dev/null`
5047       if test "x${possible_version}" != "x"; then
5048               GTK_CONFIG="${possible}"
5049       fi
5050       case "${possible_version}" in
5051         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5052         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5053         1.2.*)
5054                 with_gtk=yes
5055                 break
5056                 ;;
5057         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5058       esac
5059    done
5060    echo "$ac_t""${GTK_CONFIG}" 1>&6
5061 fi
5062
5063 if test "${GTK_CONFIG}" != "no"; then
5064       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5065 echo "configure:5066: checking gtk version" >&5
5066       GTK_VERSION=`${GTK_CONFIG} --version`
5067       echo "$ac_t""${GTK_VERSION}" 1>&6
5068
5069       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5070 echo "configure:5071: checking gtk libs" >&5
5071       GTK_LIBS=`${GTK_CONFIG} --libs`
5072       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5073       echo "$ac_t""${GTK_LIBS}" 1>&6
5074
5075       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5076 echo "configure:5077: checking gtk cflags" >&5
5077       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5078       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5079       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5080
5081       
5082 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5083 echo "configure:5084: checking for main in -lgdk_imlib" >&5
5084 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5085
5086 xe_check_libs=" -lgdk_imlib "
5087 cat > conftest.$ac_ext <<EOF
5088 #line 5089 "configure"
5089 #include "confdefs.h"
5090
5091 int main() {
5092 main()
5093 ; return 0; }
5094 EOF
5095 if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5096   rm -rf conftest*
5097   eval "ac_cv_lib_$ac_lib_var=yes"
5098 else
5099   echo "configure: failed program was:" >&5
5100   cat conftest.$ac_ext >&5
5101   rm -rf conftest*
5102   eval "ac_cv_lib_$ac_lib_var=no"
5103 fi
5104 rm -f conftest*
5105 xe_check_libs=""
5106
5107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5108   echo "$ac_t""yes" 1>&6
5109   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5110 else
5111   echo "$ac_t""no" 1>&6
5112 fi
5113
5114
5115       
5116 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5117 echo "configure:5118: checking for Imlib_init in -lImlib" >&5
5118 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5119
5120 xe_check_libs=" -lImlib "
5121 cat > conftest.$ac_ext <<EOF
5122 #line 5123 "configure"
5123 #include "confdefs.h"
5124 /* Override any gcc2 internal prototype to avoid an error.  */
5125 /* We use char because int might match the return type of a gcc2
5126     builtin and then its argument prototype would still apply.  */
5127 char Imlib_init();
5128
5129 int main() {
5130 Imlib_init()
5131 ; return 0; }
5132 EOF
5133 if { (eval echo configure:5134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5134   rm -rf conftest*
5135   eval "ac_cv_lib_$ac_lib_var=yes"
5136 else
5137   echo "configure: failed program was:" >&5
5138   cat conftest.$ac_ext >&5
5139   rm -rf conftest*
5140   eval "ac_cv_lib_$ac_lib_var=no"
5141 fi
5142 rm -f conftest*
5143 xe_check_libs=""
5144
5145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5146   echo "$ac_t""yes" 1>&6
5147   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5148 else
5149   echo "$ac_t""no" 1>&6
5150 fi
5151
5152
5153       for ac_func in gdk_imlib_init
5154 do
5155 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5156 echo "configure:5157: checking for $ac_func" >&5
5157
5158 cat > conftest.$ac_ext <<EOF
5159 #line 5160 "configure"
5160 #include "confdefs.h"
5161 /* System header to define __stub macros and hopefully few prototypes,
5162     which can conflict with char $ac_func(); below.  */
5163 #include <assert.h>
5164 /* Override any gcc2 internal prototype to avoid an error.  */
5165 /* We use char because int might match the return type of a gcc2
5166     builtin and then its argument prototype would still apply.  */
5167 char $ac_func();
5168
5169 int main() {
5170
5171 /* The GNU C library defines this for functions which it implements
5172     to always fail with ENOSYS.  Some functions are actually named
5173     something starting with __ and the normal name is an alias.  */
5174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5175 choke me
5176 #else
5177 $ac_func();
5178 #endif
5179
5180 ; return 0; }
5181 EOF
5182 if { (eval echo configure:5183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5183   rm -rf conftest*
5184   eval "ac_cv_func_$ac_func=yes"
5185 else
5186   echo "configure: failed program was:" >&5
5187   cat conftest.$ac_ext >&5
5188   rm -rf conftest*
5189   eval "ac_cv_func_$ac_func=no"
5190 fi
5191 rm -f conftest*
5192
5193 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5194   echo "$ac_t""yes" 1>&6
5195     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5196   { test "$extra_verbose" = "yes" && cat << EOF
5197     Defining $ac_tr_func
5198 EOF
5199 cat >> confdefs.h <<EOF
5200 #define $ac_tr_func 1
5201 EOF
5202 }
5203  
5204 else
5205   echo "$ac_t""no" 1>&6
5206 fi
5207 done
5208
5209
5210       { test "$extra_verbose" = "yes" && cat << \EOF
5211     Defining HAVE_XPM
5212 EOF
5213 cat >> confdefs.h <<\EOF
5214 #define HAVE_XPM 1
5215 EOF
5216 }
5217
5218       { test "$extra_verbose" = "yes" && cat << \EOF
5219     Defining HAVE_GTK
5220 EOF
5221 cat >> confdefs.h <<\EOF
5222 #define HAVE_GTK 1
5223 EOF
5224 }
5225
5226       
5227
5228       window_system=gtk
5229       with_gtk=yes
5230       with_x11=no
5231
5232       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5233       test "${with_toolbars}" != no && with_toolbars=gtk
5234       test "${with_menubars}" != "no" && with_menubars=gtk
5235       test "${with_dialogs}" != "no" && with_dialogs=gtk
5236       test "${with_widgets}" != "no" && with_widgets=gtk
5237
5238       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5239    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5240  fi
5241       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5242    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5243  fi
5244       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5245    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5246  fi
5247       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5248    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5249  fi
5250
5251             OLD_CFLAGS="${CFLAGS}"
5252       OLD_CPPFLAGS="${CPPFLAGS}"
5253       OLD_LDFLAGS="${LDFLAGS}"
5254       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5255       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5256       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5257       for ac_hdr in glade/glade.h glade.h
5258 do
5259 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5260 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5261 echo "configure:5262: checking for $ac_hdr" >&5
5262
5263 cat > conftest.$ac_ext <<EOF
5264 #line 5265 "configure"
5265 #include "confdefs.h"
5266 #include <$ac_hdr>
5267 EOF
5268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5269 { (eval echo configure:5270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5271 if test -z "$ac_err"; then
5272   rm -rf conftest*
5273   eval "ac_cv_header_$ac_safe=yes"
5274 else
5275   echo "$ac_err" >&5
5276   echo "configure: failed program was:" >&5
5277   cat conftest.$ac_ext >&5
5278   rm -rf conftest*
5279   eval "ac_cv_header_$ac_safe=no"
5280 fi
5281 rm -f conftest*
5282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5283   echo "$ac_t""yes" 1>&6
5284     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5285   { test "$extra_verbose" = "yes" && cat << EOF
5286     Defining $ac_tr_hdr
5287 EOF
5288 cat >> confdefs.h <<EOF
5289 #define $ac_tr_hdr 1
5290 EOF
5291 }
5292  
5293 else
5294   echo "$ac_t""no" 1>&6
5295 fi
5296 done
5297
5298       
5299 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5300 echo "configure:5301: checking for main in -lxml" >&5
5301 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5302
5303 xe_check_libs=" -lxml "
5304 cat > conftest.$ac_ext <<EOF
5305 #line 5306 "configure"
5306 #include "confdefs.h"
5307
5308 int main() {
5309 main()
5310 ; return 0; }
5311 EOF
5312 if { (eval echo configure:5313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5313   rm -rf conftest*
5314   eval "ac_cv_lib_$ac_lib_var=yes"
5315 else
5316   echo "configure: failed program was:" >&5
5317   cat conftest.$ac_ext >&5
5318   rm -rf conftest*
5319   eval "ac_cv_lib_$ac_lib_var=no"
5320 fi
5321 rm -f conftest*
5322 xe_check_libs=""
5323
5324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5325   echo "$ac_t""yes" 1>&6
5326   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5327 else
5328   echo "$ac_t""no" 1>&6
5329 fi
5330
5331
5332       
5333 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5334 echo "configure:5335: checking for main in -lglade" >&5
5335 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5336
5337 xe_check_libs=" -lglade "
5338 cat > conftest.$ac_ext <<EOF
5339 #line 5340 "configure"
5340 #include "confdefs.h"
5341
5342 int main() {
5343 main()
5344 ; return 0; }
5345 EOF
5346 if { (eval echo configure:5347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5347   rm -rf conftest*
5348   eval "ac_cv_lib_$ac_lib_var=yes"
5349 else
5350   echo "configure: failed program was:" >&5
5351   cat conftest.$ac_ext >&5
5352   rm -rf conftest*
5353   eval "ac_cv_lib_$ac_lib_var=no"
5354 fi
5355 rm -f conftest*
5356 xe_check_libs=""
5357
5358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5359   echo "$ac_t""yes" 1>&6
5360   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5361 else
5362   echo "$ac_t""no" 1>&6
5363 fi
5364
5365
5366       
5367 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5368 echo "configure:5369: checking for main in -lglade-gnome" >&5
5369 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5370
5371 xe_check_libs=" -lglade-gnome "
5372 cat > conftest.$ac_ext <<EOF
5373 #line 5374 "configure"
5374 #include "confdefs.h"
5375
5376 int main() {
5377 main()
5378 ; return 0; }
5379 EOF
5380 if { (eval echo configure:5381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5381   rm -rf conftest*
5382   eval "ac_cv_lib_$ac_lib_var=yes"
5383 else
5384   echo "configure: failed program was:" >&5
5385   cat conftest.$ac_ext >&5
5386   rm -rf conftest*
5387   eval "ac_cv_lib_$ac_lib_var=no"
5388 fi
5389 rm -f conftest*
5390 xe_check_libs=""
5391
5392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5393   echo "$ac_t""yes" 1>&6
5394   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5395 else
5396   echo "$ac_t""no" 1>&6
5397 fi
5398
5399
5400       cat > conftest.$ac_ext <<EOF
5401 #line 5402 "configure"
5402 #include "confdefs.h"
5403 #include <glade/glade-xml.h>
5404 EOF
5405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5406   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5407   rm -rf conftest*
5408   echo "$ac_t""yes" 1>&6
5409                        { test "$extra_verbose" = "yes" && cat << \EOF
5410     Defining LIBGLADE_XML_TXTDOMAIN = 1
5411 EOF
5412 cat >> confdefs.h <<\EOF
5413 #define LIBGLADE_XML_TXTDOMAIN 1
5414 EOF
5415 }
5416
5417 else
5418   rm -rf conftest*
5419   echo "$ac_t""no" 1>&6
5420 fi
5421 rm -f conftest*
5422
5423       CFLAGS="${OLD_CFLAGS}"
5424       CPPFLAGS="${OLD_CPPFLAGS}"
5425       LDFLAGS="${OLD_LDFLAGS}"
5426 fi
5427
5428
5429 if test "$with_x11" != "no"; then
5430     test "$x_includes $x_libraries" != "NONE NONE" && \
5431    window_system=x11 with_x11=yes
5432
5433         
5434       if test "$x_includes $x_libraries" = "NONE NONE" \
5435     -a -n "$OPENWINHOME" \
5436     -a "$OPENWINHOME" != "/usr/openwin" \
5437     -a -d "$OPENWINHOME"; then
5438       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5439       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5440       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5441   fi
5442
5443   if test "$x_includes" = "NONE"; then
5444                     for dir in "/usr/X11" "/usr/X11R6"; do
5445       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5446     done
5447   fi
5448
5449   if test "$x_libraries" = "NONE"; then
5450     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5451       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5452     done
5453   fi
5454
5455   # If we find X, set shell vars x_includes and x_libraries to the
5456 # paths, otherwise set no_x=yes.
5457 # Uses ac_ vars as temps to allow command line to override cache and checks.
5458 # --without-x overrides everything else, but does not touch the cache.
5459 echo $ac_n "checking for X""... $ac_c" 1>&6
5460 echo "configure:5461: checking for X" >&5
5461
5462 # Check whether --with-x or --without-x was given.
5463 if test "${with_x+set}" = set; then
5464   withval="$with_x"
5465   :
5466 fi
5467
5468 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5469 if test "x$with_x" = xno; then
5470   # The user explicitly disabled X.
5471   have_x=disabled
5472 else
5473   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5474     # Both variables are already set.
5475     have_x=yes
5476   else
5477
5478 # One or both of the vars are not set, and there is no cached value.
5479 ac_x_includes=NO ac_x_libraries=NO
5480 rm -fr conftestdir
5481 if mkdir conftestdir; then
5482   cd conftestdir
5483   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5484   cat > Imakefile <<'EOF'
5485 acfindx:
5486         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5487 EOF
5488   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5489     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5490     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5491     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5492     for ac_extension in a so sl; do
5493       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5494         test -f $ac_im_libdir/libX11.$ac_extension; then
5495         ac_im_usrlibdir=$ac_im_libdir; break
5496       fi
5497     done
5498     # Screen out bogus values from the imake configuration.  They are
5499     # bogus both because they are the default anyway, and because
5500     # using them would break gcc on systems where it needs fixed includes.
5501     case "$ac_im_incroot" in
5502         /usr/include) ;;
5503         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5504     esac
5505     case "$ac_im_usrlibdir" in
5506         /usr/lib | /lib) ;;
5507         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5508     esac
5509   fi
5510   cd ..
5511   rm -fr conftestdir
5512 fi
5513
5514 if test "$ac_x_includes" = NO; then
5515   # Guess where to find include files, by looking for this one X11 .h file.
5516   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5517
5518   # First, try using that file with no special directory specified.
5519 cat > conftest.$ac_ext <<EOF
5520 #line 5521 "configure"
5521 #include "confdefs.h"
5522 #include <$x_direct_test_include>
5523 EOF
5524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5525 { (eval echo configure:5526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5527 if test -z "$ac_err"; then
5528   rm -rf conftest*
5529   # We can compile using X headers with no special include directory.
5530 ac_x_includes=
5531 else
5532   echo "$ac_err" >&5
5533   echo "configure: failed program was:" >&5
5534   cat conftest.$ac_ext >&5
5535   rm -rf conftest*
5536   # Look for the header file in a standard set of common directories.
5537 # Check X11 before X11Rn because it is often a symlink to the current release.
5538   for ac_dir in               \
5539     /usr/X11/include          \
5540     /usr/X11R6/include        \
5541     /usr/X11R5/include        \
5542     /usr/X11R4/include        \
5543                               \
5544     /usr/include/X11          \
5545     /usr/include/X11R6        \
5546     /usr/include/X11R5        \
5547     /usr/include/X11R4        \
5548                               \
5549     /usr/local/X11/include    \
5550     /usr/local/X11R6/include  \
5551     /usr/local/X11R5/include  \
5552     /usr/local/X11R4/include  \
5553                               \
5554     /usr/local/include/X11    \
5555     /usr/local/include/X11R6  \
5556     /usr/local/include/X11R5  \
5557     /usr/local/include/X11R4  \
5558                               \
5559     /usr/X386/include         \
5560     /usr/x386/include         \
5561     /usr/XFree86/include/X11  \
5562                               \
5563     /usr/include              \
5564     /usr/local/include        \
5565     /usr/unsupported/include  \
5566     /usr/athena/include       \
5567     /usr/local/x11r5/include  \
5568     /usr/lpp/Xamples/include  \
5569                               \
5570     /usr/openwin/include      \
5571     /usr/openwin/share/include \
5572     ; \
5573   do
5574     if test -r "$ac_dir/$x_direct_test_include"; then
5575       ac_x_includes=$ac_dir
5576       break
5577     fi
5578   done
5579 fi
5580 rm -f conftest*
5581 fi # $ac_x_includes = NO
5582
5583 if test "$ac_x_libraries" = NO; then
5584   # Check for the libraries.
5585
5586   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5587   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5588
5589   # See if we find them without any special options.
5590   # Don't add to $LIBS permanently.
5591   ac_save_LIBS="$LIBS"
5592   LIBS="-l$x_direct_test_library $LIBS"
5593 cat > conftest.$ac_ext <<EOF
5594 #line 5595 "configure"
5595 #include "confdefs.h"
5596
5597 int main() {
5598 ${x_direct_test_function}()
5599 ; return 0; }
5600 EOF
5601 if { (eval echo configure:5602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5602   rm -rf conftest*
5603   LIBS="$ac_save_LIBS"
5604 # We can link X programs with no special library path.
5605 ac_x_libraries=
5606 else
5607   echo "configure: failed program was:" >&5
5608   cat conftest.$ac_ext >&5
5609   rm -rf conftest*
5610   LIBS="$ac_save_LIBS"
5611 # First see if replacing the include by lib works.
5612 # Check X11 before X11Rn because it is often a symlink to the current release.
5613 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5614     /usr/X11/lib          \
5615     /usr/X11R6/lib        \
5616     /usr/X11R5/lib        \
5617     /usr/X11R4/lib        \
5618                           \
5619     /usr/lib/X11          \
5620     /usr/lib/X11R6        \
5621     /usr/lib/X11R5        \
5622     /usr/lib/X11R4        \
5623                           \
5624     /usr/local/X11/lib    \
5625     /usr/local/X11R6/lib  \
5626     /usr/local/X11R5/lib  \
5627     /usr/local/X11R4/lib  \
5628                           \
5629     /usr/local/lib/X11    \
5630     /usr/local/lib/X11R6  \
5631     /usr/local/lib/X11R5  \
5632     /usr/local/lib/X11R4  \
5633                           \
5634     /usr/X386/lib         \
5635     /usr/x386/lib         \
5636     /usr/XFree86/lib/X11  \
5637                           \
5638     /usr/lib              \
5639     /usr/local/lib        \
5640     /usr/unsupported/lib  \
5641     /usr/athena/lib       \
5642     /usr/local/x11r5/lib  \
5643     /usr/lpp/Xamples/lib  \
5644     /lib/usr/lib/X11      \
5645                           \
5646     /usr/openwin/lib      \
5647     /usr/openwin/share/lib \
5648     ; \
5649 do
5650   for ac_extension in a so sl; do
5651     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5652       ac_x_libraries=$ac_dir
5653       break 2
5654     fi
5655   done
5656 done
5657 fi
5658 rm -f conftest*
5659 fi # $ac_x_libraries = NO
5660
5661 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5662   # Didn't find X anywhere.  Cache the known absence of X.
5663   ac_cv_have_x="have_x=no"
5664 else
5665   # Record where we found X for the cache.
5666   ac_cv_have_x="have_x=yes \
5667                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5668 fi
5669   fi
5670   eval "$ac_cv_have_x"
5671 fi # $with_x != no
5672
5673 if test "$have_x" != yes; then
5674   echo "$ac_t""$have_x" 1>&6
5675   no_x=yes
5676 else
5677   # If each of the values was on the command line, it overrides each guess.
5678   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5679   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5680   # Update the cache value to reflect the command line values.
5681   ac_cv_have_x="have_x=yes \
5682                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5683   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5684 fi
5685
5686 if test "$no_x" = yes; then
5687   # Not all programs may use this symbol, but it does not hurt to define it.
5688   { test "$extra_verbose" = "yes" && cat << \EOF
5689     Defining X_DISPLAY_MISSING
5690 EOF
5691 cat >> confdefs.h <<\EOF
5692 #define X_DISPLAY_MISSING 1
5693 EOF
5694 }
5695
5696   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5697 else
5698   if test -n "$x_includes"; then
5699     X_CFLAGS="$X_CFLAGS -I$x_includes"
5700   fi
5701
5702   # It would also be nice to do this for all -L options, not just this one.
5703   if test -n "$x_libraries"; then
5704     X_LIBS="$X_LIBS -L$x_libraries"
5705     # For Solaris; some versions of Sun CC require a space after -R and
5706     # others require no space.  Words are not sufficient . . . .
5707     case "`(uname -sr) 2>/dev/null`" in
5708     "SunOS 5"*)
5709       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5710 echo "configure:5711: checking whether -R must be followed by a space" >&5
5711       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5712       cat > conftest.$ac_ext <<EOF
5713 #line 5714 "configure"
5714 #include "confdefs.h"
5715
5716 int main() {
5717
5718 ; return 0; }
5719 EOF
5720 if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5721   rm -rf conftest*
5722   ac_R_nospace=yes
5723 else
5724   echo "configure: failed program was:" >&5
5725   cat conftest.$ac_ext >&5
5726   rm -rf conftest*
5727   ac_R_nospace=no
5728 fi
5729 rm -f conftest*
5730       if test $ac_R_nospace = yes; then
5731         echo "$ac_t""no" 1>&6
5732         X_LIBS="$X_LIBS -R$x_libraries"
5733       else
5734         LIBS="$ac_xsave_LIBS -R $x_libraries"
5735         cat > conftest.$ac_ext <<EOF
5736 #line 5737 "configure"
5737 #include "confdefs.h"
5738
5739 int main() {
5740
5741 ; return 0; }
5742 EOF
5743 if { (eval echo configure:5744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5744   rm -rf conftest*
5745   ac_R_space=yes
5746 else
5747   echo "configure: failed program was:" >&5
5748   cat conftest.$ac_ext >&5
5749   rm -rf conftest*
5750   ac_R_space=no
5751 fi
5752 rm -f conftest*
5753         if test $ac_R_space = yes; then
5754           echo "$ac_t""yes" 1>&6
5755           X_LIBS="$X_LIBS -R $x_libraries"
5756         else
5757           echo "$ac_t""neither works" 1>&6
5758         fi
5759       fi
5760       LIBS="$ac_xsave_LIBS"
5761     esac
5762   fi
5763
5764   # Check for system-dependent libraries X programs must link with.
5765   # Do this before checking for the system-independent R6 libraries
5766   # (-lICE), since we may need -lsocket or whatever for X linking.
5767
5768   if test "$ISC" = yes; then
5769     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5770   else
5771     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5772     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5773     # the Alpha needs dnet_stub (dnet does not exist).
5774     if test "$with_dnet" = "no" ; then
5775 ac_cv_lib_dnet_dnet_ntoa=no
5776 else
5777
5778 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5779 echo "configure:5780: checking for dnet_ntoa in -ldnet" >&5
5780 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5781
5782 xe_check_libs=" -ldnet "
5783 cat > conftest.$ac_ext <<EOF
5784 #line 5785 "configure"
5785 #include "confdefs.h"
5786 /* Override any gcc2 internal prototype to avoid an error.  */
5787 /* We use char because int might match the return type of a gcc2
5788     builtin and then its argument prototype would still apply.  */
5789 char dnet_ntoa();
5790
5791 int main() {
5792 dnet_ntoa()
5793 ; return 0; }
5794 EOF
5795 if { (eval echo configure:5796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5796   rm -rf conftest*
5797   eval "ac_cv_lib_$ac_lib_var=yes"
5798 else
5799   echo "configure: failed program was:" >&5
5800   cat conftest.$ac_ext >&5
5801   rm -rf conftest*
5802   eval "ac_cv_lib_$ac_lib_var=no"
5803 fi
5804 rm -f conftest*
5805 xe_check_libs=""
5806
5807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5808   echo "$ac_t""yes" 1>&6
5809   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5810 else
5811   echo "$ac_t""no" 1>&6
5812 fi
5813
5814 fi
5815
5816     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5817       
5818 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5819 echo "configure:5820: checking for dnet_ntoa in -ldnet_stub" >&5
5820 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5821
5822 xe_check_libs=" -ldnet_stub "
5823 cat > conftest.$ac_ext <<EOF
5824 #line 5825 "configure"
5825 #include "confdefs.h"
5826 /* Override any gcc2 internal prototype to avoid an error.  */
5827 /* We use char because int might match the return type of a gcc2
5828     builtin and then its argument prototype would still apply.  */
5829 char dnet_ntoa();
5830
5831 int main() {
5832 dnet_ntoa()
5833 ; return 0; }
5834 EOF
5835 if { (eval echo configure:5836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5836   rm -rf conftest*
5837   eval "ac_cv_lib_$ac_lib_var=yes"
5838 else
5839   echo "configure: failed program was:" >&5
5840   cat conftest.$ac_ext >&5
5841   rm -rf conftest*
5842   eval "ac_cv_lib_$ac_lib_var=no"
5843 fi
5844 rm -f conftest*
5845 xe_check_libs=""
5846
5847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5848   echo "$ac_t""yes" 1>&6
5849   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5850 else
5851   echo "$ac_t""no" 1>&6
5852 fi
5853
5854
5855     fi
5856
5857     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5858     # to get the SysV transport functions.
5859     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5860     # needs -lnsl.
5861     # The nsl library prevents programs from opening the X display
5862     # on Irix 5.2, according to dickey@clark.net.
5863     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5864 echo "configure:5865: checking for gethostbyname" >&5
5865
5866 cat > conftest.$ac_ext <<EOF
5867 #line 5868 "configure"
5868 #include "confdefs.h"
5869 /* System header to define __stub macros and hopefully few prototypes,
5870     which can conflict with char gethostbyname(); below.  */
5871 #include <assert.h>
5872 /* Override any gcc2 internal prototype to avoid an error.  */
5873 /* We use char because int might match the return type of a gcc2
5874     builtin and then its argument prototype would still apply.  */
5875 char gethostbyname();
5876
5877 int main() {
5878
5879 /* The GNU C library defines this for functions which it implements
5880     to always fail with ENOSYS.  Some functions are actually named
5881     something starting with __ and the normal name is an alias.  */
5882 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5883 choke me
5884 #else
5885 gethostbyname();
5886 #endif
5887
5888 ; return 0; }
5889 EOF
5890 if { (eval echo configure:5891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5891   rm -rf conftest*
5892   eval "ac_cv_func_gethostbyname=yes"
5893 else
5894   echo "configure: failed program was:" >&5
5895   cat conftest.$ac_ext >&5
5896   rm -rf conftest*
5897   eval "ac_cv_func_gethostbyname=no"
5898 fi
5899 rm -f conftest*
5900
5901 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5902   echo "$ac_t""yes" 1>&6
5903   :
5904 else
5905   echo "$ac_t""no" 1>&6
5906 fi
5907
5908     if test $ac_cv_func_gethostbyname = no; then
5909       
5910 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5911 echo "configure:5912: checking for gethostbyname in -lnsl" >&5
5912 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5913
5914 xe_check_libs=" -lnsl "
5915 cat > conftest.$ac_ext <<EOF
5916 #line 5917 "configure"
5917 #include "confdefs.h"
5918 /* Override any gcc2 internal prototype to avoid an error.  */
5919 /* We use char because int might match the return type of a gcc2
5920     builtin and then its argument prototype would still apply.  */
5921 char gethostbyname();
5922
5923 int main() {
5924 gethostbyname()
5925 ; return 0; }
5926 EOF
5927 if { (eval echo configure:5928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5928   rm -rf conftest*
5929   eval "ac_cv_lib_$ac_lib_var=yes"
5930 else
5931   echo "configure: failed program was:" >&5
5932   cat conftest.$ac_ext >&5
5933   rm -rf conftest*
5934   eval "ac_cv_lib_$ac_lib_var=no"
5935 fi
5936 rm -f conftest*
5937 xe_check_libs=""
5938
5939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5940   echo "$ac_t""yes" 1>&6
5941   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5942 else
5943   echo "$ac_t""no" 1>&6
5944 fi
5945
5946
5947     fi
5948
5949     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5950     # socket/setsockopt and other routines are undefined under SCO ODT
5951     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5952     # on later versions), says simon@lia.di.epfl.ch: it contains
5953     # gethostby* variants that don't use the nameserver (or something).
5954     # -lsocket must be given before -lnsl if both are needed.
5955     # We assume that if connect needs -lnsl, so does gethostbyname.
5956     echo $ac_n "checking for connect""... $ac_c" 1>&6
5957 echo "configure:5958: checking for connect" >&5
5958
5959 cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5962 /* System header to define __stub macros and hopefully few prototypes,
5963     which can conflict with char connect(); below.  */
5964 #include <assert.h>
5965 /* Override any gcc2 internal prototype to avoid an error.  */
5966 /* We use char because int might match the return type of a gcc2
5967     builtin and then its argument prototype would still apply.  */
5968 char connect();
5969
5970 int main() {
5971
5972 /* The GNU C library defines this for functions which it implements
5973     to always fail with ENOSYS.  Some functions are actually named
5974     something starting with __ and the normal name is an alias.  */
5975 #if defined (__stub_connect) || defined (__stub___connect)
5976 choke me
5977 #else
5978 connect();
5979 #endif
5980
5981 ; return 0; }
5982 EOF
5983 if { (eval echo configure:5984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5984   rm -rf conftest*
5985   eval "ac_cv_func_connect=yes"
5986 else
5987   echo "configure: failed program was:" >&5
5988   cat conftest.$ac_ext >&5
5989   rm -rf conftest*
5990   eval "ac_cv_func_connect=no"
5991 fi
5992 rm -f conftest*
5993
5994 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5995   echo "$ac_t""yes" 1>&6
5996   :
5997 else
5998   echo "$ac_t""no" 1>&6
5999 fi
6000
6001     if test $ac_cv_func_connect = no; then
6002       
6003 xe_msg_checking="for connect in -lsocket"
6004 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6005 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6006 echo "configure:6007: checking "$xe_msg_checking"" >&5
6007 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6008
6009 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6010 cat > conftest.$ac_ext <<EOF
6011 #line 6012 "configure"
6012 #include "confdefs.h"
6013 /* Override any gcc2 internal prototype to avoid an error.  */
6014 /* We use char because int might match the return type of a gcc2
6015     builtin and then its argument prototype would still apply.  */
6016 char connect();
6017
6018 int main() {
6019 connect()
6020 ; return 0; }
6021 EOF
6022 if { (eval echo configure:6023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6023   rm -rf conftest*
6024   eval "ac_cv_lib_$ac_lib_var=yes"
6025 else
6026   echo "configure: failed program was:" >&5
6027   cat conftest.$ac_ext >&5
6028   rm -rf conftest*
6029   eval "ac_cv_lib_$ac_lib_var=no"
6030 fi
6031 rm -f conftest*
6032 xe_check_libs=""
6033
6034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6035   echo "$ac_t""yes" 1>&6
6036   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6037 else
6038   echo "$ac_t""no" 1>&6
6039 fi
6040
6041
6042     fi
6043
6044     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6045     echo $ac_n "checking for remove""... $ac_c" 1>&6
6046 echo "configure:6047: checking for remove" >&5
6047
6048 cat > conftest.$ac_ext <<EOF
6049 #line 6050 "configure"
6050 #include "confdefs.h"
6051 /* System header to define __stub macros and hopefully few prototypes,
6052     which can conflict with char remove(); below.  */
6053 #include <assert.h>
6054 /* Override any gcc2 internal prototype to avoid an error.  */
6055 /* We use char because int might match the return type of a gcc2
6056     builtin and then its argument prototype would still apply.  */
6057 char remove();
6058
6059 int main() {
6060
6061 /* The GNU C library defines this for functions which it implements
6062     to always fail with ENOSYS.  Some functions are actually named
6063     something starting with __ and the normal name is an alias.  */
6064 #if defined (__stub_remove) || defined (__stub___remove)
6065 choke me
6066 #else
6067 remove();
6068 #endif
6069
6070 ; return 0; }
6071 EOF
6072 if { (eval echo configure:6073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6073   rm -rf conftest*
6074   eval "ac_cv_func_remove=yes"
6075 else
6076   echo "configure: failed program was:" >&5
6077   cat conftest.$ac_ext >&5
6078   rm -rf conftest*
6079   eval "ac_cv_func_remove=no"
6080 fi
6081 rm -f conftest*
6082
6083 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6084   echo "$ac_t""yes" 1>&6
6085   :
6086 else
6087   echo "$ac_t""no" 1>&6
6088 fi
6089
6090     if test $ac_cv_func_remove = no; then
6091       
6092 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6093 echo "configure:6094: checking for remove in -lposix" >&5
6094 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6095
6096 xe_check_libs=" -lposix "
6097 cat > conftest.$ac_ext <<EOF
6098 #line 6099 "configure"
6099 #include "confdefs.h"
6100 /* Override any gcc2 internal prototype to avoid an error.  */
6101 /* We use char because int might match the return type of a gcc2
6102     builtin and then its argument prototype would still apply.  */
6103 char remove();
6104
6105 int main() {
6106 remove()
6107 ; return 0; }
6108 EOF
6109 if { (eval echo configure:6110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6110   rm -rf conftest*
6111   eval "ac_cv_lib_$ac_lib_var=yes"
6112 else
6113   echo "configure: failed program was:" >&5
6114   cat conftest.$ac_ext >&5
6115   rm -rf conftest*
6116   eval "ac_cv_lib_$ac_lib_var=no"
6117 fi
6118 rm -f conftest*
6119 xe_check_libs=""
6120
6121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6122   echo "$ac_t""yes" 1>&6
6123   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6124 else
6125   echo "$ac_t""no" 1>&6
6126 fi
6127
6128
6129     fi
6130
6131     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6132     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6133 echo "configure:6134: checking for shmat" >&5
6134
6135 cat > conftest.$ac_ext <<EOF
6136 #line 6137 "configure"
6137 #include "confdefs.h"
6138 /* System header to define __stub macros and hopefully few prototypes,
6139     which can conflict with char shmat(); below.  */
6140 #include <assert.h>
6141 /* Override any gcc2 internal prototype to avoid an error.  */
6142 /* We use char because int might match the return type of a gcc2
6143     builtin and then its argument prototype would still apply.  */
6144 char shmat();
6145
6146 int main() {
6147
6148 /* The GNU C library defines this for functions which it implements
6149     to always fail with ENOSYS.  Some functions are actually named
6150     something starting with __ and the normal name is an alias.  */
6151 #if defined (__stub_shmat) || defined (__stub___shmat)
6152 choke me
6153 #else
6154 shmat();
6155 #endif
6156
6157 ; return 0; }
6158 EOF
6159 if { (eval echo configure:6160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6160   rm -rf conftest*
6161   eval "ac_cv_func_shmat=yes"
6162 else
6163   echo "configure: failed program was:" >&5
6164   cat conftest.$ac_ext >&5
6165   rm -rf conftest*
6166   eval "ac_cv_func_shmat=no"
6167 fi
6168 rm -f conftest*
6169
6170 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6171   echo "$ac_t""yes" 1>&6
6172   :
6173 else
6174   echo "$ac_t""no" 1>&6
6175 fi
6176
6177     if test $ac_cv_func_shmat = no; then
6178       
6179 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6180 echo "configure:6181: checking for shmat in -lipc" >&5
6181 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6182
6183 xe_check_libs=" -lipc "
6184 cat > conftest.$ac_ext <<EOF
6185 #line 6186 "configure"
6186 #include "confdefs.h"
6187 /* Override any gcc2 internal prototype to avoid an error.  */
6188 /* We use char because int might match the return type of a gcc2
6189     builtin and then its argument prototype would still apply.  */
6190 char shmat();
6191
6192 int main() {
6193 shmat()
6194 ; return 0; }
6195 EOF
6196 if { (eval echo configure:6197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6197   rm -rf conftest*
6198   eval "ac_cv_lib_$ac_lib_var=yes"
6199 else
6200   echo "configure: failed program was:" >&5
6201   cat conftest.$ac_ext >&5
6202   rm -rf conftest*
6203   eval "ac_cv_lib_$ac_lib_var=no"
6204 fi
6205 rm -f conftest*
6206 xe_check_libs=""
6207
6208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6209   echo "$ac_t""yes" 1>&6
6210   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6211 else
6212   echo "$ac_t""no" 1>&6
6213 fi
6214
6215
6216     fi
6217   fi
6218
6219   # Check for libraries that X11R6 Xt/Xaw programs need.
6220   ac_save_LDFLAGS="$LDFLAGS"
6221   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6222   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6223   # check for ICE first), but we must link in the order -lSM -lICE or
6224   # we get undefined symbols.  So assume we have SM if we have ICE.
6225   # These have to be linked with before -lX11, unlike the other
6226   # libraries we check for below, so use a different variable.
6227   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6228   
6229 xe_msg_checking="for IceConnectionNumber in -lICE"
6230 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6231 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6232 echo "configure:6233: checking "$xe_msg_checking"" >&5
6233 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6234
6235 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6236 cat > conftest.$ac_ext <<EOF
6237 #line 6238 "configure"
6238 #include "confdefs.h"
6239 /* Override any gcc2 internal prototype to avoid an error.  */
6240 /* We use char because int might match the return type of a gcc2
6241     builtin and then its argument prototype would still apply.  */
6242 char IceConnectionNumber();
6243
6244 int main() {
6245 IceConnectionNumber()
6246 ; return 0; }
6247 EOF
6248 if { (eval echo configure:6249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6249   rm -rf conftest*
6250   eval "ac_cv_lib_$ac_lib_var=yes"
6251 else
6252   echo "configure: failed program was:" >&5
6253   cat conftest.$ac_ext >&5
6254   rm -rf conftest*
6255   eval "ac_cv_lib_$ac_lib_var=no"
6256 fi
6257 rm -f conftest*
6258 xe_check_libs=""
6259
6260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6261   echo "$ac_t""yes" 1>&6
6262   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6263 else
6264   echo "$ac_t""no" 1>&6
6265 fi
6266
6267
6268   LDFLAGS="$ac_save_LDFLAGS"
6269
6270 fi
6271  # Autoconf claims to find X library and include dirs for us.
6272   if test "$no_x" = "yes"
6273   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6274   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6275   fi
6276 fi
6277
6278
6279 if test "$with_x11" = "yes"; then
6280   { test "$extra_verbose" = "yes" && cat << \EOF
6281     Defining HAVE_X_WINDOWS
6282 EOF
6283 cat >> confdefs.h <<\EOF
6284 #define HAVE_X_WINDOWS 1
6285 EOF
6286 }
6287
6288   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6289   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6290
6291       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6292     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6293     if test -d "$lib_dir" -a -d "$inc_dir"; then
6294       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6295         x_libraries="$lib_dir $x_libraries"
6296         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6297       esac
6298       case "$x_includes" in "$inc_dir"* ) ;; *)
6299         x_includes="$inc_dir $x_includes"
6300         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6301       esac
6302       break;       fi
6303   done
6304
6305     for rel in "X11R6" "X11R5" "X11R4"; do
6306     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6307     if test -d "$lib_dir" -a -d "$inc_dir"; then
6308       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6309         x_libraries="$x_libraries $lib_dir"
6310         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6311       esac
6312       case "$x_includes" in "$inc_dir"* ) ;; *)
6313         x_includes="$x_includes $inc_dir"
6314         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6315       esac
6316       break;     fi
6317   done
6318
6319     case "$opsys" in
6320   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 ;;
6321   esac
6322
6323   ld_switch_x_site="$X_LIBS"
6324
6325   
6326 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6327     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6328   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6329   
6330         runpath="" runpath_dirs=""
6331   if test -n "$LD_RUN_PATH"; then
6332     runpath="$LD_RUN_PATH"
6333   elif test "$GCC" = "yes"; then
6334         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6335     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6336     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6337     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6338       case "$arg" in P,* | -L* | -R* )
6339         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6340           {
6341 xe_runpath_dir="$dir"
6342   test "$xe_runpath_dir" != "/lib"     -a \
6343         "$xe_runpath_dir" != "/usr/lib" -a \
6344         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6345   eval "$xe_add_unique_runpath_dir"
6346 }
6347         done ;;
6348       esac
6349     done
6350     ld_switch_run="$ld_switch_run_save"
6351     rm -f conftest*
6352   else
6353         for arg in $ld_switch_site $ld_switch_x_site; do
6354       case "$arg" in -L*) {
6355 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6356   test "$xe_runpath_dir" != "/lib"     -a \
6357         "$xe_runpath_dir" != "/usr/lib" -a \
6358         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6359   eval "$xe_add_unique_runpath_dir"
6360 };; esac
6361     done
6362         if test "$opsys $need_motif" = "sol2 yes"; then
6363       xe_runpath_dir="/opt/SUNWdt/lib";
6364       eval "$xe_add_unique_runpath_dir";
6365     fi
6366   fi 
6367   if test -n "$runpath"; then
6368     ld_switch_run="${dash_r}${runpath}"
6369     
6370 if test "$GCC" = "yes"; then
6371   set x $ld_switch_run; shift; ld_switch_run=""
6372   while test -n "$1"; do
6373     case $1 in
6374       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6375       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6376       -Xlinker* ) ;;
6377       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6378     esac
6379     shift
6380   done
6381 fi
6382     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6383   fi
6384 fi
6385
6386
6387   if test "$extra_verbose" = "yes"; then
6388     echo; echo "X11 compilation variables:"
6389     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6390     echo
6391   fi
6392
6393             bitmapdirs=
6394   if test "$x_includes" != NONE; then
6395     for i in $x_includes; do
6396       if test -d "$i/bitmaps"; then
6397         bitmapdirs="$i/bitmaps:$bitmapdirs"
6398       fi
6399       if test -d "$i/X11/bitmaps"; then
6400         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6401       fi
6402     done
6403     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6404   fi
6405   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6406     Defining BITMAPDIR = "$bitmapdirs"
6407 EOF
6408 cat >> confdefs.h <<EOF
6409 #define BITMAPDIR "$bitmapdirs"
6410 EOF
6411 }
6412
6413
6414     echo "checking for X defines extracted by xmkmf" 1>&6
6415 echo "configure:6416: checking for X defines extracted by xmkmf" >&5
6416   rm -fr conftestdir
6417   if mkdir conftestdir; then
6418     cd conftestdir
6419     cat > Imakefile <<'EOF'
6420 xetest:
6421         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6422 EOF
6423     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6424       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6425       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6426     fi
6427     cd ..
6428     rm -fr conftestdir
6429     for word in $xmkmf_defines; do
6430       case "$word" in 
6431       -D__STDC__*) ;;
6432       -D* )
6433         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6434         case "$word" in
6435           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6436           *     ) val=1 ;;
6437         esac
6438         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6439           if test "$val" = "1"
6440             then { test "$extra_verbose" = "yes" && cat << EOF
6441     Defining $sym
6442 EOF
6443 cat >> confdefs.h <<EOF
6444 #define $sym 1
6445 EOF
6446 }
6447
6448             else { test "$extra_verbose" = "yes" && cat << EOF
6449     Defining $sym = $val
6450 EOF
6451 cat >> confdefs.h <<EOF
6452 #define $sym $val
6453 EOF
6454 }
6455
6456           fi
6457         fi  ;;
6458       esac
6459     done
6460   fi
6461
6462     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6463 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6464 echo "configure:6465: checking for X11/Intrinsic.h" >&5
6465
6466 cat > conftest.$ac_ext <<EOF
6467 #line 6468 "configure"
6468 #include "confdefs.h"
6469 #include <X11/Intrinsic.h>
6470 EOF
6471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6472 { (eval echo configure:6473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6474 if test -z "$ac_err"; then
6475   rm -rf conftest*
6476   eval "ac_cv_header_$ac_safe=yes"
6477 else
6478   echo "$ac_err" >&5
6479   echo "configure: failed program was:" >&5
6480   cat conftest.$ac_ext >&5
6481   rm -rf conftest*
6482   eval "ac_cv_header_$ac_safe=no"
6483 fi
6484 rm -f conftest*
6485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6486   echo "$ac_t""yes" 1>&6
6487   :
6488 else
6489   echo "$ac_t""no" 1>&6
6490 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6491 fi
6492
6493
6494       
6495 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6496 echo "configure:6497: checking for XOpenDisplay in -lX11" >&5
6497 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6498
6499 xe_check_libs=" -lX11 "
6500 cat > conftest.$ac_ext <<EOF
6501 #line 6502 "configure"
6502 #include "confdefs.h"
6503 /* Override any gcc2 internal prototype to avoid an error.  */
6504 /* We use char because int might match the return type of a gcc2
6505     builtin and then its argument prototype would still apply.  */
6506 char XOpenDisplay();
6507
6508 int main() {
6509 XOpenDisplay()
6510 ; return 0; }
6511 EOF
6512 if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6513   rm -rf conftest*
6514   eval "ac_cv_lib_$ac_lib_var=yes"
6515 else
6516   echo "configure: failed program was:" >&5
6517   cat conftest.$ac_ext >&5
6518   rm -rf conftest*
6519   eval "ac_cv_lib_$ac_lib_var=no"
6520 fi
6521 rm -f conftest*
6522 xe_check_libs=""
6523
6524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6525   echo "$ac_t""yes" 1>&6
6526   have_lib_x11=yes
6527 else
6528   echo "$ac_t""no" 1>&6
6529 fi
6530
6531
6532   if test "$have_lib_x11" != "yes"; then
6533     
6534 xe_msg_checking="for XGetFontProperty in -lX11"
6535 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6536 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6537 echo "configure:6538: checking "$xe_msg_checking"" >&5
6538 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6539
6540 xe_check_libs=" -lX11 -b i486-linuxaout"
6541 cat > conftest.$ac_ext <<EOF
6542 #line 6543 "configure"
6543 #include "confdefs.h"
6544 /* Override any gcc2 internal prototype to avoid an error.  */
6545 /* We use char because int might match the return type of a gcc2
6546     builtin and then its argument prototype would still apply.  */
6547 char XGetFontProperty();
6548
6549 int main() {
6550 XGetFontProperty()
6551 ; return 0; }
6552 EOF
6553 if { (eval echo configure:6554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6554   rm -rf conftest*
6555   eval "ac_cv_lib_$ac_lib_var=yes"
6556 else
6557   echo "configure: failed program was:" >&5
6558   cat conftest.$ac_ext >&5
6559   rm -rf conftest*
6560   eval "ac_cv_lib_$ac_lib_var=no"
6561 fi
6562 rm -f conftest*
6563 xe_check_libs=""
6564
6565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6566   echo "$ac_t""yes" 1>&6
6567   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6568 else
6569   echo "$ac_t""no" 1>&6
6570 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6571 fi
6572
6573
6574   fi
6575   libs_x="-lX11"
6576   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6577
6578     
6579 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6580 echo "configure:6581: checking for XShapeSelectInput in -lXext" >&5
6581 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6582
6583 xe_check_libs=" -lXext "
6584 cat > conftest.$ac_ext <<EOF
6585 #line 6586 "configure"
6586 #include "confdefs.h"
6587 /* Override any gcc2 internal prototype to avoid an error.  */
6588 /* We use char because int might match the return type of a gcc2
6589     builtin and then its argument prototype would still apply.  */
6590 char XShapeSelectInput();
6591
6592 int main() {
6593 XShapeSelectInput()
6594 ; return 0; }
6595 EOF
6596 if { (eval echo configure:6597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6597   rm -rf conftest*
6598   eval "ac_cv_lib_$ac_lib_var=yes"
6599 else
6600   echo "configure: failed program was:" >&5
6601   cat conftest.$ac_ext >&5
6602   rm -rf conftest*
6603   eval "ac_cv_lib_$ac_lib_var=no"
6604 fi
6605 rm -f conftest*
6606 xe_check_libs=""
6607
6608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6609   echo "$ac_t""yes" 1>&6
6610   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6611 else
6612   echo "$ac_t""no" 1>&6
6613 fi
6614
6615
6616
6617     
6618 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6619 echo "configure:6620: checking for XtOpenDisplay in -lXt" >&5
6620 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6621
6622 xe_check_libs=" -lXt "
6623 cat > conftest.$ac_ext <<EOF
6624 #line 6625 "configure"
6625 #include "confdefs.h"
6626 /* Override any gcc2 internal prototype to avoid an error.  */
6627 /* We use char because int might match the return type of a gcc2
6628     builtin and then its argument prototype would still apply.  */
6629 char XtOpenDisplay();
6630
6631 int main() {
6632 XtOpenDisplay()
6633 ; return 0; }
6634 EOF
6635 if { (eval echo configure:6636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6636   rm -rf conftest*
6637   eval "ac_cv_lib_$ac_lib_var=yes"
6638 else
6639   echo "configure: failed program was:" >&5
6640   cat conftest.$ac_ext >&5
6641   rm -rf conftest*
6642   eval "ac_cv_lib_$ac_lib_var=no"
6643 fi
6644 rm -f conftest*
6645 xe_check_libs=""
6646
6647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6648   echo "$ac_t""yes" 1>&6
6649   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6650 else
6651   echo "$ac_t""no" 1>&6
6652 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6653 fi
6654
6655
6656
6657   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6658 echo "configure:6659: checking the version of X11 being used" >&5
6659   cat > conftest.$ac_ext <<EOF
6660 #line 6661 "configure"
6661 #include "confdefs.h"
6662 #include <X11/Intrinsic.h>
6663     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6664 EOF
6665 if { (eval echo configure:6666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6666 then
6667   ./conftest foobar; x11_release=$?
6668 else
6669   conftest_rc="$?"
6670   echo "configure: failed program was:" >&5
6671   cat conftest.$ac_ext >&5
6672   rm -fr conftest*
6673   x11_release=4
6674 fi
6675 rm -fr conftest*
6676   echo "$ac_t""R${x11_release}" 1>&6
6677   { test "$extra_verbose" = "yes" && cat << EOF
6678     Defining THIS_IS_X11R${x11_release}
6679 EOF
6680 cat >> confdefs.h <<EOF
6681 #define THIS_IS_X11R${x11_release} 1
6682 EOF
6683 }
6684
6685
6686   if test "${x11_release}" = "4"; then
6687     case "$with_widgets" in
6688       "" | "no") with_widgets=no ;;
6689       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6690     esac
6691   fi
6692
6693   for ac_func in XConvertCase
6694 do
6695 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6696 echo "configure:6697: checking for $ac_func" >&5
6697
6698 cat > conftest.$ac_ext <<EOF
6699 #line 6700 "configure"
6700 #include "confdefs.h"
6701 /* System header to define __stub macros and hopefully few prototypes,
6702     which can conflict with char $ac_func(); below.  */
6703 #include <assert.h>
6704 /* Override any gcc2 internal prototype to avoid an error.  */
6705 /* We use char because int might match the return type of a gcc2
6706     builtin and then its argument prototype would still apply.  */
6707 char $ac_func();
6708
6709 int main() {
6710
6711 /* The GNU C library defines this for functions which it implements
6712     to always fail with ENOSYS.  Some functions are actually named
6713     something starting with __ and the normal name is an alias.  */
6714 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6715 choke me
6716 #else
6717 $ac_func();
6718 #endif
6719
6720 ; return 0; }
6721 EOF
6722 if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6723   rm -rf conftest*
6724   eval "ac_cv_func_$ac_func=yes"
6725 else
6726   echo "configure: failed program was:" >&5
6727   cat conftest.$ac_ext >&5
6728   rm -rf conftest*
6729   eval "ac_cv_func_$ac_func=no"
6730 fi
6731 rm -f conftest*
6732
6733 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6734   echo "$ac_t""yes" 1>&6
6735     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6736   { test "$extra_verbose" = "yes" && cat << EOF
6737     Defining $ac_tr_func
6738 EOF
6739 cat >> confdefs.h <<EOF
6740 #define $ac_tr_func 1
6741 EOF
6742 }
6743  
6744 else
6745   echo "$ac_t""no" 1>&6
6746 fi
6747 done
6748
6749
6750   for ac_hdr in X11/Xlocale.h
6751 do
6752 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6753 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6754 echo "configure:6755: checking for $ac_hdr" >&5
6755
6756 cat > conftest.$ac_ext <<EOF
6757 #line 6758 "configure"
6758 #include "confdefs.h"
6759 #include <$ac_hdr>
6760 EOF
6761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6762 { (eval echo configure:6763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6764 if test -z "$ac_err"; then
6765   rm -rf conftest*
6766   eval "ac_cv_header_$ac_safe=yes"
6767 else
6768   echo "$ac_err" >&5
6769   echo "configure: failed program was:" >&5
6770   cat conftest.$ac_ext >&5
6771   rm -rf conftest*
6772   eval "ac_cv_header_$ac_safe=no"
6773 fi
6774 rm -f conftest*
6775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6776   echo "$ac_t""yes" 1>&6
6777     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6778   { test "$extra_verbose" = "yes" && cat << EOF
6779     Defining $ac_tr_hdr
6780 EOF
6781 cat >> confdefs.h <<EOF
6782 #define $ac_tr_hdr 1
6783 EOF
6784 }
6785  
6786 else
6787   echo "$ac_t""no" 1>&6
6788 fi
6789 done
6790
6791
6792     for ac_func in XRegisterIMInstantiateCallback
6793 do
6794 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6795 echo "configure:6796: checking for $ac_func" >&5
6796
6797 cat > conftest.$ac_ext <<EOF
6798 #line 6799 "configure"
6799 #include "confdefs.h"
6800 /* System header to define __stub macros and hopefully few prototypes,
6801     which can conflict with char $ac_func(); below.  */
6802 #include <assert.h>
6803 /* Override any gcc2 internal prototype to avoid an error.  */
6804 /* We use char because int might match the return type of a gcc2
6805     builtin and then its argument prototype would still apply.  */
6806 char $ac_func();
6807
6808 int main() {
6809
6810 /* The GNU C library defines this for functions which it implements
6811     to always fail with ENOSYS.  Some functions are actually named
6812     something starting with __ and the normal name is an alias.  */
6813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6814 choke me
6815 #else
6816 $ac_func();
6817 #endif
6818
6819 ; return 0; }
6820 EOF
6821 if { (eval echo configure:6822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6822   rm -rf conftest*
6823   eval "ac_cv_func_$ac_func=yes"
6824 else
6825   echo "configure: failed program was:" >&5
6826   cat conftest.$ac_ext >&5
6827   rm -rf conftest*
6828   eval "ac_cv_func_$ac_func=no"
6829 fi
6830 rm -f conftest*
6831
6832 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6833   echo "$ac_t""yes" 1>&6
6834     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6835   { test "$extra_verbose" = "yes" && cat << EOF
6836     Defining $ac_tr_func
6837 EOF
6838 cat >> confdefs.h <<EOF
6839 #define $ac_tr_func 1
6840 EOF
6841 }
6842  
6843 else
6844   echo "$ac_t""no" 1>&6
6845 fi
6846 done
6847
6848   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6849 echo "configure:6850: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6850   cat > conftest.$ac_ext <<EOF
6851 #line 6852 "configure"
6852 #include "confdefs.h"
6853
6854 #define NeedFunctionPrototypes 1
6855 #include <X11/Xlib.h>
6856 extern Bool XRegisterIMInstantiateCallback(
6857    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6858
6859 int main() {
6860
6861 ; return 0; }
6862 EOF
6863 if { (eval echo configure:6864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6864   rm -rf conftest*
6865   echo "$ac_t""yes" 1>&6
6866 else
6867   echo "configure: failed program was:" >&5
6868   cat conftest.$ac_ext >&5
6869   rm -rf conftest*
6870   echo "$ac_t""no" 1>&6
6871    { test "$extra_verbose" = "yes" && cat << \EOF
6872     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6873 EOF
6874 cat >> confdefs.h <<\EOF
6875 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6876 EOF
6877 }
6878
6879 fi
6880 rm -f conftest*
6881
6882     test -z "$with_xmu" && { 
6883 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6884 echo "configure:6885: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6885 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6886
6887 xe_check_libs=" -lXmu "
6888 cat > conftest.$ac_ext <<EOF
6889 #line 6890 "configure"
6890 #include "confdefs.h"
6891 /* Override any gcc2 internal prototype to avoid an error.  */
6892 /* We use char because int might match the return type of a gcc2
6893     builtin and then its argument prototype would still apply.  */
6894 char XmuReadBitmapDataFromFile();
6895
6896 int main() {
6897 XmuReadBitmapDataFromFile()
6898 ; return 0; }
6899 EOF
6900 if { (eval echo configure:6901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6901   rm -rf conftest*
6902   eval "ac_cv_lib_$ac_lib_var=yes"
6903 else
6904   echo "configure: failed program was:" >&5
6905   cat conftest.$ac_ext >&5
6906   rm -rf conftest*
6907   eval "ac_cv_lib_$ac_lib_var=no"
6908 fi
6909 rm -f conftest*
6910 xe_check_libs=""
6911
6912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6913   echo "$ac_t""yes" 1>&6
6914   with_xmu=yes
6915 else
6916   echo "$ac_t""no" 1>&6
6917 with_xmu=no
6918 fi
6919
6920  }
6921   if test "$with_xmu" = "no"; then
6922     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6923    echo "    xemacs will be linked with \"xmu.o\""
6924  fi
6925   else
6926     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6927     { test "$extra_verbose" = "yes" && cat << \EOF
6928     Defining HAVE_XMU
6929 EOF
6930 cat >> confdefs.h <<\EOF
6931 #define HAVE_XMU 1
6932 EOF
6933 }
6934
6935   fi
6936
6937       
6938 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6939 echo "configure:6940: checking for main in -lXbsd" >&5
6940 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6941
6942 xe_check_libs=" -lXbsd "
6943 cat > conftest.$ac_ext <<EOF
6944 #line 6945 "configure"
6945 #include "confdefs.h"
6946
6947 int main() {
6948 main()
6949 ; return 0; }
6950 EOF
6951 if { (eval echo configure:6952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6952   rm -rf conftest*
6953   eval "ac_cv_lib_$ac_lib_var=yes"
6954 else
6955   echo "configure: failed program was:" >&5
6956   cat conftest.$ac_ext >&5
6957   rm -rf conftest*
6958   eval "ac_cv_lib_$ac_lib_var=no"
6959 fi
6960 rm -f conftest*
6961 xe_check_libs=""
6962
6963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6964   echo "$ac_t""yes" 1>&6
6965   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6966 else
6967   echo "$ac_t""no" 1>&6
6968 fi
6969
6970
6971
6972     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6973         if test "$GCC" = "yes"; then
6974       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6975       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6976     else
6977       case "$CC" in
6978         "xlc" ) CC="xlc_r" ;;
6979         "xlC" ) CC="xlC_r" ;;
6980         "cc"  ) CC="cc_r" ;;
6981       esac
6982     fi
6983   fi
6984
6985 fi 
6986 if test "$with_msw" != "no"; then
6987   echo "checking for MS-Windows" 1>&6
6988 echo "configure:6989: checking for MS-Windows" >&5
6989   
6990 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6991 echo "configure:6992: checking for main in -lgdi32" >&5
6992 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6993
6994 xe_check_libs=" -lgdi32 "
6995 cat > conftest.$ac_ext <<EOF
6996 #line 6997 "configure"
6997 #include "confdefs.h"
6998
6999 int main() {
7000 main()
7001 ; return 0; }
7002 EOF
7003 if { (eval echo configure:7004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7004   rm -rf conftest*
7005   eval "ac_cv_lib_$ac_lib_var=yes"
7006 else
7007   echo "configure: failed program was:" >&5
7008   cat conftest.$ac_ext >&5
7009   rm -rf conftest*
7010   eval "ac_cv_lib_$ac_lib_var=no"
7011 fi
7012 rm -f conftest*
7013 xe_check_libs=""
7014
7015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7016   echo "$ac_t""yes" 1>&6
7017   with_msw=yes
7018 else
7019   echo "$ac_t""no" 1>&6
7020 fi
7021
7022
7023   if test "$with_msw" = "yes"; then
7024     { test "$extra_verbose" = "yes" && cat << \EOF
7025     Defining HAVE_MS_WINDOWS
7026 EOF
7027 cat >> confdefs.h <<\EOF
7028 #define HAVE_MS_WINDOWS 1
7029 EOF
7030 }
7031
7032
7033         if test "$with_netinstall" = "yes"; then
7034       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7035       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7036       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7037     fi
7038
7039     install_pp="$blddir/lib-src/installexe.sh"
7040     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
7041     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7042     if test "$window_system" != x11; then
7043         window_system=msw
7044         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7045             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7046    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7047  fi
7048         test "$with_menubars"   != "no" && with_menubars=msw \
7049             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7050    echo "    xemacs will be linked with \"menubar-msw.o\""
7051  fi
7052         test "$with_toolbars"   != "no" && with_toolbars=msw \
7053             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7054    echo "    xemacs will be linked with \"toolbar-msw.o\""
7055  fi
7056         test "$with_dialogs"   != "no" && with_dialogs=msw \
7057             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7058    echo "    xemacs will be linked with \"dialog-msw.o\""
7059  fi
7060         test "$with_widgets"   != "no" && with_widgets=msw
7061     else
7062         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7063    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7064  fi
7065         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7066    echo "    xemacs will be linked with \"menubar-msw.o\""
7067  fi
7068         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7069    echo "    xemacs will be linked with \"toolbar-msw.o\""
7070  fi
7071         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7072    echo "    xemacs will be linked with \"dialog-msw.o\""
7073  fi
7074     fi
7075         cat > conftest.$ac_ext <<EOF
7076 #line 7077 "configure"
7077 #include "confdefs.h"
7078 #include <fcntl.h>
7079     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7080 EOF
7081 if { (eval echo configure:7082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7082 then
7083   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7084     Defining HAVE_MSG_SELECT
7085 EOF
7086 cat >> confdefs.h <<\EOF
7087 #define HAVE_MSG_SELECT 1
7088 EOF
7089 }
7090
7091 else
7092   conftest_rc="$?"
7093   echo "configure: failed program was:" >&5
7094   cat conftest.$ac_ext >&5
7095 fi
7096 rm -fr conftest*
7097     with_file_coding=yes
7098     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
7099    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\""
7100  fi
7101   fi
7102 fi
7103
7104
7105
7106 test -z "$window_system" && window_system="none"
7107
7108 if test "$window_system" = "none"; then
7109   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7110   do
7111     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7112        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7113     fi
7114     eval "with_${feature}=no"
7115   done
7116 else
7117   test -z "$with_toolbars" && with_toolbars=yes
7118 fi
7119
7120 if test "$with_msw" != "yes"; then
7121   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7122   do
7123     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7124        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7125     fi
7126     eval "with_${feature}=no"
7127   done
7128 else
7129   :
7130 fi
7131
7132 if test "$with_x11" != "yes"; then
7133             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7134   do
7135     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7136        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7137     fi
7138     eval "with_${feature}=no"
7139   done
7140 fi
7141
7142 if test "$with_x11" = "yes"; then
7143   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7144 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7145 echo "configure:7146: checking for X11/extensions/shape.h" >&5
7146
7147 cat > conftest.$ac_ext <<EOF
7148 #line 7149 "configure"
7149 #include "confdefs.h"
7150 #include <X11/extensions/shape.h>
7151 EOF
7152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7153 { (eval echo configure:7154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7155 if test -z "$ac_err"; then
7156   rm -rf conftest*
7157   eval "ac_cv_header_$ac_safe=yes"
7158 else
7159   echo "$ac_err" >&5
7160   echo "configure: failed program was:" >&5
7161   cat conftest.$ac_ext >&5
7162   rm -rf conftest*
7163   eval "ac_cv_header_$ac_safe=no"
7164 fi
7165 rm -f conftest*
7166 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7167   echo "$ac_t""yes" 1>&6
7168   
7169    { test "$extra_verbose" = "yes" && cat << \EOF
7170     Defining HAVE_BALLOON_HELP
7171 EOF
7172 cat >> confdefs.h <<\EOF
7173 #define HAVE_BALLOON_HELP 1
7174 EOF
7175 }
7176
7177    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7178    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7179  fi
7180 else
7181   echo "$ac_t""no" 1>&6
7182 fi
7183
7184 fi
7185
7186 bitmapdir=
7187
7188 case "$window_system" in
7189   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7190   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7191   gtk  )
7192        HAVE_X_WINDOWS=no
7193        test "$with_gnome" = "yes" && echo "  Using GNOME."
7194        test "$with_gnome" = "no" && echo "  Using GTK."
7195        ;;
7196   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7197 esac
7198
7199 case "$x_libraries" in *X11R4* )
7200   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7201   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7202 esac
7203
7204 echo "checking for WM_COMMAND option" 1>&6
7205 echo "configure:7206: checking for WM_COMMAND option" >&5;
7206 if test "$with_wmcommand" != "no"; then
7207   { test "$extra_verbose" = "yes" && cat << \EOF
7208     Defining HAVE_WMCOMMAND
7209 EOF
7210 cat >> confdefs.h <<\EOF
7211 #define HAVE_WMCOMMAND 1
7212 EOF
7213 }
7214
7215 fi
7216
7217 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7218 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7219 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7220 echo "configure:7221: checking for X11/Xauth.h" >&5
7221
7222 cat > conftest.$ac_ext <<EOF
7223 #line 7224 "configure"
7224 #include "confdefs.h"
7225 #include <X11/Xauth.h>
7226 EOF
7227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7228 { (eval echo configure:7229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7230 if test -z "$ac_err"; then
7231   rm -rf conftest*
7232   eval "ac_cv_header_$ac_safe=yes"
7233 else
7234   echo "$ac_err" >&5
7235   echo "configure: failed program was:" >&5
7236   cat conftest.$ac_ext >&5
7237   rm -rf conftest*
7238   eval "ac_cv_header_$ac_safe=no"
7239 fi
7240 rm -f conftest*
7241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7242   echo "$ac_t""yes" 1>&6
7243   :
7244 else
7245   echo "$ac_t""no" 1>&6
7246 with_xauth=no
7247 fi
7248  }
7249 test -z "$with_xauth" && { 
7250 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7251 echo "configure:7252: checking for XauGetAuthByAddr in -lXau" >&5
7252 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7253
7254 xe_check_libs=" -lXau "
7255 cat > conftest.$ac_ext <<EOF
7256 #line 7257 "configure"
7257 #include "confdefs.h"
7258 /* Override any gcc2 internal prototype to avoid an error.  */
7259 /* We use char because int might match the return type of a gcc2
7260     builtin and then its argument prototype would still apply.  */
7261 char XauGetAuthByAddr();
7262
7263 int main() {
7264 XauGetAuthByAddr()
7265 ; return 0; }
7266 EOF
7267 if { (eval echo configure:7268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7268   rm -rf conftest*
7269   eval "ac_cv_lib_$ac_lib_var=yes"
7270 else
7271   echo "configure: failed program was:" >&5
7272   cat conftest.$ac_ext >&5
7273   rm -rf conftest*
7274   eval "ac_cv_lib_$ac_lib_var=no"
7275 fi
7276 rm -f conftest*
7277 xe_check_libs=""
7278
7279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7280   echo "$ac_t""yes" 1>&6
7281   :
7282 else
7283   echo "$ac_t""no" 1>&6
7284 with_xauth=no
7285 fi
7286
7287  }
7288 test -z "$with_xauth" && with_xauth=yes
7289 if test "$with_xauth" = "yes"; then
7290   { test "$extra_verbose" = "yes" && cat << \EOF
7291     Defining HAVE_XAUTH
7292 EOF
7293 cat >> confdefs.h <<\EOF
7294 #define HAVE_XAUTH 1
7295 EOF
7296 }
7297
7298   
7299 T=""
7300 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
7301 libs_xauth="$T"
7302
7303 fi
7304
7305
7306
7307
7308 if test "$with_tooltalk" != "no" ; then
7309       for dir in "" "Tt/" "desktop/" ; do
7310     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7311 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7312 echo "configure:7313: checking for ${dir}tt_c.h" >&5
7313
7314 cat > conftest.$ac_ext <<EOF
7315 #line 7316 "configure"
7316 #include "confdefs.h"
7317 #include <${dir}tt_c.h>
7318 EOF
7319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7320 { (eval echo configure:7321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7322 if test -z "$ac_err"; then
7323   rm -rf conftest*
7324   eval "ac_cv_header_$ac_safe=yes"
7325 else
7326   echo "$ac_err" >&5
7327   echo "configure: failed program was:" >&5
7328   cat conftest.$ac_ext >&5
7329   rm -rf conftest*
7330   eval "ac_cv_header_$ac_safe=no"
7331 fi
7332 rm -f conftest*
7333 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7334   echo "$ac_t""yes" 1>&6
7335   tt_c_h_file="${dir}tt_c.h"; break
7336 else
7337   echo "$ac_t""no" 1>&6
7338 fi
7339
7340   done
7341   if test -z "$tt_c_h_file"; then
7342     if test "$with_tooltalk" = "yes"; then
7343       (echo "$progname: Usage error:"
7344 echo " " "Unable to find required tooltalk header files."
7345 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7346     fi
7347     with_tooltalk=no
7348   fi
7349 fi
7350 if test "$with_tooltalk" != "no" ; then
7351   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7352     
7353 xe_msg_checking="for tt_message_create in -ltt"
7354 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7355 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7356 echo "configure:7357: checking "$xe_msg_checking"" >&5
7357 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7358
7359 xe_check_libs=" -ltt $extra_libs"
7360 cat > conftest.$ac_ext <<EOF
7361 #line 7362 "configure"
7362 #include "confdefs.h"
7363 /* Override any gcc2 internal prototype to avoid an error.  */
7364 /* We use char because int might match the return type of a gcc2
7365     builtin and then its argument prototype would still apply.  */
7366 char tt_message_create();
7367
7368 int main() {
7369 tt_message_create()
7370 ; return 0; }
7371 EOF
7372 if { (eval echo configure:7373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7373   rm -rf conftest*
7374   eval "ac_cv_lib_$ac_lib_var=yes"
7375 else
7376   echo "configure: failed program was:" >&5
7377   cat conftest.$ac_ext >&5
7378   rm -rf conftest*
7379   eval "ac_cv_lib_$ac_lib_var=no"
7380 fi
7381 rm -f conftest*
7382 xe_check_libs=""
7383
7384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7385   echo "$ac_t""yes" 1>&6
7386   tt_libs="-ltt $extra_libs"; break
7387 else
7388   echo "$ac_t""no" 1>&6
7389 :
7390 fi
7391
7392
7393   done
7394   if test -z "$tt_libs"; then
7395     if test "$with_tooltalk" = "yes"; then
7396       (echo "$progname: Usage error:"
7397 echo " " "Unable to find required tooltalk libraries."
7398 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7399     fi
7400     with_tooltalk=no
7401   fi
7402 fi
7403 test -z "$with_tooltalk" && with_tooltalk=yes
7404 if test "$with_tooltalk" = "yes"; then
7405   { test "$extra_verbose" = "yes" && cat << \EOF
7406     Defining TOOLTALK
7407 EOF
7408 cat >> confdefs.h <<\EOF
7409 #define TOOLTALK 1
7410 EOF
7411 }
7412
7413   { test "$extra_verbose" = "yes" && cat << EOF
7414     Defining TT_C_H_FILE = "$tt_c_h_file"
7415 EOF
7416 cat >> confdefs.h <<EOF
7417 #define TT_C_H_FILE "$tt_c_h_file"
7418 EOF
7419 }
7420
7421   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7422   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7423    echo "    xemacs will be linked with \"tooltalk.o\""
7424  fi
7425 fi
7426
7427 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7428 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7429 echo "configure:7430: checking for Dt/Dt.h" >&5
7430
7431 cat > conftest.$ac_ext <<EOF
7432 #line 7433 "configure"
7433 #include "confdefs.h"
7434 #include <Dt/Dt.h>
7435 EOF
7436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7437 { (eval echo configure:7438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7439 if test -z "$ac_err"; then
7440   rm -rf conftest*
7441   eval "ac_cv_header_$ac_safe=yes"
7442 else
7443   echo "$ac_err" >&5
7444   echo "configure: failed program was:" >&5
7445   cat conftest.$ac_ext >&5
7446   rm -rf conftest*
7447   eval "ac_cv_header_$ac_safe=no"
7448 fi
7449 rm -f conftest*
7450 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7451   echo "$ac_t""yes" 1>&6
7452   :
7453 else
7454   echo "$ac_t""no" 1>&6
7455 with_cde=no
7456 fi
7457  }
7458 test -z "$with_cde" && { 
7459 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7460 echo "configure:7461: checking for DtDndDragStart in -lDtSvc" >&5
7461 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7462
7463 xe_check_libs=" -lDtSvc "
7464 cat > conftest.$ac_ext <<EOF
7465 #line 7466 "configure"
7466 #include "confdefs.h"
7467 /* Override any gcc2 internal prototype to avoid an error.  */
7468 /* We use char because int might match the return type of a gcc2
7469     builtin and then its argument prototype would still apply.  */
7470 char DtDndDragStart();
7471
7472 int main() {
7473 DtDndDragStart()
7474 ; return 0; }
7475 EOF
7476 if { (eval echo configure:7477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7477   rm -rf conftest*
7478   eval "ac_cv_lib_$ac_lib_var=yes"
7479 else
7480   echo "configure: failed program was:" >&5
7481   cat conftest.$ac_ext >&5
7482   rm -rf conftest*
7483   eval "ac_cv_lib_$ac_lib_var=no"
7484 fi
7485 rm -f conftest*
7486 xe_check_libs=""
7487
7488 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7489   echo "$ac_t""yes" 1>&6
7490   :
7491 else
7492   echo "$ac_t""no" 1>&6
7493 with_cde=no
7494 fi
7495
7496  }
7497 test -z "$with_cde" && with_cde=yes
7498 if test "$with_dragndrop" = no; then
7499   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7500   with_cde=no
7501 fi
7502 if test "$with_cde" = "yes" ; then
7503   { test "$extra_verbose" = "yes" && cat << \EOF
7504     Defining HAVE_CDE
7505 EOF
7506 cat >> confdefs.h <<\EOF
7507 #define HAVE_CDE 1
7508 EOF
7509 }
7510
7511   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7512   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7513   with_tooltalk=yes # CDE requires Tooltalk
7514   need_motif=yes    # CDE requires Motif
7515 fi
7516
7517 test "$window_system" != "x11" && with_offix=no
7518 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7519   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7520   with_offix=no
7521 fi
7522 if test "$with_dragndrop" = no; then
7523   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7524   with_offix=no
7525 fi
7526 if test "$with_cde" = yes; then
7527   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7528   with_offix=no
7529 fi
7530 test -z "$with_offix" && with_offix=no
7531 if test "$with_offix" = "yes"; then
7532   { test "$extra_verbose" = "yes" && cat << \EOF
7533     Defining HAVE_OFFIX_DND
7534 EOF
7535 cat >> confdefs.h <<\EOF
7536 #define HAVE_OFFIX_DND 1
7537 EOF
7538 }
7539
7540   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7541   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7542 fi
7543 if test "$with_gtk" = "yes"; then
7544    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7545 fi
7546
7547 if test "$with_dragndrop" != "no" ; then
7548   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7549 echo "configure:7550: checking if drag and drop API is needed" >&5
7550   if test -n "$dragndrop_proto" ; then
7551     with_dragndrop=yes
7552     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7553     { test "$extra_verbose" = "yes" && cat << \EOF
7554     Defining HAVE_DRAGNDROP
7555 EOF
7556 cat >> confdefs.h <<\EOF
7557 #define HAVE_DRAGNDROP 1
7558 EOF
7559 }
7560
7561     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7562   else
7563     with_dragndrop=no
7564     echo "$ac_t""no" 1>&6
7565   fi
7566 fi
7567
7568 echo "checking for LDAP" 1>&6
7569 echo "configure:7570: checking for LDAP" >&5
7570 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7571 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7572 echo "configure:7573: checking for ldap.h" >&5
7573
7574 cat > conftest.$ac_ext <<EOF
7575 #line 7576 "configure"
7576 #include "confdefs.h"
7577 #include <ldap.h>
7578 EOF
7579 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7580 { (eval echo configure:7581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7581 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7582 if test -z "$ac_err"; then
7583   rm -rf conftest*
7584   eval "ac_cv_header_$ac_safe=yes"
7585 else
7586   echo "$ac_err" >&5
7587   echo "configure: failed program was:" >&5
7588   cat conftest.$ac_ext >&5
7589   rm -rf conftest*
7590   eval "ac_cv_header_$ac_safe=no"
7591 fi
7592 rm -f conftest*
7593 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7594   echo "$ac_t""yes" 1>&6
7595   :
7596 else
7597   echo "$ac_t""no" 1>&6
7598 with_ldap=no
7599 fi
7600  }
7601 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7602 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7603 echo "configure:7604: checking for lber.h" >&5
7604
7605 cat > conftest.$ac_ext <<EOF
7606 #line 7607 "configure"
7607 #include "confdefs.h"
7608 #include <lber.h>
7609 EOF
7610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7611 { (eval echo configure:7612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7613 if test -z "$ac_err"; then
7614   rm -rf conftest*
7615   eval "ac_cv_header_$ac_safe=yes"
7616 else
7617   echo "$ac_err" >&5
7618   echo "configure: failed program was:" >&5
7619   cat conftest.$ac_ext >&5
7620   rm -rf conftest*
7621   eval "ac_cv_header_$ac_safe=no"
7622 fi
7623 rm -f conftest*
7624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7625   echo "$ac_t""yes" 1>&6
7626   :
7627 else
7628   echo "$ac_t""no" 1>&6
7629 with_ldap=no
7630 fi
7631  }
7632 if test "$with_ldap" != "no"; then
7633   
7634 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7635 echo "configure:7636: checking for ldap_search in -lldap" >&5
7636 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7637
7638 xe_check_libs=" -lldap "
7639 cat > conftest.$ac_ext <<EOF
7640 #line 7641 "configure"
7641 #include "confdefs.h"
7642 /* Override any gcc2 internal prototype to avoid an error.  */
7643 /* We use char because int might match the return type of a gcc2
7644     builtin and then its argument prototype would still apply.  */
7645 char ldap_search();
7646
7647 int main() {
7648 ldap_search()
7649 ; return 0; }
7650 EOF
7651 if { (eval echo configure:7652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7652   rm -rf conftest*
7653   eval "ac_cv_lib_$ac_lib_var=yes"
7654 else
7655   echo "configure: failed program was:" >&5
7656   cat conftest.$ac_ext >&5
7657   rm -rf conftest*
7658   eval "ac_cv_lib_$ac_lib_var=no"
7659 fi
7660 rm -f conftest*
7661 xe_check_libs=""
7662
7663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7664   echo "$ac_t""yes" 1>&6
7665   with_ldap_nolber=yes
7666 else
7667   echo "$ac_t""no" 1>&6
7668 with_ldap_nolber=no
7669 fi
7670
7671
7672   test "$with_ldap_nolber" = "no" && { 
7673 xe_msg_checking="for ldap_open in -lldap"
7674 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7675 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7676 echo "configure:7677: checking "$xe_msg_checking"" >&5
7677 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7678
7679 xe_check_libs=" -lldap -llber"
7680 cat > conftest.$ac_ext <<EOF
7681 #line 7682 "configure"
7682 #include "confdefs.h"
7683 /* Override any gcc2 internal prototype to avoid an error.  */
7684 /* We use char because int might match the return type of a gcc2
7685     builtin and then its argument prototype would still apply.  */
7686 char ldap_open();
7687
7688 int main() {
7689 ldap_open()
7690 ; return 0; }
7691 EOF
7692 if { (eval echo configure:7693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7693   rm -rf conftest*
7694   eval "ac_cv_lib_$ac_lib_var=yes"
7695 else
7696   echo "configure: failed program was:" >&5
7697   cat conftest.$ac_ext >&5
7698   rm -rf conftest*
7699   eval "ac_cv_lib_$ac_lib_var=no"
7700 fi
7701 rm -f conftest*
7702 xe_check_libs=""
7703
7704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7705   echo "$ac_t""yes" 1>&6
7706   with_ldap_lber=yes
7707 else
7708   echo "$ac_t""no" 1>&6
7709 with_ldap_lber=no
7710 fi
7711
7712  }
7713   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7714 xe_msg_checking="for ldap_open in -lldap"
7715 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7716 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7717 echo "configure:7718: checking "$xe_msg_checking"" >&5
7718 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7719
7720 xe_check_libs=" -lldap -llber -lkrb"
7721 cat > conftest.$ac_ext <<EOF
7722 #line 7723 "configure"
7723 #include "confdefs.h"
7724 /* Override any gcc2 internal prototype to avoid an error.  */
7725 /* We use char because int might match the return type of a gcc2
7726     builtin and then its argument prototype would still apply.  */
7727 char ldap_open();
7728
7729 int main() {
7730 ldap_open()
7731 ; return 0; }
7732 EOF
7733 if { (eval echo configure:7734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7734   rm -rf conftest*
7735   eval "ac_cv_lib_$ac_lib_var=yes"
7736 else
7737   echo "configure: failed program was:" >&5
7738   cat conftest.$ac_ext >&5
7739   rm -rf conftest*
7740   eval "ac_cv_lib_$ac_lib_var=no"
7741 fi
7742 rm -f conftest*
7743 xe_check_libs=""
7744
7745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7746   echo "$ac_t""yes" 1>&6
7747   with_ldap_krb=yes
7748 else
7749   echo "$ac_t""no" 1>&6
7750 with_ldap_krb=no
7751 fi
7752
7753  }
7754   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7755 xe_msg_checking="for ldap_open in -lldap"
7756 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7757 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7758 echo "configure:7759: checking "$xe_msg_checking"" >&5
7759 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7760
7761 xe_check_libs=" -lldap -llber -lkrb -ldes"
7762 cat > conftest.$ac_ext <<EOF
7763 #line 7764 "configure"
7764 #include "confdefs.h"
7765 /* Override any gcc2 internal prototype to avoid an error.  */
7766 /* We use char because int might match the return type of a gcc2
7767     builtin and then its argument prototype would still apply.  */
7768 char ldap_open();
7769
7770 int main() {
7771 ldap_open()
7772 ; return 0; }
7773 EOF
7774 if { (eval echo configure:7775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7775   rm -rf conftest*
7776   eval "ac_cv_lib_$ac_lib_var=yes"
7777 else
7778   echo "configure: failed program was:" >&5
7779   cat conftest.$ac_ext >&5
7780   rm -rf conftest*
7781   eval "ac_cv_lib_$ac_lib_var=no"
7782 fi
7783 rm -f conftest*
7784 xe_check_libs=""
7785
7786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7787   echo "$ac_t""yes" 1>&6
7788   with_ldap_krbdes=yes
7789 else
7790   echo "$ac_t""no" 1>&6
7791 with_ldap_krbdes=no
7792 fi
7793
7794  }
7795   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
7796 fi
7797 if test "$with_ldap" = "yes"; then
7798   { test "$extra_verbose" = "yes" && cat << \EOF
7799     Defining HAVE_LDAP
7800 EOF
7801 cat >> confdefs.h <<\EOF
7802 #define HAVE_LDAP 1
7803 EOF
7804 }
7805
7806   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7807    echo "    xemacs will be linked with \"eldap.o\""
7808  fi
7809   if test "$with_ldap_nolber" = "yes" ; then
7810     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7811   else
7812     if test "$with_ldap_krb" = "yes" ; then
7813       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7814     fi
7815     if test "$with_ldap_krbdes" = "yes" ; then
7816       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7817       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7818     fi
7819     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7820     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7821   fi
7822   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7823 do
7824 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7825 echo "configure:7826: checking for $ac_func" >&5
7826
7827 cat > conftest.$ac_ext <<EOF
7828 #line 7829 "configure"
7829 #include "confdefs.h"
7830 /* System header to define __stub macros and hopefully few prototypes,
7831     which can conflict with char $ac_func(); below.  */
7832 #include <assert.h>
7833 /* Override any gcc2 internal prototype to avoid an error.  */
7834 /* We use char because int might match the return type of a gcc2
7835     builtin and then its argument prototype would still apply.  */
7836 char $ac_func();
7837
7838 int main() {
7839
7840 /* The GNU C library defines this for functions which it implements
7841     to always fail with ENOSYS.  Some functions are actually named
7842     something starting with __ and the normal name is an alias.  */
7843 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7844 choke me
7845 #else
7846 $ac_func();
7847 #endif
7848
7849 ; return 0; }
7850 EOF
7851 if { (eval echo configure:7852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7852   rm -rf conftest*
7853   eval "ac_cv_func_$ac_func=yes"
7854 else
7855   echo "configure: failed program was:" >&5
7856   cat conftest.$ac_ext >&5
7857   rm -rf conftest*
7858   eval "ac_cv_func_$ac_func=no"
7859 fi
7860 rm -f conftest*
7861
7862 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7863   echo "$ac_t""yes" 1>&6
7864     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7865   { test "$extra_verbose" = "yes" && cat << EOF
7866     Defining $ac_tr_func
7867 EOF
7868 cat >> confdefs.h <<EOF
7869 #define $ac_tr_func 1
7870 EOF
7871 }
7872  
7873 else
7874   echo "$ac_t""no" 1>&6
7875 fi
7876 done
7877
7878 fi
7879
7880 if test "$with_postgresql" != "no"; then
7881   echo "checking for PostgreSQL" 1>&6
7882 echo "configure:7883: checking for PostgreSQL" >&5
7883
7884   for header_dir in "" "pgsql/" "postgresql/"; do
7885     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7886 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7887 echo "configure:7888: checking for ${header_dir}libpq-fe.h" >&5
7888
7889 cat > conftest.$ac_ext <<EOF
7890 #line 7891 "configure"
7891 #include "confdefs.h"
7892 #include <${header_dir}libpq-fe.h>
7893 EOF
7894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7895 { (eval echo configure:7896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7897 if test -z "$ac_err"; then
7898   rm -rf conftest*
7899   eval "ac_cv_header_$ac_safe=yes"
7900 else
7901   echo "$ac_err" >&5
7902   echo "configure: failed program was:" >&5
7903   cat conftest.$ac_ext >&5
7904   rm -rf conftest*
7905   eval "ac_cv_header_$ac_safe=no"
7906 fi
7907 rm -f conftest*
7908 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7909   echo "$ac_t""yes" 1>&6
7910   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7911 else
7912   echo "$ac_t""no" 1>&6
7913 fi
7914
7915   done
7916
7917   test -n "$libpq_fe_h_file" && { 
7918 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7919 echo "configure:7920: checking for PQconnectdb in -lpq" >&5
7920 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7921
7922 xe_check_libs=" -lpq "
7923 cat > conftest.$ac_ext <<EOF
7924 #line 7925 "configure"
7925 #include "confdefs.h"
7926 /* Override any gcc2 internal prototype to avoid an error.  */
7927 /* We use char because int might match the return type of a gcc2
7928     builtin and then its argument prototype would still apply.  */
7929 char PQconnectdb();
7930
7931 int main() {
7932 PQconnectdb()
7933 ; return 0; }
7934 EOF
7935 if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7936   rm -rf conftest*
7937   eval "ac_cv_lib_$ac_lib_var=yes"
7938 else
7939   echo "configure: failed program was:" >&5
7940   cat conftest.$ac_ext >&5
7941   rm -rf conftest*
7942   eval "ac_cv_lib_$ac_lib_var=no"
7943 fi
7944 rm -f conftest*
7945 xe_check_libs=""
7946
7947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7948   echo "$ac_t""yes" 1>&6
7949   have_libpq=yes
7950 else
7951   echo "$ac_t""no" 1>&6
7952 fi
7953
7954  }
7955
7956   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7957     with_postgresql=yes
7958     { test "$extra_verbose" = "yes" && cat << \EOF
7959     Defining HAVE_POSTGRESQL
7960 EOF
7961 cat >> confdefs.h <<\EOF
7962 #define HAVE_POSTGRESQL 1
7963 EOF
7964 }
7965
7966     
7967 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7968 echo "configure:7969: checking for PQconnectStart in -lpq" >&5
7969 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7970
7971 xe_check_libs=" -lpq "
7972 cat > conftest.$ac_ext <<EOF
7973 #line 7974 "configure"
7974 #include "confdefs.h"
7975 /* Override any gcc2 internal prototype to avoid an error.  */
7976 /* We use char because int might match the return type of a gcc2
7977     builtin and then its argument prototype would still apply.  */
7978 char PQconnectStart();
7979
7980 int main() {
7981 PQconnectStart()
7982 ; return 0; }
7983 EOF
7984 if { (eval echo configure:7985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7985   rm -rf conftest*
7986   eval "ac_cv_lib_$ac_lib_var=yes"
7987 else
7988   echo "configure: failed program was:" >&5
7989   cat conftest.$ac_ext >&5
7990   rm -rf conftest*
7991   eval "ac_cv_lib_$ac_lib_var=no"
7992 fi
7993 rm -f conftest*
7994 xe_check_libs=""
7995
7996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7997   echo "$ac_t""yes" 1>&6
7998   with_postgresqlv7=yes;
7999                  { test "$extra_verbose" = "yes" && cat << \EOF
8000     Defining HAVE_POSTGRESQLV7
8001 EOF
8002 cat >> confdefs.h <<\EOF
8003 #define HAVE_POSTGRESQLV7 1
8004 EOF
8005 }
8006
8007 else
8008   echo "$ac_t""no" 1>&6
8009 fi
8010
8011
8012     { test "$extra_verbose" = "yes" && cat << EOF
8013     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8014 EOF
8015 cat >> confdefs.h <<EOF
8016 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8017 EOF
8018 }
8019
8020     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8021     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8022    echo "    xemacs will be linked with \"postgresql.o\""
8023  fi
8024   elif test "$with_postgresql" = "yes"; then
8025     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8026   fi
8027 fi
8028
8029
8030 if test "$window_system" != "none"; then
8031   echo "checking for graphics libraries" 1>&6
8032 echo "configure:8033: checking for graphics libraries" >&5
8033
8034       libpath_xpm=
8035   incpath_xpm=
8036   case "$opsys" in 
8037     cygwin*)
8038       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8039       cygwin_top=`eval "dirname ${cygwin_top}"`;
8040       cygwin_top="${cygwin_top}/..";
8041       case "$window_system" in
8042                 x11)  ;;
8043                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8044              incpath_xpm="-I${cygwin_top}/include/noX"
8045               ;;
8046                 gtk)  ;;
8047                 none) ;;
8048                 *)    ;;
8049       esac
8050       ;;
8051         *) ;;
8052   esac
8053     xpm_problem=""
8054   if test -z "$with_xpm"; then
8055     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8056     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8057     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8058 echo "configure:8059: checking for Xpm - no older than 3.4f" >&5
8059     xe_check_libs=-lXpm
8060     cat > conftest.$ac_ext <<EOF
8061 #line 8062 "configure"
8062 #include "confdefs.h"
8063 #define XPM_NUMBERS
8064 #include <X11/xpm.h>
8065     int main(int c, char **v) {
8066     return c == 1 ? 0 :
8067       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8068       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8069 EOF
8070 if { (eval echo configure:8071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8071 then
8072   ./conftest dummy_arg; xpm_status=$?;
8073       if test "$xpm_status" = "0"; then
8074         with_xpm=yes;
8075       else
8076         with_xpm=no;
8077         if test "$xpm_status" = "1"; then
8078           xpm_problem="Xpm library version and header file version don't match!"
8079         elif test "$xpm_status" = "2"; then
8080           xpm_problem="Xpm library version is too old!"
8081         else
8082           xpm_problem="Internal xpm detection logic error!"
8083         fi
8084         echo "
8085 *** WARNING *** $xpm_problem
8086   I'm not touching that with a 10-foot pole!
8087   If you really want to use the installed version of Xpm, rerun
8088   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8089     fi
8090 else
8091   conftest_rc="$?"
8092   echo "configure: failed program was:" >&5
8093   cat conftest.$ac_ext >&5
8094   rm -fr conftest*
8095   with_xpm=no
8096 fi
8097 rm -fr conftest*
8098     xe_check_libs=
8099     echo "$ac_t""$with_xpm" 1>&6
8100   fi
8101   if test "$with_xpm" = "yes"; then
8102                 { test "$extra_verbose" = "yes" && cat << \EOF
8103     Defining HAVE_XPM
8104 EOF
8105 cat >> confdefs.h <<\EOF
8106 #define HAVE_XPM 1
8107 EOF
8108 }
8109
8110     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8111     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8112     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8113     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8114 echo "configure:8115: checking for \"FOR_MSW\" xpm" >&5
8115     xe_check_libs=-lXpm
8116     cat > conftest.$ac_ext <<EOF
8117 #line 8118 "configure"
8118 #include "confdefs.h"
8119
8120 int main() {
8121 XpmCreatePixmapFromData()
8122 ; return 0; }
8123 EOF
8124 if { (eval echo configure:8125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8125   rm -rf conftest*
8126   xpm_for_msw=no
8127 else
8128   echo "configure: failed program was:" >&5
8129   cat conftest.$ac_ext >&5
8130   rm -rf conftest*
8131   xpm_for_msw=yes
8132 fi
8133 rm -f conftest*
8134     xe_check_libs=
8135     echo "$ac_t""$xpm_for_msw" 1>&6
8136     if test "$xpm_for_msw" = "yes"; then
8137       { test "$extra_verbose" = "yes" && cat << \EOF
8138     Defining FOR_MSW
8139 EOF
8140 cat >> confdefs.h <<\EOF
8141 #define FOR_MSW 1
8142 EOF
8143 }
8144
8145     fi
8146   fi
8147
8148     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8149 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8150 echo "configure:8151: checking for compface.h" >&5
8151
8152 cat > conftest.$ac_ext <<EOF
8153 #line 8154 "configure"
8154 #include "confdefs.h"
8155 #include <compface.h>
8156 EOF
8157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8158 { (eval echo configure:8159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8160 if test -z "$ac_err"; then
8161   rm -rf conftest*
8162   eval "ac_cv_header_$ac_safe=yes"
8163 else
8164   echo "$ac_err" >&5
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167   rm -rf conftest*
8168   eval "ac_cv_header_$ac_safe=no"
8169 fi
8170 rm -f conftest*
8171 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8172   echo "$ac_t""yes" 1>&6
8173   :
8174 else
8175   echo "$ac_t""no" 1>&6
8176 with_xface=no
8177 fi
8178  }
8179   test -z "$with_xface" && { 
8180 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8181 echo "configure:8182: checking for UnGenFace in -lcompface" >&5
8182 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8183
8184 xe_check_libs=" -lcompface "
8185 cat > conftest.$ac_ext <<EOF
8186 #line 8187 "configure"
8187 #include "confdefs.h"
8188 /* Override any gcc2 internal prototype to avoid an error.  */
8189 /* We use char because int might match the return type of a gcc2
8190     builtin and then its argument prototype would still apply.  */
8191 char UnGenFace();
8192
8193 int main() {
8194 UnGenFace()
8195 ; return 0; }
8196 EOF
8197 if { (eval echo configure:8198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8198   rm -rf conftest*
8199   eval "ac_cv_lib_$ac_lib_var=yes"
8200 else
8201   echo "configure: failed program was:" >&5
8202   cat conftest.$ac_ext >&5
8203   rm -rf conftest*
8204   eval "ac_cv_lib_$ac_lib_var=no"
8205 fi
8206 rm -f conftest*
8207 xe_check_libs=""
8208
8209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8210   echo "$ac_t""yes" 1>&6
8211   : 
8212 else
8213   echo "$ac_t""no" 1>&6
8214 with_xface=no
8215 fi
8216
8217  }
8218   test -z "$with_xface" && with_xface=yes
8219   if test "$with_xface" = "yes"; then
8220     { test "$extra_verbose" = "yes" && cat << \EOF
8221     Defining HAVE_XFACE
8222 EOF
8223 cat >> confdefs.h <<\EOF
8224 #define HAVE_XFACE 1
8225 EOF
8226 }
8227
8228     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8229   fi
8230
8231         if test "$with_gif" != "no"; then
8232     with_gif="yes"
8233     { test "$extra_verbose" = "yes" && cat << \EOF
8234     Defining HAVE_GIF
8235 EOF
8236 cat >> confdefs.h <<\EOF
8237 #define HAVE_GIF 1
8238 EOF
8239 }
8240
8241     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8242    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8243  fi
8244   fi
8245
8246       if test "$with_png $with_tiff" != "no no"; then
8247     
8248 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8249 echo "configure:8250: checking for inflate in -lc" >&5
8250 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8251
8252 xe_check_libs=" -lc "
8253 cat > conftest.$ac_ext <<EOF
8254 #line 8255 "configure"
8255 #include "confdefs.h"
8256 /* Override any gcc2 internal prototype to avoid an error.  */
8257 /* We use char because int might match the return type of a gcc2
8258     builtin and then its argument prototype would still apply.  */
8259 char inflate();
8260
8261 int main() {
8262 inflate()
8263 ; return 0; }
8264 EOF
8265 if { (eval echo configure:8266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8266   rm -rf conftest*
8267   eval "ac_cv_lib_$ac_lib_var=yes"
8268 else
8269   echo "configure: failed program was:" >&5
8270   cat conftest.$ac_ext >&5
8271   rm -rf conftest*
8272   eval "ac_cv_lib_$ac_lib_var=no"
8273 fi
8274 rm -f conftest*
8275 xe_check_libs=""
8276
8277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8278   echo "$ac_t""yes" 1>&6
8279   :
8280 else
8281   echo "$ac_t""no" 1>&6
8282
8283 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8284 echo "configure:8285: checking for inflate in -lz" >&5
8285 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8286
8287 xe_check_libs=" -lz "
8288 cat > conftest.$ac_ext <<EOF
8289 #line 8290 "configure"
8290 #include "confdefs.h"
8291 /* Override any gcc2 internal prototype to avoid an error.  */
8292 /* We use char because int might match the return type of a gcc2
8293     builtin and then its argument prototype would still apply.  */
8294 char inflate();
8295
8296 int main() {
8297 inflate()
8298 ; return 0; }
8299 EOF
8300 if { (eval echo configure:8301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8301   rm -rf conftest*
8302   eval "ac_cv_lib_$ac_lib_var=yes"
8303 else
8304   echo "configure: failed program was:" >&5
8305   cat conftest.$ac_ext >&5
8306   rm -rf conftest*
8307   eval "ac_cv_lib_$ac_lib_var=no"
8308 fi
8309 rm -f conftest*
8310 xe_check_libs=""
8311
8312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8313   echo "$ac_t""yes" 1>&6
8314   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8315 else
8316   echo "$ac_t""no" 1>&6
8317
8318 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8319 echo "configure:8320: checking for inflate in -lgz" >&5
8320 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8321
8322 xe_check_libs=" -lgz "
8323 cat > conftest.$ac_ext <<EOF
8324 #line 8325 "configure"
8325 #include "confdefs.h"
8326 /* Override any gcc2 internal prototype to avoid an error.  */
8327 /* We use char because int might match the return type of a gcc2
8328     builtin and then its argument prototype would still apply.  */
8329 char inflate();
8330
8331 int main() {
8332 inflate()
8333 ; return 0; }
8334 EOF
8335 if { (eval echo configure:8336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8336   rm -rf conftest*
8337   eval "ac_cv_lib_$ac_lib_var=yes"
8338 else
8339   echo "configure: failed program was:" >&5
8340   cat conftest.$ac_ext >&5
8341   rm -rf conftest*
8342   eval "ac_cv_lib_$ac_lib_var=no"
8343 fi
8344 rm -f conftest*
8345 xe_check_libs=""
8346
8347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8348   echo "$ac_t""yes" 1>&6
8349   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8350 else
8351   echo "$ac_t""no" 1>&6
8352 fi
8353
8354
8355 fi
8356
8357
8358 fi
8359
8360
8361   fi
8362
8363     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8364 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8365 echo "configure:8366: checking for jpeglib.h" >&5
8366
8367 cat > conftest.$ac_ext <<EOF
8368 #line 8369 "configure"
8369 #include "confdefs.h"
8370 #include <jpeglib.h>
8371 EOF
8372 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8373 { (eval echo configure:8374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8374 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8375 if test -z "$ac_err"; then
8376   rm -rf conftest*
8377   eval "ac_cv_header_$ac_safe=yes"
8378 else
8379   echo "$ac_err" >&5
8380   echo "configure: failed program was:" >&5
8381   cat conftest.$ac_ext >&5
8382   rm -rf conftest*
8383   eval "ac_cv_header_$ac_safe=no"
8384 fi
8385 rm -f conftest*
8386 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8387   echo "$ac_t""yes" 1>&6
8388   :
8389 else
8390   echo "$ac_t""no" 1>&6
8391 with_jpeg=no
8392 fi
8393  }
8394   test -z "$with_jpeg" && { 
8395 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8396 echo "configure:8397: checking for jpeg_destroy_decompress in -ljpeg" >&5
8397 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8398
8399 xe_check_libs=" -ljpeg "
8400 cat > conftest.$ac_ext <<EOF
8401 #line 8402 "configure"
8402 #include "confdefs.h"
8403 /* Override any gcc2 internal prototype to avoid an error.  */
8404 /* We use char because int might match the return type of a gcc2
8405     builtin and then its argument prototype would still apply.  */
8406 char jpeg_destroy_decompress();
8407
8408 int main() {
8409 jpeg_destroy_decompress()
8410 ; return 0; }
8411 EOF
8412 if { (eval echo configure:8413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8413   rm -rf conftest*
8414   eval "ac_cv_lib_$ac_lib_var=yes"
8415 else
8416   echo "configure: failed program was:" >&5
8417   cat conftest.$ac_ext >&5
8418   rm -rf conftest*
8419   eval "ac_cv_lib_$ac_lib_var=no"
8420 fi
8421 rm -f conftest*
8422 xe_check_libs=""
8423
8424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8425   echo "$ac_t""yes" 1>&6
8426   :
8427 else
8428   echo "$ac_t""no" 1>&6
8429 with_jpeg=no
8430 fi
8431
8432  }
8433   test -z "$with_jpeg" && with_jpeg=yes
8434   if test "$with_jpeg" = "yes"; then
8435     { test "$extra_verbose" = "yes" && cat << \EOF
8436     Defining HAVE_JPEG
8437 EOF
8438 cat >> confdefs.h <<\EOF
8439 #define HAVE_JPEG 1
8440 EOF
8441 }
8442
8443     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8444   fi
8445
8446     png_problem=""
8447   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8448 echo "configure:8449: checking for pow" >&5
8449
8450 cat > conftest.$ac_ext <<EOF
8451 #line 8452 "configure"
8452 #include "confdefs.h"
8453 /* System header to define __stub macros and hopefully few prototypes,
8454     which can conflict with char pow(); below.  */
8455 #include <assert.h>
8456 /* Override any gcc2 internal prototype to avoid an error.  */
8457 /* We use char because int might match the return type of a gcc2
8458     builtin and then its argument prototype would still apply.  */
8459 char pow();
8460
8461 int main() {
8462
8463 /* The GNU C library defines this for functions which it implements
8464     to always fail with ENOSYS.  Some functions are actually named
8465     something starting with __ and the normal name is an alias.  */
8466 #if defined (__stub_pow) || defined (__stub___pow)
8467 choke me
8468 #else
8469 pow();
8470 #endif
8471
8472 ; return 0; }
8473 EOF
8474 if { (eval echo configure:8475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8475   rm -rf conftest*
8476   eval "ac_cv_func_pow=yes"
8477 else
8478   echo "configure: failed program was:" >&5
8479   cat conftest.$ac_ext >&5
8480   rm -rf conftest*
8481   eval "ac_cv_func_pow=no"
8482 fi
8483 rm -f conftest*
8484
8485 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8486   echo "$ac_t""yes" 1>&6
8487   :
8488 else
8489   echo "$ac_t""no" 1>&6
8490 with_png=no
8491 fi
8492  }
8493   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8494 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8495 echo "configure:8496: checking for png.h" >&5
8496
8497 cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 #include <png.h>
8501 EOF
8502 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8503 { (eval echo configure:8504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8504 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8505 if test -z "$ac_err"; then
8506   rm -rf conftest*
8507   eval "ac_cv_header_$ac_safe=yes"
8508 else
8509   echo "$ac_err" >&5
8510   echo "configure: failed program was:" >&5
8511   cat conftest.$ac_ext >&5
8512   rm -rf conftest*
8513   eval "ac_cv_header_$ac_safe=no"
8514 fi
8515 rm -f conftest*
8516 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8517   echo "$ac_t""yes" 1>&6
8518   :
8519 else
8520   echo "$ac_t""no" 1>&6
8521 with_png=no
8522 fi
8523  }
8524   test -z "$with_png" && { 
8525 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8526 echo "configure:8527: checking for png_read_image in -lpng" >&5
8527 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8528
8529 xe_check_libs=" -lpng "
8530 cat > conftest.$ac_ext <<EOF
8531 #line 8532 "configure"
8532 #include "confdefs.h"
8533 /* Override any gcc2 internal prototype to avoid an error.  */
8534 /* We use char because int might match the return type of a gcc2
8535     builtin and then its argument prototype would still apply.  */
8536 char png_read_image();
8537
8538 int main() {
8539 png_read_image()
8540 ; return 0; }
8541 EOF
8542 if { (eval echo configure:8543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8543   rm -rf conftest*
8544   eval "ac_cv_lib_$ac_lib_var=yes"
8545 else
8546   echo "configure: failed program was:" >&5
8547   cat conftest.$ac_ext >&5
8548   rm -rf conftest*
8549   eval "ac_cv_lib_$ac_lib_var=no"
8550 fi
8551 rm -f conftest*
8552 xe_check_libs=""
8553
8554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8555   echo "$ac_t""yes" 1>&6
8556   :
8557 else
8558   echo "$ac_t""no" 1>&6
8559 with_png=no
8560 fi
8561
8562  }
8563   if test -z "$with_png"; then
8564     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8565 echo "configure:8566: checking for workable png version information" >&5
8566     xe_check_libs="-lpng -lz"
8567     cat > conftest.$ac_ext <<EOF
8568 #line 8569 "configure"
8569 #include "confdefs.h"
8570 #include <png.h>
8571     int main(int c, char **v) {
8572     if (c == 1) return 0;
8573     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8574     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8575 EOF
8576 if { (eval echo configure:8577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8577 then
8578   ./conftest dummy_arg; png_status=$?;
8579       if test "$png_status" = "0"; then
8580         with_png=yes;
8581       else
8582         with_png=no;
8583         if test "$png_status" = "1"; then
8584           png_problem="PNG library version and header file don't match!"
8585         elif test "$png_status" = "2"; then
8586           png_problem="PNG library version too old (pre 1.0.2)!"
8587         fi
8588         echo "
8589 *** WARNING *** $png_problem
8590   I'm not touching that with a 10-foot pole!
8591   If you really want to use the installed version of libPNG, rerun
8592   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8593     fi
8594 else
8595   conftest_rc="$?"
8596   echo "configure: failed program was:" >&5
8597   cat conftest.$ac_ext >&5
8598   rm -fr conftest*
8599   with_png=no
8600 fi
8601 rm -fr conftest*
8602     xe_check_libs=
8603     echo "$ac_t""$with_png" 1>&6
8604   fi
8605   if test "$with_png" = "yes"; then
8606     { test "$extra_verbose" = "yes" && cat << \EOF
8607     Defining HAVE_PNG
8608 EOF
8609 cat >> confdefs.h <<\EOF
8610 #define HAVE_PNG 1
8611 EOF
8612 }
8613
8614     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8615   fi
8616
8617     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8618 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8619 echo "configure:8620: checking for tiffio.h" >&5
8620
8621 cat > conftest.$ac_ext <<EOF
8622 #line 8623 "configure"
8623 #include "confdefs.h"
8624 #include <tiffio.h>
8625 EOF
8626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8627 { (eval echo configure:8628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8629 if test -z "$ac_err"; then
8630   rm -rf conftest*
8631   eval "ac_cv_header_$ac_safe=yes"
8632 else
8633   echo "$ac_err" >&5
8634   echo "configure: failed program was:" >&5
8635   cat conftest.$ac_ext >&5
8636   rm -rf conftest*
8637   eval "ac_cv_header_$ac_safe=no"
8638 fi
8639 rm -f conftest*
8640 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8641   echo "$ac_t""yes" 1>&6
8642   :
8643 else
8644   echo "$ac_t""no" 1>&6
8645 with_tiff=no
8646 fi
8647  }
8648   test -z "$with_tiff" && { 
8649 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8650 echo "configure:8651: checking for TIFFClientOpen in -ltiff" >&5
8651 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8652
8653 xe_check_libs=" -ltiff "
8654 cat > conftest.$ac_ext <<EOF
8655 #line 8656 "configure"
8656 #include "confdefs.h"
8657 /* Override any gcc2 internal prototype to avoid an error.  */
8658 /* We use char because int might match the return type of a gcc2
8659     builtin and then its argument prototype would still apply.  */
8660 char TIFFClientOpen();
8661
8662 int main() {
8663 TIFFClientOpen()
8664 ; return 0; }
8665 EOF
8666 if { (eval echo configure:8667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8667   rm -rf conftest*
8668   eval "ac_cv_lib_$ac_lib_var=yes"
8669 else
8670   echo "configure: failed program was:" >&5
8671   cat conftest.$ac_ext >&5
8672   rm -rf conftest*
8673   eval "ac_cv_lib_$ac_lib_var=no"
8674 fi
8675 rm -f conftest*
8676 xe_check_libs=""
8677
8678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8679   echo "$ac_t""yes" 1>&6
8680   :
8681 else
8682   echo "$ac_t""no" 1>&6
8683 with_tiff=no
8684 fi
8685
8686  }
8687   test -z "$with_tiff" && with_tiff=yes
8688   if test "$with_tiff" = "yes"; then
8689     { test "$extra_verbose" = "yes" && cat << \EOF
8690     Defining HAVE_TIFF
8691 EOF
8692 cat >> confdefs.h <<\EOF
8693 #define HAVE_TIFF 1
8694 EOF
8695 }
8696
8697     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8698   fi
8699 fi
8700
8701
8702 if test "$with_gtk" = "yes"; then
8703     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8704 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8705 echo "configure:8706: checking for compface.h" >&5
8706
8707 cat > conftest.$ac_ext <<EOF
8708 #line 8709 "configure"
8709 #include "confdefs.h"
8710 #include <compface.h>
8711 EOF
8712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8713 { (eval echo configure:8714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8715 if test -z "$ac_err"; then
8716   rm -rf conftest*
8717   eval "ac_cv_header_$ac_safe=yes"
8718 else
8719   echo "$ac_err" >&5
8720   echo "configure: failed program was:" >&5
8721   cat conftest.$ac_ext >&5
8722   rm -rf conftest*
8723   eval "ac_cv_header_$ac_safe=no"
8724 fi
8725 rm -f conftest*
8726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8727   echo "$ac_t""yes" 1>&6
8728   :
8729 else
8730   echo "$ac_t""no" 1>&6
8731 with_xface=no
8732 fi
8733  }
8734   test -z "$with_xface" && { 
8735 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8736 echo "configure:8737: checking for UnGenFace in -lcompface" >&5
8737 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8738
8739 xe_check_libs=" -lcompface "
8740 cat > conftest.$ac_ext <<EOF
8741 #line 8742 "configure"
8742 #include "confdefs.h"
8743 /* Override any gcc2 internal prototype to avoid an error.  */
8744 /* We use char because int might match the return type of a gcc2
8745     builtin and then its argument prototype would still apply.  */
8746 char UnGenFace();
8747
8748 int main() {
8749 UnGenFace()
8750 ; return 0; }
8751 EOF
8752 if { (eval echo configure:8753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8753   rm -rf conftest*
8754   eval "ac_cv_lib_$ac_lib_var=yes"
8755 else
8756   echo "configure: failed program was:" >&5
8757   cat conftest.$ac_ext >&5
8758   rm -rf conftest*
8759   eval "ac_cv_lib_$ac_lib_var=no"
8760 fi
8761 rm -f conftest*
8762 xe_check_libs=""
8763
8764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8765   echo "$ac_t""yes" 1>&6
8766   : 
8767 else
8768   echo "$ac_t""no" 1>&6
8769 with_xface=no
8770 fi
8771
8772  }
8773   test -z "$with_xface" && with_xface=yes
8774   if test "$with_xface" = "yes"; then
8775     { test "$extra_verbose" = "yes" && cat << \EOF
8776     Defining HAVE_XFACE
8777 EOF
8778 cat >> confdefs.h <<\EOF
8779 #define HAVE_XFACE 1
8780 EOF
8781 }
8782
8783     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8784   fi
8785 fi
8786
8787
8788
8789 if test "$with_x11" = "yes"; then
8790   echo "checking for X11 graphics libraries" 1>&6
8791 echo "configure:8792: checking for X11 graphics libraries" >&5
8792 fi
8793
8794 if test "$with_x11" = "yes" -a "$with_widgets" = "athena"; then
8795   echo "checking for the Athena widgets" 1>&6
8796 echo "configure:8797: checking for the Athena widgets" >&5
8797
8798     case "$with_athena" in
8799         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8800     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8801     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8802     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8803     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8804     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8805   esac
8806
8807     if test "$athena_3d" = "no"; then
8808     
8809 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8810 echo "configure:8811: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8811 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8812
8813 xe_check_libs=" -l$athena_variant "
8814 cat > conftest.$ac_ext <<EOF
8815 #line 8816 "configure"
8816 #include "confdefs.h"
8817 /* Override any gcc2 internal prototype to avoid an error.  */
8818 /* We use char because int might match the return type of a gcc2
8819     builtin and then its argument prototype would still apply.  */
8820 char XawScrollbarSetThumb();
8821
8822 int main() {
8823 XawScrollbarSetThumb()
8824 ; return 0; }
8825 EOF
8826 if { (eval echo configure:8827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8827   rm -rf conftest*
8828   eval "ac_cv_lib_$ac_lib_var=yes"
8829 else
8830   echo "configure: failed program was:" >&5
8831   cat conftest.$ac_ext >&5
8832   rm -rf conftest*
8833   eval "ac_cv_lib_$ac_lib_var=no"
8834 fi
8835 rm -f conftest*
8836 xe_check_libs=""
8837
8838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8839   echo "$ac_t""yes" 1>&6
8840           
8841 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8842 echo "configure:8843: checking for threeDClassRec in -l$athena_variant" >&5
8843 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8844
8845 xe_check_libs=" -l$athena_variant "
8846 cat > conftest.$ac_ext <<EOF
8847 #line 8848 "configure"
8848 #include "confdefs.h"
8849 /* Override any gcc2 internal prototype to avoid an error.  */
8850 /* We use char because int might match the return type of a gcc2
8851     builtin and then its argument prototype would still apply.  */
8852 char threeDClassRec();
8853
8854 int main() {
8855 threeDClassRec()
8856 ; return 0; }
8857 EOF
8858 if { (eval echo configure:8859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8859   rm -rf conftest*
8860   eval "ac_cv_lib_$ac_lib_var=yes"
8861 else
8862   echo "configure: failed program was:" >&5
8863   cat conftest.$ac_ext >&5
8864   rm -rf conftest*
8865   eval "ac_cv_lib_$ac_lib_var=no"
8866 fi
8867 rm -f conftest*
8868 xe_check_libs=""
8869
8870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8871   echo "$ac_t""yes" 1>&6
8872   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8873 else
8874   echo "$ac_t""no" 1>&6
8875 athena_lib=$athena_variant
8876 fi
8877
8878
8879       
8880 else
8881   echo "$ac_t""no" 1>&6
8882 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8883 fi
8884
8885
8886   else
8887         
8888 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8889 echo "configure:8890: checking for threeDClassRec in -l$athena_variant" >&5
8890 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8891
8892 xe_check_libs=" -l$athena_variant "
8893 cat > conftest.$ac_ext <<EOF
8894 #line 8895 "configure"
8895 #include "confdefs.h"
8896 /* Override any gcc2 internal prototype to avoid an error.  */
8897 /* We use char because int might match the return type of a gcc2
8898     builtin and then its argument prototype would still apply.  */
8899 char threeDClassRec();
8900
8901 int main() {
8902 threeDClassRec()
8903 ; return 0; }
8904 EOF
8905 if { (eval echo configure:8906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8906   rm -rf conftest*
8907   eval "ac_cv_lib_$ac_lib_var=yes"
8908 else
8909   echo "configure: failed program was:" >&5
8910   cat conftest.$ac_ext >&5
8911   rm -rf conftest*
8912   eval "ac_cv_lib_$ac_lib_var=no"
8913 fi
8914 rm -f conftest*
8915 xe_check_libs=""
8916
8917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8918   echo "$ac_t""yes" 1>&6
8919   athena_lib=$athena_variant
8920 else
8921   echo "$ac_t""no" 1>&6
8922 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8923 echo "configure:8924: checking for threeDClassRec in -lXaw" >&5
8924 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8925
8926 xe_check_libs=" -lXaw "
8927 cat > conftest.$ac_ext <<EOF
8928 #line 8929 "configure"
8929 #include "confdefs.h"
8930 /* Override any gcc2 internal prototype to avoid an error.  */
8931 /* We use char because int might match the return type of a gcc2
8932     builtin and then its argument prototype would still apply.  */
8933 char threeDClassRec();
8934
8935 int main() {
8936 threeDClassRec()
8937 ; return 0; }
8938 EOF
8939 if { (eval echo configure:8940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8940   rm -rf conftest*
8941   eval "ac_cv_lib_$ac_lib_var=yes"
8942 else
8943   echo "configure: failed program was:" >&5
8944   cat conftest.$ac_ext >&5
8945   rm -rf conftest*
8946   eval "ac_cv_lib_$ac_lib_var=no"
8947 fi
8948 rm -f conftest*
8949 xe_check_libs=""
8950
8951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8952   echo "$ac_t""yes" 1>&6
8953   athena_lib=Xaw;
8954           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8955         
8956 else
8957   echo "$ac_t""no" 1>&6
8958 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8959 fi
8960
8961
8962 fi
8963
8964
8965   fi
8966
8967     if test "$athena_3d" = "no"; then
8968     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8969 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8970 echo "configure:8971: checking for X11/Xaw/ThreeD.h" >&5
8971
8972 cat > conftest.$ac_ext <<EOF
8973 #line 8974 "configure"
8974 #include "confdefs.h"
8975 #include <X11/Xaw/ThreeD.h>
8976 EOF
8977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8978 { (eval echo configure:8979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8980 if test -z "$ac_err"; then
8981   rm -rf conftest*
8982   eval "ac_cv_header_$ac_safe=yes"
8983 else
8984   echo "$ac_err" >&5
8985   echo "configure: failed program was:" >&5
8986   cat conftest.$ac_ext >&5
8987   rm -rf conftest*
8988   eval "ac_cv_header_$ac_safe=no"
8989 fi
8990 rm -f conftest*
8991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8992   echo "$ac_t""yes" 1>&6
8993   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8994 else
8995   echo "$ac_t""no" 1>&6
8996 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8997 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8998 echo "configure:8999: checking for X11/Xaw/XawInit.h" >&5
8999
9000 cat > conftest.$ac_ext <<EOF
9001 #line 9002 "configure"
9002 #include "confdefs.h"
9003 #include <X11/Xaw/XawInit.h>
9004 EOF
9005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9006 { (eval echo configure:9007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9008 if test -z "$ac_err"; then
9009   rm -rf conftest*
9010   eval "ac_cv_header_$ac_safe=yes"
9011 else
9012   echo "$ac_err" >&5
9013   echo "configure: failed program was:" >&5
9014   cat conftest.$ac_ext >&5
9015   rm -rf conftest*
9016   eval "ac_cv_header_$ac_safe=no"
9017 fi
9018 rm -f conftest*
9019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9020   echo "$ac_t""yes" 1>&6
9021   athena_h_path=X11/Xaw
9022 else
9023   echo "$ac_t""no" 1>&6
9024 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9025 fi
9026
9027 fi
9028
9029   else
9030             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9031 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9032 echo "configure:9033: checking for X11/$athena_variant/XawInit.h" >&5
9033
9034 cat > conftest.$ac_ext <<EOF
9035 #line 9036 "configure"
9036 #include "confdefs.h"
9037 #include <X11/$athena_variant/XawInit.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   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9056 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9057 echo "configure:9058: checking for X11/$athena_variant/ThreeD.h" >&5
9058
9059 cat > conftest.$ac_ext <<EOF
9060 #line 9061 "configure"
9061 #include "confdefs.h"
9062 #include <X11/$athena_variant/ThreeD.h>
9063 EOF
9064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9065 { (eval echo configure:9066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9066 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9067 if test -z "$ac_err"; then
9068   rm -rf conftest*
9069   eval "ac_cv_header_$ac_safe=yes"
9070 else
9071   echo "$ac_err" >&5
9072   echo "configure: failed program was:" >&5
9073   cat conftest.$ac_ext >&5
9074   rm -rf conftest*
9075   eval "ac_cv_header_$ac_safe=no"
9076 fi
9077 rm -f conftest*
9078 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9079   echo "$ac_t""yes" 1>&6
9080   athena_h_path=X11/$athena_variant
9081 else
9082   echo "$ac_t""no" 1>&6
9083 fi
9084
9085 else
9086   echo "$ac_t""no" 1>&6
9087 fi
9088
9089
9090         if test -z "$athena_h_path"; then
9091       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9092 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9093 echo "configure:9094: checking for $athena_variant/XawInit.h" >&5
9094
9095 cat > conftest.$ac_ext <<EOF
9096 #line 9097 "configure"
9097 #include "confdefs.h"
9098 #include <$athena_variant/XawInit.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   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9117 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9118 echo "configure:9119: checking for $athena_variant/ThreeD.h" >&5
9119
9120 cat > conftest.$ac_ext <<EOF
9121 #line 9122 "configure"
9122 #include "confdefs.h"
9123 #include <$athena_variant/ThreeD.h>
9124 EOF
9125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9126 { (eval echo configure:9127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9128 if test -z "$ac_err"; then
9129   rm -rf conftest*
9130   eval "ac_cv_header_$ac_safe=yes"
9131 else
9132   echo "$ac_err" >&5
9133   echo "configure: failed program was:" >&5
9134   cat conftest.$ac_ext >&5
9135   rm -rf conftest*
9136   eval "ac_cv_header_$ac_safe=no"
9137 fi
9138 rm -f conftest*
9139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9140   echo "$ac_t""yes" 1>&6
9141   athena_h_path=$athena_variant
9142 else
9143   echo "$ac_t""no" 1>&6
9144 fi
9145
9146 else
9147   echo "$ac_t""no" 1>&6
9148 fi
9149
9150     fi
9151
9152         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9153       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9154 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9155 echo "configure:9156: checking for X11/Xaw3d/XawInit.h" >&5
9156
9157 cat > conftest.$ac_ext <<EOF
9158 #line 9159 "configure"
9159 #include "confdefs.h"
9160 #include <X11/Xaw3d/XawInit.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   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9179 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9180 echo "configure:9181: checking for X11/Xaw3d/ThreeD.h" >&5
9181
9182 cat > conftest.$ac_ext <<EOF
9183 #line 9184 "configure"
9184 #include "confdefs.h"
9185 #include <X11/Xaw3d/ThreeD.h>
9186 EOF
9187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9188 { (eval echo configure:9189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9190 if test -z "$ac_err"; then
9191   rm -rf conftest*
9192   eval "ac_cv_header_$ac_safe=yes"
9193 else
9194   echo "$ac_err" >&5
9195   echo "configure: failed program was:" >&5
9196   cat conftest.$ac_ext >&5
9197   rm -rf conftest*
9198   eval "ac_cv_header_$ac_safe=no"
9199 fi
9200 rm -f conftest*
9201 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9202   echo "$ac_t""yes" 1>&6
9203   
9204             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9205             athena_h_path=X11/Xaw3d
9206           
9207 else
9208   echo "$ac_t""no" 1>&6
9209 fi
9210
9211 else
9212   echo "$ac_t""no" 1>&6
9213 fi
9214
9215     fi
9216
9217         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9218       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9219 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9220 echo "configure:9221: checking for Xaw3d/XawInit.h" >&5
9221
9222 cat > conftest.$ac_ext <<EOF
9223 #line 9224 "configure"
9224 #include "confdefs.h"
9225 #include <Xaw3d/XawInit.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   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9244 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9245 echo "configure:9246: checking for Xaw3d/ThreeD.h" >&5
9246
9247 cat > conftest.$ac_ext <<EOF
9248 #line 9249 "configure"
9249 #include "confdefs.h"
9250 #include <Xaw3d/ThreeD.h>
9251 EOF
9252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9253 { (eval echo configure:9254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9255 if test -z "$ac_err"; then
9256   rm -rf conftest*
9257   eval "ac_cv_header_$ac_safe=yes"
9258 else
9259   echo "$ac_err" >&5
9260   echo "configure: failed program was:" >&5
9261   cat conftest.$ac_ext >&5
9262   rm -rf conftest*
9263   eval "ac_cv_header_$ac_safe=no"
9264 fi
9265 rm -f conftest*
9266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9267   echo "$ac_t""yes" 1>&6
9268   
9269             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9270             athena_h_path=Xaw3d
9271           
9272 else
9273   echo "$ac_t""no" 1>&6
9274 fi
9275
9276 else
9277   echo "$ac_t""no" 1>&6
9278 fi
9279
9280     fi
9281
9282             if test -z "$athena_h_path"; then
9283       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9284 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9285 echo "configure:9286: checking for X11/Xaw/ThreeD.h" >&5
9286
9287 cat > conftest.$ac_ext <<EOF
9288 #line 9289 "configure"
9289 #include "confdefs.h"
9290 #include <X11/Xaw/ThreeD.h>
9291 EOF
9292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9293 { (eval echo configure:9294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9295 if test -z "$ac_err"; then
9296   rm -rf conftest*
9297   eval "ac_cv_header_$ac_safe=yes"
9298 else
9299   echo "$ac_err" >&5
9300   echo "configure: failed program was:" >&5
9301   cat conftest.$ac_ext >&5
9302   rm -rf conftest*
9303   eval "ac_cv_header_$ac_safe=no"
9304 fi
9305 rm -f conftest*
9306 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9307   echo "$ac_t""yes" 1>&6
9308   
9309           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9310           athena_h_path=X11/Xaw
9311         
9312 else
9313   echo "$ac_t""no" 1>&6
9314 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9315 fi
9316
9317     fi
9318   fi
9319
9320     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9321     have_xaw=yes
9322   else
9323     have_xaw=no
9324   fi
9325
9326 else
9327   have_xaw=no
9328 fi 
9329 if test "$with_x11" = "yes"; then
9330     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9331 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9332 echo "configure:9333: checking for Xm/Xm.h" >&5
9333
9334 cat > conftest.$ac_ext <<EOF
9335 #line 9336 "configure"
9336 #include "confdefs.h"
9337 #include <Xm/Xm.h>
9338 EOF
9339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9340 { (eval echo configure:9341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9342 if test -z "$ac_err"; then
9343   rm -rf conftest*
9344   eval "ac_cv_header_$ac_safe=yes"
9345 else
9346   echo "$ac_err" >&5
9347   echo "configure: failed program was:" >&5
9348   cat conftest.$ac_ext >&5
9349   rm -rf conftest*
9350   eval "ac_cv_header_$ac_safe=no"
9351 fi
9352 rm -f conftest*
9353 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9354   echo "$ac_t""yes" 1>&6
9355   
9356 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9357 echo "configure:9358: checking for XmStringFree in -lXm" >&5
9358 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9359
9360 xe_check_libs=" -lXm "
9361 cat > conftest.$ac_ext <<EOF
9362 #line 9363 "configure"
9363 #include "confdefs.h"
9364 /* Override any gcc2 internal prototype to avoid an error.  */
9365 /* We use char because int might match the return type of a gcc2
9366     builtin and then its argument prototype would still apply.  */
9367 char XmStringFree();
9368
9369 int main() {
9370 XmStringFree()
9371 ; return 0; }
9372 EOF
9373 if { (eval echo configure:9374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9374   rm -rf conftest*
9375   eval "ac_cv_lib_$ac_lib_var=yes"
9376 else
9377   echo "configure: failed program was:" >&5
9378   cat conftest.$ac_ext >&5
9379   rm -rf conftest*
9380   eval "ac_cv_lib_$ac_lib_var=no"
9381 fi
9382 rm -f conftest*
9383 xe_check_libs=""
9384
9385 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9386   echo "$ac_t""yes" 1>&6
9387   have_motif=yes
9388 else
9389   echo "$ac_t""no" 1>&6
9390 have_motif=no
9391 fi
9392
9393
9394 else
9395   echo "$ac_t""no" 1>&6
9396 have_motif=no
9397 fi
9398
9399
9400   if test "$have_motif" = "yes"; then
9401         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9402 echo "configure:9403: checking for Lesstif" >&5
9403     cat > conftest.$ac_ext <<EOF
9404 #line 9405 "configure"
9405 #include "confdefs.h"
9406 #include <Xm/Xm.h>
9407 #ifdef LESSTIF_VERSION
9408 yes
9409 #endif
9410
9411 EOF
9412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9413   egrep "yes" >/dev/null 2>&1; then
9414   rm -rf conftest*
9415   have_lesstif=yes
9416 else
9417   rm -rf conftest*
9418   have_lesstif=no
9419 fi
9420 rm -f conftest*
9421
9422   echo "$ac_t""$have_lesstif" 1>&6
9423   fi
9424
9425 fi 
9426
9427 case "$with_menubars" in "" | "yes" | "athena" )
9428   with_menubars="lucid" ;;
9429 esac
9430 case "$with_dialogs" in "" | "yes" | "lucid" )
9431   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9432   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9433   else with_dialogs=no
9434   fi ;;
9435 esac
9436 case "$with_scrollbars" in "" | "yes" )
9437   with_scrollbars="lucid" ;;
9438 esac
9439 case "$with_widgets" in "" | "yes" | "lucid")
9440   if   test "$have_motif" = "yes"; then with_widgets="motif"
9441   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9442   else with_widgets=no
9443   fi ;;
9444 esac
9445
9446 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9447
9448 case "$all_widgets" in
9449   *athena* )
9450     if test "$have_xaw" != "yes"; then
9451       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9452     fi
9453
9454         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9455
9456         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9457
9458                     { test "$extra_verbose" = "yes" && cat << EOF
9459     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9460 EOF
9461 cat >> confdefs.h <<EOF
9462 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9463 EOF
9464 }
9465
9466     { test "$extra_verbose" = "yes" && cat << EOF
9467     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9468 EOF
9469 cat >> confdefs.h <<EOF
9470 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9471 EOF
9472 }
9473
9474     { test "$extra_verbose" = "yes" && cat << EOF
9475     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9476 EOF
9477 cat >> confdefs.h <<EOF
9478 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9479 EOF
9480 }
9481
9482     { test "$extra_verbose" = "yes" && cat << EOF
9483     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9484 EOF
9485 cat >> confdefs.h <<EOF
9486 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9487 EOF
9488 }
9489
9490     { test "$extra_verbose" = "yes" && cat << EOF
9491     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9492 EOF
9493 cat >> confdefs.h <<EOF
9494 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9495 EOF
9496 }
9497
9498     { test "$extra_verbose" = "yes" && cat << EOF
9499     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9500 EOF
9501 cat >> confdefs.h <<EOF
9502 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9503 EOF
9504 }
9505
9506     { test "$extra_verbose" = "yes" && cat << EOF
9507     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9508 EOF
9509 cat >> confdefs.h <<EOF
9510 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9511 EOF
9512 }
9513
9514     { test "$extra_verbose" = "yes" && cat << EOF
9515     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9516 EOF
9517 cat >> confdefs.h <<EOF
9518 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9519 EOF
9520 }
9521
9522     { test "$extra_verbose" = "yes" && cat << EOF
9523     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9524 EOF
9525 cat >> confdefs.h <<EOF
9526 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9527 EOF
9528 }
9529
9530     { test "$extra_verbose" = "yes" && cat << EOF
9531     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9532 EOF
9533 cat >> confdefs.h <<EOF
9534 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9535 EOF
9536 }
9537
9538
9539     { test "$extra_verbose" = "yes" && cat << \EOF
9540     Defining LWLIB_USES_ATHENA
9541 EOF
9542 cat >> confdefs.h <<\EOF
9543 #define LWLIB_USES_ATHENA 1
9544 EOF
9545 }
9546
9547     { test "$extra_verbose" = "yes" && cat << \EOF
9548     Defining NEED_ATHENA
9549 EOF
9550 cat >> confdefs.h <<\EOF
9551 #define NEED_ATHENA 1
9552 EOF
9553 }
9554
9555     need_athena="yes"
9556
9557     if test "$athena_3d" = "yes"; then
9558       { test "$extra_verbose" = "yes" && cat << \EOF
9559     Defining HAVE_ATHENA_3D
9560 EOF
9561 cat >> confdefs.h <<\EOF
9562 #define HAVE_ATHENA_3D 1
9563 EOF
9564 }
9565
9566     fi
9567   ;;
9568 esac
9569
9570 case "$all_widgets" in *motif* )
9571   { test "$extra_verbose" = "yes" && cat << \EOF
9572     Defining LWLIB_USES_MOTIF
9573 EOF
9574 cat >> confdefs.h <<\EOF
9575 #define LWLIB_USES_MOTIF 1
9576 EOF
9577 }
9578
9579   { test "$extra_verbose" = "yes" && cat << \EOF
9580     Defining NEED_MOTIF
9581 EOF
9582 cat >> confdefs.h <<\EOF
9583 #define NEED_MOTIF 1
9584 EOF
9585 }
9586
9587   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9588   need_motif=yes ;;
9589 esac
9590
9591 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9592 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9593 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9594 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9595         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9596 case "$with_widgets" in athena* )
9597         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;;
9598 esac
9599 case "$all_widgets" in *lucid* )
9600   { test "$extra_verbose" = "yes" && cat << \EOF
9601     Defining NEED_LUCID
9602 EOF
9603 cat >> confdefs.h <<\EOF
9604 #define NEED_LUCID 1
9605 EOF
9606 }
9607
9608   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9609 esac
9610
9611
9612
9613 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9614     Defining LWLIB_SCROLLBARS_ATHENA
9615 EOF
9616 cat >> confdefs.h <<\EOF
9617 #define LWLIB_SCROLLBARS_ATHENA 1
9618 EOF
9619 }
9620
9621 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9622     Defining LWLIB_DIALOGS_ATHENA
9623 EOF
9624 cat >> confdefs.h <<\EOF
9625 #define LWLIB_DIALOGS_ATHENA 1
9626 EOF
9627 }
9628
9629
9630 if test "$athena_3d" = "yes"; then
9631   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9632     Defining LWLIB_SCROLLBARS_ATHENA3D
9633 EOF
9634 cat >> confdefs.h <<\EOF
9635 #define LWLIB_SCROLLBARS_ATHENA3D 1
9636 EOF
9637 }
9638
9639   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9640     Defining LWLIB_DIALOGS_ATHENA3D
9641 EOF
9642 cat >> confdefs.h <<\EOF
9643 #define LWLIB_DIALOGS_ATHENA3D 1
9644 EOF
9645 }
9646
9647 fi
9648
9649 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9650     Defining LWLIB_WIDGETS_ATHENA
9651 EOF
9652 cat >> confdefs.h <<\EOF
9653 #define LWLIB_WIDGETS_ATHENA 1
9654 EOF
9655 }
9656 ;; esac
9657 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9658         { test "$extra_verbose" = "yes" && cat << \EOF
9659     Defining LWLIB_TABS_LUCID
9660 EOF
9661 cat >> confdefs.h <<\EOF
9662 #define LWLIB_TABS_LUCID 1
9663 EOF
9664 }
9665
9666
9667 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9668     Defining HAVE_MENUBARS
9669 EOF
9670 cat >> confdefs.h <<\EOF
9671 #define HAVE_MENUBARS 1
9672 EOF
9673 }
9674
9675 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9676     Defining HAVE_SCROLLBARS
9677 EOF
9678 cat >> confdefs.h <<\EOF
9679 #define HAVE_SCROLLBARS 1
9680 EOF
9681 }
9682
9683 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9684     Defining HAVE_DIALOGS
9685 EOF
9686 cat >> confdefs.h <<\EOF
9687 #define HAVE_DIALOGS 1
9688 EOF
9689 }
9690
9691 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9692     Defining HAVE_TOOLBARS
9693 EOF
9694 cat >> confdefs.h <<\EOF
9695 #define HAVE_TOOLBARS 1
9696 EOF
9697 }
9698
9699 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9700     Defining HAVE_WIDGETS
9701 EOF
9702 cat >> confdefs.h <<\EOF
9703 #define HAVE_WIDGETS 1
9704 EOF
9705 }
9706
9707
9708 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9709     Defining LWLIB_MENUBARS_LUCID
9710 EOF
9711 cat >> confdefs.h <<\EOF
9712 #define LWLIB_MENUBARS_LUCID 1
9713 EOF
9714 }
9715
9716 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9717     Defining LWLIB_SCROLLBARS_LUCID
9718 EOF
9719 cat >> confdefs.h <<\EOF
9720 #define LWLIB_SCROLLBARS_LUCID 1
9721 EOF
9722 }
9723
9724
9725 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9726     Defining LWLIB_MENUBARS_MOTIF
9727 EOF
9728 cat >> confdefs.h <<\EOF
9729 #define LWLIB_MENUBARS_MOTIF 1
9730 EOF
9731 }
9732
9733 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9734     Defining LWLIB_SCROLLBARS_MOTIF
9735 EOF
9736 cat >> confdefs.h <<\EOF
9737 #define LWLIB_SCROLLBARS_MOTIF 1
9738 EOF
9739 }
9740
9741 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9742     Defining LWLIB_DIALOGS_MOTIF
9743 EOF
9744 cat >> confdefs.h <<\EOF
9745 #define LWLIB_DIALOGS_MOTIF 1
9746 EOF
9747 }
9748
9749 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9750     Defining LWLIB_WIDGETS_MOTIF
9751 EOF
9752 cat >> confdefs.h <<\EOF
9753 #define LWLIB_WIDGETS_MOTIF 1
9754 EOF
9755 }
9756
9757
9758 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9759    echo "    xemacs will be linked with \"menubar.o\""
9760  fi
9761 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9762    echo "    xemacs will be linked with \"scrollbar.o\""
9763  fi
9764 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9765    echo "    xemacs will be linked with \"dialog.o\""
9766  fi
9767 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9768    echo "    xemacs will be linked with \"toolbar.o\""
9769  fi
9770
9771 if test "$with_gtk" = "yes"; then
9772   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9773    echo "    xemacs will be linked with \"menubar-gtk.o\""
9774  fi
9775   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9776    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9777  fi
9778   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9779    echo "    xemacs will be linked with \"dialog-gtk.o\""
9780  fi
9781   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9782    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9783  fi
9784   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9785    echo "    xemacs will be linked with \"gui-gtk.o\""
9786  fi
9787 fi
9788
9789 if test "$with_x11" = "yes"; then
9790   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9791    echo "    xemacs will be linked with \"menubar-x.o\""
9792  fi
9793   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9794    echo "    xemacs will be linked with \"scrollbar-x.o\""
9795  fi
9796   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9797    echo "    xemacs will be linked with \"dialog-x.o\""
9798  fi
9799   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9800    echo "    xemacs will be linked with \"toolbar-x.o\""
9801  fi
9802   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9803    echo "    xemacs will be linked with \"gui-x.o\""
9804  fi
9805 fi
9806
9807
9808 test -z "$with_mule" && with_mule=no
9809 test -z "$with_file_coding" && with_file_coding=no
9810
9811
9812 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9813   { test "$extra_verbose" = "yes" && cat << \EOF
9814     Defining FILE_CODING
9815 EOF
9816 cat >> confdefs.h <<\EOF
9817 #define FILE_CODING 1
9818 EOF
9819 }
9820
9821   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9822    echo "    xemacs will be linked with \"file-coding.o\""
9823  fi
9824 fi
9825
9826 if test "$with_mule" = "yes" ; then
9827   echo "checking for Mule-related features" 1>&6
9828 echo "configure:9829: checking for Mule-related features" >&5
9829   { test "$extra_verbose" = "yes" && cat << \EOF
9830     Defining MULE
9831 EOF
9832 cat >> confdefs.h <<\EOF
9833 #define MULE 1
9834 EOF
9835 }
9836
9837   { test "$extra_verbose" = "yes" && cat << \EOF
9838     Defining FILE_CODING
9839 EOF
9840 cat >> confdefs.h <<\EOF
9841 #define FILE_CODING 1
9842 EOF
9843 }
9844
9845   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9846    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9847  fi
9848
9849     for ac_hdr in libintl.h
9850 do
9851 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9852 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9853 echo "configure:9854: checking for $ac_hdr" >&5
9854
9855 cat > conftest.$ac_ext <<EOF
9856 #line 9857 "configure"
9857 #include "confdefs.h"
9858 #include <$ac_hdr>
9859 EOF
9860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9861 { (eval echo configure:9862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9863 if test -z "$ac_err"; then
9864   rm -rf conftest*
9865   eval "ac_cv_header_$ac_safe=yes"
9866 else
9867   echo "$ac_err" >&5
9868   echo "configure: failed program was:" >&5
9869   cat conftest.$ac_ext >&5
9870   rm -rf conftest*
9871   eval "ac_cv_header_$ac_safe=no"
9872 fi
9873 rm -f conftest*
9874 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9875   echo "$ac_t""yes" 1>&6
9876     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9877   { test "$extra_verbose" = "yes" && cat << EOF
9878     Defining $ac_tr_hdr
9879 EOF
9880 cat >> confdefs.h <<EOF
9881 #define $ac_tr_hdr 1
9882 EOF
9883 }
9884  
9885 else
9886   echo "$ac_t""no" 1>&6
9887 fi
9888 done
9889
9890   
9891 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9892 echo "configure:9893: checking for strerror in -lintl" >&5
9893 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9894
9895 xe_check_libs=" -lintl "
9896 cat > conftest.$ac_ext <<EOF
9897 #line 9898 "configure"
9898 #include "confdefs.h"
9899 /* Override any gcc2 internal prototype to avoid an error.  */
9900 /* We use char because int might match the return type of a gcc2
9901     builtin and then its argument prototype would still apply.  */
9902 char strerror();
9903
9904 int main() {
9905 strerror()
9906 ; return 0; }
9907 EOF
9908 if { (eval echo configure:9909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9909   rm -rf conftest*
9910   eval "ac_cv_lib_$ac_lib_var=yes"
9911 else
9912   echo "configure: failed program was:" >&5
9913   cat conftest.$ac_ext >&5
9914   rm -rf conftest*
9915   eval "ac_cv_lib_$ac_lib_var=no"
9916 fi
9917 rm -f conftest*
9918 xe_check_libs=""
9919
9920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9921   echo "$ac_t""yes" 1>&6
9922     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9923     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9924   { test "$extra_verbose" = "yes" && cat << EOF
9925     Defining $ac_tr_lib
9926 EOF
9927 cat >> confdefs.h <<EOF
9928 #define $ac_tr_lib 1
9929 EOF
9930 }
9931
9932   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9933
9934 else
9935   echo "$ac_t""no" 1>&6
9936 fi
9937
9938
9939
9940   echo "checking for Mule input methods" 1>&6
9941 echo "configure:9942: checking for Mule input methods" >&5
9942         case "$with_xim" in "" | "yes" )
9943     echo "checking for XIM" 1>&6
9944 echo "configure:9945: checking for XIM" >&5
9945     
9946 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9947 echo "configure:9948: checking for XOpenIM in -lX11" >&5
9948 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9949
9950 xe_check_libs=" -lX11 "
9951 cat > conftest.$ac_ext <<EOF
9952 #line 9953 "configure"
9953 #include "confdefs.h"
9954 /* Override any gcc2 internal prototype to avoid an error.  */
9955 /* We use char because int might match the return type of a gcc2
9956     builtin and then its argument prototype would still apply.  */
9957 char XOpenIM();
9958
9959 int main() {
9960 XOpenIM()
9961 ; return 0; }
9962 EOF
9963 if { (eval echo configure:9964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9964   rm -rf conftest*
9965   eval "ac_cv_lib_$ac_lib_var=yes"
9966 else
9967   echo "configure: failed program was:" >&5
9968   cat conftest.$ac_ext >&5
9969   rm -rf conftest*
9970   eval "ac_cv_lib_$ac_lib_var=no"
9971 fi
9972 rm -f conftest*
9973 xe_check_libs=""
9974
9975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9976   echo "$ac_t""yes" 1>&6
9977   with_xim=xlib
9978 else
9979   echo "$ac_t""no" 1>&6
9980 with_xim=no
9981 fi
9982
9983
9984         if test "$have_motif $have_lesstif" = "yes no"; then
9985       
9986 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9987 echo "configure:9988: checking for XmImMbLookupString in -lXm" >&5
9988 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9989
9990 xe_check_libs=" -lXm "
9991 cat > conftest.$ac_ext <<EOF
9992 #line 9993 "configure"
9993 #include "confdefs.h"
9994 /* Override any gcc2 internal prototype to avoid an error.  */
9995 /* We use char because int might match the return type of a gcc2
9996     builtin and then its argument prototype would still apply.  */
9997 char XmImMbLookupString();
9998
9999 int main() {
10000 XmImMbLookupString()
10001 ; return 0; }
10002 EOF
10003 if { (eval echo configure:10004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10004   rm -rf conftest*
10005   eval "ac_cv_lib_$ac_lib_var=yes"
10006 else
10007   echo "configure: failed program was:" >&5
10008   cat conftest.$ac_ext >&5
10009   rm -rf conftest*
10010   eval "ac_cv_lib_$ac_lib_var=no"
10011 fi
10012 rm -f conftest*
10013 xe_check_libs=""
10014
10015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10016   echo "$ac_t""yes" 1>&6
10017   with_xim=motif
10018 else
10019   echo "$ac_t""no" 1>&6
10020 fi
10021
10022
10023     fi ;;
10024   esac
10025   if test "$with_xim" != "no"; then
10026     { test "$extra_verbose" = "yes" && cat << \EOF
10027     Defining HAVE_XIM
10028 EOF
10029 cat >> confdefs.h <<\EOF
10030 #define HAVE_XIM 1
10031 EOF
10032 }
10033
10034     if test "$with_xim" = "xlib"; then
10035       { test "$extra_verbose" = "yes" && cat << \EOF
10036     Defining XIM_XLIB
10037 EOF
10038 cat >> confdefs.h <<\EOF
10039 #define XIM_XLIB 1
10040 EOF
10041 }
10042
10043       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10044    echo "    xemacs will be linked with \"input-method-xlib.o\""
10045  fi
10046     fi
10047     if test "$with_xim" = "motif"; then
10048       { test "$extra_verbose" = "yes" && cat << \EOF
10049     Defining XIM_MOTIF
10050 EOF
10051 cat >> confdefs.h <<\EOF
10052 #define XIM_MOTIF 1
10053 EOF
10054 }
10055
10056       need_motif=yes
10057       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10058    echo "    xemacs will be linked with \"input-method-motif.o\""
10059  fi
10060     fi
10061     if test "$with_xim" = "motif"; then
10062       with_xfs=no
10063     fi
10064   fi
10065
10066     if test "$with_xfs" = "yes" ; then
10067     echo "checking for XFontSet" 1>&6
10068 echo "configure:10069: checking for XFontSet" >&5
10069     
10070 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10071 echo "configure:10072: checking for XmbDrawString in -lX11" >&5
10072 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10073
10074 xe_check_libs=" -lX11 "
10075 cat > conftest.$ac_ext <<EOF
10076 #line 10077 "configure"
10077 #include "confdefs.h"
10078 /* Override any gcc2 internal prototype to avoid an error.  */
10079 /* We use char because int might match the return type of a gcc2
10080     builtin and then its argument prototype would still apply.  */
10081 char XmbDrawString();
10082
10083 int main() {
10084 XmbDrawString()
10085 ; return 0; }
10086 EOF
10087 if { (eval echo configure:10088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10088   rm -rf conftest*
10089   eval "ac_cv_lib_$ac_lib_var=yes"
10090 else
10091   echo "configure: failed program was:" >&5
10092   cat conftest.$ac_ext >&5
10093   rm -rf conftest*
10094   eval "ac_cv_lib_$ac_lib_var=no"
10095 fi
10096 rm -f conftest*
10097 xe_check_libs=""
10098
10099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10100   echo "$ac_t""yes" 1>&6
10101   :
10102 else
10103   echo "$ac_t""no" 1>&6
10104 with_xfs=no
10105 fi
10106
10107
10108     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10109       { test "$extra_verbose" = "yes" && cat << \EOF
10110     Defining USE_XFONTSET
10111 EOF
10112 cat >> confdefs.h <<\EOF
10113 #define USE_XFONTSET 1
10114 EOF
10115 }
10116
10117       if test "$with_xim" = "no" ; then
10118         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10119    echo "    xemacs will be linked with \"input-method-xlib.o\""
10120  fi
10121       fi
10122     fi
10123   fi 
10124     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10125   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10126 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10127 echo "configure:10128: checking for wnn/jllib.h" >&5
10128
10129 cat > conftest.$ac_ext <<EOF
10130 #line 10131 "configure"
10131 #include "confdefs.h"
10132 #include <wnn/jllib.h>
10133 EOF
10134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10135 { (eval echo configure:10136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10136 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10137 if test -z "$ac_err"; then
10138   rm -rf conftest*
10139   eval "ac_cv_header_$ac_safe=yes"
10140 else
10141   echo "$ac_err" >&5
10142   echo "configure: failed program was:" >&5
10143   cat conftest.$ac_ext >&5
10144   rm -rf conftest*
10145   eval "ac_cv_header_$ac_safe=no"
10146 fi
10147 rm -f conftest*
10148 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10149   echo "$ac_t""yes" 1>&6
10150   :
10151 else
10152   echo "$ac_t""no" 1>&6
10153 with_wnn=no
10154 fi
10155  }
10156     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10157 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10158 echo "configure:10159: checking for wnn/commonhd.h" >&5
10159
10160 cat > conftest.$ac_ext <<EOF
10161 #line 10162 "configure"
10162 #include "confdefs.h"
10163 #include <wnn/commonhd.h>
10164 EOF
10165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10166 { (eval echo configure:10167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10168 if test -z "$ac_err"; then
10169   rm -rf conftest*
10170   eval "ac_cv_header_$ac_safe=yes"
10171 else
10172   echo "$ac_err" >&5
10173   echo "configure: failed program was:" >&5
10174   cat conftest.$ac_ext >&5
10175   rm -rf conftest*
10176   eval "ac_cv_header_$ac_safe=no"
10177 fi
10178 rm -f conftest*
10179 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10180   echo "$ac_t""yes" 1>&6
10181   :
10182 else
10183   echo "$ac_t""no" 1>&6
10184 with_wnn=no
10185 fi
10186  }
10187     if test "$with_wnn" != "no"; then
10188     for ac_func in crypt
10189 do
10190 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10191 echo "configure:10192: checking for $ac_func" >&5
10192
10193 cat > conftest.$ac_ext <<EOF
10194 #line 10195 "configure"
10195 #include "confdefs.h"
10196 /* System header to define __stub macros and hopefully few prototypes,
10197     which can conflict with char $ac_func(); below.  */
10198 #include <assert.h>
10199 /* Override any gcc2 internal prototype to avoid an error.  */
10200 /* We use char because int might match the return type of a gcc2
10201     builtin and then its argument prototype would still apply.  */
10202 char $ac_func();
10203
10204 int main() {
10205
10206 /* The GNU C library defines this for functions which it implements
10207     to always fail with ENOSYS.  Some functions are actually named
10208     something starting with __ and the normal name is an alias.  */
10209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10210 choke me
10211 #else
10212 $ac_func();
10213 #endif
10214
10215 ; return 0; }
10216 EOF
10217 if { (eval echo configure:10218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10218   rm -rf conftest*
10219   eval "ac_cv_func_$ac_func=yes"
10220 else
10221   echo "configure: failed program was:" >&5
10222   cat conftest.$ac_ext >&5
10223   rm -rf conftest*
10224   eval "ac_cv_func_$ac_func=no"
10225 fi
10226 rm -f conftest*
10227
10228 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10229   echo "$ac_t""yes" 1>&6
10230     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10231   { test "$extra_verbose" = "yes" && cat << EOF
10232     Defining $ac_tr_func
10233 EOF
10234 cat >> confdefs.h <<EOF
10235 #define $ac_tr_func 1
10236 EOF
10237 }
10238  
10239 else
10240   echo "$ac_t""no" 1>&6
10241 fi
10242 done
10243
10244     test "$ac_cv_func_crypt" != "yes" && { 
10245 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10246 echo "configure:10247: checking for crypt in -lcrypt" >&5
10247 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10248
10249 xe_check_libs=" -lcrypt "
10250 cat > conftest.$ac_ext <<EOF
10251 #line 10252 "configure"
10252 #include "confdefs.h"
10253 /* Override any gcc2 internal prototype to avoid an error.  */
10254 /* We use char because int might match the return type of a gcc2
10255     builtin and then its argument prototype would still apply.  */
10256 char crypt();
10257
10258 int main() {
10259 crypt()
10260 ; return 0; }
10261 EOF
10262 if { (eval echo configure:10263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10263   rm -rf conftest*
10264   eval "ac_cv_lib_$ac_lib_var=yes"
10265 else
10266   echo "configure: failed program was:" >&5
10267   cat conftest.$ac_ext >&5
10268   rm -rf conftest*
10269   eval "ac_cv_lib_$ac_lib_var=no"
10270 fi
10271 rm -f conftest*
10272 xe_check_libs=""
10273
10274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10275   echo "$ac_t""yes" 1>&6
10276     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10277     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10278   { test "$extra_verbose" = "yes" && cat << EOF
10279     Defining $ac_tr_lib
10280 EOF
10281 cat >> confdefs.h <<EOF
10282 #define $ac_tr_lib 1
10283 EOF
10284 }
10285
10286   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10287
10288 else
10289   echo "$ac_t""no" 1>&6
10290 fi
10291
10292  }
10293   fi
10294     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10295     
10296 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10297 echo "configure:10298: checking for jl_dic_list_e in -lwnn" >&5
10298 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10299
10300 xe_check_libs=" -lwnn "
10301 cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304 /* Override any gcc2 internal prototype to avoid an error.  */
10305 /* We use char because int might match the return type of a gcc2
10306     builtin and then its argument prototype would still apply.  */
10307 char jl_dic_list_e();
10308
10309 int main() {
10310 jl_dic_list_e()
10311 ; return 0; }
10312 EOF
10313 if { (eval echo configure:10314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10314   rm -rf conftest*
10315   eval "ac_cv_lib_$ac_lib_var=yes"
10316 else
10317   echo "configure: failed program was:" >&5
10318   cat conftest.$ac_ext >&5
10319   rm -rf conftest*
10320   eval "ac_cv_lib_$ac_lib_var=no"
10321 fi
10322 rm -f conftest*
10323 xe_check_libs=""
10324
10325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10326   echo "$ac_t""yes" 1>&6
10327   libwnn=wnn
10328 else
10329   echo "$ac_t""no" 1>&6
10330 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10331 echo "configure:10332: checking for jl_dic_list_e in -lwnn4" >&5
10332 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10333
10334 xe_check_libs=" -lwnn4 "
10335 cat > conftest.$ac_ext <<EOF
10336 #line 10337 "configure"
10337 #include "confdefs.h"
10338 /* Override any gcc2 internal prototype to avoid an error.  */
10339 /* We use char because int might match the return type of a gcc2
10340     builtin and then its argument prototype would still apply.  */
10341 char jl_dic_list_e();
10342
10343 int main() {
10344 jl_dic_list_e()
10345 ; return 0; }
10346 EOF
10347 if { (eval echo configure:10348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10348   rm -rf conftest*
10349   eval "ac_cv_lib_$ac_lib_var=yes"
10350 else
10351   echo "configure: failed program was:" >&5
10352   cat conftest.$ac_ext >&5
10353   rm -rf conftest*
10354   eval "ac_cv_lib_$ac_lib_var=no"
10355 fi
10356 rm -f conftest*
10357 xe_check_libs=""
10358
10359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10360   echo "$ac_t""yes" 1>&6
10361   libwnn=wnn4
10362 else
10363   echo "$ac_t""no" 1>&6
10364 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10365 echo "configure:10366: checking for jl_dic_list_e in -lwnn6" >&5
10366 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10367
10368 xe_check_libs=" -lwnn6 "
10369 cat > conftest.$ac_ext <<EOF
10370 #line 10371 "configure"
10371 #include "confdefs.h"
10372 /* Override any gcc2 internal prototype to avoid an error.  */
10373 /* We use char because int might match the return type of a gcc2
10374     builtin and then its argument prototype would still apply.  */
10375 char jl_dic_list_e();
10376
10377 int main() {
10378 jl_dic_list_e()
10379 ; return 0; }
10380 EOF
10381 if { (eval echo configure:10382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10382   rm -rf conftest*
10383   eval "ac_cv_lib_$ac_lib_var=yes"
10384 else
10385   echo "configure: failed program was:" >&5
10386   cat conftest.$ac_ext >&5
10387   rm -rf conftest*
10388   eval "ac_cv_lib_$ac_lib_var=no"
10389 fi
10390 rm -f conftest*
10391 xe_check_libs=""
10392
10393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10394   echo "$ac_t""yes" 1>&6
10395   libwnn=wnn6
10396 else
10397   echo "$ac_t""no" 1>&6
10398 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10399 echo "configure:10400: checking for dic_list_e in -lwnn6_fromsrc" >&5
10400 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10401
10402 xe_check_libs=" -lwnn6_fromsrc "
10403 cat > conftest.$ac_ext <<EOF
10404 #line 10405 "configure"
10405 #include "confdefs.h"
10406 /* Override any gcc2 internal prototype to avoid an error.  */
10407 /* We use char because int might match the return type of a gcc2
10408     builtin and then its argument prototype would still apply.  */
10409 char dic_list_e();
10410
10411 int main() {
10412 dic_list_e()
10413 ; return 0; }
10414 EOF
10415 if { (eval echo configure:10416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10416   rm -rf conftest*
10417   eval "ac_cv_lib_$ac_lib_var=yes"
10418 else
10419   echo "configure: failed program was:" >&5
10420   cat conftest.$ac_ext >&5
10421   rm -rf conftest*
10422   eval "ac_cv_lib_$ac_lib_var=no"
10423 fi
10424 rm -f conftest*
10425 xe_check_libs=""
10426
10427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10428   echo "$ac_t""yes" 1>&6
10429   libwnn=wnn6_fromsrc
10430 else
10431   echo "$ac_t""no" 1>&6
10432 with_wnn=no
10433 fi
10434
10435
10436 fi
10437
10438
10439 fi
10440
10441
10442 fi
10443
10444
10445   fi
10446   test -z "$with_wnn" && with_wnn=yes
10447   if test "$with_wnn" = "yes"; then
10448     { test "$extra_verbose" = "yes" && cat << \EOF
10449     Defining HAVE_WNN
10450 EOF
10451 cat >> confdefs.h <<\EOF
10452 #define HAVE_WNN 1
10453 EOF
10454 }
10455
10456     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10457     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10458    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10459  fi
10460     if test "$with_wnn6" != "no"; then
10461       
10462 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10463 echo "configure:10464: checking for jl_fi_dic_list in -l$libwnn" >&5
10464 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10465
10466 xe_check_libs=" -l$libwnn "
10467 cat > conftest.$ac_ext <<EOF
10468 #line 10469 "configure"
10469 #include "confdefs.h"
10470 /* Override any gcc2 internal prototype to avoid an error.  */
10471 /* We use char because int might match the return type of a gcc2
10472     builtin and then its argument prototype would still apply.  */
10473 char jl_fi_dic_list();
10474
10475 int main() {
10476 jl_fi_dic_list()
10477 ; return 0; }
10478 EOF
10479 if { (eval echo configure:10480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10480   rm -rf conftest*
10481   eval "ac_cv_lib_$ac_lib_var=yes"
10482 else
10483   echo "configure: failed program was:" >&5
10484   cat conftest.$ac_ext >&5
10485   rm -rf conftest*
10486   eval "ac_cv_lib_$ac_lib_var=no"
10487 fi
10488 rm -f conftest*
10489 xe_check_libs=""
10490
10491 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10492   echo "$ac_t""yes" 1>&6
10493   with_wnn6=yes
10494 else
10495   echo "$ac_t""no" 1>&6
10496 fi
10497
10498
10499       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10500     Defining WNN6
10501 EOF
10502 cat >> confdefs.h <<\EOF
10503 #define WNN6 1
10504 EOF
10505 }
10506
10507     fi
10508   fi
10509
10510     canna_includes_found=no
10511   if test "$with_canna" != "no"; then
10512     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10513 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10514 echo "configure:10515: checking for canna/jrkanji.h" >&5
10515
10516 cat > conftest.$ac_ext <<EOF
10517 #line 10518 "configure"
10518 #include "confdefs.h"
10519 #include <canna/jrkanji.h>
10520 EOF
10521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10522 { (eval echo configure:10523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10524 if test -z "$ac_err"; then
10525   rm -rf conftest*
10526   eval "ac_cv_header_$ac_safe=yes"
10527 else
10528   echo "$ac_err" >&5
10529   echo "configure: failed program was:" >&5
10530   cat conftest.$ac_ext >&5
10531   rm -rf conftest*
10532   eval "ac_cv_header_$ac_safe=no"
10533 fi
10534 rm -f conftest*
10535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10536   echo "$ac_t""yes" 1>&6
10537   canna_includes_found=yes
10538 else
10539   echo "$ac_t""no" 1>&6
10540 fi
10541
10542   fi
10543   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10544       -d "/usr/local/canna/include"; then
10545     save_c_switch_site="$c_switch_site"
10546     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10547     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10548 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10549 echo "configure:10550: checking for canna/jrkanji.h" >&5
10550
10551 cat > conftest.$ac_ext <<EOF
10552 #line 10553 "configure"
10553 #include "confdefs.h"
10554 #include <canna/jrkanji.h>
10555 EOF
10556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10557 { (eval echo configure:10558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10559 if test -z "$ac_err"; then
10560   rm -rf conftest*
10561   eval "ac_cv_header_$ac_safe=yes"
10562 else
10563   echo "$ac_err" >&5
10564   echo "configure: failed program was:" >&5
10565   cat conftest.$ac_ext >&5
10566   rm -rf conftest*
10567   eval "ac_cv_header_$ac_safe=no"
10568 fi
10569 rm -f conftest*
10570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10571   echo "$ac_t""yes" 1>&6
10572   canna_includes_found=yes
10573 else
10574   echo "$ac_t""no" 1>&6
10575 fi
10576
10577     if test "$canna_includes_found" != "yes"; then
10578       c_switch_site="$save_c_switch_site"
10579       with_canna="no"
10580     fi
10581   fi
10582
10583   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10584 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10585 echo "configure:10586: checking for canna/RK.h" >&5
10586
10587 cat > conftest.$ac_ext <<EOF
10588 #line 10589 "configure"
10589 #include "confdefs.h"
10590 #include <canna/RK.h>
10591 EOF
10592 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10593 { (eval echo configure:10594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10594 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10595 if test -z "$ac_err"; then
10596   rm -rf conftest*
10597   eval "ac_cv_header_$ac_safe=yes"
10598 else
10599   echo "$ac_err" >&5
10600   echo "configure: failed program was:" >&5
10601   cat conftest.$ac_ext >&5
10602   rm -rf conftest*
10603   eval "ac_cv_header_$ac_safe=no"
10604 fi
10605 rm -f conftest*
10606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10607   echo "$ac_t""yes" 1>&6
10608   :
10609 else
10610   echo "$ac_t""no" 1>&6
10611 with_canna=no
10612 fi
10613  }
10614   test -z "$with_canna" && { 
10615 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10616 echo "configure:10617: checking for RkBgnBun in -lRKC" >&5
10617 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10618
10619 xe_check_libs=" -lRKC "
10620 cat > conftest.$ac_ext <<EOF
10621 #line 10622 "configure"
10622 #include "confdefs.h"
10623 /* Override any gcc2 internal prototype to avoid an error.  */
10624 /* We use char because int might match the return type of a gcc2
10625     builtin and then its argument prototype would still apply.  */
10626 char RkBgnBun();
10627
10628 int main() {
10629 RkBgnBun()
10630 ; return 0; }
10631 EOF
10632 if { (eval echo configure:10633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10633   rm -rf conftest*
10634   eval "ac_cv_lib_$ac_lib_var=yes"
10635 else
10636   echo "configure: failed program was:" >&5
10637   cat conftest.$ac_ext >&5
10638   rm -rf conftest*
10639   eval "ac_cv_lib_$ac_lib_var=no"
10640 fi
10641 rm -f conftest*
10642 xe_check_libs=""
10643
10644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10645   echo "$ac_t""yes" 1>&6
10646   :
10647 else
10648   echo "$ac_t""no" 1>&6
10649 with_canna=no
10650 fi
10651
10652  }
10653   test -z "$with_canna" && { 
10654 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10655 echo "configure:10656: checking for jrKanjiControl in -lcanna" >&5
10656 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10657
10658 xe_check_libs=" -lcanna "
10659 cat > conftest.$ac_ext <<EOF
10660 #line 10661 "configure"
10661 #include "confdefs.h"
10662 /* Override any gcc2 internal prototype to avoid an error.  */
10663 /* We use char because int might match the return type of a gcc2
10664     builtin and then its argument prototype would still apply.  */
10665 char jrKanjiControl();
10666
10667 int main() {
10668 jrKanjiControl()
10669 ; return 0; }
10670 EOF
10671 if { (eval echo configure:10672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10672   rm -rf conftest*
10673   eval "ac_cv_lib_$ac_lib_var=yes"
10674 else
10675   echo "configure: failed program was:" >&5
10676   cat conftest.$ac_ext >&5
10677   rm -rf conftest*
10678   eval "ac_cv_lib_$ac_lib_var=no"
10679 fi
10680 rm -f conftest*
10681 xe_check_libs=""
10682
10683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10684   echo "$ac_t""yes" 1>&6
10685   :
10686 else
10687   echo "$ac_t""no" 1>&6
10688 with_canna=no
10689 fi
10690
10691  }
10692   test -z "$with_canna" && with_canna=yes
10693   if test "$with_canna" = "yes"; then
10694     { test "$extra_verbose" = "yes" && cat << \EOF
10695     Defining HAVE_CANNA
10696 EOF
10697 cat >> confdefs.h <<\EOF
10698 #define HAVE_CANNA 1
10699 EOF
10700 }
10701
10702     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10703     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10704    echo "    xemacs will be linked with \"mule-canna.o\""
10705  fi
10706   fi
10707
10708 else   for feature in xim canna wnn; do
10709     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10710       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10711     fi
10712     eval "with_${feature}=no"
10713   done
10714 fi 
10715
10716 if test "$need_motif" = "yes" ; then
10717   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10718     
10719 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10720 echo "configure:10721: checking for layout_object_getvalue in -li18n" >&5
10721 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10722
10723 xe_check_libs=" -li18n "
10724 cat > conftest.$ac_ext <<EOF
10725 #line 10726 "configure"
10726 #include "confdefs.h"
10727 /* Override any gcc2 internal prototype to avoid an error.  */
10728 /* We use char because int might match the return type of a gcc2
10729     builtin and then its argument prototype would still apply.  */
10730 char layout_object_getvalue();
10731
10732 int main() {
10733 layout_object_getvalue()
10734 ; return 0; }
10735 EOF
10736 if { (eval echo configure:10737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10737   rm -rf conftest*
10738   eval "ac_cv_lib_$ac_lib_var=yes"
10739 else
10740   echo "configure: failed program was:" >&5
10741   cat conftest.$ac_ext >&5
10742   rm -rf conftest*
10743   eval "ac_cv_lib_$ac_lib_var=no"
10744 fi
10745 rm -f conftest*
10746 xe_check_libs=""
10747
10748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10749   echo "$ac_t""yes" 1>&6
10750   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10751 else
10752   echo "$ac_t""no" 1>&6
10753 fi
10754
10755
10756   
10757 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10758     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10759   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10760   
10761         runpath="" runpath_dirs=""
10762   if test -n "$LD_RUN_PATH"; then
10763     runpath="$LD_RUN_PATH"
10764   elif test "$GCC" = "yes"; then
10765         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10766     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10767     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10768     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10769       case "$arg" in P,* | -L* | -R* )
10770         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10771           {
10772 xe_runpath_dir="$dir"
10773   test "$xe_runpath_dir" != "/lib"     -a \
10774         "$xe_runpath_dir" != "/usr/lib" -a \
10775         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10776   eval "$xe_add_unique_runpath_dir"
10777 }
10778         done ;;
10779       esac
10780     done
10781     ld_switch_run="$ld_switch_run_save"
10782     rm -f conftest*
10783   else
10784         for arg in $ld_switch_site $ld_switch_x_site; do
10785       case "$arg" in -L*) {
10786 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10787   test "$xe_runpath_dir" != "/lib"     -a \
10788         "$xe_runpath_dir" != "/usr/lib" -a \
10789         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10790   eval "$xe_add_unique_runpath_dir"
10791 };; esac
10792     done
10793         if test "$opsys $need_motif" = "sol2 yes"; then
10794       xe_runpath_dir="/opt/SUNWdt/lib";
10795       eval "$xe_add_unique_runpath_dir";
10796     fi
10797   fi 
10798   if test -n "$runpath"; then
10799     ld_switch_run="${dash_r}${runpath}"
10800     
10801 if test "$GCC" = "yes"; then
10802   set x $ld_switch_run; shift; ld_switch_run=""
10803   while test -n "$1"; do
10804     case $1 in
10805       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10806       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10807       -Xlinker* ) ;;
10808       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10809     esac
10810     shift
10811   done
10812 fi
10813     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10814   fi
10815 fi
10816
10817 fi
10818
10819 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
10820 do
10821 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10822 echo "configure:10823: checking for $ac_func" >&5
10823
10824 cat > conftest.$ac_ext <<EOF
10825 #line 10826 "configure"
10826 #include "confdefs.h"
10827 /* System header to define __stub macros and hopefully few prototypes,
10828     which can conflict with char $ac_func(); below.  */
10829 #include <assert.h>
10830 /* Override any gcc2 internal prototype to avoid an error.  */
10831 /* We use char because int might match the return type of a gcc2
10832     builtin and then its argument prototype would still apply.  */
10833 char $ac_func();
10834
10835 int main() {
10836
10837 /* The GNU C library defines this for functions which it implements
10838     to always fail with ENOSYS.  Some functions are actually named
10839     something starting with __ and the normal name is an alias.  */
10840 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10841 choke me
10842 #else
10843 $ac_func();
10844 #endif
10845
10846 ; return 0; }
10847 EOF
10848 if { (eval echo configure:10849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10849   rm -rf conftest*
10850   eval "ac_cv_func_$ac_func=yes"
10851 else
10852   echo "configure: failed program was:" >&5
10853   cat conftest.$ac_ext >&5
10854   rm -rf conftest*
10855   eval "ac_cv_func_$ac_func=no"
10856 fi
10857 rm -f conftest*
10858
10859 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10860   echo "$ac_t""yes" 1>&6
10861     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10862   { test "$extra_verbose" = "yes" && cat << EOF
10863     Defining $ac_tr_func
10864 EOF
10865 cat >> confdefs.h <<EOF
10866 #define $ac_tr_func 1
10867 EOF
10868 }
10869  
10870 else
10871   echo "$ac_t""no" 1>&6
10872 fi
10873 done
10874
10875
10876
10877 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10878 do
10879 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10880 echo "configure:10881: checking for $ac_func" >&5
10881
10882 cat > conftest.$ac_ext <<EOF
10883 #line 10884 "configure"
10884 #include "confdefs.h"
10885 /* System header to define __stub macros and hopefully few prototypes,
10886     which can conflict with char $ac_func(); below.  */
10887 #include <assert.h>
10888 /* Override any gcc2 internal prototype to avoid an error.  */
10889 /* We use char because int might match the return type of a gcc2
10890     builtin and then its argument prototype would still apply.  */
10891 char $ac_func();
10892
10893 int main() {
10894
10895 /* The GNU C library defines this for functions which it implements
10896     to always fail with ENOSYS.  Some functions are actually named
10897     something starting with __ and the normal name is an alias.  */
10898 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10899 choke me
10900 #else
10901 $ac_func();
10902 #endif
10903
10904 ; return 0; }
10905 EOF
10906 if { (eval echo configure:10907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10907   rm -rf conftest*
10908   eval "ac_cv_func_$ac_func=yes"
10909 else
10910   echo "configure: failed program was:" >&5
10911   cat conftest.$ac_ext >&5
10912   rm -rf conftest*
10913   eval "ac_cv_func_$ac_func=no"
10914 fi
10915 rm -f conftest*
10916
10917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10918   echo "$ac_t""yes" 1>&6
10919     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10920   { test "$extra_verbose" = "yes" && cat << EOF
10921     Defining $ac_tr_func
10922 EOF
10923 cat >> confdefs.h <<EOF
10924 #define $ac_tr_func 1
10925 EOF
10926 }
10927  
10928 else
10929   echo "$ac_t""no" 1>&6
10930 fi
10931 done
10932
10933
10934 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10935 echo "configure:10936: checking for openpty" >&5
10936
10937 cat > conftest.$ac_ext <<EOF
10938 #line 10939 "configure"
10939 #include "confdefs.h"
10940 /* System header to define __stub macros and hopefully few prototypes,
10941     which can conflict with char openpty(); below.  */
10942 #include <assert.h>
10943 /* Override any gcc2 internal prototype to avoid an error.  */
10944 /* We use char because int might match the return type of a gcc2
10945     builtin and then its argument prototype would still apply.  */
10946 char openpty();
10947
10948 int main() {
10949
10950 /* The GNU C library defines this for functions which it implements
10951     to always fail with ENOSYS.  Some functions are actually named
10952     something starting with __ and the normal name is an alias.  */
10953 #if defined (__stub_openpty) || defined (__stub___openpty)
10954 choke me
10955 #else
10956 openpty();
10957 #endif
10958
10959 ; return 0; }
10960 EOF
10961 if { (eval echo configure:10962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10962   rm -rf conftest*
10963   eval "ac_cv_func_openpty=yes"
10964 else
10965   echo "configure: failed program was:" >&5
10966   cat conftest.$ac_ext >&5
10967   rm -rf conftest*
10968   eval "ac_cv_func_openpty=no"
10969 fi
10970 rm -f conftest*
10971
10972 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10973   echo "$ac_t""yes" 1>&6
10974   have_openpty=yes
10975 else
10976   echo "$ac_t""no" 1>&6
10977
10978   
10979 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10980 echo "configure:10981: checking for openpty in -lutil" >&5
10981 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10982
10983 xe_check_libs=" -lutil "
10984 cat > conftest.$ac_ext <<EOF
10985 #line 10986 "configure"
10986 #include "confdefs.h"
10987 /* Override any gcc2 internal prototype to avoid an error.  */
10988 /* We use char because int might match the return type of a gcc2
10989     builtin and then its argument prototype would still apply.  */
10990 char openpty();
10991
10992 int main() {
10993 openpty()
10994 ; return 0; }
10995 EOF
10996 if { (eval echo configure:10997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10997   rm -rf conftest*
10998   eval "ac_cv_lib_$ac_lib_var=yes"
10999 else
11000   echo "configure: failed program was:" >&5
11001   cat conftest.$ac_ext >&5
11002   rm -rf conftest*
11003   eval "ac_cv_lib_$ac_lib_var=no"
11004 fi
11005 rm -f conftest*
11006 xe_check_libs=""
11007
11008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11009   echo "$ac_t""yes" 1>&6
11010   have_openpty=yes need_libutil=yes
11011 else
11012   echo "$ac_t""no" 1>&6
11013 fi
11014
11015
11016 fi
11017
11018 if test "$have_openpty" = "yes"; then
11019   { test "$extra_verbose" = "yes" && cat << \EOF
11020     Defining HAVE_OPENPTY
11021 EOF
11022 cat >> confdefs.h <<\EOF
11023 #define HAVE_OPENPTY 1
11024 EOF
11025 }
11026
11027   for ac_hdr in pty.h libutil.h util.h
11028 do
11029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11030 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11031 echo "configure:11032: checking for $ac_hdr" >&5
11032
11033 cat > conftest.$ac_ext <<EOF
11034 #line 11035 "configure"
11035 #include "confdefs.h"
11036 #include <$ac_hdr>
11037 EOF
11038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11039 { (eval echo configure:11040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11040 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11041 if test -z "$ac_err"; then
11042   rm -rf conftest*
11043   eval "ac_cv_header_$ac_safe=yes"
11044 else
11045   echo "$ac_err" >&5
11046   echo "configure: failed program was:" >&5
11047   cat conftest.$ac_ext >&5
11048   rm -rf conftest*
11049   eval "ac_cv_header_$ac_safe=no"
11050 fi
11051 rm -f conftest*
11052 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11053   echo "$ac_t""yes" 1>&6
11054     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11055   { test "$extra_verbose" = "yes" && cat << EOF
11056     Defining $ac_tr_hdr
11057 EOF
11058 cat >> confdefs.h <<EOF
11059 #define $ac_tr_hdr 1
11060 EOF
11061 }
11062  break
11063 else
11064   echo "$ac_t""no" 1>&6
11065 fi
11066 done
11067
11068   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11069 fi
11070
11071 for ac_hdr in stropts.h
11072 do
11073 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11074 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11075 echo "configure:11076: checking for $ac_hdr" >&5
11076
11077 cat > conftest.$ac_ext <<EOF
11078 #line 11079 "configure"
11079 #include "confdefs.h"
11080 #include <$ac_hdr>
11081 EOF
11082 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11083 { (eval echo configure:11084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11084 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11085 if test -z "$ac_err"; then
11086   rm -rf conftest*
11087   eval "ac_cv_header_$ac_safe=yes"
11088 else
11089   echo "$ac_err" >&5
11090   echo "configure: failed program was:" >&5
11091   cat conftest.$ac_ext >&5
11092   rm -rf conftest*
11093   eval "ac_cv_header_$ac_safe=no"
11094 fi
11095 rm -f conftest*
11096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11097   echo "$ac_t""yes" 1>&6
11098     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11099   { test "$extra_verbose" = "yes" && cat << EOF
11100     Defining $ac_tr_hdr
11101 EOF
11102 cat >> confdefs.h <<EOF
11103 #define $ac_tr_hdr 1
11104 EOF
11105 }
11106  
11107 else
11108   echo "$ac_t""no" 1>&6
11109 fi
11110 done
11111
11112 if test "$ac_cv_header_stropts_h" = "yes"; then
11113   for ac_func in isastream
11114 do
11115 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11116 echo "configure:11117: checking for $ac_func" >&5
11117
11118 cat > conftest.$ac_ext <<EOF
11119 #line 11120 "configure"
11120 #include "confdefs.h"
11121 /* System header to define __stub macros and hopefully few prototypes,
11122     which can conflict with char $ac_func(); below.  */
11123 #include <assert.h>
11124 /* Override any gcc2 internal prototype to avoid an error.  */
11125 /* We use char because int might match the return type of a gcc2
11126     builtin and then its argument prototype would still apply.  */
11127 char $ac_func();
11128
11129 int main() {
11130
11131 /* The GNU C library defines this for functions which it implements
11132     to always fail with ENOSYS.  Some functions are actually named
11133     something starting with __ and the normal name is an alias.  */
11134 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11135 choke me
11136 #else
11137 $ac_func();
11138 #endif
11139
11140 ; return 0; }
11141 EOF
11142 if { (eval echo configure:11143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11143   rm -rf conftest*
11144   eval "ac_cv_func_$ac_func=yes"
11145 else
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148   rm -rf conftest*
11149   eval "ac_cv_func_$ac_func=no"
11150 fi
11151 rm -f conftest*
11152
11153 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11154   echo "$ac_t""yes" 1>&6
11155     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11156   { test "$extra_verbose" = "yes" && cat << EOF
11157     Defining $ac_tr_func
11158 EOF
11159 cat >> confdefs.h <<EOF
11160 #define $ac_tr_func 1
11161 EOF
11162 }
11163  
11164 else
11165   echo "$ac_t""no" 1>&6
11166 fi
11167 done
11168
11169   for ac_hdr in strtio.h
11170 do
11171 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11172 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11173 echo "configure:11174: checking for $ac_hdr" >&5
11174
11175 cat > conftest.$ac_ext <<EOF
11176 #line 11177 "configure"
11177 #include "confdefs.h"
11178 #include <$ac_hdr>
11179 EOF
11180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11181 { (eval echo configure:11182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11183 if test -z "$ac_err"; then
11184   rm -rf conftest*
11185   eval "ac_cv_header_$ac_safe=yes"
11186 else
11187   echo "$ac_err" >&5
11188   echo "configure: failed program was:" >&5
11189   cat conftest.$ac_ext >&5
11190   rm -rf conftest*
11191   eval "ac_cv_header_$ac_safe=no"
11192 fi
11193 rm -f conftest*
11194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11195   echo "$ac_t""yes" 1>&6
11196     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11197   { test "$extra_verbose" = "yes" && cat << EOF
11198     Defining $ac_tr_hdr
11199 EOF
11200 cat >> confdefs.h <<EOF
11201 #define $ac_tr_hdr 1
11202 EOF
11203 }
11204  
11205 else
11206   echo "$ac_t""no" 1>&6
11207 fi
11208 done
11209  fi
11210
11211 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11212    echo "    xemacs will be linked with \"realpath.o\""
11213  fi
11214
11215 for ac_func in getloadavg
11216 do
11217 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11218 echo "configure:11219: checking for $ac_func" >&5
11219
11220 cat > conftest.$ac_ext <<EOF
11221 #line 11222 "configure"
11222 #include "confdefs.h"
11223 /* System header to define __stub macros and hopefully few prototypes,
11224     which can conflict with char $ac_func(); below.  */
11225 #include <assert.h>
11226 /* Override any gcc2 internal prototype to avoid an error.  */
11227 /* We use char because int might match the return type of a gcc2
11228     builtin and then its argument prototype would still apply.  */
11229 char $ac_func();
11230
11231 int main() {
11232
11233 /* The GNU C library defines this for functions which it implements
11234     to always fail with ENOSYS.  Some functions are actually named
11235     something starting with __ and the normal name is an alias.  */
11236 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11237 choke me
11238 #else
11239 $ac_func();
11240 #endif
11241
11242 ; return 0; }
11243 EOF
11244 if { (eval echo configure:11245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11245   rm -rf conftest*
11246   eval "ac_cv_func_$ac_func=yes"
11247 else
11248   echo "configure: failed program was:" >&5
11249   cat conftest.$ac_ext >&5
11250   rm -rf conftest*
11251   eval "ac_cv_func_$ac_func=no"
11252 fi
11253 rm -f conftest*
11254
11255 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11256   echo "$ac_t""yes" 1>&6
11257     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11258   { test "$extra_verbose" = "yes" && cat << EOF
11259     Defining $ac_tr_func
11260 EOF
11261 cat >> confdefs.h <<EOF
11262 #define $ac_tr_func 1
11263 EOF
11264 }
11265  
11266 else
11267   echo "$ac_t""no" 1>&6
11268 fi
11269 done
11270
11271
11272 if test "$ac_cv_func_getloadavg" = "yes"; then
11273         for ac_hdr in sys/loadavg.h
11274 do
11275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11276 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11277 echo "configure:11278: checking for $ac_hdr" >&5
11278
11279 cat > conftest.$ac_ext <<EOF
11280 #line 11281 "configure"
11281 #include "confdefs.h"
11282 #include <$ac_hdr>
11283 EOF
11284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11285 { (eval echo configure:11286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11287 if test -z "$ac_err"; then
11288   rm -rf conftest*
11289   eval "ac_cv_header_$ac_safe=yes"
11290 else
11291   echo "$ac_err" >&5
11292   echo "configure: failed program was:" >&5
11293   cat conftest.$ac_ext >&5
11294   rm -rf conftest*
11295   eval "ac_cv_header_$ac_safe=no"
11296 fi
11297 rm -f conftest*
11298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11299   echo "$ac_t""yes" 1>&6
11300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11301   { test "$extra_verbose" = "yes" && cat << EOF
11302     Defining $ac_tr_hdr
11303 EOF
11304 cat >> confdefs.h <<EOF
11305 #define $ac_tr_hdr 1
11306 EOF
11307 }
11308  
11309 else
11310   echo "$ac_t""no" 1>&6
11311 fi
11312 done
11313
11314 else
11315     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11316    echo "    xemacs will be linked with \"getloadavg.o\""
11317  fi
11318
11319     
11320 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11321 echo "configure:11322: checking for kstat_open in -lkstat" >&5
11322 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11323
11324 xe_check_libs=" -lkstat "
11325 cat > conftest.$ac_ext <<EOF
11326 #line 11327 "configure"
11327 #include "confdefs.h"
11328 /* Override any gcc2 internal prototype to avoid an error.  */
11329 /* We use char because int might match the return type of a gcc2
11330     builtin and then its argument prototype would still apply.  */
11331 char kstat_open();
11332
11333 int main() {
11334 kstat_open()
11335 ; return 0; }
11336 EOF
11337 if { (eval echo configure:11338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11338   rm -rf conftest*
11339   eval "ac_cv_lib_$ac_lib_var=yes"
11340 else
11341   echo "configure: failed program was:" >&5
11342   cat conftest.$ac_ext >&5
11343   rm -rf conftest*
11344   eval "ac_cv_lib_$ac_lib_var=no"
11345 fi
11346 rm -f conftest*
11347 xe_check_libs=""
11348
11349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11350   echo "$ac_t""yes" 1>&6
11351     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11352     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11353   { test "$extra_verbose" = "yes" && cat << EOF
11354     Defining $ac_tr_lib
11355 EOF
11356 cat >> confdefs.h <<EOF
11357 #define $ac_tr_lib 1
11358 EOF
11359 }
11360
11361   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11362
11363 else
11364   echo "$ac_t""no" 1>&6
11365 fi
11366
11367
11368   for ac_hdr in kstat.h
11369 do
11370 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11371 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11372 echo "configure:11373: checking for $ac_hdr" >&5
11373
11374 cat > conftest.$ac_ext <<EOF
11375 #line 11376 "configure"
11376 #include "confdefs.h"
11377 #include <$ac_hdr>
11378 EOF
11379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11380 { (eval echo configure:11381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11382 if test -z "$ac_err"; then
11383   rm -rf conftest*
11384   eval "ac_cv_header_$ac_safe=yes"
11385 else
11386   echo "$ac_err" >&5
11387   echo "configure: failed program was:" >&5
11388   cat conftest.$ac_ext >&5
11389   rm -rf conftest*
11390   eval "ac_cv_header_$ac_safe=no"
11391 fi
11392 rm -f conftest*
11393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11394   echo "$ac_t""yes" 1>&6
11395     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11396   { test "$extra_verbose" = "yes" && cat << EOF
11397     Defining $ac_tr_hdr
11398 EOF
11399 cat >> confdefs.h <<EOF
11400 #define $ac_tr_hdr 1
11401 EOF
11402 }
11403  
11404 else
11405   echo "$ac_t""no" 1>&6
11406 fi
11407 done
11408
11409
11410     
11411 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11412 echo "configure:11413: checking for kvm_read in -lkvm" >&5
11413 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11414
11415 xe_check_libs=" -lkvm "
11416 cat > conftest.$ac_ext <<EOF
11417 #line 11418 "configure"
11418 #include "confdefs.h"
11419 /* Override any gcc2 internal prototype to avoid an error.  */
11420 /* We use char because int might match the return type of a gcc2
11421     builtin and then its argument prototype would still apply.  */
11422 char kvm_read();
11423
11424 int main() {
11425 kvm_read()
11426 ; return 0; }
11427 EOF
11428 if { (eval echo configure:11429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11429   rm -rf conftest*
11430   eval "ac_cv_lib_$ac_lib_var=yes"
11431 else
11432   echo "configure: failed program was:" >&5
11433   cat conftest.$ac_ext >&5
11434   rm -rf conftest*
11435   eval "ac_cv_lib_$ac_lib_var=no"
11436 fi
11437 rm -f conftest*
11438 xe_check_libs=""
11439
11440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11441   echo "$ac_t""yes" 1>&6
11442     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11443     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11444   { test "$extra_verbose" = "yes" && cat << EOF
11445     Defining $ac_tr_lib
11446 EOF
11447 cat >> confdefs.h <<EOF
11448 #define $ac_tr_lib 1
11449 EOF
11450 }
11451
11452   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11453
11454 else
11455   echo "$ac_t""no" 1>&6
11456 fi
11457
11458
11459 fi
11460
11461 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11462 echo "configure:11463: checking whether netdb declares h_errno" >&5
11463 cat > conftest.$ac_ext <<EOF
11464 #line 11465 "configure"
11465 #include "confdefs.h"
11466 #include <netdb.h>
11467 int main() {
11468 return h_errno;
11469 ; return 0; }
11470 EOF
11471 if { (eval echo configure:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11472   rm -rf conftest*
11473   echo "$ac_t""yes" 1>&6
11474    { test "$extra_verbose" = "yes" && cat << \EOF
11475     Defining HAVE_H_ERRNO
11476 EOF
11477 cat >> confdefs.h <<\EOF
11478 #define HAVE_H_ERRNO 1
11479 EOF
11480 }
11481
11482 else
11483   echo "configure: failed program was:" >&5
11484   cat conftest.$ac_ext >&5
11485   rm -rf conftest*
11486   echo "$ac_t""no" 1>&6
11487 fi
11488 rm -f conftest*
11489
11490 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11491 echo "configure:11492: checking for sigsetjmp" >&5
11492 cat > conftest.$ac_ext <<EOF
11493 #line 11494 "configure"
11494 #include "confdefs.h"
11495 #include <setjmp.h>
11496 int main() {
11497 sigjmp_buf bar; sigsetjmp (bar, 0);
11498 ; return 0; }
11499 EOF
11500 if { (eval echo configure:11501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11501   rm -rf conftest*
11502   echo "$ac_t""yes" 1>&6
11503    { test "$extra_verbose" = "yes" && cat << \EOF
11504     Defining HAVE_SIGSETJMP
11505 EOF
11506 cat >> confdefs.h <<\EOF
11507 #define HAVE_SIGSETJMP 1
11508 EOF
11509 }
11510
11511 else
11512   echo "configure: failed program was:" >&5
11513   cat conftest.$ac_ext >&5
11514   rm -rf conftest*
11515   echo "$ac_t""no" 1>&6
11516 fi
11517 rm -f conftest*
11518
11519 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11520 echo "configure:11521: checking whether localtime caches TZ" >&5
11521
11522 if test "$ac_cv_func_tzset" = "yes"; then
11523 cat > conftest.$ac_ext <<EOF
11524 #line 11525 "configure"
11525 #include "confdefs.h"
11526 #include <time.h>
11527 #if STDC_HEADERS
11528 # include <stdlib.h>
11529 #endif
11530 extern char **environ;
11531 unset_TZ ()
11532 {
11533   char **from, **to;
11534   for (to = from = environ; (*to = *from); from++)
11535     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11536       to++;
11537 }
11538 char TZ_GMT0[] = "TZ=GMT0";
11539 char TZ_PST8[] = "TZ=PST8";
11540 main()
11541 {
11542   time_t now = time ((time_t *) 0);
11543   int hour_GMT0, hour_unset;
11544   if (putenv (TZ_GMT0) != 0)
11545     exit (1);
11546   hour_GMT0 = localtime (&now)->tm_hour;
11547   unset_TZ ();
11548   hour_unset = localtime (&now)->tm_hour;
11549   if (putenv (TZ_PST8) != 0)
11550     exit (1);
11551   if (localtime (&now)->tm_hour == hour_GMT0)
11552     exit (1);
11553   unset_TZ ();
11554   if (localtime (&now)->tm_hour != hour_unset)
11555     exit (1);
11556   exit (0);
11557 }
11558 EOF
11559 if { (eval echo configure:11560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11560 then
11561   emacs_cv_localtime_cache=no
11562 else
11563   conftest_rc="$?"
11564   echo "configure: failed program was:" >&5
11565   cat conftest.$ac_ext >&5
11566   rm -fr conftest*
11567   emacs_cv_localtime_cache=yes
11568 fi
11569 rm -fr conftest*
11570 else
11571         # If we lack tzset, report that localtime does not cache TZ,
11572         # since we can't invalidate the cache if we don't have tzset.
11573         emacs_cv_localtime_cache=no
11574 fi
11575 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11576 if test $emacs_cv_localtime_cache = yes; then
11577   { test "$extra_verbose" = "yes" && cat << \EOF
11578     Defining LOCALTIME_CACHE
11579 EOF
11580 cat >> confdefs.h <<\EOF
11581 #define LOCALTIME_CACHE 1
11582 EOF
11583 }
11584
11585 fi
11586
11587 if test "$HAVE_TIMEVAL" = "yes"; then
11588 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11589 echo "configure:11590: checking whether gettimeofday accepts one or two arguments" >&5
11590 cat > conftest.$ac_ext <<EOF
11591 #line 11592 "configure"
11592 #include "confdefs.h"
11593
11594 #ifdef TIME_WITH_SYS_TIME
11595 #include <sys/time.h>
11596 #include <time.h>
11597 #else
11598 #ifdef HAVE_SYS_TIME_H
11599 #include <sys/time.h>
11600 #else
11601 #include <time.h>
11602 #endif
11603 #endif
11604   
11605 int main() {
11606
11607   struct timeval time;
11608   gettimeofday (&time, 0);
11609
11610 ; return 0; }
11611 EOF
11612 if { (eval echo configure:11613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11613   rm -rf conftest*
11614   echo "$ac_t""two" 1>&6
11615 else
11616   echo "configure: failed program was:" >&5
11617   cat conftest.$ac_ext >&5
11618   rm -rf conftest*
11619   echo "$ac_t""one" 1>&6
11620    { test "$extra_verbose" = "yes" && cat << \EOF
11621     Defining GETTIMEOFDAY_ONE_ARGUMENT
11622 EOF
11623 cat >> confdefs.h <<\EOF
11624 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11625 EOF
11626 }
11627
11628 fi
11629 rm -f conftest*
11630 fi
11631
11632
11633 echo $ac_n "checking for inline""... $ac_c" 1>&6
11634 echo "configure:11635: checking for inline" >&5
11635
11636 ac_cv_c_inline=no
11637 for ac_kw in inline __inline__ __inline; do
11638   cat > conftest.$ac_ext <<EOF
11639 #line 11640 "configure"
11640 #include "confdefs.h"
11641
11642 int main() {
11643 } $ac_kw foo() {
11644 ; return 0; }
11645 EOF
11646 if { (eval echo configure:11647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11647   rm -rf conftest*
11648   ac_cv_c_inline=$ac_kw; break
11649 else
11650   echo "configure: failed program was:" >&5
11651   cat conftest.$ac_ext >&5
11652 fi
11653 rm -f conftest*
11654 done
11655
11656
11657 echo "$ac_t""$ac_cv_c_inline" 1>&6
11658 case "$ac_cv_c_inline" in
11659   inline | yes) ;;
11660   no) { test "$extra_verbose" = "yes" && cat << \EOF
11661     Defining inline = 
11662 EOF
11663 cat >> confdefs.h <<\EOF
11664 #define inline 
11665 EOF
11666 }
11667  ;;
11668   *)  { test "$extra_verbose" = "yes" && cat << EOF
11669     Defining inline = $ac_cv_c_inline
11670 EOF
11671 cat >> confdefs.h <<EOF
11672 #define inline $ac_cv_c_inline
11673 EOF
11674 }
11675  ;;
11676 esac
11677
11678 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11679    echo "    xemacs will be linked with \"inline.o\""
11680  fi
11681
11682
11683 if test "$__DECC" != "yes"; then
11684   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11685 # for constant arguments.  Useless!
11686 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11687 echo "configure:11688: checking for working alloca.h" >&5
11688
11689 cat > conftest.$ac_ext <<EOF
11690 #line 11691 "configure"
11691 #include "confdefs.h"
11692 #include <alloca.h>
11693 int main() {
11694 char *p = alloca(2 * sizeof(int));
11695 ; return 0; }
11696 EOF
11697 if { (eval echo configure:11698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11698   rm -rf conftest*
11699   ac_cv_header_alloca_h=yes
11700 else
11701   echo "configure: failed program was:" >&5
11702   cat conftest.$ac_ext >&5
11703   rm -rf conftest*
11704   ac_cv_header_alloca_h=no
11705 fi
11706 rm -f conftest*
11707
11708 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11709 if test $ac_cv_header_alloca_h = yes; then
11710   { test "$extra_verbose" = "yes" && cat << \EOF
11711     Defining HAVE_ALLOCA_H
11712 EOF
11713 cat >> confdefs.h <<\EOF
11714 #define HAVE_ALLOCA_H 1
11715 EOF
11716 }
11717
11718 fi
11719
11720 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11721 echo "configure:11722: checking for alloca" >&5
11722
11723 cat > conftest.$ac_ext <<EOF
11724 #line 11725 "configure"
11725 #include "confdefs.h"
11726
11727 #ifdef __GNUC__
11728 # define alloca __builtin_alloca
11729 #else
11730 # ifdef _MSC_VER
11731 #  include <malloc.h>
11732 #  define alloca _alloca
11733 # else
11734 #  if HAVE_ALLOCA_H
11735 #   include <alloca.h>
11736 #  else
11737 #   ifdef _AIX
11738  #pragma alloca
11739 #   else
11740 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11741 char *alloca ();
11742 #    endif
11743 #   endif
11744 #  endif
11745 # endif
11746 #endif
11747
11748 int main() {
11749 char *p = (char *) alloca(1);
11750 ; return 0; }
11751 EOF
11752 if { (eval echo configure:11753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11753   rm -rf conftest*
11754   ac_cv_func_alloca_works=yes
11755 else
11756   echo "configure: failed program was:" >&5
11757   cat conftest.$ac_ext >&5
11758   rm -rf conftest*
11759   ac_cv_func_alloca_works=no
11760 fi
11761 rm -f conftest*
11762
11763 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11764 if test $ac_cv_func_alloca_works = yes; then
11765   { test "$extra_verbose" = "yes" && cat << \EOF
11766     Defining HAVE_ALLOCA
11767 EOF
11768 cat >> confdefs.h <<\EOF
11769 #define HAVE_ALLOCA 1
11770 EOF
11771 }
11772
11773 fi
11774
11775 if test $ac_cv_func_alloca_works = no; then
11776   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11777   # that cause trouble.  Some versions do not even contain alloca or
11778   # contain a buggy version.  If you still want to use their alloca,
11779   # use ar to extract alloca.o from them instead of compiling alloca.c.
11780   ALLOCA=alloca.${ac_objext}
11781   { test "$extra_verbose" = "yes" && cat << \EOF
11782     Defining C_ALLOCA
11783 EOF
11784 cat >> confdefs.h <<\EOF
11785 #define C_ALLOCA 1
11786 EOF
11787 }
11788
11789
11790 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11791 echo "configure:11792: checking whether alloca needs Cray hooks" >&5
11792
11793 cat > conftest.$ac_ext <<EOF
11794 #line 11795 "configure"
11795 #include "confdefs.h"
11796 #if defined(CRAY) && ! defined(CRAY2)
11797 webecray
11798 #else
11799 wenotbecray
11800 #endif
11801
11802 EOF
11803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11804   egrep "webecray" >/dev/null 2>&1; then
11805   rm -rf conftest*
11806   ac_cv_os_cray=yes
11807 else
11808   rm -rf conftest*
11809   ac_cv_os_cray=no
11810 fi
11811 rm -f conftest*
11812
11813
11814 echo "$ac_t""$ac_cv_os_cray" 1>&6
11815 if test $ac_cv_os_cray = yes; then
11816 for ac_func in _getb67 GETB67 getb67; do
11817   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11818 echo "configure:11819: checking for $ac_func" >&5
11819
11820 cat > conftest.$ac_ext <<EOF
11821 #line 11822 "configure"
11822 #include "confdefs.h"
11823 /* System header to define __stub macros and hopefully few prototypes,
11824     which can conflict with char $ac_func(); below.  */
11825 #include <assert.h>
11826 /* Override any gcc2 internal prototype to avoid an error.  */
11827 /* We use char because int might match the return type of a gcc2
11828     builtin and then its argument prototype would still apply.  */
11829 char $ac_func();
11830
11831 int main() {
11832
11833 /* The GNU C library defines this for functions which it implements
11834     to always fail with ENOSYS.  Some functions are actually named
11835     something starting with __ and the normal name is an alias.  */
11836 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11837 choke me
11838 #else
11839 $ac_func();
11840 #endif
11841
11842 ; return 0; }
11843 EOF
11844 if { (eval echo configure:11845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11845   rm -rf conftest*
11846   eval "ac_cv_func_$ac_func=yes"
11847 else
11848   echo "configure: failed program was:" >&5
11849   cat conftest.$ac_ext >&5
11850   rm -rf conftest*
11851   eval "ac_cv_func_$ac_func=no"
11852 fi
11853 rm -f conftest*
11854
11855 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11856   echo "$ac_t""yes" 1>&6
11857   { test "$extra_verbose" = "yes" && cat << EOF
11858     Defining CRAY_STACKSEG_END = $ac_func
11859 EOF
11860 cat >> confdefs.h <<EOF
11861 #define CRAY_STACKSEG_END $ac_func
11862 EOF
11863 }
11864
11865   break
11866 else
11867   echo "$ac_t""no" 1>&6
11868 fi
11869
11870 done
11871 fi
11872
11873 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11874 echo "configure:11875: checking stack direction for C alloca" >&5
11875
11876 cat > conftest.$ac_ext <<EOF
11877 #line 11878 "configure"
11878 #include "confdefs.h"
11879 find_stack_direction ()
11880 {
11881   static char *addr = 0;
11882   auto char dummy;
11883   if (addr == 0)
11884     {
11885       addr = &dummy;
11886       return find_stack_direction ();
11887     }
11888   else
11889     return (&dummy > addr) ? 1 : -1;
11890 }
11891 main ()
11892 {
11893   exit (find_stack_direction() < 0);
11894 }
11895 EOF
11896 if { (eval echo configure:11897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11897 then
11898   ac_cv_c_stack_direction=1
11899 else
11900   conftest_rc="$?"
11901   echo "configure: failed program was:" >&5
11902   cat conftest.$ac_ext >&5
11903   rm -fr conftest*
11904   ac_cv_c_stack_direction=-1
11905 fi
11906 rm -fr conftest*
11907
11908 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11909 { test "$extra_verbose" = "yes" && cat << EOF
11910     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11911 EOF
11912 cat >> confdefs.h <<EOF
11913 #define STACK_DIRECTION $ac_cv_c_stack_direction
11914 EOF
11915 }
11916
11917 fi
11918
11919   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11920    echo "    xemacs will be linked with \"$ALLOCA\""
11921  fi
11922 fi
11923
11924 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11925 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11926 echo "configure:11927: checking for vfork.h" >&5
11927
11928 cat > conftest.$ac_ext <<EOF
11929 #line 11930 "configure"
11930 #include "confdefs.h"
11931 #include <vfork.h>
11932 EOF
11933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11934 { (eval echo configure:11935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11936 if test -z "$ac_err"; then
11937   rm -rf conftest*
11938   eval "ac_cv_header_$ac_safe=yes"
11939 else
11940   echo "$ac_err" >&5
11941   echo "configure: failed program was:" >&5
11942   cat conftest.$ac_ext >&5
11943   rm -rf conftest*
11944   eval "ac_cv_header_$ac_safe=no"
11945 fi
11946 rm -f conftest*
11947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11948   echo "$ac_t""yes" 1>&6
11949   { test "$extra_verbose" = "yes" && cat << \EOF
11950     Defining HAVE_VFORK_H
11951 EOF
11952 cat >> confdefs.h <<\EOF
11953 #define HAVE_VFORK_H 1
11954 EOF
11955 }
11956
11957 else
11958   echo "$ac_t""no" 1>&6
11959 fi
11960
11961 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11962 echo "configure:11963: checking for working vfork" >&5
11963
11964 cat > conftest.$ac_ext <<EOF
11965 #line 11966 "configure"
11966 #include "confdefs.h"
11967 /* Thanks to Paul Eggert for this test.  */
11968 #include <stdio.h>
11969 #include <sys/types.h>
11970 #include <sys/stat.h>
11971 #ifdef HAVE_UNISTD_H
11972 #include <unistd.h>
11973 #endif
11974 #ifdef HAVE_VFORK_H
11975 #include <vfork.h>
11976 #endif
11977 /* On some sparc systems, changes by the child to local and incoming
11978    argument registers are propagated back to the parent.
11979    The compiler is told about this with #include <vfork.h>,
11980    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11981    Test for this by using a static variable whose address
11982    is put into a register that is clobbered by the vfork.  */
11983 static
11984 #ifdef __cplusplus
11985 sparc_address_test (int arg)
11986 #else
11987 sparc_address_test (arg) int arg;
11988 #endif
11989 {
11990   static pid_t child;
11991   if (!child) {
11992     child = vfork ();
11993     if (child < 0) {
11994       perror ("vfork");
11995       _exit(2);
11996     }
11997     if (!child) {
11998       arg = getpid();
11999       write(-1, "", 0);
12000       _exit (arg);
12001     }
12002   }
12003 }
12004 main() {
12005   pid_t parent = getpid ();
12006   pid_t child;
12007
12008   sparc_address_test ();
12009
12010   child = vfork ();
12011
12012   if (child == 0) {
12013     /* Here is another test for sparc vfork register problems.
12014        This test uses lots of local variables, at least
12015        as many local variables as main has allocated so far
12016        including compiler temporaries.  4 locals are enough for
12017        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12018        A buggy compiler should reuse the register of parent
12019        for one of the local variables, since it will think that
12020        parent can't possibly be used any more in this routine.
12021        Assigning to the local variable will thus munge parent
12022        in the parent process.  */
12023     pid_t
12024       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12025       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12026     /* Convince the compiler that p..p7 are live; otherwise, it might
12027        use the same hardware register for all 8 local variables.  */
12028     if (p != p1 || p != p2 || p != p3 || p != p4
12029         || p != p5 || p != p6 || p != p7)
12030       _exit(1);
12031
12032     /* On some systems (e.g. IRIX 3.3),
12033        vfork doesn't separate parent from child file descriptors.
12034        If the child closes a descriptor before it execs or exits,
12035        this munges the parent's descriptor as well.
12036        Test for this by closing stdout in the child.  */
12037     _exit(close(fileno(stdout)) != 0);
12038   } else {
12039     int status;
12040     struct stat st;
12041
12042     while (wait(&status) != child)
12043       ;
12044     exit(
12045          /* Was there some problem with vforking?  */
12046          child < 0
12047
12048          /* Did the child fail?  (This shouldn't happen.)  */
12049          || status
12050
12051          /* Did the vfork/compiler bug occur?  */
12052          || parent != getpid()
12053
12054          /* Did the file descriptor bug occur?  */
12055          || fstat(fileno(stdout), &st) != 0
12056          );
12057   }
12058 }
12059 EOF
12060 if { (eval echo configure:12061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12061 then
12062   ac_cv_func_vfork_works=yes
12063 else
12064   conftest_rc="$?"
12065   echo "configure: failed program was:" >&5
12066   cat conftest.$ac_ext >&5
12067   rm -fr conftest*
12068   ac_cv_func_vfork_works=no
12069 fi
12070 rm -fr conftest*
12071
12072 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12073 if test $ac_cv_func_vfork_works = no; then
12074   { test "$extra_verbose" = "yes" && cat << \EOF
12075     Defining vfork = fork
12076 EOF
12077 cat >> confdefs.h <<\EOF
12078 #define vfork fork
12079 EOF
12080 }
12081
12082 fi
12083
12084
12085 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12086 echo "configure:12087: checking for working strcoll" >&5
12087
12088 cat > conftest.$ac_ext <<EOF
12089 #line 12090 "configure"
12090 #include "confdefs.h"
12091 #include <string.h>
12092 main ()
12093 {
12094   exit (strcoll ("abc", "def") >= 0 ||
12095         strcoll ("ABC", "DEF") >= 0 ||
12096         strcoll ("123", "456") >= 0);
12097 }
12098 EOF
12099 if { (eval echo configure:12100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12100 then
12101   ac_cv_func_strcoll_works=yes
12102 else
12103   conftest_rc="$?"
12104   echo "configure: failed program was:" >&5
12105   cat conftest.$ac_ext >&5
12106   rm -fr conftest*
12107   ac_cv_func_strcoll_works=no
12108 fi
12109 rm -fr conftest*
12110
12111 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12112 if test $ac_cv_func_strcoll_works = yes; then
12113   { test "$extra_verbose" = "yes" && cat << \EOF
12114     Defining HAVE_STRCOLL
12115 EOF
12116 cat >> confdefs.h <<\EOF
12117 #define HAVE_STRCOLL 1
12118 EOF
12119 }
12120
12121 fi
12122
12123
12124 for ac_func in getpgrp
12125 do
12126 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12127 echo "configure:12128: checking for $ac_func" >&5
12128
12129 cat > conftest.$ac_ext <<EOF
12130 #line 12131 "configure"
12131 #include "confdefs.h"
12132 /* System header to define __stub macros and hopefully few prototypes,
12133     which can conflict with char $ac_func(); below.  */
12134 #include <assert.h>
12135 /* Override any gcc2 internal prototype to avoid an error.  */
12136 /* We use char because int might match the return type of a gcc2
12137     builtin and then its argument prototype would still apply.  */
12138 char $ac_func();
12139
12140 int main() {
12141
12142 /* The GNU C library defines this for functions which it implements
12143     to always fail with ENOSYS.  Some functions are actually named
12144     something starting with __ and the normal name is an alias.  */
12145 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12146 choke me
12147 #else
12148 $ac_func();
12149 #endif
12150
12151 ; return 0; }
12152 EOF
12153 if { (eval echo configure:12154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12154   rm -rf conftest*
12155   eval "ac_cv_func_$ac_func=yes"
12156 else
12157   echo "configure: failed program was:" >&5
12158   cat conftest.$ac_ext >&5
12159   rm -rf conftest*
12160   eval "ac_cv_func_$ac_func=no"
12161 fi
12162 rm -f conftest*
12163
12164 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12165   echo "$ac_t""yes" 1>&6
12166     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12167   { test "$extra_verbose" = "yes" && cat << EOF
12168     Defining $ac_tr_func
12169 EOF
12170 cat >> confdefs.h <<EOF
12171 #define $ac_tr_func 1
12172 EOF
12173 }
12174  
12175 else
12176   echo "$ac_t""no" 1>&6
12177 fi
12178 done
12179
12180 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12181 echo "configure:12182: checking whether getpgrp takes no argument" >&5
12182
12183 cat > conftest.$ac_ext <<EOF
12184 #line 12185 "configure"
12185 #include "confdefs.h"
12186
12187 /*
12188  * If this system has a BSD-style getpgrp(),
12189  * which takes a pid argument, exit unsuccessfully.
12190  *
12191  * Snarfed from Chet Ramey's bash pgrp.c test program
12192  */
12193 #include <stdio.h>
12194 #include <sys/types.h>
12195
12196 int     pid;
12197 int     pg1, pg2, pg3, pg4;
12198 int     ng, np, s, child;
12199
12200 main()
12201 {
12202         pid = getpid();
12203         pg1 = getpgrp(0);
12204         pg2 = getpgrp();
12205         pg3 = getpgrp(pid);
12206         pg4 = getpgrp(1);
12207
12208         /*
12209          * If all of these values are the same, it's pretty sure that
12210          * we're on a system that ignores getpgrp's first argument.
12211          */
12212         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12213                 exit(0);
12214
12215         child = fork();
12216         if (child < 0)
12217                 exit(1);
12218         else if (child == 0) {
12219                 np = getpid();
12220                 /*
12221                  * If this is Sys V, this will not work; pgrp will be
12222                  * set to np because setpgrp just changes a pgrp to be
12223                  * the same as the pid.
12224                  */
12225                 setpgrp(np, pg1);
12226                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12227                 if (ng == pg1) {
12228                         exit(1);
12229                 } else {
12230                         exit(0);
12231                 }
12232         } else {
12233                 wait(&s);
12234                 exit(s>>8);
12235         }
12236 }
12237
12238 EOF
12239 if { (eval echo configure:12240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12240 then
12241   ac_cv_func_getpgrp_void=yes
12242 else
12243   conftest_rc="$?"
12244   echo "configure: failed program was:" >&5
12245   cat conftest.$ac_ext >&5
12246   rm -fr conftest*
12247   ac_cv_func_getpgrp_void=no
12248 fi
12249 rm -fr conftest*
12250
12251
12252 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12253 if test $ac_cv_func_getpgrp_void = yes; then
12254   { test "$extra_verbose" = "yes" && cat << \EOF
12255     Defining GETPGRP_VOID
12256 EOF
12257 cat >> confdefs.h <<\EOF
12258 #define GETPGRP_VOID 1
12259 EOF
12260 }
12261
12262 fi
12263
12264
12265 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12266 echo "configure:12267: checking for working mmap" >&5
12267 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12268 cat > conftest.$ac_ext <<EOF
12269 #line 12270 "configure"
12270 #include "confdefs.h"
12271 #include <stdio.h>
12272 #include <unistd.h>
12273 #include <fcntl.h>
12274 #include <sys/mman.h>
12275
12276 #ifndef MAP_VARIABLE
12277 #define MAP_VARIABLE 0
12278 #endif
12279
12280 #ifndef MAP_FAILED
12281 #define MAP_FAILED -1
12282 #endif
12283
12284 int main (int argc, char *argv[])
12285 {
12286   int fd = -1;
12287   caddr_t p;
12288 #ifndef MAP_ANONYMOUS
12289   fd = open ("/dev/zero", O_RDWR);
12290   if (fd < 0)
12291     return 1;
12292 #define MAP_ANONYMOUS 0
12293 #endif
12294   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12295            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12296            fd, 0) != (void *) MAP_FAILED)
12297     return 0;
12298   perror ("conftest: mmap failed");
12299   return 1;
12300 }
12301 EOF
12302 if { (eval echo configure:12303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12303 then
12304   have_mmap=yes
12305 else
12306   conftest_rc="$?"
12307   echo "configure: failed program was:" >&5
12308   cat conftest.$ac_ext >&5
12309   rm -fr conftest*
12310   have_mmap=no
12311 fi
12312 rm -fr conftest* ;;
12313 esac
12314 echo "$ac_t""$have_mmap" 1>&6
12315 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12316     Defining HAVE_MMAP
12317 EOF
12318 cat >> confdefs.h <<\EOF
12319 #define HAVE_MMAP 1
12320 EOF
12321 }
12322
12323
12324 case "$opsys" in cygwin*) 
12325         test "$rel_alloc" = "default" && rel_alloc=no ;;
12326 esac
12327 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12328 if test "$rel_alloc $have_mmap" = "default yes"; then
12329   if test "$doug_lea_malloc" = "yes"; then
12330         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12331 echo "configure:12332: checking for M_MMAP_THRESHOLD" >&5
12332     cat > conftest.$ac_ext <<EOF
12333 #line 12334 "configure"
12334 #include "confdefs.h"
12335 #include <malloc.h>
12336 int main() {
12337
12338 #ifndef M_MMAP_THRESHOLD
12339 #error No M_MMAP_THRESHOLD :-(
12340 !@+$%^&*_)(_ - unlikely to compile...
12341 #endif
12342
12343 ; return 0; }
12344 EOF
12345 if { (eval echo configure:12346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12346   rm -rf conftest*
12347   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12348 else
12349   echo "configure: failed program was:" >&5
12350   cat conftest.$ac_ext >&5
12351   rm -rf conftest*
12352   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12353 fi
12354 rm -f conftest*
12355   else
12356     rel_alloc=yes
12357   fi
12358 fi
12359 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12360     Defining REL_ALLOC
12361 EOF
12362 cat >> confdefs.h <<\EOF
12363 #define REL_ALLOC 1
12364 EOF
12365 }
12366
12367
12368 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12369 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12370 echo "configure:12371: checking for termios.h" >&5
12371
12372 cat > conftest.$ac_ext <<EOF
12373 #line 12374 "configure"
12374 #include "confdefs.h"
12375 #include <termios.h>
12376 EOF
12377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12378 { (eval echo configure:12379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12380 if test -z "$ac_err"; then
12381   rm -rf conftest*
12382   eval "ac_cv_header_$ac_safe=yes"
12383 else
12384   echo "$ac_err" >&5
12385   echo "configure: failed program was:" >&5
12386   cat conftest.$ac_ext >&5
12387   rm -rf conftest*
12388   eval "ac_cv_header_$ac_safe=no"
12389 fi
12390 rm -f conftest*
12391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12392   echo "$ac_t""yes" 1>&6
12393   { test "$extra_verbose" = "yes" && cat << \EOF
12394     Defining HAVE_TERMIOS
12395 EOF
12396 cat >> confdefs.h <<\EOF
12397 #define HAVE_TERMIOS 1
12398 EOF
12399 }
12400
12401   { test "$extra_verbose" = "yes" && cat << \EOF
12402     Defining SIGNALS_VIA_CHARACTERS
12403 EOF
12404 cat >> confdefs.h <<\EOF
12405 #define SIGNALS_VIA_CHARACTERS 1
12406 EOF
12407 }
12408
12409   { test "$extra_verbose" = "yes" && cat << \EOF
12410     Defining NO_TERMIO
12411 EOF
12412 cat >> confdefs.h <<\EOF
12413 #define NO_TERMIO 1
12414 EOF
12415 }
12416
12417 else
12418   echo "$ac_t""no" 1>&6
12419 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12420 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12421 echo "configure:12422: checking for termio.h" >&5
12422
12423 cat > conftest.$ac_ext <<EOF
12424 #line 12425 "configure"
12425 #include "confdefs.h"
12426 #include <termio.h>
12427 EOF
12428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12429 { (eval echo configure:12430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12431 if test -z "$ac_err"; then
12432   rm -rf conftest*
12433   eval "ac_cv_header_$ac_safe=yes"
12434 else
12435   echo "$ac_err" >&5
12436   echo "configure: failed program was:" >&5
12437   cat conftest.$ac_ext >&5
12438   rm -rf conftest*
12439   eval "ac_cv_header_$ac_safe=no"
12440 fi
12441 rm -f conftest*
12442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12443   echo "$ac_t""yes" 1>&6
12444   { test "$extra_verbose" = "yes" && cat << \EOF
12445     Defining HAVE_TERMIO
12446 EOF
12447 cat >> confdefs.h <<\EOF
12448 #define HAVE_TERMIO 1
12449 EOF
12450 }
12451
12452 else
12453   echo "$ac_t""no" 1>&6
12454 fi
12455
12456 fi
12457
12458
12459
12460 echo $ac_n "checking for socket""... $ac_c" 1>&6
12461 echo "configure:12462: checking for socket" >&5
12462
12463 cat > conftest.$ac_ext <<EOF
12464 #line 12465 "configure"
12465 #include "confdefs.h"
12466 /* System header to define __stub macros and hopefully few prototypes,
12467     which can conflict with char socket(); below.  */
12468 #include <assert.h>
12469 /* Override any gcc2 internal prototype to avoid an error.  */
12470 /* We use char because int might match the return type of a gcc2
12471     builtin and then its argument prototype would still apply.  */
12472 char socket();
12473
12474 int main() {
12475
12476 /* The GNU C library defines this for functions which it implements
12477     to always fail with ENOSYS.  Some functions are actually named
12478     something starting with __ and the normal name is an alias.  */
12479 #if defined (__stub_socket) || defined (__stub___socket)
12480 choke me
12481 #else
12482 socket();
12483 #endif
12484
12485 ; return 0; }
12486 EOF
12487 if { (eval echo configure:12488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12488   rm -rf conftest*
12489   eval "ac_cv_func_socket=yes"
12490 else
12491   echo "configure: failed program was:" >&5
12492   cat conftest.$ac_ext >&5
12493   rm -rf conftest*
12494   eval "ac_cv_func_socket=no"
12495 fi
12496 rm -f conftest*
12497
12498 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12499   echo "$ac_t""yes" 1>&6
12500   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12501 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12502 echo "configure:12503: checking for netinet/in.h" >&5
12503
12504 cat > conftest.$ac_ext <<EOF
12505 #line 12506 "configure"
12506 #include "confdefs.h"
12507 #include <netinet/in.h>
12508 EOF
12509 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12510 { (eval echo configure:12511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12511 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12512 if test -z "$ac_err"; then
12513   rm -rf conftest*
12514   eval "ac_cv_header_$ac_safe=yes"
12515 else
12516   echo "$ac_err" >&5
12517   echo "configure: failed program was:" >&5
12518   cat conftest.$ac_ext >&5
12519   rm -rf conftest*
12520   eval "ac_cv_header_$ac_safe=no"
12521 fi
12522 rm -f conftest*
12523 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12524   echo "$ac_t""yes" 1>&6
12525   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12526 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12527 echo "configure:12528: checking for arpa/inet.h" >&5
12528
12529 cat > conftest.$ac_ext <<EOF
12530 #line 12531 "configure"
12531 #include "confdefs.h"
12532 #include <arpa/inet.h>
12533 EOF
12534 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12535 { (eval echo configure:12536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12536 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12537 if test -z "$ac_err"; then
12538   rm -rf conftest*
12539   eval "ac_cv_header_$ac_safe=yes"
12540 else
12541   echo "$ac_err" >&5
12542   echo "configure: failed program was:" >&5
12543   cat conftest.$ac_ext >&5
12544   rm -rf conftest*
12545   eval "ac_cv_header_$ac_safe=no"
12546 fi
12547 rm -f conftest*
12548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12549   echo "$ac_t""yes" 1>&6
12550   
12551   { test "$extra_verbose" = "yes" && cat << \EOF
12552     Defining HAVE_SOCKETS
12553 EOF
12554 cat >> confdefs.h <<\EOF
12555 #define HAVE_SOCKETS 1
12556 EOF
12557 }
12558
12559       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12560 echo "configure:12561: checking "for sun_len member in struct sockaddr_un"" >&5
12561       cat > conftest.$ac_ext <<EOF
12562 #line 12563 "configure"
12563 #include "confdefs.h"
12564
12565 #include <sys/types.h>
12566 #include <sys/socket.h>
12567 #include <sys/un.h>
12568       
12569 int main() {
12570 static struct sockaddr_un x; x.sun_len = 1;
12571 ; return 0; }
12572 EOF
12573 if { (eval echo configure:12574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12574   rm -rf conftest*
12575   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12576     Defining HAVE_SOCKADDR_SUN_LEN
12577 EOF
12578 cat >> confdefs.h <<\EOF
12579 #define HAVE_SOCKADDR_SUN_LEN 1
12580 EOF
12581 }
12582
12583 else
12584   echo "configure: failed program was:" >&5
12585   cat conftest.$ac_ext >&5
12586   rm -rf conftest*
12587   echo "$ac_t""no" 1>&6
12588 fi
12589 rm -f conftest*
12590       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12591 echo "configure:12592: checking "for ip_mreq struct in netinet/in.h"" >&5
12592       cat > conftest.$ac_ext <<EOF
12593 #line 12594 "configure"
12594 #include "confdefs.h"
12595
12596 #include <sys/types.h>
12597 #include <netinet/in.h>
12598       
12599 int main() {
12600 static struct ip_mreq x;
12601 ; return 0; }
12602 EOF
12603 if { (eval echo configure:12604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12604   rm -rf conftest*
12605   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12606     Defining HAVE_MULTICAST
12607 EOF
12608 cat >> confdefs.h <<\EOF
12609 #define HAVE_MULTICAST 1
12610 EOF
12611 }
12612
12613 else
12614   echo "configure: failed program was:" >&5
12615   cat conftest.$ac_ext >&5
12616   rm -rf conftest*
12617   echo "$ac_t""no" 1>&6
12618 fi
12619 rm -f conftest*
12620 else
12621   echo "$ac_t""no" 1>&6
12622 fi
12623
12624 else
12625   echo "$ac_t""no" 1>&6
12626 fi
12627
12628 else
12629   echo "$ac_t""no" 1>&6
12630 fi
12631
12632
12633 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12634 echo "configure:12635: checking for msgget" >&5
12635
12636 cat > conftest.$ac_ext <<EOF
12637 #line 12638 "configure"
12638 #include "confdefs.h"
12639 /* System header to define __stub macros and hopefully few prototypes,
12640     which can conflict with char msgget(); below.  */
12641 #include <assert.h>
12642 /* Override any gcc2 internal prototype to avoid an error.  */
12643 /* We use char because int might match the return type of a gcc2
12644     builtin and then its argument prototype would still apply.  */
12645 char msgget();
12646
12647 int main() {
12648
12649 /* The GNU C library defines this for functions which it implements
12650     to always fail with ENOSYS.  Some functions are actually named
12651     something starting with __ and the normal name is an alias.  */
12652 #if defined (__stub_msgget) || defined (__stub___msgget)
12653 choke me
12654 #else
12655 msgget();
12656 #endif
12657
12658 ; return 0; }
12659 EOF
12660 if { (eval echo configure:12661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12661   rm -rf conftest*
12662   eval "ac_cv_func_msgget=yes"
12663 else
12664   echo "configure: failed program was:" >&5
12665   cat conftest.$ac_ext >&5
12666   rm -rf conftest*
12667   eval "ac_cv_func_msgget=no"
12668 fi
12669 rm -f conftest*
12670
12671 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12672   echo "$ac_t""yes" 1>&6
12673   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12674 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12675 echo "configure:12676: checking for sys/ipc.h" >&5
12676
12677 cat > conftest.$ac_ext <<EOF
12678 #line 12679 "configure"
12679 #include "confdefs.h"
12680 #include <sys/ipc.h>
12681 EOF
12682 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12683 { (eval echo configure:12684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12684 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12685 if test -z "$ac_err"; then
12686   rm -rf conftest*
12687   eval "ac_cv_header_$ac_safe=yes"
12688 else
12689   echo "$ac_err" >&5
12690   echo "configure: failed program was:" >&5
12691   cat conftest.$ac_ext >&5
12692   rm -rf conftest*
12693   eval "ac_cv_header_$ac_safe=no"
12694 fi
12695 rm -f conftest*
12696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12697   echo "$ac_t""yes" 1>&6
12698   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12699 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12700 echo "configure:12701: checking for sys/msg.h" >&5
12701
12702 cat > conftest.$ac_ext <<EOF
12703 #line 12704 "configure"
12704 #include "confdefs.h"
12705 #include <sys/msg.h>
12706 EOF
12707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12708 { (eval echo configure:12709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12710 if test -z "$ac_err"; then
12711   rm -rf conftest*
12712   eval "ac_cv_header_$ac_safe=yes"
12713 else
12714   echo "$ac_err" >&5
12715   echo "configure: failed program was:" >&5
12716   cat conftest.$ac_ext >&5
12717   rm -rf conftest*
12718   eval "ac_cv_header_$ac_safe=no"
12719 fi
12720 rm -f conftest*
12721 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12722   echo "$ac_t""yes" 1>&6
12723   { test "$extra_verbose" = "yes" && cat << \EOF
12724     Defining HAVE_SYSVIPC
12725 EOF
12726 cat >> confdefs.h <<\EOF
12727 #define HAVE_SYSVIPC 1
12728 EOF
12729 }
12730
12731 else
12732   echo "$ac_t""no" 1>&6
12733 fi
12734
12735 else
12736   echo "$ac_t""no" 1>&6
12737 fi
12738
12739 else
12740   echo "$ac_t""no" 1>&6
12741 fi
12742
12743
12744 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12745 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12746 echo "configure:12747: checking for dirent.h" >&5
12747
12748 cat > conftest.$ac_ext <<EOF
12749 #line 12750 "configure"
12750 #include "confdefs.h"
12751 #include <dirent.h>
12752 EOF
12753 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12754 { (eval echo configure:12755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12755 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12756 if test -z "$ac_err"; then
12757   rm -rf conftest*
12758   eval "ac_cv_header_$ac_safe=yes"
12759 else
12760   echo "$ac_err" >&5
12761   echo "configure: failed program was:" >&5
12762   cat conftest.$ac_ext >&5
12763   rm -rf conftest*
12764   eval "ac_cv_header_$ac_safe=no"
12765 fi
12766 rm -f conftest*
12767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12768   echo "$ac_t""yes" 1>&6
12769   { test "$extra_verbose" = "yes" && cat << \EOF
12770     Defining SYSV_SYSTEM_DIR
12771 EOF
12772 cat >> confdefs.h <<\EOF
12773 #define SYSV_SYSTEM_DIR 1
12774 EOF
12775 }
12776
12777 else
12778   echo "$ac_t""no" 1>&6
12779 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12780 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12781 echo "configure:12782: checking for sys/dir.h" >&5
12782
12783 cat > conftest.$ac_ext <<EOF
12784 #line 12785 "configure"
12785 #include "confdefs.h"
12786 #include <sys/dir.h>
12787 EOF
12788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12789 { (eval echo configure:12790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12791 if test -z "$ac_err"; then
12792   rm -rf conftest*
12793   eval "ac_cv_header_$ac_safe=yes"
12794 else
12795   echo "$ac_err" >&5
12796   echo "configure: failed program was:" >&5
12797   cat conftest.$ac_ext >&5
12798   rm -rf conftest*
12799   eval "ac_cv_header_$ac_safe=no"
12800 fi
12801 rm -f conftest*
12802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12803   echo "$ac_t""yes" 1>&6
12804   :
12805 else
12806   echo "$ac_t""no" 1>&6
12807 { test "$extra_verbose" = "yes" && cat << \EOF
12808     Defining NONSYSTEM_DIR_LIBRARY
12809 EOF
12810 cat >> confdefs.h <<\EOF
12811 #define NONSYSTEM_DIR_LIBRARY 1
12812 EOF
12813 }
12814
12815 fi
12816
12817 fi
12818
12819
12820 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12821 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12822 echo "configure:12823: checking for nlist.h" >&5
12823
12824 cat > conftest.$ac_ext <<EOF
12825 #line 12826 "configure"
12826 #include "confdefs.h"
12827 #include <nlist.h>
12828 EOF
12829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12830 { (eval echo configure:12831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12832 if test -z "$ac_err"; then
12833   rm -rf conftest*
12834   eval "ac_cv_header_$ac_safe=yes"
12835 else
12836   echo "$ac_err" >&5
12837   echo "configure: failed program was:" >&5
12838   cat conftest.$ac_ext >&5
12839   rm -rf conftest*
12840   eval "ac_cv_header_$ac_safe=no"
12841 fi
12842 rm -f conftest*
12843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12844   echo "$ac_t""yes" 1>&6
12845   { test "$extra_verbose" = "yes" && cat << \EOF
12846     Defining NLIST_STRUCT
12847 EOF
12848 cat >> confdefs.h <<\EOF
12849 #define NLIST_STRUCT 1
12850 EOF
12851 }
12852
12853 else
12854   echo "$ac_t""no" 1>&6
12855 fi
12856
12857
12858
12859 echo "checking "for sound support"" 1>&6
12860 echo "configure:12861: checking "for sound support"" >&5
12861 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12862
12863 if test "$with_native_sound" != "no"; then
12864     if test -n "$native_sound_lib"; then
12865     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12866 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12867 echo "configure:12868: checking for multimedia/audio_device.h" >&5
12868
12869 cat > conftest.$ac_ext <<EOF
12870 #line 12871 "configure"
12871 #include "confdefs.h"
12872 #include <multimedia/audio_device.h>
12873 EOF
12874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12875 { (eval echo configure:12876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12877 if test -z "$ac_err"; then
12878   rm -rf conftest*
12879   eval "ac_cv_header_$ac_safe=yes"
12880 else
12881   echo "$ac_err" >&5
12882   echo "configure: failed program was:" >&5
12883   cat conftest.$ac_ext >&5
12884   rm -rf conftest*
12885   eval "ac_cv_header_$ac_safe=no"
12886 fi
12887 rm -f conftest*
12888 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12889   echo "$ac_t""yes" 1>&6
12890   sound_found=yes sound_cflags=""
12891       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12892    echo "    xemacs will be linked with \"sunplay.o\""
12893  fi
12894 else
12895   echo "$ac_t""no" 1>&6
12896 fi
12897
12898   fi
12899
12900     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12901     sound_found=yes
12902     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12903    echo "    xemacs will be linked with \"sunplay.o\""
12904  fi
12905     if test -d "/usr/demo/SOUND/include"
12906       then sound_cflags="-I/usr/demo/SOUND/include"
12907       else sound_cflags="-I/usr/demo/SOUND"
12908     fi
12909     if test -z "$native_sound_lib" ; then
12910       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12911         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12912         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12913       fi
12914     fi
12915   fi
12916
12917     if test -z "$sound_found"; then
12918     case "$canonical" in
12919     *-sgi-* )
12920       if test -z "$native_sound_lib"; then
12921         
12922 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12923 echo "configure:12924: checking for ALopenport in -laudio" >&5
12924 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12925
12926 xe_check_libs=" -laudio "
12927 cat > conftest.$ac_ext <<EOF
12928 #line 12929 "configure"
12929 #include "confdefs.h"
12930 /* Override any gcc2 internal prototype to avoid an error.  */
12931 /* We use char because int might match the return type of a gcc2
12932     builtin and then its argument prototype would still apply.  */
12933 char ALopenport();
12934
12935 int main() {
12936 ALopenport()
12937 ; return 0; }
12938 EOF
12939 if { (eval echo configure:12940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12940   rm -rf conftest*
12941   eval "ac_cv_lib_$ac_lib_var=yes"
12942 else
12943   echo "configure: failed program was:" >&5
12944   cat conftest.$ac_ext >&5
12945   rm -rf conftest*
12946   eval "ac_cv_lib_$ac_lib_var=no"
12947 fi
12948 rm -f conftest*
12949 xe_check_libs=""
12950
12951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12952   echo "$ac_t""yes" 1>&6
12953   native_sound_lib="-laudio"
12954 else
12955   echo "$ac_t""no" 1>&6
12956 fi
12957
12958
12959       fi
12960       if test -n "$native_sound_lib"; then
12961         sound_found=yes sound_cflags=""
12962         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12963    echo "    xemacs will be linked with \"sgiplay.o\""
12964  fi
12965       fi ;;
12966     hppa*-hp-hpux* )
12967       if test -z "$native_sound_lib"; then
12968         
12969 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12970 echo "configure:12971: checking for AOpenAudio in -lAlib" >&5
12971 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12972
12973 xe_check_libs=" -lAlib "
12974 cat > conftest.$ac_ext <<EOF
12975 #line 12976 "configure"
12976 #include "confdefs.h"
12977 /* Override any gcc2 internal prototype to avoid an error.  */
12978 /* We use char because int might match the return type of a gcc2
12979     builtin and then its argument prototype would still apply.  */
12980 char AOpenAudio();
12981
12982 int main() {
12983 AOpenAudio()
12984 ; return 0; }
12985 EOF
12986 if { (eval echo configure:12987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12987   rm -rf conftest*
12988   eval "ac_cv_lib_$ac_lib_var=yes"
12989 else
12990   echo "configure: failed program was:" >&5
12991   cat conftest.$ac_ext >&5
12992   rm -rf conftest*
12993   eval "ac_cv_lib_$ac_lib_var=no"
12994 fi
12995 rm -f conftest*
12996 xe_check_libs=""
12997
12998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12999   echo "$ac_t""yes" 1>&6
13000   native_sound_lib="-lAlib"
13001 else
13002   echo "$ac_t""no" 1>&6
13003 fi
13004
13005
13006       fi
13007       if test -n "$native_sound_lib"; then
13008         sound_found=yes
13009         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13010    echo "    xemacs will be linked with \"hpplay.o\""
13011  fi
13012         if test "$GCC" = "yes" # Kludge city
13013           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13014           else sound_cflags="+e -I/usr/audio/examples"
13015         fi
13016       fi ;;
13017     esac
13018   fi
13019
13020     if test -z "$sound_found"; then
13021     if test "$with_msw" = "yes"; then
13022     sound_found=yes
13023     native_sound_lib=
13024     fi
13025   fi
13026
13027     if test -z "$sound_found"; then
13028     for dir in "machine" "sys" "linux"; do
13029       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13030 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13031 echo "configure:13032: checking for ${dir}/soundcard.h" >&5
13032
13033 cat > conftest.$ac_ext <<EOF
13034 #line 13035 "configure"
13035 #include "confdefs.h"
13036 #include <${dir}/soundcard.h>
13037 EOF
13038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13039 { (eval echo configure:13040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13040 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13041 if test -z "$ac_err"; then
13042   rm -rf conftest*
13043   eval "ac_cv_header_$ac_safe=yes"
13044 else
13045   echo "$ac_err" >&5
13046   echo "configure: failed program was:" >&5
13047   cat conftest.$ac_ext >&5
13048   rm -rf conftest*
13049   eval "ac_cv_header_$ac_safe=no"
13050 fi
13051 rm -f conftest*
13052 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13053   echo "$ac_t""yes" 1>&6
13054   sound_found=yes
13055        need_miscplay=yes
13056         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13057    echo "    xemacs will be linked with \"linuxplay.o\""
13058  fi
13059         { test "$extra_verbose" = "yes" && cat << EOF
13060     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13061 EOF
13062 cat >> confdefs.h <<EOF
13063 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13064 EOF
13065 }
13066
13067         break
13068 else
13069   echo "$ac_t""no" 1>&6
13070 fi
13071
13072     done
13073   fi
13074
13075   test "$sound_found" = "yes" && with_native_sound=yes
13076 fi
13077
13078 if test "$with_native_sound" = "yes"; then
13079   { test "$extra_verbose" = "yes" && cat << \EOF
13080     Defining HAVE_NATIVE_SOUND
13081 EOF
13082 cat >> confdefs.h <<\EOF
13083 #define HAVE_NATIVE_SOUND 1
13084 EOF
13085 }
13086
13087   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13088 fi
13089
13090 if test "$with_nas_sound" != "no"; then
13091   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13092 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13093 echo "configure:13094: checking for audio/audiolib.h" >&5
13094
13095 cat > conftest.$ac_ext <<EOF
13096 #line 13097 "configure"
13097 #include "confdefs.h"
13098 #include <audio/audiolib.h>
13099 EOF
13100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13101 { (eval echo configure:13102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13103 if test -z "$ac_err"; then
13104   rm -rf conftest*
13105   eval "ac_cv_header_$ac_safe=yes"
13106 else
13107   echo "$ac_err" >&5
13108   echo "configure: failed program was:" >&5
13109   cat conftest.$ac_ext >&5
13110   rm -rf conftest*
13111   eval "ac_cv_header_$ac_safe=no"
13112 fi
13113 rm -f conftest*
13114 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13115   echo "$ac_t""yes" 1>&6
13116   
13117     
13118 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13119 echo "configure:13120: checking for AuOpenServer in -laudio" >&5
13120 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13121
13122 xe_check_libs=" -laudio "
13123 cat > conftest.$ac_ext <<EOF
13124 #line 13125 "configure"
13125 #include "confdefs.h"
13126 /* Override any gcc2 internal prototype to avoid an error.  */
13127 /* We use char because int might match the return type of a gcc2
13128     builtin and then its argument prototype would still apply.  */
13129 char AuOpenServer();
13130
13131 int main() {
13132 AuOpenServer()
13133 ; return 0; }
13134 EOF
13135 if { (eval echo configure:13136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13136   rm -rf conftest*
13137   eval "ac_cv_lib_$ac_lib_var=yes"
13138 else
13139   echo "configure: failed program was:" >&5
13140   cat conftest.$ac_ext >&5
13141   rm -rf conftest*
13142   eval "ac_cv_lib_$ac_lib_var=no"
13143 fi
13144 rm -f conftest*
13145 xe_check_libs=""
13146
13147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13148   echo "$ac_t""yes" 1>&6
13149   have_nas_sound=yes
13150 else
13151   echo "$ac_t""no" 1>&6
13152 fi
13153
13154
13155 else
13156   echo "$ac_t""no" 1>&6
13157 fi
13158
13159   if test "$have_nas_sound" = "yes"; then
13160     with_nas_sound=yes
13161     { test "$extra_verbose" = "yes" && cat << \EOF
13162     Defining HAVE_NAS_SOUND
13163 EOF
13164 cat >> confdefs.h <<\EOF
13165 #define HAVE_NAS_SOUND 1
13166 EOF
13167 }
13168
13169     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13170    echo "    xemacs will be linked with \"nas.o\""
13171  fi
13172     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13173             cat > conftest.$ac_ext <<EOF
13174 #line 13175 "configure"
13175 #include "confdefs.h"
13176 #include <audio/Xtutil.h>
13177 EOF
13178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13179   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13180   :
13181 else
13182   rm -rf conftest*
13183   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13184     Defining NAS_NO_ERROR_JUMP
13185 EOF
13186 cat >> confdefs.h <<\EOF
13187 #define NAS_NO_ERROR_JUMP 1
13188 EOF
13189 }
13190
13191 fi
13192 rm -f conftest*
13193
13194   else
13195     test "$with_nas_sound" = "yes" && \
13196       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13197     with_nas_sound=no
13198   fi
13199 fi
13200
13201 if test "$with_esd_sound" != "no"; then
13202   # Extract the first word of "esd-config", so it can be a program name with args.
13203 set dummy esd-config; ac_word=$2
13204 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13205 echo "configure:13206: checking for $ac_word" >&5
13206
13207 if test -n "$have_esd_config"; then
13208   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13209 else
13210   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13211   ac_dummy="$PATH"
13212   for ac_dir in $ac_dummy; do
13213     test -z "$ac_dir" && ac_dir=.
13214     if test -f $ac_dir/$ac_word; then
13215       ac_cv_prog_have_esd_config="yes"
13216       break
13217     fi
13218   done
13219   IFS="$ac_save_ifs"
13220   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13221 fi
13222 have_esd_config="$ac_cv_prog_have_esd_config"
13223 if test -n "$have_esd_config"; then
13224   echo "$ac_t""$have_esd_config" 1>&6
13225 else
13226   echo "$ac_t""no" 1>&6
13227 fi
13228
13229   if test "$have_esd_config" = "yes"; then
13230     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13231     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
13232     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13233     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13234 echo "configure:13235: checking for esd_play_stream" >&5
13235
13236 cat > conftest.$ac_ext <<EOF
13237 #line 13238 "configure"
13238 #include "confdefs.h"
13239 /* System header to define __stub macros and hopefully few prototypes,
13240     which can conflict with char esd_play_stream(); below.  */
13241 #include <assert.h>
13242 /* Override any gcc2 internal prototype to avoid an error.  */
13243 /* We use char because int might match the return type of a gcc2
13244     builtin and then its argument prototype would still apply.  */
13245 char esd_play_stream();
13246
13247 int main() {
13248
13249 /* The GNU C library defines this for functions which it implements
13250     to always fail with ENOSYS.  Some functions are actually named
13251     something starting with __ and the normal name is an alias.  */
13252 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13253 choke me
13254 #else
13255 esd_play_stream();
13256 #endif
13257
13258 ; return 0; }
13259 EOF
13260 if { (eval echo configure:13261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13261   rm -rf conftest*
13262   eval "ac_cv_func_esd_play_stream=yes"
13263 else
13264   echo "configure: failed program was:" >&5
13265   cat conftest.$ac_ext >&5
13266   rm -rf conftest*
13267   eval "ac_cv_func_esd_play_stream=no"
13268 fi
13269 rm -f conftest*
13270
13271 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13272   echo "$ac_t""yes" 1>&6
13273   have_esd_sound=yes
13274 else
13275   echo "$ac_t""no" 1>&6
13276 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13277 fi
13278
13279   fi
13280
13281   if test "$have_esd_sound" = "yes"; then
13282     with_esd_sound=yes
13283     need_miscplay=yes
13284     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13285    echo "    xemacs will be linked with \"esd.o\""
13286  fi
13287     { test "$extra_verbose" = "yes" && cat << \EOF
13288     Defining HAVE_ESD_SOUND
13289 EOF
13290 cat >> confdefs.h <<\EOF
13291 #define HAVE_ESD_SOUND 1
13292 EOF
13293 }
13294
13295   else
13296     test "$with_esd_sound" = "yes" && \
13297       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13298     with_esd_sound=no
13299   fi
13300 fi
13301
13302 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13303    echo "    xemacs will be linked with \"miscplay.o\""
13304  fi
13305
13306
13307 test -z "$with_tty" && with_tty=yes
13308
13309 if test "$with_tty" = "yes"  ; then
13310   echo "checking for TTY-related features" 1>&6
13311 echo "configure:13312: checking for TTY-related features" >&5
13312   { test "$extra_verbose" = "yes" && cat << \EOF
13313     Defining HAVE_TTY
13314 EOF
13315 cat >> confdefs.h <<\EOF
13316 #define HAVE_TTY 1
13317 EOF
13318 }
13319
13320   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
13321    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\""
13322  fi
13323
13324     if test -z "$with_ncurses"; then
13325     
13326 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13327 echo "configure:13328: checking for tgetent in -lncurses" >&5
13328 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13329
13330 xe_check_libs=" -lncurses "
13331 cat > conftest.$ac_ext <<EOF
13332 #line 13333 "configure"
13333 #include "confdefs.h"
13334 /* Override any gcc2 internal prototype to avoid an error.  */
13335 /* We use char because int might match the return type of a gcc2
13336     builtin and then its argument prototype would still apply.  */
13337 char tgetent();
13338
13339 int main() {
13340 tgetent()
13341 ; return 0; }
13342 EOF
13343 if { (eval echo configure:13344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13344   rm -rf conftest*
13345   eval "ac_cv_lib_$ac_lib_var=yes"
13346 else
13347   echo "configure: failed program was:" >&5
13348   cat conftest.$ac_ext >&5
13349   rm -rf conftest*
13350   eval "ac_cv_lib_$ac_lib_var=no"
13351 fi
13352 rm -f conftest*
13353 xe_check_libs=""
13354
13355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13356   echo "$ac_t""yes" 1>&6
13357   with_ncurses=yes
13358 else
13359   echo "$ac_t""no" 1>&6
13360 with_ncurses=no
13361 fi
13362
13363
13364   fi
13365   if test "$with_ncurses" = "yes"; then
13366     { test "$extra_verbose" = "yes" && cat << \EOF
13367     Defining HAVE_NCURSES
13368 EOF
13369 cat >> confdefs.h <<\EOF
13370 #define HAVE_NCURSES 1
13371 EOF
13372 }
13373
13374     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13375 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13376 echo "configure:13377: checking for ncurses/curses.h" >&5
13377
13378 cat > conftest.$ac_ext <<EOF
13379 #line 13380 "configure"
13380 #include "confdefs.h"
13381 #include <ncurses/curses.h>
13382 EOF
13383 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13384 { (eval echo configure:13385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13385 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13386 if test -z "$ac_err"; then
13387   rm -rf conftest*
13388   eval "ac_cv_header_$ac_safe=yes"
13389 else
13390   echo "$ac_err" >&5
13391   echo "configure: failed program was:" >&5
13392   cat conftest.$ac_ext >&5
13393   rm -rf conftest*
13394   eval "ac_cv_header_$ac_safe=no"
13395 fi
13396 rm -f conftest*
13397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13398   echo "$ac_t""yes" 1>&6
13399   curses_h_file=ncurses/curses.h
13400 else
13401   echo "$ac_t""no" 1>&6
13402 fi
13403
13404     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13405 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13406 echo "configure:13407: checking for ncurses/term.h" >&5
13407
13408 cat > conftest.$ac_ext <<EOF
13409 #line 13410 "configure"
13410 #include "confdefs.h"
13411 #include <ncurses/term.h>
13412 EOF
13413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13414 { (eval echo configure:13415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13416 if test -z "$ac_err"; then
13417   rm -rf conftest*
13418   eval "ac_cv_header_$ac_safe=yes"
13419 else
13420   echo "$ac_err" >&5
13421   echo "configure: failed program was:" >&5
13422   cat conftest.$ac_ext >&5
13423   rm -rf conftest*
13424   eval "ac_cv_header_$ac_safe=no"
13425 fi
13426 rm -f conftest*
13427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13428   echo "$ac_t""yes" 1>&6
13429   term_h_file=ncurses/term.h
13430 else
13431   echo "$ac_t""no" 1>&6
13432 fi
13433
13434     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13435    echo "    xemacs will be linked with \"terminfo.o\""
13436  fi
13437     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13438
13439     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13440                         save_c_switch_site="$c_switch_site"
13441       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13442       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13443 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13444 echo "configure:13445: checking for ncurses/curses.h" >&5
13445
13446 cat > conftest.$ac_ext <<EOF
13447 #line 13448 "configure"
13448 #include "confdefs.h"
13449 #include <ncurses/curses.h>
13450 EOF
13451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13452 { (eval echo configure:13453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13454 if test -z "$ac_err"; then
13455   rm -rf conftest*
13456   eval "ac_cv_header_$ac_safe=yes"
13457 else
13458   echo "$ac_err" >&5
13459   echo "configure: failed program was:" >&5
13460   cat conftest.$ac_ext >&5
13461   rm -rf conftest*
13462   eval "ac_cv_header_$ac_safe=no"
13463 fi
13464 rm -f conftest*
13465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13466   echo "$ac_t""yes" 1>&6
13467   curses_h_file=ncurses/curses.h
13468 else
13469   echo "$ac_t""no" 1>&6
13470 fi
13471
13472       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13473         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13474         else c_switch_site="$save_c_switch_site"
13475       fi
13476     fi
13477   else         if test "$have_terminfo" = "yes"; then
13478       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13479    echo "    xemacs will be linked with \"terminfo.o\""
13480  fi
13481       if test -n "$libs_termcap"; then
13482         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13483       else
13484         for lib in curses termlib termcap; do
13485           
13486 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13487 echo "configure:13488: checking for tgetent in -l$lib" >&5
13488 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13489
13490 xe_check_libs=" -l$lib "
13491 cat > conftest.$ac_ext <<EOF
13492 #line 13493 "configure"
13493 #include "confdefs.h"
13494 /* Override any gcc2 internal prototype to avoid an error.  */
13495 /* We use char because int might match the return type of a gcc2
13496     builtin and then its argument prototype would still apply.  */
13497 char tgetent();
13498
13499 int main() {
13500 tgetent()
13501 ; return 0; }
13502 EOF
13503 if { (eval echo configure:13504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13504   rm -rf conftest*
13505   eval "ac_cv_lib_$ac_lib_var=yes"
13506 else
13507   echo "configure: failed program was:" >&5
13508   cat conftest.$ac_ext >&5
13509   rm -rf conftest*
13510   eval "ac_cv_lib_$ac_lib_var=no"
13511 fi
13512 rm -f conftest*
13513 xe_check_libs=""
13514
13515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13516   echo "$ac_t""yes" 1>&6
13517   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13518 else
13519   echo "$ac_t""no" 1>&6
13520 fi
13521
13522
13523         done
13524       fi
13525     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13526    echo "    xemacs will be linked with \"tparam.o\""
13527  fi
13528                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13529       if test -n "$libs_termcap"; then
13530         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13531       else
13532         
13533 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13534 echo "configure:13535: checking for tgetent in -lcurses" >&5
13535 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13536
13537 xe_check_libs=" -lcurses "
13538 cat > conftest.$ac_ext <<EOF
13539 #line 13540 "configure"
13540 #include "confdefs.h"
13541 /* Override any gcc2 internal prototype to avoid an error.  */
13542 /* We use char because int might match the return type of a gcc2
13543     builtin and then its argument prototype would still apply.  */
13544 char tgetent();
13545
13546 int main() {
13547 tgetent()
13548 ; return 0; }
13549 EOF
13550 if { (eval echo configure:13551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13551   rm -rf conftest*
13552   eval "ac_cv_lib_$ac_lib_var=yes"
13553 else
13554   echo "configure: failed program was:" >&5
13555   cat conftest.$ac_ext >&5
13556   rm -rf conftest*
13557   eval "ac_cv_lib_$ac_lib_var=no"
13558 fi
13559 rm -f conftest*
13560 xe_check_libs=""
13561
13562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13563   echo "$ac_t""yes" 1>&6
13564   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13565 else
13566   echo "$ac_t""no" 1>&6
13567 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13568 echo "configure:13569: checking for tgetent in -ltermcap" >&5
13569 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13570
13571 xe_check_libs=" -ltermcap "
13572 cat > conftest.$ac_ext <<EOF
13573 #line 13574 "configure"
13574 #include "confdefs.h"
13575 /* Override any gcc2 internal prototype to avoid an error.  */
13576 /* We use char because int might match the return type of a gcc2
13577     builtin and then its argument prototype would still apply.  */
13578 char tgetent();
13579
13580 int main() {
13581 tgetent()
13582 ; return 0; }
13583 EOF
13584 if { (eval echo configure:13585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13585   rm -rf conftest*
13586   eval "ac_cv_lib_$ac_lib_var=yes"
13587 else
13588   echo "configure: failed program was:" >&5
13589   cat conftest.$ac_ext >&5
13590   rm -rf conftest*
13591   eval "ac_cv_lib_$ac_lib_var=no"
13592 fi
13593 rm -f conftest*
13594 xe_check_libs=""
13595
13596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13597   echo "$ac_t""yes" 1>&6
13598   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13599 else
13600   echo "$ac_t""no" 1>&6
13601 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13602    echo "    xemacs will be linked with \"termcap.o\""
13603  fi
13604 fi
13605
13606
13607 fi
13608
13609
13610       fi
13611     fi
13612   fi
13613   { test "$extra_verbose" = "yes" && cat << EOF
13614     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13615 EOF
13616 cat >> confdefs.h <<EOF
13617 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13618 EOF
13619 }
13620
13621   { test "$extra_verbose" = "yes" && cat << EOF
13622     Defining TERM_H_FILE = "${term_h_file-term.h}"
13623 EOF
13624 cat >> confdefs.h <<EOF
13625 #define TERM_H_FILE "${term_h_file-term.h}"
13626 EOF
13627 }
13628
13629
13630     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13631 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13632 echo "configure:13633: checking for gpm.h" >&5
13633
13634 cat > conftest.$ac_ext <<EOF
13635 #line 13636 "configure"
13636 #include "confdefs.h"
13637 #include <gpm.h>
13638 EOF
13639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13640 { (eval echo configure:13641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13642 if test -z "$ac_err"; then
13643   rm -rf conftest*
13644   eval "ac_cv_header_$ac_safe=yes"
13645 else
13646   echo "$ac_err" >&5
13647   echo "configure: failed program was:" >&5
13648   cat conftest.$ac_ext >&5
13649   rm -rf conftest*
13650   eval "ac_cv_header_$ac_safe=no"
13651 fi
13652 rm -f conftest*
13653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13654   echo "$ac_t""yes" 1>&6
13655   :
13656 else
13657   echo "$ac_t""no" 1>&6
13658 with_gpm=no
13659 fi
13660  }
13661   test -z "$with_gpm" && { 
13662 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13663 echo "configure:13664: checking for Gpm_Open in -lgpm" >&5
13664 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13665
13666 xe_check_libs=" -lgpm "
13667 cat > conftest.$ac_ext <<EOF
13668 #line 13669 "configure"
13669 #include "confdefs.h"
13670 /* Override any gcc2 internal prototype to avoid an error.  */
13671 /* We use char because int might match the return type of a gcc2
13672     builtin and then its argument prototype would still apply.  */
13673 char Gpm_Open();
13674
13675 int main() {
13676 Gpm_Open()
13677 ; return 0; }
13678 EOF
13679 if { (eval echo configure:13680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13680   rm -rf conftest*
13681   eval "ac_cv_lib_$ac_lib_var=yes"
13682 else
13683   echo "configure: failed program was:" >&5
13684   cat conftest.$ac_ext >&5
13685   rm -rf conftest*
13686   eval "ac_cv_lib_$ac_lib_var=no"
13687 fi
13688 rm -f conftest*
13689 xe_check_libs=""
13690
13691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13692   echo "$ac_t""yes" 1>&6
13693   with_gpm=yes
13694 else
13695   echo "$ac_t""no" 1>&6
13696 with_gpm=no
13697 fi
13698
13699  }
13700   if test "$with_gpm" = "yes"; then
13701     { test "$extra_verbose" = "yes" && cat << \EOF
13702     Defining HAVE_GPM
13703 EOF
13704 cat >> confdefs.h <<\EOF
13705 #define HAVE_GPM 1
13706 EOF
13707 }
13708
13709     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13710    echo "    xemacs will be linked with \"gpmevent.o\""
13711  fi
13712     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13713   fi
13714
13715 else   for feature in ncurses gpm; do
13716     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13717       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13718     fi
13719     eval "with_${feature}=no"
13720   done
13721 fi 
13722 test "$with_x11" = "yes" -o "$with_tty" = "yes" -o "$need_event_unixoid" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13723    echo "    xemacs will be linked with \"event-unixoid.o\""
13724  fi
13725
13726
13727 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13728   != "no no no" && echo "checking for database support" 1>&6
13729 echo "configure:13730: checking for database support" >&5
13730
13731 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13732   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13733 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13734 echo "configure:13735: checking for ndbm.h" >&5
13735
13736 cat > conftest.$ac_ext <<EOF
13737 #line 13738 "configure"
13738 #include "confdefs.h"
13739 #include <ndbm.h>
13740 EOF
13741 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13742 { (eval echo configure:13743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13743 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13744 if test -z "$ac_err"; then
13745   rm -rf conftest*
13746   eval "ac_cv_header_$ac_safe=yes"
13747 else
13748   echo "$ac_err" >&5
13749   echo "configure: failed program was:" >&5
13750   cat conftest.$ac_ext >&5
13751   rm -rf conftest*
13752   eval "ac_cv_header_$ac_safe=no"
13753 fi
13754 rm -f conftest*
13755 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13756   echo "$ac_t""yes" 1>&6
13757   :
13758 else
13759   echo "$ac_t""no" 1>&6
13760
13761     test "$with_database_gdbm" = "yes" -o \
13762          "$with_database_dbm"  = "yes" && \
13763       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13764     with_database_gdbm=no with_database_dbm=no
13765 fi
13766
13767 fi
13768
13769 if test "$with_database_gdbm" != "no"; then
13770   
13771 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13772 echo "configure:13773: checking for dbm_open in -lgdbm" >&5
13773 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13774
13775 xe_check_libs=" -lgdbm "
13776 cat > conftest.$ac_ext <<EOF
13777 #line 13778 "configure"
13778 #include "confdefs.h"
13779 /* Override any gcc2 internal prototype to avoid an error.  */
13780 /* We use char because int might match the return type of a gcc2
13781     builtin and then its argument prototype would still apply.  */
13782 char dbm_open();
13783
13784 int main() {
13785 dbm_open()
13786 ; return 0; }
13787 EOF
13788 if { (eval echo configure:13789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13789   rm -rf conftest*
13790   eval "ac_cv_lib_$ac_lib_var=yes"
13791 else
13792   echo "configure: failed program was:" >&5
13793   cat conftest.$ac_ext >&5
13794   rm -rf conftest*
13795   eval "ac_cv_lib_$ac_lib_var=no"
13796 fi
13797 rm -f conftest*
13798 xe_check_libs=""
13799
13800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13801   echo "$ac_t""yes" 1>&6
13802   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13803 else
13804   echo "$ac_t""no" 1>&6
13805 if test "$with_database_gdbm" = "yes"; then
13806      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13807    fi
13808    with_database_gdbm=no
13809 fi
13810
13811
13812 fi
13813
13814 if test "$with_database_dbm" != "no"; then
13815   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13816 echo "configure:13817: checking for dbm_open" >&5
13817
13818 cat > conftest.$ac_ext <<EOF
13819 #line 13820 "configure"
13820 #include "confdefs.h"
13821 /* System header to define __stub macros and hopefully few prototypes,
13822     which can conflict with char dbm_open(); below.  */
13823 #include <assert.h>
13824 /* Override any gcc2 internal prototype to avoid an error.  */
13825 /* We use char because int might match the return type of a gcc2
13826     builtin and then its argument prototype would still apply.  */
13827 char dbm_open();
13828
13829 int main() {
13830
13831 /* The GNU C library defines this for functions which it implements
13832     to always fail with ENOSYS.  Some functions are actually named
13833     something starting with __ and the normal name is an alias.  */
13834 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13835 choke me
13836 #else
13837 dbm_open();
13838 #endif
13839
13840 ; return 0; }
13841 EOF
13842 if { (eval echo configure:13843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13843   rm -rf conftest*
13844   eval "ac_cv_func_dbm_open=yes"
13845 else
13846   echo "configure: failed program was:" >&5
13847   cat conftest.$ac_ext >&5
13848   rm -rf conftest*
13849   eval "ac_cv_func_dbm_open=no"
13850 fi
13851 rm -f conftest*
13852
13853 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13854   echo "$ac_t""yes" 1>&6
13855   with_database_dbm=yes libdbm=
13856 else
13857   echo "$ac_t""no" 1>&6
13858
13859     
13860 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13861 echo "configure:13862: checking for dbm_open in -ldbm" >&5
13862 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13863
13864 xe_check_libs=" -ldbm "
13865 cat > conftest.$ac_ext <<EOF
13866 #line 13867 "configure"
13867 #include "confdefs.h"
13868 /* Override any gcc2 internal prototype to avoid an error.  */
13869 /* We use char because int might match the return type of a gcc2
13870     builtin and then its argument prototype would still apply.  */
13871 char dbm_open();
13872
13873 int main() {
13874 dbm_open()
13875 ; return 0; }
13876 EOF
13877 if { (eval echo configure:13878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13878   rm -rf conftest*
13879   eval "ac_cv_lib_$ac_lib_var=yes"
13880 else
13881   echo "configure: failed program was:" >&5
13882   cat conftest.$ac_ext >&5
13883   rm -rf conftest*
13884   eval "ac_cv_lib_$ac_lib_var=no"
13885 fi
13886 rm -f conftest*
13887 xe_check_libs=""
13888
13889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13890   echo "$ac_t""yes" 1>&6
13891   with_database_dbm=yes libdbm=-ldbm
13892 else
13893   echo "$ac_t""no" 1>&6
13894 test "$with_database_dbm" = "yes" && \
13895         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13896       with_database_dbm=no
13897 fi
13898
13899
13900 fi
13901
13902 fi
13903
13904 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13905 test "$with_database_gdbm" = "yes" -o \
13906      "$with_database_dbm"  = "yes" && \
13907   { test "$extra_verbose" = "yes" && cat << \EOF
13908     Defining HAVE_DBM
13909 EOF
13910 cat >> confdefs.h <<\EOF
13911 #define HAVE_DBM 1
13912 EOF
13913 }
13914
13915
13916 if test "$with_database_berkdb" != "no"; then
13917   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13918 echo "configure:13919: checking for Berkeley db.h" >&5
13919   for header in "db/db.h" "db.h"; do
13920     cat > conftest.$ac_ext <<EOF
13921 #line 13922 "configure"
13922 #include "confdefs.h"
13923
13924 #include <stdlib.h>
13925 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13926 #ifdef HAVE_INTTYPES_H
13927 #define __BIT_TYPES_DEFINED__
13928 #include <inttypes.h>
13929 typedef uint8_t  u_int8_t;
13930 typedef uint16_t u_int16_t;
13931 typedef uint32_t u_int32_t;
13932 #ifdef WE_DONT_NEED_QUADS
13933 typedef uint64_t u_int64_t;
13934 #endif
13935 #endif
13936 #endif
13937 #include <$header>
13938
13939 int main() {
13940
13941 ; return 0; }
13942 EOF
13943 if { (eval echo configure:13944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13944   rm -rf conftest*
13945   db_h_file="$header"; break
13946 else
13947   echo "configure: failed program was:" >&5
13948   cat conftest.$ac_ext >&5
13949 fi
13950 rm -f conftest*
13951   done
13952   if test -z "$db_h_file"
13953   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13954   else echo "$ac_t""$db_h_file" 1>&6
13955   fi
13956
13957   if test "$with_database_berkdb" != "no"; then
13958     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13959 echo "configure:13960: checking for Berkeley DB version" >&5
13960     cat > conftest.$ac_ext <<EOF
13961 #line 13962 "configure"
13962 #include "confdefs.h"
13963 #include <$db_h_file>
13964 #if DB_VERSION_MAJOR > 1
13965 yes
13966 #endif
13967
13968 EOF
13969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13970   egrep "yes" >/dev/null 2>&1; then
13971   rm -rf conftest*
13972   cat > conftest.$ac_ext <<EOF
13973 #line 13974 "configure"
13974 #include "confdefs.h"
13975 #include <$db_h_file>
13976 #if DB_VERSION_MAJOR > 2
13977 yes
13978 #endif
13979
13980 EOF
13981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13982   egrep "yes" >/dev/null 2>&1; then
13983   rm -rf conftest*
13984   echo "$ac_t""3" 1>&6; dbfunc=db_create
13985 else
13986   rm -rf conftest*
13987   
13988     echo "$ac_t""2" 1>&6; dbfunc=db_open
13989 fi
13990 rm -f conftest*
13991
13992 else
13993   rm -rf conftest*
13994   
13995     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13996 fi
13997 rm -f conftest*
13998
13999     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14000 echo "configure:14001: checking for $dbfunc" >&5
14001
14002 cat > conftest.$ac_ext <<EOF
14003 #line 14004 "configure"
14004 #include "confdefs.h"
14005 /* System header to define __stub macros and hopefully few prototypes,
14006     which can conflict with char $dbfunc(); below.  */
14007 #include <assert.h>
14008 /* Override any gcc2 internal prototype to avoid an error.  */
14009 /* We use char because int might match the return type of a gcc2
14010     builtin and then its argument prototype would still apply.  */
14011 char $dbfunc();
14012
14013 int main() {
14014
14015 /* The GNU C library defines this for functions which it implements
14016     to always fail with ENOSYS.  Some functions are actually named
14017     something starting with __ and the normal name is an alias.  */
14018 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14019 choke me
14020 #else
14021 $dbfunc();
14022 #endif
14023
14024 ; return 0; }
14025 EOF
14026 if { (eval echo configure:14027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14027   rm -rf conftest*
14028   eval "ac_cv_func_$dbfunc=yes"
14029 else
14030   echo "configure: failed program was:" >&5
14031   cat conftest.$ac_ext >&5
14032   rm -rf conftest*
14033   eval "ac_cv_func_$dbfunc=no"
14034 fi
14035 rm -f conftest*
14036
14037 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14038   echo "$ac_t""yes" 1>&6
14039   with_database_berkdb=yes need_libdb=no
14040 else
14041   echo "$ac_t""no" 1>&6
14042
14043     
14044 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14045 echo "configure:14046: checking for $dbfunc in -ldb" >&5
14046 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14047
14048 xe_check_libs=" -ldb "
14049 cat > conftest.$ac_ext <<EOF
14050 #line 14051 "configure"
14051 #include "confdefs.h"
14052 /* Override any gcc2 internal prototype to avoid an error.  */
14053 /* We use char because int might match the return type of a gcc2
14054     builtin and then its argument prototype would still apply.  */
14055 char $dbfunc();
14056
14057 int main() {
14058 $dbfunc()
14059 ; return 0; }
14060 EOF
14061 if { (eval echo configure:14062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14062   rm -rf conftest*
14063   eval "ac_cv_lib_$ac_lib_var=yes"
14064 else
14065   echo "configure: failed program was:" >&5
14066   cat conftest.$ac_ext >&5
14067   rm -rf conftest*
14068   eval "ac_cv_lib_$ac_lib_var=no"
14069 fi
14070 rm -f conftest*
14071 xe_check_libs=""
14072
14073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14074   echo "$ac_t""yes" 1>&6
14075   with_database_berkdb=yes need_libdb=yes
14076 else
14077   echo "$ac_t""no" 1>&6
14078 fi
14079
14080
14081 fi
14082
14083   fi
14084
14085   if test "$with_database_berkdb" = "yes"; then
14086     { test "$extra_verbose" = "yes" && cat << EOF
14087     Defining DB_H_FILE = "$db_h_file"
14088 EOF
14089 cat >> confdefs.h <<EOF
14090 #define DB_H_FILE "$db_h_file"
14091 EOF
14092 }
14093
14094     { test "$extra_verbose" = "yes" && cat << \EOF
14095     Defining HAVE_BERKELEY_DB
14096 EOF
14097 cat >> confdefs.h <<\EOF
14098 #define HAVE_BERKELEY_DB 1
14099 EOF
14100 }
14101
14102     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14103   else with_database_berkdb=no
14104   fi
14105 fi
14106
14107 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14108      != "no no no"; then
14109   { test "$extra_verbose" = "yes" && cat << \EOF
14110     Defining HAVE_DATABASE
14111 EOF
14112 cat >> confdefs.h <<\EOF
14113 #define HAVE_DATABASE 1
14114 EOF
14115 }
14116
14117   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14118    echo "    xemacs will be linked with \"database.o\""
14119  fi
14120 fi
14121
14122 if test "$with_socks" = "yes"; then
14123   
14124 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14125 echo "configure:14126: checking for SOCKSinit in -lsocks" >&5
14126 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14127
14128 xe_check_libs=" -lsocks "
14129 cat > conftest.$ac_ext <<EOF
14130 #line 14131 "configure"
14131 #include "confdefs.h"
14132 /* Override any gcc2 internal prototype to avoid an error.  */
14133 /* We use char because int might match the return type of a gcc2
14134     builtin and then its argument prototype would still apply.  */
14135 char SOCKSinit();
14136
14137 int main() {
14138 SOCKSinit()
14139 ; return 0; }
14140 EOF
14141 if { (eval echo configure:14142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14142   rm -rf conftest*
14143   eval "ac_cv_lib_$ac_lib_var=yes"
14144 else
14145   echo "configure: failed program was:" >&5
14146   cat conftest.$ac_ext >&5
14147   rm -rf conftest*
14148   eval "ac_cv_lib_$ac_lib_var=no"
14149 fi
14150 rm -f conftest*
14151 xe_check_libs=""
14152
14153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14154   echo "$ac_t""yes" 1>&6
14155     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14156     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14157   { test "$extra_verbose" = "yes" && cat << EOF
14158     Defining $ac_tr_lib
14159 EOF
14160 cat >> confdefs.h <<EOF
14161 #define $ac_tr_lib 1
14162 EOF
14163 }
14164
14165   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14166
14167 else
14168   echo "$ac_t""no" 1>&6
14169 fi
14170
14171
14172   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14173     Defining HAVE_SOCKS
14174 EOF
14175 cat >> confdefs.h <<\EOF
14176 #define HAVE_SOCKS 1
14177 EOF
14178 }
14179
14180 fi
14181
14182 if test "$usage_tracking" = "yes"; then
14183   { test "$extra_verbose" = "yes" && cat << \EOF
14184     Defining USAGE_TRACKING
14185 EOF
14186 cat >> confdefs.h <<\EOF
14187 #define USAGE_TRACKING 1
14188 EOF
14189 }
14190
14191   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14192 fi
14193
14194 if test "$with_modules" != "no"; then
14195   echo "checking for module support" 1>&6
14196 echo "configure:14197: checking for module support" >&5
14197
14198     if test "$with_msw" = "yes"; then
14199     have_dl=yes;
14200   else
14201         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14202 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14203 echo "configure:14204: checking for dlfcn.h" >&5
14204
14205 cat > conftest.$ac_ext <<EOF
14206 #line 14207 "configure"
14207 #include "confdefs.h"
14208 #include <dlfcn.h>
14209 EOF
14210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14211 { (eval echo configure:14212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14213 if test -z "$ac_err"; then
14214   rm -rf conftest*
14215   eval "ac_cv_header_$ac_safe=yes"
14216 else
14217   echo "$ac_err" >&5
14218   echo "configure: failed program was:" >&5
14219   cat conftest.$ac_ext >&5
14220   rm -rf conftest*
14221   eval "ac_cv_header_$ac_safe=no"
14222 fi
14223 rm -f conftest*
14224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14225   echo "$ac_t""yes" 1>&6
14226   
14227       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14228 echo "configure:14229: checking for dlopen in -lc" >&5
14229       cat > conftest.$ac_ext <<EOF
14230 #line 14231 "configure"
14231 #include "confdefs.h"
14232 #include <dlfcn.h>
14233 int main() {
14234         dlopen ("", 0);
14235 ; return 0; }
14236 EOF
14237 if { (eval echo configure:14238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14238   rm -rf conftest*
14239    have_dl=yes 
14240 else
14241   echo "configure: failed program was:" >&5
14242   cat conftest.$ac_ext >&5
14243   rm -rf conftest*
14244   
14245       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14246 echo "configure:14247: checking for dlopen in -ldl" >&5
14247       ac_save_LIBS="$LIBS"
14248       LIBS="-ldl $LIBS"
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   LIBS="$ac_save_LIBS"
14265 fi
14266 rm -f conftest*
14267       ac_save_LIBS=
14268 fi
14269 rm -f conftest*
14270 else
14271   echo "$ac_t""no" 1>&6
14272 fi
14273
14274     if test -n "$have_dl"; then
14275       { test "$extra_verbose" = "yes" && cat << \EOF
14276     Defining HAVE_DLOPEN
14277 EOF
14278 cat >> confdefs.h <<\EOF
14279 #define HAVE_DLOPEN 1
14280 EOF
14281 }
14282
14283     else
14284       
14285 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14286 echo "configure:14287: checking for shl_load in -ldld" >&5
14287 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14288
14289 xe_check_libs=" -ldld "
14290 cat > conftest.$ac_ext <<EOF
14291 #line 14292 "configure"
14292 #include "confdefs.h"
14293 /* Override any gcc2 internal prototype to avoid an error.  */
14294 /* We use char because int might match the return type of a gcc2
14295     builtin and then its argument prototype would still apply.  */
14296 char shl_load();
14297
14298 int main() {
14299 shl_load()
14300 ; return 0; }
14301 EOF
14302 if { (eval echo configure:14303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14303   rm -rf conftest*
14304   eval "ac_cv_lib_$ac_lib_var=yes"
14305 else
14306   echo "configure: failed program was:" >&5
14307   cat conftest.$ac_ext >&5
14308   rm -rf conftest*
14309   eval "ac_cv_lib_$ac_lib_var=no"
14310 fi
14311 rm -f conftest*
14312 xe_check_libs=""
14313
14314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14315   echo "$ac_t""yes" 1>&6
14316   libdl=dld have_dl=yes;
14317         { test "$extra_verbose" = "yes" && cat << \EOF
14318     Defining HAVE_SHL_LOAD
14319 EOF
14320 cat >> confdefs.h <<\EOF
14321 #define HAVE_SHL_LOAD 1
14322 EOF
14323 }
14324
14325 else
14326   echo "$ac_t""no" 1>&6
14327
14328 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14329 echo "configure:14330: checking for dld_init in -ldld" >&5
14330 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14331
14332 xe_check_libs=" -ldld "
14333 cat > conftest.$ac_ext <<EOF
14334 #line 14335 "configure"
14335 #include "confdefs.h"
14336 /* Override any gcc2 internal prototype to avoid an error.  */
14337 /* We use char because int might match the return type of a gcc2
14338     builtin and then its argument prototype would still apply.  */
14339 char dld_init();
14340
14341 int main() {
14342 dld_init()
14343 ; return 0; }
14344 EOF
14345 if { (eval echo configure:14346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14346   rm -rf conftest*
14347   eval "ac_cv_lib_$ac_lib_var=yes"
14348 else
14349   echo "configure: failed program was:" >&5
14350   cat conftest.$ac_ext >&5
14351   rm -rf conftest*
14352   eval "ac_cv_lib_$ac_lib_var=no"
14353 fi
14354 rm -f conftest*
14355 xe_check_libs=""
14356
14357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14358   echo "$ac_t""yes" 1>&6
14359   libdl=dld have_dl=yes;
14360         { test "$extra_verbose" = "yes" && cat << \EOF
14361     Defining HAVE_DLD_INIT
14362 EOF
14363 cat >> confdefs.h <<\EOF
14364 #define HAVE_DLD_INIT 1
14365 EOF
14366 }
14367
14368 else
14369   echo "$ac_t""no" 1>&6
14370 fi
14371
14372
14373 fi
14374
14375
14376     fi
14377   fi 
14378   if test -n "$have_dl"; then
14379         
14380 dll_ld=
14381 dll_ldflags=
14382 dll_cflags=
14383 dll_post=
14384 dll_ldo="-o"
14385 ld_dynamic_link_flags=
14386 xehost=$canonical
14387 xealias=$internal_configuration
14388
14389 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14390 echo "configure:14391: checking how to build dynamic libraries for ${xehost}" >&5
14391 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14392 case "$xehost" in
14393 *-*-linux-gnu*) ;;
14394 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14395 esac
14396
14397 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14398 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14399 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14400
14401 case "$xehost_os" in
14402 aix3*)
14403   # AIX sometimes has problems with the GCC collect2 program.  For some
14404   # reason, if we set the COLLECT_NAMES environment variable, the problems
14405   # vanish in a puff of smoke.
14406   if test "${COLLECT_NAMES+set}" != set; then
14407     COLLECT_NAMES=
14408     export COLLECT_NAMES
14409   fi
14410   ;;
14411 esac
14412
14413 # Now see if the compiler is really GCC.
14414 if test "$GCC" = "yes"; then
14415   XEGCC=yes
14416 else
14417   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14418 echo "configure:14419: checking checking whether we are using GNU C" >&5
14419   cat > conftest.$ac_ext <<EOF
14420 #line 14421 "configure"
14421 #include "confdefs.h"
14422
14423 #ifdef __GNUC__
14424   yes;
14425 #endif
14426
14427 EOF
14428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14429   egrep "yes" >/dev/null 2>&1; then
14430   rm -rf conftest*
14431   XEGCC=yes
14432 else
14433   rm -rf conftest*
14434   XEGCC=no
14435 fi
14436 rm -f conftest*
14437
14438   echo "$ac_t""${XEGCC}" 1>&6
14439 fi
14440
14441 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14442 echo "configure:14443: checking how to produce PIC code" >&5
14443 wl=
14444
14445 can_build_shared=yes
14446 if test "$XEGCC" = yes; then
14447   wl='-Wl,'
14448
14449   case "$xehost_os" in
14450   aix[3-9]* | irix[5-9]* | osf[3-9])
14451     # PIC is the default for these OSes.
14452     ;;
14453
14454   os2*)
14455     # We can build DLLs from non-PIC.
14456     ;;
14457   amigaos*)
14458     # FIXME: we need at least 68020 code to build shared libraries, but
14459     # adding the `-m68020' flag to GCC prevents building anything better,
14460     # like `-m68040'.
14461     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14462     ;;
14463   *cygwin* | *mingw* )
14464     # PIC is the default
14465     ;;
14466   *)
14467     dll_cflags='-fPIC'
14468     ;;
14469   esac
14470 else
14471   # PORTME Check for PIC flags for the system compiler.
14472   case "$xehost_os" in
14473   hpux9* | hpux1[0-9]*)
14474     # Is there a better link_static_flag that works with the bundled CC?
14475     wl='-Wl,'
14476     dll_cflags='+Z'
14477     ;;
14478
14479   irix[5-9]*)
14480     wl='-Wl,'
14481     # PIC (with -KPIC) is the default.
14482     ;;
14483
14484   os2*)
14485     # We can build DLLs from non-PIC.
14486     ;;
14487
14488   osf[3-9]*)
14489     # All OSF/1 code is PIC.
14490     wl='-Wl,'
14491     ;;
14492
14493   aix[3-9]*)
14494     # All AIX code is PIC.
14495     wl='-Wl,'
14496     ;;
14497
14498   sco3.2v5*)
14499     dll_cflags='-belf -Kpic'
14500     wl='-Wl,'
14501     ;;
14502
14503   unixware*)
14504     dll_cflags="-KPIC"
14505     wl="-Wl,"
14506     ;;
14507
14508   sysv4*)
14509     dll_cflags="-KPIC"
14510     wl="-Wl,"
14511     ;;
14512
14513   sysv5*)
14514     dll_cflags="-KPIC"
14515     wl="-Wl,"
14516     ;;
14517
14518   solaris2*)
14519     dll_cflags='-KPIC'
14520     wl='-Wl,'
14521     ;;
14522
14523   sunos4*)
14524     dll_cflags='-PIC'
14525     wl='-Qoption ld '
14526     ;;
14527
14528   uts4*)
14529     dll_cflags='-pic'
14530     ;;
14531
14532   *)
14533     can_build_shared=no
14534     ;;
14535   esac
14536 fi
14537
14538 if test -n "$dll_cflags"; then
14539   echo "$ac_t""${dll_cflags}" 1>&6
14540
14541   # Check to make sure the dll_cflags actually works.
14542   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14543 echo "configure:14544: checking if PIC flag ${dll_cflags} really works" >&5
14544   save_CFLAGS="$CFLAGS"
14545   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14546   cat > conftest.$ac_ext <<EOF
14547 #line 14548 "configure"
14548 #include "confdefs.h"
14549
14550 int main() {
14551 int x=0;
14552 ; return 0; }
14553 EOF
14554 if { (eval echo configure:14555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14555   rm -rf conftest*
14556   
14557     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14558     # reports no error.  So, we need to grep stderr for (Bundled).
14559     if grep '(Bundled)' config.log >/dev/null; then
14560       echo "$ac_t""no" 1>&6
14561       can_build_shared=no
14562       dll_cflags=
14563     else
14564       echo "$ac_t""yes" 1>&6
14565     fi
14566 else
14567   echo "configure: failed program was:" >&5
14568   cat conftest.$ac_ext >&5
14569   rm -rf conftest*
14570   echo "$ac_t""no" 1>&6
14571     can_build_shared=no
14572     dll_cflags=
14573 fi
14574 rm -f conftest*
14575   CFLAGS="$save_CFLAGS"
14576 else
14577   echo "$ac_t""none" 1>&6
14578 fi
14579
14580 if test "$can_build_shared" = "yes"; then
14581 cc_produces_so=no
14582 xldf=
14583 xcldf=
14584 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14585 echo "configure:14586: checking if C compiler can produce shared libraries" >&5
14586 if test "$XEGCC" = yes; then
14587   xcldf="-shared"
14588   xldf="-shared"
14589 else # Not using GCC
14590   case "$xehost_os" in
14591     aix[3-9]*)
14592       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14593       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14594       ;;
14595
14596     freebsd2* | netbsd* | openbsd*)
14597       xldf="-Bshareable"
14598       xcldf="${wl}-Bshareable"
14599       ;;
14600
14601     freebsd3*)
14602       xcldf="-shared"
14603       ;;
14604
14605     hpux*)
14606       xldf="-b +s"
14607       xcldf="${wl}-b ${wl}+s"
14608       ;;
14609
14610     irix[5-9]* | osf[3-9]*)
14611       xcldf="${wl}-shared"
14612       xldf="-shared"
14613       ;;
14614
14615     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14616       xcldf="-G"
14617       xldf="-G"
14618       ;;
14619
14620     sunos4*)
14621       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14622       xldf="-assert pure-text -Bstatic"
14623       ;;
14624   esac
14625 fi # End if if we are using gcc
14626
14627 if test -n "$xcldf"; then
14628   save_LDFLAGS=$LDFLAGS
14629   save_LIBS=$LIBS
14630   save_xe_libs=$xe_libs
14631   LDFLAGS="$xcldf $LDFLAGS"
14632   LIBS=
14633   xe_libs=
14634   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14635   cat > conftest.$ac_ext <<EOF
14636 #line 14637 "configure"
14637 #include "confdefs.h"
14638
14639 int main() {
14640 int x=0;
14641 ; return 0; }
14642 EOF
14643 if { (eval echo configure:14644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14644   rm -rf conftest*
14645   cc_produces_so=yes
14646 else
14647   echo "configure: failed program was:" >&5
14648   cat conftest.$ac_ext >&5
14649   rm -rf conftest*
14650   cc_produces_so=no
14651 fi
14652 rm -f conftest*
14653   LDFLAGS=$save_LDFLAGS
14654   LIBS=$save_LIBS
14655   xe_libs=$save_xe_libs
14656   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14657 else
14658   cc_produces_so=no
14659 fi
14660 echo "$ac_t""${cc_produces_so}" 1>&6
14661
14662 LTLD=$LD
14663 if test -z "$LTLD"; then
14664   ac_prog=ld
14665   if test "$XEGCC" = yes; then
14666     # Check if gcc -print-prog-name=ld gives a path.
14667     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14668 echo "configure:14669: checking for ld used by GCC" >&5
14669     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14670     case "$ac_prog" in
14671     # Accept absolute paths.
14672     /*)
14673       if test -z "$LTLD"; then
14674 #        case "$ac_prog" in
14675 #          *gcc-lib*) LTLD="$CC"
14676 #                     ;;
14677 #          *)
14678          LTLD="$ac_prog"
14679 #                     ;;
14680 #        esac
14681       fi
14682       ;;
14683     "")
14684       # If it fails, then pretend we aren't using GCC.
14685       ac_prog=ld
14686       ;;
14687     *)
14688       # If it is relative, then search for the first ld in PATH.
14689       with_gnu_ld=unknown
14690       ;;
14691     esac
14692   else
14693     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14694 echo "configure:14695: checking for GNU ld" >&5
14695   fi
14696
14697   if test -z "$LTLD"; then
14698     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14699     for ac_dir in $PATH; do
14700       test -z "$ac_dir" && ac_dir=.
14701       if test -f "$ac_dir/$ac_prog"; then
14702         LTLD="$ac_dir/$ac_prog"
14703         # Check to see if the program is GNU ld.  I'd rather use --version,
14704         # but apparently some GNU ld's only accept -v.
14705         # Break only if it was the GNU/non-GNU ld that we prefer.
14706         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14707           xe_gnu_ld=yes
14708         else
14709           xe_gnu_ld=no
14710         fi
14711       fi
14712     done
14713     IFS="$ac_save_ifs"
14714   fi
14715
14716   if test -n "$LTLD"; then
14717     echo "$ac_t""${LTLD}" 1>&6
14718   else
14719     echo "$ac_t""no" 1>&6
14720   fi
14721
14722   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14723     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14724     exit 1
14725   fi
14726 fi
14727
14728 ld_dynamic_link_flags=
14729
14730 # Check to see if it really is or isn't GNU ld.
14731 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14732 echo "configure:14733: checking if the linker is GNU ld" >&5
14733 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14734 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14735   xe_gnu_ld=yes
14736 else
14737   xe_gnu_ld=no
14738 fi
14739 echo "$ac_t""${xe_gnu_ld}" 1>&6
14740
14741 case "$xehost_os" in
14742   amigaos* | sunos4*)
14743     # On these operating systems, we should treat GNU ld like the system ld.
14744     gnu_ld_acts_native=yes
14745     ;;
14746   *)
14747     gnu_ld_acts_native=no
14748     ;;
14749 esac
14750
14751 if test "$cc_produces_so" = "yes"; then
14752   dll_ld=$CC
14753   dll_ldflags=$xcldf
14754   can_build_shared=yes
14755   ld_shlibs=yes
14756 else
14757   # OK - only NOW do we futz about with ld.
14758   # See if the linker supports building shared libraries.
14759   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14760 echo "configure:14761: checking whether the linker supports shared libraries" >&5
14761   dll_ld=$CC
14762   dll_ldflags=$LDFLAGS
14763   ld_shlibs=yes
14764   can_build_shared=yes
14765   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14766     # See if GNU ld supports shared libraries.
14767     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14768       dll_ld=$CC
14769       dll_ldflags="-shared"
14770       ld_shlibs=yes
14771     else
14772       ld_shlibs=no
14773     fi
14774   else
14775     # PORTME fill in a description of your system's linker (not GNU ld)
14776     case "$xehost_os" in
14777     aix3*)
14778       dll_ld=$LTLD
14779       dll_ldflags=$xldf
14780       ;;
14781
14782     aix[4-9]*)
14783       dll_ldflags=$xcldf
14784       ;;
14785
14786     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14787     # support.  Future versions do this automatically, but an explicit c++rt0.o
14788     # doesn't break anything, and helps significantly (at the cost of a little
14789     # extra space).
14790     freebsd2.2*)
14791       dll_ld=$LTLD
14792       dll_ldflags=$xldf
14793       dll_post="/usr/lib/c++rt0.o"
14794       ;;
14795
14796     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14797     freebsd2*)
14798       dll_ld=$LTLD
14799       dll_ldflags="-Bshareable"
14800       ;;
14801
14802     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14803     freebsd3*)
14804       dll_ldflags="-shared"
14805       ;;
14806
14807     hpux*)
14808       dll_ld=$LTLD
14809       dll_ldflags=$xldf
14810       ;;
14811
14812     irix[5-9]*)
14813       dll_ld=$LTLD
14814       dll_ldflags=$xldf
14815       ;;
14816
14817     netbsd*)
14818       # Tested with NetBSD 1.2 ld
14819       dll_ld=$LTLD
14820       dll_ldflags=$xldf
14821       ;;
14822
14823     openbsd*)
14824       dll_ld=$LTLD
14825       dll_ldflags=$xldf
14826       ;;
14827
14828     osf3* | osf4*)
14829       dll_ld=$LTLD
14830       dll_ldflags=$xldf
14831       ;;
14832
14833     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14834     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14835       dll_ld=$LTLD
14836       case "$dll_ld" in
14837         *gcc*) dll_ldflags="-shared"
14838                dll_ld=$CC
14839                ;;
14840         *)     dll_ldflags="-G"
14841                ;;
14842       esac
14843       ;;
14844
14845     sunos4*)
14846       if test "$XEGCC" = yes; then
14847         dll_ld=$CC
14848       else
14849         dll_ld=$LTLD
14850       fi
14851       dll_ldflags=$xldf
14852       ;;
14853
14854     uts4*)
14855       dll_ld=$LTLD
14856       dll_ldflags="-G"
14857       ;;
14858
14859     bsdi*)
14860       dll_ldflags="-r"
14861       dll_ld="shlicc2"
14862       ;;
14863
14864     *)
14865       ld_shlibs=no
14866       can_build_shared=no
14867       ;;
14868     esac
14869   fi
14870   echo "$ac_t""${ld_shlibs}" 1>&6
14871   if test "$ld_shlibs" = "no"; then
14872     can_build_shared=no
14873   fi
14874 fi # End of if cc_produces_so = no
14875
14876
14877 if test "$xe_gnu_ld" = yes; then
14878   if test "$ld_shlibs" = yes; then
14879     ld_dynamic_link_flags="${wl}-export-dynamic"
14880   fi
14881 fi
14882
14883 if test -z "$ld_dynamic_link_flags"; then
14884   case "$xehost_os" in
14885   aix[3-9]*)
14886     ld_dynamic_link_flags=
14887     ;;
14888
14889   freebsd2.2*)
14890     ld_dynamic_link_flags=
14891     ;;
14892
14893   freebsd2*)
14894     ld_dynamic_link_flags=
14895     ;;
14896
14897   freebsd3*)
14898     ld_dynamic_link_flags=
14899     ;;
14900
14901   hpux*)
14902     ld_dynamic_link_flags="${wl}-E"
14903     ;;
14904
14905   irix[5-9]*)
14906     ld_dynamic_link_flags=
14907     ;;
14908
14909   netbsd*)
14910     ld_dynamic_link_flags=
14911     ;;
14912
14913   openbsd*)
14914     ld_dynamic_link_flags=
14915     ;;
14916
14917   osf3* | osf4*)
14918     ld_dynamic_link_flags=
14919     ;;
14920
14921   solaris2* | solaris7*)
14922     ld_dynamic_link_flags=
14923     ;;
14924
14925   sco3.2v5* | unixware* | sysv5* | sysv4*)
14926     ld_dynamic_link_flags="${wl}-Bexport"
14927     ;;
14928
14929   sunos4*)
14930     ld_dynamic_link_flags=
14931     ;;
14932
14933   uts4*)
14934     ld_dynamic_link_flags=
14935     ;;
14936
14937   bsdi*)
14938     ld_dynamic_link_flags=
14939     ;;
14940
14941   esac
14942 fi # End of if -z ld_dynamic_link_flags
14943 fi # End of if test "$can_build_shared" = "yes"
14944
14945
14946
14947
14948
14949
14950
14951
14952   fi
14953
14954   if test "$can_build_shared" = "yes"; then
14955     { test "$extra_verbose" = "yes" && cat << \EOF
14956     Defining HAVE_SHLIB
14957 EOF
14958 cat >> confdefs.h <<\EOF
14959 #define HAVE_SHLIB 1
14960 EOF
14961 }
14962
14963     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14964    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14965  fi
14966     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14967     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14968     for ac_func in dlerror _dlerror
14969 do
14970 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14971 echo "configure:14972: checking for $ac_func" >&5
14972
14973 cat > conftest.$ac_ext <<EOF
14974 #line 14975 "configure"
14975 #include "confdefs.h"
14976 /* System header to define __stub macros and hopefully few prototypes,
14977     which can conflict with char $ac_func(); below.  */
14978 #include <assert.h>
14979 /* Override any gcc2 internal prototype to avoid an error.  */
14980 /* We use char because int might match the return type of a gcc2
14981     builtin and then its argument prototype would still apply.  */
14982 char $ac_func();
14983
14984 int main() {
14985
14986 /* The GNU C library defines this for functions which it implements
14987     to always fail with ENOSYS.  Some functions are actually named
14988     something starting with __ and the normal name is an alias.  */
14989 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14990 choke me
14991 #else
14992 $ac_func();
14993 #endif
14994
14995 ; return 0; }
14996 EOF
14997 if { (eval echo configure:14998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14998   rm -rf conftest*
14999   eval "ac_cv_func_$ac_func=yes"
15000 else
15001   echo "configure: failed program was:" >&5
15002   cat conftest.$ac_ext >&5
15003   rm -rf conftest*
15004   eval "ac_cv_func_$ac_func=no"
15005 fi
15006 rm -f conftest*
15007
15008 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15009   echo "$ac_t""yes" 1>&6
15010     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15011   { test "$extra_verbose" = "yes" && cat << EOF
15012     Defining $ac_tr_func
15013 EOF
15014 cat >> confdefs.h <<EOF
15015 #define $ac_tr_func 1
15016 EOF
15017 }
15018  
15019 else
15020   echo "$ac_t""no" 1>&6
15021 fi
15022 done
15023
15024     with_modules=yes
15025   else
15026     if test "$with_modules" = "yes"; then
15027       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15028     else
15029       echo "configure: warning: "Module support cannot be provided."" 1>&2
15030     fi
15031     with_modules=no
15032   fi
15033 fi
15034
15035 cat > conftest.$ac_ext <<EOF
15036 #line 15037 "configure"
15037 #include "confdefs.h"
15038 int main(int c,char *v[]){return 0;}
15039 EOF
15040 if { (eval echo configure:15041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15041 then
15042   :
15043 else
15044   conftest_rc="$?"
15045   echo "configure: failed program was:" >&5
15046   cat conftest.$ac_ext >&5
15047   rm -fr conftest*
15048   
15049   echo ""
15050   echo "*** PANIC *** The C compiler can no longer build working executables."
15051   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15052   echo "*** PANIC *** The most likely reason for this problem is that configure"
15053   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15054   echo "*** PANIC *** found at run time."
15055   echo "*** PANIC ***"
15056   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15057   echo "*** PANIC *** On other systems, try telling configure where to find the"
15058   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15059   echo "*** PANIC ***"
15060   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15061   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15062   echo "*** PANIC *** on your system.  Don't do that."
15063   exit 1
15064 fi
15065 rm -fr conftest*
15066
15067 if test "$win32_processes" = "yes"; then
15068   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15069    echo "    xemacs will be linked with \"process-nt.o\""
15070  fi
15071 else
15072   { test "$extra_verbose" = "yes" && cat << \EOF
15073     Defining HAVE_UNIX_PROCESSES
15074 EOF
15075 cat >> confdefs.h <<\EOF
15076 #define HAVE_UNIX_PROCESSES 1
15077 EOF
15078 }
15079
15080   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15081    echo "    xemacs will be linked with \"process-unix.o\""
15082  fi
15083 fi
15084
15085
15086
15087 T=""
15088 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15089 CFLAGS="$T"
15090
15091
15092 T=""
15093 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15094 extra_objs="$T"
15095
15096
15097 T=""
15098 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
15099 c_switch_general="$T"
15100
15101
15102 T=""
15103 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
15104 c_switch_window_system="$T"
15105
15106
15107 T=""
15108 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15109 c_switch_all="$T"
15110
15111
15112 T=""
15113 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
15114 ld_switch_general="$T"
15115
15116
15117 T=""
15118 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15119 ld_switch_window_system="$T"
15120
15121
15122 T=""
15123 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15124 ld_switch_all="$T"
15125
15126
15127 T=""
15128 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15129 ld_libs_general="$T"
15130
15131
15132 T=""
15133 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
15134 ld_libs_window_system="$T"
15135
15136
15137 T=""
15138 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15139 ld_libs_all="$T"
15140
15141
15142
15143 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15144 internal_makefile_list="Makefile.in"
15145 SUBDIR_MAKEFILES=''
15146 test -d lock || mkdir lock
15147 for dir in $MAKE_SUBDIR; do
15148   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15149         test -d "$d" || mkdir "$d"; cd "$d"
15150       done ) ;;
15151    * ) test -d "$dir" || mkdir "$dir" ;;
15152   esac
15153   
15154 T=""
15155 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15156 SUBDIR_MAKEFILES="$T"
15157
15158   
15159 T=""
15160 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15161 internal_makefile_list="$T"
15162
15163 done
15164
15165
15166
15167
15168 for dir in src/s src/m; do
15169   if test ! -d "$dir" ; then
15170     echo Making symbolic link to "$srcdir/$dir"
15171     ${LN_S} "$srcdir/$dir" "$dir"
15172   fi
15173 done
15174
15175 if test "$extra_verbose" = "yes"; then
15176   echo ""
15177   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
15178   echo ""
15179 fi
15180
15181
15182 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15183   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15184   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15185 fi
15186
15187 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15188   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15189   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15190 fi
15191
15192 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15193   test "$extra_verbose" = "yes" && echo "creating TAGS"
15194   echo "\f
15195 $srcdir/TAGS,include" > "TAGS"
15196 fi
15197
15198 if test "$__SUNPRO_C" = "yes"; then
15199   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15200   ( echo "# For use with Sun WorkShop's Source browser."
15201     echo "# See sbquery(1) and sbinit(4) for more information"
15202     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15203   ) > .sbinit
15204 fi
15205
15206 rm -f core
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227 PREFIX=$prefix
15228 while true; do
15229   case "$PREFIX" in
15230     *\$* ) eval "PREFIX=$PREFIX" ;;
15231     *) break ;;
15232   esac
15233 done
15234
15235
15236
15237
15238 EXEC_PREFIX=$exec_prefix
15239 while true; do
15240   case "$EXEC_PREFIX" in
15241     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15242     *) break ;;
15243   esac
15244 done
15245
15246
15247
15248
15249 INFODIR=$infodir
15250 while true; do
15251   case "$INFODIR" in
15252     *\$* ) eval "INFODIR=$INFODIR" ;;
15253     *) break ;;
15254   esac
15255 done
15256
15257
15258
15259
15260 INFOPATH=$infopath
15261 while true; do
15262   case "$INFOPATH" in
15263     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15264     *) break ;;
15265   esac
15266 done
15267
15268
15269
15270
15271 PACKAGE_PATH=$package_path
15272 while true; do
15273   case "$PACKAGE_PATH" in
15274     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15275     *) break ;;
15276   esac
15277 done
15278
15279
15280
15281
15282 LISPDIR=$lispdir
15283 while true; do
15284   case "$LISPDIR" in
15285     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15286     *) break ;;
15287   esac
15288 done
15289
15290
15291
15292
15293 MODULEDIR=$moduledir
15294 while true; do
15295   case "$MODULEDIR" in
15296     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15297     *) break ;;
15298   esac
15299 done
15300
15301
15302
15303
15304 SITELISPDIR=$sitelispdir
15305 while true; do
15306   case "$SITELISPDIR" in
15307     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15308     *) break ;;
15309   esac
15310 done
15311
15312
15313
15314
15315 SITEMODULEDIR=$sitemoduledir
15316 while true; do
15317   case "$SITEMODULEDIR" in
15318     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15319     *) break ;;
15320   esac
15321 done
15322
15323
15324
15325
15326 ETCDIR=$etcdir
15327 while true; do
15328   case "$ETCDIR" in
15329     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15330     *) break ;;
15331   esac
15332 done
15333
15334
15335
15336
15337 DOCDIR=$docdir
15338 while true; do
15339   case "$DOCDIR" in
15340     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15341     *) break ;;
15342   esac
15343 done
15344
15345
15346
15347
15348 ARCHLIBDIR=$archlibdir
15349 while true; do
15350   case "$ARCHLIBDIR" in
15351     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15352     *) break ;;
15353   esac
15354 done
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15376
15377
15378
15379
15380
15381
15382
15383 : ${XEMACS_CC:=$CC}
15384
15385
15386 if test "$with_prefix" = "yes"; then
15387   { test "$extra_verbose" = "yes" && cat << \EOF
15388     Defining PREFIX_USER_DEFINED
15389 EOF
15390 cat >> confdefs.h <<\EOF
15391 #define PREFIX_USER_DEFINED 1
15392 EOF
15393 }
15394
15395 fi
15396
15397 if test "$with_site_lisp" = "no"; then
15398   { test "$extra_verbose" = "yes" && cat << \EOF
15399     Defining INHIBIT_SITE_LISP
15400 EOF
15401 cat >> confdefs.h <<\EOF
15402 #define INHIBIT_SITE_LISP 1
15403 EOF
15404 }
15405
15406 fi
15407 if test "$with_site_modules" = "no"; then
15408   { test "$extra_verbose" = "yes" && cat << \EOF
15409     Defining INHIBIT_SITE_MODULES
15410 EOF
15411 cat >> confdefs.h <<\EOF
15412 #define INHIBIT_SITE_MODULES 1
15413 EOF
15414 }
15415
15416 fi
15417
15418
15419 T=""
15420 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15421 ac_configure_args="$T"
15422
15423 { test "$extra_verbose" = "yes" && cat << EOF
15424     Defining EMACS_CONFIGURATION = "$configuration"
15425 EOF
15426 cat >> confdefs.h <<EOF
15427 #define EMACS_CONFIGURATION "$configuration"
15428 EOF
15429 }
15430
15431 { test "$extra_verbose" = "yes" && cat << EOF
15432     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15433 EOF
15434 cat >> confdefs.h <<EOF
15435 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15436 EOF
15437 }
15438
15439
15440
15441 null_string=""
15442 { test "$extra_verbose" = "yes" && cat << EOF
15443     Defining LD_SWITCH_X_SITE = $null_string
15444 EOF
15445 cat >> confdefs.h <<EOF
15446 #define LD_SWITCH_X_SITE $null_string
15447 EOF
15448 }
15449
15450 { test "$extra_verbose" = "yes" && cat << EOF
15451     Defining LD_SWITCH_X_SITE_AUX = $null_string
15452 EOF
15453 cat >> confdefs.h <<EOF
15454 #define LD_SWITCH_X_SITE_AUX $null_string
15455 EOF
15456 }
15457
15458 { test "$extra_verbose" = "yes" && cat << EOF
15459     Defining C_SWITCH_X_SITE = $null_string
15460 EOF
15461 cat >> confdefs.h <<EOF
15462 #define C_SWITCH_X_SITE $null_string
15463 EOF
15464 }
15465
15466 { test "$extra_verbose" = "yes" && cat << EOF
15467     Defining LD_SWITCH_SITE = $null_string
15468 EOF
15469 cat >> confdefs.h <<EOF
15470 #define LD_SWITCH_SITE $null_string
15471 EOF
15472 }
15473
15474 { test "$extra_verbose" = "yes" && cat << EOF
15475     Defining C_SWITCH_SITE = $null_string
15476 EOF
15477 cat >> confdefs.h <<EOF
15478 #define C_SWITCH_SITE $null_string
15479 EOF
15480 }
15481
15482
15483
15484 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15485     Defining GNU_MALLOC
15486 EOF
15487 cat >> confdefs.h <<\EOF
15488 #define GNU_MALLOC 1
15489 EOF
15490 }
15491
15492 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15493     Defining USE_SYSTEM_MALLOC
15494 EOF
15495 cat >> confdefs.h <<\EOF
15496 #define USE_SYSTEM_MALLOC 1
15497 EOF
15498 }
15499
15500 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15501     Defining USE_DEBUG_MALLOC
15502 EOF
15503 cat >> confdefs.h <<\EOF
15504 #define USE_DEBUG_MALLOC 1
15505 EOF
15506 }
15507
15508                                               { test "$extra_verbose" = "yes" && cat << \EOF
15509     Defining USE_SYSTEM_MALLOC
15510 EOF
15511 cat >> confdefs.h <<\EOF
15512 #define USE_SYSTEM_MALLOC 1
15513 EOF
15514 }
15515
15516 fi
15517 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15518     Defining I18N3
15519 EOF
15520 cat >> confdefs.h <<\EOF
15521 #define I18N3 1
15522 EOF
15523 }
15524
15525 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15526     Defining USE_GCC
15527 EOF
15528 cat >> confdefs.h <<\EOF
15529 #define USE_GCC 1
15530 EOF
15531 }
15532
15533 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15534     Defining EXTERNAL_WIDGET
15535 EOF
15536 cat >> confdefs.h <<\EOF
15537 #define EXTERNAL_WIDGET 1
15538 EOF
15539 }
15540
15541 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15542     Defining QUICK_BUILD
15543 EOF
15544 cat >> confdefs.h <<\EOF
15545 #define QUICK_BUILD 1
15546 EOF
15547 }
15548
15549 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15550     Defining PURIFY
15551 EOF
15552 cat >> confdefs.h <<\EOF
15553 #define PURIFY 1
15554 EOF
15555 }
15556
15557 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15558     Defining QUANTIFY
15559 EOF
15560 cat >> confdefs.h <<\EOF
15561 #define QUANTIFY 1
15562 EOF
15563 }
15564
15565 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15566     Defining MAIL_USE_POP
15567 EOF
15568 cat >> confdefs.h <<\EOF
15569 #define MAIL_USE_POP 1
15570 EOF
15571 }
15572
15573 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15574     Defining KERBEROS
15575 EOF
15576 cat >> confdefs.h <<\EOF
15577 #define KERBEROS 1
15578 EOF
15579 }
15580
15581 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15582     Defining HESIOD
15583 EOF
15584 cat >> confdefs.h <<\EOF
15585 #define HESIOD 1
15586 EOF
15587 }
15588
15589 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15590     Defining USE_UNION_TYPE
15591 EOF
15592 cat >> confdefs.h <<\EOF
15593 #define USE_UNION_TYPE 1
15594 EOF
15595 }
15596
15597 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15598     Defining PDUMP
15599 EOF
15600 cat >> confdefs.h <<\EOF
15601 #define PDUMP 1
15602 EOF
15603 }
15604
15605 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15606     Defining IPV6_CANONICALIZE
15607 EOF
15608 cat >> confdefs.h <<\EOF
15609 #define IPV6_CANONICALIZE 1
15610 EOF
15611 }
15612
15613
15614
15615 (
15616 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15617 else
15618   echo "uname -a: `uname -a`"
15619 fi
15620 echo ""
15621 echo "$0 $quoted_arguments"
15622 ) > Installation
15623
15624 if test ! -z ${emacs_beta_version} ; then
15625   if test -z "${emacs_is_beta}" ; then
15626         xemacs_betaname=".${emacs_beta_version}"
15627   else
15628         xemacs_betaname="-b${emacs_beta_version}"
15629   fi
15630 else
15631   xemacs_betaname=""
15632 fi
15633
15634 (
15635 echo "
15636
15637 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15638 "
15639 echo "
15640 Compilation / Installation:"
15641 echo "  Source code location:              $srcdir"
15642 echo "  Installation prefix:               $prefix"
15643 if test -n "$site_includes"; then
15644   echo "  Additional header files:           $site_includes"
15645 fi
15646 if test -n "$site_libraries"; then
15647   echo "  Additional libraries:              $site_libraries"
15648 fi
15649 if test -n "$site_prefixes"; then
15650   echo "  Additional prefixes:               $site_prefixes"
15651 fi
15652 if test -n "$runpath"; then
15653   echo "  Runtime library search path:       $runpath"
15654 fi
15655
15656 if test -n "$opsysfile"
15657 then echo "  Operating system description file: \`$opsysfile'"
15658 else echo "  Not using any operating system description file"
15659 fi
15660 if test -n "$machfile"
15661 then echo "  Machine description file:          \`$machfile'"
15662 else echo "  Not using any machine description file"
15663 fi
15664
15665 echo "  Compiler:                          $CC $CFLAGS"
15666 echo "  Relocating allocator for buffers:  $rel_alloc"
15667 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15668
15669 echo "
15670 Window System:"
15671 if test "$with_msw" = "yes"; then
15672   echo "  Compiling in support for the Microsoft window system."
15673 fi
15674 if test "$with_x11" = "yes"; then
15675   echo "  Compiling in support for the X window system:"
15676   echo "    - X Windows headers location:                 $x_includes"
15677   echo "    - X Windows libraries location:               $x_libraries"
15678   if test "$with_xauth" != yes; then
15679     echo "    - Xau (X authority) not available."
15680   fi
15681   if test "$with_xmu" != yes; then
15682     echo "    - Xmu library not available; substituting equivalent routines."
15683   fi
15684   if test "$with_wmcommand" != no; then
15685     echo "    - Handling WM_COMMAND properly."
15686   fi
15687 fi
15688 if test "$need_athena" = "yes"; then
15689   echo "  Compiling in support for the Athena widget set:"
15690   echo "    - Athena headers location:                    $athena_h_path"
15691   echo "    - Athena library to link:                     $athena_lib"
15692 fi
15693 case "$with_menubars" in
15694   gtk   ) echo "  Using GTK menubars."   ;;
15695   lucid ) echo "  Using Lucid menubars." ;;
15696   motif ) echo "  Using Motif menubars."
15697           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15698           echo "             We recommend using the Lucid menubar instead."
15699           echo "             Re-run configure with --with-menubars='lucid'." ;;
15700     msw ) echo "  Using MS-Windows menubars." ;;
15701 esac
15702 case "$with_scrollbars" in
15703   gtk    ) echo "  Using GTK scrollbars."        ;;
15704   lucid  ) echo "  Using Lucid scrollbars."      ;;
15705   motif  ) echo "  Using Motif scrollbars."      ;;
15706   athena ) echo "  Using Athena scrollbars."     ;;
15707      msw ) echo "  Using MS-Windows scrollbars." ;;
15708 esac
15709 case "$with_dialogs" in
15710   gtk    ) echo "  Using GTK dialog boxes." ;;
15711   motif  ) echo "  Using Motif dialog boxes."
15712            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15713              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15714              echo "             We recommend using the Athena dialog boxes instead."
15715              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15716              echo "             Read the PROBLEMS file for more information."
15717            fi; fi ;;
15718   athena ) echo "  Using Athena dialog boxes."     ;;
15719      msw ) echo "  Using MS-Windows dialog boxes." ;;
15720 esac
15721 case "$with_widgets" in
15722   gtk    ) echo "  Using GTK native widgets."        ;;
15723   motif  ) echo "  Using Motif native widgets."      ;;
15724   athena ) echo "  Using Athena native widgets."     ;;
15725      msw ) echo "  Using MS-Windows native widgets." ;;
15726 esac
15727 if test "$with_dragndrop" = yes; then
15728   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15729   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15730 fi
15731
15732 echo "
15733 TTY:"
15734 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15735 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15736
15737 echo "
15738 Images:"
15739 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15740 if test "$with_xpm" = yes; then
15741   echo "  Compiling in support for XPM  images."
15742 elif test "$with_x11" = yes; then
15743   echo "  WARNING: -----------------------------------------------------------"
15744   echo "  WARNING: Compiling without XPM image support."
15745   if test "$xpm_problem" != ""; then
15746     echo "  Reason: $xpm_problem"
15747   fi
15748   echo "  WARNING: You should strongly consider installing XPM."
15749   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15750   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15751   echo "  WARNING: -----------------------------------------------------------"
15752 fi
15753 if test "$with_png" = yes; then
15754   echo "  Compiling in support for PNG  images."
15755 elif test "$window_system" != "none"; then
15756   echo "  WARNING: -----------------------------------------------------------"
15757   echo "  WARNING: Compiling without PNG image support."
15758   if test "$png_problem" != ""; then
15759     echo "  Reason: $png_problem"
15760   fi
15761   echo "  WARNING: You should strongly consider installing the PNG libraries."
15762   echo "  WARNING: Otherwise certain images and glyphs may not display."
15763   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15764   echo "  WARNING: -----------------------------------------------------------"
15765 fi
15766 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15767 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15768 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15769
15770 echo "
15771 Sound:"
15772 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15773 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15774 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15775 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15776
15777 echo "
15778 Databases:"
15779 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15780 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15781 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15782 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15783 if test "$with_postgresql" = yes; then
15784   echo "  Compiling in support for PostgreSQL."
15785   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15786   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15787 fi
15788
15789 echo "
15790 Internationalization:"
15791 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15792 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15793 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15794 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15795 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15796 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15797 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15798 if test "$with_wnn" = yes; then
15799   echo "  Compiling in support for the WNN input method on Mule."
15800   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15801 fi
15802 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15803
15804 echo "
15805 Mail:"
15806 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15807 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15808 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15809 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15810
15811 echo "
15812 Other Features:"
15813 test "with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
15814 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15815 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15816 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15817 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15818 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15819 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15820 test "$pdump" = yes && echo "  Using the new portable dumper."
15821 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15822 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15823 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15824   != "no no no no no no"; then
15825   echo "  WARNING: ---------------------------------------------------------"
15826   echo "  WARNING: Compiling in support for runtime error checking."
15827   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15828   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15829   echo "  WARNING: ---------------------------------------------------------"
15830 fi
15831 echo ""
15832 ) | tee -a Installation
15833 echo ""
15834
15835
15836 # Remove any trailing slashes in these variables.
15837 test -n "$prefix" &&
15838   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15839 test -n "$exec_prefix" &&
15840   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15841
15842
15843 for file in $internal_makefile_list; do
15844   test "$file" = src/Makefile.in && \
15845     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15846   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15847 done
15848 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15849 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
15850
15851 trap '' 1 2 15
15852
15853 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15854
15855 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15856 # Let make expand exec_prefix.
15857 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15858
15859 # Any assignment to VPATH causes Sun make to only execute
15860 # the first set of double-colon rules, so remove it if not needed.
15861 # If there is a colon in the path, we need to keep it.
15862 if test "x$srcdir" = x.; then
15863   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15864 fi
15865
15866 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15867
15868 DEFS=-DHAVE_CONFIG_H
15869
15870 # Without the "./", some shells look in PATH for config.status.
15871 : ${CONFIG_STATUS=./config.status}
15872
15873 echo creating $CONFIG_STATUS
15874 rm -f $CONFIG_STATUS
15875 cat > $CONFIG_STATUS <<EOF
15876 #! /bin/sh
15877 # Generated automatically by configure.
15878 # Run this file to recreate the current configuration.
15879 # This directory was configured as follows,
15880 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15881 #
15882 # $0 $ac_configure_args
15883 #
15884 # Compiler output produced by configure, useful for debugging
15885 # configure, is in ./config.log if it exists.
15886
15887 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15888 for ac_option
15889 do
15890   case "\$ac_option" in
15891   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15892     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15893     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15894   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15895     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15896     exit 0 ;;
15897   -help | --help | --hel | --he | --h)
15898     echo "\$ac_cs_usage"; exit 0 ;;
15899   *) echo "\$ac_cs_usage"; exit 1 ;;
15900   esac
15901 done
15902
15903 ac_given_srcdir=$srcdir
15904 ac_given_INSTALL="$INSTALL"
15905
15906 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15907 EOF
15908 cat >> $CONFIG_STATUS <<EOF
15909
15910 # Protect against being on the right side of a sed subst in config.status.
15911 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15912  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15913 $ac_vpsub
15914 $extrasub
15915 s%@SHELL@%$SHELL%g
15916 s%@CFLAGS@%$CFLAGS%g
15917 s%@CPPFLAGS@%$CPPFLAGS%g
15918 s%@CXXFLAGS@%$CXXFLAGS%g
15919 s%@FFLAGS@%$FFLAGS%g
15920 s%@DEFS@%$DEFS%g
15921 s%@LDFLAGS@%$LDFLAGS%g
15922 s%@LIBS@%$LIBS%g
15923 s%@exec_prefix@%$exec_prefix%g
15924 s%@prefix@%$prefix%g
15925 s%@program_transform_name@%$program_transform_name%g
15926 s%@bindir@%$bindir%g
15927 s%@sbindir@%$sbindir%g
15928 s%@libexecdir@%$libexecdir%g
15929 s%@datadir@%$datadir%g
15930 s%@sysconfdir@%$sysconfdir%g
15931 s%@sharedstatedir@%$sharedstatedir%g
15932 s%@localstatedir@%$localstatedir%g
15933 s%@libdir@%$libdir%g
15934 s%@includedir@%$includedir%g
15935 s%@oldincludedir@%$oldincludedir%g
15936 s%@infodir@%$infodir%g
15937 s%@mandir@%$mandir%g
15938 s%@LN_S@%$LN_S%g
15939 s%@blddir@%$blddir%g
15940 s%@CC@%$CC%g
15941 s%@CPP@%$CPP%g
15942 s%@start_flags@%$start_flags%g
15943 s%@ld_switch_shared@%$ld_switch_shared%g
15944 s%@start_files@%$start_files%g
15945 s%@ld@%$ld%g
15946 s%@lib_gcc@%$lib_gcc%g
15947 s%@RANLIB@%$RANLIB%g
15948 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15949 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15950 s%@INSTALL_DATA@%$INSTALL_DATA%g
15951 s%@YACC@%$YACC%g
15952 s%@SET_MAKE@%$SET_MAKE%g
15953 s%@GTK_CONFIG@%$GTK_CONFIG%g
15954 s%@X_CFLAGS@%$X_CFLAGS%g
15955 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15956 s%@X_LIBS@%$X_LIBS%g
15957 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15958 s%@install_pp@%$install_pp%g
15959 s%@libs_xauth@%$libs_xauth%g
15960 s%@dnd_objs@%$dnd_objs%g
15961 s%@lwlib_objs@%$lwlib_objs%g
15962 s%@ALLOCA@%$ALLOCA%g
15963 s%@have_esd_config@%$have_esd_config%g
15964 s%@dll_ld@%$dll_ld%g
15965 s%@dll_cflags@%$dll_cflags%g
15966 s%@dll_ldflags@%$dll_ldflags%g
15967 s%@dll_post@%$dll_post%g
15968 s%@dll_ldo@%$dll_ldo%g
15969 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15970 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15971 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15972 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15973 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15974 s%@PROGNAME@%$PROGNAME%g
15975 s%@version@%$version%g
15976 s%@configuration@%$configuration%g
15977 s%@canonical@%$canonical%g
15978 s%@inststaticdir@%$inststaticdir%g
15979 s%@instvardir@%$instvardir%g
15980 s%@srcdir@%$srcdir%g
15981 s%@pkgdir@%$pkgdir%g
15982 s%@statedir@%$statedir%g
15983 s%@extra_includes@%$extra_includes%g
15984 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15985 s%@PREFIX@%$PREFIX%g
15986 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15987 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15988 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15989 s%@INFODIR@%$INFODIR%g
15990 s%@infopath@%$infopath%g
15991 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15992 s%@INFOPATH@%$INFOPATH%g
15993 s%@package_path@%$package_path%g
15994 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15995 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15996 s%@lispdir@%$lispdir%g
15997 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15998 s%@LISPDIR@%$LISPDIR%g
15999 s%@moduledir@%$moduledir%g
16000 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16001 s%@MODULEDIR@%$MODULEDIR%g
16002 s%@sitelispdir@%$sitelispdir%g
16003 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16004 s%@SITELISPDIR@%$SITELISPDIR%g
16005 s%@sitemoduledir@%$sitemoduledir%g
16006 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16007 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16008 s%@etcdir@%$etcdir%g
16009 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16010 s%@ETCDIR@%$ETCDIR%g
16011 s%@docdir@%$docdir%g
16012 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16013 s%@DOCDIR@%$DOCDIR%g
16014 s%@archlibdir@%$archlibdir%g
16015 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16016 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16017 s%@bitmapdir@%$bitmapdir%g
16018 s%@extra_objs@%$extra_objs%g
16019 s%@machfile@%$machfile%g
16020 s%@opsysfile@%$opsysfile%g
16021 s%@c_switch_general@%$c_switch_general%g
16022 s%@c_switch_window_system@%$c_switch_window_system%g
16023 s%@c_switch_all@%$c_switch_all%g
16024 s%@ld_switch_general@%$ld_switch_general%g
16025 s%@ld_switch_window_system@%$ld_switch_window_system%g
16026 s%@ld_switch_all@%$ld_switch_all%g
16027 s%@ld_libs_general@%$ld_libs_general%g
16028 s%@ld_libs_window_system@%$ld_libs_window_system%g
16029 s%@ld_libs_all@%$ld_libs_all%g
16030 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16031 s%@native_sound_lib@%$native_sound_lib%g
16032 s%@sound_cflags@%$sound_cflags%g
16033 s%@dynodump_arch@%$dynodump_arch%g
16034 s%@XEMACS_CC@%$XEMACS_CC%g
16035 s%@internal_makefile_list@%$internal_makefile_list%g
16036
16037 CEOF
16038 EOF
16039
16040 cat >> $CONFIG_STATUS <<\EOF
16041
16042 # Split the substitutions into bite-sized pieces for seds with
16043 # small command number limits, like on Digital OSF/1 and HP-UX.
16044 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16045 ac_file=1 # Number of current file.
16046 ac_beg=1 # First line for current file.
16047 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16048 ac_more_lines=:
16049 ac_sed_cmds=""
16050 while $ac_more_lines; do
16051   if test $ac_beg -gt 1; then
16052     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16053   else
16054     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16055   fi
16056   if test ! -s conftest.s$ac_file; then
16057     ac_more_lines=false
16058     rm -f conftest.s$ac_file
16059   else
16060     if test -z "$ac_sed_cmds"; then
16061       ac_sed_cmds="sed -f conftest.s$ac_file"
16062     else
16063       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16064     fi
16065     ac_file=`expr $ac_file + 1`
16066     ac_beg=$ac_end
16067     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16068   fi
16069 done
16070 if test -z "$ac_sed_cmds"; then
16071   ac_sed_cmds=cat
16072 fi
16073 EOF
16074
16075 cat >> $CONFIG_STATUS <<EOF
16076
16077 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16078 EOF
16079 cat >> $CONFIG_STATUS <<\EOF
16080 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16081   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16082   case "$ac_file" in
16083   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16084        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16085   *) ac_file_in="${ac_file}.in" ;;
16086   esac
16087
16088   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16089
16090   # Remove last slash and all that follows it.  Not all systems have dirname.
16091   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16092   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16093     # The file is in a subdirectory.
16094     test ! -d "$ac_dir" && mkdir "$ac_dir"
16095     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16096     # A "../" for each directory in $ac_dir_suffix.
16097     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16098   else
16099     ac_dir_suffix= ac_dots=
16100   fi
16101
16102   case "$ac_given_srcdir" in
16103   .)  srcdir=.
16104       if test -z "$ac_dots"; then top_srcdir=.
16105       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16106   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16107   *) # Relative path.
16108     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16109     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16110   esac
16111
16112   case "$ac_given_INSTALL" in
16113   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16114   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16115   esac
16116
16117   echo creating "$ac_file"
16118   rm -f "$ac_file"
16119   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16120   case "$ac_file" in
16121   *Makefile*) ac_comsub="1i\\
16122 # $configure_input" ;;
16123   *) ac_comsub= ;;
16124   esac
16125
16126   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16127   sed -e "$ac_comsub
16128 s%@configure_input@%$configure_input%g
16129 s%@srcdir@%$srcdir%g
16130 s%@top_srcdir@%$top_srcdir%g
16131 s%@INSTALL@%$INSTALL%g
16132 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16133 fi; done
16134 rm -f conftest.s*
16135
16136 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16137 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16138 #
16139 # ac_d sets the value in "#define NAME VALUE" lines.
16140 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16141 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16142 ac_dC='\3'
16143 ac_dD='%g'
16144 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16145 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16146 ac_uB='\([      ]\)%\1#\2define\3'
16147 ac_uC=' '
16148 ac_uD='\4%g'
16149 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16150 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16151 ac_eB='$%\1#\2define\3'
16152 ac_eC=' '
16153 ac_eD='%g'
16154
16155 if test "${CONFIG_HEADERS+set}" != set; then
16156 EOF
16157 cat >> $CONFIG_STATUS <<EOF
16158   CONFIG_HEADERS="src/config.h lwlib/config.h"
16159 EOF
16160 cat >> $CONFIG_STATUS <<\EOF
16161 fi
16162 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16163   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16164   case "$ac_file" in
16165   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16166        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16167   *) ac_file_in="${ac_file}.in" ;;
16168   esac
16169
16170   echo creating $ac_file
16171
16172   rm -f conftest.frag conftest.in conftest.out
16173   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16174   cat $ac_file_inputs > conftest.in
16175
16176 EOF
16177
16178 # Transform confdefs.h into a sed script conftest.vals that substitutes
16179 # the proper values into config.h.in to produce config.h.  And first:
16180 # Protect against being on the right side of a sed subst in config.status.
16181 # Protect against being in an unquoted here document in config.status.
16182 rm -f conftest.vals
16183 cat > conftest.hdr <<\EOF
16184 s/[\\&%]/\\&/g
16185 s%[\\$`]%\\&%g
16186 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16187 s%ac_d%ac_u%gp
16188 s%ac_u%ac_e%gp
16189 EOF
16190 sed -n -f conftest.hdr confdefs.h > conftest.vals
16191 rm -f conftest.hdr
16192
16193 # This sed command replaces #undef with comments.  This is necessary, for
16194 # example, in the case of _POSIX_SOURCE, which is predefined and required
16195 # on some systems where configure will not decide to define it.
16196 cat >> conftest.vals <<\EOF
16197 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16198 EOF
16199
16200 # Break up conftest.vals because some shells have a limit on
16201 # the size of here documents, and old seds have small limits too.
16202
16203 rm -f conftest.tail
16204 while :
16205 do
16206   ac_lines=`grep -c . conftest.vals`
16207   # grep -c gives empty output for an empty file on some AIX systems.
16208   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16209   # Write a limited-size here document to conftest.frag.
16210   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16211   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16212   echo 'CEOF
16213   sed -f conftest.frag conftest.in > conftest.out
16214   rm -f conftest.in
16215   mv conftest.out conftest.in
16216 ' >> $CONFIG_STATUS
16217   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16218   rm -f conftest.vals
16219   mv conftest.tail conftest.vals
16220 done
16221 rm -f conftest.vals
16222
16223 cat >> $CONFIG_STATUS <<\EOF
16224   rm -f conftest.frag conftest.h
16225   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16226   cat conftest.in >> conftest.h
16227   rm -f conftest.in
16228   if cmp -s $ac_file conftest.h 2>/dev/null; then
16229     echo "$ac_file is unchanged"
16230     rm -f conftest.h
16231   else
16232     # Remove last slash and all that follows it.  Not all systems have dirname.
16233       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16234       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16235       # The file is in a subdirectory.
16236       test ! -d "$ac_dir" && mkdir "$ac_dir"
16237     fi
16238     rm -f $ac_file
16239     mv conftest.h $ac_file
16240   fi
16241 fi; done
16242
16243 EOF
16244 cat >> $CONFIG_STATUS <<EOF
16245 CPP="$CPP"
16246  top_srcdir="$srcdir"
16247  MAKE_SUBDIR="$MAKE_SUBDIR"
16248
16249 EOF
16250 cat >> $CONFIG_STATUS <<\EOF
16251 for dir in . $MAKE_SUBDIR; do
16252   (
16253     cd $dir
16254     rm -f junk.c
16255     < Makefile.in \
16256       sed -e '/^# Generated/d' \
16257           -e 's%/\*\*/#.*%%' \
16258           -e 's/^ *# */#/' \
16259           -e '/^##/d' \
16260           -e '/^#/ {
16261 p
16262 d
16263 }'        \
16264           -e '/./ {
16265 s/\([\"]\)/\\\1/g
16266 s/^/"/
16267 s/$/"/
16268 }'  > junk.c;
16269
16270
16271
16272     echo creating $dir/Makefile
16273 $CPP -I. -I${top_srcdir}/src  junk.c \
16274   | sed -e 's/^\#.*//'          \
16275         -e 's/^[        ][      ]*$//'\
16276         -e 's/^ /       /'              \
16277         -e '/^[ \f]*$/d' \
16278         -e '/^\"/ {
16279         s/\\\([\"]\)/\1/g
16280         s/^[    ]*\"//
16281         s/\"[   ]*$//
16282 }' > Makefile.new
16283     chmod 444 Makefile.new
16284     mv -f Makefile.new Makefile
16285
16286     echo creating $dir/GNUmakefile
16287 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16288   | sed -e 's/^\#.*//'          \
16289         -e 's/^[        ][      ]*$//'\
16290         -e 's/^ /       /'              \
16291         -e '/^[ \f]*$/d' \
16292         -e '/^\"/ {
16293         s/\\\([\"]\)/\1/g
16294         s/^[    ]*\"//
16295         s/\"[   ]*$//
16296 }' > Makefile.new
16297     chmod 444 Makefile.new
16298     mv -f Makefile.new GNUmakefile
16299
16300     rm -f junk.c
16301   )
16302 done
16303
16304 sed < config.status >> lib-src/config.values \
16305   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16306   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16307   -e 's/^\([^ ]*\) $/\1 ""/' \
16308   -e 's/ 1$/ t/'
16309
16310
16311 exit 0
16312 EOF
16313 chmod +x $CONFIG_STATUS
16314 rm -fr confdefs* $ac_clean_files
16315 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1